From b0fb1c3a0c1af1c0e5d7e731c0feec3d2093a8bf Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Fri, 8 Jul 2022 02:00:30 +0000 Subject: [PATCH 01/80] feat: initial stub of library --- .../google-cloud-dataform/CODE_OF_CONDUCT.md | 94 ++++++++ .../google-cloud-dataform/CONTRIBUTING.md | 74 +++++++ packages/google-cloud-dataform/LICENSE | 202 ++++++++++++++++++ packages/google-cloud-dataform/README.md | 110 ++++++++++ 4 files changed, 480 insertions(+) create mode 100644 packages/google-cloud-dataform/CODE_OF_CONDUCT.md create mode 100644 packages/google-cloud-dataform/CONTRIBUTING.md create mode 100644 packages/google-cloud-dataform/LICENSE create mode 100644 packages/google-cloud-dataform/README.md diff --git a/packages/google-cloud-dataform/CODE_OF_CONDUCT.md b/packages/google-cloud-dataform/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..2add2547a81 --- /dev/null +++ b/packages/google-cloud-dataform/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-dataform/CONTRIBUTING.md b/packages/google-cloud-dataform/CONTRIBUTING.md new file mode 100644 index 00000000000..72c44cada5e --- /dev/null +++ b/packages/google-cloud-dataform/CONTRIBUTING.md @@ -0,0 +1,74 @@ +# 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. [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 + +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-dataform/LICENSE b/packages/google-cloud-dataform/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/packages/google-cloud-dataform/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-dataform/README.md b/packages/google-cloud-dataform/README.md new file mode 100644 index 00000000000..b3536777562 --- /dev/null +++ b/packages/google-cloud-dataform/README.md @@ -0,0 +1,110 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [: Client](https://github.com/) + + +[![npm version](https://img.shields.io/npm/v/@google-cloud/dataform.svg)](https://www.npmjs.org/package/@google-cloud/dataform) + + + + +dataform client for Node.js + + +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com//blob/master/CHANGELOG.md). + + + +* [github.com/](https://github.com/) + +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) + + * [Installing the client library](#installing-the-client-library) + + +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart + +### Installing the client library + +```bash +npm install @google-cloud/dataform +``` + + + + + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. +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/dataform@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//blob/master/CONTRIBUTING.md). + +Please note that this `README.md`, the `samples/README.md`, +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. To edit one of these files, make an edit +to its templates in +[directory](https://github.com/googleapis/synthtool). + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com//blob/master/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 + +[auth]: https://cloud.google.com/docs/authentication/getting-started From c7d7aaac3ff19241e303a529957778f4ece9b5d0 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Sat, 16 Jul 2022 00:16:00 +0000 Subject: [PATCH 02/80] feat: add templated files from docker image --- packages/google-cloud-dataform/.eslintignore | 7 + packages/google-cloud-dataform/.eslintrc.json | 3 + packages/google-cloud-dataform/.gitattributes | 4 + .../.github/.OwlBot.yaml | 22 + packages/google-cloud-dataform/.gitignore | 14 + packages/google-cloud-dataform/.jsdoc.js | 55 + packages/google-cloud-dataform/.mocharc.js | 29 + packages/google-cloud-dataform/.nycrc | 24 + .../google-cloud-dataform/.prettierignore | 6 + packages/google-cloud-dataform/.prettierrc.js | 17 + .../google-cloud-dataform/.repo-metadata.json | 3 + .../linkinator.config.json | 1 + packages/google-cloud-dataform/package.json | 1 + .../cloud/dataform/v1alpha2/dataform.proto | 1613 + .../google-cloud-dataform/protos/protos.d.ts | 12493 +++++++ .../google-cloud-dataform/protos/protos.js | 30379 ++++++++++++++++ .../google-cloud-dataform/protos/protos.json | 3463 ++ .../dataform.cancel_workflow_invocation.js | 58 + .../dataform.commit_workspace_changes.js | 72 + .../dataform.create_compilation_result.js | 64 + .../v1alpha2/dataform.create_repository.js | 70 + .../dataform.create_workflow_invocation.js | 63 + .../v1alpha2/dataform.create_workspace.js | 70 + .../v1alpha2/dataform.delete_repository.js | 64 + .../dataform.delete_workflow_invocation.js | 58 + .../v1alpha2/dataform.delete_workspace.js | 58 + .../v1alpha2/dataform.fetch_file_diff.js | 63 + .../dataform.fetch_file_git_statuses.js | 58 + .../dataform.fetch_git_ahead_behind.js | 64 + .../dataform.fetch_remote_branches.js | 58 + .../dataform.get_compilation_result.js | 58 + .../v1alpha2/dataform.get_repository.js | 58 + .../dataform.get_workflow_invocation.js | 58 + .../v1alpha2/dataform.get_workspace.js | 58 + .../v1alpha2/dataform.install_npm_packages.js | 58 + .../dataform.list_compilation_results.js | 74 + .../v1alpha2/dataform.list_repositories.js | 84 + .../dataform.list_workflow_invocations.js | 74 + .../v1alpha2/dataform.list_workspaces.js | 84 + .../v1alpha2/dataform.make_directory.js | 64 + .../v1alpha2/dataform.move_directory.js | 70 + .../generated/v1alpha2/dataform.move_file.js | 68 + .../v1alpha2/dataform.pull_git_commits.js | 69 + .../v1alpha2/dataform.push_git_commits.js | 63 + ...taform.query_compilation_result_actions.js | 79 + .../dataform.query_directory_contents.js | 79 + ...aform.query_workflow_invocation_actions.js | 74 + .../generated/v1alpha2/dataform.read_file.js | 63 + .../v1alpha2/dataform.remove_directory.js | 64 + .../v1alpha2/dataform.remove_file.js | 63 + .../dataform.reset_workspace_changes.js | 67 + .../v1alpha2/dataform.update_repository.js | 63 + .../generated/v1alpha2/dataform.write_file.js | 68 + ...tadata.google.cloud.dataform.v1alpha2.json | 1647 + .../samples/package.json | 23 + .../samples/quickstart.js | 50 + .../samples/test/quickstart.js | 53 + packages/google-cloud-dataform/src/index.ts | 27 + .../src/v1alpha2/dataform_client.ts | 5316 +++ .../src/v1alpha2/dataform_client_config.json | 170 + .../src/v1alpha2/dataform_proto_list.json | 3 + .../src/v1alpha2/gapic_metadata.json | 411 + .../src/v1alpha2/index.ts | 19 + .../system-test/fixtures/sample/src/index.js | 26 + .../system-test/fixtures/sample/src/index.ts | 32 + .../system-test/install.ts | 51 + .../test/gapic_dataform_v1alpha2.ts | 7087 ++++ packages/google-cloud-dataform/tsconfig.json | 19 + .../google-cloud-dataform/webpack.config.js | 64 + 69 files changed, 65512 insertions(+) create mode 100644 packages/google-cloud-dataform/.eslintignore create mode 100644 packages/google-cloud-dataform/.eslintrc.json create mode 100644 packages/google-cloud-dataform/.gitattributes create mode 100644 packages/google-cloud-dataform/.github/.OwlBot.yaml create mode 100644 packages/google-cloud-dataform/.gitignore create mode 100644 packages/google-cloud-dataform/.jsdoc.js create mode 100644 packages/google-cloud-dataform/.mocharc.js create mode 100644 packages/google-cloud-dataform/.nycrc create mode 100644 packages/google-cloud-dataform/.prettierignore create mode 100644 packages/google-cloud-dataform/.prettierrc.js create mode 100644 packages/google-cloud-dataform/.repo-metadata.json create mode 100644 packages/google-cloud-dataform/linkinator.config.json create mode 100644 packages/google-cloud-dataform/package.json create mode 100644 packages/google-cloud-dataform/protos/google/cloud/dataform/v1alpha2/dataform.proto create mode 100644 packages/google-cloud-dataform/protos/protos.d.ts create mode 100644 packages/google-cloud-dataform/protos/protos.js create mode 100644 packages/google-cloud-dataform/protos/protos.json create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.cancel_workflow_invocation.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.commit_workspace_changes.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_compilation_result.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_repository.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workflow_invocation.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workspace.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_repository.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workflow_invocation.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workspace.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_diff.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_git_statuses.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_git_ahead_behind.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_remote_branches.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_compilation_result.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_repository.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workflow_invocation.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workspace.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.install_npm_packages.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_compilation_results.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_repositories.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workflow_invocations.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workspaces.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.make_directory.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_directory.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_file.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.pull_git_commits.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.push_git_commits.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_compilation_result_actions.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_directory_contents.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_workflow_invocation_actions.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.read_file.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_directory.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_file.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.reset_workspace_changes.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.update_repository.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.write_file.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json create mode 100644 packages/google-cloud-dataform/samples/package.json create mode 100644 packages/google-cloud-dataform/samples/quickstart.js create mode 100644 packages/google-cloud-dataform/samples/test/quickstart.js create mode 100644 packages/google-cloud-dataform/src/index.ts create mode 100644 packages/google-cloud-dataform/src/v1alpha2/dataform_client.ts create mode 100644 packages/google-cloud-dataform/src/v1alpha2/dataform_client_config.json create mode 100644 packages/google-cloud-dataform/src/v1alpha2/dataform_proto_list.json create mode 100644 packages/google-cloud-dataform/src/v1alpha2/gapic_metadata.json create mode 100644 packages/google-cloud-dataform/src/v1alpha2/index.ts create mode 100644 packages/google-cloud-dataform/system-test/fixtures/sample/src/index.js create mode 100644 packages/google-cloud-dataform/system-test/fixtures/sample/src/index.ts create mode 100644 packages/google-cloud-dataform/system-test/install.ts create mode 100644 packages/google-cloud-dataform/test/gapic_dataform_v1alpha2.ts create mode 100644 packages/google-cloud-dataform/tsconfig.json create mode 100644 packages/google-cloud-dataform/webpack.config.js diff --git a/packages/google-cloud-dataform/.eslintignore b/packages/google-cloud-dataform/.eslintignore new file mode 100644 index 00000000000..ea5b04aebe6 --- /dev/null +++ b/packages/google-cloud-dataform/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ +samples/generated/ diff --git a/packages/google-cloud-dataform/.eslintrc.json b/packages/google-cloud-dataform/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/packages/google-cloud-dataform/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-cloud-dataform/.gitattributes b/packages/google-cloud-dataform/.gitattributes new file mode 100644 index 00000000000..33739cb74e4 --- /dev/null +++ b/packages/google-cloud-dataform/.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-dataform/.github/.OwlBot.yaml b/packages/google-cloud-dataform/.github/.OwlBot.yaml new file mode 100644 index 00000000000..745d446d1ae --- /dev/null +++ b/packages/google-cloud-dataform/.github/.OwlBot.yaml @@ -0,0 +1,22 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +docker: + image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest + +deep-remove-regex: + - /owl-bot-staging + +deep-copy-regex: + - source: /google/cloud/dataform/(.*)/.*-nodejs/(.*) + dest: /owl-bot-staging/$1/$2 diff --git a/packages/google-cloud-dataform/.gitignore b/packages/google-cloud-dataform/.gitignore new file mode 100644 index 00000000000..5d32b23782f --- /dev/null +++ b/packages/google-cloud-dataform/.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-dataform/.jsdoc.js b/packages/google-cloud-dataform/.jsdoc.js new file mode 100644 index 00000000000..166ea791ca2 --- /dev/null +++ b/packages/google-cloud-dataform/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2022 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/dataform', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-cloud-dataform/.mocharc.js b/packages/google-cloud-dataform/.mocharc.js new file mode 100644 index 00000000000..0b600509bed --- /dev/null +++ b/packages/google-cloud-dataform/.mocharc.js @@ -0,0 +1,29 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000, + "recursive": true +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/packages/google-cloud-dataform/.nycrc b/packages/google-cloud-dataform/.nycrc new file mode 100644 index 00000000000..b18d5472b62 --- /dev/null +++ b/packages/google-cloud-dataform/.nycrc @@ -0,0 +1,24 @@ +{ + "report-dir": "./.coverage", + "reporter": ["text", "lcov"], + "exclude": [ + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/conformance", + "**/docs", + "**/samples", + "**/scripts", + "**/protos", + "**/test", + "**/*.d.ts", + ".jsdoc.js", + "**/.jsdoc.js", + "karma.conf.js", + "webpack-tests.config.js", + "webpack.config.js" + ], + "exclude-after-remap": false, + "all": true +} diff --git a/packages/google-cloud-dataform/.prettierignore b/packages/google-cloud-dataform/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-cloud-dataform/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-dataform/.prettierrc.js b/packages/google-cloud-dataform/.prettierrc.js new file mode 100644 index 00000000000..d1b95106f4c --- /dev/null +++ b/packages/google-cloud-dataform/.prettierrc.js @@ -0,0 +1,17 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/google-cloud-dataform/.repo-metadata.json b/packages/google-cloud-dataform/.repo-metadata.json new file mode 100644 index 00000000000..82269c2038a --- /dev/null +++ b/packages/google-cloud-dataform/.repo-metadata.json @@ -0,0 +1,3 @@ +{ + "default_version": "v1alpha2" +} diff --git a/packages/google-cloud-dataform/linkinator.config.json b/packages/google-cloud-dataform/linkinator.config.json new file mode 100644 index 00000000000..648c22bb61c --- /dev/null +++ b/packages/google-cloud-dataform/linkinator.config.json @@ -0,0 +1 @@ +{"recurse":true,"skip":["https://codecov.io/gh/googleapis/","www.googleapis.com","img.shields.io"],"silent":true,"concurrency":5,"retry":true,"retryErrors":true,"retryErrorsCount":5,"retryErrorsJitter":3000} \ No newline at end of file diff --git a/packages/google-cloud-dataform/package.json b/packages/google-cloud-dataform/package.json new file mode 100644 index 00000000000..52e97c81d6c --- /dev/null +++ b/packages/google-cloud-dataform/package.json @@ -0,0 +1 @@ +{"name":"@google-cloud/dataform","version":"0.1.0","description":"dataform client for Node.js","repository":"googleapis/nodejs-dataform","license":"Apache-2.0","author":"Google LLC","main":"build/src/index.js","files":["build/src","build/protos"],"keywords":["google apis client","google api client","google apis","google api","google","google cloud platform","google cloud","cloud","google dataform","dataform","dataform service"],"scripts":{"clean":"gts clean","compile":"tsc -p . && cp -r protos build/","compile-protos":"compileProtos src","docs":"jsdoc -c .jsdoc.js","predocs-test":"npm run docs","docs-test":"linkinator docs","fix":"gts fix","lint":"gts check","prepare":"npm run compile-protos && npm run compile","system-test":"c8 mocha build/system-test","test":"c8 mocha build/test","samples-test":"cd samples/ && npm link ../ && npm test","prelint":"cd samples; npm link ../; npm i"},"dependencies":{"google-gax":"^2.12.0"},"devDependencies":{"@types/mocha":"^8.2.2","@types/node":"^14.14.44","@types/sinon":"^10.0.0","c8":"^7.7.2","gts":"^3.1.0","jsdoc":"^3.6.6","jsdoc-fresh":"^1.0.2","jsdoc-region-tag":"^1.0.6","linkinator":"^2.13.6","mocha":"^8.4.0","null-loader":"^4.0.1","pack-n-play":"^1.0.0-2","sinon":"^10.0.0","ts-loader":"^9.1.2","typescript":"^4.2.4","webpack":"^5.36.2","webpack-cli":"^4.7.0"},"engines":{"node":">=v12.0.0"}} \ No newline at end of file diff --git a/packages/google-cloud-dataform/protos/google/cloud/dataform/v1alpha2/dataform.proto b/packages/google-cloud-dataform/protos/google/cloud/dataform/v1alpha2/dataform.proto new file mode 100644 index 00000000000..45e5d7e5655 --- /dev/null +++ b/packages/google-cloud-dataform/protos/google/cloud/dataform/v1alpha2/dataform.proto @@ -0,0 +1,1613 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dataform.v1alpha2; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/type/interval.proto"; + +option csharp_namespace = "Google.Cloud.Dataform.V1Alpha2"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2;dataform"; +option java_multiple_files = true; +option java_outer_classname = "DataformProto"; +option java_package = "com.google.cloud.dataform.v1alpha2"; +option php_namespace = "Google\\Cloud\\Dataform\\V1alpha2"; +option ruby_package = "Google::Cloud::Dataform::V1alpha2"; +option (google.api.resource_definition) = { + type: "secretmanager.googleapis.com/SecretVersion" + pattern: "projects/{project}/secrets/{secret}/versions/{version}" +}; + +// Dataform is a service to develop, create, document, test, and update curated +// tables in BigQuery. +service Dataform { + option (google.api.default_host) = "dataform.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Lists Repositories in a given project and location. + rpc ListRepositories(ListRepositoriesRequest) returns (ListRepositoriesResponse) { + option (google.api.http) = { + get: "/v1alpha2/{parent=projects/*/locations/*}/repositories" + }; + option (google.api.method_signature) = "parent"; + } + + // Fetches a single Repository. + rpc GetRepository(GetRepositoryRequest) returns (Repository) { + option (google.api.http) = { + get: "/v1alpha2/{name=projects/*/locations/*/repositories/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Repository in a given project and location. + rpc CreateRepository(CreateRepositoryRequest) returns (Repository) { + option (google.api.http) = { + post: "/v1alpha2/{parent=projects/*/locations/*}/repositories" + body: "repository" + }; + option (google.api.method_signature) = "parent,repository,repository_id"; + } + + // Updates a single Repository. + rpc UpdateRepository(UpdateRepositoryRequest) returns (Repository) { + option (google.api.http) = { + patch: "/v1alpha2/{repository.name=projects/*/locations/*/repositories/*}" + body: "repository" + }; + option (google.api.method_signature) = "repository,update_mask"; + } + + // Deletes a single Repository. + rpc DeleteRepository(DeleteRepositoryRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha2/{name=projects/*/locations/*/repositories/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Fetches a Repository's remote branches. + rpc FetchRemoteBranches(FetchRemoteBranchesRequest) returns (FetchRemoteBranchesResponse) { + option (google.api.http) = { + get: "/v1alpha2/{name=projects/*/locations/*/repositories/*}:fetchRemoteBranches" + }; + } + + // Lists Workspaces in a given Repository. + rpc ListWorkspaces(ListWorkspacesRequest) returns (ListWorkspacesResponse) { + option (google.api.http) = { + get: "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/workspaces" + }; + option (google.api.method_signature) = "parent"; + } + + // Fetches a single Workspace. + rpc GetWorkspace(GetWorkspaceRequest) returns (Workspace) { + option (google.api.http) = { + get: "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Workspace in a given Repository. + rpc CreateWorkspace(CreateWorkspaceRequest) returns (Workspace) { + option (google.api.http) = { + post: "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/workspaces" + body: "workspace" + }; + option (google.api.method_signature) = "parent,workspace,workspace_id"; + } + + // Deletes a single Workspace. + rpc DeleteWorkspace(DeleteWorkspaceRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Installs dependency NPM packages (inside a Workspace). + rpc InstallNpmPackages(InstallNpmPackagesRequest) returns (InstallNpmPackagesResponse) { + option (google.api.http) = { + post: "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:installNpmPackages" + body: "*" + }; + } + + // Pulls Git commits from the Repository's remote into a Workspace. + rpc PullGitCommits(PullGitCommitsRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:pull" + body: "*" + }; + } + + // Pushes Git commits from a Workspace to the Repository's remote. + rpc PushGitCommits(PushGitCommitsRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:push" + body: "*" + }; + } + + // Fetches Git statuses for the files in a Workspace. + rpc FetchFileGitStatuses(FetchFileGitStatusesRequest) returns (FetchFileGitStatusesResponse) { + option (google.api.http) = { + get: "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileGitStatuses" + }; + } + + // Fetches Git ahead/behind against a remote branch. + rpc FetchGitAheadBehind(FetchGitAheadBehindRequest) returns (FetchGitAheadBehindResponse) { + option (google.api.http) = { + get: "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchGitAheadBehind" + }; + } + + // Applies a Git commit for uncommitted files in a Workspace. + rpc CommitWorkspaceChanges(CommitWorkspaceChangesRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:commit" + body: "*" + }; + } + + // Performs a Git reset for uncommitted files in a Workspace. + rpc ResetWorkspaceChanges(ResetWorkspaceChangesRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:reset" + body: "*" + }; + } + + // Fetches Git diff for an uncommitted file in a Workspace. + rpc FetchFileDiff(FetchFileDiffRequest) returns (FetchFileDiffResponse) { + option (google.api.http) = { + get: "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileDiff" + }; + } + + // Returns the contents of a given Workspace directory. + rpc QueryDirectoryContents(QueryDirectoryContentsRequest) returns (QueryDirectoryContentsResponse) { + option (google.api.http) = { + get: "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:queryDirectoryContents" + }; + } + + // Creates a directory inside a Workspace. + rpc MakeDirectory(MakeDirectoryRequest) returns (MakeDirectoryResponse) { + option (google.api.http) = { + post: "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:makeDirectory" + body: "*" + }; + } + + // Deletes a directory (inside a Workspace) and all of its contents. + rpc RemoveDirectory(RemoveDirectoryRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeDirectory" + body: "*" + }; + } + + // Moves a directory (inside a Workspace), and all of its contents, to a new + // location. + rpc MoveDirectory(MoveDirectoryRequest) returns (MoveDirectoryResponse) { + option (google.api.http) = { + post: "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveDirectory" + body: "*" + }; + } + + // Returns the contents of a file (inside a Workspace). + rpc ReadFile(ReadFileRequest) returns (ReadFileResponse) { + option (google.api.http) = { + get: "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:readFile" + }; + } + + // Deletes a file (inside a Workspace). + rpc RemoveFile(RemoveFileRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeFile" + body: "*" + }; + } + + // Moves a file (inside a Workspace) to a new location. + rpc MoveFile(MoveFileRequest) returns (MoveFileResponse) { + option (google.api.http) = { + post: "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveFile" + body: "*" + }; + } + + // Writes to a file (inside a Workspace). + rpc WriteFile(WriteFileRequest) returns (WriteFileResponse) { + option (google.api.http) = { + post: "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:writeFile" + body: "*" + }; + } + + // Lists CompilationResults in a given Repository. + rpc ListCompilationResults(ListCompilationResultsRequest) returns (ListCompilationResultsResponse) { + option (google.api.http) = { + get: "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/compilationResults" + }; + option (google.api.method_signature) = "parent"; + } + + // Fetches a single CompilationResult. + rpc GetCompilationResult(GetCompilationResultRequest) returns (CompilationResult) { + option (google.api.http) = { + get: "/v1alpha2/{name=projects/*/locations/*/repositories/*/compilationResults/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new CompilationResult in a given project and location. + rpc CreateCompilationResult(CreateCompilationResultRequest) returns (CompilationResult) { + option (google.api.http) = { + post: "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/compilationResults" + body: "compilation_result" + }; + option (google.api.method_signature) = "parent,compilation_result"; + } + + // Returns CompilationResultActions in a given CompilationResult. + rpc QueryCompilationResultActions(QueryCompilationResultActionsRequest) returns (QueryCompilationResultActionsResponse) { + option (google.api.http) = { + get: "/v1alpha2/{name=projects/*/locations/*/repositories/*/compilationResults/*}:query" + }; + } + + // Lists WorkflowInvocations in a given Repository. + rpc ListWorkflowInvocations(ListWorkflowInvocationsRequest) returns (ListWorkflowInvocationsResponse) { + option (google.api.http) = { + get: "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/workflowInvocations" + }; + option (google.api.method_signature) = "parent"; + } + + // Fetches a single WorkflowInvocation. + rpc GetWorkflowInvocation(GetWorkflowInvocationRequest) returns (WorkflowInvocation) { + option (google.api.http) = { + get: "/v1alpha2/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new WorkflowInvocation in a given Repository. + rpc CreateWorkflowInvocation(CreateWorkflowInvocationRequest) returns (WorkflowInvocation) { + option (google.api.http) = { + post: "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/workflowInvocations" + body: "workflow_invocation" + }; + option (google.api.method_signature) = "parent,workflow_invocation"; + } + + // Deletes a single WorkflowInvocation. + rpc DeleteWorkflowInvocation(DeleteWorkflowInvocationRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha2/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Requests cancellation of a running WorkflowInvocation. + rpc CancelWorkflowInvocation(CancelWorkflowInvocationRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1alpha2/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:cancel" + body: "*" + }; + } + + // Returns WorkflowInvocationActions in a given WorkflowInvocation. + rpc QueryWorkflowInvocationActions(QueryWorkflowInvocationActionsRequest) returns (QueryWorkflowInvocationActionsResponse) { + option (google.api.http) = { + get: "/v1alpha2/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:query" + }; + } +} + +// Represents a Dataform Git repository. +message Repository { + option (google.api.resource) = { + type: "dataform.googleapis.com/Repository" + pattern: "projects/{project}/locations/{location}/repositories/{repository}" + }; + + // Controls Git remote configuration for a repository. + message GitRemoteSettings { + // Indicates the status of a Git authentication token. + enum TokenStatus { + // Default value. This value is unused. + TOKEN_STATUS_UNSPECIFIED = 0; + + // The token could not be found in Secret Manager (or the Dataform + // Service Account did not have permission to access it). + NOT_FOUND = 1; + + // The token could not be used to authenticate against the Git remote. + INVALID = 2; + + // The token was used successfully to authenticate against the Git remote. + VALID = 3; + } + + // Required. The Git remote's URL. + string url = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Git remote's default branch name. + string default_branch = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The name of the Secret Manager secret version to use as an + // authentication token for Git operations. Must be in the format + // `projects/*/secrets/*/versions/*`. + string authentication_token_secret_version = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; + + // Output only. Indicates the status of the Git access token. + TokenStatus token_status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The repository's name. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. If set, configures this repository to be linked to a Git remote. + GitRemoteSettings git_remote_settings = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ListRepositories` request message. +message ListRepositoriesRequest { + // Required. The location in which to list repositories. Must be in the format + // `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Maximum number of repositories to return. The server may return fewer + // items than requested. If unspecified, the server will pick an appropriate + // default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListRepositories` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListRepositories` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This field only supports ordering by `name`. If unspecified, the server + // will choose the ordering. If specified, the default order is ascending for + // the `name` field. + string order_by = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter for the returned list. + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ListRepositories` response message. +message ListRepositoriesResponse { + // List of repositories. + repeated Repository repositories = 1; + + // A token which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// `GetRepository` request message. +message GetRepositoryRequest { + // Required. The repository's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; +} + +// `CreateRepository` request message. +message CreateRepositoryRequest { + // Required. The location in which to create the repository. Must be in the format + // `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The repository to create. + Repository repository = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the repository, which will become the final component of + // the repository's resource name. + string repository_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `UpdateRepository` request message. +message UpdateRepositoryRequest { + // Optional. Specifies the fields to be updated in the repository. If left unset, + // all fields will be updated. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The repository to update. + Repository repository = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `DeleteRepository` request message. +message DeleteRepositoryRequest { + // Required. The repository's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // If set to true, any child resources of this repository will also be + // deleted. (Otherwise, the request will only succeed if the repository has no + // child resources.) + bool force = 2; +} + +// `FetchRemoteBranches` request message. +message FetchRemoteBranchesRequest { + // Required. The repository's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; +} + +// `FetchRemoteBranches` response message. +message FetchRemoteBranchesResponse { + // The remote repository's branch names. + repeated string branches = 1; +} + +// Represents a Dataform Git workspace. +message Workspace { + option (google.api.resource) = { + type: "dataform.googleapis.com/Workspace" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/workspaces/{workspace}" + }; + + // Output only. The workspace's name. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// `ListWorkspaces` request message. +message ListWorkspacesRequest { + // Required. The repository in which to list workspaces. Must be in the + // format `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Optional. Maximum number of workspaces to return. The server may return fewer + // items than requested. If unspecified, the server will pick an appropriate + // default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListWorkspaces` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListWorkspaces` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This field only supports ordering by `name`. If unspecified, the server + // will choose the ordering. If specified, the default order is ascending for + // the `name` field. + string order_by = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter for the returned list. + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ListWorkspaces` response message. +message ListWorkspacesResponse { + // List of workspaces. + repeated Workspace workspaces = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// `GetWorkspace` request message. +message GetWorkspaceRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; +} + +// `CreateWorkspace` request message. +message CreateWorkspaceRequest { + // Required. The repository in which to create the workspace. Must be in the format + // `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Required. The workspace to create. + Workspace workspace = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the workspace, which will become the final component of + // the workspace's resource name. + string workspace_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `DeleteWorkspace` request message. +message DeleteWorkspaceRequest { + // Required. The workspace resource's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; +} + +// Represents the author of a Git commit. +message CommitAuthor { + // Required. The commit author's name. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The commit author's email address. + string email_address = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `PullGitCommits` request message. +message PullGitCommitsRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Optional. The name of the branch in the Git remote from which to pull commits. + // If left unset, the repository's default branch name will be used. + string remote_branch = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The author of any merge commit which may be created as a result of merging + // fetched Git commits into this workspace. + CommitAuthor author = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `PushGitCommits` request message. +message PushGitCommitsRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Optional. The name of the branch in the Git remote to which commits should be pushed. + // If left unset, the repository's default branch name will be used. + string remote_branch = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// `FetchFileGitStatuses` request message. +message FetchFileGitStatusesRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; +} + +// `FetchFileGitStatuses` response message. +message FetchFileGitStatusesResponse { + // Represents the Git state of a file with uncommitted changes. + message UncommittedFileChange { + // Indicates the status of an uncommitted file change. + enum State { + // Default value. This value is unused. + STATE_UNSPECIFIED = 0; + + // The file has been newly added. + ADDED = 1; + + // The file has been deleted. + DELETED = 2; + + // The file has been modified. + MODIFIED = 3; + + // The file contains merge conflicts. + HAS_CONFLICTS = 4; + } + + // The file's full path including filename, relative to the workspace root. + string path = 1; + + // Indicates the status of the file. + State state = 2; + } + + // A list of all files which have uncommitted Git changes. There will only be + // a single entry for any given file. + repeated UncommittedFileChange uncommitted_file_changes = 1; +} + +// `FetchGitAheadBehind` request message. +message FetchGitAheadBehindRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Optional. The name of the branch in the Git remote against which this workspace + // should be compared. If left unset, the repository's default branch name + // will be used. + string remote_branch = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// `FetchGitAheadBehind` response message. +message FetchGitAheadBehindResponse { + // The number of commits in the remote branch that are not in the workspace. + int32 commits_ahead = 1; + + // The number of commits in the workspace that are not in the remote branch. + int32 commits_behind = 2; +} + +// `CommitWorkspaceChanges` request message. +message CommitWorkspaceChangesRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The commit's author. + CommitAuthor author = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The commit's message. + string commit_message = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Full file paths to commit including filename, rooted at workspace root. If + // left empty, all files will be committed. + repeated string paths = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ResetWorkspaceChanges` request message. +message ResetWorkspaceChangesRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Optional. Full file paths to reset back to their committed state including filename, + // rooted at workspace root. If left empty, all files will be reset. + repeated string paths = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, untracked files will be deleted. + bool clean = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// `FetchFileDiff` request message. +message FetchFileDiffRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The file's full path including filename, relative to the workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `FetchFileDiff` response message. +message FetchFileDiffResponse { + // The raw formatted Git diff for the file. + string formatted_diff = 1; +} + +// `QueryDirectoryContents` request message. +message QueryDirectoryContentsRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Optional. The directory's full path including directory name, relative to the + // workspace root. If left unset, the workspace root is used. + string path = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Maximum number of paths to return. The server may return fewer + // items than requested. If unspecified, the server will pick an appropriate + // default. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `QueryDirectoryContents` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `QueryDirectoryContents` must match the call that provided the page + // token. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// `QueryDirectoryContents` response message. +message QueryDirectoryContentsResponse { + // Represents a single entry in a workspace directory. + message DirectoryEntry { + oneof entry { + // A file in the directory. + string file = 1; + + // A child directory in the directory. + string directory = 2; + } + } + + // List of entries in the directory. + repeated DirectoryEntry directory_entries = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// `MakeDirectory` request message. +message MakeDirectoryRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The directory's full path including directory name, relative to the + // workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `MakeDirectory` response message. +message MakeDirectoryResponse { + +} + +// `RemoveDirectory` request message. +message RemoveDirectoryRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The directory's full path including directory name, relative to the + // workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `MoveDirectory` request message. +message MoveDirectoryRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The directory's full path including directory name, relative to the + // workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The new path for the directory including directory name, rooted at + // workspace root. + string new_path = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `MoveDirectory` response message. +message MoveDirectoryResponse { + +} + +// `ReadFile` request message. +message ReadFileRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The file's full path including filename, relative to the workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `ReadFile` response message. +message ReadFileResponse { + // The file's contents. + bytes file_contents = 1; +} + +// `RemoveFile` request message. +message RemoveFileRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The file's full path including filename, relative to the workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `MoveFile` request message. +message MoveFileRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The file's full path including filename, relative to the workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The file's new path including filename, relative to the workspace root. + string new_path = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `MoveFile` response message. +message MoveFileResponse { + +} + +// `WriteFile` request message. +message WriteFileRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The file. + string path = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The file's contents. + bytes contents = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `WriteFile` response message. +message WriteFileResponse { + +} + +// `InstallNpmPackages` request message. +message InstallNpmPackagesRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; +} + +// `InstallNpmPackages` response message. +message InstallNpmPackagesResponse { + +} + +// Represents the result of compiling a Dataform project. +message CompilationResult { + option (google.api.resource) = { + type: "dataform.googleapis.com/CompilationResult" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/compilationResults/{compilation_result}" + }; + + // Configures various aspects of Dataform code compilation. + message CodeCompilationConfig { + // Optional. The default database (Google Cloud project ID). + string default_database = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The default schema (BigQuery dataset ID). + string default_schema = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The default BigQuery location to use. Defaults to "US". + // See the BigQuery docs for a full list of locations: + // https://cloud.google.com/bigquery/docs/locations. + string default_location = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The default schema (BigQuery dataset ID) for assertions. + string assertion_schema = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User-defined variables that are made available to project code during + // compilation. + map vars = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The suffix that should be appended to all database (Google Cloud project + // ID) names. + string database_suffix = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The suffix that should be appended to all schema (BigQuery dataset ID) + // names. + string schema_suffix = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The prefix that should be prepended to all table names. + string table_prefix = 7 [(google.api.field_behavior) = OPTIONAL]; + } + + // An error encountered when attempting to compile a Dataform project. + message CompilationError { + // Output only. The error's top level message. + string message = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The error's full stack trace. + string stack = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The path of the file where this error occurred, if available, relative to + // the project root. + string path = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The identifier of the action where this error occurred, if available. + Target action_target = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The compilation result's name. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + oneof source { + // Immutable. Git commit/tag/branch name at which the repository should be compiled. + // Must exist in the remote repository. + // Examples: + // - a commit SHA: `12ade345` + // - a tag: `tag1` + // - a branch name: `branch1` + string git_commitish = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The name of the workspace to compile. Must be in the format + // `projects/*/locations/*/repositories/*/workspaces/*`. + string workspace = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + } + + // Immutable. If set, fields of `code_compilation_overrides` override the default + // compilation settings that are specified in dataform.json. + CodeCompilationConfig code_compilation_config = 4 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The version of `@dataform/core` that was used for compilation. + string dataform_core_version = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Errors encountered during project compilation. + repeated CompilationError compilation_errors = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// `ListCompilationResults` request message. +message ListCompilationResultsRequest { + // Required. The repository in which to list compilation results. Must be in the + // format `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Optional. Maximum number of compilation results to return. The server may return + // fewer items than requested. If unspecified, the server will pick an + // appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListCompilationResults` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListCompilationResults` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ListCompilationResults` response message. +message ListCompilationResultsResponse { + // List of compilation results. + repeated CompilationResult compilation_results = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// `GetCompilationResult` request message. +message GetCompilationResultRequest { + // Required. The compilation result's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/CompilationResult" + } + ]; +} + +// `CreateCompilationResult` request message. +message CreateCompilationResultRequest { + // Required. The repository in which to create the compilation result. Must be in the + // format `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Required. The compilation result to create. + CompilationResult compilation_result = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents an action identifier. If the action writes output, the output +// will be written to the referenced database object. +message Target { + // The action's database (Google Cloud project ID) . + string database = 1; + + // The action's schema (BigQuery dataset ID), within `database`. + string schema = 2; + + // The action's name, within `database` and `schema`. + string name = 3; +} + +// Describes a relation and its columns. +message RelationDescriptor { + // Describes a column. + message ColumnDescriptor { + // The identifier for the column. Each entry in `path` represents one level + // of nesting. + repeated string path = 1; + + // A textual description of the column. + string description = 2; + + // A list of BigQuery policy tags that will be applied to the column. + repeated string bigquery_policy_tags = 3; + } + + // A text description of the relation. + string description = 1; + + // A list of descriptions of columns within the relation. + repeated ColumnDescriptor columns = 2; + + // A set of BigQuery labels that should be applied to the relation. + map bigquery_labels = 3; +} + +// Represents a single Dataform action in a compilation result. +message CompilationResultAction { + // Represents a database relation. + message Relation { + // Indicates the type of this relation. + enum RelationType { + // Default value. This value is unused. + RELATION_TYPE_UNSPECIFIED = 0; + + // The relation is a table. + TABLE = 1; + + // The relation is a view. + VIEW = 2; + + // The relation is an incrementalized table. + INCREMENTAL_TABLE = 3; + + // The relation is a materialized view. + MATERIALIZED_VIEW = 4; + } + + // Contains settings for relations of type `INCREMENTAL_TABLE`. + message IncrementalTableConfig { + // The SELECT query which returns rows which should be inserted into the + // relation if it already exists and is not being refreshed. + string incremental_select_query = 1; + + // Whether this table should be protected from being refreshed. + bool refresh_disabled = 2; + + // A set of columns or SQL expressions used to define row uniqueness. + // If any duplicates are discovered (as defined by `unique_key_parts`), + // only the newly selected rows (as defined by `incremental_select_query`) + // will be included in the relation. + repeated string unique_key_parts = 3; + + // A SQL expression conditional used to limit the set of existing rows + // considered for a merge operation (see `unique_key_parts` for more + // information). + string update_partition_filter = 4; + + // SQL statements to be executed before inserting new rows into the + // relation. + repeated string incremental_pre_operations = 5; + + // SQL statements to be executed after inserting new rows into the + // relation. + repeated string incremental_post_operations = 6; + } + + // A list of actions that this action depends on. + repeated Target dependency_targets = 1; + + // Whether this action is disabled (i.e. should not be run). + bool disabled = 2; + + // Arbitrary, user-defined tags on this action. + repeated string tags = 3; + + // Descriptor for the relation and its columns. + RelationDescriptor relation_descriptor = 4; + + // The type of this relation. + RelationType relation_type = 5; + + // The SELECT query which returns rows which this relation should contain. + string select_query = 6; + + // SQL statements to be executed before creating the relation. + repeated string pre_operations = 7; + + // SQL statements to be executed after creating the relation. + repeated string post_operations = 8; + + // Configures `INCREMENTAL_TABLE` settings for this relation. Only set if + // `relation_type` is `INCREMENTAL_TABLE`. + IncrementalTableConfig incremental_table_config = 9; + + // The SQL expression used to partition the relation. + string partition_expression = 10; + + // A list of columns or SQL expressions used to cluster the table. + repeated string cluster_expressions = 11; + + // Sets the partition expiration in days. + int32 partition_expiration_days = 12; + + // Specifies whether queries on this table must include a predicate filter + // that filters on the partitioning column. + bool require_partition_filter = 13; + + // Additional options that will be provided as key/value pairs into the + // options clause of a create table/view statement. See + // https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language + // for more information on which options are supported. + map additional_options = 14; + } + + // Represents a list of arbitrary database operations. + message Operations { + // A list of actions that this action depends on. + repeated Target dependency_targets = 1; + + // Whether this action is disabled (i.e. should not be run). + bool disabled = 2; + + // Arbitrary, user-defined tags on this action. + repeated string tags = 3; + + // Descriptor for any output relation and its columns. Only set if + // `has_output` is true. + RelationDescriptor relation_descriptor = 6; + + // A list of arbitrary SQL statements that will be executed without + // alteration. + repeated string queries = 4; + + // Whether these operations produce an output relation. + bool has_output = 5; + } + + // Represents an assertion upon a SQL query which is required return zero + // rows. + message Assertion { + // A list of actions that this action depends on. + repeated Target dependency_targets = 1; + + // The parent action of this assertion. Only set if this assertion was + // automatically generated. + Target parent_action = 5; + + // Whether this action is disabled (i.e. should not be run). + bool disabled = 2; + + // Arbitrary, user-defined tags on this action. + repeated string tags = 3; + + // The SELECT query which must return zero rows in order for this assertion + // to succeed. + string select_query = 4; + + // Descriptor for the assertion's automatically-generated view and its + // columns. + RelationDescriptor relation_descriptor = 6; + } + + // Represents a relation which is not managed by Dataform but which may be + // referenced by Dataform actions. + message Declaration { + // Descriptor for the relation and its columns. Used as documentation only, + // i.e. values here will result in no changes to the relation's metadata. + RelationDescriptor relation_descriptor = 1; + } + + // This action's identifier. Unique within the compilation result. + Target target = 1; + + // The action's identifier if the project had been compiled without any + // overrides configured. Unique within the compilation result. + Target canonical_target = 2; + + // The full path including filename in which this action is located, relative + // to the workspace root. + string file_path = 3; + + oneof compiled_object { + // The database relation created/updated by this action. + Relation relation = 4; + + // The database operations executed by this action. + Operations operations = 5; + + // The assertion executed by this action. + Assertion assertion = 6; + + // The declaration declared by this action. + Declaration declaration = 7; + } +} + +// `QueryCompilationResultActions` request message. +message QueryCompilationResultActionsRequest { + // Required. The compilation result's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/CompilationResult" + } + ]; + + // Optional. Maximum number of compilation results to return. The server may return + // fewer items than requested. If unspecified, the server will pick an + // appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `QueryCompilationResultActions` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `QueryCompilationResultActions` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Optional filter for the returned list. Filtering is only currently + // supported on the `file_path` field. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// `QueryCompilationResultActions` response message. +message QueryCompilationResultActionsResponse { + // List of compilation result actions. + repeated CompilationResultAction compilation_result_actions = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Represents a single invocation of a compilation result. +message WorkflowInvocation { + option (google.api.resource) = { + type: "dataform.googleapis.com/WorkflowInvocation" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/workflowInvocations/{workflow_invocation}" + }; + + // Includes various configuration options for this workflow invocation. + // If both `included_targets` and `included_tags` are unset, all actions + // will be included. + message InvocationConfig { + // Immutable. The set of action identifiers to include. + repeated Target included_targets = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The set of tags to include. + repeated string included_tags = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. When set to true, transitive dependencies of included actions will be + // executed. + bool transitive_dependencies_included = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. When set to true, transitive dependents of included actions will be + // executed. + bool transitive_dependents_included = 4 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. When set to true, any incremental tables will be fully refreshed. + bool fully_refresh_incremental_tables_enabled = 5 [(google.api.field_behavior) = IMMUTABLE]; + } + + // Represents the current state of a workflow invocation. + enum State { + // Default value. This value is unused. + STATE_UNSPECIFIED = 0; + + // The workflow invocation is currently running. + RUNNING = 1; + + // The workflow invocation succeeded. A terminal state. + SUCCEEDED = 2; + + // The workflow invocation was cancelled. A terminal state. + CANCELLED = 3; + + // The workflow invocation failed. A terminal state. + FAILED = 4; + + // The workflow invocation is being cancelled, but some actions are still + // running. + CANCELING = 5; + } + + // Output only. The workflow invocation's name. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The name of the compilation result to compile. Must be in the format + // `projects/*/locations/*/repositories/*/compilationResults/*`. + string compilation_result = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/CompilationResult" + } + ]; + + // Immutable. If left unset, a default InvocationConfig will be used. + InvocationConfig invocation_config = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. This workflow invocation's current state. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This workflow invocation's timing details. + google.type.Interval invocation_timing = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// `ListWorkflowInvocations` request message. +message ListWorkflowInvocationsRequest { + // Required. The parent resource of the WorkflowInvocation type. Must be in the + // format `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Optional. Maximum number of workflow invocations to return. The server may return + // fewer items than requested. If unspecified, the server will pick an + // appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListWorkflowInvocations` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListWorkflowInvocations` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ListWorkflowInvocations` response message. +message ListWorkflowInvocationsResponse { + // List of workflow invocations. + repeated WorkflowInvocation workflow_invocations = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// `GetWorkflowInvocation` request message. +message GetWorkflowInvocationRequest { + // Required. The workflow invocation resource's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/WorkflowInvocation" + } + ]; +} + +// `CreateWorkflowInvocation` request message. +message CreateWorkflowInvocationRequest { + // Required. The parent resource of the WorkflowInvocation type. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Required. The workflow invocation resource to create. + WorkflowInvocation workflow_invocation = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `DeleteWorkflowInvocation` request message. +message DeleteWorkflowInvocationRequest { + // Required. The workflow invocation resource's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/WorkflowInvocation" + } + ]; +} + +// `CancelWorkflowInvocation` request message. +message CancelWorkflowInvocationRequest { + // Required. The workflow invocation resource's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/WorkflowInvocation" + } + ]; +} + +// Represents a single action in a workflow invocation. +message WorkflowInvocationAction { + // Represents the current state of an workflow invocation action. + enum State { + // The action has not yet been considered for invocation. + PENDING = 0; + + // The action is currently running. + RUNNING = 1; + + // Execution of the action was skipped because upstream dependencies did not + // all complete successfully. A terminal state. + SKIPPED = 2; + + // Execution of the action was disabled as per the configuration of the + // corresponding compilation result action. A terminal state. + DISABLED = 3; + + // The action succeeded. A terminal state. + SUCCEEDED = 4; + + // The action was cancelled. A terminal state. + CANCELLED = 5; + + // The action failed. A terminal state. + FAILED = 6; + } + + // Represents a workflow action that will run against BigQuery. + message BigQueryAction { + // Output only. The generated BigQuery SQL script that will be executed. + string sql_script = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. This action's identifier. Unique within the workflow invocation. + Target target = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The action's identifier if the project had been compiled without any + // overrides configured. Unique within the compilation result. + Target canonical_target = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This action's current state. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This action's timing details. + // `start_time` will be set if the action is in [RUNNING, SUCCEEDED, + // CANCELLED, FAILED] state. + // `end_time` will be set if the action is in [SUCCEEDED, CANCELLED, FAILED] + // state. + google.type.Interval invocation_timing = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The workflow action's bigquery action details. + BigQueryAction bigquery_action = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// `QueryWorkflowInvocationActions` request message. +message QueryWorkflowInvocationActionsRequest { + // Required. The workflow invocation's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/WorkflowInvocation" + } + ]; + + // Optional. Maximum number of workflow invocations to return. The server may return + // fewer items than requested. If unspecified, the server will pick an + // appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `QueryWorkflowInvocationActions` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `QueryWorkflowInvocationActions` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// `QueryWorkflowInvocationActions` response message. +message QueryWorkflowInvocationActionsResponse { + // List of workflow invocation actions. + repeated WorkflowInvocationAction workflow_invocation_actions = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} diff --git a/packages/google-cloud-dataform/protos/protos.d.ts b/packages/google-cloud-dataform/protos/protos.d.ts new file mode 100644 index 00000000000..5152f2c65fc --- /dev/null +++ b/packages/google-cloud-dataform/protos/protos.d.ts @@ -0,0 +1,12493 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import * as Long from "long"; +import {protobuf as $protobuf} from "google-gax"; +/** Namespace google. */ +export namespace google { + + /** Namespace cloud. */ + namespace cloud { + + /** Namespace dataform. */ + namespace dataform { + + /** Namespace v1alpha2. */ + namespace v1alpha2 { + + /** Represents a Dataform */ + class Dataform extends $protobuf.rpc.Service { + + /** + * Constructs a new Dataform 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 Dataform 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): Dataform; + + /** + * Calls ListRepositories. + * @param request ListRepositoriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListRepositoriesResponse + */ + public listRepositories(request: google.cloud.dataform.v1alpha2.IListRepositoriesRequest, callback: google.cloud.dataform.v1alpha2.Dataform.ListRepositoriesCallback): void; + + /** + * Calls ListRepositories. + * @param request ListRepositoriesRequest message or plain object + * @returns Promise + */ + public listRepositories(request: google.cloud.dataform.v1alpha2.IListRepositoriesRequest): Promise; + + /** + * Calls GetRepository. + * @param request GetRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Repository + */ + public getRepository(request: google.cloud.dataform.v1alpha2.IGetRepositoryRequest, callback: google.cloud.dataform.v1alpha2.Dataform.GetRepositoryCallback): void; + + /** + * Calls GetRepository. + * @param request GetRepositoryRequest message or plain object + * @returns Promise + */ + public getRepository(request: google.cloud.dataform.v1alpha2.IGetRepositoryRequest): Promise; + + /** + * Calls CreateRepository. + * @param request CreateRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Repository + */ + public createRepository(request: google.cloud.dataform.v1alpha2.ICreateRepositoryRequest, callback: google.cloud.dataform.v1alpha2.Dataform.CreateRepositoryCallback): void; + + /** + * Calls CreateRepository. + * @param request CreateRepositoryRequest message or plain object + * @returns Promise + */ + public createRepository(request: google.cloud.dataform.v1alpha2.ICreateRepositoryRequest): Promise; + + /** + * Calls UpdateRepository. + * @param request UpdateRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Repository + */ + public updateRepository(request: google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest, callback: google.cloud.dataform.v1alpha2.Dataform.UpdateRepositoryCallback): void; + + /** + * Calls UpdateRepository. + * @param request UpdateRepositoryRequest message or plain object + * @returns Promise + */ + public updateRepository(request: google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest): Promise; + + /** + * Calls DeleteRepository. + * @param request DeleteRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteRepository(request: google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest, callback: google.cloud.dataform.v1alpha2.Dataform.DeleteRepositoryCallback): void; + + /** + * Calls DeleteRepository. + * @param request DeleteRepositoryRequest message or plain object + * @returns Promise + */ + public deleteRepository(request: google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest): Promise; + + /** + * Calls FetchRemoteBranches. + * @param request FetchRemoteBranchesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchRemoteBranchesResponse + */ + public fetchRemoteBranches(request: google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest, callback: google.cloud.dataform.v1alpha2.Dataform.FetchRemoteBranchesCallback): void; + + /** + * Calls FetchRemoteBranches. + * @param request FetchRemoteBranchesRequest message or plain object + * @returns Promise + */ + public fetchRemoteBranches(request: google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest): Promise; + + /** + * Calls ListWorkspaces. + * @param request ListWorkspacesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListWorkspacesResponse + */ + public listWorkspaces(request: google.cloud.dataform.v1alpha2.IListWorkspacesRequest, callback: google.cloud.dataform.v1alpha2.Dataform.ListWorkspacesCallback): void; + + /** + * Calls ListWorkspaces. + * @param request ListWorkspacesRequest message or plain object + * @returns Promise + */ + public listWorkspaces(request: google.cloud.dataform.v1alpha2.IListWorkspacesRequest): Promise; + + /** + * Calls GetWorkspace. + * @param request GetWorkspaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Workspace + */ + public getWorkspace(request: google.cloud.dataform.v1alpha2.IGetWorkspaceRequest, callback: google.cloud.dataform.v1alpha2.Dataform.GetWorkspaceCallback): void; + + /** + * Calls GetWorkspace. + * @param request GetWorkspaceRequest message or plain object + * @returns Promise + */ + public getWorkspace(request: google.cloud.dataform.v1alpha2.IGetWorkspaceRequest): Promise; + + /** + * Calls CreateWorkspace. + * @param request CreateWorkspaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Workspace + */ + public createWorkspace(request: google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest, callback: google.cloud.dataform.v1alpha2.Dataform.CreateWorkspaceCallback): void; + + /** + * Calls CreateWorkspace. + * @param request CreateWorkspaceRequest message or plain object + * @returns Promise + */ + public createWorkspace(request: google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest): Promise; + + /** + * Calls DeleteWorkspace. + * @param request DeleteWorkspaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteWorkspace(request: google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest, callback: google.cloud.dataform.v1alpha2.Dataform.DeleteWorkspaceCallback): void; + + /** + * Calls DeleteWorkspace. + * @param request DeleteWorkspaceRequest message or plain object + * @returns Promise + */ + public deleteWorkspace(request: google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest): Promise; + + /** + * Calls InstallNpmPackages. + * @param request InstallNpmPackagesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and InstallNpmPackagesResponse + */ + public installNpmPackages(request: google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest, callback: google.cloud.dataform.v1alpha2.Dataform.InstallNpmPackagesCallback): void; + + /** + * Calls InstallNpmPackages. + * @param request InstallNpmPackagesRequest message or plain object + * @returns Promise + */ + public installNpmPackages(request: google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest): Promise; + + /** + * Calls PullGitCommits. + * @param request PullGitCommitsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public pullGitCommits(request: google.cloud.dataform.v1alpha2.IPullGitCommitsRequest, callback: google.cloud.dataform.v1alpha2.Dataform.PullGitCommitsCallback): void; + + /** + * Calls PullGitCommits. + * @param request PullGitCommitsRequest message or plain object + * @returns Promise + */ + public pullGitCommits(request: google.cloud.dataform.v1alpha2.IPullGitCommitsRequest): Promise; + + /** + * Calls PushGitCommits. + * @param request PushGitCommitsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public pushGitCommits(request: google.cloud.dataform.v1alpha2.IPushGitCommitsRequest, callback: google.cloud.dataform.v1alpha2.Dataform.PushGitCommitsCallback): void; + + /** + * Calls PushGitCommits. + * @param request PushGitCommitsRequest message or plain object + * @returns Promise + */ + public pushGitCommits(request: google.cloud.dataform.v1alpha2.IPushGitCommitsRequest): Promise; + + /** + * Calls FetchFileGitStatuses. + * @param request FetchFileGitStatusesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchFileGitStatusesResponse + */ + public fetchFileGitStatuses(request: google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest, callback: google.cloud.dataform.v1alpha2.Dataform.FetchFileGitStatusesCallback): void; + + /** + * Calls FetchFileGitStatuses. + * @param request FetchFileGitStatusesRequest message or plain object + * @returns Promise + */ + public fetchFileGitStatuses(request: google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest): Promise; + + /** + * Calls FetchGitAheadBehind. + * @param request FetchGitAheadBehindRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchGitAheadBehindResponse + */ + public fetchGitAheadBehind(request: google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest, callback: google.cloud.dataform.v1alpha2.Dataform.FetchGitAheadBehindCallback): void; + + /** + * Calls FetchGitAheadBehind. + * @param request FetchGitAheadBehindRequest message or plain object + * @returns Promise + */ + public fetchGitAheadBehind(request: google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest): Promise; + + /** + * Calls CommitWorkspaceChanges. + * @param request CommitWorkspaceChangesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public commitWorkspaceChanges(request: google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest, callback: google.cloud.dataform.v1alpha2.Dataform.CommitWorkspaceChangesCallback): void; + + /** + * Calls CommitWorkspaceChanges. + * @param request CommitWorkspaceChangesRequest message or plain object + * @returns Promise + */ + public commitWorkspaceChanges(request: google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest): Promise; + + /** + * Calls ResetWorkspaceChanges. + * @param request ResetWorkspaceChangesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public resetWorkspaceChanges(request: google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest, callback: google.cloud.dataform.v1alpha2.Dataform.ResetWorkspaceChangesCallback): void; + + /** + * Calls ResetWorkspaceChanges. + * @param request ResetWorkspaceChangesRequest message or plain object + * @returns Promise + */ + public resetWorkspaceChanges(request: google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest): Promise; + + /** + * Calls FetchFileDiff. + * @param request FetchFileDiffRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchFileDiffResponse + */ + public fetchFileDiff(request: google.cloud.dataform.v1alpha2.IFetchFileDiffRequest, callback: google.cloud.dataform.v1alpha2.Dataform.FetchFileDiffCallback): void; + + /** + * Calls FetchFileDiff. + * @param request FetchFileDiffRequest message or plain object + * @returns Promise + */ + public fetchFileDiff(request: google.cloud.dataform.v1alpha2.IFetchFileDiffRequest): Promise; + + /** + * Calls QueryDirectoryContents. + * @param request QueryDirectoryContentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryDirectoryContentsResponse + */ + public queryDirectoryContents(request: google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest, callback: google.cloud.dataform.v1alpha2.Dataform.QueryDirectoryContentsCallback): void; + + /** + * Calls QueryDirectoryContents. + * @param request QueryDirectoryContentsRequest message or plain object + * @returns Promise + */ + public queryDirectoryContents(request: google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest): Promise; + + /** + * Calls MakeDirectory. + * @param request MakeDirectoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MakeDirectoryResponse + */ + public makeDirectory(request: google.cloud.dataform.v1alpha2.IMakeDirectoryRequest, callback: google.cloud.dataform.v1alpha2.Dataform.MakeDirectoryCallback): void; + + /** + * Calls MakeDirectory. + * @param request MakeDirectoryRequest message or plain object + * @returns Promise + */ + public makeDirectory(request: google.cloud.dataform.v1alpha2.IMakeDirectoryRequest): Promise; + + /** + * Calls RemoveDirectory. + * @param request RemoveDirectoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public removeDirectory(request: google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest, callback: google.cloud.dataform.v1alpha2.Dataform.RemoveDirectoryCallback): void; + + /** + * Calls RemoveDirectory. + * @param request RemoveDirectoryRequest message or plain object + * @returns Promise + */ + public removeDirectory(request: google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest): Promise; + + /** + * Calls MoveDirectory. + * @param request MoveDirectoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MoveDirectoryResponse + */ + public moveDirectory(request: google.cloud.dataform.v1alpha2.IMoveDirectoryRequest, callback: google.cloud.dataform.v1alpha2.Dataform.MoveDirectoryCallback): void; + + /** + * Calls MoveDirectory. + * @param request MoveDirectoryRequest message or plain object + * @returns Promise + */ + public moveDirectory(request: google.cloud.dataform.v1alpha2.IMoveDirectoryRequest): Promise; + + /** + * Calls ReadFile. + * @param request ReadFileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ReadFileResponse + */ + public readFile(request: google.cloud.dataform.v1alpha2.IReadFileRequest, callback: google.cloud.dataform.v1alpha2.Dataform.ReadFileCallback): void; + + /** + * Calls ReadFile. + * @param request ReadFileRequest message or plain object + * @returns Promise + */ + public readFile(request: google.cloud.dataform.v1alpha2.IReadFileRequest): Promise; + + /** + * Calls RemoveFile. + * @param request RemoveFileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public removeFile(request: google.cloud.dataform.v1alpha2.IRemoveFileRequest, callback: google.cloud.dataform.v1alpha2.Dataform.RemoveFileCallback): void; + + /** + * Calls RemoveFile. + * @param request RemoveFileRequest message or plain object + * @returns Promise + */ + public removeFile(request: google.cloud.dataform.v1alpha2.IRemoveFileRequest): Promise; + + /** + * Calls MoveFile. + * @param request MoveFileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MoveFileResponse + */ + public moveFile(request: google.cloud.dataform.v1alpha2.IMoveFileRequest, callback: google.cloud.dataform.v1alpha2.Dataform.MoveFileCallback): void; + + /** + * Calls MoveFile. + * @param request MoveFileRequest message or plain object + * @returns Promise + */ + public moveFile(request: google.cloud.dataform.v1alpha2.IMoveFileRequest): Promise; + + /** + * Calls WriteFile. + * @param request WriteFileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and WriteFileResponse + */ + public writeFile(request: google.cloud.dataform.v1alpha2.IWriteFileRequest, callback: google.cloud.dataform.v1alpha2.Dataform.WriteFileCallback): void; + + /** + * Calls WriteFile. + * @param request WriteFileRequest message or plain object + * @returns Promise + */ + public writeFile(request: google.cloud.dataform.v1alpha2.IWriteFileRequest): Promise; + + /** + * Calls ListCompilationResults. + * @param request ListCompilationResultsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCompilationResultsResponse + */ + public listCompilationResults(request: google.cloud.dataform.v1alpha2.IListCompilationResultsRequest, callback: google.cloud.dataform.v1alpha2.Dataform.ListCompilationResultsCallback): void; + + /** + * Calls ListCompilationResults. + * @param request ListCompilationResultsRequest message or plain object + * @returns Promise + */ + public listCompilationResults(request: google.cloud.dataform.v1alpha2.IListCompilationResultsRequest): Promise; + + /** + * Calls GetCompilationResult. + * @param request GetCompilationResultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CompilationResult + */ + public getCompilationResult(request: google.cloud.dataform.v1alpha2.IGetCompilationResultRequest, callback: google.cloud.dataform.v1alpha2.Dataform.GetCompilationResultCallback): void; + + /** + * Calls GetCompilationResult. + * @param request GetCompilationResultRequest message or plain object + * @returns Promise + */ + public getCompilationResult(request: google.cloud.dataform.v1alpha2.IGetCompilationResultRequest): Promise; + + /** + * Calls CreateCompilationResult. + * @param request CreateCompilationResultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CompilationResult + */ + public createCompilationResult(request: google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest, callback: google.cloud.dataform.v1alpha2.Dataform.CreateCompilationResultCallback): void; + + /** + * Calls CreateCompilationResult. + * @param request CreateCompilationResultRequest message or plain object + * @returns Promise + */ + public createCompilationResult(request: google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest): Promise; + + /** + * Calls QueryCompilationResultActions. + * @param request QueryCompilationResultActionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryCompilationResultActionsResponse + */ + public queryCompilationResultActions(request: google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest, callback: google.cloud.dataform.v1alpha2.Dataform.QueryCompilationResultActionsCallback): void; + + /** + * Calls QueryCompilationResultActions. + * @param request QueryCompilationResultActionsRequest message or plain object + * @returns Promise + */ + public queryCompilationResultActions(request: google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest): Promise; + + /** + * Calls ListWorkflowInvocations. + * @param request ListWorkflowInvocationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListWorkflowInvocationsResponse + */ + public listWorkflowInvocations(request: google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest, callback: google.cloud.dataform.v1alpha2.Dataform.ListWorkflowInvocationsCallback): void; + + /** + * Calls ListWorkflowInvocations. + * @param request ListWorkflowInvocationsRequest message or plain object + * @returns Promise + */ + public listWorkflowInvocations(request: google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest): Promise; + + /** + * Calls GetWorkflowInvocation. + * @param request GetWorkflowInvocationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and WorkflowInvocation + */ + public getWorkflowInvocation(request: google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest, callback: google.cloud.dataform.v1alpha2.Dataform.GetWorkflowInvocationCallback): void; + + /** + * Calls GetWorkflowInvocation. + * @param request GetWorkflowInvocationRequest message or plain object + * @returns Promise + */ + public getWorkflowInvocation(request: google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest): Promise; + + /** + * Calls CreateWorkflowInvocation. + * @param request CreateWorkflowInvocationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and WorkflowInvocation + */ + public createWorkflowInvocation(request: google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest, callback: google.cloud.dataform.v1alpha2.Dataform.CreateWorkflowInvocationCallback): void; + + /** + * Calls CreateWorkflowInvocation. + * @param request CreateWorkflowInvocationRequest message or plain object + * @returns Promise + */ + public createWorkflowInvocation(request: google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest): Promise; + + /** + * Calls DeleteWorkflowInvocation. + * @param request DeleteWorkflowInvocationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteWorkflowInvocation(request: google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest, callback: google.cloud.dataform.v1alpha2.Dataform.DeleteWorkflowInvocationCallback): void; + + /** + * Calls DeleteWorkflowInvocation. + * @param request DeleteWorkflowInvocationRequest message or plain object + * @returns Promise + */ + public deleteWorkflowInvocation(request: google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest): Promise; + + /** + * Calls CancelWorkflowInvocation. + * @param request CancelWorkflowInvocationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelWorkflowInvocation(request: google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest, callback: google.cloud.dataform.v1alpha2.Dataform.CancelWorkflowInvocationCallback): void; + + /** + * Calls CancelWorkflowInvocation. + * @param request CancelWorkflowInvocationRequest message or plain object + * @returns Promise + */ + public cancelWorkflowInvocation(request: google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest): Promise; + + /** + * Calls QueryWorkflowInvocationActions. + * @param request QueryWorkflowInvocationActionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryWorkflowInvocationActionsResponse + */ + public queryWorkflowInvocationActions(request: google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest, callback: google.cloud.dataform.v1alpha2.Dataform.QueryWorkflowInvocationActionsCallback): void; + + /** + * Calls QueryWorkflowInvocationActions. + * @param request QueryWorkflowInvocationActionsRequest message or plain object + * @returns Promise + */ + public queryWorkflowInvocationActions(request: google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest): Promise; + } + + namespace Dataform { + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#listRepositories}. + * @param error Error, if any + * @param [response] ListRepositoriesResponse + */ + type ListRepositoriesCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.ListRepositoriesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#getRepository}. + * @param error Error, if any + * @param [response] Repository + */ + type GetRepositoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.Repository) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#createRepository}. + * @param error Error, if any + * @param [response] Repository + */ + type CreateRepositoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.Repository) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#updateRepository}. + * @param error Error, if any + * @param [response] Repository + */ + type UpdateRepositoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.Repository) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#deleteRepository}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteRepositoryCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#fetchRemoteBranches}. + * @param error Error, if any + * @param [response] FetchRemoteBranchesResponse + */ + type FetchRemoteBranchesCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#listWorkspaces}. + * @param error Error, if any + * @param [response] ListWorkspacesResponse + */ + type ListWorkspacesCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.ListWorkspacesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#getWorkspace}. + * @param error Error, if any + * @param [response] Workspace + */ + type GetWorkspaceCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.Workspace) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#createWorkspace}. + * @param error Error, if any + * @param [response] Workspace + */ + type CreateWorkspaceCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.Workspace) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#deleteWorkspace}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteWorkspaceCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#installNpmPackages}. + * @param error Error, if any + * @param [response] InstallNpmPackagesResponse + */ + type InstallNpmPackagesCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#pullGitCommits}. + * @param error Error, if any + * @param [response] Empty + */ + type PullGitCommitsCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#pushGitCommits}. + * @param error Error, if any + * @param [response] Empty + */ + type PushGitCommitsCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#fetchFileGitStatuses}. + * @param error Error, if any + * @param [response] FetchFileGitStatusesResponse + */ + type FetchFileGitStatusesCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#fetchGitAheadBehind}. + * @param error Error, if any + * @param [response] FetchGitAheadBehindResponse + */ + type FetchGitAheadBehindCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#commitWorkspaceChanges}. + * @param error Error, if any + * @param [response] Empty + */ + type CommitWorkspaceChangesCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#resetWorkspaceChanges}. + * @param error Error, if any + * @param [response] Empty + */ + type ResetWorkspaceChangesCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#fetchFileDiff}. + * @param error Error, if any + * @param [response] FetchFileDiffResponse + */ + type FetchFileDiffCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.FetchFileDiffResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#queryDirectoryContents}. + * @param error Error, if any + * @param [response] QueryDirectoryContentsResponse + */ + type QueryDirectoryContentsCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#makeDirectory}. + * @param error Error, if any + * @param [response] MakeDirectoryResponse + */ + type MakeDirectoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.MakeDirectoryResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#removeDirectory}. + * @param error Error, if any + * @param [response] Empty + */ + type RemoveDirectoryCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#moveDirectory}. + * @param error Error, if any + * @param [response] MoveDirectoryResponse + */ + type MoveDirectoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.MoveDirectoryResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#readFile}. + * @param error Error, if any + * @param [response] ReadFileResponse + */ + type ReadFileCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.ReadFileResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#removeFile}. + * @param error Error, if any + * @param [response] Empty + */ + type RemoveFileCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#moveFile}. + * @param error Error, if any + * @param [response] MoveFileResponse + */ + type MoveFileCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.MoveFileResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#writeFile}. + * @param error Error, if any + * @param [response] WriteFileResponse + */ + type WriteFileCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.WriteFileResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#listCompilationResults}. + * @param error Error, if any + * @param [response] ListCompilationResultsResponse + */ + type ListCompilationResultsCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.ListCompilationResultsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#getCompilationResult}. + * @param error Error, if any + * @param [response] CompilationResult + */ + type GetCompilationResultCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.CompilationResult) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#createCompilationResult}. + * @param error Error, if any + * @param [response] CompilationResult + */ + type CreateCompilationResultCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.CompilationResult) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#queryCompilationResultActions}. + * @param error Error, if any + * @param [response] QueryCompilationResultActionsResponse + */ + type QueryCompilationResultActionsCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#listWorkflowInvocations}. + * @param error Error, if any + * @param [response] ListWorkflowInvocationsResponse + */ + type ListWorkflowInvocationsCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#getWorkflowInvocation}. + * @param error Error, if any + * @param [response] WorkflowInvocation + */ + type GetWorkflowInvocationCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.WorkflowInvocation) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#createWorkflowInvocation}. + * @param error Error, if any + * @param [response] WorkflowInvocation + */ + type CreateWorkflowInvocationCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.WorkflowInvocation) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#deleteWorkflowInvocation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteWorkflowInvocationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#cancelWorkflowInvocation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelWorkflowInvocationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#queryWorkflowInvocationActions}. + * @param error Error, if any + * @param [response] QueryWorkflowInvocationActionsResponse + */ + type QueryWorkflowInvocationActionsCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse) => void; + } + + /** Properties of a Repository. */ + interface IRepository { + + /** Repository name */ + name?: (string|null); + + /** Repository gitRemoteSettings */ + gitRemoteSettings?: (google.cloud.dataform.v1alpha2.Repository.IGitRemoteSettings|null); + } + + /** Represents a Repository. */ + class Repository implements IRepository { + + /** + * Constructs a new Repository. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IRepository); + + /** Repository name. */ + public name: string; + + /** Repository gitRemoteSettings. */ + public gitRemoteSettings?: (google.cloud.dataform.v1alpha2.Repository.IGitRemoteSettings|null); + + /** + * Creates a new Repository instance using the specified properties. + * @param [properties] Properties to set + * @returns Repository instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IRepository): google.cloud.dataform.v1alpha2.Repository; + + /** + * Encodes the specified Repository message. Does not implicitly {@link google.cloud.dataform.v1alpha2.Repository.verify|verify} messages. + * @param message Repository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Repository message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.Repository.verify|verify} messages. + * @param message Repository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Repository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.Repository; + + /** + * Decodes a Repository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.Repository; + + /** + * Verifies a Repository message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Repository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Repository + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.Repository; + + /** + * Creates a plain object from a Repository message. Also converts values to other types if specified. + * @param message Repository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.Repository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Repository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Repository { + + /** Properties of a GitRemoteSettings. */ + interface IGitRemoteSettings { + + /** GitRemoteSettings url */ + url?: (string|null); + + /** GitRemoteSettings defaultBranch */ + defaultBranch?: (string|null); + + /** GitRemoteSettings authenticationTokenSecretVersion */ + authenticationTokenSecretVersion?: (string|null); + + /** GitRemoteSettings tokenStatus */ + tokenStatus?: (google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.TokenStatus|keyof typeof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.TokenStatus|null); + } + + /** Represents a GitRemoteSettings. */ + class GitRemoteSettings implements IGitRemoteSettings { + + /** + * Constructs a new GitRemoteSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.Repository.IGitRemoteSettings); + + /** GitRemoteSettings url. */ + public url: string; + + /** GitRemoteSettings defaultBranch. */ + public defaultBranch: string; + + /** GitRemoteSettings authenticationTokenSecretVersion. */ + public authenticationTokenSecretVersion: string; + + /** GitRemoteSettings tokenStatus. */ + public tokenStatus: (google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.TokenStatus|keyof typeof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.TokenStatus); + + /** + * Creates a new GitRemoteSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GitRemoteSettings instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.Repository.IGitRemoteSettings): google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings; + + /** + * Encodes the specified GitRemoteSettings message. Does not implicitly {@link google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.verify|verify} messages. + * @param message GitRemoteSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.Repository.IGitRemoteSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GitRemoteSettings message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.verify|verify} messages. + * @param message GitRemoteSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.Repository.IGitRemoteSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GitRemoteSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GitRemoteSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings; + + /** + * Decodes a GitRemoteSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GitRemoteSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings; + + /** + * Verifies a GitRemoteSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GitRemoteSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GitRemoteSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings; + + /** + * Creates a plain object from a GitRemoteSettings message. Also converts values to other types if specified. + * @param message GitRemoteSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GitRemoteSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace GitRemoteSettings { + + /** TokenStatus enum. */ + enum TokenStatus { + TOKEN_STATUS_UNSPECIFIED = 0, + NOT_FOUND = 1, + INVALID = 2, + VALID = 3 + } + } + } + + /** Properties of a ListRepositoriesRequest. */ + interface IListRepositoriesRequest { + + /** ListRepositoriesRequest parent */ + parent?: (string|null); + + /** ListRepositoriesRequest pageSize */ + pageSize?: (number|null); + + /** ListRepositoriesRequest pageToken */ + pageToken?: (string|null); + + /** ListRepositoriesRequest orderBy */ + orderBy?: (string|null); + + /** ListRepositoriesRequest filter */ + filter?: (string|null); + } + + /** Represents a ListRepositoriesRequest. */ + class ListRepositoriesRequest implements IListRepositoriesRequest { + + /** + * Constructs a new ListRepositoriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IListRepositoriesRequest); + + /** ListRepositoriesRequest parent. */ + public parent: string; + + /** ListRepositoriesRequest pageSize. */ + public pageSize: number; + + /** ListRepositoriesRequest pageToken. */ + public pageToken: string; + + /** ListRepositoriesRequest orderBy. */ + public orderBy: string; + + /** ListRepositoriesRequest filter. */ + public filter: string; + + /** + * Creates a new ListRepositoriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRepositoriesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IListRepositoriesRequest): google.cloud.dataform.v1alpha2.ListRepositoriesRequest; + + /** + * Encodes the specified ListRepositoriesRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListRepositoriesRequest.verify|verify} messages. + * @param message ListRepositoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IListRepositoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRepositoriesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListRepositoriesRequest.verify|verify} messages. + * @param message ListRepositoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IListRepositoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.ListRepositoriesRequest; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.ListRepositoriesRequest; + + /** + * Verifies a ListRepositoriesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListRepositoriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRepositoriesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.ListRepositoriesRequest; + + /** + * Creates a plain object from a ListRepositoriesRequest message. Also converts values to other types if specified. + * @param message ListRepositoriesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.ListRepositoriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRepositoriesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListRepositoriesResponse. */ + interface IListRepositoriesResponse { + + /** ListRepositoriesResponse repositories */ + repositories?: (google.cloud.dataform.v1alpha2.IRepository[]|null); + + /** ListRepositoriesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListRepositoriesResponse. */ + class ListRepositoriesResponse implements IListRepositoriesResponse { + + /** + * Constructs a new ListRepositoriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IListRepositoriesResponse); + + /** ListRepositoriesResponse repositories. */ + public repositories: google.cloud.dataform.v1alpha2.IRepository[]; + + /** ListRepositoriesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListRepositoriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRepositoriesResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IListRepositoriesResponse): google.cloud.dataform.v1alpha2.ListRepositoriesResponse; + + /** + * Encodes the specified ListRepositoriesResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListRepositoriesResponse.verify|verify} messages. + * @param message ListRepositoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IListRepositoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRepositoriesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListRepositoriesResponse.verify|verify} messages. + * @param message ListRepositoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IListRepositoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.ListRepositoriesResponse; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.ListRepositoriesResponse; + + /** + * Verifies a ListRepositoriesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListRepositoriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRepositoriesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.ListRepositoriesResponse; + + /** + * Creates a plain object from a ListRepositoriesResponse message. Also converts values to other types if specified. + * @param message ListRepositoriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.ListRepositoriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRepositoriesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetRepositoryRequest. */ + interface IGetRepositoryRequest { + + /** GetRepositoryRequest name */ + name?: (string|null); + } + + /** Represents a GetRepositoryRequest. */ + class GetRepositoryRequest implements IGetRepositoryRequest { + + /** + * Constructs a new GetRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IGetRepositoryRequest); + + /** GetRepositoryRequest name. */ + public name: string; + + /** + * Creates a new GetRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetRepositoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IGetRepositoryRequest): google.cloud.dataform.v1alpha2.GetRepositoryRequest; + + /** + * Encodes the specified GetRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetRepositoryRequest.verify|verify} messages. + * @param message GetRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IGetRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetRepositoryRequest.verify|verify} messages. + * @param message GetRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IGetRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.GetRepositoryRequest; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.GetRepositoryRequest; + + /** + * Verifies a GetRepositoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.GetRepositoryRequest; + + /** + * Creates a plain object from a GetRepositoryRequest message. Also converts values to other types if specified. + * @param message GetRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.GetRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateRepositoryRequest. */ + interface ICreateRepositoryRequest { + + /** CreateRepositoryRequest parent */ + parent?: (string|null); + + /** CreateRepositoryRequest repository */ + repository?: (google.cloud.dataform.v1alpha2.IRepository|null); + + /** CreateRepositoryRequest repositoryId */ + repositoryId?: (string|null); + } + + /** Represents a CreateRepositoryRequest. */ + class CreateRepositoryRequest implements ICreateRepositoryRequest { + + /** + * Constructs a new CreateRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.ICreateRepositoryRequest); + + /** CreateRepositoryRequest parent. */ + public parent: string; + + /** CreateRepositoryRequest repository. */ + public repository?: (google.cloud.dataform.v1alpha2.IRepository|null); + + /** CreateRepositoryRequest repositoryId. */ + public repositoryId: string; + + /** + * Creates a new CreateRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateRepositoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.ICreateRepositoryRequest): google.cloud.dataform.v1alpha2.CreateRepositoryRequest; + + /** + * Encodes the specified CreateRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateRepositoryRequest.verify|verify} messages. + * @param message CreateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.ICreateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateRepositoryRequest.verify|verify} messages. + * @param message CreateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.ICreateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CreateRepositoryRequest; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CreateRepositoryRequest; + + /** + * Verifies a CreateRepositoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CreateRepositoryRequest; + + /** + * Creates a plain object from a CreateRepositoryRequest message. Also converts values to other types if specified. + * @param message CreateRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CreateRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateRepositoryRequest. */ + interface IUpdateRepositoryRequest { + + /** UpdateRepositoryRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateRepositoryRequest repository */ + repository?: (google.cloud.dataform.v1alpha2.IRepository|null); + } + + /** Represents an UpdateRepositoryRequest. */ + class UpdateRepositoryRequest implements IUpdateRepositoryRequest { + + /** + * Constructs a new UpdateRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest); + + /** UpdateRepositoryRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateRepositoryRequest repository. */ + public repository?: (google.cloud.dataform.v1alpha2.IRepository|null); + + /** + * Creates a new UpdateRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateRepositoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest): google.cloud.dataform.v1alpha2.UpdateRepositoryRequest; + + /** + * Encodes the specified UpdateRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.UpdateRepositoryRequest.verify|verify} messages. + * @param message UpdateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.UpdateRepositoryRequest.verify|verify} messages. + * @param message UpdateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.UpdateRepositoryRequest; + + /** + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.UpdateRepositoryRequest; + + /** + * Verifies an UpdateRepositoryRequest message. + * @param message Plain 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 UpdateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.UpdateRepositoryRequest; + + /** + * Creates a plain object from an UpdateRepositoryRequest message. Also converts values to other types if specified. + * @param message UpdateRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.UpdateRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteRepositoryRequest. */ + interface IDeleteRepositoryRequest { + + /** DeleteRepositoryRequest name */ + name?: (string|null); + + /** DeleteRepositoryRequest force */ + force?: (boolean|null); + } + + /** Represents a DeleteRepositoryRequest. */ + class DeleteRepositoryRequest implements IDeleteRepositoryRequest { + + /** + * Constructs a new DeleteRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest); + + /** DeleteRepositoryRequest name. */ + public name: string; + + /** DeleteRepositoryRequest force. */ + public force: boolean; + + /** + * Creates a new DeleteRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteRepositoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest): google.cloud.dataform.v1alpha2.DeleteRepositoryRequest; + + /** + * Encodes the specified DeleteRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.DeleteRepositoryRequest.verify|verify} messages. + * @param message DeleteRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.DeleteRepositoryRequest.verify|verify} messages. + * @param message DeleteRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.DeleteRepositoryRequest; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.DeleteRepositoryRequest; + + /** + * Verifies a DeleteRepositoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.DeleteRepositoryRequest; + + /** + * Creates a plain object from a DeleteRepositoryRequest message. Also converts values to other types if specified. + * @param message DeleteRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.DeleteRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FetchRemoteBranchesRequest. */ + interface IFetchRemoteBranchesRequest { + + /** FetchRemoteBranchesRequest name */ + name?: (string|null); + } + + /** Represents a FetchRemoteBranchesRequest. */ + class FetchRemoteBranchesRequest implements IFetchRemoteBranchesRequest { + + /** + * Constructs a new FetchRemoteBranchesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest); + + /** FetchRemoteBranchesRequest name. */ + public name: string; + + /** + * Creates a new FetchRemoteBranchesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchRemoteBranchesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest): google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest; + + /** + * Encodes the specified FetchRemoteBranchesRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest.verify|verify} messages. + * @param message FetchRemoteBranchesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchRemoteBranchesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest.verify|verify} messages. + * @param message FetchRemoteBranchesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchRemoteBranchesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchRemoteBranchesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest; + + /** + * Decodes a FetchRemoteBranchesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchRemoteBranchesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest; + + /** + * Verifies a FetchRemoteBranchesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchRemoteBranchesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchRemoteBranchesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest; + + /** + * Creates a plain object from a FetchRemoteBranchesRequest message. Also converts values to other types if specified. + * @param message FetchRemoteBranchesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchRemoteBranchesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FetchRemoteBranchesResponse. */ + interface IFetchRemoteBranchesResponse { + + /** FetchRemoteBranchesResponse branches */ + branches?: (string[]|null); + } + + /** Represents a FetchRemoteBranchesResponse. */ + class FetchRemoteBranchesResponse implements IFetchRemoteBranchesResponse { + + /** + * Constructs a new FetchRemoteBranchesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse); + + /** FetchRemoteBranchesResponse branches. */ + public branches: string[]; + + /** + * Creates a new FetchRemoteBranchesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchRemoteBranchesResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse): google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse; + + /** + * Encodes the specified FetchRemoteBranchesResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse.verify|verify} messages. + * @param message FetchRemoteBranchesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchRemoteBranchesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse.verify|verify} messages. + * @param message FetchRemoteBranchesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchRemoteBranchesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchRemoteBranchesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse; + + /** + * Decodes a FetchRemoteBranchesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchRemoteBranchesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse; + + /** + * Verifies a FetchRemoteBranchesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchRemoteBranchesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchRemoteBranchesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse; + + /** + * Creates a plain object from a FetchRemoteBranchesResponse message. Also converts values to other types if specified. + * @param message FetchRemoteBranchesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchRemoteBranchesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Workspace. */ + interface IWorkspace { + + /** Workspace name */ + name?: (string|null); + } + + /** Represents a Workspace. */ + class Workspace implements IWorkspace { + + /** + * Constructs a new Workspace. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IWorkspace); + + /** Workspace name. */ + public name: string; + + /** + * Creates a new Workspace instance using the specified properties. + * @param [properties] Properties to set + * @returns Workspace instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IWorkspace): google.cloud.dataform.v1alpha2.Workspace; + + /** + * Encodes the specified Workspace message. Does not implicitly {@link google.cloud.dataform.v1alpha2.Workspace.verify|verify} messages. + * @param message Workspace message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IWorkspace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Workspace message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.Workspace.verify|verify} messages. + * @param message Workspace message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IWorkspace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Workspace message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Workspace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.Workspace; + + /** + * Decodes a Workspace message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Workspace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.Workspace; + + /** + * Verifies a Workspace message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Workspace message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Workspace + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.Workspace; + + /** + * Creates a plain object from a Workspace message. Also converts values to other types if specified. + * @param message Workspace + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.Workspace, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Workspace to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListWorkspacesRequest. */ + interface IListWorkspacesRequest { + + /** ListWorkspacesRequest parent */ + parent?: (string|null); + + /** ListWorkspacesRequest pageSize */ + pageSize?: (number|null); + + /** ListWorkspacesRequest pageToken */ + pageToken?: (string|null); + + /** ListWorkspacesRequest orderBy */ + orderBy?: (string|null); + + /** ListWorkspacesRequest filter */ + filter?: (string|null); + } + + /** Represents a ListWorkspacesRequest. */ + class ListWorkspacesRequest implements IListWorkspacesRequest { + + /** + * Constructs a new ListWorkspacesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IListWorkspacesRequest); + + /** ListWorkspacesRequest parent. */ + public parent: string; + + /** ListWorkspacesRequest pageSize. */ + public pageSize: number; + + /** ListWorkspacesRequest pageToken. */ + public pageToken: string; + + /** ListWorkspacesRequest orderBy. */ + public orderBy: string; + + /** ListWorkspacesRequest filter. */ + public filter: string; + + /** + * Creates a new ListWorkspacesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListWorkspacesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IListWorkspacesRequest): google.cloud.dataform.v1alpha2.ListWorkspacesRequest; + + /** + * Encodes the specified ListWorkspacesRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkspacesRequest.verify|verify} messages. + * @param message ListWorkspacesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IListWorkspacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListWorkspacesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkspacesRequest.verify|verify} messages. + * @param message ListWorkspacesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IListWorkspacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListWorkspacesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListWorkspacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.ListWorkspacesRequest; + + /** + * Decodes a ListWorkspacesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListWorkspacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.ListWorkspacesRequest; + + /** + * Verifies a ListWorkspacesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListWorkspacesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListWorkspacesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.ListWorkspacesRequest; + + /** + * Creates a plain object from a ListWorkspacesRequest message. Also converts values to other types if specified. + * @param message ListWorkspacesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.ListWorkspacesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListWorkspacesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListWorkspacesResponse. */ + interface IListWorkspacesResponse { + + /** ListWorkspacesResponse workspaces */ + workspaces?: (google.cloud.dataform.v1alpha2.IWorkspace[]|null); + + /** ListWorkspacesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListWorkspacesResponse. */ + class ListWorkspacesResponse implements IListWorkspacesResponse { + + /** + * Constructs a new ListWorkspacesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IListWorkspacesResponse); + + /** ListWorkspacesResponse workspaces. */ + public workspaces: google.cloud.dataform.v1alpha2.IWorkspace[]; + + /** ListWorkspacesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListWorkspacesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListWorkspacesResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IListWorkspacesResponse): google.cloud.dataform.v1alpha2.ListWorkspacesResponse; + + /** + * Encodes the specified ListWorkspacesResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkspacesResponse.verify|verify} messages. + * @param message ListWorkspacesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IListWorkspacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListWorkspacesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkspacesResponse.verify|verify} messages. + * @param message ListWorkspacesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IListWorkspacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListWorkspacesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListWorkspacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.ListWorkspacesResponse; + + /** + * Decodes a ListWorkspacesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListWorkspacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.ListWorkspacesResponse; + + /** + * Verifies a ListWorkspacesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListWorkspacesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListWorkspacesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.ListWorkspacesResponse; + + /** + * Creates a plain object from a ListWorkspacesResponse message. Also converts values to other types if specified. + * @param message ListWorkspacesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.ListWorkspacesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListWorkspacesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetWorkspaceRequest. */ + interface IGetWorkspaceRequest { + + /** GetWorkspaceRequest name */ + name?: (string|null); + } + + /** Represents a GetWorkspaceRequest. */ + class GetWorkspaceRequest implements IGetWorkspaceRequest { + + /** + * Constructs a new GetWorkspaceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IGetWorkspaceRequest); + + /** GetWorkspaceRequest name. */ + public name: string; + + /** + * Creates a new GetWorkspaceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetWorkspaceRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IGetWorkspaceRequest): google.cloud.dataform.v1alpha2.GetWorkspaceRequest; + + /** + * Encodes the specified GetWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetWorkspaceRequest.verify|verify} messages. + * @param message GetWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IGetWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetWorkspaceRequest.verify|verify} messages. + * @param message GetWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IGetWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetWorkspaceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.GetWorkspaceRequest; + + /** + * Decodes a GetWorkspaceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.GetWorkspaceRequest; + + /** + * Verifies a GetWorkspaceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetWorkspaceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.GetWorkspaceRequest; + + /** + * Creates a plain object from a GetWorkspaceRequest message. Also converts values to other types if specified. + * @param message GetWorkspaceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.GetWorkspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetWorkspaceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateWorkspaceRequest. */ + interface ICreateWorkspaceRequest { + + /** CreateWorkspaceRequest parent */ + parent?: (string|null); + + /** CreateWorkspaceRequest workspace */ + workspace?: (google.cloud.dataform.v1alpha2.IWorkspace|null); + + /** CreateWorkspaceRequest workspaceId */ + workspaceId?: (string|null); + } + + /** Represents a CreateWorkspaceRequest. */ + class CreateWorkspaceRequest implements ICreateWorkspaceRequest { + + /** + * Constructs a new CreateWorkspaceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest); + + /** CreateWorkspaceRequest parent. */ + public parent: string; + + /** CreateWorkspaceRequest workspace. */ + public workspace?: (google.cloud.dataform.v1alpha2.IWorkspace|null); + + /** CreateWorkspaceRequest workspaceId. */ + public workspaceId: string; + + /** + * Creates a new CreateWorkspaceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateWorkspaceRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest): google.cloud.dataform.v1alpha2.CreateWorkspaceRequest; + + /** + * Encodes the specified CreateWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateWorkspaceRequest.verify|verify} messages. + * @param message CreateWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateWorkspaceRequest.verify|verify} messages. + * @param message CreateWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateWorkspaceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CreateWorkspaceRequest; + + /** + * Decodes a CreateWorkspaceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CreateWorkspaceRequest; + + /** + * Verifies a CreateWorkspaceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateWorkspaceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CreateWorkspaceRequest; + + /** + * Creates a plain object from a CreateWorkspaceRequest message. Also converts values to other types if specified. + * @param message CreateWorkspaceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CreateWorkspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateWorkspaceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteWorkspaceRequest. */ + interface IDeleteWorkspaceRequest { + + /** DeleteWorkspaceRequest name */ + name?: (string|null); + } + + /** Represents a DeleteWorkspaceRequest. */ + class DeleteWorkspaceRequest implements IDeleteWorkspaceRequest { + + /** + * Constructs a new DeleteWorkspaceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest); + + /** DeleteWorkspaceRequest name. */ + public name: string; + + /** + * Creates a new DeleteWorkspaceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteWorkspaceRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest): google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest; + + /** + * Encodes the specified DeleteWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest.verify|verify} messages. + * @param message DeleteWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest.verify|verify} messages. + * @param message DeleteWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteWorkspaceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest; + + /** + * Decodes a DeleteWorkspaceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest; + + /** + * Verifies a DeleteWorkspaceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteWorkspaceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest; + + /** + * Creates a plain object from a DeleteWorkspaceRequest message. Also converts values to other types if specified. + * @param message DeleteWorkspaceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteWorkspaceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CommitAuthor. */ + interface ICommitAuthor { + + /** CommitAuthor name */ + name?: (string|null); + + /** CommitAuthor emailAddress */ + emailAddress?: (string|null); + } + + /** Represents a CommitAuthor. */ + class CommitAuthor implements ICommitAuthor { + + /** + * Constructs a new CommitAuthor. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.ICommitAuthor); + + /** CommitAuthor name. */ + public name: string; + + /** CommitAuthor emailAddress. */ + public emailAddress: string; + + /** + * Creates a new CommitAuthor instance using the specified properties. + * @param [properties] Properties to set + * @returns CommitAuthor instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.ICommitAuthor): google.cloud.dataform.v1alpha2.CommitAuthor; + + /** + * Encodes the specified CommitAuthor message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CommitAuthor.verify|verify} messages. + * @param message CommitAuthor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.ICommitAuthor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommitAuthor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CommitAuthor.verify|verify} messages. + * @param message CommitAuthor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.ICommitAuthor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommitAuthor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommitAuthor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CommitAuthor; + + /** + * Decodes a CommitAuthor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommitAuthor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CommitAuthor; + + /** + * Verifies a CommitAuthor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommitAuthor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommitAuthor + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CommitAuthor; + + /** + * Creates a plain object from a CommitAuthor message. Also converts values to other types if specified. + * @param message CommitAuthor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CommitAuthor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommitAuthor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PullGitCommitsRequest. */ + interface IPullGitCommitsRequest { + + /** PullGitCommitsRequest name */ + name?: (string|null); + + /** PullGitCommitsRequest remoteBranch */ + remoteBranch?: (string|null); + + /** PullGitCommitsRequest author */ + author?: (google.cloud.dataform.v1alpha2.ICommitAuthor|null); + } + + /** Represents a PullGitCommitsRequest. */ + class PullGitCommitsRequest implements IPullGitCommitsRequest { + + /** + * Constructs a new PullGitCommitsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IPullGitCommitsRequest); + + /** PullGitCommitsRequest name. */ + public name: string; + + /** PullGitCommitsRequest remoteBranch. */ + public remoteBranch: string; + + /** PullGitCommitsRequest author. */ + public author?: (google.cloud.dataform.v1alpha2.ICommitAuthor|null); + + /** + * Creates a new PullGitCommitsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PullGitCommitsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IPullGitCommitsRequest): google.cloud.dataform.v1alpha2.PullGitCommitsRequest; + + /** + * Encodes the specified PullGitCommitsRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.PullGitCommitsRequest.verify|verify} messages. + * @param message PullGitCommitsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IPullGitCommitsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PullGitCommitsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.PullGitCommitsRequest.verify|verify} messages. + * @param message PullGitCommitsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IPullGitCommitsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PullGitCommitsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PullGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.PullGitCommitsRequest; + + /** + * Decodes a PullGitCommitsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PullGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.PullGitCommitsRequest; + + /** + * Verifies a PullGitCommitsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PullGitCommitsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PullGitCommitsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.PullGitCommitsRequest; + + /** + * Creates a plain object from a PullGitCommitsRequest message. Also converts values to other types if specified. + * @param message PullGitCommitsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.PullGitCommitsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PullGitCommitsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PushGitCommitsRequest. */ + interface IPushGitCommitsRequest { + + /** PushGitCommitsRequest name */ + name?: (string|null); + + /** PushGitCommitsRequest remoteBranch */ + remoteBranch?: (string|null); + } + + /** Represents a PushGitCommitsRequest. */ + class PushGitCommitsRequest implements IPushGitCommitsRequest { + + /** + * Constructs a new PushGitCommitsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IPushGitCommitsRequest); + + /** PushGitCommitsRequest name. */ + public name: string; + + /** PushGitCommitsRequest remoteBranch. */ + public remoteBranch: string; + + /** + * Creates a new PushGitCommitsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PushGitCommitsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IPushGitCommitsRequest): google.cloud.dataform.v1alpha2.PushGitCommitsRequest; + + /** + * Encodes the specified PushGitCommitsRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.PushGitCommitsRequest.verify|verify} messages. + * @param message PushGitCommitsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IPushGitCommitsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PushGitCommitsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.PushGitCommitsRequest.verify|verify} messages. + * @param message PushGitCommitsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IPushGitCommitsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PushGitCommitsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PushGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.PushGitCommitsRequest; + + /** + * Decodes a PushGitCommitsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PushGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.PushGitCommitsRequest; + + /** + * Verifies a PushGitCommitsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PushGitCommitsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PushGitCommitsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.PushGitCommitsRequest; + + /** + * Creates a plain object from a PushGitCommitsRequest message. Also converts values to other types if specified. + * @param message PushGitCommitsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.PushGitCommitsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PushGitCommitsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FetchFileGitStatusesRequest. */ + interface IFetchFileGitStatusesRequest { + + /** FetchFileGitStatusesRequest name */ + name?: (string|null); + } + + /** Represents a FetchFileGitStatusesRequest. */ + class FetchFileGitStatusesRequest implements IFetchFileGitStatusesRequest { + + /** + * Constructs a new FetchFileGitStatusesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest); + + /** FetchFileGitStatusesRequest name. */ + public name: string; + + /** + * Creates a new FetchFileGitStatusesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchFileGitStatusesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest): google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest; + + /** + * Encodes the specified FetchFileGitStatusesRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest.verify|verify} messages. + * @param message FetchFileGitStatusesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchFileGitStatusesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest.verify|verify} messages. + * @param message FetchFileGitStatusesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchFileGitStatusesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchFileGitStatusesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest; + + /** + * Decodes a FetchFileGitStatusesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchFileGitStatusesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest; + + /** + * Verifies a FetchFileGitStatusesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchFileGitStatusesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchFileGitStatusesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest; + + /** + * Creates a plain object from a FetchFileGitStatusesRequest message. Also converts values to other types if specified. + * @param message FetchFileGitStatusesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchFileGitStatusesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FetchFileGitStatusesResponse. */ + interface IFetchFileGitStatusesResponse { + + /** FetchFileGitStatusesResponse uncommittedFileChanges */ + uncommittedFileChanges?: (google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.IUncommittedFileChange[]|null); + } + + /** Represents a FetchFileGitStatusesResponse. */ + class FetchFileGitStatusesResponse implements IFetchFileGitStatusesResponse { + + /** + * Constructs a new FetchFileGitStatusesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse); + + /** FetchFileGitStatusesResponse uncommittedFileChanges. */ + public uncommittedFileChanges: google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.IUncommittedFileChange[]; + + /** + * Creates a new FetchFileGitStatusesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchFileGitStatusesResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse): google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse; + + /** + * Encodes the specified FetchFileGitStatusesResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.verify|verify} messages. + * @param message FetchFileGitStatusesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchFileGitStatusesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.verify|verify} messages. + * @param message FetchFileGitStatusesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchFileGitStatusesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchFileGitStatusesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse; + + /** + * Decodes a FetchFileGitStatusesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchFileGitStatusesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse; + + /** + * Verifies a FetchFileGitStatusesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchFileGitStatusesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchFileGitStatusesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse; + + /** + * Creates a plain object from a FetchFileGitStatusesResponse message. Also converts values to other types if specified. + * @param message FetchFileGitStatusesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchFileGitStatusesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FetchFileGitStatusesResponse { + + /** Properties of an UncommittedFileChange. */ + interface IUncommittedFileChange { + + /** UncommittedFileChange path */ + path?: (string|null); + + /** UncommittedFileChange state */ + state?: (google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.State|keyof typeof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.State|null); + } + + /** Represents an UncommittedFileChange. */ + class UncommittedFileChange implements IUncommittedFileChange { + + /** + * Constructs a new UncommittedFileChange. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.IUncommittedFileChange); + + /** UncommittedFileChange path. */ + public path: string; + + /** UncommittedFileChange state. */ + public state: (google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.State|keyof typeof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.State); + + /** + * Creates a new UncommittedFileChange instance using the specified properties. + * @param [properties] Properties to set + * @returns UncommittedFileChange instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.IUncommittedFileChange): google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange; + + /** + * Encodes the specified UncommittedFileChange message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.verify|verify} messages. + * @param message UncommittedFileChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.IUncommittedFileChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UncommittedFileChange message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.verify|verify} messages. + * @param message UncommittedFileChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.IUncommittedFileChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UncommittedFileChange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UncommittedFileChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange; + + /** + * Decodes an UncommittedFileChange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UncommittedFileChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange; + + /** + * Verifies an UncommittedFileChange message. + * @param message Plain 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 UncommittedFileChange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UncommittedFileChange + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange; + + /** + * Creates a plain object from an UncommittedFileChange message. Also converts values to other types if specified. + * @param message UncommittedFileChange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UncommittedFileChange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace UncommittedFileChange { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ADDED = 1, + DELETED = 2, + MODIFIED = 3, + HAS_CONFLICTS = 4 + } + } + } + + /** Properties of a FetchGitAheadBehindRequest. */ + interface IFetchGitAheadBehindRequest { + + /** FetchGitAheadBehindRequest name */ + name?: (string|null); + + /** FetchGitAheadBehindRequest remoteBranch */ + remoteBranch?: (string|null); + } + + /** Represents a FetchGitAheadBehindRequest. */ + class FetchGitAheadBehindRequest implements IFetchGitAheadBehindRequest { + + /** + * Constructs a new FetchGitAheadBehindRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest); + + /** FetchGitAheadBehindRequest name. */ + public name: string; + + /** FetchGitAheadBehindRequest remoteBranch. */ + public remoteBranch: string; + + /** + * Creates a new FetchGitAheadBehindRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchGitAheadBehindRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest): google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest; + + /** + * Encodes the specified FetchGitAheadBehindRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest.verify|verify} messages. + * @param message FetchGitAheadBehindRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchGitAheadBehindRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest.verify|verify} messages. + * @param message FetchGitAheadBehindRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchGitAheadBehindRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchGitAheadBehindRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest; + + /** + * Decodes a FetchGitAheadBehindRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchGitAheadBehindRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest; + + /** + * Verifies a FetchGitAheadBehindRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchGitAheadBehindRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchGitAheadBehindRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest; + + /** + * Creates a plain object from a FetchGitAheadBehindRequest message. Also converts values to other types if specified. + * @param message FetchGitAheadBehindRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchGitAheadBehindRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FetchGitAheadBehindResponse. */ + interface IFetchGitAheadBehindResponse { + + /** FetchGitAheadBehindResponse commitsAhead */ + commitsAhead?: (number|null); + + /** FetchGitAheadBehindResponse commitsBehind */ + commitsBehind?: (number|null); + } + + /** Represents a FetchGitAheadBehindResponse. */ + class FetchGitAheadBehindResponse implements IFetchGitAheadBehindResponse { + + /** + * Constructs a new FetchGitAheadBehindResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse); + + /** FetchGitAheadBehindResponse commitsAhead. */ + public commitsAhead: number; + + /** FetchGitAheadBehindResponse commitsBehind. */ + public commitsBehind: number; + + /** + * Creates a new FetchGitAheadBehindResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchGitAheadBehindResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse): google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse; + + /** + * Encodes the specified FetchGitAheadBehindResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse.verify|verify} messages. + * @param message FetchGitAheadBehindResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchGitAheadBehindResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse.verify|verify} messages. + * @param message FetchGitAheadBehindResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchGitAheadBehindResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchGitAheadBehindResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse; + + /** + * Decodes a FetchGitAheadBehindResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchGitAheadBehindResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse; + + /** + * Verifies a FetchGitAheadBehindResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchGitAheadBehindResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchGitAheadBehindResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse; + + /** + * Creates a plain object from a FetchGitAheadBehindResponse message. Also converts values to other types if specified. + * @param message FetchGitAheadBehindResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchGitAheadBehindResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CommitWorkspaceChangesRequest. */ + interface ICommitWorkspaceChangesRequest { + + /** CommitWorkspaceChangesRequest name */ + name?: (string|null); + + /** CommitWorkspaceChangesRequest author */ + author?: (google.cloud.dataform.v1alpha2.ICommitAuthor|null); + + /** CommitWorkspaceChangesRequest commitMessage */ + commitMessage?: (string|null); + + /** CommitWorkspaceChangesRequest paths */ + paths?: (string[]|null); + } + + /** Represents a CommitWorkspaceChangesRequest. */ + class CommitWorkspaceChangesRequest implements ICommitWorkspaceChangesRequest { + + /** + * Constructs a new CommitWorkspaceChangesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest); + + /** CommitWorkspaceChangesRequest name. */ + public name: string; + + /** CommitWorkspaceChangesRequest author. */ + public author?: (google.cloud.dataform.v1alpha2.ICommitAuthor|null); + + /** CommitWorkspaceChangesRequest commitMessage. */ + public commitMessage: string; + + /** CommitWorkspaceChangesRequest paths. */ + public paths: string[]; + + /** + * Creates a new CommitWorkspaceChangesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CommitWorkspaceChangesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest): google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest; + + /** + * Encodes the specified CommitWorkspaceChangesRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest.verify|verify} messages. + * @param message CommitWorkspaceChangesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommitWorkspaceChangesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest.verify|verify} messages. + * @param message CommitWorkspaceChangesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommitWorkspaceChangesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommitWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest; + + /** + * Decodes a CommitWorkspaceChangesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommitWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest; + + /** + * Verifies a CommitWorkspaceChangesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommitWorkspaceChangesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommitWorkspaceChangesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest; + + /** + * Creates a plain object from a CommitWorkspaceChangesRequest message. Also converts values to other types if specified. + * @param message CommitWorkspaceChangesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommitWorkspaceChangesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ResetWorkspaceChangesRequest. */ + interface IResetWorkspaceChangesRequest { + + /** ResetWorkspaceChangesRequest name */ + name?: (string|null); + + /** ResetWorkspaceChangesRequest paths */ + paths?: (string[]|null); + + /** ResetWorkspaceChangesRequest clean */ + clean?: (boolean|null); + } + + /** Represents a ResetWorkspaceChangesRequest. */ + class ResetWorkspaceChangesRequest implements IResetWorkspaceChangesRequest { + + /** + * Constructs a new ResetWorkspaceChangesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest); + + /** ResetWorkspaceChangesRequest name. */ + public name: string; + + /** ResetWorkspaceChangesRequest paths. */ + public paths: string[]; + + /** ResetWorkspaceChangesRequest clean. */ + public clean: boolean; + + /** + * Creates a new ResetWorkspaceChangesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ResetWorkspaceChangesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest): google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest; + + /** + * Encodes the specified ResetWorkspaceChangesRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest.verify|verify} messages. + * @param message ResetWorkspaceChangesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResetWorkspaceChangesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest.verify|verify} messages. + * @param message ResetWorkspaceChangesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResetWorkspaceChangesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResetWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest; + + /** + * Decodes a ResetWorkspaceChangesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResetWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest; + + /** + * Verifies a ResetWorkspaceChangesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResetWorkspaceChangesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResetWorkspaceChangesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest; + + /** + * Creates a plain object from a ResetWorkspaceChangesRequest message. Also converts values to other types if specified. + * @param message ResetWorkspaceChangesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResetWorkspaceChangesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FetchFileDiffRequest. */ + interface IFetchFileDiffRequest { + + /** FetchFileDiffRequest workspace */ + workspace?: (string|null); + + /** FetchFileDiffRequest path */ + path?: (string|null); + } + + /** Represents a FetchFileDiffRequest. */ + class FetchFileDiffRequest implements IFetchFileDiffRequest { + + /** + * Constructs a new FetchFileDiffRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IFetchFileDiffRequest); + + /** FetchFileDiffRequest workspace. */ + public workspace: string; + + /** FetchFileDiffRequest path. */ + public path: string; + + /** + * Creates a new FetchFileDiffRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchFileDiffRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IFetchFileDiffRequest): google.cloud.dataform.v1alpha2.FetchFileDiffRequest; + + /** + * Encodes the specified FetchFileDiffRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileDiffRequest.verify|verify} messages. + * @param message FetchFileDiffRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IFetchFileDiffRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchFileDiffRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileDiffRequest.verify|verify} messages. + * @param message FetchFileDiffRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IFetchFileDiffRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchFileDiffRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchFileDiffRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.FetchFileDiffRequest; + + /** + * Decodes a FetchFileDiffRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchFileDiffRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.FetchFileDiffRequest; + + /** + * Verifies a FetchFileDiffRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchFileDiffRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchFileDiffRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.FetchFileDiffRequest; + + /** + * Creates a plain object from a FetchFileDiffRequest message. Also converts values to other types if specified. + * @param message FetchFileDiffRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.FetchFileDiffRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchFileDiffRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FetchFileDiffResponse. */ + interface IFetchFileDiffResponse { + + /** FetchFileDiffResponse formattedDiff */ + formattedDiff?: (string|null); + } + + /** Represents a FetchFileDiffResponse. */ + class FetchFileDiffResponse implements IFetchFileDiffResponse { + + /** + * Constructs a new FetchFileDiffResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IFetchFileDiffResponse); + + /** FetchFileDiffResponse formattedDiff. */ + public formattedDiff: string; + + /** + * Creates a new FetchFileDiffResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchFileDiffResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IFetchFileDiffResponse): google.cloud.dataform.v1alpha2.FetchFileDiffResponse; + + /** + * Encodes the specified FetchFileDiffResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileDiffResponse.verify|verify} messages. + * @param message FetchFileDiffResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IFetchFileDiffResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchFileDiffResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileDiffResponse.verify|verify} messages. + * @param message FetchFileDiffResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IFetchFileDiffResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchFileDiffResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchFileDiffResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.FetchFileDiffResponse; + + /** + * Decodes a FetchFileDiffResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchFileDiffResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.FetchFileDiffResponse; + + /** + * Verifies a FetchFileDiffResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchFileDiffResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchFileDiffResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.FetchFileDiffResponse; + + /** + * Creates a plain object from a FetchFileDiffResponse message. Also converts values to other types if specified. + * @param message FetchFileDiffResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.FetchFileDiffResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchFileDiffResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QueryDirectoryContentsRequest. */ + interface IQueryDirectoryContentsRequest { + + /** QueryDirectoryContentsRequest workspace */ + workspace?: (string|null); + + /** QueryDirectoryContentsRequest path */ + path?: (string|null); + + /** QueryDirectoryContentsRequest pageSize */ + pageSize?: (number|null); + + /** QueryDirectoryContentsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a QueryDirectoryContentsRequest. */ + class QueryDirectoryContentsRequest implements IQueryDirectoryContentsRequest { + + /** + * Constructs a new QueryDirectoryContentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest); + + /** QueryDirectoryContentsRequest workspace. */ + public workspace: string; + + /** QueryDirectoryContentsRequest path. */ + public path: string; + + /** QueryDirectoryContentsRequest pageSize. */ + public pageSize: number; + + /** QueryDirectoryContentsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new QueryDirectoryContentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDirectoryContentsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest): google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest; + + /** + * Encodes the specified QueryDirectoryContentsRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest.verify|verify} messages. + * @param message QueryDirectoryContentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryDirectoryContentsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest.verify|verify} messages. + * @param message QueryDirectoryContentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryDirectoryContentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryDirectoryContentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest; + + /** + * Decodes a QueryDirectoryContentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryDirectoryContentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest; + + /** + * Verifies a QueryDirectoryContentsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryDirectoryContentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryDirectoryContentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest; + + /** + * Creates a plain object from a QueryDirectoryContentsRequest message. Also converts values to other types if specified. + * @param message QueryDirectoryContentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryDirectoryContentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QueryDirectoryContentsResponse. */ + interface IQueryDirectoryContentsResponse { + + /** QueryDirectoryContentsResponse directoryEntries */ + directoryEntries?: (google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry[]|null); + + /** QueryDirectoryContentsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a QueryDirectoryContentsResponse. */ + class QueryDirectoryContentsResponse implements IQueryDirectoryContentsResponse { + + /** + * Constructs a new QueryDirectoryContentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IQueryDirectoryContentsResponse); + + /** QueryDirectoryContentsResponse directoryEntries. */ + public directoryEntries: google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry[]; + + /** QueryDirectoryContentsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new QueryDirectoryContentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDirectoryContentsResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IQueryDirectoryContentsResponse): google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse; + + /** + * Encodes the specified QueryDirectoryContentsResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.verify|verify} messages. + * @param message QueryDirectoryContentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IQueryDirectoryContentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryDirectoryContentsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.verify|verify} messages. + * @param message QueryDirectoryContentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IQueryDirectoryContentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryDirectoryContentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryDirectoryContentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse; + + /** + * Decodes a QueryDirectoryContentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryDirectoryContentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse; + + /** + * Verifies a QueryDirectoryContentsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryDirectoryContentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryDirectoryContentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse; + + /** + * Creates a plain object from a QueryDirectoryContentsResponse message. Also converts values to other types if specified. + * @param message QueryDirectoryContentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryDirectoryContentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace QueryDirectoryContentsResponse { + + /** Properties of a DirectoryEntry. */ + interface IDirectoryEntry { + + /** DirectoryEntry file */ + file?: (string|null); + + /** DirectoryEntry directory */ + directory?: (string|null); + } + + /** Represents a DirectoryEntry. */ + class DirectoryEntry implements IDirectoryEntry { + + /** + * Constructs a new DirectoryEntry. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry); + + /** DirectoryEntry file. */ + public file?: (string|null); + + /** DirectoryEntry directory. */ + public directory?: (string|null); + + /** DirectoryEntry entry. */ + public entry?: ("file"|"directory"); + + /** + * Creates a new DirectoryEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns DirectoryEntry instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry): google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry; + + /** + * Encodes the specified DirectoryEntry message. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry.verify|verify} messages. + * @param message DirectoryEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DirectoryEntry message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry.verify|verify} messages. + * @param message DirectoryEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DirectoryEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DirectoryEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry; + + /** + * Decodes a DirectoryEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DirectoryEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry; + + /** + * Verifies a DirectoryEntry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DirectoryEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DirectoryEntry + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry; + + /** + * Creates a plain object from a DirectoryEntry message. Also converts values to other types if specified. + * @param message DirectoryEntry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DirectoryEntry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a MakeDirectoryRequest. */ + interface IMakeDirectoryRequest { + + /** MakeDirectoryRequest workspace */ + workspace?: (string|null); + + /** MakeDirectoryRequest path */ + path?: (string|null); + } + + /** Represents a MakeDirectoryRequest. */ + class MakeDirectoryRequest implements IMakeDirectoryRequest { + + /** + * Constructs a new MakeDirectoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IMakeDirectoryRequest); + + /** MakeDirectoryRequest workspace. */ + public workspace: string; + + /** MakeDirectoryRequest path. */ + public path: string; + + /** + * Creates a new MakeDirectoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns MakeDirectoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IMakeDirectoryRequest): google.cloud.dataform.v1alpha2.MakeDirectoryRequest; + + /** + * Encodes the specified MakeDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.MakeDirectoryRequest.verify|verify} messages. + * @param message MakeDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IMakeDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MakeDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.MakeDirectoryRequest.verify|verify} messages. + * @param message MakeDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IMakeDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MakeDirectoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MakeDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.MakeDirectoryRequest; + + /** + * Decodes a MakeDirectoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MakeDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.MakeDirectoryRequest; + + /** + * Verifies a MakeDirectoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MakeDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MakeDirectoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.MakeDirectoryRequest; + + /** + * Creates a plain object from a MakeDirectoryRequest message. Also converts values to other types if specified. + * @param message MakeDirectoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.MakeDirectoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MakeDirectoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MakeDirectoryResponse. */ + interface IMakeDirectoryResponse { + } + + /** Represents a MakeDirectoryResponse. */ + class MakeDirectoryResponse implements IMakeDirectoryResponse { + + /** + * Constructs a new MakeDirectoryResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IMakeDirectoryResponse); + + /** + * Creates a new MakeDirectoryResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns MakeDirectoryResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IMakeDirectoryResponse): google.cloud.dataform.v1alpha2.MakeDirectoryResponse; + + /** + * Encodes the specified MakeDirectoryResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.MakeDirectoryResponse.verify|verify} messages. + * @param message MakeDirectoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IMakeDirectoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MakeDirectoryResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.MakeDirectoryResponse.verify|verify} messages. + * @param message MakeDirectoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IMakeDirectoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MakeDirectoryResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MakeDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.MakeDirectoryResponse; + + /** + * Decodes a MakeDirectoryResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MakeDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.MakeDirectoryResponse; + + /** + * Verifies a MakeDirectoryResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MakeDirectoryResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MakeDirectoryResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.MakeDirectoryResponse; + + /** + * Creates a plain object from a MakeDirectoryResponse message. Also converts values to other types if specified. + * @param message MakeDirectoryResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.MakeDirectoryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MakeDirectoryResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RemoveDirectoryRequest. */ + interface IRemoveDirectoryRequest { + + /** RemoveDirectoryRequest workspace */ + workspace?: (string|null); + + /** RemoveDirectoryRequest path */ + path?: (string|null); + } + + /** Represents a RemoveDirectoryRequest. */ + class RemoveDirectoryRequest implements IRemoveDirectoryRequest { + + /** + * Constructs a new RemoveDirectoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest); + + /** RemoveDirectoryRequest workspace. */ + public workspace: string; + + /** RemoveDirectoryRequest path. */ + public path: string; + + /** + * Creates a new RemoveDirectoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RemoveDirectoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest): google.cloud.dataform.v1alpha2.RemoveDirectoryRequest; + + /** + * Encodes the specified RemoveDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.RemoveDirectoryRequest.verify|verify} messages. + * @param message RemoveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemoveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.RemoveDirectoryRequest.verify|verify} messages. + * @param message RemoveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemoveDirectoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.RemoveDirectoryRequest; + + /** + * Decodes a RemoveDirectoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.RemoveDirectoryRequest; + + /** + * Verifies a RemoveDirectoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RemoveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemoveDirectoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.RemoveDirectoryRequest; + + /** + * Creates a plain object from a RemoveDirectoryRequest message. Also converts values to other types if specified. + * @param message RemoveDirectoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.RemoveDirectoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemoveDirectoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MoveDirectoryRequest. */ + interface IMoveDirectoryRequest { + + /** MoveDirectoryRequest workspace */ + workspace?: (string|null); + + /** MoveDirectoryRequest path */ + path?: (string|null); + + /** MoveDirectoryRequest newPath */ + newPath?: (string|null); + } + + /** Represents a MoveDirectoryRequest. */ + class MoveDirectoryRequest implements IMoveDirectoryRequest { + + /** + * Constructs a new MoveDirectoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IMoveDirectoryRequest); + + /** MoveDirectoryRequest workspace. */ + public workspace: string; + + /** MoveDirectoryRequest path. */ + public path: string; + + /** MoveDirectoryRequest newPath. */ + public newPath: string; + + /** + * Creates a new MoveDirectoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns MoveDirectoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IMoveDirectoryRequest): google.cloud.dataform.v1alpha2.MoveDirectoryRequest; + + /** + * Encodes the specified MoveDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveDirectoryRequest.verify|verify} messages. + * @param message MoveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IMoveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MoveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveDirectoryRequest.verify|verify} messages. + * @param message MoveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IMoveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MoveDirectoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.MoveDirectoryRequest; + + /** + * Decodes a MoveDirectoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.MoveDirectoryRequest; + + /** + * Verifies a MoveDirectoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MoveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MoveDirectoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.MoveDirectoryRequest; + + /** + * Creates a plain object from a MoveDirectoryRequest message. Also converts values to other types if specified. + * @param message MoveDirectoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.MoveDirectoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MoveDirectoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MoveDirectoryResponse. */ + interface IMoveDirectoryResponse { + } + + /** Represents a MoveDirectoryResponse. */ + class MoveDirectoryResponse implements IMoveDirectoryResponse { + + /** + * Constructs a new MoveDirectoryResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IMoveDirectoryResponse); + + /** + * Creates a new MoveDirectoryResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns MoveDirectoryResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IMoveDirectoryResponse): google.cloud.dataform.v1alpha2.MoveDirectoryResponse; + + /** + * Encodes the specified MoveDirectoryResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveDirectoryResponse.verify|verify} messages. + * @param message MoveDirectoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IMoveDirectoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MoveDirectoryResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveDirectoryResponse.verify|verify} messages. + * @param message MoveDirectoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IMoveDirectoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MoveDirectoryResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MoveDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.MoveDirectoryResponse; + + /** + * Decodes a MoveDirectoryResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MoveDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.MoveDirectoryResponse; + + /** + * Verifies a MoveDirectoryResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MoveDirectoryResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MoveDirectoryResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.MoveDirectoryResponse; + + /** + * Creates a plain object from a MoveDirectoryResponse message. Also converts values to other types if specified. + * @param message MoveDirectoryResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.MoveDirectoryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MoveDirectoryResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ReadFileRequest. */ + interface IReadFileRequest { + + /** ReadFileRequest workspace */ + workspace?: (string|null); + + /** ReadFileRequest path */ + path?: (string|null); + } + + /** Represents a ReadFileRequest. */ + class ReadFileRequest implements IReadFileRequest { + + /** + * Constructs a new ReadFileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IReadFileRequest); + + /** ReadFileRequest workspace. */ + public workspace: string; + + /** ReadFileRequest path. */ + public path: string; + + /** + * Creates a new ReadFileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ReadFileRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IReadFileRequest): google.cloud.dataform.v1alpha2.ReadFileRequest; + + /** + * Encodes the specified ReadFileRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ReadFileRequest.verify|verify} messages. + * @param message ReadFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IReadFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReadFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ReadFileRequest.verify|verify} messages. + * @param message ReadFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IReadFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReadFileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReadFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.ReadFileRequest; + + /** + * Decodes a ReadFileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReadFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.ReadFileRequest; + + /** + * Verifies a ReadFileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReadFileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReadFileRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.ReadFileRequest; + + /** + * Creates a plain object from a ReadFileRequest message. Also converts values to other types if specified. + * @param message ReadFileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.ReadFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReadFileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ReadFileResponse. */ + interface IReadFileResponse { + + /** ReadFileResponse fileContents */ + fileContents?: (Uint8Array|string|null); + } + + /** Represents a ReadFileResponse. */ + class ReadFileResponse implements IReadFileResponse { + + /** + * Constructs a new ReadFileResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IReadFileResponse); + + /** ReadFileResponse fileContents. */ + public fileContents: (Uint8Array|string); + + /** + * Creates a new ReadFileResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ReadFileResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IReadFileResponse): google.cloud.dataform.v1alpha2.ReadFileResponse; + + /** + * Encodes the specified ReadFileResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ReadFileResponse.verify|verify} messages. + * @param message ReadFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IReadFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReadFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ReadFileResponse.verify|verify} messages. + * @param message ReadFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IReadFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReadFileResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReadFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.ReadFileResponse; + + /** + * Decodes a ReadFileResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReadFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.ReadFileResponse; + + /** + * Verifies a ReadFileResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReadFileResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReadFileResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.ReadFileResponse; + + /** + * Creates a plain object from a ReadFileResponse message. Also converts values to other types if specified. + * @param message ReadFileResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.ReadFileResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReadFileResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RemoveFileRequest. */ + interface IRemoveFileRequest { + + /** RemoveFileRequest workspace */ + workspace?: (string|null); + + /** RemoveFileRequest path */ + path?: (string|null); + } + + /** Represents a RemoveFileRequest. */ + class RemoveFileRequest implements IRemoveFileRequest { + + /** + * Constructs a new RemoveFileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IRemoveFileRequest); + + /** RemoveFileRequest workspace. */ + public workspace: string; + + /** RemoveFileRequest path. */ + public path: string; + + /** + * Creates a new RemoveFileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RemoveFileRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IRemoveFileRequest): google.cloud.dataform.v1alpha2.RemoveFileRequest; + + /** + * Encodes the specified RemoveFileRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.RemoveFileRequest.verify|verify} messages. + * @param message RemoveFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IRemoveFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemoveFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.RemoveFileRequest.verify|verify} messages. + * @param message RemoveFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IRemoveFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemoveFileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.RemoveFileRequest; + + /** + * Decodes a RemoveFileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.RemoveFileRequest; + + /** + * Verifies a RemoveFileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RemoveFileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemoveFileRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.RemoveFileRequest; + + /** + * Creates a plain object from a RemoveFileRequest message. Also converts values to other types if specified. + * @param message RemoveFileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.RemoveFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemoveFileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MoveFileRequest. */ + interface IMoveFileRequest { + + /** MoveFileRequest workspace */ + workspace?: (string|null); + + /** MoveFileRequest path */ + path?: (string|null); + + /** MoveFileRequest newPath */ + newPath?: (string|null); + } + + /** Represents a MoveFileRequest. */ + class MoveFileRequest implements IMoveFileRequest { + + /** + * Constructs a new MoveFileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IMoveFileRequest); + + /** MoveFileRequest workspace. */ + public workspace: string; + + /** MoveFileRequest path. */ + public path: string; + + /** MoveFileRequest newPath. */ + public newPath: string; + + /** + * Creates a new MoveFileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns MoveFileRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IMoveFileRequest): google.cloud.dataform.v1alpha2.MoveFileRequest; + + /** + * Encodes the specified MoveFileRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveFileRequest.verify|verify} messages. + * @param message MoveFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IMoveFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MoveFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveFileRequest.verify|verify} messages. + * @param message MoveFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IMoveFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MoveFileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.MoveFileRequest; + + /** + * Decodes a MoveFileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.MoveFileRequest; + + /** + * Verifies a MoveFileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MoveFileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MoveFileRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.MoveFileRequest; + + /** + * Creates a plain object from a MoveFileRequest message. Also converts values to other types if specified. + * @param message MoveFileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.MoveFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MoveFileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MoveFileResponse. */ + interface IMoveFileResponse { + } + + /** Represents a MoveFileResponse. */ + class MoveFileResponse implements IMoveFileResponse { + + /** + * Constructs a new MoveFileResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IMoveFileResponse); + + /** + * Creates a new MoveFileResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns MoveFileResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IMoveFileResponse): google.cloud.dataform.v1alpha2.MoveFileResponse; + + /** + * Encodes the specified MoveFileResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveFileResponse.verify|verify} messages. + * @param message MoveFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IMoveFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MoveFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveFileResponse.verify|verify} messages. + * @param message MoveFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IMoveFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MoveFileResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MoveFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.MoveFileResponse; + + /** + * Decodes a MoveFileResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MoveFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.MoveFileResponse; + + /** + * Verifies a MoveFileResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MoveFileResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MoveFileResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.MoveFileResponse; + + /** + * Creates a plain object from a MoveFileResponse message. Also converts values to other types if specified. + * @param message MoveFileResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.MoveFileResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MoveFileResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WriteFileRequest. */ + interface IWriteFileRequest { + + /** WriteFileRequest workspace */ + workspace?: (string|null); + + /** WriteFileRequest path */ + path?: (string|null); + + /** WriteFileRequest contents */ + contents?: (Uint8Array|string|null); + } + + /** Represents a WriteFileRequest. */ + class WriteFileRequest implements IWriteFileRequest { + + /** + * Constructs a new WriteFileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IWriteFileRequest); + + /** WriteFileRequest workspace. */ + public workspace: string; + + /** WriteFileRequest path. */ + public path: string; + + /** WriteFileRequest contents. */ + public contents: (Uint8Array|string); + + /** + * Creates a new WriteFileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WriteFileRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IWriteFileRequest): google.cloud.dataform.v1alpha2.WriteFileRequest; + + /** + * Encodes the specified WriteFileRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.WriteFileRequest.verify|verify} messages. + * @param message WriteFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IWriteFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WriteFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.WriteFileRequest.verify|verify} messages. + * @param message WriteFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IWriteFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WriteFileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WriteFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.WriteFileRequest; + + /** + * Decodes a WriteFileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WriteFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.WriteFileRequest; + + /** + * Verifies a WriteFileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WriteFileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WriteFileRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.WriteFileRequest; + + /** + * Creates a plain object from a WriteFileRequest message. Also converts values to other types if specified. + * @param message WriteFileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.WriteFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WriteFileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WriteFileResponse. */ + interface IWriteFileResponse { + } + + /** Represents a WriteFileResponse. */ + class WriteFileResponse implements IWriteFileResponse { + + /** + * Constructs a new WriteFileResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IWriteFileResponse); + + /** + * Creates a new WriteFileResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns WriteFileResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IWriteFileResponse): google.cloud.dataform.v1alpha2.WriteFileResponse; + + /** + * Encodes the specified WriteFileResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.WriteFileResponse.verify|verify} messages. + * @param message WriteFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IWriteFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WriteFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.WriteFileResponse.verify|verify} messages. + * @param message WriteFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IWriteFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WriteFileResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WriteFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.WriteFileResponse; + + /** + * Decodes a WriteFileResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WriteFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.WriteFileResponse; + + /** + * Verifies a WriteFileResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WriteFileResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WriteFileResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.WriteFileResponse; + + /** + * Creates a plain object from a WriteFileResponse message. Also converts values to other types if specified. + * @param message WriteFileResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.WriteFileResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WriteFileResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an InstallNpmPackagesRequest. */ + interface IInstallNpmPackagesRequest { + + /** InstallNpmPackagesRequest workspace */ + workspace?: (string|null); + } + + /** Represents an InstallNpmPackagesRequest. */ + class InstallNpmPackagesRequest implements IInstallNpmPackagesRequest { + + /** + * Constructs a new InstallNpmPackagesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest); + + /** InstallNpmPackagesRequest workspace. */ + public workspace: string; + + /** + * Creates a new InstallNpmPackagesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns InstallNpmPackagesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest): google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest; + + /** + * Encodes the specified InstallNpmPackagesRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest.verify|verify} messages. + * @param message InstallNpmPackagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InstallNpmPackagesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest.verify|verify} messages. + * @param message InstallNpmPackagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InstallNpmPackagesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InstallNpmPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest; + + /** + * Decodes an InstallNpmPackagesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InstallNpmPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest; + + /** + * Verifies an InstallNpmPackagesRequest message. + * @param message Plain 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 InstallNpmPackagesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InstallNpmPackagesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest; + + /** + * Creates a plain object from an InstallNpmPackagesRequest message. Also converts values to other types if specified. + * @param message InstallNpmPackagesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InstallNpmPackagesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an InstallNpmPackagesResponse. */ + interface IInstallNpmPackagesResponse { + } + + /** Represents an InstallNpmPackagesResponse. */ + class InstallNpmPackagesResponse implements IInstallNpmPackagesResponse { + + /** + * Constructs a new InstallNpmPackagesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse); + + /** + * Creates a new InstallNpmPackagesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns InstallNpmPackagesResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse): google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse; + + /** + * Encodes the specified InstallNpmPackagesResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse.verify|verify} messages. + * @param message InstallNpmPackagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InstallNpmPackagesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse.verify|verify} messages. + * @param message InstallNpmPackagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InstallNpmPackagesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InstallNpmPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse; + + /** + * Decodes an InstallNpmPackagesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InstallNpmPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse; + + /** + * Verifies an InstallNpmPackagesResponse message. + * @param message Plain 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 InstallNpmPackagesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InstallNpmPackagesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse; + + /** + * Creates a plain object from an InstallNpmPackagesResponse message. Also converts values to other types if specified. + * @param message InstallNpmPackagesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InstallNpmPackagesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CompilationResult. */ + interface ICompilationResult { + + /** CompilationResult name */ + name?: (string|null); + + /** CompilationResult gitCommitish */ + gitCommitish?: (string|null); + + /** CompilationResult workspace */ + workspace?: (string|null); + + /** CompilationResult codeCompilationConfig */ + codeCompilationConfig?: (google.cloud.dataform.v1alpha2.CompilationResult.ICodeCompilationConfig|null); + + /** CompilationResult dataformCoreVersion */ + dataformCoreVersion?: (string|null); + + /** CompilationResult compilationErrors */ + compilationErrors?: (google.cloud.dataform.v1alpha2.CompilationResult.ICompilationError[]|null); + } + + /** Represents a CompilationResult. */ + class CompilationResult implements ICompilationResult { + + /** + * Constructs a new CompilationResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.ICompilationResult); + + /** CompilationResult name. */ + public name: string; + + /** CompilationResult gitCommitish. */ + public gitCommitish?: (string|null); + + /** CompilationResult workspace. */ + public workspace?: (string|null); + + /** CompilationResult codeCompilationConfig. */ + public codeCompilationConfig?: (google.cloud.dataform.v1alpha2.CompilationResult.ICodeCompilationConfig|null); + + /** CompilationResult dataformCoreVersion. */ + public dataformCoreVersion: string; + + /** CompilationResult compilationErrors. */ + public compilationErrors: google.cloud.dataform.v1alpha2.CompilationResult.ICompilationError[]; + + /** CompilationResult source. */ + public source?: ("gitCommitish"|"workspace"); + + /** + * Creates a new CompilationResult instance using the specified properties. + * @param [properties] Properties to set + * @returns CompilationResult instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.ICompilationResult): google.cloud.dataform.v1alpha2.CompilationResult; + + /** + * Encodes the specified CompilationResult message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResult.verify|verify} messages. + * @param message CompilationResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.ICompilationResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompilationResult message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResult.verify|verify} messages. + * @param message CompilationResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.ICompilationResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompilationResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompilationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CompilationResult; + + /** + * Decodes a CompilationResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompilationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CompilationResult; + + /** + * Verifies a CompilationResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompilationResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompilationResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CompilationResult; + + /** + * Creates a plain object from a CompilationResult message. Also converts values to other types if specified. + * @param message CompilationResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CompilationResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompilationResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace CompilationResult { + + /** Properties of a CodeCompilationConfig. */ + interface ICodeCompilationConfig { + + /** CodeCompilationConfig defaultDatabase */ + defaultDatabase?: (string|null); + + /** CodeCompilationConfig defaultSchema */ + defaultSchema?: (string|null); + + /** CodeCompilationConfig defaultLocation */ + defaultLocation?: (string|null); + + /** CodeCompilationConfig assertionSchema */ + assertionSchema?: (string|null); + + /** CodeCompilationConfig vars */ + vars?: ({ [k: string]: string }|null); + + /** CodeCompilationConfig databaseSuffix */ + databaseSuffix?: (string|null); + + /** CodeCompilationConfig schemaSuffix */ + schemaSuffix?: (string|null); + + /** CodeCompilationConfig tablePrefix */ + tablePrefix?: (string|null); + } + + /** Represents a CodeCompilationConfig. */ + class CodeCompilationConfig implements ICodeCompilationConfig { + + /** + * Constructs a new CodeCompilationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.CompilationResult.ICodeCompilationConfig); + + /** CodeCompilationConfig defaultDatabase. */ + public defaultDatabase: string; + + /** CodeCompilationConfig defaultSchema. */ + public defaultSchema: string; + + /** CodeCompilationConfig defaultLocation. */ + public defaultLocation: string; + + /** CodeCompilationConfig assertionSchema. */ + public assertionSchema: string; + + /** CodeCompilationConfig vars. */ + public vars: { [k: string]: string }; + + /** CodeCompilationConfig databaseSuffix. */ + public databaseSuffix: string; + + /** CodeCompilationConfig schemaSuffix. */ + public schemaSuffix: string; + + /** CodeCompilationConfig tablePrefix. */ + public tablePrefix: string; + + /** + * Creates a new CodeCompilationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns CodeCompilationConfig instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.CompilationResult.ICodeCompilationConfig): google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig; + + /** + * Encodes the specified CodeCompilationConfig message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig.verify|verify} messages. + * @param message CodeCompilationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.CompilationResult.ICodeCompilationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CodeCompilationConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig.verify|verify} messages. + * @param message CodeCompilationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.CompilationResult.ICodeCompilationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CodeCompilationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CodeCompilationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig; + + /** + * Decodes a CodeCompilationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CodeCompilationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig; + + /** + * Verifies a CodeCompilationConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CodeCompilationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CodeCompilationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig; + + /** + * Creates a plain object from a CodeCompilationConfig message. Also converts values to other types if specified. + * @param message CodeCompilationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CodeCompilationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CompilationError. */ + interface ICompilationError { + + /** CompilationError message */ + message?: (string|null); + + /** CompilationError stack */ + stack?: (string|null); + + /** CompilationError path */ + path?: (string|null); + + /** CompilationError actionTarget */ + actionTarget?: (google.cloud.dataform.v1alpha2.ITarget|null); + } + + /** Represents a CompilationError. */ + class CompilationError implements ICompilationError { + + /** + * Constructs a new CompilationError. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.CompilationResult.ICompilationError); + + /** CompilationError message. */ + public message: string; + + /** CompilationError stack. */ + public stack: string; + + /** CompilationError path. */ + public path: string; + + /** CompilationError actionTarget. */ + public actionTarget?: (google.cloud.dataform.v1alpha2.ITarget|null); + + /** + * Creates a new CompilationError instance using the specified properties. + * @param [properties] Properties to set + * @returns CompilationError instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.CompilationResult.ICompilationError): google.cloud.dataform.v1alpha2.CompilationResult.CompilationError; + + /** + * Encodes the specified CompilationError message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResult.CompilationError.verify|verify} messages. + * @param message CompilationError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.CompilationResult.ICompilationError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompilationError message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResult.CompilationError.verify|verify} messages. + * @param message CompilationError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.CompilationResult.ICompilationError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompilationError message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompilationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CompilationResult.CompilationError; + + /** + * Decodes a CompilationError message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompilationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CompilationResult.CompilationError; + + /** + * Verifies a CompilationError message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompilationError message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompilationError + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CompilationResult.CompilationError; + + /** + * Creates a plain object from a CompilationError message. Also converts values to other types if specified. + * @param message CompilationError + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CompilationResult.CompilationError, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompilationError to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a ListCompilationResultsRequest. */ + interface IListCompilationResultsRequest { + + /** ListCompilationResultsRequest parent */ + parent?: (string|null); + + /** ListCompilationResultsRequest pageSize */ + pageSize?: (number|null); + + /** ListCompilationResultsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListCompilationResultsRequest. */ + class ListCompilationResultsRequest implements IListCompilationResultsRequest { + + /** + * Constructs a new ListCompilationResultsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IListCompilationResultsRequest); + + /** ListCompilationResultsRequest parent. */ + public parent: string; + + /** ListCompilationResultsRequest pageSize. */ + public pageSize: number; + + /** ListCompilationResultsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListCompilationResultsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCompilationResultsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IListCompilationResultsRequest): google.cloud.dataform.v1alpha2.ListCompilationResultsRequest; + + /** + * Encodes the specified ListCompilationResultsRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListCompilationResultsRequest.verify|verify} messages. + * @param message ListCompilationResultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IListCompilationResultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCompilationResultsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListCompilationResultsRequest.verify|verify} messages. + * @param message ListCompilationResultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IListCompilationResultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCompilationResultsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCompilationResultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.ListCompilationResultsRequest; + + /** + * Decodes a ListCompilationResultsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCompilationResultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.ListCompilationResultsRequest; + + /** + * Verifies a ListCompilationResultsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCompilationResultsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCompilationResultsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.ListCompilationResultsRequest; + + /** + * Creates a plain object from a ListCompilationResultsRequest message. Also converts values to other types if specified. + * @param message ListCompilationResultsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.ListCompilationResultsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCompilationResultsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListCompilationResultsResponse. */ + interface IListCompilationResultsResponse { + + /** ListCompilationResultsResponse compilationResults */ + compilationResults?: (google.cloud.dataform.v1alpha2.ICompilationResult[]|null); + + /** ListCompilationResultsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListCompilationResultsResponse. */ + class ListCompilationResultsResponse implements IListCompilationResultsResponse { + + /** + * Constructs a new ListCompilationResultsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IListCompilationResultsResponse); + + /** ListCompilationResultsResponse compilationResults. */ + public compilationResults: google.cloud.dataform.v1alpha2.ICompilationResult[]; + + /** ListCompilationResultsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListCompilationResultsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCompilationResultsResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IListCompilationResultsResponse): google.cloud.dataform.v1alpha2.ListCompilationResultsResponse; + + /** + * Encodes the specified ListCompilationResultsResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListCompilationResultsResponse.verify|verify} messages. + * @param message ListCompilationResultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IListCompilationResultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCompilationResultsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListCompilationResultsResponse.verify|verify} messages. + * @param message ListCompilationResultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IListCompilationResultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCompilationResultsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCompilationResultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.ListCompilationResultsResponse; + + /** + * Decodes a ListCompilationResultsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCompilationResultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.ListCompilationResultsResponse; + + /** + * Verifies a ListCompilationResultsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCompilationResultsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCompilationResultsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.ListCompilationResultsResponse; + + /** + * Creates a plain object from a ListCompilationResultsResponse message. Also converts values to other types if specified. + * @param message ListCompilationResultsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.ListCompilationResultsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCompilationResultsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetCompilationResultRequest. */ + interface IGetCompilationResultRequest { + + /** GetCompilationResultRequest name */ + name?: (string|null); + } + + /** Represents a GetCompilationResultRequest. */ + class GetCompilationResultRequest implements IGetCompilationResultRequest { + + /** + * Constructs a new GetCompilationResultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IGetCompilationResultRequest); + + /** GetCompilationResultRequest name. */ + public name: string; + + /** + * Creates a new GetCompilationResultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetCompilationResultRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IGetCompilationResultRequest): google.cloud.dataform.v1alpha2.GetCompilationResultRequest; + + /** + * Encodes the specified GetCompilationResultRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetCompilationResultRequest.verify|verify} messages. + * @param message GetCompilationResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IGetCompilationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetCompilationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetCompilationResultRequest.verify|verify} messages. + * @param message GetCompilationResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IGetCompilationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetCompilationResultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.GetCompilationResultRequest; + + /** + * Decodes a GetCompilationResultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.GetCompilationResultRequest; + + /** + * Verifies a GetCompilationResultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetCompilationResultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetCompilationResultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.GetCompilationResultRequest; + + /** + * Creates a plain object from a GetCompilationResultRequest message. Also converts values to other types if specified. + * @param message GetCompilationResultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.GetCompilationResultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetCompilationResultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateCompilationResultRequest. */ + interface ICreateCompilationResultRequest { + + /** CreateCompilationResultRequest parent */ + parent?: (string|null); + + /** CreateCompilationResultRequest compilationResult */ + compilationResult?: (google.cloud.dataform.v1alpha2.ICompilationResult|null); + } + + /** Represents a CreateCompilationResultRequest. */ + class CreateCompilationResultRequest implements ICreateCompilationResultRequest { + + /** + * Constructs a new CreateCompilationResultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest); + + /** CreateCompilationResultRequest parent. */ + public parent: string; + + /** CreateCompilationResultRequest compilationResult. */ + public compilationResult?: (google.cloud.dataform.v1alpha2.ICompilationResult|null); + + /** + * Creates a new CreateCompilationResultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateCompilationResultRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest): google.cloud.dataform.v1alpha2.CreateCompilationResultRequest; + + /** + * Encodes the specified CreateCompilationResultRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateCompilationResultRequest.verify|verify} messages. + * @param message CreateCompilationResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateCompilationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateCompilationResultRequest.verify|verify} messages. + * @param message CreateCompilationResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateCompilationResultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CreateCompilationResultRequest; + + /** + * Decodes a CreateCompilationResultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CreateCompilationResultRequest; + + /** + * Verifies a CreateCompilationResultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateCompilationResultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateCompilationResultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CreateCompilationResultRequest; + + /** + * Creates a plain object from a CreateCompilationResultRequest message. Also converts values to other types if specified. + * @param message CreateCompilationResultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CreateCompilationResultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateCompilationResultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Target. */ + interface ITarget { + + /** Target database */ + database?: (string|null); + + /** Target schema */ + schema?: (string|null); + + /** Target name */ + name?: (string|null); + } + + /** Represents a Target. */ + class Target implements ITarget { + + /** + * Constructs a new Target. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.ITarget); + + /** Target database. */ + public database: string; + + /** Target schema. */ + public schema: string; + + /** Target name. */ + public name: string; + + /** + * Creates a new Target instance using the specified properties. + * @param [properties] Properties to set + * @returns Target instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.ITarget): google.cloud.dataform.v1alpha2.Target; + + /** + * Encodes the specified Target message. Does not implicitly {@link google.cloud.dataform.v1alpha2.Target.verify|verify} messages. + * @param message Target message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.ITarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Target message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.Target.verify|verify} messages. + * @param message Target message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.ITarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Target message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Target + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.Target; + + /** + * Decodes a Target message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Target + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.Target; + + /** + * Verifies a Target message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Target message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Target + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.Target; + + /** + * Creates a plain object from a Target message. Also converts values to other types if specified. + * @param message Target + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.Target, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Target to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RelationDescriptor. */ + interface IRelationDescriptor { + + /** RelationDescriptor description */ + description?: (string|null); + + /** RelationDescriptor columns */ + columns?: (google.cloud.dataform.v1alpha2.RelationDescriptor.IColumnDescriptor[]|null); + + /** RelationDescriptor bigqueryLabels */ + bigqueryLabels?: ({ [k: string]: string }|null); + } + + /** Represents a RelationDescriptor. */ + class RelationDescriptor implements IRelationDescriptor { + + /** + * Constructs a new RelationDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IRelationDescriptor); + + /** RelationDescriptor description. */ + public description: string; + + /** RelationDescriptor columns. */ + public columns: google.cloud.dataform.v1alpha2.RelationDescriptor.IColumnDescriptor[]; + + /** RelationDescriptor bigqueryLabels. */ + public bigqueryLabels: { [k: string]: string }; + + /** + * Creates a new RelationDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns RelationDescriptor instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IRelationDescriptor): google.cloud.dataform.v1alpha2.RelationDescriptor; + + /** + * Encodes the specified RelationDescriptor message. Does not implicitly {@link google.cloud.dataform.v1alpha2.RelationDescriptor.verify|verify} messages. + * @param message RelationDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IRelationDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RelationDescriptor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.RelationDescriptor.verify|verify} messages. + * @param message RelationDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IRelationDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RelationDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RelationDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.RelationDescriptor; + + /** + * Decodes a RelationDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RelationDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.RelationDescriptor; + + /** + * Verifies a RelationDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RelationDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RelationDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.RelationDescriptor; + + /** + * Creates a plain object from a RelationDescriptor message. Also converts values to other types if specified. + * @param message RelationDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.RelationDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RelationDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace RelationDescriptor { + + /** Properties of a ColumnDescriptor. */ + interface IColumnDescriptor { + + /** ColumnDescriptor path */ + path?: (string[]|null); + + /** ColumnDescriptor description */ + description?: (string|null); + + /** ColumnDescriptor bigqueryPolicyTags */ + bigqueryPolicyTags?: (string[]|null); + } + + /** Represents a ColumnDescriptor. */ + class ColumnDescriptor implements IColumnDescriptor { + + /** + * Constructs a new ColumnDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.RelationDescriptor.IColumnDescriptor); + + /** ColumnDescriptor path. */ + public path: string[]; + + /** ColumnDescriptor description. */ + public description: string; + + /** ColumnDescriptor bigqueryPolicyTags. */ + public bigqueryPolicyTags: string[]; + + /** + * Creates a new ColumnDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ColumnDescriptor instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.RelationDescriptor.IColumnDescriptor): google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor; + + /** + * Encodes the specified ColumnDescriptor message. Does not implicitly {@link google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor.verify|verify} messages. + * @param message ColumnDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.RelationDescriptor.IColumnDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ColumnDescriptor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor.verify|verify} messages. + * @param message ColumnDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.RelationDescriptor.IColumnDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ColumnDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ColumnDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor; + + /** + * Decodes a ColumnDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ColumnDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor; + + /** + * Verifies a ColumnDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ColumnDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ColumnDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor; + + /** + * Creates a plain object from a ColumnDescriptor message. Also converts values to other types if specified. + * @param message ColumnDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ColumnDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a CompilationResultAction. */ + interface ICompilationResultAction { + + /** CompilationResultAction target */ + target?: (google.cloud.dataform.v1alpha2.ITarget|null); + + /** CompilationResultAction canonicalTarget */ + canonicalTarget?: (google.cloud.dataform.v1alpha2.ITarget|null); + + /** CompilationResultAction filePath */ + filePath?: (string|null); + + /** CompilationResultAction relation */ + relation?: (google.cloud.dataform.v1alpha2.CompilationResultAction.IRelation|null); + + /** CompilationResultAction operations */ + operations?: (google.cloud.dataform.v1alpha2.CompilationResultAction.IOperations|null); + + /** CompilationResultAction assertion */ + assertion?: (google.cloud.dataform.v1alpha2.CompilationResultAction.IAssertion|null); + + /** CompilationResultAction declaration */ + declaration?: (google.cloud.dataform.v1alpha2.CompilationResultAction.IDeclaration|null); + } + + /** Represents a CompilationResultAction. */ + class CompilationResultAction implements ICompilationResultAction { + + /** + * Constructs a new CompilationResultAction. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.ICompilationResultAction); + + /** CompilationResultAction target. */ + public target?: (google.cloud.dataform.v1alpha2.ITarget|null); + + /** CompilationResultAction canonicalTarget. */ + public canonicalTarget?: (google.cloud.dataform.v1alpha2.ITarget|null); + + /** CompilationResultAction filePath. */ + public filePath: string; + + /** CompilationResultAction relation. */ + public relation?: (google.cloud.dataform.v1alpha2.CompilationResultAction.IRelation|null); + + /** CompilationResultAction operations. */ + public operations?: (google.cloud.dataform.v1alpha2.CompilationResultAction.IOperations|null); + + /** CompilationResultAction assertion. */ + public assertion?: (google.cloud.dataform.v1alpha2.CompilationResultAction.IAssertion|null); + + /** CompilationResultAction declaration. */ + public declaration?: (google.cloud.dataform.v1alpha2.CompilationResultAction.IDeclaration|null); + + /** CompilationResultAction compiledObject. */ + public compiledObject?: ("relation"|"operations"|"assertion"|"declaration"); + + /** + * Creates a new CompilationResultAction instance using the specified properties. + * @param [properties] Properties to set + * @returns CompilationResultAction instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.ICompilationResultAction): google.cloud.dataform.v1alpha2.CompilationResultAction; + + /** + * Encodes the specified CompilationResultAction message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.verify|verify} messages. + * @param message CompilationResultAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.ICompilationResultAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompilationResultAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.verify|verify} messages. + * @param message CompilationResultAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.ICompilationResultAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompilationResultAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompilationResultAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CompilationResultAction; + + /** + * Decodes a CompilationResultAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompilationResultAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CompilationResultAction; + + /** + * Verifies a CompilationResultAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompilationResultAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompilationResultAction + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CompilationResultAction; + + /** + * Creates a plain object from a CompilationResultAction message. Also converts values to other types if specified. + * @param message CompilationResultAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CompilationResultAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompilationResultAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace CompilationResultAction { + + /** Properties of a Relation. */ + interface IRelation { + + /** Relation dependencyTargets */ + dependencyTargets?: (google.cloud.dataform.v1alpha2.ITarget[]|null); + + /** Relation disabled */ + disabled?: (boolean|null); + + /** Relation tags */ + tags?: (string[]|null); + + /** Relation relationDescriptor */ + relationDescriptor?: (google.cloud.dataform.v1alpha2.IRelationDescriptor|null); + + /** Relation relationType */ + relationType?: (google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.RelationType|keyof typeof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.RelationType|null); + + /** Relation selectQuery */ + selectQuery?: (string|null); + + /** Relation preOperations */ + preOperations?: (string[]|null); + + /** Relation postOperations */ + postOperations?: (string[]|null); + + /** Relation incrementalTableConfig */ + incrementalTableConfig?: (google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IIncrementalTableConfig|null); + + /** Relation partitionExpression */ + partitionExpression?: (string|null); + + /** Relation clusterExpressions */ + clusterExpressions?: (string[]|null); + + /** Relation partitionExpirationDays */ + partitionExpirationDays?: (number|null); + + /** Relation requirePartitionFilter */ + requirePartitionFilter?: (boolean|null); + + /** Relation additionalOptions */ + additionalOptions?: ({ [k: string]: string }|null); + } + + /** Represents a Relation. */ + class Relation implements IRelation { + + /** + * Constructs a new Relation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.CompilationResultAction.IRelation); + + /** Relation dependencyTargets. */ + public dependencyTargets: google.cloud.dataform.v1alpha2.ITarget[]; + + /** Relation disabled. */ + public disabled: boolean; + + /** Relation tags. */ + public tags: string[]; + + /** Relation relationDescriptor. */ + public relationDescriptor?: (google.cloud.dataform.v1alpha2.IRelationDescriptor|null); + + /** Relation relationType. */ + public relationType: (google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.RelationType|keyof typeof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.RelationType); + + /** Relation selectQuery. */ + public selectQuery: string; + + /** Relation preOperations. */ + public preOperations: string[]; + + /** Relation postOperations. */ + public postOperations: string[]; + + /** Relation incrementalTableConfig. */ + public incrementalTableConfig?: (google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IIncrementalTableConfig|null); + + /** Relation partitionExpression. */ + public partitionExpression: string; + + /** Relation clusterExpressions. */ + public clusterExpressions: string[]; + + /** Relation partitionExpirationDays. */ + public partitionExpirationDays: number; + + /** Relation requirePartitionFilter. */ + public requirePartitionFilter: boolean; + + /** Relation additionalOptions. */ + public additionalOptions: { [k: string]: string }; + + /** + * Creates a new Relation instance using the specified properties. + * @param [properties] Properties to set + * @returns Relation instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.CompilationResultAction.IRelation): google.cloud.dataform.v1alpha2.CompilationResultAction.Relation; + + /** + * Encodes the specified Relation message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.verify|verify} messages. + * @param message Relation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.CompilationResultAction.IRelation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Relation message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.verify|verify} messages. + * @param message Relation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.CompilationResultAction.IRelation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Relation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Relation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CompilationResultAction.Relation; + + /** + * Decodes a Relation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Relation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CompilationResultAction.Relation; + + /** + * Verifies a Relation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Relation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Relation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CompilationResultAction.Relation; + + /** + * Creates a plain object from a Relation message. Also converts values to other types if specified. + * @param message Relation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CompilationResultAction.Relation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Relation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Relation { + + /** RelationType enum. */ + enum RelationType { + RELATION_TYPE_UNSPECIFIED = 0, + TABLE = 1, + VIEW = 2, + INCREMENTAL_TABLE = 3, + MATERIALIZED_VIEW = 4 + } + + /** Properties of an IncrementalTableConfig. */ + interface IIncrementalTableConfig { + + /** IncrementalTableConfig incrementalSelectQuery */ + incrementalSelectQuery?: (string|null); + + /** IncrementalTableConfig refreshDisabled */ + refreshDisabled?: (boolean|null); + + /** IncrementalTableConfig uniqueKeyParts */ + uniqueKeyParts?: (string[]|null); + + /** IncrementalTableConfig updatePartitionFilter */ + updatePartitionFilter?: (string|null); + + /** IncrementalTableConfig incrementalPreOperations */ + incrementalPreOperations?: (string[]|null); + + /** IncrementalTableConfig incrementalPostOperations */ + incrementalPostOperations?: (string[]|null); + } + + /** Represents an IncrementalTableConfig. */ + class IncrementalTableConfig implements IIncrementalTableConfig { + + /** + * Constructs a new IncrementalTableConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IIncrementalTableConfig); + + /** IncrementalTableConfig incrementalSelectQuery. */ + public incrementalSelectQuery: string; + + /** IncrementalTableConfig refreshDisabled. */ + public refreshDisabled: boolean; + + /** IncrementalTableConfig uniqueKeyParts. */ + public uniqueKeyParts: string[]; + + /** IncrementalTableConfig updatePartitionFilter. */ + public updatePartitionFilter: string; + + /** IncrementalTableConfig incrementalPreOperations. */ + public incrementalPreOperations: string[]; + + /** IncrementalTableConfig incrementalPostOperations. */ + public incrementalPostOperations: string[]; + + /** + * Creates a new IncrementalTableConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns IncrementalTableConfig instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IIncrementalTableConfig): google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig; + + /** + * Encodes the specified IncrementalTableConfig message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig.verify|verify} messages. + * @param message IncrementalTableConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IIncrementalTableConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IncrementalTableConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig.verify|verify} messages. + * @param message IncrementalTableConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IIncrementalTableConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IncrementalTableConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IncrementalTableConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig; + + /** + * Decodes an IncrementalTableConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IncrementalTableConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig; + + /** + * Verifies an IncrementalTableConfig message. + * @param message Plain 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 IncrementalTableConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IncrementalTableConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig; + + /** + * Creates a plain object from an IncrementalTableConfig message. Also converts values to other types if specified. + * @param message IncrementalTableConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IncrementalTableConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an Operations. */ + interface IOperations { + + /** Operations dependencyTargets */ + dependencyTargets?: (google.cloud.dataform.v1alpha2.ITarget[]|null); + + /** Operations disabled */ + disabled?: (boolean|null); + + /** Operations tags */ + tags?: (string[]|null); + + /** Operations relationDescriptor */ + relationDescriptor?: (google.cloud.dataform.v1alpha2.IRelationDescriptor|null); + + /** Operations queries */ + queries?: (string[]|null); + + /** Operations hasOutput */ + hasOutput?: (boolean|null); + } + + /** Represents an Operations. */ + class Operations implements IOperations { + + /** + * Constructs a new Operations. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.CompilationResultAction.IOperations); + + /** Operations dependencyTargets. */ + public dependencyTargets: google.cloud.dataform.v1alpha2.ITarget[]; + + /** Operations disabled. */ + public disabled: boolean; + + /** Operations tags. */ + public tags: string[]; + + /** Operations relationDescriptor. */ + public relationDescriptor?: (google.cloud.dataform.v1alpha2.IRelationDescriptor|null); + + /** Operations queries. */ + public queries: string[]; + + /** Operations hasOutput. */ + public hasOutput: boolean; + + /** + * Creates a new Operations instance using the specified properties. + * @param [properties] Properties to set + * @returns Operations instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.CompilationResultAction.IOperations): google.cloud.dataform.v1alpha2.CompilationResultAction.Operations; + + /** + * Encodes the specified Operations message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.verify|verify} messages. + * @param message Operations message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.CompilationResultAction.IOperations, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Operations message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.verify|verify} messages. + * @param message Operations message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.CompilationResultAction.IOperations, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Operations message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CompilationResultAction.Operations; + + /** + * Decodes an Operations message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CompilationResultAction.Operations; + + /** + * Verifies an Operations message. + * @param message Plain 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 Operations message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operations + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CompilationResultAction.Operations; + + /** + * Creates a plain object from an Operations message. Also converts values to other types if specified. + * @param message Operations + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CompilationResultAction.Operations, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Operations to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Assertion. */ + interface IAssertion { + + /** Assertion dependencyTargets */ + dependencyTargets?: (google.cloud.dataform.v1alpha2.ITarget[]|null); + + /** Assertion parentAction */ + parentAction?: (google.cloud.dataform.v1alpha2.ITarget|null); + + /** Assertion disabled */ + disabled?: (boolean|null); + + /** Assertion tags */ + tags?: (string[]|null); + + /** Assertion selectQuery */ + selectQuery?: (string|null); + + /** Assertion relationDescriptor */ + relationDescriptor?: (google.cloud.dataform.v1alpha2.IRelationDescriptor|null); + } + + /** Represents an Assertion. */ + class Assertion implements IAssertion { + + /** + * Constructs a new Assertion. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.CompilationResultAction.IAssertion); + + /** Assertion dependencyTargets. */ + public dependencyTargets: google.cloud.dataform.v1alpha2.ITarget[]; + + /** Assertion parentAction. */ + public parentAction?: (google.cloud.dataform.v1alpha2.ITarget|null); + + /** Assertion disabled. */ + public disabled: boolean; + + /** Assertion tags. */ + public tags: string[]; + + /** Assertion selectQuery. */ + public selectQuery: string; + + /** Assertion relationDescriptor. */ + public relationDescriptor?: (google.cloud.dataform.v1alpha2.IRelationDescriptor|null); + + /** + * Creates a new Assertion instance using the specified properties. + * @param [properties] Properties to set + * @returns Assertion instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.CompilationResultAction.IAssertion): google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion; + + /** + * Encodes the specified Assertion message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.verify|verify} messages. + * @param message Assertion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.CompilationResultAction.IAssertion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Assertion message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.verify|verify} messages. + * @param message Assertion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.CompilationResultAction.IAssertion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Assertion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Assertion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion; + + /** + * Decodes an Assertion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Assertion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion; + + /** + * Verifies an Assertion message. + * @param message Plain 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 Assertion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Assertion + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion; + + /** + * Creates a plain object from an Assertion message. Also converts values to other types if specified. + * @param message Assertion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Assertion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration relationDescriptor */ + relationDescriptor?: (google.cloud.dataform.v1alpha2.IRelationDescriptor|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.CompilationResultAction.IDeclaration); + + /** Declaration relationDescriptor. */ + public relationDescriptor?: (google.cloud.dataform.v1alpha2.IRelationDescriptor|null); + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.CompilationResultAction.IDeclaration): google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.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.cloud.dataform.v1alpha2.CompilationResultAction.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.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.cloud.dataform.v1alpha2.CompilationResultAction.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.cloud.dataform.v1alpha2.CompilationResultAction.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.cloud.dataform.v1alpha2.CompilationResultAction.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.cloud.dataform.v1alpha2.CompilationResultAction.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.cloud.dataform.v1alpha2.CompilationResultAction.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a QueryCompilationResultActionsRequest. */ + interface IQueryCompilationResultActionsRequest { + + /** QueryCompilationResultActionsRequest name */ + name?: (string|null); + + /** QueryCompilationResultActionsRequest pageSize */ + pageSize?: (number|null); + + /** QueryCompilationResultActionsRequest pageToken */ + pageToken?: (string|null); + + /** QueryCompilationResultActionsRequest filter */ + filter?: (string|null); + } + + /** Represents a QueryCompilationResultActionsRequest. */ + class QueryCompilationResultActionsRequest implements IQueryCompilationResultActionsRequest { + + /** + * Constructs a new QueryCompilationResultActionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest); + + /** QueryCompilationResultActionsRequest name. */ + public name: string; + + /** QueryCompilationResultActionsRequest pageSize. */ + public pageSize: number; + + /** QueryCompilationResultActionsRequest pageToken. */ + public pageToken: string; + + /** QueryCompilationResultActionsRequest filter. */ + public filter: string; + + /** + * Creates a new QueryCompilationResultActionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryCompilationResultActionsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest): google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest; + + /** + * Encodes the specified QueryCompilationResultActionsRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest.verify|verify} messages. + * @param message QueryCompilationResultActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryCompilationResultActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest.verify|verify} messages. + * @param message QueryCompilationResultActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryCompilationResultActionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryCompilationResultActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest; + + /** + * Decodes a QueryCompilationResultActionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryCompilationResultActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest; + + /** + * Verifies a QueryCompilationResultActionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryCompilationResultActionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryCompilationResultActionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest; + + /** + * Creates a plain object from a QueryCompilationResultActionsRequest message. Also converts values to other types if specified. + * @param message QueryCompilationResultActionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryCompilationResultActionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QueryCompilationResultActionsResponse. */ + interface IQueryCompilationResultActionsResponse { + + /** QueryCompilationResultActionsResponse compilationResultActions */ + compilationResultActions?: (google.cloud.dataform.v1alpha2.ICompilationResultAction[]|null); + + /** QueryCompilationResultActionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a QueryCompilationResultActionsResponse. */ + class QueryCompilationResultActionsResponse implements IQueryCompilationResultActionsResponse { + + /** + * Constructs a new QueryCompilationResultActionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsResponse); + + /** QueryCompilationResultActionsResponse compilationResultActions. */ + public compilationResultActions: google.cloud.dataform.v1alpha2.ICompilationResultAction[]; + + /** QueryCompilationResultActionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new QueryCompilationResultActionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryCompilationResultActionsResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsResponse): google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse; + + /** + * Encodes the specified QueryCompilationResultActionsResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse.verify|verify} messages. + * @param message QueryCompilationResultActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryCompilationResultActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse.verify|verify} messages. + * @param message QueryCompilationResultActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryCompilationResultActionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryCompilationResultActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse; + + /** + * Decodes a QueryCompilationResultActionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryCompilationResultActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse; + + /** + * Verifies a QueryCompilationResultActionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryCompilationResultActionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryCompilationResultActionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse; + + /** + * Creates a plain object from a QueryCompilationResultActionsResponse message. Also converts values to other types if specified. + * @param message QueryCompilationResultActionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryCompilationResultActionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WorkflowInvocation. */ + interface IWorkflowInvocation { + + /** WorkflowInvocation name */ + name?: (string|null); + + /** WorkflowInvocation compilationResult */ + compilationResult?: (string|null); + + /** WorkflowInvocation invocationConfig */ + invocationConfig?: (google.cloud.dataform.v1alpha2.WorkflowInvocation.IInvocationConfig|null); + + /** WorkflowInvocation state */ + state?: (google.cloud.dataform.v1alpha2.WorkflowInvocation.State|keyof typeof google.cloud.dataform.v1alpha2.WorkflowInvocation.State|null); + + /** WorkflowInvocation invocationTiming */ + invocationTiming?: (google.type.IInterval|null); + } + + /** Represents a WorkflowInvocation. */ + class WorkflowInvocation implements IWorkflowInvocation { + + /** + * Constructs a new WorkflowInvocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IWorkflowInvocation); + + /** WorkflowInvocation name. */ + public name: string; + + /** WorkflowInvocation compilationResult. */ + public compilationResult: string; + + /** WorkflowInvocation invocationConfig. */ + public invocationConfig?: (google.cloud.dataform.v1alpha2.WorkflowInvocation.IInvocationConfig|null); + + /** WorkflowInvocation state. */ + public state: (google.cloud.dataform.v1alpha2.WorkflowInvocation.State|keyof typeof google.cloud.dataform.v1alpha2.WorkflowInvocation.State); + + /** WorkflowInvocation invocationTiming. */ + public invocationTiming?: (google.type.IInterval|null); + + /** + * Creates a new WorkflowInvocation instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkflowInvocation instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IWorkflowInvocation): google.cloud.dataform.v1alpha2.WorkflowInvocation; + + /** + * Encodes the specified WorkflowInvocation message. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocation.verify|verify} messages. + * @param message WorkflowInvocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IWorkflowInvocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkflowInvocation message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocation.verify|verify} messages. + * @param message WorkflowInvocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IWorkflowInvocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkflowInvocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkflowInvocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.WorkflowInvocation; + + /** + * Decodes a WorkflowInvocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkflowInvocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.WorkflowInvocation; + + /** + * Verifies a WorkflowInvocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkflowInvocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkflowInvocation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.WorkflowInvocation; + + /** + * Creates a plain object from a WorkflowInvocation message. Also converts values to other types if specified. + * @param message WorkflowInvocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.WorkflowInvocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkflowInvocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace WorkflowInvocation { + + /** Properties of an InvocationConfig. */ + interface IInvocationConfig { + + /** InvocationConfig includedTargets */ + includedTargets?: (google.cloud.dataform.v1alpha2.ITarget[]|null); + + /** InvocationConfig includedTags */ + includedTags?: (string[]|null); + + /** InvocationConfig transitiveDependenciesIncluded */ + transitiveDependenciesIncluded?: (boolean|null); + + /** InvocationConfig transitiveDependentsIncluded */ + transitiveDependentsIncluded?: (boolean|null); + + /** InvocationConfig fullyRefreshIncrementalTablesEnabled */ + fullyRefreshIncrementalTablesEnabled?: (boolean|null); + } + + /** Represents an InvocationConfig. */ + class InvocationConfig implements IInvocationConfig { + + /** + * Constructs a new InvocationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.WorkflowInvocation.IInvocationConfig); + + /** InvocationConfig includedTargets. */ + public includedTargets: google.cloud.dataform.v1alpha2.ITarget[]; + + /** InvocationConfig includedTags. */ + public includedTags: string[]; + + /** InvocationConfig transitiveDependenciesIncluded. */ + public transitiveDependenciesIncluded: boolean; + + /** InvocationConfig transitiveDependentsIncluded. */ + public transitiveDependentsIncluded: boolean; + + /** InvocationConfig fullyRefreshIncrementalTablesEnabled. */ + public fullyRefreshIncrementalTablesEnabled: boolean; + + /** + * Creates a new InvocationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns InvocationConfig instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.WorkflowInvocation.IInvocationConfig): google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig; + + /** + * Encodes the specified InvocationConfig message. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig.verify|verify} messages. + * @param message InvocationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.WorkflowInvocation.IInvocationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InvocationConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig.verify|verify} messages. + * @param message InvocationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.WorkflowInvocation.IInvocationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InvocationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InvocationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig; + + /** + * Decodes an InvocationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InvocationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig; + + /** + * Verifies an InvocationConfig message. + * @param message Plain 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 InvocationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InvocationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig; + + /** + * Creates a plain object from an InvocationConfig message. Also converts values to other types if specified. + * @param message InvocationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InvocationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + RUNNING = 1, + SUCCEEDED = 2, + CANCELLED = 3, + FAILED = 4, + CANCELING = 5 + } + } + + /** Properties of a ListWorkflowInvocationsRequest. */ + interface IListWorkflowInvocationsRequest { + + /** ListWorkflowInvocationsRequest parent */ + parent?: (string|null); + + /** ListWorkflowInvocationsRequest pageSize */ + pageSize?: (number|null); + + /** ListWorkflowInvocationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListWorkflowInvocationsRequest. */ + class ListWorkflowInvocationsRequest implements IListWorkflowInvocationsRequest { + + /** + * Constructs a new ListWorkflowInvocationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest); + + /** ListWorkflowInvocationsRequest parent. */ + public parent: string; + + /** ListWorkflowInvocationsRequest pageSize. */ + public pageSize: number; + + /** ListWorkflowInvocationsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListWorkflowInvocationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListWorkflowInvocationsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest): google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest; + + /** + * Encodes the specified ListWorkflowInvocationsRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest.verify|verify} messages. + * @param message ListWorkflowInvocationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListWorkflowInvocationsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest.verify|verify} messages. + * @param message ListWorkflowInvocationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListWorkflowInvocationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListWorkflowInvocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest; + + /** + * Decodes a ListWorkflowInvocationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListWorkflowInvocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest; + + /** + * Verifies a ListWorkflowInvocationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListWorkflowInvocationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListWorkflowInvocationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest; + + /** + * Creates a plain object from a ListWorkflowInvocationsRequest message. Also converts values to other types if specified. + * @param message ListWorkflowInvocationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListWorkflowInvocationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListWorkflowInvocationsResponse. */ + interface IListWorkflowInvocationsResponse { + + /** ListWorkflowInvocationsResponse workflowInvocations */ + workflowInvocations?: (google.cloud.dataform.v1alpha2.IWorkflowInvocation[]|null); + + /** ListWorkflowInvocationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListWorkflowInvocationsResponse. */ + class ListWorkflowInvocationsResponse implements IListWorkflowInvocationsResponse { + + /** + * Constructs a new ListWorkflowInvocationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IListWorkflowInvocationsResponse); + + /** ListWorkflowInvocationsResponse workflowInvocations. */ + public workflowInvocations: google.cloud.dataform.v1alpha2.IWorkflowInvocation[]; + + /** ListWorkflowInvocationsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListWorkflowInvocationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListWorkflowInvocationsResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IListWorkflowInvocationsResponse): google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse; + + /** + * Encodes the specified ListWorkflowInvocationsResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse.verify|verify} messages. + * @param message ListWorkflowInvocationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IListWorkflowInvocationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListWorkflowInvocationsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse.verify|verify} messages. + * @param message ListWorkflowInvocationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IListWorkflowInvocationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListWorkflowInvocationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListWorkflowInvocationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse; + + /** + * Decodes a ListWorkflowInvocationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListWorkflowInvocationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse; + + /** + * Verifies a ListWorkflowInvocationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListWorkflowInvocationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListWorkflowInvocationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse; + + /** + * Creates a plain object from a ListWorkflowInvocationsResponse message. Also converts values to other types if specified. + * @param message ListWorkflowInvocationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListWorkflowInvocationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetWorkflowInvocationRequest. */ + interface IGetWorkflowInvocationRequest { + + /** GetWorkflowInvocationRequest name */ + name?: (string|null); + } + + /** Represents a GetWorkflowInvocationRequest. */ + class GetWorkflowInvocationRequest implements IGetWorkflowInvocationRequest { + + /** + * Constructs a new GetWorkflowInvocationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest); + + /** GetWorkflowInvocationRequest name. */ + public name: string; + + /** + * Creates a new GetWorkflowInvocationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetWorkflowInvocationRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest): google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest; + + /** + * Encodes the specified GetWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest.verify|verify} messages. + * @param message GetWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest.verify|verify} messages. + * @param message GetWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetWorkflowInvocationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest; + + /** + * Decodes a GetWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest; + + /** + * Verifies a GetWorkflowInvocationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetWorkflowInvocationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest; + + /** + * Creates a plain object from a GetWorkflowInvocationRequest message. Also converts values to other types if specified. + * @param message GetWorkflowInvocationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetWorkflowInvocationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateWorkflowInvocationRequest. */ + interface ICreateWorkflowInvocationRequest { + + /** CreateWorkflowInvocationRequest parent */ + parent?: (string|null); + + /** CreateWorkflowInvocationRequest workflowInvocation */ + workflowInvocation?: (google.cloud.dataform.v1alpha2.IWorkflowInvocation|null); + } + + /** Represents a CreateWorkflowInvocationRequest. */ + class CreateWorkflowInvocationRequest implements ICreateWorkflowInvocationRequest { + + /** + * Constructs a new CreateWorkflowInvocationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest); + + /** CreateWorkflowInvocationRequest parent. */ + public parent: string; + + /** CreateWorkflowInvocationRequest workflowInvocation. */ + public workflowInvocation?: (google.cloud.dataform.v1alpha2.IWorkflowInvocation|null); + + /** + * Creates a new CreateWorkflowInvocationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateWorkflowInvocationRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest): google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest; + + /** + * Encodes the specified CreateWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest.verify|verify} messages. + * @param message CreateWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest.verify|verify} messages. + * @param message CreateWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateWorkflowInvocationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest; + + /** + * Decodes a CreateWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest; + + /** + * Verifies a CreateWorkflowInvocationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateWorkflowInvocationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest; + + /** + * Creates a plain object from a CreateWorkflowInvocationRequest message. Also converts values to other types if specified. + * @param message CreateWorkflowInvocationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateWorkflowInvocationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteWorkflowInvocationRequest. */ + interface IDeleteWorkflowInvocationRequest { + + /** DeleteWorkflowInvocationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteWorkflowInvocationRequest. */ + class DeleteWorkflowInvocationRequest implements IDeleteWorkflowInvocationRequest { + + /** + * Constructs a new DeleteWorkflowInvocationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest); + + /** DeleteWorkflowInvocationRequest name. */ + public name: string; + + /** + * Creates a new DeleteWorkflowInvocationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteWorkflowInvocationRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest): google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest; + + /** + * Encodes the specified DeleteWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest.verify|verify} messages. + * @param message DeleteWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest.verify|verify} messages. + * @param message DeleteWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteWorkflowInvocationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest; + + /** + * Decodes a DeleteWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest; + + /** + * Verifies a DeleteWorkflowInvocationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteWorkflowInvocationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest; + + /** + * Creates a plain object from a DeleteWorkflowInvocationRequest message. Also converts values to other types if specified. + * @param message DeleteWorkflowInvocationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteWorkflowInvocationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CancelWorkflowInvocationRequest. */ + interface ICancelWorkflowInvocationRequest { + + /** CancelWorkflowInvocationRequest name */ + name?: (string|null); + } + + /** Represents a CancelWorkflowInvocationRequest. */ + class CancelWorkflowInvocationRequest implements ICancelWorkflowInvocationRequest { + + /** + * Constructs a new CancelWorkflowInvocationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest); + + /** CancelWorkflowInvocationRequest name. */ + public name: string; + + /** + * Creates a new CancelWorkflowInvocationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelWorkflowInvocationRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest): google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest; + + /** + * Encodes the specified CancelWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest.verify|verify} messages. + * @param message CancelWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest.verify|verify} messages. + * @param message CancelWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelWorkflowInvocationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest; + + /** + * Decodes a CancelWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest; + + /** + * Verifies a CancelWorkflowInvocationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelWorkflowInvocationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest; + + /** + * Creates a plain object from a CancelWorkflowInvocationRequest message. Also converts values to other types if specified. + * @param message CancelWorkflowInvocationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelWorkflowInvocationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WorkflowInvocationAction. */ + interface IWorkflowInvocationAction { + + /** WorkflowInvocationAction target */ + target?: (google.cloud.dataform.v1alpha2.ITarget|null); + + /** WorkflowInvocationAction canonicalTarget */ + canonicalTarget?: (google.cloud.dataform.v1alpha2.ITarget|null); + + /** WorkflowInvocationAction state */ + state?: (google.cloud.dataform.v1alpha2.WorkflowInvocationAction.State|keyof typeof google.cloud.dataform.v1alpha2.WorkflowInvocationAction.State|null); + + /** WorkflowInvocationAction invocationTiming */ + invocationTiming?: (google.type.IInterval|null); + + /** WorkflowInvocationAction bigqueryAction */ + bigqueryAction?: (google.cloud.dataform.v1alpha2.WorkflowInvocationAction.IBigQueryAction|null); + } + + /** Represents a WorkflowInvocationAction. */ + class WorkflowInvocationAction implements IWorkflowInvocationAction { + + /** + * Constructs a new WorkflowInvocationAction. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IWorkflowInvocationAction); + + /** WorkflowInvocationAction target. */ + public target?: (google.cloud.dataform.v1alpha2.ITarget|null); + + /** WorkflowInvocationAction canonicalTarget. */ + public canonicalTarget?: (google.cloud.dataform.v1alpha2.ITarget|null); + + /** WorkflowInvocationAction state. */ + public state: (google.cloud.dataform.v1alpha2.WorkflowInvocationAction.State|keyof typeof google.cloud.dataform.v1alpha2.WorkflowInvocationAction.State); + + /** WorkflowInvocationAction invocationTiming. */ + public invocationTiming?: (google.type.IInterval|null); + + /** WorkflowInvocationAction bigqueryAction. */ + public bigqueryAction?: (google.cloud.dataform.v1alpha2.WorkflowInvocationAction.IBigQueryAction|null); + + /** + * Creates a new WorkflowInvocationAction instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkflowInvocationAction instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IWorkflowInvocationAction): google.cloud.dataform.v1alpha2.WorkflowInvocationAction; + + /** + * Encodes the specified WorkflowInvocationAction message. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocationAction.verify|verify} messages. + * @param message WorkflowInvocationAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IWorkflowInvocationAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkflowInvocationAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocationAction.verify|verify} messages. + * @param message WorkflowInvocationAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IWorkflowInvocationAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkflowInvocationAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkflowInvocationAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.WorkflowInvocationAction; + + /** + * Decodes a WorkflowInvocationAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkflowInvocationAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.WorkflowInvocationAction; + + /** + * Verifies a WorkflowInvocationAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkflowInvocationAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkflowInvocationAction + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.WorkflowInvocationAction; + + /** + * Creates a plain object from a WorkflowInvocationAction message. Also converts values to other types if specified. + * @param message WorkflowInvocationAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.WorkflowInvocationAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkflowInvocationAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace WorkflowInvocationAction { + + /** State enum. */ + enum State { + PENDING = 0, + RUNNING = 1, + SKIPPED = 2, + DISABLED = 3, + SUCCEEDED = 4, + CANCELLED = 5, + FAILED = 6 + } + + /** Properties of a BigQueryAction. */ + interface IBigQueryAction { + + /** BigQueryAction sqlScript */ + sqlScript?: (string|null); + } + + /** Represents a BigQueryAction. */ + class BigQueryAction implements IBigQueryAction { + + /** + * Constructs a new BigQueryAction. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.WorkflowInvocationAction.IBigQueryAction); + + /** BigQueryAction sqlScript. */ + public sqlScript: string; + + /** + * Creates a new BigQueryAction instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryAction instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.WorkflowInvocationAction.IBigQueryAction): google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction; + + /** + * Encodes the specified BigQueryAction message. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction.verify|verify} messages. + * @param message BigQueryAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.WorkflowInvocationAction.IBigQueryAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction.verify|verify} messages. + * @param message BigQueryAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.WorkflowInvocationAction.IBigQueryAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction; + + /** + * Decodes a BigQueryAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction; + + /** + * Verifies a BigQueryAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryAction + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction; + + /** + * Creates a plain object from a BigQueryAction message. Also converts values to other types if specified. + * @param message BigQueryAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a QueryWorkflowInvocationActionsRequest. */ + interface IQueryWorkflowInvocationActionsRequest { + + /** QueryWorkflowInvocationActionsRequest name */ + name?: (string|null); + + /** QueryWorkflowInvocationActionsRequest pageSize */ + pageSize?: (number|null); + + /** QueryWorkflowInvocationActionsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a QueryWorkflowInvocationActionsRequest. */ + class QueryWorkflowInvocationActionsRequest implements IQueryWorkflowInvocationActionsRequest { + + /** + * Constructs a new QueryWorkflowInvocationActionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest); + + /** QueryWorkflowInvocationActionsRequest name. */ + public name: string; + + /** QueryWorkflowInvocationActionsRequest pageSize. */ + public pageSize: number; + + /** QueryWorkflowInvocationActionsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new QueryWorkflowInvocationActionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryWorkflowInvocationActionsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest): google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest; + + /** + * Encodes the specified QueryWorkflowInvocationActionsRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest.verify|verify} messages. + * @param message QueryWorkflowInvocationActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryWorkflowInvocationActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest.verify|verify} messages. + * @param message QueryWorkflowInvocationActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryWorkflowInvocationActionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryWorkflowInvocationActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest; + + /** + * Decodes a QueryWorkflowInvocationActionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryWorkflowInvocationActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest; + + /** + * Verifies a QueryWorkflowInvocationActionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryWorkflowInvocationActionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryWorkflowInvocationActionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest; + + /** + * Creates a plain object from a QueryWorkflowInvocationActionsRequest message. Also converts values to other types if specified. + * @param message QueryWorkflowInvocationActionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryWorkflowInvocationActionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QueryWorkflowInvocationActionsResponse. */ + interface IQueryWorkflowInvocationActionsResponse { + + /** QueryWorkflowInvocationActionsResponse workflowInvocationActions */ + workflowInvocationActions?: (google.cloud.dataform.v1alpha2.IWorkflowInvocationAction[]|null); + + /** QueryWorkflowInvocationActionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a QueryWorkflowInvocationActionsResponse. */ + class QueryWorkflowInvocationActionsResponse implements IQueryWorkflowInvocationActionsResponse { + + /** + * Constructs a new QueryWorkflowInvocationActionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsResponse); + + /** QueryWorkflowInvocationActionsResponse workflowInvocationActions. */ + public workflowInvocationActions: google.cloud.dataform.v1alpha2.IWorkflowInvocationAction[]; + + /** QueryWorkflowInvocationActionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new QueryWorkflowInvocationActionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryWorkflowInvocationActionsResponse instance + */ + public static create(properties?: google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsResponse): google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse; + + /** + * Encodes the specified QueryWorkflowInvocationActionsResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse.verify|verify} messages. + * @param message QueryWorkflowInvocationActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryWorkflowInvocationActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse.verify|verify} messages. + * @param message QueryWorkflowInvocationActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryWorkflowInvocationActionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryWorkflowInvocationActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse; + + /** + * Decodes a QueryWorkflowInvocationActionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryWorkflowInvocationActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse; + + /** + * Verifies a QueryWorkflowInvocationActionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryWorkflowInvocationActionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryWorkflowInvocationActionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse; + + /** + * Creates a plain object from a QueryWorkflowInvocationActionsResponse message. Also converts values to other types if specified. + * @param message QueryWorkflowInvocationActionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryWorkflowInvocationActionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of 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 }; + } + } + + /** Namespace type. */ + namespace type { + + /** Properties of an Interval. */ + interface IInterval { + + /** Interval startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** Interval endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an Interval. */ + class Interval implements IInterval { + + /** + * Constructs a new Interval. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IInterval); + + /** Interval startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** Interval endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new Interval instance using the specified properties. + * @param [properties] Properties to set + * @returns Interval instance + */ + public static create(properties?: google.type.IInterval): google.type.Interval; + + /** + * Encodes the specified Interval message. Does not implicitly {@link google.type.Interval.verify|verify} messages. + * @param message Interval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Interval message, length delimited. Does not implicitly {@link google.type.Interval.verify|verify} messages. + * @param message Interval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Interval message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Interval + * @throws {Error} If the payload is not 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.Interval; + + /** + * Decodes an Interval message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Interval + * @throws {Error} If the payload 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.Interval; + + /** + * Verifies an Interval message. + * @param message Plain 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 Interval message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Interval + */ + public static fromObject(object: { [k: string]: any }): google.type.Interval; + + /** + * Creates a plain object from an Interval message. Also converts values to other types if specified. + * @param message Interval + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.Interval, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Interval to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } +} diff --git a/packages/google-cloud-dataform/protos/protos.js b/packages/google-cloud-dataform/protos/protos.js new file mode 100644 index 00000000000..5f0da0b0c8b --- /dev/null +++ b/packages/google-cloud-dataform/protos/protos.js @@ -0,0 +1,30379 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_cloud_dataform_protos || ($protobuf.roots._google_cloud_dataform_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.dataform = (function() { + + /** + * Namespace dataform. + * @memberof google.cloud + * @namespace + */ + var dataform = {}; + + dataform.v1alpha2 = (function() { + + /** + * Namespace v1alpha2. + * @memberof google.cloud.dataform + * @namespace + */ + var v1alpha2 = {}; + + v1alpha2.Dataform = (function() { + + /** + * Constructs a new Dataform service. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a Dataform + * @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 Dataform(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Dataform.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Dataform; + + /** + * Creates new Dataform service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @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 {Dataform} RPC service. Useful where requests and/or responses are streamed. + */ + Dataform.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#listRepositories}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef ListRepositoriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.ListRepositoriesResponse} [response] ListRepositoriesResponse + */ + + /** + * Calls ListRepositories. + * @function listRepositories + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IListRepositoriesRequest} request ListRepositoriesRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.ListRepositoriesCallback} callback Node-style callback called with the error, if any, and ListRepositoriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.listRepositories = function listRepositories(request, callback) { + return this.rpcCall(listRepositories, $root.google.cloud.dataform.v1alpha2.ListRepositoriesRequest, $root.google.cloud.dataform.v1alpha2.ListRepositoriesResponse, request, callback); + }, "name", { value: "ListRepositories" }); + + /** + * Calls ListRepositories. + * @function listRepositories + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IListRepositoriesRequest} request ListRepositoriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#getRepository}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef GetRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.Repository} [response] Repository + */ + + /** + * Calls GetRepository. + * @function getRepository + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IGetRepositoryRequest} request GetRepositoryRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.GetRepositoryCallback} callback Node-style callback called with the error, if any, and Repository + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.getRepository = function getRepository(request, callback) { + return this.rpcCall(getRepository, $root.google.cloud.dataform.v1alpha2.GetRepositoryRequest, $root.google.cloud.dataform.v1alpha2.Repository, request, callback); + }, "name", { value: "GetRepository" }); + + /** + * Calls GetRepository. + * @function getRepository + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IGetRepositoryRequest} request GetRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#createRepository}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef CreateRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.Repository} [response] Repository + */ + + /** + * Calls CreateRepository. + * @function createRepository + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.ICreateRepositoryRequest} request CreateRepositoryRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.CreateRepositoryCallback} callback Node-style callback called with the error, if any, and Repository + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.createRepository = function createRepository(request, callback) { + return this.rpcCall(createRepository, $root.google.cloud.dataform.v1alpha2.CreateRepositoryRequest, $root.google.cloud.dataform.v1alpha2.Repository, request, callback); + }, "name", { value: "CreateRepository" }); + + /** + * Calls CreateRepository. + * @function createRepository + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.ICreateRepositoryRequest} request CreateRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#updateRepository}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef UpdateRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.Repository} [response] Repository + */ + + /** + * Calls UpdateRepository. + * @function updateRepository + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest} request UpdateRepositoryRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.UpdateRepositoryCallback} callback Node-style callback called with the error, if any, and Repository + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.updateRepository = function updateRepository(request, callback) { + return this.rpcCall(updateRepository, $root.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest, $root.google.cloud.dataform.v1alpha2.Repository, request, callback); + }, "name", { value: "UpdateRepository" }); + + /** + * Calls UpdateRepository. + * @function updateRepository + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest} request UpdateRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#deleteRepository}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef DeleteRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteRepository. + * @function deleteRepository + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest} request DeleteRepositoryRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.DeleteRepositoryCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.deleteRepository = function deleteRepository(request, callback) { + return this.rpcCall(deleteRepository, $root.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteRepository" }); + + /** + * Calls DeleteRepository. + * @function deleteRepository + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest} request DeleteRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#fetchRemoteBranches}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef FetchRemoteBranchesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse} [response] FetchRemoteBranchesResponse + */ + + /** + * Calls FetchRemoteBranches. + * @function fetchRemoteBranches + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest} request FetchRemoteBranchesRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.FetchRemoteBranchesCallback} callback Node-style callback called with the error, if any, and FetchRemoteBranchesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.fetchRemoteBranches = function fetchRemoteBranches(request, callback) { + return this.rpcCall(fetchRemoteBranches, $root.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest, $root.google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse, request, callback); + }, "name", { value: "FetchRemoteBranches" }); + + /** + * Calls FetchRemoteBranches. + * @function fetchRemoteBranches + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest} request FetchRemoteBranchesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#listWorkspaces}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef ListWorkspacesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.ListWorkspacesResponse} [response] ListWorkspacesResponse + */ + + /** + * Calls ListWorkspaces. + * @function listWorkspaces + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IListWorkspacesRequest} request ListWorkspacesRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.ListWorkspacesCallback} callback Node-style callback called with the error, if any, and ListWorkspacesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.listWorkspaces = function listWorkspaces(request, callback) { + return this.rpcCall(listWorkspaces, $root.google.cloud.dataform.v1alpha2.ListWorkspacesRequest, $root.google.cloud.dataform.v1alpha2.ListWorkspacesResponse, request, callback); + }, "name", { value: "ListWorkspaces" }); + + /** + * Calls ListWorkspaces. + * @function listWorkspaces + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IListWorkspacesRequest} request ListWorkspacesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#getWorkspace}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef GetWorkspaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.Workspace} [response] Workspace + */ + + /** + * Calls GetWorkspace. + * @function getWorkspace + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IGetWorkspaceRequest} request GetWorkspaceRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.GetWorkspaceCallback} callback Node-style callback called with the error, if any, and Workspace + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.getWorkspace = function getWorkspace(request, callback) { + return this.rpcCall(getWorkspace, $root.google.cloud.dataform.v1alpha2.GetWorkspaceRequest, $root.google.cloud.dataform.v1alpha2.Workspace, request, callback); + }, "name", { value: "GetWorkspace" }); + + /** + * Calls GetWorkspace. + * @function getWorkspace + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IGetWorkspaceRequest} request GetWorkspaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#createWorkspace}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef CreateWorkspaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.Workspace} [response] Workspace + */ + + /** + * Calls CreateWorkspace. + * @function createWorkspace + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest} request CreateWorkspaceRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.CreateWorkspaceCallback} callback Node-style callback called with the error, if any, and Workspace + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.createWorkspace = function createWorkspace(request, callback) { + return this.rpcCall(createWorkspace, $root.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest, $root.google.cloud.dataform.v1alpha2.Workspace, request, callback); + }, "name", { value: "CreateWorkspace" }); + + /** + * Calls CreateWorkspace. + * @function createWorkspace + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest} request CreateWorkspaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#deleteWorkspace}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef DeleteWorkspaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteWorkspace. + * @function deleteWorkspace + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest} request DeleteWorkspaceRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.DeleteWorkspaceCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.deleteWorkspace = function deleteWorkspace(request, callback) { + return this.rpcCall(deleteWorkspace, $root.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteWorkspace" }); + + /** + * Calls DeleteWorkspace. + * @function deleteWorkspace + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest} request DeleteWorkspaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#installNpmPackages}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef InstallNpmPackagesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse} [response] InstallNpmPackagesResponse + */ + + /** + * Calls InstallNpmPackages. + * @function installNpmPackages + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest} request InstallNpmPackagesRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.InstallNpmPackagesCallback} callback Node-style callback called with the error, if any, and InstallNpmPackagesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.installNpmPackages = function installNpmPackages(request, callback) { + return this.rpcCall(installNpmPackages, $root.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest, $root.google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse, request, callback); + }, "name", { value: "InstallNpmPackages" }); + + /** + * Calls InstallNpmPackages. + * @function installNpmPackages + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest} request InstallNpmPackagesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#pullGitCommits}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef PullGitCommitsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls PullGitCommits. + * @function pullGitCommits + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IPullGitCommitsRequest} request PullGitCommitsRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.PullGitCommitsCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.pullGitCommits = function pullGitCommits(request, callback) { + return this.rpcCall(pullGitCommits, $root.google.cloud.dataform.v1alpha2.PullGitCommitsRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "PullGitCommits" }); + + /** + * Calls PullGitCommits. + * @function pullGitCommits + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IPullGitCommitsRequest} request PullGitCommitsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#pushGitCommits}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef PushGitCommitsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls PushGitCommits. + * @function pushGitCommits + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IPushGitCommitsRequest} request PushGitCommitsRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.PushGitCommitsCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.pushGitCommits = function pushGitCommits(request, callback) { + return this.rpcCall(pushGitCommits, $root.google.cloud.dataform.v1alpha2.PushGitCommitsRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "PushGitCommits" }); + + /** + * Calls PushGitCommits. + * @function pushGitCommits + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IPushGitCommitsRequest} request PushGitCommitsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#fetchFileGitStatuses}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef FetchFileGitStatusesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse} [response] FetchFileGitStatusesResponse + */ + + /** + * Calls FetchFileGitStatuses. + * @function fetchFileGitStatuses + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest} request FetchFileGitStatusesRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.FetchFileGitStatusesCallback} callback Node-style callback called with the error, if any, and FetchFileGitStatusesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.fetchFileGitStatuses = function fetchFileGitStatuses(request, callback) { + return this.rpcCall(fetchFileGitStatuses, $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest, $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse, request, callback); + }, "name", { value: "FetchFileGitStatuses" }); + + /** + * Calls FetchFileGitStatuses. + * @function fetchFileGitStatuses + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest} request FetchFileGitStatusesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#fetchGitAheadBehind}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef FetchGitAheadBehindCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse} [response] FetchGitAheadBehindResponse + */ + + /** + * Calls FetchGitAheadBehind. + * @function fetchGitAheadBehind + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest} request FetchGitAheadBehindRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.FetchGitAheadBehindCallback} callback Node-style callback called with the error, if any, and FetchGitAheadBehindResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.fetchGitAheadBehind = function fetchGitAheadBehind(request, callback) { + return this.rpcCall(fetchGitAheadBehind, $root.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest, $root.google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse, request, callback); + }, "name", { value: "FetchGitAheadBehind" }); + + /** + * Calls FetchGitAheadBehind. + * @function fetchGitAheadBehind + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest} request FetchGitAheadBehindRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#commitWorkspaceChanges}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef CommitWorkspaceChangesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CommitWorkspaceChanges. + * @function commitWorkspaceChanges + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest} request CommitWorkspaceChangesRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.CommitWorkspaceChangesCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.commitWorkspaceChanges = function commitWorkspaceChanges(request, callback) { + return this.rpcCall(commitWorkspaceChanges, $root.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CommitWorkspaceChanges" }); + + /** + * Calls CommitWorkspaceChanges. + * @function commitWorkspaceChanges + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest} request CommitWorkspaceChangesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#resetWorkspaceChanges}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef ResetWorkspaceChangesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls ResetWorkspaceChanges. + * @function resetWorkspaceChanges + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest} request ResetWorkspaceChangesRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.ResetWorkspaceChangesCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.resetWorkspaceChanges = function resetWorkspaceChanges(request, callback) { + return this.rpcCall(resetWorkspaceChanges, $root.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "ResetWorkspaceChanges" }); + + /** + * Calls ResetWorkspaceChanges. + * @function resetWorkspaceChanges + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest} request ResetWorkspaceChangesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#fetchFileDiff}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef FetchFileDiffCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.FetchFileDiffResponse} [response] FetchFileDiffResponse + */ + + /** + * Calls FetchFileDiff. + * @function fetchFileDiff + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IFetchFileDiffRequest} request FetchFileDiffRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.FetchFileDiffCallback} callback Node-style callback called with the error, if any, and FetchFileDiffResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.fetchFileDiff = function fetchFileDiff(request, callback) { + return this.rpcCall(fetchFileDiff, $root.google.cloud.dataform.v1alpha2.FetchFileDiffRequest, $root.google.cloud.dataform.v1alpha2.FetchFileDiffResponse, request, callback); + }, "name", { value: "FetchFileDiff" }); + + /** + * Calls FetchFileDiff. + * @function fetchFileDiff + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IFetchFileDiffRequest} request FetchFileDiffRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#queryDirectoryContents}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef QueryDirectoryContentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse} [response] QueryDirectoryContentsResponse + */ + + /** + * Calls QueryDirectoryContents. + * @function queryDirectoryContents + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest} request QueryDirectoryContentsRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.QueryDirectoryContentsCallback} callback Node-style callback called with the error, if any, and QueryDirectoryContentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.queryDirectoryContents = function queryDirectoryContents(request, callback) { + return this.rpcCall(queryDirectoryContents, $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest, $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse, request, callback); + }, "name", { value: "QueryDirectoryContents" }); + + /** + * Calls QueryDirectoryContents. + * @function queryDirectoryContents + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest} request QueryDirectoryContentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#makeDirectory}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef MakeDirectoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.MakeDirectoryResponse} [response] MakeDirectoryResponse + */ + + /** + * Calls MakeDirectory. + * @function makeDirectory + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IMakeDirectoryRequest} request MakeDirectoryRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.MakeDirectoryCallback} callback Node-style callback called with the error, if any, and MakeDirectoryResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.makeDirectory = function makeDirectory(request, callback) { + return this.rpcCall(makeDirectory, $root.google.cloud.dataform.v1alpha2.MakeDirectoryRequest, $root.google.cloud.dataform.v1alpha2.MakeDirectoryResponse, request, callback); + }, "name", { value: "MakeDirectory" }); + + /** + * Calls MakeDirectory. + * @function makeDirectory + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IMakeDirectoryRequest} request MakeDirectoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#removeDirectory}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef RemoveDirectoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls RemoveDirectory. + * @function removeDirectory + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest} request RemoveDirectoryRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.RemoveDirectoryCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.removeDirectory = function removeDirectory(request, callback) { + return this.rpcCall(removeDirectory, $root.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "RemoveDirectory" }); + + /** + * Calls RemoveDirectory. + * @function removeDirectory + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest} request RemoveDirectoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#moveDirectory}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef MoveDirectoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.MoveDirectoryResponse} [response] MoveDirectoryResponse + */ + + /** + * Calls MoveDirectory. + * @function moveDirectory + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IMoveDirectoryRequest} request MoveDirectoryRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.MoveDirectoryCallback} callback Node-style callback called with the error, if any, and MoveDirectoryResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.moveDirectory = function moveDirectory(request, callback) { + return this.rpcCall(moveDirectory, $root.google.cloud.dataform.v1alpha2.MoveDirectoryRequest, $root.google.cloud.dataform.v1alpha2.MoveDirectoryResponse, request, callback); + }, "name", { value: "MoveDirectory" }); + + /** + * Calls MoveDirectory. + * @function moveDirectory + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IMoveDirectoryRequest} request MoveDirectoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#readFile}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef ReadFileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.ReadFileResponse} [response] ReadFileResponse + */ + + /** + * Calls ReadFile. + * @function readFile + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IReadFileRequest} request ReadFileRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.ReadFileCallback} callback Node-style callback called with the error, if any, and ReadFileResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.readFile = function readFile(request, callback) { + return this.rpcCall(readFile, $root.google.cloud.dataform.v1alpha2.ReadFileRequest, $root.google.cloud.dataform.v1alpha2.ReadFileResponse, request, callback); + }, "name", { value: "ReadFile" }); + + /** + * Calls ReadFile. + * @function readFile + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IReadFileRequest} request ReadFileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#removeFile}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef RemoveFileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls RemoveFile. + * @function removeFile + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IRemoveFileRequest} request RemoveFileRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.RemoveFileCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.removeFile = function removeFile(request, callback) { + return this.rpcCall(removeFile, $root.google.cloud.dataform.v1alpha2.RemoveFileRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "RemoveFile" }); + + /** + * Calls RemoveFile. + * @function removeFile + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IRemoveFileRequest} request RemoveFileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#moveFile}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef MoveFileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.MoveFileResponse} [response] MoveFileResponse + */ + + /** + * Calls MoveFile. + * @function moveFile + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IMoveFileRequest} request MoveFileRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.MoveFileCallback} callback Node-style callback called with the error, if any, and MoveFileResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.moveFile = function moveFile(request, callback) { + return this.rpcCall(moveFile, $root.google.cloud.dataform.v1alpha2.MoveFileRequest, $root.google.cloud.dataform.v1alpha2.MoveFileResponse, request, callback); + }, "name", { value: "MoveFile" }); + + /** + * Calls MoveFile. + * @function moveFile + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IMoveFileRequest} request MoveFileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#writeFile}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef WriteFileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.WriteFileResponse} [response] WriteFileResponse + */ + + /** + * Calls WriteFile. + * @function writeFile + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IWriteFileRequest} request WriteFileRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.WriteFileCallback} callback Node-style callback called with the error, if any, and WriteFileResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.writeFile = function writeFile(request, callback) { + return this.rpcCall(writeFile, $root.google.cloud.dataform.v1alpha2.WriteFileRequest, $root.google.cloud.dataform.v1alpha2.WriteFileResponse, request, callback); + }, "name", { value: "WriteFile" }); + + /** + * Calls WriteFile. + * @function writeFile + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IWriteFileRequest} request WriteFileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#listCompilationResults}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef ListCompilationResultsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.ListCompilationResultsResponse} [response] ListCompilationResultsResponse + */ + + /** + * Calls ListCompilationResults. + * @function listCompilationResults + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IListCompilationResultsRequest} request ListCompilationResultsRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.ListCompilationResultsCallback} callback Node-style callback called with the error, if any, and ListCompilationResultsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.listCompilationResults = function listCompilationResults(request, callback) { + return this.rpcCall(listCompilationResults, $root.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest, $root.google.cloud.dataform.v1alpha2.ListCompilationResultsResponse, request, callback); + }, "name", { value: "ListCompilationResults" }); + + /** + * Calls ListCompilationResults. + * @function listCompilationResults + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IListCompilationResultsRequest} request ListCompilationResultsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#getCompilationResult}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef GetCompilationResultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.CompilationResult} [response] CompilationResult + */ + + /** + * Calls GetCompilationResult. + * @function getCompilationResult + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IGetCompilationResultRequest} request GetCompilationResultRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.GetCompilationResultCallback} callback Node-style callback called with the error, if any, and CompilationResult + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.getCompilationResult = function getCompilationResult(request, callback) { + return this.rpcCall(getCompilationResult, $root.google.cloud.dataform.v1alpha2.GetCompilationResultRequest, $root.google.cloud.dataform.v1alpha2.CompilationResult, request, callback); + }, "name", { value: "GetCompilationResult" }); + + /** + * Calls GetCompilationResult. + * @function getCompilationResult + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IGetCompilationResultRequest} request GetCompilationResultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#createCompilationResult}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef CreateCompilationResultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.CompilationResult} [response] CompilationResult + */ + + /** + * Calls CreateCompilationResult. + * @function createCompilationResult + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest} request CreateCompilationResultRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.CreateCompilationResultCallback} callback Node-style callback called with the error, if any, and CompilationResult + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.createCompilationResult = function createCompilationResult(request, callback) { + return this.rpcCall(createCompilationResult, $root.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest, $root.google.cloud.dataform.v1alpha2.CompilationResult, request, callback); + }, "name", { value: "CreateCompilationResult" }); + + /** + * Calls CreateCompilationResult. + * @function createCompilationResult + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest} request CreateCompilationResultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#queryCompilationResultActions}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef QueryCompilationResultActionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse} [response] QueryCompilationResultActionsResponse + */ + + /** + * Calls QueryCompilationResultActions. + * @function queryCompilationResultActions + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest} request QueryCompilationResultActionsRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.QueryCompilationResultActionsCallback} callback Node-style callback called with the error, if any, and QueryCompilationResultActionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.queryCompilationResultActions = function queryCompilationResultActions(request, callback) { + return this.rpcCall(queryCompilationResultActions, $root.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest, $root.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse, request, callback); + }, "name", { value: "QueryCompilationResultActions" }); + + /** + * Calls QueryCompilationResultActions. + * @function queryCompilationResultActions + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest} request QueryCompilationResultActionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#listWorkflowInvocations}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef ListWorkflowInvocationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse} [response] ListWorkflowInvocationsResponse + */ + + /** + * Calls ListWorkflowInvocations. + * @function listWorkflowInvocations + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest} request ListWorkflowInvocationsRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.ListWorkflowInvocationsCallback} callback Node-style callback called with the error, if any, and ListWorkflowInvocationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.listWorkflowInvocations = function listWorkflowInvocations(request, callback) { + return this.rpcCall(listWorkflowInvocations, $root.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest, $root.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse, request, callback); + }, "name", { value: "ListWorkflowInvocations" }); + + /** + * Calls ListWorkflowInvocations. + * @function listWorkflowInvocations + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest} request ListWorkflowInvocationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#getWorkflowInvocation}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef GetWorkflowInvocationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocation} [response] WorkflowInvocation + */ + + /** + * Calls GetWorkflowInvocation. + * @function getWorkflowInvocation + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest} request GetWorkflowInvocationRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.GetWorkflowInvocationCallback} callback Node-style callback called with the error, if any, and WorkflowInvocation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.getWorkflowInvocation = function getWorkflowInvocation(request, callback) { + return this.rpcCall(getWorkflowInvocation, $root.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest, $root.google.cloud.dataform.v1alpha2.WorkflowInvocation, request, callback); + }, "name", { value: "GetWorkflowInvocation" }); + + /** + * Calls GetWorkflowInvocation. + * @function getWorkflowInvocation + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest} request GetWorkflowInvocationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#createWorkflowInvocation}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef CreateWorkflowInvocationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocation} [response] WorkflowInvocation + */ + + /** + * Calls CreateWorkflowInvocation. + * @function createWorkflowInvocation + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest} request CreateWorkflowInvocationRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.CreateWorkflowInvocationCallback} callback Node-style callback called with the error, if any, and WorkflowInvocation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.createWorkflowInvocation = function createWorkflowInvocation(request, callback) { + return this.rpcCall(createWorkflowInvocation, $root.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest, $root.google.cloud.dataform.v1alpha2.WorkflowInvocation, request, callback); + }, "name", { value: "CreateWorkflowInvocation" }); + + /** + * Calls CreateWorkflowInvocation. + * @function createWorkflowInvocation + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest} request CreateWorkflowInvocationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#deleteWorkflowInvocation}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef DeleteWorkflowInvocationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteWorkflowInvocation. + * @function deleteWorkflowInvocation + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest} request DeleteWorkflowInvocationRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.DeleteWorkflowInvocationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.deleteWorkflowInvocation = function deleteWorkflowInvocation(request, callback) { + return this.rpcCall(deleteWorkflowInvocation, $root.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteWorkflowInvocation" }); + + /** + * Calls DeleteWorkflowInvocation. + * @function deleteWorkflowInvocation + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest} request DeleteWorkflowInvocationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#cancelWorkflowInvocation}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef CancelWorkflowInvocationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelWorkflowInvocation. + * @function cancelWorkflowInvocation + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest} request CancelWorkflowInvocationRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.CancelWorkflowInvocationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.cancelWorkflowInvocation = function cancelWorkflowInvocation(request, callback) { + return this.rpcCall(cancelWorkflowInvocation, $root.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelWorkflowInvocation" }); + + /** + * Calls CancelWorkflowInvocation. + * @function cancelWorkflowInvocation + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest} request CancelWorkflowInvocationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#queryWorkflowInvocationActions}. + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @typedef QueryWorkflowInvocationActionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse} [response] QueryWorkflowInvocationActionsResponse + */ + + /** + * Calls QueryWorkflowInvocationActions. + * @function queryWorkflowInvocationActions + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest} request QueryWorkflowInvocationActionsRequest message or plain object + * @param {google.cloud.dataform.v1alpha2.Dataform.QueryWorkflowInvocationActionsCallback} callback Node-style callback called with the error, if any, and QueryWorkflowInvocationActionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.queryWorkflowInvocationActions = function queryWorkflowInvocationActions(request, callback) { + return this.rpcCall(queryWorkflowInvocationActions, $root.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest, $root.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse, request, callback); + }, "name", { value: "QueryWorkflowInvocationActions" }); + + /** + * Calls QueryWorkflowInvocationActions. + * @function queryWorkflowInvocationActions + * @memberof google.cloud.dataform.v1alpha2.Dataform + * @instance + * @param {google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest} request QueryWorkflowInvocationActionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Dataform; + })(); + + v1alpha2.Repository = (function() { + + /** + * Properties of a Repository. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IRepository + * @property {string|null} [name] Repository name + * @property {google.cloud.dataform.v1alpha2.Repository.IGitRemoteSettings|null} [gitRemoteSettings] Repository gitRemoteSettings + */ + + /** + * Constructs a new Repository. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a Repository. + * @implements IRepository + * @constructor + * @param {google.cloud.dataform.v1alpha2.IRepository=} [properties] Properties to set + */ + function Repository(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Repository name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.Repository + * @instance + */ + Repository.prototype.name = ""; + + /** + * Repository gitRemoteSettings. + * @member {google.cloud.dataform.v1alpha2.Repository.IGitRemoteSettings|null|undefined} gitRemoteSettings + * @memberof google.cloud.dataform.v1alpha2.Repository + * @instance + */ + Repository.prototype.gitRemoteSettings = null; + + /** + * Creates a new Repository instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.Repository + * @static + * @param {google.cloud.dataform.v1alpha2.IRepository=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.Repository} Repository instance + */ + Repository.create = function create(properties) { + return new Repository(properties); + }; + + /** + * Encodes the specified Repository message. Does not implicitly {@link google.cloud.dataform.v1alpha2.Repository.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.Repository + * @static + * @param {google.cloud.dataform.v1alpha2.IRepository} message Repository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Repository.encode = function encode(message, writer) { + 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.gitRemoteSettings != null && Object.hasOwnProperty.call(message, "gitRemoteSettings")) + $root.google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.encode(message.gitRemoteSettings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Repository message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.Repository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.Repository + * @static + * @param {google.cloud.dataform.v1alpha2.IRepository} message Repository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Repository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Repository message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.Repository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.Repository} Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Repository.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.Repository(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.gitRemoteSettings = $root.google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Repository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.Repository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.Repository} Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Repository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Repository message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.Repository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Repository.verify = function verify(message) { + if (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.gitRemoteSettings != null && message.hasOwnProperty("gitRemoteSettings")) { + var error = $root.google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.verify(message.gitRemoteSettings); + if (error) + return "gitRemoteSettings." + error; + } + return null; + }; + + /** + * Creates a Repository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.Repository + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.Repository} Repository + */ + Repository.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.Repository) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.Repository(); + if (object.name != null) + message.name = String(object.name); + if (object.gitRemoteSettings != null) { + if (typeof object.gitRemoteSettings !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.Repository.gitRemoteSettings: object expected"); + message.gitRemoteSettings = $root.google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.fromObject(object.gitRemoteSettings); + } + return message; + }; + + /** + * Creates a plain object from a Repository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.Repository + * @static + * @param {google.cloud.dataform.v1alpha2.Repository} message Repository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Repository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.gitRemoteSettings = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.gitRemoteSettings != null && message.hasOwnProperty("gitRemoteSettings")) + object.gitRemoteSettings = $root.google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.toObject(message.gitRemoteSettings, options); + return object; + }; + + /** + * Converts this Repository to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.Repository + * @instance + * @returns {Object.} JSON object + */ + Repository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Repository.GitRemoteSettings = (function() { + + /** + * Properties of a GitRemoteSettings. + * @memberof google.cloud.dataform.v1alpha2.Repository + * @interface IGitRemoteSettings + * @property {string|null} [url] GitRemoteSettings url + * @property {string|null} [defaultBranch] GitRemoteSettings defaultBranch + * @property {string|null} [authenticationTokenSecretVersion] GitRemoteSettings authenticationTokenSecretVersion + * @property {google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.TokenStatus|null} [tokenStatus] GitRemoteSettings tokenStatus + */ + + /** + * Constructs a new GitRemoteSettings. + * @memberof google.cloud.dataform.v1alpha2.Repository + * @classdesc Represents a GitRemoteSettings. + * @implements IGitRemoteSettings + * @constructor + * @param {google.cloud.dataform.v1alpha2.Repository.IGitRemoteSettings=} [properties] Properties to set + */ + function GitRemoteSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GitRemoteSettings url. + * @member {string} url + * @memberof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + * @instance + */ + GitRemoteSettings.prototype.url = ""; + + /** + * GitRemoteSettings defaultBranch. + * @member {string} defaultBranch + * @memberof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + * @instance + */ + GitRemoteSettings.prototype.defaultBranch = ""; + + /** + * GitRemoteSettings authenticationTokenSecretVersion. + * @member {string} authenticationTokenSecretVersion + * @memberof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + * @instance + */ + GitRemoteSettings.prototype.authenticationTokenSecretVersion = ""; + + /** + * GitRemoteSettings tokenStatus. + * @member {google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.TokenStatus} tokenStatus + * @memberof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + * @instance + */ + GitRemoteSettings.prototype.tokenStatus = 0; + + /** + * Creates a new GitRemoteSettings instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + * @static + * @param {google.cloud.dataform.v1alpha2.Repository.IGitRemoteSettings=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings} GitRemoteSettings instance + */ + GitRemoteSettings.create = function create(properties) { + return new GitRemoteSettings(properties); + }; + + /** + * Encodes the specified GitRemoteSettings message. Does not implicitly {@link google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + * @static + * @param {google.cloud.dataform.v1alpha2.Repository.IGitRemoteSettings} message GitRemoteSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GitRemoteSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.url); + if (message.defaultBranch != null && Object.hasOwnProperty.call(message, "defaultBranch")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.defaultBranch); + if (message.authenticationTokenSecretVersion != null && Object.hasOwnProperty.call(message, "authenticationTokenSecretVersion")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.authenticationTokenSecretVersion); + if (message.tokenStatus != null && Object.hasOwnProperty.call(message, "tokenStatus")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.tokenStatus); + return writer; + }; + + /** + * Encodes the specified GitRemoteSettings message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + * @static + * @param {google.cloud.dataform.v1alpha2.Repository.IGitRemoteSettings} message GitRemoteSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GitRemoteSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GitRemoteSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings} GitRemoteSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GitRemoteSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.url = reader.string(); + break; + case 2: + message.defaultBranch = reader.string(); + break; + case 3: + message.authenticationTokenSecretVersion = reader.string(); + break; + case 4: + message.tokenStatus = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GitRemoteSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings} GitRemoteSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GitRemoteSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GitRemoteSettings message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GitRemoteSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + if (message.defaultBranch != null && message.hasOwnProperty("defaultBranch")) + if (!$util.isString(message.defaultBranch)) + return "defaultBranch: string expected"; + if (message.authenticationTokenSecretVersion != null && message.hasOwnProperty("authenticationTokenSecretVersion")) + if (!$util.isString(message.authenticationTokenSecretVersion)) + return "authenticationTokenSecretVersion: string expected"; + if (message.tokenStatus != null && message.hasOwnProperty("tokenStatus")) + switch (message.tokenStatus) { + default: + return "tokenStatus: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a GitRemoteSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings} GitRemoteSettings + */ + GitRemoteSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings(); + if (object.url != null) + message.url = String(object.url); + if (object.defaultBranch != null) + message.defaultBranch = String(object.defaultBranch); + if (object.authenticationTokenSecretVersion != null) + message.authenticationTokenSecretVersion = String(object.authenticationTokenSecretVersion); + switch (object.tokenStatus) { + case "TOKEN_STATUS_UNSPECIFIED": + case 0: + message.tokenStatus = 0; + break; + case "NOT_FOUND": + case 1: + message.tokenStatus = 1; + break; + case "INVALID": + case 2: + message.tokenStatus = 2; + break; + case "VALID": + case 3: + message.tokenStatus = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a GitRemoteSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + * @static + * @param {google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings} message GitRemoteSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GitRemoteSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.url = ""; + object.defaultBranch = ""; + object.authenticationTokenSecretVersion = ""; + object.tokenStatus = options.enums === String ? "TOKEN_STATUS_UNSPECIFIED" : 0; + } + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + if (message.defaultBranch != null && message.hasOwnProperty("defaultBranch")) + object.defaultBranch = message.defaultBranch; + if (message.authenticationTokenSecretVersion != null && message.hasOwnProperty("authenticationTokenSecretVersion")) + object.authenticationTokenSecretVersion = message.authenticationTokenSecretVersion; + if (message.tokenStatus != null && message.hasOwnProperty("tokenStatus")) + object.tokenStatus = options.enums === String ? $root.google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.TokenStatus[message.tokenStatus] : message.tokenStatus; + return object; + }; + + /** + * Converts this GitRemoteSettings to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + * @instance + * @returns {Object.} JSON object + */ + GitRemoteSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * TokenStatus enum. + * @name google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.TokenStatus + * @enum {number} + * @property {number} TOKEN_STATUS_UNSPECIFIED=0 TOKEN_STATUS_UNSPECIFIED value + * @property {number} NOT_FOUND=1 NOT_FOUND value + * @property {number} INVALID=2 INVALID value + * @property {number} VALID=3 VALID value + */ + GitRemoteSettings.TokenStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TOKEN_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "NOT_FOUND"] = 1; + values[valuesById[2] = "INVALID"] = 2; + values[valuesById[3] = "VALID"] = 3; + return values; + })(); + + return GitRemoteSettings; + })(); + + return Repository; + })(); + + v1alpha2.ListRepositoriesRequest = (function() { + + /** + * Properties of a ListRepositoriesRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IListRepositoriesRequest + * @property {string|null} [parent] ListRepositoriesRequest parent + * @property {number|null} [pageSize] ListRepositoriesRequest pageSize + * @property {string|null} [pageToken] ListRepositoriesRequest pageToken + * @property {string|null} [orderBy] ListRepositoriesRequest orderBy + * @property {string|null} [filter] ListRepositoriesRequest filter + */ + + /** + * Constructs a new ListRepositoriesRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a ListRepositoriesRequest. + * @implements IListRepositoriesRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IListRepositoriesRequest=} [properties] Properties to set + */ + function ListRepositoriesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListRepositoriesRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.parent = ""; + + /** + * ListRepositoriesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.pageSize = 0; + + /** + * ListRepositoriesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.pageToken = ""; + + /** + * ListRepositoriesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.orderBy = ""; + + /** + * ListRepositoriesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.filter = ""; + + /** + * Creates a new ListRepositoriesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IListRepositoriesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.ListRepositoriesRequest} ListRepositoriesRequest instance + */ + ListRepositoriesRequest.create = function create(properties) { + return new ListRepositoriesRequest(properties); + }; + + /** + * Encodes the specified ListRepositoriesRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListRepositoriesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IListRepositoriesRequest} message ListRepositoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListRepositoriesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListRepositoriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IListRepositoriesRequest} message ListRepositoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.ListRepositoriesRequest} ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.ListRepositoriesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.orderBy = reader.string(); + break; + case 5: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.ListRepositoriesRequest} ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRepositoriesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRepositoriesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListRepositoriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.ListRepositoriesRequest} ListRepositoriesRequest + */ + ListRepositoriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.ListRepositoriesRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.ListRepositoriesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListRepositoriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ListRepositoriesRequest} message ListRepositoriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRepositoriesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListRepositoriesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @instance + * @returns {Object.} JSON object + */ + ListRepositoriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListRepositoriesRequest; + })(); + + v1alpha2.ListRepositoriesResponse = (function() { + + /** + * Properties of a ListRepositoriesResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IListRepositoriesResponse + * @property {Array.|null} [repositories] ListRepositoriesResponse repositories + * @property {string|null} [nextPageToken] ListRepositoriesResponse nextPageToken + */ + + /** + * Constructs a new ListRepositoriesResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a ListRepositoriesResponse. + * @implements IListRepositoriesResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IListRepositoriesResponse=} [properties] Properties to set + */ + function ListRepositoriesResponse(properties) { + this.repositories = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListRepositoriesResponse repositories. + * @member {Array.} repositories + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesResponse + * @instance + */ + ListRepositoriesResponse.prototype.repositories = $util.emptyArray; + + /** + * ListRepositoriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesResponse + * @instance + */ + ListRepositoriesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListRepositoriesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IListRepositoriesResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.ListRepositoriesResponse} ListRepositoriesResponse instance + */ + ListRepositoriesResponse.create = function create(properties) { + return new ListRepositoriesResponse(properties); + }; + + /** + * Encodes the specified ListRepositoriesResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListRepositoriesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IListRepositoriesResponse} message ListRepositoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.repositories != null && message.repositories.length) + for (var i = 0; i < message.repositories.length; ++i) + $root.google.cloud.dataform.v1alpha2.Repository.encode(message.repositories[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 ListRepositoriesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListRepositoriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IListRepositoriesResponse} message ListRepositoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.ListRepositoriesResponse} ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.ListRepositoriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.repositories && message.repositories.length)) + message.repositories = []; + message.repositories.push($root.google.cloud.dataform.v1alpha2.Repository.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.ListRepositoriesResponse} ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRepositoriesResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRepositoriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.repositories != null && message.hasOwnProperty("repositories")) { + if (!Array.isArray(message.repositories)) + return "repositories: array expected"; + for (var i = 0; i < message.repositories.length; ++i) { + var error = $root.google.cloud.dataform.v1alpha2.Repository.verify(message.repositories[i]); + if (error) + return "repositories." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListRepositoriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.ListRepositoriesResponse} ListRepositoriesResponse + */ + ListRepositoriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.ListRepositoriesResponse) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.ListRepositoriesResponse(); + if (object.repositories) { + if (!Array.isArray(object.repositories)) + throw TypeError(".google.cloud.dataform.v1alpha2.ListRepositoriesResponse.repositories: array expected"); + message.repositories = []; + for (var i = 0; i < object.repositories.length; ++i) { + if (typeof object.repositories[i] !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.ListRepositoriesResponse.repositories: object expected"); + message.repositories[i] = $root.google.cloud.dataform.v1alpha2.Repository.fromObject(object.repositories[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListRepositoriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.ListRepositoriesResponse} message ListRepositoriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRepositoriesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.repositories = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.repositories && message.repositories.length) { + object.repositories = []; + for (var j = 0; j < message.repositories.length; ++j) + object.repositories[j] = $root.google.cloud.dataform.v1alpha2.Repository.toObject(message.repositories[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListRepositoriesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesResponse + * @instance + * @returns {Object.} JSON object + */ + ListRepositoriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListRepositoriesResponse; + })(); + + v1alpha2.GetRepositoryRequest = (function() { + + /** + * Properties of a GetRepositoryRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IGetRepositoryRequest + * @property {string|null} [name] GetRepositoryRequest name + */ + + /** + * Constructs a new GetRepositoryRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a GetRepositoryRequest. + * @implements IGetRepositoryRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IGetRepositoryRequest=} [properties] Properties to set + */ + function GetRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetRepositoryRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.GetRepositoryRequest + * @instance + */ + GetRepositoryRequest.prototype.name = ""; + + /** + * Creates a new GetRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.GetRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IGetRepositoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.GetRepositoryRequest} GetRepositoryRequest instance + */ + GetRepositoryRequest.create = function create(properties) { + return new GetRepositoryRequest(properties); + }; + + /** + * Encodes the specified GetRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.GetRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IGetRepositoryRequest} message GetRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRepositoryRequest.encode = function encode(message, writer) { + 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 GetRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.GetRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IGetRepositoryRequest} message GetRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.GetRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.GetRepositoryRequest} GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRepositoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.GetRepositoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.GetRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.GetRepositoryRequest} GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRepositoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.GetRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRepositoryRequest.verify = function verify(message) { + if (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 GetRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.GetRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.GetRepositoryRequest} GetRepositoryRequest + */ + GetRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.GetRepositoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.GetRepositoryRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.GetRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.GetRepositoryRequest} message GetRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRepositoryRequest.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 GetRepositoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.GetRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + GetRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetRepositoryRequest; + })(); + + v1alpha2.CreateRepositoryRequest = (function() { + + /** + * Properties of a CreateRepositoryRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface ICreateRepositoryRequest + * @property {string|null} [parent] CreateRepositoryRequest parent + * @property {google.cloud.dataform.v1alpha2.IRepository|null} [repository] CreateRepositoryRequest repository + * @property {string|null} [repositoryId] CreateRepositoryRequest repositoryId + */ + + /** + * Constructs a new CreateRepositoryRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a CreateRepositoryRequest. + * @implements ICreateRepositoryRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.ICreateRepositoryRequest=} [properties] Properties to set + */ + function CreateRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateRepositoryRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1alpha2.CreateRepositoryRequest + * @instance + */ + CreateRepositoryRequest.prototype.parent = ""; + + /** + * CreateRepositoryRequest repository. + * @member {google.cloud.dataform.v1alpha2.IRepository|null|undefined} repository + * @memberof google.cloud.dataform.v1alpha2.CreateRepositoryRequest + * @instance + */ + CreateRepositoryRequest.prototype.repository = null; + + /** + * CreateRepositoryRequest repositoryId. + * @member {string} repositoryId + * @memberof google.cloud.dataform.v1alpha2.CreateRepositoryRequest + * @instance + */ + CreateRepositoryRequest.prototype.repositoryId = ""; + + /** + * Creates a new CreateRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CreateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICreateRepositoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CreateRepositoryRequest} CreateRepositoryRequest instance + */ + CreateRepositoryRequest.create = function create(properties) { + return new CreateRepositoryRequest(properties); + }; + + /** + * Encodes the specified CreateRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CreateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICreateRepositoryRequest} message CreateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateRepositoryRequest.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.repository != null && Object.hasOwnProperty.call(message, "repository")) + $root.google.cloud.dataform.v1alpha2.Repository.encode(message.repository, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.repositoryId != null && Object.hasOwnProperty.call(message, "repositoryId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.repositoryId); + return writer; + }; + + /** + * Encodes the specified CreateRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CreateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICreateRepositoryRequest} message CreateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CreateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CreateRepositoryRequest} CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateRepositoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CreateRepositoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.repository = $root.google.cloud.dataform.v1alpha2.Repository.decode(reader, reader.uint32()); + break; + case 3: + message.repositoryId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CreateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CreateRepositoryRequest} CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateRepositoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CreateRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateRepositoryRequest.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.repository != null && message.hasOwnProperty("repository")) { + var error = $root.google.cloud.dataform.v1alpha2.Repository.verify(message.repository); + if (error) + return "repository." + error; + } + if (message.repositoryId != null && message.hasOwnProperty("repositoryId")) + if (!$util.isString(message.repositoryId)) + return "repositoryId: string expected"; + return null; + }; + + /** + * Creates a CreateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CreateRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CreateRepositoryRequest} CreateRepositoryRequest + */ + CreateRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CreateRepositoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CreateRepositoryRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.repository != null) { + if (typeof object.repository !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CreateRepositoryRequest.repository: object expected"); + message.repository = $root.google.cloud.dataform.v1alpha2.Repository.fromObject(object.repository); + } + if (object.repositoryId != null) + message.repositoryId = String(object.repositoryId); + return message; + }; + + /** + * Creates a plain object from a CreateRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CreateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.CreateRepositoryRequest} message CreateRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.repository = null; + object.repositoryId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.repository != null && message.hasOwnProperty("repository")) + object.repository = $root.google.cloud.dataform.v1alpha2.Repository.toObject(message.repository, options); + if (message.repositoryId != null && message.hasOwnProperty("repositoryId")) + object.repositoryId = message.repositoryId; + return object; + }; + + /** + * Converts this CreateRepositoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CreateRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + CreateRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateRepositoryRequest; + })(); + + v1alpha2.UpdateRepositoryRequest = (function() { + + /** + * Properties of an UpdateRepositoryRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IUpdateRepositoryRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateRepositoryRequest updateMask + * @property {google.cloud.dataform.v1alpha2.IRepository|null} [repository] UpdateRepositoryRequest repository + */ + + /** + * Constructs a new UpdateRepositoryRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents an UpdateRepositoryRequest. + * @implements IUpdateRepositoryRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest=} [properties] Properties to set + */ + function UpdateRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateRepositoryRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataform.v1alpha2.UpdateRepositoryRequest + * @instance + */ + UpdateRepositoryRequest.prototype.updateMask = null; + + /** + * UpdateRepositoryRequest repository. + * @member {google.cloud.dataform.v1alpha2.IRepository|null|undefined} repository + * @memberof google.cloud.dataform.v1alpha2.UpdateRepositoryRequest + * @instance + */ + UpdateRepositoryRequest.prototype.repository = null; + + /** + * Creates a new UpdateRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.UpdateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.UpdateRepositoryRequest} UpdateRepositoryRequest instance + */ + UpdateRepositoryRequest.create = function create(properties) { + return new UpdateRepositoryRequest(properties); + }; + + /** + * Encodes the specified UpdateRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.UpdateRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.UpdateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest} message UpdateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateRepositoryRequest.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.repository != null && Object.hasOwnProperty.call(message, "repository")) + $root.google.cloud.dataform.v1alpha2.Repository.encode(message.repository, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.UpdateRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.UpdateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest} message UpdateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.UpdateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.UpdateRepositoryRequest} UpdateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateRepositoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 2: + message.repository = $root.google.cloud.dataform.v1alpha2.Repository.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.UpdateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.UpdateRepositoryRequest} UpdateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateRepositoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.UpdateRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateRepositoryRequest.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.repository != null && message.hasOwnProperty("repository")) { + var error = $root.google.cloud.dataform.v1alpha2.Repository.verify(message.repository); + if (error) + return "repository." + error; + } + return null; + }; + + /** + * Creates an UpdateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.UpdateRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.UpdateRepositoryRequest} UpdateRepositoryRequest + */ + UpdateRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.UpdateRepositoryRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.repository != null) { + if (typeof object.repository !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.UpdateRepositoryRequest.repository: object expected"); + message.repository = $root.google.cloud.dataform.v1alpha2.Repository.fromObject(object.repository); + } + return message; + }; + + /** + * Creates a plain object from an UpdateRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.UpdateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.UpdateRepositoryRequest} message UpdateRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.repository = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.repository != null && message.hasOwnProperty("repository")) + object.repository = $root.google.cloud.dataform.v1alpha2.Repository.toObject(message.repository, options); + return object; + }; + + /** + * Converts this UpdateRepositoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.UpdateRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateRepositoryRequest; + })(); + + v1alpha2.DeleteRepositoryRequest = (function() { + + /** + * Properties of a DeleteRepositoryRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IDeleteRepositoryRequest + * @property {string|null} [name] DeleteRepositoryRequest name + * @property {boolean|null} [force] DeleteRepositoryRequest force + */ + + /** + * Constructs a new DeleteRepositoryRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a DeleteRepositoryRequest. + * @implements IDeleteRepositoryRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest=} [properties] Properties to set + */ + function DeleteRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteRepositoryRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.DeleteRepositoryRequest + * @instance + */ + DeleteRepositoryRequest.prototype.name = ""; + + /** + * DeleteRepositoryRequest force. + * @member {boolean} force + * @memberof google.cloud.dataform.v1alpha2.DeleteRepositoryRequest + * @instance + */ + DeleteRepositoryRequest.prototype.force = false; + + /** + * Creates a new DeleteRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.DeleteRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.DeleteRepositoryRequest} DeleteRepositoryRequest instance + */ + DeleteRepositoryRequest.create = function create(properties) { + return new DeleteRepositoryRequest(properties); + }; + + /** + * Encodes the specified DeleteRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.DeleteRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.DeleteRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest} message DeleteRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteRepositoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + return writer; + }; + + /** + * Encodes the specified DeleteRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.DeleteRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.DeleteRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest} message DeleteRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.DeleteRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.DeleteRepositoryRequest} DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteRepositoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.force = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.DeleteRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.DeleteRepositoryRequest} DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteRepositoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.DeleteRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteRepositoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + return null; + }; + + /** + * Creates a DeleteRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.DeleteRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.DeleteRepositoryRequest} DeleteRepositoryRequest + */ + DeleteRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); + return message; + }; + + /** + * Creates a plain object from a DeleteRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.DeleteRepositoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.DeleteRepositoryRequest} message DeleteRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; + + /** + * Converts this DeleteRepositoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.DeleteRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteRepositoryRequest; + })(); + + v1alpha2.FetchRemoteBranchesRequest = (function() { + + /** + * Properties of a FetchRemoteBranchesRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IFetchRemoteBranchesRequest + * @property {string|null} [name] FetchRemoteBranchesRequest name + */ + + /** + * Constructs a new FetchRemoteBranchesRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a FetchRemoteBranchesRequest. + * @implements IFetchRemoteBranchesRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest=} [properties] Properties to set + */ + function FetchRemoteBranchesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchRemoteBranchesRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest + * @instance + */ + FetchRemoteBranchesRequest.prototype.name = ""; + + /** + * Creates a new FetchRemoteBranchesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest} FetchRemoteBranchesRequest instance + */ + FetchRemoteBranchesRequest.create = function create(properties) { + return new FetchRemoteBranchesRequest(properties); + }; + + /** + * Encodes the specified FetchRemoteBranchesRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest} message FetchRemoteBranchesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchRemoteBranchesRequest.encode = function encode(message, writer) { + 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 FetchRemoteBranchesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest} message FetchRemoteBranchesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchRemoteBranchesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchRemoteBranchesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest} FetchRemoteBranchesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchRemoteBranchesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchRemoteBranchesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest} FetchRemoteBranchesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchRemoteBranchesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchRemoteBranchesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchRemoteBranchesRequest.verify = function verify(message) { + if (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 FetchRemoteBranchesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest} FetchRemoteBranchesRequest + */ + FetchRemoteBranchesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a FetchRemoteBranchesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest} message FetchRemoteBranchesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchRemoteBranchesRequest.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 FetchRemoteBranchesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest + * @instance + * @returns {Object.} JSON object + */ + FetchRemoteBranchesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FetchRemoteBranchesRequest; + })(); + + v1alpha2.FetchRemoteBranchesResponse = (function() { + + /** + * Properties of a FetchRemoteBranchesResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IFetchRemoteBranchesResponse + * @property {Array.|null} [branches] FetchRemoteBranchesResponse branches + */ + + /** + * Constructs a new FetchRemoteBranchesResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a FetchRemoteBranchesResponse. + * @implements IFetchRemoteBranchesResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse=} [properties] Properties to set + */ + function FetchRemoteBranchesResponse(properties) { + this.branches = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchRemoteBranchesResponse branches. + * @member {Array.} branches + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse + * @instance + */ + FetchRemoteBranchesResponse.prototype.branches = $util.emptyArray; + + /** + * Creates a new FetchRemoteBranchesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse} FetchRemoteBranchesResponse instance + */ + FetchRemoteBranchesResponse.create = function create(properties) { + return new FetchRemoteBranchesResponse(properties); + }; + + /** + * Encodes the specified FetchRemoteBranchesResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse} message FetchRemoteBranchesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchRemoteBranchesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.branches != null && message.branches.length) + for (var i = 0; i < message.branches.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.branches[i]); + return writer; + }; + + /** + * Encodes the specified FetchRemoteBranchesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse} message FetchRemoteBranchesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchRemoteBranchesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchRemoteBranchesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse} FetchRemoteBranchesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchRemoteBranchesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.branches && message.branches.length)) + message.branches = []; + message.branches.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchRemoteBranchesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse} FetchRemoteBranchesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchRemoteBranchesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchRemoteBranchesResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchRemoteBranchesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.branches != null && message.hasOwnProperty("branches")) { + if (!Array.isArray(message.branches)) + return "branches: array expected"; + for (var i = 0; i < message.branches.length; ++i) + if (!$util.isString(message.branches[i])) + return "branches: string[] expected"; + } + return null; + }; + + /** + * Creates a FetchRemoteBranchesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse} FetchRemoteBranchesResponse + */ + FetchRemoteBranchesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse(); + if (object.branches) { + if (!Array.isArray(object.branches)) + throw TypeError(".google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse.branches: array expected"); + message.branches = []; + for (var i = 0; i < object.branches.length; ++i) + message.branches[i] = String(object.branches[i]); + } + return message; + }; + + /** + * Creates a plain object from a FetchRemoteBranchesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse} message FetchRemoteBranchesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchRemoteBranchesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.branches = []; + if (message.branches && message.branches.length) { + object.branches = []; + for (var j = 0; j < message.branches.length; ++j) + object.branches[j] = message.branches[j]; + } + return object; + }; + + /** + * Converts this FetchRemoteBranchesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse + * @instance + * @returns {Object.} JSON object + */ + FetchRemoteBranchesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FetchRemoteBranchesResponse; + })(); + + v1alpha2.Workspace = (function() { + + /** + * Properties of a Workspace. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IWorkspace + * @property {string|null} [name] Workspace name + */ + + /** + * Constructs a new Workspace. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a Workspace. + * @implements IWorkspace + * @constructor + * @param {google.cloud.dataform.v1alpha2.IWorkspace=} [properties] Properties to set + */ + function Workspace(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Workspace name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.Workspace + * @instance + */ + Workspace.prototype.name = ""; + + /** + * Creates a new Workspace instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.Workspace + * @static + * @param {google.cloud.dataform.v1alpha2.IWorkspace=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.Workspace} Workspace instance + */ + Workspace.create = function create(properties) { + return new Workspace(properties); + }; + + /** + * Encodes the specified Workspace message. Does not implicitly {@link google.cloud.dataform.v1alpha2.Workspace.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.Workspace + * @static + * @param {google.cloud.dataform.v1alpha2.IWorkspace} message Workspace message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Workspace.encode = function encode(message, writer) { + 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 Workspace message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.Workspace.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.Workspace + * @static + * @param {google.cloud.dataform.v1alpha2.IWorkspace} message Workspace message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Workspace.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Workspace message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.Workspace + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.Workspace} Workspace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Workspace.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.Workspace(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Workspace message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.Workspace + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.Workspace} Workspace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Workspace.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Workspace message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.Workspace + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Workspace.verify = function verify(message) { + if (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 Workspace message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.Workspace + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.Workspace} Workspace + */ + Workspace.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.Workspace) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.Workspace(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a Workspace message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.Workspace + * @static + * @param {google.cloud.dataform.v1alpha2.Workspace} message Workspace + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Workspace.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 Workspace to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.Workspace + * @instance + * @returns {Object.} JSON object + */ + Workspace.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Workspace; + })(); + + v1alpha2.ListWorkspacesRequest = (function() { + + /** + * Properties of a ListWorkspacesRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IListWorkspacesRequest + * @property {string|null} [parent] ListWorkspacesRequest parent + * @property {number|null} [pageSize] ListWorkspacesRequest pageSize + * @property {string|null} [pageToken] ListWorkspacesRequest pageToken + * @property {string|null} [orderBy] ListWorkspacesRequest orderBy + * @property {string|null} [filter] ListWorkspacesRequest filter + */ + + /** + * Constructs a new ListWorkspacesRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a ListWorkspacesRequest. + * @implements IListWorkspacesRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IListWorkspacesRequest=} [properties] Properties to set + */ + function ListWorkspacesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListWorkspacesRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @instance + */ + ListWorkspacesRequest.prototype.parent = ""; + + /** + * ListWorkspacesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @instance + */ + ListWorkspacesRequest.prototype.pageSize = 0; + + /** + * ListWorkspacesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @instance + */ + ListWorkspacesRequest.prototype.pageToken = ""; + + /** + * ListWorkspacesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @instance + */ + ListWorkspacesRequest.prototype.orderBy = ""; + + /** + * ListWorkspacesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @instance + */ + ListWorkspacesRequest.prototype.filter = ""; + + /** + * Creates a new ListWorkspacesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IListWorkspacesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.ListWorkspacesRequest} ListWorkspacesRequest instance + */ + ListWorkspacesRequest.create = function create(properties) { + return new ListWorkspacesRequest(properties); + }; + + /** + * Encodes the specified ListWorkspacesRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkspacesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IListWorkspacesRequest} message ListWorkspacesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkspacesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListWorkspacesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkspacesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IListWorkspacesRequest} message ListWorkspacesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkspacesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWorkspacesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.ListWorkspacesRequest} ListWorkspacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkspacesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.ListWorkspacesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.orderBy = reader.string(); + break; + case 5: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListWorkspacesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.ListWorkspacesRequest} ListWorkspacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkspacesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWorkspacesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWorkspacesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListWorkspacesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.ListWorkspacesRequest} ListWorkspacesRequest + */ + ListWorkspacesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.ListWorkspacesRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.ListWorkspacesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListWorkspacesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ListWorkspacesRequest} message ListWorkspacesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWorkspacesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListWorkspacesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @instance + * @returns {Object.} JSON object + */ + ListWorkspacesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListWorkspacesRequest; + })(); + + v1alpha2.ListWorkspacesResponse = (function() { + + /** + * Properties of a ListWorkspacesResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IListWorkspacesResponse + * @property {Array.|null} [workspaces] ListWorkspacesResponse workspaces + * @property {string|null} [nextPageToken] ListWorkspacesResponse nextPageToken + */ + + /** + * Constructs a new ListWorkspacesResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a ListWorkspacesResponse. + * @implements IListWorkspacesResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IListWorkspacesResponse=} [properties] Properties to set + */ + function ListWorkspacesResponse(properties) { + this.workspaces = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListWorkspacesResponse workspaces. + * @member {Array.} workspaces + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesResponse + * @instance + */ + ListWorkspacesResponse.prototype.workspaces = $util.emptyArray; + + /** + * ListWorkspacesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesResponse + * @instance + */ + ListWorkspacesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListWorkspacesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IListWorkspacesResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.ListWorkspacesResponse} ListWorkspacesResponse instance + */ + ListWorkspacesResponse.create = function create(properties) { + return new ListWorkspacesResponse(properties); + }; + + /** + * Encodes the specified ListWorkspacesResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkspacesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IListWorkspacesResponse} message ListWorkspacesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkspacesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspaces != null && message.workspaces.length) + for (var i = 0; i < message.workspaces.length; ++i) + $root.google.cloud.dataform.v1alpha2.Workspace.encode(message.workspaces[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 ListWorkspacesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkspacesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IListWorkspacesResponse} message ListWorkspacesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkspacesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWorkspacesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.ListWorkspacesResponse} ListWorkspacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkspacesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.ListWorkspacesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.workspaces && message.workspaces.length)) + message.workspaces = []; + message.workspaces.push($root.google.cloud.dataform.v1alpha2.Workspace.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListWorkspacesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.ListWorkspacesResponse} ListWorkspacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkspacesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWorkspacesResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWorkspacesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspaces != null && message.hasOwnProperty("workspaces")) { + if (!Array.isArray(message.workspaces)) + return "workspaces: array expected"; + for (var i = 0; i < message.workspaces.length; ++i) { + var error = $root.google.cloud.dataform.v1alpha2.Workspace.verify(message.workspaces[i]); + if (error) + return "workspaces." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListWorkspacesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.ListWorkspacesResponse} ListWorkspacesResponse + */ + ListWorkspacesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.ListWorkspacesResponse) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.ListWorkspacesResponse(); + if (object.workspaces) { + if (!Array.isArray(object.workspaces)) + throw TypeError(".google.cloud.dataform.v1alpha2.ListWorkspacesResponse.workspaces: array expected"); + message.workspaces = []; + for (var i = 0; i < object.workspaces.length; ++i) { + if (typeof object.workspaces[i] !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.ListWorkspacesResponse.workspaces: object expected"); + message.workspaces[i] = $root.google.cloud.dataform.v1alpha2.Workspace.fromObject(object.workspaces[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListWorkspacesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.ListWorkspacesResponse} message ListWorkspacesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWorkspacesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.workspaces = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.workspaces && message.workspaces.length) { + object.workspaces = []; + for (var j = 0; j < message.workspaces.length; ++j) + object.workspaces[j] = $root.google.cloud.dataform.v1alpha2.Workspace.toObject(message.workspaces[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListWorkspacesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesResponse + * @instance + * @returns {Object.} JSON object + */ + ListWorkspacesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListWorkspacesResponse; + })(); + + v1alpha2.GetWorkspaceRequest = (function() { + + /** + * Properties of a GetWorkspaceRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IGetWorkspaceRequest + * @property {string|null} [name] GetWorkspaceRequest name + */ + + /** + * Constructs a new GetWorkspaceRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a GetWorkspaceRequest. + * @implements IGetWorkspaceRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IGetWorkspaceRequest=} [properties] Properties to set + */ + function GetWorkspaceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetWorkspaceRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.GetWorkspaceRequest + * @instance + */ + GetWorkspaceRequest.prototype.name = ""; + + /** + * Creates a new GetWorkspaceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.GetWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IGetWorkspaceRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.GetWorkspaceRequest} GetWorkspaceRequest instance + */ + GetWorkspaceRequest.create = function create(properties) { + return new GetWorkspaceRequest(properties); + }; + + /** + * Encodes the specified GetWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetWorkspaceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.GetWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IGetWorkspaceRequest} message GetWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWorkspaceRequest.encode = function encode(message, writer) { + 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 GetWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetWorkspaceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.GetWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IGetWorkspaceRequest} message GetWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWorkspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetWorkspaceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.GetWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.GetWorkspaceRequest} GetWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWorkspaceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.GetWorkspaceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetWorkspaceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.GetWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.GetWorkspaceRequest} GetWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWorkspaceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetWorkspaceRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.GetWorkspaceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetWorkspaceRequest.verify = function verify(message) { + if (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 GetWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.GetWorkspaceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.GetWorkspaceRequest} GetWorkspaceRequest + */ + GetWorkspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.GetWorkspaceRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.GetWorkspaceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetWorkspaceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.GetWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1alpha2.GetWorkspaceRequest} message GetWorkspaceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetWorkspaceRequest.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 GetWorkspaceRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.GetWorkspaceRequest + * @instance + * @returns {Object.} JSON object + */ + GetWorkspaceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetWorkspaceRequest; + })(); + + v1alpha2.CreateWorkspaceRequest = (function() { + + /** + * Properties of a CreateWorkspaceRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface ICreateWorkspaceRequest + * @property {string|null} [parent] CreateWorkspaceRequest parent + * @property {google.cloud.dataform.v1alpha2.IWorkspace|null} [workspace] CreateWorkspaceRequest workspace + * @property {string|null} [workspaceId] CreateWorkspaceRequest workspaceId + */ + + /** + * Constructs a new CreateWorkspaceRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a CreateWorkspaceRequest. + * @implements ICreateWorkspaceRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest=} [properties] Properties to set + */ + function CreateWorkspaceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateWorkspaceRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1alpha2.CreateWorkspaceRequest + * @instance + */ + CreateWorkspaceRequest.prototype.parent = ""; + + /** + * CreateWorkspaceRequest workspace. + * @member {google.cloud.dataform.v1alpha2.IWorkspace|null|undefined} workspace + * @memberof google.cloud.dataform.v1alpha2.CreateWorkspaceRequest + * @instance + */ + CreateWorkspaceRequest.prototype.workspace = null; + + /** + * CreateWorkspaceRequest workspaceId. + * @member {string} workspaceId + * @memberof google.cloud.dataform.v1alpha2.CreateWorkspaceRequest + * @instance + */ + CreateWorkspaceRequest.prototype.workspaceId = ""; + + /** + * Creates a new CreateWorkspaceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CreateWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CreateWorkspaceRequest} CreateWorkspaceRequest instance + */ + CreateWorkspaceRequest.create = function create(properties) { + return new CreateWorkspaceRequest(properties); + }; + + /** + * Encodes the specified CreateWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateWorkspaceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CreateWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest} message CreateWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateWorkspaceRequest.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.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + $root.google.cloud.dataform.v1alpha2.Workspace.encode(message.workspace, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.workspaceId != null && Object.hasOwnProperty.call(message, "workspaceId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.workspaceId); + return writer; + }; + + /** + * Encodes the specified CreateWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateWorkspaceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CreateWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest} message CreateWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateWorkspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateWorkspaceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CreateWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CreateWorkspaceRequest} CreateWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateWorkspaceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.workspace = $root.google.cloud.dataform.v1alpha2.Workspace.decode(reader, reader.uint32()); + break; + case 3: + message.workspaceId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateWorkspaceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CreateWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CreateWorkspaceRequest} CreateWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateWorkspaceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateWorkspaceRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CreateWorkspaceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateWorkspaceRequest.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.workspace != null && message.hasOwnProperty("workspace")) { + var error = $root.google.cloud.dataform.v1alpha2.Workspace.verify(message.workspace); + if (error) + return "workspace." + error; + } + if (message.workspaceId != null && message.hasOwnProperty("workspaceId")) + if (!$util.isString(message.workspaceId)) + return "workspaceId: string expected"; + return null; + }; + + /** + * Creates a CreateWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CreateWorkspaceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CreateWorkspaceRequest} CreateWorkspaceRequest + */ + CreateWorkspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.workspace != null) { + if (typeof object.workspace !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CreateWorkspaceRequest.workspace: object expected"); + message.workspace = $root.google.cloud.dataform.v1alpha2.Workspace.fromObject(object.workspace); + } + if (object.workspaceId != null) + message.workspaceId = String(object.workspaceId); + return message; + }; + + /** + * Creates a plain object from a CreateWorkspaceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CreateWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1alpha2.CreateWorkspaceRequest} message CreateWorkspaceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateWorkspaceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.workspace = null; + object.workspaceId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = $root.google.cloud.dataform.v1alpha2.Workspace.toObject(message.workspace, options); + if (message.workspaceId != null && message.hasOwnProperty("workspaceId")) + object.workspaceId = message.workspaceId; + return object; + }; + + /** + * Converts this CreateWorkspaceRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CreateWorkspaceRequest + * @instance + * @returns {Object.} JSON object + */ + CreateWorkspaceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateWorkspaceRequest; + })(); + + v1alpha2.DeleteWorkspaceRequest = (function() { + + /** + * Properties of a DeleteWorkspaceRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IDeleteWorkspaceRequest + * @property {string|null} [name] DeleteWorkspaceRequest name + */ + + /** + * Constructs a new DeleteWorkspaceRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a DeleteWorkspaceRequest. + * @implements IDeleteWorkspaceRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest=} [properties] Properties to set + */ + function DeleteWorkspaceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteWorkspaceRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest + * @instance + */ + DeleteWorkspaceRequest.prototype.name = ""; + + /** + * Creates a new DeleteWorkspaceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest} DeleteWorkspaceRequest instance + */ + DeleteWorkspaceRequest.create = function create(properties) { + return new DeleteWorkspaceRequest(properties); + }; + + /** + * Encodes the specified DeleteWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest} message DeleteWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteWorkspaceRequest.encode = function encode(message, writer) { + 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 DeleteWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest} message DeleteWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteWorkspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteWorkspaceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest} DeleteWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteWorkspaceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteWorkspaceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest} DeleteWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteWorkspaceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteWorkspaceRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteWorkspaceRequest.verify = function verify(message) { + if (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 DeleteWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest} DeleteWorkspaceRequest + */ + DeleteWorkspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteWorkspaceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest} message DeleteWorkspaceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteWorkspaceRequest.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 DeleteWorkspaceRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteWorkspaceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteWorkspaceRequest; + })(); + + v1alpha2.CommitAuthor = (function() { + + /** + * Properties of a CommitAuthor. + * @memberof google.cloud.dataform.v1alpha2 + * @interface ICommitAuthor + * @property {string|null} [name] CommitAuthor name + * @property {string|null} [emailAddress] CommitAuthor emailAddress + */ + + /** + * Constructs a new CommitAuthor. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a CommitAuthor. + * @implements ICommitAuthor + * @constructor + * @param {google.cloud.dataform.v1alpha2.ICommitAuthor=} [properties] Properties to set + */ + function CommitAuthor(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommitAuthor name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.CommitAuthor + * @instance + */ + CommitAuthor.prototype.name = ""; + + /** + * CommitAuthor emailAddress. + * @member {string} emailAddress + * @memberof google.cloud.dataform.v1alpha2.CommitAuthor + * @instance + */ + CommitAuthor.prototype.emailAddress = ""; + + /** + * Creates a new CommitAuthor instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CommitAuthor + * @static + * @param {google.cloud.dataform.v1alpha2.ICommitAuthor=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CommitAuthor} CommitAuthor instance + */ + CommitAuthor.create = function create(properties) { + return new CommitAuthor(properties); + }; + + /** + * Encodes the specified CommitAuthor message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CommitAuthor.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CommitAuthor + * @static + * @param {google.cloud.dataform.v1alpha2.ICommitAuthor} message CommitAuthor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitAuthor.encode = function encode(message, writer) { + 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.emailAddress != null && Object.hasOwnProperty.call(message, "emailAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.emailAddress); + return writer; + }; + + /** + * Encodes the specified CommitAuthor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CommitAuthor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CommitAuthor + * @static + * @param {google.cloud.dataform.v1alpha2.ICommitAuthor} message CommitAuthor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitAuthor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommitAuthor message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CommitAuthor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CommitAuthor} CommitAuthor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitAuthor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CommitAuthor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.emailAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommitAuthor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CommitAuthor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CommitAuthor} CommitAuthor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitAuthor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommitAuthor message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CommitAuthor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommitAuthor.verify = function verify(message) { + if (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.emailAddress != null && message.hasOwnProperty("emailAddress")) + if (!$util.isString(message.emailAddress)) + return "emailAddress: string expected"; + return null; + }; + + /** + * Creates a CommitAuthor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CommitAuthor + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CommitAuthor} CommitAuthor + */ + CommitAuthor.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CommitAuthor) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CommitAuthor(); + if (object.name != null) + message.name = String(object.name); + if (object.emailAddress != null) + message.emailAddress = String(object.emailAddress); + return message; + }; + + /** + * Creates a plain object from a CommitAuthor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CommitAuthor + * @static + * @param {google.cloud.dataform.v1alpha2.CommitAuthor} message CommitAuthor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommitAuthor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.emailAddress = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.emailAddress != null && message.hasOwnProperty("emailAddress")) + object.emailAddress = message.emailAddress; + return object; + }; + + /** + * Converts this CommitAuthor to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CommitAuthor + * @instance + * @returns {Object.} JSON object + */ + CommitAuthor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommitAuthor; + })(); + + v1alpha2.PullGitCommitsRequest = (function() { + + /** + * Properties of a PullGitCommitsRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IPullGitCommitsRequest + * @property {string|null} [name] PullGitCommitsRequest name + * @property {string|null} [remoteBranch] PullGitCommitsRequest remoteBranch + * @property {google.cloud.dataform.v1alpha2.ICommitAuthor|null} [author] PullGitCommitsRequest author + */ + + /** + * Constructs a new PullGitCommitsRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a PullGitCommitsRequest. + * @implements IPullGitCommitsRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IPullGitCommitsRequest=} [properties] Properties to set + */ + function PullGitCommitsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PullGitCommitsRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.PullGitCommitsRequest + * @instance + */ + PullGitCommitsRequest.prototype.name = ""; + + /** + * PullGitCommitsRequest remoteBranch. + * @member {string} remoteBranch + * @memberof google.cloud.dataform.v1alpha2.PullGitCommitsRequest + * @instance + */ + PullGitCommitsRequest.prototype.remoteBranch = ""; + + /** + * PullGitCommitsRequest author. + * @member {google.cloud.dataform.v1alpha2.ICommitAuthor|null|undefined} author + * @memberof google.cloud.dataform.v1alpha2.PullGitCommitsRequest + * @instance + */ + PullGitCommitsRequest.prototype.author = null; + + /** + * Creates a new PullGitCommitsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.PullGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IPullGitCommitsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.PullGitCommitsRequest} PullGitCommitsRequest instance + */ + PullGitCommitsRequest.create = function create(properties) { + return new PullGitCommitsRequest(properties); + }; + + /** + * Encodes the specified PullGitCommitsRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.PullGitCommitsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.PullGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IPullGitCommitsRequest} message PullGitCommitsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PullGitCommitsRequest.encode = function encode(message, writer) { + 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.remoteBranch != null && Object.hasOwnProperty.call(message, "remoteBranch")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.remoteBranch); + if (message.author != null && Object.hasOwnProperty.call(message, "author")) + $root.google.cloud.dataform.v1alpha2.CommitAuthor.encode(message.author, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PullGitCommitsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.PullGitCommitsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.PullGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IPullGitCommitsRequest} message PullGitCommitsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PullGitCommitsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PullGitCommitsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.PullGitCommitsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.PullGitCommitsRequest} PullGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PullGitCommitsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.PullGitCommitsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.remoteBranch = reader.string(); + break; + case 3: + message.author = $root.google.cloud.dataform.v1alpha2.CommitAuthor.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PullGitCommitsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.PullGitCommitsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.PullGitCommitsRequest} PullGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PullGitCommitsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PullGitCommitsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.PullGitCommitsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PullGitCommitsRequest.verify = function verify(message) { + if (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.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + if (!$util.isString(message.remoteBranch)) + return "remoteBranch: string expected"; + if (message.author != null && message.hasOwnProperty("author")) { + var error = $root.google.cloud.dataform.v1alpha2.CommitAuthor.verify(message.author); + if (error) + return "author." + error; + } + return null; + }; + + /** + * Creates a PullGitCommitsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.PullGitCommitsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.PullGitCommitsRequest} PullGitCommitsRequest + */ + PullGitCommitsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.PullGitCommitsRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.PullGitCommitsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.remoteBranch != null) + message.remoteBranch = String(object.remoteBranch); + if (object.author != null) { + if (typeof object.author !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.PullGitCommitsRequest.author: object expected"); + message.author = $root.google.cloud.dataform.v1alpha2.CommitAuthor.fromObject(object.author); + } + return message; + }; + + /** + * Creates a plain object from a PullGitCommitsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.PullGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.PullGitCommitsRequest} message PullGitCommitsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PullGitCommitsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.remoteBranch = ""; + object.author = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + object.remoteBranch = message.remoteBranch; + if (message.author != null && message.hasOwnProperty("author")) + object.author = $root.google.cloud.dataform.v1alpha2.CommitAuthor.toObject(message.author, options); + return object; + }; + + /** + * Converts this PullGitCommitsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.PullGitCommitsRequest + * @instance + * @returns {Object.} JSON object + */ + PullGitCommitsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PullGitCommitsRequest; + })(); + + v1alpha2.PushGitCommitsRequest = (function() { + + /** + * Properties of a PushGitCommitsRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IPushGitCommitsRequest + * @property {string|null} [name] PushGitCommitsRequest name + * @property {string|null} [remoteBranch] PushGitCommitsRequest remoteBranch + */ + + /** + * Constructs a new PushGitCommitsRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a PushGitCommitsRequest. + * @implements IPushGitCommitsRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IPushGitCommitsRequest=} [properties] Properties to set + */ + function PushGitCommitsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PushGitCommitsRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.PushGitCommitsRequest + * @instance + */ + PushGitCommitsRequest.prototype.name = ""; + + /** + * PushGitCommitsRequest remoteBranch. + * @member {string} remoteBranch + * @memberof google.cloud.dataform.v1alpha2.PushGitCommitsRequest + * @instance + */ + PushGitCommitsRequest.prototype.remoteBranch = ""; + + /** + * Creates a new PushGitCommitsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.PushGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IPushGitCommitsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.PushGitCommitsRequest} PushGitCommitsRequest instance + */ + PushGitCommitsRequest.create = function create(properties) { + return new PushGitCommitsRequest(properties); + }; + + /** + * Encodes the specified PushGitCommitsRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.PushGitCommitsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.PushGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IPushGitCommitsRequest} message PushGitCommitsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PushGitCommitsRequest.encode = function encode(message, writer) { + 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.remoteBranch != null && Object.hasOwnProperty.call(message, "remoteBranch")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.remoteBranch); + return writer; + }; + + /** + * Encodes the specified PushGitCommitsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.PushGitCommitsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.PushGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IPushGitCommitsRequest} message PushGitCommitsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PushGitCommitsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PushGitCommitsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.PushGitCommitsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.PushGitCommitsRequest} PushGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PushGitCommitsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.PushGitCommitsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.remoteBranch = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PushGitCommitsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.PushGitCommitsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.PushGitCommitsRequest} PushGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PushGitCommitsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PushGitCommitsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.PushGitCommitsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PushGitCommitsRequest.verify = function verify(message) { + if (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.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + if (!$util.isString(message.remoteBranch)) + return "remoteBranch: string expected"; + return null; + }; + + /** + * Creates a PushGitCommitsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.PushGitCommitsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.PushGitCommitsRequest} PushGitCommitsRequest + */ + PushGitCommitsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.PushGitCommitsRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.PushGitCommitsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.remoteBranch != null) + message.remoteBranch = String(object.remoteBranch); + return message; + }; + + /** + * Creates a plain object from a PushGitCommitsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.PushGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.PushGitCommitsRequest} message PushGitCommitsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PushGitCommitsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.remoteBranch = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + object.remoteBranch = message.remoteBranch; + return object; + }; + + /** + * Converts this PushGitCommitsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.PushGitCommitsRequest + * @instance + * @returns {Object.} JSON object + */ + PushGitCommitsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PushGitCommitsRequest; + })(); + + v1alpha2.FetchFileGitStatusesRequest = (function() { + + /** + * Properties of a FetchFileGitStatusesRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IFetchFileGitStatusesRequest + * @property {string|null} [name] FetchFileGitStatusesRequest name + */ + + /** + * Constructs a new FetchFileGitStatusesRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a FetchFileGitStatusesRequest. + * @implements IFetchFileGitStatusesRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest=} [properties] Properties to set + */ + function FetchFileGitStatusesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchFileGitStatusesRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest + * @instance + */ + FetchFileGitStatusesRequest.prototype.name = ""; + + /** + * Creates a new FetchFileGitStatusesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest} FetchFileGitStatusesRequest instance + */ + FetchFileGitStatusesRequest.create = function create(properties) { + return new FetchFileGitStatusesRequest(properties); + }; + + /** + * Encodes the specified FetchFileGitStatusesRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest} message FetchFileGitStatusesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileGitStatusesRequest.encode = function encode(message, writer) { + 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 FetchFileGitStatusesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest} message FetchFileGitStatusesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileGitStatusesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchFileGitStatusesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest} FetchFileGitStatusesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileGitStatusesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchFileGitStatusesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest} FetchFileGitStatusesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileGitStatusesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchFileGitStatusesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchFileGitStatusesRequest.verify = function verify(message) { + if (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 FetchFileGitStatusesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest} FetchFileGitStatusesRequest + */ + FetchFileGitStatusesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a FetchFileGitStatusesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest} message FetchFileGitStatusesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchFileGitStatusesRequest.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 FetchFileGitStatusesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest + * @instance + * @returns {Object.} JSON object + */ + FetchFileGitStatusesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FetchFileGitStatusesRequest; + })(); + + v1alpha2.FetchFileGitStatusesResponse = (function() { + + /** + * Properties of a FetchFileGitStatusesResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IFetchFileGitStatusesResponse + * @property {Array.|null} [uncommittedFileChanges] FetchFileGitStatusesResponse uncommittedFileChanges + */ + + /** + * Constructs a new FetchFileGitStatusesResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a FetchFileGitStatusesResponse. + * @implements IFetchFileGitStatusesResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse=} [properties] Properties to set + */ + function FetchFileGitStatusesResponse(properties) { + this.uncommittedFileChanges = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchFileGitStatusesResponse uncommittedFileChanges. + * @member {Array.} uncommittedFileChanges + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse + * @instance + */ + FetchFileGitStatusesResponse.prototype.uncommittedFileChanges = $util.emptyArray; + + /** + * Creates a new FetchFileGitStatusesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse} FetchFileGitStatusesResponse instance + */ + FetchFileGitStatusesResponse.create = function create(properties) { + return new FetchFileGitStatusesResponse(properties); + }; + + /** + * Encodes the specified FetchFileGitStatusesResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse} message FetchFileGitStatusesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileGitStatusesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uncommittedFileChanges != null && message.uncommittedFileChanges.length) + for (var i = 0; i < message.uncommittedFileChanges.length; ++i) + $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.encode(message.uncommittedFileChanges[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FetchFileGitStatusesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse} message FetchFileGitStatusesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileGitStatusesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchFileGitStatusesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse} FetchFileGitStatusesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileGitStatusesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.uncommittedFileChanges && message.uncommittedFileChanges.length)) + message.uncommittedFileChanges = []; + message.uncommittedFileChanges.push($root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchFileGitStatusesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse} FetchFileGitStatusesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileGitStatusesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchFileGitStatusesResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchFileGitStatusesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uncommittedFileChanges != null && message.hasOwnProperty("uncommittedFileChanges")) { + if (!Array.isArray(message.uncommittedFileChanges)) + return "uncommittedFileChanges: array expected"; + for (var i = 0; i < message.uncommittedFileChanges.length; ++i) { + var error = $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.verify(message.uncommittedFileChanges[i]); + if (error) + return "uncommittedFileChanges." + error; + } + } + return null; + }; + + /** + * Creates a FetchFileGitStatusesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse} FetchFileGitStatusesResponse + */ + FetchFileGitStatusesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse(); + if (object.uncommittedFileChanges) { + if (!Array.isArray(object.uncommittedFileChanges)) + throw TypeError(".google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.uncommittedFileChanges: array expected"); + message.uncommittedFileChanges = []; + for (var i = 0; i < object.uncommittedFileChanges.length; ++i) { + if (typeof object.uncommittedFileChanges[i] !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.uncommittedFileChanges: object expected"); + message.uncommittedFileChanges[i] = $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.fromObject(object.uncommittedFileChanges[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FetchFileGitStatusesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse} message FetchFileGitStatusesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchFileGitStatusesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uncommittedFileChanges = []; + if (message.uncommittedFileChanges && message.uncommittedFileChanges.length) { + object.uncommittedFileChanges = []; + for (var j = 0; j < message.uncommittedFileChanges.length; ++j) + object.uncommittedFileChanges[j] = $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.toObject(message.uncommittedFileChanges[j], options); + } + return object; + }; + + /** + * Converts this FetchFileGitStatusesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse + * @instance + * @returns {Object.} JSON object + */ + FetchFileGitStatusesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + FetchFileGitStatusesResponse.UncommittedFileChange = (function() { + + /** + * Properties of an UncommittedFileChange. + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse + * @interface IUncommittedFileChange + * @property {string|null} [path] UncommittedFileChange path + * @property {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.State|null} [state] UncommittedFileChange state + */ + + /** + * Constructs a new UncommittedFileChange. + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse + * @classdesc Represents an UncommittedFileChange. + * @implements IUncommittedFileChange + * @constructor + * @param {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.IUncommittedFileChange=} [properties] Properties to set + */ + function UncommittedFileChange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UncommittedFileChange path. + * @member {string} path + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange + * @instance + */ + UncommittedFileChange.prototype.path = ""; + + /** + * UncommittedFileChange state. + * @member {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.State} state + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange + * @instance + */ + UncommittedFileChange.prototype.state = 0; + + /** + * Creates a new UncommittedFileChange instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.IUncommittedFileChange=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange} UncommittedFileChange instance + */ + UncommittedFileChange.create = function create(properties) { + return new UncommittedFileChange(properties); + }; + + /** + * Encodes the specified UncommittedFileChange message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.IUncommittedFileChange} message UncommittedFileChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UncommittedFileChange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + return writer; + }; + + /** + * Encodes the specified UncommittedFileChange message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.IUncommittedFileChange} message UncommittedFileChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UncommittedFileChange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UncommittedFileChange message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange} UncommittedFileChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UncommittedFileChange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.path = reader.string(); + break; + case 2: + message.state = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UncommittedFileChange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange} UncommittedFileChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UncommittedFileChange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UncommittedFileChange message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UncommittedFileChange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates an UncommittedFileChange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange} UncommittedFileChange + */ + UncommittedFileChange.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange(); + if (object.path != null) + message.path = String(object.path); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ADDED": + case 1: + message.state = 1; + break; + case "DELETED": + case 2: + message.state = 2; + break; + case "MODIFIED": + case 3: + message.state = 3; + break; + case "HAS_CONFLICTS": + case 4: + message.state = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from an UncommittedFileChange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange} message UncommittedFileChange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UncommittedFileChange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.path = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + } + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.State[message.state] : message.state; + return object; + }; + + /** + * Converts this UncommittedFileChange to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange + * @instance + * @returns {Object.} JSON object + */ + UncommittedFileChange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * State enum. + * @name google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ADDED=1 ADDED value + * @property {number} DELETED=2 DELETED value + * @property {number} MODIFIED=3 MODIFIED value + * @property {number} HAS_CONFLICTS=4 HAS_CONFLICTS value + */ + UncommittedFileChange.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADDED"] = 1; + values[valuesById[2] = "DELETED"] = 2; + values[valuesById[3] = "MODIFIED"] = 3; + values[valuesById[4] = "HAS_CONFLICTS"] = 4; + return values; + })(); + + return UncommittedFileChange; + })(); + + return FetchFileGitStatusesResponse; + })(); + + v1alpha2.FetchGitAheadBehindRequest = (function() { + + /** + * Properties of a FetchGitAheadBehindRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IFetchGitAheadBehindRequest + * @property {string|null} [name] FetchGitAheadBehindRequest name + * @property {string|null} [remoteBranch] FetchGitAheadBehindRequest remoteBranch + */ + + /** + * Constructs a new FetchGitAheadBehindRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a FetchGitAheadBehindRequest. + * @implements IFetchGitAheadBehindRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest=} [properties] Properties to set + */ + function FetchGitAheadBehindRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchGitAheadBehindRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest + * @instance + */ + FetchGitAheadBehindRequest.prototype.name = ""; + + /** + * FetchGitAheadBehindRequest remoteBranch. + * @member {string} remoteBranch + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest + * @instance + */ + FetchGitAheadBehindRequest.prototype.remoteBranch = ""; + + /** + * Creates a new FetchGitAheadBehindRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest} FetchGitAheadBehindRequest instance + */ + FetchGitAheadBehindRequest.create = function create(properties) { + return new FetchGitAheadBehindRequest(properties); + }; + + /** + * Encodes the specified FetchGitAheadBehindRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest} message FetchGitAheadBehindRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchGitAheadBehindRequest.encode = function encode(message, writer) { + 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.remoteBranch != null && Object.hasOwnProperty.call(message, "remoteBranch")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.remoteBranch); + return writer; + }; + + /** + * Encodes the specified FetchGitAheadBehindRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest} message FetchGitAheadBehindRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchGitAheadBehindRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchGitAheadBehindRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest} FetchGitAheadBehindRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchGitAheadBehindRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.remoteBranch = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchGitAheadBehindRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest} FetchGitAheadBehindRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchGitAheadBehindRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchGitAheadBehindRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchGitAheadBehindRequest.verify = function verify(message) { + if (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.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + if (!$util.isString(message.remoteBranch)) + return "remoteBranch: string expected"; + return null; + }; + + /** + * Creates a FetchGitAheadBehindRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest} FetchGitAheadBehindRequest + */ + FetchGitAheadBehindRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.remoteBranch != null) + message.remoteBranch = String(object.remoteBranch); + return message; + }; + + /** + * Creates a plain object from a FetchGitAheadBehindRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest + * @static + * @param {google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest} message FetchGitAheadBehindRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchGitAheadBehindRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.remoteBranch = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + object.remoteBranch = message.remoteBranch; + return object; + }; + + /** + * Converts this FetchGitAheadBehindRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest + * @instance + * @returns {Object.} JSON object + */ + FetchGitAheadBehindRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FetchGitAheadBehindRequest; + })(); + + v1alpha2.FetchGitAheadBehindResponse = (function() { + + /** + * Properties of a FetchGitAheadBehindResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IFetchGitAheadBehindResponse + * @property {number|null} [commitsAhead] FetchGitAheadBehindResponse commitsAhead + * @property {number|null} [commitsBehind] FetchGitAheadBehindResponse commitsBehind + */ + + /** + * Constructs a new FetchGitAheadBehindResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a FetchGitAheadBehindResponse. + * @implements IFetchGitAheadBehindResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse=} [properties] Properties to set + */ + function FetchGitAheadBehindResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchGitAheadBehindResponse commitsAhead. + * @member {number} commitsAhead + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse + * @instance + */ + FetchGitAheadBehindResponse.prototype.commitsAhead = 0; + + /** + * FetchGitAheadBehindResponse commitsBehind. + * @member {number} commitsBehind + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse + * @instance + */ + FetchGitAheadBehindResponse.prototype.commitsBehind = 0; + + /** + * Creates a new FetchGitAheadBehindResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse} FetchGitAheadBehindResponse instance + */ + FetchGitAheadBehindResponse.create = function create(properties) { + return new FetchGitAheadBehindResponse(properties); + }; + + /** + * Encodes the specified FetchGitAheadBehindResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse} message FetchGitAheadBehindResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchGitAheadBehindResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.commitsAhead != null && Object.hasOwnProperty.call(message, "commitsAhead")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.commitsAhead); + if (message.commitsBehind != null && Object.hasOwnProperty.call(message, "commitsBehind")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.commitsBehind); + return writer; + }; + + /** + * Encodes the specified FetchGitAheadBehindResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse} message FetchGitAheadBehindResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchGitAheadBehindResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchGitAheadBehindResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse} FetchGitAheadBehindResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchGitAheadBehindResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.commitsAhead = reader.int32(); + break; + case 2: + message.commitsBehind = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchGitAheadBehindResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse} FetchGitAheadBehindResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchGitAheadBehindResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchGitAheadBehindResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchGitAheadBehindResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.commitsAhead != null && message.hasOwnProperty("commitsAhead")) + if (!$util.isInteger(message.commitsAhead)) + return "commitsAhead: integer expected"; + if (message.commitsBehind != null && message.hasOwnProperty("commitsBehind")) + if (!$util.isInteger(message.commitsBehind)) + return "commitsBehind: integer expected"; + return null; + }; + + /** + * Creates a FetchGitAheadBehindResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse} FetchGitAheadBehindResponse + */ + FetchGitAheadBehindResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse(); + if (object.commitsAhead != null) + message.commitsAhead = object.commitsAhead | 0; + if (object.commitsBehind != null) + message.commitsBehind = object.commitsBehind | 0; + return message; + }; + + /** + * Creates a plain object from a FetchGitAheadBehindResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse + * @static + * @param {google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse} message FetchGitAheadBehindResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchGitAheadBehindResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.commitsAhead = 0; + object.commitsBehind = 0; + } + if (message.commitsAhead != null && message.hasOwnProperty("commitsAhead")) + object.commitsAhead = message.commitsAhead; + if (message.commitsBehind != null && message.hasOwnProperty("commitsBehind")) + object.commitsBehind = message.commitsBehind; + return object; + }; + + /** + * Converts this FetchGitAheadBehindResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse + * @instance + * @returns {Object.} JSON object + */ + FetchGitAheadBehindResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FetchGitAheadBehindResponse; + })(); + + v1alpha2.CommitWorkspaceChangesRequest = (function() { + + /** + * Properties of a CommitWorkspaceChangesRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface ICommitWorkspaceChangesRequest + * @property {string|null} [name] CommitWorkspaceChangesRequest name + * @property {google.cloud.dataform.v1alpha2.ICommitAuthor|null} [author] CommitWorkspaceChangesRequest author + * @property {string|null} [commitMessage] CommitWorkspaceChangesRequest commitMessage + * @property {Array.|null} [paths] CommitWorkspaceChangesRequest paths + */ + + /** + * Constructs a new CommitWorkspaceChangesRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a CommitWorkspaceChangesRequest. + * @implements ICommitWorkspaceChangesRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest=} [properties] Properties to set + */ + function CommitWorkspaceChangesRequest(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]]; + } + + /** + * CommitWorkspaceChangesRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + * @instance + */ + CommitWorkspaceChangesRequest.prototype.name = ""; + + /** + * CommitWorkspaceChangesRequest author. + * @member {google.cloud.dataform.v1alpha2.ICommitAuthor|null|undefined} author + * @memberof google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + * @instance + */ + CommitWorkspaceChangesRequest.prototype.author = null; + + /** + * CommitWorkspaceChangesRequest commitMessage. + * @member {string} commitMessage + * @memberof google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + * @instance + */ + CommitWorkspaceChangesRequest.prototype.commitMessage = ""; + + /** + * CommitWorkspaceChangesRequest paths. + * @member {Array.} paths + * @memberof google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + * @instance + */ + CommitWorkspaceChangesRequest.prototype.paths = $util.emptyArray; + + /** + * Creates a new CommitWorkspaceChangesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest} CommitWorkspaceChangesRequest instance + */ + CommitWorkspaceChangesRequest.create = function create(properties) { + return new CommitWorkspaceChangesRequest(properties); + }; + + /** + * Encodes the specified CommitWorkspaceChangesRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest} message CommitWorkspaceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitWorkspaceChangesRequest.encode = function encode(message, writer) { + 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.commitMessage != null && Object.hasOwnProperty.call(message, "commitMessage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.commitMessage); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.paths[i]); + if (message.author != null && Object.hasOwnProperty.call(message, "author")) + $root.google.cloud.dataform.v1alpha2.CommitAuthor.encode(message.author, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CommitWorkspaceChangesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest} message CommitWorkspaceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitWorkspaceChangesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommitWorkspaceChangesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest} CommitWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitWorkspaceChangesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 4: + message.author = $root.google.cloud.dataform.v1alpha2.CommitAuthor.decode(reader, reader.uint32()); + break; + case 2: + message.commitMessage = reader.string(); + break; + case 3: + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommitWorkspaceChangesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest} CommitWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitWorkspaceChangesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommitWorkspaceChangesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommitWorkspaceChangesRequest.verify = function verify(message) { + if (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.author != null && message.hasOwnProperty("author")) { + var error = $root.google.cloud.dataform.v1alpha2.CommitAuthor.verify(message.author); + if (error) + return "author." + error; + } + if (message.commitMessage != null && message.hasOwnProperty("commitMessage")) + if (!$util.isString(message.commitMessage)) + return "commitMessage: 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 CommitWorkspaceChangesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest} CommitWorkspaceChangesRequest + */ + CommitWorkspaceChangesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.author != null) { + if (typeof object.author !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest.author: object expected"); + message.author = $root.google.cloud.dataform.v1alpha2.CommitAuthor.fromObject(object.author); + } + if (object.commitMessage != null) + message.commitMessage = String(object.commitMessage); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest.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 CommitWorkspaceChangesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest} message CommitWorkspaceChangesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommitWorkspaceChangesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (options.defaults) { + object.name = ""; + object.commitMessage = ""; + object.author = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.commitMessage != null && message.hasOwnProperty("commitMessage")) + object.commitMessage = message.commitMessage; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + if (message.author != null && message.hasOwnProperty("author")) + object.author = $root.google.cloud.dataform.v1alpha2.CommitAuthor.toObject(message.author, options); + return object; + }; + + /** + * Converts this CommitWorkspaceChangesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + * @instance + * @returns {Object.} JSON object + */ + CommitWorkspaceChangesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommitWorkspaceChangesRequest; + })(); + + v1alpha2.ResetWorkspaceChangesRequest = (function() { + + /** + * Properties of a ResetWorkspaceChangesRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IResetWorkspaceChangesRequest + * @property {string|null} [name] ResetWorkspaceChangesRequest name + * @property {Array.|null} [paths] ResetWorkspaceChangesRequest paths + * @property {boolean|null} [clean] ResetWorkspaceChangesRequest clean + */ + + /** + * Constructs a new ResetWorkspaceChangesRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a ResetWorkspaceChangesRequest. + * @implements IResetWorkspaceChangesRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest=} [properties] Properties to set + */ + function ResetWorkspaceChangesRequest(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]]; + } + + /** + * ResetWorkspaceChangesRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest + * @instance + */ + ResetWorkspaceChangesRequest.prototype.name = ""; + + /** + * ResetWorkspaceChangesRequest paths. + * @member {Array.} paths + * @memberof google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest + * @instance + */ + ResetWorkspaceChangesRequest.prototype.paths = $util.emptyArray; + + /** + * ResetWorkspaceChangesRequest clean. + * @member {boolean} clean + * @memberof google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest + * @instance + */ + ResetWorkspaceChangesRequest.prototype.clean = false; + + /** + * Creates a new ResetWorkspaceChangesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest} ResetWorkspaceChangesRequest instance + */ + ResetWorkspaceChangesRequest.create = function create(properties) { + return new ResetWorkspaceChangesRequest(properties); + }; + + /** + * Encodes the specified ResetWorkspaceChangesRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest} message ResetWorkspaceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResetWorkspaceChangesRequest.encode = function encode(message, writer) { + 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.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]); + if (message.clean != null && Object.hasOwnProperty.call(message, "clean")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.clean); + return writer; + }; + + /** + * Encodes the specified ResetWorkspaceChangesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest} message ResetWorkspaceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResetWorkspaceChangesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResetWorkspaceChangesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest} ResetWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResetWorkspaceChangesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + case 3: + message.clean = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResetWorkspaceChangesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest} ResetWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResetWorkspaceChangesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResetWorkspaceChangesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResetWorkspaceChangesRequest.verify = function verify(message) { + if (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.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"; + } + if (message.clean != null && message.hasOwnProperty("clean")) + if (typeof message.clean !== "boolean") + return "clean: boolean expected"; + return null; + }; + + /** + * Creates a ResetWorkspaceChangesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest} ResetWorkspaceChangesRequest + */ + ResetWorkspaceChangesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + if (object.clean != null) + message.clean = Boolean(object.clean); + return message; + }; + + /** + * Creates a plain object from a ResetWorkspaceChangesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest} message ResetWorkspaceChangesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResetWorkspaceChangesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (options.defaults) { + object.name = ""; + object.clean = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + if (message.clean != null && message.hasOwnProperty("clean")) + object.clean = message.clean; + return object; + }; + + /** + * Converts this ResetWorkspaceChangesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest + * @instance + * @returns {Object.} JSON object + */ + ResetWorkspaceChangesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResetWorkspaceChangesRequest; + })(); + + v1alpha2.FetchFileDiffRequest = (function() { + + /** + * Properties of a FetchFileDiffRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IFetchFileDiffRequest + * @property {string|null} [workspace] FetchFileDiffRequest workspace + * @property {string|null} [path] FetchFileDiffRequest path + */ + + /** + * Constructs a new FetchFileDiffRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a FetchFileDiffRequest. + * @implements IFetchFileDiffRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IFetchFileDiffRequest=} [properties] Properties to set + */ + function FetchFileDiffRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchFileDiffRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffRequest + * @instance + */ + FetchFileDiffRequest.prototype.workspace = ""; + + /** + * FetchFileDiffRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffRequest + * @instance + */ + FetchFileDiffRequest.prototype.path = ""; + + /** + * Creates a new FetchFileDiffRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchFileDiffRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.FetchFileDiffRequest} FetchFileDiffRequest instance + */ + FetchFileDiffRequest.create = function create(properties) { + return new FetchFileDiffRequest(properties); + }; + + /** + * Encodes the specified FetchFileDiffRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileDiffRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchFileDiffRequest} message FetchFileDiffRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileDiffRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified FetchFileDiffRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileDiffRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchFileDiffRequest} message FetchFileDiffRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileDiffRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchFileDiffRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.FetchFileDiffRequest} FetchFileDiffRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileDiffRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.FetchFileDiffRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchFileDiffRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.FetchFileDiffRequest} FetchFileDiffRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileDiffRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchFileDiffRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchFileDiffRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a FetchFileDiffRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.FetchFileDiffRequest} FetchFileDiffRequest + */ + FetchFileDiffRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.FetchFileDiffRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.FetchFileDiffRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a FetchFileDiffRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffRequest + * @static + * @param {google.cloud.dataform.v1alpha2.FetchFileDiffRequest} message FetchFileDiffRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchFileDiffRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this FetchFileDiffRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffRequest + * @instance + * @returns {Object.} JSON object + */ + FetchFileDiffRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FetchFileDiffRequest; + })(); + + v1alpha2.FetchFileDiffResponse = (function() { + + /** + * Properties of a FetchFileDiffResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IFetchFileDiffResponse + * @property {string|null} [formattedDiff] FetchFileDiffResponse formattedDiff + */ + + /** + * Constructs a new FetchFileDiffResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a FetchFileDiffResponse. + * @implements IFetchFileDiffResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IFetchFileDiffResponse=} [properties] Properties to set + */ + function FetchFileDiffResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchFileDiffResponse formattedDiff. + * @member {string} formattedDiff + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffResponse + * @instance + */ + FetchFileDiffResponse.prototype.formattedDiff = ""; + + /** + * Creates a new FetchFileDiffResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchFileDiffResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.FetchFileDiffResponse} FetchFileDiffResponse instance + */ + FetchFileDiffResponse.create = function create(properties) { + return new FetchFileDiffResponse(properties); + }; + + /** + * Encodes the specified FetchFileDiffResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileDiffResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchFileDiffResponse} message FetchFileDiffResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileDiffResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.formattedDiff != null && Object.hasOwnProperty.call(message, "formattedDiff")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.formattedDiff); + return writer; + }; + + /** + * Encodes the specified FetchFileDiffResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.FetchFileDiffResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IFetchFileDiffResponse} message FetchFileDiffResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileDiffResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchFileDiffResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.FetchFileDiffResponse} FetchFileDiffResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileDiffResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.FetchFileDiffResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.formattedDiff = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchFileDiffResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.FetchFileDiffResponse} FetchFileDiffResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileDiffResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchFileDiffResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchFileDiffResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.formattedDiff != null && message.hasOwnProperty("formattedDiff")) + if (!$util.isString(message.formattedDiff)) + return "formattedDiff: string expected"; + return null; + }; + + /** + * Creates a FetchFileDiffResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.FetchFileDiffResponse} FetchFileDiffResponse + */ + FetchFileDiffResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.FetchFileDiffResponse) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.FetchFileDiffResponse(); + if (object.formattedDiff != null) + message.formattedDiff = String(object.formattedDiff); + return message; + }; + + /** + * Creates a plain object from a FetchFileDiffResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffResponse + * @static + * @param {google.cloud.dataform.v1alpha2.FetchFileDiffResponse} message FetchFileDiffResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchFileDiffResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.formattedDiff = ""; + if (message.formattedDiff != null && message.hasOwnProperty("formattedDiff")) + object.formattedDiff = message.formattedDiff; + return object; + }; + + /** + * Converts this FetchFileDiffResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffResponse + * @instance + * @returns {Object.} JSON object + */ + FetchFileDiffResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FetchFileDiffResponse; + })(); + + v1alpha2.QueryDirectoryContentsRequest = (function() { + + /** + * Properties of a QueryDirectoryContentsRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IQueryDirectoryContentsRequest + * @property {string|null} [workspace] QueryDirectoryContentsRequest workspace + * @property {string|null} [path] QueryDirectoryContentsRequest path + * @property {number|null} [pageSize] QueryDirectoryContentsRequest pageSize + * @property {string|null} [pageToken] QueryDirectoryContentsRequest pageToken + */ + + /** + * Constructs a new QueryDirectoryContentsRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a QueryDirectoryContentsRequest. + * @implements IQueryDirectoryContentsRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest=} [properties] Properties to set + */ + function QueryDirectoryContentsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDirectoryContentsRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + * @instance + */ + QueryDirectoryContentsRequest.prototype.workspace = ""; + + /** + * QueryDirectoryContentsRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + * @instance + */ + QueryDirectoryContentsRequest.prototype.path = ""; + + /** + * QueryDirectoryContentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + * @instance + */ + QueryDirectoryContentsRequest.prototype.pageSize = 0; + + /** + * QueryDirectoryContentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + * @instance + */ + QueryDirectoryContentsRequest.prototype.pageToken = ""; + + /** + * Creates a new QueryDirectoryContentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest} QueryDirectoryContentsRequest instance + */ + QueryDirectoryContentsRequest.create = function create(properties) { + return new QueryDirectoryContentsRequest(properties); + }; + + /** + * Encodes the specified QueryDirectoryContentsRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest} message QueryDirectoryContentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDirectoryContentsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + 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); + return writer; + }; + + /** + * Encodes the specified QueryDirectoryContentsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest} message QueryDirectoryContentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDirectoryContentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDirectoryContentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest} QueryDirectoryContentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDirectoryContentsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + case 4: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDirectoryContentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest} QueryDirectoryContentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDirectoryContentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDirectoryContentsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDirectoryContentsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: 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 QueryDirectoryContentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest} QueryDirectoryContentsRequest + */ + QueryDirectoryContentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + 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 QueryDirectoryContentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest} message QueryDirectoryContentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDirectoryContentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this QueryDirectoryContentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryDirectoryContentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDirectoryContentsRequest; + })(); + + v1alpha2.QueryDirectoryContentsResponse = (function() { + + /** + * Properties of a QueryDirectoryContentsResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IQueryDirectoryContentsResponse + * @property {Array.|null} [directoryEntries] QueryDirectoryContentsResponse directoryEntries + * @property {string|null} [nextPageToken] QueryDirectoryContentsResponse nextPageToken + */ + + /** + * Constructs a new QueryDirectoryContentsResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a QueryDirectoryContentsResponse. + * @implements IQueryDirectoryContentsResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IQueryDirectoryContentsResponse=} [properties] Properties to set + */ + function QueryDirectoryContentsResponse(properties) { + this.directoryEntries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDirectoryContentsResponse directoryEntries. + * @member {Array.} directoryEntries + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + * @instance + */ + QueryDirectoryContentsResponse.prototype.directoryEntries = $util.emptyArray; + + /** + * QueryDirectoryContentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + * @instance + */ + QueryDirectoryContentsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new QueryDirectoryContentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryDirectoryContentsResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse} QueryDirectoryContentsResponse instance + */ + QueryDirectoryContentsResponse.create = function create(properties) { + return new QueryDirectoryContentsResponse(properties); + }; + + /** + * Encodes the specified QueryDirectoryContentsResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryDirectoryContentsResponse} message QueryDirectoryContentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDirectoryContentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.directoryEntries != null && message.directoryEntries.length) + for (var i = 0; i < message.directoryEntries.length; ++i) + $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry.encode(message.directoryEntries[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 QueryDirectoryContentsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryDirectoryContentsResponse} message QueryDirectoryContentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDirectoryContentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDirectoryContentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse} QueryDirectoryContentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDirectoryContentsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.directoryEntries && message.directoryEntries.length)) + message.directoryEntries = []; + message.directoryEntries.push($root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDirectoryContentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse} QueryDirectoryContentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDirectoryContentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDirectoryContentsResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDirectoryContentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.directoryEntries != null && message.hasOwnProperty("directoryEntries")) { + if (!Array.isArray(message.directoryEntries)) + return "directoryEntries: array expected"; + for (var i = 0; i < message.directoryEntries.length; ++i) { + var error = $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry.verify(message.directoryEntries[i]); + if (error) + return "directoryEntries." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a QueryDirectoryContentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse} QueryDirectoryContentsResponse + */ + QueryDirectoryContentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse(); + if (object.directoryEntries) { + if (!Array.isArray(object.directoryEntries)) + throw TypeError(".google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.directoryEntries: array expected"); + message.directoryEntries = []; + for (var i = 0; i < object.directoryEntries.length; ++i) { + if (typeof object.directoryEntries[i] !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.directoryEntries: object expected"); + message.directoryEntries[i] = $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry.fromObject(object.directoryEntries[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a QueryDirectoryContentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse} message QueryDirectoryContentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDirectoryContentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.directoryEntries = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.directoryEntries && message.directoryEntries.length) { + object.directoryEntries = []; + for (var j = 0; j < message.directoryEntries.length; ++j) + object.directoryEntries[j] = $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry.toObject(message.directoryEntries[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this QueryDirectoryContentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryDirectoryContentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + QueryDirectoryContentsResponse.DirectoryEntry = (function() { + + /** + * Properties of a DirectoryEntry. + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + * @interface IDirectoryEntry + * @property {string|null} [file] DirectoryEntry file + * @property {string|null} [directory] DirectoryEntry directory + */ + + /** + * Constructs a new DirectoryEntry. + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + * @classdesc Represents a DirectoryEntry. + * @implements IDirectoryEntry + * @constructor + * @param {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry=} [properties] Properties to set + */ + function DirectoryEntry(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DirectoryEntry file. + * @member {string|null|undefined} file + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + * @instance + */ + DirectoryEntry.prototype.file = null; + + /** + * DirectoryEntry directory. + * @member {string|null|undefined} directory + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + * @instance + */ + DirectoryEntry.prototype.directory = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DirectoryEntry entry. + * @member {"file"|"directory"|undefined} entry + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + * @instance + */ + Object.defineProperty(DirectoryEntry.prototype, "entry", { + get: $util.oneOfGetter($oneOfFields = ["file", "directory"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DirectoryEntry instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry} DirectoryEntry instance + */ + DirectoryEntry.create = function create(properties) { + return new DirectoryEntry(properties); + }; + + /** + * Encodes the specified DirectoryEntry message. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry} message DirectoryEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DirectoryEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && Object.hasOwnProperty.call(message, "file")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.file); + if (message.directory != null && Object.hasOwnProperty.call(message, "directory")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.directory); + return writer; + }; + + /** + * Encodes the specified DirectoryEntry message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry} message DirectoryEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DirectoryEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DirectoryEntry message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry} DirectoryEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DirectoryEntry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.file = reader.string(); + break; + case 2: + message.directory = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DirectoryEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry} DirectoryEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DirectoryEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DirectoryEntry message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DirectoryEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.file != null && message.hasOwnProperty("file")) { + properties.entry = 1; + if (!$util.isString(message.file)) + return "file: string expected"; + } + if (message.directory != null && message.hasOwnProperty("directory")) { + if (properties.entry === 1) + return "entry: multiple values"; + properties.entry = 1; + if (!$util.isString(message.directory)) + return "directory: string expected"; + } + return null; + }; + + /** + * Creates a DirectoryEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry} DirectoryEntry + */ + DirectoryEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry(); + if (object.file != null) + message.file = String(object.file); + if (object.directory != null) + message.directory = String(object.directory); + return message; + }; + + /** + * Creates a plain object from a DirectoryEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry} message DirectoryEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DirectoryEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.file != null && message.hasOwnProperty("file")) { + object.file = message.file; + if (options.oneofs) + object.entry = "file"; + } + if (message.directory != null && message.hasOwnProperty("directory")) { + object.directory = message.directory; + if (options.oneofs) + object.entry = "directory"; + } + return object; + }; + + /** + * Converts this DirectoryEntry to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + * @instance + * @returns {Object.} JSON object + */ + DirectoryEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DirectoryEntry; + })(); + + return QueryDirectoryContentsResponse; + })(); + + v1alpha2.MakeDirectoryRequest = (function() { + + /** + * Properties of a MakeDirectoryRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IMakeDirectoryRequest + * @property {string|null} [workspace] MakeDirectoryRequest workspace + * @property {string|null} [path] MakeDirectoryRequest path + */ + + /** + * Constructs a new MakeDirectoryRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a MakeDirectoryRequest. + * @implements IMakeDirectoryRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IMakeDirectoryRequest=} [properties] Properties to set + */ + function MakeDirectoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MakeDirectoryRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryRequest + * @instance + */ + MakeDirectoryRequest.prototype.workspace = ""; + + /** + * MakeDirectoryRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryRequest + * @instance + */ + MakeDirectoryRequest.prototype.path = ""; + + /** + * Creates a new MakeDirectoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IMakeDirectoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.MakeDirectoryRequest} MakeDirectoryRequest instance + */ + MakeDirectoryRequest.create = function create(properties) { + return new MakeDirectoryRequest(properties); + }; + + /** + * Encodes the specified MakeDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.MakeDirectoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IMakeDirectoryRequest} message MakeDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MakeDirectoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified MakeDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.MakeDirectoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IMakeDirectoryRequest} message MakeDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MakeDirectoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MakeDirectoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.MakeDirectoryRequest} MakeDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MakeDirectoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.MakeDirectoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MakeDirectoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.MakeDirectoryRequest} MakeDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MakeDirectoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MakeDirectoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MakeDirectoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a MakeDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.MakeDirectoryRequest} MakeDirectoryRequest + */ + MakeDirectoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.MakeDirectoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.MakeDirectoryRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a MakeDirectoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.MakeDirectoryRequest} message MakeDirectoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MakeDirectoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this MakeDirectoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryRequest + * @instance + * @returns {Object.} JSON object + */ + MakeDirectoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MakeDirectoryRequest; + })(); + + v1alpha2.MakeDirectoryResponse = (function() { + + /** + * Properties of a MakeDirectoryResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IMakeDirectoryResponse + */ + + /** + * Constructs a new MakeDirectoryResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a MakeDirectoryResponse. + * @implements IMakeDirectoryResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IMakeDirectoryResponse=} [properties] Properties to set + */ + function MakeDirectoryResponse(properties) { + if (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 MakeDirectoryResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IMakeDirectoryResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.MakeDirectoryResponse} MakeDirectoryResponse instance + */ + MakeDirectoryResponse.create = function create(properties) { + return new MakeDirectoryResponse(properties); + }; + + /** + * Encodes the specified MakeDirectoryResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.MakeDirectoryResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IMakeDirectoryResponse} message MakeDirectoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MakeDirectoryResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MakeDirectoryResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.MakeDirectoryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IMakeDirectoryResponse} message MakeDirectoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MakeDirectoryResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MakeDirectoryResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.MakeDirectoryResponse} MakeDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MakeDirectoryResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.MakeDirectoryResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MakeDirectoryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.MakeDirectoryResponse} MakeDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MakeDirectoryResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MakeDirectoryResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MakeDirectoryResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MakeDirectoryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.MakeDirectoryResponse} MakeDirectoryResponse + */ + MakeDirectoryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.MakeDirectoryResponse) + return object; + return new $root.google.cloud.dataform.v1alpha2.MakeDirectoryResponse(); + }; + + /** + * Creates a plain object from a MakeDirectoryResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryResponse + * @static + * @param {google.cloud.dataform.v1alpha2.MakeDirectoryResponse} message MakeDirectoryResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MakeDirectoryResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MakeDirectoryResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryResponse + * @instance + * @returns {Object.} JSON object + */ + MakeDirectoryResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MakeDirectoryResponse; + })(); + + v1alpha2.RemoveDirectoryRequest = (function() { + + /** + * Properties of a RemoveDirectoryRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IRemoveDirectoryRequest + * @property {string|null} [workspace] RemoveDirectoryRequest workspace + * @property {string|null} [path] RemoveDirectoryRequest path + */ + + /** + * Constructs a new RemoveDirectoryRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a RemoveDirectoryRequest. + * @implements IRemoveDirectoryRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest=} [properties] Properties to set + */ + function RemoveDirectoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RemoveDirectoryRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1alpha2.RemoveDirectoryRequest + * @instance + */ + RemoveDirectoryRequest.prototype.workspace = ""; + + /** + * RemoveDirectoryRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1alpha2.RemoveDirectoryRequest + * @instance + */ + RemoveDirectoryRequest.prototype.path = ""; + + /** + * Creates a new RemoveDirectoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.RemoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.RemoveDirectoryRequest} RemoveDirectoryRequest instance + */ + RemoveDirectoryRequest.create = function create(properties) { + return new RemoveDirectoryRequest(properties); + }; + + /** + * Encodes the specified RemoveDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.RemoveDirectoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.RemoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest} message RemoveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveDirectoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified RemoveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.RemoveDirectoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.RemoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest} message RemoveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveDirectoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemoveDirectoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.RemoveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.RemoveDirectoryRequest} RemoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveDirectoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RemoveDirectoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.RemoveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.RemoveDirectoryRequest} RemoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveDirectoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemoveDirectoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.RemoveDirectoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemoveDirectoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a RemoveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.RemoveDirectoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.RemoveDirectoryRequest} RemoveDirectoryRequest + */ + RemoveDirectoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a RemoveDirectoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.RemoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.RemoveDirectoryRequest} message RemoveDirectoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemoveDirectoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this RemoveDirectoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.RemoveDirectoryRequest + * @instance + * @returns {Object.} JSON object + */ + RemoveDirectoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RemoveDirectoryRequest; + })(); + + v1alpha2.MoveDirectoryRequest = (function() { + + /** + * Properties of a MoveDirectoryRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IMoveDirectoryRequest + * @property {string|null} [workspace] MoveDirectoryRequest workspace + * @property {string|null} [path] MoveDirectoryRequest path + * @property {string|null} [newPath] MoveDirectoryRequest newPath + */ + + /** + * Constructs a new MoveDirectoryRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a MoveDirectoryRequest. + * @implements IMoveDirectoryRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IMoveDirectoryRequest=} [properties] Properties to set + */ + function MoveDirectoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MoveDirectoryRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryRequest + * @instance + */ + MoveDirectoryRequest.prototype.workspace = ""; + + /** + * MoveDirectoryRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryRequest + * @instance + */ + MoveDirectoryRequest.prototype.path = ""; + + /** + * MoveDirectoryRequest newPath. + * @member {string} newPath + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryRequest + * @instance + */ + MoveDirectoryRequest.prototype.newPath = ""; + + /** + * Creates a new MoveDirectoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IMoveDirectoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.MoveDirectoryRequest} MoveDirectoryRequest instance + */ + MoveDirectoryRequest.create = function create(properties) { + return new MoveDirectoryRequest(properties); + }; + + /** + * Encodes the specified MoveDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveDirectoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IMoveDirectoryRequest} message MoveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveDirectoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.newPath != null && Object.hasOwnProperty.call(message, "newPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.newPath); + return writer; + }; + + /** + * Encodes the specified MoveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveDirectoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IMoveDirectoryRequest} message MoveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveDirectoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MoveDirectoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.MoveDirectoryRequest} MoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveDirectoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.MoveDirectoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + case 3: + message.newPath = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MoveDirectoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.MoveDirectoryRequest} MoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveDirectoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MoveDirectoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MoveDirectoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.newPath != null && message.hasOwnProperty("newPath")) + if (!$util.isString(message.newPath)) + return "newPath: string expected"; + return null; + }; + + /** + * Creates a MoveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.MoveDirectoryRequest} MoveDirectoryRequest + */ + MoveDirectoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.MoveDirectoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.MoveDirectoryRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + if (object.newPath != null) + message.newPath = String(object.newPath); + return message; + }; + + /** + * Creates a plain object from a MoveDirectoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1alpha2.MoveDirectoryRequest} message MoveDirectoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MoveDirectoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + object.newPath = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.newPath != null && message.hasOwnProperty("newPath")) + object.newPath = message.newPath; + return object; + }; + + /** + * Converts this MoveDirectoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryRequest + * @instance + * @returns {Object.} JSON object + */ + MoveDirectoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MoveDirectoryRequest; + })(); + + v1alpha2.MoveDirectoryResponse = (function() { + + /** + * Properties of a MoveDirectoryResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IMoveDirectoryResponse + */ + + /** + * Constructs a new MoveDirectoryResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a MoveDirectoryResponse. + * @implements IMoveDirectoryResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IMoveDirectoryResponse=} [properties] Properties to set + */ + function MoveDirectoryResponse(properties) { + if (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 MoveDirectoryResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IMoveDirectoryResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.MoveDirectoryResponse} MoveDirectoryResponse instance + */ + MoveDirectoryResponse.create = function create(properties) { + return new MoveDirectoryResponse(properties); + }; + + /** + * Encodes the specified MoveDirectoryResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveDirectoryResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IMoveDirectoryResponse} message MoveDirectoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveDirectoryResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MoveDirectoryResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveDirectoryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IMoveDirectoryResponse} message MoveDirectoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveDirectoryResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MoveDirectoryResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.MoveDirectoryResponse} MoveDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveDirectoryResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.MoveDirectoryResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MoveDirectoryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.MoveDirectoryResponse} MoveDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveDirectoryResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MoveDirectoryResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MoveDirectoryResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MoveDirectoryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.MoveDirectoryResponse} MoveDirectoryResponse + */ + MoveDirectoryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.MoveDirectoryResponse) + return object; + return new $root.google.cloud.dataform.v1alpha2.MoveDirectoryResponse(); + }; + + /** + * Creates a plain object from a MoveDirectoryResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryResponse + * @static + * @param {google.cloud.dataform.v1alpha2.MoveDirectoryResponse} message MoveDirectoryResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MoveDirectoryResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MoveDirectoryResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryResponse + * @instance + * @returns {Object.} JSON object + */ + MoveDirectoryResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MoveDirectoryResponse; + })(); + + v1alpha2.ReadFileRequest = (function() { + + /** + * Properties of a ReadFileRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IReadFileRequest + * @property {string|null} [workspace] ReadFileRequest workspace + * @property {string|null} [path] ReadFileRequest path + */ + + /** + * Constructs a new ReadFileRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a ReadFileRequest. + * @implements IReadFileRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IReadFileRequest=} [properties] Properties to set + */ + function ReadFileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReadFileRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1alpha2.ReadFileRequest + * @instance + */ + ReadFileRequest.prototype.workspace = ""; + + /** + * ReadFileRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1alpha2.ReadFileRequest + * @instance + */ + ReadFileRequest.prototype.path = ""; + + /** + * Creates a new ReadFileRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.ReadFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IReadFileRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.ReadFileRequest} ReadFileRequest instance + */ + ReadFileRequest.create = function create(properties) { + return new ReadFileRequest(properties); + }; + + /** + * Encodes the specified ReadFileRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ReadFileRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.ReadFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IReadFileRequest} message ReadFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadFileRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified ReadFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ReadFileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ReadFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IReadFileRequest} message ReadFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadFileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReadFileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.ReadFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.ReadFileRequest} ReadFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadFileRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.ReadFileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReadFileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ReadFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.ReadFileRequest} ReadFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadFileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReadFileRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.ReadFileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReadFileRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a ReadFileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.ReadFileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.ReadFileRequest} ReadFileRequest + */ + ReadFileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.ReadFileRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.ReadFileRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a ReadFileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.ReadFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ReadFileRequest} message ReadFileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReadFileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this ReadFileRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.ReadFileRequest + * @instance + * @returns {Object.} JSON object + */ + ReadFileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReadFileRequest; + })(); + + v1alpha2.ReadFileResponse = (function() { + + /** + * Properties of a ReadFileResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IReadFileResponse + * @property {Uint8Array|null} [fileContents] ReadFileResponse fileContents + */ + + /** + * Constructs a new ReadFileResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a ReadFileResponse. + * @implements IReadFileResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IReadFileResponse=} [properties] Properties to set + */ + function ReadFileResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReadFileResponse fileContents. + * @member {Uint8Array} fileContents + * @memberof google.cloud.dataform.v1alpha2.ReadFileResponse + * @instance + */ + ReadFileResponse.prototype.fileContents = $util.newBuffer([]); + + /** + * Creates a new ReadFileResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.ReadFileResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IReadFileResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.ReadFileResponse} ReadFileResponse instance + */ + ReadFileResponse.create = function create(properties) { + return new ReadFileResponse(properties); + }; + + /** + * Encodes the specified ReadFileResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ReadFileResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.ReadFileResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IReadFileResponse} message ReadFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadFileResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fileContents != null && Object.hasOwnProperty.call(message, "fileContents")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.fileContents); + return writer; + }; + + /** + * Encodes the specified ReadFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ReadFileResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ReadFileResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IReadFileResponse} message ReadFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadFileResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReadFileResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.ReadFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.ReadFileResponse} ReadFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadFileResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.ReadFileResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.fileContents = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReadFileResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ReadFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.ReadFileResponse} ReadFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadFileResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReadFileResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.ReadFileResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReadFileResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fileContents != null && message.hasOwnProperty("fileContents")) + if (!(message.fileContents && typeof message.fileContents.length === "number" || $util.isString(message.fileContents))) + return "fileContents: buffer expected"; + return null; + }; + + /** + * Creates a ReadFileResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.ReadFileResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.ReadFileResponse} ReadFileResponse + */ + ReadFileResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.ReadFileResponse) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.ReadFileResponse(); + if (object.fileContents != null) + if (typeof object.fileContents === "string") + $util.base64.decode(object.fileContents, message.fileContents = $util.newBuffer($util.base64.length(object.fileContents)), 0); + else if (object.fileContents.length) + message.fileContents = object.fileContents; + return message; + }; + + /** + * Creates a plain object from a ReadFileResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.ReadFileResponse + * @static + * @param {google.cloud.dataform.v1alpha2.ReadFileResponse} message ReadFileResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReadFileResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.fileContents = ""; + else { + object.fileContents = []; + if (options.bytes !== Array) + object.fileContents = $util.newBuffer(object.fileContents); + } + if (message.fileContents != null && message.hasOwnProperty("fileContents")) + object.fileContents = options.bytes === String ? $util.base64.encode(message.fileContents, 0, message.fileContents.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileContents) : message.fileContents; + return object; + }; + + /** + * Converts this ReadFileResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.ReadFileResponse + * @instance + * @returns {Object.} JSON object + */ + ReadFileResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReadFileResponse; + })(); + + v1alpha2.RemoveFileRequest = (function() { + + /** + * Properties of a RemoveFileRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IRemoveFileRequest + * @property {string|null} [workspace] RemoveFileRequest workspace + * @property {string|null} [path] RemoveFileRequest path + */ + + /** + * Constructs a new RemoveFileRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a RemoveFileRequest. + * @implements IRemoveFileRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IRemoveFileRequest=} [properties] Properties to set + */ + function RemoveFileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RemoveFileRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1alpha2.RemoveFileRequest + * @instance + */ + RemoveFileRequest.prototype.workspace = ""; + + /** + * RemoveFileRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1alpha2.RemoveFileRequest + * @instance + */ + RemoveFileRequest.prototype.path = ""; + + /** + * Creates a new RemoveFileRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.RemoveFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IRemoveFileRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.RemoveFileRequest} RemoveFileRequest instance + */ + RemoveFileRequest.create = function create(properties) { + return new RemoveFileRequest(properties); + }; + + /** + * Encodes the specified RemoveFileRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.RemoveFileRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.RemoveFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IRemoveFileRequest} message RemoveFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveFileRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified RemoveFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.RemoveFileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.RemoveFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IRemoveFileRequest} message RemoveFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveFileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemoveFileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.RemoveFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.RemoveFileRequest} RemoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveFileRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.RemoveFileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RemoveFileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.RemoveFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.RemoveFileRequest} RemoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveFileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemoveFileRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.RemoveFileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemoveFileRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a RemoveFileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.RemoveFileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.RemoveFileRequest} RemoveFileRequest + */ + RemoveFileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.RemoveFileRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.RemoveFileRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a RemoveFileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.RemoveFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.RemoveFileRequest} message RemoveFileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemoveFileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this RemoveFileRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.RemoveFileRequest + * @instance + * @returns {Object.} JSON object + */ + RemoveFileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RemoveFileRequest; + })(); + + v1alpha2.MoveFileRequest = (function() { + + /** + * Properties of a MoveFileRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IMoveFileRequest + * @property {string|null} [workspace] MoveFileRequest workspace + * @property {string|null} [path] MoveFileRequest path + * @property {string|null} [newPath] MoveFileRequest newPath + */ + + /** + * Constructs a new MoveFileRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a MoveFileRequest. + * @implements IMoveFileRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IMoveFileRequest=} [properties] Properties to set + */ + function MoveFileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MoveFileRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1alpha2.MoveFileRequest + * @instance + */ + MoveFileRequest.prototype.workspace = ""; + + /** + * MoveFileRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1alpha2.MoveFileRequest + * @instance + */ + MoveFileRequest.prototype.path = ""; + + /** + * MoveFileRequest newPath. + * @member {string} newPath + * @memberof google.cloud.dataform.v1alpha2.MoveFileRequest + * @instance + */ + MoveFileRequest.prototype.newPath = ""; + + /** + * Creates a new MoveFileRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.MoveFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IMoveFileRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.MoveFileRequest} MoveFileRequest instance + */ + MoveFileRequest.create = function create(properties) { + return new MoveFileRequest(properties); + }; + + /** + * Encodes the specified MoveFileRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveFileRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.MoveFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IMoveFileRequest} message MoveFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveFileRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.newPath != null && Object.hasOwnProperty.call(message, "newPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.newPath); + return writer; + }; + + /** + * Encodes the specified MoveFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveFileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.MoveFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IMoveFileRequest} message MoveFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveFileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MoveFileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.MoveFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.MoveFileRequest} MoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveFileRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.MoveFileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + case 3: + message.newPath = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MoveFileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.MoveFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.MoveFileRequest} MoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveFileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MoveFileRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.MoveFileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MoveFileRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.newPath != null && message.hasOwnProperty("newPath")) + if (!$util.isString(message.newPath)) + return "newPath: string expected"; + return null; + }; + + /** + * Creates a MoveFileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.MoveFileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.MoveFileRequest} MoveFileRequest + */ + MoveFileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.MoveFileRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.MoveFileRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + if (object.newPath != null) + message.newPath = String(object.newPath); + return message; + }; + + /** + * Creates a plain object from a MoveFileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.MoveFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.MoveFileRequest} message MoveFileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MoveFileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + object.newPath = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.newPath != null && message.hasOwnProperty("newPath")) + object.newPath = message.newPath; + return object; + }; + + /** + * Converts this MoveFileRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.MoveFileRequest + * @instance + * @returns {Object.} JSON object + */ + MoveFileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MoveFileRequest; + })(); + + v1alpha2.MoveFileResponse = (function() { + + /** + * Properties of a MoveFileResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IMoveFileResponse + */ + + /** + * Constructs a new MoveFileResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a MoveFileResponse. + * @implements IMoveFileResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IMoveFileResponse=} [properties] Properties to set + */ + function MoveFileResponse(properties) { + if (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 MoveFileResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.MoveFileResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IMoveFileResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.MoveFileResponse} MoveFileResponse instance + */ + MoveFileResponse.create = function create(properties) { + return new MoveFileResponse(properties); + }; + + /** + * Encodes the specified MoveFileResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveFileResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.MoveFileResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IMoveFileResponse} message MoveFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveFileResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MoveFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.MoveFileResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.MoveFileResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IMoveFileResponse} message MoveFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveFileResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MoveFileResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.MoveFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.MoveFileResponse} MoveFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveFileResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.MoveFileResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MoveFileResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.MoveFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.MoveFileResponse} MoveFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveFileResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MoveFileResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.MoveFileResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MoveFileResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MoveFileResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.MoveFileResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.MoveFileResponse} MoveFileResponse + */ + MoveFileResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.MoveFileResponse) + return object; + return new $root.google.cloud.dataform.v1alpha2.MoveFileResponse(); + }; + + /** + * Creates a plain object from a MoveFileResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.MoveFileResponse + * @static + * @param {google.cloud.dataform.v1alpha2.MoveFileResponse} message MoveFileResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MoveFileResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MoveFileResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.MoveFileResponse + * @instance + * @returns {Object.} JSON object + */ + MoveFileResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MoveFileResponse; + })(); + + v1alpha2.WriteFileRequest = (function() { + + /** + * Properties of a WriteFileRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IWriteFileRequest + * @property {string|null} [workspace] WriteFileRequest workspace + * @property {string|null} [path] WriteFileRequest path + * @property {Uint8Array|null} [contents] WriteFileRequest contents + */ + + /** + * Constructs a new WriteFileRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a WriteFileRequest. + * @implements IWriteFileRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IWriteFileRequest=} [properties] Properties to set + */ + function WriteFileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WriteFileRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1alpha2.WriteFileRequest + * @instance + */ + WriteFileRequest.prototype.workspace = ""; + + /** + * WriteFileRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1alpha2.WriteFileRequest + * @instance + */ + WriteFileRequest.prototype.path = ""; + + /** + * WriteFileRequest contents. + * @member {Uint8Array} contents + * @memberof google.cloud.dataform.v1alpha2.WriteFileRequest + * @instance + */ + WriteFileRequest.prototype.contents = $util.newBuffer([]); + + /** + * Creates a new WriteFileRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.WriteFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IWriteFileRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.WriteFileRequest} WriteFileRequest instance + */ + WriteFileRequest.create = function create(properties) { + return new WriteFileRequest(properties); + }; + + /** + * Encodes the specified WriteFileRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.WriteFileRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.WriteFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IWriteFileRequest} message WriteFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteFileRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.contents != null && Object.hasOwnProperty.call(message, "contents")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.contents); + return writer; + }; + + /** + * Encodes the specified WriteFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.WriteFileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.WriteFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IWriteFileRequest} message WriteFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteFileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WriteFileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.WriteFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.WriteFileRequest} WriteFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteFileRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.WriteFileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + case 3: + message.contents = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WriteFileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.WriteFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.WriteFileRequest} WriteFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteFileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WriteFileRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.WriteFileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WriteFileRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.contents != null && message.hasOwnProperty("contents")) + if (!(message.contents && typeof message.contents.length === "number" || $util.isString(message.contents))) + return "contents: buffer expected"; + return null; + }; + + /** + * Creates a WriteFileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.WriteFileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.WriteFileRequest} WriteFileRequest + */ + WriteFileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.WriteFileRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.WriteFileRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + if (object.contents != null) + if (typeof object.contents === "string") + $util.base64.decode(object.contents, message.contents = $util.newBuffer($util.base64.length(object.contents)), 0); + else if (object.contents.length) + message.contents = object.contents; + return message; + }; + + /** + * Creates a plain object from a WriteFileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.WriteFileRequest + * @static + * @param {google.cloud.dataform.v1alpha2.WriteFileRequest} message WriteFileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WriteFileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + if (options.bytes === String) + object.contents = ""; + else { + object.contents = []; + if (options.bytes !== Array) + object.contents = $util.newBuffer(object.contents); + } + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.contents != null && message.hasOwnProperty("contents")) + object.contents = options.bytes === String ? $util.base64.encode(message.contents, 0, message.contents.length) : options.bytes === Array ? Array.prototype.slice.call(message.contents) : message.contents; + return object; + }; + + /** + * Converts this WriteFileRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.WriteFileRequest + * @instance + * @returns {Object.} JSON object + */ + WriteFileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WriteFileRequest; + })(); + + v1alpha2.WriteFileResponse = (function() { + + /** + * Properties of a WriteFileResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IWriteFileResponse + */ + + /** + * Constructs a new WriteFileResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a WriteFileResponse. + * @implements IWriteFileResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IWriteFileResponse=} [properties] Properties to set + */ + function WriteFileResponse(properties) { + if (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 WriteFileResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.WriteFileResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IWriteFileResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.WriteFileResponse} WriteFileResponse instance + */ + WriteFileResponse.create = function create(properties) { + return new WriteFileResponse(properties); + }; + + /** + * Encodes the specified WriteFileResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.WriteFileResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.WriteFileResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IWriteFileResponse} message WriteFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteFileResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified WriteFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.WriteFileResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.WriteFileResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IWriteFileResponse} message WriteFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteFileResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WriteFileResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.WriteFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.WriteFileResponse} WriteFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteFileResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.WriteFileResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WriteFileResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.WriteFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.WriteFileResponse} WriteFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteFileResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WriteFileResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.WriteFileResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WriteFileResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a WriteFileResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.WriteFileResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.WriteFileResponse} WriteFileResponse + */ + WriteFileResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.WriteFileResponse) + return object; + return new $root.google.cloud.dataform.v1alpha2.WriteFileResponse(); + }; + + /** + * Creates a plain object from a WriteFileResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.WriteFileResponse + * @static + * @param {google.cloud.dataform.v1alpha2.WriteFileResponse} message WriteFileResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WriteFileResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this WriteFileResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.WriteFileResponse + * @instance + * @returns {Object.} JSON object + */ + WriteFileResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WriteFileResponse; + })(); + + v1alpha2.InstallNpmPackagesRequest = (function() { + + /** + * Properties of an InstallNpmPackagesRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IInstallNpmPackagesRequest + * @property {string|null} [workspace] InstallNpmPackagesRequest workspace + */ + + /** + * Constructs a new InstallNpmPackagesRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents an InstallNpmPackagesRequest. + * @implements IInstallNpmPackagesRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest=} [properties] Properties to set + */ + function InstallNpmPackagesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InstallNpmPackagesRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest + * @instance + */ + InstallNpmPackagesRequest.prototype.workspace = ""; + + /** + * Creates a new InstallNpmPackagesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest} InstallNpmPackagesRequest instance + */ + InstallNpmPackagesRequest.create = function create(properties) { + return new InstallNpmPackagesRequest(properties); + }; + + /** + * Encodes the specified InstallNpmPackagesRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest} message InstallNpmPackagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstallNpmPackagesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + return writer; + }; + + /** + * Encodes the specified InstallNpmPackagesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest} message InstallNpmPackagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstallNpmPackagesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InstallNpmPackagesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest} InstallNpmPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstallNpmPackagesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InstallNpmPackagesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest} InstallNpmPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstallNpmPackagesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InstallNpmPackagesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstallNpmPackagesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + return null; + }; + + /** + * Creates an InstallNpmPackagesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest} InstallNpmPackagesRequest + */ + InstallNpmPackagesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + return message; + }; + + /** + * Creates a plain object from an InstallNpmPackagesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest + * @static + * @param {google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest} message InstallNpmPackagesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstallNpmPackagesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.workspace = ""; + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + return object; + }; + + /** + * Converts this InstallNpmPackagesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest + * @instance + * @returns {Object.} JSON object + */ + InstallNpmPackagesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return InstallNpmPackagesRequest; + })(); + + v1alpha2.InstallNpmPackagesResponse = (function() { + + /** + * Properties of an InstallNpmPackagesResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IInstallNpmPackagesResponse + */ + + /** + * Constructs a new InstallNpmPackagesResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents an InstallNpmPackagesResponse. + * @implements IInstallNpmPackagesResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse=} [properties] Properties to set + */ + function InstallNpmPackagesResponse(properties) { + if (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 InstallNpmPackagesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse} InstallNpmPackagesResponse instance + */ + InstallNpmPackagesResponse.create = function create(properties) { + return new InstallNpmPackagesResponse(properties); + }; + + /** + * Encodes the specified InstallNpmPackagesResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse} message InstallNpmPackagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstallNpmPackagesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified InstallNpmPackagesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse} message InstallNpmPackagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstallNpmPackagesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InstallNpmPackagesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse} InstallNpmPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstallNpmPackagesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InstallNpmPackagesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse} InstallNpmPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstallNpmPackagesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InstallNpmPackagesResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstallNpmPackagesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an InstallNpmPackagesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse} InstallNpmPackagesResponse + */ + InstallNpmPackagesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse) + return object; + return new $root.google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse(); + }; + + /** + * Creates a plain object from an InstallNpmPackagesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse + * @static + * @param {google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse} message InstallNpmPackagesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstallNpmPackagesResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this InstallNpmPackagesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse + * @instance + * @returns {Object.} JSON object + */ + InstallNpmPackagesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return InstallNpmPackagesResponse; + })(); + + v1alpha2.CompilationResult = (function() { + + /** + * Properties of a CompilationResult. + * @memberof google.cloud.dataform.v1alpha2 + * @interface ICompilationResult + * @property {string|null} [name] CompilationResult name + * @property {string|null} [gitCommitish] CompilationResult gitCommitish + * @property {string|null} [workspace] CompilationResult workspace + * @property {google.cloud.dataform.v1alpha2.CompilationResult.ICodeCompilationConfig|null} [codeCompilationConfig] CompilationResult codeCompilationConfig + * @property {string|null} [dataformCoreVersion] CompilationResult dataformCoreVersion + * @property {Array.|null} [compilationErrors] CompilationResult compilationErrors + */ + + /** + * Constructs a new CompilationResult. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a CompilationResult. + * @implements ICompilationResult + * @constructor + * @param {google.cloud.dataform.v1alpha2.ICompilationResult=} [properties] Properties to set + */ + function CompilationResult(properties) { + this.compilationErrors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompilationResult name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @instance + */ + CompilationResult.prototype.name = ""; + + /** + * CompilationResult gitCommitish. + * @member {string|null|undefined} gitCommitish + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @instance + */ + CompilationResult.prototype.gitCommitish = null; + + /** + * CompilationResult workspace. + * @member {string|null|undefined} workspace + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @instance + */ + CompilationResult.prototype.workspace = null; + + /** + * CompilationResult codeCompilationConfig. + * @member {google.cloud.dataform.v1alpha2.CompilationResult.ICodeCompilationConfig|null|undefined} codeCompilationConfig + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @instance + */ + CompilationResult.prototype.codeCompilationConfig = null; + + /** + * CompilationResult dataformCoreVersion. + * @member {string} dataformCoreVersion + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @instance + */ + CompilationResult.prototype.dataformCoreVersion = ""; + + /** + * CompilationResult compilationErrors. + * @member {Array.} compilationErrors + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @instance + */ + CompilationResult.prototype.compilationErrors = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CompilationResult source. + * @member {"gitCommitish"|"workspace"|undefined} source + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @instance + */ + Object.defineProperty(CompilationResult.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["gitCommitish", "workspace"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CompilationResult instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @static + * @param {google.cloud.dataform.v1alpha2.ICompilationResult=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CompilationResult} CompilationResult instance + */ + CompilationResult.create = function create(properties) { + return new CompilationResult(properties); + }; + + /** + * Encodes the specified CompilationResult message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @static + * @param {google.cloud.dataform.v1alpha2.ICompilationResult} message CompilationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationResult.encode = function encode(message, writer) { + 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.gitCommitish != null && Object.hasOwnProperty.call(message, "gitCommitish")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.gitCommitish); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.workspace); + if (message.codeCompilationConfig != null && Object.hasOwnProperty.call(message, "codeCompilationConfig")) + $root.google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig.encode(message.codeCompilationConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.dataformCoreVersion != null && Object.hasOwnProperty.call(message, "dataformCoreVersion")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.dataformCoreVersion); + if (message.compilationErrors != null && message.compilationErrors.length) + for (var i = 0; i < message.compilationErrors.length; ++i) + $root.google.cloud.dataform.v1alpha2.CompilationResult.CompilationError.encode(message.compilationErrors[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CompilationResult message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @static + * @param {google.cloud.dataform.v1alpha2.ICompilationResult} message CompilationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompilationResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CompilationResult} CompilationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CompilationResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.gitCommitish = reader.string(); + break; + case 3: + message.workspace = reader.string(); + break; + case 4: + message.codeCompilationConfig = $root.google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig.decode(reader, reader.uint32()); + break; + case 5: + message.dataformCoreVersion = reader.string(); + break; + case 6: + if (!(message.compilationErrors && message.compilationErrors.length)) + message.compilationErrors = []; + message.compilationErrors.push($root.google.cloud.dataform.v1alpha2.CompilationResult.CompilationError.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompilationResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CompilationResult} CompilationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompilationResult message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompilationResult.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.gitCommitish != null && message.hasOwnProperty("gitCommitish")) { + properties.source = 1; + if (!$util.isString(message.gitCommitish)) + return "gitCommitish: string expected"; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + } + if (message.codeCompilationConfig != null && message.hasOwnProperty("codeCompilationConfig")) { + var error = $root.google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig.verify(message.codeCompilationConfig); + if (error) + return "codeCompilationConfig." + error; + } + if (message.dataformCoreVersion != null && message.hasOwnProperty("dataformCoreVersion")) + if (!$util.isString(message.dataformCoreVersion)) + return "dataformCoreVersion: string expected"; + if (message.compilationErrors != null && message.hasOwnProperty("compilationErrors")) { + if (!Array.isArray(message.compilationErrors)) + return "compilationErrors: array expected"; + for (var i = 0; i < message.compilationErrors.length; ++i) { + var error = $root.google.cloud.dataform.v1alpha2.CompilationResult.CompilationError.verify(message.compilationErrors[i]); + if (error) + return "compilationErrors." + error; + } + } + return null; + }; + + /** + * Creates a CompilationResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CompilationResult} CompilationResult + */ + CompilationResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CompilationResult) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CompilationResult(); + if (object.name != null) + message.name = String(object.name); + if (object.gitCommitish != null) + message.gitCommitish = String(object.gitCommitish); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.codeCompilationConfig != null) { + if (typeof object.codeCompilationConfig !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResult.codeCompilationConfig: object expected"); + message.codeCompilationConfig = $root.google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig.fromObject(object.codeCompilationConfig); + } + if (object.dataformCoreVersion != null) + message.dataformCoreVersion = String(object.dataformCoreVersion); + if (object.compilationErrors) { + if (!Array.isArray(object.compilationErrors)) + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResult.compilationErrors: array expected"); + message.compilationErrors = []; + for (var i = 0; i < object.compilationErrors.length; ++i) { + if (typeof object.compilationErrors[i] !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResult.compilationErrors: object expected"); + message.compilationErrors[i] = $root.google.cloud.dataform.v1alpha2.CompilationResult.CompilationError.fromObject(object.compilationErrors[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CompilationResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResult} message CompilationResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompilationResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.compilationErrors = []; + if (options.defaults) { + object.name = ""; + object.codeCompilationConfig = null; + object.dataformCoreVersion = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.gitCommitish != null && message.hasOwnProperty("gitCommitish")) { + object.gitCommitish = message.gitCommitish; + if (options.oneofs) + object.source = "gitCommitish"; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) { + object.workspace = message.workspace; + if (options.oneofs) + object.source = "workspace"; + } + if (message.codeCompilationConfig != null && message.hasOwnProperty("codeCompilationConfig")) + object.codeCompilationConfig = $root.google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig.toObject(message.codeCompilationConfig, options); + if (message.dataformCoreVersion != null && message.hasOwnProperty("dataformCoreVersion")) + object.dataformCoreVersion = message.dataformCoreVersion; + if (message.compilationErrors && message.compilationErrors.length) { + object.compilationErrors = []; + for (var j = 0; j < message.compilationErrors.length; ++j) + object.compilationErrors[j] = $root.google.cloud.dataform.v1alpha2.CompilationResult.CompilationError.toObject(message.compilationErrors[j], options); + } + return object; + }; + + /** + * Converts this CompilationResult to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @instance + * @returns {Object.} JSON object + */ + CompilationResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + CompilationResult.CodeCompilationConfig = (function() { + + /** + * Properties of a CodeCompilationConfig. + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @interface ICodeCompilationConfig + * @property {string|null} [defaultDatabase] CodeCompilationConfig defaultDatabase + * @property {string|null} [defaultSchema] CodeCompilationConfig defaultSchema + * @property {string|null} [defaultLocation] CodeCompilationConfig defaultLocation + * @property {string|null} [assertionSchema] CodeCompilationConfig assertionSchema + * @property {Object.|null} [vars] CodeCompilationConfig vars + * @property {string|null} [databaseSuffix] CodeCompilationConfig databaseSuffix + * @property {string|null} [schemaSuffix] CodeCompilationConfig schemaSuffix + * @property {string|null} [tablePrefix] CodeCompilationConfig tablePrefix + */ + + /** + * Constructs a new CodeCompilationConfig. + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @classdesc Represents a CodeCompilationConfig. + * @implements ICodeCompilationConfig + * @constructor + * @param {google.cloud.dataform.v1alpha2.CompilationResult.ICodeCompilationConfig=} [properties] Properties to set + */ + function CodeCompilationConfig(properties) { + this.vars = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CodeCompilationConfig defaultDatabase. + * @member {string} defaultDatabase + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.defaultDatabase = ""; + + /** + * CodeCompilationConfig defaultSchema. + * @member {string} defaultSchema + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.defaultSchema = ""; + + /** + * CodeCompilationConfig defaultLocation. + * @member {string} defaultLocation + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.defaultLocation = ""; + + /** + * CodeCompilationConfig assertionSchema. + * @member {string} assertionSchema + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.assertionSchema = ""; + + /** + * CodeCompilationConfig vars. + * @member {Object.} vars + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.vars = $util.emptyObject; + + /** + * CodeCompilationConfig databaseSuffix. + * @member {string} databaseSuffix + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.databaseSuffix = ""; + + /** + * CodeCompilationConfig schemaSuffix. + * @member {string} schemaSuffix + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.schemaSuffix = ""; + + /** + * CodeCompilationConfig tablePrefix. + * @member {string} tablePrefix + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.tablePrefix = ""; + + /** + * Creates a new CodeCompilationConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResult.ICodeCompilationConfig=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig} CodeCompilationConfig instance + */ + CodeCompilationConfig.create = function create(properties) { + return new CodeCompilationConfig(properties); + }; + + /** + * Encodes the specified CodeCompilationConfig message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResult.ICodeCompilationConfig} message CodeCompilationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CodeCompilationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaultDatabase != null && Object.hasOwnProperty.call(message, "defaultDatabase")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.defaultDatabase); + if (message.defaultSchema != null && Object.hasOwnProperty.call(message, "defaultSchema")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.defaultSchema); + if (message.assertionSchema != null && Object.hasOwnProperty.call(message, "assertionSchema")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.assertionSchema); + if (message.vars != null && Object.hasOwnProperty.call(message, "vars")) + for (var keys = Object.keys(message.vars), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.vars[keys[i]]).ldelim(); + if (message.databaseSuffix != null && Object.hasOwnProperty.call(message, "databaseSuffix")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.databaseSuffix); + if (message.schemaSuffix != null && Object.hasOwnProperty.call(message, "schemaSuffix")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.schemaSuffix); + if (message.tablePrefix != null && Object.hasOwnProperty.call(message, "tablePrefix")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.tablePrefix); + if (message.defaultLocation != null && Object.hasOwnProperty.call(message, "defaultLocation")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.defaultLocation); + return writer; + }; + + /** + * Encodes the specified CodeCompilationConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResult.ICodeCompilationConfig} message CodeCompilationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CodeCompilationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CodeCompilationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig} CodeCompilationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CodeCompilationConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.defaultDatabase = reader.string(); + break; + case 2: + message.defaultSchema = reader.string(); + break; + case 8: + message.defaultLocation = reader.string(); + break; + case 3: + message.assertionSchema = reader.string(); + break; + case 4: + if (message.vars === $util.emptyObject) + message.vars = {}; + 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.vars[key] = value; + break; + case 5: + message.databaseSuffix = reader.string(); + break; + case 6: + message.schemaSuffix = reader.string(); + break; + case 7: + message.tablePrefix = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CodeCompilationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig} CodeCompilationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CodeCompilationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CodeCompilationConfig message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CodeCompilationConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaultDatabase != null && message.hasOwnProperty("defaultDatabase")) + if (!$util.isString(message.defaultDatabase)) + return "defaultDatabase: string expected"; + if (message.defaultSchema != null && message.hasOwnProperty("defaultSchema")) + if (!$util.isString(message.defaultSchema)) + return "defaultSchema: string expected"; + if (message.defaultLocation != null && message.hasOwnProperty("defaultLocation")) + if (!$util.isString(message.defaultLocation)) + return "defaultLocation: string expected"; + if (message.assertionSchema != null && message.hasOwnProperty("assertionSchema")) + if (!$util.isString(message.assertionSchema)) + return "assertionSchema: string expected"; + if (message.vars != null && message.hasOwnProperty("vars")) { + if (!$util.isObject(message.vars)) + return "vars: object expected"; + var key = Object.keys(message.vars); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.vars[key[i]])) + return "vars: string{k:string} expected"; + } + if (message.databaseSuffix != null && message.hasOwnProperty("databaseSuffix")) + if (!$util.isString(message.databaseSuffix)) + return "databaseSuffix: string expected"; + if (message.schemaSuffix != null && message.hasOwnProperty("schemaSuffix")) + if (!$util.isString(message.schemaSuffix)) + return "schemaSuffix: string expected"; + if (message.tablePrefix != null && message.hasOwnProperty("tablePrefix")) + if (!$util.isString(message.tablePrefix)) + return "tablePrefix: string expected"; + return null; + }; + + /** + * Creates a CodeCompilationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig} CodeCompilationConfig + */ + CodeCompilationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig(); + if (object.defaultDatabase != null) + message.defaultDatabase = String(object.defaultDatabase); + if (object.defaultSchema != null) + message.defaultSchema = String(object.defaultSchema); + if (object.defaultLocation != null) + message.defaultLocation = String(object.defaultLocation); + if (object.assertionSchema != null) + message.assertionSchema = String(object.assertionSchema); + if (object.vars) { + if (typeof object.vars !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig.vars: object expected"); + message.vars = {}; + for (var keys = Object.keys(object.vars), i = 0; i < keys.length; ++i) + message.vars[keys[i]] = String(object.vars[keys[i]]); + } + if (object.databaseSuffix != null) + message.databaseSuffix = String(object.databaseSuffix); + if (object.schemaSuffix != null) + message.schemaSuffix = String(object.schemaSuffix); + if (object.tablePrefix != null) + message.tablePrefix = String(object.tablePrefix); + return message; + }; + + /** + * Creates a plain object from a CodeCompilationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig} message CodeCompilationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CodeCompilationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.vars = {}; + if (options.defaults) { + object.defaultDatabase = ""; + object.defaultSchema = ""; + object.assertionSchema = ""; + object.databaseSuffix = ""; + object.schemaSuffix = ""; + object.tablePrefix = ""; + object.defaultLocation = ""; + } + if (message.defaultDatabase != null && message.hasOwnProperty("defaultDatabase")) + object.defaultDatabase = message.defaultDatabase; + if (message.defaultSchema != null && message.hasOwnProperty("defaultSchema")) + object.defaultSchema = message.defaultSchema; + if (message.assertionSchema != null && message.hasOwnProperty("assertionSchema")) + object.assertionSchema = message.assertionSchema; + var keys2; + if (message.vars && (keys2 = Object.keys(message.vars)).length) { + object.vars = {}; + for (var j = 0; j < keys2.length; ++j) + object.vars[keys2[j]] = message.vars[keys2[j]]; + } + if (message.databaseSuffix != null && message.hasOwnProperty("databaseSuffix")) + object.databaseSuffix = message.databaseSuffix; + if (message.schemaSuffix != null && message.hasOwnProperty("schemaSuffix")) + object.schemaSuffix = message.schemaSuffix; + if (message.tablePrefix != null && message.hasOwnProperty("tablePrefix")) + object.tablePrefix = message.tablePrefix; + if (message.defaultLocation != null && message.hasOwnProperty("defaultLocation")) + object.defaultLocation = message.defaultLocation; + return object; + }; + + /** + * Converts this CodeCompilationConfig to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @instance + * @returns {Object.} JSON object + */ + CodeCompilationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CodeCompilationConfig; + })(); + + CompilationResult.CompilationError = (function() { + + /** + * Properties of a CompilationError. + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @interface ICompilationError + * @property {string|null} [message] CompilationError message + * @property {string|null} [stack] CompilationError stack + * @property {string|null} [path] CompilationError path + * @property {google.cloud.dataform.v1alpha2.ITarget|null} [actionTarget] CompilationError actionTarget + */ + + /** + * Constructs a new CompilationError. + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @classdesc Represents a CompilationError. + * @implements ICompilationError + * @constructor + * @param {google.cloud.dataform.v1alpha2.CompilationResult.ICompilationError=} [properties] Properties to set + */ + function CompilationError(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompilationError message. + * @member {string} message + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + * @instance + */ + CompilationError.prototype.message = ""; + + /** + * CompilationError stack. + * @member {string} stack + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + * @instance + */ + CompilationError.prototype.stack = ""; + + /** + * CompilationError path. + * @member {string} path + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + * @instance + */ + CompilationError.prototype.path = ""; + + /** + * CompilationError actionTarget. + * @member {google.cloud.dataform.v1alpha2.ITarget|null|undefined} actionTarget + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + * @instance + */ + CompilationError.prototype.actionTarget = null; + + /** + * Creates a new CompilationError instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResult.ICompilationError=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CompilationResult.CompilationError} CompilationError instance + */ + CompilationError.create = function create(properties) { + return new CompilationError(properties); + }; + + /** + * Encodes the specified CompilationError message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResult.CompilationError.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResult.ICompilationError} message CompilationError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationError.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.stack != null && Object.hasOwnProperty.call(message, "stack")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.stack); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.path); + if (message.actionTarget != null && Object.hasOwnProperty.call(message, "actionTarget")) + $root.google.cloud.dataform.v1alpha2.Target.encode(message.actionTarget, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CompilationError message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResult.CompilationError.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResult.ICompilationError} message CompilationError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationError.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompilationError message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CompilationResult.CompilationError} CompilationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationError.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CompilationResult.CompilationError(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = reader.string(); + break; + case 2: + message.stack = reader.string(); + break; + case 3: + message.path = reader.string(); + break; + case 4: + message.actionTarget = $root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompilationError message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CompilationResult.CompilationError} CompilationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationError.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompilationError message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompilationError.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.stack != null && message.hasOwnProperty("stack")) + if (!$util.isString(message.stack)) + return "stack: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.actionTarget != null && message.hasOwnProperty("actionTarget")) { + var error = $root.google.cloud.dataform.v1alpha2.Target.verify(message.actionTarget); + if (error) + return "actionTarget." + error; + } + return null; + }; + + /** + * Creates a CompilationError message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CompilationResult.CompilationError} CompilationError + */ + CompilationError.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CompilationResult.CompilationError) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CompilationResult.CompilationError(); + if (object.message != null) + message.message = String(object.message); + if (object.stack != null) + message.stack = String(object.stack); + if (object.path != null) + message.path = String(object.path); + if (object.actionTarget != null) { + if (typeof object.actionTarget !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResult.CompilationError.actionTarget: object expected"); + message.actionTarget = $root.google.cloud.dataform.v1alpha2.Target.fromObject(object.actionTarget); + } + return message; + }; + + /** + * Creates a plain object from a CompilationError message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResult.CompilationError} message CompilationError + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompilationError.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.stack = ""; + object.path = ""; + object.actionTarget = null; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.stack != null && message.hasOwnProperty("stack")) + object.stack = message.stack; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.actionTarget != null && message.hasOwnProperty("actionTarget")) + object.actionTarget = $root.google.cloud.dataform.v1alpha2.Target.toObject(message.actionTarget, options); + return object; + }; + + /** + * Converts this CompilationError to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + * @instance + * @returns {Object.} JSON object + */ + CompilationError.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CompilationError; + })(); + + return CompilationResult; + })(); + + v1alpha2.ListCompilationResultsRequest = (function() { + + /** + * Properties of a ListCompilationResultsRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IListCompilationResultsRequest + * @property {string|null} [parent] ListCompilationResultsRequest parent + * @property {number|null} [pageSize] ListCompilationResultsRequest pageSize + * @property {string|null} [pageToken] ListCompilationResultsRequest pageToken + */ + + /** + * Constructs a new ListCompilationResultsRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a ListCompilationResultsRequest. + * @implements IListCompilationResultsRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IListCompilationResultsRequest=} [properties] Properties to set + */ + function ListCompilationResultsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCompilationResultsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsRequest + * @instance + */ + ListCompilationResultsRequest.prototype.parent = ""; + + /** + * ListCompilationResultsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsRequest + * @instance + */ + ListCompilationResultsRequest.prototype.pageSize = 0; + + /** + * ListCompilationResultsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsRequest + * @instance + */ + ListCompilationResultsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListCompilationResultsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IListCompilationResultsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.ListCompilationResultsRequest} ListCompilationResultsRequest instance + */ + ListCompilationResultsRequest.create = function create(properties) { + return new ListCompilationResultsRequest(properties); + }; + + /** + * Encodes the specified ListCompilationResultsRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListCompilationResultsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IListCompilationResultsRequest} message ListCompilationResultsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCompilationResultsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListCompilationResultsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListCompilationResultsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IListCompilationResultsRequest} message ListCompilationResultsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCompilationResultsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCompilationResultsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.ListCompilationResultsRequest} ListCompilationResultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCompilationResultsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListCompilationResultsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.ListCompilationResultsRequest} ListCompilationResultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCompilationResultsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCompilationResultsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCompilationResultsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListCompilationResultsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.ListCompilationResultsRequest} ListCompilationResultsRequest + */ + ListCompilationResultsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListCompilationResultsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ListCompilationResultsRequest} message ListCompilationResultsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCompilationResultsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListCompilationResultsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsRequest + * @instance + * @returns {Object.} JSON object + */ + ListCompilationResultsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListCompilationResultsRequest; + })(); + + v1alpha2.ListCompilationResultsResponse = (function() { + + /** + * Properties of a ListCompilationResultsResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IListCompilationResultsResponse + * @property {Array.|null} [compilationResults] ListCompilationResultsResponse compilationResults + * @property {string|null} [nextPageToken] ListCompilationResultsResponse nextPageToken + */ + + /** + * Constructs a new ListCompilationResultsResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a ListCompilationResultsResponse. + * @implements IListCompilationResultsResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IListCompilationResultsResponse=} [properties] Properties to set + */ + function ListCompilationResultsResponse(properties) { + this.compilationResults = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCompilationResultsResponse compilationResults. + * @member {Array.} compilationResults + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsResponse + * @instance + */ + ListCompilationResultsResponse.prototype.compilationResults = $util.emptyArray; + + /** + * ListCompilationResultsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsResponse + * @instance + */ + ListCompilationResultsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListCompilationResultsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IListCompilationResultsResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.ListCompilationResultsResponse} ListCompilationResultsResponse instance + */ + ListCompilationResultsResponse.create = function create(properties) { + return new ListCompilationResultsResponse(properties); + }; + + /** + * Encodes the specified ListCompilationResultsResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListCompilationResultsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IListCompilationResultsResponse} message ListCompilationResultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCompilationResultsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.compilationResults != null && message.compilationResults.length) + for (var i = 0; i < message.compilationResults.length; ++i) + $root.google.cloud.dataform.v1alpha2.CompilationResult.encode(message.compilationResults[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 ListCompilationResultsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListCompilationResultsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IListCompilationResultsResponse} message ListCompilationResultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCompilationResultsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCompilationResultsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.ListCompilationResultsResponse} ListCompilationResultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCompilationResultsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.ListCompilationResultsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.compilationResults && message.compilationResults.length)) + message.compilationResults = []; + message.compilationResults.push($root.google.cloud.dataform.v1alpha2.CompilationResult.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListCompilationResultsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.ListCompilationResultsResponse} ListCompilationResultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCompilationResultsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCompilationResultsResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCompilationResultsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.compilationResults != null && message.hasOwnProperty("compilationResults")) { + if (!Array.isArray(message.compilationResults)) + return "compilationResults: array expected"; + for (var i = 0; i < message.compilationResults.length; ++i) { + var error = $root.google.cloud.dataform.v1alpha2.CompilationResult.verify(message.compilationResults[i]); + if (error) + return "compilationResults." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListCompilationResultsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.ListCompilationResultsResponse} ListCompilationResultsResponse + */ + ListCompilationResultsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.ListCompilationResultsResponse) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.ListCompilationResultsResponse(); + if (object.compilationResults) { + if (!Array.isArray(object.compilationResults)) + throw TypeError(".google.cloud.dataform.v1alpha2.ListCompilationResultsResponse.compilationResults: array expected"); + message.compilationResults = []; + for (var i = 0; i < object.compilationResults.length; ++i) { + if (typeof object.compilationResults[i] !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.ListCompilationResultsResponse.compilationResults: object expected"); + message.compilationResults[i] = $root.google.cloud.dataform.v1alpha2.CompilationResult.fromObject(object.compilationResults[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListCompilationResultsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.ListCompilationResultsResponse} message ListCompilationResultsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCompilationResultsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.compilationResults = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.compilationResults && message.compilationResults.length) { + object.compilationResults = []; + for (var j = 0; j < message.compilationResults.length; ++j) + object.compilationResults[j] = $root.google.cloud.dataform.v1alpha2.CompilationResult.toObject(message.compilationResults[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListCompilationResultsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsResponse + * @instance + * @returns {Object.} JSON object + */ + ListCompilationResultsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListCompilationResultsResponse; + })(); + + v1alpha2.GetCompilationResultRequest = (function() { + + /** + * Properties of a GetCompilationResultRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IGetCompilationResultRequest + * @property {string|null} [name] GetCompilationResultRequest name + */ + + /** + * Constructs a new GetCompilationResultRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a GetCompilationResultRequest. + * @implements IGetCompilationResultRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IGetCompilationResultRequest=} [properties] Properties to set + */ + function GetCompilationResultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetCompilationResultRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.GetCompilationResultRequest + * @instance + */ + GetCompilationResultRequest.prototype.name = ""; + + /** + * Creates a new GetCompilationResultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.GetCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IGetCompilationResultRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.GetCompilationResultRequest} GetCompilationResultRequest instance + */ + GetCompilationResultRequest.create = function create(properties) { + return new GetCompilationResultRequest(properties); + }; + + /** + * Encodes the specified GetCompilationResultRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetCompilationResultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.GetCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IGetCompilationResultRequest} message GetCompilationResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCompilationResultRequest.encode = function encode(message, writer) { + 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 GetCompilationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetCompilationResultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.GetCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IGetCompilationResultRequest} message GetCompilationResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCompilationResultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetCompilationResultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.GetCompilationResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.GetCompilationResultRequest} GetCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCompilationResultRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.GetCompilationResultRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetCompilationResultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.GetCompilationResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.GetCompilationResultRequest} GetCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCompilationResultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetCompilationResultRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.GetCompilationResultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetCompilationResultRequest.verify = function verify(message) { + if (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 GetCompilationResultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.GetCompilationResultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.GetCompilationResultRequest} GetCompilationResultRequest + */ + GetCompilationResultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.GetCompilationResultRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.GetCompilationResultRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetCompilationResultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.GetCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1alpha2.GetCompilationResultRequest} message GetCompilationResultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetCompilationResultRequest.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 GetCompilationResultRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.GetCompilationResultRequest + * @instance + * @returns {Object.} JSON object + */ + GetCompilationResultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetCompilationResultRequest; + })(); + + v1alpha2.CreateCompilationResultRequest = (function() { + + /** + * Properties of a CreateCompilationResultRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface ICreateCompilationResultRequest + * @property {string|null} [parent] CreateCompilationResultRequest parent + * @property {google.cloud.dataform.v1alpha2.ICompilationResult|null} [compilationResult] CreateCompilationResultRequest compilationResult + */ + + /** + * Constructs a new CreateCompilationResultRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a CreateCompilationResultRequest. + * @implements ICreateCompilationResultRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest=} [properties] Properties to set + */ + function CreateCompilationResultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateCompilationResultRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1alpha2.CreateCompilationResultRequest + * @instance + */ + CreateCompilationResultRequest.prototype.parent = ""; + + /** + * CreateCompilationResultRequest compilationResult. + * @member {google.cloud.dataform.v1alpha2.ICompilationResult|null|undefined} compilationResult + * @memberof google.cloud.dataform.v1alpha2.CreateCompilationResultRequest + * @instance + */ + CreateCompilationResultRequest.prototype.compilationResult = null; + + /** + * Creates a new CreateCompilationResultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CreateCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CreateCompilationResultRequest} CreateCompilationResultRequest instance + */ + CreateCompilationResultRequest.create = function create(properties) { + return new CreateCompilationResultRequest(properties); + }; + + /** + * Encodes the specified CreateCompilationResultRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateCompilationResultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CreateCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest} message CreateCompilationResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCompilationResultRequest.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.compilationResult != null && Object.hasOwnProperty.call(message, "compilationResult")) + $root.google.cloud.dataform.v1alpha2.CompilationResult.encode(message.compilationResult, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateCompilationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateCompilationResultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CreateCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest} message CreateCompilationResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCompilationResultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateCompilationResultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CreateCompilationResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CreateCompilationResultRequest} CreateCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCompilationResultRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.compilationResult = $root.google.cloud.dataform.v1alpha2.CompilationResult.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateCompilationResultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CreateCompilationResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CreateCompilationResultRequest} CreateCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCompilationResultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateCompilationResultRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CreateCompilationResultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateCompilationResultRequest.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.compilationResult != null && message.hasOwnProperty("compilationResult")) { + var error = $root.google.cloud.dataform.v1alpha2.CompilationResult.verify(message.compilationResult); + if (error) + return "compilationResult." + error; + } + return null; + }; + + /** + * Creates a CreateCompilationResultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CreateCompilationResultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CreateCompilationResultRequest} CreateCompilationResultRequest + */ + CreateCompilationResultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.compilationResult != null) { + if (typeof object.compilationResult !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CreateCompilationResultRequest.compilationResult: object expected"); + message.compilationResult = $root.google.cloud.dataform.v1alpha2.CompilationResult.fromObject(object.compilationResult); + } + return message; + }; + + /** + * Creates a plain object from a CreateCompilationResultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CreateCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1alpha2.CreateCompilationResultRequest} message CreateCompilationResultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateCompilationResultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.compilationResult = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.compilationResult != null && message.hasOwnProperty("compilationResult")) + object.compilationResult = $root.google.cloud.dataform.v1alpha2.CompilationResult.toObject(message.compilationResult, options); + return object; + }; + + /** + * Converts this CreateCompilationResultRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CreateCompilationResultRequest + * @instance + * @returns {Object.} JSON object + */ + CreateCompilationResultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateCompilationResultRequest; + })(); + + v1alpha2.Target = (function() { + + /** + * Properties of a Target. + * @memberof google.cloud.dataform.v1alpha2 + * @interface ITarget + * @property {string|null} [database] Target database + * @property {string|null} [schema] Target schema + * @property {string|null} [name] Target name + */ + + /** + * Constructs a new Target. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a Target. + * @implements ITarget + * @constructor + * @param {google.cloud.dataform.v1alpha2.ITarget=} [properties] Properties to set + */ + function Target(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Target database. + * @member {string} database + * @memberof google.cloud.dataform.v1alpha2.Target + * @instance + */ + Target.prototype.database = ""; + + /** + * Target schema. + * @member {string} schema + * @memberof google.cloud.dataform.v1alpha2.Target + * @instance + */ + Target.prototype.schema = ""; + + /** + * Target name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.Target + * @instance + */ + Target.prototype.name = ""; + + /** + * Creates a new Target instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.Target + * @static + * @param {google.cloud.dataform.v1alpha2.ITarget=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.Target} Target instance + */ + Target.create = function create(properties) { + return new Target(properties); + }; + + /** + * Encodes the specified Target message. Does not implicitly {@link google.cloud.dataform.v1alpha2.Target.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.Target + * @static + * @param {google.cloud.dataform.v1alpha2.ITarget} message Target message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Target.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.database != null && Object.hasOwnProperty.call(message, "database")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.database); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.schema); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified Target message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.Target.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.Target + * @static + * @param {google.cloud.dataform.v1alpha2.ITarget} message Target message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Target.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Target message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.Target + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.Target} Target + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Target.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.Target(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.database = reader.string(); + break; + case 2: + message.schema = reader.string(); + break; + case 3: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Target message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.Target + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.Target} Target + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Target.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Target message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.Target + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Target.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.database != null && message.hasOwnProperty("database")) + if (!$util.isString(message.database)) + return "database: string expected"; + if (message.schema != null && message.hasOwnProperty("schema")) + if (!$util.isString(message.schema)) + return "schema: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a Target message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.Target + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.Target} Target + */ + Target.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.Target) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.Target(); + if (object.database != null) + message.database = String(object.database); + if (object.schema != null) + message.schema = String(object.schema); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a Target message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.Target + * @static + * @param {google.cloud.dataform.v1alpha2.Target} message Target + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Target.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.database = ""; + object.schema = ""; + object.name = ""; + } + if (message.database != null && message.hasOwnProperty("database")) + object.database = message.database; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = message.schema; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this Target to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.Target + * @instance + * @returns {Object.} JSON object + */ + Target.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Target; + })(); + + v1alpha2.RelationDescriptor = (function() { + + /** + * Properties of a RelationDescriptor. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IRelationDescriptor + * @property {string|null} [description] RelationDescriptor description + * @property {Array.|null} [columns] RelationDescriptor columns + * @property {Object.|null} [bigqueryLabels] RelationDescriptor bigqueryLabels + */ + + /** + * Constructs a new RelationDescriptor. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a RelationDescriptor. + * @implements IRelationDescriptor + * @constructor + * @param {google.cloud.dataform.v1alpha2.IRelationDescriptor=} [properties] Properties to set + */ + function RelationDescriptor(properties) { + this.columns = []; + this.bigqueryLabels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RelationDescriptor description. + * @member {string} description + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @instance + */ + RelationDescriptor.prototype.description = ""; + + /** + * RelationDescriptor columns. + * @member {Array.} columns + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @instance + */ + RelationDescriptor.prototype.columns = $util.emptyArray; + + /** + * RelationDescriptor bigqueryLabels. + * @member {Object.} bigqueryLabels + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @instance + */ + RelationDescriptor.prototype.bigqueryLabels = $util.emptyObject; + + /** + * Creates a new RelationDescriptor instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @static + * @param {google.cloud.dataform.v1alpha2.IRelationDescriptor=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.RelationDescriptor} RelationDescriptor instance + */ + RelationDescriptor.create = function create(properties) { + return new RelationDescriptor(properties); + }; + + /** + * Encodes the specified RelationDescriptor message. Does not implicitly {@link google.cloud.dataform.v1alpha2.RelationDescriptor.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @static + * @param {google.cloud.dataform.v1alpha2.IRelationDescriptor} message RelationDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RelationDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); + if (message.columns != null && message.columns.length) + for (var i = 0; i < message.columns.length; ++i) + $root.google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor.encode(message.columns[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.bigqueryLabels != null && Object.hasOwnProperty.call(message, "bigqueryLabels")) + for (var keys = Object.keys(message.bigqueryLabels), 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.bigqueryLabels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified RelationDescriptor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.RelationDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @static + * @param {google.cloud.dataform.v1alpha2.IRelationDescriptor} message RelationDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RelationDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RelationDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.RelationDescriptor} RelationDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RelationDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.RelationDescriptor(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.description = reader.string(); + break; + case 2: + if (!(message.columns && message.columns.length)) + message.columns = []; + message.columns.push($root.google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor.decode(reader, reader.uint32())); + break; + case 3: + if (message.bigqueryLabels === $util.emptyObject) + message.bigqueryLabels = {}; + 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.bigqueryLabels[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RelationDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.RelationDescriptor} RelationDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RelationDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RelationDescriptor message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RelationDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.columns != null && message.hasOwnProperty("columns")) { + if (!Array.isArray(message.columns)) + return "columns: array expected"; + for (var i = 0; i < message.columns.length; ++i) { + var error = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor.verify(message.columns[i]); + if (error) + return "columns." + error; + } + } + if (message.bigqueryLabels != null && message.hasOwnProperty("bigqueryLabels")) { + if (!$util.isObject(message.bigqueryLabels)) + return "bigqueryLabels: object expected"; + var key = Object.keys(message.bigqueryLabels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.bigqueryLabels[key[i]])) + return "bigqueryLabels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a RelationDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.RelationDescriptor} RelationDescriptor + */ + RelationDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.RelationDescriptor) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.RelationDescriptor(); + if (object.description != null) + message.description = String(object.description); + if (object.columns) { + if (!Array.isArray(object.columns)) + throw TypeError(".google.cloud.dataform.v1alpha2.RelationDescriptor.columns: array expected"); + message.columns = []; + for (var i = 0; i < object.columns.length; ++i) { + if (typeof object.columns[i] !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.RelationDescriptor.columns: object expected"); + message.columns[i] = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor.fromObject(object.columns[i]); + } + } + if (object.bigqueryLabels) { + if (typeof object.bigqueryLabels !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.RelationDescriptor.bigqueryLabels: object expected"); + message.bigqueryLabels = {}; + for (var keys = Object.keys(object.bigqueryLabels), i = 0; i < keys.length; ++i) + message.bigqueryLabels[keys[i]] = String(object.bigqueryLabels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a RelationDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @static + * @param {google.cloud.dataform.v1alpha2.RelationDescriptor} message RelationDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RelationDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.columns = []; + if (options.objects || options.defaults) + object.bigqueryLabels = {}; + if (options.defaults) + object.description = ""; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.columns && message.columns.length) { + object.columns = []; + for (var j = 0; j < message.columns.length; ++j) + object.columns[j] = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor.toObject(message.columns[j], options); + } + var keys2; + if (message.bigqueryLabels && (keys2 = Object.keys(message.bigqueryLabels)).length) { + object.bigqueryLabels = {}; + for (var j = 0; j < keys2.length; ++j) + object.bigqueryLabels[keys2[j]] = message.bigqueryLabels[keys2[j]]; + } + return object; + }; + + /** + * Converts this RelationDescriptor to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @instance + * @returns {Object.} JSON object + */ + RelationDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + RelationDescriptor.ColumnDescriptor = (function() { + + /** + * Properties of a ColumnDescriptor. + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @interface IColumnDescriptor + * @property {Array.|null} [path] ColumnDescriptor path + * @property {string|null} [description] ColumnDescriptor description + * @property {Array.|null} [bigqueryPolicyTags] ColumnDescriptor bigqueryPolicyTags + */ + + /** + * Constructs a new ColumnDescriptor. + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @classdesc Represents a ColumnDescriptor. + * @implements IColumnDescriptor + * @constructor + * @param {google.cloud.dataform.v1alpha2.RelationDescriptor.IColumnDescriptor=} [properties] Properties to set + */ + function ColumnDescriptor(properties) { + this.path = []; + this.bigqueryPolicyTags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ColumnDescriptor path. + * @member {Array.} path + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor + * @instance + */ + ColumnDescriptor.prototype.path = $util.emptyArray; + + /** + * ColumnDescriptor description. + * @member {string} description + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor + * @instance + */ + ColumnDescriptor.prototype.description = ""; + + /** + * ColumnDescriptor bigqueryPolicyTags. + * @member {Array.} bigqueryPolicyTags + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor + * @instance + */ + ColumnDescriptor.prototype.bigqueryPolicyTags = $util.emptyArray; + + /** + * Creates a new ColumnDescriptor instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor + * @static + * @param {google.cloud.dataform.v1alpha2.RelationDescriptor.IColumnDescriptor=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor} ColumnDescriptor instance + */ + ColumnDescriptor.create = function create(properties) { + return new ColumnDescriptor(properties); + }; + + /** + * Encodes the specified ColumnDescriptor message. Does not implicitly {@link google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor + * @static + * @param {google.cloud.dataform.v1alpha2.RelationDescriptor.IColumnDescriptor} message ColumnDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) + for (var i = 0; i < message.path.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path[i]); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.bigqueryPolicyTags != null && message.bigqueryPolicyTags.length) + for (var i = 0; i < message.bigqueryPolicyTags.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.bigqueryPolicyTags[i]); + return writer; + }; + + /** + * Encodes the specified ColumnDescriptor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor + * @static + * @param {google.cloud.dataform.v1alpha2.RelationDescriptor.IColumnDescriptor} message ColumnDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ColumnDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor} ColumnDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + message.path.push(reader.string()); + break; + case 2: + message.description = reader.string(); + break; + case 3: + if (!(message.bigqueryPolicyTags && message.bigqueryPolicyTags.length)) + message.bigqueryPolicyTags = []; + message.bigqueryPolicyTags.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ColumnDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor} ColumnDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ColumnDescriptor message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ColumnDescriptor.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.isString(message.path[i])) + return "path: string[] expected"; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.bigqueryPolicyTags != null && message.hasOwnProperty("bigqueryPolicyTags")) { + if (!Array.isArray(message.bigqueryPolicyTags)) + return "bigqueryPolicyTags: array expected"; + for (var i = 0; i < message.bigqueryPolicyTags.length; ++i) + if (!$util.isString(message.bigqueryPolicyTags[i])) + return "bigqueryPolicyTags: string[] expected"; + } + return null; + }; + + /** + * Creates a ColumnDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor} ColumnDescriptor + */ + ColumnDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = String(object.path[i]); + } + if (object.description != null) + message.description = String(object.description); + if (object.bigqueryPolicyTags) { + if (!Array.isArray(object.bigqueryPolicyTags)) + throw TypeError(".google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor.bigqueryPolicyTags: array expected"); + message.bigqueryPolicyTags = []; + for (var i = 0; i < object.bigqueryPolicyTags.length; ++i) + message.bigqueryPolicyTags[i] = String(object.bigqueryPolicyTags[i]); + } + return message; + }; + + /** + * Creates a plain object from a ColumnDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor + * @static + * @param {google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor} message ColumnDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ColumnDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.bigqueryPolicyTags = []; + } + if (options.defaults) + object.description = ""; + 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.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.bigqueryPolicyTags && message.bigqueryPolicyTags.length) { + object.bigqueryPolicyTags = []; + for (var j = 0; j < message.bigqueryPolicyTags.length; ++j) + object.bigqueryPolicyTags[j] = message.bigqueryPolicyTags[j]; + } + return object; + }; + + /** + * Converts this ColumnDescriptor to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor + * @instance + * @returns {Object.} JSON object + */ + ColumnDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ColumnDescriptor; + })(); + + return RelationDescriptor; + })(); + + v1alpha2.CompilationResultAction = (function() { + + /** + * Properties of a CompilationResultAction. + * @memberof google.cloud.dataform.v1alpha2 + * @interface ICompilationResultAction + * @property {google.cloud.dataform.v1alpha2.ITarget|null} [target] CompilationResultAction target + * @property {google.cloud.dataform.v1alpha2.ITarget|null} [canonicalTarget] CompilationResultAction canonicalTarget + * @property {string|null} [filePath] CompilationResultAction filePath + * @property {google.cloud.dataform.v1alpha2.CompilationResultAction.IRelation|null} [relation] CompilationResultAction relation + * @property {google.cloud.dataform.v1alpha2.CompilationResultAction.IOperations|null} [operations] CompilationResultAction operations + * @property {google.cloud.dataform.v1alpha2.CompilationResultAction.IAssertion|null} [assertion] CompilationResultAction assertion + * @property {google.cloud.dataform.v1alpha2.CompilationResultAction.IDeclaration|null} [declaration] CompilationResultAction declaration + */ + + /** + * Constructs a new CompilationResultAction. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a CompilationResultAction. + * @implements ICompilationResultAction + * @constructor + * @param {google.cloud.dataform.v1alpha2.ICompilationResultAction=} [properties] Properties to set + */ + function CompilationResultAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompilationResultAction target. + * @member {google.cloud.dataform.v1alpha2.ITarget|null|undefined} target + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.target = null; + + /** + * CompilationResultAction canonicalTarget. + * @member {google.cloud.dataform.v1alpha2.ITarget|null|undefined} canonicalTarget + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.canonicalTarget = null; + + /** + * CompilationResultAction filePath. + * @member {string} filePath + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.filePath = ""; + + /** + * CompilationResultAction relation. + * @member {google.cloud.dataform.v1alpha2.CompilationResultAction.IRelation|null|undefined} relation + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.relation = null; + + /** + * CompilationResultAction operations. + * @member {google.cloud.dataform.v1alpha2.CompilationResultAction.IOperations|null|undefined} operations + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.operations = null; + + /** + * CompilationResultAction assertion. + * @member {google.cloud.dataform.v1alpha2.CompilationResultAction.IAssertion|null|undefined} assertion + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.assertion = null; + + /** + * CompilationResultAction declaration. + * @member {google.cloud.dataform.v1alpha2.CompilationResultAction.IDeclaration|null|undefined} declaration + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.declaration = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CompilationResultAction compiledObject. + * @member {"relation"|"operations"|"assertion"|"declaration"|undefined} compiledObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @instance + */ + Object.defineProperty(CompilationResultAction.prototype, "compiledObject", { + get: $util.oneOfGetter($oneOfFields = ["relation", "operations", "assertion", "declaration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CompilationResultAction instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @static + * @param {google.cloud.dataform.v1alpha2.ICompilationResultAction=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction} CompilationResultAction instance + */ + CompilationResultAction.create = function create(properties) { + return new CompilationResultAction(properties); + }; + + /** + * Encodes the specified CompilationResultAction message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @static + * @param {google.cloud.dataform.v1alpha2.ICompilationResultAction} message CompilationResultAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationResultAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.google.cloud.dataform.v1alpha2.Target.encode(message.target, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.canonicalTarget != null && Object.hasOwnProperty.call(message, "canonicalTarget")) + $root.google.cloud.dataform.v1alpha2.Target.encode(message.canonicalTarget, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.filePath != null && Object.hasOwnProperty.call(message, "filePath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filePath); + if (message.relation != null && Object.hasOwnProperty.call(message, "relation")) + $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.encode(message.relation, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.operations != null && Object.hasOwnProperty.call(message, "operations")) + $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.encode(message.operations, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.assertion != null && Object.hasOwnProperty.call(message, "assertion")) + $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.encode(message.assertion, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.declaration != null && Object.hasOwnProperty.call(message, "declaration")) + $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration.encode(message.declaration, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CompilationResultAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @static + * @param {google.cloud.dataform.v1alpha2.ICompilationResultAction} message CompilationResultAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationResultAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompilationResultAction message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction} CompilationResultAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationResultAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CompilationResultAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.target = $root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32()); + break; + case 2: + message.canonicalTarget = $root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32()); + break; + case 3: + message.filePath = reader.string(); + break; + case 4: + message.relation = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.decode(reader, reader.uint32()); + break; + case 5: + message.operations = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.decode(reader, reader.uint32()); + break; + case 6: + message.assertion = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.decode(reader, reader.uint32()); + break; + case 7: + message.declaration = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompilationResultAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction} CompilationResultAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationResultAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompilationResultAction message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompilationResultAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.google.cloud.dataform.v1alpha2.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.canonicalTarget != null && message.hasOwnProperty("canonicalTarget")) { + var error = $root.google.cloud.dataform.v1alpha2.Target.verify(message.canonicalTarget); + if (error) + return "canonicalTarget." + error; + } + if (message.filePath != null && message.hasOwnProperty("filePath")) + if (!$util.isString(message.filePath)) + return "filePath: string expected"; + if (message.relation != null && message.hasOwnProperty("relation")) { + properties.compiledObject = 1; + { + var error = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.verify(message.relation); + if (error) + return "relation." + error; + } + } + if (message.operations != null && message.hasOwnProperty("operations")) { + if (properties.compiledObject === 1) + return "compiledObject: multiple values"; + properties.compiledObject = 1; + { + var error = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.verify(message.operations); + if (error) + return "operations." + error; + } + } + if (message.assertion != null && message.hasOwnProperty("assertion")) { + if (properties.compiledObject === 1) + return "compiledObject: multiple values"; + properties.compiledObject = 1; + { + var error = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.verify(message.assertion); + if (error) + return "assertion." + error; + } + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (properties.compiledObject === 1) + return "compiledObject: multiple values"; + properties.compiledObject = 1; + { + var error = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration.verify(message.declaration); + if (error) + return "declaration." + error; + } + } + return null; + }; + + /** + * Creates a CompilationResultAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction} CompilationResultAction + */ + CompilationResultAction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CompilationResultAction) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CompilationResultAction(); + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.target: object expected"); + message.target = $root.google.cloud.dataform.v1alpha2.Target.fromObject(object.target); + } + if (object.canonicalTarget != null) { + if (typeof object.canonicalTarget !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.canonicalTarget: object expected"); + message.canonicalTarget = $root.google.cloud.dataform.v1alpha2.Target.fromObject(object.canonicalTarget); + } + if (object.filePath != null) + message.filePath = String(object.filePath); + if (object.relation != null) { + if (typeof object.relation !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.relation: object expected"); + message.relation = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.fromObject(object.relation); + } + if (object.operations != null) { + if (typeof object.operations !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.operations: object expected"); + message.operations = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.fromObject(object.operations); + } + if (object.assertion != null) { + if (typeof object.assertion !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.assertion: object expected"); + message.assertion = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.fromObject(object.assertion); + } + if (object.declaration != null) { + if (typeof object.declaration !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.declaration: object expected"); + message.declaration = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration.fromObject(object.declaration); + } + return message; + }; + + /** + * Creates a plain object from a CompilationResultAction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction} message CompilationResultAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompilationResultAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.target = null; + object.canonicalTarget = null; + object.filePath = ""; + } + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.google.cloud.dataform.v1alpha2.Target.toObject(message.target, options); + if (message.canonicalTarget != null && message.hasOwnProperty("canonicalTarget")) + object.canonicalTarget = $root.google.cloud.dataform.v1alpha2.Target.toObject(message.canonicalTarget, options); + if (message.filePath != null && message.hasOwnProperty("filePath")) + object.filePath = message.filePath; + if (message.relation != null && message.hasOwnProperty("relation")) { + object.relation = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.toObject(message.relation, options); + if (options.oneofs) + object.compiledObject = "relation"; + } + if (message.operations != null && message.hasOwnProperty("operations")) { + object.operations = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.toObject(message.operations, options); + if (options.oneofs) + object.compiledObject = "operations"; + } + if (message.assertion != null && message.hasOwnProperty("assertion")) { + object.assertion = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.toObject(message.assertion, options); + if (options.oneofs) + object.compiledObject = "assertion"; + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + object.declaration = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration.toObject(message.declaration, options); + if (options.oneofs) + object.compiledObject = "declaration"; + } + return object; + }; + + /** + * Converts this CompilationResultAction to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @instance + * @returns {Object.} JSON object + */ + CompilationResultAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + CompilationResultAction.Relation = (function() { + + /** + * Properties of a Relation. + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @interface IRelation + * @property {Array.|null} [dependencyTargets] Relation dependencyTargets + * @property {boolean|null} [disabled] Relation disabled + * @property {Array.|null} [tags] Relation tags + * @property {google.cloud.dataform.v1alpha2.IRelationDescriptor|null} [relationDescriptor] Relation relationDescriptor + * @property {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.RelationType|null} [relationType] Relation relationType + * @property {string|null} [selectQuery] Relation selectQuery + * @property {Array.|null} [preOperations] Relation preOperations + * @property {Array.|null} [postOperations] Relation postOperations + * @property {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IIncrementalTableConfig|null} [incrementalTableConfig] Relation incrementalTableConfig + * @property {string|null} [partitionExpression] Relation partitionExpression + * @property {Array.|null} [clusterExpressions] Relation clusterExpressions + * @property {number|null} [partitionExpirationDays] Relation partitionExpirationDays + * @property {boolean|null} [requirePartitionFilter] Relation requirePartitionFilter + * @property {Object.|null} [additionalOptions] Relation additionalOptions + */ + + /** + * Constructs a new Relation. + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @classdesc Represents a Relation. + * @implements IRelation + * @constructor + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.IRelation=} [properties] Properties to set + */ + function Relation(properties) { + this.dependencyTargets = []; + this.tags = []; + this.preOperations = []; + this.postOperations = []; + this.clusterExpressions = []; + this.additionalOptions = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Relation dependencyTargets. + * @member {Array.} dependencyTargets + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.dependencyTargets = $util.emptyArray; + + /** + * Relation disabled. + * @member {boolean} disabled + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.disabled = false; + + /** + * Relation tags. + * @member {Array.} tags + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.tags = $util.emptyArray; + + /** + * Relation relationDescriptor. + * @member {google.cloud.dataform.v1alpha2.IRelationDescriptor|null|undefined} relationDescriptor + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.relationDescriptor = null; + + /** + * Relation relationType. + * @member {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.RelationType} relationType + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.relationType = 0; + + /** + * Relation selectQuery. + * @member {string} selectQuery + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.selectQuery = ""; + + /** + * Relation preOperations. + * @member {Array.} preOperations + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.preOperations = $util.emptyArray; + + /** + * Relation postOperations. + * @member {Array.} postOperations + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.postOperations = $util.emptyArray; + + /** + * Relation incrementalTableConfig. + * @member {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IIncrementalTableConfig|null|undefined} incrementalTableConfig + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.incrementalTableConfig = null; + + /** + * Relation partitionExpression. + * @member {string} partitionExpression + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.partitionExpression = ""; + + /** + * Relation clusterExpressions. + * @member {Array.} clusterExpressions + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.clusterExpressions = $util.emptyArray; + + /** + * Relation partitionExpirationDays. + * @member {number} partitionExpirationDays + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.partitionExpirationDays = 0; + + /** + * Relation requirePartitionFilter. + * @member {boolean} requirePartitionFilter + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.requirePartitionFilter = false; + + /** + * Relation additionalOptions. + * @member {Object.} additionalOptions + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.additionalOptions = $util.emptyObject; + + /** + * Creates a new Relation instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.IRelation=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation} Relation instance + */ + Relation.create = function create(properties) { + return new Relation(properties); + }; + + /** + * Encodes the specified Relation message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.IRelation} message Relation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Relation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dependencyTargets != null && message.dependencyTargets.length) + for (var i = 0; i < message.dependencyTargets.length; ++i) + $root.google.cloud.dataform.v1alpha2.Target.encode(message.dependencyTargets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.disabled); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tags[i]); + if (message.relationDescriptor != null && Object.hasOwnProperty.call(message, "relationDescriptor")) + $root.google.cloud.dataform.v1alpha2.RelationDescriptor.encode(message.relationDescriptor, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.relationType != null && Object.hasOwnProperty.call(message, "relationType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.relationType); + if (message.selectQuery != null && Object.hasOwnProperty.call(message, "selectQuery")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.selectQuery); + if (message.preOperations != null && message.preOperations.length) + for (var i = 0; i < message.preOperations.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.preOperations[i]); + if (message.postOperations != null && message.postOperations.length) + for (var i = 0; i < message.postOperations.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.postOperations[i]); + if (message.incrementalTableConfig != null && Object.hasOwnProperty.call(message, "incrementalTableConfig")) + $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig.encode(message.incrementalTableConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.partitionExpression != null && Object.hasOwnProperty.call(message, "partitionExpression")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.partitionExpression); + if (message.clusterExpressions != null && message.clusterExpressions.length) + for (var i = 0; i < message.clusterExpressions.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.clusterExpressions[i]); + if (message.partitionExpirationDays != null && Object.hasOwnProperty.call(message, "partitionExpirationDays")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.partitionExpirationDays); + if (message.requirePartitionFilter != null && Object.hasOwnProperty.call(message, "requirePartitionFilter")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.requirePartitionFilter); + if (message.additionalOptions != null && Object.hasOwnProperty.call(message, "additionalOptions")) + for (var keys = Object.keys(message.additionalOptions), i = 0; i < keys.length; ++i) + writer.uint32(/* id 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.additionalOptions[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified Relation message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.IRelation} message Relation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Relation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Relation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation} Relation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Relation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.dependencyTargets && message.dependencyTargets.length)) + message.dependencyTargets = []; + message.dependencyTargets.push($root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32())); + break; + case 2: + message.disabled = reader.bool(); + break; + case 3: + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + case 4: + message.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.decode(reader, reader.uint32()); + break; + case 5: + message.relationType = reader.int32(); + break; + case 6: + message.selectQuery = reader.string(); + break; + case 7: + if (!(message.preOperations && message.preOperations.length)) + message.preOperations = []; + message.preOperations.push(reader.string()); + break; + case 8: + if (!(message.postOperations && message.postOperations.length)) + message.postOperations = []; + message.postOperations.push(reader.string()); + break; + case 9: + message.incrementalTableConfig = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig.decode(reader, reader.uint32()); + break; + case 10: + message.partitionExpression = reader.string(); + break; + case 11: + if (!(message.clusterExpressions && message.clusterExpressions.length)) + message.clusterExpressions = []; + message.clusterExpressions.push(reader.string()); + break; + case 12: + message.partitionExpirationDays = reader.int32(); + break; + case 13: + message.requirePartitionFilter = reader.bool(); + break; + case 14: + if (message.additionalOptions === $util.emptyObject) + message.additionalOptions = {}; + 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.additionalOptions[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Relation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation} Relation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Relation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Relation message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Relation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dependencyTargets != null && message.hasOwnProperty("dependencyTargets")) { + if (!Array.isArray(message.dependencyTargets)) + return "dependencyTargets: array expected"; + for (var i = 0; i < message.dependencyTargets.length; ++i) { + var error = $root.google.cloud.dataform.v1alpha2.Target.verify(message.dependencyTargets[i]); + if (error) + return "dependencyTargets." + error; + } + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean 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.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) { + var error = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.verify(message.relationDescriptor); + if (error) + return "relationDescriptor." + error; + } + if (message.relationType != null && message.hasOwnProperty("relationType")) + switch (message.relationType) { + default: + return "relationType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.selectQuery != null && message.hasOwnProperty("selectQuery")) + if (!$util.isString(message.selectQuery)) + return "selectQuery: string expected"; + if (message.preOperations != null && message.hasOwnProperty("preOperations")) { + if (!Array.isArray(message.preOperations)) + return "preOperations: array expected"; + for (var i = 0; i < message.preOperations.length; ++i) + if (!$util.isString(message.preOperations[i])) + return "preOperations: string[] expected"; + } + if (message.postOperations != null && message.hasOwnProperty("postOperations")) { + if (!Array.isArray(message.postOperations)) + return "postOperations: array expected"; + for (var i = 0; i < message.postOperations.length; ++i) + if (!$util.isString(message.postOperations[i])) + return "postOperations: string[] expected"; + } + if (message.incrementalTableConfig != null && message.hasOwnProperty("incrementalTableConfig")) { + var error = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig.verify(message.incrementalTableConfig); + if (error) + return "incrementalTableConfig." + error; + } + if (message.partitionExpression != null && message.hasOwnProperty("partitionExpression")) + if (!$util.isString(message.partitionExpression)) + return "partitionExpression: string expected"; + if (message.clusterExpressions != null && message.hasOwnProperty("clusterExpressions")) { + if (!Array.isArray(message.clusterExpressions)) + return "clusterExpressions: array expected"; + for (var i = 0; i < message.clusterExpressions.length; ++i) + if (!$util.isString(message.clusterExpressions[i])) + return "clusterExpressions: string[] expected"; + } + if (message.partitionExpirationDays != null && message.hasOwnProperty("partitionExpirationDays")) + if (!$util.isInteger(message.partitionExpirationDays)) + return "partitionExpirationDays: integer expected"; + if (message.requirePartitionFilter != null && message.hasOwnProperty("requirePartitionFilter")) + if (typeof message.requirePartitionFilter !== "boolean") + return "requirePartitionFilter: boolean expected"; + if (message.additionalOptions != null && message.hasOwnProperty("additionalOptions")) { + if (!$util.isObject(message.additionalOptions)) + return "additionalOptions: object expected"; + var key = Object.keys(message.additionalOptions); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.additionalOptions[key[i]])) + return "additionalOptions: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a Relation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation} Relation + */ + Relation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation(); + if (object.dependencyTargets) { + if (!Array.isArray(object.dependencyTargets)) + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.dependencyTargets: array expected"); + message.dependencyTargets = []; + for (var i = 0; i < object.dependencyTargets.length; ++i) { + if (typeof object.dependencyTargets[i] !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.dependencyTargets: object expected"); + message.dependencyTargets[i] = $root.google.cloud.dataform.v1alpha2.Target.fromObject(object.dependencyTargets[i]); + } + } + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.relationDescriptor != null) { + if (typeof object.relationDescriptor !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.relationDescriptor: object expected"); + message.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.fromObject(object.relationDescriptor); + } + switch (object.relationType) { + case "RELATION_TYPE_UNSPECIFIED": + case 0: + message.relationType = 0; + break; + case "TABLE": + case 1: + message.relationType = 1; + break; + case "VIEW": + case 2: + message.relationType = 2; + break; + case "INCREMENTAL_TABLE": + case 3: + message.relationType = 3; + break; + case "MATERIALIZED_VIEW": + case 4: + message.relationType = 4; + break; + } + if (object.selectQuery != null) + message.selectQuery = String(object.selectQuery); + if (object.preOperations) { + if (!Array.isArray(object.preOperations)) + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.preOperations: array expected"); + message.preOperations = []; + for (var i = 0; i < object.preOperations.length; ++i) + message.preOperations[i] = String(object.preOperations[i]); + } + if (object.postOperations) { + if (!Array.isArray(object.postOperations)) + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.postOperations: array expected"); + message.postOperations = []; + for (var i = 0; i < object.postOperations.length; ++i) + message.postOperations[i] = String(object.postOperations[i]); + } + if (object.incrementalTableConfig != null) { + if (typeof object.incrementalTableConfig !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.incrementalTableConfig: object expected"); + message.incrementalTableConfig = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig.fromObject(object.incrementalTableConfig); + } + if (object.partitionExpression != null) + message.partitionExpression = String(object.partitionExpression); + if (object.clusterExpressions) { + if (!Array.isArray(object.clusterExpressions)) + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.clusterExpressions: array expected"); + message.clusterExpressions = []; + for (var i = 0; i < object.clusterExpressions.length; ++i) + message.clusterExpressions[i] = String(object.clusterExpressions[i]); + } + if (object.partitionExpirationDays != null) + message.partitionExpirationDays = object.partitionExpirationDays | 0; + if (object.requirePartitionFilter != null) + message.requirePartitionFilter = Boolean(object.requirePartitionFilter); + if (object.additionalOptions) { + if (typeof object.additionalOptions !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.additionalOptions: object expected"); + message.additionalOptions = {}; + for (var keys = Object.keys(object.additionalOptions), i = 0; i < keys.length; ++i) + message.additionalOptions[keys[i]] = String(object.additionalOptions[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a Relation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation} message Relation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Relation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependencyTargets = []; + object.tags = []; + object.preOperations = []; + object.postOperations = []; + object.clusterExpressions = []; + } + if (options.objects || options.defaults) + object.additionalOptions = {}; + if (options.defaults) { + object.disabled = false; + object.relationDescriptor = null; + object.relationType = options.enums === String ? "RELATION_TYPE_UNSPECIFIED" : 0; + object.selectQuery = ""; + object.incrementalTableConfig = null; + object.partitionExpression = ""; + object.partitionExpirationDays = 0; + object.requirePartitionFilter = false; + } + if (message.dependencyTargets && message.dependencyTargets.length) { + object.dependencyTargets = []; + for (var j = 0; j < message.dependencyTargets.length; ++j) + object.dependencyTargets[j] = $root.google.cloud.dataform.v1alpha2.Target.toObject(message.dependencyTargets[j], options); + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + 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.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) + object.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.toObject(message.relationDescriptor, options); + if (message.relationType != null && message.hasOwnProperty("relationType")) + object.relationType = options.enums === String ? $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.RelationType[message.relationType] : message.relationType; + if (message.selectQuery != null && message.hasOwnProperty("selectQuery")) + object.selectQuery = message.selectQuery; + if (message.preOperations && message.preOperations.length) { + object.preOperations = []; + for (var j = 0; j < message.preOperations.length; ++j) + object.preOperations[j] = message.preOperations[j]; + } + if (message.postOperations && message.postOperations.length) { + object.postOperations = []; + for (var j = 0; j < message.postOperations.length; ++j) + object.postOperations[j] = message.postOperations[j]; + } + if (message.incrementalTableConfig != null && message.hasOwnProperty("incrementalTableConfig")) + object.incrementalTableConfig = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig.toObject(message.incrementalTableConfig, options); + if (message.partitionExpression != null && message.hasOwnProperty("partitionExpression")) + object.partitionExpression = message.partitionExpression; + if (message.clusterExpressions && message.clusterExpressions.length) { + object.clusterExpressions = []; + for (var j = 0; j < message.clusterExpressions.length; ++j) + object.clusterExpressions[j] = message.clusterExpressions[j]; + } + if (message.partitionExpirationDays != null && message.hasOwnProperty("partitionExpirationDays")) + object.partitionExpirationDays = message.partitionExpirationDays; + if (message.requirePartitionFilter != null && message.hasOwnProperty("requirePartitionFilter")) + object.requirePartitionFilter = message.requirePartitionFilter; + var keys2; + if (message.additionalOptions && (keys2 = Object.keys(message.additionalOptions)).length) { + object.additionalOptions = {}; + for (var j = 0; j < keys2.length; ++j) + object.additionalOptions[keys2[j]] = message.additionalOptions[keys2[j]]; + } + return object; + }; + + /** + * Converts this Relation to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @instance + * @returns {Object.} JSON object + */ + Relation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * RelationType enum. + * @name google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.RelationType + * @enum {number} + * @property {number} RELATION_TYPE_UNSPECIFIED=0 RELATION_TYPE_UNSPECIFIED value + * @property {number} TABLE=1 TABLE value + * @property {number} VIEW=2 VIEW value + * @property {number} INCREMENTAL_TABLE=3 INCREMENTAL_TABLE value + * @property {number} MATERIALIZED_VIEW=4 MATERIALIZED_VIEW value + */ + Relation.RelationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RELATION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TABLE"] = 1; + values[valuesById[2] = "VIEW"] = 2; + values[valuesById[3] = "INCREMENTAL_TABLE"] = 3; + values[valuesById[4] = "MATERIALIZED_VIEW"] = 4; + return values; + })(); + + Relation.IncrementalTableConfig = (function() { + + /** + * Properties of an IncrementalTableConfig. + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @interface IIncrementalTableConfig + * @property {string|null} [incrementalSelectQuery] IncrementalTableConfig incrementalSelectQuery + * @property {boolean|null} [refreshDisabled] IncrementalTableConfig refreshDisabled + * @property {Array.|null} [uniqueKeyParts] IncrementalTableConfig uniqueKeyParts + * @property {string|null} [updatePartitionFilter] IncrementalTableConfig updatePartitionFilter + * @property {Array.|null} [incrementalPreOperations] IncrementalTableConfig incrementalPreOperations + * @property {Array.|null} [incrementalPostOperations] IncrementalTableConfig incrementalPostOperations + */ + + /** + * Constructs a new IncrementalTableConfig. + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @classdesc Represents an IncrementalTableConfig. + * @implements IIncrementalTableConfig + * @constructor + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IIncrementalTableConfig=} [properties] Properties to set + */ + function IncrementalTableConfig(properties) { + this.uniqueKeyParts = []; + this.incrementalPreOperations = []; + this.incrementalPostOperations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IncrementalTableConfig incrementalSelectQuery. + * @member {string} incrementalSelectQuery + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.incrementalSelectQuery = ""; + + /** + * IncrementalTableConfig refreshDisabled. + * @member {boolean} refreshDisabled + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.refreshDisabled = false; + + /** + * IncrementalTableConfig uniqueKeyParts. + * @member {Array.} uniqueKeyParts + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.uniqueKeyParts = $util.emptyArray; + + /** + * IncrementalTableConfig updatePartitionFilter. + * @member {string} updatePartitionFilter + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.updatePartitionFilter = ""; + + /** + * IncrementalTableConfig incrementalPreOperations. + * @member {Array.} incrementalPreOperations + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.incrementalPreOperations = $util.emptyArray; + + /** + * IncrementalTableConfig incrementalPostOperations. + * @member {Array.} incrementalPostOperations + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.incrementalPostOperations = $util.emptyArray; + + /** + * Creates a new IncrementalTableConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IIncrementalTableConfig=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig} IncrementalTableConfig instance + */ + IncrementalTableConfig.create = function create(properties) { + return new IncrementalTableConfig(properties); + }; + + /** + * Encodes the specified IncrementalTableConfig message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IIncrementalTableConfig} message IncrementalTableConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IncrementalTableConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.incrementalSelectQuery != null && Object.hasOwnProperty.call(message, "incrementalSelectQuery")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.incrementalSelectQuery); + if (message.refreshDisabled != null && Object.hasOwnProperty.call(message, "refreshDisabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.refreshDisabled); + if (message.uniqueKeyParts != null && message.uniqueKeyParts.length) + for (var i = 0; i < message.uniqueKeyParts.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uniqueKeyParts[i]); + if (message.updatePartitionFilter != null && Object.hasOwnProperty.call(message, "updatePartitionFilter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.updatePartitionFilter); + if (message.incrementalPreOperations != null && message.incrementalPreOperations.length) + for (var i = 0; i < message.incrementalPreOperations.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.incrementalPreOperations[i]); + if (message.incrementalPostOperations != null && message.incrementalPostOperations.length) + for (var i = 0; i < message.incrementalPostOperations.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.incrementalPostOperations[i]); + return writer; + }; + + /** + * Encodes the specified IncrementalTableConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IIncrementalTableConfig} message IncrementalTableConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IncrementalTableConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IncrementalTableConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig} IncrementalTableConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IncrementalTableConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.incrementalSelectQuery = reader.string(); + break; + case 2: + message.refreshDisabled = reader.bool(); + break; + case 3: + if (!(message.uniqueKeyParts && message.uniqueKeyParts.length)) + message.uniqueKeyParts = []; + message.uniqueKeyParts.push(reader.string()); + break; + case 4: + message.updatePartitionFilter = reader.string(); + break; + case 5: + if (!(message.incrementalPreOperations && message.incrementalPreOperations.length)) + message.incrementalPreOperations = []; + message.incrementalPreOperations.push(reader.string()); + break; + case 6: + if (!(message.incrementalPostOperations && message.incrementalPostOperations.length)) + message.incrementalPostOperations = []; + message.incrementalPostOperations.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IncrementalTableConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig} IncrementalTableConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IncrementalTableConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IncrementalTableConfig message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IncrementalTableConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.incrementalSelectQuery != null && message.hasOwnProperty("incrementalSelectQuery")) + if (!$util.isString(message.incrementalSelectQuery)) + return "incrementalSelectQuery: string expected"; + if (message.refreshDisabled != null && message.hasOwnProperty("refreshDisabled")) + if (typeof message.refreshDisabled !== "boolean") + return "refreshDisabled: boolean expected"; + if (message.uniqueKeyParts != null && message.hasOwnProperty("uniqueKeyParts")) { + if (!Array.isArray(message.uniqueKeyParts)) + return "uniqueKeyParts: array expected"; + for (var i = 0; i < message.uniqueKeyParts.length; ++i) + if (!$util.isString(message.uniqueKeyParts[i])) + return "uniqueKeyParts: string[] expected"; + } + if (message.updatePartitionFilter != null && message.hasOwnProperty("updatePartitionFilter")) + if (!$util.isString(message.updatePartitionFilter)) + return "updatePartitionFilter: string expected"; + if (message.incrementalPreOperations != null && message.hasOwnProperty("incrementalPreOperations")) { + if (!Array.isArray(message.incrementalPreOperations)) + return "incrementalPreOperations: array expected"; + for (var i = 0; i < message.incrementalPreOperations.length; ++i) + if (!$util.isString(message.incrementalPreOperations[i])) + return "incrementalPreOperations: string[] expected"; + } + if (message.incrementalPostOperations != null && message.hasOwnProperty("incrementalPostOperations")) { + if (!Array.isArray(message.incrementalPostOperations)) + return "incrementalPostOperations: array expected"; + for (var i = 0; i < message.incrementalPostOperations.length; ++i) + if (!$util.isString(message.incrementalPostOperations[i])) + return "incrementalPostOperations: string[] expected"; + } + return null; + }; + + /** + * Creates an IncrementalTableConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig} IncrementalTableConfig + */ + IncrementalTableConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig(); + if (object.incrementalSelectQuery != null) + message.incrementalSelectQuery = String(object.incrementalSelectQuery); + if (object.refreshDisabled != null) + message.refreshDisabled = Boolean(object.refreshDisabled); + if (object.uniqueKeyParts) { + if (!Array.isArray(object.uniqueKeyParts)) + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig.uniqueKeyParts: array expected"); + message.uniqueKeyParts = []; + for (var i = 0; i < object.uniqueKeyParts.length; ++i) + message.uniqueKeyParts[i] = String(object.uniqueKeyParts[i]); + } + if (object.updatePartitionFilter != null) + message.updatePartitionFilter = String(object.updatePartitionFilter); + if (object.incrementalPreOperations) { + if (!Array.isArray(object.incrementalPreOperations)) + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig.incrementalPreOperations: array expected"); + message.incrementalPreOperations = []; + for (var i = 0; i < object.incrementalPreOperations.length; ++i) + message.incrementalPreOperations[i] = String(object.incrementalPreOperations[i]); + } + if (object.incrementalPostOperations) { + if (!Array.isArray(object.incrementalPostOperations)) + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig.incrementalPostOperations: array expected"); + message.incrementalPostOperations = []; + for (var i = 0; i < object.incrementalPostOperations.length; ++i) + message.incrementalPostOperations[i] = String(object.incrementalPostOperations[i]); + } + return message; + }; + + /** + * Creates a plain object from an IncrementalTableConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig} message IncrementalTableConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IncrementalTableConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uniqueKeyParts = []; + object.incrementalPreOperations = []; + object.incrementalPostOperations = []; + } + if (options.defaults) { + object.incrementalSelectQuery = ""; + object.refreshDisabled = false; + object.updatePartitionFilter = ""; + } + if (message.incrementalSelectQuery != null && message.hasOwnProperty("incrementalSelectQuery")) + object.incrementalSelectQuery = message.incrementalSelectQuery; + if (message.refreshDisabled != null && message.hasOwnProperty("refreshDisabled")) + object.refreshDisabled = message.refreshDisabled; + if (message.uniqueKeyParts && message.uniqueKeyParts.length) { + object.uniqueKeyParts = []; + for (var j = 0; j < message.uniqueKeyParts.length; ++j) + object.uniqueKeyParts[j] = message.uniqueKeyParts[j]; + } + if (message.updatePartitionFilter != null && message.hasOwnProperty("updatePartitionFilter")) + object.updatePartitionFilter = message.updatePartitionFilter; + if (message.incrementalPreOperations && message.incrementalPreOperations.length) { + object.incrementalPreOperations = []; + for (var j = 0; j < message.incrementalPreOperations.length; ++j) + object.incrementalPreOperations[j] = message.incrementalPreOperations[j]; + } + if (message.incrementalPostOperations && message.incrementalPostOperations.length) { + object.incrementalPostOperations = []; + for (var j = 0; j < message.incrementalPostOperations.length; ++j) + object.incrementalPostOperations[j] = message.incrementalPostOperations[j]; + } + return object; + }; + + /** + * Converts this IncrementalTableConfig to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + * @returns {Object.} JSON object + */ + IncrementalTableConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IncrementalTableConfig; + })(); + + return Relation; + })(); + + CompilationResultAction.Operations = (function() { + + /** + * Properties of an Operations. + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @interface IOperations + * @property {Array.|null} [dependencyTargets] Operations dependencyTargets + * @property {boolean|null} [disabled] Operations disabled + * @property {Array.|null} [tags] Operations tags + * @property {google.cloud.dataform.v1alpha2.IRelationDescriptor|null} [relationDescriptor] Operations relationDescriptor + * @property {Array.|null} [queries] Operations queries + * @property {boolean|null} [hasOutput] Operations hasOutput + */ + + /** + * Constructs a new Operations. + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @classdesc Represents an Operations. + * @implements IOperations + * @constructor + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.IOperations=} [properties] Properties to set + */ + function Operations(properties) { + this.dependencyTargets = []; + this.tags = []; + this.queries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Operations dependencyTargets. + * @member {Array.} dependencyTargets + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.dependencyTargets = $util.emptyArray; + + /** + * Operations disabled. + * @member {boolean} disabled + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.disabled = false; + + /** + * Operations tags. + * @member {Array.} tags + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.tags = $util.emptyArray; + + /** + * Operations relationDescriptor. + * @member {google.cloud.dataform.v1alpha2.IRelationDescriptor|null|undefined} relationDescriptor + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.relationDescriptor = null; + + /** + * Operations queries. + * @member {Array.} queries + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.queries = $util.emptyArray; + + /** + * Operations hasOutput. + * @member {boolean} hasOutput + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.hasOutput = false; + + /** + * Creates a new Operations instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.IOperations=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Operations} Operations instance + */ + Operations.create = function create(properties) { + return new Operations(properties); + }; + + /** + * Encodes the specified Operations message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.IOperations} message Operations message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operations.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dependencyTargets != null && message.dependencyTargets.length) + for (var i = 0; i < message.dependencyTargets.length; ++i) + $root.google.cloud.dataform.v1alpha2.Target.encode(message.dependencyTargets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.disabled); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tags[i]); + if (message.queries != null && message.queries.length) + for (var i = 0; i < message.queries.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.queries[i]); + if (message.hasOutput != null && Object.hasOwnProperty.call(message, "hasOutput")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.hasOutput); + if (message.relationDescriptor != null && Object.hasOwnProperty.call(message, "relationDescriptor")) + $root.google.cloud.dataform.v1alpha2.RelationDescriptor.encode(message.relationDescriptor, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Operations message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.IOperations} message Operations message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operations.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Operations message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Operations} Operations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operations.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Operations(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.dependencyTargets && message.dependencyTargets.length)) + message.dependencyTargets = []; + message.dependencyTargets.push($root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32())); + break; + case 2: + message.disabled = reader.bool(); + break; + case 3: + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + case 6: + message.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.queries && message.queries.length)) + message.queries = []; + message.queries.push(reader.string()); + break; + case 5: + message.hasOutput = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Operations message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Operations} Operations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operations.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Operations message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operations.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dependencyTargets != null && message.hasOwnProperty("dependencyTargets")) { + if (!Array.isArray(message.dependencyTargets)) + return "dependencyTargets: array expected"; + for (var i = 0; i < message.dependencyTargets.length; ++i) { + var error = $root.google.cloud.dataform.v1alpha2.Target.verify(message.dependencyTargets[i]); + if (error) + return "dependencyTargets." + error; + } + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean 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.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) { + var error = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.verify(message.relationDescriptor); + if (error) + return "relationDescriptor." + error; + } + if (message.queries != null && message.hasOwnProperty("queries")) { + if (!Array.isArray(message.queries)) + return "queries: array expected"; + for (var i = 0; i < message.queries.length; ++i) + if (!$util.isString(message.queries[i])) + return "queries: string[] expected"; + } + if (message.hasOutput != null && message.hasOwnProperty("hasOutput")) + if (typeof message.hasOutput !== "boolean") + return "hasOutput: boolean expected"; + return null; + }; + + /** + * Creates an Operations message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Operations} Operations + */ + Operations.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Operations) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Operations(); + if (object.dependencyTargets) { + if (!Array.isArray(object.dependencyTargets)) + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.dependencyTargets: array expected"); + message.dependencyTargets = []; + for (var i = 0; i < object.dependencyTargets.length; ++i) { + if (typeof object.dependencyTargets[i] !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.dependencyTargets: object expected"); + message.dependencyTargets[i] = $root.google.cloud.dataform.v1alpha2.Target.fromObject(object.dependencyTargets[i]); + } + } + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.relationDescriptor != null) { + if (typeof object.relationDescriptor !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.relationDescriptor: object expected"); + message.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.fromObject(object.relationDescriptor); + } + if (object.queries) { + if (!Array.isArray(object.queries)) + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.queries: array expected"); + message.queries = []; + for (var i = 0; i < object.queries.length; ++i) + message.queries[i] = String(object.queries[i]); + } + if (object.hasOutput != null) + message.hasOutput = Boolean(object.hasOutput); + return message; + }; + + /** + * Creates a plain object from an Operations message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.Operations} message Operations + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operations.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependencyTargets = []; + object.tags = []; + object.queries = []; + } + if (options.defaults) { + object.disabled = false; + object.hasOutput = false; + object.relationDescriptor = null; + } + if (message.dependencyTargets && message.dependencyTargets.length) { + object.dependencyTargets = []; + for (var j = 0; j < message.dependencyTargets.length; ++j) + object.dependencyTargets[j] = $root.google.cloud.dataform.v1alpha2.Target.toObject(message.dependencyTargets[j], options); + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + 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.queries && message.queries.length) { + object.queries = []; + for (var j = 0; j < message.queries.length; ++j) + object.queries[j] = message.queries[j]; + } + if (message.hasOutput != null && message.hasOwnProperty("hasOutput")) + object.hasOutput = message.hasOutput; + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) + object.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.toObject(message.relationDescriptor, options); + return object; + }; + + /** + * Converts this Operations to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @instance + * @returns {Object.} JSON object + */ + Operations.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Operations; + })(); + + CompilationResultAction.Assertion = (function() { + + /** + * Properties of an Assertion. + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @interface IAssertion + * @property {Array.|null} [dependencyTargets] Assertion dependencyTargets + * @property {google.cloud.dataform.v1alpha2.ITarget|null} [parentAction] Assertion parentAction + * @property {boolean|null} [disabled] Assertion disabled + * @property {Array.|null} [tags] Assertion tags + * @property {string|null} [selectQuery] Assertion selectQuery + * @property {google.cloud.dataform.v1alpha2.IRelationDescriptor|null} [relationDescriptor] Assertion relationDescriptor + */ + + /** + * Constructs a new Assertion. + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @classdesc Represents an Assertion. + * @implements IAssertion + * @constructor + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.IAssertion=} [properties] Properties to set + */ + function Assertion(properties) { + this.dependencyTargets = []; + this.tags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Assertion dependencyTargets. + * @member {Array.} dependencyTargets + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.dependencyTargets = $util.emptyArray; + + /** + * Assertion parentAction. + * @member {google.cloud.dataform.v1alpha2.ITarget|null|undefined} parentAction + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.parentAction = null; + + /** + * Assertion disabled. + * @member {boolean} disabled + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.disabled = false; + + /** + * Assertion tags. + * @member {Array.} tags + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.tags = $util.emptyArray; + + /** + * Assertion selectQuery. + * @member {string} selectQuery + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.selectQuery = ""; + + /** + * Assertion relationDescriptor. + * @member {google.cloud.dataform.v1alpha2.IRelationDescriptor|null|undefined} relationDescriptor + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.relationDescriptor = null; + + /** + * Creates a new Assertion instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.IAssertion=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion} Assertion instance + */ + Assertion.create = function create(properties) { + return new Assertion(properties); + }; + + /** + * Encodes the specified Assertion message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.IAssertion} message Assertion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Assertion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dependencyTargets != null && message.dependencyTargets.length) + for (var i = 0; i < message.dependencyTargets.length; ++i) + $root.google.cloud.dataform.v1alpha2.Target.encode(message.dependencyTargets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.disabled); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tags[i]); + if (message.selectQuery != null && Object.hasOwnProperty.call(message, "selectQuery")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.selectQuery); + if (message.parentAction != null && Object.hasOwnProperty.call(message, "parentAction")) + $root.google.cloud.dataform.v1alpha2.Target.encode(message.parentAction, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.relationDescriptor != null && Object.hasOwnProperty.call(message, "relationDescriptor")) + $root.google.cloud.dataform.v1alpha2.RelationDescriptor.encode(message.relationDescriptor, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Assertion message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.IAssertion} message Assertion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Assertion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Assertion message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion} Assertion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Assertion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.dependencyTargets && message.dependencyTargets.length)) + message.dependencyTargets = []; + message.dependencyTargets.push($root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32())); + break; + case 5: + message.parentAction = $root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32()); + break; + case 2: + message.disabled = reader.bool(); + break; + case 3: + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + case 4: + message.selectQuery = reader.string(); + break; + case 6: + message.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Assertion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion} Assertion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Assertion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Assertion message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Assertion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dependencyTargets != null && message.hasOwnProperty("dependencyTargets")) { + if (!Array.isArray(message.dependencyTargets)) + return "dependencyTargets: array expected"; + for (var i = 0; i < message.dependencyTargets.length; ++i) { + var error = $root.google.cloud.dataform.v1alpha2.Target.verify(message.dependencyTargets[i]); + if (error) + return "dependencyTargets." + error; + } + } + if (message.parentAction != null && message.hasOwnProperty("parentAction")) { + var error = $root.google.cloud.dataform.v1alpha2.Target.verify(message.parentAction); + if (error) + return "parentAction." + error; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean 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.selectQuery != null && message.hasOwnProperty("selectQuery")) + if (!$util.isString(message.selectQuery)) + return "selectQuery: string expected"; + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) { + var error = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.verify(message.relationDescriptor); + if (error) + return "relationDescriptor." + error; + } + return null; + }; + + /** + * Creates an Assertion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion} Assertion + */ + Assertion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion(); + if (object.dependencyTargets) { + if (!Array.isArray(object.dependencyTargets)) + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.dependencyTargets: array expected"); + message.dependencyTargets = []; + for (var i = 0; i < object.dependencyTargets.length; ++i) { + if (typeof object.dependencyTargets[i] !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.dependencyTargets: object expected"); + message.dependencyTargets[i] = $root.google.cloud.dataform.v1alpha2.Target.fromObject(object.dependencyTargets[i]); + } + } + if (object.parentAction != null) { + if (typeof object.parentAction !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.parentAction: object expected"); + message.parentAction = $root.google.cloud.dataform.v1alpha2.Target.fromObject(object.parentAction); + } + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.selectQuery != null) + message.selectQuery = String(object.selectQuery); + if (object.relationDescriptor != null) { + if (typeof object.relationDescriptor !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.relationDescriptor: object expected"); + message.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.fromObject(object.relationDescriptor); + } + return message; + }; + + /** + * Creates a plain object from an Assertion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion} message Assertion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Assertion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependencyTargets = []; + object.tags = []; + } + if (options.defaults) { + object.disabled = false; + object.selectQuery = ""; + object.parentAction = null; + object.relationDescriptor = null; + } + if (message.dependencyTargets && message.dependencyTargets.length) { + object.dependencyTargets = []; + for (var j = 0; j < message.dependencyTargets.length; ++j) + object.dependencyTargets[j] = $root.google.cloud.dataform.v1alpha2.Target.toObject(message.dependencyTargets[j], options); + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + 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.selectQuery != null && message.hasOwnProperty("selectQuery")) + object.selectQuery = message.selectQuery; + if (message.parentAction != null && message.hasOwnProperty("parentAction")) + object.parentAction = $root.google.cloud.dataform.v1alpha2.Target.toObject(message.parentAction, options); + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) + object.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.toObject(message.relationDescriptor, options); + return object; + }; + + /** + * Converts this Assertion to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @instance + * @returns {Object.} JSON object + */ + Assertion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Assertion; + })(); + + CompilationResultAction.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @interface IDeclaration + * @property {google.cloud.dataform.v1alpha2.IRelationDescriptor|null} [relationDescriptor] Declaration relationDescriptor + */ + + /** + * Constructs a new Declaration. + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.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 relationDescriptor. + * @member {google.cloud.dataform.v1alpha2.IRelationDescriptor|null|undefined} relationDescriptor + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration + * @instance + */ + Declaration.prototype.relationDescriptor = null; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.IDeclaration=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.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.relationDescriptor != null && Object.hasOwnProperty.call(message, "relationDescriptor")) + $root.google.cloud.dataform.v1alpha2.RelationDescriptor.encode(message.relationDescriptor, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.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.cloud.dataform.v1alpha2.CompilationResultAction.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.decode(reader, reader.uint32()); + 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.cloud.dataform.v1alpha2.CompilationResultAction.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.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.cloud.dataform.v1alpha2.CompilationResultAction.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.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) { + var error = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.verify(message.relationDescriptor); + if (error) + return "relationDescriptor." + error; + } + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration(); + if (object.relationDescriptor != null) { + if (typeof object.relationDescriptor !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration.relationDescriptor: object expected"); + message.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.fromObject(object.relationDescriptor); + } + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration + * @static + * @param {google.cloud.dataform.v1alpha2.CompilationResultAction.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.relationDescriptor = null; + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) + object.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.toObject(message.relationDescriptor, options); + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Declaration; + })(); + + return CompilationResultAction; + })(); + + v1alpha2.QueryCompilationResultActionsRequest = (function() { + + /** + * Properties of a QueryCompilationResultActionsRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IQueryCompilationResultActionsRequest + * @property {string|null} [name] QueryCompilationResultActionsRequest name + * @property {number|null} [pageSize] QueryCompilationResultActionsRequest pageSize + * @property {string|null} [pageToken] QueryCompilationResultActionsRequest pageToken + * @property {string|null} [filter] QueryCompilationResultActionsRequest filter + */ + + /** + * Constructs a new QueryCompilationResultActionsRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a QueryCompilationResultActionsRequest. + * @implements IQueryCompilationResultActionsRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest=} [properties] Properties to set + */ + function QueryCompilationResultActionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryCompilationResultActionsRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + * @instance + */ + QueryCompilationResultActionsRequest.prototype.name = ""; + + /** + * QueryCompilationResultActionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + * @instance + */ + QueryCompilationResultActionsRequest.prototype.pageSize = 0; + + /** + * QueryCompilationResultActionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + * @instance + */ + QueryCompilationResultActionsRequest.prototype.pageToken = ""; + + /** + * QueryCompilationResultActionsRequest filter. + * @member {string} filter + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + * @instance + */ + QueryCompilationResultActionsRequest.prototype.filter = ""; + + /** + * Creates a new QueryCompilationResultActionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest} QueryCompilationResultActionsRequest instance + */ + QueryCompilationResultActionsRequest.create = function create(properties) { + return new QueryCompilationResultActionsRequest(properties); + }; + + /** + * Encodes the specified QueryCompilationResultActionsRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest} message QueryCompilationResultActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryCompilationResultActionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified QueryCompilationResultActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest} message QueryCompilationResultActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryCompilationResultActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryCompilationResultActionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest} QueryCompilationResultActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryCompilationResultActionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryCompilationResultActionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest} QueryCompilationResultActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryCompilationResultActionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryCompilationResultActionsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryCompilationResultActionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a QueryCompilationResultActionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest} QueryCompilationResultActionsRequest + */ + QueryCompilationResultActionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a QueryCompilationResultActionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest} message QueryCompilationResultActionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryCompilationResultActionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this QueryCompilationResultActionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryCompilationResultActionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryCompilationResultActionsRequest; + })(); + + v1alpha2.QueryCompilationResultActionsResponse = (function() { + + /** + * Properties of a QueryCompilationResultActionsResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IQueryCompilationResultActionsResponse + * @property {Array.|null} [compilationResultActions] QueryCompilationResultActionsResponse compilationResultActions + * @property {string|null} [nextPageToken] QueryCompilationResultActionsResponse nextPageToken + */ + + /** + * Constructs a new QueryCompilationResultActionsResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a QueryCompilationResultActionsResponse. + * @implements IQueryCompilationResultActionsResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsResponse=} [properties] Properties to set + */ + function QueryCompilationResultActionsResponse(properties) { + this.compilationResultActions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryCompilationResultActionsResponse compilationResultActions. + * @member {Array.} compilationResultActions + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse + * @instance + */ + QueryCompilationResultActionsResponse.prototype.compilationResultActions = $util.emptyArray; + + /** + * QueryCompilationResultActionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse + * @instance + */ + QueryCompilationResultActionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new QueryCompilationResultActionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse} QueryCompilationResultActionsResponse instance + */ + QueryCompilationResultActionsResponse.create = function create(properties) { + return new QueryCompilationResultActionsResponse(properties); + }; + + /** + * Encodes the specified QueryCompilationResultActionsResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsResponse} message QueryCompilationResultActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryCompilationResultActionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.compilationResultActions != null && message.compilationResultActions.length) + for (var i = 0; i < message.compilationResultActions.length; ++i) + $root.google.cloud.dataform.v1alpha2.CompilationResultAction.encode(message.compilationResultActions[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 QueryCompilationResultActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsResponse} message QueryCompilationResultActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryCompilationResultActionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryCompilationResultActionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse} QueryCompilationResultActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryCompilationResultActionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.compilationResultActions && message.compilationResultActions.length)) + message.compilationResultActions = []; + message.compilationResultActions.push($root.google.cloud.dataform.v1alpha2.CompilationResultAction.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryCompilationResultActionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse} QueryCompilationResultActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryCompilationResultActionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryCompilationResultActionsResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryCompilationResultActionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.compilationResultActions != null && message.hasOwnProperty("compilationResultActions")) { + if (!Array.isArray(message.compilationResultActions)) + return "compilationResultActions: array expected"; + for (var i = 0; i < message.compilationResultActions.length; ++i) { + var error = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.verify(message.compilationResultActions[i]); + if (error) + return "compilationResultActions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a QueryCompilationResultActionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse} QueryCompilationResultActionsResponse + */ + QueryCompilationResultActionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse(); + if (object.compilationResultActions) { + if (!Array.isArray(object.compilationResultActions)) + throw TypeError(".google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse.compilationResultActions: array expected"); + message.compilationResultActions = []; + for (var i = 0; i < object.compilationResultActions.length; ++i) { + if (typeof object.compilationResultActions[i] !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse.compilationResultActions: object expected"); + message.compilationResultActions[i] = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.fromObject(object.compilationResultActions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a QueryCompilationResultActionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse} message QueryCompilationResultActionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryCompilationResultActionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.compilationResultActions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.compilationResultActions && message.compilationResultActions.length) { + object.compilationResultActions = []; + for (var j = 0; j < message.compilationResultActions.length; ++j) + object.compilationResultActions[j] = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.toObject(message.compilationResultActions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this QueryCompilationResultActionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryCompilationResultActionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryCompilationResultActionsResponse; + })(); + + v1alpha2.WorkflowInvocation = (function() { + + /** + * Properties of a WorkflowInvocation. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IWorkflowInvocation + * @property {string|null} [name] WorkflowInvocation name + * @property {string|null} [compilationResult] WorkflowInvocation compilationResult + * @property {google.cloud.dataform.v1alpha2.WorkflowInvocation.IInvocationConfig|null} [invocationConfig] WorkflowInvocation invocationConfig + * @property {google.cloud.dataform.v1alpha2.WorkflowInvocation.State|null} [state] WorkflowInvocation state + * @property {google.type.IInterval|null} [invocationTiming] WorkflowInvocation invocationTiming + */ + + /** + * Constructs a new WorkflowInvocation. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a WorkflowInvocation. + * @implements IWorkflowInvocation + * @constructor + * @param {google.cloud.dataform.v1alpha2.IWorkflowInvocation=} [properties] Properties to set + */ + function WorkflowInvocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkflowInvocation name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @instance + */ + WorkflowInvocation.prototype.name = ""; + + /** + * WorkflowInvocation compilationResult. + * @member {string} compilationResult + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @instance + */ + WorkflowInvocation.prototype.compilationResult = ""; + + /** + * WorkflowInvocation invocationConfig. + * @member {google.cloud.dataform.v1alpha2.WorkflowInvocation.IInvocationConfig|null|undefined} invocationConfig + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @instance + */ + WorkflowInvocation.prototype.invocationConfig = null; + + /** + * WorkflowInvocation state. + * @member {google.cloud.dataform.v1alpha2.WorkflowInvocation.State} state + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @instance + */ + WorkflowInvocation.prototype.state = 0; + + /** + * WorkflowInvocation invocationTiming. + * @member {google.type.IInterval|null|undefined} invocationTiming + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @instance + */ + WorkflowInvocation.prototype.invocationTiming = null; + + /** + * Creates a new WorkflowInvocation instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @static + * @param {google.cloud.dataform.v1alpha2.IWorkflowInvocation=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocation} WorkflowInvocation instance + */ + WorkflowInvocation.create = function create(properties) { + return new WorkflowInvocation(properties); + }; + + /** + * Encodes the specified WorkflowInvocation message. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @static + * @param {google.cloud.dataform.v1alpha2.IWorkflowInvocation} message WorkflowInvocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkflowInvocation.encode = function encode(message, writer) { + 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.compilationResult != null && Object.hasOwnProperty.call(message, "compilationResult")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.compilationResult); + if (message.invocationConfig != null && Object.hasOwnProperty.call(message, "invocationConfig")) + $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig.encode(message.invocationConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.invocationTiming != null && Object.hasOwnProperty.call(message, "invocationTiming")) + $root.google.type.Interval.encode(message.invocationTiming, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WorkflowInvocation message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @static + * @param {google.cloud.dataform.v1alpha2.IWorkflowInvocation} message WorkflowInvocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkflowInvocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkflowInvocation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocation} WorkflowInvocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkflowInvocation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.WorkflowInvocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.compilationResult = reader.string(); + break; + case 3: + message.invocationConfig = $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig.decode(reader, reader.uint32()); + break; + case 4: + message.state = reader.int32(); + break; + case 5: + message.invocationTiming = $root.google.type.Interval.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkflowInvocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocation} WorkflowInvocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkflowInvocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkflowInvocation message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkflowInvocation.verify = function verify(message) { + if (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.compilationResult != null && message.hasOwnProperty("compilationResult")) + if (!$util.isString(message.compilationResult)) + return "compilationResult: string expected"; + if (message.invocationConfig != null && message.hasOwnProperty("invocationConfig")) { + var error = $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig.verify(message.invocationConfig); + if (error) + return "invocationConfig." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.invocationTiming != null && message.hasOwnProperty("invocationTiming")) { + var error = $root.google.type.Interval.verify(message.invocationTiming); + if (error) + return "invocationTiming." + error; + } + return null; + }; + + /** + * Creates a WorkflowInvocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocation} WorkflowInvocation + */ + WorkflowInvocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.WorkflowInvocation) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.WorkflowInvocation(); + if (object.name != null) + message.name = String(object.name); + if (object.compilationResult != null) + message.compilationResult = String(object.compilationResult); + if (object.invocationConfig != null) { + if (typeof object.invocationConfig !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.WorkflowInvocation.invocationConfig: object expected"); + message.invocationConfig = $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig.fromObject(object.invocationConfig); + } + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "RUNNING": + case 1: + message.state = 1; + break; + case "SUCCEEDED": + case 2: + message.state = 2; + break; + case "CANCELLED": + case 3: + message.state = 3; + break; + case "FAILED": + case 4: + message.state = 4; + break; + case "CANCELING": + case 5: + message.state = 5; + break; + } + if (object.invocationTiming != null) { + if (typeof object.invocationTiming !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.WorkflowInvocation.invocationTiming: object expected"); + message.invocationTiming = $root.google.type.Interval.fromObject(object.invocationTiming); + } + return message; + }; + + /** + * Creates a plain object from a WorkflowInvocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @static + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocation} message WorkflowInvocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkflowInvocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.compilationResult = ""; + object.invocationConfig = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.invocationTiming = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.compilationResult != null && message.hasOwnProperty("compilationResult")) + object.compilationResult = message.compilationResult; + if (message.invocationConfig != null && message.hasOwnProperty("invocationConfig")) + object.invocationConfig = $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig.toObject(message.invocationConfig, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.State[message.state] : message.state; + if (message.invocationTiming != null && message.hasOwnProperty("invocationTiming")) + object.invocationTiming = $root.google.type.Interval.toObject(message.invocationTiming, options); + return object; + }; + + /** + * Converts this WorkflowInvocation to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @instance + * @returns {Object.} JSON object + */ + WorkflowInvocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + WorkflowInvocation.InvocationConfig = (function() { + + /** + * Properties of an InvocationConfig. + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @interface IInvocationConfig + * @property {Array.|null} [includedTargets] InvocationConfig includedTargets + * @property {Array.|null} [includedTags] InvocationConfig includedTags + * @property {boolean|null} [transitiveDependenciesIncluded] InvocationConfig transitiveDependenciesIncluded + * @property {boolean|null} [transitiveDependentsIncluded] InvocationConfig transitiveDependentsIncluded + * @property {boolean|null} [fullyRefreshIncrementalTablesEnabled] InvocationConfig fullyRefreshIncrementalTablesEnabled + */ + + /** + * Constructs a new InvocationConfig. + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @classdesc Represents an InvocationConfig. + * @implements IInvocationConfig + * @constructor + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocation.IInvocationConfig=} [properties] Properties to set + */ + function InvocationConfig(properties) { + this.includedTargets = []; + this.includedTags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InvocationConfig includedTargets. + * @member {Array.} includedTargets + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @instance + */ + InvocationConfig.prototype.includedTargets = $util.emptyArray; + + /** + * InvocationConfig includedTags. + * @member {Array.} includedTags + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @instance + */ + InvocationConfig.prototype.includedTags = $util.emptyArray; + + /** + * InvocationConfig transitiveDependenciesIncluded. + * @member {boolean} transitiveDependenciesIncluded + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @instance + */ + InvocationConfig.prototype.transitiveDependenciesIncluded = false; + + /** + * InvocationConfig transitiveDependentsIncluded. + * @member {boolean} transitiveDependentsIncluded + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @instance + */ + InvocationConfig.prototype.transitiveDependentsIncluded = false; + + /** + * InvocationConfig fullyRefreshIncrementalTablesEnabled. + * @member {boolean} fullyRefreshIncrementalTablesEnabled + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @instance + */ + InvocationConfig.prototype.fullyRefreshIncrementalTablesEnabled = false; + + /** + * Creates a new InvocationConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @static + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocation.IInvocationConfig=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig} InvocationConfig instance + */ + InvocationConfig.create = function create(properties) { + return new InvocationConfig(properties); + }; + + /** + * Encodes the specified InvocationConfig message. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @static + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocation.IInvocationConfig} message InvocationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvocationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.includedTargets != null && message.includedTargets.length) + for (var i = 0; i < message.includedTargets.length; ++i) + $root.google.cloud.dataform.v1alpha2.Target.encode(message.includedTargets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.includedTags != null && message.includedTags.length) + for (var i = 0; i < message.includedTags.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.includedTags[i]); + if (message.transitiveDependenciesIncluded != null && Object.hasOwnProperty.call(message, "transitiveDependenciesIncluded")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.transitiveDependenciesIncluded); + if (message.transitiveDependentsIncluded != null && Object.hasOwnProperty.call(message, "transitiveDependentsIncluded")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.transitiveDependentsIncluded); + if (message.fullyRefreshIncrementalTablesEnabled != null && Object.hasOwnProperty.call(message, "fullyRefreshIncrementalTablesEnabled")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.fullyRefreshIncrementalTablesEnabled); + return writer; + }; + + /** + * Encodes the specified InvocationConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @static + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocation.IInvocationConfig} message InvocationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvocationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InvocationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig} InvocationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvocationConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.includedTargets && message.includedTargets.length)) + message.includedTargets = []; + message.includedTargets.push($root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.includedTags && message.includedTags.length)) + message.includedTags = []; + message.includedTags.push(reader.string()); + break; + case 3: + message.transitiveDependenciesIncluded = reader.bool(); + break; + case 4: + message.transitiveDependentsIncluded = reader.bool(); + break; + case 5: + message.fullyRefreshIncrementalTablesEnabled = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InvocationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig} InvocationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvocationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InvocationConfig message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InvocationConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.includedTargets != null && message.hasOwnProperty("includedTargets")) { + if (!Array.isArray(message.includedTargets)) + return "includedTargets: array expected"; + for (var i = 0; i < message.includedTargets.length; ++i) { + var error = $root.google.cloud.dataform.v1alpha2.Target.verify(message.includedTargets[i]); + if (error) + return "includedTargets." + error; + } + } + if (message.includedTags != null && message.hasOwnProperty("includedTags")) { + if (!Array.isArray(message.includedTags)) + return "includedTags: array expected"; + for (var i = 0; i < message.includedTags.length; ++i) + if (!$util.isString(message.includedTags[i])) + return "includedTags: string[] expected"; + } + if (message.transitiveDependenciesIncluded != null && message.hasOwnProperty("transitiveDependenciesIncluded")) + if (typeof message.transitiveDependenciesIncluded !== "boolean") + return "transitiveDependenciesIncluded: boolean expected"; + if (message.transitiveDependentsIncluded != null && message.hasOwnProperty("transitiveDependentsIncluded")) + if (typeof message.transitiveDependentsIncluded !== "boolean") + return "transitiveDependentsIncluded: boolean expected"; + if (message.fullyRefreshIncrementalTablesEnabled != null && message.hasOwnProperty("fullyRefreshIncrementalTablesEnabled")) + if (typeof message.fullyRefreshIncrementalTablesEnabled !== "boolean") + return "fullyRefreshIncrementalTablesEnabled: boolean expected"; + return null; + }; + + /** + * Creates an InvocationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig} InvocationConfig + */ + InvocationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig(); + if (object.includedTargets) { + if (!Array.isArray(object.includedTargets)) + throw TypeError(".google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig.includedTargets: array expected"); + message.includedTargets = []; + for (var i = 0; i < object.includedTargets.length; ++i) { + if (typeof object.includedTargets[i] !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig.includedTargets: object expected"); + message.includedTargets[i] = $root.google.cloud.dataform.v1alpha2.Target.fromObject(object.includedTargets[i]); + } + } + if (object.includedTags) { + if (!Array.isArray(object.includedTags)) + throw TypeError(".google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig.includedTags: array expected"); + message.includedTags = []; + for (var i = 0; i < object.includedTags.length; ++i) + message.includedTags[i] = String(object.includedTags[i]); + } + if (object.transitiveDependenciesIncluded != null) + message.transitiveDependenciesIncluded = Boolean(object.transitiveDependenciesIncluded); + if (object.transitiveDependentsIncluded != null) + message.transitiveDependentsIncluded = Boolean(object.transitiveDependentsIncluded); + if (object.fullyRefreshIncrementalTablesEnabled != null) + message.fullyRefreshIncrementalTablesEnabled = Boolean(object.fullyRefreshIncrementalTablesEnabled); + return message; + }; + + /** + * Creates a plain object from an InvocationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @static + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig} message InvocationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InvocationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.includedTargets = []; + object.includedTags = []; + } + if (options.defaults) { + object.transitiveDependenciesIncluded = false; + object.transitiveDependentsIncluded = false; + object.fullyRefreshIncrementalTablesEnabled = false; + } + if (message.includedTargets && message.includedTargets.length) { + object.includedTargets = []; + for (var j = 0; j < message.includedTargets.length; ++j) + object.includedTargets[j] = $root.google.cloud.dataform.v1alpha2.Target.toObject(message.includedTargets[j], options); + } + if (message.includedTags && message.includedTags.length) { + object.includedTags = []; + for (var j = 0; j < message.includedTags.length; ++j) + object.includedTags[j] = message.includedTags[j]; + } + if (message.transitiveDependenciesIncluded != null && message.hasOwnProperty("transitiveDependenciesIncluded")) + object.transitiveDependenciesIncluded = message.transitiveDependenciesIncluded; + if (message.transitiveDependentsIncluded != null && message.hasOwnProperty("transitiveDependentsIncluded")) + object.transitiveDependentsIncluded = message.transitiveDependentsIncluded; + if (message.fullyRefreshIncrementalTablesEnabled != null && message.hasOwnProperty("fullyRefreshIncrementalTablesEnabled")) + object.fullyRefreshIncrementalTablesEnabled = message.fullyRefreshIncrementalTablesEnabled; + return object; + }; + + /** + * Converts this InvocationConfig to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @instance + * @returns {Object.} JSON object + */ + InvocationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return InvocationConfig; + })(); + + /** + * State enum. + * @name google.cloud.dataform.v1alpha2.WorkflowInvocation.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} CANCELLED=3 CANCELLED value + * @property {number} FAILED=4 FAILED value + * @property {number} CANCELING=5 CANCELING value + */ + WorkflowInvocation.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "CANCELLED"] = 3; + values[valuesById[4] = "FAILED"] = 4; + values[valuesById[5] = "CANCELING"] = 5; + return values; + })(); + + return WorkflowInvocation; + })(); + + v1alpha2.ListWorkflowInvocationsRequest = (function() { + + /** + * Properties of a ListWorkflowInvocationsRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IListWorkflowInvocationsRequest + * @property {string|null} [parent] ListWorkflowInvocationsRequest parent + * @property {number|null} [pageSize] ListWorkflowInvocationsRequest pageSize + * @property {string|null} [pageToken] ListWorkflowInvocationsRequest pageToken + */ + + /** + * Constructs a new ListWorkflowInvocationsRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a ListWorkflowInvocationsRequest. + * @implements IListWorkflowInvocationsRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest=} [properties] Properties to set + */ + function ListWorkflowInvocationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListWorkflowInvocationsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest + * @instance + */ + ListWorkflowInvocationsRequest.prototype.parent = ""; + + /** + * ListWorkflowInvocationsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest + * @instance + */ + ListWorkflowInvocationsRequest.prototype.pageSize = 0; + + /** + * ListWorkflowInvocationsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest + * @instance + */ + ListWorkflowInvocationsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListWorkflowInvocationsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest} ListWorkflowInvocationsRequest instance + */ + ListWorkflowInvocationsRequest.create = function create(properties) { + return new ListWorkflowInvocationsRequest(properties); + }; + + /** + * Encodes the specified ListWorkflowInvocationsRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest} message ListWorkflowInvocationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkflowInvocationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListWorkflowInvocationsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest} message ListWorkflowInvocationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkflowInvocationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWorkflowInvocationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest} ListWorkflowInvocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkflowInvocationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListWorkflowInvocationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest} ListWorkflowInvocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkflowInvocationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWorkflowInvocationsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWorkflowInvocationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListWorkflowInvocationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest} ListWorkflowInvocationsRequest + */ + ListWorkflowInvocationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListWorkflowInvocationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest} message ListWorkflowInvocationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWorkflowInvocationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListWorkflowInvocationsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListWorkflowInvocationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListWorkflowInvocationsRequest; + })(); + + v1alpha2.ListWorkflowInvocationsResponse = (function() { + + /** + * Properties of a ListWorkflowInvocationsResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IListWorkflowInvocationsResponse + * @property {Array.|null} [workflowInvocations] ListWorkflowInvocationsResponse workflowInvocations + * @property {string|null} [nextPageToken] ListWorkflowInvocationsResponse nextPageToken + */ + + /** + * Constructs a new ListWorkflowInvocationsResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a ListWorkflowInvocationsResponse. + * @implements IListWorkflowInvocationsResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IListWorkflowInvocationsResponse=} [properties] Properties to set + */ + function ListWorkflowInvocationsResponse(properties) { + this.workflowInvocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListWorkflowInvocationsResponse workflowInvocations. + * @member {Array.} workflowInvocations + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse + * @instance + */ + ListWorkflowInvocationsResponse.prototype.workflowInvocations = $util.emptyArray; + + /** + * ListWorkflowInvocationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse + * @instance + */ + ListWorkflowInvocationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListWorkflowInvocationsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IListWorkflowInvocationsResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse} ListWorkflowInvocationsResponse instance + */ + ListWorkflowInvocationsResponse.create = function create(properties) { + return new ListWorkflowInvocationsResponse(properties); + }; + + /** + * Encodes the specified ListWorkflowInvocationsResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IListWorkflowInvocationsResponse} message ListWorkflowInvocationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkflowInvocationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workflowInvocations != null && message.workflowInvocations.length) + for (var i = 0; i < message.workflowInvocations.length; ++i) + $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.encode(message.workflowInvocations[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 ListWorkflowInvocationsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IListWorkflowInvocationsResponse} message ListWorkflowInvocationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkflowInvocationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWorkflowInvocationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse} ListWorkflowInvocationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkflowInvocationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.workflowInvocations && message.workflowInvocations.length)) + message.workflowInvocations = []; + message.workflowInvocations.push($root.google.cloud.dataform.v1alpha2.WorkflowInvocation.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListWorkflowInvocationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse} ListWorkflowInvocationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkflowInvocationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWorkflowInvocationsResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWorkflowInvocationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workflowInvocations != null && message.hasOwnProperty("workflowInvocations")) { + if (!Array.isArray(message.workflowInvocations)) + return "workflowInvocations: array expected"; + for (var i = 0; i < message.workflowInvocations.length; ++i) { + var error = $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.verify(message.workflowInvocations[i]); + if (error) + return "workflowInvocations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListWorkflowInvocationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse} ListWorkflowInvocationsResponse + */ + ListWorkflowInvocationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse(); + if (object.workflowInvocations) { + if (!Array.isArray(object.workflowInvocations)) + throw TypeError(".google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse.workflowInvocations: array expected"); + message.workflowInvocations = []; + for (var i = 0; i < object.workflowInvocations.length; ++i) { + if (typeof object.workflowInvocations[i] !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse.workflowInvocations: object expected"); + message.workflowInvocations[i] = $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.fromObject(object.workflowInvocations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListWorkflowInvocationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse} message ListWorkflowInvocationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWorkflowInvocationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.workflowInvocations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.workflowInvocations && message.workflowInvocations.length) { + object.workflowInvocations = []; + for (var j = 0; j < message.workflowInvocations.length; ++j) + object.workflowInvocations[j] = $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.toObject(message.workflowInvocations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListWorkflowInvocationsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListWorkflowInvocationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListWorkflowInvocationsResponse; + })(); + + v1alpha2.GetWorkflowInvocationRequest = (function() { + + /** + * Properties of a GetWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IGetWorkflowInvocationRequest + * @property {string|null} [name] GetWorkflowInvocationRequest name + */ + + /** + * Constructs a new GetWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a GetWorkflowInvocationRequest. + * @implements IGetWorkflowInvocationRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest=} [properties] Properties to set + */ + function GetWorkflowInvocationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetWorkflowInvocationRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest + * @instance + */ + GetWorkflowInvocationRequest.prototype.name = ""; + + /** + * Creates a new GetWorkflowInvocationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest} GetWorkflowInvocationRequest instance + */ + GetWorkflowInvocationRequest.create = function create(properties) { + return new GetWorkflowInvocationRequest(properties); + }; + + /** + * Encodes the specified GetWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest} message GetWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWorkflowInvocationRequest.encode = function encode(message, writer) { + 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 GetWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest} message GetWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWorkflowInvocationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetWorkflowInvocationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest} GetWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWorkflowInvocationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest} GetWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWorkflowInvocationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetWorkflowInvocationRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetWorkflowInvocationRequest.verify = function verify(message) { + if (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 GetWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest} GetWorkflowInvocationRequest + */ + GetWorkflowInvocationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetWorkflowInvocationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest} message GetWorkflowInvocationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetWorkflowInvocationRequest.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 GetWorkflowInvocationRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest + * @instance + * @returns {Object.} JSON object + */ + GetWorkflowInvocationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetWorkflowInvocationRequest; + })(); + + v1alpha2.CreateWorkflowInvocationRequest = (function() { + + /** + * Properties of a CreateWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface ICreateWorkflowInvocationRequest + * @property {string|null} [parent] CreateWorkflowInvocationRequest parent + * @property {google.cloud.dataform.v1alpha2.IWorkflowInvocation|null} [workflowInvocation] CreateWorkflowInvocationRequest workflowInvocation + */ + + /** + * Constructs a new CreateWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a CreateWorkflowInvocationRequest. + * @implements ICreateWorkflowInvocationRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest=} [properties] Properties to set + */ + function CreateWorkflowInvocationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateWorkflowInvocationRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest + * @instance + */ + CreateWorkflowInvocationRequest.prototype.parent = ""; + + /** + * CreateWorkflowInvocationRequest workflowInvocation. + * @member {google.cloud.dataform.v1alpha2.IWorkflowInvocation|null|undefined} workflowInvocation + * @memberof google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest + * @instance + */ + CreateWorkflowInvocationRequest.prototype.workflowInvocation = null; + + /** + * Creates a new CreateWorkflowInvocationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest} CreateWorkflowInvocationRequest instance + */ + CreateWorkflowInvocationRequest.create = function create(properties) { + return new CreateWorkflowInvocationRequest(properties); + }; + + /** + * Encodes the specified CreateWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest} message CreateWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateWorkflowInvocationRequest.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.workflowInvocation != null && Object.hasOwnProperty.call(message, "workflowInvocation")) + $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.encode(message.workflowInvocation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest} message CreateWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateWorkflowInvocationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateWorkflowInvocationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest} CreateWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateWorkflowInvocationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.workflowInvocation = $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest} CreateWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateWorkflowInvocationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateWorkflowInvocationRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateWorkflowInvocationRequest.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.workflowInvocation != null && message.hasOwnProperty("workflowInvocation")) { + var error = $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.verify(message.workflowInvocation); + if (error) + return "workflowInvocation." + error; + } + return null; + }; + + /** + * Creates a CreateWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest} CreateWorkflowInvocationRequest + */ + CreateWorkflowInvocationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.workflowInvocation != null) { + if (typeof object.workflowInvocation !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest.workflowInvocation: object expected"); + message.workflowInvocation = $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.fromObject(object.workflowInvocation); + } + return message; + }; + + /** + * Creates a plain object from a CreateWorkflowInvocationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest} message CreateWorkflowInvocationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateWorkflowInvocationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.workflowInvocation = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.workflowInvocation != null && message.hasOwnProperty("workflowInvocation")) + object.workflowInvocation = $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.toObject(message.workflowInvocation, options); + return object; + }; + + /** + * Converts this CreateWorkflowInvocationRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest + * @instance + * @returns {Object.} JSON object + */ + CreateWorkflowInvocationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateWorkflowInvocationRequest; + })(); + + v1alpha2.DeleteWorkflowInvocationRequest = (function() { + + /** + * Properties of a DeleteWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IDeleteWorkflowInvocationRequest + * @property {string|null} [name] DeleteWorkflowInvocationRequest name + */ + + /** + * Constructs a new DeleteWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a DeleteWorkflowInvocationRequest. + * @implements IDeleteWorkflowInvocationRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest=} [properties] Properties to set + */ + function DeleteWorkflowInvocationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteWorkflowInvocationRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest + * @instance + */ + DeleteWorkflowInvocationRequest.prototype.name = ""; + + /** + * Creates a new DeleteWorkflowInvocationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest} DeleteWorkflowInvocationRequest instance + */ + DeleteWorkflowInvocationRequest.create = function create(properties) { + return new DeleteWorkflowInvocationRequest(properties); + }; + + /** + * Encodes the specified DeleteWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest} message DeleteWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteWorkflowInvocationRequest.encode = function encode(message, writer) { + 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 DeleteWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest} message DeleteWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteWorkflowInvocationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteWorkflowInvocationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest} DeleteWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteWorkflowInvocationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest} DeleteWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteWorkflowInvocationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteWorkflowInvocationRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteWorkflowInvocationRequest.verify = function verify(message) { + if (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 DeleteWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest} DeleteWorkflowInvocationRequest + */ + DeleteWorkflowInvocationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteWorkflowInvocationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest} message DeleteWorkflowInvocationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteWorkflowInvocationRequest.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 DeleteWorkflowInvocationRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteWorkflowInvocationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteWorkflowInvocationRequest; + })(); + + v1alpha2.CancelWorkflowInvocationRequest = (function() { + + /** + * Properties of a CancelWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface ICancelWorkflowInvocationRequest + * @property {string|null} [name] CancelWorkflowInvocationRequest name + */ + + /** + * Constructs a new CancelWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a CancelWorkflowInvocationRequest. + * @implements ICancelWorkflowInvocationRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest=} [properties] Properties to set + */ + function CancelWorkflowInvocationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelWorkflowInvocationRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest + * @instance + */ + CancelWorkflowInvocationRequest.prototype.name = ""; + + /** + * Creates a new CancelWorkflowInvocationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest} CancelWorkflowInvocationRequest instance + */ + CancelWorkflowInvocationRequest.create = function create(properties) { + return new CancelWorkflowInvocationRequest(properties); + }; + + /** + * Encodes the specified CancelWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest} message CancelWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelWorkflowInvocationRequest.encode = function encode(message, writer) { + 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 CancelWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest} message CancelWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelWorkflowInvocationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelWorkflowInvocationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest} CancelWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelWorkflowInvocationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest} CancelWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelWorkflowInvocationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelWorkflowInvocationRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelWorkflowInvocationRequest.verify = function verify(message) { + if (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 CancelWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest} CancelWorkflowInvocationRequest + */ + CancelWorkflowInvocationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelWorkflowInvocationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest} message CancelWorkflowInvocationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelWorkflowInvocationRequest.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 CancelWorkflowInvocationRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelWorkflowInvocationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CancelWorkflowInvocationRequest; + })(); + + v1alpha2.WorkflowInvocationAction = (function() { + + /** + * Properties of a WorkflowInvocationAction. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IWorkflowInvocationAction + * @property {google.cloud.dataform.v1alpha2.ITarget|null} [target] WorkflowInvocationAction target + * @property {google.cloud.dataform.v1alpha2.ITarget|null} [canonicalTarget] WorkflowInvocationAction canonicalTarget + * @property {google.cloud.dataform.v1alpha2.WorkflowInvocationAction.State|null} [state] WorkflowInvocationAction state + * @property {google.type.IInterval|null} [invocationTiming] WorkflowInvocationAction invocationTiming + * @property {google.cloud.dataform.v1alpha2.WorkflowInvocationAction.IBigQueryAction|null} [bigqueryAction] WorkflowInvocationAction bigqueryAction + */ + + /** + * Constructs a new WorkflowInvocationAction. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a WorkflowInvocationAction. + * @implements IWorkflowInvocationAction + * @constructor + * @param {google.cloud.dataform.v1alpha2.IWorkflowInvocationAction=} [properties] Properties to set + */ + function WorkflowInvocationAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkflowInvocationAction target. + * @member {google.cloud.dataform.v1alpha2.ITarget|null|undefined} target + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.target = null; + + /** + * WorkflowInvocationAction canonicalTarget. + * @member {google.cloud.dataform.v1alpha2.ITarget|null|undefined} canonicalTarget + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.canonicalTarget = null; + + /** + * WorkflowInvocationAction state. + * @member {google.cloud.dataform.v1alpha2.WorkflowInvocationAction.State} state + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.state = 0; + + /** + * WorkflowInvocationAction invocationTiming. + * @member {google.type.IInterval|null|undefined} invocationTiming + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.invocationTiming = null; + + /** + * WorkflowInvocationAction bigqueryAction. + * @member {google.cloud.dataform.v1alpha2.WorkflowInvocationAction.IBigQueryAction|null|undefined} bigqueryAction + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.bigqueryAction = null; + + /** + * Creates a new WorkflowInvocationAction instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @static + * @param {google.cloud.dataform.v1alpha2.IWorkflowInvocationAction=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocationAction} WorkflowInvocationAction instance + */ + WorkflowInvocationAction.create = function create(properties) { + return new WorkflowInvocationAction(properties); + }; + + /** + * Encodes the specified WorkflowInvocationAction message. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocationAction.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @static + * @param {google.cloud.dataform.v1alpha2.IWorkflowInvocationAction} message WorkflowInvocationAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkflowInvocationAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.google.cloud.dataform.v1alpha2.Target.encode(message.target, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.canonicalTarget != null && Object.hasOwnProperty.call(message, "canonicalTarget")) + $root.google.cloud.dataform.v1alpha2.Target.encode(message.canonicalTarget, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.invocationTiming != null && Object.hasOwnProperty.call(message, "invocationTiming")) + $root.google.type.Interval.encode(message.invocationTiming, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.bigqueryAction != null && Object.hasOwnProperty.call(message, "bigqueryAction")) + $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction.encode(message.bigqueryAction, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WorkflowInvocationAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocationAction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @static + * @param {google.cloud.dataform.v1alpha2.IWorkflowInvocationAction} message WorkflowInvocationAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkflowInvocationAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkflowInvocationAction message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocationAction} WorkflowInvocationAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkflowInvocationAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.target = $root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32()); + break; + case 2: + message.canonicalTarget = $root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32()); + break; + case 4: + message.state = reader.int32(); + break; + case 5: + message.invocationTiming = $root.google.type.Interval.decode(reader, reader.uint32()); + break; + case 6: + message.bigqueryAction = $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkflowInvocationAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocationAction} WorkflowInvocationAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkflowInvocationAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkflowInvocationAction message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkflowInvocationAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.google.cloud.dataform.v1alpha2.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.canonicalTarget != null && message.hasOwnProperty("canonicalTarget")) { + var error = $root.google.cloud.dataform.v1alpha2.Target.verify(message.canonicalTarget); + if (error) + return "canonicalTarget." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.invocationTiming != null && message.hasOwnProperty("invocationTiming")) { + var error = $root.google.type.Interval.verify(message.invocationTiming); + if (error) + return "invocationTiming." + error; + } + if (message.bigqueryAction != null && message.hasOwnProperty("bigqueryAction")) { + var error = $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction.verify(message.bigqueryAction); + if (error) + return "bigqueryAction." + error; + } + return null; + }; + + /** + * Creates a WorkflowInvocationAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocationAction} WorkflowInvocationAction + */ + WorkflowInvocationAction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction(); + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.WorkflowInvocationAction.target: object expected"); + message.target = $root.google.cloud.dataform.v1alpha2.Target.fromObject(object.target); + } + if (object.canonicalTarget != null) { + if (typeof object.canonicalTarget !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.WorkflowInvocationAction.canonicalTarget: object expected"); + message.canonicalTarget = $root.google.cloud.dataform.v1alpha2.Target.fromObject(object.canonicalTarget); + } + switch (object.state) { + case "PENDING": + case 0: + message.state = 0; + break; + case "RUNNING": + case 1: + message.state = 1; + break; + case "SKIPPED": + case 2: + message.state = 2; + break; + case "DISABLED": + case 3: + message.state = 3; + break; + case "SUCCEEDED": + case 4: + message.state = 4; + break; + case "CANCELLED": + case 5: + message.state = 5; + break; + case "FAILED": + case 6: + message.state = 6; + break; + } + if (object.invocationTiming != null) { + if (typeof object.invocationTiming !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.WorkflowInvocationAction.invocationTiming: object expected"); + message.invocationTiming = $root.google.type.Interval.fromObject(object.invocationTiming); + } + if (object.bigqueryAction != null) { + if (typeof object.bigqueryAction !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.WorkflowInvocationAction.bigqueryAction: object expected"); + message.bigqueryAction = $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction.fromObject(object.bigqueryAction); + } + return message; + }; + + /** + * Creates a plain object from a WorkflowInvocationAction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @static + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocationAction} message WorkflowInvocationAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkflowInvocationAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.target = null; + object.canonicalTarget = null; + object.state = options.enums === String ? "PENDING" : 0; + object.invocationTiming = null; + object.bigqueryAction = null; + } + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.google.cloud.dataform.v1alpha2.Target.toObject(message.target, options); + if (message.canonicalTarget != null && message.hasOwnProperty("canonicalTarget")) + object.canonicalTarget = $root.google.cloud.dataform.v1alpha2.Target.toObject(message.canonicalTarget, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.State[message.state] : message.state; + if (message.invocationTiming != null && message.hasOwnProperty("invocationTiming")) + object.invocationTiming = $root.google.type.Interval.toObject(message.invocationTiming, options); + if (message.bigqueryAction != null && message.hasOwnProperty("bigqueryAction")) + object.bigqueryAction = $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction.toObject(message.bigqueryAction, options); + return object; + }; + + /** + * Converts this WorkflowInvocationAction to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @instance + * @returns {Object.} JSON object + */ + WorkflowInvocationAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * State enum. + * @name google.cloud.dataform.v1alpha2.WorkflowInvocationAction.State + * @enum {number} + * @property {number} PENDING=0 PENDING value + * @property {number} RUNNING=1 RUNNING value + * @property {number} SKIPPED=2 SKIPPED value + * @property {number} DISABLED=3 DISABLED value + * @property {number} SUCCEEDED=4 SUCCEEDED value + * @property {number} CANCELLED=5 CANCELLED value + * @property {number} FAILED=6 FAILED value + */ + WorkflowInvocationAction.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PENDING"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "SKIPPED"] = 2; + values[valuesById[3] = "DISABLED"] = 3; + values[valuesById[4] = "SUCCEEDED"] = 4; + values[valuesById[5] = "CANCELLED"] = 5; + values[valuesById[6] = "FAILED"] = 6; + return values; + })(); + + WorkflowInvocationAction.BigQueryAction = (function() { + + /** + * Properties of a BigQueryAction. + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @interface IBigQueryAction + * @property {string|null} [sqlScript] BigQueryAction sqlScript + */ + + /** + * Constructs a new BigQueryAction. + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @classdesc Represents a BigQueryAction. + * @implements IBigQueryAction + * @constructor + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocationAction.IBigQueryAction=} [properties] Properties to set + */ + function BigQueryAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryAction sqlScript. + * @member {string} sqlScript + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction + * @instance + */ + BigQueryAction.prototype.sqlScript = ""; + + /** + * Creates a new BigQueryAction instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction + * @static + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocationAction.IBigQueryAction=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction} BigQueryAction instance + */ + BigQueryAction.create = function create(properties) { + return new BigQueryAction(properties); + }; + + /** + * Encodes the specified BigQueryAction message. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction + * @static + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocationAction.IBigQueryAction} message BigQueryAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sqlScript != null && Object.hasOwnProperty.call(message, "sqlScript")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sqlScript); + return writer; + }; + + /** + * Encodes the specified BigQueryAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction + * @static + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocationAction.IBigQueryAction} message BigQueryAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryAction message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction} BigQueryAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sqlScript = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction} BigQueryAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryAction message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) + if (!$util.isString(message.sqlScript)) + return "sqlScript: string expected"; + return null; + }; + + /** + * Creates a BigQueryAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction} BigQueryAction + */ + BigQueryAction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction(); + if (object.sqlScript != null) + message.sqlScript = String(object.sqlScript); + return message; + }; + + /** + * Creates a plain object from a BigQueryAction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction + * @static + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction} message BigQueryAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.sqlScript = ""; + if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) + object.sqlScript = message.sqlScript; + return object; + }; + + /** + * Converts this BigQueryAction to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction + * @instance + * @returns {Object.} JSON object + */ + BigQueryAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BigQueryAction; + })(); + + return WorkflowInvocationAction; + })(); + + v1alpha2.QueryWorkflowInvocationActionsRequest = (function() { + + /** + * Properties of a QueryWorkflowInvocationActionsRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IQueryWorkflowInvocationActionsRequest + * @property {string|null} [name] QueryWorkflowInvocationActionsRequest name + * @property {number|null} [pageSize] QueryWorkflowInvocationActionsRequest pageSize + * @property {string|null} [pageToken] QueryWorkflowInvocationActionsRequest pageToken + */ + + /** + * Constructs a new QueryWorkflowInvocationActionsRequest. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a QueryWorkflowInvocationActionsRequest. + * @implements IQueryWorkflowInvocationActionsRequest + * @constructor + * @param {google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest=} [properties] Properties to set + */ + function QueryWorkflowInvocationActionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryWorkflowInvocationActionsRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest + * @instance + */ + QueryWorkflowInvocationActionsRequest.prototype.name = ""; + + /** + * QueryWorkflowInvocationActionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest + * @instance + */ + QueryWorkflowInvocationActionsRequest.prototype.pageSize = 0; + + /** + * QueryWorkflowInvocationActionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest + * @instance + */ + QueryWorkflowInvocationActionsRequest.prototype.pageToken = ""; + + /** + * Creates a new QueryWorkflowInvocationActionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest} QueryWorkflowInvocationActionsRequest instance + */ + QueryWorkflowInvocationActionsRequest.create = function create(properties) { + return new QueryWorkflowInvocationActionsRequest(properties); + }; + + /** + * Encodes the specified QueryWorkflowInvocationActionsRequest message. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest} message QueryWorkflowInvocationActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryWorkflowInvocationActionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified QueryWorkflowInvocationActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest} message QueryWorkflowInvocationActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryWorkflowInvocationActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryWorkflowInvocationActionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest} QueryWorkflowInvocationActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryWorkflowInvocationActionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryWorkflowInvocationActionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest} QueryWorkflowInvocationActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryWorkflowInvocationActionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryWorkflowInvocationActionsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryWorkflowInvocationActionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a QueryWorkflowInvocationActionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest} QueryWorkflowInvocationActionsRequest + */ + QueryWorkflowInvocationActionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a QueryWorkflowInvocationActionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest + * @static + * @param {google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest} message QueryWorkflowInvocationActionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryWorkflowInvocationActionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this QueryWorkflowInvocationActionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryWorkflowInvocationActionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryWorkflowInvocationActionsRequest; + })(); + + v1alpha2.QueryWorkflowInvocationActionsResponse = (function() { + + /** + * Properties of a QueryWorkflowInvocationActionsResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @interface IQueryWorkflowInvocationActionsResponse + * @property {Array.|null} [workflowInvocationActions] QueryWorkflowInvocationActionsResponse workflowInvocationActions + * @property {string|null} [nextPageToken] QueryWorkflowInvocationActionsResponse nextPageToken + */ + + /** + * Constructs a new QueryWorkflowInvocationActionsResponse. + * @memberof google.cloud.dataform.v1alpha2 + * @classdesc Represents a QueryWorkflowInvocationActionsResponse. + * @implements IQueryWorkflowInvocationActionsResponse + * @constructor + * @param {google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsResponse=} [properties] Properties to set + */ + function QueryWorkflowInvocationActionsResponse(properties) { + this.workflowInvocationActions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryWorkflowInvocationActionsResponse workflowInvocationActions. + * @member {Array.} workflowInvocationActions + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse + * @instance + */ + QueryWorkflowInvocationActionsResponse.prototype.workflowInvocationActions = $util.emptyArray; + + /** + * QueryWorkflowInvocationActionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse + * @instance + */ + QueryWorkflowInvocationActionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new QueryWorkflowInvocationActionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse} QueryWorkflowInvocationActionsResponse instance + */ + QueryWorkflowInvocationActionsResponse.create = function create(properties) { + return new QueryWorkflowInvocationActionsResponse(properties); + }; + + /** + * Encodes the specified QueryWorkflowInvocationActionsResponse message. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsResponse} message QueryWorkflowInvocationActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryWorkflowInvocationActionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workflowInvocationActions != null && message.workflowInvocationActions.length) + for (var i = 0; i < message.workflowInvocationActions.length; ++i) + $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.encode(message.workflowInvocationActions[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 QueryWorkflowInvocationActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsResponse} message QueryWorkflowInvocationActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryWorkflowInvocationActionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryWorkflowInvocationActionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse} QueryWorkflowInvocationActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryWorkflowInvocationActionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.workflowInvocationActions && message.workflowInvocationActions.length)) + message.workflowInvocationActions = []; + message.workflowInvocationActions.push($root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryWorkflowInvocationActionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse} QueryWorkflowInvocationActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryWorkflowInvocationActionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryWorkflowInvocationActionsResponse message. + * @function verify + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryWorkflowInvocationActionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workflowInvocationActions != null && message.hasOwnProperty("workflowInvocationActions")) { + if (!Array.isArray(message.workflowInvocationActions)) + return "workflowInvocationActions: array expected"; + for (var i = 0; i < message.workflowInvocationActions.length; ++i) { + var error = $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.verify(message.workflowInvocationActions[i]); + if (error) + return "workflowInvocationActions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a QueryWorkflowInvocationActionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse} QueryWorkflowInvocationActionsResponse + */ + QueryWorkflowInvocationActionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse) + return object; + var message = new $root.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse(); + if (object.workflowInvocationActions) { + if (!Array.isArray(object.workflowInvocationActions)) + throw TypeError(".google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse.workflowInvocationActions: array expected"); + message.workflowInvocationActions = []; + for (var i = 0; i < object.workflowInvocationActions.length; ++i) { + if (typeof object.workflowInvocationActions[i] !== "object") + throw TypeError(".google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse.workflowInvocationActions: object expected"); + message.workflowInvocationActions[i] = $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.fromObject(object.workflowInvocationActions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a QueryWorkflowInvocationActionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse + * @static + * @param {google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse} message QueryWorkflowInvocationActionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryWorkflowInvocationActionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.workflowInvocationActions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.workflowInvocationActions && message.workflowInvocationActions.length) { + object.workflowInvocationActions = []; + for (var j = 0; j < message.workflowInvocationActions.length; ++j) + object.workflowInvocationActions[j] = $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.toObject(message.workflowInvocationActions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this QueryWorkflowInvocationActionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryWorkflowInvocationActionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryWorkflowInvocationActionsResponse; + })(); + + return v1alpha2; + })(); + + return dataform; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + case 2: + message.fullyDecodeReservedExpansion = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.selector = reader.string(); + break; + case 2: + message.get = reader.string(); + break; + case 3: + message.put = reader.string(); + break; + case 4: + message.post = reader.string(); + break; + case 5: + message["delete"] = reader.string(); + break; + case 6: + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kind = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CustomHttpPattern; + })(); + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + case 3: + message.nameField = reader.string(); + break; + case 4: + message.history = reader.int32(); + break; + case 5: + message.plural = reader.string(); + break; + case 6: + message.singular = reader.string(); + break; + case 10: + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + message.childType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResourceReference; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorSet; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message["package"] = reader.string(); + break; + case 3: + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + case 10: + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + case 11: + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + case 4: + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 8: + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + case 9: + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + case 12: + message.syntax = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + case 8: + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + case 9: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + case 10: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.number = reader.int32(); + break; + case 4: + message.label = reader.int32(); + break; + case 5: + message.type = reader.int32(); + break; + case 6: + message.typeName = reader.string(); + break; + case 2: + message.extendee = reader.string(); + break; + case 7: + message.defaultValue = reader.string(); + break; + case 9: + message.oneofIndex = reader.int32(); + break; + case 10: + message.jsonName = reader.string(); + break; + case 8: + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + case 17: + message.proto3Optional = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.number = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.inputType = reader.string(); + break; + case 3: + message.outputType = reader.string(); + break; + case 4: + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + case 5: + message.clientStreaming = reader.bool(); + break; + case 6: + message.serverStreaming = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.javaPackage = reader.string(); + break; + case 8: + message.javaOuterClassname = reader.string(); + break; + case 10: + message.javaMultipleFiles = reader.bool(); + break; + case 20: + message.javaGenerateEqualsAndHash = reader.bool(); + break; + case 27: + message.javaStringCheckUtf8 = reader.bool(); + break; + case 9: + message.optimizeFor = reader.int32(); + break; + case 11: + message.goPackage = reader.string(); + break; + case 16: + message.ccGenericServices = reader.bool(); + break; + case 17: + message.javaGenericServices = reader.bool(); + break; + case 18: + message.pyGenericServices = reader.bool(); + break; + case 42: + message.phpGenericServices = reader.bool(); + break; + case 23: + message.deprecated = reader.bool(); + break; + case 31: + message.ccEnableArenas = reader.bool(); + break; + case 36: + message.objcClassPrefix = reader.string(); + break; + case 37: + message.csharpNamespace = reader.string(); + break; + case 39: + message.swiftPrefix = reader.string(); + break; + case 40: + message.phpClassPrefix = reader.string(); + break; + case 41: + message.phpNamespace = reader.string(); + break; + case 44: + message.phpMetadataNamespace = reader.string(); + break; + case 45: + message.rubyPackage = reader.string(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1053: + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.messageSetWireFormat = reader.bool(); + break; + case 2: + message.noStandardDescriptorAccessor = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 7: + message.mapEntry = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1053: + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ctype = reader.int32(); + break; + case 2: + message.packed = reader.bool(); + break; + case 6: + message.jstype = reader.int32(); + break; + case 5: + message.lazy = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 10: + message.weak = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1052: + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + case 1055: + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.allowAlias = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1049: + message[".google.api.defaultHost"] = reader.string(); + break; + case 1050: + message[".google.api.oauthScopes"] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 34: + message.idempotencyLevel = reader.int32(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 72295728: + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + case 1051: + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + case 3: + message.identifierValue = reader.string(); + break; + case 4: + message.positiveIntValue = reader.uint64(); + break; + case 5: + message.negativeIntValue = reader.int64(); + break; + case 6: + message.doubleValue = reader.double(); + break; + case 7: + message.stringValue = reader.bytes(); + break; + case 8: + message.aggregateValue = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.namePart = reader.string(); + break; + case 2: + message.isExtension = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + case 3: + message.leadingComments = reader.string(); + break; + case 4: + message.trailingComments = reader.string(); + break; + case 6: + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + message.sourceFile = reader.string(); + break; + case 3: + message.begin = reader.int32(); + break; + case 4: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Empty; + })(); + + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FieldMask; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Timestamp; + })(); + + return protobuf; + })(); + + google.type = (function() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + type.Interval = (function() { + + /** + * Properties of an Interval. + * @memberof google.type + * @interface IInterval + * @property {google.protobuf.ITimestamp|null} [startTime] Interval startTime + * @property {google.protobuf.ITimestamp|null} [endTime] Interval endTime + */ + + /** + * Constructs a new Interval. + * @memberof google.type + * @classdesc Represents an Interval. + * @implements IInterval + * @constructor + * @param {google.type.IInterval=} [properties] Properties to set + */ + function Interval(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Interval startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.type.Interval + * @instance + */ + Interval.prototype.startTime = null; + + /** + * Interval endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.type.Interval + * @instance + */ + Interval.prototype.endTime = null; + + /** + * Creates a new Interval instance using the specified properties. + * @function create + * @memberof google.type.Interval + * @static + * @param {google.type.IInterval=} [properties] Properties to set + * @returns {google.type.Interval} Interval instance + */ + Interval.create = function create(properties) { + return new Interval(properties); + }; + + /** + * Encodes the specified Interval message. Does not implicitly {@link google.type.Interval.verify|verify} messages. + * @function encode + * @memberof google.type.Interval + * @static + * @param {google.type.IInterval} message Interval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Interval.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, 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(); + return writer; + }; + + /** + * Encodes the specified Interval message, length delimited. Does not implicitly {@link google.type.Interval.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.Interval + * @static + * @param {google.type.IInterval} message Interval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Interval.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Interval message from the specified reader or buffer. + * @function decode + * @memberof google.type.Interval + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.Interval} Interval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Interval.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Interval(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 2: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Interval message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.Interval + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.Interval} Interval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Interval.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Interval message. + * @function verify + * @memberof google.type.Interval + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Interval.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates an Interval message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.Interval + * @static + * @param {Object.} object Plain object + * @returns {google.type.Interval} Interval + */ + Interval.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Interval) + return object; + var message = new $root.google.type.Interval(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.type.Interval.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.type.Interval.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + return message; + }; + + /** + * Creates a plain object from an Interval message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.Interval + * @static + * @param {google.type.Interval} message Interval + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Interval.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startTime = null; + object.endTime = null; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + return object; + }; + + /** + * Converts this Interval to JSON. + * @function toJSON + * @memberof google.type.Interval + * @instance + * @returns {Object.} JSON object + */ + Interval.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Interval; + })(); + + return type; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-cloud-dataform/protos/protos.json b/packages/google-cloud-dataform/protos/protos.json new file mode 100644 index 00000000000..94471b3223f --- /dev/null +++ b/packages/google-cloud-dataform/protos/protos.json @@ -0,0 +1,3463 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "dataform": { + "nested": { + "v1alpha2": { + "options": { + "csharp_namespace": "Google.Cloud.Dataform.V1Alpha2", + "go_package": "google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2;dataform", + "java_multiple_files": true, + "java_outer_classname": "DataformProto", + "java_package": "com.google.cloud.dataform.v1alpha2", + "php_namespace": "Google\\Cloud\\Dataform\\V1alpha2", + "ruby_package": "Google::Cloud::Dataform::V1alpha2", + "(google.api.resource_definition).type": "secretmanager.googleapis.com/SecretVersion", + "(google.api.resource_definition).pattern": "projects/{project}/secrets/{secret}/versions/{version}" + }, + "nested": { + "Dataform": { + "options": { + "(google.api.default_host)": "dataform.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListRepositories": { + "requestType": "ListRepositoriesRequest", + "responseType": "ListRepositoriesResponse", + "options": { + "(google.api.http).get": "/v1alpha2/{parent=projects/*/locations/*}/repositories", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{parent=projects/*/locations/*}/repositories" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetRepository": { + "requestType": "GetRepositoryRequest", + "responseType": "Repository", + "options": { + "(google.api.http).get": "/v1alpha2/{name=projects/*/locations/*/repositories/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{name=projects/*/locations/*/repositories/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateRepository": { + "requestType": "CreateRepositoryRequest", + "responseType": "Repository", + "options": { + "(google.api.http).post": "/v1alpha2/{parent=projects/*/locations/*}/repositories", + "(google.api.http).body": "repository", + "(google.api.method_signature)": "parent,repository,repository_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{parent=projects/*/locations/*}/repositories", + "body": "repository" + } + }, + { + "(google.api.method_signature)": "parent,repository,repository_id" + } + ] + }, + "UpdateRepository": { + "requestType": "UpdateRepositoryRequest", + "responseType": "Repository", + "options": { + "(google.api.http).patch": "/v1alpha2/{repository.name=projects/*/locations/*/repositories/*}", + "(google.api.http).body": "repository", + "(google.api.method_signature)": "repository,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1alpha2/{repository.name=projects/*/locations/*/repositories/*}", + "body": "repository" + } + }, + { + "(google.api.method_signature)": "repository,update_mask" + } + ] + }, + "DeleteRepository": { + "requestType": "DeleteRepositoryRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1alpha2/{name=projects/*/locations/*/repositories/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1alpha2/{name=projects/*/locations/*/repositories/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "FetchRemoteBranches": { + "requestType": "FetchRemoteBranchesRequest", + "responseType": "FetchRemoteBranchesResponse", + "options": { + "(google.api.http).get": "/v1alpha2/{name=projects/*/locations/*/repositories/*}:fetchRemoteBranches" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{name=projects/*/locations/*/repositories/*}:fetchRemoteBranches" + } + } + ] + }, + "ListWorkspaces": { + "requestType": "ListWorkspacesRequest", + "responseType": "ListWorkspacesResponse", + "options": { + "(google.api.http).get": "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/workspaces", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/workspaces" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetWorkspace": { + "requestType": "GetWorkspaceRequest", + "responseType": "Workspace", + "options": { + "(google.api.http).get": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateWorkspace": { + "requestType": "CreateWorkspaceRequest", + "responseType": "Workspace", + "options": { + "(google.api.http).post": "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/workspaces", + "(google.api.http).body": "workspace", + "(google.api.method_signature)": "parent,workspace,workspace_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/workspaces", + "body": "workspace" + } + }, + { + "(google.api.method_signature)": "parent,workspace,workspace_id" + } + ] + }, + "DeleteWorkspace": { + "requestType": "DeleteWorkspaceRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "InstallNpmPackages": { + "requestType": "InstallNpmPackagesRequest", + "responseType": "InstallNpmPackagesResponse", + "options": { + "(google.api.http).post": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:installNpmPackages", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:installNpmPackages", + "body": "*" + } + } + ] + }, + "PullGitCommits": { + "requestType": "PullGitCommitsRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:pull", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:pull", + "body": "*" + } + } + ] + }, + "PushGitCommits": { + "requestType": "PushGitCommitsRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:push", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:push", + "body": "*" + } + } + ] + }, + "FetchFileGitStatuses": { + "requestType": "FetchFileGitStatusesRequest", + "responseType": "FetchFileGitStatusesResponse", + "options": { + "(google.api.http).get": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileGitStatuses" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileGitStatuses" + } + } + ] + }, + "FetchGitAheadBehind": { + "requestType": "FetchGitAheadBehindRequest", + "responseType": "FetchGitAheadBehindResponse", + "options": { + "(google.api.http).get": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchGitAheadBehind" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchGitAheadBehind" + } + } + ] + }, + "CommitWorkspaceChanges": { + "requestType": "CommitWorkspaceChangesRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:commit", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:commit", + "body": "*" + } + } + ] + }, + "ResetWorkspaceChanges": { + "requestType": "ResetWorkspaceChangesRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:reset", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workspaces/*}:reset", + "body": "*" + } + } + ] + }, + "FetchFileDiff": { + "requestType": "FetchFileDiffRequest", + "responseType": "FetchFileDiffResponse", + "options": { + "(google.api.http).get": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileDiff" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileDiff" + } + } + ] + }, + "QueryDirectoryContents": { + "requestType": "QueryDirectoryContentsRequest", + "responseType": "QueryDirectoryContentsResponse", + "options": { + "(google.api.http).get": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:queryDirectoryContents" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:queryDirectoryContents" + } + } + ] + }, + "MakeDirectory": { + "requestType": "MakeDirectoryRequest", + "responseType": "MakeDirectoryResponse", + "options": { + "(google.api.http).post": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:makeDirectory", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:makeDirectory", + "body": "*" + } + } + ] + }, + "RemoveDirectory": { + "requestType": "RemoveDirectoryRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeDirectory", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeDirectory", + "body": "*" + } + } + ] + }, + "MoveDirectory": { + "requestType": "MoveDirectoryRequest", + "responseType": "MoveDirectoryResponse", + "options": { + "(google.api.http).post": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveDirectory", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveDirectory", + "body": "*" + } + } + ] + }, + "ReadFile": { + "requestType": "ReadFileRequest", + "responseType": "ReadFileResponse", + "options": { + "(google.api.http).get": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:readFile" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:readFile" + } + } + ] + }, + "RemoveFile": { + "requestType": "RemoveFileRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeFile", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeFile", + "body": "*" + } + } + ] + }, + "MoveFile": { + "requestType": "MoveFileRequest", + "responseType": "MoveFileResponse", + "options": { + "(google.api.http).post": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveFile", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveFile", + "body": "*" + } + } + ] + }, + "WriteFile": { + "requestType": "WriteFileRequest", + "responseType": "WriteFileResponse", + "options": { + "(google.api.http).post": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:writeFile", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:writeFile", + "body": "*" + } + } + ] + }, + "ListCompilationResults": { + "requestType": "ListCompilationResultsRequest", + "responseType": "ListCompilationResultsResponse", + "options": { + "(google.api.http).get": "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/compilationResults", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/compilationResults" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetCompilationResult": { + "requestType": "GetCompilationResultRequest", + "responseType": "CompilationResult", + "options": { + "(google.api.http).get": "/v1alpha2/{name=projects/*/locations/*/repositories/*/compilationResults/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{name=projects/*/locations/*/repositories/*/compilationResults/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateCompilationResult": { + "requestType": "CreateCompilationResultRequest", + "responseType": "CompilationResult", + "options": { + "(google.api.http).post": "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/compilationResults", + "(google.api.http).body": "compilation_result", + "(google.api.method_signature)": "parent,compilation_result" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/compilationResults", + "body": "compilation_result" + } + }, + { + "(google.api.method_signature)": "parent,compilation_result" + } + ] + }, + "QueryCompilationResultActions": { + "requestType": "QueryCompilationResultActionsRequest", + "responseType": "QueryCompilationResultActionsResponse", + "options": { + "(google.api.http).get": "/v1alpha2/{name=projects/*/locations/*/repositories/*/compilationResults/*}:query" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{name=projects/*/locations/*/repositories/*/compilationResults/*}:query" + } + } + ] + }, + "ListWorkflowInvocations": { + "requestType": "ListWorkflowInvocationsRequest", + "responseType": "ListWorkflowInvocationsResponse", + "options": { + "(google.api.http).get": "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/workflowInvocations", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/workflowInvocations" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetWorkflowInvocation": { + "requestType": "GetWorkflowInvocationRequest", + "responseType": "WorkflowInvocation", + "options": { + "(google.api.http).get": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateWorkflowInvocation": { + "requestType": "CreateWorkflowInvocationRequest", + "responseType": "WorkflowInvocation", + "options": { + "(google.api.http).post": "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/workflowInvocations", + "(google.api.http).body": "workflow_invocation", + "(google.api.method_signature)": "parent,workflow_invocation" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{parent=projects/*/locations/*/repositories/*}/workflowInvocations", + "body": "workflow_invocation" + } + }, + { + "(google.api.method_signature)": "parent,workflow_invocation" + } + ] + }, + "DeleteWorkflowInvocation": { + "requestType": "DeleteWorkflowInvocationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelWorkflowInvocation": { + "requestType": "CancelWorkflowInvocationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:cancel", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:cancel", + "body": "*" + } + } + ] + }, + "QueryWorkflowInvocationActions": { + "requestType": "QueryWorkflowInvocationActionsRequest", + "responseType": "QueryWorkflowInvocationActionsResponse", + "options": { + "(google.api.http).get": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:query" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha2/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:query" + } + } + ] + } + } + }, + "Repository": { + "options": { + "(google.api.resource).type": "dataform.googleapis.com/Repository", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "gitRemoteSettings": { + "type": "GitRemoteSettings", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "GitRemoteSettings": { + "fields": { + "url": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "defaultBranch": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "authenticationTokenSecretVersion": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "secretmanager.googleapis.com/SecretVersion" + } + }, + "tokenStatus": { + "type": "TokenStatus", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "TokenStatus": { + "values": { + "TOKEN_STATUS_UNSPECIFIED": 0, + "NOT_FOUND": 1, + "INVALID": 2, + "VALID": 3 + } + } + } + } + } + }, + "ListRepositoriesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListRepositoriesResponse": { + "fields": { + "repositories": { + "rule": "repeated", + "type": "Repository", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetRepositoryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + } + } + }, + "CreateRepositoryRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "repository": { + "type": "Repository", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "repositoryId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateRepositoryRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "repository": { + "type": "Repository", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteRepositoryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "force": { + "type": "bool", + "id": 2 + } + } + }, + "FetchRemoteBranchesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + } + } + }, + "FetchRemoteBranchesResponse": { + "fields": { + "branches": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Workspace": { + "options": { + "(google.api.resource).type": "dataform.googleapis.com/Workspace", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/workspaces/{workspace}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ListWorkspacesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListWorkspacesResponse": { + "fields": { + "workspaces": { + "rule": "repeated", + "type": "Workspace", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetWorkspaceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + } + } + }, + "CreateWorkspaceRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "workspace": { + "type": "Workspace", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "workspaceId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteWorkspaceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + } + } + }, + "CommitAuthor": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "emailAddress": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "PullGitCommitsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "remoteBranch": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "author": { + "type": "CommitAuthor", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "PushGitCommitsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "remoteBranch": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FetchFileGitStatusesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + } + } + }, + "FetchFileGitStatusesResponse": { + "fields": { + "uncommittedFileChanges": { + "rule": "repeated", + "type": "UncommittedFileChange", + "id": 1 + } + }, + "nested": { + "UncommittedFileChange": { + "fields": { + "path": { + "type": "string", + "id": 1 + }, + "state": { + "type": "State", + "id": 2 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ADDED": 1, + "DELETED": 2, + "MODIFIED": 3, + "HAS_CONFLICTS": 4 + } + } + } + } + } + }, + "FetchGitAheadBehindRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "remoteBranch": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FetchGitAheadBehindResponse": { + "fields": { + "commitsAhead": { + "type": "int32", + "id": 1 + }, + "commitsBehind": { + "type": "int32", + "id": 2 + } + } + }, + "CommitWorkspaceChangesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "author": { + "type": "CommitAuthor", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "commitMessage": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "paths": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ResetWorkspaceChangesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "paths": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "clean": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FetchFileDiffRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "FetchFileDiffResponse": { + "fields": { + "formattedDiff": { + "type": "string", + "id": 1 + } + } + }, + "QueryDirectoryContentsRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "QueryDirectoryContentsResponse": { + "fields": { + "directoryEntries": { + "rule": "repeated", + "type": "DirectoryEntry", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + }, + "nested": { + "DirectoryEntry": { + "oneofs": { + "entry": { + "oneof": [ + "file", + "directory" + ] + } + }, + "fields": { + "file": { + "type": "string", + "id": 1 + }, + "directory": { + "type": "string", + "id": 2 + } + } + } + } + }, + "MakeDirectoryRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MakeDirectoryResponse": { + "fields": {} + }, + "RemoveDirectoryRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MoveDirectoryRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "newPath": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MoveDirectoryResponse": { + "fields": {} + }, + "ReadFileRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ReadFileResponse": { + "fields": { + "fileContents": { + "type": "bytes", + "id": 1 + } + } + }, + "RemoveFileRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MoveFileRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "newPath": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MoveFileResponse": { + "fields": {} + }, + "WriteFileRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "contents": { + "type": "bytes", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "WriteFileResponse": { + "fields": {} + }, + "InstallNpmPackagesRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + } + } + }, + "InstallNpmPackagesResponse": { + "fields": {} + }, + "CompilationResult": { + "options": { + "(google.api.resource).type": "dataform.googleapis.com/CompilationResult", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/compilationResults/{compilation_result}" + }, + "oneofs": { + "source": { + "oneof": [ + "gitCommitish", + "workspace" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "gitCommitish": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "workspace": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "codeCompilationConfig": { + "type": "CodeCompilationConfig", + "id": 4, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "dataformCoreVersion": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "compilationErrors": { + "rule": "repeated", + "type": "CompilationError", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "CodeCompilationConfig": { + "fields": { + "defaultDatabase": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "defaultSchema": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "defaultLocation": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "assertionSchema": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "vars": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "databaseSuffix": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "schemaSuffix": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "tablePrefix": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CompilationError": { + "fields": { + "message": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "stack": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "path": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "actionTarget": { + "type": "Target", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + } + } + }, + "ListCompilationResultsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListCompilationResultsResponse": { + "fields": { + "compilationResults": { + "rule": "repeated", + "type": "CompilationResult", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetCompilationResultRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/CompilationResult" + } + } + } + }, + "CreateCompilationResultRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "compilationResult": { + "type": "CompilationResult", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Target": { + "fields": { + "database": { + "type": "string", + "id": 1 + }, + "schema": { + "type": "string", + "id": 2 + }, + "name": { + "type": "string", + "id": 3 + } + } + }, + "RelationDescriptor": { + "fields": { + "description": { + "type": "string", + "id": 1 + }, + "columns": { + "rule": "repeated", + "type": "ColumnDescriptor", + "id": 2 + }, + "bigqueryLabels": { + "keyType": "string", + "type": "string", + "id": 3 + } + }, + "nested": { + "ColumnDescriptor": { + "fields": { + "path": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "bigqueryPolicyTags": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + } + } + }, + "CompilationResultAction": { + "oneofs": { + "compiledObject": { + "oneof": [ + "relation", + "operations", + "assertion", + "declaration" + ] + } + }, + "fields": { + "target": { + "type": "Target", + "id": 1 + }, + "canonicalTarget": { + "type": "Target", + "id": 2 + }, + "filePath": { + "type": "string", + "id": 3 + }, + "relation": { + "type": "Relation", + "id": 4 + }, + "operations": { + "type": "Operations", + "id": 5 + }, + "assertion": { + "type": "Assertion", + "id": 6 + }, + "declaration": { + "type": "Declaration", + "id": 7 + } + }, + "nested": { + "Relation": { + "fields": { + "dependencyTargets": { + "rule": "repeated", + "type": "Target", + "id": 1 + }, + "disabled": { + "type": "bool", + "id": 2 + }, + "tags": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "relationDescriptor": { + "type": "RelationDescriptor", + "id": 4 + }, + "relationType": { + "type": "RelationType", + "id": 5 + }, + "selectQuery": { + "type": "string", + "id": 6 + }, + "preOperations": { + "rule": "repeated", + "type": "string", + "id": 7 + }, + "postOperations": { + "rule": "repeated", + "type": "string", + "id": 8 + }, + "incrementalTableConfig": { + "type": "IncrementalTableConfig", + "id": 9 + }, + "partitionExpression": { + "type": "string", + "id": 10 + }, + "clusterExpressions": { + "rule": "repeated", + "type": "string", + "id": 11 + }, + "partitionExpirationDays": { + "type": "int32", + "id": 12 + }, + "requirePartitionFilter": { + "type": "bool", + "id": 13 + }, + "additionalOptions": { + "keyType": "string", + "type": "string", + "id": 14 + } + }, + "nested": { + "RelationType": { + "values": { + "RELATION_TYPE_UNSPECIFIED": 0, + "TABLE": 1, + "VIEW": 2, + "INCREMENTAL_TABLE": 3, + "MATERIALIZED_VIEW": 4 + } + }, + "IncrementalTableConfig": { + "fields": { + "incrementalSelectQuery": { + "type": "string", + "id": 1 + }, + "refreshDisabled": { + "type": "bool", + "id": 2 + }, + "uniqueKeyParts": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "updatePartitionFilter": { + "type": "string", + "id": 4 + }, + "incrementalPreOperations": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "incrementalPostOperations": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "Operations": { + "fields": { + "dependencyTargets": { + "rule": "repeated", + "type": "Target", + "id": 1 + }, + "disabled": { + "type": "bool", + "id": 2 + }, + "tags": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "relationDescriptor": { + "type": "RelationDescriptor", + "id": 6 + }, + "queries": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "hasOutput": { + "type": "bool", + "id": 5 + } + } + }, + "Assertion": { + "fields": { + "dependencyTargets": { + "rule": "repeated", + "type": "Target", + "id": 1 + }, + "parentAction": { + "type": "Target", + "id": 5 + }, + "disabled": { + "type": "bool", + "id": 2 + }, + "tags": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "selectQuery": { + "type": "string", + "id": 4 + }, + "relationDescriptor": { + "type": "RelationDescriptor", + "id": 6 + } + } + }, + "Declaration": { + "fields": { + "relationDescriptor": { + "type": "RelationDescriptor", + "id": 1 + } + } + } + } + }, + "QueryCompilationResultActionsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/CompilationResult" + } + }, + "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" + } + } + } + }, + "QueryCompilationResultActionsResponse": { + "fields": { + "compilationResultActions": { + "rule": "repeated", + "type": "CompilationResultAction", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "WorkflowInvocation": { + "options": { + "(google.api.resource).type": "dataform.googleapis.com/WorkflowInvocation", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/workflowInvocations/{workflow_invocation}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "compilationResult": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "(google.api.resource_reference).type": "dataform.googleapis.com/CompilationResult" + } + }, + "invocationConfig": { + "type": "InvocationConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "state": { + "type": "State", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "invocationTiming": { + "type": "google.type.Interval", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "InvocationConfig": { + "fields": { + "includedTargets": { + "rule": "repeated", + "type": "Target", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "includedTags": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "transitiveDependenciesIncluded": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "transitiveDependentsIncluded": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "fullyRefreshIncrementalTablesEnabled": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "RUNNING": 1, + "SUCCEEDED": 2, + "CANCELLED": 3, + "FAILED": 4, + "CANCELING": 5 + } + } + } + }, + "ListWorkflowInvocationsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListWorkflowInvocationsResponse": { + "fields": { + "workflowInvocations": { + "rule": "repeated", + "type": "WorkflowInvocation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetWorkflowInvocationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/WorkflowInvocation" + } + } + } + }, + "CreateWorkflowInvocationRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "workflowInvocation": { + "type": "WorkflowInvocation", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteWorkflowInvocationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/WorkflowInvocation" + } + } + } + }, + "CancelWorkflowInvocationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/WorkflowInvocation" + } + } + } + }, + "WorkflowInvocationAction": { + "fields": { + "target": { + "type": "Target", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "canonicalTarget": { + "type": "Target", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "invocationTiming": { + "type": "google.type.Interval", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "bigqueryAction": { + "type": "BigQueryAction", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "PENDING": 0, + "RUNNING": 1, + "SKIPPED": 2, + "DISABLED": 3, + "SUCCEEDED": 4, + "CANCELLED": 5, + "FAILED": 6 + } + }, + "BigQueryAction": { + "fields": { + "sqlScript": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + } + } + }, + "QueryWorkflowInvocationActionsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/WorkflowInvocation" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "QueryWorkflowInvocationActionsResponse": { + "fields": { + "workflowInvocationActions": { + "rule": "repeated", + "type": "WorkflowInvocationAction", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ResourceProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "phpGenericServices": { + "type": "bool", + "id": 42, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + } + } + }, + "OneofOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + } + } + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "type": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/type/interval;interval", + "java_multiple_files": true, + "java_outer_classname": "IntervalProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "Interval": { + "fields": { + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.cancel_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.cancel_workflow_invocation.js new file mode 100644 index 00000000000..9ba5e29e012 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.cancel_workflow_invocation.js @@ -0,0 +1,58 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_CancelWorkflowInvocation_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workflow invocation resource's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCancelWorkflowInvocation() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.cancelWorkflowInvocation(request); + console.log(response); + } + + callCancelWorkflowInvocation(); + // [END dataform_v1alpha2_generated_Dataform_CancelWorkflowInvocation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.commit_workspace_changes.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.commit_workspace_changes.js new file mode 100644 index 00000000000..205d23a8b74 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.commit_workspace_changes.js @@ -0,0 +1,72 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name, author) { + // [START dataform_v1alpha2_generated_Dataform_CommitWorkspaceChanges_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + /** + * Required. The commit's author. + */ + // const author = {} + /** + * Optional. The commit's message. + */ + // const commitMessage = 'abc123' + /** + * Optional. Full file paths to commit including filename, rooted at workspace root. If + * left empty, all files will be committed. + */ + // const paths = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCommitWorkspaceChanges() { + // Construct request + const request = { + name, + author, + }; + + // Run request + const response = await dataformClient.commitWorkspaceChanges(request); + console.log(response); + } + + callCommitWorkspaceChanges(); + // [END dataform_v1alpha2_generated_Dataform_CommitWorkspaceChanges_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_compilation_result.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_compilation_result.js new file mode 100644 index 00000000000..800f91d05f6 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_compilation_result.js @@ -0,0 +1,64 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, compilationResult) { + // [START dataform_v1alpha2_generated_Dataform_CreateCompilationResult_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository in which to create the compilation result. Must be in the + * format `projects/* /locations/* /repositories/*`. + */ + // const parent = 'abc123' + /** + * Required. The compilation result to create. + */ + // const compilationResult = {} + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCreateCompilationResult() { + // Construct request + const request = { + parent, + compilationResult, + }; + + // Run request + const response = await dataformClient.createCompilationResult(request); + console.log(response); + } + + callCreateCompilationResult(); + // [END dataform_v1alpha2_generated_Dataform_CreateCompilationResult_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_repository.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_repository.js new file mode 100644 index 00000000000..50c7e43aa82 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_repository.js @@ -0,0 +1,70 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, repository, repositoryId) { + // [START dataform_v1alpha2_generated_Dataform_CreateRepository_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The location in which to create the repository. Must be in the format + * `projects/* /locations/*`. + */ + // const parent = 'abc123' + /** + * Required. The repository to create. + */ + // const repository = {} + /** + * Required. The ID to use for the repository, which will become the final component of + * the repository's resource name. + */ + // const repositoryId = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCreateRepository() { + // Construct request + const request = { + parent, + repository, + repositoryId, + }; + + // Run request + const response = await dataformClient.createRepository(request); + console.log(response); + } + + callCreateRepository(); + // [END dataform_v1alpha2_generated_Dataform_CreateRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workflow_invocation.js new file mode 100644 index 00000000000..cf8332560ee --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workflow_invocation.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, workflowInvocation) { + // [START dataform_v1alpha2_generated_Dataform_CreateWorkflowInvocation_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the WorkflowInvocation type. + */ + // const parent = 'abc123' + /** + * Required. The workflow invocation resource to create. + */ + // const workflowInvocation = {} + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCreateWorkflowInvocation() { + // Construct request + const request = { + parent, + workflowInvocation, + }; + + // Run request + const response = await dataformClient.createWorkflowInvocation(request); + console.log(response); + } + + callCreateWorkflowInvocation(); + // [END dataform_v1alpha2_generated_Dataform_CreateWorkflowInvocation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workspace.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workspace.js new file mode 100644 index 00000000000..60695fcc726 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workspace.js @@ -0,0 +1,70 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, workspace, workspaceId) { + // [START dataform_v1alpha2_generated_Dataform_CreateWorkspace_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository in which to create the workspace. Must be in the format + * `projects/* /locations/* /repositories/*`. + */ + // const parent = 'abc123' + /** + * Required. The workspace to create. + */ + // const workspace = {} + /** + * Required. The ID to use for the workspace, which will become the final component of + * the workspace's resource name. + */ + // const workspaceId = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCreateWorkspace() { + // Construct request + const request = { + parent, + workspace, + workspaceId, + }; + + // Run request + const response = await dataformClient.createWorkspace(request); + console.log(response); + } + + callCreateWorkspace(); + // [END dataform_v1alpha2_generated_Dataform_CreateWorkspace_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_repository.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_repository.js new file mode 100644 index 00000000000..5687647eaf6 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_repository.js @@ -0,0 +1,64 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_DeleteRepository_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository's name. + */ + // const name = 'abc123' + /** + * If set to true, any child resources of this repository will also be + * deleted. (Otherwise, the request will only succeed if the repository has no + * child resources.) + */ + // const force = true + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callDeleteRepository() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.deleteRepository(request); + console.log(response); + } + + callDeleteRepository(); + // [END dataform_v1alpha2_generated_Dataform_DeleteRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workflow_invocation.js new file mode 100644 index 00000000000..5a02d8c7b3a --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workflow_invocation.js @@ -0,0 +1,58 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_DeleteWorkflowInvocation_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workflow invocation resource's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callDeleteWorkflowInvocation() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.deleteWorkflowInvocation(request); + console.log(response); + } + + callDeleteWorkflowInvocation(); + // [END dataform_v1alpha2_generated_Dataform_DeleteWorkflowInvocation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workspace.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workspace.js new file mode 100644 index 00000000000..db8f6bf86c7 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workspace.js @@ -0,0 +1,58 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_DeleteWorkspace_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace resource's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callDeleteWorkspace() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.deleteWorkspace(request); + console.log(response); + } + + callDeleteWorkspace(); + // [END dataform_v1alpha2_generated_Dataform_DeleteWorkspace_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_diff.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_diff.js new file mode 100644 index 00000000000..a600b93bc3b --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_diff.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path) { + // [START dataform_v1alpha2_generated_Dataform_FetchFileDiff_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The file's full path including filename, relative to the workspace root. + */ + // const path = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callFetchFileDiff() { + // Construct request + const request = { + workspace, + path, + }; + + // Run request + const response = await dataformClient.fetchFileDiff(request); + console.log(response); + } + + callFetchFileDiff(); + // [END dataform_v1alpha2_generated_Dataform_FetchFileDiff_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_git_statuses.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_git_statuses.js new file mode 100644 index 00000000000..c725234dfe5 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_git_statuses.js @@ -0,0 +1,58 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_FetchFileGitStatuses_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callFetchFileGitStatuses() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.fetchFileGitStatuses(request); + console.log(response); + } + + callFetchFileGitStatuses(); + // [END dataform_v1alpha2_generated_Dataform_FetchFileGitStatuses_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_git_ahead_behind.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_git_ahead_behind.js new file mode 100644 index 00000000000..3dea2060598 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_git_ahead_behind.js @@ -0,0 +1,64 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_FetchGitAheadBehind_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + /** + * Optional. The name of the branch in the Git remote against which this workspace + * should be compared. If left unset, the repository's default branch name + * will be used. + */ + // const remoteBranch = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callFetchGitAheadBehind() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.fetchGitAheadBehind(request); + console.log(response); + } + + callFetchGitAheadBehind(); + // [END dataform_v1alpha2_generated_Dataform_FetchGitAheadBehind_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_remote_branches.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_remote_branches.js new file mode 100644 index 00000000000..fd742014782 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_remote_branches.js @@ -0,0 +1,58 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_FetchRemoteBranches_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callFetchRemoteBranches() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.fetchRemoteBranches(request); + console.log(response); + } + + callFetchRemoteBranches(); + // [END dataform_v1alpha2_generated_Dataform_FetchRemoteBranches_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_compilation_result.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_compilation_result.js new file mode 100644 index 00000000000..0f074d34826 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_compilation_result.js @@ -0,0 +1,58 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_GetCompilationResult_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The compilation result's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callGetCompilationResult() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.getCompilationResult(request); + console.log(response); + } + + callGetCompilationResult(); + // [END dataform_v1alpha2_generated_Dataform_GetCompilationResult_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_repository.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_repository.js new file mode 100644 index 00000000000..3c712d1b8bd --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_repository.js @@ -0,0 +1,58 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_GetRepository_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callGetRepository() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.getRepository(request); + console.log(response); + } + + callGetRepository(); + // [END dataform_v1alpha2_generated_Dataform_GetRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workflow_invocation.js new file mode 100644 index 00000000000..7ffa3457dbb --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workflow_invocation.js @@ -0,0 +1,58 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_GetWorkflowInvocation_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workflow invocation resource's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callGetWorkflowInvocation() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.getWorkflowInvocation(request); + console.log(response); + } + + callGetWorkflowInvocation(); + // [END dataform_v1alpha2_generated_Dataform_GetWorkflowInvocation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workspace.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workspace.js new file mode 100644 index 00000000000..bf3447d6f99 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workspace.js @@ -0,0 +1,58 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_GetWorkspace_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callGetWorkspace() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.getWorkspace(request); + console.log(response); + } + + callGetWorkspace(); + // [END dataform_v1alpha2_generated_Dataform_GetWorkspace_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.install_npm_packages.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.install_npm_packages.js new file mode 100644 index 00000000000..aa80216019d --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.install_npm_packages.js @@ -0,0 +1,58 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace) { + // [START dataform_v1alpha2_generated_Dataform_InstallNpmPackages_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callInstallNpmPackages() { + // Construct request + const request = { + workspace, + }; + + // Run request + const response = await dataformClient.installNpmPackages(request); + console.log(response); + } + + callInstallNpmPackages(); + // [END dataform_v1alpha2_generated_Dataform_InstallNpmPackages_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_compilation_results.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_compilation_results.js new file mode 100644 index 00000000000..44528b56ffe --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_compilation_results.js @@ -0,0 +1,74 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataform_v1alpha2_generated_Dataform_ListCompilationResults_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository in which to list compilation results. Must be in the + * format `projects/* /locations/* /repositories/*`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListCompilationResults` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCompilationResults` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callListCompilationResults() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataformClient.listCompilationResultsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListCompilationResults(); + // [END dataform_v1alpha2_generated_Dataform_ListCompilationResults_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_repositories.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_repositories.js new file mode 100644 index 00000000000..f203cdbe7fa --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_repositories.js @@ -0,0 +1,84 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataform_v1alpha2_generated_Dataform_ListRepositories_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The location in which to list repositories. Must be in the format + * `projects/* /locations/*`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of repositories to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListRepositories` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListRepositories` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + */ + // const orderBy = 'abc123' + /** + * Optional. Filter for the returned list. + */ + // const filter = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callListRepositories() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataformClient.listRepositoriesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListRepositories(); + // [END dataform_v1alpha2_generated_Dataform_ListRepositories_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workflow_invocations.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workflow_invocations.js new file mode 100644 index 00000000000..3ebf8940b69 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workflow_invocations.js @@ -0,0 +1,74 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataform_v1alpha2_generated_Dataform_ListWorkflowInvocations_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the WorkflowInvocation type. Must be in the + * format `projects/* /locations/* /repositories/*`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListWorkflowInvocations` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListWorkflowInvocations` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callListWorkflowInvocations() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataformClient.listWorkflowInvocationsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListWorkflowInvocations(); + // [END dataform_v1alpha2_generated_Dataform_ListWorkflowInvocations_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workspaces.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workspaces.js new file mode 100644 index 00000000000..e2c4f0603c8 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workspaces.js @@ -0,0 +1,84 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataform_v1alpha2_generated_Dataform_ListWorkspaces_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository in which to list workspaces. Must be in the + * format `projects/* /locations/* /repositories/*`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of workspaces to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListWorkspaces` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListWorkspaces` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + */ + // const orderBy = 'abc123' + /** + * Optional. Filter for the returned list. + */ + // const filter = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callListWorkspaces() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataformClient.listWorkspacesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListWorkspaces(); + // [END dataform_v1alpha2_generated_Dataform_ListWorkspaces_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.make_directory.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.make_directory.js new file mode 100644 index 00000000000..61119635e15 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.make_directory.js @@ -0,0 +1,64 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path) { + // [START dataform_v1alpha2_generated_Dataform_MakeDirectory_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The directory's full path including directory name, relative to the + * workspace root. + */ + // const path = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callMakeDirectory() { + // Construct request + const request = { + workspace, + path, + }; + + // Run request + const response = await dataformClient.makeDirectory(request); + console.log(response); + } + + callMakeDirectory(); + // [END dataform_v1alpha2_generated_Dataform_MakeDirectory_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_directory.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_directory.js new file mode 100644 index 00000000000..336a48092cc --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_directory.js @@ -0,0 +1,70 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path, newPath) { + // [START dataform_v1alpha2_generated_Dataform_MoveDirectory_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The directory's full path including directory name, relative to the + * workspace root. + */ + // const path = 'abc123' + /** + * Required. The new path for the directory including directory name, rooted at + * workspace root. + */ + // const newPath = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callMoveDirectory() { + // Construct request + const request = { + workspace, + path, + newPath, + }; + + // Run request + const response = await dataformClient.moveDirectory(request); + console.log(response); + } + + callMoveDirectory(); + // [END dataform_v1alpha2_generated_Dataform_MoveDirectory_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_file.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_file.js new file mode 100644 index 00000000000..c95054b5185 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_file.js @@ -0,0 +1,68 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path, newPath) { + // [START dataform_v1alpha2_generated_Dataform_MoveFile_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The file's full path including filename, relative to the workspace root. + */ + // const path = 'abc123' + /** + * Required. The file's new path including filename, relative to the workspace root. + */ + // const newPath = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callMoveFile() { + // Construct request + const request = { + workspace, + path, + newPath, + }; + + // Run request + const response = await dataformClient.moveFile(request); + console.log(response); + } + + callMoveFile(); + // [END dataform_v1alpha2_generated_Dataform_MoveFile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.pull_git_commits.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.pull_git_commits.js new file mode 100644 index 00000000000..edbefad26b7 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.pull_git_commits.js @@ -0,0 +1,69 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name, author) { + // [START dataform_v1alpha2_generated_Dataform_PullGitCommits_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + /** + * Optional. The name of the branch in the Git remote from which to pull commits. + * If left unset, the repository's default branch name will be used. + */ + // const remoteBranch = 'abc123' + /** + * Required. The author of any merge commit which may be created as a result of merging + * fetched Git commits into this workspace. + */ + // const author = {} + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callPullGitCommits() { + // Construct request + const request = { + name, + author, + }; + + // Run request + const response = await dataformClient.pullGitCommits(request); + console.log(response); + } + + callPullGitCommits(); + // [END dataform_v1alpha2_generated_Dataform_PullGitCommits_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.push_git_commits.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.push_git_commits.js new file mode 100644 index 00000000000..ea15c74e8a0 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.push_git_commits.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_PushGitCommits_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + /** + * Optional. The name of the branch in the Git remote to which commits should be pushed. + * If left unset, the repository's default branch name will be used. + */ + // const remoteBranch = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callPushGitCommits() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.pushGitCommits(request); + console.log(response); + } + + callPushGitCommits(); + // [END dataform_v1alpha2_generated_Dataform_PushGitCommits_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_compilation_result_actions.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_compilation_result_actions.js new file mode 100644 index 00000000000..d310fd72d72 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_compilation_result_actions.js @@ -0,0 +1,79 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_QueryCompilationResultActions_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The compilation result's name. + */ + // const name = 'abc123' + /** + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `QueryCompilationResultActions` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `QueryCompilationResultActions` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + /** + * Optional. Optional filter for the returned list. Filtering is only currently + * supported on the `file_path` field. + */ + // const filter = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callQueryCompilationResultActions() { + // Construct request + const request = { + name, + }; + + // Run request + const iterable = await dataformClient.queryCompilationResultActionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callQueryCompilationResultActions(); + // [END dataform_v1alpha2_generated_Dataform_QueryCompilationResultActions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_directory_contents.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_directory_contents.js new file mode 100644 index 00000000000..37c747b7b95 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_directory_contents.js @@ -0,0 +1,79 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace) { + // [START dataform_v1alpha2_generated_Dataform_QueryDirectoryContents_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Optional. The directory's full path including directory name, relative to the + * workspace root. If left unset, the workspace root is used. + */ + // const path = 'abc123' + /** + * Optional. Maximum number of paths to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `QueryDirectoryContents` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `QueryDirectoryContents` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callQueryDirectoryContents() { + // Construct request + const request = { + workspace, + }; + + // Run request + const iterable = await dataformClient.queryDirectoryContentsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callQueryDirectoryContents(); + // [END dataform_v1alpha2_generated_Dataform_QueryDirectoryContents_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_workflow_invocation_actions.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_workflow_invocation_actions.js new file mode 100644 index 00000000000..bc2f32d3bf8 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_workflow_invocation_actions.js @@ -0,0 +1,74 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_QueryWorkflowInvocationActions_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workflow invocation's name. + */ + // const name = 'abc123' + /** + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `QueryWorkflowInvocationActions` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `QueryWorkflowInvocationActions` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callQueryWorkflowInvocationActions() { + // Construct request + const request = { + name, + }; + + // Run request + const iterable = await dataformClient.queryWorkflowInvocationActionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callQueryWorkflowInvocationActions(); + // [END dataform_v1alpha2_generated_Dataform_QueryWorkflowInvocationActions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.read_file.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.read_file.js new file mode 100644 index 00000000000..0bd285c1900 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.read_file.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path) { + // [START dataform_v1alpha2_generated_Dataform_ReadFile_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The file's full path including filename, relative to the workspace root. + */ + // const path = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callReadFile() { + // Construct request + const request = { + workspace, + path, + }; + + // Run request + const response = await dataformClient.readFile(request); + console.log(response); + } + + callReadFile(); + // [END dataform_v1alpha2_generated_Dataform_ReadFile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_directory.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_directory.js new file mode 100644 index 00000000000..f414ee44976 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_directory.js @@ -0,0 +1,64 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path) { + // [START dataform_v1alpha2_generated_Dataform_RemoveDirectory_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The directory's full path including directory name, relative to the + * workspace root. + */ + // const path = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callRemoveDirectory() { + // Construct request + const request = { + workspace, + path, + }; + + // Run request + const response = await dataformClient.removeDirectory(request); + console.log(response); + } + + callRemoveDirectory(); + // [END dataform_v1alpha2_generated_Dataform_RemoveDirectory_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_file.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_file.js new file mode 100644 index 00000000000..f8cfb94753f --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_file.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path) { + // [START dataform_v1alpha2_generated_Dataform_RemoveFile_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The file's full path including filename, relative to the workspace root. + */ + // const path = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callRemoveFile() { + // Construct request + const request = { + workspace, + path, + }; + + // Run request + const response = await dataformClient.removeFile(request); + console.log(response); + } + + callRemoveFile(); + // [END dataform_v1alpha2_generated_Dataform_RemoveFile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.reset_workspace_changes.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.reset_workspace_changes.js new file mode 100644 index 00000000000..7efa0a00680 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.reset_workspace_changes.js @@ -0,0 +1,67 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1alpha2_generated_Dataform_ResetWorkspaceChanges_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + /** + * Optional. Full file paths to reset back to their committed state including filename, + * rooted at workspace root. If left empty, all files will be reset. + */ + // const paths = 'abc123' + /** + * Optional. If set to true, untracked files will be deleted. + */ + // const clean = true + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callResetWorkspaceChanges() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.resetWorkspaceChanges(request); + console.log(response); + } + + callResetWorkspaceChanges(); + // [END dataform_v1alpha2_generated_Dataform_ResetWorkspaceChanges_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.update_repository.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.update_repository.js new file mode 100644 index 00000000000..067c1ab6e81 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.update_repository.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(repository) { + // [START dataform_v1alpha2_generated_Dataform_UpdateRepository_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Optional. Specifies the fields to be updated in the repository. If left unset, + * all fields will be updated. + */ + // const updateMask = {} + /** + * Required. The repository to update. + */ + // const repository = {} + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callUpdateRepository() { + // Construct request + const request = { + repository, + }; + + // Run request + const response = await dataformClient.updateRepository(request); + console.log(response); + } + + callUpdateRepository(); + // [END dataform_v1alpha2_generated_Dataform_UpdateRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.write_file.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.write_file.js new file mode 100644 index 00000000000..c5f695ace4b --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.write_file.js @@ -0,0 +1,68 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path, contents) { + // [START dataform_v1alpha2_generated_Dataform_WriteFile_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The file. + */ + // const path = 'abc123' + /** + * Required. The file's contents. + */ + // const contents = 'Buffer.from('string')' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callWriteFile() { + // Construct request + const request = { + workspace, + path, + contents, + }; + + // Run request + const response = await dataformClient.writeFile(request); + console.log(response); + } + + callWriteFile(); + // [END dataform_v1alpha2_generated_Dataform_WriteFile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json b/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json new file mode 100644 index 00000000000..1595f999da3 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json @@ -0,0 +1,1647 @@ +{ + "clientLibrary": { + "name": "nodejs-dataform", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.dataform.v1alpha2", + "version": "v1alpha2" + } + ] + }, + "snippets": [ + { + "regionTag": "dataform_v1alpha2_generated_Dataform_ListRepositories_async", + "title": "Dataform listRepositories Sample", + "origin": "API_DEFINITION", + "description": " Lists Repositories in a given project and location.", + "canonical": true, + "file": "dataform.list_repositories.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListRepositories", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.ListRepositories", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.ListRepositoriesResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "ListRepositories", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.ListRepositories", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_GetRepository_async", + "title": "Dataform getRepository Sample", + "origin": "API_DEFINITION", + "description": " Fetches a single Repository.", + "canonical": true, + "file": "dataform.get_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetRepository", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.GetRepository", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.Repository", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "GetRepository", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.GetRepository", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_CreateRepository_async", + "title": "Dataform createRepository Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Repository in a given project and location.", + "canonical": true, + "file": "dataform.create_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateRepository", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.CreateRepository", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "repository", + "type": ".google.cloud.dataform.v1alpha2.Repository" + }, + { + "name": "repository_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.Repository", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "CreateRepository", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.CreateRepository", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_UpdateRepository_async", + "title": "Dataform updateRepository Sample", + "origin": "API_DEFINITION", + "description": " Updates a single Repository.", + "canonical": true, + "file": "dataform.update_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateRepository", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.UpdateRepository", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "repository", + "type": ".google.cloud.dataform.v1alpha2.Repository" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.Repository", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "UpdateRepository", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.UpdateRepository", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_DeleteRepository_async", + "title": "Dataform deleteRepository Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single Repository.", + "canonical": true, + "file": "dataform.delete_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteRepository", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.DeleteRepository", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "DeleteRepository", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.DeleteRepository", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_FetchRemoteBranches_async", + "title": "Dataform fetchRemoteBranches Sample", + "origin": "API_DEFINITION", + "description": " Fetches a Repository's remote branches.", + "canonical": true, + "file": "dataform.fetch_remote_branches.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchRemoteBranches", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.FetchRemoteBranches", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "FetchRemoteBranches", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.FetchRemoteBranches", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_ListWorkspaces_async", + "title": "Dataform listWorkspaces Sample", + "origin": "API_DEFINITION", + "description": " Lists Workspaces in a given Repository.", + "canonical": true, + "file": "dataform.list_workspaces.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListWorkspaces", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.ListWorkspaces", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.ListWorkspacesResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "ListWorkspaces", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.ListWorkspaces", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_GetWorkspace_async", + "title": "Dataform getWorkspace Sample", + "origin": "API_DEFINITION", + "description": " Fetches a single Workspace.", + "canonical": true, + "file": "dataform.get_workspace.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetWorkspace", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.GetWorkspace", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.Workspace", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "GetWorkspace", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.GetWorkspace", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_CreateWorkspace_async", + "title": "Dataform createWorkspace Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Workspace in a given Repository.", + "canonical": true, + "file": "dataform.create_workspace.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateWorkspace", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.CreateWorkspace", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "workspace", + "type": ".google.cloud.dataform.v1alpha2.Workspace" + }, + { + "name": "workspace_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.Workspace", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "CreateWorkspace", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.CreateWorkspace", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_DeleteWorkspace_async", + "title": "Dataform deleteWorkspace Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single Workspace.", + "canonical": true, + "file": "dataform.delete_workspace.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteWorkspace", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.DeleteWorkspace", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "DeleteWorkspace", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.DeleteWorkspace", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_InstallNpmPackages_async", + "title": "Dataform installNpmPackages Sample", + "origin": "API_DEFINITION", + "description": " Installs dependency NPM packages (inside a Workspace).", + "canonical": true, + "file": "dataform.install_npm_packages.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "InstallNpmPackages", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.InstallNpmPackages", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "InstallNpmPackages", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.InstallNpmPackages", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_PullGitCommits_async", + "title": "Dataform pullGitCommits Sample", + "origin": "API_DEFINITION", + "description": " Pulls Git commits from the Repository's remote into a Workspace.", + "canonical": true, + "file": "dataform.pull_git_commits.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PullGitCommits", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.PullGitCommits", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "remote_branch", + "type": "TYPE_STRING" + }, + { + "name": "author", + "type": ".google.cloud.dataform.v1alpha2.CommitAuthor" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "PullGitCommits", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.PullGitCommits", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_PushGitCommits_async", + "title": "Dataform pushGitCommits Sample", + "origin": "API_DEFINITION", + "description": " Pushes Git commits from a Workspace to the Repository's remote.", + "canonical": true, + "file": "dataform.push_git_commits.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PushGitCommits", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.PushGitCommits", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "remote_branch", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "PushGitCommits", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.PushGitCommits", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_FetchFileGitStatuses_async", + "title": "Dataform fetchFileGitStatuses Sample", + "origin": "API_DEFINITION", + "description": " Fetches Git statuses for the files in a Workspace.", + "canonical": true, + "file": "dataform.fetch_file_git_statuses.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchFileGitStatuses", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.FetchFileGitStatuses", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "FetchFileGitStatuses", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.FetchFileGitStatuses", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_FetchGitAheadBehind_async", + "title": "Dataform fetchGitAheadBehind Sample", + "origin": "API_DEFINITION", + "description": " Fetches Git ahead/behind against a remote branch.", + "canonical": true, + "file": "dataform.fetch_git_ahead_behind.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchGitAheadBehind", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.FetchGitAheadBehind", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "remote_branch", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "FetchGitAheadBehind", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.FetchGitAheadBehind", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_CommitWorkspaceChanges_async", + "title": "Dataform commitWorkspaceChanges Sample", + "origin": "API_DEFINITION", + "description": " Applies a Git commit for uncommitted files in a Workspace.", + "canonical": true, + "file": "dataform.commit_workspace_changes.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CommitWorkspaceChanges", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.CommitWorkspaceChanges", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "author", + "type": ".google.cloud.dataform.v1alpha2.CommitAuthor" + }, + { + "name": "commit_message", + "type": "TYPE_STRING" + }, + { + "name": "paths", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "CommitWorkspaceChanges", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.CommitWorkspaceChanges", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_ResetWorkspaceChanges_async", + "title": "Dataform resetWorkspaceChanges Sample", + "origin": "API_DEFINITION", + "description": " Performs a Git reset for uncommitted files in a Workspace.", + "canonical": true, + "file": "dataform.reset_workspace_changes.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ResetWorkspaceChanges", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.ResetWorkspaceChanges", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "paths", + "type": "TYPE_STRING[]" + }, + { + "name": "clean", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "ResetWorkspaceChanges", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.ResetWorkspaceChanges", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_FetchFileDiff_async", + "title": "Dataform fetchFileDiff Sample", + "origin": "API_DEFINITION", + "description": " Fetches Git diff for an uncommitted file in a Workspace.", + "canonical": true, + "file": "dataform.fetch_file_diff.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchFileDiff", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.FetchFileDiff", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.FetchFileDiffResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "FetchFileDiff", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.FetchFileDiff", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_QueryDirectoryContents_async", + "title": "Dataform queryDirectoryContents Sample", + "origin": "API_DEFINITION", + "description": " Returns the contents of a given Workspace directory.", + "canonical": true, + "file": "dataform.query_directory_contents.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "QueryDirectoryContents", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.QueryDirectoryContents", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "QueryDirectoryContents", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.QueryDirectoryContents", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_MakeDirectory_async", + "title": "Dataform makeDirectory Sample", + "origin": "API_DEFINITION", + "description": " Creates a directory inside a Workspace.", + "canonical": true, + "file": "dataform.make_directory.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "MakeDirectory", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.MakeDirectory", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.MakeDirectoryResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "MakeDirectory", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.MakeDirectory", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_RemoveDirectory_async", + "title": "Dataform removeDirectory Sample", + "origin": "API_DEFINITION", + "description": " Deletes a directory (inside a Workspace) and all of its contents.", + "canonical": true, + "file": "dataform.remove_directory.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RemoveDirectory", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.RemoveDirectory", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "RemoveDirectory", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.RemoveDirectory", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_MoveDirectory_async", + "title": "Dataform moveDirectory Sample", + "origin": "API_DEFINITION", + "description": " Moves a directory (inside a Workspace), and all of its contents, to a new location.", + "canonical": true, + "file": "dataform.move_directory.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "MoveDirectory", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.MoveDirectory", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + }, + { + "name": "new_path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.MoveDirectoryResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "MoveDirectory", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.MoveDirectory", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_ReadFile_async", + "title": "Dataform readFile Sample", + "origin": "API_DEFINITION", + "description": " Returns the contents of a file (inside a Workspace).", + "canonical": true, + "file": "dataform.read_file.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ReadFile", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.ReadFile", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.ReadFileResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "ReadFile", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.ReadFile", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_RemoveFile_async", + "title": "Dataform removeFile Sample", + "origin": "API_DEFINITION", + "description": " Deletes a file (inside a Workspace).", + "canonical": true, + "file": "dataform.remove_file.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RemoveFile", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.RemoveFile", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "RemoveFile", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.RemoveFile", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_MoveFile_async", + "title": "Dataform moveFile Sample", + "origin": "API_DEFINITION", + "description": " Moves a file (inside a Workspace) to a new location.", + "canonical": true, + "file": "dataform.move_file.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "MoveFile", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.MoveFile", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + }, + { + "name": "new_path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.MoveFileResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "MoveFile", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.MoveFile", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_WriteFile_async", + "title": "Dataform writeFile Sample", + "origin": "API_DEFINITION", + "description": " Writes to a file (inside a Workspace).", + "canonical": true, + "file": "dataform.write_file.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "WriteFile", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.WriteFile", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + }, + { + "name": "contents", + "type": "TYPE_BYTES" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.WriteFileResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "WriteFile", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.WriteFile", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_ListCompilationResults_async", + "title": "Dataform listCompilationResults Sample", + "origin": "API_DEFINITION", + "description": " Lists CompilationResults in a given Repository.", + "canonical": true, + "file": "dataform.list_compilation_results.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCompilationResults", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.ListCompilationResults", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.ListCompilationResultsResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "ListCompilationResults", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.ListCompilationResults", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_GetCompilationResult_async", + "title": "Dataform getCompilationResult Sample", + "origin": "API_DEFINITION", + "description": " Fetches a single CompilationResult.", + "canonical": true, + "file": "dataform.get_compilation_result.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCompilationResult", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.GetCompilationResult", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.CompilationResult", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "GetCompilationResult", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.GetCompilationResult", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_CreateCompilationResult_async", + "title": "Dataform createCompilationResult Sample", + "origin": "API_DEFINITION", + "description": " Creates a new CompilationResult in a given project and location.", + "canonical": true, + "file": "dataform.create_compilation_result.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateCompilationResult", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.CreateCompilationResult", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "compilation_result", + "type": ".google.cloud.dataform.v1alpha2.CompilationResult" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.CompilationResult", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "CreateCompilationResult", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.CreateCompilationResult", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_QueryCompilationResultActions_async", + "title": "Dataform queryCompilationResultActions Sample", + "origin": "API_DEFINITION", + "description": " Returns CompilationResultActions in a given CompilationResult.", + "canonical": true, + "file": "dataform.query_compilation_result_actions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "QueryCompilationResultActions", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.QueryCompilationResultActions", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "QueryCompilationResultActions", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.QueryCompilationResultActions", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_ListWorkflowInvocations_async", + "title": "Dataform listWorkflowInvocations Sample", + "origin": "API_DEFINITION", + "description": " Lists WorkflowInvocations in a given Repository.", + "canonical": true, + "file": "dataform.list_workflow_invocations.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListWorkflowInvocations", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.ListWorkflowInvocations", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "ListWorkflowInvocations", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.ListWorkflowInvocations", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_GetWorkflowInvocation_async", + "title": "Dataform getWorkflowInvocation Sample", + "origin": "API_DEFINITION", + "description": " Fetches a single WorkflowInvocation.", + "canonical": true, + "file": "dataform.get_workflow_invocation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetWorkflowInvocation", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.GetWorkflowInvocation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.WorkflowInvocation", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "GetWorkflowInvocation", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.GetWorkflowInvocation", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_CreateWorkflowInvocation_async", + "title": "Dataform createWorkflowInvocation Sample", + "origin": "API_DEFINITION", + "description": " Creates a new WorkflowInvocation in a given Repository.", + "canonical": true, + "file": "dataform.create_workflow_invocation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateWorkflowInvocation", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.CreateWorkflowInvocation", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "workflow_invocation", + "type": ".google.cloud.dataform.v1alpha2.WorkflowInvocation" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.WorkflowInvocation", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "CreateWorkflowInvocation", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.CreateWorkflowInvocation", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_DeleteWorkflowInvocation_async", + "title": "Dataform deleteWorkflowInvocation Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single WorkflowInvocation.", + "canonical": true, + "file": "dataform.delete_workflow_invocation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteWorkflowInvocation", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.DeleteWorkflowInvocation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "DeleteWorkflowInvocation", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.DeleteWorkflowInvocation", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_CancelWorkflowInvocation_async", + "title": "Dataform cancelWorkflowInvocation Sample", + "origin": "API_DEFINITION", + "description": " Requests cancellation of a running WorkflowInvocation.", + "canonical": true, + "file": "dataform.cancel_workflow_invocation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CancelWorkflowInvocation", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.CancelWorkflowInvocation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "CancelWorkflowInvocation", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.CancelWorkflowInvocation", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1alpha2_generated_Dataform_QueryWorkflowInvocationActions_async", + "title": "Dataform queryWorkflowInvocationActions Sample", + "origin": "API_DEFINITION", + "description": " Returns WorkflowInvocationActions in a given WorkflowInvocation.", + "canonical": true, + "file": "dataform.query_workflow_invocation_actions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "QueryWorkflowInvocationActions", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.QueryWorkflowInvocationActions", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1alpha2.DataformClient" + }, + "method": { + "shortName": "QueryWorkflowInvocationActions", + "fullName": "google.cloud.dataform.v1alpha2.Dataform.QueryWorkflowInvocationActions", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1alpha2.Dataform" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/google-cloud-dataform/samples/package.json b/packages/google-cloud-dataform/samples/package.json new file mode 100644 index 00000000000..c5023c50c1a --- /dev/null +++ b/packages/google-cloud-dataform/samples/package.json @@ -0,0 +1,23 @@ +{ + "name": "nodejs-dataform", + "private": true, + "license": "Apache-2.0", + "author": "Google LLC", + "engines": { + "node": ">=10" + }, + "files": [ + "*.js" + ], + "scripts": { + "test": "c8 mocha --timeout 600000 test/*.js" + }, + "dependencies": { + "@google-cloud/dataform": "^0.1.0" + }, + "devDependencies": { + "c8": "^7.1.0", + "chai": "^4.2.0", + "mocha": "^8.0.0" + } +} diff --git a/packages/google-cloud-dataform/samples/quickstart.js b/packages/google-cloud-dataform/samples/quickstart.js new file mode 100644 index 00000000000..a3748a38e8b --- /dev/null +++ b/packages/google-cloud-dataform/samples/quickstart.js @@ -0,0 +1,50 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +'use strict'; + +async function main() { + + // [START nodejs_dataform_quickstart] + // Imports the Google Cloud client library + + // remove this line after package is released + // eslint-disable-next-line node/no-missing-require + const {DataformClient} = require('@google-cloud/dataform'); + + // TODO(developer): replace with your prefered project ID. + // const projectId = 'my-project' + + // Creates a client + // eslint-disable-next-line no-unused-vars + const client = new {DataformClient}(); + + //TODO(library generator): write the actual function you will be testing + async function doSomething() { + console.log('DPE! Change this code so that it shows how to use the library! See comments below on structure.') + // const [thing] = await client.methodName({ + // }); + // console.info(thing); + } + doSomething(); + // [END nodejs_dataform_quickstart] +} + +main(...process.argv.slice(2)).catch(err => { + console.error(err.message); + process.exitCode = 1; +}); +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); diff --git a/packages/google-cloud-dataform/samples/test/quickstart.js b/packages/google-cloud-dataform/samples/test/quickstart.js new file mode 100644 index 00000000000..6bc50cdc0a3 --- /dev/null +++ b/packages/google-cloud-dataform/samples/test/quickstart.js @@ -0,0 +1,53 @@ +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +const path = require('path'); +const cp = require('child_process'); +const {before, describe, it} = require('mocha'); +// eslint-disable-next-line node/no-missing-require +const {DataformClient} = require('@google-cloud/dataform'); +// eslint-disable-next-line no-unused-vars, node/no-missing-require +const {assert} = require('chai'); + +const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); + +const cwd = path.join(__dirname, '..'); + +const client = new {DataformClient}(); + +describe('Quickstart', () => { + //TODO: remove this if not using the projectId + // eslint-disable-next-line no-unused-vars + let projectId; + + before(async () => { + // eslint-disable-next-line no-unused-vars + projectId = await client.getProjectId(); + }); + + it('should run quickstart', async () => { + //TODO: remove this line + // eslint-disable-next-line no-unused-vars + const stdout = execSync( + `node ./quickstart.js`, + {cwd} + ); + //assert(stdout, stdout !== null); + }); +}); diff --git a/packages/google-cloud-dataform/src/index.ts b/packages/google-cloud-dataform/src/index.ts new file mode 100644 index 00000000000..da342268449 --- /dev/null +++ b/packages/google-cloud-dataform/src/index.ts @@ -0,0 +1,27 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by synthtool. ** +// ** https://github.com/googleapis/synthtool ** +// ** All changes to this file may be overwritten. ** + +import * as v1alpha2 from './v1alpha2'; + +const DataformClient = v1alpha2.DataformClient; +type DataformClient = v1alpha2.DataformClient; + +export {v1alpha2, DataformClient}; +export default {v1alpha2, DataformClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-cloud-dataform/src/v1alpha2/dataform_client.ts b/packages/google-cloud-dataform/src/v1alpha2/dataform_client.ts new file mode 100644 index 00000000000..1168c912122 --- /dev/null +++ b/packages/google-cloud-dataform/src/v1alpha2/dataform_client.ts @@ -0,0 +1,5316 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import * as gax from 'google-gax'; +import { + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + GaxCall, + IamClient, + IamProtos, + LocationsClient, + LocationProtos, +} from 'google-gax'; + +import {Transform} from 'stream'; +import {RequestType} from 'google-gax/build/src/apitypes'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1alpha2/dataform_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './dataform_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * Dataform is a service to develop, create, document, test, and update curated + * tables in BigQuery. + * @class + * @memberof v1alpha2 + */ +export class DataformClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + dataformStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of DataformClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + */ + constructor(opts?: ClientOptions) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof DataformClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.iamClient = new IamClient(this._gaxGrpc, opts); + + this.locationsClient = new LocationsClient(this._gaxGrpc, opts); + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + compilationResultPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/compilationResults/{compilation_result}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + repositoryPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}' + ), + workflowInvocationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/workflowInvocations/{workflow_invocation}' + ), + workspacePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/workspaces/{workspace}' + ), + }; + + // 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 = { + listRepositories: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'repositories' + ), + listWorkspaces: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'workspaces' + ), + queryDirectoryContents: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'directoryEntries' + ), + listCompilationResults: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'compilationResults' + ), + queryCompilationResultActions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'compilationResultActions' + ), + listWorkflowInvocations: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'workflowInvocations' + ), + queryWorkflowInvocationActions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'workflowInvocationActions' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.dataform.v1alpha2.Dataform', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = gax.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.dataformStub) { + return this.dataformStub; + } + + // Put together the "service stub" for + // google.cloud.dataform.v1alpha2.Dataform. + this.dataformStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.dataform.v1alpha2.Dataform' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.dataform.v1alpha2.Dataform, + 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 dataformStubMethods = [ + 'listRepositories', + 'getRepository', + 'createRepository', + 'updateRepository', + 'deleteRepository', + 'fetchRemoteBranches', + 'listWorkspaces', + 'getWorkspace', + 'createWorkspace', + 'deleteWorkspace', + 'installNpmPackages', + 'pullGitCommits', + 'pushGitCommits', + 'fetchFileGitStatuses', + 'fetchGitAheadBehind', + 'commitWorkspaceChanges', + 'resetWorkspaceChanges', + 'fetchFileDiff', + 'queryDirectoryContents', + 'makeDirectory', + 'removeDirectory', + 'moveDirectory', + 'readFile', + 'removeFile', + 'moveFile', + 'writeFile', + 'listCompilationResults', + 'getCompilationResult', + 'createCompilationResult', + 'queryCompilationResultActions', + 'listWorkflowInvocations', + 'getWorkflowInvocation', + 'createWorkflowInvocation', + 'deleteWorkflowInvocation', + 'cancelWorkflowInvocation', + 'queryWorkflowInvocationActions', + ]; + for (const methodName of dataformStubMethods) { + const callPromise = this.dataformStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = this.descriptors.page[methodName] || undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.dataformStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'dataform.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'dataform.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Fetches a single Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The repository's name. + * @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 [Repository]{@link google.cloud.dataform.v1alpha2.Repository}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.get_repository.js + * region_tag:dataform_v1alpha2_generated_Dataform_GetRepository_async + */ + getRepository( + request?: protos.google.cloud.dataform.v1alpha2.IGetRepositoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IRepository, + protos.google.cloud.dataform.v1alpha2.IGetRepositoryRequest | undefined, + {} | undefined + ] + >; + getRepository( + request: protos.google.cloud.dataform.v1alpha2.IGetRepositoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IRepository, + | protos.google.cloud.dataform.v1alpha2.IGetRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getRepository( + request: protos.google.cloud.dataform.v1alpha2.IGetRepositoryRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IRepository, + | protos.google.cloud.dataform.v1alpha2.IGetRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getRepository( + request?: protos.google.cloud.dataform.v1alpha2.IGetRepositoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IRepository, + | protos.google.cloud.dataform.v1alpha2.IGetRepositoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IRepository, + | protos.google.cloud.dataform.v1alpha2.IGetRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IRepository, + protos.google.cloud.dataform.v1alpha2.IGetRepositoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getRepository(request, options, callback); + } + /** + * Creates a new Repository in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The location in which to create the repository. Must be in the format + * `projects/* /locations/*`. + * @param {google.cloud.dataform.v1alpha2.Repository} request.repository + * Required. The repository to create. + * @param {string} request.repositoryId + * Required. The ID to use for the repository, which will become the final component of + * the repository's resource name. + * @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 [Repository]{@link google.cloud.dataform.v1alpha2.Repository}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.create_repository.js + * region_tag:dataform_v1alpha2_generated_Dataform_CreateRepository_async + */ + createRepository( + request?: protos.google.cloud.dataform.v1alpha2.ICreateRepositoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IRepository, + ( + | protos.google.cloud.dataform.v1alpha2.ICreateRepositoryRequest + | undefined + ), + {} | undefined + ] + >; + createRepository( + request: protos.google.cloud.dataform.v1alpha2.ICreateRepositoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IRepository, + | protos.google.cloud.dataform.v1alpha2.ICreateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createRepository( + request: protos.google.cloud.dataform.v1alpha2.ICreateRepositoryRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IRepository, + | protos.google.cloud.dataform.v1alpha2.ICreateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createRepository( + request?: protos.google.cloud.dataform.v1alpha2.ICreateRepositoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IRepository, + | protos.google.cloud.dataform.v1alpha2.ICreateRepositoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IRepository, + | protos.google.cloud.dataform.v1alpha2.ICreateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IRepository, + ( + | protos.google.cloud.dataform.v1alpha2.ICreateRepositoryRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createRepository(request, options, callback); + } + /** + * Updates a single Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. Specifies the fields to be updated in the repository. If left unset, + * all fields will be updated. + * @param {google.cloud.dataform.v1alpha2.Repository} request.repository + * Required. The repository to update. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Repository]{@link google.cloud.dataform.v1alpha2.Repository}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.update_repository.js + * region_tag:dataform_v1alpha2_generated_Dataform_UpdateRepository_async + */ + updateRepository( + request?: protos.google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IRepository, + ( + | protos.google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest + | undefined + ), + {} | undefined + ] + >; + updateRepository( + request: protos.google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IRepository, + | protos.google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateRepository( + request: protos.google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IRepository, + | protos.google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateRepository( + request?: protos.google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IRepository, + | protos.google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IRepository, + | protos.google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IRepository, + ( + | protos.google.cloud.dataform.v1alpha2.IUpdateRepositoryRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'repository.name': request.repository!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateRepository(request, options, callback); + } + /** + * Deletes a single Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The repository's name. + * @param {boolean} request.force + * If set to true, any child resources of this repository will also be + * deleted. (Otherwise, the request will only succeed if the repository has no + * child resources.) + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.delete_repository.js + * region_tag:dataform_v1alpha2_generated_Dataform_DeleteRepository_async + */ + deleteRepository( + request?: protos.google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest + | undefined + ), + {} | undefined + ] + >; + deleteRepository( + request: protos.google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteRepository( + request: protos.google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteRepository( + request?: protos.google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1alpha2.IDeleteRepositoryRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteRepository(request, options, callback); + } + /** + * Fetches a Repository's remote branches. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The repository's name. + * @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 [FetchRemoteBranchesResponse]{@link google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.fetch_remote_branches.js + * region_tag:dataform_v1alpha2_generated_Dataform_FetchRemoteBranches_async + */ + fetchRemoteBranches( + request?: protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse, + ( + | protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest + | undefined + ), + {} | undefined + ] + >; + fetchRemoteBranches( + request: protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchRemoteBranches( + request: protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchRemoteBranches( + request?: protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse, + ( + | protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.fetchRemoteBranches(request, options, callback); + } + /** + * Fetches a single Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @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 [Workspace]{@link google.cloud.dataform.v1alpha2.Workspace}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.get_workspace.js + * region_tag:dataform_v1alpha2_generated_Dataform_GetWorkspace_async + */ + getWorkspace( + request?: protos.google.cloud.dataform.v1alpha2.IGetWorkspaceRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWorkspace, + protos.google.cloud.dataform.v1alpha2.IGetWorkspaceRequest | undefined, + {} | undefined + ] + >; + getWorkspace( + request: protos.google.cloud.dataform.v1alpha2.IGetWorkspaceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IWorkspace, + | protos.google.cloud.dataform.v1alpha2.IGetWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getWorkspace( + request: protos.google.cloud.dataform.v1alpha2.IGetWorkspaceRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IWorkspace, + | protos.google.cloud.dataform.v1alpha2.IGetWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getWorkspace( + request?: protos.google.cloud.dataform.v1alpha2.IGetWorkspaceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IWorkspace, + | protos.google.cloud.dataform.v1alpha2.IGetWorkspaceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IWorkspace, + | protos.google.cloud.dataform.v1alpha2.IGetWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWorkspace, + protos.google.cloud.dataform.v1alpha2.IGetWorkspaceRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getWorkspace(request, options, callback); + } + /** + * Creates a new Workspace in a given Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to create the workspace. Must be in the format + * `projects/* /locations/* /repositories/*`. + * @param {google.cloud.dataform.v1alpha2.Workspace} request.workspace + * Required. The workspace to create. + * @param {string} request.workspaceId + * Required. The ID to use for the workspace, which will become the final component of + * the workspace's resource name. + * @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 [Workspace]{@link google.cloud.dataform.v1alpha2.Workspace}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.create_workspace.js + * region_tag:dataform_v1alpha2_generated_Dataform_CreateWorkspace_async + */ + createWorkspace( + request?: protos.google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWorkspace, + protos.google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest | undefined, + {} | undefined + ] + >; + createWorkspace( + request: protos.google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IWorkspace, + | protos.google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createWorkspace( + request: protos.google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IWorkspace, + | protos.google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createWorkspace( + request?: protos.google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IWorkspace, + | protos.google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IWorkspace, + | protos.google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWorkspace, + protos.google.cloud.dataform.v1alpha2.ICreateWorkspaceRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createWorkspace(request, options, callback); + } + /** + * Deletes a single Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace resource's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.delete_workspace.js + * region_tag:dataform_v1alpha2_generated_Dataform_DeleteWorkspace_async + */ + deleteWorkspace( + request?: protos.google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest | undefined, + {} | undefined + ] + >; + deleteWorkspace( + request: protos.google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteWorkspace( + request: protos.google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteWorkspace( + request?: protos.google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1alpha2.IDeleteWorkspaceRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteWorkspace(request, options, callback); + } + /** + * Installs dependency NPM packages (inside a Workspace). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @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 [InstallNpmPackagesResponse]{@link google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.install_npm_packages.js + * region_tag:dataform_v1alpha2_generated_Dataform_InstallNpmPackages_async + */ + installNpmPackages( + request?: protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse, + ( + | protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest + | undefined + ), + {} | undefined + ] + >; + installNpmPackages( + request: protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse, + | protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + installNpmPackages( + request: protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse, + | protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + installNpmPackages( + request?: protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse, + | protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse, + | protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse, + ( + | protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.installNpmPackages(request, options, callback); + } + /** + * Pulls Git commits from the Repository's remote into a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {string} [request.remoteBranch] + * Optional. The name of the branch in the Git remote from which to pull commits. + * If left unset, the repository's default branch name will be used. + * @param {google.cloud.dataform.v1alpha2.CommitAuthor} request.author + * Required. The author of any merge commit which may be created as a result of merging + * fetched Git commits into this workspace. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.pull_git_commits.js + * region_tag:dataform_v1alpha2_generated_Dataform_PullGitCommits_async + */ + pullGitCommits( + request?: protos.google.cloud.dataform.v1alpha2.IPullGitCommitsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1alpha2.IPullGitCommitsRequest | undefined, + {} | undefined + ] + >; + pullGitCommits( + request: protos.google.cloud.dataform.v1alpha2.IPullGitCommitsRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IPullGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + pullGitCommits( + request: protos.google.cloud.dataform.v1alpha2.IPullGitCommitsRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IPullGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + pullGitCommits( + request?: protos.google.cloud.dataform.v1alpha2.IPullGitCommitsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IPullGitCommitsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IPullGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1alpha2.IPullGitCommitsRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.pullGitCommits(request, options, callback); + } + /** + * Pushes Git commits from a Workspace to the Repository's remote. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {string} [request.remoteBranch] + * Optional. The name of the branch in the Git remote to which commits should be pushed. + * If left unset, the repository's default branch name will be used. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.push_git_commits.js + * region_tag:dataform_v1alpha2_generated_Dataform_PushGitCommits_async + */ + pushGitCommits( + request?: protos.google.cloud.dataform.v1alpha2.IPushGitCommitsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1alpha2.IPushGitCommitsRequest | undefined, + {} | undefined + ] + >; + pushGitCommits( + request: protos.google.cloud.dataform.v1alpha2.IPushGitCommitsRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IPushGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + pushGitCommits( + request: protos.google.cloud.dataform.v1alpha2.IPushGitCommitsRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IPushGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + pushGitCommits( + request?: protos.google.cloud.dataform.v1alpha2.IPushGitCommitsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IPushGitCommitsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IPushGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1alpha2.IPushGitCommitsRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.pushGitCommits(request, options, callback); + } + /** + * Fetches Git statuses for the files in a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @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 [FetchFileGitStatusesResponse]{@link google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.fetch_file_git_statuses.js + * region_tag:dataform_v1alpha2_generated_Dataform_FetchFileGitStatuses_async + */ + fetchFileGitStatuses( + request?: protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse, + ( + | protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest + | undefined + ), + {} | undefined + ] + >; + fetchFileGitStatuses( + request: protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchFileGitStatuses( + request: protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchFileGitStatuses( + request?: protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse, + ( + | protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.fetchFileGitStatuses(request, options, callback); + } + /** + * Fetches Git ahead/behind against a remote branch. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {string} [request.remoteBranch] + * Optional. The name of the branch in the Git remote against which this workspace + * should be compared. If left unset, the repository's default branch name + * will be used. + * @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 [FetchGitAheadBehindResponse]{@link google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.fetch_git_ahead_behind.js + * region_tag:dataform_v1alpha2_generated_Dataform_FetchGitAheadBehind_async + */ + fetchGitAheadBehind( + request?: protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse, + ( + | protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest + | undefined + ), + {} | undefined + ] + >; + fetchGitAheadBehind( + request: protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchGitAheadBehind( + request: protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchGitAheadBehind( + request?: protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse, + ( + | protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.fetchGitAheadBehind(request, options, callback); + } + /** + * Applies a Git commit for uncommitted files in a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {google.cloud.dataform.v1alpha2.CommitAuthor} request.author + * Required. The commit's author. + * @param {string} [request.commitMessage] + * Optional. The commit's message. + * @param {string[]} [request.paths] + * Optional. Full file paths to commit including filename, rooted at workspace root. If + * left empty, all files will be committed. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.commit_workspace_changes.js + * region_tag:dataform_v1alpha2_generated_Dataform_CommitWorkspaceChanges_async + */ + commitWorkspaceChanges( + request?: protos.google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest + | undefined + ), + {} | undefined + ] + >; + commitWorkspaceChanges( + request: protos.google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + commitWorkspaceChanges( + request: protos.google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + commitWorkspaceChanges( + request?: protos.google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1alpha2.ICommitWorkspaceChangesRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.commitWorkspaceChanges( + request, + options, + callback + ); + } + /** + * Performs a Git reset for uncommitted files in a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {string[]} [request.paths] + * Optional. Full file paths to reset back to their committed state including filename, + * rooted at workspace root. If left empty, all files will be reset. + * @param {boolean} [request.clean] + * Optional. If set to true, untracked files will be deleted. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.reset_workspace_changes.js + * region_tag:dataform_v1alpha2_generated_Dataform_ResetWorkspaceChanges_async + */ + resetWorkspaceChanges( + request?: protos.google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest + | undefined + ), + {} | undefined + ] + >; + resetWorkspaceChanges( + request: protos.google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + resetWorkspaceChanges( + request: protos.google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + resetWorkspaceChanges( + request?: protos.google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1alpha2.IResetWorkspaceChangesRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.resetWorkspaceChanges(request, options, callback); + } + /** + * Fetches Git diff for an uncommitted file in a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The file's full path including filename, relative to the workspace root. + * @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 [FetchFileDiffResponse]{@link google.cloud.dataform.v1alpha2.FetchFileDiffResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.fetch_file_diff.js + * region_tag:dataform_v1alpha2_generated_Dataform_FetchFileDiff_async + */ + fetchFileDiff( + request?: protos.google.cloud.dataform.v1alpha2.IFetchFileDiffRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IFetchFileDiffResponse, + protos.google.cloud.dataform.v1alpha2.IFetchFileDiffRequest | undefined, + {} | undefined + ] + >; + fetchFileDiff( + request: protos.google.cloud.dataform.v1alpha2.IFetchFileDiffRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IFetchFileDiffResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchFileDiffRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchFileDiff( + request: protos.google.cloud.dataform.v1alpha2.IFetchFileDiffRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IFetchFileDiffResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchFileDiffRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchFileDiff( + request?: protos.google.cloud.dataform.v1alpha2.IFetchFileDiffRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IFetchFileDiffResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchFileDiffRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IFetchFileDiffResponse, + | protos.google.cloud.dataform.v1alpha2.IFetchFileDiffRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IFetchFileDiffResponse, + protos.google.cloud.dataform.v1alpha2.IFetchFileDiffRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.fetchFileDiff(request, options, callback); + } + /** + * Creates a directory inside a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The directory's full path including directory name, relative to the + * workspace root. + * @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 [MakeDirectoryResponse]{@link google.cloud.dataform.v1alpha2.MakeDirectoryResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.make_directory.js + * region_tag:dataform_v1alpha2_generated_Dataform_MakeDirectory_async + */ + makeDirectory( + request?: protos.google.cloud.dataform.v1alpha2.IMakeDirectoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IMakeDirectoryResponse, + protos.google.cloud.dataform.v1alpha2.IMakeDirectoryRequest | undefined, + {} | undefined + ] + >; + makeDirectory( + request: protos.google.cloud.dataform.v1alpha2.IMakeDirectoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IMakeDirectoryResponse, + | protos.google.cloud.dataform.v1alpha2.IMakeDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + makeDirectory( + request: protos.google.cloud.dataform.v1alpha2.IMakeDirectoryRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IMakeDirectoryResponse, + | protos.google.cloud.dataform.v1alpha2.IMakeDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + makeDirectory( + request?: protos.google.cloud.dataform.v1alpha2.IMakeDirectoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IMakeDirectoryResponse, + | protos.google.cloud.dataform.v1alpha2.IMakeDirectoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IMakeDirectoryResponse, + | protos.google.cloud.dataform.v1alpha2.IMakeDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IMakeDirectoryResponse, + protos.google.cloud.dataform.v1alpha2.IMakeDirectoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.makeDirectory(request, options, callback); + } + /** + * Deletes a directory (inside a Workspace) and all of its contents. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The directory's full path including directory name, relative to the + * workspace root. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.remove_directory.js + * region_tag:dataform_v1alpha2_generated_Dataform_RemoveDirectory_async + */ + removeDirectory( + request?: protos.google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest | undefined, + {} | undefined + ] + >; + removeDirectory( + request: protos.google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + removeDirectory( + request: protos.google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + removeDirectory( + request?: protos.google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1alpha2.IRemoveDirectoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.removeDirectory(request, options, callback); + } + /** + * Moves a directory (inside a Workspace), and all of its contents, to a new + * location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The directory's full path including directory name, relative to the + * workspace root. + * @param {string} request.newPath + * Required. The new path for the directory including directory name, rooted at + * workspace root. + * @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 [MoveDirectoryResponse]{@link google.cloud.dataform.v1alpha2.MoveDirectoryResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.move_directory.js + * region_tag:dataform_v1alpha2_generated_Dataform_MoveDirectory_async + */ + moveDirectory( + request?: protos.google.cloud.dataform.v1alpha2.IMoveDirectoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IMoveDirectoryResponse, + protos.google.cloud.dataform.v1alpha2.IMoveDirectoryRequest | undefined, + {} | undefined + ] + >; + moveDirectory( + request: protos.google.cloud.dataform.v1alpha2.IMoveDirectoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IMoveDirectoryResponse, + | protos.google.cloud.dataform.v1alpha2.IMoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + moveDirectory( + request: protos.google.cloud.dataform.v1alpha2.IMoveDirectoryRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IMoveDirectoryResponse, + | protos.google.cloud.dataform.v1alpha2.IMoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + moveDirectory( + request?: protos.google.cloud.dataform.v1alpha2.IMoveDirectoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IMoveDirectoryResponse, + | protos.google.cloud.dataform.v1alpha2.IMoveDirectoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IMoveDirectoryResponse, + | protos.google.cloud.dataform.v1alpha2.IMoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IMoveDirectoryResponse, + protos.google.cloud.dataform.v1alpha2.IMoveDirectoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.moveDirectory(request, options, callback); + } + /** + * Returns the contents of a file (inside a Workspace). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The file's full path including filename, relative to the workspace root. + * @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 [ReadFileResponse]{@link google.cloud.dataform.v1alpha2.ReadFileResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.read_file.js + * region_tag:dataform_v1alpha2_generated_Dataform_ReadFile_async + */ + readFile( + request?: protos.google.cloud.dataform.v1alpha2.IReadFileRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IReadFileResponse, + protos.google.cloud.dataform.v1alpha2.IReadFileRequest | undefined, + {} | undefined + ] + >; + readFile( + request: protos.google.cloud.dataform.v1alpha2.IReadFileRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IReadFileResponse, + protos.google.cloud.dataform.v1alpha2.IReadFileRequest | null | undefined, + {} | null | undefined + > + ): void; + readFile( + request: protos.google.cloud.dataform.v1alpha2.IReadFileRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IReadFileResponse, + protos.google.cloud.dataform.v1alpha2.IReadFileRequest | null | undefined, + {} | null | undefined + > + ): void; + readFile( + request?: protos.google.cloud.dataform.v1alpha2.IReadFileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IReadFileResponse, + | protos.google.cloud.dataform.v1alpha2.IReadFileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IReadFileResponse, + protos.google.cloud.dataform.v1alpha2.IReadFileRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IReadFileResponse, + protos.google.cloud.dataform.v1alpha2.IReadFileRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.readFile(request, options, callback); + } + /** + * Deletes a file (inside a Workspace). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The file's full path including filename, relative to the workspace root. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.remove_file.js + * region_tag:dataform_v1alpha2_generated_Dataform_RemoveFile_async + */ + removeFile( + request?: protos.google.cloud.dataform.v1alpha2.IRemoveFileRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1alpha2.IRemoveFileRequest | undefined, + {} | undefined + ] + >; + removeFile( + request: protos.google.cloud.dataform.v1alpha2.IRemoveFileRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IRemoveFileRequest + | null + | undefined, + {} | null | undefined + > + ): void; + removeFile( + request: protos.google.cloud.dataform.v1alpha2.IRemoveFileRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IRemoveFileRequest + | null + | undefined, + {} | null | undefined + > + ): void; + removeFile( + request?: protos.google.cloud.dataform.v1alpha2.IRemoveFileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IRemoveFileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IRemoveFileRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1alpha2.IRemoveFileRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.removeFile(request, options, callback); + } + /** + * Moves a file (inside a Workspace) to a new location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The file's full path including filename, relative to the workspace root. + * @param {string} request.newPath + * Required. The file's new path including filename, relative to the workspace root. + * @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 [MoveFileResponse]{@link google.cloud.dataform.v1alpha2.MoveFileResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.move_file.js + * region_tag:dataform_v1alpha2_generated_Dataform_MoveFile_async + */ + moveFile( + request?: protos.google.cloud.dataform.v1alpha2.IMoveFileRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IMoveFileResponse, + protos.google.cloud.dataform.v1alpha2.IMoveFileRequest | undefined, + {} | undefined + ] + >; + moveFile( + request: protos.google.cloud.dataform.v1alpha2.IMoveFileRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IMoveFileResponse, + protos.google.cloud.dataform.v1alpha2.IMoveFileRequest | null | undefined, + {} | null | undefined + > + ): void; + moveFile( + request: protos.google.cloud.dataform.v1alpha2.IMoveFileRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IMoveFileResponse, + protos.google.cloud.dataform.v1alpha2.IMoveFileRequest | null | undefined, + {} | null | undefined + > + ): void; + moveFile( + request?: protos.google.cloud.dataform.v1alpha2.IMoveFileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IMoveFileResponse, + | protos.google.cloud.dataform.v1alpha2.IMoveFileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IMoveFileResponse, + protos.google.cloud.dataform.v1alpha2.IMoveFileRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IMoveFileResponse, + protos.google.cloud.dataform.v1alpha2.IMoveFileRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.moveFile(request, options, callback); + } + /** + * Writes to a file (inside a Workspace). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The file. + * @param {Buffer} request.contents + * Required. The file's contents. + * @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 [WriteFileResponse]{@link google.cloud.dataform.v1alpha2.WriteFileResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.write_file.js + * region_tag:dataform_v1alpha2_generated_Dataform_WriteFile_async + */ + writeFile( + request?: protos.google.cloud.dataform.v1alpha2.IWriteFileRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWriteFileResponse, + protos.google.cloud.dataform.v1alpha2.IWriteFileRequest | undefined, + {} | undefined + ] + >; + writeFile( + request: protos.google.cloud.dataform.v1alpha2.IWriteFileRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IWriteFileResponse, + | protos.google.cloud.dataform.v1alpha2.IWriteFileRequest + | null + | undefined, + {} | null | undefined + > + ): void; + writeFile( + request: protos.google.cloud.dataform.v1alpha2.IWriteFileRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IWriteFileResponse, + | protos.google.cloud.dataform.v1alpha2.IWriteFileRequest + | null + | undefined, + {} | null | undefined + > + ): void; + writeFile( + request?: protos.google.cloud.dataform.v1alpha2.IWriteFileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IWriteFileResponse, + | protos.google.cloud.dataform.v1alpha2.IWriteFileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IWriteFileResponse, + | protos.google.cloud.dataform.v1alpha2.IWriteFileRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWriteFileResponse, + protos.google.cloud.dataform.v1alpha2.IWriteFileRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.writeFile(request, options, callback); + } + /** + * Fetches a single CompilationResult. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The compilation result's name. + * @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 [CompilationResult]{@link google.cloud.dataform.v1alpha2.CompilationResult}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.get_compilation_result.js + * region_tag:dataform_v1alpha2_generated_Dataform_GetCompilationResult_async + */ + getCompilationResult( + request?: protos.google.cloud.dataform.v1alpha2.IGetCompilationResultRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.ICompilationResult, + ( + | protos.google.cloud.dataform.v1alpha2.IGetCompilationResultRequest + | undefined + ), + {} | undefined + ] + >; + getCompilationResult( + request: protos.google.cloud.dataform.v1alpha2.IGetCompilationResultRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.ICompilationResult, + | protos.google.cloud.dataform.v1alpha2.IGetCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getCompilationResult( + request: protos.google.cloud.dataform.v1alpha2.IGetCompilationResultRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.ICompilationResult, + | protos.google.cloud.dataform.v1alpha2.IGetCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getCompilationResult( + request?: protos.google.cloud.dataform.v1alpha2.IGetCompilationResultRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.ICompilationResult, + | protos.google.cloud.dataform.v1alpha2.IGetCompilationResultRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.ICompilationResult, + | protos.google.cloud.dataform.v1alpha2.IGetCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.ICompilationResult, + ( + | protos.google.cloud.dataform.v1alpha2.IGetCompilationResultRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getCompilationResult(request, options, callback); + } + /** + * Creates a new CompilationResult in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to create the compilation result. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {google.cloud.dataform.v1alpha2.CompilationResult} request.compilationResult + * Required. The compilation result to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [CompilationResult]{@link google.cloud.dataform.v1alpha2.CompilationResult}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.create_compilation_result.js + * region_tag:dataform_v1alpha2_generated_Dataform_CreateCompilationResult_async + */ + createCompilationResult( + request?: protos.google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.ICompilationResult, + ( + | protos.google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest + | undefined + ), + {} | undefined + ] + >; + createCompilationResult( + request: protos.google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.ICompilationResult, + | protos.google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createCompilationResult( + request: protos.google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.ICompilationResult, + | protos.google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createCompilationResult( + request?: protos.google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.ICompilationResult, + | protos.google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.ICompilationResult, + | protos.google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.ICompilationResult, + ( + | protos.google.cloud.dataform.v1alpha2.ICreateCompilationResultRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createCompilationResult( + request, + options, + callback + ); + } + /** + * Fetches a single WorkflowInvocation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation resource's name. + * @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 [WorkflowInvocation]{@link google.cloud.dataform.v1alpha2.WorkflowInvocation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.get_workflow_invocation.js + * region_tag:dataform_v1alpha2_generated_Dataform_GetWorkflowInvocation_async + */ + getWorkflowInvocation( + request?: protos.google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation, + ( + | protos.google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + >; + getWorkflowInvocation( + request: protos.google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation, + | protos.google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getWorkflowInvocation( + request: protos.google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation, + | protos.google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getWorkflowInvocation( + request?: protos.google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation, + | protos.google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation, + | protos.google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation, + ( + | protos.google.cloud.dataform.v1alpha2.IGetWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getWorkflowInvocation(request, options, callback); + } + /** + * Creates a new WorkflowInvocation in a given Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the WorkflowInvocation type. + * @param {google.cloud.dataform.v1alpha2.WorkflowInvocation} request.workflowInvocation + * Required. The workflow invocation resource to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [WorkflowInvocation]{@link google.cloud.dataform.v1alpha2.WorkflowInvocation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.create_workflow_invocation.js + * region_tag:dataform_v1alpha2_generated_Dataform_CreateWorkflowInvocation_async + */ + createWorkflowInvocation( + request?: protos.google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation, + ( + | protos.google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + >; + createWorkflowInvocation( + request: protos.google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation, + | protos.google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createWorkflowInvocation( + request: protos.google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest, + callback: Callback< + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation, + | protos.google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createWorkflowInvocation( + request?: protos.google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation, + | protos.google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation, + | protos.google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation, + ( + | protos.google.cloud.dataform.v1alpha2.ICreateWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createWorkflowInvocation( + request, + options, + callback + ); + } + /** + * Deletes a single WorkflowInvocation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation resource's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.delete_workflow_invocation.js + * region_tag:dataform_v1alpha2_generated_Dataform_DeleteWorkflowInvocation_async + */ + deleteWorkflowInvocation( + request?: protos.google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + >; + deleteWorkflowInvocation( + request: protos.google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteWorkflowInvocation( + request: protos.google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteWorkflowInvocation( + request?: protos.google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1alpha2.IDeleteWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteWorkflowInvocation( + request, + options, + callback + ); + } + /** + * Requests cancellation of a running WorkflowInvocation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation resource's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.cancel_workflow_invocation.js + * region_tag:dataform_v1alpha2_generated_Dataform_CancelWorkflowInvocation_async + */ + cancelWorkflowInvocation( + request?: protos.google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + >; + cancelWorkflowInvocation( + request: protos.google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + cancelWorkflowInvocation( + request: protos.google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + cancelWorkflowInvocation( + request?: protos.google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1alpha2.ICancelWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.cancelWorkflowInvocation( + request, + options, + callback + ); + } + + /** + * Lists Repositories in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The location in which to list repositories. Must be in the format + * `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of repositories to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListRepositories` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListRepositories` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Repository]{@link google.cloud.dataform.v1alpha2.Repository}. + * 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 `listRepositoriesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listRepositories( + request?: protos.google.cloud.dataform.v1alpha2.IListRepositoriesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IRepository[], + protos.google.cloud.dataform.v1alpha2.IListRepositoriesRequest | null, + protos.google.cloud.dataform.v1alpha2.IListRepositoriesResponse + ] + >; + listRepositories( + request: protos.google.cloud.dataform.v1alpha2.IListRepositoriesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListRepositoriesRequest, + | protos.google.cloud.dataform.v1alpha2.IListRepositoriesResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IRepository + > + ): void; + listRepositories( + request: protos.google.cloud.dataform.v1alpha2.IListRepositoriesRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListRepositoriesRequest, + | protos.google.cloud.dataform.v1alpha2.IListRepositoriesResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IRepository + > + ): void; + listRepositories( + request?: protos.google.cloud.dataform.v1alpha2.IListRepositoriesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListRepositoriesRequest, + | protos.google.cloud.dataform.v1alpha2.IListRepositoriesResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IRepository + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListRepositoriesRequest, + | protos.google.cloud.dataform.v1alpha2.IListRepositoriesResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IRepository + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IRepository[], + protos.google.cloud.dataform.v1alpha2.IListRepositoriesRequest | null, + protos.google.cloud.dataform.v1alpha2.IListRepositoriesResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listRepositories(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The location in which to list repositories. Must be in the format + * `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of repositories to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListRepositories` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListRepositories` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Repository]{@link google.cloud.dataform.v1alpha2.Repository} 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 `listRepositoriesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listRepositoriesStream( + request?: protos.google.cloud.dataform.v1alpha2.IListRepositoriesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listRepositories']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listRepositories.createStream( + this.innerApiCalls.listRepositories as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listRepositories`, 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 location in which to list repositories. Must be in the format + * `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of repositories to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListRepositories` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListRepositories` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Repository]{@link google.cloud.dataform.v1alpha2.Repository}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.list_repositories.js + * region_tag:dataform_v1alpha2_generated_Dataform_ListRepositories_async + */ + listRepositoriesAsync( + request?: protos.google.cloud.dataform.v1alpha2.IListRepositoriesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listRepositories']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listRepositories.asyncIterate( + this.innerApiCalls['listRepositories'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Lists Workspaces in a given Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to list workspaces. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workspaces to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkspaces` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkspaces` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Workspace]{@link google.cloud.dataform.v1alpha2.Workspace}. + * 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 `listWorkspacesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listWorkspaces( + request?: protos.google.cloud.dataform.v1alpha2.IListWorkspacesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWorkspace[], + protos.google.cloud.dataform.v1alpha2.IListWorkspacesRequest | null, + protos.google.cloud.dataform.v1alpha2.IListWorkspacesResponse + ] + >; + listWorkspaces( + request: protos.google.cloud.dataform.v1alpha2.IListWorkspacesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListWorkspacesRequest, + | protos.google.cloud.dataform.v1alpha2.IListWorkspacesResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IWorkspace + > + ): void; + listWorkspaces( + request: protos.google.cloud.dataform.v1alpha2.IListWorkspacesRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListWorkspacesRequest, + | protos.google.cloud.dataform.v1alpha2.IListWorkspacesResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IWorkspace + > + ): void; + listWorkspaces( + request?: protos.google.cloud.dataform.v1alpha2.IListWorkspacesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListWorkspacesRequest, + | protos.google.cloud.dataform.v1alpha2.IListWorkspacesResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IWorkspace + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListWorkspacesRequest, + | protos.google.cloud.dataform.v1alpha2.IListWorkspacesResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IWorkspace + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWorkspace[], + protos.google.cloud.dataform.v1alpha2.IListWorkspacesRequest | null, + protos.google.cloud.dataform.v1alpha2.IListWorkspacesResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listWorkspaces(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to list workspaces. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workspaces to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkspaces` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkspaces` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Workspace]{@link google.cloud.dataform.v1alpha2.Workspace} 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 `listWorkspacesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listWorkspacesStream( + request?: protos.google.cloud.dataform.v1alpha2.IListWorkspacesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listWorkspaces']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listWorkspaces.createStream( + this.innerApiCalls.listWorkspaces as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listWorkspaces`, 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 repository in which to list workspaces. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workspaces to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkspaces` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkspaces` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Workspace]{@link google.cloud.dataform.v1alpha2.Workspace}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.list_workspaces.js + * region_tag:dataform_v1alpha2_generated_Dataform_ListWorkspaces_async + */ + listWorkspacesAsync( + request?: protos.google.cloud.dataform.v1alpha2.IListWorkspacesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listWorkspaces']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listWorkspaces.asyncIterate( + this.innerApiCalls['listWorkspaces'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Returns the contents of a given Workspace directory. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} [request.path] + * Optional. The directory's full path including directory name, relative to the + * workspace root. If left unset, the workspace root is used. + * @param {number} [request.pageSize] + * Optional. Maximum number of paths to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryDirectoryContents` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryDirectoryContents` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [DirectoryEntry]{@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry}. + * 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 `queryDirectoryContentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryDirectoryContents( + request?: protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry[], + protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest | null, + protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsResponse + ] + >; + queryDirectoryContents( + request: protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest, + | protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry + > + ): void; + queryDirectoryContents( + request: protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest, + | protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry + > + ): void; + queryDirectoryContents( + request?: protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest, + | protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest, + | protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry[], + protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest | null, + protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.queryDirectoryContents( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} [request.path] + * Optional. The directory's full path including directory name, relative to the + * workspace root. If left unset, the workspace root is used. + * @param {number} [request.pageSize] + * Optional. Maximum number of paths to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryDirectoryContents` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryDirectoryContents` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [DirectoryEntry]{@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry} 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 `queryDirectoryContentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryDirectoryContentsStream( + request?: protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + const defaultCallSettings = this._defaults['queryDirectoryContents']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryDirectoryContents.createStream( + this.innerApiCalls.queryDirectoryContents as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `queryDirectoryContents`, 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.workspace + * Required. The workspace's name. + * @param {string} [request.path] + * Optional. The directory's full path including directory name, relative to the + * workspace root. If left unset, the workspace root is used. + * @param {number} [request.pageSize] + * Optional. Maximum number of paths to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryDirectoryContents` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryDirectoryContents` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [DirectoryEntry]{@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.query_directory_contents.js + * region_tag:dataform_v1alpha2_generated_Dataform_QueryDirectoryContents_async + */ + queryDirectoryContentsAsync( + request?: protos.google.cloud.dataform.v1alpha2.IQueryDirectoryContentsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + const defaultCallSettings = this._defaults['queryDirectoryContents']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryDirectoryContents.asyncIterate( + this.innerApiCalls['queryDirectoryContents'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Lists CompilationResults in a given Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to list compilation results. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListCompilationResults` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCompilationResults` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [CompilationResult]{@link google.cloud.dataform.v1alpha2.CompilationResult}. + * 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 `listCompilationResultsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listCompilationResults( + request?: protos.google.cloud.dataform.v1alpha2.IListCompilationResultsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.ICompilationResult[], + protos.google.cloud.dataform.v1alpha2.IListCompilationResultsRequest | null, + protos.google.cloud.dataform.v1alpha2.IListCompilationResultsResponse + ] + >; + listCompilationResults( + request: protos.google.cloud.dataform.v1alpha2.IListCompilationResultsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListCompilationResultsRequest, + | protos.google.cloud.dataform.v1alpha2.IListCompilationResultsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.ICompilationResult + > + ): void; + listCompilationResults( + request: protos.google.cloud.dataform.v1alpha2.IListCompilationResultsRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListCompilationResultsRequest, + | protos.google.cloud.dataform.v1alpha2.IListCompilationResultsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.ICompilationResult + > + ): void; + listCompilationResults( + request?: protos.google.cloud.dataform.v1alpha2.IListCompilationResultsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListCompilationResultsRequest, + | protos.google.cloud.dataform.v1alpha2.IListCompilationResultsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.ICompilationResult + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListCompilationResultsRequest, + | protos.google.cloud.dataform.v1alpha2.IListCompilationResultsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.ICompilationResult + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.ICompilationResult[], + protos.google.cloud.dataform.v1alpha2.IListCompilationResultsRequest | null, + protos.google.cloud.dataform.v1alpha2.IListCompilationResultsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listCompilationResults( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to list compilation results. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListCompilationResults` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCompilationResults` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [CompilationResult]{@link google.cloud.dataform.v1alpha2.CompilationResult} 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 `listCompilationResultsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listCompilationResultsStream( + request?: protos.google.cloud.dataform.v1alpha2.IListCompilationResultsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listCompilationResults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listCompilationResults.createStream( + this.innerApiCalls.listCompilationResults as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listCompilationResults`, 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 repository in which to list compilation results. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListCompilationResults` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCompilationResults` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [CompilationResult]{@link google.cloud.dataform.v1alpha2.CompilationResult}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.list_compilation_results.js + * region_tag:dataform_v1alpha2_generated_Dataform_ListCompilationResults_async + */ + listCompilationResultsAsync( + request?: protos.google.cloud.dataform.v1alpha2.IListCompilationResultsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listCompilationResults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listCompilationResults.asyncIterate( + this.innerApiCalls['listCompilationResults'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Returns CompilationResultActions in a given CompilationResult. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The compilation result's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryCompilationResultActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryCompilationResultActions` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Optional filter for the returned list. Filtering is only currently + * supported on the `file_path` field. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [CompilationResultAction]{@link google.cloud.dataform.v1alpha2.CompilationResultAction}. + * 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 `queryCompilationResultActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryCompilationResultActions( + request?: protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.ICompilationResultAction[], + protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest | null, + protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsResponse + ] + >; + queryCompilationResultActions( + request: protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest, + | protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.ICompilationResultAction + > + ): void; + queryCompilationResultActions( + request: protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest, + | protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.ICompilationResultAction + > + ): void; + queryCompilationResultActions( + request?: protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest, + | protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.ICompilationResultAction + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest, + | protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.ICompilationResultAction + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.ICompilationResultAction[], + protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest | null, + protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.queryCompilationResultActions( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The compilation result's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryCompilationResultActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryCompilationResultActions` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Optional filter for the returned list. Filtering is only currently + * supported on the `file_path` field. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [CompilationResultAction]{@link google.cloud.dataform.v1alpha2.CompilationResultAction} 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 `queryCompilationResultActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryCompilationResultActionsStream( + request?: protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + const defaultCallSettings = this._defaults['queryCompilationResultActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryCompilationResultActions.createStream( + this.innerApiCalls.queryCompilationResultActions as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `queryCompilationResultActions`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The compilation result's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryCompilationResultActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryCompilationResultActions` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Optional filter for the returned list. Filtering is only currently + * supported on the `file_path` field. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [CompilationResultAction]{@link google.cloud.dataform.v1alpha2.CompilationResultAction}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.query_compilation_result_actions.js + * region_tag:dataform_v1alpha2_generated_Dataform_QueryCompilationResultActions_async + */ + queryCompilationResultActionsAsync( + request?: protos.google.cloud.dataform.v1alpha2.IQueryCompilationResultActionsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + const defaultCallSettings = this._defaults['queryCompilationResultActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryCompilationResultActions.asyncIterate( + this.innerApiCalls['queryCompilationResultActions'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Lists WorkflowInvocations in a given Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the WorkflowInvocation type. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkflowInvocations` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkflowInvocations` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [WorkflowInvocation]{@link google.cloud.dataform.v1alpha2.WorkflowInvocation}. + * 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 `listWorkflowInvocationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listWorkflowInvocations( + request?: protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation[], + protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest | null, + protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsResponse + ] + >; + listWorkflowInvocations( + request: protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest, + | protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation + > + ): void; + listWorkflowInvocations( + request: protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest, + | protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation + > + ): void; + listWorkflowInvocations( + request?: protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest, + | protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest, + | protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation[], + protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest | null, + protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listWorkflowInvocations( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the WorkflowInvocation type. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkflowInvocations` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkflowInvocations` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [WorkflowInvocation]{@link google.cloud.dataform.v1alpha2.WorkflowInvocation} 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 `listWorkflowInvocationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listWorkflowInvocationsStream( + request?: protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listWorkflowInvocations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listWorkflowInvocations.createStream( + this.innerApiCalls.listWorkflowInvocations as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listWorkflowInvocations`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the WorkflowInvocation type. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkflowInvocations` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkflowInvocations` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [WorkflowInvocation]{@link google.cloud.dataform.v1alpha2.WorkflowInvocation}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.list_workflow_invocations.js + * region_tag:dataform_v1alpha2_generated_Dataform_ListWorkflowInvocations_async + */ + listWorkflowInvocationsAsync( + request?: protos.google.cloud.dataform.v1alpha2.IListWorkflowInvocationsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listWorkflowInvocations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listWorkflowInvocations.asyncIterate( + this.innerApiCalls['listWorkflowInvocations'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Returns WorkflowInvocationActions in a given WorkflowInvocation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryWorkflowInvocationActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryWorkflowInvocationActions` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [WorkflowInvocationAction]{@link google.cloud.dataform.v1alpha2.WorkflowInvocationAction}. + * 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 `queryWorkflowInvocationActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryWorkflowInvocationActions( + request?: protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocationAction[], + protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest | null, + protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsResponse + ] + >; + queryWorkflowInvocationActions( + request: protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest, + | protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocationAction + > + ): void; + queryWorkflowInvocationActions( + request: protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest, + | protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocationAction + > + ): void; + queryWorkflowInvocationActions( + request?: protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest, + | protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocationAction + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest, + | protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocationAction + > + ): Promise< + [ + protos.google.cloud.dataform.v1alpha2.IWorkflowInvocationAction[], + protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest | null, + protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.queryWorkflowInvocationActions( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryWorkflowInvocationActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryWorkflowInvocationActions` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [WorkflowInvocationAction]{@link google.cloud.dataform.v1alpha2.WorkflowInvocationAction} 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 `queryWorkflowInvocationActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryWorkflowInvocationActionsStream( + request?: protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + const defaultCallSettings = + this._defaults['queryWorkflowInvocationActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryWorkflowInvocationActions.createStream( + this.innerApiCalls.queryWorkflowInvocationActions as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `queryWorkflowInvocationActions`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryWorkflowInvocationActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryWorkflowInvocationActions` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [WorkflowInvocationAction]{@link google.cloud.dataform.v1alpha2.WorkflowInvocationAction}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha2/dataform.query_workflow_invocation_actions.js + * region_tag:dataform_v1alpha2_generated_Dataform_QueryWorkflowInvocationActions_async + */ + queryWorkflowInvocationActionsAsync( + request?: protos.google.cloud.dataform.v1alpha2.IQueryWorkflowInvocationActionsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + const defaultCallSettings = + this._defaults['queryWorkflowInvocationActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryWorkflowInvocationActions.asyncIterate( + this.innerApiCalls['queryWorkflowInvocationActions'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as [GetPolicyOptions]{@link google.iam.v1.GetPolicyOptions} + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} 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 [Policy]{@link google.iam.v1.Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.getIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} 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 [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.setIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} 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 [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + */ + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.testIamPermissions(request, options, callback); + } + + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Location]{@link google.cloud.location.Location}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * ``` + * const [response] = await client.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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Location]{@link google.cloud.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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * 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 compilationResult resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} compilation_result + * @returns {string} Resource name string. + */ + compilationResultPath( + project: string, + location: string, + repository: string, + compilationResult: string + ) { + return this.pathTemplates.compilationResultPathTemplate.render({ + project: project, + location: location, + repository: repository, + compilation_result: compilationResult, + }); + } + + /** + * Parse the project from CompilationResult resource. + * + * @param {string} compilationResultName + * A fully-qualified path representing CompilationResult resource. + * @returns {string} A string representing the project. + */ + matchProjectFromCompilationResultName(compilationResultName: string) { + return this.pathTemplates.compilationResultPathTemplate.match( + compilationResultName + ).project; + } + + /** + * Parse the location from CompilationResult resource. + * + * @param {string} compilationResultName + * A fully-qualified path representing CompilationResult resource. + * @returns {string} A string representing the location. + */ + matchLocationFromCompilationResultName(compilationResultName: string) { + return this.pathTemplates.compilationResultPathTemplate.match( + compilationResultName + ).location; + } + + /** + * Parse the repository from CompilationResult resource. + * + * @param {string} compilationResultName + * A fully-qualified path representing CompilationResult resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromCompilationResultName(compilationResultName: string) { + return this.pathTemplates.compilationResultPathTemplate.match( + compilationResultName + ).repository; + } + + /** + * Parse the compilation_result from CompilationResult resource. + * + * @param {string} compilationResultName + * A fully-qualified path representing CompilationResult resource. + * @returns {string} A string representing the compilation_result. + */ + matchCompilationResultFromCompilationResultName( + compilationResultName: string + ) { + return this.pathTemplates.compilationResultPathTemplate.match( + compilationResultName + ).compilation_result; + } + + /** + * 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 repository resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @returns {string} Resource name string. + */ + repositoryPath(project: string, location: string, repository: string) { + return this.pathTemplates.repositoryPathTemplate.render({ + project: project, + location: location, + repository: repository, + }); + } + + /** + * Parse the project from Repository resource. + * + * @param {string} repositoryName + * A fully-qualified path representing Repository resource. + * @returns {string} A string representing the project. + */ + matchProjectFromRepositoryName(repositoryName: string) { + return this.pathTemplates.repositoryPathTemplate.match(repositoryName) + .project; + } + + /** + * Parse the location from Repository resource. + * + * @param {string} repositoryName + * A fully-qualified path representing Repository resource. + * @returns {string} A string representing the location. + */ + matchLocationFromRepositoryName(repositoryName: string) { + return this.pathTemplates.repositoryPathTemplate.match(repositoryName) + .location; + } + + /** + * Parse the repository from Repository resource. + * + * @param {string} repositoryName + * A fully-qualified path representing Repository resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromRepositoryName(repositoryName: string) { + return this.pathTemplates.repositoryPathTemplate.match(repositoryName) + .repository; + } + + /** + * Return a fully-qualified workflowInvocation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} workflow_invocation + * @returns {string} Resource name string. + */ + workflowInvocationPath( + project: string, + location: string, + repository: string, + workflowInvocation: string + ) { + return this.pathTemplates.workflowInvocationPathTemplate.render({ + project: project, + location: location, + repository: repository, + workflow_invocation: workflowInvocation, + }); + } + + /** + * Parse the project from WorkflowInvocation resource. + * + * @param {string} workflowInvocationName + * A fully-qualified path representing WorkflowInvocation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromWorkflowInvocationName(workflowInvocationName: string) { + return this.pathTemplates.workflowInvocationPathTemplate.match( + workflowInvocationName + ).project; + } + + /** + * Parse the location from WorkflowInvocation resource. + * + * @param {string} workflowInvocationName + * A fully-qualified path representing WorkflowInvocation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromWorkflowInvocationName(workflowInvocationName: string) { + return this.pathTemplates.workflowInvocationPathTemplate.match( + workflowInvocationName + ).location; + } + + /** + * Parse the repository from WorkflowInvocation resource. + * + * @param {string} workflowInvocationName + * A fully-qualified path representing WorkflowInvocation resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromWorkflowInvocationName(workflowInvocationName: string) { + return this.pathTemplates.workflowInvocationPathTemplate.match( + workflowInvocationName + ).repository; + } + + /** + * Parse the workflow_invocation from WorkflowInvocation resource. + * + * @param {string} workflowInvocationName + * A fully-qualified path representing WorkflowInvocation resource. + * @returns {string} A string representing the workflow_invocation. + */ + matchWorkflowInvocationFromWorkflowInvocationName( + workflowInvocationName: string + ) { + return this.pathTemplates.workflowInvocationPathTemplate.match( + workflowInvocationName + ).workflow_invocation; + } + + /** + * Return a fully-qualified workspace resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} workspace + * @returns {string} Resource name string. + */ + workspacePath( + project: string, + location: string, + repository: string, + workspace: string + ) { + return this.pathTemplates.workspacePathTemplate.render({ + project: project, + location: location, + repository: repository, + workspace: workspace, + }); + } + + /** + * Parse the project from Workspace resource. + * + * @param {string} workspaceName + * A fully-qualified path representing Workspace resource. + * @returns {string} A string representing the project. + */ + matchProjectFromWorkspaceName(workspaceName: string) { + return this.pathTemplates.workspacePathTemplate.match(workspaceName) + .project; + } + + /** + * Parse the location from Workspace resource. + * + * @param {string} workspaceName + * A fully-qualified path representing Workspace resource. + * @returns {string} A string representing the location. + */ + matchLocationFromWorkspaceName(workspaceName: string) { + return this.pathTemplates.workspacePathTemplate.match(workspaceName) + .location; + } + + /** + * Parse the repository from Workspace resource. + * + * @param {string} workspaceName + * A fully-qualified path representing Workspace resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromWorkspaceName(workspaceName: string) { + return this.pathTemplates.workspacePathTemplate.match(workspaceName) + .repository; + } + + /** + * Parse the workspace from Workspace resource. + * + * @param {string} workspaceName + * A fully-qualified path representing Workspace resource. + * @returns {string} A string representing the workspace. + */ + matchWorkspaceFromWorkspaceName(workspaceName: string) { + return this.pathTemplates.workspacePathTemplate.match(workspaceName) + .workspace; + } + + /** + * 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.dataformStub && !this._terminated) { + return this.dataformStub.then(stub => { + this._terminated = true; + stub.close(); + this.iamClient.close(); + this.locationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-dataform/src/v1alpha2/dataform_client_config.json b/packages/google-cloud-dataform/src/v1alpha2/dataform_client_config.json new file mode 100644 index 00000000000..b52dc9c4ce3 --- /dev/null +++ b/packages/google-cloud-dataform/src/v1alpha2/dataform_client_config.json @@ -0,0 +1,170 @@ +{ + "interfaces": { + "google.cloud.dataform.v1alpha2.Dataform": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "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 + } + }, + "methods": { + "ListRepositories": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetRepository": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateRepository": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateRepository": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteRepository": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FetchRemoteBranches": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListWorkspaces": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetWorkspace": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateWorkspace": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteWorkspace": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "InstallNpmPackages": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "PullGitCommits": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "PushGitCommits": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FetchFileGitStatuses": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FetchGitAheadBehind": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CommitWorkspaceChanges": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ResetWorkspaceChanges": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FetchFileDiff": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "QueryDirectoryContents": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "MakeDirectory": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RemoveDirectory": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "MoveDirectory": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ReadFile": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RemoveFile": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "MoveFile": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "WriteFile": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListCompilationResults": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetCompilationResult": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateCompilationResult": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "QueryCompilationResultActions": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListWorkflowInvocations": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetWorkflowInvocation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateWorkflowInvocation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteWorkflowInvocation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CancelWorkflowInvocation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "QueryWorkflowInvocationActions": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-dataform/src/v1alpha2/dataform_proto_list.json b/packages/google-cloud-dataform/src/v1alpha2/dataform_proto_list.json new file mode 100644 index 00000000000..78309dcf117 --- /dev/null +++ b/packages/google-cloud-dataform/src/v1alpha2/dataform_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/cloud/dataform/v1alpha2/dataform.proto" +] diff --git a/packages/google-cloud-dataform/src/v1alpha2/gapic_metadata.json b/packages/google-cloud-dataform/src/v1alpha2/gapic_metadata.json new file mode 100644 index 00000000000..d0c680b57e8 --- /dev/null +++ b/packages/google-cloud-dataform/src/v1alpha2/gapic_metadata.json @@ -0,0 +1,411 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.dataform.v1alpha2", + "libraryPackage": "@google-cloud/dataform", + "services": { + "Dataform": { + "clients": { + "grpc": { + "libraryClient": "DataformClient", + "rpcs": { + "GetRepository": { + "methods": [ + "getRepository" + ] + }, + "CreateRepository": { + "methods": [ + "createRepository" + ] + }, + "UpdateRepository": { + "methods": [ + "updateRepository" + ] + }, + "DeleteRepository": { + "methods": [ + "deleteRepository" + ] + }, + "FetchRemoteBranches": { + "methods": [ + "fetchRemoteBranches" + ] + }, + "GetWorkspace": { + "methods": [ + "getWorkspace" + ] + }, + "CreateWorkspace": { + "methods": [ + "createWorkspace" + ] + }, + "DeleteWorkspace": { + "methods": [ + "deleteWorkspace" + ] + }, + "InstallNpmPackages": { + "methods": [ + "installNpmPackages" + ] + }, + "PullGitCommits": { + "methods": [ + "pullGitCommits" + ] + }, + "PushGitCommits": { + "methods": [ + "pushGitCommits" + ] + }, + "FetchFileGitStatuses": { + "methods": [ + "fetchFileGitStatuses" + ] + }, + "FetchGitAheadBehind": { + "methods": [ + "fetchGitAheadBehind" + ] + }, + "CommitWorkspaceChanges": { + "methods": [ + "commitWorkspaceChanges" + ] + }, + "ResetWorkspaceChanges": { + "methods": [ + "resetWorkspaceChanges" + ] + }, + "FetchFileDiff": { + "methods": [ + "fetchFileDiff" + ] + }, + "MakeDirectory": { + "methods": [ + "makeDirectory" + ] + }, + "RemoveDirectory": { + "methods": [ + "removeDirectory" + ] + }, + "MoveDirectory": { + "methods": [ + "moveDirectory" + ] + }, + "ReadFile": { + "methods": [ + "readFile" + ] + }, + "RemoveFile": { + "methods": [ + "removeFile" + ] + }, + "MoveFile": { + "methods": [ + "moveFile" + ] + }, + "WriteFile": { + "methods": [ + "writeFile" + ] + }, + "GetCompilationResult": { + "methods": [ + "getCompilationResult" + ] + }, + "CreateCompilationResult": { + "methods": [ + "createCompilationResult" + ] + }, + "GetWorkflowInvocation": { + "methods": [ + "getWorkflowInvocation" + ] + }, + "CreateWorkflowInvocation": { + "methods": [ + "createWorkflowInvocation" + ] + }, + "DeleteWorkflowInvocation": { + "methods": [ + "deleteWorkflowInvocation" + ] + }, + "CancelWorkflowInvocation": { + "methods": [ + "cancelWorkflowInvocation" + ] + }, + "ListRepositories": { + "methods": [ + "listRepositories", + "listRepositoriesStream", + "listRepositoriesAsync" + ] + }, + "ListWorkspaces": { + "methods": [ + "listWorkspaces", + "listWorkspacesStream", + "listWorkspacesAsync" + ] + }, + "QueryDirectoryContents": { + "methods": [ + "queryDirectoryContents", + "queryDirectoryContentsStream", + "queryDirectoryContentsAsync" + ] + }, + "ListCompilationResults": { + "methods": [ + "listCompilationResults", + "listCompilationResultsStream", + "listCompilationResultsAsync" + ] + }, + "QueryCompilationResultActions": { + "methods": [ + "queryCompilationResultActions", + "queryCompilationResultActionsStream", + "queryCompilationResultActionsAsync" + ] + }, + "ListWorkflowInvocations": { + "methods": [ + "listWorkflowInvocations", + "listWorkflowInvocationsStream", + "listWorkflowInvocationsAsync" + ] + }, + "QueryWorkflowInvocationActions": { + "methods": [ + "queryWorkflowInvocationActions", + "queryWorkflowInvocationActionsStream", + "queryWorkflowInvocationActionsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "DataformClient", + "rpcs": { + "GetRepository": { + "methods": [ + "getRepository" + ] + }, + "CreateRepository": { + "methods": [ + "createRepository" + ] + }, + "UpdateRepository": { + "methods": [ + "updateRepository" + ] + }, + "DeleteRepository": { + "methods": [ + "deleteRepository" + ] + }, + "FetchRemoteBranches": { + "methods": [ + "fetchRemoteBranches" + ] + }, + "GetWorkspace": { + "methods": [ + "getWorkspace" + ] + }, + "CreateWorkspace": { + "methods": [ + "createWorkspace" + ] + }, + "DeleteWorkspace": { + "methods": [ + "deleteWorkspace" + ] + }, + "InstallNpmPackages": { + "methods": [ + "installNpmPackages" + ] + }, + "PullGitCommits": { + "methods": [ + "pullGitCommits" + ] + }, + "PushGitCommits": { + "methods": [ + "pushGitCommits" + ] + }, + "FetchFileGitStatuses": { + "methods": [ + "fetchFileGitStatuses" + ] + }, + "FetchGitAheadBehind": { + "methods": [ + "fetchGitAheadBehind" + ] + }, + "CommitWorkspaceChanges": { + "methods": [ + "commitWorkspaceChanges" + ] + }, + "ResetWorkspaceChanges": { + "methods": [ + "resetWorkspaceChanges" + ] + }, + "FetchFileDiff": { + "methods": [ + "fetchFileDiff" + ] + }, + "MakeDirectory": { + "methods": [ + "makeDirectory" + ] + }, + "RemoveDirectory": { + "methods": [ + "removeDirectory" + ] + }, + "MoveDirectory": { + "methods": [ + "moveDirectory" + ] + }, + "ReadFile": { + "methods": [ + "readFile" + ] + }, + "RemoveFile": { + "methods": [ + "removeFile" + ] + }, + "MoveFile": { + "methods": [ + "moveFile" + ] + }, + "WriteFile": { + "methods": [ + "writeFile" + ] + }, + "GetCompilationResult": { + "methods": [ + "getCompilationResult" + ] + }, + "CreateCompilationResult": { + "methods": [ + "createCompilationResult" + ] + }, + "GetWorkflowInvocation": { + "methods": [ + "getWorkflowInvocation" + ] + }, + "CreateWorkflowInvocation": { + "methods": [ + "createWorkflowInvocation" + ] + }, + "DeleteWorkflowInvocation": { + "methods": [ + "deleteWorkflowInvocation" + ] + }, + "CancelWorkflowInvocation": { + "methods": [ + "cancelWorkflowInvocation" + ] + }, + "ListRepositories": { + "methods": [ + "listRepositories", + "listRepositoriesStream", + "listRepositoriesAsync" + ] + }, + "ListWorkspaces": { + "methods": [ + "listWorkspaces", + "listWorkspacesStream", + "listWorkspacesAsync" + ] + }, + "QueryDirectoryContents": { + "methods": [ + "queryDirectoryContents", + "queryDirectoryContentsStream", + "queryDirectoryContentsAsync" + ] + }, + "ListCompilationResults": { + "methods": [ + "listCompilationResults", + "listCompilationResultsStream", + "listCompilationResultsAsync" + ] + }, + "QueryCompilationResultActions": { + "methods": [ + "queryCompilationResultActions", + "queryCompilationResultActionsStream", + "queryCompilationResultActionsAsync" + ] + }, + "ListWorkflowInvocations": { + "methods": [ + "listWorkflowInvocations", + "listWorkflowInvocationsStream", + "listWorkflowInvocationsAsync" + ] + }, + "QueryWorkflowInvocationActions": { + "methods": [ + "queryWorkflowInvocationActions", + "queryWorkflowInvocationActionsStream", + "queryWorkflowInvocationActionsAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-dataform/src/v1alpha2/index.ts b/packages/google-cloud-dataform/src/v1alpha2/index.ts new file mode 100644 index 00000000000..a1e44870c79 --- /dev/null +++ b/packages/google-cloud-dataform/src/v1alpha2/index.ts @@ -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 +// +// 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 {DataformClient} from './dataform_client'; diff --git a/packages/google-cloud-dataform/system-test/fixtures/sample/src/index.js b/packages/google-cloud-dataform/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..2f4c3095189 --- /dev/null +++ b/packages/google-cloud-dataform/system-test/fixtures/sample/src/index.js @@ -0,0 +1,26 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const dataform = require('@google-cloud/dataform'); + +function main() { + const dataformClient = new dataform.DataformClient(); +} + +main(); diff --git a/packages/google-cloud-dataform/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-dataform/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..3f49bdde081 --- /dev/null +++ b/packages/google-cloud-dataform/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {DataformClient} from '@google-cloud/dataform'; + +// check that the client class type name can be used +function doStuffWithDataformClient(client: DataformClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const dataformClient = new DataformClient(); + doStuffWithDataformClient(dataformClient); +} + +main(); diff --git a/packages/google-cloud-dataform/system-test/install.ts b/packages/google-cloud-dataform/system-test/install.ts new file mode 100644 index 00000000000..6dd1eaadafa --- /dev/null +++ b/packages/google-cloud-dataform/system-test/install.ts @@ -0,0 +1,51 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + it('TypeScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts' + ).toString(), + }, + }; + await packNTest(options); + }); + + it('JavaScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync( + './system-test/fixtures/sample/src/index.js' + ).toString(), + }, + }; + await packNTest(options); + }); +}); diff --git a/packages/google-cloud-dataform/test/gapic_dataform_v1alpha2.ts b/packages/google-cloud-dataform/test/gapic_dataform_v1alpha2.ts new file mode 100644 index 00000000000..ac59e608719 --- /dev/null +++ b/packages/google-cloud-dataform/test/gapic_dataform_v1alpha2.ts @@ -0,0 +1,7087 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as dataformModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, IamProtos, LocationProtos} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1alpha2.DataformClient', () => { + it('has servicePath', () => { + const servicePath = dataformModule.v1alpha2.DataformClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = dataformModule.v1alpha2.DataformClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = dataformModule.v1alpha2.DataformClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new dataformModule.v1alpha2.DataformClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new dataformModule.v1alpha2.DataformClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataformStub, undefined); + await client.initialize(); + assert(client.dataformStub); + }); + + it('has close method for the initialized client', done => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.dataformStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataformStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new dataformModule.v1alpha2.DataformClient({ + 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 dataformModule.v1alpha2.DataformClient({ + 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('getRepository', () => { + it('invokes getRepository without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetRepositoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ); + client.innerApiCalls.getRepository = stubSimpleCall(expectedResponse); + const [response] = await client.getRepository(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getRepository without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetRepositoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ); + client.innerApiCalls.getRepository = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getRepository( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IRepository | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getRepository with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetRepositoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getRepository = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getRepository(request), expectedError); + assert( + (client.innerApiCalls.getRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getRepository with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetRepositoryRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getRepository(request), expectedError); + }); + }); + + describe('createRepository', () => { + it('invokes createRepository without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateRepositoryRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ); + client.innerApiCalls.createRepository = stubSimpleCall(expectedResponse); + const [response] = await client.createRepository(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createRepository without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateRepositoryRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ); + client.innerApiCalls.createRepository = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createRepository( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IRepository | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createRepository with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateRepositoryRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createRepository = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createRepository(request), expectedError); + assert( + (client.innerApiCalls.createRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createRepository with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateRepositoryRequest() + ); + request.parent = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createRepository(request), expectedError); + }); + }); + + describe('updateRepository', () => { + it('invokes updateRepository without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest() + ); + request.repository = {}; + request.repository.name = ''; + const expectedHeaderRequestParams = 'repository.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ); + client.innerApiCalls.updateRepository = stubSimpleCall(expectedResponse); + const [response] = await client.updateRepository(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateRepository without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest() + ); + request.repository = {}; + request.repository.name = ''; + const expectedHeaderRequestParams = 'repository.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ); + client.innerApiCalls.updateRepository = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateRepository( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IRepository | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateRepository with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest() + ); + request.repository = {}; + request.repository.name = ''; + const expectedHeaderRequestParams = 'repository.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateRepository = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateRepository(request), expectedError); + assert( + (client.innerApiCalls.updateRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateRepository with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest() + ); + request.repository = {}; + request.repository.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateRepository(request), expectedError); + }); + }); + + describe('deleteRepository', () => { + it('invokes deleteRepository without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteRepository = stubSimpleCall(expectedResponse); + const [response] = await client.deleteRepository(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteRepository without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteRepository = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteRepository( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteRepository with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteRepository = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteRepository(request), expectedError); + assert( + (client.innerApiCalls.deleteRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteRepository with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteRepository(request), expectedError); + }); + }); + + describe('fetchRemoteBranches', () => { + it('invokes fetchRemoteBranches without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse() + ); + client.innerApiCalls.fetchRemoteBranches = + stubSimpleCall(expectedResponse); + const [response] = await client.fetchRemoteBranches(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchRemoteBranches as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes fetchRemoteBranches without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse() + ); + client.innerApiCalls.fetchRemoteBranches = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchRemoteBranches( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IFetchRemoteBranchesResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchRemoteBranches as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes fetchRemoteBranches with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchRemoteBranches = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.fetchRemoteBranches(request), expectedError); + assert( + (client.innerApiCalls.fetchRemoteBranches as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes fetchRemoteBranches with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.fetchRemoteBranches(request), expectedError); + }); + }); + + describe('getWorkspace', () => { + it('invokes getWorkspace without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetWorkspaceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ); + client.innerApiCalls.getWorkspace = stubSimpleCall(expectedResponse); + const [response] = await client.getWorkspace(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getWorkspace as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getWorkspace without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetWorkspaceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ); + client.innerApiCalls.getWorkspace = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getWorkspace( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IWorkspace | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getWorkspace as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getWorkspace with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetWorkspaceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getWorkspace = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getWorkspace(request), expectedError); + assert( + (client.innerApiCalls.getWorkspace as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getWorkspace with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetWorkspaceRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getWorkspace(request), expectedError); + }); + }); + + describe('createWorkspace', () => { + it('invokes createWorkspace without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ); + client.innerApiCalls.createWorkspace = stubSimpleCall(expectedResponse); + const [response] = await client.createWorkspace(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createWorkspace as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createWorkspace without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ); + client.innerApiCalls.createWorkspace = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createWorkspace( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IWorkspace | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createWorkspace as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createWorkspace with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createWorkspace = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createWorkspace(request), expectedError); + assert( + (client.innerApiCalls.createWorkspace as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createWorkspace with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest() + ); + request.parent = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createWorkspace(request), expectedError); + }); + }); + + describe('deleteWorkspace', () => { + it('invokes deleteWorkspace without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteWorkspace = stubSimpleCall(expectedResponse); + const [response] = await client.deleteWorkspace(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteWorkspace as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteWorkspace without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteWorkspace = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteWorkspace( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteWorkspace as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteWorkspace with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteWorkspace = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteWorkspace(request), expectedError); + assert( + (client.innerApiCalls.deleteWorkspace as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteWorkspace with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteWorkspace(request), expectedError); + }); + }); + + describe('installNpmPackages', () => { + it('invokes installNpmPackages without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse() + ); + client.innerApiCalls.installNpmPackages = + stubSimpleCall(expectedResponse); + const [response] = await client.installNpmPackages(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.installNpmPackages as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes installNpmPackages without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse() + ); + client.innerApiCalls.installNpmPackages = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.installNpmPackages( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IInstallNpmPackagesResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.installNpmPackages as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes installNpmPackages with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.installNpmPackages = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.installNpmPackages(request), expectedError); + assert( + (client.innerApiCalls.installNpmPackages as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes installNpmPackages with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest() + ); + request.workspace = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.installNpmPackages(request), expectedError); + }); + }); + + describe('pullGitCommits', () => { + it('invokes pullGitCommits without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.PullGitCommitsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.pullGitCommits = stubSimpleCall(expectedResponse); + const [response] = await client.pullGitCommits(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.pullGitCommits as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes pullGitCommits without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.PullGitCommitsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.pullGitCommits = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.pullGitCommits( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.pullGitCommits as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes pullGitCommits with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.PullGitCommitsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.pullGitCommits = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.pullGitCommits(request), expectedError); + assert( + (client.innerApiCalls.pullGitCommits as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes pullGitCommits with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.PullGitCommitsRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.pullGitCommits(request), expectedError); + }); + }); + + describe('pushGitCommits', () => { + it('invokes pushGitCommits without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.PushGitCommitsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.pushGitCommits = stubSimpleCall(expectedResponse); + const [response] = await client.pushGitCommits(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.pushGitCommits as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes pushGitCommits without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.PushGitCommitsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.pushGitCommits = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.pushGitCommits( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.pushGitCommits as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes pushGitCommits with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.PushGitCommitsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.pushGitCommits = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.pushGitCommits(request), expectedError); + assert( + (client.innerApiCalls.pushGitCommits as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes pushGitCommits with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.PushGitCommitsRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.pushGitCommits(request), expectedError); + }); + }); + + describe('fetchFileGitStatuses', () => { + it('invokes fetchFileGitStatuses without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse() + ); + client.innerApiCalls.fetchFileGitStatuses = + stubSimpleCall(expectedResponse); + const [response] = await client.fetchFileGitStatuses(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchFileGitStatuses as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes fetchFileGitStatuses without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse() + ); + client.innerApiCalls.fetchFileGitStatuses = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchFileGitStatuses( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IFetchFileGitStatusesResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchFileGitStatuses as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes fetchFileGitStatuses with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchFileGitStatuses = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.fetchFileGitStatuses(request), expectedError); + assert( + (client.innerApiCalls.fetchFileGitStatuses as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes fetchFileGitStatuses with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.fetchFileGitStatuses(request), expectedError); + }); + }); + + describe('fetchGitAheadBehind', () => { + it('invokes fetchGitAheadBehind without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse() + ); + client.innerApiCalls.fetchGitAheadBehind = + stubSimpleCall(expectedResponse); + const [response] = await client.fetchGitAheadBehind(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchGitAheadBehind as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes fetchGitAheadBehind without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse() + ); + client.innerApiCalls.fetchGitAheadBehind = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchGitAheadBehind( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IFetchGitAheadBehindResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchGitAheadBehind as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes fetchGitAheadBehind with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchGitAheadBehind = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.fetchGitAheadBehind(request), expectedError); + assert( + (client.innerApiCalls.fetchGitAheadBehind as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes fetchGitAheadBehind with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.fetchGitAheadBehind(request), expectedError); + }); + }); + + describe('commitWorkspaceChanges', () => { + it('invokes commitWorkspaceChanges without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.commitWorkspaceChanges = + stubSimpleCall(expectedResponse); + const [response] = await client.commitWorkspaceChanges(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.commitWorkspaceChanges as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes commitWorkspaceChanges without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.commitWorkspaceChanges = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.commitWorkspaceChanges( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.commitWorkspaceChanges as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes commitWorkspaceChanges with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.commitWorkspaceChanges = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.commitWorkspaceChanges(request), + expectedError + ); + assert( + (client.innerApiCalls.commitWorkspaceChanges as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes commitWorkspaceChanges with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.commitWorkspaceChanges(request), + expectedError + ); + }); + }); + + describe('resetWorkspaceChanges', () => { + it('invokes resetWorkspaceChanges without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.resetWorkspaceChanges = + stubSimpleCall(expectedResponse); + const [response] = await client.resetWorkspaceChanges(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.resetWorkspaceChanges as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes resetWorkspaceChanges without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.resetWorkspaceChanges = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.resetWorkspaceChanges( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.resetWorkspaceChanges as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes resetWorkspaceChanges with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.resetWorkspaceChanges = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.resetWorkspaceChanges(request), + expectedError + ); + assert( + (client.innerApiCalls.resetWorkspaceChanges as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes resetWorkspaceChanges with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.resetWorkspaceChanges(request), + expectedError + ); + }); + }); + + describe('fetchFileDiff', () => { + it('invokes fetchFileDiff without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchFileDiffRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchFileDiffResponse() + ); + client.innerApiCalls.fetchFileDiff = stubSimpleCall(expectedResponse); + const [response] = await client.fetchFileDiff(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchFileDiff as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes fetchFileDiff without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchFileDiffRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchFileDiffResponse() + ); + client.innerApiCalls.fetchFileDiff = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchFileDiff( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IFetchFileDiffResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchFileDiff as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes fetchFileDiff with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchFileDiffRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchFileDiff = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.fetchFileDiff(request), expectedError); + assert( + (client.innerApiCalls.fetchFileDiff as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes fetchFileDiff with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.FetchFileDiffRequest() + ); + request.workspace = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.fetchFileDiff(request), expectedError); + }); + }); + + describe('makeDirectory', () => { + it('invokes makeDirectory without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MakeDirectoryRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MakeDirectoryResponse() + ); + client.innerApiCalls.makeDirectory = stubSimpleCall(expectedResponse); + const [response] = await client.makeDirectory(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.makeDirectory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes makeDirectory without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MakeDirectoryRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MakeDirectoryResponse() + ); + client.innerApiCalls.makeDirectory = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.makeDirectory( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IMakeDirectoryResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.makeDirectory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes makeDirectory with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MakeDirectoryRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.makeDirectory = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.makeDirectory(request), expectedError); + assert( + (client.innerApiCalls.makeDirectory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes makeDirectory with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MakeDirectoryRequest() + ); + request.workspace = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.makeDirectory(request), expectedError); + }); + }); + + describe('removeDirectory', () => { + it('invokes removeDirectory without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.removeDirectory = stubSimpleCall(expectedResponse); + const [response] = await client.removeDirectory(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.removeDirectory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes removeDirectory without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.removeDirectory = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.removeDirectory( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.removeDirectory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes removeDirectory with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.removeDirectory = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.removeDirectory(request), expectedError); + assert( + (client.innerApiCalls.removeDirectory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes removeDirectory with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest() + ); + request.workspace = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.removeDirectory(request), expectedError); + }); + }); + + describe('moveDirectory', () => { + it('invokes moveDirectory without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MoveDirectoryRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MoveDirectoryResponse() + ); + client.innerApiCalls.moveDirectory = stubSimpleCall(expectedResponse); + const [response] = await client.moveDirectory(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.moveDirectory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes moveDirectory without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MoveDirectoryRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MoveDirectoryResponse() + ); + client.innerApiCalls.moveDirectory = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.moveDirectory( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IMoveDirectoryResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.moveDirectory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes moveDirectory with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MoveDirectoryRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.moveDirectory = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.moveDirectory(request), expectedError); + assert( + (client.innerApiCalls.moveDirectory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes moveDirectory with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MoveDirectoryRequest() + ); + request.workspace = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.moveDirectory(request), expectedError); + }); + }); + + describe('readFile', () => { + it('invokes readFile without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ReadFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ReadFileResponse() + ); + client.innerApiCalls.readFile = stubSimpleCall(expectedResponse); + const [response] = await client.readFile(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.readFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes readFile without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ReadFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ReadFileResponse() + ); + client.innerApiCalls.readFile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.readFile( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IReadFileResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.readFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes readFile with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ReadFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.readFile = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.readFile(request), expectedError); + assert( + (client.innerApiCalls.readFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes readFile with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ReadFileRequest() + ); + request.workspace = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.readFile(request), expectedError); + }); + }); + + describe('removeFile', () => { + it('invokes removeFile without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.RemoveFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.removeFile = stubSimpleCall(expectedResponse); + const [response] = await client.removeFile(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.removeFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes removeFile without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.RemoveFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.removeFile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.removeFile( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.removeFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes removeFile with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.RemoveFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.removeFile = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.removeFile(request), expectedError); + assert( + (client.innerApiCalls.removeFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes removeFile with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.RemoveFileRequest() + ); + request.workspace = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.removeFile(request), expectedError); + }); + }); + + describe('moveFile', () => { + it('invokes moveFile without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MoveFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MoveFileResponse() + ); + client.innerApiCalls.moveFile = stubSimpleCall(expectedResponse); + const [response] = await client.moveFile(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.moveFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes moveFile without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MoveFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MoveFileResponse() + ); + client.innerApiCalls.moveFile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.moveFile( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IMoveFileResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.moveFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes moveFile with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MoveFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.moveFile = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.moveFile(request), expectedError); + assert( + (client.innerApiCalls.moveFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes moveFile with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.MoveFileRequest() + ); + request.workspace = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.moveFile(request), expectedError); + }); + }); + + describe('writeFile', () => { + it('invokes writeFile without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WriteFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WriteFileResponse() + ); + client.innerApiCalls.writeFile = stubSimpleCall(expectedResponse); + const [response] = await client.writeFile(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.writeFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes writeFile without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WriteFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WriteFileResponse() + ); + client.innerApiCalls.writeFile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.writeFile( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IWriteFileResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.writeFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes writeFile with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WriteFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.writeFile = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.writeFile(request), expectedError); + assert( + (client.innerApiCalls.writeFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes writeFile with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WriteFileRequest() + ); + request.workspace = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.writeFile(request), expectedError); + }); + }); + + describe('getCompilationResult', () => { + it('invokes getCompilationResult without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetCompilationResultRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ); + client.innerApiCalls.getCompilationResult = + stubSimpleCall(expectedResponse); + const [response] = await client.getCompilationResult(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getCompilationResult as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getCompilationResult without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetCompilationResultRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ); + client.innerApiCalls.getCompilationResult = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getCompilationResult( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.ICompilationResult | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getCompilationResult as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getCompilationResult with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetCompilationResultRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getCompilationResult = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getCompilationResult(request), expectedError); + assert( + (client.innerApiCalls.getCompilationResult as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getCompilationResult with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetCompilationResultRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getCompilationResult(request), expectedError); + }); + }); + + describe('createCompilationResult', () => { + it('invokes createCompilationResult without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ); + client.innerApiCalls.createCompilationResult = + stubSimpleCall(expectedResponse); + const [response] = await client.createCompilationResult(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createCompilationResult as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createCompilationResult without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ); + client.innerApiCalls.createCompilationResult = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createCompilationResult( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.ICompilationResult | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createCompilationResult as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createCompilationResult with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createCompilationResult = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.createCompilationResult(request), + expectedError + ); + assert( + (client.innerApiCalls.createCompilationResult as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createCompilationResult with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest() + ); + request.parent = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.createCompilationResult(request), + expectedError + ); + }); + }); + + describe('getWorkflowInvocation', () => { + it('invokes getWorkflowInvocation without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ); + client.innerApiCalls.getWorkflowInvocation = + stubSimpleCall(expectedResponse); + const [response] = await client.getWorkflowInvocation(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getWorkflowInvocation without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ); + client.innerApiCalls.getWorkflowInvocation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getWorkflowInvocation( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getWorkflowInvocation with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getWorkflowInvocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getWorkflowInvocation(request), + expectedError + ); + assert( + (client.innerApiCalls.getWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getWorkflowInvocation with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getWorkflowInvocation(request), + expectedError + ); + }); + }); + + describe('createWorkflowInvocation', () => { + it('invokes createWorkflowInvocation without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ); + client.innerApiCalls.createWorkflowInvocation = + stubSimpleCall(expectedResponse); + const [response] = await client.createWorkflowInvocation(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createWorkflowInvocation without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ); + client.innerApiCalls.createWorkflowInvocation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createWorkflowInvocation( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createWorkflowInvocation with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createWorkflowInvocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.createWorkflowInvocation(request), + expectedError + ); + assert( + (client.innerApiCalls.createWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createWorkflowInvocation with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest() + ); + request.parent = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.createWorkflowInvocation(request), + expectedError + ); + }); + }); + + describe('deleteWorkflowInvocation', () => { + it('invokes deleteWorkflowInvocation without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteWorkflowInvocation = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteWorkflowInvocation(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteWorkflowInvocation without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteWorkflowInvocation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteWorkflowInvocation( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteWorkflowInvocation with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteWorkflowInvocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteWorkflowInvocation(request), + expectedError + ); + assert( + (client.innerApiCalls.deleteWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteWorkflowInvocation with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.deleteWorkflowInvocation(request), + expectedError + ); + }); + }); + + describe('cancelWorkflowInvocation', () => { + it('invokes cancelWorkflowInvocation without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.cancelWorkflowInvocation = + stubSimpleCall(expectedResponse); + const [response] = await client.cancelWorkflowInvocation(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.cancelWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes cancelWorkflowInvocation without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.cancelWorkflowInvocation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.cancelWorkflowInvocation( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.cancelWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes cancelWorkflowInvocation with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.cancelWorkflowInvocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.cancelWorkflowInvocation(request), + expectedError + ); + assert( + (client.innerApiCalls.cancelWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes cancelWorkflowInvocation with closed client', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.cancelWorkflowInvocation(request), + expectedError + ); + }); + }); + + describe('listRepositories', () => { + it('invokes listRepositories without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListRepositoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ), + ]; + client.innerApiCalls.listRepositories = stubSimpleCall(expectedResponse); + const [response] = await client.listRepositories(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listRepositories as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listRepositories without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListRepositoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ), + ]; + client.innerApiCalls.listRepositories = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listRepositories( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IRepository[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listRepositories as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listRepositories with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListRepositoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listRepositories = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listRepositories(request), expectedError); + assert( + (client.innerApiCalls.listRepositories as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listRepositoriesStream without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListRepositoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ), + ]; + client.descriptors.page.listRepositories.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listRepositoriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1alpha2.Repository[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.dataform.v1alpha2.Repository) => { + 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.listRepositories.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listRepositories, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listRepositories.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listRepositoriesStream with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListRepositoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listRepositories.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listRepositoriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1alpha2.Repository[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.dataform.v1alpha2.Repository) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listRepositories.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listRepositories, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listRepositories.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listRepositories without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListRepositoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Repository() + ), + ]; + client.descriptors.page.listRepositories.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1alpha2.IRepository[] = []; + const iterable = client.listRepositoriesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listRepositories.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listRepositories.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listRepositories with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListRepositoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listRepositories.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listRepositoriesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1alpha2.IRepository[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listRepositories.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listRepositories.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listWorkspaces', () => { + it('invokes listWorkspaces without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListWorkspacesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ), + ]; + client.innerApiCalls.listWorkspaces = stubSimpleCall(expectedResponse); + const [response] = await client.listWorkspaces(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listWorkspaces as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listWorkspaces without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListWorkspacesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ), + ]; + client.innerApiCalls.listWorkspaces = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listWorkspaces( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1alpha2.IWorkspace[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listWorkspaces as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listWorkspaces with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListWorkspacesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listWorkspaces = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listWorkspaces(request), expectedError); + assert( + (client.innerApiCalls.listWorkspaces as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listWorkspacesStream without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListWorkspacesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ), + ]; + client.descriptors.page.listWorkspaces.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listWorkspacesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1alpha2.Workspace[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataform.v1alpha2.Workspace) => { + 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.listWorkspaces.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listWorkspaces, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listWorkspaces.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listWorkspacesStream with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListWorkspacesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listWorkspaces.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listWorkspacesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1alpha2.Workspace[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataform.v1alpha2.Workspace) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listWorkspaces.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listWorkspaces, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listWorkspaces.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listWorkspaces without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListWorkspacesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.Workspace() + ), + ]; + client.descriptors.page.listWorkspaces.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1alpha2.IWorkspace[] = []; + const iterable = client.listWorkspacesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listWorkspaces.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listWorkspaces.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listWorkspaces with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListWorkspacesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listWorkspaces.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listWorkspacesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1alpha2.IWorkspace[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listWorkspaces.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listWorkspaces.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('queryDirectoryContents', () => { + it('invokes queryDirectoryContents without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry() + ), + ]; + client.innerApiCalls.queryDirectoryContents = + stubSimpleCall(expectedResponse); + const [response] = await client.queryDirectoryContents(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.queryDirectoryContents as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes queryDirectoryContents without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry() + ), + ]; + client.innerApiCalls.queryDirectoryContents = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.queryDirectoryContents( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.queryDirectoryContents as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes queryDirectoryContents with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.queryDirectoryContents = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.queryDirectoryContents(request), + expectedError + ); + assert( + (client.innerApiCalls.queryDirectoryContents as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes queryDirectoryContentsStream without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry() + ), + ]; + client.descriptors.page.queryDirectoryContents.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.queryDirectoryContentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + ) => { + 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.queryDirectoryContents + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.queryDirectoryContents, request) + ); + assert.strictEqual( + ( + client.descriptors.page.queryDirectoryContents + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes queryDirectoryContentsStream with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedError = new Error('expected'); + client.descriptors.page.queryDirectoryContents.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.queryDirectoryContentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.queryDirectoryContents + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.queryDirectoryContents, request) + ); + assert.strictEqual( + ( + client.descriptors.page.queryDirectoryContents + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with queryDirectoryContents without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry() + ), + ]; + client.descriptors.page.queryDirectoryContents.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry[] = + []; + const iterable = client.queryDirectoryContentsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.queryDirectoryContents + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.queryDirectoryContents + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with queryDirectoryContents with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedError = new Error('expected'); + client.descriptors.page.queryDirectoryContents.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.queryDirectoryContentsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.IDirectoryEntry[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.queryDirectoryContents + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.queryDirectoryContents + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listCompilationResults', () => { + it('invokes listCompilationResults without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ), + ]; + client.innerApiCalls.listCompilationResults = + stubSimpleCall(expectedResponse); + const [response] = await client.listCompilationResults(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listCompilationResults as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listCompilationResults without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ), + ]; + client.innerApiCalls.listCompilationResults = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listCompilationResults( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.dataform.v1alpha2.ICompilationResult[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listCompilationResults as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listCompilationResults with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listCompilationResults = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listCompilationResults(request), + expectedError + ); + assert( + (client.innerApiCalls.listCompilationResults as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listCompilationResultsStream without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ), + ]; + client.descriptors.page.listCompilationResults.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listCompilationResultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1alpha2.CompilationResult[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1alpha2.CompilationResult + ) => { + 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.listCompilationResults + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listCompilationResults, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listCompilationResults + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listCompilationResultsStream with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listCompilationResults.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listCompilationResultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1alpha2.CompilationResult[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1alpha2.CompilationResult + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listCompilationResults + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listCompilationResults, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listCompilationResults + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listCompilationResults without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResult() + ), + ]; + client.descriptors.page.listCompilationResults.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1alpha2.ICompilationResult[] = + []; + const iterable = client.listCompilationResultsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listCompilationResults + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listCompilationResults + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listCompilationResults with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listCompilationResults.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listCompilationResultsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1alpha2.ICompilationResult[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listCompilationResults + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listCompilationResults + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('queryCompilationResultActions', () => { + it('invokes queryCompilationResultActions without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResultAction() + ), + ]; + client.innerApiCalls.queryCompilationResultActions = + stubSimpleCall(expectedResponse); + const [response] = await client.queryCompilationResultActions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.queryCompilationResultActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes queryCompilationResultActions without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResultAction() + ), + ]; + client.innerApiCalls.queryCompilationResultActions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.queryCompilationResultActions( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.dataform.v1alpha2.ICompilationResultAction[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.queryCompilationResultActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes queryCompilationResultActions with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.queryCompilationResultActions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.queryCompilationResultActions(request), + expectedError + ); + assert( + (client.innerApiCalls.queryCompilationResultActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes queryCompilationResultActionsStream without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResultAction() + ), + ]; + client.descriptors.page.queryCompilationResultActions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.queryCompilationResultActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1alpha2.CompilationResultAction[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1alpha2.CompilationResultAction + ) => { + 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.queryCompilationResultActions + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.queryCompilationResultActions, + request + ) + ); + assert.strictEqual( + ( + client.descriptors.page.queryCompilationResultActions + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes queryCompilationResultActionsStream with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.queryCompilationResultActions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.queryCompilationResultActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1alpha2.CompilationResultAction[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1alpha2.CompilationResultAction + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.queryCompilationResultActions + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.queryCompilationResultActions, + request + ) + ); + assert.strictEqual( + ( + client.descriptors.page.queryCompilationResultActions + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with queryCompilationResultActions without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CompilationResultAction() + ), + ]; + client.descriptors.page.queryCompilationResultActions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1alpha2.ICompilationResultAction[] = + []; + const iterable = client.queryCompilationResultActionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.queryCompilationResultActions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.queryCompilationResultActions + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with queryCompilationResultActions with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.queryCompilationResultActions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.queryCompilationResultActionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1alpha2.ICompilationResultAction[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.queryCompilationResultActions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.queryCompilationResultActions + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listWorkflowInvocations', () => { + it('invokes listWorkflowInvocations without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ), + ]; + client.innerApiCalls.listWorkflowInvocations = + stubSimpleCall(expectedResponse); + const [response] = await client.listWorkflowInvocations(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listWorkflowInvocations as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listWorkflowInvocations without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ), + ]; + client.innerApiCalls.listWorkflowInvocations = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listWorkflowInvocations( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listWorkflowInvocations as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listWorkflowInvocations with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listWorkflowInvocations = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listWorkflowInvocations(request), + expectedError + ); + assert( + (client.innerApiCalls.listWorkflowInvocations as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listWorkflowInvocationsStream without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ), + ]; + client.descriptors.page.listWorkflowInvocations.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listWorkflowInvocationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1alpha2.WorkflowInvocation[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1alpha2.WorkflowInvocation + ) => { + 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.listWorkflowInvocations + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listWorkflowInvocations, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listWorkflowInvocations + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listWorkflowInvocationsStream with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listWorkflowInvocations.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listWorkflowInvocationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1alpha2.WorkflowInvocation[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1alpha2.WorkflowInvocation + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listWorkflowInvocations + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listWorkflowInvocations, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listWorkflowInvocations + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listWorkflowInvocations without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() + ), + ]; + client.descriptors.page.listWorkflowInvocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation[] = + []; + const iterable = client.listWorkflowInvocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listWorkflowInvocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listWorkflowInvocations + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listWorkflowInvocations with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listWorkflowInvocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listWorkflowInvocationsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1alpha2.IWorkflowInvocation[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listWorkflowInvocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listWorkflowInvocations + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('queryWorkflowInvocationActions', () => { + it('invokes queryWorkflowInvocationActions without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction() + ), + ]; + client.innerApiCalls.queryWorkflowInvocationActions = + stubSimpleCall(expectedResponse); + const [response] = await client.queryWorkflowInvocationActions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.queryWorkflowInvocationActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes queryWorkflowInvocationActions without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction() + ), + ]; + client.innerApiCalls.queryWorkflowInvocationActions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.queryWorkflowInvocationActions( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.dataform.v1alpha2.IWorkflowInvocationAction[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.queryWorkflowInvocationActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes queryWorkflowInvocationActions with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.queryWorkflowInvocationActions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.queryWorkflowInvocationActions(request), + expectedError + ); + assert( + (client.innerApiCalls.queryWorkflowInvocationActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes queryWorkflowInvocationActionsStream without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction() + ), + ]; + client.descriptors.page.queryWorkflowInvocationActions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.queryWorkflowInvocationActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction + ) => { + 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.queryWorkflowInvocationActions + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.queryWorkflowInvocationActions, + request + ) + ); + assert.strictEqual( + ( + client.descriptors.page.queryWorkflowInvocationActions + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes queryWorkflowInvocationActionsStream with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.queryWorkflowInvocationActions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.queryWorkflowInvocationActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.queryWorkflowInvocationActions + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.queryWorkflowInvocationActions, + request + ) + ); + assert.strictEqual( + ( + client.descriptors.page.queryWorkflowInvocationActions + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with queryWorkflowInvocationActions without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction() + ), + ]; + client.descriptors.page.queryWorkflowInvocationActions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1alpha2.IWorkflowInvocationAction[] = + []; + const iterable = client.queryWorkflowInvocationActionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.queryWorkflowInvocationActions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.queryWorkflowInvocationActions + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with queryWorkflowInvocationActions with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.queryWorkflowInvocationActions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.queryWorkflowInvocationActionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1alpha2.IWorkflowInvocationAction[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.queryWorkflowInvocationActions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.queryWorkflowInvocationActions + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub).getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.getIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub).getCall(0)); + }); + it('invokes setIamPolicy with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.setIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions( + request, + expectedOptions + ); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes testIamPermissions without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.TestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub).getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.testIamPermissions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.testIamPermissions(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('compilationResult', () => { + const fakePath = '/rendered/path/compilationResult'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + repository: 'repositoryValue', + compilation_result: 'compilationResultValue', + }; + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.compilationResultPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.compilationResultPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('compilationResultPath', () => { + const result = client.compilationResultPath( + 'projectValue', + 'locationValue', + 'repositoryValue', + 'compilationResultValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.compilationResultPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromCompilationResultName', () => { + const result = client.matchProjectFromCompilationResultName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.compilationResultPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromCompilationResultName', () => { + const result = client.matchLocationFromCompilationResultName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.compilationResultPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRepositoryFromCompilationResultName', () => { + const result = + client.matchRepositoryFromCompilationResultName(fakePath); + assert.strictEqual(result, 'repositoryValue'); + assert( + ( + client.pathTemplates.compilationResultPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCompilationResultFromCompilationResultName', () => { + const result = + client.matchCompilationResultFromCompilationResultName(fakePath); + assert.strictEqual(result, 'compilationResultValue'); + assert( + ( + client.pathTemplates.compilationResultPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('repository', () => { + const fakePath = '/rendered/path/repository'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + repository: 'repositoryValue', + }; + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.repositoryPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.repositoryPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('repositoryPath', () => { + const result = client.repositoryPath( + 'projectValue', + 'locationValue', + 'repositoryValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.repositoryPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromRepositoryName', () => { + const result = client.matchProjectFromRepositoryName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.repositoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromRepositoryName', () => { + const result = client.matchLocationFromRepositoryName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.repositoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRepositoryFromRepositoryName', () => { + const result = client.matchRepositoryFromRepositoryName(fakePath); + assert.strictEqual(result, 'repositoryValue'); + assert( + (client.pathTemplates.repositoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('workflowInvocation', () => { + const fakePath = '/rendered/path/workflowInvocation'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + repository: 'repositoryValue', + workflow_invocation: 'workflowInvocationValue', + }; + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.workflowInvocationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.workflowInvocationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('workflowInvocationPath', () => { + const result = client.workflowInvocationPath( + 'projectValue', + 'locationValue', + 'repositoryValue', + 'workflowInvocationValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.workflowInvocationPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromWorkflowInvocationName', () => { + const result = client.matchProjectFromWorkflowInvocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.workflowInvocationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromWorkflowInvocationName', () => { + const result = client.matchLocationFromWorkflowInvocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.workflowInvocationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRepositoryFromWorkflowInvocationName', () => { + const result = + client.matchRepositoryFromWorkflowInvocationName(fakePath); + assert.strictEqual(result, 'repositoryValue'); + assert( + ( + client.pathTemplates.workflowInvocationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchWorkflowInvocationFromWorkflowInvocationName', () => { + const result = + client.matchWorkflowInvocationFromWorkflowInvocationName(fakePath); + assert.strictEqual(result, 'workflowInvocationValue'); + assert( + ( + client.pathTemplates.workflowInvocationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('workspace', () => { + const fakePath = '/rendered/path/workspace'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + repository: 'repositoryValue', + workspace: 'workspaceValue', + }; + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.workspacePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.workspacePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('workspacePath', () => { + const result = client.workspacePath( + 'projectValue', + 'locationValue', + 'repositoryValue', + 'workspaceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.workspacePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromWorkspaceName', () => { + const result = client.matchProjectFromWorkspaceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.workspacePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromWorkspaceName', () => { + const result = client.matchLocationFromWorkspaceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.workspacePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRepositoryFromWorkspaceName', () => { + const result = client.matchRepositoryFromWorkspaceName(fakePath); + assert.strictEqual(result, 'repositoryValue'); + assert( + (client.pathTemplates.workspacePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchWorkspaceFromWorkspaceName', () => { + const result = client.matchWorkspaceFromWorkspaceName(fakePath); + assert.strictEqual(result, 'workspaceValue'); + assert( + (client.pathTemplates.workspacePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-dataform/tsconfig.json b/packages/google-cloud-dataform/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/packages/google-cloud-dataform/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2018", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/packages/google-cloud-dataform/webpack.config.js b/packages/google-cloud-dataform/webpack.config.js new file mode 100644 index 00000000000..0f07d5c10d2 --- /dev/null +++ b/packages/google-cloud-dataform/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: 'Dataform', + filename: './dataform.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/, + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader', + }, + ], + }, + mode: 'production', +}; From 8012a8f1cf26a031a4a73393ee3782403fd5315a Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Fri, 22 Jul 2022 14:19:27 -0700 Subject: [PATCH 03/80] feat: add initial samples (#2) * feat: add initial samples Co-authored-by: Owl Bot --- .../google-cloud-dataform/.repo-metadata.json | 15 +- .../google-cloud-dataform/CONTRIBUTING.md | 6 +- packages/google-cloud-dataform/README.md | 40 ++-- .../linkinator.config.json | 20 +- packages/google-cloud-dataform/package.json | 67 ++++++- .../cloud/dataform/v1alpha2/dataform.proto | 15 ++ .../google-cloud-dataform/protos/protos.d.ts | 30 +++ .../google-cloud-dataform/protos/protos.js | 186 +++++++++++++++++- .../google-cloud-dataform/protos/protos.json | 27 +++ .../samples/quickstart.js | 80 +++++--- .../samples/test/quickstart.js | 10 +- 11 files changed, 443 insertions(+), 53 deletions(-) diff --git a/packages/google-cloud-dataform/.repo-metadata.json b/packages/google-cloud-dataform/.repo-metadata.json index 82269c2038a..3a9fde6f925 100644 --- a/packages/google-cloud-dataform/.repo-metadata.json +++ b/packages/google-cloud-dataform/.repo-metadata.json @@ -1,3 +1,14 @@ { - "default_version": "v1alpha2" -} + "name": "dataform", + "name_pretty": "Dataform API", + "product_documentation": "https://dataform.co/", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/dataform/latest", + "issue_tracker": "https://github.com/googleapis/nodejs-dataform/issues", + "release_level": "beta", + "language": "nodejs", + "repo": "googleapis/nodejs-dataform", + "distribution_name": "@google-cloud/dataform", + "api_id": "dataform.googleapis.com", + "default_version": "v1alpha2", + "requires_billing": true + } \ No newline at end of file diff --git a/packages/google-cloud-dataform/CONTRIBUTING.md b/packages/google-cloud-dataform/CONTRIBUTING.md index 72c44cada5e..98e3fe6ba4f 100644 --- a/packages/google-cloud-dataform/CONTRIBUTING.md +++ b/packages/google-cloud-dataform/CONTRIBUTING.md @@ -39,7 +39,9 @@ accept your pull requests. ### Before you begin -1. [Select or create a Cloud Platform project][projects]. +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Dataform API API][enable_api]. 1. [Set up authentication with a service account][auth] so you can access the API from your local workstation. @@ -70,5 +72,5 @@ accept your pull requests. [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=dataform.googleapis.com [auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-dataform/README.md b/packages/google-cloud-dataform/README.md index b3536777562..2119dc0e917 100644 --- a/packages/google-cloud-dataform/README.md +++ b/packages/google-cloud-dataform/README.md @@ -2,9 +2,9 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [: Client](https://github.com/) - +# [Dataform API: Node.js Client](https://github.com/googleapis/nodejs-dataform) +[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/dataform.svg)](https://www.npmjs.org/package/@google-cloud/dataform) @@ -14,11 +14,11 @@ dataform client for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com//blob/master/CHANGELOG.md). - - +[the CHANGELOG](https://github.com/googleapis/nodejs-dataform/blob/main/CHANGELOG.md). -* [github.com/](https://github.com/) +* [Dataform API Node.js Client API Reference][client-docs] +* [Dataform API Documentation][product-docs] +* [github.com/googleapis/nodejs-dataform](https://github.com/googleapis/nodejs-dataform) Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in [Client Libraries Explained][explained]. @@ -29,7 +29,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. * [Quickstart](#quickstart) - + * [Before you begin](#before-you-begin) * [Installing the client library](#installing-the-client-library) @@ -39,6 +39,14 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. ## Quickstart +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Dataform API API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + ### Installing the client library ```bash @@ -49,6 +57,9 @@ npm install @google-cloud/dataform +The [Dataform API Node.js Client API Reference][client-docs] documentation +also contains samples. + ## Supported Node.js Versions Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). @@ -77,6 +88,11 @@ This library follows [Semantic Versioning](http://semver.org/). +This library is considered to be in **beta**. This means it is expected to be +mostly stable while we work toward a general availability release; however, +complete stability is not guaranteed. We will address issues and requests +against beta libraries with a high priority. + @@ -87,7 +103,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com//blob/master/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-dataform/blob/main/CONTRIBUTING.md). Please note that this `README.md`, the `samples/README.md`, and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) @@ -99,12 +115,12 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com//blob/master/LICENSE) - - +See [LICENSE](https://github.com/googleapis/nodejs-dataform/blob/main/LICENSE) +[client-docs]: https://cloud.google.com/nodejs/docs/reference/dataform/latest +[product-docs]: https://dataform.co/ [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=dataform.googleapis.com [auth]: https://cloud.google.com/docs/authentication/getting-started diff --git a/packages/google-cloud-dataform/linkinator.config.json b/packages/google-cloud-dataform/linkinator.config.json index 648c22bb61c..e51cbcc5cd4 100644 --- a/packages/google-cloud-dataform/linkinator.config.json +++ b/packages/google-cloud-dataform/linkinator.config.json @@ -1 +1,19 @@ -{"recurse":true,"skip":["https://codecov.io/gh/googleapis/","www.googleapis.com","img.shields.io"],"silent":true,"concurrency":5,"retry":true,"retryErrors":true,"retryErrorsCount":5,"retryErrorsJitter":3000} \ No newline at end of file +{ + "recurse": true, + "skip": [ + "https://codecov.io/gh/googleapis/", + "www.googleapis.com", + "img.shields.io", + "https://console.cloud.google.com/cloudshell", + "https://support.google.com", + "https://github.com/googleapis/nodejs-dataform/blob/master/CHANGELOG.md", + "https://cloud.google.com/nodejs/docs/reference/dataform/latest", + "https://github.com/googleapis/nodejs-dataform/blob/addSamples/CHANGELOG.md" + ], + "silent": true, + "concurrency": 5, + "retry": true, + "retryErrors": true, + "retryErrorsCount": 5, + "retryErrorsJitter": 3000 +} diff --git a/packages/google-cloud-dataform/package.json b/packages/google-cloud-dataform/package.json index 52e97c81d6c..3bd55d2d750 100644 --- a/packages/google-cloud-dataform/package.json +++ b/packages/google-cloud-dataform/package.json @@ -1 +1,66 @@ -{"name":"@google-cloud/dataform","version":"0.1.0","description":"dataform client for Node.js","repository":"googleapis/nodejs-dataform","license":"Apache-2.0","author":"Google LLC","main":"build/src/index.js","files":["build/src","build/protos"],"keywords":["google apis client","google api client","google apis","google api","google","google cloud platform","google cloud","cloud","google dataform","dataform","dataform service"],"scripts":{"clean":"gts clean","compile":"tsc -p . && cp -r protos build/","compile-protos":"compileProtos src","docs":"jsdoc -c .jsdoc.js","predocs-test":"npm run docs","docs-test":"linkinator docs","fix":"gts fix","lint":"gts check","prepare":"npm run compile-protos && npm run compile","system-test":"c8 mocha build/system-test","test":"c8 mocha build/test","samples-test":"cd samples/ && npm link ../ && npm test","prelint":"cd samples; npm link ../; npm i"},"dependencies":{"google-gax":"^2.12.0"},"devDependencies":{"@types/mocha":"^8.2.2","@types/node":"^14.14.44","@types/sinon":"^10.0.0","c8":"^7.7.2","gts":"^3.1.0","jsdoc":"^3.6.6","jsdoc-fresh":"^1.0.2","jsdoc-region-tag":"^1.0.6","linkinator":"^2.13.6","mocha":"^8.4.0","null-loader":"^4.0.1","pack-n-play":"^1.0.0-2","sinon":"^10.0.0","ts-loader":"^9.1.2","typescript":"^4.2.4","webpack":"^5.36.2","webpack-cli":"^4.7.0"},"engines":{"node":">=v12.0.0"}} \ No newline at end of file +{ + "name": "@google-cloud/dataform", + "version": "0.1.0", + "description": "dataform client for Node.js", + "repository": "googleapis/nodejs-dataform", + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google dataform", + "dataform", + "dataform service" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test", + "samples-test": "cd samples/ && npm link ../ && npm test", + "prelint": "cd samples; npm link ../; npm i" + }, + "dependencies": { + "google-gax": "^3.1.3" + }, + "devDependencies": { + "@types/mocha": "^8.2.2", + "@types/node": "^14.14.44", + "@types/sinon": "^10.0.0", + "c8": "^7.7.2", + "gts": "^3.1.0", + "jsdoc": "^3.6.6", + "jsdoc-fresh": "^1.0.2", + "jsdoc-region-tag": "^1.0.6", + "linkinator": "^2.13.6", + "mocha": "^8.4.0", + "null-loader": "^4.0.1", + "pack-n-play": "^1.0.0-2", + "sinon": "^10.0.0", + "ts-loader": "^9.1.2", + "typescript": "^4.2.4", + "webpack": "^5.36.2", + "webpack-cli": "^4.7.0" + }, + "engines": { + "node": ">=v12.0.0" + } +} diff --git a/packages/google-cloud-dataform/protos/google/cloud/dataform/v1alpha2/dataform.proto b/packages/google-cloud-dataform/protos/google/cloud/dataform/v1alpha2/dataform.proto index 45e5d7e5655..771acdb48ea 100644 --- a/packages/google-cloud-dataform/protos/google/cloud/dataform/v1alpha2/dataform.proto +++ b/packages/google-cloud-dataform/protos/google/cloud/dataform/v1alpha2/dataform.proto @@ -421,6 +421,9 @@ message ListRepositoriesResponse { // A token which can be sent as `page_token` to retrieve the next page. // If this field is omitted, there are no subsequent pages. string next_page_token = 2; + + // Locations which could not be reached. + repeated string unreachable = 3; } // `GetRepository` request message. @@ -547,6 +550,9 @@ message ListWorkspacesResponse { // A token, which can be sent as `page_token` to retrieve the next page. // If this field is omitted, there are no subsequent pages. string next_page_token = 2; + + // Locations which could not be reached. + repeated string unreachable = 3; } // `GetWorkspace` request message. @@ -1084,6 +1090,9 @@ message ListCompilationResultsResponse { // A token, which can be sent as `page_token` to retrieve the next page. // If this field is omitted, there are no subsequent pages. string next_page_token = 2; + + // Locations which could not be reached. + repeated string unreachable = 3; } // `GetCompilationResult` request message. @@ -1474,6 +1483,9 @@ message ListWorkflowInvocationsResponse { // A token, which can be sent as `page_token` to retrieve the next page. // If this field is omitted, there are no subsequent pages. string next_page_token = 2; + + // Locations which could not be reached. + repeated string unreachable = 3; } // `GetWorkflowInvocation` request message. @@ -1567,6 +1579,9 @@ message WorkflowInvocationAction { // Output only. This action's current state. State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. If and only if action's state is FAILED a failure reason is set. + string failure_reason = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. This action's timing details. // `start_time` will be set if the action is in [RUNNING, SUCCEEDED, // CANCELLED, FAILED] state. diff --git a/packages/google-cloud-dataform/protos/protos.d.ts b/packages/google-cloud-dataform/protos/protos.d.ts index 5152f2c65fc..9c130ba7482 100644 --- a/packages/google-cloud-dataform/protos/protos.d.ts +++ b/packages/google-cloud-dataform/protos/protos.d.ts @@ -1146,6 +1146,9 @@ export namespace google { /** ListRepositoriesResponse nextPageToken */ nextPageToken?: (string|null); + + /** ListRepositoriesResponse unreachable */ + unreachable?: (string[]|null); } /** Represents a ListRepositoriesResponse. */ @@ -1163,6 +1166,9 @@ export namespace google { /** ListRepositoriesResponse nextPageToken. */ public nextPageToken: string; + /** ListRepositoriesResponse unreachable. */ + public unreachable: string[]; + /** * Creates a new ListRepositoriesResponse instance using the specified properties. * @param [properties] Properties to set @@ -2010,6 +2016,9 @@ export namespace google { /** ListWorkspacesResponse nextPageToken */ nextPageToken?: (string|null); + + /** ListWorkspacesResponse unreachable */ + unreachable?: (string[]|null); } /** Represents a ListWorkspacesResponse. */ @@ -2027,6 +2036,9 @@ export namespace google { /** ListWorkspacesResponse nextPageToken. */ public nextPageToken: string; + /** ListWorkspacesResponse unreachable. */ + public unreachable: string[]; + /** * Creates a new ListWorkspacesResponse instance using the specified properties. * @param [properties] Properties to set @@ -5625,6 +5637,9 @@ export namespace google { /** ListCompilationResultsResponse nextPageToken */ nextPageToken?: (string|null); + + /** ListCompilationResultsResponse unreachable */ + unreachable?: (string[]|null); } /** Represents a ListCompilationResultsResponse. */ @@ -5642,6 +5657,9 @@ export namespace google { /** ListCompilationResultsResponse nextPageToken. */ public nextPageToken: string; + /** ListCompilationResultsResponse unreachable. */ + public unreachable: string[]; + /** * Creates a new ListCompilationResultsResponse instance using the specified properties. * @param [properties] Properties to set @@ -7525,6 +7543,9 @@ export namespace google { /** ListWorkflowInvocationsResponse nextPageToken */ nextPageToken?: (string|null); + + /** ListWorkflowInvocationsResponse unreachable */ + unreachable?: (string[]|null); } /** Represents a ListWorkflowInvocationsResponse. */ @@ -7542,6 +7563,9 @@ export namespace google { /** ListWorkflowInvocationsResponse nextPageToken. */ public nextPageToken: string; + /** ListWorkflowInvocationsResponse unreachable. */ + public unreachable: string[]; + /** * Creates a new ListWorkflowInvocationsResponse instance using the specified properties. * @param [properties] Properties to set @@ -7991,6 +8015,9 @@ export namespace google { /** WorkflowInvocationAction state */ state?: (google.cloud.dataform.v1alpha2.WorkflowInvocationAction.State|keyof typeof google.cloud.dataform.v1alpha2.WorkflowInvocationAction.State|null); + /** WorkflowInvocationAction failureReason */ + failureReason?: (string|null); + /** WorkflowInvocationAction invocationTiming */ invocationTiming?: (google.type.IInterval|null); @@ -8016,6 +8043,9 @@ export namespace google { /** WorkflowInvocationAction state. */ public state: (google.cloud.dataform.v1alpha2.WorkflowInvocationAction.State|keyof typeof google.cloud.dataform.v1alpha2.WorkflowInvocationAction.State); + /** WorkflowInvocationAction failureReason. */ + public failureReason: string; + /** WorkflowInvocationAction invocationTiming. */ public invocationTiming?: (google.type.IInterval|null); diff --git a/packages/google-cloud-dataform/protos/protos.js b/packages/google-cloud-dataform/protos/protos.js index 5f0da0b0c8b..b74a4da2973 100644 --- a/packages/google-cloud-dataform/protos/protos.js +++ b/packages/google-cloud-dataform/protos/protos.js @@ -2083,6 +2083,7 @@ * @interface IListRepositoriesResponse * @property {Array.|null} [repositories] ListRepositoriesResponse repositories * @property {string|null} [nextPageToken] ListRepositoriesResponse nextPageToken + * @property {Array.|null} [unreachable] ListRepositoriesResponse unreachable */ /** @@ -2095,6 +2096,7 @@ */ function ListRepositoriesResponse(properties) { this.repositories = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2117,6 +2119,14 @@ */ ListRepositoriesResponse.prototype.nextPageToken = ""; + /** + * ListRepositoriesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesResponse + * @instance + */ + ListRepositoriesResponse.prototype.unreachable = $util.emptyArray; + /** * Creates a new ListRepositoriesResponse instance using the specified properties. * @function create @@ -2146,6 +2156,9 @@ $root.google.cloud.dataform.v1alpha2.Repository.encode(message.repositories[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; }; @@ -2188,6 +2201,11 @@ 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; @@ -2235,6 +2253,13 @@ 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; }; @@ -2262,6 +2287,13 @@ } if (object.nextPageToken != null) message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.dataform.v1alpha2.ListRepositoriesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } return message; }; @@ -2278,8 +2310,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.repositories = []; + object.unreachable = []; + } if (options.defaults) object.nextPageToken = ""; if (message.repositories && message.repositories.length) { @@ -2289,6 +2323,11 @@ } 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; }; @@ -4021,6 +4060,7 @@ * @interface IListWorkspacesResponse * @property {Array.|null} [workspaces] ListWorkspacesResponse workspaces * @property {string|null} [nextPageToken] ListWorkspacesResponse nextPageToken + * @property {Array.|null} [unreachable] ListWorkspacesResponse unreachable */ /** @@ -4033,6 +4073,7 @@ */ function ListWorkspacesResponse(properties) { this.workspaces = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4055,6 +4096,14 @@ */ ListWorkspacesResponse.prototype.nextPageToken = ""; + /** + * ListWorkspacesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesResponse + * @instance + */ + ListWorkspacesResponse.prototype.unreachable = $util.emptyArray; + /** * Creates a new ListWorkspacesResponse instance using the specified properties. * @function create @@ -4084,6 +4133,9 @@ $root.google.cloud.dataform.v1alpha2.Workspace.encode(message.workspaces[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; }; @@ -4126,6 +4178,11 @@ 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; @@ -4173,6 +4230,13 @@ 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; }; @@ -4200,6 +4264,13 @@ } if (object.nextPageToken != null) message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.dataform.v1alpha2.ListWorkspacesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } return message; }; @@ -4216,8 +4287,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.workspaces = []; + object.unreachable = []; + } if (options.defaults) object.nextPageToken = ""; if (message.workspaces && message.workspaces.length) { @@ -4227,6 +4300,11 @@ } 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; }; @@ -12180,6 +12258,7 @@ * @interface IListCompilationResultsResponse * @property {Array.|null} [compilationResults] ListCompilationResultsResponse compilationResults * @property {string|null} [nextPageToken] ListCompilationResultsResponse nextPageToken + * @property {Array.|null} [unreachable] ListCompilationResultsResponse unreachable */ /** @@ -12192,6 +12271,7 @@ */ function ListCompilationResultsResponse(properties) { this.compilationResults = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12214,6 +12294,14 @@ */ ListCompilationResultsResponse.prototype.nextPageToken = ""; + /** + * ListCompilationResultsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsResponse + * @instance + */ + ListCompilationResultsResponse.prototype.unreachable = $util.emptyArray; + /** * Creates a new ListCompilationResultsResponse instance using the specified properties. * @function create @@ -12243,6 +12331,9 @@ $root.google.cloud.dataform.v1alpha2.CompilationResult.encode(message.compilationResults[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; }; @@ -12285,6 +12376,11 @@ 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; @@ -12332,6 +12428,13 @@ 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; }; @@ -12359,6 +12462,13 @@ } if (object.nextPageToken != null) message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.dataform.v1alpha2.ListCompilationResultsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } return message; }; @@ -12375,8 +12485,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.compilationResults = []; + object.unreachable = []; + } if (options.defaults) object.nextPageToken = ""; if (message.compilationResults && message.compilationResults.length) { @@ -12386,6 +12498,11 @@ } 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; }; @@ -17263,6 +17380,7 @@ * @interface IListWorkflowInvocationsResponse * @property {Array.|null} [workflowInvocations] ListWorkflowInvocationsResponse workflowInvocations * @property {string|null} [nextPageToken] ListWorkflowInvocationsResponse nextPageToken + * @property {Array.|null} [unreachable] ListWorkflowInvocationsResponse unreachable */ /** @@ -17275,6 +17393,7 @@ */ function ListWorkflowInvocationsResponse(properties) { this.workflowInvocations = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17297,6 +17416,14 @@ */ ListWorkflowInvocationsResponse.prototype.nextPageToken = ""; + /** + * ListWorkflowInvocationsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse + * @instance + */ + ListWorkflowInvocationsResponse.prototype.unreachable = $util.emptyArray; + /** * Creates a new ListWorkflowInvocationsResponse instance using the specified properties. * @function create @@ -17326,6 +17453,9 @@ $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.encode(message.workflowInvocations[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; }; @@ -17368,6 +17498,11 @@ 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; @@ -17415,6 +17550,13 @@ 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; }; @@ -17442,6 +17584,13 @@ } if (object.nextPageToken != null) message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } return message; }; @@ -17458,8 +17607,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.workflowInvocations = []; + object.unreachable = []; + } if (options.defaults) object.nextPageToken = ""; if (message.workflowInvocations && message.workflowInvocations.length) { @@ -17469,6 +17620,11 @@ } 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; }; @@ -18271,6 +18427,7 @@ * @property {google.cloud.dataform.v1alpha2.ITarget|null} [target] WorkflowInvocationAction target * @property {google.cloud.dataform.v1alpha2.ITarget|null} [canonicalTarget] WorkflowInvocationAction canonicalTarget * @property {google.cloud.dataform.v1alpha2.WorkflowInvocationAction.State|null} [state] WorkflowInvocationAction state + * @property {string|null} [failureReason] WorkflowInvocationAction failureReason * @property {google.type.IInterval|null} [invocationTiming] WorkflowInvocationAction invocationTiming * @property {google.cloud.dataform.v1alpha2.WorkflowInvocationAction.IBigQueryAction|null} [bigqueryAction] WorkflowInvocationAction bigqueryAction */ @@ -18314,6 +18471,14 @@ */ WorkflowInvocationAction.prototype.state = 0; + /** + * WorkflowInvocationAction failureReason. + * @member {string} failureReason + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.failureReason = ""; + /** * WorkflowInvocationAction invocationTiming. * @member {google.type.IInterval|null|undefined} invocationTiming @@ -18364,6 +18529,8 @@ $root.google.type.Interval.encode(message.invocationTiming, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.bigqueryAction != null && Object.hasOwnProperty.call(message, "bigqueryAction")) $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction.encode(message.bigqueryAction, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.failureReason != null && Object.hasOwnProperty.call(message, "failureReason")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.failureReason); return writer; }; @@ -18407,6 +18574,9 @@ case 4: message.state = reader.int32(); break; + case 7: + message.failureReason = reader.string(); + break; case 5: message.invocationTiming = $root.google.type.Interval.decode(reader, reader.uint32()); break; @@ -18471,6 +18641,9 @@ case 6: break; } + if (message.failureReason != null && message.hasOwnProperty("failureReason")) + if (!$util.isString(message.failureReason)) + return "failureReason: string expected"; if (message.invocationTiming != null && message.hasOwnProperty("invocationTiming")) { var error = $root.google.type.Interval.verify(message.invocationTiming); if (error) @@ -18536,6 +18709,8 @@ message.state = 6; break; } + if (object.failureReason != null) + message.failureReason = String(object.failureReason); if (object.invocationTiming != null) { if (typeof object.invocationTiming !== "object") throw TypeError(".google.cloud.dataform.v1alpha2.WorkflowInvocationAction.invocationTiming: object expected"); @@ -18568,6 +18743,7 @@ object.state = options.enums === String ? "PENDING" : 0; object.invocationTiming = null; object.bigqueryAction = null; + object.failureReason = ""; } if (message.target != null && message.hasOwnProperty("target")) object.target = $root.google.cloud.dataform.v1alpha2.Target.toObject(message.target, options); @@ -18579,6 +18755,8 @@ object.invocationTiming = $root.google.type.Interval.toObject(message.invocationTiming, options); if (message.bigqueryAction != null && message.hasOwnProperty("bigqueryAction")) object.bigqueryAction = $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction.toObject(message.bigqueryAction, options); + if (message.failureReason != null && message.hasOwnProperty("failureReason")) + object.failureReason = message.failureReason; return object; }; diff --git a/packages/google-cloud-dataform/protos/protos.json b/packages/google-cloud-dataform/protos/protos.json index 94471b3223f..56a1b9635d2 100644 --- a/packages/google-cloud-dataform/protos/protos.json +++ b/packages/google-cloud-dataform/protos/protos.json @@ -746,6 +746,11 @@ "nextPageToken": { "type": "string", "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 } } }, @@ -907,6 +912,11 @@ "nextPageToken": { "type": "string", "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 } } }, @@ -1636,6 +1646,11 @@ "nextPageToken": { "type": "string", "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 } } }, @@ -2124,6 +2139,11 @@ "nextPageToken": { "type": "string", "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 } } }, @@ -2205,6 +2225,13 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "failureReason": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "invocationTiming": { "type": "google.type.Interval", "id": 5, diff --git a/packages/google-cloud-dataform/samples/quickstart.js b/packages/google-cloud-dataform/samples/quickstart.js index a3748a38e8b..ea157a32744 100644 --- a/packages/google-cloud-dataform/samples/quickstart.js +++ b/packages/google-cloud-dataform/samples/quickstart.js @@ -1,3 +1,5 @@ +// 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 @@ -10,41 +12,71 @@ // 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'; -async function main() { - - // [START nodejs_dataform_quickstart] - // Imports the Google Cloud client library +function main(parent) { + // [START dataform_v1alpha2_generated_Dataform_ListRepositories_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The location in which to list repositories. Must be in the format + * `projects/* /locations/*`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of repositories to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListRepositories` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListRepositories` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + */ + // const orderBy = 'abc123' + /** + * Optional. Filter for the returned list. + */ + // const filter = 'abc123' - // remove this line after package is released - // eslint-disable-next-line node/no-missing-require - const {DataformClient} = require('@google-cloud/dataform'); + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1alpha2; - // TODO(developer): replace with your prefered project ID. - // const projectId = 'my-project' + // Instantiates a client + const dataformClient = new DataformClient(); - // Creates a client - // eslint-disable-next-line no-unused-vars - const client = new {DataformClient}(); + async function callListRepositories() { + // Construct request + const request = { + parent, + }; - //TODO(library generator): write the actual function you will be testing - async function doSomething() { - console.log('DPE! Change this code so that it shows how to use the library! See comments below on structure.') - // const [thing] = await client.methodName({ - // }); - // console.info(thing); + // Run request + const iterable = await dataformClient.listRepositoriesAsync(request); + for await (const response of iterable) { + console.log(response); + } } - doSomething(); - // [END nodejs_dataform_quickstart] + + callListRepositories(); + // [END dataform_v1alpha2_generated_Dataform_ListRepositories_async] } -main(...process.argv.slice(2)).catch(err => { - console.error(err.message); - process.exitCode = 1; -}); process.on('unhandledRejection', err => { console.error(err.message); process.exitCode = 1; }); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/test/quickstart.js b/packages/google-cloud-dataform/samples/test/quickstart.js index 6bc50cdc0a3..4b0350ada64 100644 --- a/packages/google-cloud-dataform/samples/test/quickstart.js +++ b/packages/google-cloud-dataform/samples/test/quickstart.js @@ -29,11 +29,9 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const cwd = path.join(__dirname, '..'); -const client = new {DataformClient}(); +const client = new DataformClient(); describe('Quickstart', () => { - //TODO: remove this if not using the projectId - // eslint-disable-next-line no-unused-vars let projectId; before(async () => { @@ -42,12 +40,10 @@ describe('Quickstart', () => { }); it('should run quickstart', async () => { - //TODO: remove this line - // eslint-disable-next-line no-unused-vars const stdout = execSync( - `node ./quickstart.js`, + `node ./quickstart.js projects/${projectId}/locations/us-central1`, {cwd} ); - //assert(stdout, stdout !== null); + assert.deepStrictEqual(stdout, ''); }); }); From 71fa172a54935d1916fad5542ef301f04cc6d1eb Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 22 Jul 2022 14:26:01 -0700 Subject: [PATCH 04/80] chore(main): release 0.1.0 (#1) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-dataform/CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 packages/google-cloud-dataform/CHANGELOG.md diff --git a/packages/google-cloud-dataform/CHANGELOG.md b/packages/google-cloud-dataform/CHANGELOG.md new file mode 100644 index 00000000000..e3af8e036ef --- /dev/null +++ b/packages/google-cloud-dataform/CHANGELOG.md @@ -0,0 +1,10 @@ +# Changelog + +## 0.1.0 (2022-07-22) + + +### Features + +* add initial samples and tests ([fee86a3](https://github.com/googleapis/nodejs-dataform/commit/fee86a37ea438da3285823db24ae52ddfbc4cca0)) +* add templated files from docker image ([3142f78](https://github.com/googleapis/nodejs-dataform/commit/3142f780f4ce5403208ef2c8d248f5c62a05507c)) +* initial stub of library ([5a68c4b](https://github.com/googleapis/nodejs-dataform/commit/5a68c4b37a9050d395b946cee40cb4ca255dd16c)) From 1593303bb862b8d6fa42401d716b0cb184f56832 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 25 Jul 2022 19:28:11 +0200 Subject: [PATCH 05/80] chore(deps): update dependency linkinator to v4 (#7) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [linkinator](https://togithub.com/JustinBeckwith/linkinator) | [`^2.13.6` -> `^4.0.0`](https://renovatebot.com/diffs/npm/linkinator/2.16.2/4.0.2) | [![age](https://badges.renovateapi.com/packages/npm/linkinator/4.0.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/linkinator/4.0.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/linkinator/4.0.2/compatibility-slim/2.16.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/linkinator/4.0.2/confidence-slim/2.16.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
JustinBeckwith/linkinator ### [`v4.0.2`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v4.0.2) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v4.0.1...v4.0.2) ##### Bug Fixes - address srcset parsing with multiple spaces ([#​512](https://togithub.com/JustinBeckwith/linkinator/issues/512)) ([fefb5b6](https://togithub.com/JustinBeckwith/linkinator/commit/fefb5b6734fc4ab335793358c5f491338ecbeb90)) ### [`v4.0.1`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v4.0.1) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v4.0.0...v4.0.1) ##### Bug Fixes - properly parse srcset attribute ([#​510](https://togithub.com/JustinBeckwith/linkinator/issues/510)) ([9a8a83c](https://togithub.com/JustinBeckwith/linkinator/commit/9a8a83c35182b3cd4daee62a00f156767fe5c6a7)) ### [`v4.0.0`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v4.0.0) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.1.0...v4.0.0) ##### Features - create new release with notes ([#​508](https://togithub.com/JustinBeckwith/linkinator/issues/508)) ([2cab633](https://togithub.com/JustinBeckwith/linkinator/commit/2cab633c9659eb10794a4bac06f8b0acdc3e2c0c)) ##### BREAKING CHANGES - The commits in [#​507](https://togithub.com/JustinBeckwith/linkinator/issues/507) and [#​506](https://togithub.com/JustinBeckwith/linkinator/issues/506) both had breaking changes. They included dropping support for Node.js 12.x and updating the CSV export to be streaming, and to use a new way of writing the CSV file. This is an empty to commit using the `BREAKING CHANGE` format in the commit message to ensure a release is triggered. ### [`v3.1.0`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.1.0) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.6...v3.1.0) ##### Features - allow --skip to be defined multiple times ([#​399](https://togithub.com/JustinBeckwith/linkinator/issues/399)) ([5ca5a46](https://togithub.com/JustinBeckwith/linkinator/commit/5ca5a461508e688de12e5ae6b4cfb6565f832ebf)) ### [`v3.0.6`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.6) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.5...v3.0.6) ##### Bug Fixes - **deps:** upgrade node-glob to v8 ([#​397](https://togithub.com/JustinBeckwith/linkinator/issues/397)) ([d334dc6](https://togithub.com/JustinBeckwith/linkinator/commit/d334dc6734cd7c2b73d7ed3dea0550a6c3072ad5)) ### [`v3.0.5`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.5) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.4...v3.0.5) ##### Bug Fixes - **deps:** upgrade to htmlparser2 v8.0.1 ([#​396](https://togithub.com/JustinBeckwith/linkinator/issues/396)) ([ba3b9a8](https://togithub.com/JustinBeckwith/linkinator/commit/ba3b9a8a9b19d39af6ed91790135e833b80c1eb6)) ### [`v3.0.4`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.4) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.3...v3.0.4) ##### Bug Fixes - **deps:** update dependency gaxios to v5 ([#​391](https://togithub.com/JustinBeckwith/linkinator/issues/391)) ([48af50e](https://togithub.com/JustinBeckwith/linkinator/commit/48af50e787731204aeb7eff41325c62291311e45)) ### [`v3.0.3`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.3) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.2...v3.0.3) ##### Bug Fixes - export getConfig from index ([#​371](https://togithub.com/JustinBeckwith/linkinator/issues/371)) ([0bc0355](https://togithub.com/JustinBeckwith/linkinator/commit/0bc0355c7e2ea457f247e6b52d1577b8c4ecb3a1)) ### [`v3.0.2`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.2) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.1...v3.0.2) ##### Bug Fixes - allow server root with trailing slash ([#​370](https://togithub.com/JustinBeckwith/linkinator/issues/370)) ([8adf6b0](https://togithub.com/JustinBeckwith/linkinator/commit/8adf6b025fda250e38461f1cdad40fe08c3b3b7c)) ### [`v3.0.1`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.1) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.0...v3.0.1) ##### Bug Fixes - decode path parts in local web server ([#​369](https://togithub.com/JustinBeckwith/linkinator/issues/369)) ([4696a0c](https://togithub.com/JustinBeckwith/linkinator/commit/4696a0c38c341b178ed815f47371fca955979feb)) ### [`v3.0.0`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.0) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v2.16.2...v3.0.0) ##### Bug Fixes - **deps:** update dependency chalk to v5 ([#​362](https://togithub.com/JustinBeckwith/linkinator/issues/362)) ([4b17a8d](https://togithub.com/JustinBeckwith/linkinator/commit/4b17a8d87b649eaf813428f8ee6955e1d21dae4f)) - feat!: convert to es modules, drop node 10 ([#​359](https://togithub.com/JustinBeckwith/linkinator/issues/359)) ([efee299](https://togithub.com/JustinBeckwith/linkinator/commit/efee299ab8a805accef751eecf8538915a4e7783)), closes [#​359](https://togithub.com/JustinBeckwith/linkinator/issues/359) ##### BREAKING CHANGES - this module now requires node.js 12 and above, and has moved to es modules by default.
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-dataform). --- packages/google-cloud-dataform/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-dataform/package.json b/packages/google-cloud-dataform/package.json index 3bd55d2d750..7b634cfe023 100644 --- a/packages/google-cloud-dataform/package.json +++ b/packages/google-cloud-dataform/package.json @@ -50,7 +50,7 @@ "jsdoc": "^3.6.6", "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.6", - "linkinator": "^2.13.6", + "linkinator": "^4.0.0", "mocha": "^8.4.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", From e0ede0cbb6c3a11a4a8615f308b8c1c5d2c42922 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 25 Jul 2022 19:32:24 +0200 Subject: [PATCH 06/80] chore(deps): update dependency @types/mocha to v9 (#3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/mocha](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^8.2.2` -> `^9.0.0`](https://renovatebot.com/diffs/npm/@types%2fmocha/8.2.3/9.1.1) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/compatibility-slim/8.2.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/confidence-slim/8.2.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-dataform). --- packages/google-cloud-dataform/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-dataform/package.json b/packages/google-cloud-dataform/package.json index 7b634cfe023..c8eb020076b 100644 --- a/packages/google-cloud-dataform/package.json +++ b/packages/google-cloud-dataform/package.json @@ -42,7 +42,7 @@ "google-gax": "^3.1.3" }, "devDependencies": { - "@types/mocha": "^8.2.2", + "@types/mocha": "^9.0.0", "@types/node": "^14.14.44", "@types/sinon": "^10.0.0", "c8": "^7.7.2", From 618d66e6fb26254777d8b95efd27a3aaca43d175 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 25 Jul 2022 19:38:13 +0200 Subject: [PATCH 07/80] chore(deps): update dependency mocha to v10 (#8) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [mocha](https://mochajs.org/) ([source](https://togithub.com/mochajs/mocha)) | [`^8.0.0` -> `^10.0.0`](https://renovatebot.com/diffs/npm/mocha/8.4.0/10.0.0) | [![age](https://badges.renovateapi.com/packages/npm/mocha/10.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/mocha/10.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/mocha/10.0.0/compatibility-slim/8.4.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/mocha/10.0.0/confidence-slim/8.4.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
mochajs/mocha ### [`v10.0.0`](https://togithub.com/mochajs/mocha/blob/HEAD/CHANGELOG.md#​1000--2022-05-01) [Compare Source](https://togithub.com/mochajs/mocha/compare/v9.2.2...v10.0.0) #### :boom: Breaking Changes - [#​4845](https://togithub.com/mochajs/mocha/issues/4845): **Drop Node.js v12.x support** ([**@​juergba**](https://togithub.com/juergba)) - [#​4848](https://togithub.com/mochajs/mocha/issues/4848): Drop Internet-Explorer-11 support ([**@​juergba**](https://togithub.com/juergba)) - [#​4857](https://togithub.com/mochajs/mocha/issues/4857): Drop AMD/RequireJS support ([**@​juergba**](https://togithub.com/juergba)) - [#​4866](https://togithub.com/mochajs/mocha/issues/4866): Drop Growl notification support ([**@​juergba**](https://togithub.com/juergba)) - [#​4863](https://togithub.com/mochajs/mocha/issues/4863): Rename executable `bin/mocha` to `bin/mocha.js` ([**@​juergba**](https://togithub.com/juergba)) - [#​4865](https://togithub.com/mochajs/mocha/issues/4865): `--ignore` option in Windows: upgrade Minimatch ([**@​juergba**](https://togithub.com/juergba)) - [#​4861](https://togithub.com/mochajs/mocha/issues/4861): Remove deprecated `Runner` signature ([**@​juergba**](https://togithub.com/juergba)) #### :nut_and_bolt: Other - [#​4878](https://togithub.com/mochajs/mocha/issues/4878): Update production dependencies ([**@​juergba**](https://togithub.com/juergba)) - [#​4876](https://togithub.com/mochajs/mocha/issues/4876): Add Node.js v18 to CI test matrix ([**@​outsideris**](https://togithub.com/outsideris)) - [#​4852](https://togithub.com/mochajs/mocha/issues/4852): Replace deprecated `String.prototype.substr()` ([**@​CommanderRoot**](https://togithub.com/CommanderRoot)) Also thanks to [**@​ea2305**](https://togithub.com/ea2305) and [**@​SukkaW**](https://togithub.com/SukkaW) for improvements to our documentation. ### [`v9.2.2`](https://togithub.com/mochajs/mocha/blob/HEAD/CHANGELOG.md#​922--2022-03-11) [Compare Source](https://togithub.com/mochajs/mocha/compare/v9.2.1...v9.2.2) #### :bug: Fixes - [#​4842](https://togithub.com/mochajs/mocha/issues/4842): Loading of reporter throws wrong error ([**@​juergba**](https://togithub.com/juergba)) - [#​4839](https://togithub.com/mochajs/mocha/issues/4839): `dry-run`: prevent potential call-stack crash ([**@​juergba**](https://togithub.com/juergba)) #### :nut_and_bolt: Other - [#​4843](https://togithub.com/mochajs/mocha/issues/4843): Update production dependencies ([**@​juergba**](https://togithub.com/juergba)) ### [`v9.2.1`](https://togithub.com/mochajs/mocha/blob/HEAD/CHANGELOG.md#​921--2022-02-19) [Compare Source](https://togithub.com/mochajs/mocha/compare/v9.2.0...v9.2.1) #### :bug: Fixes - [#​4832](https://togithub.com/mochajs/mocha/issues/4832): Loading of config files throws wrong error ([**@​juergba**](https://togithub.com/juergba)) - [#​4799](https://togithub.com/mochajs/mocha/issues/4799): Reporter: configurable `maxDiffSize` reporter-option ([**@​norla**](https://togithub.com/norla)) ### [`v9.2.0`](https://togithub.com/mochajs/mocha/blob/HEAD/CHANGELOG.md#​920--2022-01-24) [Compare Source](https://togithub.com/mochajs/mocha/compare/v9.1.4...v9.2.0) #### :tada: Enhancements - [#​4813](https://togithub.com/mochajs/mocha/issues/4813): Parallel: assign each worker a worker-id ([**@​forty**](https://togithub.com/forty)) #### :nut_and_bolt: Other - [#​4818](https://togithub.com/mochajs/mocha/issues/4818): Update production dependencies ([**@​juergba**](https://togithub.com/juergba)) ### [`v9.1.4`](https://togithub.com/mochajs/mocha/blob/HEAD/CHANGELOG.md#​914--2022-01-14) [Compare Source](https://togithub.com/mochajs/mocha/compare/v9.1.3...v9.1.4) #### :bug: Fixes - [#​4807](https://togithub.com/mochajs/mocha/issues/4807): `import` throws wrong error if loader is used ([**@​giltayar**](https://togithub.com/giltayar)) #### :nut_and_bolt: Other - [#​4777](https://togithub.com/mochajs/mocha/issues/4777): Add Node v17 to CI test matrix ([**@​outsideris**](https://togithub.com/outsideris)) ### [`v9.1.3`](https://togithub.com/mochajs/mocha/blob/HEAD/CHANGELOG.md#​913--2021-10-15) [Compare Source](https://togithub.com/mochajs/mocha/compare/v9.1.2...v9.1.3) #### :bug: Fixes - [#​4769](https://togithub.com/mochajs/mocha/issues/4769): Browser: re-enable `bdd` ES6 style import ([**@​juergba**](https://togithub.com/juergba)) #### :nut_and_bolt: Other - [#​4764](https://togithub.com/mochajs/mocha/issues/4764): Revert deprecation of `EVENT_SUITE_ADD_*` events ([**@​beatfactor**](https://togithub.com/beatfactor)) ### [`v9.1.2`](https://togithub.com/mochajs/mocha/blob/HEAD/CHANGELOG.md#​912--2021-09-25) [Compare Source](https://togithub.com/mochajs/mocha/compare/v9.1.1...v9.1.2) #### :bug: Fixes - [#​4746](https://togithub.com/mochajs/mocha/issues/4746): Browser: stop using all global vars in `browser-entry.js` ([**@​PaperStrike**](https://togithub.com/PaperStrike)) #### :nut_and_bolt: Other - [#​4754](https://togithub.com/mochajs/mocha/issues/4754): Remove dependency wide-align ([**@​juergba**](https://togithub.com/juergba)) - [#​4736](https://togithub.com/mochajs/mocha/issues/4736): ESM: remove code for Node versions <10 ([**@​juergba**](https://togithub.com/juergba)) ### [`v9.1.1`](https://togithub.com/mochajs/mocha/blob/HEAD/CHANGELOG.md#​911--2021-08-28) [Compare Source](https://togithub.com/mochajs/mocha/compare/v9.1.0...v9.1.1) #### :bug: Fixes - [#​4623](https://togithub.com/mochajs/mocha/issues/4623): `XUNIT` and `JSON` reporter crash in `parallel` mode ([**@​curtisman**](https://togithub.com/curtisman)) ### [`v9.1.0`](https://togithub.com/mochajs/mocha/blob/HEAD/CHANGELOG.md#​910--2021-08-20) [Compare Source](https://togithub.com/mochajs/mocha/compare/v9.0.3...v9.1.0) #### :tada: Enhancements - [#​4716](https://togithub.com/mochajs/mocha/issues/4716): Add new option `--fail-zero` ([**@​juergba**](https://togithub.com/juergba)) - [#​4691](https://togithub.com/mochajs/mocha/issues/4691): Add new option `--node-option` ([**@​juergba**](https://togithub.com/juergba)) - [#​4607](https://togithub.com/mochajs/mocha/issues/4607): Add output option to `JSON` reporter ([**@​dorny**](https://togithub.com/dorny)) ### [`v9.0.3`](https://togithub.com/mochajs/mocha/blob/HEAD/CHANGELOG.md#​903--2021-07-25) [Compare Source](https://togithub.com/mochajs/mocha/compare/v9.0.2...v9.0.3) #### :bug: Fixes - [#​4702](https://togithub.com/mochajs/mocha/issues/4702): Error rethrow from cwd-relative path while loading `.mocharc.js` ([**@​kirill-golovan**](https://togithub.com/kirill-golovan)) - [#​4688](https://togithub.com/mochajs/mocha/issues/4688): Usage of custom interface in parallel mode ([**@​juergba**](https://togithub.com/juergba)) - [#​4687](https://togithub.com/mochajs/mocha/issues/4687): ESM: don't swallow `MODULE_NOT_FOUND` errors in case of `type:module` ([**@​giltayar**](https://togithub.com/giltayar)) ### [`v9.0.2`](https://togithub.com/mochajs/mocha/blob/HEAD/CHANGELOG.md#​902--2021-07-03) [Compare Source](https://togithub.com/mochajs/mocha/compare/v9.0.1...v9.0.2) #### :bug: Fixes - [#​4668](https://togithub.com/mochajs/mocha/issues/4668): ESM: make `--require ` work with new `import`-first loading ([**@​giltayar**](https://togithub.com/giltayar)) #### :nut_and_bolt: Other - [#​4674](https://togithub.com/mochajs/mocha/issues/4674): Update production dependencies ([**@​juergba**](https://togithub.com/juergba)) ### [`v9.0.1`](https://togithub.com/mochajs/mocha/blob/HEAD/CHANGELOG.md#​901--2021-06-18) [Compare Source](https://togithub.com/mochajs/mocha/compare/v9.0.0...v9.0.1) #### :nut_and_bolt: Other - [#​4657](https://togithub.com/mochajs/mocha/issues/4657): Browser: add separate bundle for modern browsers ([**@​juergba**](https://togithub.com/juergba)) We added a separate browser bundle `mocha-es2018.js` in javascript ES2018, as we skipped the transpilation down to ES5. This is an **experimental step towards freezing Mocha's support of IE11**. - [#​4653](https://togithub.com/mochajs/mocha/issues/4653): ESM: proper version check in `hasStableEsmImplementation` ([**@​alexander-fenster**](https://togithub.com/alexander-fenster)) ### [`v9.0.0`](https://togithub.com/mochajs/mocha/blob/HEAD/CHANGELOG.md#​900--2021-06-07) [Compare Source](https://togithub.com/mochajs/mocha/compare/v8.4.0...v9.0.0) #### :boom: Breaking Changes - [#​4633](https://togithub.com/mochajs/mocha/issues/4633): **Drop Node.js v10.x support** ([**@​juergba**](https://togithub.com/juergba)) - [#​4635](https://togithub.com/mochajs/mocha/issues/4635): `import`-first loading of test files ([**@​giltayar**](https://togithub.com/giltayar)) **Mocha is going ESM-first!** This means that it will now use ESM `import(test_file)` to load the test files, instead of the CommonJS `require(test_file)`. This is not a problem, as `import` can also load most files that `require` does. In the rare cases where this fails, it will fallback to `require(...)`. This ESM-first approach is the next step in Mocha's ESM migration, and allows ESM loaders to load and transform the test file. - [#​4636](https://togithub.com/mochajs/mocha/issues/4636): Remove deprecated `utils.lookupFiles()` ([**@​juergba**](https://togithub.com/juergba)) - [#​4638](https://togithub.com/mochajs/mocha/issues/4638): Limit the size of `actual`/`expected` for `diff` generation ([**@​juergba**](https://togithub.com/juergba)) - [#​4389](https://togithub.com/mochajs/mocha/issues/4389): Refactoring: Consuming log-symbols alternate to code for win32 in reporters/base ([**@​MoonSupport**](https://togithub.com/MoonSupport)) #### :tada: Enhancements - [#​4640](https://togithub.com/mochajs/mocha/issues/4640): Add new option `--dry-run` ([**@​juergba**](https://togithub.com/juergba)) #### :bug: Fixes - [#​4128](https://togithub.com/mochajs/mocha/issues/4128): Fix: control stringification of error message ([**@​syeutyu**](https://togithub.com/syeutyu)) #### :nut_and_bolt: Other - [#​4646](https://togithub.com/mochajs/mocha/issues/4646): Deprecate `Runner(suite: Suite, delay: boolean)` signature ([**@​juergba**](https://togithub.com/juergba)) - [#​4643](https://togithub.com/mochajs/mocha/issues/4643): Update production dependencies ([**@​juergba**](https://togithub.com/juergba))
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-dataform). --- packages/google-cloud-dataform/package.json | 2 +- packages/google-cloud-dataform/samples/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-dataform/package.json b/packages/google-cloud-dataform/package.json index c8eb020076b..5c9ead60d8f 100644 --- a/packages/google-cloud-dataform/package.json +++ b/packages/google-cloud-dataform/package.json @@ -51,7 +51,7 @@ "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.6", "linkinator": "^4.0.0", - "mocha": "^8.4.0", + "mocha": "^10.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", "sinon": "^10.0.0", diff --git a/packages/google-cloud-dataform/samples/package.json b/packages/google-cloud-dataform/samples/package.json index c5023c50c1a..0f7efc41d26 100644 --- a/packages/google-cloud-dataform/samples/package.json +++ b/packages/google-cloud-dataform/samples/package.json @@ -18,6 +18,6 @@ "devDependencies": { "c8": "^7.1.0", "chai": "^4.2.0", - "mocha": "^8.0.0" + "mocha": "^10.0.0" } } From 94172e808941f751d8a5610e961dd2c4c7cc46f4 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 25 Jul 2022 19:44:15 +0200 Subject: [PATCH 08/80] chore(deps): update dependency sinon to v14 (#9) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^10.0.0` -> `^14.0.0`](https://renovatebot.com/diffs/npm/sinon/10.0.0/14.0.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/compatibility-slim/10.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/confidence-slim/10.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v14.0.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1400) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v13.0.2...v14.0.0) - [`c2bbd826`](https://togithub.com/sinonjs/sinon/commit/c2bbd82641444eb5b32822489ae40f185afbbf00) Drop node 12 (Morgan Roderick) > And embrace Node 18 > > See https://nodejs.org/en/about/releases/ *Released by Morgan Roderick on 2022-05-07.* ### [`v13.0.2`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1302) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v13.0.1...v13.0.2) - [`bddb631a`](https://togithub.com/sinonjs/sinon/commit/bddb631aab6afc3e663a5db847c675ea96c90970) Update fake-timers (Carl-Erik Kopseng) - [`eaed0eb2`](https://togithub.com/sinonjs/sinon/commit/eaed0eb24bd8f42b0484b8861a5ff066001da5d5) Bump nokogiri from 1.13.3 to 1.13.4 ([#​2451](https://togithub.com/sinonjs/sinon/issues/2451)) (dependabot\[bot]) *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2022-04-14.* ### [`v13.0.1`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1301) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v13.0.0...v13.0.1) - [`ec4223f9`](https://togithub.com/sinonjs/sinon/commit/ec4223f94076d809483e3c6a7536cfc1278dd3c9) Bump nise to fix [sinonjs/nise#​193](https://togithub.com/sinonjs/nise/issues/193) (Carl-Erik Kopseng) - [`f329a010`](https://togithub.com/sinonjs/sinon/commit/f329a01040bfa5a79e039419220b21eda56935d6) Add unimported to workflow ([#​2441](https://togithub.com/sinonjs/sinon/issues/2441)) (Morgan Roderick) - [`7f16cec9`](https://togithub.com/sinonjs/sinon/commit/7f16cec968c3c8d4e580267fb00195916d6f827d) Enable updates to same major version (Carl-Erik Kopseng) - [`f784d7ad`](https://togithub.com/sinonjs/sinon/commit/f784d7ad2c86be0fc65477d69f8bdafca846ef2c) Re-introduce new version.sh script to version hook (Joel Bradshaw) > This was inadvertently removed during merge conflicts, and is required > for any of the new release process stuff to work - [`51c508ab`](https://togithub.com/sinonjs/sinon/commit/51c508ab77cf0f9fb8c5305ff626f6a2eada178f) Add dry run mode to `npm version` ([#​2436](https://togithub.com/sinonjs/sinon/issues/2436)) (Joel Bradshaw) > - Add DRY_RUN flag to skip publish/push > > - Allow overriding branch names for testing - [`05341dcf`](https://togithub.com/sinonjs/sinon/commit/05341dcf92ddca4a1d4c90966b1fcdc7039cff18) Update npm version scripts to manage new releases branch (Joel Bradshaw) - [`fe658261`](https://togithub.com/sinonjs/sinon/commit/fe65826171db69ed2986a1060db77944dbc98a6d) Remove release archives from master (Joel Bradshaw) > These archives made it difficult to find things in the GitHub interface, > and take up a lot of space in a checked-out repo for something that is > not useful to most people checking out the repository. > > The main purpose of these archives is to make old versions and > documentation available on the Sinon website that is run out of this > repo. This can be supported by using a separate branch for website > releases, and to maintain the archives. > > Following this commit, the `npm version` scripts will be updated to > automatically handle archiving the releases in the new releases branch > and keeping it up to date with master. > > Also remove the directories we removed from .prettierignore, since they > don't exist any more. *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2022-02-01.* ### [`v13.0.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1300) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v12.0.1...v13.0.0) - [`cf3d6c0c`](https://togithub.com/sinonjs/sinon/commit/cf3d6c0cd9689c0ee673b3daa8bf9abd70304392) Upgrade packages ([#​2431](https://togithub.com/sinonjs/sinon/issues/2431)) (Carl-Erik Kopseng) > - Update all @​sinonjs/ packages > > - Upgrade to fake-timers 9 > > - chore: ensure always using latest LTS release - [`41710467`](https://togithub.com/sinonjs/sinon/commit/417104670d575e96a1b645ea40ce763afa76fb1b) Adjust deploy scripts to archive old releases in a separate branch, move existing releases out of master ([#​2426](https://togithub.com/sinonjs/sinon/issues/2426)) (Joel Bradshaw) > Co-authored-by: Carl-Erik Kopseng - [`c80a7266`](https://togithub.com/sinonjs/sinon/commit/c80a72660e89d88b08275eff1028ecb9e26fd8e9) Bump node-fetch from 2.6.1 to 2.6.7 ([#​2430](https://togithub.com/sinonjs/sinon/issues/2430)) (dependabot\[bot]) > Co-authored-by: dependabot\[bot] <49699333+dependabot\[bot][@​users](https://togithub.com/users).noreply.github.com> - [`a00f14a9`](https://togithub.com/sinonjs/sinon/commit/a00f14a97dbe8c65afa89674e16ad73fc7d2fdc0) Add explicit export for `./*` ([#​2413](https://togithub.com/sinonjs/sinon/issues/2413)) (なつき) - [`b82ca7ad`](https://togithub.com/sinonjs/sinon/commit/b82ca7ad9b1add59007771f65a18ee34415de8ca) Bump cached-path-relative from 1.0.2 to 1.1.0 ([#​2428](https://togithub.com/sinonjs/sinon/issues/2428)) (dependabot\[bot]) - [`a9ea1427`](https://togithub.com/sinonjs/sinon/commit/a9ea142716c094ef3c432ecc4089f8207b8dd8b6) Add documentation for assert.calledOnceWithMatch ([#​2424](https://togithub.com/sinonjs/sinon/issues/2424)) (Mathias Schreck) - [`1d5ab86b`](https://togithub.com/sinonjs/sinon/commit/1d5ab86ba60e50dd69593ffed2bffd4b8faa0d38) Be more general in stripping off stack frames to fix Firefox tests ([#​2425](https://togithub.com/sinonjs/sinon/issues/2425)) (Joel Bradshaw) - [`56b06129`](https://togithub.com/sinonjs/sinon/commit/56b06129e223eae690265c37b1113067e2b31bdc) Check call count type ([#​2410](https://togithub.com/sinonjs/sinon/issues/2410)) (Joel Bradshaw) - [`7863e2df`](https://togithub.com/sinonjs/sinon/commit/7863e2dfdbda79e0a32e42af09e6539fc2f2b80f) Fix [#​2414](https://togithub.com/sinonjs/sinon/issues/2414): make Sinon available on homepage (Carl-Erik Kopseng) - [`fabaabdd`](https://togithub.com/sinonjs/sinon/commit/fabaabdda82f39a7f5b75b55bd56cf77b1cd4a8f) Bump nokogiri from 1.11.4 to 1.13.1 ([#​2423](https://togithub.com/sinonjs/sinon/issues/2423)) (dependabot\[bot]) - [`dbc0fbd2`](https://togithub.com/sinonjs/sinon/commit/dbc0fbd263c8419fa47f9c3b20cf47890a242d21) Bump shelljs from 0.8.4 to 0.8.5 ([#​2422](https://togithub.com/sinonjs/sinon/issues/2422)) (dependabot\[bot]) - [`fb8b3d72`](https://togithub.com/sinonjs/sinon/commit/fb8b3d72a85dc8fb0547f859baf3f03a22a039f7) Run Prettier (Carl-Erik Kopseng) - [`12a45939`](https://togithub.com/sinonjs/sinon/commit/12a45939e9b047b6d3663fe55f2eb383ec63c4e1) Fix 2377: Throw error when trying to stub non-configurable or non-writable properties ([#​2417](https://togithub.com/sinonjs/sinon/issues/2417)) (Stuart Dotson) > Fixes issue [#​2377](https://togithub.com/sinonjs/sinon/issues/2377) by throwing an error when trying to stub non-configurable or non-writable properties *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2022-01-28.* ### [`v12.0.1`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1201) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v12.0.0...v12.0.1) - [`3f598221`](https://togithub.com/sinonjs/sinon/commit/3f598221045904681f2b3b3ba1df617ed5e230e3) Fix issue with npm unlink for npm version > 6 (Carl-Erik Kopseng) - [`51417a38`](https://togithub.com/sinonjs/sinon/commit/51417a38111eeeb7cd14338bfb762cc2df487e1b) Fix bundling of cjs module ([#​2412](https://togithub.com/sinonjs/sinon/issues/2412)) (Julian Grinblat) *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2021-11-04.* ### [`v12.0.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1200) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v11.1.2...v12.0.0) - [`b20ef9e4`](https://togithub.com/sinonjs/sinon/commit/b20ef9e4940e9384a6d0707b917a38e7bbfcd816) Upgrade to fake-timers@8 (Carl-Erik Kopseng). This is potentially breaking, but should not be, as the breaking change deals with the Node timer object created by fake timers. - [`eba42cc3`](https://togithub.com/sinonjs/sinon/commit/eba42cc38dbaf5417178a12cec11e35014e335ea) Enable esm named exports ([#​2382](https://togithub.com/sinonjs/sinon/issues/2382)) (Julian Grinblat) - [`b0cf5448`](https://togithub.com/sinonjs/sinon/commit/b0cf5448993c2ace607cdf430b7e389d02c2f296) Spelling ([#​2398](https://togithub.com/sinonjs/sinon/issues/2398)) (Josh Soref) - [`e78a6706`](https://togithub.com/sinonjs/sinon/commit/e78a670611682c7e35cf7d27887b409d6397d27c) Make calledWith() assertions idempotent ([#​2407](https://togithub.com/sinonjs/sinon/issues/2407)) (Joel Bradshaw) - [`2814c0a2`](https://togithub.com/sinonjs/sinon/commit/2814c0a212ab6b79c7251e4b0a1bebc9918257d4) Generate CHANGES.md using [@​studio/changes](https://togithub.com/studio/changes) (Morgan Roderick) > This will bring us closer to having the same release process as the > other `@sinonjs` packages. - [`2d5d6ad4`](https://togithub.com/sinonjs/sinon/commit/2d5d6ad4cd89c2063834991da5073f7640d0d722) Run tests in Node 16 in GitHub Actions (Morgan Roderick) *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2021-11-03.* ### [`v11.1.2`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1112) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v11.1.1...v11.1.2) - Upgrade [@​sinonjs/fake-timers](https://togithub.com/sinonjs/fake-timers) to latest, see https://github.com/sinonjs/fake-timers/blob/master/CHANGELOG.md#​712--2021-05-28 - Copy over accessor properties to target object [#​2387](https://togithub.com/sinonjs/sinon/issues/2387) ### [`v11.1.1`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1111) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v11.1.0...v11.1.1) - Fix [#​2379](https://togithub.com/sinonjs/sinon/issues/2379) by using v7 of supports-color ### [`v11.1.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1110) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v11.0.0...v11.1.0) - Add sinon.promise() implementation ([#​2369](https://togithub.com/sinonjs/sinon/issues/2369)) - Set wrappedMethod on getters/setters ([#​2378](https://togithub.com/sinonjs/sinon/issues/2378)) - \[Docs] Update fake-server usage & descriptions ([#​2365](https://togithub.com/sinonjs/sinon/issues/2365)) - Fake docs improvement ([#​2360](https://togithub.com/sinonjs/sinon/issues/2360)) - Update nise to 5.1.0 (fixed [#​2318](https://togithub.com/sinonjs/sinon/issues/2318)) ### [`v11.0.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1100) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v10.0.1...v11.0.0) - Explicitly use samsam 6.0.2 with fix for [#​2345](https://togithub.com/sinonjs/sinon/issues/2345) - Update most packages ([#​2371](https://togithub.com/sinonjs/sinon/issues/2371)) - Update compatibility docs ([#​2366](https://togithub.com/sinonjs/sinon/issues/2366)) - Update packages (includes breaking fake-timers change, see [#​2352](https://togithub.com/sinonjs/sinon/issues/2352)) - Warn of potential memory leaks ([#​2357](https://togithub.com/sinonjs/sinon/issues/2357)) - Fix clock test errors ### [`v10.0.1`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1001) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v10.0.0...v10.0.1) - Upgrade sinon components (bumps y18n to 4.0.1) - Bump y18n from 4.0.0 to 4.0.1
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-dataform). --- packages/google-cloud-dataform/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-dataform/package.json b/packages/google-cloud-dataform/package.json index 5c9ead60d8f..418d4c5ddb8 100644 --- a/packages/google-cloud-dataform/package.json +++ b/packages/google-cloud-dataform/package.json @@ -54,7 +54,7 @@ "mocha": "^10.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^10.0.0", + "sinon": "^14.0.0", "ts-loader": "^9.1.2", "typescript": "^4.2.4", "webpack": "^5.36.2", From 8f2d1e51bb9ce487b4e830476f71f9ebc5fc24d0 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 25 Jul 2022 19:50:34 +0200 Subject: [PATCH 09/80] chore(deps): update dependency @types/node to v16 (#4) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/node](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^14.14.44` -> `^16.0.0`](https://renovatebot.com/diffs/npm/@types%2fnode/14.18.22/16.11.45) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.45/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.45/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.45/compatibility-slim/14.18.22)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.45/confidence-slim/14.18.22)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-dataform). --- packages/google-cloud-dataform/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-dataform/package.json b/packages/google-cloud-dataform/package.json index 418d4c5ddb8..fba68eb01a5 100644 --- a/packages/google-cloud-dataform/package.json +++ b/packages/google-cloud-dataform/package.json @@ -43,7 +43,7 @@ }, "devDependencies": { "@types/mocha": "^9.0.0", - "@types/node": "^14.14.44", + "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "c8": "^7.7.2", "gts": "^3.1.0", From ae233d8a10c06e8fcc3277eb250ed71c92e2cfba Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 25 Jul 2022 20:07:26 +0200 Subject: [PATCH 10/80] chore(deps): update dependency jsdoc-fresh to v2 (#5) --- packages/google-cloud-dataform/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-dataform/package.json b/packages/google-cloud-dataform/package.json index fba68eb01a5..c85399afdcd 100644 --- a/packages/google-cloud-dataform/package.json +++ b/packages/google-cloud-dataform/package.json @@ -48,7 +48,7 @@ "c8": "^7.7.2", "gts": "^3.1.0", "jsdoc": "^3.6.6", - "jsdoc-fresh": "^1.0.2", + "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^1.0.6", "linkinator": "^4.0.0", "mocha": "^10.0.0", From 26ec704bd8bd4c7b5c5ac2b7492aa9a5fbac7b7e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 25 Jul 2022 20:30:45 +0200 Subject: [PATCH 11/80] chore(deps): update dependency jsdoc-region-tag to v2 (#6) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jsdoc-region-tag](https://togithub.com/googleapis/jsdoc-region-tag) | [`^1.0.6` -> `^2.0.0`](https://renovatebot.com/diffs/npm/jsdoc-region-tag/1.3.1/2.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/compatibility-slim/1.3.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/confidence-slim/1.3.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/jsdoc-region-tag ### [`v2.0.0`](https://togithub.com/googleapis/jsdoc-region-tag/blob/HEAD/CHANGELOG.md#​200-httpsgithubcomgoogleapisjsdoc-region-tagcomparev131v200-2022-05-20) [Compare Source](https://togithub.com/googleapis/jsdoc-region-tag/compare/v1.3.1...v2.0.0) ##### ⚠ BREAKING CHANGES - update library to use Node 12 ([#​107](https://togithub.com/googleapis/jsdoc-region-tag/issues/107)) ##### Build System - update library to use Node 12 ([#​107](https://togithub.com/googleapis/jsdoc-region-tag/issues/107)) ([5b51796](https://togithub.com/googleapis/jsdoc-region-tag/commit/5b51796771984cf8b978990025f14faa03c19923)) ##### [1.3.1](https://www.github.com/googleapis/jsdoc-region-tag/compare/v1.3.0...v1.3.1) (2021-08-11) ##### Bug Fixes - **build:** migrate to using main branch ([#​79](https://www.togithub.com/googleapis/jsdoc-region-tag/issues/79)) ([5050615](https://www.github.com/googleapis/jsdoc-region-tag/commit/50506150b7758592df5e389c6a5c3d82b3b20881))
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-dataform). --- packages/google-cloud-dataform/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-dataform/package.json b/packages/google-cloud-dataform/package.json index c85399afdcd..fe417d575cc 100644 --- a/packages/google-cloud-dataform/package.json +++ b/packages/google-cloud-dataform/package.json @@ -49,7 +49,7 @@ "gts": "^3.1.0", "jsdoc": "^3.6.6", "jsdoc-fresh": "^2.0.0", - "jsdoc-region-tag": "^1.0.6", + "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", "mocha": "^10.0.0", "null-loader": "^4.0.1", From 20c798a3afc060c9bfa463831afbf448bff4e093 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 29 Jul 2022 06:32:27 -0700 Subject: [PATCH 12/80] feat: Release API version v1beta1 (no changes to v1alpha2) (#11) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Release API version v1beta1 (no changes to v1alpha2) PiperOrigin-RevId: 463269555 Source-Link: https://github.com/googleapis/googleapis/commit/5261728f2ee874bc9f14bfecc52e4a178acaf711 Source-Link: https://github.com/googleapis/googleapis-gen/commit/20a9a4c74a41a6f085e40ef5a17416c000c2fc94 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjBhOWE0Yzc0YTQxYTZmMDg1ZTQwZWY1YTE3NDE2YzAwMGMyZmM5NCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../linkinator.config.json | 5 +- .../cloud/dataform/v1beta1/dataform.proto | 1629 ++ .../google-cloud-dataform/protos/protos.d.ts | 8403 +++++++ .../google-cloud-dataform/protos/protos.js | 19394 ++++++++++++++++ .../google-cloud-dataform/protos/protos.json | 2307 ++ .../dataform.cancel_workflow_invocation.js | 58 + .../dataform.commit_workspace_changes.js | 72 + .../dataform.create_compilation_result.js | 64 + .../v1beta1/dataform.create_repository.js | 70 + .../dataform.create_workflow_invocation.js | 64 + .../v1beta1/dataform.create_workspace.js | 70 + .../v1beta1/dataform.delete_repository.js | 64 + .../dataform.delete_workflow_invocation.js | 58 + .../v1beta1/dataform.delete_workspace.js | 58 + .../v1beta1/dataform.fetch_file_diff.js | 63 + .../dataform.fetch_file_git_statuses.js | 58 + .../dataform.fetch_git_ahead_behind.js | 64 + .../v1beta1/dataform.fetch_remote_branches.js | 58 + .../dataform.get_compilation_result.js | 58 + .../v1beta1/dataform.get_repository.js | 58 + .../dataform.get_workflow_invocation.js | 58 + .../v1beta1/dataform.get_workspace.js | 58 + .../v1beta1/dataform.install_npm_packages.js | 58 + .../dataform.list_compilation_results.js | 74 + .../v1beta1/dataform.list_repositories.js | 84 + .../dataform.list_workflow_invocations.js | 74 + .../v1beta1/dataform.list_workspaces.js | 84 + .../v1beta1/dataform.make_directory.js | 64 + .../v1beta1/dataform.move_directory.js | 70 + .../generated/v1beta1/dataform.move_file.js | 68 + .../v1beta1/dataform.pull_git_commits.js | 69 + .../v1beta1/dataform.push_git_commits.js | 63 + ...taform.query_compilation_result_actions.js | 79 + .../dataform.query_directory_contents.js | 79 + ...aform.query_workflow_invocation_actions.js | 74 + .../generated/v1beta1/dataform.read_file.js | 63 + .../v1beta1/dataform.remove_directory.js | 64 + .../generated/v1beta1/dataform.remove_file.js | 63 + .../dataform.reset_workspace_changes.js | 67 + .../v1beta1/dataform.update_repository.js | 63 + .../generated/v1beta1/dataform.write_file.js | 68 + ...etadata.google.cloud.dataform.v1beta1.json | 1647 ++ packages/google-cloud-dataform/src/index.ts | 5 +- .../src/v1beta1/dataform_client.ts | 5293 +++++ .../src/v1beta1/dataform_client_config.json | 170 + .../src/v1beta1/dataform_proto_list.json | 3 + .../src/v1beta1/gapic_metadata.json | 411 + .../src/v1beta1/index.ts | 19 + .../test/gapic_dataform_v1beta1.ts | 7084 ++++++ 49 files changed, 48745 insertions(+), 6 deletions(-) create mode 100644 packages/google-cloud-dataform/protos/google/cloud/dataform/v1beta1/dataform.proto create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.cancel_workflow_invocation.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.commit_workspace_changes.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_compilation_result.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_repository.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workflow_invocation.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workspace.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_repository.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workflow_invocation.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workspace.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_diff.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_git_statuses.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_remote_branches.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_compilation_result.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_repository.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workflow_invocation.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workspace.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.install_npm_packages.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_compilation_results.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_repositories.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workflow_invocations.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workspaces.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.make_directory.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_directory.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_file.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.pull_git_commits.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.push_git_commits.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_compilation_result_actions.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_directory_contents.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.read_file.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_directory.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_file.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.reset_workspace_changes.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.update_repository.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/dataform.write_file.js create mode 100644 packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json create mode 100644 packages/google-cloud-dataform/src/v1beta1/dataform_client.ts create mode 100644 packages/google-cloud-dataform/src/v1beta1/dataform_client_config.json create mode 100644 packages/google-cloud-dataform/src/v1beta1/dataform_proto_list.json create mode 100644 packages/google-cloud-dataform/src/v1beta1/gapic_metadata.json create mode 100644 packages/google-cloud-dataform/src/v1beta1/index.ts create mode 100644 packages/google-cloud-dataform/test/gapic_dataform_v1beta1.ts diff --git a/packages/google-cloud-dataform/linkinator.config.json b/packages/google-cloud-dataform/linkinator.config.json index e51cbcc5cd4..befd23c8633 100644 --- a/packages/google-cloud-dataform/linkinator.config.json +++ b/packages/google-cloud-dataform/linkinator.config.json @@ -5,10 +5,7 @@ "www.googleapis.com", "img.shields.io", "https://console.cloud.google.com/cloudshell", - "https://support.google.com", - "https://github.com/googleapis/nodejs-dataform/blob/master/CHANGELOG.md", - "https://cloud.google.com/nodejs/docs/reference/dataform/latest", - "https://github.com/googleapis/nodejs-dataform/blob/addSamples/CHANGELOG.md" + "https://support.google.com" ], "silent": true, "concurrency": 5, diff --git a/packages/google-cloud-dataform/protos/google/cloud/dataform/v1beta1/dataform.proto b/packages/google-cloud-dataform/protos/google/cloud/dataform/v1beta1/dataform.proto new file mode 100644 index 00000000000..57d43c3e0eb --- /dev/null +++ b/packages/google-cloud-dataform/protos/google/cloud/dataform/v1beta1/dataform.proto @@ -0,0 +1,1629 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dataform.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/type/interval.proto"; + +option csharp_namespace = "Google.Cloud.Dataform.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dataform/v1beta1;dataform"; +option java_multiple_files = true; +option java_outer_classname = "DataformProto"; +option java_package = "com.google.cloud.dataform.v1beta1"; +option php_namespace = "Google\\Cloud\\Dataform\\V1beta1"; +option ruby_package = "Google::Cloud::Dataform::V1beta1"; +option (google.api.resource_definition) = { + type: "secretmanager.googleapis.com/SecretVersion" + pattern: "projects/{project}/secrets/{secret}/versions/{version}" +}; + +// Dataform is a service to develop, create, document, test, and update curated +// tables in BigQuery. +service Dataform { + option (google.api.default_host) = "dataform.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Lists Repositories in a given project and location. + rpc ListRepositories(ListRepositoriesRequest) returns (ListRepositoriesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/repositories" + }; + option (google.api.method_signature) = "parent"; + } + + // Fetches a single Repository. + rpc GetRepository(GetRepositoryRequest) returns (Repository) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Repository in a given project and location. + rpc CreateRepository(CreateRepositoryRequest) returns (Repository) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/repositories" + body: "repository" + }; + option (google.api.method_signature) = "parent,repository,repository_id"; + } + + // Updates a single Repository. + rpc UpdateRepository(UpdateRepositoryRequest) returns (Repository) { + option (google.api.http) = { + patch: "/v1beta1/{repository.name=projects/*/locations/*/repositories/*}" + body: "repository" + }; + option (google.api.method_signature) = "repository,update_mask"; + } + + // Deletes a single Repository. + rpc DeleteRepository(DeleteRepositoryRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/repositories/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Fetches a Repository's remote branches. + rpc FetchRemoteBranches(FetchRemoteBranchesRequest) returns (FetchRemoteBranchesResponse) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*}:fetchRemoteBranches" + }; + } + + // Lists Workspaces in a given Repository. + rpc ListWorkspaces(ListWorkspacesRequest) returns (ListWorkspacesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workspaces" + }; + option (google.api.method_signature) = "parent"; + } + + // Fetches a single Workspace. + rpc GetWorkspace(GetWorkspaceRequest) returns (Workspace) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Workspace in a given Repository. + rpc CreateWorkspace(CreateWorkspaceRequest) returns (Workspace) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workspaces" + body: "workspace" + }; + option (google.api.method_signature) = "parent,workspace,workspace_id"; + } + + // Deletes a single Workspace. + rpc DeleteWorkspace(DeleteWorkspaceRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Installs dependency NPM packages (inside a Workspace). + rpc InstallNpmPackages(InstallNpmPackagesRequest) returns (InstallNpmPackagesResponse) { + option (google.api.http) = { + post: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:installNpmPackages" + body: "*" + }; + } + + // Pulls Git commits from the Repository's remote into a Workspace. + rpc PullGitCommits(PullGitCommitsRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:pull" + body: "*" + }; + } + + // Pushes Git commits from a Workspace to the Repository's remote. + rpc PushGitCommits(PushGitCommitsRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:push" + body: "*" + }; + } + + // Fetches Git statuses for the files in a Workspace. + rpc FetchFileGitStatuses(FetchFileGitStatusesRequest) returns (FetchFileGitStatusesResponse) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileGitStatuses" + }; + } + + // Fetches Git ahead/behind against a remote branch. + rpc FetchGitAheadBehind(FetchGitAheadBehindRequest) returns (FetchGitAheadBehindResponse) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchGitAheadBehind" + }; + } + + // Applies a Git commit for uncommitted files in a Workspace. + rpc CommitWorkspaceChanges(CommitWorkspaceChangesRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:commit" + body: "*" + }; + } + + // Performs a Git reset for uncommitted files in a Workspace. + rpc ResetWorkspaceChanges(ResetWorkspaceChangesRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:reset" + body: "*" + }; + } + + // Fetches Git diff for an uncommitted file in a Workspace. + rpc FetchFileDiff(FetchFileDiffRequest) returns (FetchFileDiffResponse) { + option (google.api.http) = { + get: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileDiff" + }; + } + + // Returns the contents of a given Workspace directory. + rpc QueryDirectoryContents(QueryDirectoryContentsRequest) returns (QueryDirectoryContentsResponse) { + option (google.api.http) = { + get: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:queryDirectoryContents" + }; + } + + // Creates a directory inside a Workspace. + rpc MakeDirectory(MakeDirectoryRequest) returns (MakeDirectoryResponse) { + option (google.api.http) = { + post: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:makeDirectory" + body: "*" + }; + } + + // Deletes a directory (inside a Workspace) and all of its contents. + rpc RemoveDirectory(RemoveDirectoryRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeDirectory" + body: "*" + }; + } + + // Moves a directory (inside a Workspace), and all of its contents, to a new + // location. + rpc MoveDirectory(MoveDirectoryRequest) returns (MoveDirectoryResponse) { + option (google.api.http) = { + post: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveDirectory" + body: "*" + }; + } + + // Returns the contents of a file (inside a Workspace). + rpc ReadFile(ReadFileRequest) returns (ReadFileResponse) { + option (google.api.http) = { + get: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:readFile" + }; + } + + // Deletes a file (inside a Workspace). + rpc RemoveFile(RemoveFileRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeFile" + body: "*" + }; + } + + // Moves a file (inside a Workspace) to a new location. + rpc MoveFile(MoveFileRequest) returns (MoveFileResponse) { + option (google.api.http) = { + post: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveFile" + body: "*" + }; + } + + // Writes to a file (inside a Workspace). + rpc WriteFile(WriteFileRequest) returns (WriteFileResponse) { + option (google.api.http) = { + post: "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:writeFile" + body: "*" + }; + } + + // Lists CompilationResults in a given Repository. + rpc ListCompilationResults(ListCompilationResultsRequest) returns (ListCompilationResultsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/repositories/*}/compilationResults" + }; + option (google.api.method_signature) = "parent"; + } + + // Fetches a single CompilationResult. + rpc GetCompilationResult(GetCompilationResultRequest) returns (CompilationResult) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*/compilationResults/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new CompilationResult in a given project and location. + rpc CreateCompilationResult(CreateCompilationResultRequest) returns (CompilationResult) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/repositories/*}/compilationResults" + body: "compilation_result" + }; + option (google.api.method_signature) = "parent,compilation_result"; + } + + // Returns CompilationResultActions in a given CompilationResult. + rpc QueryCompilationResultActions(QueryCompilationResultActionsRequest) returns (QueryCompilationResultActionsResponse) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*/compilationResults/*}:query" + }; + } + + // Lists WorkflowInvocations in a given Repository. + rpc ListWorkflowInvocations(ListWorkflowInvocationsRequest) returns (ListWorkflowInvocationsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations" + }; + option (google.api.method_signature) = "parent"; + } + + // Fetches a single WorkflowInvocation. + rpc GetWorkflowInvocation(GetWorkflowInvocationRequest) returns (WorkflowInvocation) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new WorkflowInvocation in a given Repository. + rpc CreateWorkflowInvocation(CreateWorkflowInvocationRequest) returns (WorkflowInvocation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations" + body: "workflow_invocation" + }; + option (google.api.method_signature) = "parent,workflow_invocation"; + } + + // Deletes a single WorkflowInvocation. + rpc DeleteWorkflowInvocation(DeleteWorkflowInvocationRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Requests cancellation of a running WorkflowInvocation. + rpc CancelWorkflowInvocation(CancelWorkflowInvocationRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:cancel" + body: "*" + }; + } + + // Returns WorkflowInvocationActions in a given WorkflowInvocation. + rpc QueryWorkflowInvocationActions(QueryWorkflowInvocationActionsRequest) returns (QueryWorkflowInvocationActionsResponse) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:query" + }; + } +} + +// Represents a Dataform Git repository. +message Repository { + option (google.api.resource) = { + type: "dataform.googleapis.com/Repository" + pattern: "projects/{project}/locations/{location}/repositories/{repository}" + }; + + // Controls Git remote configuration for a repository. + message GitRemoteSettings { + // Indicates the status of a Git authentication token. + enum TokenStatus { + // Default value. This value is unused. + TOKEN_STATUS_UNSPECIFIED = 0; + + // The token could not be found in Secret Manager (or the Dataform + // Service Account did not have permission to access it). + NOT_FOUND = 1; + + // The token could not be used to authenticate against the Git remote. + INVALID = 2; + + // The token was used successfully to authenticate against the Git remote. + VALID = 3; + } + + // Required. The Git remote's URL. + string url = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Git remote's default branch name. + string default_branch = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The name of the Secret Manager secret version to use as an + // authentication token for Git operations. Must be in the format + // `projects/*/secrets/*/versions/*`. + string authentication_token_secret_version = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; + + // Output only. Indicates the status of the Git access token. + TokenStatus token_status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The repository's name. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. If set, configures this repository to be linked to a Git remote. + GitRemoteSettings git_remote_settings = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ListRepositories` request message. +message ListRepositoriesRequest { + // Required. The location in which to list repositories. Must be in the format + // `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Maximum number of repositories to return. The server may return fewer + // items than requested. If unspecified, the server will pick an appropriate + // default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListRepositories` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListRepositories` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This field only supports ordering by `name`. If unspecified, the server + // will choose the ordering. If specified, the default order is ascending for + // the `name` field. + string order_by = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter for the returned list. + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ListRepositories` response message. +message ListRepositoriesResponse { + // List of repositories. + repeated Repository repositories = 1; + + // A token which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations which could not be reached. + repeated string unreachable = 3; +} + +// `GetRepository` request message. +message GetRepositoryRequest { + // Required. The repository's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; +} + +// `CreateRepository` request message. +message CreateRepositoryRequest { + // Required. The location in which to create the repository. Must be in the format + // `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The repository to create. + Repository repository = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the repository, which will become the final component of + // the repository's resource name. + string repository_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `UpdateRepository` request message. +message UpdateRepositoryRequest { + // Optional. Specifies the fields to be updated in the repository. If left unset, + // all fields will be updated. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The repository to update. + Repository repository = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `DeleteRepository` request message. +message DeleteRepositoryRequest { + // Required. The repository's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // If set to true, any child resources of this repository will also be + // deleted. (Otherwise, the request will only succeed if the repository has no + // child resources.) + bool force = 2; +} + +// `FetchRemoteBranches` request message. +message FetchRemoteBranchesRequest { + // Required. The repository's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; +} + +// `FetchRemoteBranches` response message. +message FetchRemoteBranchesResponse { + // The remote repository's branch names. + repeated string branches = 1; +} + +// Represents a Dataform Git workspace. +message Workspace { + option (google.api.resource) = { + type: "dataform.googleapis.com/Workspace" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/workspaces/{workspace}" + }; + + // Output only. The workspace's name. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// `ListWorkspaces` request message. +message ListWorkspacesRequest { + // Required. The repository in which to list workspaces. Must be in the + // format `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Optional. Maximum number of workspaces to return. The server may return fewer + // items than requested. If unspecified, the server will pick an appropriate + // default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListWorkspaces` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListWorkspaces` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This field only supports ordering by `name`. If unspecified, the server + // will choose the ordering. If specified, the default order is ascending for + // the `name` field. + string order_by = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter for the returned list. + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ListWorkspaces` response message. +message ListWorkspacesResponse { + // List of workspaces. + repeated Workspace workspaces = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations which could not be reached. + repeated string unreachable = 3; +} + +// `GetWorkspace` request message. +message GetWorkspaceRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; +} + +// `CreateWorkspace` request message. +message CreateWorkspaceRequest { + // Required. The repository in which to create the workspace. Must be in the format + // `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Required. The workspace to create. + Workspace workspace = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the workspace, which will become the final component of + // the workspace's resource name. + string workspace_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `DeleteWorkspace` request message. +message DeleteWorkspaceRequest { + // Required. The workspace resource's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; +} + +// Represents the author of a Git commit. +message CommitAuthor { + // Required. The commit author's name. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The commit author's email address. + string email_address = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `PullGitCommits` request message. +message PullGitCommitsRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Optional. The name of the branch in the Git remote from which to pull commits. + // If left unset, the repository's default branch name will be used. + string remote_branch = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The author of any merge commit which may be created as a result of merging + // fetched Git commits into this workspace. + CommitAuthor author = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `PushGitCommits` request message. +message PushGitCommitsRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Optional. The name of the branch in the Git remote to which commits should be pushed. + // If left unset, the repository's default branch name will be used. + string remote_branch = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// `FetchFileGitStatuses` request message. +message FetchFileGitStatusesRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; +} + +// `FetchFileGitStatuses` response message. +message FetchFileGitStatusesResponse { + // Represents the Git state of a file with uncommitted changes. + message UncommittedFileChange { + // Indicates the status of an uncommitted file change. + enum State { + // Default value. This value is unused. + STATE_UNSPECIFIED = 0; + + // The file has been newly added. + ADDED = 1; + + // The file has been deleted. + DELETED = 2; + + // The file has been modified. + MODIFIED = 3; + + // The file contains merge conflicts. + HAS_CONFLICTS = 4; + } + + // The file's full path including filename, relative to the workspace root. + string path = 1; + + // Indicates the status of the file. + State state = 2; + } + + // A list of all files which have uncommitted Git changes. There will only be + // a single entry for any given file. + repeated UncommittedFileChange uncommitted_file_changes = 1; +} + +// `FetchGitAheadBehind` request message. +message FetchGitAheadBehindRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Optional. The name of the branch in the Git remote against which this workspace + // should be compared. If left unset, the repository's default branch name + // will be used. + string remote_branch = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// `FetchGitAheadBehind` response message. +message FetchGitAheadBehindResponse { + // The number of commits in the remote branch that are not in the workspace. + int32 commits_ahead = 1; + + // The number of commits in the workspace that are not in the remote branch. + int32 commits_behind = 2; +} + +// `CommitWorkspaceChanges` request message. +message CommitWorkspaceChangesRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The commit's author. + CommitAuthor author = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The commit's message. + string commit_message = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Full file paths to commit including filename, rooted at workspace root. If + // left empty, all files will be committed. + repeated string paths = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ResetWorkspaceChanges` request message. +message ResetWorkspaceChangesRequest { + // Required. The workspace's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Optional. Full file paths to reset back to their committed state including filename, + // rooted at workspace root. If left empty, all files will be reset. + repeated string paths = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, untracked files will be deleted. + bool clean = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// `FetchFileDiff` request message. +message FetchFileDiffRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The file's full path including filename, relative to the workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `FetchFileDiff` response message. +message FetchFileDiffResponse { + // The raw formatted Git diff for the file. + string formatted_diff = 1; +} + +// `QueryDirectoryContents` request message. +message QueryDirectoryContentsRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Optional. The directory's full path including directory name, relative to the + // workspace root. If left unset, the workspace root is used. + string path = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Maximum number of paths to return. The server may return fewer + // items than requested. If unspecified, the server will pick an appropriate + // default. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `QueryDirectoryContents` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `QueryDirectoryContents` must match the call that provided the page + // token. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// `QueryDirectoryContents` response message. +message QueryDirectoryContentsResponse { + // Represents a single entry in a workspace directory. + message DirectoryEntry { + oneof entry { + // A file in the directory. + string file = 1; + + // A child directory in the directory. + string directory = 2; + } + } + + // List of entries in the directory. + repeated DirectoryEntry directory_entries = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// `MakeDirectory` request message. +message MakeDirectoryRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The directory's full path including directory name, relative to the + // workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `MakeDirectory` response message. +message MakeDirectoryResponse { + +} + +// `RemoveDirectory` request message. +message RemoveDirectoryRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The directory's full path including directory name, relative to the + // workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `MoveDirectory` request message. +message MoveDirectoryRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The directory's full path including directory name, relative to the + // workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The new path for the directory including directory name, rooted at + // workspace root. + string new_path = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `MoveDirectory` response message. +message MoveDirectoryResponse { + +} + +// `ReadFile` request message. +message ReadFileRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The file's full path including filename, relative to the workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `ReadFile` response message. +message ReadFileResponse { + // The file's contents. + bytes file_contents = 1; +} + +// `RemoveFile` request message. +message RemoveFileRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The file's full path including filename, relative to the workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `MoveFile` request message. +message MoveFileRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The file's full path including filename, relative to the workspace root. + string path = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The file's new path including filename, relative to the workspace root. + string new_path = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `MoveFile` response message. +message MoveFileResponse { + +} + +// `WriteFile` request message. +message WriteFileRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + + // Required. The file. + string path = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The file's contents. + bytes contents = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// `WriteFile` response message. +message WriteFileResponse { + +} + +// `InstallNpmPackages` request message. +message InstallNpmPackagesRequest { + // Required. The workspace's name. + string workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; +} + +// `InstallNpmPackages` response message. +message InstallNpmPackagesResponse { + +} + +// Represents the result of compiling a Dataform project. +message CompilationResult { + option (google.api.resource) = { + type: "dataform.googleapis.com/CompilationResult" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/compilationResults/{compilation_result}" + }; + + // Configures various aspects of Dataform code compilation. + message CodeCompilationConfig { + // Optional. The default database (Google Cloud project ID). + string default_database = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The default schema (BigQuery dataset ID). + string default_schema = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The default BigQuery location to use. Defaults to "US". + // See the BigQuery docs for a full list of locations: + // https://cloud.google.com/bigquery/docs/locations. + string default_location = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The default schema (BigQuery dataset ID) for assertions. + string assertion_schema = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User-defined variables that are made available to project code during + // compilation. + map vars = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The suffix that should be appended to all database (Google Cloud project + // ID) names. + string database_suffix = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The suffix that should be appended to all schema (BigQuery dataset ID) + // names. + string schema_suffix = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The prefix that should be prepended to all table names. + string table_prefix = 7 [(google.api.field_behavior) = OPTIONAL]; + } + + // An error encountered when attempting to compile a Dataform project. + message CompilationError { + // Output only. The error's top level message. + string message = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The error's full stack trace. + string stack = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The path of the file where this error occurred, if available, relative to + // the project root. + string path = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The identifier of the action where this error occurred, if available. + Target action_target = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The compilation result's name. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + oneof source { + // Immutable. Git commit/tag/branch name at which the repository should be compiled. + // Must exist in the remote repository. + // Examples: + // - a commit SHA: `12ade345` + // - a tag: `tag1` + // - a branch name: `branch1` + string git_commitish = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The name of the workspace to compile. Must be in the format + // `projects/*/locations/*/repositories/*/workspaces/*`. + string workspace = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Workspace" + } + ]; + } + + // Immutable. If set, fields of `code_compilation_overrides` override the default + // compilation settings that are specified in dataform.json. + CodeCompilationConfig code_compilation_config = 4 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The version of `@dataform/core` that was used for compilation. + string dataform_core_version = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Errors encountered during project compilation. + repeated CompilationError compilation_errors = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// `ListCompilationResults` request message. +message ListCompilationResultsRequest { + // Required. The repository in which to list compilation results. Must be in the + // format `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Optional. Maximum number of compilation results to return. The server may return + // fewer items than requested. If unspecified, the server will pick an + // appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListCompilationResults` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListCompilationResults` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ListCompilationResults` response message. +message ListCompilationResultsResponse { + // List of compilation results. + repeated CompilationResult compilation_results = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations which could not be reached. + repeated string unreachable = 3; +} + +// `GetCompilationResult` request message. +message GetCompilationResultRequest { + // Required. The compilation result's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/CompilationResult" + } + ]; +} + +// `CreateCompilationResult` request message. +message CreateCompilationResultRequest { + // Required. The repository in which to create the compilation result. Must be in the + // format `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Required. The compilation result to create. + CompilationResult compilation_result = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents an action identifier. If the action writes output, the output +// will be written to the referenced database object. +message Target { + // The action's database (Google Cloud project ID) . + string database = 1; + + // The action's schema (BigQuery dataset ID), within `database`. + string schema = 2; + + // The action's name, within `database` and `schema`. + string name = 3; +} + +// Describes a relation and its columns. +message RelationDescriptor { + // Describes a column. + message ColumnDescriptor { + // The identifier for the column. Each entry in `path` represents one level + // of nesting. + repeated string path = 1; + + // A textual description of the column. + string description = 2; + + // A list of BigQuery policy tags that will be applied to the column. + repeated string bigquery_policy_tags = 3; + } + + // A text description of the relation. + string description = 1; + + // A list of descriptions of columns within the relation. + repeated ColumnDescriptor columns = 2; + + // A set of BigQuery labels that should be applied to the relation. + map bigquery_labels = 3; +} + +// Represents a single Dataform action in a compilation result. +message CompilationResultAction { + // Represents a database relation. + message Relation { + // Indicates the type of this relation. + enum RelationType { + // Default value. This value is unused. + RELATION_TYPE_UNSPECIFIED = 0; + + // The relation is a table. + TABLE = 1; + + // The relation is a view. + VIEW = 2; + + // The relation is an incrementalized table. + INCREMENTAL_TABLE = 3; + + // The relation is a materialized view. + MATERIALIZED_VIEW = 4; + } + + // Contains settings for relations of type `INCREMENTAL_TABLE`. + message IncrementalTableConfig { + // The SELECT query which returns rows which should be inserted into the + // relation if it already exists and is not being refreshed. + string incremental_select_query = 1; + + // Whether this table should be protected from being refreshed. + bool refresh_disabled = 2; + + // A set of columns or SQL expressions used to define row uniqueness. + // If any duplicates are discovered (as defined by `unique_key_parts`), + // only the newly selected rows (as defined by `incremental_select_query`) + // will be included in the relation. + repeated string unique_key_parts = 3; + + // A SQL expression conditional used to limit the set of existing rows + // considered for a merge operation (see `unique_key_parts` for more + // information). + string update_partition_filter = 4; + + // SQL statements to be executed before inserting new rows into the + // relation. + repeated string incremental_pre_operations = 5; + + // SQL statements to be executed after inserting new rows into the + // relation. + repeated string incremental_post_operations = 6; + } + + // A list of actions that this action depends on. + repeated Target dependency_targets = 1; + + // Whether this action is disabled (i.e. should not be run). + bool disabled = 2; + + // Arbitrary, user-defined tags on this action. + repeated string tags = 3; + + // Descriptor for the relation and its columns. + RelationDescriptor relation_descriptor = 4; + + // The type of this relation. + RelationType relation_type = 5; + + // The SELECT query which returns rows which this relation should contain. + string select_query = 6; + + // SQL statements to be executed before creating the relation. + repeated string pre_operations = 7; + + // SQL statements to be executed after creating the relation. + repeated string post_operations = 8; + + // Configures `INCREMENTAL_TABLE` settings for this relation. Only set if + // `relation_type` is `INCREMENTAL_TABLE`. + IncrementalTableConfig incremental_table_config = 9; + + // The SQL expression used to partition the relation. + string partition_expression = 10; + + // A list of columns or SQL expressions used to cluster the table. + repeated string cluster_expressions = 11; + + // Sets the partition expiration in days. + int32 partition_expiration_days = 12; + + // Specifies whether queries on this table must include a predicate filter + // that filters on the partitioning column. + bool require_partition_filter = 13; + + // Additional options that will be provided as key/value pairs into the + // options clause of a create table/view statement. See + // https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language + // for more information on which options are supported. + map additional_options = 14; + } + + // Represents a list of arbitrary database operations. + message Operations { + // A list of actions that this action depends on. + repeated Target dependency_targets = 1; + + // Whether this action is disabled (i.e. should not be run). + bool disabled = 2; + + // Arbitrary, user-defined tags on this action. + repeated string tags = 3; + + // Descriptor for any output relation and its columns. Only set if + // `has_output` is true. + RelationDescriptor relation_descriptor = 6; + + // A list of arbitrary SQL statements that will be executed without + // alteration. + repeated string queries = 4; + + // Whether these operations produce an output relation. + bool has_output = 5; + } + + // Represents an assertion upon a SQL query which is required return zero + // rows. + message Assertion { + // A list of actions that this action depends on. + repeated Target dependency_targets = 1; + + // The parent action of this assertion. Only set if this assertion was + // automatically generated. + Target parent_action = 5; + + // Whether this action is disabled (i.e. should not be run). + bool disabled = 2; + + // Arbitrary, user-defined tags on this action. + repeated string tags = 3; + + // The SELECT query which must return zero rows in order for this assertion + // to succeed. + string select_query = 4; + + // Descriptor for the assertion's automatically-generated view and its + // columns. + RelationDescriptor relation_descriptor = 6; + } + + // Represents a relation which is not managed by Dataform but which may be + // referenced by Dataform actions. + message Declaration { + // Descriptor for the relation and its columns. Used as documentation only, + // i.e. values here will result in no changes to the relation's metadata. + RelationDescriptor relation_descriptor = 1; + } + + // This action's identifier. Unique within the compilation result. + Target target = 1; + + // The action's identifier if the project had been compiled without any + // overrides configured. Unique within the compilation result. + Target canonical_target = 2; + + // The full path including filename in which this action is located, relative + // to the workspace root. + string file_path = 3; + + oneof compiled_object { + // The database relation created/updated by this action. + Relation relation = 4; + + // The database operations executed by this action. + Operations operations = 5; + + // The assertion executed by this action. + Assertion assertion = 6; + + // The declaration declared by this action. + Declaration declaration = 7; + } +} + +// `QueryCompilationResultActions` request message. +message QueryCompilationResultActionsRequest { + // Required. The compilation result's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/CompilationResult" + } + ]; + + // Optional. Maximum number of compilation results to return. The server may return + // fewer items than requested. If unspecified, the server will pick an + // appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `QueryCompilationResultActions` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `QueryCompilationResultActions` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Optional filter for the returned list. Filtering is only currently + // supported on the `file_path` field. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// `QueryCompilationResultActions` response message. +message QueryCompilationResultActionsResponse { + // List of compilation result actions. + repeated CompilationResultAction compilation_result_actions = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Represents a single invocation of a compilation result. +message WorkflowInvocation { + option (google.api.resource) = { + type: "dataform.googleapis.com/WorkflowInvocation" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/workflowInvocations/{workflow_invocation}" + }; + + // Includes various configuration options for this workflow invocation. + // If both `included_targets` and `included_tags` are unset, all actions + // will be included. + message InvocationConfig { + // Immutable. The set of action identifiers to include. + repeated Target included_targets = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The set of tags to include. + repeated string included_tags = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. When set to true, transitive dependencies of included actions will be + // executed. + bool transitive_dependencies_included = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. When set to true, transitive dependents of included actions will be + // executed. + bool transitive_dependents_included = 4 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. When set to true, any incremental tables will be fully refreshed. + bool fully_refresh_incremental_tables_enabled = 5 [(google.api.field_behavior) = IMMUTABLE]; + } + + // Represents the current state of a workflow invocation. + enum State { + // Default value. This value is unused. + STATE_UNSPECIFIED = 0; + + // The workflow invocation is currently running. + RUNNING = 1; + + // The workflow invocation succeeded. A terminal state. + SUCCEEDED = 2; + + // The workflow invocation was cancelled. A terminal state. + CANCELLED = 3; + + // The workflow invocation failed. A terminal state. + FAILED = 4; + + // The workflow invocation is being cancelled, but some actions are still + // running. + CANCELING = 5; + } + + // Output only. The workflow invocation's name. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The name of the compilation result to compile. Must be in the format + // `projects/*/locations/*/repositories/*/compilationResults/*`. + string compilation_result = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/CompilationResult" + } + ]; + + // Immutable. If left unset, a default InvocationConfig will be used. + InvocationConfig invocation_config = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. This workflow invocation's current state. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This workflow invocation's timing details. + google.type.Interval invocation_timing = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// `ListWorkflowInvocations` request message. +message ListWorkflowInvocationsRequest { + // Required. The parent resource of the WorkflowInvocation type. Must be in the + // format `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Optional. Maximum number of workflow invocations to return. The server may return + // fewer items than requested. If unspecified, the server will pick an + // appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListWorkflowInvocations` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListWorkflowInvocations` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// `ListWorkflowInvocations` response message. +message ListWorkflowInvocationsResponse { + // List of workflow invocations. + repeated WorkflowInvocation workflow_invocations = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations which could not be reached. + repeated string unreachable = 3; +} + +// `GetWorkflowInvocation` request message. +message GetWorkflowInvocationRequest { + // Required. The workflow invocation resource's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/WorkflowInvocation" + } + ]; +} + +// `CreateWorkflowInvocation` request message. +message CreateWorkflowInvocationRequest { + // Required. The repository in which to create the workflow invocation. Must be in the + // format `projects/*/locations/*/repositories/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/Repository" + } + ]; + + // Required. The workflow invocation resource to create. + WorkflowInvocation workflow_invocation = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `DeleteWorkflowInvocation` request message. +message DeleteWorkflowInvocationRequest { + // Required. The workflow invocation resource's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/WorkflowInvocation" + } + ]; +} + +// `CancelWorkflowInvocation` request message. +message CancelWorkflowInvocationRequest { + // Required. The workflow invocation resource's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/WorkflowInvocation" + } + ]; +} + +// Represents a single action in a workflow invocation. +message WorkflowInvocationAction { + // Represents the current state of an workflow invocation action. + enum State { + // The action has not yet been considered for invocation. + PENDING = 0; + + // The action is currently running. + RUNNING = 1; + + // Execution of the action was skipped because upstream dependencies did not + // all complete successfully. A terminal state. + SKIPPED = 2; + + // Execution of the action was disabled as per the configuration of the + // corresponding compilation result action. A terminal state. + DISABLED = 3; + + // The action succeeded. A terminal state. + SUCCEEDED = 4; + + // The action was cancelled. A terminal state. + CANCELLED = 5; + + // The action failed. A terminal state. + FAILED = 6; + } + + // Represents a workflow action that will run against BigQuery. + message BigQueryAction { + // Output only. The generated BigQuery SQL script that will be executed. + string sql_script = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. This action's identifier. Unique within the workflow invocation. + Target target = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The action's identifier if the project had been compiled without any + // overrides configured. Unique within the compilation result. + Target canonical_target = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This action's current state. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If and only if action's state is FAILED a failure reason is set. + string failure_reason = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This action's timing details. + // `start_time` will be set if the action is in [RUNNING, SUCCEEDED, + // CANCELLED, FAILED] state. + // `end_time` will be set if the action is in [SUCCEEDED, CANCELLED, FAILED] + // state. + google.type.Interval invocation_timing = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The workflow action's bigquery action details. + BigQueryAction bigquery_action = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// `QueryWorkflowInvocationActions` request message. +message QueryWorkflowInvocationActionsRequest { + // Required. The workflow invocation's name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataform.googleapis.com/WorkflowInvocation" + } + ]; + + // Optional. Maximum number of workflow invocations to return. The server may return + // fewer items than requested. If unspecified, the server will pick an + // appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `QueryWorkflowInvocationActions` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `QueryWorkflowInvocationActions` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// `QueryWorkflowInvocationActions` response message. +message QueryWorkflowInvocationActionsResponse { + // List of workflow invocation actions. + repeated WorkflowInvocationAction workflow_invocation_actions = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} diff --git a/packages/google-cloud-dataform/protos/protos.d.ts b/packages/google-cloud-dataform/protos/protos.d.ts index 9c130ba7482..630cd57e731 100644 --- a/packages/google-cloud-dataform/protos/protos.d.ts +++ b/packages/google-cloud-dataform/protos/protos.d.ts @@ -8425,6 +8425,8409 @@ export namespace google { public toJSON(): { [k: string]: any }; } } + + /** Namespace v1beta1. */ + namespace v1beta1 { + + /** Represents a Dataform */ + class Dataform extends $protobuf.rpc.Service { + + /** + * Constructs a new Dataform 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 Dataform 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): Dataform; + + /** + * Calls ListRepositories. + * @param request ListRepositoriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListRepositoriesResponse + */ + public listRepositories(request: google.cloud.dataform.v1beta1.IListRepositoriesRequest, callback: google.cloud.dataform.v1beta1.Dataform.ListRepositoriesCallback): void; + + /** + * Calls ListRepositories. + * @param request ListRepositoriesRequest message or plain object + * @returns Promise + */ + public listRepositories(request: google.cloud.dataform.v1beta1.IListRepositoriesRequest): Promise; + + /** + * Calls GetRepository. + * @param request GetRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Repository + */ + public getRepository(request: google.cloud.dataform.v1beta1.IGetRepositoryRequest, callback: google.cloud.dataform.v1beta1.Dataform.GetRepositoryCallback): void; + + /** + * Calls GetRepository. + * @param request GetRepositoryRequest message or plain object + * @returns Promise + */ + public getRepository(request: google.cloud.dataform.v1beta1.IGetRepositoryRequest): Promise; + + /** + * Calls CreateRepository. + * @param request CreateRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Repository + */ + public createRepository(request: google.cloud.dataform.v1beta1.ICreateRepositoryRequest, callback: google.cloud.dataform.v1beta1.Dataform.CreateRepositoryCallback): void; + + /** + * Calls CreateRepository. + * @param request CreateRepositoryRequest message or plain object + * @returns Promise + */ + public createRepository(request: google.cloud.dataform.v1beta1.ICreateRepositoryRequest): Promise; + + /** + * Calls UpdateRepository. + * @param request UpdateRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Repository + */ + public updateRepository(request: google.cloud.dataform.v1beta1.IUpdateRepositoryRequest, callback: google.cloud.dataform.v1beta1.Dataform.UpdateRepositoryCallback): void; + + /** + * Calls UpdateRepository. + * @param request UpdateRepositoryRequest message or plain object + * @returns Promise + */ + public updateRepository(request: google.cloud.dataform.v1beta1.IUpdateRepositoryRequest): Promise; + + /** + * Calls DeleteRepository. + * @param request DeleteRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteRepository(request: google.cloud.dataform.v1beta1.IDeleteRepositoryRequest, callback: google.cloud.dataform.v1beta1.Dataform.DeleteRepositoryCallback): void; + + /** + * Calls DeleteRepository. + * @param request DeleteRepositoryRequest message or plain object + * @returns Promise + */ + public deleteRepository(request: google.cloud.dataform.v1beta1.IDeleteRepositoryRequest): Promise; + + /** + * Calls FetchRemoteBranches. + * @param request FetchRemoteBranchesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchRemoteBranchesResponse + */ + public fetchRemoteBranches(request: google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest, callback: google.cloud.dataform.v1beta1.Dataform.FetchRemoteBranchesCallback): void; + + /** + * Calls FetchRemoteBranches. + * @param request FetchRemoteBranchesRequest message or plain object + * @returns Promise + */ + public fetchRemoteBranches(request: google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest): Promise; + + /** + * Calls ListWorkspaces. + * @param request ListWorkspacesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListWorkspacesResponse + */ + public listWorkspaces(request: google.cloud.dataform.v1beta1.IListWorkspacesRequest, callback: google.cloud.dataform.v1beta1.Dataform.ListWorkspacesCallback): void; + + /** + * Calls ListWorkspaces. + * @param request ListWorkspacesRequest message or plain object + * @returns Promise + */ + public listWorkspaces(request: google.cloud.dataform.v1beta1.IListWorkspacesRequest): Promise; + + /** + * Calls GetWorkspace. + * @param request GetWorkspaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Workspace + */ + public getWorkspace(request: google.cloud.dataform.v1beta1.IGetWorkspaceRequest, callback: google.cloud.dataform.v1beta1.Dataform.GetWorkspaceCallback): void; + + /** + * Calls GetWorkspace. + * @param request GetWorkspaceRequest message or plain object + * @returns Promise + */ + public getWorkspace(request: google.cloud.dataform.v1beta1.IGetWorkspaceRequest): Promise; + + /** + * Calls CreateWorkspace. + * @param request CreateWorkspaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Workspace + */ + public createWorkspace(request: google.cloud.dataform.v1beta1.ICreateWorkspaceRequest, callback: google.cloud.dataform.v1beta1.Dataform.CreateWorkspaceCallback): void; + + /** + * Calls CreateWorkspace. + * @param request CreateWorkspaceRequest message or plain object + * @returns Promise + */ + public createWorkspace(request: google.cloud.dataform.v1beta1.ICreateWorkspaceRequest): Promise; + + /** + * Calls DeleteWorkspace. + * @param request DeleteWorkspaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteWorkspace(request: google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest, callback: google.cloud.dataform.v1beta1.Dataform.DeleteWorkspaceCallback): void; + + /** + * Calls DeleteWorkspace. + * @param request DeleteWorkspaceRequest message or plain object + * @returns Promise + */ + public deleteWorkspace(request: google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest): Promise; + + /** + * Calls InstallNpmPackages. + * @param request InstallNpmPackagesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and InstallNpmPackagesResponse + */ + public installNpmPackages(request: google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest, callback: google.cloud.dataform.v1beta1.Dataform.InstallNpmPackagesCallback): void; + + /** + * Calls InstallNpmPackages. + * @param request InstallNpmPackagesRequest message or plain object + * @returns Promise + */ + public installNpmPackages(request: google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest): Promise; + + /** + * Calls PullGitCommits. + * @param request PullGitCommitsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public pullGitCommits(request: google.cloud.dataform.v1beta1.IPullGitCommitsRequest, callback: google.cloud.dataform.v1beta1.Dataform.PullGitCommitsCallback): void; + + /** + * Calls PullGitCommits. + * @param request PullGitCommitsRequest message or plain object + * @returns Promise + */ + public pullGitCommits(request: google.cloud.dataform.v1beta1.IPullGitCommitsRequest): Promise; + + /** + * Calls PushGitCommits. + * @param request PushGitCommitsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public pushGitCommits(request: google.cloud.dataform.v1beta1.IPushGitCommitsRequest, callback: google.cloud.dataform.v1beta1.Dataform.PushGitCommitsCallback): void; + + /** + * Calls PushGitCommits. + * @param request PushGitCommitsRequest message or plain object + * @returns Promise + */ + public pushGitCommits(request: google.cloud.dataform.v1beta1.IPushGitCommitsRequest): Promise; + + /** + * Calls FetchFileGitStatuses. + * @param request FetchFileGitStatusesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchFileGitStatusesResponse + */ + public fetchFileGitStatuses(request: google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest, callback: google.cloud.dataform.v1beta1.Dataform.FetchFileGitStatusesCallback): void; + + /** + * Calls FetchFileGitStatuses. + * @param request FetchFileGitStatusesRequest message or plain object + * @returns Promise + */ + public fetchFileGitStatuses(request: google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest): Promise; + + /** + * Calls FetchGitAheadBehind. + * @param request FetchGitAheadBehindRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchGitAheadBehindResponse + */ + public fetchGitAheadBehind(request: google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest, callback: google.cloud.dataform.v1beta1.Dataform.FetchGitAheadBehindCallback): void; + + /** + * Calls FetchGitAheadBehind. + * @param request FetchGitAheadBehindRequest message or plain object + * @returns Promise + */ + public fetchGitAheadBehind(request: google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest): Promise; + + /** + * Calls CommitWorkspaceChanges. + * @param request CommitWorkspaceChangesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public commitWorkspaceChanges(request: google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest, callback: google.cloud.dataform.v1beta1.Dataform.CommitWorkspaceChangesCallback): void; + + /** + * Calls CommitWorkspaceChanges. + * @param request CommitWorkspaceChangesRequest message or plain object + * @returns Promise + */ + public commitWorkspaceChanges(request: google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest): Promise; + + /** + * Calls ResetWorkspaceChanges. + * @param request ResetWorkspaceChangesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public resetWorkspaceChanges(request: google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest, callback: google.cloud.dataform.v1beta1.Dataform.ResetWorkspaceChangesCallback): void; + + /** + * Calls ResetWorkspaceChanges. + * @param request ResetWorkspaceChangesRequest message or plain object + * @returns Promise + */ + public resetWorkspaceChanges(request: google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest): Promise; + + /** + * Calls FetchFileDiff. + * @param request FetchFileDiffRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchFileDiffResponse + */ + public fetchFileDiff(request: google.cloud.dataform.v1beta1.IFetchFileDiffRequest, callback: google.cloud.dataform.v1beta1.Dataform.FetchFileDiffCallback): void; + + /** + * Calls FetchFileDiff. + * @param request FetchFileDiffRequest message or plain object + * @returns Promise + */ + public fetchFileDiff(request: google.cloud.dataform.v1beta1.IFetchFileDiffRequest): Promise; + + /** + * Calls QueryDirectoryContents. + * @param request QueryDirectoryContentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryDirectoryContentsResponse + */ + public queryDirectoryContents(request: google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, callback: google.cloud.dataform.v1beta1.Dataform.QueryDirectoryContentsCallback): void; + + /** + * Calls QueryDirectoryContents. + * @param request QueryDirectoryContentsRequest message or plain object + * @returns Promise + */ + public queryDirectoryContents(request: google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest): Promise; + + /** + * Calls MakeDirectory. + * @param request MakeDirectoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MakeDirectoryResponse + */ + public makeDirectory(request: google.cloud.dataform.v1beta1.IMakeDirectoryRequest, callback: google.cloud.dataform.v1beta1.Dataform.MakeDirectoryCallback): void; + + /** + * Calls MakeDirectory. + * @param request MakeDirectoryRequest message or plain object + * @returns Promise + */ + public makeDirectory(request: google.cloud.dataform.v1beta1.IMakeDirectoryRequest): Promise; + + /** + * Calls RemoveDirectory. + * @param request RemoveDirectoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public removeDirectory(request: google.cloud.dataform.v1beta1.IRemoveDirectoryRequest, callback: google.cloud.dataform.v1beta1.Dataform.RemoveDirectoryCallback): void; + + /** + * Calls RemoveDirectory. + * @param request RemoveDirectoryRequest message or plain object + * @returns Promise + */ + public removeDirectory(request: google.cloud.dataform.v1beta1.IRemoveDirectoryRequest): Promise; + + /** + * Calls MoveDirectory. + * @param request MoveDirectoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MoveDirectoryResponse + */ + public moveDirectory(request: google.cloud.dataform.v1beta1.IMoveDirectoryRequest, callback: google.cloud.dataform.v1beta1.Dataform.MoveDirectoryCallback): void; + + /** + * Calls MoveDirectory. + * @param request MoveDirectoryRequest message or plain object + * @returns Promise + */ + public moveDirectory(request: google.cloud.dataform.v1beta1.IMoveDirectoryRequest): Promise; + + /** + * Calls ReadFile. + * @param request ReadFileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ReadFileResponse + */ + public readFile(request: google.cloud.dataform.v1beta1.IReadFileRequest, callback: google.cloud.dataform.v1beta1.Dataform.ReadFileCallback): void; + + /** + * Calls ReadFile. + * @param request ReadFileRequest message or plain object + * @returns Promise + */ + public readFile(request: google.cloud.dataform.v1beta1.IReadFileRequest): Promise; + + /** + * Calls RemoveFile. + * @param request RemoveFileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public removeFile(request: google.cloud.dataform.v1beta1.IRemoveFileRequest, callback: google.cloud.dataform.v1beta1.Dataform.RemoveFileCallback): void; + + /** + * Calls RemoveFile. + * @param request RemoveFileRequest message or plain object + * @returns Promise + */ + public removeFile(request: google.cloud.dataform.v1beta1.IRemoveFileRequest): Promise; + + /** + * Calls MoveFile. + * @param request MoveFileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MoveFileResponse + */ + public moveFile(request: google.cloud.dataform.v1beta1.IMoveFileRequest, callback: google.cloud.dataform.v1beta1.Dataform.MoveFileCallback): void; + + /** + * Calls MoveFile. + * @param request MoveFileRequest message or plain object + * @returns Promise + */ + public moveFile(request: google.cloud.dataform.v1beta1.IMoveFileRequest): Promise; + + /** + * Calls WriteFile. + * @param request WriteFileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and WriteFileResponse + */ + public writeFile(request: google.cloud.dataform.v1beta1.IWriteFileRequest, callback: google.cloud.dataform.v1beta1.Dataform.WriteFileCallback): void; + + /** + * Calls WriteFile. + * @param request WriteFileRequest message or plain object + * @returns Promise + */ + public writeFile(request: google.cloud.dataform.v1beta1.IWriteFileRequest): Promise; + + /** + * Calls ListCompilationResults. + * @param request ListCompilationResultsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCompilationResultsResponse + */ + public listCompilationResults(request: google.cloud.dataform.v1beta1.IListCompilationResultsRequest, callback: google.cloud.dataform.v1beta1.Dataform.ListCompilationResultsCallback): void; + + /** + * Calls ListCompilationResults. + * @param request ListCompilationResultsRequest message or plain object + * @returns Promise + */ + public listCompilationResults(request: google.cloud.dataform.v1beta1.IListCompilationResultsRequest): Promise; + + /** + * Calls GetCompilationResult. + * @param request GetCompilationResultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CompilationResult + */ + public getCompilationResult(request: google.cloud.dataform.v1beta1.IGetCompilationResultRequest, callback: google.cloud.dataform.v1beta1.Dataform.GetCompilationResultCallback): void; + + /** + * Calls GetCompilationResult. + * @param request GetCompilationResultRequest message or plain object + * @returns Promise + */ + public getCompilationResult(request: google.cloud.dataform.v1beta1.IGetCompilationResultRequest): Promise; + + /** + * Calls CreateCompilationResult. + * @param request CreateCompilationResultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CompilationResult + */ + public createCompilationResult(request: google.cloud.dataform.v1beta1.ICreateCompilationResultRequest, callback: google.cloud.dataform.v1beta1.Dataform.CreateCompilationResultCallback): void; + + /** + * Calls CreateCompilationResult. + * @param request CreateCompilationResultRequest message or plain object + * @returns Promise + */ + public createCompilationResult(request: google.cloud.dataform.v1beta1.ICreateCompilationResultRequest): Promise; + + /** + * Calls QueryCompilationResultActions. + * @param request QueryCompilationResultActionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryCompilationResultActionsResponse + */ + public queryCompilationResultActions(request: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, callback: google.cloud.dataform.v1beta1.Dataform.QueryCompilationResultActionsCallback): void; + + /** + * Calls QueryCompilationResultActions. + * @param request QueryCompilationResultActionsRequest message or plain object + * @returns Promise + */ + public queryCompilationResultActions(request: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest): Promise; + + /** + * Calls ListWorkflowInvocations. + * @param request ListWorkflowInvocationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListWorkflowInvocationsResponse + */ + public listWorkflowInvocations(request: google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, callback: google.cloud.dataform.v1beta1.Dataform.ListWorkflowInvocationsCallback): void; + + /** + * Calls ListWorkflowInvocations. + * @param request ListWorkflowInvocationsRequest message or plain object + * @returns Promise + */ + public listWorkflowInvocations(request: google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest): Promise; + + /** + * Calls GetWorkflowInvocation. + * @param request GetWorkflowInvocationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and WorkflowInvocation + */ + public getWorkflowInvocation(request: google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest, callback: google.cloud.dataform.v1beta1.Dataform.GetWorkflowInvocationCallback): void; + + /** + * Calls GetWorkflowInvocation. + * @param request GetWorkflowInvocationRequest message or plain object + * @returns Promise + */ + public getWorkflowInvocation(request: google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest): Promise; + + /** + * Calls CreateWorkflowInvocation. + * @param request CreateWorkflowInvocationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and WorkflowInvocation + */ + public createWorkflowInvocation(request: google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest, callback: google.cloud.dataform.v1beta1.Dataform.CreateWorkflowInvocationCallback): void; + + /** + * Calls CreateWorkflowInvocation. + * @param request CreateWorkflowInvocationRequest message or plain object + * @returns Promise + */ + public createWorkflowInvocation(request: google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest): Promise; + + /** + * Calls DeleteWorkflowInvocation. + * @param request DeleteWorkflowInvocationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteWorkflowInvocation(request: google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest, callback: google.cloud.dataform.v1beta1.Dataform.DeleteWorkflowInvocationCallback): void; + + /** + * Calls DeleteWorkflowInvocation. + * @param request DeleteWorkflowInvocationRequest message or plain object + * @returns Promise + */ + public deleteWorkflowInvocation(request: google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest): Promise; + + /** + * Calls CancelWorkflowInvocation. + * @param request CancelWorkflowInvocationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelWorkflowInvocation(request: google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest, callback: google.cloud.dataform.v1beta1.Dataform.CancelWorkflowInvocationCallback): void; + + /** + * Calls CancelWorkflowInvocation. + * @param request CancelWorkflowInvocationRequest message or plain object + * @returns Promise + */ + public cancelWorkflowInvocation(request: google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest): Promise; + + /** + * Calls QueryWorkflowInvocationActions. + * @param request QueryWorkflowInvocationActionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryWorkflowInvocationActionsResponse + */ + public queryWorkflowInvocationActions(request: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, callback: google.cloud.dataform.v1beta1.Dataform.QueryWorkflowInvocationActionsCallback): void; + + /** + * Calls QueryWorkflowInvocationActions. + * @param request QueryWorkflowInvocationActionsRequest message or plain object + * @returns Promise + */ + public queryWorkflowInvocationActions(request: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest): Promise; + } + + namespace Dataform { + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#listRepositories}. + * @param error Error, if any + * @param [response] ListRepositoriesResponse + */ + type ListRepositoriesCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.ListRepositoriesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#getRepository}. + * @param error Error, if any + * @param [response] Repository + */ + type GetRepositoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.Repository) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#createRepository}. + * @param error Error, if any + * @param [response] Repository + */ + type CreateRepositoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.Repository) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#updateRepository}. + * @param error Error, if any + * @param [response] Repository + */ + type UpdateRepositoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.Repository) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#deleteRepository}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteRepositoryCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#fetchRemoteBranches}. + * @param error Error, if any + * @param [response] FetchRemoteBranchesResponse + */ + type FetchRemoteBranchesCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#listWorkspaces}. + * @param error Error, if any + * @param [response] ListWorkspacesResponse + */ + type ListWorkspacesCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.ListWorkspacesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#getWorkspace}. + * @param error Error, if any + * @param [response] Workspace + */ + type GetWorkspaceCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.Workspace) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#createWorkspace}. + * @param error Error, if any + * @param [response] Workspace + */ + type CreateWorkspaceCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.Workspace) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#deleteWorkspace}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteWorkspaceCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#installNpmPackages}. + * @param error Error, if any + * @param [response] InstallNpmPackagesResponse + */ + type InstallNpmPackagesCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.InstallNpmPackagesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#pullGitCommits}. + * @param error Error, if any + * @param [response] Empty + */ + type PullGitCommitsCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#pushGitCommits}. + * @param error Error, if any + * @param [response] Empty + */ + type PushGitCommitsCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#fetchFileGitStatuses}. + * @param error Error, if any + * @param [response] FetchFileGitStatusesResponse + */ + type FetchFileGitStatusesCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#fetchGitAheadBehind}. + * @param error Error, if any + * @param [response] FetchGitAheadBehindResponse + */ + type FetchGitAheadBehindCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#commitWorkspaceChanges}. + * @param error Error, if any + * @param [response] Empty + */ + type CommitWorkspaceChangesCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#resetWorkspaceChanges}. + * @param error Error, if any + * @param [response] Empty + */ + type ResetWorkspaceChangesCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#fetchFileDiff}. + * @param error Error, if any + * @param [response] FetchFileDiffResponse + */ + type FetchFileDiffCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.FetchFileDiffResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#queryDirectoryContents}. + * @param error Error, if any + * @param [response] QueryDirectoryContentsResponse + */ + type QueryDirectoryContentsCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#makeDirectory}. + * @param error Error, if any + * @param [response] MakeDirectoryResponse + */ + type MakeDirectoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.MakeDirectoryResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#removeDirectory}. + * @param error Error, if any + * @param [response] Empty + */ + type RemoveDirectoryCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#moveDirectory}. + * @param error Error, if any + * @param [response] MoveDirectoryResponse + */ + type MoveDirectoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.MoveDirectoryResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#readFile}. + * @param error Error, if any + * @param [response] ReadFileResponse + */ + type ReadFileCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.ReadFileResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#removeFile}. + * @param error Error, if any + * @param [response] Empty + */ + type RemoveFileCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#moveFile}. + * @param error Error, if any + * @param [response] MoveFileResponse + */ + type MoveFileCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.MoveFileResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#writeFile}. + * @param error Error, if any + * @param [response] WriteFileResponse + */ + type WriteFileCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.WriteFileResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#listCompilationResults}. + * @param error Error, if any + * @param [response] ListCompilationResultsResponse + */ + type ListCompilationResultsCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.ListCompilationResultsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#getCompilationResult}. + * @param error Error, if any + * @param [response] CompilationResult + */ + type GetCompilationResultCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.CompilationResult) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#createCompilationResult}. + * @param error Error, if any + * @param [response] CompilationResult + */ + type CreateCompilationResultCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.CompilationResult) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#queryCompilationResultActions}. + * @param error Error, if any + * @param [response] QueryCompilationResultActionsResponse + */ + type QueryCompilationResultActionsCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#listWorkflowInvocations}. + * @param error Error, if any + * @param [response] ListWorkflowInvocationsResponse + */ + type ListWorkflowInvocationsCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#getWorkflowInvocation}. + * @param error Error, if any + * @param [response] WorkflowInvocation + */ + type GetWorkflowInvocationCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.WorkflowInvocation) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#createWorkflowInvocation}. + * @param error Error, if any + * @param [response] WorkflowInvocation + */ + type CreateWorkflowInvocationCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.WorkflowInvocation) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#deleteWorkflowInvocation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteWorkflowInvocationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#cancelWorkflowInvocation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelWorkflowInvocationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#queryWorkflowInvocationActions}. + * @param error Error, if any + * @param [response] QueryWorkflowInvocationActionsResponse + */ + type QueryWorkflowInvocationActionsCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse) => void; + } + + /** Properties of a Repository. */ + interface IRepository { + + /** Repository name */ + name?: (string|null); + + /** Repository gitRemoteSettings */ + gitRemoteSettings?: (google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings|null); + } + + /** Represents a Repository. */ + class Repository implements IRepository { + + /** + * Constructs a new Repository. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IRepository); + + /** Repository name. */ + public name: string; + + /** Repository gitRemoteSettings. */ + public gitRemoteSettings?: (google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings|null); + + /** + * Creates a new Repository instance using the specified properties. + * @param [properties] Properties to set + * @returns Repository instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IRepository): google.cloud.dataform.v1beta1.Repository; + + /** + * Encodes the specified Repository message. Does not implicitly {@link google.cloud.dataform.v1beta1.Repository.verify|verify} messages. + * @param message Repository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Repository message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.Repository.verify|verify} messages. + * @param message Repository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Repository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.Repository; + + /** + * Decodes a Repository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.Repository; + + /** + * Verifies a Repository message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Repository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Repository + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.Repository; + + /** + * Creates a plain object from a Repository message. Also converts values to other types if specified. + * @param message Repository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.Repository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Repository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Repository { + + /** Properties of a GitRemoteSettings. */ + interface IGitRemoteSettings { + + /** GitRemoteSettings url */ + url?: (string|null); + + /** GitRemoteSettings defaultBranch */ + defaultBranch?: (string|null); + + /** GitRemoteSettings authenticationTokenSecretVersion */ + authenticationTokenSecretVersion?: (string|null); + + /** GitRemoteSettings tokenStatus */ + tokenStatus?: (google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus|keyof typeof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus|null); + } + + /** Represents a GitRemoteSettings. */ + class GitRemoteSettings implements IGitRemoteSettings { + + /** + * Constructs a new GitRemoteSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings); + + /** GitRemoteSettings url. */ + public url: string; + + /** GitRemoteSettings defaultBranch. */ + public defaultBranch: string; + + /** GitRemoteSettings authenticationTokenSecretVersion. */ + public authenticationTokenSecretVersion: string; + + /** GitRemoteSettings tokenStatus. */ + public tokenStatus: (google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus|keyof typeof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus); + + /** + * Creates a new GitRemoteSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GitRemoteSettings instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings): google.cloud.dataform.v1beta1.Repository.GitRemoteSettings; + + /** + * Encodes the specified GitRemoteSettings message. Does not implicitly {@link google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.verify|verify} messages. + * @param message GitRemoteSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GitRemoteSettings message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.verify|verify} messages. + * @param message GitRemoteSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GitRemoteSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GitRemoteSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.Repository.GitRemoteSettings; + + /** + * Decodes a GitRemoteSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GitRemoteSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.Repository.GitRemoteSettings; + + /** + * Verifies a GitRemoteSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GitRemoteSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GitRemoteSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.Repository.GitRemoteSettings; + + /** + * Creates a plain object from a GitRemoteSettings message. Also converts values to other types if specified. + * @param message GitRemoteSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.Repository.GitRemoteSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GitRemoteSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace GitRemoteSettings { + + /** TokenStatus enum. */ + enum TokenStatus { + TOKEN_STATUS_UNSPECIFIED = 0, + NOT_FOUND = 1, + INVALID = 2, + VALID = 3 + } + } + } + + /** Properties of a ListRepositoriesRequest. */ + interface IListRepositoriesRequest { + + /** ListRepositoriesRequest parent */ + parent?: (string|null); + + /** ListRepositoriesRequest pageSize */ + pageSize?: (number|null); + + /** ListRepositoriesRequest pageToken */ + pageToken?: (string|null); + + /** ListRepositoriesRequest orderBy */ + orderBy?: (string|null); + + /** ListRepositoriesRequest filter */ + filter?: (string|null); + } + + /** Represents a ListRepositoriesRequest. */ + class ListRepositoriesRequest implements IListRepositoriesRequest { + + /** + * Constructs a new ListRepositoriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IListRepositoriesRequest); + + /** ListRepositoriesRequest parent. */ + public parent: string; + + /** ListRepositoriesRequest pageSize. */ + public pageSize: number; + + /** ListRepositoriesRequest pageToken. */ + public pageToken: string; + + /** ListRepositoriesRequest orderBy. */ + public orderBy: string; + + /** ListRepositoriesRequest filter. */ + public filter: string; + + /** + * Creates a new ListRepositoriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRepositoriesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IListRepositoriesRequest): google.cloud.dataform.v1beta1.ListRepositoriesRequest; + + /** + * Encodes the specified ListRepositoriesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListRepositoriesRequest.verify|verify} messages. + * @param message ListRepositoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IListRepositoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRepositoriesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListRepositoriesRequest.verify|verify} messages. + * @param message ListRepositoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IListRepositoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ListRepositoriesRequest; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ListRepositoriesRequest; + + /** + * Verifies a ListRepositoriesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListRepositoriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRepositoriesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ListRepositoriesRequest; + + /** + * Creates a plain object from a ListRepositoriesRequest message. Also converts values to other types if specified. + * @param message ListRepositoriesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ListRepositoriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRepositoriesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListRepositoriesResponse. */ + interface IListRepositoriesResponse { + + /** ListRepositoriesResponse repositories */ + repositories?: (google.cloud.dataform.v1beta1.IRepository[]|null); + + /** ListRepositoriesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListRepositoriesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListRepositoriesResponse. */ + class ListRepositoriesResponse implements IListRepositoriesResponse { + + /** + * Constructs a new ListRepositoriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IListRepositoriesResponse); + + /** ListRepositoriesResponse repositories. */ + public repositories: google.cloud.dataform.v1beta1.IRepository[]; + + /** ListRepositoriesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListRepositoriesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListRepositoriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRepositoriesResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IListRepositoriesResponse): google.cloud.dataform.v1beta1.ListRepositoriesResponse; + + /** + * Encodes the specified ListRepositoriesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListRepositoriesResponse.verify|verify} messages. + * @param message ListRepositoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IListRepositoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRepositoriesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListRepositoriesResponse.verify|verify} messages. + * @param message ListRepositoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IListRepositoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ListRepositoriesResponse; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ListRepositoriesResponse; + + /** + * Verifies a ListRepositoriesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListRepositoriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRepositoriesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ListRepositoriesResponse; + + /** + * Creates a plain object from a ListRepositoriesResponse message. Also converts values to other types if specified. + * @param message ListRepositoriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ListRepositoriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRepositoriesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetRepositoryRequest. */ + interface IGetRepositoryRequest { + + /** GetRepositoryRequest name */ + name?: (string|null); + } + + /** Represents a GetRepositoryRequest. */ + class GetRepositoryRequest implements IGetRepositoryRequest { + + /** + * Constructs a new GetRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IGetRepositoryRequest); + + /** GetRepositoryRequest name. */ + public name: string; + + /** + * Creates a new GetRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetRepositoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IGetRepositoryRequest): google.cloud.dataform.v1beta1.GetRepositoryRequest; + + /** + * Encodes the specified GetRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.GetRepositoryRequest.verify|verify} messages. + * @param message GetRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IGetRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.GetRepositoryRequest.verify|verify} messages. + * @param message GetRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IGetRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.GetRepositoryRequest; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.GetRepositoryRequest; + + /** + * Verifies a GetRepositoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.GetRepositoryRequest; + + /** + * Creates a plain object from a GetRepositoryRequest message. Also converts values to other types if specified. + * @param message GetRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.GetRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateRepositoryRequest. */ + interface ICreateRepositoryRequest { + + /** CreateRepositoryRequest parent */ + parent?: (string|null); + + /** CreateRepositoryRequest repository */ + repository?: (google.cloud.dataform.v1beta1.IRepository|null); + + /** CreateRepositoryRequest repositoryId */ + repositoryId?: (string|null); + } + + /** Represents a CreateRepositoryRequest. */ + class CreateRepositoryRequest implements ICreateRepositoryRequest { + + /** + * Constructs a new CreateRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ICreateRepositoryRequest); + + /** CreateRepositoryRequest parent. */ + public parent: string; + + /** CreateRepositoryRequest repository. */ + public repository?: (google.cloud.dataform.v1beta1.IRepository|null); + + /** CreateRepositoryRequest repositoryId. */ + public repositoryId: string; + + /** + * Creates a new CreateRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateRepositoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ICreateRepositoryRequest): google.cloud.dataform.v1beta1.CreateRepositoryRequest; + + /** + * Encodes the specified CreateRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateRepositoryRequest.verify|verify} messages. + * @param message CreateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ICreateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateRepositoryRequest.verify|verify} messages. + * @param message CreateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ICreateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CreateRepositoryRequest; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CreateRepositoryRequest; + + /** + * Verifies a CreateRepositoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CreateRepositoryRequest; + + /** + * Creates a plain object from a CreateRepositoryRequest message. Also converts values to other types if specified. + * @param message CreateRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CreateRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateRepositoryRequest. */ + interface IUpdateRepositoryRequest { + + /** UpdateRepositoryRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateRepositoryRequest repository */ + repository?: (google.cloud.dataform.v1beta1.IRepository|null); + } + + /** Represents an UpdateRepositoryRequest. */ + class UpdateRepositoryRequest implements IUpdateRepositoryRequest { + + /** + * Constructs a new UpdateRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IUpdateRepositoryRequest); + + /** UpdateRepositoryRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateRepositoryRequest repository. */ + public repository?: (google.cloud.dataform.v1beta1.IRepository|null); + + /** + * Creates a new UpdateRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateRepositoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IUpdateRepositoryRequest): google.cloud.dataform.v1beta1.UpdateRepositoryRequest; + + /** + * Encodes the specified UpdateRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.UpdateRepositoryRequest.verify|verify} messages. + * @param message UpdateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IUpdateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.UpdateRepositoryRequest.verify|verify} messages. + * @param message UpdateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IUpdateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.UpdateRepositoryRequest; + + /** + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.UpdateRepositoryRequest; + + /** + * Verifies an UpdateRepositoryRequest message. + * @param message Plain 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 UpdateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.UpdateRepositoryRequest; + + /** + * Creates a plain object from an UpdateRepositoryRequest message. Also converts values to other types if specified. + * @param message UpdateRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.UpdateRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteRepositoryRequest. */ + interface IDeleteRepositoryRequest { + + /** DeleteRepositoryRequest name */ + name?: (string|null); + + /** DeleteRepositoryRequest force */ + force?: (boolean|null); + } + + /** Represents a DeleteRepositoryRequest. */ + class DeleteRepositoryRequest implements IDeleteRepositoryRequest { + + /** + * Constructs a new DeleteRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IDeleteRepositoryRequest); + + /** DeleteRepositoryRequest name. */ + public name: string; + + /** DeleteRepositoryRequest force. */ + public force: boolean; + + /** + * Creates a new DeleteRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteRepositoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IDeleteRepositoryRequest): google.cloud.dataform.v1beta1.DeleteRepositoryRequest; + + /** + * Encodes the specified DeleteRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteRepositoryRequest.verify|verify} messages. + * @param message DeleteRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IDeleteRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteRepositoryRequest.verify|verify} messages. + * @param message DeleteRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IDeleteRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.DeleteRepositoryRequest; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.DeleteRepositoryRequest; + + /** + * Verifies a DeleteRepositoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.DeleteRepositoryRequest; + + /** + * Creates a plain object from a DeleteRepositoryRequest message. Also converts values to other types if specified. + * @param message DeleteRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.DeleteRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FetchRemoteBranchesRequest. */ + interface IFetchRemoteBranchesRequest { + + /** FetchRemoteBranchesRequest name */ + name?: (string|null); + } + + /** Represents a FetchRemoteBranchesRequest. */ + class FetchRemoteBranchesRequest implements IFetchRemoteBranchesRequest { + + /** + * Constructs a new FetchRemoteBranchesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest); + + /** FetchRemoteBranchesRequest name. */ + public name: string; + + /** + * Creates a new FetchRemoteBranchesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchRemoteBranchesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest): google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest; + + /** + * Encodes the specified FetchRemoteBranchesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest.verify|verify} messages. + * @param message FetchRemoteBranchesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchRemoteBranchesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest.verify|verify} messages. + * @param message FetchRemoteBranchesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchRemoteBranchesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchRemoteBranchesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest; + + /** + * Decodes a FetchRemoteBranchesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchRemoteBranchesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest; + + /** + * Verifies a FetchRemoteBranchesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchRemoteBranchesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchRemoteBranchesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest; + + /** + * Creates a plain object from a FetchRemoteBranchesRequest message. Also converts values to other types if specified. + * @param message FetchRemoteBranchesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchRemoteBranchesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FetchRemoteBranchesResponse. */ + interface IFetchRemoteBranchesResponse { + + /** FetchRemoteBranchesResponse branches */ + branches?: (string[]|null); + } + + /** Represents a FetchRemoteBranchesResponse. */ + class FetchRemoteBranchesResponse implements IFetchRemoteBranchesResponse { + + /** + * Constructs a new FetchRemoteBranchesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse); + + /** FetchRemoteBranchesResponse branches. */ + public branches: string[]; + + /** + * Creates a new FetchRemoteBranchesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchRemoteBranchesResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse): google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse; + + /** + * Encodes the specified FetchRemoteBranchesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse.verify|verify} messages. + * @param message FetchRemoteBranchesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchRemoteBranchesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse.verify|verify} messages. + * @param message FetchRemoteBranchesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchRemoteBranchesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchRemoteBranchesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse; + + /** + * Decodes a FetchRemoteBranchesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchRemoteBranchesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse; + + /** + * Verifies a FetchRemoteBranchesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchRemoteBranchesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchRemoteBranchesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse; + + /** + * Creates a plain object from a FetchRemoteBranchesResponse message. Also converts values to other types if specified. + * @param message FetchRemoteBranchesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchRemoteBranchesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Workspace. */ + interface IWorkspace { + + /** Workspace name */ + name?: (string|null); + } + + /** Represents a Workspace. */ + class Workspace implements IWorkspace { + + /** + * Constructs a new Workspace. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IWorkspace); + + /** Workspace name. */ + public name: string; + + /** + * Creates a new Workspace instance using the specified properties. + * @param [properties] Properties to set + * @returns Workspace instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IWorkspace): google.cloud.dataform.v1beta1.Workspace; + + /** + * Encodes the specified Workspace message. Does not implicitly {@link google.cloud.dataform.v1beta1.Workspace.verify|verify} messages. + * @param message Workspace message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IWorkspace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Workspace message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.Workspace.verify|verify} messages. + * @param message Workspace message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IWorkspace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Workspace message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Workspace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.Workspace; + + /** + * Decodes a Workspace message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Workspace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.Workspace; + + /** + * Verifies a Workspace message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Workspace message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Workspace + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.Workspace; + + /** + * Creates a plain object from a Workspace message. Also converts values to other types if specified. + * @param message Workspace + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.Workspace, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Workspace to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListWorkspacesRequest. */ + interface IListWorkspacesRequest { + + /** ListWorkspacesRequest parent */ + parent?: (string|null); + + /** ListWorkspacesRequest pageSize */ + pageSize?: (number|null); + + /** ListWorkspacesRequest pageToken */ + pageToken?: (string|null); + + /** ListWorkspacesRequest orderBy */ + orderBy?: (string|null); + + /** ListWorkspacesRequest filter */ + filter?: (string|null); + } + + /** Represents a ListWorkspacesRequest. */ + class ListWorkspacesRequest implements IListWorkspacesRequest { + + /** + * Constructs a new ListWorkspacesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IListWorkspacesRequest); + + /** ListWorkspacesRequest parent. */ + public parent: string; + + /** ListWorkspacesRequest pageSize. */ + public pageSize: number; + + /** ListWorkspacesRequest pageToken. */ + public pageToken: string; + + /** ListWorkspacesRequest orderBy. */ + public orderBy: string; + + /** ListWorkspacesRequest filter. */ + public filter: string; + + /** + * Creates a new ListWorkspacesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListWorkspacesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IListWorkspacesRequest): google.cloud.dataform.v1beta1.ListWorkspacesRequest; + + /** + * Encodes the specified ListWorkspacesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkspacesRequest.verify|verify} messages. + * @param message ListWorkspacesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IListWorkspacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListWorkspacesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkspacesRequest.verify|verify} messages. + * @param message ListWorkspacesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IListWorkspacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListWorkspacesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListWorkspacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ListWorkspacesRequest; + + /** + * Decodes a ListWorkspacesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListWorkspacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ListWorkspacesRequest; + + /** + * Verifies a ListWorkspacesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListWorkspacesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListWorkspacesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ListWorkspacesRequest; + + /** + * Creates a plain object from a ListWorkspacesRequest message. Also converts values to other types if specified. + * @param message ListWorkspacesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ListWorkspacesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListWorkspacesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListWorkspacesResponse. */ + interface IListWorkspacesResponse { + + /** ListWorkspacesResponse workspaces */ + workspaces?: (google.cloud.dataform.v1beta1.IWorkspace[]|null); + + /** ListWorkspacesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListWorkspacesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListWorkspacesResponse. */ + class ListWorkspacesResponse implements IListWorkspacesResponse { + + /** + * Constructs a new ListWorkspacesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IListWorkspacesResponse); + + /** ListWorkspacesResponse workspaces. */ + public workspaces: google.cloud.dataform.v1beta1.IWorkspace[]; + + /** ListWorkspacesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListWorkspacesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListWorkspacesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListWorkspacesResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IListWorkspacesResponse): google.cloud.dataform.v1beta1.ListWorkspacesResponse; + + /** + * Encodes the specified ListWorkspacesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkspacesResponse.verify|verify} messages. + * @param message ListWorkspacesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IListWorkspacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListWorkspacesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkspacesResponse.verify|verify} messages. + * @param message ListWorkspacesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IListWorkspacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListWorkspacesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListWorkspacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ListWorkspacesResponse; + + /** + * Decodes a ListWorkspacesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListWorkspacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ListWorkspacesResponse; + + /** + * Verifies a ListWorkspacesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListWorkspacesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListWorkspacesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ListWorkspacesResponse; + + /** + * Creates a plain object from a ListWorkspacesResponse message. Also converts values to other types if specified. + * @param message ListWorkspacesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ListWorkspacesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListWorkspacesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetWorkspaceRequest. */ + interface IGetWorkspaceRequest { + + /** GetWorkspaceRequest name */ + name?: (string|null); + } + + /** Represents a GetWorkspaceRequest. */ + class GetWorkspaceRequest implements IGetWorkspaceRequest { + + /** + * Constructs a new GetWorkspaceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IGetWorkspaceRequest); + + /** GetWorkspaceRequest name. */ + public name: string; + + /** + * Creates a new GetWorkspaceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetWorkspaceRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IGetWorkspaceRequest): google.cloud.dataform.v1beta1.GetWorkspaceRequest; + + /** + * Encodes the specified GetWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.GetWorkspaceRequest.verify|verify} messages. + * @param message GetWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IGetWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.GetWorkspaceRequest.verify|verify} messages. + * @param message GetWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IGetWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetWorkspaceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.GetWorkspaceRequest; + + /** + * Decodes a GetWorkspaceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.GetWorkspaceRequest; + + /** + * Verifies a GetWorkspaceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetWorkspaceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.GetWorkspaceRequest; + + /** + * Creates a plain object from a GetWorkspaceRequest message. Also converts values to other types if specified. + * @param message GetWorkspaceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.GetWorkspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetWorkspaceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateWorkspaceRequest. */ + interface ICreateWorkspaceRequest { + + /** CreateWorkspaceRequest parent */ + parent?: (string|null); + + /** CreateWorkspaceRequest workspace */ + workspace?: (google.cloud.dataform.v1beta1.IWorkspace|null); + + /** CreateWorkspaceRequest workspaceId */ + workspaceId?: (string|null); + } + + /** Represents a CreateWorkspaceRequest. */ + class CreateWorkspaceRequest implements ICreateWorkspaceRequest { + + /** + * Constructs a new CreateWorkspaceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ICreateWorkspaceRequest); + + /** CreateWorkspaceRequest parent. */ + public parent: string; + + /** CreateWorkspaceRequest workspace. */ + public workspace?: (google.cloud.dataform.v1beta1.IWorkspace|null); + + /** CreateWorkspaceRequest workspaceId. */ + public workspaceId: string; + + /** + * Creates a new CreateWorkspaceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateWorkspaceRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ICreateWorkspaceRequest): google.cloud.dataform.v1beta1.CreateWorkspaceRequest; + + /** + * Encodes the specified CreateWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateWorkspaceRequest.verify|verify} messages. + * @param message CreateWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ICreateWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateWorkspaceRequest.verify|verify} messages. + * @param message CreateWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ICreateWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateWorkspaceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CreateWorkspaceRequest; + + /** + * Decodes a CreateWorkspaceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CreateWorkspaceRequest; + + /** + * Verifies a CreateWorkspaceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateWorkspaceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CreateWorkspaceRequest; + + /** + * Creates a plain object from a CreateWorkspaceRequest message. Also converts values to other types if specified. + * @param message CreateWorkspaceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CreateWorkspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateWorkspaceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteWorkspaceRequest. */ + interface IDeleteWorkspaceRequest { + + /** DeleteWorkspaceRequest name */ + name?: (string|null); + } + + /** Represents a DeleteWorkspaceRequest. */ + class DeleteWorkspaceRequest implements IDeleteWorkspaceRequest { + + /** + * Constructs a new DeleteWorkspaceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest); + + /** DeleteWorkspaceRequest name. */ + public name: string; + + /** + * Creates a new DeleteWorkspaceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteWorkspaceRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest): google.cloud.dataform.v1beta1.DeleteWorkspaceRequest; + + /** + * Encodes the specified DeleteWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteWorkspaceRequest.verify|verify} messages. + * @param message DeleteWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteWorkspaceRequest.verify|verify} messages. + * @param message DeleteWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteWorkspaceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.DeleteWorkspaceRequest; + + /** + * Decodes a DeleteWorkspaceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.DeleteWorkspaceRequest; + + /** + * Verifies a DeleteWorkspaceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteWorkspaceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.DeleteWorkspaceRequest; + + /** + * Creates a plain object from a DeleteWorkspaceRequest message. Also converts values to other types if specified. + * @param message DeleteWorkspaceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.DeleteWorkspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteWorkspaceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CommitAuthor. */ + interface ICommitAuthor { + + /** CommitAuthor name */ + name?: (string|null); + + /** CommitAuthor emailAddress */ + emailAddress?: (string|null); + } + + /** Represents a CommitAuthor. */ + class CommitAuthor implements ICommitAuthor { + + /** + * Constructs a new CommitAuthor. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ICommitAuthor); + + /** CommitAuthor name. */ + public name: string; + + /** CommitAuthor emailAddress. */ + public emailAddress: string; + + /** + * Creates a new CommitAuthor instance using the specified properties. + * @param [properties] Properties to set + * @returns CommitAuthor instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ICommitAuthor): google.cloud.dataform.v1beta1.CommitAuthor; + + /** + * Encodes the specified CommitAuthor message. Does not implicitly {@link google.cloud.dataform.v1beta1.CommitAuthor.verify|verify} messages. + * @param message CommitAuthor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ICommitAuthor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommitAuthor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CommitAuthor.verify|verify} messages. + * @param message CommitAuthor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ICommitAuthor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommitAuthor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommitAuthor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CommitAuthor; + + /** + * Decodes a CommitAuthor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommitAuthor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CommitAuthor; + + /** + * Verifies a CommitAuthor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommitAuthor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommitAuthor + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CommitAuthor; + + /** + * Creates a plain object from a CommitAuthor message. Also converts values to other types if specified. + * @param message CommitAuthor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CommitAuthor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommitAuthor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PullGitCommitsRequest. */ + interface IPullGitCommitsRequest { + + /** PullGitCommitsRequest name */ + name?: (string|null); + + /** PullGitCommitsRequest remoteBranch */ + remoteBranch?: (string|null); + + /** PullGitCommitsRequest author */ + author?: (google.cloud.dataform.v1beta1.ICommitAuthor|null); + } + + /** Represents a PullGitCommitsRequest. */ + class PullGitCommitsRequest implements IPullGitCommitsRequest { + + /** + * Constructs a new PullGitCommitsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IPullGitCommitsRequest); + + /** PullGitCommitsRequest name. */ + public name: string; + + /** PullGitCommitsRequest remoteBranch. */ + public remoteBranch: string; + + /** PullGitCommitsRequest author. */ + public author?: (google.cloud.dataform.v1beta1.ICommitAuthor|null); + + /** + * Creates a new PullGitCommitsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PullGitCommitsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IPullGitCommitsRequest): google.cloud.dataform.v1beta1.PullGitCommitsRequest; + + /** + * Encodes the specified PullGitCommitsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.PullGitCommitsRequest.verify|verify} messages. + * @param message PullGitCommitsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IPullGitCommitsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PullGitCommitsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.PullGitCommitsRequest.verify|verify} messages. + * @param message PullGitCommitsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IPullGitCommitsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PullGitCommitsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PullGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.PullGitCommitsRequest; + + /** + * Decodes a PullGitCommitsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PullGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.PullGitCommitsRequest; + + /** + * Verifies a PullGitCommitsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PullGitCommitsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PullGitCommitsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.PullGitCommitsRequest; + + /** + * Creates a plain object from a PullGitCommitsRequest message. Also converts values to other types if specified. + * @param message PullGitCommitsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.PullGitCommitsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PullGitCommitsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PushGitCommitsRequest. */ + interface IPushGitCommitsRequest { + + /** PushGitCommitsRequest name */ + name?: (string|null); + + /** PushGitCommitsRequest remoteBranch */ + remoteBranch?: (string|null); + } + + /** Represents a PushGitCommitsRequest. */ + class PushGitCommitsRequest implements IPushGitCommitsRequest { + + /** + * Constructs a new PushGitCommitsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IPushGitCommitsRequest); + + /** PushGitCommitsRequest name. */ + public name: string; + + /** PushGitCommitsRequest remoteBranch. */ + public remoteBranch: string; + + /** + * Creates a new PushGitCommitsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PushGitCommitsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IPushGitCommitsRequest): google.cloud.dataform.v1beta1.PushGitCommitsRequest; + + /** + * Encodes the specified PushGitCommitsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.PushGitCommitsRequest.verify|verify} messages. + * @param message PushGitCommitsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IPushGitCommitsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PushGitCommitsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.PushGitCommitsRequest.verify|verify} messages. + * @param message PushGitCommitsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IPushGitCommitsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PushGitCommitsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PushGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.PushGitCommitsRequest; + + /** + * Decodes a PushGitCommitsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PushGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.PushGitCommitsRequest; + + /** + * Verifies a PushGitCommitsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PushGitCommitsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PushGitCommitsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.PushGitCommitsRequest; + + /** + * Creates a plain object from a PushGitCommitsRequest message. Also converts values to other types if specified. + * @param message PushGitCommitsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.PushGitCommitsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PushGitCommitsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FetchFileGitStatusesRequest. */ + interface IFetchFileGitStatusesRequest { + + /** FetchFileGitStatusesRequest name */ + name?: (string|null); + } + + /** Represents a FetchFileGitStatusesRequest. */ + class FetchFileGitStatusesRequest implements IFetchFileGitStatusesRequest { + + /** + * Constructs a new FetchFileGitStatusesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest); + + /** FetchFileGitStatusesRequest name. */ + public name: string; + + /** + * Creates a new FetchFileGitStatusesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchFileGitStatusesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest): google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest; + + /** + * Encodes the specified FetchFileGitStatusesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest.verify|verify} messages. + * @param message FetchFileGitStatusesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchFileGitStatusesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest.verify|verify} messages. + * @param message FetchFileGitStatusesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchFileGitStatusesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchFileGitStatusesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest; + + /** + * Decodes a FetchFileGitStatusesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchFileGitStatusesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest; + + /** + * Verifies a FetchFileGitStatusesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchFileGitStatusesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchFileGitStatusesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest; + + /** + * Creates a plain object from a FetchFileGitStatusesRequest message. Also converts values to other types if specified. + * @param message FetchFileGitStatusesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchFileGitStatusesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FetchFileGitStatusesResponse. */ + interface IFetchFileGitStatusesResponse { + + /** FetchFileGitStatusesResponse uncommittedFileChanges */ + uncommittedFileChanges?: (google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange[]|null); + } + + /** Represents a FetchFileGitStatusesResponse. */ + class FetchFileGitStatusesResponse implements IFetchFileGitStatusesResponse { + + /** + * Constructs a new FetchFileGitStatusesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse); + + /** FetchFileGitStatusesResponse uncommittedFileChanges. */ + public uncommittedFileChanges: google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange[]; + + /** + * Creates a new FetchFileGitStatusesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchFileGitStatusesResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse): google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse; + + /** + * Encodes the specified FetchFileGitStatusesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.verify|verify} messages. + * @param message FetchFileGitStatusesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchFileGitStatusesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.verify|verify} messages. + * @param message FetchFileGitStatusesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchFileGitStatusesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchFileGitStatusesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse; + + /** + * Decodes a FetchFileGitStatusesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchFileGitStatusesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse; + + /** + * Verifies a FetchFileGitStatusesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchFileGitStatusesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchFileGitStatusesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse; + + /** + * Creates a plain object from a FetchFileGitStatusesResponse message. Also converts values to other types if specified. + * @param message FetchFileGitStatusesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchFileGitStatusesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FetchFileGitStatusesResponse { + + /** Properties of an UncommittedFileChange. */ + interface IUncommittedFileChange { + + /** UncommittedFileChange path */ + path?: (string|null); + + /** UncommittedFileChange state */ + state?: (google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.State|keyof typeof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.State|null); + } + + /** Represents an UncommittedFileChange. */ + class UncommittedFileChange implements IUncommittedFileChange { + + /** + * Constructs a new UncommittedFileChange. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange); + + /** UncommittedFileChange path. */ + public path: string; + + /** UncommittedFileChange state. */ + public state: (google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.State|keyof typeof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.State); + + /** + * Creates a new UncommittedFileChange instance using the specified properties. + * @param [properties] Properties to set + * @returns UncommittedFileChange instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange): google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange; + + /** + * Encodes the specified UncommittedFileChange message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.verify|verify} messages. + * @param message UncommittedFileChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UncommittedFileChange message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.verify|verify} messages. + * @param message UncommittedFileChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UncommittedFileChange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UncommittedFileChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange; + + /** + * Decodes an UncommittedFileChange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UncommittedFileChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange; + + /** + * Verifies an UncommittedFileChange message. + * @param message Plain 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 UncommittedFileChange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UncommittedFileChange + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange; + + /** + * Creates a plain object from an UncommittedFileChange message. Also converts values to other types if specified. + * @param message UncommittedFileChange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UncommittedFileChange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace UncommittedFileChange { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ADDED = 1, + DELETED = 2, + MODIFIED = 3, + HAS_CONFLICTS = 4 + } + } + } + + /** Properties of a FetchGitAheadBehindRequest. */ + interface IFetchGitAheadBehindRequest { + + /** FetchGitAheadBehindRequest name */ + name?: (string|null); + + /** FetchGitAheadBehindRequest remoteBranch */ + remoteBranch?: (string|null); + } + + /** Represents a FetchGitAheadBehindRequest. */ + class FetchGitAheadBehindRequest implements IFetchGitAheadBehindRequest { + + /** + * Constructs a new FetchGitAheadBehindRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest); + + /** FetchGitAheadBehindRequest name. */ + public name: string; + + /** FetchGitAheadBehindRequest remoteBranch. */ + public remoteBranch: string; + + /** + * Creates a new FetchGitAheadBehindRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchGitAheadBehindRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest): google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest; + + /** + * Encodes the specified FetchGitAheadBehindRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest.verify|verify} messages. + * @param message FetchGitAheadBehindRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchGitAheadBehindRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest.verify|verify} messages. + * @param message FetchGitAheadBehindRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchGitAheadBehindRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchGitAheadBehindRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest; + + /** + * Decodes a FetchGitAheadBehindRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchGitAheadBehindRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest; + + /** + * Verifies a FetchGitAheadBehindRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchGitAheadBehindRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchGitAheadBehindRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest; + + /** + * Creates a plain object from a FetchGitAheadBehindRequest message. Also converts values to other types if specified. + * @param message FetchGitAheadBehindRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchGitAheadBehindRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FetchGitAheadBehindResponse. */ + interface IFetchGitAheadBehindResponse { + + /** FetchGitAheadBehindResponse commitsAhead */ + commitsAhead?: (number|null); + + /** FetchGitAheadBehindResponse commitsBehind */ + commitsBehind?: (number|null); + } + + /** Represents a FetchGitAheadBehindResponse. */ + class FetchGitAheadBehindResponse implements IFetchGitAheadBehindResponse { + + /** + * Constructs a new FetchGitAheadBehindResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse); + + /** FetchGitAheadBehindResponse commitsAhead. */ + public commitsAhead: number; + + /** FetchGitAheadBehindResponse commitsBehind. */ + public commitsBehind: number; + + /** + * Creates a new FetchGitAheadBehindResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchGitAheadBehindResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse): google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse; + + /** + * Encodes the specified FetchGitAheadBehindResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse.verify|verify} messages. + * @param message FetchGitAheadBehindResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchGitAheadBehindResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse.verify|verify} messages. + * @param message FetchGitAheadBehindResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchGitAheadBehindResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchGitAheadBehindResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse; + + /** + * Decodes a FetchGitAheadBehindResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchGitAheadBehindResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse; + + /** + * Verifies a FetchGitAheadBehindResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchGitAheadBehindResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchGitAheadBehindResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse; + + /** + * Creates a plain object from a FetchGitAheadBehindResponse message. Also converts values to other types if specified. + * @param message FetchGitAheadBehindResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchGitAheadBehindResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CommitWorkspaceChangesRequest. */ + interface ICommitWorkspaceChangesRequest { + + /** CommitWorkspaceChangesRequest name */ + name?: (string|null); + + /** CommitWorkspaceChangesRequest author */ + author?: (google.cloud.dataform.v1beta1.ICommitAuthor|null); + + /** CommitWorkspaceChangesRequest commitMessage */ + commitMessage?: (string|null); + + /** CommitWorkspaceChangesRequest paths */ + paths?: (string[]|null); + } + + /** Represents a CommitWorkspaceChangesRequest. */ + class CommitWorkspaceChangesRequest implements ICommitWorkspaceChangesRequest { + + /** + * Constructs a new CommitWorkspaceChangesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest); + + /** CommitWorkspaceChangesRequest name. */ + public name: string; + + /** CommitWorkspaceChangesRequest author. */ + public author?: (google.cloud.dataform.v1beta1.ICommitAuthor|null); + + /** CommitWorkspaceChangesRequest commitMessage. */ + public commitMessage: string; + + /** CommitWorkspaceChangesRequest paths. */ + public paths: string[]; + + /** + * Creates a new CommitWorkspaceChangesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CommitWorkspaceChangesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest): google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest; + + /** + * Encodes the specified CommitWorkspaceChangesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest.verify|verify} messages. + * @param message CommitWorkspaceChangesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommitWorkspaceChangesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest.verify|verify} messages. + * @param message CommitWorkspaceChangesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommitWorkspaceChangesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommitWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest; + + /** + * Decodes a CommitWorkspaceChangesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommitWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest; + + /** + * Verifies a CommitWorkspaceChangesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommitWorkspaceChangesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommitWorkspaceChangesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest; + + /** + * Creates a plain object from a CommitWorkspaceChangesRequest message. Also converts values to other types if specified. + * @param message CommitWorkspaceChangesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommitWorkspaceChangesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ResetWorkspaceChangesRequest. */ + interface IResetWorkspaceChangesRequest { + + /** ResetWorkspaceChangesRequest name */ + name?: (string|null); + + /** ResetWorkspaceChangesRequest paths */ + paths?: (string[]|null); + + /** ResetWorkspaceChangesRequest clean */ + clean?: (boolean|null); + } + + /** Represents a ResetWorkspaceChangesRequest. */ + class ResetWorkspaceChangesRequest implements IResetWorkspaceChangesRequest { + + /** + * Constructs a new ResetWorkspaceChangesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest); + + /** ResetWorkspaceChangesRequest name. */ + public name: string; + + /** ResetWorkspaceChangesRequest paths. */ + public paths: string[]; + + /** ResetWorkspaceChangesRequest clean. */ + public clean: boolean; + + /** + * Creates a new ResetWorkspaceChangesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ResetWorkspaceChangesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest): google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest; + + /** + * Encodes the specified ResetWorkspaceChangesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest.verify|verify} messages. + * @param message ResetWorkspaceChangesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResetWorkspaceChangesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest.verify|verify} messages. + * @param message ResetWorkspaceChangesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResetWorkspaceChangesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResetWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest; + + /** + * Decodes a ResetWorkspaceChangesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResetWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest; + + /** + * Verifies a ResetWorkspaceChangesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResetWorkspaceChangesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResetWorkspaceChangesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest; + + /** + * Creates a plain object from a ResetWorkspaceChangesRequest message. Also converts values to other types if specified. + * @param message ResetWorkspaceChangesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResetWorkspaceChangesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FetchFileDiffRequest. */ + interface IFetchFileDiffRequest { + + /** FetchFileDiffRequest workspace */ + workspace?: (string|null); + + /** FetchFileDiffRequest path */ + path?: (string|null); + } + + /** Represents a FetchFileDiffRequest. */ + class FetchFileDiffRequest implements IFetchFileDiffRequest { + + /** + * Constructs a new FetchFileDiffRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IFetchFileDiffRequest); + + /** FetchFileDiffRequest workspace. */ + public workspace: string; + + /** FetchFileDiffRequest path. */ + public path: string; + + /** + * Creates a new FetchFileDiffRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchFileDiffRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IFetchFileDiffRequest): google.cloud.dataform.v1beta1.FetchFileDiffRequest; + + /** + * Encodes the specified FetchFileDiffRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileDiffRequest.verify|verify} messages. + * @param message FetchFileDiffRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IFetchFileDiffRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchFileDiffRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileDiffRequest.verify|verify} messages. + * @param message FetchFileDiffRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IFetchFileDiffRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchFileDiffRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchFileDiffRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.FetchFileDiffRequest; + + /** + * Decodes a FetchFileDiffRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchFileDiffRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.FetchFileDiffRequest; + + /** + * Verifies a FetchFileDiffRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchFileDiffRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchFileDiffRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.FetchFileDiffRequest; + + /** + * Creates a plain object from a FetchFileDiffRequest message. Also converts values to other types if specified. + * @param message FetchFileDiffRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.FetchFileDiffRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchFileDiffRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FetchFileDiffResponse. */ + interface IFetchFileDiffResponse { + + /** FetchFileDiffResponse formattedDiff */ + formattedDiff?: (string|null); + } + + /** Represents a FetchFileDiffResponse. */ + class FetchFileDiffResponse implements IFetchFileDiffResponse { + + /** + * Constructs a new FetchFileDiffResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IFetchFileDiffResponse); + + /** FetchFileDiffResponse formattedDiff. */ + public formattedDiff: string; + + /** + * Creates a new FetchFileDiffResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchFileDiffResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IFetchFileDiffResponse): google.cloud.dataform.v1beta1.FetchFileDiffResponse; + + /** + * Encodes the specified FetchFileDiffResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileDiffResponse.verify|verify} messages. + * @param message FetchFileDiffResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IFetchFileDiffResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchFileDiffResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileDiffResponse.verify|verify} messages. + * @param message FetchFileDiffResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IFetchFileDiffResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchFileDiffResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchFileDiffResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.FetchFileDiffResponse; + + /** + * Decodes a FetchFileDiffResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchFileDiffResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.FetchFileDiffResponse; + + /** + * Verifies a FetchFileDiffResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchFileDiffResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchFileDiffResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.FetchFileDiffResponse; + + /** + * Creates a plain object from a FetchFileDiffResponse message. Also converts values to other types if specified. + * @param message FetchFileDiffResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.FetchFileDiffResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchFileDiffResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QueryDirectoryContentsRequest. */ + interface IQueryDirectoryContentsRequest { + + /** QueryDirectoryContentsRequest workspace */ + workspace?: (string|null); + + /** QueryDirectoryContentsRequest path */ + path?: (string|null); + + /** QueryDirectoryContentsRequest pageSize */ + pageSize?: (number|null); + + /** QueryDirectoryContentsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a QueryDirectoryContentsRequest. */ + class QueryDirectoryContentsRequest implements IQueryDirectoryContentsRequest { + + /** + * Constructs a new QueryDirectoryContentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest); + + /** QueryDirectoryContentsRequest workspace. */ + public workspace: string; + + /** QueryDirectoryContentsRequest path. */ + public path: string; + + /** QueryDirectoryContentsRequest pageSize. */ + public pageSize: number; + + /** QueryDirectoryContentsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new QueryDirectoryContentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDirectoryContentsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest): google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest; + + /** + * Encodes the specified QueryDirectoryContentsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest.verify|verify} messages. + * @param message QueryDirectoryContentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryDirectoryContentsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest.verify|verify} messages. + * @param message QueryDirectoryContentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryDirectoryContentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryDirectoryContentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest; + + /** + * Decodes a QueryDirectoryContentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryDirectoryContentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest; + + /** + * Verifies a QueryDirectoryContentsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryDirectoryContentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryDirectoryContentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest; + + /** + * Creates a plain object from a QueryDirectoryContentsRequest message. Also converts values to other types if specified. + * @param message QueryDirectoryContentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryDirectoryContentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QueryDirectoryContentsResponse. */ + interface IQueryDirectoryContentsResponse { + + /** QueryDirectoryContentsResponse directoryEntries */ + directoryEntries?: (google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry[]|null); + + /** QueryDirectoryContentsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a QueryDirectoryContentsResponse. */ + class QueryDirectoryContentsResponse implements IQueryDirectoryContentsResponse { + + /** + * Constructs a new QueryDirectoryContentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse); + + /** QueryDirectoryContentsResponse directoryEntries. */ + public directoryEntries: google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry[]; + + /** QueryDirectoryContentsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new QueryDirectoryContentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDirectoryContentsResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse): google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse; + + /** + * Encodes the specified QueryDirectoryContentsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.verify|verify} messages. + * @param message QueryDirectoryContentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryDirectoryContentsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.verify|verify} messages. + * @param message QueryDirectoryContentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryDirectoryContentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryDirectoryContentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse; + + /** + * Decodes a QueryDirectoryContentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryDirectoryContentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse; + + /** + * Verifies a QueryDirectoryContentsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryDirectoryContentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryDirectoryContentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse; + + /** + * Creates a plain object from a QueryDirectoryContentsResponse message. Also converts values to other types if specified. + * @param message QueryDirectoryContentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryDirectoryContentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace QueryDirectoryContentsResponse { + + /** Properties of a DirectoryEntry. */ + interface IDirectoryEntry { + + /** DirectoryEntry file */ + file?: (string|null); + + /** DirectoryEntry directory */ + directory?: (string|null); + } + + /** Represents a DirectoryEntry. */ + class DirectoryEntry implements IDirectoryEntry { + + /** + * Constructs a new DirectoryEntry. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry); + + /** DirectoryEntry file. */ + public file?: (string|null); + + /** DirectoryEntry directory. */ + public directory?: (string|null); + + /** DirectoryEntry entry. */ + public entry?: ("file"|"directory"); + + /** + * Creates a new DirectoryEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns DirectoryEntry instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry): google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry; + + /** + * Encodes the specified DirectoryEntry message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry.verify|verify} messages. + * @param message DirectoryEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DirectoryEntry message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry.verify|verify} messages. + * @param message DirectoryEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DirectoryEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DirectoryEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry; + + /** + * Decodes a DirectoryEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DirectoryEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry; + + /** + * Verifies a DirectoryEntry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DirectoryEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DirectoryEntry + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry; + + /** + * Creates a plain object from a DirectoryEntry message. Also converts values to other types if specified. + * @param message DirectoryEntry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DirectoryEntry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a MakeDirectoryRequest. */ + interface IMakeDirectoryRequest { + + /** MakeDirectoryRequest workspace */ + workspace?: (string|null); + + /** MakeDirectoryRequest path */ + path?: (string|null); + } + + /** Represents a MakeDirectoryRequest. */ + class MakeDirectoryRequest implements IMakeDirectoryRequest { + + /** + * Constructs a new MakeDirectoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IMakeDirectoryRequest); + + /** MakeDirectoryRequest workspace. */ + public workspace: string; + + /** MakeDirectoryRequest path. */ + public path: string; + + /** + * Creates a new MakeDirectoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns MakeDirectoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IMakeDirectoryRequest): google.cloud.dataform.v1beta1.MakeDirectoryRequest; + + /** + * Encodes the specified MakeDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.MakeDirectoryRequest.verify|verify} messages. + * @param message MakeDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IMakeDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MakeDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MakeDirectoryRequest.verify|verify} messages. + * @param message MakeDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IMakeDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MakeDirectoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MakeDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.MakeDirectoryRequest; + + /** + * Decodes a MakeDirectoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MakeDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.MakeDirectoryRequest; + + /** + * Verifies a MakeDirectoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MakeDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MakeDirectoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.MakeDirectoryRequest; + + /** + * Creates a plain object from a MakeDirectoryRequest message. Also converts values to other types if specified. + * @param message MakeDirectoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.MakeDirectoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MakeDirectoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MakeDirectoryResponse. */ + interface IMakeDirectoryResponse { + } + + /** Represents a MakeDirectoryResponse. */ + class MakeDirectoryResponse implements IMakeDirectoryResponse { + + /** + * Constructs a new MakeDirectoryResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IMakeDirectoryResponse); + + /** + * Creates a new MakeDirectoryResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns MakeDirectoryResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IMakeDirectoryResponse): google.cloud.dataform.v1beta1.MakeDirectoryResponse; + + /** + * Encodes the specified MakeDirectoryResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.MakeDirectoryResponse.verify|verify} messages. + * @param message MakeDirectoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IMakeDirectoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MakeDirectoryResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MakeDirectoryResponse.verify|verify} messages. + * @param message MakeDirectoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IMakeDirectoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MakeDirectoryResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MakeDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.MakeDirectoryResponse; + + /** + * Decodes a MakeDirectoryResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MakeDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.MakeDirectoryResponse; + + /** + * Verifies a MakeDirectoryResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MakeDirectoryResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MakeDirectoryResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.MakeDirectoryResponse; + + /** + * Creates a plain object from a MakeDirectoryResponse message. Also converts values to other types if specified. + * @param message MakeDirectoryResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.MakeDirectoryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MakeDirectoryResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RemoveDirectoryRequest. */ + interface IRemoveDirectoryRequest { + + /** RemoveDirectoryRequest workspace */ + workspace?: (string|null); + + /** RemoveDirectoryRequest path */ + path?: (string|null); + } + + /** Represents a RemoveDirectoryRequest. */ + class RemoveDirectoryRequest implements IRemoveDirectoryRequest { + + /** + * Constructs a new RemoveDirectoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IRemoveDirectoryRequest); + + /** RemoveDirectoryRequest workspace. */ + public workspace: string; + + /** RemoveDirectoryRequest path. */ + public path: string; + + /** + * Creates a new RemoveDirectoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RemoveDirectoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IRemoveDirectoryRequest): google.cloud.dataform.v1beta1.RemoveDirectoryRequest; + + /** + * Encodes the specified RemoveDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.RemoveDirectoryRequest.verify|verify} messages. + * @param message RemoveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IRemoveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemoveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.RemoveDirectoryRequest.verify|verify} messages. + * @param message RemoveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IRemoveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemoveDirectoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.RemoveDirectoryRequest; + + /** + * Decodes a RemoveDirectoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.RemoveDirectoryRequest; + + /** + * Verifies a RemoveDirectoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RemoveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemoveDirectoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.RemoveDirectoryRequest; + + /** + * Creates a plain object from a RemoveDirectoryRequest message. Also converts values to other types if specified. + * @param message RemoveDirectoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.RemoveDirectoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemoveDirectoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MoveDirectoryRequest. */ + interface IMoveDirectoryRequest { + + /** MoveDirectoryRequest workspace */ + workspace?: (string|null); + + /** MoveDirectoryRequest path */ + path?: (string|null); + + /** MoveDirectoryRequest newPath */ + newPath?: (string|null); + } + + /** Represents a MoveDirectoryRequest. */ + class MoveDirectoryRequest implements IMoveDirectoryRequest { + + /** + * Constructs a new MoveDirectoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IMoveDirectoryRequest); + + /** MoveDirectoryRequest workspace. */ + public workspace: string; + + /** MoveDirectoryRequest path. */ + public path: string; + + /** MoveDirectoryRequest newPath. */ + public newPath: string; + + /** + * Creates a new MoveDirectoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns MoveDirectoryRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IMoveDirectoryRequest): google.cloud.dataform.v1beta1.MoveDirectoryRequest; + + /** + * Encodes the specified MoveDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveDirectoryRequest.verify|verify} messages. + * @param message MoveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IMoveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MoveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveDirectoryRequest.verify|verify} messages. + * @param message MoveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IMoveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MoveDirectoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.MoveDirectoryRequest; + + /** + * Decodes a MoveDirectoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.MoveDirectoryRequest; + + /** + * Verifies a MoveDirectoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MoveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MoveDirectoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.MoveDirectoryRequest; + + /** + * Creates a plain object from a MoveDirectoryRequest message. Also converts values to other types if specified. + * @param message MoveDirectoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.MoveDirectoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MoveDirectoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MoveDirectoryResponse. */ + interface IMoveDirectoryResponse { + } + + /** Represents a MoveDirectoryResponse. */ + class MoveDirectoryResponse implements IMoveDirectoryResponse { + + /** + * Constructs a new MoveDirectoryResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IMoveDirectoryResponse); + + /** + * Creates a new MoveDirectoryResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns MoveDirectoryResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IMoveDirectoryResponse): google.cloud.dataform.v1beta1.MoveDirectoryResponse; + + /** + * Encodes the specified MoveDirectoryResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveDirectoryResponse.verify|verify} messages. + * @param message MoveDirectoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IMoveDirectoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MoveDirectoryResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveDirectoryResponse.verify|verify} messages. + * @param message MoveDirectoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IMoveDirectoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MoveDirectoryResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MoveDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.MoveDirectoryResponse; + + /** + * Decodes a MoveDirectoryResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MoveDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.MoveDirectoryResponse; + + /** + * Verifies a MoveDirectoryResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MoveDirectoryResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MoveDirectoryResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.MoveDirectoryResponse; + + /** + * Creates a plain object from a MoveDirectoryResponse message. Also converts values to other types if specified. + * @param message MoveDirectoryResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.MoveDirectoryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MoveDirectoryResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ReadFileRequest. */ + interface IReadFileRequest { + + /** ReadFileRequest workspace */ + workspace?: (string|null); + + /** ReadFileRequest path */ + path?: (string|null); + } + + /** Represents a ReadFileRequest. */ + class ReadFileRequest implements IReadFileRequest { + + /** + * Constructs a new ReadFileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IReadFileRequest); + + /** ReadFileRequest workspace. */ + public workspace: string; + + /** ReadFileRequest path. */ + public path: string; + + /** + * Creates a new ReadFileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ReadFileRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IReadFileRequest): google.cloud.dataform.v1beta1.ReadFileRequest; + + /** + * Encodes the specified ReadFileRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ReadFileRequest.verify|verify} messages. + * @param message ReadFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IReadFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReadFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ReadFileRequest.verify|verify} messages. + * @param message ReadFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IReadFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReadFileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReadFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ReadFileRequest; + + /** + * Decodes a ReadFileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReadFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ReadFileRequest; + + /** + * Verifies a ReadFileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReadFileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReadFileRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ReadFileRequest; + + /** + * Creates a plain object from a ReadFileRequest message. Also converts values to other types if specified. + * @param message ReadFileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ReadFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReadFileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ReadFileResponse. */ + interface IReadFileResponse { + + /** ReadFileResponse fileContents */ + fileContents?: (Uint8Array|string|null); + } + + /** Represents a ReadFileResponse. */ + class ReadFileResponse implements IReadFileResponse { + + /** + * Constructs a new ReadFileResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IReadFileResponse); + + /** ReadFileResponse fileContents. */ + public fileContents: (Uint8Array|string); + + /** + * Creates a new ReadFileResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ReadFileResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IReadFileResponse): google.cloud.dataform.v1beta1.ReadFileResponse; + + /** + * Encodes the specified ReadFileResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ReadFileResponse.verify|verify} messages. + * @param message ReadFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IReadFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReadFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ReadFileResponse.verify|verify} messages. + * @param message ReadFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IReadFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReadFileResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReadFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ReadFileResponse; + + /** + * Decodes a ReadFileResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReadFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ReadFileResponse; + + /** + * Verifies a ReadFileResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReadFileResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReadFileResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ReadFileResponse; + + /** + * Creates a plain object from a ReadFileResponse message. Also converts values to other types if specified. + * @param message ReadFileResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ReadFileResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReadFileResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RemoveFileRequest. */ + interface IRemoveFileRequest { + + /** RemoveFileRequest workspace */ + workspace?: (string|null); + + /** RemoveFileRequest path */ + path?: (string|null); + } + + /** Represents a RemoveFileRequest. */ + class RemoveFileRequest implements IRemoveFileRequest { + + /** + * Constructs a new RemoveFileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IRemoveFileRequest); + + /** RemoveFileRequest workspace. */ + public workspace: string; + + /** RemoveFileRequest path. */ + public path: string; + + /** + * Creates a new RemoveFileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RemoveFileRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IRemoveFileRequest): google.cloud.dataform.v1beta1.RemoveFileRequest; + + /** + * Encodes the specified RemoveFileRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.RemoveFileRequest.verify|verify} messages. + * @param message RemoveFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IRemoveFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemoveFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.RemoveFileRequest.verify|verify} messages. + * @param message RemoveFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IRemoveFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemoveFileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.RemoveFileRequest; + + /** + * Decodes a RemoveFileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.RemoveFileRequest; + + /** + * Verifies a RemoveFileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RemoveFileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemoveFileRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.RemoveFileRequest; + + /** + * Creates a plain object from a RemoveFileRequest message. Also converts values to other types if specified. + * @param message RemoveFileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.RemoveFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemoveFileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MoveFileRequest. */ + interface IMoveFileRequest { + + /** MoveFileRequest workspace */ + workspace?: (string|null); + + /** MoveFileRequest path */ + path?: (string|null); + + /** MoveFileRequest newPath */ + newPath?: (string|null); + } + + /** Represents a MoveFileRequest. */ + class MoveFileRequest implements IMoveFileRequest { + + /** + * Constructs a new MoveFileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IMoveFileRequest); + + /** MoveFileRequest workspace. */ + public workspace: string; + + /** MoveFileRequest path. */ + public path: string; + + /** MoveFileRequest newPath. */ + public newPath: string; + + /** + * Creates a new MoveFileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns MoveFileRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IMoveFileRequest): google.cloud.dataform.v1beta1.MoveFileRequest; + + /** + * Encodes the specified MoveFileRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveFileRequest.verify|verify} messages. + * @param message MoveFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IMoveFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MoveFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveFileRequest.verify|verify} messages. + * @param message MoveFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IMoveFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MoveFileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.MoveFileRequest; + + /** + * Decodes a MoveFileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.MoveFileRequest; + + /** + * Verifies a MoveFileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MoveFileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MoveFileRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.MoveFileRequest; + + /** + * Creates a plain object from a MoveFileRequest message. Also converts values to other types if specified. + * @param message MoveFileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.MoveFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MoveFileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MoveFileResponse. */ + interface IMoveFileResponse { + } + + /** Represents a MoveFileResponse. */ + class MoveFileResponse implements IMoveFileResponse { + + /** + * Constructs a new MoveFileResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IMoveFileResponse); + + /** + * Creates a new MoveFileResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns MoveFileResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IMoveFileResponse): google.cloud.dataform.v1beta1.MoveFileResponse; + + /** + * Encodes the specified MoveFileResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveFileResponse.verify|verify} messages. + * @param message MoveFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IMoveFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MoveFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveFileResponse.verify|verify} messages. + * @param message MoveFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IMoveFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MoveFileResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MoveFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.MoveFileResponse; + + /** + * Decodes a MoveFileResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MoveFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.MoveFileResponse; + + /** + * Verifies a MoveFileResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MoveFileResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MoveFileResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.MoveFileResponse; + + /** + * Creates a plain object from a MoveFileResponse message. Also converts values to other types if specified. + * @param message MoveFileResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.MoveFileResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MoveFileResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WriteFileRequest. */ + interface IWriteFileRequest { + + /** WriteFileRequest workspace */ + workspace?: (string|null); + + /** WriteFileRequest path */ + path?: (string|null); + + /** WriteFileRequest contents */ + contents?: (Uint8Array|string|null); + } + + /** Represents a WriteFileRequest. */ + class WriteFileRequest implements IWriteFileRequest { + + /** + * Constructs a new WriteFileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IWriteFileRequest); + + /** WriteFileRequest workspace. */ + public workspace: string; + + /** WriteFileRequest path. */ + public path: string; + + /** WriteFileRequest contents. */ + public contents: (Uint8Array|string); + + /** + * Creates a new WriteFileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WriteFileRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IWriteFileRequest): google.cloud.dataform.v1beta1.WriteFileRequest; + + /** + * Encodes the specified WriteFileRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.WriteFileRequest.verify|verify} messages. + * @param message WriteFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IWriteFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WriteFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WriteFileRequest.verify|verify} messages. + * @param message WriteFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IWriteFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WriteFileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WriteFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.WriteFileRequest; + + /** + * Decodes a WriteFileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WriteFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.WriteFileRequest; + + /** + * Verifies a WriteFileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WriteFileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WriteFileRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.WriteFileRequest; + + /** + * Creates a plain object from a WriteFileRequest message. Also converts values to other types if specified. + * @param message WriteFileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.WriteFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WriteFileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WriteFileResponse. */ + interface IWriteFileResponse { + } + + /** Represents a WriteFileResponse. */ + class WriteFileResponse implements IWriteFileResponse { + + /** + * Constructs a new WriteFileResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IWriteFileResponse); + + /** + * Creates a new WriteFileResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns WriteFileResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IWriteFileResponse): google.cloud.dataform.v1beta1.WriteFileResponse; + + /** + * Encodes the specified WriteFileResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.WriteFileResponse.verify|verify} messages. + * @param message WriteFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IWriteFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WriteFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WriteFileResponse.verify|verify} messages. + * @param message WriteFileResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IWriteFileResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WriteFileResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WriteFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.WriteFileResponse; + + /** + * Decodes a WriteFileResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WriteFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.WriteFileResponse; + + /** + * Verifies a WriteFileResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WriteFileResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WriteFileResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.WriteFileResponse; + + /** + * Creates a plain object from a WriteFileResponse message. Also converts values to other types if specified. + * @param message WriteFileResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.WriteFileResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WriteFileResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an InstallNpmPackagesRequest. */ + interface IInstallNpmPackagesRequest { + + /** InstallNpmPackagesRequest workspace */ + workspace?: (string|null); + } + + /** Represents an InstallNpmPackagesRequest. */ + class InstallNpmPackagesRequest implements IInstallNpmPackagesRequest { + + /** + * Constructs a new InstallNpmPackagesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest); + + /** InstallNpmPackagesRequest workspace. */ + public workspace: string; + + /** + * Creates a new InstallNpmPackagesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns InstallNpmPackagesRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest): google.cloud.dataform.v1beta1.InstallNpmPackagesRequest; + + /** + * Encodes the specified InstallNpmPackagesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.InstallNpmPackagesRequest.verify|verify} messages. + * @param message InstallNpmPackagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InstallNpmPackagesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.InstallNpmPackagesRequest.verify|verify} messages. + * @param message InstallNpmPackagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InstallNpmPackagesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InstallNpmPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.InstallNpmPackagesRequest; + + /** + * Decodes an InstallNpmPackagesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InstallNpmPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.InstallNpmPackagesRequest; + + /** + * Verifies an InstallNpmPackagesRequest message. + * @param message Plain 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 InstallNpmPackagesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InstallNpmPackagesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.InstallNpmPackagesRequest; + + /** + * Creates a plain object from an InstallNpmPackagesRequest message. Also converts values to other types if specified. + * @param message InstallNpmPackagesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.InstallNpmPackagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InstallNpmPackagesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an InstallNpmPackagesResponse. */ + interface IInstallNpmPackagesResponse { + } + + /** Represents an InstallNpmPackagesResponse. */ + class InstallNpmPackagesResponse implements IInstallNpmPackagesResponse { + + /** + * Constructs a new InstallNpmPackagesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse); + + /** + * Creates a new InstallNpmPackagesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns InstallNpmPackagesResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse): google.cloud.dataform.v1beta1.InstallNpmPackagesResponse; + + /** + * Encodes the specified InstallNpmPackagesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.InstallNpmPackagesResponse.verify|verify} messages. + * @param message InstallNpmPackagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InstallNpmPackagesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.InstallNpmPackagesResponse.verify|verify} messages. + * @param message InstallNpmPackagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InstallNpmPackagesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InstallNpmPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.InstallNpmPackagesResponse; + + /** + * Decodes an InstallNpmPackagesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InstallNpmPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.InstallNpmPackagesResponse; + + /** + * Verifies an InstallNpmPackagesResponse message. + * @param message Plain 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 InstallNpmPackagesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InstallNpmPackagesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.InstallNpmPackagesResponse; + + /** + * Creates a plain object from an InstallNpmPackagesResponse message. Also converts values to other types if specified. + * @param message InstallNpmPackagesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.InstallNpmPackagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InstallNpmPackagesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CompilationResult. */ + interface ICompilationResult { + + /** CompilationResult name */ + name?: (string|null); + + /** CompilationResult gitCommitish */ + gitCommitish?: (string|null); + + /** CompilationResult workspace */ + workspace?: (string|null); + + /** CompilationResult codeCompilationConfig */ + codeCompilationConfig?: (google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig|null); + + /** CompilationResult dataformCoreVersion */ + dataformCoreVersion?: (string|null); + + /** CompilationResult compilationErrors */ + compilationErrors?: (google.cloud.dataform.v1beta1.CompilationResult.ICompilationError[]|null); + } + + /** Represents a CompilationResult. */ + class CompilationResult implements ICompilationResult { + + /** + * Constructs a new CompilationResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ICompilationResult); + + /** CompilationResult name. */ + public name: string; + + /** CompilationResult gitCommitish. */ + public gitCommitish?: (string|null); + + /** CompilationResult workspace. */ + public workspace?: (string|null); + + /** CompilationResult codeCompilationConfig. */ + public codeCompilationConfig?: (google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig|null); + + /** CompilationResult dataformCoreVersion. */ + public dataformCoreVersion: string; + + /** CompilationResult compilationErrors. */ + public compilationErrors: google.cloud.dataform.v1beta1.CompilationResult.ICompilationError[]; + + /** CompilationResult source. */ + public source?: ("gitCommitish"|"workspace"); + + /** + * Creates a new CompilationResult instance using the specified properties. + * @param [properties] Properties to set + * @returns CompilationResult instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ICompilationResult): google.cloud.dataform.v1beta1.CompilationResult; + + /** + * Encodes the specified CompilationResult message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.verify|verify} messages. + * @param message CompilationResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ICompilationResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompilationResult message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.verify|verify} messages. + * @param message CompilationResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ICompilationResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompilationResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompilationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CompilationResult; + + /** + * Decodes a CompilationResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompilationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CompilationResult; + + /** + * Verifies a CompilationResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompilationResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompilationResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CompilationResult; + + /** + * Creates a plain object from a CompilationResult message. Also converts values to other types if specified. + * @param message CompilationResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CompilationResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompilationResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace CompilationResult { + + /** Properties of a CodeCompilationConfig. */ + interface ICodeCompilationConfig { + + /** CodeCompilationConfig defaultDatabase */ + defaultDatabase?: (string|null); + + /** CodeCompilationConfig defaultSchema */ + defaultSchema?: (string|null); + + /** CodeCompilationConfig defaultLocation */ + defaultLocation?: (string|null); + + /** CodeCompilationConfig assertionSchema */ + assertionSchema?: (string|null); + + /** CodeCompilationConfig vars */ + vars?: ({ [k: string]: string }|null); + + /** CodeCompilationConfig databaseSuffix */ + databaseSuffix?: (string|null); + + /** CodeCompilationConfig schemaSuffix */ + schemaSuffix?: (string|null); + + /** CodeCompilationConfig tablePrefix */ + tablePrefix?: (string|null); + } + + /** Represents a CodeCompilationConfig. */ + class CodeCompilationConfig implements ICodeCompilationConfig { + + /** + * Constructs a new CodeCompilationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig); + + /** CodeCompilationConfig defaultDatabase. */ + public defaultDatabase: string; + + /** CodeCompilationConfig defaultSchema. */ + public defaultSchema: string; + + /** CodeCompilationConfig defaultLocation. */ + public defaultLocation: string; + + /** CodeCompilationConfig assertionSchema. */ + public assertionSchema: string; + + /** CodeCompilationConfig vars. */ + public vars: { [k: string]: string }; + + /** CodeCompilationConfig databaseSuffix. */ + public databaseSuffix: string; + + /** CodeCompilationConfig schemaSuffix. */ + public schemaSuffix: string; + + /** CodeCompilationConfig tablePrefix. */ + public tablePrefix: string; + + /** + * Creates a new CodeCompilationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns CodeCompilationConfig instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig): google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig; + + /** + * Encodes the specified CodeCompilationConfig message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.verify|verify} messages. + * @param message CodeCompilationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CodeCompilationConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.verify|verify} messages. + * @param message CodeCompilationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CodeCompilationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CodeCompilationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig; + + /** + * Decodes a CodeCompilationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CodeCompilationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig; + + /** + * Verifies a CodeCompilationConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CodeCompilationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CodeCompilationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig; + + /** + * Creates a plain object from a CodeCompilationConfig message. Also converts values to other types if specified. + * @param message CodeCompilationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CodeCompilationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CompilationError. */ + interface ICompilationError { + + /** CompilationError message */ + message?: (string|null); + + /** CompilationError stack */ + stack?: (string|null); + + /** CompilationError path */ + path?: (string|null); + + /** CompilationError actionTarget */ + actionTarget?: (google.cloud.dataform.v1beta1.ITarget|null); + } + + /** Represents a CompilationError. */ + class CompilationError implements ICompilationError { + + /** + * Constructs a new CompilationError. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.CompilationResult.ICompilationError); + + /** CompilationError message. */ + public message: string; + + /** CompilationError stack. */ + public stack: string; + + /** CompilationError path. */ + public path: string; + + /** CompilationError actionTarget. */ + public actionTarget?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** + * Creates a new CompilationError instance using the specified properties. + * @param [properties] Properties to set + * @returns CompilationError instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.CompilationResult.ICompilationError): google.cloud.dataform.v1beta1.CompilationResult.CompilationError; + + /** + * Encodes the specified CompilationError message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.CompilationError.verify|verify} messages. + * @param message CompilationError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.CompilationResult.ICompilationError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompilationError message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.CompilationError.verify|verify} messages. + * @param message CompilationError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.CompilationResult.ICompilationError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompilationError message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompilationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CompilationResult.CompilationError; + + /** + * Decodes a CompilationError message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompilationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CompilationResult.CompilationError; + + /** + * Verifies a CompilationError message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompilationError message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompilationError + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CompilationResult.CompilationError; + + /** + * Creates a plain object from a CompilationError message. Also converts values to other types if specified. + * @param message CompilationError + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CompilationResult.CompilationError, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompilationError to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a ListCompilationResultsRequest. */ + interface IListCompilationResultsRequest { + + /** ListCompilationResultsRequest parent */ + parent?: (string|null); + + /** ListCompilationResultsRequest pageSize */ + pageSize?: (number|null); + + /** ListCompilationResultsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListCompilationResultsRequest. */ + class ListCompilationResultsRequest implements IListCompilationResultsRequest { + + /** + * Constructs a new ListCompilationResultsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IListCompilationResultsRequest); + + /** ListCompilationResultsRequest parent. */ + public parent: string; + + /** ListCompilationResultsRequest pageSize. */ + public pageSize: number; + + /** ListCompilationResultsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListCompilationResultsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCompilationResultsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IListCompilationResultsRequest): google.cloud.dataform.v1beta1.ListCompilationResultsRequest; + + /** + * Encodes the specified ListCompilationResultsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListCompilationResultsRequest.verify|verify} messages. + * @param message ListCompilationResultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IListCompilationResultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCompilationResultsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListCompilationResultsRequest.verify|verify} messages. + * @param message ListCompilationResultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IListCompilationResultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCompilationResultsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCompilationResultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ListCompilationResultsRequest; + + /** + * Decodes a ListCompilationResultsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCompilationResultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ListCompilationResultsRequest; + + /** + * Verifies a ListCompilationResultsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCompilationResultsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCompilationResultsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ListCompilationResultsRequest; + + /** + * Creates a plain object from a ListCompilationResultsRequest message. Also converts values to other types if specified. + * @param message ListCompilationResultsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ListCompilationResultsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCompilationResultsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListCompilationResultsResponse. */ + interface IListCompilationResultsResponse { + + /** ListCompilationResultsResponse compilationResults */ + compilationResults?: (google.cloud.dataform.v1beta1.ICompilationResult[]|null); + + /** ListCompilationResultsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListCompilationResultsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListCompilationResultsResponse. */ + class ListCompilationResultsResponse implements IListCompilationResultsResponse { + + /** + * Constructs a new ListCompilationResultsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IListCompilationResultsResponse); + + /** ListCompilationResultsResponse compilationResults. */ + public compilationResults: google.cloud.dataform.v1beta1.ICompilationResult[]; + + /** ListCompilationResultsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListCompilationResultsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListCompilationResultsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCompilationResultsResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IListCompilationResultsResponse): google.cloud.dataform.v1beta1.ListCompilationResultsResponse; + + /** + * Encodes the specified ListCompilationResultsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListCompilationResultsResponse.verify|verify} messages. + * @param message ListCompilationResultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IListCompilationResultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCompilationResultsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListCompilationResultsResponse.verify|verify} messages. + * @param message ListCompilationResultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IListCompilationResultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCompilationResultsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCompilationResultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ListCompilationResultsResponse; + + /** + * Decodes a ListCompilationResultsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCompilationResultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ListCompilationResultsResponse; + + /** + * Verifies a ListCompilationResultsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCompilationResultsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCompilationResultsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ListCompilationResultsResponse; + + /** + * Creates a plain object from a ListCompilationResultsResponse message. Also converts values to other types if specified. + * @param message ListCompilationResultsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ListCompilationResultsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCompilationResultsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetCompilationResultRequest. */ + interface IGetCompilationResultRequest { + + /** GetCompilationResultRequest name */ + name?: (string|null); + } + + /** Represents a GetCompilationResultRequest. */ + class GetCompilationResultRequest implements IGetCompilationResultRequest { + + /** + * Constructs a new GetCompilationResultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IGetCompilationResultRequest); + + /** GetCompilationResultRequest name. */ + public name: string; + + /** + * Creates a new GetCompilationResultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetCompilationResultRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IGetCompilationResultRequest): google.cloud.dataform.v1beta1.GetCompilationResultRequest; + + /** + * Encodes the specified GetCompilationResultRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.GetCompilationResultRequest.verify|verify} messages. + * @param message GetCompilationResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IGetCompilationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetCompilationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.GetCompilationResultRequest.verify|verify} messages. + * @param message GetCompilationResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IGetCompilationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetCompilationResultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.GetCompilationResultRequest; + + /** + * Decodes a GetCompilationResultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.GetCompilationResultRequest; + + /** + * Verifies a GetCompilationResultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetCompilationResultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetCompilationResultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.GetCompilationResultRequest; + + /** + * Creates a plain object from a GetCompilationResultRequest message. Also converts values to other types if specified. + * @param message GetCompilationResultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.GetCompilationResultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetCompilationResultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateCompilationResultRequest. */ + interface ICreateCompilationResultRequest { + + /** CreateCompilationResultRequest parent */ + parent?: (string|null); + + /** CreateCompilationResultRequest compilationResult */ + compilationResult?: (google.cloud.dataform.v1beta1.ICompilationResult|null); + } + + /** Represents a CreateCompilationResultRequest. */ + class CreateCompilationResultRequest implements ICreateCompilationResultRequest { + + /** + * Constructs a new CreateCompilationResultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ICreateCompilationResultRequest); + + /** CreateCompilationResultRequest parent. */ + public parent: string; + + /** CreateCompilationResultRequest compilationResult. */ + public compilationResult?: (google.cloud.dataform.v1beta1.ICompilationResult|null); + + /** + * Creates a new CreateCompilationResultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateCompilationResultRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ICreateCompilationResultRequest): google.cloud.dataform.v1beta1.CreateCompilationResultRequest; + + /** + * Encodes the specified CreateCompilationResultRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateCompilationResultRequest.verify|verify} messages. + * @param message CreateCompilationResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ICreateCompilationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateCompilationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateCompilationResultRequest.verify|verify} messages. + * @param message CreateCompilationResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ICreateCompilationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateCompilationResultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CreateCompilationResultRequest; + + /** + * Decodes a CreateCompilationResultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CreateCompilationResultRequest; + + /** + * Verifies a CreateCompilationResultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateCompilationResultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateCompilationResultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CreateCompilationResultRequest; + + /** + * Creates a plain object from a CreateCompilationResultRequest message. Also converts values to other types if specified. + * @param message CreateCompilationResultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CreateCompilationResultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateCompilationResultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Target. */ + interface ITarget { + + /** Target database */ + database?: (string|null); + + /** Target schema */ + schema?: (string|null); + + /** Target name */ + name?: (string|null); + } + + /** Represents a Target. */ + class Target implements ITarget { + + /** + * Constructs a new Target. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ITarget); + + /** Target database. */ + public database: string; + + /** Target schema. */ + public schema: string; + + /** Target name. */ + public name: string; + + /** + * Creates a new Target instance using the specified properties. + * @param [properties] Properties to set + * @returns Target instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ITarget): google.cloud.dataform.v1beta1.Target; + + /** + * Encodes the specified Target message. Does not implicitly {@link google.cloud.dataform.v1beta1.Target.verify|verify} messages. + * @param message Target message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ITarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Target message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.Target.verify|verify} messages. + * @param message Target message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ITarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Target message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Target + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.Target; + + /** + * Decodes a Target message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Target + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.Target; + + /** + * Verifies a Target message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Target message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Target + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.Target; + + /** + * Creates a plain object from a Target message. Also converts values to other types if specified. + * @param message Target + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.Target, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Target to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RelationDescriptor. */ + interface IRelationDescriptor { + + /** RelationDescriptor description */ + description?: (string|null); + + /** RelationDescriptor columns */ + columns?: (google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor[]|null); + + /** RelationDescriptor bigqueryLabels */ + bigqueryLabels?: ({ [k: string]: string }|null); + } + + /** Represents a RelationDescriptor. */ + class RelationDescriptor implements IRelationDescriptor { + + /** + * Constructs a new RelationDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IRelationDescriptor); + + /** RelationDescriptor description. */ + public description: string; + + /** RelationDescriptor columns. */ + public columns: google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor[]; + + /** RelationDescriptor bigqueryLabels. */ + public bigqueryLabels: { [k: string]: string }; + + /** + * Creates a new RelationDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns RelationDescriptor instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IRelationDescriptor): google.cloud.dataform.v1beta1.RelationDescriptor; + + /** + * Encodes the specified RelationDescriptor message. Does not implicitly {@link google.cloud.dataform.v1beta1.RelationDescriptor.verify|verify} messages. + * @param message RelationDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IRelationDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RelationDescriptor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.RelationDescriptor.verify|verify} messages. + * @param message RelationDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IRelationDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RelationDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RelationDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.RelationDescriptor; + + /** + * Decodes a RelationDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RelationDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.RelationDescriptor; + + /** + * Verifies a RelationDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RelationDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RelationDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.RelationDescriptor; + + /** + * Creates a plain object from a RelationDescriptor message. Also converts values to other types if specified. + * @param message RelationDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.RelationDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RelationDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace RelationDescriptor { + + /** Properties of a ColumnDescriptor. */ + interface IColumnDescriptor { + + /** ColumnDescriptor path */ + path?: (string[]|null); + + /** ColumnDescriptor description */ + description?: (string|null); + + /** ColumnDescriptor bigqueryPolicyTags */ + bigqueryPolicyTags?: (string[]|null); + } + + /** Represents a ColumnDescriptor. */ + class ColumnDescriptor implements IColumnDescriptor { + + /** + * Constructs a new ColumnDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor); + + /** ColumnDescriptor path. */ + public path: string[]; + + /** ColumnDescriptor description. */ + public description: string; + + /** ColumnDescriptor bigqueryPolicyTags. */ + public bigqueryPolicyTags: string[]; + + /** + * Creates a new ColumnDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ColumnDescriptor instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor): google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor; + + /** + * Encodes the specified ColumnDescriptor message. Does not implicitly {@link google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.verify|verify} messages. + * @param message ColumnDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ColumnDescriptor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.verify|verify} messages. + * @param message ColumnDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ColumnDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ColumnDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor; + + /** + * Decodes a ColumnDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ColumnDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor; + + /** + * Verifies a ColumnDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ColumnDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ColumnDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor; + + /** + * Creates a plain object from a ColumnDescriptor message. Also converts values to other types if specified. + * @param message ColumnDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ColumnDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a CompilationResultAction. */ + interface ICompilationResultAction { + + /** CompilationResultAction target */ + target?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** CompilationResultAction canonicalTarget */ + canonicalTarget?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** CompilationResultAction filePath */ + filePath?: (string|null); + + /** CompilationResultAction relation */ + relation?: (google.cloud.dataform.v1beta1.CompilationResultAction.IRelation|null); + + /** CompilationResultAction operations */ + operations?: (google.cloud.dataform.v1beta1.CompilationResultAction.IOperations|null); + + /** CompilationResultAction assertion */ + assertion?: (google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion|null); + + /** CompilationResultAction declaration */ + declaration?: (google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration|null); + } + + /** Represents a CompilationResultAction. */ + class CompilationResultAction implements ICompilationResultAction { + + /** + * Constructs a new CompilationResultAction. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ICompilationResultAction); + + /** CompilationResultAction target. */ + public target?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** CompilationResultAction canonicalTarget. */ + public canonicalTarget?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** CompilationResultAction filePath. */ + public filePath: string; + + /** CompilationResultAction relation. */ + public relation?: (google.cloud.dataform.v1beta1.CompilationResultAction.IRelation|null); + + /** CompilationResultAction operations. */ + public operations?: (google.cloud.dataform.v1beta1.CompilationResultAction.IOperations|null); + + /** CompilationResultAction assertion. */ + public assertion?: (google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion|null); + + /** CompilationResultAction declaration. */ + public declaration?: (google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration|null); + + /** CompilationResultAction compiledObject. */ + public compiledObject?: ("relation"|"operations"|"assertion"|"declaration"); + + /** + * Creates a new CompilationResultAction instance using the specified properties. + * @param [properties] Properties to set + * @returns CompilationResultAction instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ICompilationResultAction): google.cloud.dataform.v1beta1.CompilationResultAction; + + /** + * Encodes the specified CompilationResultAction message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.verify|verify} messages. + * @param message CompilationResultAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ICompilationResultAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompilationResultAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.verify|verify} messages. + * @param message CompilationResultAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ICompilationResultAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompilationResultAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompilationResultAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CompilationResultAction; + + /** + * Decodes a CompilationResultAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompilationResultAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CompilationResultAction; + + /** + * Verifies a CompilationResultAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompilationResultAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompilationResultAction + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CompilationResultAction; + + /** + * Creates a plain object from a CompilationResultAction message. Also converts values to other types if specified. + * @param message CompilationResultAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CompilationResultAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompilationResultAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace CompilationResultAction { + + /** Properties of a Relation. */ + interface IRelation { + + /** Relation dependencyTargets */ + dependencyTargets?: (google.cloud.dataform.v1beta1.ITarget[]|null); + + /** Relation disabled */ + disabled?: (boolean|null); + + /** Relation tags */ + tags?: (string[]|null); + + /** Relation relationDescriptor */ + relationDescriptor?: (google.cloud.dataform.v1beta1.IRelationDescriptor|null); + + /** Relation relationType */ + relationType?: (google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType|keyof typeof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType|null); + + /** Relation selectQuery */ + selectQuery?: (string|null); + + /** Relation preOperations */ + preOperations?: (string[]|null); + + /** Relation postOperations */ + postOperations?: (string[]|null); + + /** Relation incrementalTableConfig */ + incrementalTableConfig?: (google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig|null); + + /** Relation partitionExpression */ + partitionExpression?: (string|null); + + /** Relation clusterExpressions */ + clusterExpressions?: (string[]|null); + + /** Relation partitionExpirationDays */ + partitionExpirationDays?: (number|null); + + /** Relation requirePartitionFilter */ + requirePartitionFilter?: (boolean|null); + + /** Relation additionalOptions */ + additionalOptions?: ({ [k: string]: string }|null); + } + + /** Represents a Relation. */ + class Relation implements IRelation { + + /** + * Constructs a new Relation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.IRelation); + + /** Relation dependencyTargets. */ + public dependencyTargets: google.cloud.dataform.v1beta1.ITarget[]; + + /** Relation disabled. */ + public disabled: boolean; + + /** Relation tags. */ + public tags: string[]; + + /** Relation relationDescriptor. */ + public relationDescriptor?: (google.cloud.dataform.v1beta1.IRelationDescriptor|null); + + /** Relation relationType. */ + public relationType: (google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType|keyof typeof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType); + + /** Relation selectQuery. */ + public selectQuery: string; + + /** Relation preOperations. */ + public preOperations: string[]; + + /** Relation postOperations. */ + public postOperations: string[]; + + /** Relation incrementalTableConfig. */ + public incrementalTableConfig?: (google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig|null); + + /** Relation partitionExpression. */ + public partitionExpression: string; + + /** Relation clusterExpressions. */ + public clusterExpressions: string[]; + + /** Relation partitionExpirationDays. */ + public partitionExpirationDays: number; + + /** Relation requirePartitionFilter. */ + public requirePartitionFilter: boolean; + + /** Relation additionalOptions. */ + public additionalOptions: { [k: string]: string }; + + /** + * Creates a new Relation instance using the specified properties. + * @param [properties] Properties to set + * @returns Relation instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.IRelation): google.cloud.dataform.v1beta1.CompilationResultAction.Relation; + + /** + * Encodes the specified Relation message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Relation.verify|verify} messages. + * @param message Relation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.CompilationResultAction.IRelation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Relation message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Relation.verify|verify} messages. + * @param message Relation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.CompilationResultAction.IRelation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Relation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Relation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CompilationResultAction.Relation; + + /** + * Decodes a Relation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Relation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CompilationResultAction.Relation; + + /** + * Verifies a Relation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Relation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Relation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CompilationResultAction.Relation; + + /** + * Creates a plain object from a Relation message. Also converts values to other types if specified. + * @param message Relation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CompilationResultAction.Relation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Relation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Relation { + + /** RelationType enum. */ + enum RelationType { + RELATION_TYPE_UNSPECIFIED = 0, + TABLE = 1, + VIEW = 2, + INCREMENTAL_TABLE = 3, + MATERIALIZED_VIEW = 4 + } + + /** Properties of an IncrementalTableConfig. */ + interface IIncrementalTableConfig { + + /** IncrementalTableConfig incrementalSelectQuery */ + incrementalSelectQuery?: (string|null); + + /** IncrementalTableConfig refreshDisabled */ + refreshDisabled?: (boolean|null); + + /** IncrementalTableConfig uniqueKeyParts */ + uniqueKeyParts?: (string[]|null); + + /** IncrementalTableConfig updatePartitionFilter */ + updatePartitionFilter?: (string|null); + + /** IncrementalTableConfig incrementalPreOperations */ + incrementalPreOperations?: (string[]|null); + + /** IncrementalTableConfig incrementalPostOperations */ + incrementalPostOperations?: (string[]|null); + } + + /** Represents an IncrementalTableConfig. */ + class IncrementalTableConfig implements IIncrementalTableConfig { + + /** + * Constructs a new IncrementalTableConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig); + + /** IncrementalTableConfig incrementalSelectQuery. */ + public incrementalSelectQuery: string; + + /** IncrementalTableConfig refreshDisabled. */ + public refreshDisabled: boolean; + + /** IncrementalTableConfig uniqueKeyParts. */ + public uniqueKeyParts: string[]; + + /** IncrementalTableConfig updatePartitionFilter. */ + public updatePartitionFilter: string; + + /** IncrementalTableConfig incrementalPreOperations. */ + public incrementalPreOperations: string[]; + + /** IncrementalTableConfig incrementalPostOperations. */ + public incrementalPostOperations: string[]; + + /** + * Creates a new IncrementalTableConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns IncrementalTableConfig instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig): google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig; + + /** + * Encodes the specified IncrementalTableConfig message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.verify|verify} messages. + * @param message IncrementalTableConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IncrementalTableConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.verify|verify} messages. + * @param message IncrementalTableConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IncrementalTableConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IncrementalTableConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig; + + /** + * Decodes an IncrementalTableConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IncrementalTableConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig; + + /** + * Verifies an IncrementalTableConfig message. + * @param message Plain 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 IncrementalTableConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IncrementalTableConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig; + + /** + * Creates a plain object from an IncrementalTableConfig message. Also converts values to other types if specified. + * @param message IncrementalTableConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IncrementalTableConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an Operations. */ + interface IOperations { + + /** Operations dependencyTargets */ + dependencyTargets?: (google.cloud.dataform.v1beta1.ITarget[]|null); + + /** Operations disabled */ + disabled?: (boolean|null); + + /** Operations tags */ + tags?: (string[]|null); + + /** Operations relationDescriptor */ + relationDescriptor?: (google.cloud.dataform.v1beta1.IRelationDescriptor|null); + + /** Operations queries */ + queries?: (string[]|null); + + /** Operations hasOutput */ + hasOutput?: (boolean|null); + } + + /** Represents an Operations. */ + class Operations implements IOperations { + + /** + * Constructs a new Operations. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.IOperations); + + /** Operations dependencyTargets. */ + public dependencyTargets: google.cloud.dataform.v1beta1.ITarget[]; + + /** Operations disabled. */ + public disabled: boolean; + + /** Operations tags. */ + public tags: string[]; + + /** Operations relationDescriptor. */ + public relationDescriptor?: (google.cloud.dataform.v1beta1.IRelationDescriptor|null); + + /** Operations queries. */ + public queries: string[]; + + /** Operations hasOutput. */ + public hasOutput: boolean; + + /** + * Creates a new Operations instance using the specified properties. + * @param [properties] Properties to set + * @returns Operations instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.IOperations): google.cloud.dataform.v1beta1.CompilationResultAction.Operations; + + /** + * Encodes the specified Operations message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Operations.verify|verify} messages. + * @param message Operations message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.CompilationResultAction.IOperations, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Operations message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Operations.verify|verify} messages. + * @param message Operations message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.CompilationResultAction.IOperations, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Operations message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CompilationResultAction.Operations; + + /** + * Decodes an Operations message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CompilationResultAction.Operations; + + /** + * Verifies an Operations message. + * @param message Plain 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 Operations message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operations + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CompilationResultAction.Operations; + + /** + * Creates a plain object from an Operations message. Also converts values to other types if specified. + * @param message Operations + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CompilationResultAction.Operations, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Operations to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Assertion. */ + interface IAssertion { + + /** Assertion dependencyTargets */ + dependencyTargets?: (google.cloud.dataform.v1beta1.ITarget[]|null); + + /** Assertion parentAction */ + parentAction?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** Assertion disabled */ + disabled?: (boolean|null); + + /** Assertion tags */ + tags?: (string[]|null); + + /** Assertion selectQuery */ + selectQuery?: (string|null); + + /** Assertion relationDescriptor */ + relationDescriptor?: (google.cloud.dataform.v1beta1.IRelationDescriptor|null); + } + + /** Represents an Assertion. */ + class Assertion implements IAssertion { + + /** + * Constructs a new Assertion. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion); + + /** Assertion dependencyTargets. */ + public dependencyTargets: google.cloud.dataform.v1beta1.ITarget[]; + + /** Assertion parentAction. */ + public parentAction?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** Assertion disabled. */ + public disabled: boolean; + + /** Assertion tags. */ + public tags: string[]; + + /** Assertion selectQuery. */ + public selectQuery: string; + + /** Assertion relationDescriptor. */ + public relationDescriptor?: (google.cloud.dataform.v1beta1.IRelationDescriptor|null); + + /** + * Creates a new Assertion instance using the specified properties. + * @param [properties] Properties to set + * @returns Assertion instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion): google.cloud.dataform.v1beta1.CompilationResultAction.Assertion; + + /** + * Encodes the specified Assertion message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.verify|verify} messages. + * @param message Assertion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Assertion message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.verify|verify} messages. + * @param message Assertion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Assertion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Assertion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CompilationResultAction.Assertion; + + /** + * Decodes an Assertion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Assertion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CompilationResultAction.Assertion; + + /** + * Verifies an Assertion message. + * @param message Plain 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 Assertion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Assertion + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CompilationResultAction.Assertion; + + /** + * Creates a plain object from an Assertion message. Also converts values to other types if specified. + * @param message Assertion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CompilationResultAction.Assertion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Assertion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration relationDescriptor */ + relationDescriptor?: (google.cloud.dataform.v1beta1.IRelationDescriptor|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration); + + /** Declaration relationDescriptor. */ + public relationDescriptor?: (google.cloud.dataform.v1beta1.IRelationDescriptor|null); + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration): google.cloud.dataform.v1beta1.CompilationResultAction.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.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.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.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.cloud.dataform.v1beta1.CompilationResultAction.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.cloud.dataform.v1beta1.CompilationResultAction.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.cloud.dataform.v1beta1.CompilationResultAction.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.cloud.dataform.v1beta1.CompilationResultAction.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.cloud.dataform.v1beta1.CompilationResultAction.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a QueryCompilationResultActionsRequest. */ + interface IQueryCompilationResultActionsRequest { + + /** QueryCompilationResultActionsRequest name */ + name?: (string|null); + + /** QueryCompilationResultActionsRequest pageSize */ + pageSize?: (number|null); + + /** QueryCompilationResultActionsRequest pageToken */ + pageToken?: (string|null); + + /** QueryCompilationResultActionsRequest filter */ + filter?: (string|null); + } + + /** Represents a QueryCompilationResultActionsRequest. */ + class QueryCompilationResultActionsRequest implements IQueryCompilationResultActionsRequest { + + /** + * Constructs a new QueryCompilationResultActionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest); + + /** QueryCompilationResultActionsRequest name. */ + public name: string; + + /** QueryCompilationResultActionsRequest pageSize. */ + public pageSize: number; + + /** QueryCompilationResultActionsRequest pageToken. */ + public pageToken: string; + + /** QueryCompilationResultActionsRequest filter. */ + public filter: string; + + /** + * Creates a new QueryCompilationResultActionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryCompilationResultActionsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest): google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest; + + /** + * Encodes the specified QueryCompilationResultActionsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest.verify|verify} messages. + * @param message QueryCompilationResultActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryCompilationResultActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest.verify|verify} messages. + * @param message QueryCompilationResultActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryCompilationResultActionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryCompilationResultActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest; + + /** + * Decodes a QueryCompilationResultActionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryCompilationResultActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest; + + /** + * Verifies a QueryCompilationResultActionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryCompilationResultActionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryCompilationResultActionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest; + + /** + * Creates a plain object from a QueryCompilationResultActionsRequest message. Also converts values to other types if specified. + * @param message QueryCompilationResultActionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryCompilationResultActionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QueryCompilationResultActionsResponse. */ + interface IQueryCompilationResultActionsResponse { + + /** QueryCompilationResultActionsResponse compilationResultActions */ + compilationResultActions?: (google.cloud.dataform.v1beta1.ICompilationResultAction[]|null); + + /** QueryCompilationResultActionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a QueryCompilationResultActionsResponse. */ + class QueryCompilationResultActionsResponse implements IQueryCompilationResultActionsResponse { + + /** + * Constructs a new QueryCompilationResultActionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse); + + /** QueryCompilationResultActionsResponse compilationResultActions. */ + public compilationResultActions: google.cloud.dataform.v1beta1.ICompilationResultAction[]; + + /** QueryCompilationResultActionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new QueryCompilationResultActionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryCompilationResultActionsResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse): google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse; + + /** + * Encodes the specified QueryCompilationResultActionsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse.verify|verify} messages. + * @param message QueryCompilationResultActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryCompilationResultActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse.verify|verify} messages. + * @param message QueryCompilationResultActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryCompilationResultActionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryCompilationResultActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse; + + /** + * Decodes a QueryCompilationResultActionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryCompilationResultActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse; + + /** + * Verifies a QueryCompilationResultActionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryCompilationResultActionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryCompilationResultActionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse; + + /** + * Creates a plain object from a QueryCompilationResultActionsResponse message. Also converts values to other types if specified. + * @param message QueryCompilationResultActionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryCompilationResultActionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WorkflowInvocation. */ + interface IWorkflowInvocation { + + /** WorkflowInvocation name */ + name?: (string|null); + + /** WorkflowInvocation compilationResult */ + compilationResult?: (string|null); + + /** WorkflowInvocation invocationConfig */ + invocationConfig?: (google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig|null); + + /** WorkflowInvocation state */ + state?: (google.cloud.dataform.v1beta1.WorkflowInvocation.State|keyof typeof google.cloud.dataform.v1beta1.WorkflowInvocation.State|null); + + /** WorkflowInvocation invocationTiming */ + invocationTiming?: (google.type.IInterval|null); + } + + /** Represents a WorkflowInvocation. */ + class WorkflowInvocation implements IWorkflowInvocation { + + /** + * Constructs a new WorkflowInvocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IWorkflowInvocation); + + /** WorkflowInvocation name. */ + public name: string; + + /** WorkflowInvocation compilationResult. */ + public compilationResult: string; + + /** WorkflowInvocation invocationConfig. */ + public invocationConfig?: (google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig|null); + + /** WorkflowInvocation state. */ + public state: (google.cloud.dataform.v1beta1.WorkflowInvocation.State|keyof typeof google.cloud.dataform.v1beta1.WorkflowInvocation.State); + + /** WorkflowInvocation invocationTiming. */ + public invocationTiming?: (google.type.IInterval|null); + + /** + * Creates a new WorkflowInvocation instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkflowInvocation instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IWorkflowInvocation): google.cloud.dataform.v1beta1.WorkflowInvocation; + + /** + * Encodes the specified WorkflowInvocation message. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocation.verify|verify} messages. + * @param message WorkflowInvocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IWorkflowInvocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkflowInvocation message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocation.verify|verify} messages. + * @param message WorkflowInvocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IWorkflowInvocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkflowInvocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkflowInvocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.WorkflowInvocation; + + /** + * Decodes a WorkflowInvocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkflowInvocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.WorkflowInvocation; + + /** + * Verifies a WorkflowInvocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkflowInvocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkflowInvocation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.WorkflowInvocation; + + /** + * Creates a plain object from a WorkflowInvocation message. Also converts values to other types if specified. + * @param message WorkflowInvocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.WorkflowInvocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkflowInvocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace WorkflowInvocation { + + /** Properties of an InvocationConfig. */ + interface IInvocationConfig { + + /** InvocationConfig includedTargets */ + includedTargets?: (google.cloud.dataform.v1beta1.ITarget[]|null); + + /** InvocationConfig includedTags */ + includedTags?: (string[]|null); + + /** InvocationConfig transitiveDependenciesIncluded */ + transitiveDependenciesIncluded?: (boolean|null); + + /** InvocationConfig transitiveDependentsIncluded */ + transitiveDependentsIncluded?: (boolean|null); + + /** InvocationConfig fullyRefreshIncrementalTablesEnabled */ + fullyRefreshIncrementalTablesEnabled?: (boolean|null); + } + + /** Represents an InvocationConfig. */ + class InvocationConfig implements IInvocationConfig { + + /** + * Constructs a new InvocationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig); + + /** InvocationConfig includedTargets. */ + public includedTargets: google.cloud.dataform.v1beta1.ITarget[]; + + /** InvocationConfig includedTags. */ + public includedTags: string[]; + + /** InvocationConfig transitiveDependenciesIncluded. */ + public transitiveDependenciesIncluded: boolean; + + /** InvocationConfig transitiveDependentsIncluded. */ + public transitiveDependentsIncluded: boolean; + + /** InvocationConfig fullyRefreshIncrementalTablesEnabled. */ + public fullyRefreshIncrementalTablesEnabled: boolean; + + /** + * Creates a new InvocationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns InvocationConfig instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig): google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig; + + /** + * Encodes the specified InvocationConfig message. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.verify|verify} messages. + * @param message InvocationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InvocationConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.verify|verify} messages. + * @param message InvocationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InvocationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InvocationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig; + + /** + * Decodes an InvocationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InvocationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig; + + /** + * Verifies an InvocationConfig message. + * @param message Plain 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 InvocationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InvocationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig; + + /** + * Creates a plain object from an InvocationConfig message. Also converts values to other types if specified. + * @param message InvocationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InvocationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + RUNNING = 1, + SUCCEEDED = 2, + CANCELLED = 3, + FAILED = 4, + CANCELING = 5 + } + } + + /** Properties of a ListWorkflowInvocationsRequest. */ + interface IListWorkflowInvocationsRequest { + + /** ListWorkflowInvocationsRequest parent */ + parent?: (string|null); + + /** ListWorkflowInvocationsRequest pageSize */ + pageSize?: (number|null); + + /** ListWorkflowInvocationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListWorkflowInvocationsRequest. */ + class ListWorkflowInvocationsRequest implements IListWorkflowInvocationsRequest { + + /** + * Constructs a new ListWorkflowInvocationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest); + + /** ListWorkflowInvocationsRequest parent. */ + public parent: string; + + /** ListWorkflowInvocationsRequest pageSize. */ + public pageSize: number; + + /** ListWorkflowInvocationsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListWorkflowInvocationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListWorkflowInvocationsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest): google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest; + + /** + * Encodes the specified ListWorkflowInvocationsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest.verify|verify} messages. + * @param message ListWorkflowInvocationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListWorkflowInvocationsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest.verify|verify} messages. + * @param message ListWorkflowInvocationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListWorkflowInvocationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListWorkflowInvocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest; + + /** + * Decodes a ListWorkflowInvocationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListWorkflowInvocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest; + + /** + * Verifies a ListWorkflowInvocationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListWorkflowInvocationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListWorkflowInvocationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest; + + /** + * Creates a plain object from a ListWorkflowInvocationsRequest message. Also converts values to other types if specified. + * @param message ListWorkflowInvocationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListWorkflowInvocationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListWorkflowInvocationsResponse. */ + interface IListWorkflowInvocationsResponse { + + /** ListWorkflowInvocationsResponse workflowInvocations */ + workflowInvocations?: (google.cloud.dataform.v1beta1.IWorkflowInvocation[]|null); + + /** ListWorkflowInvocationsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListWorkflowInvocationsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListWorkflowInvocationsResponse. */ + class ListWorkflowInvocationsResponse implements IListWorkflowInvocationsResponse { + + /** + * Constructs a new ListWorkflowInvocationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse); + + /** ListWorkflowInvocationsResponse workflowInvocations. */ + public workflowInvocations: google.cloud.dataform.v1beta1.IWorkflowInvocation[]; + + /** ListWorkflowInvocationsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListWorkflowInvocationsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListWorkflowInvocationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListWorkflowInvocationsResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse): google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse; + + /** + * Encodes the specified ListWorkflowInvocationsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse.verify|verify} messages. + * @param message ListWorkflowInvocationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListWorkflowInvocationsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse.verify|verify} messages. + * @param message ListWorkflowInvocationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListWorkflowInvocationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListWorkflowInvocationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse; + + /** + * Decodes a ListWorkflowInvocationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListWorkflowInvocationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse; + + /** + * Verifies a ListWorkflowInvocationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListWorkflowInvocationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListWorkflowInvocationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse; + + /** + * Creates a plain object from a ListWorkflowInvocationsResponse message. Also converts values to other types if specified. + * @param message ListWorkflowInvocationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListWorkflowInvocationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetWorkflowInvocationRequest. */ + interface IGetWorkflowInvocationRequest { + + /** GetWorkflowInvocationRequest name */ + name?: (string|null); + } + + /** Represents a GetWorkflowInvocationRequest. */ + class GetWorkflowInvocationRequest implements IGetWorkflowInvocationRequest { + + /** + * Constructs a new GetWorkflowInvocationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest); + + /** GetWorkflowInvocationRequest name. */ + public name: string; + + /** + * Creates a new GetWorkflowInvocationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetWorkflowInvocationRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest): google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest; + + /** + * Encodes the specified GetWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest.verify|verify} messages. + * @param message GetWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest.verify|verify} messages. + * @param message GetWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetWorkflowInvocationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest; + + /** + * Decodes a GetWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest; + + /** + * Verifies a GetWorkflowInvocationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetWorkflowInvocationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest; + + /** + * Creates a plain object from a GetWorkflowInvocationRequest message. Also converts values to other types if specified. + * @param message GetWorkflowInvocationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetWorkflowInvocationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateWorkflowInvocationRequest. */ + interface ICreateWorkflowInvocationRequest { + + /** CreateWorkflowInvocationRequest parent */ + parent?: (string|null); + + /** CreateWorkflowInvocationRequest workflowInvocation */ + workflowInvocation?: (google.cloud.dataform.v1beta1.IWorkflowInvocation|null); + } + + /** Represents a CreateWorkflowInvocationRequest. */ + class CreateWorkflowInvocationRequest implements ICreateWorkflowInvocationRequest { + + /** + * Constructs a new CreateWorkflowInvocationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest); + + /** CreateWorkflowInvocationRequest parent. */ + public parent: string; + + /** CreateWorkflowInvocationRequest workflowInvocation. */ + public workflowInvocation?: (google.cloud.dataform.v1beta1.IWorkflowInvocation|null); + + /** + * Creates a new CreateWorkflowInvocationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateWorkflowInvocationRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest): google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest; + + /** + * Encodes the specified CreateWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest.verify|verify} messages. + * @param message CreateWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest.verify|verify} messages. + * @param message CreateWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateWorkflowInvocationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest; + + /** + * Decodes a CreateWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest; + + /** + * Verifies a CreateWorkflowInvocationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateWorkflowInvocationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest; + + /** + * Creates a plain object from a CreateWorkflowInvocationRequest message. Also converts values to other types if specified. + * @param message CreateWorkflowInvocationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateWorkflowInvocationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteWorkflowInvocationRequest. */ + interface IDeleteWorkflowInvocationRequest { + + /** DeleteWorkflowInvocationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteWorkflowInvocationRequest. */ + class DeleteWorkflowInvocationRequest implements IDeleteWorkflowInvocationRequest { + + /** + * Constructs a new DeleteWorkflowInvocationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest); + + /** DeleteWorkflowInvocationRequest name. */ + public name: string; + + /** + * Creates a new DeleteWorkflowInvocationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteWorkflowInvocationRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest): google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest; + + /** + * Encodes the specified DeleteWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest.verify|verify} messages. + * @param message DeleteWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest.verify|verify} messages. + * @param message DeleteWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteWorkflowInvocationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest; + + /** + * Decodes a DeleteWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest; + + /** + * Verifies a DeleteWorkflowInvocationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteWorkflowInvocationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest; + + /** + * Creates a plain object from a DeleteWorkflowInvocationRequest message. Also converts values to other types if specified. + * @param message DeleteWorkflowInvocationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteWorkflowInvocationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CancelWorkflowInvocationRequest. */ + interface ICancelWorkflowInvocationRequest { + + /** CancelWorkflowInvocationRequest name */ + name?: (string|null); + } + + /** Represents a CancelWorkflowInvocationRequest. */ + class CancelWorkflowInvocationRequest implements ICancelWorkflowInvocationRequest { + + /** + * Constructs a new CancelWorkflowInvocationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest); + + /** CancelWorkflowInvocationRequest name. */ + public name: string; + + /** + * Creates a new CancelWorkflowInvocationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelWorkflowInvocationRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest): google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest; + + /** + * Encodes the specified CancelWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest.verify|verify} messages. + * @param message CancelWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest.verify|verify} messages. + * @param message CancelWorkflowInvocationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelWorkflowInvocationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest; + + /** + * Decodes a CancelWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest; + + /** + * Verifies a CancelWorkflowInvocationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelWorkflowInvocationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest; + + /** + * Creates a plain object from a CancelWorkflowInvocationRequest message. Also converts values to other types if specified. + * @param message CancelWorkflowInvocationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelWorkflowInvocationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WorkflowInvocationAction. */ + interface IWorkflowInvocationAction { + + /** WorkflowInvocationAction target */ + target?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** WorkflowInvocationAction canonicalTarget */ + canonicalTarget?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** WorkflowInvocationAction state */ + state?: (google.cloud.dataform.v1beta1.WorkflowInvocationAction.State|keyof typeof google.cloud.dataform.v1beta1.WorkflowInvocationAction.State|null); + + /** WorkflowInvocationAction failureReason */ + failureReason?: (string|null); + + /** WorkflowInvocationAction invocationTiming */ + invocationTiming?: (google.type.IInterval|null); + + /** WorkflowInvocationAction bigqueryAction */ + bigqueryAction?: (google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction|null); + } + + /** Represents a WorkflowInvocationAction. */ + class WorkflowInvocationAction implements IWorkflowInvocationAction { + + /** + * Constructs a new WorkflowInvocationAction. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IWorkflowInvocationAction); + + /** WorkflowInvocationAction target. */ + public target?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** WorkflowInvocationAction canonicalTarget. */ + public canonicalTarget?: (google.cloud.dataform.v1beta1.ITarget|null); + + /** WorkflowInvocationAction state. */ + public state: (google.cloud.dataform.v1beta1.WorkflowInvocationAction.State|keyof typeof google.cloud.dataform.v1beta1.WorkflowInvocationAction.State); + + /** WorkflowInvocationAction failureReason. */ + public failureReason: string; + + /** WorkflowInvocationAction invocationTiming. */ + public invocationTiming?: (google.type.IInterval|null); + + /** WorkflowInvocationAction bigqueryAction. */ + public bigqueryAction?: (google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction|null); + + /** + * Creates a new WorkflowInvocationAction instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkflowInvocationAction instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IWorkflowInvocationAction): google.cloud.dataform.v1beta1.WorkflowInvocationAction; + + /** + * Encodes the specified WorkflowInvocationAction message. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction.verify|verify} messages. + * @param message WorkflowInvocationAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IWorkflowInvocationAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkflowInvocationAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction.verify|verify} messages. + * @param message WorkflowInvocationAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IWorkflowInvocationAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkflowInvocationAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkflowInvocationAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.WorkflowInvocationAction; + + /** + * Decodes a WorkflowInvocationAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkflowInvocationAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.WorkflowInvocationAction; + + /** + * Verifies a WorkflowInvocationAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkflowInvocationAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkflowInvocationAction + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.WorkflowInvocationAction; + + /** + * Creates a plain object from a WorkflowInvocationAction message. Also converts values to other types if specified. + * @param message WorkflowInvocationAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.WorkflowInvocationAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkflowInvocationAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace WorkflowInvocationAction { + + /** State enum. */ + enum State { + PENDING = 0, + RUNNING = 1, + SKIPPED = 2, + DISABLED = 3, + SUCCEEDED = 4, + CANCELLED = 5, + FAILED = 6 + } + + /** Properties of a BigQueryAction. */ + interface IBigQueryAction { + + /** BigQueryAction sqlScript */ + sqlScript?: (string|null); + } + + /** Represents a BigQueryAction. */ + class BigQueryAction implements IBigQueryAction { + + /** + * Constructs a new BigQueryAction. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction); + + /** BigQueryAction sqlScript. */ + public sqlScript: string; + + /** + * Creates a new BigQueryAction instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryAction instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction): google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction; + + /** + * Encodes the specified BigQueryAction message. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction.verify|verify} messages. + * @param message BigQueryAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction.verify|verify} messages. + * @param message BigQueryAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction; + + /** + * Decodes a BigQueryAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction; + + /** + * Verifies a BigQueryAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryAction + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction; + + /** + * Creates a plain object from a BigQueryAction message. Also converts values to other types if specified. + * @param message BigQueryAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a QueryWorkflowInvocationActionsRequest. */ + interface IQueryWorkflowInvocationActionsRequest { + + /** QueryWorkflowInvocationActionsRequest name */ + name?: (string|null); + + /** QueryWorkflowInvocationActionsRequest pageSize */ + pageSize?: (number|null); + + /** QueryWorkflowInvocationActionsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a QueryWorkflowInvocationActionsRequest. */ + class QueryWorkflowInvocationActionsRequest implements IQueryWorkflowInvocationActionsRequest { + + /** + * Constructs a new QueryWorkflowInvocationActionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest); + + /** QueryWorkflowInvocationActionsRequest name. */ + public name: string; + + /** QueryWorkflowInvocationActionsRequest pageSize. */ + public pageSize: number; + + /** QueryWorkflowInvocationActionsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new QueryWorkflowInvocationActionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryWorkflowInvocationActionsRequest instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest): google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest; + + /** + * Encodes the specified QueryWorkflowInvocationActionsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest.verify|verify} messages. + * @param message QueryWorkflowInvocationActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryWorkflowInvocationActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest.verify|verify} messages. + * @param message QueryWorkflowInvocationActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryWorkflowInvocationActionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryWorkflowInvocationActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest; + + /** + * Decodes a QueryWorkflowInvocationActionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryWorkflowInvocationActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest; + + /** + * Verifies a QueryWorkflowInvocationActionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryWorkflowInvocationActionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryWorkflowInvocationActionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest; + + /** + * Creates a plain object from a QueryWorkflowInvocationActionsRequest message. Also converts values to other types if specified. + * @param message QueryWorkflowInvocationActionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryWorkflowInvocationActionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QueryWorkflowInvocationActionsResponse. */ + interface IQueryWorkflowInvocationActionsResponse { + + /** QueryWorkflowInvocationActionsResponse workflowInvocationActions */ + workflowInvocationActions?: (google.cloud.dataform.v1beta1.IWorkflowInvocationAction[]|null); + + /** QueryWorkflowInvocationActionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a QueryWorkflowInvocationActionsResponse. */ + class QueryWorkflowInvocationActionsResponse implements IQueryWorkflowInvocationActionsResponse { + + /** + * Constructs a new QueryWorkflowInvocationActionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse); + + /** QueryWorkflowInvocationActionsResponse workflowInvocationActions. */ + public workflowInvocationActions: google.cloud.dataform.v1beta1.IWorkflowInvocationAction[]; + + /** QueryWorkflowInvocationActionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new QueryWorkflowInvocationActionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryWorkflowInvocationActionsResponse instance + */ + public static create(properties?: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse): google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse; + + /** + * Encodes the specified QueryWorkflowInvocationActionsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse.verify|verify} messages. + * @param message QueryWorkflowInvocationActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryWorkflowInvocationActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse.verify|verify} messages. + * @param message QueryWorkflowInvocationActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryWorkflowInvocationActionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryWorkflowInvocationActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse; + + /** + * Decodes a QueryWorkflowInvocationActionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryWorkflowInvocationActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse; + + /** + * Verifies a QueryWorkflowInvocationActionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryWorkflowInvocationActionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryWorkflowInvocationActionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse; + + /** + * Creates a plain object from a QueryWorkflowInvocationActionsResponse message. Also converts values to other types if specified. + * @param message QueryWorkflowInvocationActionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryWorkflowInvocationActionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } } } diff --git a/packages/google-cloud-dataform/protos/protos.js b/packages/google-cloud-dataform/protos/protos.js index b74a4da2973..4ebc3edaa92 100644 --- a/packages/google-cloud-dataform/protos/protos.js +++ b/packages/google-cloud-dataform/protos/protos.js @@ -19451,6 +19451,19400 @@ return v1alpha2; })(); + dataform.v1beta1 = (function() { + + /** + * Namespace v1beta1. + * @memberof google.cloud.dataform + * @namespace + */ + var v1beta1 = {}; + + v1beta1.Dataform = (function() { + + /** + * Constructs a new Dataform service. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a Dataform + * @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 Dataform(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Dataform.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Dataform; + + /** + * Creates new Dataform service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dataform.v1beta1.Dataform + * @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 {Dataform} RPC service. Useful where requests and/or responses are streamed. + */ + Dataform.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#listRepositories}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef ListRepositoriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.ListRepositoriesResponse} [response] ListRepositoriesResponse + */ + + /** + * Calls ListRepositories. + * @function listRepositories + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IListRepositoriesRequest} request ListRepositoriesRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.ListRepositoriesCallback} callback Node-style callback called with the error, if any, and ListRepositoriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.listRepositories = function listRepositories(request, callback) { + return this.rpcCall(listRepositories, $root.google.cloud.dataform.v1beta1.ListRepositoriesRequest, $root.google.cloud.dataform.v1beta1.ListRepositoriesResponse, request, callback); + }, "name", { value: "ListRepositories" }); + + /** + * Calls ListRepositories. + * @function listRepositories + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IListRepositoriesRequest} request ListRepositoriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#getRepository}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef GetRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.Repository} [response] Repository + */ + + /** + * Calls GetRepository. + * @function getRepository + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IGetRepositoryRequest} request GetRepositoryRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.GetRepositoryCallback} callback Node-style callback called with the error, if any, and Repository + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.getRepository = function getRepository(request, callback) { + return this.rpcCall(getRepository, $root.google.cloud.dataform.v1beta1.GetRepositoryRequest, $root.google.cloud.dataform.v1beta1.Repository, request, callback); + }, "name", { value: "GetRepository" }); + + /** + * Calls GetRepository. + * @function getRepository + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IGetRepositoryRequest} request GetRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#createRepository}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef CreateRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.Repository} [response] Repository + */ + + /** + * Calls CreateRepository. + * @function createRepository + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICreateRepositoryRequest} request CreateRepositoryRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.CreateRepositoryCallback} callback Node-style callback called with the error, if any, and Repository + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.createRepository = function createRepository(request, callback) { + return this.rpcCall(createRepository, $root.google.cloud.dataform.v1beta1.CreateRepositoryRequest, $root.google.cloud.dataform.v1beta1.Repository, request, callback); + }, "name", { value: "CreateRepository" }); + + /** + * Calls CreateRepository. + * @function createRepository + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICreateRepositoryRequest} request CreateRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#updateRepository}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef UpdateRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.Repository} [response] Repository + */ + + /** + * Calls UpdateRepository. + * @function updateRepository + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IUpdateRepositoryRequest} request UpdateRepositoryRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.UpdateRepositoryCallback} callback Node-style callback called with the error, if any, and Repository + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.updateRepository = function updateRepository(request, callback) { + return this.rpcCall(updateRepository, $root.google.cloud.dataform.v1beta1.UpdateRepositoryRequest, $root.google.cloud.dataform.v1beta1.Repository, request, callback); + }, "name", { value: "UpdateRepository" }); + + /** + * Calls UpdateRepository. + * @function updateRepository + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IUpdateRepositoryRequest} request UpdateRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#deleteRepository}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef DeleteRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteRepository. + * @function deleteRepository + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IDeleteRepositoryRequest} request DeleteRepositoryRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.DeleteRepositoryCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.deleteRepository = function deleteRepository(request, callback) { + return this.rpcCall(deleteRepository, $root.google.cloud.dataform.v1beta1.DeleteRepositoryRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteRepository" }); + + /** + * Calls DeleteRepository. + * @function deleteRepository + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IDeleteRepositoryRequest} request DeleteRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#fetchRemoteBranches}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef FetchRemoteBranchesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse} [response] FetchRemoteBranchesResponse + */ + + /** + * Calls FetchRemoteBranches. + * @function fetchRemoteBranches + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest} request FetchRemoteBranchesRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.FetchRemoteBranchesCallback} callback Node-style callback called with the error, if any, and FetchRemoteBranchesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.fetchRemoteBranches = function fetchRemoteBranches(request, callback) { + return this.rpcCall(fetchRemoteBranches, $root.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest, $root.google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse, request, callback); + }, "name", { value: "FetchRemoteBranches" }); + + /** + * Calls FetchRemoteBranches. + * @function fetchRemoteBranches + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest} request FetchRemoteBranchesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#listWorkspaces}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef ListWorkspacesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.ListWorkspacesResponse} [response] ListWorkspacesResponse + */ + + /** + * Calls ListWorkspaces. + * @function listWorkspaces + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IListWorkspacesRequest} request ListWorkspacesRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.ListWorkspacesCallback} callback Node-style callback called with the error, if any, and ListWorkspacesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.listWorkspaces = function listWorkspaces(request, callback) { + return this.rpcCall(listWorkspaces, $root.google.cloud.dataform.v1beta1.ListWorkspacesRequest, $root.google.cloud.dataform.v1beta1.ListWorkspacesResponse, request, callback); + }, "name", { value: "ListWorkspaces" }); + + /** + * Calls ListWorkspaces. + * @function listWorkspaces + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IListWorkspacesRequest} request ListWorkspacesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#getWorkspace}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef GetWorkspaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.Workspace} [response] Workspace + */ + + /** + * Calls GetWorkspace. + * @function getWorkspace + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IGetWorkspaceRequest} request GetWorkspaceRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.GetWorkspaceCallback} callback Node-style callback called with the error, if any, and Workspace + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.getWorkspace = function getWorkspace(request, callback) { + return this.rpcCall(getWorkspace, $root.google.cloud.dataform.v1beta1.GetWorkspaceRequest, $root.google.cloud.dataform.v1beta1.Workspace, request, callback); + }, "name", { value: "GetWorkspace" }); + + /** + * Calls GetWorkspace. + * @function getWorkspace + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IGetWorkspaceRequest} request GetWorkspaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#createWorkspace}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef CreateWorkspaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.Workspace} [response] Workspace + */ + + /** + * Calls CreateWorkspace. + * @function createWorkspace + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICreateWorkspaceRequest} request CreateWorkspaceRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.CreateWorkspaceCallback} callback Node-style callback called with the error, if any, and Workspace + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.createWorkspace = function createWorkspace(request, callback) { + return this.rpcCall(createWorkspace, $root.google.cloud.dataform.v1beta1.CreateWorkspaceRequest, $root.google.cloud.dataform.v1beta1.Workspace, request, callback); + }, "name", { value: "CreateWorkspace" }); + + /** + * Calls CreateWorkspace. + * @function createWorkspace + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICreateWorkspaceRequest} request CreateWorkspaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#deleteWorkspace}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef DeleteWorkspaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteWorkspace. + * @function deleteWorkspace + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest} request DeleteWorkspaceRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.DeleteWorkspaceCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.deleteWorkspace = function deleteWorkspace(request, callback) { + return this.rpcCall(deleteWorkspace, $root.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteWorkspace" }); + + /** + * Calls DeleteWorkspace. + * @function deleteWorkspace + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest} request DeleteWorkspaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#installNpmPackages}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef InstallNpmPackagesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.InstallNpmPackagesResponse} [response] InstallNpmPackagesResponse + */ + + /** + * Calls InstallNpmPackages. + * @function installNpmPackages + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest} request InstallNpmPackagesRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.InstallNpmPackagesCallback} callback Node-style callback called with the error, if any, and InstallNpmPackagesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.installNpmPackages = function installNpmPackages(request, callback) { + return this.rpcCall(installNpmPackages, $root.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest, $root.google.cloud.dataform.v1beta1.InstallNpmPackagesResponse, request, callback); + }, "name", { value: "InstallNpmPackages" }); + + /** + * Calls InstallNpmPackages. + * @function installNpmPackages + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest} request InstallNpmPackagesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#pullGitCommits}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef PullGitCommitsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls PullGitCommits. + * @function pullGitCommits + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IPullGitCommitsRequest} request PullGitCommitsRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.PullGitCommitsCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.pullGitCommits = function pullGitCommits(request, callback) { + return this.rpcCall(pullGitCommits, $root.google.cloud.dataform.v1beta1.PullGitCommitsRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "PullGitCommits" }); + + /** + * Calls PullGitCommits. + * @function pullGitCommits + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IPullGitCommitsRequest} request PullGitCommitsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#pushGitCommits}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef PushGitCommitsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls PushGitCommits. + * @function pushGitCommits + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IPushGitCommitsRequest} request PushGitCommitsRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.PushGitCommitsCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.pushGitCommits = function pushGitCommits(request, callback) { + return this.rpcCall(pushGitCommits, $root.google.cloud.dataform.v1beta1.PushGitCommitsRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "PushGitCommits" }); + + /** + * Calls PushGitCommits. + * @function pushGitCommits + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IPushGitCommitsRequest} request PushGitCommitsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#fetchFileGitStatuses}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef FetchFileGitStatusesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse} [response] FetchFileGitStatusesResponse + */ + + /** + * Calls FetchFileGitStatuses. + * @function fetchFileGitStatuses + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest} request FetchFileGitStatusesRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.FetchFileGitStatusesCallback} callback Node-style callback called with the error, if any, and FetchFileGitStatusesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.fetchFileGitStatuses = function fetchFileGitStatuses(request, callback) { + return this.rpcCall(fetchFileGitStatuses, $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest, $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse, request, callback); + }, "name", { value: "FetchFileGitStatuses" }); + + /** + * Calls FetchFileGitStatuses. + * @function fetchFileGitStatuses + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest} request FetchFileGitStatusesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#fetchGitAheadBehind}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef FetchGitAheadBehindCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse} [response] FetchGitAheadBehindResponse + */ + + /** + * Calls FetchGitAheadBehind. + * @function fetchGitAheadBehind + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest} request FetchGitAheadBehindRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.FetchGitAheadBehindCallback} callback Node-style callback called with the error, if any, and FetchGitAheadBehindResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.fetchGitAheadBehind = function fetchGitAheadBehind(request, callback) { + return this.rpcCall(fetchGitAheadBehind, $root.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest, $root.google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse, request, callback); + }, "name", { value: "FetchGitAheadBehind" }); + + /** + * Calls FetchGitAheadBehind. + * @function fetchGitAheadBehind + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest} request FetchGitAheadBehindRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#commitWorkspaceChanges}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef CommitWorkspaceChangesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CommitWorkspaceChanges. + * @function commitWorkspaceChanges + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest} request CommitWorkspaceChangesRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.CommitWorkspaceChangesCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.commitWorkspaceChanges = function commitWorkspaceChanges(request, callback) { + return this.rpcCall(commitWorkspaceChanges, $root.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CommitWorkspaceChanges" }); + + /** + * Calls CommitWorkspaceChanges. + * @function commitWorkspaceChanges + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest} request CommitWorkspaceChangesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#resetWorkspaceChanges}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef ResetWorkspaceChangesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls ResetWorkspaceChanges. + * @function resetWorkspaceChanges + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest} request ResetWorkspaceChangesRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.ResetWorkspaceChangesCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.resetWorkspaceChanges = function resetWorkspaceChanges(request, callback) { + return this.rpcCall(resetWorkspaceChanges, $root.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "ResetWorkspaceChanges" }); + + /** + * Calls ResetWorkspaceChanges. + * @function resetWorkspaceChanges + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest} request ResetWorkspaceChangesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#fetchFileDiff}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef FetchFileDiffCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.FetchFileDiffResponse} [response] FetchFileDiffResponse + */ + + /** + * Calls FetchFileDiff. + * @function fetchFileDiff + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffRequest} request FetchFileDiffRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.FetchFileDiffCallback} callback Node-style callback called with the error, if any, and FetchFileDiffResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.fetchFileDiff = function fetchFileDiff(request, callback) { + return this.rpcCall(fetchFileDiff, $root.google.cloud.dataform.v1beta1.FetchFileDiffRequest, $root.google.cloud.dataform.v1beta1.FetchFileDiffResponse, request, callback); + }, "name", { value: "FetchFileDiff" }); + + /** + * Calls FetchFileDiff. + * @function fetchFileDiff + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffRequest} request FetchFileDiffRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#queryDirectoryContents}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef QueryDirectoryContentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse} [response] QueryDirectoryContentsResponse + */ + + /** + * Calls QueryDirectoryContents. + * @function queryDirectoryContents + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest} request QueryDirectoryContentsRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.QueryDirectoryContentsCallback} callback Node-style callback called with the error, if any, and QueryDirectoryContentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.queryDirectoryContents = function queryDirectoryContents(request, callback) { + return this.rpcCall(queryDirectoryContents, $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest, $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse, request, callback); + }, "name", { value: "QueryDirectoryContents" }); + + /** + * Calls QueryDirectoryContents. + * @function queryDirectoryContents + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest} request QueryDirectoryContentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#makeDirectory}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef MakeDirectoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.MakeDirectoryResponse} [response] MakeDirectoryResponse + */ + + /** + * Calls MakeDirectory. + * @function makeDirectory + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryRequest} request MakeDirectoryRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.MakeDirectoryCallback} callback Node-style callback called with the error, if any, and MakeDirectoryResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.makeDirectory = function makeDirectory(request, callback) { + return this.rpcCall(makeDirectory, $root.google.cloud.dataform.v1beta1.MakeDirectoryRequest, $root.google.cloud.dataform.v1beta1.MakeDirectoryResponse, request, callback); + }, "name", { value: "MakeDirectory" }); + + /** + * Calls MakeDirectory. + * @function makeDirectory + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryRequest} request MakeDirectoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#removeDirectory}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef RemoveDirectoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls RemoveDirectory. + * @function removeDirectory + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IRemoveDirectoryRequest} request RemoveDirectoryRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.RemoveDirectoryCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.removeDirectory = function removeDirectory(request, callback) { + return this.rpcCall(removeDirectory, $root.google.cloud.dataform.v1beta1.RemoveDirectoryRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "RemoveDirectory" }); + + /** + * Calls RemoveDirectory. + * @function removeDirectory + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IRemoveDirectoryRequest} request RemoveDirectoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#moveDirectory}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef MoveDirectoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.MoveDirectoryResponse} [response] MoveDirectoryResponse + */ + + /** + * Calls MoveDirectory. + * @function moveDirectory + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryRequest} request MoveDirectoryRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.MoveDirectoryCallback} callback Node-style callback called with the error, if any, and MoveDirectoryResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.moveDirectory = function moveDirectory(request, callback) { + return this.rpcCall(moveDirectory, $root.google.cloud.dataform.v1beta1.MoveDirectoryRequest, $root.google.cloud.dataform.v1beta1.MoveDirectoryResponse, request, callback); + }, "name", { value: "MoveDirectory" }); + + /** + * Calls MoveDirectory. + * @function moveDirectory + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryRequest} request MoveDirectoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#readFile}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef ReadFileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.ReadFileResponse} [response] ReadFileResponse + */ + + /** + * Calls ReadFile. + * @function readFile + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IReadFileRequest} request ReadFileRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.ReadFileCallback} callback Node-style callback called with the error, if any, and ReadFileResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.readFile = function readFile(request, callback) { + return this.rpcCall(readFile, $root.google.cloud.dataform.v1beta1.ReadFileRequest, $root.google.cloud.dataform.v1beta1.ReadFileResponse, request, callback); + }, "name", { value: "ReadFile" }); + + /** + * Calls ReadFile. + * @function readFile + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IReadFileRequest} request ReadFileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#removeFile}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef RemoveFileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls RemoveFile. + * @function removeFile + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IRemoveFileRequest} request RemoveFileRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.RemoveFileCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.removeFile = function removeFile(request, callback) { + return this.rpcCall(removeFile, $root.google.cloud.dataform.v1beta1.RemoveFileRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "RemoveFile" }); + + /** + * Calls RemoveFile. + * @function removeFile + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IRemoveFileRequest} request RemoveFileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#moveFile}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef MoveFileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.MoveFileResponse} [response] MoveFileResponse + */ + + /** + * Calls MoveFile. + * @function moveFile + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IMoveFileRequest} request MoveFileRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.MoveFileCallback} callback Node-style callback called with the error, if any, and MoveFileResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.moveFile = function moveFile(request, callback) { + return this.rpcCall(moveFile, $root.google.cloud.dataform.v1beta1.MoveFileRequest, $root.google.cloud.dataform.v1beta1.MoveFileResponse, request, callback); + }, "name", { value: "MoveFile" }); + + /** + * Calls MoveFile. + * @function moveFile + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IMoveFileRequest} request MoveFileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#writeFile}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef WriteFileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.WriteFileResponse} [response] WriteFileResponse + */ + + /** + * Calls WriteFile. + * @function writeFile + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IWriteFileRequest} request WriteFileRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.WriteFileCallback} callback Node-style callback called with the error, if any, and WriteFileResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.writeFile = function writeFile(request, callback) { + return this.rpcCall(writeFile, $root.google.cloud.dataform.v1beta1.WriteFileRequest, $root.google.cloud.dataform.v1beta1.WriteFileResponse, request, callback); + }, "name", { value: "WriteFile" }); + + /** + * Calls WriteFile. + * @function writeFile + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IWriteFileRequest} request WriteFileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#listCompilationResults}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef ListCompilationResultsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.ListCompilationResultsResponse} [response] ListCompilationResultsResponse + */ + + /** + * Calls ListCompilationResults. + * @function listCompilationResults + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsRequest} request ListCompilationResultsRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.ListCompilationResultsCallback} callback Node-style callback called with the error, if any, and ListCompilationResultsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.listCompilationResults = function listCompilationResults(request, callback) { + return this.rpcCall(listCompilationResults, $root.google.cloud.dataform.v1beta1.ListCompilationResultsRequest, $root.google.cloud.dataform.v1beta1.ListCompilationResultsResponse, request, callback); + }, "name", { value: "ListCompilationResults" }); + + /** + * Calls ListCompilationResults. + * @function listCompilationResults + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsRequest} request ListCompilationResultsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#getCompilationResult}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef GetCompilationResultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.CompilationResult} [response] CompilationResult + */ + + /** + * Calls GetCompilationResult. + * @function getCompilationResult + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IGetCompilationResultRequest} request GetCompilationResultRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.GetCompilationResultCallback} callback Node-style callback called with the error, if any, and CompilationResult + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.getCompilationResult = function getCompilationResult(request, callback) { + return this.rpcCall(getCompilationResult, $root.google.cloud.dataform.v1beta1.GetCompilationResultRequest, $root.google.cloud.dataform.v1beta1.CompilationResult, request, callback); + }, "name", { value: "GetCompilationResult" }); + + /** + * Calls GetCompilationResult. + * @function getCompilationResult + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IGetCompilationResultRequest} request GetCompilationResultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#createCompilationResult}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef CreateCompilationResultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.CompilationResult} [response] CompilationResult + */ + + /** + * Calls CreateCompilationResult. + * @function createCompilationResult + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICreateCompilationResultRequest} request CreateCompilationResultRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.CreateCompilationResultCallback} callback Node-style callback called with the error, if any, and CompilationResult + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.createCompilationResult = function createCompilationResult(request, callback) { + return this.rpcCall(createCompilationResult, $root.google.cloud.dataform.v1beta1.CreateCompilationResultRequest, $root.google.cloud.dataform.v1beta1.CompilationResult, request, callback); + }, "name", { value: "CreateCompilationResult" }); + + /** + * Calls CreateCompilationResult. + * @function createCompilationResult + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICreateCompilationResultRequest} request CreateCompilationResultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#queryCompilationResultActions}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef QueryCompilationResultActionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse} [response] QueryCompilationResultActionsResponse + */ + + /** + * Calls QueryCompilationResultActions. + * @function queryCompilationResultActions + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest} request QueryCompilationResultActionsRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.QueryCompilationResultActionsCallback} callback Node-style callback called with the error, if any, and QueryCompilationResultActionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.queryCompilationResultActions = function queryCompilationResultActions(request, callback) { + return this.rpcCall(queryCompilationResultActions, $root.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest, $root.google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse, request, callback); + }, "name", { value: "QueryCompilationResultActions" }); + + /** + * Calls QueryCompilationResultActions. + * @function queryCompilationResultActions + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest} request QueryCompilationResultActionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#listWorkflowInvocations}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef ListWorkflowInvocationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse} [response] ListWorkflowInvocationsResponse + */ + + /** + * Calls ListWorkflowInvocations. + * @function listWorkflowInvocations + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest} request ListWorkflowInvocationsRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.ListWorkflowInvocationsCallback} callback Node-style callback called with the error, if any, and ListWorkflowInvocationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.listWorkflowInvocations = function listWorkflowInvocations(request, callback) { + return this.rpcCall(listWorkflowInvocations, $root.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest, $root.google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse, request, callback); + }, "name", { value: "ListWorkflowInvocations" }); + + /** + * Calls ListWorkflowInvocations. + * @function listWorkflowInvocations + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest} request ListWorkflowInvocationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#getWorkflowInvocation}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef GetWorkflowInvocationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.WorkflowInvocation} [response] WorkflowInvocation + */ + + /** + * Calls GetWorkflowInvocation. + * @function getWorkflowInvocation + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest} request GetWorkflowInvocationRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.GetWorkflowInvocationCallback} callback Node-style callback called with the error, if any, and WorkflowInvocation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.getWorkflowInvocation = function getWorkflowInvocation(request, callback) { + return this.rpcCall(getWorkflowInvocation, $root.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest, $root.google.cloud.dataform.v1beta1.WorkflowInvocation, request, callback); + }, "name", { value: "GetWorkflowInvocation" }); + + /** + * Calls GetWorkflowInvocation. + * @function getWorkflowInvocation + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest} request GetWorkflowInvocationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#createWorkflowInvocation}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef CreateWorkflowInvocationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.WorkflowInvocation} [response] WorkflowInvocation + */ + + /** + * Calls CreateWorkflowInvocation. + * @function createWorkflowInvocation + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest} request CreateWorkflowInvocationRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.CreateWorkflowInvocationCallback} callback Node-style callback called with the error, if any, and WorkflowInvocation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.createWorkflowInvocation = function createWorkflowInvocation(request, callback) { + return this.rpcCall(createWorkflowInvocation, $root.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest, $root.google.cloud.dataform.v1beta1.WorkflowInvocation, request, callback); + }, "name", { value: "CreateWorkflowInvocation" }); + + /** + * Calls CreateWorkflowInvocation. + * @function createWorkflowInvocation + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest} request CreateWorkflowInvocationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#deleteWorkflowInvocation}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef DeleteWorkflowInvocationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteWorkflowInvocation. + * @function deleteWorkflowInvocation + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest} request DeleteWorkflowInvocationRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.DeleteWorkflowInvocationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.deleteWorkflowInvocation = function deleteWorkflowInvocation(request, callback) { + return this.rpcCall(deleteWorkflowInvocation, $root.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteWorkflowInvocation" }); + + /** + * Calls DeleteWorkflowInvocation. + * @function deleteWorkflowInvocation + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest} request DeleteWorkflowInvocationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#cancelWorkflowInvocation}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef CancelWorkflowInvocationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelWorkflowInvocation. + * @function cancelWorkflowInvocation + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest} request CancelWorkflowInvocationRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.CancelWorkflowInvocationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.cancelWorkflowInvocation = function cancelWorkflowInvocation(request, callback) { + return this.rpcCall(cancelWorkflowInvocation, $root.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelWorkflowInvocation" }); + + /** + * Calls CancelWorkflowInvocation. + * @function cancelWorkflowInvocation + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest} request CancelWorkflowInvocationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#queryWorkflowInvocationActions}. + * @memberof google.cloud.dataform.v1beta1.Dataform + * @typedef QueryWorkflowInvocationActionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse} [response] QueryWorkflowInvocationActionsResponse + */ + + /** + * Calls QueryWorkflowInvocationActions. + * @function queryWorkflowInvocationActions + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest} request QueryWorkflowInvocationActionsRequest message or plain object + * @param {google.cloud.dataform.v1beta1.Dataform.QueryWorkflowInvocationActionsCallback} callback Node-style callback called with the error, if any, and QueryWorkflowInvocationActionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Dataform.prototype.queryWorkflowInvocationActions = function queryWorkflowInvocationActions(request, callback) { + return this.rpcCall(queryWorkflowInvocationActions, $root.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest, $root.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse, request, callback); + }, "name", { value: "QueryWorkflowInvocationActions" }); + + /** + * Calls QueryWorkflowInvocationActions. + * @function queryWorkflowInvocationActions + * @memberof google.cloud.dataform.v1beta1.Dataform + * @instance + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest} request QueryWorkflowInvocationActionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Dataform; + })(); + + v1beta1.Repository = (function() { + + /** + * Properties of a Repository. + * @memberof google.cloud.dataform.v1beta1 + * @interface IRepository + * @property {string|null} [name] Repository name + * @property {google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings|null} [gitRemoteSettings] Repository gitRemoteSettings + */ + + /** + * Constructs a new Repository. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a Repository. + * @implements IRepository + * @constructor + * @param {google.cloud.dataform.v1beta1.IRepository=} [properties] Properties to set + */ + function Repository(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Repository name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.Repository + * @instance + */ + Repository.prototype.name = ""; + + /** + * Repository gitRemoteSettings. + * @member {google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings|null|undefined} gitRemoteSettings + * @memberof google.cloud.dataform.v1beta1.Repository + * @instance + */ + Repository.prototype.gitRemoteSettings = null; + + /** + * Creates a new Repository instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.Repository + * @static + * @param {google.cloud.dataform.v1beta1.IRepository=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.Repository} Repository instance + */ + Repository.create = function create(properties) { + return new Repository(properties); + }; + + /** + * Encodes the specified Repository message. Does not implicitly {@link google.cloud.dataform.v1beta1.Repository.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.Repository + * @static + * @param {google.cloud.dataform.v1beta1.IRepository} message Repository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Repository.encode = function encode(message, writer) { + 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.gitRemoteSettings != null && Object.hasOwnProperty.call(message, "gitRemoteSettings")) + $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.encode(message.gitRemoteSettings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Repository message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.Repository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.Repository + * @static + * @param {google.cloud.dataform.v1beta1.IRepository} message Repository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Repository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Repository message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.Repository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.Repository} Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Repository.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.Repository(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.gitRemoteSettings = $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Repository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.Repository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.Repository} Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Repository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Repository message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.Repository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Repository.verify = function verify(message) { + if (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.gitRemoteSettings != null && message.hasOwnProperty("gitRemoteSettings")) { + var error = $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.verify(message.gitRemoteSettings); + if (error) + return "gitRemoteSettings." + error; + } + return null; + }; + + /** + * Creates a Repository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.Repository + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.Repository} Repository + */ + Repository.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.Repository) + return object; + var message = new $root.google.cloud.dataform.v1beta1.Repository(); + if (object.name != null) + message.name = String(object.name); + if (object.gitRemoteSettings != null) { + if (typeof object.gitRemoteSettings !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.Repository.gitRemoteSettings: object expected"); + message.gitRemoteSettings = $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.fromObject(object.gitRemoteSettings); + } + return message; + }; + + /** + * Creates a plain object from a Repository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.Repository + * @static + * @param {google.cloud.dataform.v1beta1.Repository} message Repository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Repository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.gitRemoteSettings = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.gitRemoteSettings != null && message.hasOwnProperty("gitRemoteSettings")) + object.gitRemoteSettings = $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.toObject(message.gitRemoteSettings, options); + return object; + }; + + /** + * Converts this Repository to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.Repository + * @instance + * @returns {Object.} JSON object + */ + Repository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Repository.GitRemoteSettings = (function() { + + /** + * Properties of a GitRemoteSettings. + * @memberof google.cloud.dataform.v1beta1.Repository + * @interface IGitRemoteSettings + * @property {string|null} [url] GitRemoteSettings url + * @property {string|null} [defaultBranch] GitRemoteSettings defaultBranch + * @property {string|null} [authenticationTokenSecretVersion] GitRemoteSettings authenticationTokenSecretVersion + * @property {google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus|null} [tokenStatus] GitRemoteSettings tokenStatus + */ + + /** + * Constructs a new GitRemoteSettings. + * @memberof google.cloud.dataform.v1beta1.Repository + * @classdesc Represents a GitRemoteSettings. + * @implements IGitRemoteSettings + * @constructor + * @param {google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings=} [properties] Properties to set + */ + function GitRemoteSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GitRemoteSettings url. + * @member {string} url + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @instance + */ + GitRemoteSettings.prototype.url = ""; + + /** + * GitRemoteSettings defaultBranch. + * @member {string} defaultBranch + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @instance + */ + GitRemoteSettings.prototype.defaultBranch = ""; + + /** + * GitRemoteSettings authenticationTokenSecretVersion. + * @member {string} authenticationTokenSecretVersion + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @instance + */ + GitRemoteSettings.prototype.authenticationTokenSecretVersion = ""; + + /** + * GitRemoteSettings tokenStatus. + * @member {google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus} tokenStatus + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @instance + */ + GitRemoteSettings.prototype.tokenStatus = 0; + + /** + * Creates a new GitRemoteSettings instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @static + * @param {google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.Repository.GitRemoteSettings} GitRemoteSettings instance + */ + GitRemoteSettings.create = function create(properties) { + return new GitRemoteSettings(properties); + }; + + /** + * Encodes the specified GitRemoteSettings message. Does not implicitly {@link google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @static + * @param {google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings} message GitRemoteSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GitRemoteSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.url); + if (message.defaultBranch != null && Object.hasOwnProperty.call(message, "defaultBranch")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.defaultBranch); + if (message.authenticationTokenSecretVersion != null && Object.hasOwnProperty.call(message, "authenticationTokenSecretVersion")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.authenticationTokenSecretVersion); + if (message.tokenStatus != null && Object.hasOwnProperty.call(message, "tokenStatus")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.tokenStatus); + return writer; + }; + + /** + * Encodes the specified GitRemoteSettings message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @static + * @param {google.cloud.dataform.v1beta1.Repository.IGitRemoteSettings} message GitRemoteSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GitRemoteSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GitRemoteSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.Repository.GitRemoteSettings} GitRemoteSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GitRemoteSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.url = reader.string(); + break; + case 2: + message.defaultBranch = reader.string(); + break; + case 3: + message.authenticationTokenSecretVersion = reader.string(); + break; + case 4: + message.tokenStatus = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GitRemoteSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.Repository.GitRemoteSettings} GitRemoteSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GitRemoteSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GitRemoteSettings message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GitRemoteSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + if (message.defaultBranch != null && message.hasOwnProperty("defaultBranch")) + if (!$util.isString(message.defaultBranch)) + return "defaultBranch: string expected"; + if (message.authenticationTokenSecretVersion != null && message.hasOwnProperty("authenticationTokenSecretVersion")) + if (!$util.isString(message.authenticationTokenSecretVersion)) + return "authenticationTokenSecretVersion: string expected"; + if (message.tokenStatus != null && message.hasOwnProperty("tokenStatus")) + switch (message.tokenStatus) { + default: + return "tokenStatus: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a GitRemoteSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.Repository.GitRemoteSettings} GitRemoteSettings + */ + GitRemoteSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings) + return object; + var message = new $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings(); + if (object.url != null) + message.url = String(object.url); + if (object.defaultBranch != null) + message.defaultBranch = String(object.defaultBranch); + if (object.authenticationTokenSecretVersion != null) + message.authenticationTokenSecretVersion = String(object.authenticationTokenSecretVersion); + switch (object.tokenStatus) { + case "TOKEN_STATUS_UNSPECIFIED": + case 0: + message.tokenStatus = 0; + break; + case "NOT_FOUND": + case 1: + message.tokenStatus = 1; + break; + case "INVALID": + case 2: + message.tokenStatus = 2; + break; + case "VALID": + case 3: + message.tokenStatus = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a GitRemoteSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @static + * @param {google.cloud.dataform.v1beta1.Repository.GitRemoteSettings} message GitRemoteSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GitRemoteSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.url = ""; + object.defaultBranch = ""; + object.authenticationTokenSecretVersion = ""; + object.tokenStatus = options.enums === String ? "TOKEN_STATUS_UNSPECIFIED" : 0; + } + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + if (message.defaultBranch != null && message.hasOwnProperty("defaultBranch")) + object.defaultBranch = message.defaultBranch; + if (message.authenticationTokenSecretVersion != null && message.hasOwnProperty("authenticationTokenSecretVersion")) + object.authenticationTokenSecretVersion = message.authenticationTokenSecretVersion; + if (message.tokenStatus != null && message.hasOwnProperty("tokenStatus")) + object.tokenStatus = options.enums === String ? $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus[message.tokenStatus] : message.tokenStatus; + return object; + }; + + /** + * Converts this GitRemoteSettings to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @instance + * @returns {Object.} JSON object + */ + GitRemoteSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * TokenStatus enum. + * @name google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus + * @enum {number} + * @property {number} TOKEN_STATUS_UNSPECIFIED=0 TOKEN_STATUS_UNSPECIFIED value + * @property {number} NOT_FOUND=1 NOT_FOUND value + * @property {number} INVALID=2 INVALID value + * @property {number} VALID=3 VALID value + */ + GitRemoteSettings.TokenStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TOKEN_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "NOT_FOUND"] = 1; + values[valuesById[2] = "INVALID"] = 2; + values[valuesById[3] = "VALID"] = 3; + return values; + })(); + + return GitRemoteSettings; + })(); + + return Repository; + })(); + + v1beta1.ListRepositoriesRequest = (function() { + + /** + * Properties of a ListRepositoriesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IListRepositoriesRequest + * @property {string|null} [parent] ListRepositoriesRequest parent + * @property {number|null} [pageSize] ListRepositoriesRequest pageSize + * @property {string|null} [pageToken] ListRepositoriesRequest pageToken + * @property {string|null} [orderBy] ListRepositoriesRequest orderBy + * @property {string|null} [filter] ListRepositoriesRequest filter + */ + + /** + * Constructs a new ListRepositoriesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ListRepositoriesRequest. + * @implements IListRepositoriesRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IListRepositoriesRequest=} [properties] Properties to set + */ + function ListRepositoriesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListRepositoriesRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.parent = ""; + + /** + * ListRepositoriesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.pageSize = 0; + + /** + * ListRepositoriesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.pageToken = ""; + + /** + * ListRepositoriesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.orderBy = ""; + + /** + * ListRepositoriesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.filter = ""; + + /** + * Creates a new ListRepositoriesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListRepositoriesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ListRepositoriesRequest} ListRepositoriesRequest instance + */ + ListRepositoriesRequest.create = function create(properties) { + return new ListRepositoriesRequest(properties); + }; + + /** + * Encodes the specified ListRepositoriesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListRepositoriesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListRepositoriesRequest} message ListRepositoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListRepositoriesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListRepositoriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListRepositoriesRequest} message ListRepositoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ListRepositoriesRequest} ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ListRepositoriesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.orderBy = reader.string(); + break; + case 5: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ListRepositoriesRequest} ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRepositoriesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRepositoriesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListRepositoriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ListRepositoriesRequest} ListRepositoriesRequest + */ + ListRepositoriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ListRepositoriesRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ListRepositoriesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListRepositoriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @static + * @param {google.cloud.dataform.v1beta1.ListRepositoriesRequest} message ListRepositoriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRepositoriesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListRepositoriesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @instance + * @returns {Object.} JSON object + */ + ListRepositoriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListRepositoriesRequest; + })(); + + v1beta1.ListRepositoriesResponse = (function() { + + /** + * Properties of a ListRepositoriesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IListRepositoriesResponse + * @property {Array.|null} [repositories] ListRepositoriesResponse repositories + * @property {string|null} [nextPageToken] ListRepositoriesResponse nextPageToken + * @property {Array.|null} [unreachable] ListRepositoriesResponse unreachable + */ + + /** + * Constructs a new ListRepositoriesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ListRepositoriesResponse. + * @implements IListRepositoriesResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IListRepositoriesResponse=} [properties] Properties to set + */ + function ListRepositoriesResponse(properties) { + this.repositories = []; + 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]]; + } + + /** + * ListRepositoriesResponse repositories. + * @member {Array.} repositories + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @instance + */ + ListRepositoriesResponse.prototype.repositories = $util.emptyArray; + + /** + * ListRepositoriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @instance + */ + ListRepositoriesResponse.prototype.nextPageToken = ""; + + /** + * ListRepositoriesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @instance + */ + ListRepositoriesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListRepositoriesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListRepositoriesResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ListRepositoriesResponse} ListRepositoriesResponse instance + */ + ListRepositoriesResponse.create = function create(properties) { + return new ListRepositoriesResponse(properties); + }; + + /** + * Encodes the specified ListRepositoriesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListRepositoriesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListRepositoriesResponse} message ListRepositoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.repositories != null && message.repositories.length) + for (var i = 0; i < message.repositories.length; ++i) + $root.google.cloud.dataform.v1beta1.Repository.encode(message.repositories[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 ListRepositoriesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListRepositoriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListRepositoriesResponse} message ListRepositoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ListRepositoriesResponse} ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ListRepositoriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.repositories && message.repositories.length)) + message.repositories = []; + message.repositories.push($root.google.cloud.dataform.v1beta1.Repository.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 ListRepositoriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ListRepositoriesResponse} ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRepositoriesResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRepositoriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.repositories != null && message.hasOwnProperty("repositories")) { + if (!Array.isArray(message.repositories)) + return "repositories: array expected"; + for (var i = 0; i < message.repositories.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.Repository.verify(message.repositories[i]); + if (error) + return "repositories." + 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 ListRepositoriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ListRepositoriesResponse} ListRepositoriesResponse + */ + ListRepositoriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ListRepositoriesResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ListRepositoriesResponse(); + if (object.repositories) { + if (!Array.isArray(object.repositories)) + throw TypeError(".google.cloud.dataform.v1beta1.ListRepositoriesResponse.repositories: array expected"); + message.repositories = []; + for (var i = 0; i < object.repositories.length; ++i) { + if (typeof object.repositories[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.ListRepositoriesResponse.repositories: object expected"); + message.repositories[i] = $root.google.cloud.dataform.v1beta1.Repository.fromObject(object.repositories[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.dataform.v1beta1.ListRepositoriesResponse.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 ListRepositoriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @static + * @param {google.cloud.dataform.v1beta1.ListRepositoriesResponse} message ListRepositoriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRepositoriesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.repositories = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.repositories && message.repositories.length) { + object.repositories = []; + for (var j = 0; j < message.repositories.length; ++j) + object.repositories[j] = $root.google.cloud.dataform.v1beta1.Repository.toObject(message.repositories[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 ListRepositoriesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @instance + * @returns {Object.} JSON object + */ + ListRepositoriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListRepositoriesResponse; + })(); + + v1beta1.GetRepositoryRequest = (function() { + + /** + * Properties of a GetRepositoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IGetRepositoryRequest + * @property {string|null} [name] GetRepositoryRequest name + */ + + /** + * Constructs a new GetRepositoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a GetRepositoryRequest. + * @implements IGetRepositoryRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IGetRepositoryRequest=} [properties] Properties to set + */ + function GetRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetRepositoryRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @instance + */ + GetRepositoryRequest.prototype.name = ""; + + /** + * Creates a new GetRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetRepositoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.GetRepositoryRequest} GetRepositoryRequest instance + */ + GetRepositoryRequest.create = function create(properties) { + return new GetRepositoryRequest(properties); + }; + + /** + * Encodes the specified GetRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.GetRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetRepositoryRequest} message GetRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRepositoryRequest.encode = function encode(message, writer) { + 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 GetRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.GetRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetRepositoryRequest} message GetRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.GetRepositoryRequest} GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRepositoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.GetRepositoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.GetRepositoryRequest} GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRepositoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRepositoryRequest.verify = function verify(message) { + if (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 GetRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.GetRepositoryRequest} GetRepositoryRequest + */ + GetRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.GetRepositoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.GetRepositoryRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.GetRepositoryRequest} message GetRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRepositoryRequest.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 GetRepositoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + GetRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetRepositoryRequest; + })(); + + v1beta1.CreateRepositoryRequest = (function() { + + /** + * Properties of a CreateRepositoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface ICreateRepositoryRequest + * @property {string|null} [parent] CreateRepositoryRequest parent + * @property {google.cloud.dataform.v1beta1.IRepository|null} [repository] CreateRepositoryRequest repository + * @property {string|null} [repositoryId] CreateRepositoryRequest repositoryId + */ + + /** + * Constructs a new CreateRepositoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a CreateRepositoryRequest. + * @implements ICreateRepositoryRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.ICreateRepositoryRequest=} [properties] Properties to set + */ + function CreateRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateRepositoryRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @instance + */ + CreateRepositoryRequest.prototype.parent = ""; + + /** + * CreateRepositoryRequest repository. + * @member {google.cloud.dataform.v1beta1.IRepository|null|undefined} repository + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @instance + */ + CreateRepositoryRequest.prototype.repository = null; + + /** + * CreateRepositoryRequest repositoryId. + * @member {string} repositoryId + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @instance + */ + CreateRepositoryRequest.prototype.repositoryId = ""; + + /** + * Creates a new CreateRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateRepositoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CreateRepositoryRequest} CreateRepositoryRequest instance + */ + CreateRepositoryRequest.create = function create(properties) { + return new CreateRepositoryRequest(properties); + }; + + /** + * Encodes the specified CreateRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateRepositoryRequest} message CreateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateRepositoryRequest.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.repository != null && Object.hasOwnProperty.call(message, "repository")) + $root.google.cloud.dataform.v1beta1.Repository.encode(message.repository, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.repositoryId != null && Object.hasOwnProperty.call(message, "repositoryId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.repositoryId); + return writer; + }; + + /** + * Encodes the specified CreateRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateRepositoryRequest} message CreateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CreateRepositoryRequest} CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateRepositoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CreateRepositoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.repository = $root.google.cloud.dataform.v1beta1.Repository.decode(reader, reader.uint32()); + break; + case 3: + message.repositoryId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CreateRepositoryRequest} CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateRepositoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateRepositoryRequest.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.repository != null && message.hasOwnProperty("repository")) { + var error = $root.google.cloud.dataform.v1beta1.Repository.verify(message.repository); + if (error) + return "repository." + error; + } + if (message.repositoryId != null && message.hasOwnProperty("repositoryId")) + if (!$util.isString(message.repositoryId)) + return "repositoryId: string expected"; + return null; + }; + + /** + * Creates a CreateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CreateRepositoryRequest} CreateRepositoryRequest + */ + CreateRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CreateRepositoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CreateRepositoryRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.repository != null) { + if (typeof object.repository !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CreateRepositoryRequest.repository: object expected"); + message.repository = $root.google.cloud.dataform.v1beta1.Repository.fromObject(object.repository); + } + if (object.repositoryId != null) + message.repositoryId = String(object.repositoryId); + return message; + }; + + /** + * Creates a plain object from a CreateRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.CreateRepositoryRequest} message CreateRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.repository = null; + object.repositoryId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.repository != null && message.hasOwnProperty("repository")) + object.repository = $root.google.cloud.dataform.v1beta1.Repository.toObject(message.repository, options); + if (message.repositoryId != null && message.hasOwnProperty("repositoryId")) + object.repositoryId = message.repositoryId; + return object; + }; + + /** + * Converts this CreateRepositoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + CreateRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateRepositoryRequest; + })(); + + v1beta1.UpdateRepositoryRequest = (function() { + + /** + * Properties of an UpdateRepositoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IUpdateRepositoryRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateRepositoryRequest updateMask + * @property {google.cloud.dataform.v1beta1.IRepository|null} [repository] UpdateRepositoryRequest repository + */ + + /** + * Constructs a new UpdateRepositoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents an UpdateRepositoryRequest. + * @implements IUpdateRepositoryRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IUpdateRepositoryRequest=} [properties] Properties to set + */ + function UpdateRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateRepositoryRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @instance + */ + UpdateRepositoryRequest.prototype.updateMask = null; + + /** + * UpdateRepositoryRequest repository. + * @member {google.cloud.dataform.v1beta1.IRepository|null|undefined} repository + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @instance + */ + UpdateRepositoryRequest.prototype.repository = null; + + /** + * Creates a new UpdateRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IUpdateRepositoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.UpdateRepositoryRequest} UpdateRepositoryRequest instance + */ + UpdateRepositoryRequest.create = function create(properties) { + return new UpdateRepositoryRequest(properties); + }; + + /** + * Encodes the specified UpdateRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.UpdateRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IUpdateRepositoryRequest} message UpdateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateRepositoryRequest.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.repository != null && Object.hasOwnProperty.call(message, "repository")) + $root.google.cloud.dataform.v1beta1.Repository.encode(message.repository, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.UpdateRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IUpdateRepositoryRequest} message UpdateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.UpdateRepositoryRequest} UpdateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateRepositoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.UpdateRepositoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 2: + message.repository = $root.google.cloud.dataform.v1beta1.Repository.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.UpdateRepositoryRequest} UpdateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateRepositoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateRepositoryRequest.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.repository != null && message.hasOwnProperty("repository")) { + var error = $root.google.cloud.dataform.v1beta1.Repository.verify(message.repository); + if (error) + return "repository." + error; + } + return null; + }; + + /** + * Creates an UpdateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.UpdateRepositoryRequest} UpdateRepositoryRequest + */ + UpdateRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.UpdateRepositoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.UpdateRepositoryRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.UpdateRepositoryRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.repository != null) { + if (typeof object.repository !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.UpdateRepositoryRequest.repository: object expected"); + message.repository = $root.google.cloud.dataform.v1beta1.Repository.fromObject(object.repository); + } + return message; + }; + + /** + * Creates a plain object from an UpdateRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.UpdateRepositoryRequest} message UpdateRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.repository = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.repository != null && message.hasOwnProperty("repository")) + object.repository = $root.google.cloud.dataform.v1beta1.Repository.toObject(message.repository, options); + return object; + }; + + /** + * Converts this UpdateRepositoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateRepositoryRequest; + })(); + + v1beta1.DeleteRepositoryRequest = (function() { + + /** + * Properties of a DeleteRepositoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IDeleteRepositoryRequest + * @property {string|null} [name] DeleteRepositoryRequest name + * @property {boolean|null} [force] DeleteRepositoryRequest force + */ + + /** + * Constructs a new DeleteRepositoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a DeleteRepositoryRequest. + * @implements IDeleteRepositoryRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IDeleteRepositoryRequest=} [properties] Properties to set + */ + function DeleteRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteRepositoryRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @instance + */ + DeleteRepositoryRequest.prototype.name = ""; + + /** + * DeleteRepositoryRequest force. + * @member {boolean} force + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @instance + */ + DeleteRepositoryRequest.prototype.force = false; + + /** + * Creates a new DeleteRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IDeleteRepositoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.DeleteRepositoryRequest} DeleteRepositoryRequest instance + */ + DeleteRepositoryRequest.create = function create(properties) { + return new DeleteRepositoryRequest(properties); + }; + + /** + * Encodes the specified DeleteRepositoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IDeleteRepositoryRequest} message DeleteRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteRepositoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + return writer; + }; + + /** + * Encodes the specified DeleteRepositoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IDeleteRepositoryRequest} message DeleteRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.DeleteRepositoryRequest} DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteRepositoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.DeleteRepositoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.force = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.DeleteRepositoryRequest} DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteRepositoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteRepositoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + return null; + }; + + /** + * Creates a DeleteRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.DeleteRepositoryRequest} DeleteRepositoryRequest + */ + DeleteRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.DeleteRepositoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.DeleteRepositoryRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); + return message; + }; + + /** + * Creates a plain object from a DeleteRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.DeleteRepositoryRequest} message DeleteRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; + + /** + * Converts this DeleteRepositoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteRepositoryRequest; + })(); + + v1beta1.FetchRemoteBranchesRequest = (function() { + + /** + * Properties of a FetchRemoteBranchesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IFetchRemoteBranchesRequest + * @property {string|null} [name] FetchRemoteBranchesRequest name + */ + + /** + * Constructs a new FetchRemoteBranchesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a FetchRemoteBranchesRequest. + * @implements IFetchRemoteBranchesRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest=} [properties] Properties to set + */ + function FetchRemoteBranchesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchRemoteBranchesRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @instance + */ + FetchRemoteBranchesRequest.prototype.name = ""; + + /** + * Creates a new FetchRemoteBranchesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest} FetchRemoteBranchesRequest instance + */ + FetchRemoteBranchesRequest.create = function create(properties) { + return new FetchRemoteBranchesRequest(properties); + }; + + /** + * Encodes the specified FetchRemoteBranchesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest} message FetchRemoteBranchesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchRemoteBranchesRequest.encode = function encode(message, writer) { + 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 FetchRemoteBranchesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest} message FetchRemoteBranchesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchRemoteBranchesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchRemoteBranchesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest} FetchRemoteBranchesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchRemoteBranchesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchRemoteBranchesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest} FetchRemoteBranchesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchRemoteBranchesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchRemoteBranchesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchRemoteBranchesRequest.verify = function verify(message) { + if (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 FetchRemoteBranchesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest} FetchRemoteBranchesRequest + */ + FetchRemoteBranchesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a FetchRemoteBranchesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @static + * @param {google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest} message FetchRemoteBranchesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchRemoteBranchesRequest.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 FetchRemoteBranchesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @instance + * @returns {Object.} JSON object + */ + FetchRemoteBranchesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FetchRemoteBranchesRequest; + })(); + + v1beta1.FetchRemoteBranchesResponse = (function() { + + /** + * Properties of a FetchRemoteBranchesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IFetchRemoteBranchesResponse + * @property {Array.|null} [branches] FetchRemoteBranchesResponse branches + */ + + /** + * Constructs a new FetchRemoteBranchesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a FetchRemoteBranchesResponse. + * @implements IFetchRemoteBranchesResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse=} [properties] Properties to set + */ + function FetchRemoteBranchesResponse(properties) { + this.branches = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchRemoteBranchesResponse branches. + * @member {Array.} branches + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @instance + */ + FetchRemoteBranchesResponse.prototype.branches = $util.emptyArray; + + /** + * Creates a new FetchRemoteBranchesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse} FetchRemoteBranchesResponse instance + */ + FetchRemoteBranchesResponse.create = function create(properties) { + return new FetchRemoteBranchesResponse(properties); + }; + + /** + * Encodes the specified FetchRemoteBranchesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse} message FetchRemoteBranchesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchRemoteBranchesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.branches != null && message.branches.length) + for (var i = 0; i < message.branches.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.branches[i]); + return writer; + }; + + /** + * Encodes the specified FetchRemoteBranchesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse} message FetchRemoteBranchesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchRemoteBranchesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchRemoteBranchesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse} FetchRemoteBranchesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchRemoteBranchesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.branches && message.branches.length)) + message.branches = []; + message.branches.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchRemoteBranchesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse} FetchRemoteBranchesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchRemoteBranchesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchRemoteBranchesResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchRemoteBranchesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.branches != null && message.hasOwnProperty("branches")) { + if (!Array.isArray(message.branches)) + return "branches: array expected"; + for (var i = 0; i < message.branches.length; ++i) + if (!$util.isString(message.branches[i])) + return "branches: string[] expected"; + } + return null; + }; + + /** + * Creates a FetchRemoteBranchesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse} FetchRemoteBranchesResponse + */ + FetchRemoteBranchesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse(); + if (object.branches) { + if (!Array.isArray(object.branches)) + throw TypeError(".google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse.branches: array expected"); + message.branches = []; + for (var i = 0; i < object.branches.length; ++i) + message.branches[i] = String(object.branches[i]); + } + return message; + }; + + /** + * Creates a plain object from a FetchRemoteBranchesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @static + * @param {google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse} message FetchRemoteBranchesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchRemoteBranchesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.branches = []; + if (message.branches && message.branches.length) { + object.branches = []; + for (var j = 0; j < message.branches.length; ++j) + object.branches[j] = message.branches[j]; + } + return object; + }; + + /** + * Converts this FetchRemoteBranchesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @instance + * @returns {Object.} JSON object + */ + FetchRemoteBranchesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FetchRemoteBranchesResponse; + })(); + + v1beta1.Workspace = (function() { + + /** + * Properties of a Workspace. + * @memberof google.cloud.dataform.v1beta1 + * @interface IWorkspace + * @property {string|null} [name] Workspace name + */ + + /** + * Constructs a new Workspace. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a Workspace. + * @implements IWorkspace + * @constructor + * @param {google.cloud.dataform.v1beta1.IWorkspace=} [properties] Properties to set + */ + function Workspace(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Workspace name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.Workspace + * @instance + */ + Workspace.prototype.name = ""; + + /** + * Creates a new Workspace instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.Workspace + * @static + * @param {google.cloud.dataform.v1beta1.IWorkspace=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.Workspace} Workspace instance + */ + Workspace.create = function create(properties) { + return new Workspace(properties); + }; + + /** + * Encodes the specified Workspace message. Does not implicitly {@link google.cloud.dataform.v1beta1.Workspace.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.Workspace + * @static + * @param {google.cloud.dataform.v1beta1.IWorkspace} message Workspace message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Workspace.encode = function encode(message, writer) { + 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 Workspace message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.Workspace.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.Workspace + * @static + * @param {google.cloud.dataform.v1beta1.IWorkspace} message Workspace message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Workspace.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Workspace message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.Workspace + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.Workspace} Workspace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Workspace.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.Workspace(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Workspace message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.Workspace + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.Workspace} Workspace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Workspace.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Workspace message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.Workspace + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Workspace.verify = function verify(message) { + if (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 Workspace message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.Workspace + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.Workspace} Workspace + */ + Workspace.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.Workspace) + return object; + var message = new $root.google.cloud.dataform.v1beta1.Workspace(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a Workspace message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.Workspace + * @static + * @param {google.cloud.dataform.v1beta1.Workspace} message Workspace + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Workspace.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 Workspace to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.Workspace + * @instance + * @returns {Object.} JSON object + */ + Workspace.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Workspace; + })(); + + v1beta1.ListWorkspacesRequest = (function() { + + /** + * Properties of a ListWorkspacesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IListWorkspacesRequest + * @property {string|null} [parent] ListWorkspacesRequest parent + * @property {number|null} [pageSize] ListWorkspacesRequest pageSize + * @property {string|null} [pageToken] ListWorkspacesRequest pageToken + * @property {string|null} [orderBy] ListWorkspacesRequest orderBy + * @property {string|null} [filter] ListWorkspacesRequest filter + */ + + /** + * Constructs a new ListWorkspacesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ListWorkspacesRequest. + * @implements IListWorkspacesRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IListWorkspacesRequest=} [properties] Properties to set + */ + function ListWorkspacesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListWorkspacesRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @instance + */ + ListWorkspacesRequest.prototype.parent = ""; + + /** + * ListWorkspacesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @instance + */ + ListWorkspacesRequest.prototype.pageSize = 0; + + /** + * ListWorkspacesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @instance + */ + ListWorkspacesRequest.prototype.pageToken = ""; + + /** + * ListWorkspacesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @instance + */ + ListWorkspacesRequest.prototype.orderBy = ""; + + /** + * ListWorkspacesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @instance + */ + ListWorkspacesRequest.prototype.filter = ""; + + /** + * Creates a new ListWorkspacesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkspacesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ListWorkspacesRequest} ListWorkspacesRequest instance + */ + ListWorkspacesRequest.create = function create(properties) { + return new ListWorkspacesRequest(properties); + }; + + /** + * Encodes the specified ListWorkspacesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkspacesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkspacesRequest} message ListWorkspacesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkspacesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListWorkspacesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkspacesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkspacesRequest} message ListWorkspacesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkspacesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWorkspacesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ListWorkspacesRequest} ListWorkspacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkspacesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ListWorkspacesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.orderBy = reader.string(); + break; + case 5: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListWorkspacesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ListWorkspacesRequest} ListWorkspacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkspacesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWorkspacesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWorkspacesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListWorkspacesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ListWorkspacesRequest} ListWorkspacesRequest + */ + ListWorkspacesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ListWorkspacesRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ListWorkspacesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListWorkspacesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @static + * @param {google.cloud.dataform.v1beta1.ListWorkspacesRequest} message ListWorkspacesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWorkspacesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListWorkspacesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @instance + * @returns {Object.} JSON object + */ + ListWorkspacesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListWorkspacesRequest; + })(); + + v1beta1.ListWorkspacesResponse = (function() { + + /** + * Properties of a ListWorkspacesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IListWorkspacesResponse + * @property {Array.|null} [workspaces] ListWorkspacesResponse workspaces + * @property {string|null} [nextPageToken] ListWorkspacesResponse nextPageToken + * @property {Array.|null} [unreachable] ListWorkspacesResponse unreachable + */ + + /** + * Constructs a new ListWorkspacesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ListWorkspacesResponse. + * @implements IListWorkspacesResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IListWorkspacesResponse=} [properties] Properties to set + */ + function ListWorkspacesResponse(properties) { + this.workspaces = []; + 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]]; + } + + /** + * ListWorkspacesResponse workspaces. + * @member {Array.} workspaces + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @instance + */ + ListWorkspacesResponse.prototype.workspaces = $util.emptyArray; + + /** + * ListWorkspacesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @instance + */ + ListWorkspacesResponse.prototype.nextPageToken = ""; + + /** + * ListWorkspacesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @instance + */ + ListWorkspacesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListWorkspacesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkspacesResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ListWorkspacesResponse} ListWorkspacesResponse instance + */ + ListWorkspacesResponse.create = function create(properties) { + return new ListWorkspacesResponse(properties); + }; + + /** + * Encodes the specified ListWorkspacesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkspacesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkspacesResponse} message ListWorkspacesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkspacesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspaces != null && message.workspaces.length) + for (var i = 0; i < message.workspaces.length; ++i) + $root.google.cloud.dataform.v1beta1.Workspace.encode(message.workspaces[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 ListWorkspacesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkspacesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkspacesResponse} message ListWorkspacesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkspacesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWorkspacesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ListWorkspacesResponse} ListWorkspacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkspacesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ListWorkspacesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.workspaces && message.workspaces.length)) + message.workspaces = []; + message.workspaces.push($root.google.cloud.dataform.v1beta1.Workspace.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 ListWorkspacesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ListWorkspacesResponse} ListWorkspacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkspacesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWorkspacesResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWorkspacesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspaces != null && message.hasOwnProperty("workspaces")) { + if (!Array.isArray(message.workspaces)) + return "workspaces: array expected"; + for (var i = 0; i < message.workspaces.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.Workspace.verify(message.workspaces[i]); + if (error) + return "workspaces." + 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 ListWorkspacesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ListWorkspacesResponse} ListWorkspacesResponse + */ + ListWorkspacesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ListWorkspacesResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ListWorkspacesResponse(); + if (object.workspaces) { + if (!Array.isArray(object.workspaces)) + throw TypeError(".google.cloud.dataform.v1beta1.ListWorkspacesResponse.workspaces: array expected"); + message.workspaces = []; + for (var i = 0; i < object.workspaces.length; ++i) { + if (typeof object.workspaces[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.ListWorkspacesResponse.workspaces: object expected"); + message.workspaces[i] = $root.google.cloud.dataform.v1beta1.Workspace.fromObject(object.workspaces[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.dataform.v1beta1.ListWorkspacesResponse.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 ListWorkspacesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @static + * @param {google.cloud.dataform.v1beta1.ListWorkspacesResponse} message ListWorkspacesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWorkspacesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.workspaces = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.workspaces && message.workspaces.length) { + object.workspaces = []; + for (var j = 0; j < message.workspaces.length; ++j) + object.workspaces[j] = $root.google.cloud.dataform.v1beta1.Workspace.toObject(message.workspaces[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 ListWorkspacesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @instance + * @returns {Object.} JSON object + */ + ListWorkspacesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListWorkspacesResponse; + })(); + + v1beta1.GetWorkspaceRequest = (function() { + + /** + * Properties of a GetWorkspaceRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IGetWorkspaceRequest + * @property {string|null} [name] GetWorkspaceRequest name + */ + + /** + * Constructs a new GetWorkspaceRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a GetWorkspaceRequest. + * @implements IGetWorkspaceRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IGetWorkspaceRequest=} [properties] Properties to set + */ + function GetWorkspaceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetWorkspaceRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @instance + */ + GetWorkspaceRequest.prototype.name = ""; + + /** + * Creates a new GetWorkspaceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetWorkspaceRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.GetWorkspaceRequest} GetWorkspaceRequest instance + */ + GetWorkspaceRequest.create = function create(properties) { + return new GetWorkspaceRequest(properties); + }; + + /** + * Encodes the specified GetWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.GetWorkspaceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetWorkspaceRequest} message GetWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWorkspaceRequest.encode = function encode(message, writer) { + 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 GetWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.GetWorkspaceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetWorkspaceRequest} message GetWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWorkspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetWorkspaceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.GetWorkspaceRequest} GetWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWorkspaceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.GetWorkspaceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetWorkspaceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.GetWorkspaceRequest} GetWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWorkspaceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetWorkspaceRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetWorkspaceRequest.verify = function verify(message) { + if (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 GetWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.GetWorkspaceRequest} GetWorkspaceRequest + */ + GetWorkspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.GetWorkspaceRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.GetWorkspaceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetWorkspaceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.GetWorkspaceRequest} message GetWorkspaceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetWorkspaceRequest.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 GetWorkspaceRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @instance + * @returns {Object.} JSON object + */ + GetWorkspaceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetWorkspaceRequest; + })(); + + v1beta1.CreateWorkspaceRequest = (function() { + + /** + * Properties of a CreateWorkspaceRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface ICreateWorkspaceRequest + * @property {string|null} [parent] CreateWorkspaceRequest parent + * @property {google.cloud.dataform.v1beta1.IWorkspace|null} [workspace] CreateWorkspaceRequest workspace + * @property {string|null} [workspaceId] CreateWorkspaceRequest workspaceId + */ + + /** + * Constructs a new CreateWorkspaceRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a CreateWorkspaceRequest. + * @implements ICreateWorkspaceRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.ICreateWorkspaceRequest=} [properties] Properties to set + */ + function CreateWorkspaceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateWorkspaceRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @instance + */ + CreateWorkspaceRequest.prototype.parent = ""; + + /** + * CreateWorkspaceRequest workspace. + * @member {google.cloud.dataform.v1beta1.IWorkspace|null|undefined} workspace + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @instance + */ + CreateWorkspaceRequest.prototype.workspace = null; + + /** + * CreateWorkspaceRequest workspaceId. + * @member {string} workspaceId + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @instance + */ + CreateWorkspaceRequest.prototype.workspaceId = ""; + + /** + * Creates a new CreateWorkspaceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateWorkspaceRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CreateWorkspaceRequest} CreateWorkspaceRequest instance + */ + CreateWorkspaceRequest.create = function create(properties) { + return new CreateWorkspaceRequest(properties); + }; + + /** + * Encodes the specified CreateWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateWorkspaceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateWorkspaceRequest} message CreateWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateWorkspaceRequest.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.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + $root.google.cloud.dataform.v1beta1.Workspace.encode(message.workspace, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.workspaceId != null && Object.hasOwnProperty.call(message, "workspaceId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.workspaceId); + return writer; + }; + + /** + * Encodes the specified CreateWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateWorkspaceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateWorkspaceRequest} message CreateWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateWorkspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateWorkspaceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CreateWorkspaceRequest} CreateWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateWorkspaceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CreateWorkspaceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.workspace = $root.google.cloud.dataform.v1beta1.Workspace.decode(reader, reader.uint32()); + break; + case 3: + message.workspaceId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateWorkspaceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CreateWorkspaceRequest} CreateWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateWorkspaceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateWorkspaceRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateWorkspaceRequest.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.workspace != null && message.hasOwnProperty("workspace")) { + var error = $root.google.cloud.dataform.v1beta1.Workspace.verify(message.workspace); + if (error) + return "workspace." + error; + } + if (message.workspaceId != null && message.hasOwnProperty("workspaceId")) + if (!$util.isString(message.workspaceId)) + return "workspaceId: string expected"; + return null; + }; + + /** + * Creates a CreateWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CreateWorkspaceRequest} CreateWorkspaceRequest + */ + CreateWorkspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CreateWorkspaceRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CreateWorkspaceRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.workspace != null) { + if (typeof object.workspace !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CreateWorkspaceRequest.workspace: object expected"); + message.workspace = $root.google.cloud.dataform.v1beta1.Workspace.fromObject(object.workspace); + } + if (object.workspaceId != null) + message.workspaceId = String(object.workspaceId); + return message; + }; + + /** + * Creates a plain object from a CreateWorkspaceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.CreateWorkspaceRequest} message CreateWorkspaceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateWorkspaceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.workspace = null; + object.workspaceId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = $root.google.cloud.dataform.v1beta1.Workspace.toObject(message.workspace, options); + if (message.workspaceId != null && message.hasOwnProperty("workspaceId")) + object.workspaceId = message.workspaceId; + return object; + }; + + /** + * Converts this CreateWorkspaceRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @instance + * @returns {Object.} JSON object + */ + CreateWorkspaceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateWorkspaceRequest; + })(); + + v1beta1.DeleteWorkspaceRequest = (function() { + + /** + * Properties of a DeleteWorkspaceRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IDeleteWorkspaceRequest + * @property {string|null} [name] DeleteWorkspaceRequest name + */ + + /** + * Constructs a new DeleteWorkspaceRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a DeleteWorkspaceRequest. + * @implements IDeleteWorkspaceRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest=} [properties] Properties to set + */ + function DeleteWorkspaceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteWorkspaceRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @instance + */ + DeleteWorkspaceRequest.prototype.name = ""; + + /** + * Creates a new DeleteWorkspaceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.DeleteWorkspaceRequest} DeleteWorkspaceRequest instance + */ + DeleteWorkspaceRequest.create = function create(properties) { + return new DeleteWorkspaceRequest(properties); + }; + + /** + * Encodes the specified DeleteWorkspaceRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteWorkspaceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest} message DeleteWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteWorkspaceRequest.encode = function encode(message, writer) { + 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 DeleteWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteWorkspaceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest} message DeleteWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteWorkspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteWorkspaceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.DeleteWorkspaceRequest} DeleteWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteWorkspaceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteWorkspaceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.DeleteWorkspaceRequest} DeleteWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteWorkspaceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteWorkspaceRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteWorkspaceRequest.verify = function verify(message) { + if (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 DeleteWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.DeleteWorkspaceRequest} DeleteWorkspaceRequest + */ + DeleteWorkspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteWorkspaceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @static + * @param {google.cloud.dataform.v1beta1.DeleteWorkspaceRequest} message DeleteWorkspaceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteWorkspaceRequest.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 DeleteWorkspaceRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteWorkspaceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteWorkspaceRequest; + })(); + + v1beta1.CommitAuthor = (function() { + + /** + * Properties of a CommitAuthor. + * @memberof google.cloud.dataform.v1beta1 + * @interface ICommitAuthor + * @property {string|null} [name] CommitAuthor name + * @property {string|null} [emailAddress] CommitAuthor emailAddress + */ + + /** + * Constructs a new CommitAuthor. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a CommitAuthor. + * @implements ICommitAuthor + * @constructor + * @param {google.cloud.dataform.v1beta1.ICommitAuthor=} [properties] Properties to set + */ + function CommitAuthor(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommitAuthor name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @instance + */ + CommitAuthor.prototype.name = ""; + + /** + * CommitAuthor emailAddress. + * @member {string} emailAddress + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @instance + */ + CommitAuthor.prototype.emailAddress = ""; + + /** + * Creates a new CommitAuthor instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @static + * @param {google.cloud.dataform.v1beta1.ICommitAuthor=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CommitAuthor} CommitAuthor instance + */ + CommitAuthor.create = function create(properties) { + return new CommitAuthor(properties); + }; + + /** + * Encodes the specified CommitAuthor message. Does not implicitly {@link google.cloud.dataform.v1beta1.CommitAuthor.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @static + * @param {google.cloud.dataform.v1beta1.ICommitAuthor} message CommitAuthor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitAuthor.encode = function encode(message, writer) { + 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.emailAddress != null && Object.hasOwnProperty.call(message, "emailAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.emailAddress); + return writer; + }; + + /** + * Encodes the specified CommitAuthor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CommitAuthor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @static + * @param {google.cloud.dataform.v1beta1.ICommitAuthor} message CommitAuthor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitAuthor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommitAuthor message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CommitAuthor} CommitAuthor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitAuthor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CommitAuthor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.emailAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommitAuthor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CommitAuthor} CommitAuthor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitAuthor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommitAuthor message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommitAuthor.verify = function verify(message) { + if (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.emailAddress != null && message.hasOwnProperty("emailAddress")) + if (!$util.isString(message.emailAddress)) + return "emailAddress: string expected"; + return null; + }; + + /** + * Creates a CommitAuthor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CommitAuthor} CommitAuthor + */ + CommitAuthor.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CommitAuthor) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CommitAuthor(); + if (object.name != null) + message.name = String(object.name); + if (object.emailAddress != null) + message.emailAddress = String(object.emailAddress); + return message; + }; + + /** + * Creates a plain object from a CommitAuthor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @static + * @param {google.cloud.dataform.v1beta1.CommitAuthor} message CommitAuthor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommitAuthor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.emailAddress = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.emailAddress != null && message.hasOwnProperty("emailAddress")) + object.emailAddress = message.emailAddress; + return object; + }; + + /** + * Converts this CommitAuthor to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @instance + * @returns {Object.} JSON object + */ + CommitAuthor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommitAuthor; + })(); + + v1beta1.PullGitCommitsRequest = (function() { + + /** + * Properties of a PullGitCommitsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IPullGitCommitsRequest + * @property {string|null} [name] PullGitCommitsRequest name + * @property {string|null} [remoteBranch] PullGitCommitsRequest remoteBranch + * @property {google.cloud.dataform.v1beta1.ICommitAuthor|null} [author] PullGitCommitsRequest author + */ + + /** + * Constructs a new PullGitCommitsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a PullGitCommitsRequest. + * @implements IPullGitCommitsRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IPullGitCommitsRequest=} [properties] Properties to set + */ + function PullGitCommitsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PullGitCommitsRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @instance + */ + PullGitCommitsRequest.prototype.name = ""; + + /** + * PullGitCommitsRequest remoteBranch. + * @member {string} remoteBranch + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @instance + */ + PullGitCommitsRequest.prototype.remoteBranch = ""; + + /** + * PullGitCommitsRequest author. + * @member {google.cloud.dataform.v1beta1.ICommitAuthor|null|undefined} author + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @instance + */ + PullGitCommitsRequest.prototype.author = null; + + /** + * Creates a new PullGitCommitsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IPullGitCommitsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.PullGitCommitsRequest} PullGitCommitsRequest instance + */ + PullGitCommitsRequest.create = function create(properties) { + return new PullGitCommitsRequest(properties); + }; + + /** + * Encodes the specified PullGitCommitsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.PullGitCommitsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IPullGitCommitsRequest} message PullGitCommitsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PullGitCommitsRequest.encode = function encode(message, writer) { + 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.remoteBranch != null && Object.hasOwnProperty.call(message, "remoteBranch")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.remoteBranch); + if (message.author != null && Object.hasOwnProperty.call(message, "author")) + $root.google.cloud.dataform.v1beta1.CommitAuthor.encode(message.author, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PullGitCommitsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.PullGitCommitsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IPullGitCommitsRequest} message PullGitCommitsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PullGitCommitsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PullGitCommitsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.PullGitCommitsRequest} PullGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PullGitCommitsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.PullGitCommitsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.remoteBranch = reader.string(); + break; + case 3: + message.author = $root.google.cloud.dataform.v1beta1.CommitAuthor.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PullGitCommitsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.PullGitCommitsRequest} PullGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PullGitCommitsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PullGitCommitsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PullGitCommitsRequest.verify = function verify(message) { + if (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.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + if (!$util.isString(message.remoteBranch)) + return "remoteBranch: string expected"; + if (message.author != null && message.hasOwnProperty("author")) { + var error = $root.google.cloud.dataform.v1beta1.CommitAuthor.verify(message.author); + if (error) + return "author." + error; + } + return null; + }; + + /** + * Creates a PullGitCommitsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.PullGitCommitsRequest} PullGitCommitsRequest + */ + PullGitCommitsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.PullGitCommitsRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.PullGitCommitsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.remoteBranch != null) + message.remoteBranch = String(object.remoteBranch); + if (object.author != null) { + if (typeof object.author !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.PullGitCommitsRequest.author: object expected"); + message.author = $root.google.cloud.dataform.v1beta1.CommitAuthor.fromObject(object.author); + } + return message; + }; + + /** + * Creates a plain object from a PullGitCommitsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1beta1.PullGitCommitsRequest} message PullGitCommitsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PullGitCommitsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.remoteBranch = ""; + object.author = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + object.remoteBranch = message.remoteBranch; + if (message.author != null && message.hasOwnProperty("author")) + object.author = $root.google.cloud.dataform.v1beta1.CommitAuthor.toObject(message.author, options); + return object; + }; + + /** + * Converts this PullGitCommitsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @instance + * @returns {Object.} JSON object + */ + PullGitCommitsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PullGitCommitsRequest; + })(); + + v1beta1.PushGitCommitsRequest = (function() { + + /** + * Properties of a PushGitCommitsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IPushGitCommitsRequest + * @property {string|null} [name] PushGitCommitsRequest name + * @property {string|null} [remoteBranch] PushGitCommitsRequest remoteBranch + */ + + /** + * Constructs a new PushGitCommitsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a PushGitCommitsRequest. + * @implements IPushGitCommitsRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IPushGitCommitsRequest=} [properties] Properties to set + */ + function PushGitCommitsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PushGitCommitsRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @instance + */ + PushGitCommitsRequest.prototype.name = ""; + + /** + * PushGitCommitsRequest remoteBranch. + * @member {string} remoteBranch + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @instance + */ + PushGitCommitsRequest.prototype.remoteBranch = ""; + + /** + * Creates a new PushGitCommitsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IPushGitCommitsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.PushGitCommitsRequest} PushGitCommitsRequest instance + */ + PushGitCommitsRequest.create = function create(properties) { + return new PushGitCommitsRequest(properties); + }; + + /** + * Encodes the specified PushGitCommitsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.PushGitCommitsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IPushGitCommitsRequest} message PushGitCommitsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PushGitCommitsRequest.encode = function encode(message, writer) { + 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.remoteBranch != null && Object.hasOwnProperty.call(message, "remoteBranch")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.remoteBranch); + return writer; + }; + + /** + * Encodes the specified PushGitCommitsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.PushGitCommitsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IPushGitCommitsRequest} message PushGitCommitsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PushGitCommitsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PushGitCommitsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.PushGitCommitsRequest} PushGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PushGitCommitsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.PushGitCommitsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.remoteBranch = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PushGitCommitsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.PushGitCommitsRequest} PushGitCommitsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PushGitCommitsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PushGitCommitsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PushGitCommitsRequest.verify = function verify(message) { + if (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.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + if (!$util.isString(message.remoteBranch)) + return "remoteBranch: string expected"; + return null; + }; + + /** + * Creates a PushGitCommitsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.PushGitCommitsRequest} PushGitCommitsRequest + */ + PushGitCommitsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.PushGitCommitsRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.PushGitCommitsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.remoteBranch != null) + message.remoteBranch = String(object.remoteBranch); + return message; + }; + + /** + * Creates a plain object from a PushGitCommitsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @static + * @param {google.cloud.dataform.v1beta1.PushGitCommitsRequest} message PushGitCommitsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PushGitCommitsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.remoteBranch = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + object.remoteBranch = message.remoteBranch; + return object; + }; + + /** + * Converts this PushGitCommitsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @instance + * @returns {Object.} JSON object + */ + PushGitCommitsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PushGitCommitsRequest; + })(); + + v1beta1.FetchFileGitStatusesRequest = (function() { + + /** + * Properties of a FetchFileGitStatusesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IFetchFileGitStatusesRequest + * @property {string|null} [name] FetchFileGitStatusesRequest name + */ + + /** + * Constructs a new FetchFileGitStatusesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a FetchFileGitStatusesRequest. + * @implements IFetchFileGitStatusesRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest=} [properties] Properties to set + */ + function FetchFileGitStatusesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchFileGitStatusesRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @instance + */ + FetchFileGitStatusesRequest.prototype.name = ""; + + /** + * Creates a new FetchFileGitStatusesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest} FetchFileGitStatusesRequest instance + */ + FetchFileGitStatusesRequest.create = function create(properties) { + return new FetchFileGitStatusesRequest(properties); + }; + + /** + * Encodes the specified FetchFileGitStatusesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest} message FetchFileGitStatusesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileGitStatusesRequest.encode = function encode(message, writer) { + 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 FetchFileGitStatusesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest} message FetchFileGitStatusesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileGitStatusesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchFileGitStatusesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest} FetchFileGitStatusesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileGitStatusesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchFileGitStatusesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest} FetchFileGitStatusesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileGitStatusesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchFileGitStatusesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchFileGitStatusesRequest.verify = function verify(message) { + if (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 FetchFileGitStatusesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest} FetchFileGitStatusesRequest + */ + FetchFileGitStatusesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a FetchFileGitStatusesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @static + * @param {google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest} message FetchFileGitStatusesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchFileGitStatusesRequest.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 FetchFileGitStatusesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @instance + * @returns {Object.} JSON object + */ + FetchFileGitStatusesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FetchFileGitStatusesRequest; + })(); + + v1beta1.FetchFileGitStatusesResponse = (function() { + + /** + * Properties of a FetchFileGitStatusesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IFetchFileGitStatusesResponse + * @property {Array.|null} [uncommittedFileChanges] FetchFileGitStatusesResponse uncommittedFileChanges + */ + + /** + * Constructs a new FetchFileGitStatusesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a FetchFileGitStatusesResponse. + * @implements IFetchFileGitStatusesResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse=} [properties] Properties to set + */ + function FetchFileGitStatusesResponse(properties) { + this.uncommittedFileChanges = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchFileGitStatusesResponse uncommittedFileChanges. + * @member {Array.} uncommittedFileChanges + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @instance + */ + FetchFileGitStatusesResponse.prototype.uncommittedFileChanges = $util.emptyArray; + + /** + * Creates a new FetchFileGitStatusesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse} FetchFileGitStatusesResponse instance + */ + FetchFileGitStatusesResponse.create = function create(properties) { + return new FetchFileGitStatusesResponse(properties); + }; + + /** + * Encodes the specified FetchFileGitStatusesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse} message FetchFileGitStatusesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileGitStatusesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uncommittedFileChanges != null && message.uncommittedFileChanges.length) + for (var i = 0; i < message.uncommittedFileChanges.length; ++i) + $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.encode(message.uncommittedFileChanges[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FetchFileGitStatusesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse} message FetchFileGitStatusesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileGitStatusesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchFileGitStatusesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse} FetchFileGitStatusesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileGitStatusesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.uncommittedFileChanges && message.uncommittedFileChanges.length)) + message.uncommittedFileChanges = []; + message.uncommittedFileChanges.push($root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchFileGitStatusesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse} FetchFileGitStatusesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileGitStatusesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchFileGitStatusesResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchFileGitStatusesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uncommittedFileChanges != null && message.hasOwnProperty("uncommittedFileChanges")) { + if (!Array.isArray(message.uncommittedFileChanges)) + return "uncommittedFileChanges: array expected"; + for (var i = 0; i < message.uncommittedFileChanges.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.verify(message.uncommittedFileChanges[i]); + if (error) + return "uncommittedFileChanges." + error; + } + } + return null; + }; + + /** + * Creates a FetchFileGitStatusesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse} FetchFileGitStatusesResponse + */ + FetchFileGitStatusesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse(); + if (object.uncommittedFileChanges) { + if (!Array.isArray(object.uncommittedFileChanges)) + throw TypeError(".google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.uncommittedFileChanges: array expected"); + message.uncommittedFileChanges = []; + for (var i = 0; i < object.uncommittedFileChanges.length; ++i) { + if (typeof object.uncommittedFileChanges[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.uncommittedFileChanges: object expected"); + message.uncommittedFileChanges[i] = $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.fromObject(object.uncommittedFileChanges[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FetchFileGitStatusesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @static + * @param {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse} message FetchFileGitStatusesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchFileGitStatusesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uncommittedFileChanges = []; + if (message.uncommittedFileChanges && message.uncommittedFileChanges.length) { + object.uncommittedFileChanges = []; + for (var j = 0; j < message.uncommittedFileChanges.length; ++j) + object.uncommittedFileChanges[j] = $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.toObject(message.uncommittedFileChanges[j], options); + } + return object; + }; + + /** + * Converts this FetchFileGitStatusesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @instance + * @returns {Object.} JSON object + */ + FetchFileGitStatusesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + FetchFileGitStatusesResponse.UncommittedFileChange = (function() { + + /** + * Properties of an UncommittedFileChange. + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @interface IUncommittedFileChange + * @property {string|null} [path] UncommittedFileChange path + * @property {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.State|null} [state] UncommittedFileChange state + */ + + /** + * Constructs a new UncommittedFileChange. + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @classdesc Represents an UncommittedFileChange. + * @implements IUncommittedFileChange + * @constructor + * @param {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange=} [properties] Properties to set + */ + function UncommittedFileChange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UncommittedFileChange path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @instance + */ + UncommittedFileChange.prototype.path = ""; + + /** + * UncommittedFileChange state. + * @member {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.State} state + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @instance + */ + UncommittedFileChange.prototype.state = 0; + + /** + * Creates a new UncommittedFileChange instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange} UncommittedFileChange instance + */ + UncommittedFileChange.create = function create(properties) { + return new UncommittedFileChange(properties); + }; + + /** + * Encodes the specified UncommittedFileChange message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange} message UncommittedFileChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UncommittedFileChange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + return writer; + }; + + /** + * Encodes the specified UncommittedFileChange message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.IUncommittedFileChange} message UncommittedFileChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UncommittedFileChange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UncommittedFileChange message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange} UncommittedFileChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UncommittedFileChange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.path = reader.string(); + break; + case 2: + message.state = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UncommittedFileChange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange} UncommittedFileChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UncommittedFileChange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UncommittedFileChange message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UncommittedFileChange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates an UncommittedFileChange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange} UncommittedFileChange + */ + UncommittedFileChange.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange) + return object; + var message = new $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange(); + if (object.path != null) + message.path = String(object.path); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ADDED": + case 1: + message.state = 1; + break; + case "DELETED": + case 2: + message.state = 2; + break; + case "MODIFIED": + case 3: + message.state = 3; + break; + case "HAS_CONFLICTS": + case 4: + message.state = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from an UncommittedFileChange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange} message UncommittedFileChange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UncommittedFileChange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.path = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + } + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.State[message.state] : message.state; + return object; + }; + + /** + * Converts this UncommittedFileChange to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @instance + * @returns {Object.} JSON object + */ + UncommittedFileChange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * State enum. + * @name google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ADDED=1 ADDED value + * @property {number} DELETED=2 DELETED value + * @property {number} MODIFIED=3 MODIFIED value + * @property {number} HAS_CONFLICTS=4 HAS_CONFLICTS value + */ + UncommittedFileChange.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADDED"] = 1; + values[valuesById[2] = "DELETED"] = 2; + values[valuesById[3] = "MODIFIED"] = 3; + values[valuesById[4] = "HAS_CONFLICTS"] = 4; + return values; + })(); + + return UncommittedFileChange; + })(); + + return FetchFileGitStatusesResponse; + })(); + + v1beta1.FetchGitAheadBehindRequest = (function() { + + /** + * Properties of a FetchGitAheadBehindRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IFetchGitAheadBehindRequest + * @property {string|null} [name] FetchGitAheadBehindRequest name + * @property {string|null} [remoteBranch] FetchGitAheadBehindRequest remoteBranch + */ + + /** + * Constructs a new FetchGitAheadBehindRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a FetchGitAheadBehindRequest. + * @implements IFetchGitAheadBehindRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest=} [properties] Properties to set + */ + function FetchGitAheadBehindRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchGitAheadBehindRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @instance + */ + FetchGitAheadBehindRequest.prototype.name = ""; + + /** + * FetchGitAheadBehindRequest remoteBranch. + * @member {string} remoteBranch + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @instance + */ + FetchGitAheadBehindRequest.prototype.remoteBranch = ""; + + /** + * Creates a new FetchGitAheadBehindRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest} FetchGitAheadBehindRequest instance + */ + FetchGitAheadBehindRequest.create = function create(properties) { + return new FetchGitAheadBehindRequest(properties); + }; + + /** + * Encodes the specified FetchGitAheadBehindRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest} message FetchGitAheadBehindRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchGitAheadBehindRequest.encode = function encode(message, writer) { + 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.remoteBranch != null && Object.hasOwnProperty.call(message, "remoteBranch")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.remoteBranch); + return writer; + }; + + /** + * Encodes the specified FetchGitAheadBehindRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest} message FetchGitAheadBehindRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchGitAheadBehindRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchGitAheadBehindRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest} FetchGitAheadBehindRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchGitAheadBehindRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.remoteBranch = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchGitAheadBehindRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest} FetchGitAheadBehindRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchGitAheadBehindRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchGitAheadBehindRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchGitAheadBehindRequest.verify = function verify(message) { + if (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.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + if (!$util.isString(message.remoteBranch)) + return "remoteBranch: string expected"; + return null; + }; + + /** + * Creates a FetchGitAheadBehindRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest} FetchGitAheadBehindRequest + */ + FetchGitAheadBehindRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.remoteBranch != null) + message.remoteBranch = String(object.remoteBranch); + return message; + }; + + /** + * Creates a plain object from a FetchGitAheadBehindRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @static + * @param {google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest} message FetchGitAheadBehindRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchGitAheadBehindRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.remoteBranch = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.remoteBranch != null && message.hasOwnProperty("remoteBranch")) + object.remoteBranch = message.remoteBranch; + return object; + }; + + /** + * Converts this FetchGitAheadBehindRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @instance + * @returns {Object.} JSON object + */ + FetchGitAheadBehindRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FetchGitAheadBehindRequest; + })(); + + v1beta1.FetchGitAheadBehindResponse = (function() { + + /** + * Properties of a FetchGitAheadBehindResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IFetchGitAheadBehindResponse + * @property {number|null} [commitsAhead] FetchGitAheadBehindResponse commitsAhead + * @property {number|null} [commitsBehind] FetchGitAheadBehindResponse commitsBehind + */ + + /** + * Constructs a new FetchGitAheadBehindResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a FetchGitAheadBehindResponse. + * @implements IFetchGitAheadBehindResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse=} [properties] Properties to set + */ + function FetchGitAheadBehindResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchGitAheadBehindResponse commitsAhead. + * @member {number} commitsAhead + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @instance + */ + FetchGitAheadBehindResponse.prototype.commitsAhead = 0; + + /** + * FetchGitAheadBehindResponse commitsBehind. + * @member {number} commitsBehind + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @instance + */ + FetchGitAheadBehindResponse.prototype.commitsBehind = 0; + + /** + * Creates a new FetchGitAheadBehindResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse} FetchGitAheadBehindResponse instance + */ + FetchGitAheadBehindResponse.create = function create(properties) { + return new FetchGitAheadBehindResponse(properties); + }; + + /** + * Encodes the specified FetchGitAheadBehindResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse} message FetchGitAheadBehindResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchGitAheadBehindResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.commitsAhead != null && Object.hasOwnProperty.call(message, "commitsAhead")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.commitsAhead); + if (message.commitsBehind != null && Object.hasOwnProperty.call(message, "commitsBehind")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.commitsBehind); + return writer; + }; + + /** + * Encodes the specified FetchGitAheadBehindResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse} message FetchGitAheadBehindResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchGitAheadBehindResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchGitAheadBehindResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse} FetchGitAheadBehindResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchGitAheadBehindResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.commitsAhead = reader.int32(); + break; + case 2: + message.commitsBehind = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchGitAheadBehindResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse} FetchGitAheadBehindResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchGitAheadBehindResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchGitAheadBehindResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchGitAheadBehindResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.commitsAhead != null && message.hasOwnProperty("commitsAhead")) + if (!$util.isInteger(message.commitsAhead)) + return "commitsAhead: integer expected"; + if (message.commitsBehind != null && message.hasOwnProperty("commitsBehind")) + if (!$util.isInteger(message.commitsBehind)) + return "commitsBehind: integer expected"; + return null; + }; + + /** + * Creates a FetchGitAheadBehindResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse} FetchGitAheadBehindResponse + */ + FetchGitAheadBehindResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse(); + if (object.commitsAhead != null) + message.commitsAhead = object.commitsAhead | 0; + if (object.commitsBehind != null) + message.commitsBehind = object.commitsBehind | 0; + return message; + }; + + /** + * Creates a plain object from a FetchGitAheadBehindResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @static + * @param {google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse} message FetchGitAheadBehindResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchGitAheadBehindResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.commitsAhead = 0; + object.commitsBehind = 0; + } + if (message.commitsAhead != null && message.hasOwnProperty("commitsAhead")) + object.commitsAhead = message.commitsAhead; + if (message.commitsBehind != null && message.hasOwnProperty("commitsBehind")) + object.commitsBehind = message.commitsBehind; + return object; + }; + + /** + * Converts this FetchGitAheadBehindResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @instance + * @returns {Object.} JSON object + */ + FetchGitAheadBehindResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FetchGitAheadBehindResponse; + })(); + + v1beta1.CommitWorkspaceChangesRequest = (function() { + + /** + * Properties of a CommitWorkspaceChangesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface ICommitWorkspaceChangesRequest + * @property {string|null} [name] CommitWorkspaceChangesRequest name + * @property {google.cloud.dataform.v1beta1.ICommitAuthor|null} [author] CommitWorkspaceChangesRequest author + * @property {string|null} [commitMessage] CommitWorkspaceChangesRequest commitMessage + * @property {Array.|null} [paths] CommitWorkspaceChangesRequest paths + */ + + /** + * Constructs a new CommitWorkspaceChangesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a CommitWorkspaceChangesRequest. + * @implements ICommitWorkspaceChangesRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest=} [properties] Properties to set + */ + function CommitWorkspaceChangesRequest(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]]; + } + + /** + * CommitWorkspaceChangesRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @instance + */ + CommitWorkspaceChangesRequest.prototype.name = ""; + + /** + * CommitWorkspaceChangesRequest author. + * @member {google.cloud.dataform.v1beta1.ICommitAuthor|null|undefined} author + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @instance + */ + CommitWorkspaceChangesRequest.prototype.author = null; + + /** + * CommitWorkspaceChangesRequest commitMessage. + * @member {string} commitMessage + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @instance + */ + CommitWorkspaceChangesRequest.prototype.commitMessage = ""; + + /** + * CommitWorkspaceChangesRequest paths. + * @member {Array.} paths + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @instance + */ + CommitWorkspaceChangesRequest.prototype.paths = $util.emptyArray; + + /** + * Creates a new CommitWorkspaceChangesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest} CommitWorkspaceChangesRequest instance + */ + CommitWorkspaceChangesRequest.create = function create(properties) { + return new CommitWorkspaceChangesRequest(properties); + }; + + /** + * Encodes the specified CommitWorkspaceChangesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest} message CommitWorkspaceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitWorkspaceChangesRequest.encode = function encode(message, writer) { + 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.commitMessage != null && Object.hasOwnProperty.call(message, "commitMessage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.commitMessage); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.paths[i]); + if (message.author != null && Object.hasOwnProperty.call(message, "author")) + $root.google.cloud.dataform.v1beta1.CommitAuthor.encode(message.author, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CommitWorkspaceChangesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest} message CommitWorkspaceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitWorkspaceChangesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommitWorkspaceChangesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest} CommitWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitWorkspaceChangesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 4: + message.author = $root.google.cloud.dataform.v1beta1.CommitAuthor.decode(reader, reader.uint32()); + break; + case 2: + message.commitMessage = reader.string(); + break; + case 3: + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommitWorkspaceChangesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest} CommitWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitWorkspaceChangesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommitWorkspaceChangesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommitWorkspaceChangesRequest.verify = function verify(message) { + if (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.author != null && message.hasOwnProperty("author")) { + var error = $root.google.cloud.dataform.v1beta1.CommitAuthor.verify(message.author); + if (error) + return "author." + error; + } + if (message.commitMessage != null && message.hasOwnProperty("commitMessage")) + if (!$util.isString(message.commitMessage)) + return "commitMessage: 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 CommitWorkspaceChangesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest} CommitWorkspaceChangesRequest + */ + CommitWorkspaceChangesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.author != null) { + if (typeof object.author !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest.author: object expected"); + message.author = $root.google.cloud.dataform.v1beta1.CommitAuthor.fromObject(object.author); + } + if (object.commitMessage != null) + message.commitMessage = String(object.commitMessage); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest.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 CommitWorkspaceChangesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest} message CommitWorkspaceChangesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommitWorkspaceChangesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (options.defaults) { + object.name = ""; + object.commitMessage = ""; + object.author = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.commitMessage != null && message.hasOwnProperty("commitMessage")) + object.commitMessage = message.commitMessage; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + if (message.author != null && message.hasOwnProperty("author")) + object.author = $root.google.cloud.dataform.v1beta1.CommitAuthor.toObject(message.author, options); + return object; + }; + + /** + * Converts this CommitWorkspaceChangesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @instance + * @returns {Object.} JSON object + */ + CommitWorkspaceChangesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommitWorkspaceChangesRequest; + })(); + + v1beta1.ResetWorkspaceChangesRequest = (function() { + + /** + * Properties of a ResetWorkspaceChangesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IResetWorkspaceChangesRequest + * @property {string|null} [name] ResetWorkspaceChangesRequest name + * @property {Array.|null} [paths] ResetWorkspaceChangesRequest paths + * @property {boolean|null} [clean] ResetWorkspaceChangesRequest clean + */ + + /** + * Constructs a new ResetWorkspaceChangesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ResetWorkspaceChangesRequest. + * @implements IResetWorkspaceChangesRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest=} [properties] Properties to set + */ + function ResetWorkspaceChangesRequest(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]]; + } + + /** + * ResetWorkspaceChangesRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @instance + */ + ResetWorkspaceChangesRequest.prototype.name = ""; + + /** + * ResetWorkspaceChangesRequest paths. + * @member {Array.} paths + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @instance + */ + ResetWorkspaceChangesRequest.prototype.paths = $util.emptyArray; + + /** + * ResetWorkspaceChangesRequest clean. + * @member {boolean} clean + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @instance + */ + ResetWorkspaceChangesRequest.prototype.clean = false; + + /** + * Creates a new ResetWorkspaceChangesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest} ResetWorkspaceChangesRequest instance + */ + ResetWorkspaceChangesRequest.create = function create(properties) { + return new ResetWorkspaceChangesRequest(properties); + }; + + /** + * Encodes the specified ResetWorkspaceChangesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest} message ResetWorkspaceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResetWorkspaceChangesRequest.encode = function encode(message, writer) { + 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.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]); + if (message.clean != null && Object.hasOwnProperty.call(message, "clean")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.clean); + return writer; + }; + + /** + * Encodes the specified ResetWorkspaceChangesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest} message ResetWorkspaceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResetWorkspaceChangesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResetWorkspaceChangesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest} ResetWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResetWorkspaceChangesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + case 3: + message.clean = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResetWorkspaceChangesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest} ResetWorkspaceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResetWorkspaceChangesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResetWorkspaceChangesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResetWorkspaceChangesRequest.verify = function verify(message) { + if (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.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"; + } + if (message.clean != null && message.hasOwnProperty("clean")) + if (typeof message.clean !== "boolean") + return "clean: boolean expected"; + return null; + }; + + /** + * Creates a ResetWorkspaceChangesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest} ResetWorkspaceChangesRequest + */ + ResetWorkspaceChangesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + if (object.clean != null) + message.clean = Boolean(object.clean); + return message; + }; + + /** + * Creates a plain object from a ResetWorkspaceChangesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @static + * @param {google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest} message ResetWorkspaceChangesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResetWorkspaceChangesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (options.defaults) { + object.name = ""; + object.clean = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + if (message.clean != null && message.hasOwnProperty("clean")) + object.clean = message.clean; + return object; + }; + + /** + * Converts this ResetWorkspaceChangesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @instance + * @returns {Object.} JSON object + */ + ResetWorkspaceChangesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResetWorkspaceChangesRequest; + })(); + + v1beta1.FetchFileDiffRequest = (function() { + + /** + * Properties of a FetchFileDiffRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IFetchFileDiffRequest + * @property {string|null} [workspace] FetchFileDiffRequest workspace + * @property {string|null} [path] FetchFileDiffRequest path + */ + + /** + * Constructs a new FetchFileDiffRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a FetchFileDiffRequest. + * @implements IFetchFileDiffRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffRequest=} [properties] Properties to set + */ + function FetchFileDiffRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchFileDiffRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @instance + */ + FetchFileDiffRequest.prototype.workspace = ""; + + /** + * FetchFileDiffRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @instance + */ + FetchFileDiffRequest.prototype.path = ""; + + /** + * Creates a new FetchFileDiffRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.FetchFileDiffRequest} FetchFileDiffRequest instance + */ + FetchFileDiffRequest.create = function create(properties) { + return new FetchFileDiffRequest(properties); + }; + + /** + * Encodes the specified FetchFileDiffRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileDiffRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffRequest} message FetchFileDiffRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileDiffRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified FetchFileDiffRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileDiffRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffRequest} message FetchFileDiffRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileDiffRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchFileDiffRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.FetchFileDiffRequest} FetchFileDiffRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileDiffRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.FetchFileDiffRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchFileDiffRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.FetchFileDiffRequest} FetchFileDiffRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileDiffRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchFileDiffRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchFileDiffRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a FetchFileDiffRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.FetchFileDiffRequest} FetchFileDiffRequest + */ + FetchFileDiffRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.FetchFileDiffRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.FetchFileDiffRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a FetchFileDiffRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @static + * @param {google.cloud.dataform.v1beta1.FetchFileDiffRequest} message FetchFileDiffRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchFileDiffRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this FetchFileDiffRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @instance + * @returns {Object.} JSON object + */ + FetchFileDiffRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FetchFileDiffRequest; + })(); + + v1beta1.FetchFileDiffResponse = (function() { + + /** + * Properties of a FetchFileDiffResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IFetchFileDiffResponse + * @property {string|null} [formattedDiff] FetchFileDiffResponse formattedDiff + */ + + /** + * Constructs a new FetchFileDiffResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a FetchFileDiffResponse. + * @implements IFetchFileDiffResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffResponse=} [properties] Properties to set + */ + function FetchFileDiffResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchFileDiffResponse formattedDiff. + * @member {string} formattedDiff + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @instance + */ + FetchFileDiffResponse.prototype.formattedDiff = ""; + + /** + * Creates a new FetchFileDiffResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.FetchFileDiffResponse} FetchFileDiffResponse instance + */ + FetchFileDiffResponse.create = function create(properties) { + return new FetchFileDiffResponse(properties); + }; + + /** + * Encodes the specified FetchFileDiffResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileDiffResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffResponse} message FetchFileDiffResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileDiffResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.formattedDiff != null && Object.hasOwnProperty.call(message, "formattedDiff")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.formattedDiff); + return writer; + }; + + /** + * Encodes the specified FetchFileDiffResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.FetchFileDiffResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @static + * @param {google.cloud.dataform.v1beta1.IFetchFileDiffResponse} message FetchFileDiffResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFileDiffResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchFileDiffResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.FetchFileDiffResponse} FetchFileDiffResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileDiffResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.FetchFileDiffResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.formattedDiff = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchFileDiffResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.FetchFileDiffResponse} FetchFileDiffResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFileDiffResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchFileDiffResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchFileDiffResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.formattedDiff != null && message.hasOwnProperty("formattedDiff")) + if (!$util.isString(message.formattedDiff)) + return "formattedDiff: string expected"; + return null; + }; + + /** + * Creates a FetchFileDiffResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.FetchFileDiffResponse} FetchFileDiffResponse + */ + FetchFileDiffResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.FetchFileDiffResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.FetchFileDiffResponse(); + if (object.formattedDiff != null) + message.formattedDiff = String(object.formattedDiff); + return message; + }; + + /** + * Creates a plain object from a FetchFileDiffResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @static + * @param {google.cloud.dataform.v1beta1.FetchFileDiffResponse} message FetchFileDiffResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchFileDiffResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.formattedDiff = ""; + if (message.formattedDiff != null && message.hasOwnProperty("formattedDiff")) + object.formattedDiff = message.formattedDiff; + return object; + }; + + /** + * Converts this FetchFileDiffResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @instance + * @returns {Object.} JSON object + */ + FetchFileDiffResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FetchFileDiffResponse; + })(); + + v1beta1.QueryDirectoryContentsRequest = (function() { + + /** + * Properties of a QueryDirectoryContentsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IQueryDirectoryContentsRequest + * @property {string|null} [workspace] QueryDirectoryContentsRequest workspace + * @property {string|null} [path] QueryDirectoryContentsRequest path + * @property {number|null} [pageSize] QueryDirectoryContentsRequest pageSize + * @property {string|null} [pageToken] QueryDirectoryContentsRequest pageToken + */ + + /** + * Constructs a new QueryDirectoryContentsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a QueryDirectoryContentsRequest. + * @implements IQueryDirectoryContentsRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest=} [properties] Properties to set + */ + function QueryDirectoryContentsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDirectoryContentsRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @instance + */ + QueryDirectoryContentsRequest.prototype.workspace = ""; + + /** + * QueryDirectoryContentsRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @instance + */ + QueryDirectoryContentsRequest.prototype.path = ""; + + /** + * QueryDirectoryContentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @instance + */ + QueryDirectoryContentsRequest.prototype.pageSize = 0; + + /** + * QueryDirectoryContentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @instance + */ + QueryDirectoryContentsRequest.prototype.pageToken = ""; + + /** + * Creates a new QueryDirectoryContentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest} QueryDirectoryContentsRequest instance + */ + QueryDirectoryContentsRequest.create = function create(properties) { + return new QueryDirectoryContentsRequest(properties); + }; + + /** + * Encodes the specified QueryDirectoryContentsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest} message QueryDirectoryContentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDirectoryContentsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + 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); + return writer; + }; + + /** + * Encodes the specified QueryDirectoryContentsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest} message QueryDirectoryContentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDirectoryContentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDirectoryContentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest} QueryDirectoryContentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDirectoryContentsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + case 4: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDirectoryContentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest} QueryDirectoryContentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDirectoryContentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDirectoryContentsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDirectoryContentsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: 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 QueryDirectoryContentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest} QueryDirectoryContentsRequest + */ + QueryDirectoryContentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + 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 QueryDirectoryContentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @static + * @param {google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest} message QueryDirectoryContentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDirectoryContentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this QueryDirectoryContentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryDirectoryContentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDirectoryContentsRequest; + })(); + + v1beta1.QueryDirectoryContentsResponse = (function() { + + /** + * Properties of a QueryDirectoryContentsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IQueryDirectoryContentsResponse + * @property {Array.|null} [directoryEntries] QueryDirectoryContentsResponse directoryEntries + * @property {string|null} [nextPageToken] QueryDirectoryContentsResponse nextPageToken + */ + + /** + * Constructs a new QueryDirectoryContentsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a QueryDirectoryContentsResponse. + * @implements IQueryDirectoryContentsResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse=} [properties] Properties to set + */ + function QueryDirectoryContentsResponse(properties) { + this.directoryEntries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDirectoryContentsResponse directoryEntries. + * @member {Array.} directoryEntries + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @instance + */ + QueryDirectoryContentsResponse.prototype.directoryEntries = $util.emptyArray; + + /** + * QueryDirectoryContentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @instance + */ + QueryDirectoryContentsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new QueryDirectoryContentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse} QueryDirectoryContentsResponse instance + */ + QueryDirectoryContentsResponse.create = function create(properties) { + return new QueryDirectoryContentsResponse(properties); + }; + + /** + * Encodes the specified QueryDirectoryContentsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse} message QueryDirectoryContentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDirectoryContentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.directoryEntries != null && message.directoryEntries.length) + for (var i = 0; i < message.directoryEntries.length; ++i) + $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry.encode(message.directoryEntries[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 QueryDirectoryContentsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse} message QueryDirectoryContentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDirectoryContentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDirectoryContentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse} QueryDirectoryContentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDirectoryContentsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.directoryEntries && message.directoryEntries.length)) + message.directoryEntries = []; + message.directoryEntries.push($root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDirectoryContentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse} QueryDirectoryContentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDirectoryContentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDirectoryContentsResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDirectoryContentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.directoryEntries != null && message.hasOwnProperty("directoryEntries")) { + if (!Array.isArray(message.directoryEntries)) + return "directoryEntries: array expected"; + for (var i = 0; i < message.directoryEntries.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry.verify(message.directoryEntries[i]); + if (error) + return "directoryEntries." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a QueryDirectoryContentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse} QueryDirectoryContentsResponse + */ + QueryDirectoryContentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse(); + if (object.directoryEntries) { + if (!Array.isArray(object.directoryEntries)) + throw TypeError(".google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.directoryEntries: array expected"); + message.directoryEntries = []; + for (var i = 0; i < object.directoryEntries.length; ++i) { + if (typeof object.directoryEntries[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.directoryEntries: object expected"); + message.directoryEntries[i] = $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry.fromObject(object.directoryEntries[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a QueryDirectoryContentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @static + * @param {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse} message QueryDirectoryContentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDirectoryContentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.directoryEntries = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.directoryEntries && message.directoryEntries.length) { + object.directoryEntries = []; + for (var j = 0; j < message.directoryEntries.length; ++j) + object.directoryEntries[j] = $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry.toObject(message.directoryEntries[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this QueryDirectoryContentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryDirectoryContentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + QueryDirectoryContentsResponse.DirectoryEntry = (function() { + + /** + * Properties of a DirectoryEntry. + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @interface IDirectoryEntry + * @property {string|null} [file] DirectoryEntry file + * @property {string|null} [directory] DirectoryEntry directory + */ + + /** + * Constructs a new DirectoryEntry. + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @classdesc Represents a DirectoryEntry. + * @implements IDirectoryEntry + * @constructor + * @param {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry=} [properties] Properties to set + */ + function DirectoryEntry(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DirectoryEntry file. + * @member {string|null|undefined} file + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @instance + */ + DirectoryEntry.prototype.file = null; + + /** + * DirectoryEntry directory. + * @member {string|null|undefined} directory + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @instance + */ + DirectoryEntry.prototype.directory = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DirectoryEntry entry. + * @member {"file"|"directory"|undefined} entry + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @instance + */ + Object.defineProperty(DirectoryEntry.prototype, "entry", { + get: $util.oneOfGetter($oneOfFields = ["file", "directory"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DirectoryEntry instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry} DirectoryEntry instance + */ + DirectoryEntry.create = function create(properties) { + return new DirectoryEntry(properties); + }; + + /** + * Encodes the specified DirectoryEntry message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry} message DirectoryEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DirectoryEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && Object.hasOwnProperty.call(message, "file")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.file); + if (message.directory != null && Object.hasOwnProperty.call(message, "directory")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.directory); + return writer; + }; + + /** + * Encodes the specified DirectoryEntry message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry} message DirectoryEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DirectoryEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DirectoryEntry message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry} DirectoryEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DirectoryEntry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.file = reader.string(); + break; + case 2: + message.directory = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DirectoryEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry} DirectoryEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DirectoryEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DirectoryEntry message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DirectoryEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.file != null && message.hasOwnProperty("file")) { + properties.entry = 1; + if (!$util.isString(message.file)) + return "file: string expected"; + } + if (message.directory != null && message.hasOwnProperty("directory")) { + if (properties.entry === 1) + return "entry: multiple values"; + properties.entry = 1; + if (!$util.isString(message.directory)) + return "directory: string expected"; + } + return null; + }; + + /** + * Creates a DirectoryEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry} DirectoryEntry + */ + DirectoryEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry) + return object; + var message = new $root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry(); + if (object.file != null) + message.file = String(object.file); + if (object.directory != null) + message.directory = String(object.directory); + return message; + }; + + /** + * Creates a plain object from a DirectoryEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry} message DirectoryEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DirectoryEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.file != null && message.hasOwnProperty("file")) { + object.file = message.file; + if (options.oneofs) + object.entry = "file"; + } + if (message.directory != null && message.hasOwnProperty("directory")) { + object.directory = message.directory; + if (options.oneofs) + object.entry = "directory"; + } + return object; + }; + + /** + * Converts this DirectoryEntry to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @instance + * @returns {Object.} JSON object + */ + DirectoryEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DirectoryEntry; + })(); + + return QueryDirectoryContentsResponse; + })(); + + v1beta1.MakeDirectoryRequest = (function() { + + /** + * Properties of a MakeDirectoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IMakeDirectoryRequest + * @property {string|null} [workspace] MakeDirectoryRequest workspace + * @property {string|null} [path] MakeDirectoryRequest path + */ + + /** + * Constructs a new MakeDirectoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a MakeDirectoryRequest. + * @implements IMakeDirectoryRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryRequest=} [properties] Properties to set + */ + function MakeDirectoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MakeDirectoryRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @instance + */ + MakeDirectoryRequest.prototype.workspace = ""; + + /** + * MakeDirectoryRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @instance + */ + MakeDirectoryRequest.prototype.path = ""; + + /** + * Creates a new MakeDirectoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.MakeDirectoryRequest} MakeDirectoryRequest instance + */ + MakeDirectoryRequest.create = function create(properties) { + return new MakeDirectoryRequest(properties); + }; + + /** + * Encodes the specified MakeDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.MakeDirectoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryRequest} message MakeDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MakeDirectoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified MakeDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MakeDirectoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryRequest} message MakeDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MakeDirectoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MakeDirectoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.MakeDirectoryRequest} MakeDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MakeDirectoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.MakeDirectoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MakeDirectoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.MakeDirectoryRequest} MakeDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MakeDirectoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MakeDirectoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MakeDirectoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a MakeDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.MakeDirectoryRequest} MakeDirectoryRequest + */ + MakeDirectoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.MakeDirectoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.MakeDirectoryRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a MakeDirectoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.MakeDirectoryRequest} message MakeDirectoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MakeDirectoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this MakeDirectoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @instance + * @returns {Object.} JSON object + */ + MakeDirectoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MakeDirectoryRequest; + })(); + + v1beta1.MakeDirectoryResponse = (function() { + + /** + * Properties of a MakeDirectoryResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IMakeDirectoryResponse + */ + + /** + * Constructs a new MakeDirectoryResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a MakeDirectoryResponse. + * @implements IMakeDirectoryResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryResponse=} [properties] Properties to set + */ + function MakeDirectoryResponse(properties) { + if (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 MakeDirectoryResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryResponse + * @static + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.MakeDirectoryResponse} MakeDirectoryResponse instance + */ + MakeDirectoryResponse.create = function create(properties) { + return new MakeDirectoryResponse(properties); + }; + + /** + * Encodes the specified MakeDirectoryResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.MakeDirectoryResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryResponse + * @static + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryResponse} message MakeDirectoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MakeDirectoryResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MakeDirectoryResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MakeDirectoryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryResponse + * @static + * @param {google.cloud.dataform.v1beta1.IMakeDirectoryResponse} message MakeDirectoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MakeDirectoryResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MakeDirectoryResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.MakeDirectoryResponse} MakeDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MakeDirectoryResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.MakeDirectoryResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MakeDirectoryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.MakeDirectoryResponse} MakeDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MakeDirectoryResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MakeDirectoryResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MakeDirectoryResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MakeDirectoryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.MakeDirectoryResponse} MakeDirectoryResponse + */ + MakeDirectoryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.MakeDirectoryResponse) + return object; + return new $root.google.cloud.dataform.v1beta1.MakeDirectoryResponse(); + }; + + /** + * Creates a plain object from a MakeDirectoryResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryResponse + * @static + * @param {google.cloud.dataform.v1beta1.MakeDirectoryResponse} message MakeDirectoryResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MakeDirectoryResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MakeDirectoryResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryResponse + * @instance + * @returns {Object.} JSON object + */ + MakeDirectoryResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MakeDirectoryResponse; + })(); + + v1beta1.RemoveDirectoryRequest = (function() { + + /** + * Properties of a RemoveDirectoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IRemoveDirectoryRequest + * @property {string|null} [workspace] RemoveDirectoryRequest workspace + * @property {string|null} [path] RemoveDirectoryRequest path + */ + + /** + * Constructs a new RemoveDirectoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a RemoveDirectoryRequest. + * @implements IRemoveDirectoryRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IRemoveDirectoryRequest=} [properties] Properties to set + */ + function RemoveDirectoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RemoveDirectoryRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @instance + */ + RemoveDirectoryRequest.prototype.workspace = ""; + + /** + * RemoveDirectoryRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @instance + */ + RemoveDirectoryRequest.prototype.path = ""; + + /** + * Creates a new RemoveDirectoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IRemoveDirectoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.RemoveDirectoryRequest} RemoveDirectoryRequest instance + */ + RemoveDirectoryRequest.create = function create(properties) { + return new RemoveDirectoryRequest(properties); + }; + + /** + * Encodes the specified RemoveDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.RemoveDirectoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IRemoveDirectoryRequest} message RemoveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveDirectoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified RemoveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.RemoveDirectoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IRemoveDirectoryRequest} message RemoveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveDirectoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemoveDirectoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.RemoveDirectoryRequest} RemoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveDirectoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.RemoveDirectoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RemoveDirectoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.RemoveDirectoryRequest} RemoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveDirectoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemoveDirectoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemoveDirectoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a RemoveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.RemoveDirectoryRequest} RemoveDirectoryRequest + */ + RemoveDirectoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.RemoveDirectoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.RemoveDirectoryRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a RemoveDirectoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.RemoveDirectoryRequest} message RemoveDirectoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemoveDirectoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this RemoveDirectoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @instance + * @returns {Object.} JSON object + */ + RemoveDirectoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RemoveDirectoryRequest; + })(); + + v1beta1.MoveDirectoryRequest = (function() { + + /** + * Properties of a MoveDirectoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IMoveDirectoryRequest + * @property {string|null} [workspace] MoveDirectoryRequest workspace + * @property {string|null} [path] MoveDirectoryRequest path + * @property {string|null} [newPath] MoveDirectoryRequest newPath + */ + + /** + * Constructs a new MoveDirectoryRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a MoveDirectoryRequest. + * @implements IMoveDirectoryRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryRequest=} [properties] Properties to set + */ + function MoveDirectoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MoveDirectoryRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @instance + */ + MoveDirectoryRequest.prototype.workspace = ""; + + /** + * MoveDirectoryRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @instance + */ + MoveDirectoryRequest.prototype.path = ""; + + /** + * MoveDirectoryRequest newPath. + * @member {string} newPath + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @instance + */ + MoveDirectoryRequest.prototype.newPath = ""; + + /** + * Creates a new MoveDirectoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.MoveDirectoryRequest} MoveDirectoryRequest instance + */ + MoveDirectoryRequest.create = function create(properties) { + return new MoveDirectoryRequest(properties); + }; + + /** + * Encodes the specified MoveDirectoryRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveDirectoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryRequest} message MoveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveDirectoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.newPath != null && Object.hasOwnProperty.call(message, "newPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.newPath); + return writer; + }; + + /** + * Encodes the specified MoveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveDirectoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryRequest} message MoveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveDirectoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MoveDirectoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.MoveDirectoryRequest} MoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveDirectoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.MoveDirectoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + case 3: + message.newPath = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MoveDirectoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.MoveDirectoryRequest} MoveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveDirectoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MoveDirectoryRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MoveDirectoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.newPath != null && message.hasOwnProperty("newPath")) + if (!$util.isString(message.newPath)) + return "newPath: string expected"; + return null; + }; + + /** + * Creates a MoveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.MoveDirectoryRequest} MoveDirectoryRequest + */ + MoveDirectoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.MoveDirectoryRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.MoveDirectoryRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + if (object.newPath != null) + message.newPath = String(object.newPath); + return message; + }; + + /** + * Creates a plain object from a MoveDirectoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @static + * @param {google.cloud.dataform.v1beta1.MoveDirectoryRequest} message MoveDirectoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MoveDirectoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + object.newPath = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.newPath != null && message.hasOwnProperty("newPath")) + object.newPath = message.newPath; + return object; + }; + + /** + * Converts this MoveDirectoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @instance + * @returns {Object.} JSON object + */ + MoveDirectoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MoveDirectoryRequest; + })(); + + v1beta1.MoveDirectoryResponse = (function() { + + /** + * Properties of a MoveDirectoryResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IMoveDirectoryResponse + */ + + /** + * Constructs a new MoveDirectoryResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a MoveDirectoryResponse. + * @implements IMoveDirectoryResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryResponse=} [properties] Properties to set + */ + function MoveDirectoryResponse(properties) { + if (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 MoveDirectoryResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryResponse + * @static + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.MoveDirectoryResponse} MoveDirectoryResponse instance + */ + MoveDirectoryResponse.create = function create(properties) { + return new MoveDirectoryResponse(properties); + }; + + /** + * Encodes the specified MoveDirectoryResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveDirectoryResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryResponse + * @static + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryResponse} message MoveDirectoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveDirectoryResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MoveDirectoryResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveDirectoryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryResponse + * @static + * @param {google.cloud.dataform.v1beta1.IMoveDirectoryResponse} message MoveDirectoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveDirectoryResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MoveDirectoryResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.MoveDirectoryResponse} MoveDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveDirectoryResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.MoveDirectoryResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MoveDirectoryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.MoveDirectoryResponse} MoveDirectoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveDirectoryResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MoveDirectoryResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MoveDirectoryResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MoveDirectoryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.MoveDirectoryResponse} MoveDirectoryResponse + */ + MoveDirectoryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.MoveDirectoryResponse) + return object; + return new $root.google.cloud.dataform.v1beta1.MoveDirectoryResponse(); + }; + + /** + * Creates a plain object from a MoveDirectoryResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryResponse + * @static + * @param {google.cloud.dataform.v1beta1.MoveDirectoryResponse} message MoveDirectoryResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MoveDirectoryResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MoveDirectoryResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryResponse + * @instance + * @returns {Object.} JSON object + */ + MoveDirectoryResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MoveDirectoryResponse; + })(); + + v1beta1.ReadFileRequest = (function() { + + /** + * Properties of a ReadFileRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IReadFileRequest + * @property {string|null} [workspace] ReadFileRequest workspace + * @property {string|null} [path] ReadFileRequest path + */ + + /** + * Constructs a new ReadFileRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ReadFileRequest. + * @implements IReadFileRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IReadFileRequest=} [properties] Properties to set + */ + function ReadFileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReadFileRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @instance + */ + ReadFileRequest.prototype.workspace = ""; + + /** + * ReadFileRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @instance + */ + ReadFileRequest.prototype.path = ""; + + /** + * Creates a new ReadFileRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IReadFileRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ReadFileRequest} ReadFileRequest instance + */ + ReadFileRequest.create = function create(properties) { + return new ReadFileRequest(properties); + }; + + /** + * Encodes the specified ReadFileRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ReadFileRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IReadFileRequest} message ReadFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadFileRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified ReadFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ReadFileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IReadFileRequest} message ReadFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadFileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReadFileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ReadFileRequest} ReadFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadFileRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ReadFileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReadFileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ReadFileRequest} ReadFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadFileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReadFileRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReadFileRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a ReadFileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ReadFileRequest} ReadFileRequest + */ + ReadFileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ReadFileRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ReadFileRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a ReadFileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.ReadFileRequest} message ReadFileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReadFileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this ReadFileRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @instance + * @returns {Object.} JSON object + */ + ReadFileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReadFileRequest; + })(); + + v1beta1.ReadFileResponse = (function() { + + /** + * Properties of a ReadFileResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IReadFileResponse + * @property {Uint8Array|null} [fileContents] ReadFileResponse fileContents + */ + + /** + * Constructs a new ReadFileResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ReadFileResponse. + * @implements IReadFileResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IReadFileResponse=} [properties] Properties to set + */ + function ReadFileResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReadFileResponse fileContents. + * @member {Uint8Array} fileContents + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @instance + */ + ReadFileResponse.prototype.fileContents = $util.newBuffer([]); + + /** + * Creates a new ReadFileResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.IReadFileResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ReadFileResponse} ReadFileResponse instance + */ + ReadFileResponse.create = function create(properties) { + return new ReadFileResponse(properties); + }; + + /** + * Encodes the specified ReadFileResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ReadFileResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.IReadFileResponse} message ReadFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadFileResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fileContents != null && Object.hasOwnProperty.call(message, "fileContents")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.fileContents); + return writer; + }; + + /** + * Encodes the specified ReadFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ReadFileResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.IReadFileResponse} message ReadFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadFileResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReadFileResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ReadFileResponse} ReadFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadFileResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ReadFileResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.fileContents = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReadFileResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ReadFileResponse} ReadFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadFileResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReadFileResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReadFileResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fileContents != null && message.hasOwnProperty("fileContents")) + if (!(message.fileContents && typeof message.fileContents.length === "number" || $util.isString(message.fileContents))) + return "fileContents: buffer expected"; + return null; + }; + + /** + * Creates a ReadFileResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ReadFileResponse} ReadFileResponse + */ + ReadFileResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ReadFileResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ReadFileResponse(); + if (object.fileContents != null) + if (typeof object.fileContents === "string") + $util.base64.decode(object.fileContents, message.fileContents = $util.newBuffer($util.base64.length(object.fileContents)), 0); + else if (object.fileContents.length) + message.fileContents = object.fileContents; + return message; + }; + + /** + * Creates a plain object from a ReadFileResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.ReadFileResponse} message ReadFileResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReadFileResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.fileContents = ""; + else { + object.fileContents = []; + if (options.bytes !== Array) + object.fileContents = $util.newBuffer(object.fileContents); + } + if (message.fileContents != null && message.hasOwnProperty("fileContents")) + object.fileContents = options.bytes === String ? $util.base64.encode(message.fileContents, 0, message.fileContents.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileContents) : message.fileContents; + return object; + }; + + /** + * Converts this ReadFileResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @instance + * @returns {Object.} JSON object + */ + ReadFileResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReadFileResponse; + })(); + + v1beta1.RemoveFileRequest = (function() { + + /** + * Properties of a RemoveFileRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IRemoveFileRequest + * @property {string|null} [workspace] RemoveFileRequest workspace + * @property {string|null} [path] RemoveFileRequest path + */ + + /** + * Constructs a new RemoveFileRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a RemoveFileRequest. + * @implements IRemoveFileRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IRemoveFileRequest=} [properties] Properties to set + */ + function RemoveFileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RemoveFileRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @instance + */ + RemoveFileRequest.prototype.workspace = ""; + + /** + * RemoveFileRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @instance + */ + RemoveFileRequest.prototype.path = ""; + + /** + * Creates a new RemoveFileRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IRemoveFileRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.RemoveFileRequest} RemoveFileRequest instance + */ + RemoveFileRequest.create = function create(properties) { + return new RemoveFileRequest(properties); + }; + + /** + * Encodes the specified RemoveFileRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.RemoveFileRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IRemoveFileRequest} message RemoveFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveFileRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified RemoveFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.RemoveFileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IRemoveFileRequest} message RemoveFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveFileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemoveFileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.RemoveFileRequest} RemoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveFileRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.RemoveFileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RemoveFileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.RemoveFileRequest} RemoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveFileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemoveFileRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemoveFileRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a RemoveFileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.RemoveFileRequest} RemoveFileRequest + */ + RemoveFileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.RemoveFileRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.RemoveFileRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a RemoveFileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.RemoveFileRequest} message RemoveFileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemoveFileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this RemoveFileRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @instance + * @returns {Object.} JSON object + */ + RemoveFileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RemoveFileRequest; + })(); + + v1beta1.MoveFileRequest = (function() { + + /** + * Properties of a MoveFileRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IMoveFileRequest + * @property {string|null} [workspace] MoveFileRequest workspace + * @property {string|null} [path] MoveFileRequest path + * @property {string|null} [newPath] MoveFileRequest newPath + */ + + /** + * Constructs a new MoveFileRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a MoveFileRequest. + * @implements IMoveFileRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IMoveFileRequest=} [properties] Properties to set + */ + function MoveFileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MoveFileRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @instance + */ + MoveFileRequest.prototype.workspace = ""; + + /** + * MoveFileRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @instance + */ + MoveFileRequest.prototype.path = ""; + + /** + * MoveFileRequest newPath. + * @member {string} newPath + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @instance + */ + MoveFileRequest.prototype.newPath = ""; + + /** + * Creates a new MoveFileRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IMoveFileRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.MoveFileRequest} MoveFileRequest instance + */ + MoveFileRequest.create = function create(properties) { + return new MoveFileRequest(properties); + }; + + /** + * Encodes the specified MoveFileRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveFileRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IMoveFileRequest} message MoveFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveFileRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.newPath != null && Object.hasOwnProperty.call(message, "newPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.newPath); + return writer; + }; + + /** + * Encodes the specified MoveFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveFileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IMoveFileRequest} message MoveFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveFileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MoveFileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.MoveFileRequest} MoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveFileRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.MoveFileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + case 3: + message.newPath = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MoveFileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.MoveFileRequest} MoveFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveFileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MoveFileRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MoveFileRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.newPath != null && message.hasOwnProperty("newPath")) + if (!$util.isString(message.newPath)) + return "newPath: string expected"; + return null; + }; + + /** + * Creates a MoveFileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.MoveFileRequest} MoveFileRequest + */ + MoveFileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.MoveFileRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.MoveFileRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + if (object.newPath != null) + message.newPath = String(object.newPath); + return message; + }; + + /** + * Creates a plain object from a MoveFileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.MoveFileRequest} message MoveFileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MoveFileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + object.newPath = ""; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.newPath != null && message.hasOwnProperty("newPath")) + object.newPath = message.newPath; + return object; + }; + + /** + * Converts this MoveFileRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @instance + * @returns {Object.} JSON object + */ + MoveFileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MoveFileRequest; + })(); + + v1beta1.MoveFileResponse = (function() { + + /** + * Properties of a MoveFileResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IMoveFileResponse + */ + + /** + * Constructs a new MoveFileResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a MoveFileResponse. + * @implements IMoveFileResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IMoveFileResponse=} [properties] Properties to set + */ + function MoveFileResponse(properties) { + if (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 MoveFileResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.MoveFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.IMoveFileResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.MoveFileResponse} MoveFileResponse instance + */ + MoveFileResponse.create = function create(properties) { + return new MoveFileResponse(properties); + }; + + /** + * Encodes the specified MoveFileResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveFileResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.MoveFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.IMoveFileResponse} message MoveFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveFileResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MoveFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.MoveFileResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.MoveFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.IMoveFileResponse} message MoveFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MoveFileResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MoveFileResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.MoveFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.MoveFileResponse} MoveFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveFileResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.MoveFileResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MoveFileResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.MoveFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.MoveFileResponse} MoveFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MoveFileResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MoveFileResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.MoveFileResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MoveFileResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MoveFileResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.MoveFileResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.MoveFileResponse} MoveFileResponse + */ + MoveFileResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.MoveFileResponse) + return object; + return new $root.google.cloud.dataform.v1beta1.MoveFileResponse(); + }; + + /** + * Creates a plain object from a MoveFileResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.MoveFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.MoveFileResponse} message MoveFileResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MoveFileResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MoveFileResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.MoveFileResponse + * @instance + * @returns {Object.} JSON object + */ + MoveFileResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MoveFileResponse; + })(); + + v1beta1.WriteFileRequest = (function() { + + /** + * Properties of a WriteFileRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IWriteFileRequest + * @property {string|null} [workspace] WriteFileRequest workspace + * @property {string|null} [path] WriteFileRequest path + * @property {Uint8Array|null} [contents] WriteFileRequest contents + */ + + /** + * Constructs a new WriteFileRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a WriteFileRequest. + * @implements IWriteFileRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IWriteFileRequest=} [properties] Properties to set + */ + function WriteFileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WriteFileRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @instance + */ + WriteFileRequest.prototype.workspace = ""; + + /** + * WriteFileRequest path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @instance + */ + WriteFileRequest.prototype.path = ""; + + /** + * WriteFileRequest contents. + * @member {Uint8Array} contents + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @instance + */ + WriteFileRequest.prototype.contents = $util.newBuffer([]); + + /** + * Creates a new WriteFileRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IWriteFileRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.WriteFileRequest} WriteFileRequest instance + */ + WriteFileRequest.create = function create(properties) { + return new WriteFileRequest(properties); + }; + + /** + * Encodes the specified WriteFileRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.WriteFileRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IWriteFileRequest} message WriteFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteFileRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.contents != null && Object.hasOwnProperty.call(message, "contents")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.contents); + return writer; + }; + + /** + * Encodes the specified WriteFileRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WriteFileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.IWriteFileRequest} message WriteFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteFileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WriteFileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.WriteFileRequest} WriteFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteFileRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.WriteFileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + case 3: + message.contents = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WriteFileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.WriteFileRequest} WriteFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteFileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WriteFileRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WriteFileRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.contents != null && message.hasOwnProperty("contents")) + if (!(message.contents && typeof message.contents.length === "number" || $util.isString(message.contents))) + return "contents: buffer expected"; + return null; + }; + + /** + * Creates a WriteFileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.WriteFileRequest} WriteFileRequest + */ + WriteFileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.WriteFileRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.WriteFileRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.path != null) + message.path = String(object.path); + if (object.contents != null) + if (typeof object.contents === "string") + $util.base64.decode(object.contents, message.contents = $util.newBuffer($util.base64.length(object.contents)), 0); + else if (object.contents.length) + message.contents = object.contents; + return message; + }; + + /** + * Creates a plain object from a WriteFileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @static + * @param {google.cloud.dataform.v1beta1.WriteFileRequest} message WriteFileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WriteFileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workspace = ""; + object.path = ""; + if (options.bytes === String) + object.contents = ""; + else { + object.contents = []; + if (options.bytes !== Array) + object.contents = $util.newBuffer(object.contents); + } + } + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.contents != null && message.hasOwnProperty("contents")) + object.contents = options.bytes === String ? $util.base64.encode(message.contents, 0, message.contents.length) : options.bytes === Array ? Array.prototype.slice.call(message.contents) : message.contents; + return object; + }; + + /** + * Converts this WriteFileRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @instance + * @returns {Object.} JSON object + */ + WriteFileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WriteFileRequest; + })(); + + v1beta1.WriteFileResponse = (function() { + + /** + * Properties of a WriteFileResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IWriteFileResponse + */ + + /** + * Constructs a new WriteFileResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a WriteFileResponse. + * @implements IWriteFileResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IWriteFileResponse=} [properties] Properties to set + */ + function WriteFileResponse(properties) { + if (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 WriteFileResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.WriteFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.IWriteFileResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.WriteFileResponse} WriteFileResponse instance + */ + WriteFileResponse.create = function create(properties) { + return new WriteFileResponse(properties); + }; + + /** + * Encodes the specified WriteFileResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.WriteFileResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.WriteFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.IWriteFileResponse} message WriteFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteFileResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified WriteFileResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WriteFileResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.WriteFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.IWriteFileResponse} message WriteFileResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WriteFileResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WriteFileResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.WriteFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.WriteFileResponse} WriteFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteFileResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.WriteFileResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WriteFileResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.WriteFileResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.WriteFileResponse} WriteFileResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WriteFileResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WriteFileResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.WriteFileResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WriteFileResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a WriteFileResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.WriteFileResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.WriteFileResponse} WriteFileResponse + */ + WriteFileResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.WriteFileResponse) + return object; + return new $root.google.cloud.dataform.v1beta1.WriteFileResponse(); + }; + + /** + * Creates a plain object from a WriteFileResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.WriteFileResponse + * @static + * @param {google.cloud.dataform.v1beta1.WriteFileResponse} message WriteFileResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WriteFileResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this WriteFileResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.WriteFileResponse + * @instance + * @returns {Object.} JSON object + */ + WriteFileResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WriteFileResponse; + })(); + + v1beta1.InstallNpmPackagesRequest = (function() { + + /** + * Properties of an InstallNpmPackagesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IInstallNpmPackagesRequest + * @property {string|null} [workspace] InstallNpmPackagesRequest workspace + */ + + /** + * Constructs a new InstallNpmPackagesRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents an InstallNpmPackagesRequest. + * @implements IInstallNpmPackagesRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest=} [properties] Properties to set + */ + function InstallNpmPackagesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InstallNpmPackagesRequest workspace. + * @member {string} workspace + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @instance + */ + InstallNpmPackagesRequest.prototype.workspace = ""; + + /** + * Creates a new InstallNpmPackagesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.InstallNpmPackagesRequest} InstallNpmPackagesRequest instance + */ + InstallNpmPackagesRequest.create = function create(properties) { + return new InstallNpmPackagesRequest(properties); + }; + + /** + * Encodes the specified InstallNpmPackagesRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.InstallNpmPackagesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest} message InstallNpmPackagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstallNpmPackagesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspace); + return writer; + }; + + /** + * Encodes the specified InstallNpmPackagesRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.InstallNpmPackagesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @static + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest} message InstallNpmPackagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstallNpmPackagesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InstallNpmPackagesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.InstallNpmPackagesRequest} InstallNpmPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstallNpmPackagesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workspace = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InstallNpmPackagesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.InstallNpmPackagesRequest} InstallNpmPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstallNpmPackagesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InstallNpmPackagesRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstallNpmPackagesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workspace != null && message.hasOwnProperty("workspace")) + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + return null; + }; + + /** + * Creates an InstallNpmPackagesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.InstallNpmPackagesRequest} InstallNpmPackagesRequest + */ + InstallNpmPackagesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest(); + if (object.workspace != null) + message.workspace = String(object.workspace); + return message; + }; + + /** + * Creates a plain object from an InstallNpmPackagesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @static + * @param {google.cloud.dataform.v1beta1.InstallNpmPackagesRequest} message InstallNpmPackagesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstallNpmPackagesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.workspace = ""; + if (message.workspace != null && message.hasOwnProperty("workspace")) + object.workspace = message.workspace; + return object; + }; + + /** + * Converts this InstallNpmPackagesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @instance + * @returns {Object.} JSON object + */ + InstallNpmPackagesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return InstallNpmPackagesRequest; + })(); + + v1beta1.InstallNpmPackagesResponse = (function() { + + /** + * Properties of an InstallNpmPackagesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IInstallNpmPackagesResponse + */ + + /** + * Constructs a new InstallNpmPackagesResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents an InstallNpmPackagesResponse. + * @implements IInstallNpmPackagesResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse=} [properties] Properties to set + */ + function InstallNpmPackagesResponse(properties) { + if (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 InstallNpmPackagesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.InstallNpmPackagesResponse} InstallNpmPackagesResponse instance + */ + InstallNpmPackagesResponse.create = function create(properties) { + return new InstallNpmPackagesResponse(properties); + }; + + /** + * Encodes the specified InstallNpmPackagesResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.InstallNpmPackagesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse} message InstallNpmPackagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstallNpmPackagesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified InstallNpmPackagesResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.InstallNpmPackagesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesResponse + * @static + * @param {google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse} message InstallNpmPackagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstallNpmPackagesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InstallNpmPackagesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.InstallNpmPackagesResponse} InstallNpmPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstallNpmPackagesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.InstallNpmPackagesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InstallNpmPackagesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.InstallNpmPackagesResponse} InstallNpmPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstallNpmPackagesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InstallNpmPackagesResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstallNpmPackagesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an InstallNpmPackagesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.InstallNpmPackagesResponse} InstallNpmPackagesResponse + */ + InstallNpmPackagesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.InstallNpmPackagesResponse) + return object; + return new $root.google.cloud.dataform.v1beta1.InstallNpmPackagesResponse(); + }; + + /** + * Creates a plain object from an InstallNpmPackagesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesResponse + * @static + * @param {google.cloud.dataform.v1beta1.InstallNpmPackagesResponse} message InstallNpmPackagesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstallNpmPackagesResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this InstallNpmPackagesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesResponse + * @instance + * @returns {Object.} JSON object + */ + InstallNpmPackagesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return InstallNpmPackagesResponse; + })(); + + v1beta1.CompilationResult = (function() { + + /** + * Properties of a CompilationResult. + * @memberof google.cloud.dataform.v1beta1 + * @interface ICompilationResult + * @property {string|null} [name] CompilationResult name + * @property {string|null} [gitCommitish] CompilationResult gitCommitish + * @property {string|null} [workspace] CompilationResult workspace + * @property {google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig|null} [codeCompilationConfig] CompilationResult codeCompilationConfig + * @property {string|null} [dataformCoreVersion] CompilationResult dataformCoreVersion + * @property {Array.|null} [compilationErrors] CompilationResult compilationErrors + */ + + /** + * Constructs a new CompilationResult. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a CompilationResult. + * @implements ICompilationResult + * @constructor + * @param {google.cloud.dataform.v1beta1.ICompilationResult=} [properties] Properties to set + */ + function CompilationResult(properties) { + this.compilationErrors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompilationResult name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @instance + */ + CompilationResult.prototype.name = ""; + + /** + * CompilationResult gitCommitish. + * @member {string|null|undefined} gitCommitish + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @instance + */ + CompilationResult.prototype.gitCommitish = null; + + /** + * CompilationResult workspace. + * @member {string|null|undefined} workspace + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @instance + */ + CompilationResult.prototype.workspace = null; + + /** + * CompilationResult codeCompilationConfig. + * @member {google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig|null|undefined} codeCompilationConfig + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @instance + */ + CompilationResult.prototype.codeCompilationConfig = null; + + /** + * CompilationResult dataformCoreVersion. + * @member {string} dataformCoreVersion + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @instance + */ + CompilationResult.prototype.dataformCoreVersion = ""; + + /** + * CompilationResult compilationErrors. + * @member {Array.} compilationErrors + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @instance + */ + CompilationResult.prototype.compilationErrors = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CompilationResult source. + * @member {"gitCommitish"|"workspace"|undefined} source + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @instance + */ + Object.defineProperty(CompilationResult.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["gitCommitish", "workspace"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CompilationResult instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @static + * @param {google.cloud.dataform.v1beta1.ICompilationResult=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CompilationResult} CompilationResult instance + */ + CompilationResult.create = function create(properties) { + return new CompilationResult(properties); + }; + + /** + * Encodes the specified CompilationResult message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @static + * @param {google.cloud.dataform.v1beta1.ICompilationResult} message CompilationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationResult.encode = function encode(message, writer) { + 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.gitCommitish != null && Object.hasOwnProperty.call(message, "gitCommitish")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.gitCommitish); + if (message.workspace != null && Object.hasOwnProperty.call(message, "workspace")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.workspace); + if (message.codeCompilationConfig != null && Object.hasOwnProperty.call(message, "codeCompilationConfig")) + $root.google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.encode(message.codeCompilationConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.dataformCoreVersion != null && Object.hasOwnProperty.call(message, "dataformCoreVersion")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.dataformCoreVersion); + if (message.compilationErrors != null && message.compilationErrors.length) + for (var i = 0; i < message.compilationErrors.length; ++i) + $root.google.cloud.dataform.v1beta1.CompilationResult.CompilationError.encode(message.compilationErrors[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CompilationResult message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @static + * @param {google.cloud.dataform.v1beta1.ICompilationResult} message CompilationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompilationResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CompilationResult} CompilationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CompilationResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.gitCommitish = reader.string(); + break; + case 3: + message.workspace = reader.string(); + break; + case 4: + message.codeCompilationConfig = $root.google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.decode(reader, reader.uint32()); + break; + case 5: + message.dataformCoreVersion = reader.string(); + break; + case 6: + if (!(message.compilationErrors && message.compilationErrors.length)) + message.compilationErrors = []; + message.compilationErrors.push($root.google.cloud.dataform.v1beta1.CompilationResult.CompilationError.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompilationResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CompilationResult} CompilationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompilationResult message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompilationResult.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.gitCommitish != null && message.hasOwnProperty("gitCommitish")) { + properties.source = 1; + if (!$util.isString(message.gitCommitish)) + return "gitCommitish: string expected"; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.workspace)) + return "workspace: string expected"; + } + if (message.codeCompilationConfig != null && message.hasOwnProperty("codeCompilationConfig")) { + var error = $root.google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.verify(message.codeCompilationConfig); + if (error) + return "codeCompilationConfig." + error; + } + if (message.dataformCoreVersion != null && message.hasOwnProperty("dataformCoreVersion")) + if (!$util.isString(message.dataformCoreVersion)) + return "dataformCoreVersion: string expected"; + if (message.compilationErrors != null && message.hasOwnProperty("compilationErrors")) { + if (!Array.isArray(message.compilationErrors)) + return "compilationErrors: array expected"; + for (var i = 0; i < message.compilationErrors.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.CompilationResult.CompilationError.verify(message.compilationErrors[i]); + if (error) + return "compilationErrors." + error; + } + } + return null; + }; + + /** + * Creates a CompilationResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CompilationResult} CompilationResult + */ + CompilationResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CompilationResult) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CompilationResult(); + if (object.name != null) + message.name = String(object.name); + if (object.gitCommitish != null) + message.gitCommitish = String(object.gitCommitish); + if (object.workspace != null) + message.workspace = String(object.workspace); + if (object.codeCompilationConfig != null) { + if (typeof object.codeCompilationConfig !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResult.codeCompilationConfig: object expected"); + message.codeCompilationConfig = $root.google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.fromObject(object.codeCompilationConfig); + } + if (object.dataformCoreVersion != null) + message.dataformCoreVersion = String(object.dataformCoreVersion); + if (object.compilationErrors) { + if (!Array.isArray(object.compilationErrors)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResult.compilationErrors: array expected"); + message.compilationErrors = []; + for (var i = 0; i < object.compilationErrors.length; ++i) { + if (typeof object.compilationErrors[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResult.compilationErrors: object expected"); + message.compilationErrors[i] = $root.google.cloud.dataform.v1beta1.CompilationResult.CompilationError.fromObject(object.compilationErrors[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CompilationResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResult} message CompilationResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompilationResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.compilationErrors = []; + if (options.defaults) { + object.name = ""; + object.codeCompilationConfig = null; + object.dataformCoreVersion = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.gitCommitish != null && message.hasOwnProperty("gitCommitish")) { + object.gitCommitish = message.gitCommitish; + if (options.oneofs) + object.source = "gitCommitish"; + } + if (message.workspace != null && message.hasOwnProperty("workspace")) { + object.workspace = message.workspace; + if (options.oneofs) + object.source = "workspace"; + } + if (message.codeCompilationConfig != null && message.hasOwnProperty("codeCompilationConfig")) + object.codeCompilationConfig = $root.google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.toObject(message.codeCompilationConfig, options); + if (message.dataformCoreVersion != null && message.hasOwnProperty("dataformCoreVersion")) + object.dataformCoreVersion = message.dataformCoreVersion; + if (message.compilationErrors && message.compilationErrors.length) { + object.compilationErrors = []; + for (var j = 0; j < message.compilationErrors.length; ++j) + object.compilationErrors[j] = $root.google.cloud.dataform.v1beta1.CompilationResult.CompilationError.toObject(message.compilationErrors[j], options); + } + return object; + }; + + /** + * Converts this CompilationResult to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @instance + * @returns {Object.} JSON object + */ + CompilationResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + CompilationResult.CodeCompilationConfig = (function() { + + /** + * Properties of a CodeCompilationConfig. + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @interface ICodeCompilationConfig + * @property {string|null} [defaultDatabase] CodeCompilationConfig defaultDatabase + * @property {string|null} [defaultSchema] CodeCompilationConfig defaultSchema + * @property {string|null} [defaultLocation] CodeCompilationConfig defaultLocation + * @property {string|null} [assertionSchema] CodeCompilationConfig assertionSchema + * @property {Object.|null} [vars] CodeCompilationConfig vars + * @property {string|null} [databaseSuffix] CodeCompilationConfig databaseSuffix + * @property {string|null} [schemaSuffix] CodeCompilationConfig schemaSuffix + * @property {string|null} [tablePrefix] CodeCompilationConfig tablePrefix + */ + + /** + * Constructs a new CodeCompilationConfig. + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @classdesc Represents a CodeCompilationConfig. + * @implements ICodeCompilationConfig + * @constructor + * @param {google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig=} [properties] Properties to set + */ + function CodeCompilationConfig(properties) { + this.vars = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CodeCompilationConfig defaultDatabase. + * @member {string} defaultDatabase + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.defaultDatabase = ""; + + /** + * CodeCompilationConfig defaultSchema. + * @member {string} defaultSchema + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.defaultSchema = ""; + + /** + * CodeCompilationConfig defaultLocation. + * @member {string} defaultLocation + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.defaultLocation = ""; + + /** + * CodeCompilationConfig assertionSchema. + * @member {string} assertionSchema + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.assertionSchema = ""; + + /** + * CodeCompilationConfig vars. + * @member {Object.} vars + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.vars = $util.emptyObject; + + /** + * CodeCompilationConfig databaseSuffix. + * @member {string} databaseSuffix + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.databaseSuffix = ""; + + /** + * CodeCompilationConfig schemaSuffix. + * @member {string} schemaSuffix + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.schemaSuffix = ""; + + /** + * CodeCompilationConfig tablePrefix. + * @member {string} tablePrefix + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @instance + */ + CodeCompilationConfig.prototype.tablePrefix = ""; + + /** + * Creates a new CodeCompilationConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig} CodeCompilationConfig instance + */ + CodeCompilationConfig.create = function create(properties) { + return new CodeCompilationConfig(properties); + }; + + /** + * Encodes the specified CodeCompilationConfig message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig} message CodeCompilationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CodeCompilationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaultDatabase != null && Object.hasOwnProperty.call(message, "defaultDatabase")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.defaultDatabase); + if (message.defaultSchema != null && Object.hasOwnProperty.call(message, "defaultSchema")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.defaultSchema); + if (message.assertionSchema != null && Object.hasOwnProperty.call(message, "assertionSchema")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.assertionSchema); + if (message.vars != null && Object.hasOwnProperty.call(message, "vars")) + for (var keys = Object.keys(message.vars), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.vars[keys[i]]).ldelim(); + if (message.databaseSuffix != null && Object.hasOwnProperty.call(message, "databaseSuffix")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.databaseSuffix); + if (message.schemaSuffix != null && Object.hasOwnProperty.call(message, "schemaSuffix")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.schemaSuffix); + if (message.tablePrefix != null && Object.hasOwnProperty.call(message, "tablePrefix")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.tablePrefix); + if (message.defaultLocation != null && Object.hasOwnProperty.call(message, "defaultLocation")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.defaultLocation); + return writer; + }; + + /** + * Encodes the specified CodeCompilationConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResult.ICodeCompilationConfig} message CodeCompilationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CodeCompilationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CodeCompilationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig} CodeCompilationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CodeCompilationConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.defaultDatabase = reader.string(); + break; + case 2: + message.defaultSchema = reader.string(); + break; + case 8: + message.defaultLocation = reader.string(); + break; + case 3: + message.assertionSchema = reader.string(); + break; + case 4: + if (message.vars === $util.emptyObject) + message.vars = {}; + 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.vars[key] = value; + break; + case 5: + message.databaseSuffix = reader.string(); + break; + case 6: + message.schemaSuffix = reader.string(); + break; + case 7: + message.tablePrefix = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CodeCompilationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig} CodeCompilationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CodeCompilationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CodeCompilationConfig message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CodeCompilationConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaultDatabase != null && message.hasOwnProperty("defaultDatabase")) + if (!$util.isString(message.defaultDatabase)) + return "defaultDatabase: string expected"; + if (message.defaultSchema != null && message.hasOwnProperty("defaultSchema")) + if (!$util.isString(message.defaultSchema)) + return "defaultSchema: string expected"; + if (message.defaultLocation != null && message.hasOwnProperty("defaultLocation")) + if (!$util.isString(message.defaultLocation)) + return "defaultLocation: string expected"; + if (message.assertionSchema != null && message.hasOwnProperty("assertionSchema")) + if (!$util.isString(message.assertionSchema)) + return "assertionSchema: string expected"; + if (message.vars != null && message.hasOwnProperty("vars")) { + if (!$util.isObject(message.vars)) + return "vars: object expected"; + var key = Object.keys(message.vars); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.vars[key[i]])) + return "vars: string{k:string} expected"; + } + if (message.databaseSuffix != null && message.hasOwnProperty("databaseSuffix")) + if (!$util.isString(message.databaseSuffix)) + return "databaseSuffix: string expected"; + if (message.schemaSuffix != null && message.hasOwnProperty("schemaSuffix")) + if (!$util.isString(message.schemaSuffix)) + return "schemaSuffix: string expected"; + if (message.tablePrefix != null && message.hasOwnProperty("tablePrefix")) + if (!$util.isString(message.tablePrefix)) + return "tablePrefix: string expected"; + return null; + }; + + /** + * Creates a CodeCompilationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig} CodeCompilationConfig + */ + CodeCompilationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig(); + if (object.defaultDatabase != null) + message.defaultDatabase = String(object.defaultDatabase); + if (object.defaultSchema != null) + message.defaultSchema = String(object.defaultSchema); + if (object.defaultLocation != null) + message.defaultLocation = String(object.defaultLocation); + if (object.assertionSchema != null) + message.assertionSchema = String(object.assertionSchema); + if (object.vars) { + if (typeof object.vars !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.vars: object expected"); + message.vars = {}; + for (var keys = Object.keys(object.vars), i = 0; i < keys.length; ++i) + message.vars[keys[i]] = String(object.vars[keys[i]]); + } + if (object.databaseSuffix != null) + message.databaseSuffix = String(object.databaseSuffix); + if (object.schemaSuffix != null) + message.schemaSuffix = String(object.schemaSuffix); + if (object.tablePrefix != null) + message.tablePrefix = String(object.tablePrefix); + return message; + }; + + /** + * Creates a plain object from a CodeCompilationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig} message CodeCompilationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CodeCompilationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.vars = {}; + if (options.defaults) { + object.defaultDatabase = ""; + object.defaultSchema = ""; + object.assertionSchema = ""; + object.databaseSuffix = ""; + object.schemaSuffix = ""; + object.tablePrefix = ""; + object.defaultLocation = ""; + } + if (message.defaultDatabase != null && message.hasOwnProperty("defaultDatabase")) + object.defaultDatabase = message.defaultDatabase; + if (message.defaultSchema != null && message.hasOwnProperty("defaultSchema")) + object.defaultSchema = message.defaultSchema; + if (message.assertionSchema != null && message.hasOwnProperty("assertionSchema")) + object.assertionSchema = message.assertionSchema; + var keys2; + if (message.vars && (keys2 = Object.keys(message.vars)).length) { + object.vars = {}; + for (var j = 0; j < keys2.length; ++j) + object.vars[keys2[j]] = message.vars[keys2[j]]; + } + if (message.databaseSuffix != null && message.hasOwnProperty("databaseSuffix")) + object.databaseSuffix = message.databaseSuffix; + if (message.schemaSuffix != null && message.hasOwnProperty("schemaSuffix")) + object.schemaSuffix = message.schemaSuffix; + if (message.tablePrefix != null && message.hasOwnProperty("tablePrefix")) + object.tablePrefix = message.tablePrefix; + if (message.defaultLocation != null && message.hasOwnProperty("defaultLocation")) + object.defaultLocation = message.defaultLocation; + return object; + }; + + /** + * Converts this CodeCompilationConfig to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @instance + * @returns {Object.} JSON object + */ + CodeCompilationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CodeCompilationConfig; + })(); + + CompilationResult.CompilationError = (function() { + + /** + * Properties of a CompilationError. + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @interface ICompilationError + * @property {string|null} [message] CompilationError message + * @property {string|null} [stack] CompilationError stack + * @property {string|null} [path] CompilationError path + * @property {google.cloud.dataform.v1beta1.ITarget|null} [actionTarget] CompilationError actionTarget + */ + + /** + * Constructs a new CompilationError. + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @classdesc Represents a CompilationError. + * @implements ICompilationError + * @constructor + * @param {google.cloud.dataform.v1beta1.CompilationResult.ICompilationError=} [properties] Properties to set + */ + function CompilationError(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompilationError message. + * @member {string} message + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @instance + */ + CompilationError.prototype.message = ""; + + /** + * CompilationError stack. + * @member {string} stack + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @instance + */ + CompilationError.prototype.stack = ""; + + /** + * CompilationError path. + * @member {string} path + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @instance + */ + CompilationError.prototype.path = ""; + + /** + * CompilationError actionTarget. + * @member {google.cloud.dataform.v1beta1.ITarget|null|undefined} actionTarget + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @instance + */ + CompilationError.prototype.actionTarget = null; + + /** + * Creates a new CompilationError instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResult.ICompilationError=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CompilationResult.CompilationError} CompilationError instance + */ + CompilationError.create = function create(properties) { + return new CompilationError(properties); + }; + + /** + * Encodes the specified CompilationError message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.CompilationError.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResult.ICompilationError} message CompilationError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationError.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.stack != null && Object.hasOwnProperty.call(message, "stack")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.stack); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.path); + if (message.actionTarget != null && Object.hasOwnProperty.call(message, "actionTarget")) + $root.google.cloud.dataform.v1beta1.Target.encode(message.actionTarget, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CompilationError message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResult.CompilationError.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResult.ICompilationError} message CompilationError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationError.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompilationError message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CompilationResult.CompilationError} CompilationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationError.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CompilationResult.CompilationError(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = reader.string(); + break; + case 2: + message.stack = reader.string(); + break; + case 3: + message.path = reader.string(); + break; + case 4: + message.actionTarget = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompilationError message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CompilationResult.CompilationError} CompilationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationError.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompilationError message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompilationError.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.stack != null && message.hasOwnProperty("stack")) + if (!$util.isString(message.stack)) + return "stack: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.actionTarget != null && message.hasOwnProperty("actionTarget")) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.actionTarget); + if (error) + return "actionTarget." + error; + } + return null; + }; + + /** + * Creates a CompilationError message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CompilationResult.CompilationError} CompilationError + */ + CompilationError.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CompilationResult.CompilationError) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CompilationResult.CompilationError(); + if (object.message != null) + message.message = String(object.message); + if (object.stack != null) + message.stack = String(object.stack); + if (object.path != null) + message.path = String(object.path); + if (object.actionTarget != null) { + if (typeof object.actionTarget !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResult.CompilationError.actionTarget: object expected"); + message.actionTarget = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.actionTarget); + } + return message; + }; + + /** + * Creates a plain object from a CompilationError message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResult.CompilationError} message CompilationError + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompilationError.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.stack = ""; + object.path = ""; + object.actionTarget = null; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.stack != null && message.hasOwnProperty("stack")) + object.stack = message.stack; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.actionTarget != null && message.hasOwnProperty("actionTarget")) + object.actionTarget = $root.google.cloud.dataform.v1beta1.Target.toObject(message.actionTarget, options); + return object; + }; + + /** + * Converts this CompilationError to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @instance + * @returns {Object.} JSON object + */ + CompilationError.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CompilationError; + })(); + + return CompilationResult; + })(); + + v1beta1.ListCompilationResultsRequest = (function() { + + /** + * Properties of a ListCompilationResultsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IListCompilationResultsRequest + * @property {string|null} [parent] ListCompilationResultsRequest parent + * @property {number|null} [pageSize] ListCompilationResultsRequest pageSize + * @property {string|null} [pageToken] ListCompilationResultsRequest pageToken + */ + + /** + * Constructs a new ListCompilationResultsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ListCompilationResultsRequest. + * @implements IListCompilationResultsRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsRequest=} [properties] Properties to set + */ + function ListCompilationResultsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCompilationResultsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @instance + */ + ListCompilationResultsRequest.prototype.parent = ""; + + /** + * ListCompilationResultsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @instance + */ + ListCompilationResultsRequest.prototype.pageSize = 0; + + /** + * ListCompilationResultsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @instance + */ + ListCompilationResultsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListCompilationResultsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ListCompilationResultsRequest} ListCompilationResultsRequest instance + */ + ListCompilationResultsRequest.create = function create(properties) { + return new ListCompilationResultsRequest(properties); + }; + + /** + * Encodes the specified ListCompilationResultsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListCompilationResultsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsRequest} message ListCompilationResultsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCompilationResultsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListCompilationResultsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListCompilationResultsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsRequest} message ListCompilationResultsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCompilationResultsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCompilationResultsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ListCompilationResultsRequest} ListCompilationResultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCompilationResultsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ListCompilationResultsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListCompilationResultsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ListCompilationResultsRequest} ListCompilationResultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCompilationResultsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCompilationResultsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCompilationResultsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListCompilationResultsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ListCompilationResultsRequest} ListCompilationResultsRequest + */ + ListCompilationResultsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ListCompilationResultsRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ListCompilationResultsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListCompilationResultsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @static + * @param {google.cloud.dataform.v1beta1.ListCompilationResultsRequest} message ListCompilationResultsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCompilationResultsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListCompilationResultsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @instance + * @returns {Object.} JSON object + */ + ListCompilationResultsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListCompilationResultsRequest; + })(); + + v1beta1.ListCompilationResultsResponse = (function() { + + /** + * Properties of a ListCompilationResultsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IListCompilationResultsResponse + * @property {Array.|null} [compilationResults] ListCompilationResultsResponse compilationResults + * @property {string|null} [nextPageToken] ListCompilationResultsResponse nextPageToken + * @property {Array.|null} [unreachable] ListCompilationResultsResponse unreachable + */ + + /** + * Constructs a new ListCompilationResultsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ListCompilationResultsResponse. + * @implements IListCompilationResultsResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsResponse=} [properties] Properties to set + */ + function ListCompilationResultsResponse(properties) { + this.compilationResults = []; + 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]]; + } + + /** + * ListCompilationResultsResponse compilationResults. + * @member {Array.} compilationResults + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @instance + */ + ListCompilationResultsResponse.prototype.compilationResults = $util.emptyArray; + + /** + * ListCompilationResultsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @instance + */ + ListCompilationResultsResponse.prototype.nextPageToken = ""; + + /** + * ListCompilationResultsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @instance + */ + ListCompilationResultsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListCompilationResultsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ListCompilationResultsResponse} ListCompilationResultsResponse instance + */ + ListCompilationResultsResponse.create = function create(properties) { + return new ListCompilationResultsResponse(properties); + }; + + /** + * Encodes the specified ListCompilationResultsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListCompilationResultsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsResponse} message ListCompilationResultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCompilationResultsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.compilationResults != null && message.compilationResults.length) + for (var i = 0; i < message.compilationResults.length; ++i) + $root.google.cloud.dataform.v1beta1.CompilationResult.encode(message.compilationResults[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 ListCompilationResultsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListCompilationResultsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListCompilationResultsResponse} message ListCompilationResultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCompilationResultsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCompilationResultsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ListCompilationResultsResponse} ListCompilationResultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCompilationResultsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ListCompilationResultsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.compilationResults && message.compilationResults.length)) + message.compilationResults = []; + message.compilationResults.push($root.google.cloud.dataform.v1beta1.CompilationResult.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 ListCompilationResultsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ListCompilationResultsResponse} ListCompilationResultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCompilationResultsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCompilationResultsResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCompilationResultsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.compilationResults != null && message.hasOwnProperty("compilationResults")) { + if (!Array.isArray(message.compilationResults)) + return "compilationResults: array expected"; + for (var i = 0; i < message.compilationResults.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.CompilationResult.verify(message.compilationResults[i]); + if (error) + return "compilationResults." + 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 ListCompilationResultsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ListCompilationResultsResponse} ListCompilationResultsResponse + */ + ListCompilationResultsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ListCompilationResultsResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ListCompilationResultsResponse(); + if (object.compilationResults) { + if (!Array.isArray(object.compilationResults)) + throw TypeError(".google.cloud.dataform.v1beta1.ListCompilationResultsResponse.compilationResults: array expected"); + message.compilationResults = []; + for (var i = 0; i < object.compilationResults.length; ++i) { + if (typeof object.compilationResults[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.ListCompilationResultsResponse.compilationResults: object expected"); + message.compilationResults[i] = $root.google.cloud.dataform.v1beta1.CompilationResult.fromObject(object.compilationResults[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.dataform.v1beta1.ListCompilationResultsResponse.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 ListCompilationResultsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @static + * @param {google.cloud.dataform.v1beta1.ListCompilationResultsResponse} message ListCompilationResultsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCompilationResultsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.compilationResults = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.compilationResults && message.compilationResults.length) { + object.compilationResults = []; + for (var j = 0; j < message.compilationResults.length; ++j) + object.compilationResults[j] = $root.google.cloud.dataform.v1beta1.CompilationResult.toObject(message.compilationResults[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 ListCompilationResultsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @instance + * @returns {Object.} JSON object + */ + ListCompilationResultsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListCompilationResultsResponse; + })(); + + v1beta1.GetCompilationResultRequest = (function() { + + /** + * Properties of a GetCompilationResultRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IGetCompilationResultRequest + * @property {string|null} [name] GetCompilationResultRequest name + */ + + /** + * Constructs a new GetCompilationResultRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a GetCompilationResultRequest. + * @implements IGetCompilationResultRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IGetCompilationResultRequest=} [properties] Properties to set + */ + function GetCompilationResultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetCompilationResultRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @instance + */ + GetCompilationResultRequest.prototype.name = ""; + + /** + * Creates a new GetCompilationResultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetCompilationResultRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.GetCompilationResultRequest} GetCompilationResultRequest instance + */ + GetCompilationResultRequest.create = function create(properties) { + return new GetCompilationResultRequest(properties); + }; + + /** + * Encodes the specified GetCompilationResultRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.GetCompilationResultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetCompilationResultRequest} message GetCompilationResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCompilationResultRequest.encode = function encode(message, writer) { + 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 GetCompilationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.GetCompilationResultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetCompilationResultRequest} message GetCompilationResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCompilationResultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetCompilationResultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.GetCompilationResultRequest} GetCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCompilationResultRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.GetCompilationResultRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetCompilationResultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.GetCompilationResultRequest} GetCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCompilationResultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetCompilationResultRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetCompilationResultRequest.verify = function verify(message) { + if (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 GetCompilationResultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.GetCompilationResultRequest} GetCompilationResultRequest + */ + GetCompilationResultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.GetCompilationResultRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.GetCompilationResultRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetCompilationResultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1beta1.GetCompilationResultRequest} message GetCompilationResultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetCompilationResultRequest.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 GetCompilationResultRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @instance + * @returns {Object.} JSON object + */ + GetCompilationResultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetCompilationResultRequest; + })(); + + v1beta1.CreateCompilationResultRequest = (function() { + + /** + * Properties of a CreateCompilationResultRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface ICreateCompilationResultRequest + * @property {string|null} [parent] CreateCompilationResultRequest parent + * @property {google.cloud.dataform.v1beta1.ICompilationResult|null} [compilationResult] CreateCompilationResultRequest compilationResult + */ + + /** + * Constructs a new CreateCompilationResultRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a CreateCompilationResultRequest. + * @implements ICreateCompilationResultRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.ICreateCompilationResultRequest=} [properties] Properties to set + */ + function CreateCompilationResultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateCompilationResultRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @instance + */ + CreateCompilationResultRequest.prototype.parent = ""; + + /** + * CreateCompilationResultRequest compilationResult. + * @member {google.cloud.dataform.v1beta1.ICompilationResult|null|undefined} compilationResult + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @instance + */ + CreateCompilationResultRequest.prototype.compilationResult = null; + + /** + * Creates a new CreateCompilationResultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateCompilationResultRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CreateCompilationResultRequest} CreateCompilationResultRequest instance + */ + CreateCompilationResultRequest.create = function create(properties) { + return new CreateCompilationResultRequest(properties); + }; + + /** + * Encodes the specified CreateCompilationResultRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateCompilationResultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateCompilationResultRequest} message CreateCompilationResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCompilationResultRequest.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.compilationResult != null && Object.hasOwnProperty.call(message, "compilationResult")) + $root.google.cloud.dataform.v1beta1.CompilationResult.encode(message.compilationResult, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateCompilationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateCompilationResultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateCompilationResultRequest} message CreateCompilationResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCompilationResultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateCompilationResultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CreateCompilationResultRequest} CreateCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCompilationResultRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CreateCompilationResultRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.compilationResult = $root.google.cloud.dataform.v1beta1.CompilationResult.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateCompilationResultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CreateCompilationResultRequest} CreateCompilationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCompilationResultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateCompilationResultRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateCompilationResultRequest.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.compilationResult != null && message.hasOwnProperty("compilationResult")) { + var error = $root.google.cloud.dataform.v1beta1.CompilationResult.verify(message.compilationResult); + if (error) + return "compilationResult." + error; + } + return null; + }; + + /** + * Creates a CreateCompilationResultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CreateCompilationResultRequest} CreateCompilationResultRequest + */ + CreateCompilationResultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CreateCompilationResultRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CreateCompilationResultRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.compilationResult != null) { + if (typeof object.compilationResult !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CreateCompilationResultRequest.compilationResult: object expected"); + message.compilationResult = $root.google.cloud.dataform.v1beta1.CompilationResult.fromObject(object.compilationResult); + } + return message; + }; + + /** + * Creates a plain object from a CreateCompilationResultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @static + * @param {google.cloud.dataform.v1beta1.CreateCompilationResultRequest} message CreateCompilationResultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateCompilationResultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.compilationResult = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.compilationResult != null && message.hasOwnProperty("compilationResult")) + object.compilationResult = $root.google.cloud.dataform.v1beta1.CompilationResult.toObject(message.compilationResult, options); + return object; + }; + + /** + * Converts this CreateCompilationResultRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @instance + * @returns {Object.} JSON object + */ + CreateCompilationResultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateCompilationResultRequest; + })(); + + v1beta1.Target = (function() { + + /** + * Properties of a Target. + * @memberof google.cloud.dataform.v1beta1 + * @interface ITarget + * @property {string|null} [database] Target database + * @property {string|null} [schema] Target schema + * @property {string|null} [name] Target name + */ + + /** + * Constructs a new Target. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a Target. + * @implements ITarget + * @constructor + * @param {google.cloud.dataform.v1beta1.ITarget=} [properties] Properties to set + */ + function Target(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Target database. + * @member {string} database + * @memberof google.cloud.dataform.v1beta1.Target + * @instance + */ + Target.prototype.database = ""; + + /** + * Target schema. + * @member {string} schema + * @memberof google.cloud.dataform.v1beta1.Target + * @instance + */ + Target.prototype.schema = ""; + + /** + * Target name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.Target + * @instance + */ + Target.prototype.name = ""; + + /** + * Creates a new Target instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.Target + * @static + * @param {google.cloud.dataform.v1beta1.ITarget=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.Target} Target instance + */ + Target.create = function create(properties) { + return new Target(properties); + }; + + /** + * Encodes the specified Target message. Does not implicitly {@link google.cloud.dataform.v1beta1.Target.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.Target + * @static + * @param {google.cloud.dataform.v1beta1.ITarget} message Target message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Target.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.database != null && Object.hasOwnProperty.call(message, "database")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.database); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.schema); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified Target message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.Target.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.Target + * @static + * @param {google.cloud.dataform.v1beta1.ITarget} message Target message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Target.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Target message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.Target + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.Target} Target + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Target.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.Target(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.database = reader.string(); + break; + case 2: + message.schema = reader.string(); + break; + case 3: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Target message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.Target + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.Target} Target + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Target.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Target message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.Target + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Target.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.database != null && message.hasOwnProperty("database")) + if (!$util.isString(message.database)) + return "database: string expected"; + if (message.schema != null && message.hasOwnProperty("schema")) + if (!$util.isString(message.schema)) + return "schema: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a Target message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.Target + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.Target} Target + */ + Target.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.Target) + return object; + var message = new $root.google.cloud.dataform.v1beta1.Target(); + if (object.database != null) + message.database = String(object.database); + if (object.schema != null) + message.schema = String(object.schema); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a Target message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.Target + * @static + * @param {google.cloud.dataform.v1beta1.Target} message Target + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Target.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.database = ""; + object.schema = ""; + object.name = ""; + } + if (message.database != null && message.hasOwnProperty("database")) + object.database = message.database; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = message.schema; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this Target to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.Target + * @instance + * @returns {Object.} JSON object + */ + Target.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Target; + })(); + + v1beta1.RelationDescriptor = (function() { + + /** + * Properties of a RelationDescriptor. + * @memberof google.cloud.dataform.v1beta1 + * @interface IRelationDescriptor + * @property {string|null} [description] RelationDescriptor description + * @property {Array.|null} [columns] RelationDescriptor columns + * @property {Object.|null} [bigqueryLabels] RelationDescriptor bigqueryLabels + */ + + /** + * Constructs a new RelationDescriptor. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a RelationDescriptor. + * @implements IRelationDescriptor + * @constructor + * @param {google.cloud.dataform.v1beta1.IRelationDescriptor=} [properties] Properties to set + */ + function RelationDescriptor(properties) { + this.columns = []; + this.bigqueryLabels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RelationDescriptor description. + * @member {string} description + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @instance + */ + RelationDescriptor.prototype.description = ""; + + /** + * RelationDescriptor columns. + * @member {Array.} columns + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @instance + */ + RelationDescriptor.prototype.columns = $util.emptyArray; + + /** + * RelationDescriptor bigqueryLabels. + * @member {Object.} bigqueryLabels + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @instance + */ + RelationDescriptor.prototype.bigqueryLabels = $util.emptyObject; + + /** + * Creates a new RelationDescriptor instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @static + * @param {google.cloud.dataform.v1beta1.IRelationDescriptor=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.RelationDescriptor} RelationDescriptor instance + */ + RelationDescriptor.create = function create(properties) { + return new RelationDescriptor(properties); + }; + + /** + * Encodes the specified RelationDescriptor message. Does not implicitly {@link google.cloud.dataform.v1beta1.RelationDescriptor.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @static + * @param {google.cloud.dataform.v1beta1.IRelationDescriptor} message RelationDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RelationDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); + if (message.columns != null && message.columns.length) + for (var i = 0; i < message.columns.length; ++i) + $root.google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.encode(message.columns[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.bigqueryLabels != null && Object.hasOwnProperty.call(message, "bigqueryLabels")) + for (var keys = Object.keys(message.bigqueryLabels), 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.bigqueryLabels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified RelationDescriptor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.RelationDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @static + * @param {google.cloud.dataform.v1beta1.IRelationDescriptor} message RelationDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RelationDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RelationDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.RelationDescriptor} RelationDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RelationDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.RelationDescriptor(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.description = reader.string(); + break; + case 2: + if (!(message.columns && message.columns.length)) + message.columns = []; + message.columns.push($root.google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.decode(reader, reader.uint32())); + break; + case 3: + if (message.bigqueryLabels === $util.emptyObject) + message.bigqueryLabels = {}; + 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.bigqueryLabels[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RelationDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.RelationDescriptor} RelationDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RelationDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RelationDescriptor message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RelationDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.columns != null && message.hasOwnProperty("columns")) { + if (!Array.isArray(message.columns)) + return "columns: array expected"; + for (var i = 0; i < message.columns.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.verify(message.columns[i]); + if (error) + return "columns." + error; + } + } + if (message.bigqueryLabels != null && message.hasOwnProperty("bigqueryLabels")) { + if (!$util.isObject(message.bigqueryLabels)) + return "bigqueryLabels: object expected"; + var key = Object.keys(message.bigqueryLabels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.bigqueryLabels[key[i]])) + return "bigqueryLabels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a RelationDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.RelationDescriptor} RelationDescriptor + */ + RelationDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.RelationDescriptor) + return object; + var message = new $root.google.cloud.dataform.v1beta1.RelationDescriptor(); + if (object.description != null) + message.description = String(object.description); + if (object.columns) { + if (!Array.isArray(object.columns)) + throw TypeError(".google.cloud.dataform.v1beta1.RelationDescriptor.columns: array expected"); + message.columns = []; + for (var i = 0; i < object.columns.length; ++i) { + if (typeof object.columns[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.RelationDescriptor.columns: object expected"); + message.columns[i] = $root.google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.fromObject(object.columns[i]); + } + } + if (object.bigqueryLabels) { + if (typeof object.bigqueryLabels !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.RelationDescriptor.bigqueryLabels: object expected"); + message.bigqueryLabels = {}; + for (var keys = Object.keys(object.bigqueryLabels), i = 0; i < keys.length; ++i) + message.bigqueryLabels[keys[i]] = String(object.bigqueryLabels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a RelationDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @static + * @param {google.cloud.dataform.v1beta1.RelationDescriptor} message RelationDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RelationDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.columns = []; + if (options.objects || options.defaults) + object.bigqueryLabels = {}; + if (options.defaults) + object.description = ""; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.columns && message.columns.length) { + object.columns = []; + for (var j = 0; j < message.columns.length; ++j) + object.columns[j] = $root.google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.toObject(message.columns[j], options); + } + var keys2; + if (message.bigqueryLabels && (keys2 = Object.keys(message.bigqueryLabels)).length) { + object.bigqueryLabels = {}; + for (var j = 0; j < keys2.length; ++j) + object.bigqueryLabels[keys2[j]] = message.bigqueryLabels[keys2[j]]; + } + return object; + }; + + /** + * Converts this RelationDescriptor to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @instance + * @returns {Object.} JSON object + */ + RelationDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + RelationDescriptor.ColumnDescriptor = (function() { + + /** + * Properties of a ColumnDescriptor. + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @interface IColumnDescriptor + * @property {Array.|null} [path] ColumnDescriptor path + * @property {string|null} [description] ColumnDescriptor description + * @property {Array.|null} [bigqueryPolicyTags] ColumnDescriptor bigqueryPolicyTags + */ + + /** + * Constructs a new ColumnDescriptor. + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @classdesc Represents a ColumnDescriptor. + * @implements IColumnDescriptor + * @constructor + * @param {google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor=} [properties] Properties to set + */ + function ColumnDescriptor(properties) { + this.path = []; + this.bigqueryPolicyTags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ColumnDescriptor path. + * @member {Array.} path + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @instance + */ + ColumnDescriptor.prototype.path = $util.emptyArray; + + /** + * ColumnDescriptor description. + * @member {string} description + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @instance + */ + ColumnDescriptor.prototype.description = ""; + + /** + * ColumnDescriptor bigqueryPolicyTags. + * @member {Array.} bigqueryPolicyTags + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @instance + */ + ColumnDescriptor.prototype.bigqueryPolicyTags = $util.emptyArray; + + /** + * Creates a new ColumnDescriptor instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @static + * @param {google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor} ColumnDescriptor instance + */ + ColumnDescriptor.create = function create(properties) { + return new ColumnDescriptor(properties); + }; + + /** + * Encodes the specified ColumnDescriptor message. Does not implicitly {@link google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @static + * @param {google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor} message ColumnDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) + for (var i = 0; i < message.path.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path[i]); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.bigqueryPolicyTags != null && message.bigqueryPolicyTags.length) + for (var i = 0; i < message.bigqueryPolicyTags.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.bigqueryPolicyTags[i]); + return writer; + }; + + /** + * Encodes the specified ColumnDescriptor message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @static + * @param {google.cloud.dataform.v1beta1.RelationDescriptor.IColumnDescriptor} message ColumnDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ColumnDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor} ColumnDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + message.path.push(reader.string()); + break; + case 2: + message.description = reader.string(); + break; + case 3: + if (!(message.bigqueryPolicyTags && message.bigqueryPolicyTags.length)) + message.bigqueryPolicyTags = []; + message.bigqueryPolicyTags.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ColumnDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor} ColumnDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ColumnDescriptor message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ColumnDescriptor.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.isString(message.path[i])) + return "path: string[] expected"; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.bigqueryPolicyTags != null && message.hasOwnProperty("bigqueryPolicyTags")) { + if (!Array.isArray(message.bigqueryPolicyTags)) + return "bigqueryPolicyTags: array expected"; + for (var i = 0; i < message.bigqueryPolicyTags.length; ++i) + if (!$util.isString(message.bigqueryPolicyTags[i])) + return "bigqueryPolicyTags: string[] expected"; + } + return null; + }; + + /** + * Creates a ColumnDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor} ColumnDescriptor + */ + ColumnDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor) + return object; + var message = new $root.google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = String(object.path[i]); + } + if (object.description != null) + message.description = String(object.description); + if (object.bigqueryPolicyTags) { + if (!Array.isArray(object.bigqueryPolicyTags)) + throw TypeError(".google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.bigqueryPolicyTags: array expected"); + message.bigqueryPolicyTags = []; + for (var i = 0; i < object.bigqueryPolicyTags.length; ++i) + message.bigqueryPolicyTags[i] = String(object.bigqueryPolicyTags[i]); + } + return message; + }; + + /** + * Creates a plain object from a ColumnDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @static + * @param {google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor} message ColumnDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ColumnDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.bigqueryPolicyTags = []; + } + if (options.defaults) + object.description = ""; + 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.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.bigqueryPolicyTags && message.bigqueryPolicyTags.length) { + object.bigqueryPolicyTags = []; + for (var j = 0; j < message.bigqueryPolicyTags.length; ++j) + object.bigqueryPolicyTags[j] = message.bigqueryPolicyTags[j]; + } + return object; + }; + + /** + * Converts this ColumnDescriptor to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @instance + * @returns {Object.} JSON object + */ + ColumnDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ColumnDescriptor; + })(); + + return RelationDescriptor; + })(); + + v1beta1.CompilationResultAction = (function() { + + /** + * Properties of a CompilationResultAction. + * @memberof google.cloud.dataform.v1beta1 + * @interface ICompilationResultAction + * @property {google.cloud.dataform.v1beta1.ITarget|null} [target] CompilationResultAction target + * @property {google.cloud.dataform.v1beta1.ITarget|null} [canonicalTarget] CompilationResultAction canonicalTarget + * @property {string|null} [filePath] CompilationResultAction filePath + * @property {google.cloud.dataform.v1beta1.CompilationResultAction.IRelation|null} [relation] CompilationResultAction relation + * @property {google.cloud.dataform.v1beta1.CompilationResultAction.IOperations|null} [operations] CompilationResultAction operations + * @property {google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion|null} [assertion] CompilationResultAction assertion + * @property {google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration|null} [declaration] CompilationResultAction declaration + */ + + /** + * Constructs a new CompilationResultAction. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a CompilationResultAction. + * @implements ICompilationResultAction + * @constructor + * @param {google.cloud.dataform.v1beta1.ICompilationResultAction=} [properties] Properties to set + */ + function CompilationResultAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompilationResultAction target. + * @member {google.cloud.dataform.v1beta1.ITarget|null|undefined} target + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.target = null; + + /** + * CompilationResultAction canonicalTarget. + * @member {google.cloud.dataform.v1beta1.ITarget|null|undefined} canonicalTarget + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.canonicalTarget = null; + + /** + * CompilationResultAction filePath. + * @member {string} filePath + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.filePath = ""; + + /** + * CompilationResultAction relation. + * @member {google.cloud.dataform.v1beta1.CompilationResultAction.IRelation|null|undefined} relation + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.relation = null; + + /** + * CompilationResultAction operations. + * @member {google.cloud.dataform.v1beta1.CompilationResultAction.IOperations|null|undefined} operations + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.operations = null; + + /** + * CompilationResultAction assertion. + * @member {google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion|null|undefined} assertion + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.assertion = null; + + /** + * CompilationResultAction declaration. + * @member {google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration|null|undefined} declaration + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @instance + */ + CompilationResultAction.prototype.declaration = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CompilationResultAction compiledObject. + * @member {"relation"|"operations"|"assertion"|"declaration"|undefined} compiledObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @instance + */ + Object.defineProperty(CompilationResultAction.prototype, "compiledObject", { + get: $util.oneOfGetter($oneOfFields = ["relation", "operations", "assertion", "declaration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CompilationResultAction instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @static + * @param {google.cloud.dataform.v1beta1.ICompilationResultAction=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction} CompilationResultAction instance + */ + CompilationResultAction.create = function create(properties) { + return new CompilationResultAction(properties); + }; + + /** + * Encodes the specified CompilationResultAction message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @static + * @param {google.cloud.dataform.v1beta1.ICompilationResultAction} message CompilationResultAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationResultAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.google.cloud.dataform.v1beta1.Target.encode(message.target, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.canonicalTarget != null && Object.hasOwnProperty.call(message, "canonicalTarget")) + $root.google.cloud.dataform.v1beta1.Target.encode(message.canonicalTarget, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.filePath != null && Object.hasOwnProperty.call(message, "filePath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filePath); + if (message.relation != null && Object.hasOwnProperty.call(message, "relation")) + $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.encode(message.relation, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.operations != null && Object.hasOwnProperty.call(message, "operations")) + $root.google.cloud.dataform.v1beta1.CompilationResultAction.Operations.encode(message.operations, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.assertion != null && Object.hasOwnProperty.call(message, "assertion")) + $root.google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.encode(message.assertion, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.declaration != null && Object.hasOwnProperty.call(message, "declaration")) + $root.google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.encode(message.declaration, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CompilationResultAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @static + * @param {google.cloud.dataform.v1beta1.ICompilationResultAction} message CompilationResultAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompilationResultAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompilationResultAction message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction} CompilationResultAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationResultAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.target = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); + break; + case 2: + message.canonicalTarget = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); + break; + case 3: + message.filePath = reader.string(); + break; + case 4: + message.relation = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.decode(reader, reader.uint32()); + break; + case 5: + message.operations = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Operations.decode(reader, reader.uint32()); + break; + case 6: + message.assertion = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.decode(reader, reader.uint32()); + break; + case 7: + message.declaration = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompilationResultAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction} CompilationResultAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompilationResultAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompilationResultAction message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompilationResultAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.canonicalTarget != null && message.hasOwnProperty("canonicalTarget")) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.canonicalTarget); + if (error) + return "canonicalTarget." + error; + } + if (message.filePath != null && message.hasOwnProperty("filePath")) + if (!$util.isString(message.filePath)) + return "filePath: string expected"; + if (message.relation != null && message.hasOwnProperty("relation")) { + properties.compiledObject = 1; + { + var error = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.verify(message.relation); + if (error) + return "relation." + error; + } + } + if (message.operations != null && message.hasOwnProperty("operations")) { + if (properties.compiledObject === 1) + return "compiledObject: multiple values"; + properties.compiledObject = 1; + { + var error = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Operations.verify(message.operations); + if (error) + return "operations." + error; + } + } + if (message.assertion != null && message.hasOwnProperty("assertion")) { + if (properties.compiledObject === 1) + return "compiledObject: multiple values"; + properties.compiledObject = 1; + { + var error = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.verify(message.assertion); + if (error) + return "assertion." + error; + } + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (properties.compiledObject === 1) + return "compiledObject: multiple values"; + properties.compiledObject = 1; + { + var error = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.verify(message.declaration); + if (error) + return "declaration." + error; + } + } + return null; + }; + + /** + * Creates a CompilationResultAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction} CompilationResultAction + */ + CompilationResultAction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CompilationResultAction) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction(); + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.target: object expected"); + message.target = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.target); + } + if (object.canonicalTarget != null) { + if (typeof object.canonicalTarget !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.canonicalTarget: object expected"); + message.canonicalTarget = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.canonicalTarget); + } + if (object.filePath != null) + message.filePath = String(object.filePath); + if (object.relation != null) { + if (typeof object.relation !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.relation: object expected"); + message.relation = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.fromObject(object.relation); + } + if (object.operations != null) { + if (typeof object.operations !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.operations: object expected"); + message.operations = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Operations.fromObject(object.operations); + } + if (object.assertion != null) { + if (typeof object.assertion !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.assertion: object expected"); + message.assertion = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.fromObject(object.assertion); + } + if (object.declaration != null) { + if (typeof object.declaration !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.declaration: object expected"); + message.declaration = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.fromObject(object.declaration); + } + return message; + }; + + /** + * Creates a plain object from a CompilationResultAction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction} message CompilationResultAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompilationResultAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.target = null; + object.canonicalTarget = null; + object.filePath = ""; + } + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.google.cloud.dataform.v1beta1.Target.toObject(message.target, options); + if (message.canonicalTarget != null && message.hasOwnProperty("canonicalTarget")) + object.canonicalTarget = $root.google.cloud.dataform.v1beta1.Target.toObject(message.canonicalTarget, options); + if (message.filePath != null && message.hasOwnProperty("filePath")) + object.filePath = message.filePath; + if (message.relation != null && message.hasOwnProperty("relation")) { + object.relation = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.toObject(message.relation, options); + if (options.oneofs) + object.compiledObject = "relation"; + } + if (message.operations != null && message.hasOwnProperty("operations")) { + object.operations = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Operations.toObject(message.operations, options); + if (options.oneofs) + object.compiledObject = "operations"; + } + if (message.assertion != null && message.hasOwnProperty("assertion")) { + object.assertion = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.toObject(message.assertion, options); + if (options.oneofs) + object.compiledObject = "assertion"; + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + object.declaration = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.toObject(message.declaration, options); + if (options.oneofs) + object.compiledObject = "declaration"; + } + return object; + }; + + /** + * Converts this CompilationResultAction to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @instance + * @returns {Object.} JSON object + */ + CompilationResultAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + CompilationResultAction.Relation = (function() { + + /** + * Properties of a Relation. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @interface IRelation + * @property {Array.|null} [dependencyTargets] Relation dependencyTargets + * @property {boolean|null} [disabled] Relation disabled + * @property {Array.|null} [tags] Relation tags + * @property {google.cloud.dataform.v1beta1.IRelationDescriptor|null} [relationDescriptor] Relation relationDescriptor + * @property {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType|null} [relationType] Relation relationType + * @property {string|null} [selectQuery] Relation selectQuery + * @property {Array.|null} [preOperations] Relation preOperations + * @property {Array.|null} [postOperations] Relation postOperations + * @property {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig|null} [incrementalTableConfig] Relation incrementalTableConfig + * @property {string|null} [partitionExpression] Relation partitionExpression + * @property {Array.|null} [clusterExpressions] Relation clusterExpressions + * @property {number|null} [partitionExpirationDays] Relation partitionExpirationDays + * @property {boolean|null} [requirePartitionFilter] Relation requirePartitionFilter + * @property {Object.|null} [additionalOptions] Relation additionalOptions + */ + + /** + * Constructs a new Relation. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @classdesc Represents a Relation. + * @implements IRelation + * @constructor + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IRelation=} [properties] Properties to set + */ + function Relation(properties) { + this.dependencyTargets = []; + this.tags = []; + this.preOperations = []; + this.postOperations = []; + this.clusterExpressions = []; + this.additionalOptions = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Relation dependencyTargets. + * @member {Array.} dependencyTargets + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.dependencyTargets = $util.emptyArray; + + /** + * Relation disabled. + * @member {boolean} disabled + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.disabled = false; + + /** + * Relation tags. + * @member {Array.} tags + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.tags = $util.emptyArray; + + /** + * Relation relationDescriptor. + * @member {google.cloud.dataform.v1beta1.IRelationDescriptor|null|undefined} relationDescriptor + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.relationDescriptor = null; + + /** + * Relation relationType. + * @member {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType} relationType + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.relationType = 0; + + /** + * Relation selectQuery. + * @member {string} selectQuery + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.selectQuery = ""; + + /** + * Relation preOperations. + * @member {Array.} preOperations + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.preOperations = $util.emptyArray; + + /** + * Relation postOperations. + * @member {Array.} postOperations + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.postOperations = $util.emptyArray; + + /** + * Relation incrementalTableConfig. + * @member {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig|null|undefined} incrementalTableConfig + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.incrementalTableConfig = null; + + /** + * Relation partitionExpression. + * @member {string} partitionExpression + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.partitionExpression = ""; + + /** + * Relation clusterExpressions. + * @member {Array.} clusterExpressions + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.clusterExpressions = $util.emptyArray; + + /** + * Relation partitionExpirationDays. + * @member {number} partitionExpirationDays + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.partitionExpirationDays = 0; + + /** + * Relation requirePartitionFilter. + * @member {boolean} requirePartitionFilter + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.requirePartitionFilter = false; + + /** + * Relation additionalOptions. + * @member {Object.} additionalOptions + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + */ + Relation.prototype.additionalOptions = $util.emptyObject; + + /** + * Creates a new Relation instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IRelation=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Relation} Relation instance + */ + Relation.create = function create(properties) { + return new Relation(properties); + }; + + /** + * Encodes the specified Relation message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Relation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IRelation} message Relation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Relation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dependencyTargets != null && message.dependencyTargets.length) + for (var i = 0; i < message.dependencyTargets.length; ++i) + $root.google.cloud.dataform.v1beta1.Target.encode(message.dependencyTargets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.disabled); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tags[i]); + if (message.relationDescriptor != null && Object.hasOwnProperty.call(message, "relationDescriptor")) + $root.google.cloud.dataform.v1beta1.RelationDescriptor.encode(message.relationDescriptor, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.relationType != null && Object.hasOwnProperty.call(message, "relationType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.relationType); + if (message.selectQuery != null && Object.hasOwnProperty.call(message, "selectQuery")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.selectQuery); + if (message.preOperations != null && message.preOperations.length) + for (var i = 0; i < message.preOperations.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.preOperations[i]); + if (message.postOperations != null && message.postOperations.length) + for (var i = 0; i < message.postOperations.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.postOperations[i]); + if (message.incrementalTableConfig != null && Object.hasOwnProperty.call(message, "incrementalTableConfig")) + $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.encode(message.incrementalTableConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.partitionExpression != null && Object.hasOwnProperty.call(message, "partitionExpression")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.partitionExpression); + if (message.clusterExpressions != null && message.clusterExpressions.length) + for (var i = 0; i < message.clusterExpressions.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.clusterExpressions[i]); + if (message.partitionExpirationDays != null && Object.hasOwnProperty.call(message, "partitionExpirationDays")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.partitionExpirationDays); + if (message.requirePartitionFilter != null && Object.hasOwnProperty.call(message, "requirePartitionFilter")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.requirePartitionFilter); + if (message.additionalOptions != null && Object.hasOwnProperty.call(message, "additionalOptions")) + for (var keys = Object.keys(message.additionalOptions), i = 0; i < keys.length; ++i) + writer.uint32(/* id 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.additionalOptions[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified Relation message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Relation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IRelation} message Relation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Relation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Relation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Relation} Relation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Relation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.dependencyTargets && message.dependencyTargets.length)) + message.dependencyTargets = []; + message.dependencyTargets.push($root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32())); + break; + case 2: + message.disabled = reader.bool(); + break; + case 3: + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + case 4: + message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.decode(reader, reader.uint32()); + break; + case 5: + message.relationType = reader.int32(); + break; + case 6: + message.selectQuery = reader.string(); + break; + case 7: + if (!(message.preOperations && message.preOperations.length)) + message.preOperations = []; + message.preOperations.push(reader.string()); + break; + case 8: + if (!(message.postOperations && message.postOperations.length)) + message.postOperations = []; + message.postOperations.push(reader.string()); + break; + case 9: + message.incrementalTableConfig = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.decode(reader, reader.uint32()); + break; + case 10: + message.partitionExpression = reader.string(); + break; + case 11: + if (!(message.clusterExpressions && message.clusterExpressions.length)) + message.clusterExpressions = []; + message.clusterExpressions.push(reader.string()); + break; + case 12: + message.partitionExpirationDays = reader.int32(); + break; + case 13: + message.requirePartitionFilter = reader.bool(); + break; + case 14: + if (message.additionalOptions === $util.emptyObject) + message.additionalOptions = {}; + 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.additionalOptions[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Relation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Relation} Relation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Relation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Relation message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Relation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dependencyTargets != null && message.hasOwnProperty("dependencyTargets")) { + if (!Array.isArray(message.dependencyTargets)) + return "dependencyTargets: array expected"; + for (var i = 0; i < message.dependencyTargets.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.dependencyTargets[i]); + if (error) + return "dependencyTargets." + error; + } + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean 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.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) { + var error = $root.google.cloud.dataform.v1beta1.RelationDescriptor.verify(message.relationDescriptor); + if (error) + return "relationDescriptor." + error; + } + if (message.relationType != null && message.hasOwnProperty("relationType")) + switch (message.relationType) { + default: + return "relationType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.selectQuery != null && message.hasOwnProperty("selectQuery")) + if (!$util.isString(message.selectQuery)) + return "selectQuery: string expected"; + if (message.preOperations != null && message.hasOwnProperty("preOperations")) { + if (!Array.isArray(message.preOperations)) + return "preOperations: array expected"; + for (var i = 0; i < message.preOperations.length; ++i) + if (!$util.isString(message.preOperations[i])) + return "preOperations: string[] expected"; + } + if (message.postOperations != null && message.hasOwnProperty("postOperations")) { + if (!Array.isArray(message.postOperations)) + return "postOperations: array expected"; + for (var i = 0; i < message.postOperations.length; ++i) + if (!$util.isString(message.postOperations[i])) + return "postOperations: string[] expected"; + } + if (message.incrementalTableConfig != null && message.hasOwnProperty("incrementalTableConfig")) { + var error = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.verify(message.incrementalTableConfig); + if (error) + return "incrementalTableConfig." + error; + } + if (message.partitionExpression != null && message.hasOwnProperty("partitionExpression")) + if (!$util.isString(message.partitionExpression)) + return "partitionExpression: string expected"; + if (message.clusterExpressions != null && message.hasOwnProperty("clusterExpressions")) { + if (!Array.isArray(message.clusterExpressions)) + return "clusterExpressions: array expected"; + for (var i = 0; i < message.clusterExpressions.length; ++i) + if (!$util.isString(message.clusterExpressions[i])) + return "clusterExpressions: string[] expected"; + } + if (message.partitionExpirationDays != null && message.hasOwnProperty("partitionExpirationDays")) + if (!$util.isInteger(message.partitionExpirationDays)) + return "partitionExpirationDays: integer expected"; + if (message.requirePartitionFilter != null && message.hasOwnProperty("requirePartitionFilter")) + if (typeof message.requirePartitionFilter !== "boolean") + return "requirePartitionFilter: boolean expected"; + if (message.additionalOptions != null && message.hasOwnProperty("additionalOptions")) { + if (!$util.isObject(message.additionalOptions)) + return "additionalOptions: object expected"; + var key = Object.keys(message.additionalOptions); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.additionalOptions[key[i]])) + return "additionalOptions: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a Relation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Relation} Relation + */ + Relation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation(); + if (object.dependencyTargets) { + if (!Array.isArray(object.dependencyTargets)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.dependencyTargets: array expected"); + message.dependencyTargets = []; + for (var i = 0; i < object.dependencyTargets.length; ++i) { + if (typeof object.dependencyTargets[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.dependencyTargets: object expected"); + message.dependencyTargets[i] = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.dependencyTargets[i]); + } + } + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.relationDescriptor != null) { + if (typeof object.relationDescriptor !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.relationDescriptor: object expected"); + message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.fromObject(object.relationDescriptor); + } + switch (object.relationType) { + case "RELATION_TYPE_UNSPECIFIED": + case 0: + message.relationType = 0; + break; + case "TABLE": + case 1: + message.relationType = 1; + break; + case "VIEW": + case 2: + message.relationType = 2; + break; + case "INCREMENTAL_TABLE": + case 3: + message.relationType = 3; + break; + case "MATERIALIZED_VIEW": + case 4: + message.relationType = 4; + break; + } + if (object.selectQuery != null) + message.selectQuery = String(object.selectQuery); + if (object.preOperations) { + if (!Array.isArray(object.preOperations)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.preOperations: array expected"); + message.preOperations = []; + for (var i = 0; i < object.preOperations.length; ++i) + message.preOperations[i] = String(object.preOperations[i]); + } + if (object.postOperations) { + if (!Array.isArray(object.postOperations)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.postOperations: array expected"); + message.postOperations = []; + for (var i = 0; i < object.postOperations.length; ++i) + message.postOperations[i] = String(object.postOperations[i]); + } + if (object.incrementalTableConfig != null) { + if (typeof object.incrementalTableConfig !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.incrementalTableConfig: object expected"); + message.incrementalTableConfig = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.fromObject(object.incrementalTableConfig); + } + if (object.partitionExpression != null) + message.partitionExpression = String(object.partitionExpression); + if (object.clusterExpressions) { + if (!Array.isArray(object.clusterExpressions)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.clusterExpressions: array expected"); + message.clusterExpressions = []; + for (var i = 0; i < object.clusterExpressions.length; ++i) + message.clusterExpressions[i] = String(object.clusterExpressions[i]); + } + if (object.partitionExpirationDays != null) + message.partitionExpirationDays = object.partitionExpirationDays | 0; + if (object.requirePartitionFilter != null) + message.requirePartitionFilter = Boolean(object.requirePartitionFilter); + if (object.additionalOptions) { + if (typeof object.additionalOptions !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.additionalOptions: object expected"); + message.additionalOptions = {}; + for (var keys = Object.keys(object.additionalOptions), i = 0; i < keys.length; ++i) + message.additionalOptions[keys[i]] = String(object.additionalOptions[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a Relation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.Relation} message Relation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Relation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependencyTargets = []; + object.tags = []; + object.preOperations = []; + object.postOperations = []; + object.clusterExpressions = []; + } + if (options.objects || options.defaults) + object.additionalOptions = {}; + if (options.defaults) { + object.disabled = false; + object.relationDescriptor = null; + object.relationType = options.enums === String ? "RELATION_TYPE_UNSPECIFIED" : 0; + object.selectQuery = ""; + object.incrementalTableConfig = null; + object.partitionExpression = ""; + object.partitionExpirationDays = 0; + object.requirePartitionFilter = false; + } + if (message.dependencyTargets && message.dependencyTargets.length) { + object.dependencyTargets = []; + for (var j = 0; j < message.dependencyTargets.length; ++j) + object.dependencyTargets[j] = $root.google.cloud.dataform.v1beta1.Target.toObject(message.dependencyTargets[j], options); + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + 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.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) + object.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.toObject(message.relationDescriptor, options); + if (message.relationType != null && message.hasOwnProperty("relationType")) + object.relationType = options.enums === String ? $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType[message.relationType] : message.relationType; + if (message.selectQuery != null && message.hasOwnProperty("selectQuery")) + object.selectQuery = message.selectQuery; + if (message.preOperations && message.preOperations.length) { + object.preOperations = []; + for (var j = 0; j < message.preOperations.length; ++j) + object.preOperations[j] = message.preOperations[j]; + } + if (message.postOperations && message.postOperations.length) { + object.postOperations = []; + for (var j = 0; j < message.postOperations.length; ++j) + object.postOperations[j] = message.postOperations[j]; + } + if (message.incrementalTableConfig != null && message.hasOwnProperty("incrementalTableConfig")) + object.incrementalTableConfig = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.toObject(message.incrementalTableConfig, options); + if (message.partitionExpression != null && message.hasOwnProperty("partitionExpression")) + object.partitionExpression = message.partitionExpression; + if (message.clusterExpressions && message.clusterExpressions.length) { + object.clusterExpressions = []; + for (var j = 0; j < message.clusterExpressions.length; ++j) + object.clusterExpressions[j] = message.clusterExpressions[j]; + } + if (message.partitionExpirationDays != null && message.hasOwnProperty("partitionExpirationDays")) + object.partitionExpirationDays = message.partitionExpirationDays; + if (message.requirePartitionFilter != null && message.hasOwnProperty("requirePartitionFilter")) + object.requirePartitionFilter = message.requirePartitionFilter; + var keys2; + if (message.additionalOptions && (keys2 = Object.keys(message.additionalOptions)).length) { + object.additionalOptions = {}; + for (var j = 0; j < keys2.length; ++j) + object.additionalOptions[keys2[j]] = message.additionalOptions[keys2[j]]; + } + return object; + }; + + /** + * Converts this Relation to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @instance + * @returns {Object.} JSON object + */ + Relation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * RelationType enum. + * @name google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType + * @enum {number} + * @property {number} RELATION_TYPE_UNSPECIFIED=0 RELATION_TYPE_UNSPECIFIED value + * @property {number} TABLE=1 TABLE value + * @property {number} VIEW=2 VIEW value + * @property {number} INCREMENTAL_TABLE=3 INCREMENTAL_TABLE value + * @property {number} MATERIALIZED_VIEW=4 MATERIALIZED_VIEW value + */ + Relation.RelationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RELATION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TABLE"] = 1; + values[valuesById[2] = "VIEW"] = 2; + values[valuesById[3] = "INCREMENTAL_TABLE"] = 3; + values[valuesById[4] = "MATERIALIZED_VIEW"] = 4; + return values; + })(); + + Relation.IncrementalTableConfig = (function() { + + /** + * Properties of an IncrementalTableConfig. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @interface IIncrementalTableConfig + * @property {string|null} [incrementalSelectQuery] IncrementalTableConfig incrementalSelectQuery + * @property {boolean|null} [refreshDisabled] IncrementalTableConfig refreshDisabled + * @property {Array.|null} [uniqueKeyParts] IncrementalTableConfig uniqueKeyParts + * @property {string|null} [updatePartitionFilter] IncrementalTableConfig updatePartitionFilter + * @property {Array.|null} [incrementalPreOperations] IncrementalTableConfig incrementalPreOperations + * @property {Array.|null} [incrementalPostOperations] IncrementalTableConfig incrementalPostOperations + */ + + /** + * Constructs a new IncrementalTableConfig. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @classdesc Represents an IncrementalTableConfig. + * @implements IIncrementalTableConfig + * @constructor + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig=} [properties] Properties to set + */ + function IncrementalTableConfig(properties) { + this.uniqueKeyParts = []; + this.incrementalPreOperations = []; + this.incrementalPostOperations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IncrementalTableConfig incrementalSelectQuery. + * @member {string} incrementalSelectQuery + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.incrementalSelectQuery = ""; + + /** + * IncrementalTableConfig refreshDisabled. + * @member {boolean} refreshDisabled + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.refreshDisabled = false; + + /** + * IncrementalTableConfig uniqueKeyParts. + * @member {Array.} uniqueKeyParts + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.uniqueKeyParts = $util.emptyArray; + + /** + * IncrementalTableConfig updatePartitionFilter. + * @member {string} updatePartitionFilter + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.updatePartitionFilter = ""; + + /** + * IncrementalTableConfig incrementalPreOperations. + * @member {Array.} incrementalPreOperations + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.incrementalPreOperations = $util.emptyArray; + + /** + * IncrementalTableConfig incrementalPostOperations. + * @member {Array.} incrementalPostOperations + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + */ + IncrementalTableConfig.prototype.incrementalPostOperations = $util.emptyArray; + + /** + * Creates a new IncrementalTableConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig} IncrementalTableConfig instance + */ + IncrementalTableConfig.create = function create(properties) { + return new IncrementalTableConfig(properties); + }; + + /** + * Encodes the specified IncrementalTableConfig message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig} message IncrementalTableConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IncrementalTableConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.incrementalSelectQuery != null && Object.hasOwnProperty.call(message, "incrementalSelectQuery")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.incrementalSelectQuery); + if (message.refreshDisabled != null && Object.hasOwnProperty.call(message, "refreshDisabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.refreshDisabled); + if (message.uniqueKeyParts != null && message.uniqueKeyParts.length) + for (var i = 0; i < message.uniqueKeyParts.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uniqueKeyParts[i]); + if (message.updatePartitionFilter != null && Object.hasOwnProperty.call(message, "updatePartitionFilter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.updatePartitionFilter); + if (message.incrementalPreOperations != null && message.incrementalPreOperations.length) + for (var i = 0; i < message.incrementalPreOperations.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.incrementalPreOperations[i]); + if (message.incrementalPostOperations != null && message.incrementalPostOperations.length) + for (var i = 0; i < message.incrementalPostOperations.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.incrementalPostOperations[i]); + return writer; + }; + + /** + * Encodes the specified IncrementalTableConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IIncrementalTableConfig} message IncrementalTableConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IncrementalTableConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IncrementalTableConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig} IncrementalTableConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IncrementalTableConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.incrementalSelectQuery = reader.string(); + break; + case 2: + message.refreshDisabled = reader.bool(); + break; + case 3: + if (!(message.uniqueKeyParts && message.uniqueKeyParts.length)) + message.uniqueKeyParts = []; + message.uniqueKeyParts.push(reader.string()); + break; + case 4: + message.updatePartitionFilter = reader.string(); + break; + case 5: + if (!(message.incrementalPreOperations && message.incrementalPreOperations.length)) + message.incrementalPreOperations = []; + message.incrementalPreOperations.push(reader.string()); + break; + case 6: + if (!(message.incrementalPostOperations && message.incrementalPostOperations.length)) + message.incrementalPostOperations = []; + message.incrementalPostOperations.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IncrementalTableConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig} IncrementalTableConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IncrementalTableConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IncrementalTableConfig message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IncrementalTableConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.incrementalSelectQuery != null && message.hasOwnProperty("incrementalSelectQuery")) + if (!$util.isString(message.incrementalSelectQuery)) + return "incrementalSelectQuery: string expected"; + if (message.refreshDisabled != null && message.hasOwnProperty("refreshDisabled")) + if (typeof message.refreshDisabled !== "boolean") + return "refreshDisabled: boolean expected"; + if (message.uniqueKeyParts != null && message.hasOwnProperty("uniqueKeyParts")) { + if (!Array.isArray(message.uniqueKeyParts)) + return "uniqueKeyParts: array expected"; + for (var i = 0; i < message.uniqueKeyParts.length; ++i) + if (!$util.isString(message.uniqueKeyParts[i])) + return "uniqueKeyParts: string[] expected"; + } + if (message.updatePartitionFilter != null && message.hasOwnProperty("updatePartitionFilter")) + if (!$util.isString(message.updatePartitionFilter)) + return "updatePartitionFilter: string expected"; + if (message.incrementalPreOperations != null && message.hasOwnProperty("incrementalPreOperations")) { + if (!Array.isArray(message.incrementalPreOperations)) + return "incrementalPreOperations: array expected"; + for (var i = 0; i < message.incrementalPreOperations.length; ++i) + if (!$util.isString(message.incrementalPreOperations[i])) + return "incrementalPreOperations: string[] expected"; + } + if (message.incrementalPostOperations != null && message.hasOwnProperty("incrementalPostOperations")) { + if (!Array.isArray(message.incrementalPostOperations)) + return "incrementalPostOperations: array expected"; + for (var i = 0; i < message.incrementalPostOperations.length; ++i) + if (!$util.isString(message.incrementalPostOperations[i])) + return "incrementalPostOperations: string[] expected"; + } + return null; + }; + + /** + * Creates an IncrementalTableConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig} IncrementalTableConfig + */ + IncrementalTableConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig(); + if (object.incrementalSelectQuery != null) + message.incrementalSelectQuery = String(object.incrementalSelectQuery); + if (object.refreshDisabled != null) + message.refreshDisabled = Boolean(object.refreshDisabled); + if (object.uniqueKeyParts) { + if (!Array.isArray(object.uniqueKeyParts)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.uniqueKeyParts: array expected"); + message.uniqueKeyParts = []; + for (var i = 0; i < object.uniqueKeyParts.length; ++i) + message.uniqueKeyParts[i] = String(object.uniqueKeyParts[i]); + } + if (object.updatePartitionFilter != null) + message.updatePartitionFilter = String(object.updatePartitionFilter); + if (object.incrementalPreOperations) { + if (!Array.isArray(object.incrementalPreOperations)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.incrementalPreOperations: array expected"); + message.incrementalPreOperations = []; + for (var i = 0; i < object.incrementalPreOperations.length; ++i) + message.incrementalPreOperations[i] = String(object.incrementalPreOperations[i]); + } + if (object.incrementalPostOperations) { + if (!Array.isArray(object.incrementalPostOperations)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.incrementalPostOperations: array expected"); + message.incrementalPostOperations = []; + for (var i = 0; i < object.incrementalPostOperations.length; ++i) + message.incrementalPostOperations[i] = String(object.incrementalPostOperations[i]); + } + return message; + }; + + /** + * Creates a plain object from an IncrementalTableConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig} message IncrementalTableConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IncrementalTableConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uniqueKeyParts = []; + object.incrementalPreOperations = []; + object.incrementalPostOperations = []; + } + if (options.defaults) { + object.incrementalSelectQuery = ""; + object.refreshDisabled = false; + object.updatePartitionFilter = ""; + } + if (message.incrementalSelectQuery != null && message.hasOwnProperty("incrementalSelectQuery")) + object.incrementalSelectQuery = message.incrementalSelectQuery; + if (message.refreshDisabled != null && message.hasOwnProperty("refreshDisabled")) + object.refreshDisabled = message.refreshDisabled; + if (message.uniqueKeyParts && message.uniqueKeyParts.length) { + object.uniqueKeyParts = []; + for (var j = 0; j < message.uniqueKeyParts.length; ++j) + object.uniqueKeyParts[j] = message.uniqueKeyParts[j]; + } + if (message.updatePartitionFilter != null && message.hasOwnProperty("updatePartitionFilter")) + object.updatePartitionFilter = message.updatePartitionFilter; + if (message.incrementalPreOperations && message.incrementalPreOperations.length) { + object.incrementalPreOperations = []; + for (var j = 0; j < message.incrementalPreOperations.length; ++j) + object.incrementalPreOperations[j] = message.incrementalPreOperations[j]; + } + if (message.incrementalPostOperations && message.incrementalPostOperations.length) { + object.incrementalPostOperations = []; + for (var j = 0; j < message.incrementalPostOperations.length; ++j) + object.incrementalPostOperations[j] = message.incrementalPostOperations[j]; + } + return object; + }; + + /** + * Converts this IncrementalTableConfig to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @instance + * @returns {Object.} JSON object + */ + IncrementalTableConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IncrementalTableConfig; + })(); + + return Relation; + })(); + + CompilationResultAction.Operations = (function() { + + /** + * Properties of an Operations. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @interface IOperations + * @property {Array.|null} [dependencyTargets] Operations dependencyTargets + * @property {boolean|null} [disabled] Operations disabled + * @property {Array.|null} [tags] Operations tags + * @property {google.cloud.dataform.v1beta1.IRelationDescriptor|null} [relationDescriptor] Operations relationDescriptor + * @property {Array.|null} [queries] Operations queries + * @property {boolean|null} [hasOutput] Operations hasOutput + */ + + /** + * Constructs a new Operations. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @classdesc Represents an Operations. + * @implements IOperations + * @constructor + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IOperations=} [properties] Properties to set + */ + function Operations(properties) { + this.dependencyTargets = []; + this.tags = []; + this.queries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Operations dependencyTargets. + * @member {Array.} dependencyTargets + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.dependencyTargets = $util.emptyArray; + + /** + * Operations disabled. + * @member {boolean} disabled + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.disabled = false; + + /** + * Operations tags. + * @member {Array.} tags + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.tags = $util.emptyArray; + + /** + * Operations relationDescriptor. + * @member {google.cloud.dataform.v1beta1.IRelationDescriptor|null|undefined} relationDescriptor + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.relationDescriptor = null; + + /** + * Operations queries. + * @member {Array.} queries + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.queries = $util.emptyArray; + + /** + * Operations hasOutput. + * @member {boolean} hasOutput + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @instance + */ + Operations.prototype.hasOutput = false; + + /** + * Creates a new Operations instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IOperations=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Operations} Operations instance + */ + Operations.create = function create(properties) { + return new Operations(properties); + }; + + /** + * Encodes the specified Operations message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Operations.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IOperations} message Operations message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operations.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dependencyTargets != null && message.dependencyTargets.length) + for (var i = 0; i < message.dependencyTargets.length; ++i) + $root.google.cloud.dataform.v1beta1.Target.encode(message.dependencyTargets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.disabled); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tags[i]); + if (message.queries != null && message.queries.length) + for (var i = 0; i < message.queries.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.queries[i]); + if (message.hasOutput != null && Object.hasOwnProperty.call(message, "hasOutput")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.hasOutput); + if (message.relationDescriptor != null && Object.hasOwnProperty.call(message, "relationDescriptor")) + $root.google.cloud.dataform.v1beta1.RelationDescriptor.encode(message.relationDescriptor, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Operations message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Operations.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IOperations} message Operations message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operations.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Operations message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Operations} Operations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operations.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Operations(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.dependencyTargets && message.dependencyTargets.length)) + message.dependencyTargets = []; + message.dependencyTargets.push($root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32())); + break; + case 2: + message.disabled = reader.bool(); + break; + case 3: + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + case 6: + message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.queries && message.queries.length)) + message.queries = []; + message.queries.push(reader.string()); + break; + case 5: + message.hasOutput = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Operations message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Operations} Operations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operations.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Operations message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operations.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dependencyTargets != null && message.hasOwnProperty("dependencyTargets")) { + if (!Array.isArray(message.dependencyTargets)) + return "dependencyTargets: array expected"; + for (var i = 0; i < message.dependencyTargets.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.dependencyTargets[i]); + if (error) + return "dependencyTargets." + error; + } + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean 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.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) { + var error = $root.google.cloud.dataform.v1beta1.RelationDescriptor.verify(message.relationDescriptor); + if (error) + return "relationDescriptor." + error; + } + if (message.queries != null && message.hasOwnProperty("queries")) { + if (!Array.isArray(message.queries)) + return "queries: array expected"; + for (var i = 0; i < message.queries.length; ++i) + if (!$util.isString(message.queries[i])) + return "queries: string[] expected"; + } + if (message.hasOutput != null && message.hasOwnProperty("hasOutput")) + if (typeof message.hasOutput !== "boolean") + return "hasOutput: boolean expected"; + return null; + }; + + /** + * Creates an Operations message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Operations} Operations + */ + Operations.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CompilationResultAction.Operations) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Operations(); + if (object.dependencyTargets) { + if (!Array.isArray(object.dependencyTargets)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Operations.dependencyTargets: array expected"); + message.dependencyTargets = []; + for (var i = 0; i < object.dependencyTargets.length; ++i) { + if (typeof object.dependencyTargets[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Operations.dependencyTargets: object expected"); + message.dependencyTargets[i] = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.dependencyTargets[i]); + } + } + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Operations.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.relationDescriptor != null) { + if (typeof object.relationDescriptor !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Operations.relationDescriptor: object expected"); + message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.fromObject(object.relationDescriptor); + } + if (object.queries) { + if (!Array.isArray(object.queries)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Operations.queries: array expected"); + message.queries = []; + for (var i = 0; i < object.queries.length; ++i) + message.queries[i] = String(object.queries[i]); + } + if (object.hasOutput != null) + message.hasOutput = Boolean(object.hasOutput); + return message; + }; + + /** + * Creates a plain object from an Operations message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.Operations} message Operations + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operations.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependencyTargets = []; + object.tags = []; + object.queries = []; + } + if (options.defaults) { + object.disabled = false; + object.hasOutput = false; + object.relationDescriptor = null; + } + if (message.dependencyTargets && message.dependencyTargets.length) { + object.dependencyTargets = []; + for (var j = 0; j < message.dependencyTargets.length; ++j) + object.dependencyTargets[j] = $root.google.cloud.dataform.v1beta1.Target.toObject(message.dependencyTargets[j], options); + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + 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.queries && message.queries.length) { + object.queries = []; + for (var j = 0; j < message.queries.length; ++j) + object.queries[j] = message.queries[j]; + } + if (message.hasOutput != null && message.hasOwnProperty("hasOutput")) + object.hasOutput = message.hasOutput; + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) + object.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.toObject(message.relationDescriptor, options); + return object; + }; + + /** + * Converts this Operations to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @instance + * @returns {Object.} JSON object + */ + Operations.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Operations; + })(); + + CompilationResultAction.Assertion = (function() { + + /** + * Properties of an Assertion. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @interface IAssertion + * @property {Array.|null} [dependencyTargets] Assertion dependencyTargets + * @property {google.cloud.dataform.v1beta1.ITarget|null} [parentAction] Assertion parentAction + * @property {boolean|null} [disabled] Assertion disabled + * @property {Array.|null} [tags] Assertion tags + * @property {string|null} [selectQuery] Assertion selectQuery + * @property {google.cloud.dataform.v1beta1.IRelationDescriptor|null} [relationDescriptor] Assertion relationDescriptor + */ + + /** + * Constructs a new Assertion. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @classdesc Represents an Assertion. + * @implements IAssertion + * @constructor + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion=} [properties] Properties to set + */ + function Assertion(properties) { + this.dependencyTargets = []; + this.tags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Assertion dependencyTargets. + * @member {Array.} dependencyTargets + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.dependencyTargets = $util.emptyArray; + + /** + * Assertion parentAction. + * @member {google.cloud.dataform.v1beta1.ITarget|null|undefined} parentAction + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.parentAction = null; + + /** + * Assertion disabled. + * @member {boolean} disabled + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.disabled = false; + + /** + * Assertion tags. + * @member {Array.} tags + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.tags = $util.emptyArray; + + /** + * Assertion selectQuery. + * @member {string} selectQuery + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.selectQuery = ""; + + /** + * Assertion relationDescriptor. + * @member {google.cloud.dataform.v1beta1.IRelationDescriptor|null|undefined} relationDescriptor + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @instance + */ + Assertion.prototype.relationDescriptor = null; + + /** + * Creates a new Assertion instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Assertion} Assertion instance + */ + Assertion.create = function create(properties) { + return new Assertion(properties); + }; + + /** + * Encodes the specified Assertion message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion} message Assertion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Assertion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dependencyTargets != null && message.dependencyTargets.length) + for (var i = 0; i < message.dependencyTargets.length; ++i) + $root.google.cloud.dataform.v1beta1.Target.encode(message.dependencyTargets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.disabled); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tags[i]); + if (message.selectQuery != null && Object.hasOwnProperty.call(message, "selectQuery")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.selectQuery); + if (message.parentAction != null && Object.hasOwnProperty.call(message, "parentAction")) + $root.google.cloud.dataform.v1beta1.Target.encode(message.parentAction, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.relationDescriptor != null && Object.hasOwnProperty.call(message, "relationDescriptor")) + $root.google.cloud.dataform.v1beta1.RelationDescriptor.encode(message.relationDescriptor, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Assertion message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IAssertion} message Assertion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Assertion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Assertion message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Assertion} Assertion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Assertion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Assertion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.dependencyTargets && message.dependencyTargets.length)) + message.dependencyTargets = []; + message.dependencyTargets.push($root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32())); + break; + case 5: + message.parentAction = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); + break; + case 2: + message.disabled = reader.bool(); + break; + case 3: + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + case 4: + message.selectQuery = reader.string(); + break; + case 6: + message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Assertion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Assertion} Assertion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Assertion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Assertion message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Assertion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dependencyTargets != null && message.hasOwnProperty("dependencyTargets")) { + if (!Array.isArray(message.dependencyTargets)) + return "dependencyTargets: array expected"; + for (var i = 0; i < message.dependencyTargets.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.dependencyTargets[i]); + if (error) + return "dependencyTargets." + error; + } + } + if (message.parentAction != null && message.hasOwnProperty("parentAction")) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.parentAction); + if (error) + return "parentAction." + error; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean 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.selectQuery != null && message.hasOwnProperty("selectQuery")) + if (!$util.isString(message.selectQuery)) + return "selectQuery: string expected"; + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) { + var error = $root.google.cloud.dataform.v1beta1.RelationDescriptor.verify(message.relationDescriptor); + if (error) + return "relationDescriptor." + error; + } + return null; + }; + + /** + * Creates an Assertion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Assertion} Assertion + */ + Assertion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CompilationResultAction.Assertion) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Assertion(); + if (object.dependencyTargets) { + if (!Array.isArray(object.dependencyTargets)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.dependencyTargets: array expected"); + message.dependencyTargets = []; + for (var i = 0; i < object.dependencyTargets.length; ++i) { + if (typeof object.dependencyTargets[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.dependencyTargets: object expected"); + message.dependencyTargets[i] = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.dependencyTargets[i]); + } + } + if (object.parentAction != null) { + if (typeof object.parentAction !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.parentAction: object expected"); + message.parentAction = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.parentAction); + } + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.selectQuery != null) + message.selectQuery = String(object.selectQuery); + if (object.relationDescriptor != null) { + if (typeof object.relationDescriptor !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.relationDescriptor: object expected"); + message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.fromObject(object.relationDescriptor); + } + return message; + }; + + /** + * Creates a plain object from an Assertion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.Assertion} message Assertion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Assertion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependencyTargets = []; + object.tags = []; + } + if (options.defaults) { + object.disabled = false; + object.selectQuery = ""; + object.parentAction = null; + object.relationDescriptor = null; + } + if (message.dependencyTargets && message.dependencyTargets.length) { + object.dependencyTargets = []; + for (var j = 0; j < message.dependencyTargets.length; ++j) + object.dependencyTargets[j] = $root.google.cloud.dataform.v1beta1.Target.toObject(message.dependencyTargets[j], options); + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + 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.selectQuery != null && message.hasOwnProperty("selectQuery")) + object.selectQuery = message.selectQuery; + if (message.parentAction != null && message.hasOwnProperty("parentAction")) + object.parentAction = $root.google.cloud.dataform.v1beta1.Target.toObject(message.parentAction, options); + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) + object.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.toObject(message.relationDescriptor, options); + return object; + }; + + /** + * Converts this Assertion to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @instance + * @returns {Object.} JSON object + */ + Assertion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Assertion; + })(); + + CompilationResultAction.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @interface IDeclaration + * @property {google.cloud.dataform.v1beta1.IRelationDescriptor|null} [relationDescriptor] Declaration relationDescriptor + */ + + /** + * Constructs a new Declaration. + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.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 relationDescriptor. + * @member {google.cloud.dataform.v1beta1.IRelationDescriptor|null|undefined} relationDescriptor + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @instance + */ + Declaration.prototype.relationDescriptor = null; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.IDeclaration=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.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.relationDescriptor != null && Object.hasOwnProperty.call(message, "relationDescriptor")) + $root.google.cloud.dataform.v1beta1.RelationDescriptor.encode(message.relationDescriptor, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.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.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.decode(reader, reader.uint32()); + 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.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.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.cloud.dataform.v1beta1.CompilationResultAction.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.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) { + var error = $root.google.cloud.dataform.v1beta1.RelationDescriptor.verify(message.relationDescriptor); + if (error) + return "relationDescriptor." + error; + } + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CompilationResultAction.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CompilationResultAction.Declaration) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CompilationResultAction.Declaration(); + if (object.relationDescriptor != null) { + if (typeof object.relationDescriptor !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.relationDescriptor: object expected"); + message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.fromObject(object.relationDescriptor); + } + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @static + * @param {google.cloud.dataform.v1beta1.CompilationResultAction.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.relationDescriptor = null; + if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) + object.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.toObject(message.relationDescriptor, options); + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Declaration; + })(); + + return CompilationResultAction; + })(); + + v1beta1.QueryCompilationResultActionsRequest = (function() { + + /** + * Properties of a QueryCompilationResultActionsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IQueryCompilationResultActionsRequest + * @property {string|null} [name] QueryCompilationResultActionsRequest name + * @property {number|null} [pageSize] QueryCompilationResultActionsRequest pageSize + * @property {string|null} [pageToken] QueryCompilationResultActionsRequest pageToken + * @property {string|null} [filter] QueryCompilationResultActionsRequest filter + */ + + /** + * Constructs a new QueryCompilationResultActionsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a QueryCompilationResultActionsRequest. + * @implements IQueryCompilationResultActionsRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest=} [properties] Properties to set + */ + function QueryCompilationResultActionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryCompilationResultActionsRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @instance + */ + QueryCompilationResultActionsRequest.prototype.name = ""; + + /** + * QueryCompilationResultActionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @instance + */ + QueryCompilationResultActionsRequest.prototype.pageSize = 0; + + /** + * QueryCompilationResultActionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @instance + */ + QueryCompilationResultActionsRequest.prototype.pageToken = ""; + + /** + * QueryCompilationResultActionsRequest filter. + * @member {string} filter + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @instance + */ + QueryCompilationResultActionsRequest.prototype.filter = ""; + + /** + * Creates a new QueryCompilationResultActionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest} QueryCompilationResultActionsRequest instance + */ + QueryCompilationResultActionsRequest.create = function create(properties) { + return new QueryCompilationResultActionsRequest(properties); + }; + + /** + * Encodes the specified QueryCompilationResultActionsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest} message QueryCompilationResultActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryCompilationResultActionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified QueryCompilationResultActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest} message QueryCompilationResultActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryCompilationResultActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryCompilationResultActionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest} QueryCompilationResultActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryCompilationResultActionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryCompilationResultActionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest} QueryCompilationResultActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryCompilationResultActionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryCompilationResultActionsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryCompilationResultActionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a QueryCompilationResultActionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest} QueryCompilationResultActionsRequest + */ + QueryCompilationResultActionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a QueryCompilationResultActionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @static + * @param {google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest} message QueryCompilationResultActionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryCompilationResultActionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this QueryCompilationResultActionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryCompilationResultActionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryCompilationResultActionsRequest; + })(); + + v1beta1.QueryCompilationResultActionsResponse = (function() { + + /** + * Properties of a QueryCompilationResultActionsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IQueryCompilationResultActionsResponse + * @property {Array.|null} [compilationResultActions] QueryCompilationResultActionsResponse compilationResultActions + * @property {string|null} [nextPageToken] QueryCompilationResultActionsResponse nextPageToken + */ + + /** + * Constructs a new QueryCompilationResultActionsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a QueryCompilationResultActionsResponse. + * @implements IQueryCompilationResultActionsResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse=} [properties] Properties to set + */ + function QueryCompilationResultActionsResponse(properties) { + this.compilationResultActions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryCompilationResultActionsResponse compilationResultActions. + * @member {Array.} compilationResultActions + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @instance + */ + QueryCompilationResultActionsResponse.prototype.compilationResultActions = $util.emptyArray; + + /** + * QueryCompilationResultActionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @instance + */ + QueryCompilationResultActionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new QueryCompilationResultActionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse} QueryCompilationResultActionsResponse instance + */ + QueryCompilationResultActionsResponse.create = function create(properties) { + return new QueryCompilationResultActionsResponse(properties); + }; + + /** + * Encodes the specified QueryCompilationResultActionsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse} message QueryCompilationResultActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryCompilationResultActionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.compilationResultActions != null && message.compilationResultActions.length) + for (var i = 0; i < message.compilationResultActions.length; ++i) + $root.google.cloud.dataform.v1beta1.CompilationResultAction.encode(message.compilationResultActions[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 QueryCompilationResultActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse} message QueryCompilationResultActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryCompilationResultActionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryCompilationResultActionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse} QueryCompilationResultActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryCompilationResultActionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.compilationResultActions && message.compilationResultActions.length)) + message.compilationResultActions = []; + message.compilationResultActions.push($root.google.cloud.dataform.v1beta1.CompilationResultAction.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryCompilationResultActionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse} QueryCompilationResultActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryCompilationResultActionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryCompilationResultActionsResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryCompilationResultActionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.compilationResultActions != null && message.hasOwnProperty("compilationResultActions")) { + if (!Array.isArray(message.compilationResultActions)) + return "compilationResultActions: array expected"; + for (var i = 0; i < message.compilationResultActions.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.CompilationResultAction.verify(message.compilationResultActions[i]); + if (error) + return "compilationResultActions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a QueryCompilationResultActionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse} QueryCompilationResultActionsResponse + */ + QueryCompilationResultActionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse(); + if (object.compilationResultActions) { + if (!Array.isArray(object.compilationResultActions)) + throw TypeError(".google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse.compilationResultActions: array expected"); + message.compilationResultActions = []; + for (var i = 0; i < object.compilationResultActions.length; ++i) { + if (typeof object.compilationResultActions[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse.compilationResultActions: object expected"); + message.compilationResultActions[i] = $root.google.cloud.dataform.v1beta1.CompilationResultAction.fromObject(object.compilationResultActions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a QueryCompilationResultActionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @static + * @param {google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse} message QueryCompilationResultActionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryCompilationResultActionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.compilationResultActions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.compilationResultActions && message.compilationResultActions.length) { + object.compilationResultActions = []; + for (var j = 0; j < message.compilationResultActions.length; ++j) + object.compilationResultActions[j] = $root.google.cloud.dataform.v1beta1.CompilationResultAction.toObject(message.compilationResultActions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this QueryCompilationResultActionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryCompilationResultActionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryCompilationResultActionsResponse; + })(); + + v1beta1.WorkflowInvocation = (function() { + + /** + * Properties of a WorkflowInvocation. + * @memberof google.cloud.dataform.v1beta1 + * @interface IWorkflowInvocation + * @property {string|null} [name] WorkflowInvocation name + * @property {string|null} [compilationResult] WorkflowInvocation compilationResult + * @property {google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig|null} [invocationConfig] WorkflowInvocation invocationConfig + * @property {google.cloud.dataform.v1beta1.WorkflowInvocation.State|null} [state] WorkflowInvocation state + * @property {google.type.IInterval|null} [invocationTiming] WorkflowInvocation invocationTiming + */ + + /** + * Constructs a new WorkflowInvocation. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a WorkflowInvocation. + * @implements IWorkflowInvocation + * @constructor + * @param {google.cloud.dataform.v1beta1.IWorkflowInvocation=} [properties] Properties to set + */ + function WorkflowInvocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkflowInvocation name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @instance + */ + WorkflowInvocation.prototype.name = ""; + + /** + * WorkflowInvocation compilationResult. + * @member {string} compilationResult + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @instance + */ + WorkflowInvocation.prototype.compilationResult = ""; + + /** + * WorkflowInvocation invocationConfig. + * @member {google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig|null|undefined} invocationConfig + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @instance + */ + WorkflowInvocation.prototype.invocationConfig = null; + + /** + * WorkflowInvocation state. + * @member {google.cloud.dataform.v1beta1.WorkflowInvocation.State} state + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @instance + */ + WorkflowInvocation.prototype.state = 0; + + /** + * WorkflowInvocation invocationTiming. + * @member {google.type.IInterval|null|undefined} invocationTiming + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @instance + */ + WorkflowInvocation.prototype.invocationTiming = null; + + /** + * Creates a new WorkflowInvocation instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @static + * @param {google.cloud.dataform.v1beta1.IWorkflowInvocation=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocation} WorkflowInvocation instance + */ + WorkflowInvocation.create = function create(properties) { + return new WorkflowInvocation(properties); + }; + + /** + * Encodes the specified WorkflowInvocation message. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @static + * @param {google.cloud.dataform.v1beta1.IWorkflowInvocation} message WorkflowInvocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkflowInvocation.encode = function encode(message, writer) { + 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.compilationResult != null && Object.hasOwnProperty.call(message, "compilationResult")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.compilationResult); + if (message.invocationConfig != null && Object.hasOwnProperty.call(message, "invocationConfig")) + $root.google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.encode(message.invocationConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.invocationTiming != null && Object.hasOwnProperty.call(message, "invocationTiming")) + $root.google.type.Interval.encode(message.invocationTiming, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WorkflowInvocation message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @static + * @param {google.cloud.dataform.v1beta1.IWorkflowInvocation} message WorkflowInvocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkflowInvocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkflowInvocation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocation} WorkflowInvocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkflowInvocation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.WorkflowInvocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.compilationResult = reader.string(); + break; + case 3: + message.invocationConfig = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.decode(reader, reader.uint32()); + break; + case 4: + message.state = reader.int32(); + break; + case 5: + message.invocationTiming = $root.google.type.Interval.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkflowInvocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocation} WorkflowInvocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkflowInvocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkflowInvocation message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkflowInvocation.verify = function verify(message) { + if (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.compilationResult != null && message.hasOwnProperty("compilationResult")) + if (!$util.isString(message.compilationResult)) + return "compilationResult: string expected"; + if (message.invocationConfig != null && message.hasOwnProperty("invocationConfig")) { + var error = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.verify(message.invocationConfig); + if (error) + return "invocationConfig." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.invocationTiming != null && message.hasOwnProperty("invocationTiming")) { + var error = $root.google.type.Interval.verify(message.invocationTiming); + if (error) + return "invocationTiming." + error; + } + return null; + }; + + /** + * Creates a WorkflowInvocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocation} WorkflowInvocation + */ + WorkflowInvocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.WorkflowInvocation) + return object; + var message = new $root.google.cloud.dataform.v1beta1.WorkflowInvocation(); + if (object.name != null) + message.name = String(object.name); + if (object.compilationResult != null) + message.compilationResult = String(object.compilationResult); + if (object.invocationConfig != null) { + if (typeof object.invocationConfig !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.WorkflowInvocation.invocationConfig: object expected"); + message.invocationConfig = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.fromObject(object.invocationConfig); + } + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "RUNNING": + case 1: + message.state = 1; + break; + case "SUCCEEDED": + case 2: + message.state = 2; + break; + case "CANCELLED": + case 3: + message.state = 3; + break; + case "FAILED": + case 4: + message.state = 4; + break; + case "CANCELING": + case 5: + message.state = 5; + break; + } + if (object.invocationTiming != null) { + if (typeof object.invocationTiming !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.WorkflowInvocation.invocationTiming: object expected"); + message.invocationTiming = $root.google.type.Interval.fromObject(object.invocationTiming); + } + return message; + }; + + /** + * Creates a plain object from a WorkflowInvocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocation} message WorkflowInvocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkflowInvocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.compilationResult = ""; + object.invocationConfig = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.invocationTiming = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.compilationResult != null && message.hasOwnProperty("compilationResult")) + object.compilationResult = message.compilationResult; + if (message.invocationConfig != null && message.hasOwnProperty("invocationConfig")) + object.invocationConfig = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.toObject(message.invocationConfig, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataform.v1beta1.WorkflowInvocation.State[message.state] : message.state; + if (message.invocationTiming != null && message.hasOwnProperty("invocationTiming")) + object.invocationTiming = $root.google.type.Interval.toObject(message.invocationTiming, options); + return object; + }; + + /** + * Converts this WorkflowInvocation to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @instance + * @returns {Object.} JSON object + */ + WorkflowInvocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + WorkflowInvocation.InvocationConfig = (function() { + + /** + * Properties of an InvocationConfig. + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @interface IInvocationConfig + * @property {Array.|null} [includedTargets] InvocationConfig includedTargets + * @property {Array.|null} [includedTags] InvocationConfig includedTags + * @property {boolean|null} [transitiveDependenciesIncluded] InvocationConfig transitiveDependenciesIncluded + * @property {boolean|null} [transitiveDependentsIncluded] InvocationConfig transitiveDependentsIncluded + * @property {boolean|null} [fullyRefreshIncrementalTablesEnabled] InvocationConfig fullyRefreshIncrementalTablesEnabled + */ + + /** + * Constructs a new InvocationConfig. + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @classdesc Represents an InvocationConfig. + * @implements IInvocationConfig + * @constructor + * @param {google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig=} [properties] Properties to set + */ + function InvocationConfig(properties) { + this.includedTargets = []; + this.includedTags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InvocationConfig includedTargets. + * @member {Array.} includedTargets + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @instance + */ + InvocationConfig.prototype.includedTargets = $util.emptyArray; + + /** + * InvocationConfig includedTags. + * @member {Array.} includedTags + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @instance + */ + InvocationConfig.prototype.includedTags = $util.emptyArray; + + /** + * InvocationConfig transitiveDependenciesIncluded. + * @member {boolean} transitiveDependenciesIncluded + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @instance + */ + InvocationConfig.prototype.transitiveDependenciesIncluded = false; + + /** + * InvocationConfig transitiveDependentsIncluded. + * @member {boolean} transitiveDependentsIncluded + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @instance + */ + InvocationConfig.prototype.transitiveDependentsIncluded = false; + + /** + * InvocationConfig fullyRefreshIncrementalTablesEnabled. + * @member {boolean} fullyRefreshIncrementalTablesEnabled + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @instance + */ + InvocationConfig.prototype.fullyRefreshIncrementalTablesEnabled = false; + + /** + * Creates a new InvocationConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig} InvocationConfig instance + */ + InvocationConfig.create = function create(properties) { + return new InvocationConfig(properties); + }; + + /** + * Encodes the specified InvocationConfig message. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig} message InvocationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvocationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.includedTargets != null && message.includedTargets.length) + for (var i = 0; i < message.includedTargets.length; ++i) + $root.google.cloud.dataform.v1beta1.Target.encode(message.includedTargets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.includedTags != null && message.includedTags.length) + for (var i = 0; i < message.includedTags.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.includedTags[i]); + if (message.transitiveDependenciesIncluded != null && Object.hasOwnProperty.call(message, "transitiveDependenciesIncluded")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.transitiveDependenciesIncluded); + if (message.transitiveDependentsIncluded != null && Object.hasOwnProperty.call(message, "transitiveDependentsIncluded")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.transitiveDependentsIncluded); + if (message.fullyRefreshIncrementalTablesEnabled != null && Object.hasOwnProperty.call(message, "fullyRefreshIncrementalTablesEnabled")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.fullyRefreshIncrementalTablesEnabled); + return writer; + }; + + /** + * Encodes the specified InvocationConfig message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocation.IInvocationConfig} message InvocationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvocationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InvocationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig} InvocationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvocationConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.includedTargets && message.includedTargets.length)) + message.includedTargets = []; + message.includedTargets.push($root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.includedTags && message.includedTags.length)) + message.includedTags = []; + message.includedTags.push(reader.string()); + break; + case 3: + message.transitiveDependenciesIncluded = reader.bool(); + break; + case 4: + message.transitiveDependentsIncluded = reader.bool(); + break; + case 5: + message.fullyRefreshIncrementalTablesEnabled = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InvocationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig} InvocationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvocationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InvocationConfig message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InvocationConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.includedTargets != null && message.hasOwnProperty("includedTargets")) { + if (!Array.isArray(message.includedTargets)) + return "includedTargets: array expected"; + for (var i = 0; i < message.includedTargets.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.includedTargets[i]); + if (error) + return "includedTargets." + error; + } + } + if (message.includedTags != null && message.hasOwnProperty("includedTags")) { + if (!Array.isArray(message.includedTags)) + return "includedTags: array expected"; + for (var i = 0; i < message.includedTags.length; ++i) + if (!$util.isString(message.includedTags[i])) + return "includedTags: string[] expected"; + } + if (message.transitiveDependenciesIncluded != null && message.hasOwnProperty("transitiveDependenciesIncluded")) + if (typeof message.transitiveDependenciesIncluded !== "boolean") + return "transitiveDependenciesIncluded: boolean expected"; + if (message.transitiveDependentsIncluded != null && message.hasOwnProperty("transitiveDependentsIncluded")) + if (typeof message.transitiveDependentsIncluded !== "boolean") + return "transitiveDependentsIncluded: boolean expected"; + if (message.fullyRefreshIncrementalTablesEnabled != null && message.hasOwnProperty("fullyRefreshIncrementalTablesEnabled")) + if (typeof message.fullyRefreshIncrementalTablesEnabled !== "boolean") + return "fullyRefreshIncrementalTablesEnabled: boolean expected"; + return null; + }; + + /** + * Creates an InvocationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig} InvocationConfig + */ + InvocationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig) + return object; + var message = new $root.google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig(); + if (object.includedTargets) { + if (!Array.isArray(object.includedTargets)) + throw TypeError(".google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.includedTargets: array expected"); + message.includedTargets = []; + for (var i = 0; i < object.includedTargets.length; ++i) { + if (typeof object.includedTargets[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.includedTargets: object expected"); + message.includedTargets[i] = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.includedTargets[i]); + } + } + if (object.includedTags) { + if (!Array.isArray(object.includedTags)) + throw TypeError(".google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.includedTags: array expected"); + message.includedTags = []; + for (var i = 0; i < object.includedTags.length; ++i) + message.includedTags[i] = String(object.includedTags[i]); + } + if (object.transitiveDependenciesIncluded != null) + message.transitiveDependenciesIncluded = Boolean(object.transitiveDependenciesIncluded); + if (object.transitiveDependentsIncluded != null) + message.transitiveDependentsIncluded = Boolean(object.transitiveDependentsIncluded); + if (object.fullyRefreshIncrementalTablesEnabled != null) + message.fullyRefreshIncrementalTablesEnabled = Boolean(object.fullyRefreshIncrementalTablesEnabled); + return message; + }; + + /** + * Creates a plain object from an InvocationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig} message InvocationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InvocationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.includedTargets = []; + object.includedTags = []; + } + if (options.defaults) { + object.transitiveDependenciesIncluded = false; + object.transitiveDependentsIncluded = false; + object.fullyRefreshIncrementalTablesEnabled = false; + } + if (message.includedTargets && message.includedTargets.length) { + object.includedTargets = []; + for (var j = 0; j < message.includedTargets.length; ++j) + object.includedTargets[j] = $root.google.cloud.dataform.v1beta1.Target.toObject(message.includedTargets[j], options); + } + if (message.includedTags && message.includedTags.length) { + object.includedTags = []; + for (var j = 0; j < message.includedTags.length; ++j) + object.includedTags[j] = message.includedTags[j]; + } + if (message.transitiveDependenciesIncluded != null && message.hasOwnProperty("transitiveDependenciesIncluded")) + object.transitiveDependenciesIncluded = message.transitiveDependenciesIncluded; + if (message.transitiveDependentsIncluded != null && message.hasOwnProperty("transitiveDependentsIncluded")) + object.transitiveDependentsIncluded = message.transitiveDependentsIncluded; + if (message.fullyRefreshIncrementalTablesEnabled != null && message.hasOwnProperty("fullyRefreshIncrementalTablesEnabled")) + object.fullyRefreshIncrementalTablesEnabled = message.fullyRefreshIncrementalTablesEnabled; + return object; + }; + + /** + * Converts this InvocationConfig to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @instance + * @returns {Object.} JSON object + */ + InvocationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return InvocationConfig; + })(); + + /** + * State enum. + * @name google.cloud.dataform.v1beta1.WorkflowInvocation.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} CANCELLED=3 CANCELLED value + * @property {number} FAILED=4 FAILED value + * @property {number} CANCELING=5 CANCELING value + */ + WorkflowInvocation.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "CANCELLED"] = 3; + values[valuesById[4] = "FAILED"] = 4; + values[valuesById[5] = "CANCELING"] = 5; + return values; + })(); + + return WorkflowInvocation; + })(); + + v1beta1.ListWorkflowInvocationsRequest = (function() { + + /** + * Properties of a ListWorkflowInvocationsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IListWorkflowInvocationsRequest + * @property {string|null} [parent] ListWorkflowInvocationsRequest parent + * @property {number|null} [pageSize] ListWorkflowInvocationsRequest pageSize + * @property {string|null} [pageToken] ListWorkflowInvocationsRequest pageToken + */ + + /** + * Constructs a new ListWorkflowInvocationsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ListWorkflowInvocationsRequest. + * @implements IListWorkflowInvocationsRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest=} [properties] Properties to set + */ + function ListWorkflowInvocationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListWorkflowInvocationsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @instance + */ + ListWorkflowInvocationsRequest.prototype.parent = ""; + + /** + * ListWorkflowInvocationsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @instance + */ + ListWorkflowInvocationsRequest.prototype.pageSize = 0; + + /** + * ListWorkflowInvocationsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @instance + */ + ListWorkflowInvocationsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListWorkflowInvocationsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest} ListWorkflowInvocationsRequest instance + */ + ListWorkflowInvocationsRequest.create = function create(properties) { + return new ListWorkflowInvocationsRequest(properties); + }; + + /** + * Encodes the specified ListWorkflowInvocationsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest} message ListWorkflowInvocationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkflowInvocationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListWorkflowInvocationsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest} message ListWorkflowInvocationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkflowInvocationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWorkflowInvocationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest} ListWorkflowInvocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkflowInvocationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListWorkflowInvocationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest} ListWorkflowInvocationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkflowInvocationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWorkflowInvocationsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWorkflowInvocationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListWorkflowInvocationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest} ListWorkflowInvocationsRequest + */ + ListWorkflowInvocationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListWorkflowInvocationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @static + * @param {google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest} message ListWorkflowInvocationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWorkflowInvocationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListWorkflowInvocationsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListWorkflowInvocationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListWorkflowInvocationsRequest; + })(); + + v1beta1.ListWorkflowInvocationsResponse = (function() { + + /** + * Properties of a ListWorkflowInvocationsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IListWorkflowInvocationsResponse + * @property {Array.|null} [workflowInvocations] ListWorkflowInvocationsResponse workflowInvocations + * @property {string|null} [nextPageToken] ListWorkflowInvocationsResponse nextPageToken + * @property {Array.|null} [unreachable] ListWorkflowInvocationsResponse unreachable + */ + + /** + * Constructs a new ListWorkflowInvocationsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a ListWorkflowInvocationsResponse. + * @implements IListWorkflowInvocationsResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse=} [properties] Properties to set + */ + function ListWorkflowInvocationsResponse(properties) { + this.workflowInvocations = []; + 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]]; + } + + /** + * ListWorkflowInvocationsResponse workflowInvocations. + * @member {Array.} workflowInvocations + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @instance + */ + ListWorkflowInvocationsResponse.prototype.workflowInvocations = $util.emptyArray; + + /** + * ListWorkflowInvocationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @instance + */ + ListWorkflowInvocationsResponse.prototype.nextPageToken = ""; + + /** + * ListWorkflowInvocationsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @instance + */ + ListWorkflowInvocationsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListWorkflowInvocationsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse} ListWorkflowInvocationsResponse instance + */ + ListWorkflowInvocationsResponse.create = function create(properties) { + return new ListWorkflowInvocationsResponse(properties); + }; + + /** + * Encodes the specified ListWorkflowInvocationsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse} message ListWorkflowInvocationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkflowInvocationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workflowInvocations != null && message.workflowInvocations.length) + for (var i = 0; i < message.workflowInvocations.length; ++i) + $root.google.cloud.dataform.v1beta1.WorkflowInvocation.encode(message.workflowInvocations[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 ListWorkflowInvocationsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse} message ListWorkflowInvocationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkflowInvocationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWorkflowInvocationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse} ListWorkflowInvocationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkflowInvocationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.workflowInvocations && message.workflowInvocations.length)) + message.workflowInvocations = []; + message.workflowInvocations.push($root.google.cloud.dataform.v1beta1.WorkflowInvocation.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 ListWorkflowInvocationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse} ListWorkflowInvocationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkflowInvocationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWorkflowInvocationsResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWorkflowInvocationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workflowInvocations != null && message.hasOwnProperty("workflowInvocations")) { + if (!Array.isArray(message.workflowInvocations)) + return "workflowInvocations: array expected"; + for (var i = 0; i < message.workflowInvocations.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.verify(message.workflowInvocations[i]); + if (error) + return "workflowInvocations." + 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 ListWorkflowInvocationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse} ListWorkflowInvocationsResponse + */ + ListWorkflowInvocationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse(); + if (object.workflowInvocations) { + if (!Array.isArray(object.workflowInvocations)) + throw TypeError(".google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse.workflowInvocations: array expected"); + message.workflowInvocations = []; + for (var i = 0; i < object.workflowInvocations.length; ++i) { + if (typeof object.workflowInvocations[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse.workflowInvocations: object expected"); + message.workflowInvocations[i] = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.fromObject(object.workflowInvocations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse.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 ListWorkflowInvocationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @static + * @param {google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse} message ListWorkflowInvocationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWorkflowInvocationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.workflowInvocations = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.workflowInvocations && message.workflowInvocations.length) { + object.workflowInvocations = []; + for (var j = 0; j < message.workflowInvocations.length; ++j) + object.workflowInvocations[j] = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.toObject(message.workflowInvocations[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 ListWorkflowInvocationsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListWorkflowInvocationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListWorkflowInvocationsResponse; + })(); + + v1beta1.GetWorkflowInvocationRequest = (function() { + + /** + * Properties of a GetWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IGetWorkflowInvocationRequest + * @property {string|null} [name] GetWorkflowInvocationRequest name + */ + + /** + * Constructs a new GetWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a GetWorkflowInvocationRequest. + * @implements IGetWorkflowInvocationRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest=} [properties] Properties to set + */ + function GetWorkflowInvocationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetWorkflowInvocationRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @instance + */ + GetWorkflowInvocationRequest.prototype.name = ""; + + /** + * Creates a new GetWorkflowInvocationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest} GetWorkflowInvocationRequest instance + */ + GetWorkflowInvocationRequest.create = function create(properties) { + return new GetWorkflowInvocationRequest(properties); + }; + + /** + * Encodes the specified GetWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest} message GetWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWorkflowInvocationRequest.encode = function encode(message, writer) { + 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 GetWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest} message GetWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWorkflowInvocationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetWorkflowInvocationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest} GetWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWorkflowInvocationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest} GetWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWorkflowInvocationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetWorkflowInvocationRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetWorkflowInvocationRequest.verify = function verify(message) { + if (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 GetWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest} GetWorkflowInvocationRequest + */ + GetWorkflowInvocationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetWorkflowInvocationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest} message GetWorkflowInvocationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetWorkflowInvocationRequest.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 GetWorkflowInvocationRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @instance + * @returns {Object.} JSON object + */ + GetWorkflowInvocationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetWorkflowInvocationRequest; + })(); + + v1beta1.CreateWorkflowInvocationRequest = (function() { + + /** + * Properties of a CreateWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface ICreateWorkflowInvocationRequest + * @property {string|null} [parent] CreateWorkflowInvocationRequest parent + * @property {google.cloud.dataform.v1beta1.IWorkflowInvocation|null} [workflowInvocation] CreateWorkflowInvocationRequest workflowInvocation + */ + + /** + * Constructs a new CreateWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a CreateWorkflowInvocationRequest. + * @implements ICreateWorkflowInvocationRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest=} [properties] Properties to set + */ + function CreateWorkflowInvocationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateWorkflowInvocationRequest parent. + * @member {string} parent + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @instance + */ + CreateWorkflowInvocationRequest.prototype.parent = ""; + + /** + * CreateWorkflowInvocationRequest workflowInvocation. + * @member {google.cloud.dataform.v1beta1.IWorkflowInvocation|null|undefined} workflowInvocation + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @instance + */ + CreateWorkflowInvocationRequest.prototype.workflowInvocation = null; + + /** + * Creates a new CreateWorkflowInvocationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest} CreateWorkflowInvocationRequest instance + */ + CreateWorkflowInvocationRequest.create = function create(properties) { + return new CreateWorkflowInvocationRequest(properties); + }; + + /** + * Encodes the specified CreateWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest} message CreateWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateWorkflowInvocationRequest.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.workflowInvocation != null && Object.hasOwnProperty.call(message, "workflowInvocation")) + $root.google.cloud.dataform.v1beta1.WorkflowInvocation.encode(message.workflowInvocation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest} message CreateWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateWorkflowInvocationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateWorkflowInvocationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest} CreateWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateWorkflowInvocationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.workflowInvocation = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest} CreateWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateWorkflowInvocationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateWorkflowInvocationRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateWorkflowInvocationRequest.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.workflowInvocation != null && message.hasOwnProperty("workflowInvocation")) { + var error = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.verify(message.workflowInvocation); + if (error) + return "workflowInvocation." + error; + } + return null; + }; + + /** + * Creates a CreateWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest} CreateWorkflowInvocationRequest + */ + CreateWorkflowInvocationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.workflowInvocation != null) { + if (typeof object.workflowInvocation !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest.workflowInvocation: object expected"); + message.workflowInvocation = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.fromObject(object.workflowInvocation); + } + return message; + }; + + /** + * Creates a plain object from a CreateWorkflowInvocationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest} message CreateWorkflowInvocationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateWorkflowInvocationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.workflowInvocation = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.workflowInvocation != null && message.hasOwnProperty("workflowInvocation")) + object.workflowInvocation = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.toObject(message.workflowInvocation, options); + return object; + }; + + /** + * Converts this CreateWorkflowInvocationRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @instance + * @returns {Object.} JSON object + */ + CreateWorkflowInvocationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateWorkflowInvocationRequest; + })(); + + v1beta1.DeleteWorkflowInvocationRequest = (function() { + + /** + * Properties of a DeleteWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IDeleteWorkflowInvocationRequest + * @property {string|null} [name] DeleteWorkflowInvocationRequest name + */ + + /** + * Constructs a new DeleteWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a DeleteWorkflowInvocationRequest. + * @implements IDeleteWorkflowInvocationRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest=} [properties] Properties to set + */ + function DeleteWorkflowInvocationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteWorkflowInvocationRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @instance + */ + DeleteWorkflowInvocationRequest.prototype.name = ""; + + /** + * Creates a new DeleteWorkflowInvocationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest} DeleteWorkflowInvocationRequest instance + */ + DeleteWorkflowInvocationRequest.create = function create(properties) { + return new DeleteWorkflowInvocationRequest(properties); + }; + + /** + * Encodes the specified DeleteWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest} message DeleteWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteWorkflowInvocationRequest.encode = function encode(message, writer) { + 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 DeleteWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest} message DeleteWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteWorkflowInvocationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteWorkflowInvocationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest} DeleteWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteWorkflowInvocationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest} DeleteWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteWorkflowInvocationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteWorkflowInvocationRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteWorkflowInvocationRequest.verify = function verify(message) { + if (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 DeleteWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest} DeleteWorkflowInvocationRequest + */ + DeleteWorkflowInvocationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteWorkflowInvocationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest} message DeleteWorkflowInvocationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteWorkflowInvocationRequest.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 DeleteWorkflowInvocationRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteWorkflowInvocationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteWorkflowInvocationRequest; + })(); + + v1beta1.CancelWorkflowInvocationRequest = (function() { + + /** + * Properties of a CancelWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface ICancelWorkflowInvocationRequest + * @property {string|null} [name] CancelWorkflowInvocationRequest name + */ + + /** + * Constructs a new CancelWorkflowInvocationRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a CancelWorkflowInvocationRequest. + * @implements ICancelWorkflowInvocationRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest=} [properties] Properties to set + */ + function CancelWorkflowInvocationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelWorkflowInvocationRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @instance + */ + CancelWorkflowInvocationRequest.prototype.name = ""; + + /** + * Creates a new CancelWorkflowInvocationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest} CancelWorkflowInvocationRequest instance + */ + CancelWorkflowInvocationRequest.create = function create(properties) { + return new CancelWorkflowInvocationRequest(properties); + }; + + /** + * Encodes the specified CancelWorkflowInvocationRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest} message CancelWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelWorkflowInvocationRequest.encode = function encode(message, writer) { + 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 CancelWorkflowInvocationRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest} message CancelWorkflowInvocationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelWorkflowInvocationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelWorkflowInvocationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest} CancelWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelWorkflowInvocationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelWorkflowInvocationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest} CancelWorkflowInvocationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelWorkflowInvocationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelWorkflowInvocationRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelWorkflowInvocationRequest.verify = function verify(message) { + if (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 CancelWorkflowInvocationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest} CancelWorkflowInvocationRequest + */ + CancelWorkflowInvocationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelWorkflowInvocationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @static + * @param {google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest} message CancelWorkflowInvocationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelWorkflowInvocationRequest.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 CancelWorkflowInvocationRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelWorkflowInvocationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CancelWorkflowInvocationRequest; + })(); + + v1beta1.WorkflowInvocationAction = (function() { + + /** + * Properties of a WorkflowInvocationAction. + * @memberof google.cloud.dataform.v1beta1 + * @interface IWorkflowInvocationAction + * @property {google.cloud.dataform.v1beta1.ITarget|null} [target] WorkflowInvocationAction target + * @property {google.cloud.dataform.v1beta1.ITarget|null} [canonicalTarget] WorkflowInvocationAction canonicalTarget + * @property {google.cloud.dataform.v1beta1.WorkflowInvocationAction.State|null} [state] WorkflowInvocationAction state + * @property {string|null} [failureReason] WorkflowInvocationAction failureReason + * @property {google.type.IInterval|null} [invocationTiming] WorkflowInvocationAction invocationTiming + * @property {google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction|null} [bigqueryAction] WorkflowInvocationAction bigqueryAction + */ + + /** + * Constructs a new WorkflowInvocationAction. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a WorkflowInvocationAction. + * @implements IWorkflowInvocationAction + * @constructor + * @param {google.cloud.dataform.v1beta1.IWorkflowInvocationAction=} [properties] Properties to set + */ + function WorkflowInvocationAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkflowInvocationAction target. + * @member {google.cloud.dataform.v1beta1.ITarget|null|undefined} target + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.target = null; + + /** + * WorkflowInvocationAction canonicalTarget. + * @member {google.cloud.dataform.v1beta1.ITarget|null|undefined} canonicalTarget + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.canonicalTarget = null; + + /** + * WorkflowInvocationAction state. + * @member {google.cloud.dataform.v1beta1.WorkflowInvocationAction.State} state + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.state = 0; + + /** + * WorkflowInvocationAction failureReason. + * @member {string} failureReason + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.failureReason = ""; + + /** + * WorkflowInvocationAction invocationTiming. + * @member {google.type.IInterval|null|undefined} invocationTiming + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.invocationTiming = null; + + /** + * WorkflowInvocationAction bigqueryAction. + * @member {google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction|null|undefined} bigqueryAction + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @instance + */ + WorkflowInvocationAction.prototype.bigqueryAction = null; + + /** + * Creates a new WorkflowInvocationAction instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @static + * @param {google.cloud.dataform.v1beta1.IWorkflowInvocationAction=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocationAction} WorkflowInvocationAction instance + */ + WorkflowInvocationAction.create = function create(properties) { + return new WorkflowInvocationAction(properties); + }; + + /** + * Encodes the specified WorkflowInvocationAction message. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @static + * @param {google.cloud.dataform.v1beta1.IWorkflowInvocationAction} message WorkflowInvocationAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkflowInvocationAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.google.cloud.dataform.v1beta1.Target.encode(message.target, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.canonicalTarget != null && Object.hasOwnProperty.call(message, "canonicalTarget")) + $root.google.cloud.dataform.v1beta1.Target.encode(message.canonicalTarget, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.invocationTiming != null && Object.hasOwnProperty.call(message, "invocationTiming")) + $root.google.type.Interval.encode(message.invocationTiming, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.bigqueryAction != null && Object.hasOwnProperty.call(message, "bigqueryAction")) + $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction.encode(message.bigqueryAction, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.failureReason != null && Object.hasOwnProperty.call(message, "failureReason")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.failureReason); + return writer; + }; + + /** + * Encodes the specified WorkflowInvocationAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @static + * @param {google.cloud.dataform.v1beta1.IWorkflowInvocationAction} message WorkflowInvocationAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkflowInvocationAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkflowInvocationAction message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocationAction} WorkflowInvocationAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkflowInvocationAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.target = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); + break; + case 2: + message.canonicalTarget = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); + break; + case 4: + message.state = reader.int32(); + break; + case 7: + message.failureReason = reader.string(); + break; + case 5: + message.invocationTiming = $root.google.type.Interval.decode(reader, reader.uint32()); + break; + case 6: + message.bigqueryAction = $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkflowInvocationAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocationAction} WorkflowInvocationAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkflowInvocationAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkflowInvocationAction message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkflowInvocationAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.canonicalTarget != null && message.hasOwnProperty("canonicalTarget")) { + var error = $root.google.cloud.dataform.v1beta1.Target.verify(message.canonicalTarget); + if (error) + return "canonicalTarget." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.failureReason != null && message.hasOwnProperty("failureReason")) + if (!$util.isString(message.failureReason)) + return "failureReason: string expected"; + if (message.invocationTiming != null && message.hasOwnProperty("invocationTiming")) { + var error = $root.google.type.Interval.verify(message.invocationTiming); + if (error) + return "invocationTiming." + error; + } + if (message.bigqueryAction != null && message.hasOwnProperty("bigqueryAction")) { + var error = $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction.verify(message.bigqueryAction); + if (error) + return "bigqueryAction." + error; + } + return null; + }; + + /** + * Creates a WorkflowInvocationAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocationAction} WorkflowInvocationAction + */ + WorkflowInvocationAction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction) + return object; + var message = new $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction(); + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.WorkflowInvocationAction.target: object expected"); + message.target = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.target); + } + if (object.canonicalTarget != null) { + if (typeof object.canonicalTarget !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.WorkflowInvocationAction.canonicalTarget: object expected"); + message.canonicalTarget = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.canonicalTarget); + } + switch (object.state) { + case "PENDING": + case 0: + message.state = 0; + break; + case "RUNNING": + case 1: + message.state = 1; + break; + case "SKIPPED": + case 2: + message.state = 2; + break; + case "DISABLED": + case 3: + message.state = 3; + break; + case "SUCCEEDED": + case 4: + message.state = 4; + break; + case "CANCELLED": + case 5: + message.state = 5; + break; + case "FAILED": + case 6: + message.state = 6; + break; + } + if (object.failureReason != null) + message.failureReason = String(object.failureReason); + if (object.invocationTiming != null) { + if (typeof object.invocationTiming !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.WorkflowInvocationAction.invocationTiming: object expected"); + message.invocationTiming = $root.google.type.Interval.fromObject(object.invocationTiming); + } + if (object.bigqueryAction != null) { + if (typeof object.bigqueryAction !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.WorkflowInvocationAction.bigqueryAction: object expected"); + message.bigqueryAction = $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction.fromObject(object.bigqueryAction); + } + return message; + }; + + /** + * Creates a plain object from a WorkflowInvocationAction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocationAction} message WorkflowInvocationAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkflowInvocationAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.target = null; + object.canonicalTarget = null; + object.state = options.enums === String ? "PENDING" : 0; + object.invocationTiming = null; + object.bigqueryAction = null; + object.failureReason = ""; + } + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.google.cloud.dataform.v1beta1.Target.toObject(message.target, options); + if (message.canonicalTarget != null && message.hasOwnProperty("canonicalTarget")) + object.canonicalTarget = $root.google.cloud.dataform.v1beta1.Target.toObject(message.canonicalTarget, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.State[message.state] : message.state; + if (message.invocationTiming != null && message.hasOwnProperty("invocationTiming")) + object.invocationTiming = $root.google.type.Interval.toObject(message.invocationTiming, options); + if (message.bigqueryAction != null && message.hasOwnProperty("bigqueryAction")) + object.bigqueryAction = $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction.toObject(message.bigqueryAction, options); + if (message.failureReason != null && message.hasOwnProperty("failureReason")) + object.failureReason = message.failureReason; + return object; + }; + + /** + * Converts this WorkflowInvocationAction to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @instance + * @returns {Object.} JSON object + */ + WorkflowInvocationAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * State enum. + * @name google.cloud.dataform.v1beta1.WorkflowInvocationAction.State + * @enum {number} + * @property {number} PENDING=0 PENDING value + * @property {number} RUNNING=1 RUNNING value + * @property {number} SKIPPED=2 SKIPPED value + * @property {number} DISABLED=3 DISABLED value + * @property {number} SUCCEEDED=4 SUCCEEDED value + * @property {number} CANCELLED=5 CANCELLED value + * @property {number} FAILED=6 FAILED value + */ + WorkflowInvocationAction.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PENDING"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "SKIPPED"] = 2; + values[valuesById[3] = "DISABLED"] = 3; + values[valuesById[4] = "SUCCEEDED"] = 4; + values[valuesById[5] = "CANCELLED"] = 5; + values[valuesById[6] = "FAILED"] = 6; + return values; + })(); + + WorkflowInvocationAction.BigQueryAction = (function() { + + /** + * Properties of a BigQueryAction. + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @interface IBigQueryAction + * @property {string|null} [sqlScript] BigQueryAction sqlScript + */ + + /** + * Constructs a new BigQueryAction. + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @classdesc Represents a BigQueryAction. + * @implements IBigQueryAction + * @constructor + * @param {google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction=} [properties] Properties to set + */ + function BigQueryAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryAction sqlScript. + * @member {string} sqlScript + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @instance + */ + BigQueryAction.prototype.sqlScript = ""; + + /** + * Creates a new BigQueryAction instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction} BigQueryAction instance + */ + BigQueryAction.create = function create(properties) { + return new BigQueryAction(properties); + }; + + /** + * Encodes the specified BigQueryAction message. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction} message BigQueryAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sqlScript != null && Object.hasOwnProperty.call(message, "sqlScript")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sqlScript); + return writer; + }; + + /** + * Encodes the specified BigQueryAction message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocationAction.IBigQueryAction} message BigQueryAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryAction message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction} BigQueryAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sqlScript = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction} BigQueryAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryAction message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) + if (!$util.isString(message.sqlScript)) + return "sqlScript: string expected"; + return null; + }; + + /** + * Creates a BigQueryAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction} BigQueryAction + */ + BigQueryAction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction) + return object; + var message = new $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction(); + if (object.sqlScript != null) + message.sqlScript = String(object.sqlScript); + return message; + }; + + /** + * Creates a plain object from a BigQueryAction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @static + * @param {google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction} message BigQueryAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.sqlScript = ""; + if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) + object.sqlScript = message.sqlScript; + return object; + }; + + /** + * Converts this BigQueryAction to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @instance + * @returns {Object.} JSON object + */ + BigQueryAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BigQueryAction; + })(); + + return WorkflowInvocationAction; + })(); + + v1beta1.QueryWorkflowInvocationActionsRequest = (function() { + + /** + * Properties of a QueryWorkflowInvocationActionsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @interface IQueryWorkflowInvocationActionsRequest + * @property {string|null} [name] QueryWorkflowInvocationActionsRequest name + * @property {number|null} [pageSize] QueryWorkflowInvocationActionsRequest pageSize + * @property {string|null} [pageToken] QueryWorkflowInvocationActionsRequest pageToken + */ + + /** + * Constructs a new QueryWorkflowInvocationActionsRequest. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a QueryWorkflowInvocationActionsRequest. + * @implements IQueryWorkflowInvocationActionsRequest + * @constructor + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest=} [properties] Properties to set + */ + function QueryWorkflowInvocationActionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryWorkflowInvocationActionsRequest name. + * @member {string} name + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @instance + */ + QueryWorkflowInvocationActionsRequest.prototype.name = ""; + + /** + * QueryWorkflowInvocationActionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @instance + */ + QueryWorkflowInvocationActionsRequest.prototype.pageSize = 0; + + /** + * QueryWorkflowInvocationActionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @instance + */ + QueryWorkflowInvocationActionsRequest.prototype.pageToken = ""; + + /** + * Creates a new QueryWorkflowInvocationActionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest} QueryWorkflowInvocationActionsRequest instance + */ + QueryWorkflowInvocationActionsRequest.create = function create(properties) { + return new QueryWorkflowInvocationActionsRequest(properties); + }; + + /** + * Encodes the specified QueryWorkflowInvocationActionsRequest message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest} message QueryWorkflowInvocationActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryWorkflowInvocationActionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified QueryWorkflowInvocationActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @static + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest} message QueryWorkflowInvocationActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryWorkflowInvocationActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryWorkflowInvocationActionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest} QueryWorkflowInvocationActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryWorkflowInvocationActionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryWorkflowInvocationActionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest} QueryWorkflowInvocationActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryWorkflowInvocationActionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryWorkflowInvocationActionsRequest message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryWorkflowInvocationActionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a QueryWorkflowInvocationActionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest} QueryWorkflowInvocationActionsRequest + */ + QueryWorkflowInvocationActionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest) + return object; + var message = new $root.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a QueryWorkflowInvocationActionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @static + * @param {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest} message QueryWorkflowInvocationActionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryWorkflowInvocationActionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this QueryWorkflowInvocationActionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryWorkflowInvocationActionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryWorkflowInvocationActionsRequest; + })(); + + v1beta1.QueryWorkflowInvocationActionsResponse = (function() { + + /** + * Properties of a QueryWorkflowInvocationActionsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @interface IQueryWorkflowInvocationActionsResponse + * @property {Array.|null} [workflowInvocationActions] QueryWorkflowInvocationActionsResponse workflowInvocationActions + * @property {string|null} [nextPageToken] QueryWorkflowInvocationActionsResponse nextPageToken + */ + + /** + * Constructs a new QueryWorkflowInvocationActionsResponse. + * @memberof google.cloud.dataform.v1beta1 + * @classdesc Represents a QueryWorkflowInvocationActionsResponse. + * @implements IQueryWorkflowInvocationActionsResponse + * @constructor + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse=} [properties] Properties to set + */ + function QueryWorkflowInvocationActionsResponse(properties) { + this.workflowInvocationActions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryWorkflowInvocationActionsResponse workflowInvocationActions. + * @member {Array.} workflowInvocationActions + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @instance + */ + QueryWorkflowInvocationActionsResponse.prototype.workflowInvocationActions = $util.emptyArray; + + /** + * QueryWorkflowInvocationActionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @instance + */ + QueryWorkflowInvocationActionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new QueryWorkflowInvocationActionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse=} [properties] Properties to set + * @returns {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse} QueryWorkflowInvocationActionsResponse instance + */ + QueryWorkflowInvocationActionsResponse.create = function create(properties) { + return new QueryWorkflowInvocationActionsResponse(properties); + }; + + /** + * Encodes the specified QueryWorkflowInvocationActionsResponse message. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse} message QueryWorkflowInvocationActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryWorkflowInvocationActionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workflowInvocationActions != null && message.workflowInvocationActions.length) + for (var i = 0; i < message.workflowInvocationActions.length; ++i) + $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.encode(message.workflowInvocationActions[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 QueryWorkflowInvocationActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @static + * @param {google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse} message QueryWorkflowInvocationActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryWorkflowInvocationActionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryWorkflowInvocationActionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse} QueryWorkflowInvocationActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryWorkflowInvocationActionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.workflowInvocationActions && message.workflowInvocationActions.length)) + message.workflowInvocationActions = []; + message.workflowInvocationActions.push($root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryWorkflowInvocationActionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse} QueryWorkflowInvocationActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryWorkflowInvocationActionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryWorkflowInvocationActionsResponse message. + * @function verify + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryWorkflowInvocationActionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workflowInvocationActions != null && message.hasOwnProperty("workflowInvocationActions")) { + if (!Array.isArray(message.workflowInvocationActions)) + return "workflowInvocationActions: array expected"; + for (var i = 0; i < message.workflowInvocationActions.length; ++i) { + var error = $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.verify(message.workflowInvocationActions[i]); + if (error) + return "workflowInvocationActions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a QueryWorkflowInvocationActionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse} QueryWorkflowInvocationActionsResponse + */ + QueryWorkflowInvocationActionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse) + return object; + var message = new $root.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse(); + if (object.workflowInvocationActions) { + if (!Array.isArray(object.workflowInvocationActions)) + throw TypeError(".google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse.workflowInvocationActions: array expected"); + message.workflowInvocationActions = []; + for (var i = 0; i < object.workflowInvocationActions.length; ++i) { + if (typeof object.workflowInvocationActions[i] !== "object") + throw TypeError(".google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse.workflowInvocationActions: object expected"); + message.workflowInvocationActions[i] = $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.fromObject(object.workflowInvocationActions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a QueryWorkflowInvocationActionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @static + * @param {google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse} message QueryWorkflowInvocationActionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryWorkflowInvocationActionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.workflowInvocationActions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.workflowInvocationActions && message.workflowInvocationActions.length) { + object.workflowInvocationActions = []; + for (var j = 0; j < message.workflowInvocationActions.length; ++j) + object.workflowInvocationActions[j] = $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.toObject(message.workflowInvocationActions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this QueryWorkflowInvocationActionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryWorkflowInvocationActionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryWorkflowInvocationActionsResponse; + })(); + + return v1beta1; + })(); + return dataform; })(); diff --git a/packages/google-cloud-dataform/protos/protos.json b/packages/google-cloud-dataform/protos/protos.json index 56a1b9635d2..d89a861a32f 100644 --- a/packages/google-cloud-dataform/protos/protos.json +++ b/packages/google-cloud-dataform/protos/protos.json @@ -2312,6 +2312,2313 @@ } } } + }, + "v1beta1": { + "options": { + "csharp_namespace": "Google.Cloud.Dataform.V1Beta1", + "go_package": "google.golang.org/genproto/googleapis/cloud/dataform/v1beta1;dataform", + "java_multiple_files": true, + "java_outer_classname": "DataformProto", + "java_package": "com.google.cloud.dataform.v1beta1", + "php_namespace": "Google\\Cloud\\Dataform\\V1beta1", + "ruby_package": "Google::Cloud::Dataform::V1beta1", + "(google.api.resource_definition).type": "secretmanager.googleapis.com/SecretVersion", + "(google.api.resource_definition).pattern": "projects/{project}/secrets/{secret}/versions/{version}" + }, + "nested": { + "Dataform": { + "options": { + "(google.api.default_host)": "dataform.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListRepositories": { + "requestType": "ListRepositoriesRequest", + "responseType": "ListRepositoriesResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/repositories", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*}/repositories" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetRepository": { + "requestType": "GetRepositoryRequest", + "responseType": "Repository", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/repositories/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/repositories/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateRepository": { + "requestType": "CreateRepositoryRequest", + "responseType": "Repository", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/repositories", + "(google.api.http).body": "repository", + "(google.api.method_signature)": "parent,repository,repository_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/*}/repositories", + "body": "repository" + } + }, + { + "(google.api.method_signature)": "parent,repository,repository_id" + } + ] + }, + "UpdateRepository": { + "requestType": "UpdateRepositoryRequest", + "responseType": "Repository", + "options": { + "(google.api.http).patch": "/v1beta1/{repository.name=projects/*/locations/*/repositories/*}", + "(google.api.http).body": "repository", + "(google.api.method_signature)": "repository,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta1/{repository.name=projects/*/locations/*/repositories/*}", + "body": "repository" + } + }, + { + "(google.api.method_signature)": "repository,update_mask" + } + ] + }, + "DeleteRepository": { + "requestType": "DeleteRepositoryRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/repositories/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta1/{name=projects/*/locations/*/repositories/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "FetchRemoteBranches": { + "requestType": "FetchRemoteBranchesRequest", + "responseType": "FetchRemoteBranchesResponse", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/repositories/*}:fetchRemoteBranches" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/repositories/*}:fetchRemoteBranches" + } + } + ] + }, + "ListWorkspaces": { + "requestType": "ListWorkspacesRequest", + "responseType": "ListWorkspacesResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workspaces", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workspaces" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetWorkspace": { + "requestType": "GetWorkspaceRequest", + "responseType": "Workspace", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateWorkspace": { + "requestType": "CreateWorkspaceRequest", + "responseType": "Workspace", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workspaces", + "(google.api.http).body": "workspace", + "(google.api.method_signature)": "parent,workspace,workspace_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workspaces", + "body": "workspace" + } + }, + { + "(google.api.method_signature)": "parent,workspace,workspace_id" + } + ] + }, + "DeleteWorkspace": { + "requestType": "DeleteWorkspaceRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "InstallNpmPackages": { + "requestType": "InstallNpmPackagesRequest", + "responseType": "InstallNpmPackagesResponse", + "options": { + "(google.api.http).post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:installNpmPackages", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:installNpmPackages", + "body": "*" + } + } + ] + }, + "PullGitCommits": { + "requestType": "PullGitCommitsRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:pull", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:pull", + "body": "*" + } + } + ] + }, + "PushGitCommits": { + "requestType": "PushGitCommitsRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:push", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:push", + "body": "*" + } + } + ] + }, + "FetchFileGitStatuses": { + "requestType": "FetchFileGitStatusesRequest", + "responseType": "FetchFileGitStatusesResponse", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileGitStatuses" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileGitStatuses" + } + } + ] + }, + "FetchGitAheadBehind": { + "requestType": "FetchGitAheadBehindRequest", + "responseType": "FetchGitAheadBehindResponse", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchGitAheadBehind" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchGitAheadBehind" + } + } + ] + }, + "CommitWorkspaceChanges": { + "requestType": "CommitWorkspaceChangesRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:commit", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:commit", + "body": "*" + } + } + ] + }, + "ResetWorkspaceChanges": { + "requestType": "ResetWorkspaceChangesRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:reset", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:reset", + "body": "*" + } + } + ] + }, + "FetchFileDiff": { + "requestType": "FetchFileDiffRequest", + "responseType": "FetchFileDiffResponse", + "options": { + "(google.api.http).get": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileDiff" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileDiff" + } + } + ] + }, + "QueryDirectoryContents": { + "requestType": "QueryDirectoryContentsRequest", + "responseType": "QueryDirectoryContentsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:queryDirectoryContents" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:queryDirectoryContents" + } + } + ] + }, + "MakeDirectory": { + "requestType": "MakeDirectoryRequest", + "responseType": "MakeDirectoryResponse", + "options": { + "(google.api.http).post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:makeDirectory", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:makeDirectory", + "body": "*" + } + } + ] + }, + "RemoveDirectory": { + "requestType": "RemoveDirectoryRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeDirectory", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeDirectory", + "body": "*" + } + } + ] + }, + "MoveDirectory": { + "requestType": "MoveDirectoryRequest", + "responseType": "MoveDirectoryResponse", + "options": { + "(google.api.http).post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveDirectory", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveDirectory", + "body": "*" + } + } + ] + }, + "ReadFile": { + "requestType": "ReadFileRequest", + "responseType": "ReadFileResponse", + "options": { + "(google.api.http).get": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:readFile" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:readFile" + } + } + ] + }, + "RemoveFile": { + "requestType": "RemoveFileRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeFile", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeFile", + "body": "*" + } + } + ] + }, + "MoveFile": { + "requestType": "MoveFileRequest", + "responseType": "MoveFileResponse", + "options": { + "(google.api.http).post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveFile", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveFile", + "body": "*" + } + } + ] + }, + "WriteFile": { + "requestType": "WriteFileRequest", + "responseType": "WriteFileResponse", + "options": { + "(google.api.http).post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:writeFile", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:writeFile", + "body": "*" + } + } + ] + }, + "ListCompilationResults": { + "requestType": "ListCompilationResultsRequest", + "responseType": "ListCompilationResultsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/compilationResults", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/compilationResults" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetCompilationResult": { + "requestType": "GetCompilationResultRequest", + "responseType": "CompilationResult", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/repositories/*/compilationResults/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/repositories/*/compilationResults/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateCompilationResult": { + "requestType": "CreateCompilationResultRequest", + "responseType": "CompilationResult", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/compilationResults", + "(google.api.http).body": "compilation_result", + "(google.api.method_signature)": "parent,compilation_result" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/compilationResults", + "body": "compilation_result" + } + }, + { + "(google.api.method_signature)": "parent,compilation_result" + } + ] + }, + "QueryCompilationResultActions": { + "requestType": "QueryCompilationResultActionsRequest", + "responseType": "QueryCompilationResultActionsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/repositories/*/compilationResults/*}:query" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/repositories/*/compilationResults/*}:query" + } + } + ] + }, + "ListWorkflowInvocations": { + "requestType": "ListWorkflowInvocationsRequest", + "responseType": "ListWorkflowInvocationsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetWorkflowInvocation": { + "requestType": "GetWorkflowInvocationRequest", + "responseType": "WorkflowInvocation", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateWorkflowInvocation": { + "requestType": "CreateWorkflowInvocationRequest", + "responseType": "WorkflowInvocation", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations", + "(google.api.http).body": "workflow_invocation", + "(google.api.method_signature)": "parent,workflow_invocation" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations", + "body": "workflow_invocation" + } + }, + { + "(google.api.method_signature)": "parent,workflow_invocation" + } + ] + }, + "DeleteWorkflowInvocation": { + "requestType": "DeleteWorkflowInvocationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelWorkflowInvocation": { + "requestType": "CancelWorkflowInvocationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:cancel", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:cancel", + "body": "*" + } + } + ] + }, + "QueryWorkflowInvocationActions": { + "requestType": "QueryWorkflowInvocationActionsRequest", + "responseType": "QueryWorkflowInvocationActionsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:query" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:query" + } + } + ] + } + } + }, + "Repository": { + "options": { + "(google.api.resource).type": "dataform.googleapis.com/Repository", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "gitRemoteSettings": { + "type": "GitRemoteSettings", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "GitRemoteSettings": { + "fields": { + "url": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "defaultBranch": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "authenticationTokenSecretVersion": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "secretmanager.googleapis.com/SecretVersion" + } + }, + "tokenStatus": { + "type": "TokenStatus", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "TokenStatus": { + "values": { + "TOKEN_STATUS_UNSPECIFIED": 0, + "NOT_FOUND": 1, + "INVALID": 2, + "VALID": 3 + } + } + } + } + } + }, + "ListRepositoriesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListRepositoriesResponse": { + "fields": { + "repositories": { + "rule": "repeated", + "type": "Repository", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetRepositoryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + } + } + }, + "CreateRepositoryRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "repository": { + "type": "Repository", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "repositoryId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateRepositoryRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "repository": { + "type": "Repository", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteRepositoryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "force": { + "type": "bool", + "id": 2 + } + } + }, + "FetchRemoteBranchesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + } + } + }, + "FetchRemoteBranchesResponse": { + "fields": { + "branches": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Workspace": { + "options": { + "(google.api.resource).type": "dataform.googleapis.com/Workspace", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/workspaces/{workspace}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ListWorkspacesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListWorkspacesResponse": { + "fields": { + "workspaces": { + "rule": "repeated", + "type": "Workspace", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetWorkspaceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + } + } + }, + "CreateWorkspaceRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "workspace": { + "type": "Workspace", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "workspaceId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteWorkspaceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + } + } + }, + "CommitAuthor": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "emailAddress": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "PullGitCommitsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "remoteBranch": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "author": { + "type": "CommitAuthor", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "PushGitCommitsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "remoteBranch": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FetchFileGitStatusesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + } + } + }, + "FetchFileGitStatusesResponse": { + "fields": { + "uncommittedFileChanges": { + "rule": "repeated", + "type": "UncommittedFileChange", + "id": 1 + } + }, + "nested": { + "UncommittedFileChange": { + "fields": { + "path": { + "type": "string", + "id": 1 + }, + "state": { + "type": "State", + "id": 2 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ADDED": 1, + "DELETED": 2, + "MODIFIED": 3, + "HAS_CONFLICTS": 4 + } + } + } + } + } + }, + "FetchGitAheadBehindRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "remoteBranch": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FetchGitAheadBehindResponse": { + "fields": { + "commitsAhead": { + "type": "int32", + "id": 1 + }, + "commitsBehind": { + "type": "int32", + "id": 2 + } + } + }, + "CommitWorkspaceChangesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "author": { + "type": "CommitAuthor", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "commitMessage": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "paths": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ResetWorkspaceChangesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "paths": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "clean": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FetchFileDiffRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "FetchFileDiffResponse": { + "fields": { + "formattedDiff": { + "type": "string", + "id": 1 + } + } + }, + "QueryDirectoryContentsRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "QueryDirectoryContentsResponse": { + "fields": { + "directoryEntries": { + "rule": "repeated", + "type": "DirectoryEntry", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + }, + "nested": { + "DirectoryEntry": { + "oneofs": { + "entry": { + "oneof": [ + "file", + "directory" + ] + } + }, + "fields": { + "file": { + "type": "string", + "id": 1 + }, + "directory": { + "type": "string", + "id": 2 + } + } + } + } + }, + "MakeDirectoryRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MakeDirectoryResponse": { + "fields": {} + }, + "RemoveDirectoryRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MoveDirectoryRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "newPath": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MoveDirectoryResponse": { + "fields": {} + }, + "ReadFileRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ReadFileResponse": { + "fields": { + "fileContents": { + "type": "bytes", + "id": 1 + } + } + }, + "RemoveFileRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MoveFileRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "newPath": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MoveFileResponse": { + "fields": {} + }, + "WriteFileRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "contents": { + "type": "bytes", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "WriteFileResponse": { + "fields": {} + }, + "InstallNpmPackagesRequest": { + "fields": { + "workspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + } + } + }, + "InstallNpmPackagesResponse": { + "fields": {} + }, + "CompilationResult": { + "options": { + "(google.api.resource).type": "dataform.googleapis.com/CompilationResult", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/compilationResults/{compilation_result}" + }, + "oneofs": { + "source": { + "oneof": [ + "gitCommitish", + "workspace" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "gitCommitish": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "workspace": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "(google.api.resource_reference).type": "dataform.googleapis.com/Workspace" + } + }, + "codeCompilationConfig": { + "type": "CodeCompilationConfig", + "id": 4, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "dataformCoreVersion": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "compilationErrors": { + "rule": "repeated", + "type": "CompilationError", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "CodeCompilationConfig": { + "fields": { + "defaultDatabase": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "defaultSchema": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "defaultLocation": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "assertionSchema": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "vars": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "databaseSuffix": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "schemaSuffix": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "tablePrefix": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CompilationError": { + "fields": { + "message": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "stack": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "path": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "actionTarget": { + "type": "Target", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + } + } + }, + "ListCompilationResultsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListCompilationResultsResponse": { + "fields": { + "compilationResults": { + "rule": "repeated", + "type": "CompilationResult", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetCompilationResultRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/CompilationResult" + } + } + } + }, + "CreateCompilationResultRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "compilationResult": { + "type": "CompilationResult", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Target": { + "fields": { + "database": { + "type": "string", + "id": 1 + }, + "schema": { + "type": "string", + "id": 2 + }, + "name": { + "type": "string", + "id": 3 + } + } + }, + "RelationDescriptor": { + "fields": { + "description": { + "type": "string", + "id": 1 + }, + "columns": { + "rule": "repeated", + "type": "ColumnDescriptor", + "id": 2 + }, + "bigqueryLabels": { + "keyType": "string", + "type": "string", + "id": 3 + } + }, + "nested": { + "ColumnDescriptor": { + "fields": { + "path": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "bigqueryPolicyTags": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + } + } + }, + "CompilationResultAction": { + "oneofs": { + "compiledObject": { + "oneof": [ + "relation", + "operations", + "assertion", + "declaration" + ] + } + }, + "fields": { + "target": { + "type": "Target", + "id": 1 + }, + "canonicalTarget": { + "type": "Target", + "id": 2 + }, + "filePath": { + "type": "string", + "id": 3 + }, + "relation": { + "type": "Relation", + "id": 4 + }, + "operations": { + "type": "Operations", + "id": 5 + }, + "assertion": { + "type": "Assertion", + "id": 6 + }, + "declaration": { + "type": "Declaration", + "id": 7 + } + }, + "nested": { + "Relation": { + "fields": { + "dependencyTargets": { + "rule": "repeated", + "type": "Target", + "id": 1 + }, + "disabled": { + "type": "bool", + "id": 2 + }, + "tags": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "relationDescriptor": { + "type": "RelationDescriptor", + "id": 4 + }, + "relationType": { + "type": "RelationType", + "id": 5 + }, + "selectQuery": { + "type": "string", + "id": 6 + }, + "preOperations": { + "rule": "repeated", + "type": "string", + "id": 7 + }, + "postOperations": { + "rule": "repeated", + "type": "string", + "id": 8 + }, + "incrementalTableConfig": { + "type": "IncrementalTableConfig", + "id": 9 + }, + "partitionExpression": { + "type": "string", + "id": 10 + }, + "clusterExpressions": { + "rule": "repeated", + "type": "string", + "id": 11 + }, + "partitionExpirationDays": { + "type": "int32", + "id": 12 + }, + "requirePartitionFilter": { + "type": "bool", + "id": 13 + }, + "additionalOptions": { + "keyType": "string", + "type": "string", + "id": 14 + } + }, + "nested": { + "RelationType": { + "values": { + "RELATION_TYPE_UNSPECIFIED": 0, + "TABLE": 1, + "VIEW": 2, + "INCREMENTAL_TABLE": 3, + "MATERIALIZED_VIEW": 4 + } + }, + "IncrementalTableConfig": { + "fields": { + "incrementalSelectQuery": { + "type": "string", + "id": 1 + }, + "refreshDisabled": { + "type": "bool", + "id": 2 + }, + "uniqueKeyParts": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "updatePartitionFilter": { + "type": "string", + "id": 4 + }, + "incrementalPreOperations": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "incrementalPostOperations": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "Operations": { + "fields": { + "dependencyTargets": { + "rule": "repeated", + "type": "Target", + "id": 1 + }, + "disabled": { + "type": "bool", + "id": 2 + }, + "tags": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "relationDescriptor": { + "type": "RelationDescriptor", + "id": 6 + }, + "queries": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "hasOutput": { + "type": "bool", + "id": 5 + } + } + }, + "Assertion": { + "fields": { + "dependencyTargets": { + "rule": "repeated", + "type": "Target", + "id": 1 + }, + "parentAction": { + "type": "Target", + "id": 5 + }, + "disabled": { + "type": "bool", + "id": 2 + }, + "tags": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "selectQuery": { + "type": "string", + "id": 4 + }, + "relationDescriptor": { + "type": "RelationDescriptor", + "id": 6 + } + } + }, + "Declaration": { + "fields": { + "relationDescriptor": { + "type": "RelationDescriptor", + "id": 1 + } + } + } + } + }, + "QueryCompilationResultActionsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/CompilationResult" + } + }, + "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" + } + } + } + }, + "QueryCompilationResultActionsResponse": { + "fields": { + "compilationResultActions": { + "rule": "repeated", + "type": "CompilationResultAction", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "WorkflowInvocation": { + "options": { + "(google.api.resource).type": "dataform.googleapis.com/WorkflowInvocation", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/workflowInvocations/{workflow_invocation}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "compilationResult": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "(google.api.resource_reference).type": "dataform.googleapis.com/CompilationResult" + } + }, + "invocationConfig": { + "type": "InvocationConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "state": { + "type": "State", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "invocationTiming": { + "type": "google.type.Interval", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "InvocationConfig": { + "fields": { + "includedTargets": { + "rule": "repeated", + "type": "Target", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "includedTags": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "transitiveDependenciesIncluded": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "transitiveDependentsIncluded": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "fullyRefreshIncrementalTablesEnabled": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "RUNNING": 1, + "SUCCEEDED": 2, + "CANCELLED": 3, + "FAILED": 4, + "CANCELING": 5 + } + } + } + }, + "ListWorkflowInvocationsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListWorkflowInvocationsResponse": { + "fields": { + "workflowInvocations": { + "rule": "repeated", + "type": "WorkflowInvocation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetWorkflowInvocationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/WorkflowInvocation" + } + } + } + }, + "CreateWorkflowInvocationRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/Repository" + } + }, + "workflowInvocation": { + "type": "WorkflowInvocation", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteWorkflowInvocationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/WorkflowInvocation" + } + } + } + }, + "CancelWorkflowInvocationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/WorkflowInvocation" + } + } + } + }, + "WorkflowInvocationAction": { + "fields": { + "target": { + "type": "Target", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "canonicalTarget": { + "type": "Target", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "failureReason": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "invocationTiming": { + "type": "google.type.Interval", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "bigqueryAction": { + "type": "BigQueryAction", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "PENDING": 0, + "RUNNING": 1, + "SKIPPED": 2, + "DISABLED": 3, + "SUCCEEDED": 4, + "CANCELLED": 5, + "FAILED": 6 + } + }, + "BigQueryAction": { + "fields": { + "sqlScript": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + } + } + }, + "QueryWorkflowInvocationActionsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataform.googleapis.com/WorkflowInvocation" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "QueryWorkflowInvocationActionsResponse": { + "fields": { + "workflowInvocationActions": { + "rule": "repeated", + "type": "WorkflowInvocationAction", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + } + } } } } diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.cancel_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.cancel_workflow_invocation.js new file mode 100644 index 00000000000..24d1ecc0432 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.cancel_workflow_invocation.js @@ -0,0 +1,58 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_CancelWorkflowInvocation_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workflow invocation resource's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCancelWorkflowInvocation() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.cancelWorkflowInvocation(request); + console.log(response); + } + + callCancelWorkflowInvocation(); + // [END dataform_v1beta1_generated_Dataform_CancelWorkflowInvocation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.commit_workspace_changes.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.commit_workspace_changes.js new file mode 100644 index 00000000000..09bfef815ef --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.commit_workspace_changes.js @@ -0,0 +1,72 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name, author) { + // [START dataform_v1beta1_generated_Dataform_CommitWorkspaceChanges_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + /** + * Required. The commit's author. + */ + // const author = {} + /** + * Optional. The commit's message. + */ + // const commitMessage = 'abc123' + /** + * Optional. Full file paths to commit including filename, rooted at workspace root. If + * left empty, all files will be committed. + */ + // const paths = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCommitWorkspaceChanges() { + // Construct request + const request = { + name, + author, + }; + + // Run request + const response = await dataformClient.commitWorkspaceChanges(request); + console.log(response); + } + + callCommitWorkspaceChanges(); + // [END dataform_v1beta1_generated_Dataform_CommitWorkspaceChanges_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_compilation_result.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_compilation_result.js new file mode 100644 index 00000000000..98e7d25cf58 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_compilation_result.js @@ -0,0 +1,64 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, compilationResult) { + // [START dataform_v1beta1_generated_Dataform_CreateCompilationResult_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository in which to create the compilation result. Must be in the + * format `projects/* /locations/* /repositories/*`. + */ + // const parent = 'abc123' + /** + * Required. The compilation result to create. + */ + // const compilationResult = {} + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCreateCompilationResult() { + // Construct request + const request = { + parent, + compilationResult, + }; + + // Run request + const response = await dataformClient.createCompilationResult(request); + console.log(response); + } + + callCreateCompilationResult(); + // [END dataform_v1beta1_generated_Dataform_CreateCompilationResult_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_repository.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_repository.js new file mode 100644 index 00000000000..e1ef1fd5f61 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_repository.js @@ -0,0 +1,70 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, repository, repositoryId) { + // [START dataform_v1beta1_generated_Dataform_CreateRepository_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The location in which to create the repository. Must be in the format + * `projects/* /locations/*`. + */ + // const parent = 'abc123' + /** + * Required. The repository to create. + */ + // const repository = {} + /** + * Required. The ID to use for the repository, which will become the final component of + * the repository's resource name. + */ + // const repositoryId = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCreateRepository() { + // Construct request + const request = { + parent, + repository, + repositoryId, + }; + + // Run request + const response = await dataformClient.createRepository(request); + console.log(response); + } + + callCreateRepository(); + // [END dataform_v1beta1_generated_Dataform_CreateRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workflow_invocation.js new file mode 100644 index 00000000000..179dfbb60b8 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workflow_invocation.js @@ -0,0 +1,64 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, workflowInvocation) { + // [START dataform_v1beta1_generated_Dataform_CreateWorkflowInvocation_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository in which to create the workflow invocation. Must be in the + * format `projects/* /locations/* /repositories/*`. + */ + // const parent = 'abc123' + /** + * Required. The workflow invocation resource to create. + */ + // const workflowInvocation = {} + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCreateWorkflowInvocation() { + // Construct request + const request = { + parent, + workflowInvocation, + }; + + // Run request + const response = await dataformClient.createWorkflowInvocation(request); + console.log(response); + } + + callCreateWorkflowInvocation(); + // [END dataform_v1beta1_generated_Dataform_CreateWorkflowInvocation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workspace.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workspace.js new file mode 100644 index 00000000000..a99a33a73c4 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workspace.js @@ -0,0 +1,70 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, workspace, workspaceId) { + // [START dataform_v1beta1_generated_Dataform_CreateWorkspace_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository in which to create the workspace. Must be in the format + * `projects/* /locations/* /repositories/*`. + */ + // const parent = 'abc123' + /** + * Required. The workspace to create. + */ + // const workspace = {} + /** + * Required. The ID to use for the workspace, which will become the final component of + * the workspace's resource name. + */ + // const workspaceId = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callCreateWorkspace() { + // Construct request + const request = { + parent, + workspace, + workspaceId, + }; + + // Run request + const response = await dataformClient.createWorkspace(request); + console.log(response); + } + + callCreateWorkspace(); + // [END dataform_v1beta1_generated_Dataform_CreateWorkspace_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_repository.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_repository.js new file mode 100644 index 00000000000..172f3a132b4 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_repository.js @@ -0,0 +1,64 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_DeleteRepository_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository's name. + */ + // const name = 'abc123' + /** + * If set to true, any child resources of this repository will also be + * deleted. (Otherwise, the request will only succeed if the repository has no + * child resources.) + */ + // const force = true + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callDeleteRepository() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.deleteRepository(request); + console.log(response); + } + + callDeleteRepository(); + // [END dataform_v1beta1_generated_Dataform_DeleteRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workflow_invocation.js new file mode 100644 index 00000000000..697d2e33e7f --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workflow_invocation.js @@ -0,0 +1,58 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_DeleteWorkflowInvocation_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workflow invocation resource's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callDeleteWorkflowInvocation() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.deleteWorkflowInvocation(request); + console.log(response); + } + + callDeleteWorkflowInvocation(); + // [END dataform_v1beta1_generated_Dataform_DeleteWorkflowInvocation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workspace.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workspace.js new file mode 100644 index 00000000000..c6e8ae27ebd --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workspace.js @@ -0,0 +1,58 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_DeleteWorkspace_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace resource's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callDeleteWorkspace() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.deleteWorkspace(request); + console.log(response); + } + + callDeleteWorkspace(); + // [END dataform_v1beta1_generated_Dataform_DeleteWorkspace_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_diff.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_diff.js new file mode 100644 index 00000000000..362137ff127 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_diff.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path) { + // [START dataform_v1beta1_generated_Dataform_FetchFileDiff_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The file's full path including filename, relative to the workspace root. + */ + // const path = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callFetchFileDiff() { + // Construct request + const request = { + workspace, + path, + }; + + // Run request + const response = await dataformClient.fetchFileDiff(request); + console.log(response); + } + + callFetchFileDiff(); + // [END dataform_v1beta1_generated_Dataform_FetchFileDiff_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_git_statuses.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_git_statuses.js new file mode 100644 index 00000000000..53302d6f46f --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_git_statuses.js @@ -0,0 +1,58 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_FetchFileGitStatuses_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callFetchFileGitStatuses() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.fetchFileGitStatuses(request); + console.log(response); + } + + callFetchFileGitStatuses(); + // [END dataform_v1beta1_generated_Dataform_FetchFileGitStatuses_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js new file mode 100644 index 00000000000..e8b3db203e5 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js @@ -0,0 +1,64 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_FetchGitAheadBehind_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + /** + * Optional. The name of the branch in the Git remote against which this workspace + * should be compared. If left unset, the repository's default branch name + * will be used. + */ + // const remoteBranch = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callFetchGitAheadBehind() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.fetchGitAheadBehind(request); + console.log(response); + } + + callFetchGitAheadBehind(); + // [END dataform_v1beta1_generated_Dataform_FetchGitAheadBehind_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_remote_branches.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_remote_branches.js new file mode 100644 index 00000000000..1c998ab8f51 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_remote_branches.js @@ -0,0 +1,58 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_FetchRemoteBranches_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callFetchRemoteBranches() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.fetchRemoteBranches(request); + console.log(response); + } + + callFetchRemoteBranches(); + // [END dataform_v1beta1_generated_Dataform_FetchRemoteBranches_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_compilation_result.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_compilation_result.js new file mode 100644 index 00000000000..19ed3d1fa52 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_compilation_result.js @@ -0,0 +1,58 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_GetCompilationResult_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The compilation result's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callGetCompilationResult() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.getCompilationResult(request); + console.log(response); + } + + callGetCompilationResult(); + // [END dataform_v1beta1_generated_Dataform_GetCompilationResult_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_repository.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_repository.js new file mode 100644 index 00000000000..25332299aed --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_repository.js @@ -0,0 +1,58 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_GetRepository_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callGetRepository() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.getRepository(request); + console.log(response); + } + + callGetRepository(); + // [END dataform_v1beta1_generated_Dataform_GetRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workflow_invocation.js new file mode 100644 index 00000000000..3fa01e1e32b --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workflow_invocation.js @@ -0,0 +1,58 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_GetWorkflowInvocation_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workflow invocation resource's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callGetWorkflowInvocation() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.getWorkflowInvocation(request); + console.log(response); + } + + callGetWorkflowInvocation(); + // [END dataform_v1beta1_generated_Dataform_GetWorkflowInvocation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workspace.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workspace.js new file mode 100644 index 00000000000..a49c65287c9 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workspace.js @@ -0,0 +1,58 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_GetWorkspace_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callGetWorkspace() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.getWorkspace(request); + console.log(response); + } + + callGetWorkspace(); + // [END dataform_v1beta1_generated_Dataform_GetWorkspace_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.install_npm_packages.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.install_npm_packages.js new file mode 100644 index 00000000000..0d06ee66187 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.install_npm_packages.js @@ -0,0 +1,58 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace) { + // [START dataform_v1beta1_generated_Dataform_InstallNpmPackages_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callInstallNpmPackages() { + // Construct request + const request = { + workspace, + }; + + // Run request + const response = await dataformClient.installNpmPackages(request); + console.log(response); + } + + callInstallNpmPackages(); + // [END dataform_v1beta1_generated_Dataform_InstallNpmPackages_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_compilation_results.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_compilation_results.js new file mode 100644 index 00000000000..1ae1ad4e493 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_compilation_results.js @@ -0,0 +1,74 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataform_v1beta1_generated_Dataform_ListCompilationResults_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository in which to list compilation results. Must be in the + * format `projects/* /locations/* /repositories/*`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListCompilationResults` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCompilationResults` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callListCompilationResults() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataformClient.listCompilationResultsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListCompilationResults(); + // [END dataform_v1beta1_generated_Dataform_ListCompilationResults_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_repositories.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_repositories.js new file mode 100644 index 00000000000..787e921ab06 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_repositories.js @@ -0,0 +1,84 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataform_v1beta1_generated_Dataform_ListRepositories_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The location in which to list repositories. Must be in the format + * `projects/* /locations/*`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of repositories to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListRepositories` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListRepositories` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + */ + // const orderBy = 'abc123' + /** + * Optional. Filter for the returned list. + */ + // const filter = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callListRepositories() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataformClient.listRepositoriesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListRepositories(); + // [END dataform_v1beta1_generated_Dataform_ListRepositories_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workflow_invocations.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workflow_invocations.js new file mode 100644 index 00000000000..2d599f0f2ad --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workflow_invocations.js @@ -0,0 +1,74 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataform_v1beta1_generated_Dataform_ListWorkflowInvocations_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the WorkflowInvocation type. Must be in the + * format `projects/* /locations/* /repositories/*`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListWorkflowInvocations` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListWorkflowInvocations` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callListWorkflowInvocations() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataformClient.listWorkflowInvocationsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListWorkflowInvocations(); + // [END dataform_v1beta1_generated_Dataform_ListWorkflowInvocations_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workspaces.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workspaces.js new file mode 100644 index 00000000000..708c9d0b661 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workspaces.js @@ -0,0 +1,84 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataform_v1beta1_generated_Dataform_ListWorkspaces_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The repository in which to list workspaces. Must be in the + * format `projects/* /locations/* /repositories/*`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of workspaces to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListWorkspaces` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListWorkspaces` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + */ + // const orderBy = 'abc123' + /** + * Optional. Filter for the returned list. + */ + // const filter = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callListWorkspaces() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataformClient.listWorkspacesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListWorkspaces(); + // [END dataform_v1beta1_generated_Dataform_ListWorkspaces_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.make_directory.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.make_directory.js new file mode 100644 index 00000000000..fe239f6719f --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.make_directory.js @@ -0,0 +1,64 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path) { + // [START dataform_v1beta1_generated_Dataform_MakeDirectory_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The directory's full path including directory name, relative to the + * workspace root. + */ + // const path = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callMakeDirectory() { + // Construct request + const request = { + workspace, + path, + }; + + // Run request + const response = await dataformClient.makeDirectory(request); + console.log(response); + } + + callMakeDirectory(); + // [END dataform_v1beta1_generated_Dataform_MakeDirectory_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_directory.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_directory.js new file mode 100644 index 00000000000..2d43a94763d --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_directory.js @@ -0,0 +1,70 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path, newPath) { + // [START dataform_v1beta1_generated_Dataform_MoveDirectory_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The directory's full path including directory name, relative to the + * workspace root. + */ + // const path = 'abc123' + /** + * Required. The new path for the directory including directory name, rooted at + * workspace root. + */ + // const newPath = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callMoveDirectory() { + // Construct request + const request = { + workspace, + path, + newPath, + }; + + // Run request + const response = await dataformClient.moveDirectory(request); + console.log(response); + } + + callMoveDirectory(); + // [END dataform_v1beta1_generated_Dataform_MoveDirectory_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_file.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_file.js new file mode 100644 index 00000000000..64efc208951 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_file.js @@ -0,0 +1,68 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path, newPath) { + // [START dataform_v1beta1_generated_Dataform_MoveFile_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The file's full path including filename, relative to the workspace root. + */ + // const path = 'abc123' + /** + * Required. The file's new path including filename, relative to the workspace root. + */ + // const newPath = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callMoveFile() { + // Construct request + const request = { + workspace, + path, + newPath, + }; + + // Run request + const response = await dataformClient.moveFile(request); + console.log(response); + } + + callMoveFile(); + // [END dataform_v1beta1_generated_Dataform_MoveFile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.pull_git_commits.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.pull_git_commits.js new file mode 100644 index 00000000000..d3590eb808e --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.pull_git_commits.js @@ -0,0 +1,69 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name, author) { + // [START dataform_v1beta1_generated_Dataform_PullGitCommits_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + /** + * Optional. The name of the branch in the Git remote from which to pull commits. + * If left unset, the repository's default branch name will be used. + */ + // const remoteBranch = 'abc123' + /** + * Required. The author of any merge commit which may be created as a result of merging + * fetched Git commits into this workspace. + */ + // const author = {} + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callPullGitCommits() { + // Construct request + const request = { + name, + author, + }; + + // Run request + const response = await dataformClient.pullGitCommits(request); + console.log(response); + } + + callPullGitCommits(); + // [END dataform_v1beta1_generated_Dataform_PullGitCommits_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.push_git_commits.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.push_git_commits.js new file mode 100644 index 00000000000..a9058497177 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.push_git_commits.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_PushGitCommits_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + /** + * Optional. The name of the branch in the Git remote to which commits should be pushed. + * If left unset, the repository's default branch name will be used. + */ + // const remoteBranch = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callPushGitCommits() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.pushGitCommits(request); + console.log(response); + } + + callPushGitCommits(); + // [END dataform_v1beta1_generated_Dataform_PushGitCommits_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_compilation_result_actions.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_compilation_result_actions.js new file mode 100644 index 00000000000..9d59881df43 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_compilation_result_actions.js @@ -0,0 +1,79 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_QueryCompilationResultActions_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The compilation result's name. + */ + // const name = 'abc123' + /** + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `QueryCompilationResultActions` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `QueryCompilationResultActions` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + /** + * Optional. Optional filter for the returned list. Filtering is only currently + * supported on the `file_path` field. + */ + // const filter = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callQueryCompilationResultActions() { + // Construct request + const request = { + name, + }; + + // Run request + const iterable = await dataformClient.queryCompilationResultActionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callQueryCompilationResultActions(); + // [END dataform_v1beta1_generated_Dataform_QueryCompilationResultActions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_directory_contents.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_directory_contents.js new file mode 100644 index 00000000000..a086f744a96 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_directory_contents.js @@ -0,0 +1,79 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace) { + // [START dataform_v1beta1_generated_Dataform_QueryDirectoryContents_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Optional. The directory's full path including directory name, relative to the + * workspace root. If left unset, the workspace root is used. + */ + // const path = 'abc123' + /** + * Optional. Maximum number of paths to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `QueryDirectoryContents` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `QueryDirectoryContents` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callQueryDirectoryContents() { + // Construct request + const request = { + workspace, + }; + + // Run request + const iterable = await dataformClient.queryDirectoryContentsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callQueryDirectoryContents(); + // [END dataform_v1beta1_generated_Dataform_QueryDirectoryContents_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js new file mode 100644 index 00000000000..7a276ef49a3 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js @@ -0,0 +1,74 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_QueryWorkflowInvocationActions_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workflow invocation's name. + */ + // const name = 'abc123' + /** + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `QueryWorkflowInvocationActions` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `QueryWorkflowInvocationActions` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callQueryWorkflowInvocationActions() { + // Construct request + const request = { + name, + }; + + // Run request + const iterable = await dataformClient.queryWorkflowInvocationActionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callQueryWorkflowInvocationActions(); + // [END dataform_v1beta1_generated_Dataform_QueryWorkflowInvocationActions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.read_file.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.read_file.js new file mode 100644 index 00000000000..2893cebb35e --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.read_file.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path) { + // [START dataform_v1beta1_generated_Dataform_ReadFile_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The file's full path including filename, relative to the workspace root. + */ + // const path = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callReadFile() { + // Construct request + const request = { + workspace, + path, + }; + + // Run request + const response = await dataformClient.readFile(request); + console.log(response); + } + + callReadFile(); + // [END dataform_v1beta1_generated_Dataform_ReadFile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_directory.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_directory.js new file mode 100644 index 00000000000..9f941534c11 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_directory.js @@ -0,0 +1,64 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path) { + // [START dataform_v1beta1_generated_Dataform_RemoveDirectory_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The directory's full path including directory name, relative to the + * workspace root. + */ + // const path = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callRemoveDirectory() { + // Construct request + const request = { + workspace, + path, + }; + + // Run request + const response = await dataformClient.removeDirectory(request); + console.log(response); + } + + callRemoveDirectory(); + // [END dataform_v1beta1_generated_Dataform_RemoveDirectory_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_file.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_file.js new file mode 100644 index 00000000000..e7ef6a17f02 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_file.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path) { + // [START dataform_v1beta1_generated_Dataform_RemoveFile_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The file's full path including filename, relative to the workspace root. + */ + // const path = 'abc123' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callRemoveFile() { + // Construct request + const request = { + workspace, + path, + }; + + // Run request + const response = await dataformClient.removeFile(request); + console.log(response); + } + + callRemoveFile(); + // [END dataform_v1beta1_generated_Dataform_RemoveFile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.reset_workspace_changes.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.reset_workspace_changes.js new file mode 100644 index 00000000000..b3c26c242ba --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.reset_workspace_changes.js @@ -0,0 +1,67 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataform_v1beta1_generated_Dataform_ResetWorkspaceChanges_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const name = 'abc123' + /** + * Optional. Full file paths to reset back to their committed state including filename, + * rooted at workspace root. If left empty, all files will be reset. + */ + // const paths = 'abc123' + /** + * Optional. If set to true, untracked files will be deleted. + */ + // const clean = true + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callResetWorkspaceChanges() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataformClient.resetWorkspaceChanges(request); + console.log(response); + } + + callResetWorkspaceChanges(); + // [END dataform_v1beta1_generated_Dataform_ResetWorkspaceChanges_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.update_repository.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.update_repository.js new file mode 100644 index 00000000000..d8975adbe8b --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.update_repository.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(repository) { + // [START dataform_v1beta1_generated_Dataform_UpdateRepository_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Optional. Specifies the fields to be updated in the repository. If left unset, + * all fields will be updated. + */ + // const updateMask = {} + /** + * Required. The repository to update. + */ + // const repository = {} + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callUpdateRepository() { + // Construct request + const request = { + repository, + }; + + // Run request + const response = await dataformClient.updateRepository(request); + console.log(response); + } + + callUpdateRepository(); + // [END dataform_v1beta1_generated_Dataform_UpdateRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.write_file.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.write_file.js new file mode 100644 index 00000000000..9d60584c694 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.write_file.js @@ -0,0 +1,68 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(workspace, path, contents) { + // [START dataform_v1beta1_generated_Dataform_WriteFile_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The workspace's name. + */ + // const workspace = 'abc123' + /** + * Required. The file. + */ + // const path = 'abc123' + /** + * Required. The file's contents. + */ + // const contents = 'Buffer.from('string')' + + // Imports the Dataform library + const {DataformClient} = require('@google-cloud/dataform').v1beta1; + + // Instantiates a client + const dataformClient = new DataformClient(); + + async function callWriteFile() { + // Construct request + const request = { + workspace, + path, + contents, + }; + + // Run request + const response = await dataformClient.writeFile(request); + console.log(response); + } + + callWriteFile(); + // [END dataform_v1beta1_generated_Dataform_WriteFile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json b/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json new file mode 100644 index 00000000000..036ac39c900 --- /dev/null +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json @@ -0,0 +1,1647 @@ +{ + "clientLibrary": { + "name": "nodejs-dataform", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.dataform.v1beta1", + "version": "v1beta1" + } + ] + }, + "snippets": [ + { + "regionTag": "dataform_v1beta1_generated_Dataform_ListRepositories_async", + "title": "Dataform listRepositories Sample", + "origin": "API_DEFINITION", + "description": " Lists Repositories in a given project and location.", + "canonical": true, + "file": "dataform.list_repositories.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListRepositories", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ListRepositories", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.ListRepositoriesResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "ListRepositories", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ListRepositories", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_GetRepository_async", + "title": "Dataform getRepository Sample", + "origin": "API_DEFINITION", + "description": " Fetches a single Repository.", + "canonical": true, + "file": "dataform.get_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetRepository", + "fullName": "google.cloud.dataform.v1beta1.Dataform.GetRepository", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.Repository", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "GetRepository", + "fullName": "google.cloud.dataform.v1beta1.Dataform.GetRepository", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_CreateRepository_async", + "title": "Dataform createRepository Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Repository in a given project and location.", + "canonical": true, + "file": "dataform.create_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateRepository", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CreateRepository", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "repository", + "type": ".google.cloud.dataform.v1beta1.Repository" + }, + { + "name": "repository_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.Repository", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "CreateRepository", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CreateRepository", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_UpdateRepository_async", + "title": "Dataform updateRepository Sample", + "origin": "API_DEFINITION", + "description": " Updates a single Repository.", + "canonical": true, + "file": "dataform.update_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateRepository", + "fullName": "google.cloud.dataform.v1beta1.Dataform.UpdateRepository", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "repository", + "type": ".google.cloud.dataform.v1beta1.Repository" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.Repository", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "UpdateRepository", + "fullName": "google.cloud.dataform.v1beta1.Dataform.UpdateRepository", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_DeleteRepository_async", + "title": "Dataform deleteRepository Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single Repository.", + "canonical": true, + "file": "dataform.delete_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteRepository", + "fullName": "google.cloud.dataform.v1beta1.Dataform.DeleteRepository", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "DeleteRepository", + "fullName": "google.cloud.dataform.v1beta1.Dataform.DeleteRepository", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_FetchRemoteBranches_async", + "title": "Dataform fetchRemoteBranches Sample", + "origin": "API_DEFINITION", + "description": " Fetches a Repository's remote branches.", + "canonical": true, + "file": "dataform.fetch_remote_branches.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchRemoteBranches", + "fullName": "google.cloud.dataform.v1beta1.Dataform.FetchRemoteBranches", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "FetchRemoteBranches", + "fullName": "google.cloud.dataform.v1beta1.Dataform.FetchRemoteBranches", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_ListWorkspaces_async", + "title": "Dataform listWorkspaces Sample", + "origin": "API_DEFINITION", + "description": " Lists Workspaces in a given Repository.", + "canonical": true, + "file": "dataform.list_workspaces.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListWorkspaces", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ListWorkspaces", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.ListWorkspacesResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "ListWorkspaces", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ListWorkspaces", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_GetWorkspace_async", + "title": "Dataform getWorkspace Sample", + "origin": "API_DEFINITION", + "description": " Fetches a single Workspace.", + "canonical": true, + "file": "dataform.get_workspace.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetWorkspace", + "fullName": "google.cloud.dataform.v1beta1.Dataform.GetWorkspace", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.Workspace", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "GetWorkspace", + "fullName": "google.cloud.dataform.v1beta1.Dataform.GetWorkspace", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_CreateWorkspace_async", + "title": "Dataform createWorkspace Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Workspace in a given Repository.", + "canonical": true, + "file": "dataform.create_workspace.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateWorkspace", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CreateWorkspace", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "workspace", + "type": ".google.cloud.dataform.v1beta1.Workspace" + }, + { + "name": "workspace_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.Workspace", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "CreateWorkspace", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CreateWorkspace", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_DeleteWorkspace_async", + "title": "Dataform deleteWorkspace Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single Workspace.", + "canonical": true, + "file": "dataform.delete_workspace.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteWorkspace", + "fullName": "google.cloud.dataform.v1beta1.Dataform.DeleteWorkspace", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "DeleteWorkspace", + "fullName": "google.cloud.dataform.v1beta1.Dataform.DeleteWorkspace", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_InstallNpmPackages_async", + "title": "Dataform installNpmPackages Sample", + "origin": "API_DEFINITION", + "description": " Installs dependency NPM packages (inside a Workspace).", + "canonical": true, + "file": "dataform.install_npm_packages.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "InstallNpmPackages", + "fullName": "google.cloud.dataform.v1beta1.Dataform.InstallNpmPackages", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.InstallNpmPackagesResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "InstallNpmPackages", + "fullName": "google.cloud.dataform.v1beta1.Dataform.InstallNpmPackages", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_PullGitCommits_async", + "title": "Dataform pullGitCommits Sample", + "origin": "API_DEFINITION", + "description": " Pulls Git commits from the Repository's remote into a Workspace.", + "canonical": true, + "file": "dataform.pull_git_commits.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PullGitCommits", + "fullName": "google.cloud.dataform.v1beta1.Dataform.PullGitCommits", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "remote_branch", + "type": "TYPE_STRING" + }, + { + "name": "author", + "type": ".google.cloud.dataform.v1beta1.CommitAuthor" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "PullGitCommits", + "fullName": "google.cloud.dataform.v1beta1.Dataform.PullGitCommits", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_PushGitCommits_async", + "title": "Dataform pushGitCommits Sample", + "origin": "API_DEFINITION", + "description": " Pushes Git commits from a Workspace to the Repository's remote.", + "canonical": true, + "file": "dataform.push_git_commits.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PushGitCommits", + "fullName": "google.cloud.dataform.v1beta1.Dataform.PushGitCommits", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "remote_branch", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "PushGitCommits", + "fullName": "google.cloud.dataform.v1beta1.Dataform.PushGitCommits", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_FetchFileGitStatuses_async", + "title": "Dataform fetchFileGitStatuses Sample", + "origin": "API_DEFINITION", + "description": " Fetches Git statuses for the files in a Workspace.", + "canonical": true, + "file": "dataform.fetch_file_git_statuses.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchFileGitStatuses", + "fullName": "google.cloud.dataform.v1beta1.Dataform.FetchFileGitStatuses", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "FetchFileGitStatuses", + "fullName": "google.cloud.dataform.v1beta1.Dataform.FetchFileGitStatuses", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_FetchGitAheadBehind_async", + "title": "Dataform fetchGitAheadBehind Sample", + "origin": "API_DEFINITION", + "description": " Fetches Git ahead/behind against a remote branch.", + "canonical": true, + "file": "dataform.fetch_git_ahead_behind.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchGitAheadBehind", + "fullName": "google.cloud.dataform.v1beta1.Dataform.FetchGitAheadBehind", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "remote_branch", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "FetchGitAheadBehind", + "fullName": "google.cloud.dataform.v1beta1.Dataform.FetchGitAheadBehind", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_CommitWorkspaceChanges_async", + "title": "Dataform commitWorkspaceChanges Sample", + "origin": "API_DEFINITION", + "description": " Applies a Git commit for uncommitted files in a Workspace.", + "canonical": true, + "file": "dataform.commit_workspace_changes.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CommitWorkspaceChanges", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CommitWorkspaceChanges", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "author", + "type": ".google.cloud.dataform.v1beta1.CommitAuthor" + }, + { + "name": "commit_message", + "type": "TYPE_STRING" + }, + { + "name": "paths", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "CommitWorkspaceChanges", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CommitWorkspaceChanges", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_ResetWorkspaceChanges_async", + "title": "Dataform resetWorkspaceChanges Sample", + "origin": "API_DEFINITION", + "description": " Performs a Git reset for uncommitted files in a Workspace.", + "canonical": true, + "file": "dataform.reset_workspace_changes.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ResetWorkspaceChanges", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ResetWorkspaceChanges", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "paths", + "type": "TYPE_STRING[]" + }, + { + "name": "clean", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "ResetWorkspaceChanges", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ResetWorkspaceChanges", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_FetchFileDiff_async", + "title": "Dataform fetchFileDiff Sample", + "origin": "API_DEFINITION", + "description": " Fetches Git diff for an uncommitted file in a Workspace.", + "canonical": true, + "file": "dataform.fetch_file_diff.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchFileDiff", + "fullName": "google.cloud.dataform.v1beta1.Dataform.FetchFileDiff", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.FetchFileDiffResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "FetchFileDiff", + "fullName": "google.cloud.dataform.v1beta1.Dataform.FetchFileDiff", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_QueryDirectoryContents_async", + "title": "Dataform queryDirectoryContents Sample", + "origin": "API_DEFINITION", + "description": " Returns the contents of a given Workspace directory.", + "canonical": true, + "file": "dataform.query_directory_contents.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "QueryDirectoryContents", + "fullName": "google.cloud.dataform.v1beta1.Dataform.QueryDirectoryContents", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "QueryDirectoryContents", + "fullName": "google.cloud.dataform.v1beta1.Dataform.QueryDirectoryContents", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_MakeDirectory_async", + "title": "Dataform makeDirectory Sample", + "origin": "API_DEFINITION", + "description": " Creates a directory inside a Workspace.", + "canonical": true, + "file": "dataform.make_directory.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "MakeDirectory", + "fullName": "google.cloud.dataform.v1beta1.Dataform.MakeDirectory", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.MakeDirectoryResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "MakeDirectory", + "fullName": "google.cloud.dataform.v1beta1.Dataform.MakeDirectory", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_RemoveDirectory_async", + "title": "Dataform removeDirectory Sample", + "origin": "API_DEFINITION", + "description": " Deletes a directory (inside a Workspace) and all of its contents.", + "canonical": true, + "file": "dataform.remove_directory.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RemoveDirectory", + "fullName": "google.cloud.dataform.v1beta1.Dataform.RemoveDirectory", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "RemoveDirectory", + "fullName": "google.cloud.dataform.v1beta1.Dataform.RemoveDirectory", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_MoveDirectory_async", + "title": "Dataform moveDirectory Sample", + "origin": "API_DEFINITION", + "description": " Moves a directory (inside a Workspace), and all of its contents, to a new location.", + "canonical": true, + "file": "dataform.move_directory.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "MoveDirectory", + "fullName": "google.cloud.dataform.v1beta1.Dataform.MoveDirectory", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + }, + { + "name": "new_path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.MoveDirectoryResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "MoveDirectory", + "fullName": "google.cloud.dataform.v1beta1.Dataform.MoveDirectory", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_ReadFile_async", + "title": "Dataform readFile Sample", + "origin": "API_DEFINITION", + "description": " Returns the contents of a file (inside a Workspace).", + "canonical": true, + "file": "dataform.read_file.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ReadFile", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ReadFile", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.ReadFileResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "ReadFile", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ReadFile", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_RemoveFile_async", + "title": "Dataform removeFile Sample", + "origin": "API_DEFINITION", + "description": " Deletes a file (inside a Workspace).", + "canonical": true, + "file": "dataform.remove_file.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RemoveFile", + "fullName": "google.cloud.dataform.v1beta1.Dataform.RemoveFile", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "RemoveFile", + "fullName": "google.cloud.dataform.v1beta1.Dataform.RemoveFile", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_MoveFile_async", + "title": "Dataform moveFile Sample", + "origin": "API_DEFINITION", + "description": " Moves a file (inside a Workspace) to a new location.", + "canonical": true, + "file": "dataform.move_file.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "MoveFile", + "fullName": "google.cloud.dataform.v1beta1.Dataform.MoveFile", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + }, + { + "name": "new_path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.MoveFileResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "MoveFile", + "fullName": "google.cloud.dataform.v1beta1.Dataform.MoveFile", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_WriteFile_async", + "title": "Dataform writeFile Sample", + "origin": "API_DEFINITION", + "description": " Writes to a file (inside a Workspace).", + "canonical": true, + "file": "dataform.write_file.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "WriteFile", + "fullName": "google.cloud.dataform.v1beta1.Dataform.WriteFile", + "async": true, + "parameters": [ + { + "name": "workspace", + "type": "TYPE_STRING" + }, + { + "name": "path", + "type": "TYPE_STRING" + }, + { + "name": "contents", + "type": "TYPE_BYTES" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.WriteFileResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "WriteFile", + "fullName": "google.cloud.dataform.v1beta1.Dataform.WriteFile", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_ListCompilationResults_async", + "title": "Dataform listCompilationResults Sample", + "origin": "API_DEFINITION", + "description": " Lists CompilationResults in a given Repository.", + "canonical": true, + "file": "dataform.list_compilation_results.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCompilationResults", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ListCompilationResults", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.ListCompilationResultsResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "ListCompilationResults", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ListCompilationResults", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_GetCompilationResult_async", + "title": "Dataform getCompilationResult Sample", + "origin": "API_DEFINITION", + "description": " Fetches a single CompilationResult.", + "canonical": true, + "file": "dataform.get_compilation_result.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCompilationResult", + "fullName": "google.cloud.dataform.v1beta1.Dataform.GetCompilationResult", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.CompilationResult", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "GetCompilationResult", + "fullName": "google.cloud.dataform.v1beta1.Dataform.GetCompilationResult", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_CreateCompilationResult_async", + "title": "Dataform createCompilationResult Sample", + "origin": "API_DEFINITION", + "description": " Creates a new CompilationResult in a given project and location.", + "canonical": true, + "file": "dataform.create_compilation_result.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateCompilationResult", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CreateCompilationResult", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "compilation_result", + "type": ".google.cloud.dataform.v1beta1.CompilationResult" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.CompilationResult", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "CreateCompilationResult", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CreateCompilationResult", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_QueryCompilationResultActions_async", + "title": "Dataform queryCompilationResultActions Sample", + "origin": "API_DEFINITION", + "description": " Returns CompilationResultActions in a given CompilationResult.", + "canonical": true, + "file": "dataform.query_compilation_result_actions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "QueryCompilationResultActions", + "fullName": "google.cloud.dataform.v1beta1.Dataform.QueryCompilationResultActions", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "QueryCompilationResultActions", + "fullName": "google.cloud.dataform.v1beta1.Dataform.QueryCompilationResultActions", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_ListWorkflowInvocations_async", + "title": "Dataform listWorkflowInvocations Sample", + "origin": "API_DEFINITION", + "description": " Lists WorkflowInvocations in a given Repository.", + "canonical": true, + "file": "dataform.list_workflow_invocations.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListWorkflowInvocations", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ListWorkflowInvocations", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "ListWorkflowInvocations", + "fullName": "google.cloud.dataform.v1beta1.Dataform.ListWorkflowInvocations", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_GetWorkflowInvocation_async", + "title": "Dataform getWorkflowInvocation Sample", + "origin": "API_DEFINITION", + "description": " Fetches a single WorkflowInvocation.", + "canonical": true, + "file": "dataform.get_workflow_invocation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetWorkflowInvocation", + "fullName": "google.cloud.dataform.v1beta1.Dataform.GetWorkflowInvocation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.WorkflowInvocation", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "GetWorkflowInvocation", + "fullName": "google.cloud.dataform.v1beta1.Dataform.GetWorkflowInvocation", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_CreateWorkflowInvocation_async", + "title": "Dataform createWorkflowInvocation Sample", + "origin": "API_DEFINITION", + "description": " Creates a new WorkflowInvocation in a given Repository.", + "canonical": true, + "file": "dataform.create_workflow_invocation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateWorkflowInvocation", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CreateWorkflowInvocation", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "workflow_invocation", + "type": ".google.cloud.dataform.v1beta1.WorkflowInvocation" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.WorkflowInvocation", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "CreateWorkflowInvocation", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CreateWorkflowInvocation", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_DeleteWorkflowInvocation_async", + "title": "Dataform deleteWorkflowInvocation Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single WorkflowInvocation.", + "canonical": true, + "file": "dataform.delete_workflow_invocation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteWorkflowInvocation", + "fullName": "google.cloud.dataform.v1beta1.Dataform.DeleteWorkflowInvocation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "DeleteWorkflowInvocation", + "fullName": "google.cloud.dataform.v1beta1.Dataform.DeleteWorkflowInvocation", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_CancelWorkflowInvocation_async", + "title": "Dataform cancelWorkflowInvocation Sample", + "origin": "API_DEFINITION", + "description": " Requests cancellation of a running WorkflowInvocation.", + "canonical": true, + "file": "dataform.cancel_workflow_invocation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CancelWorkflowInvocation", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CancelWorkflowInvocation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "CancelWorkflowInvocation", + "fullName": "google.cloud.dataform.v1beta1.Dataform.CancelWorkflowInvocation", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + }, + { + "regionTag": "dataform_v1beta1_generated_Dataform_QueryWorkflowInvocationActions_async", + "title": "Dataform queryWorkflowInvocationActions Sample", + "origin": "API_DEFINITION", + "description": " Returns WorkflowInvocationActions in a given WorkflowInvocation.", + "canonical": true, + "file": "dataform.query_workflow_invocation_actions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "QueryWorkflowInvocationActions", + "fullName": "google.cloud.dataform.v1beta1.Dataform.QueryWorkflowInvocationActions", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse", + "client": { + "shortName": "DataformClient", + "fullName": "google.cloud.dataform.v1beta1.DataformClient" + }, + "method": { + "shortName": "QueryWorkflowInvocationActions", + "fullName": "google.cloud.dataform.v1beta1.Dataform.QueryWorkflowInvocationActions", + "service": { + "shortName": "Dataform", + "fullName": "google.cloud.dataform.v1beta1.Dataform" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/google-cloud-dataform/src/index.ts b/packages/google-cloud-dataform/src/index.ts index da342268449..5a59890dcc3 100644 --- a/packages/google-cloud-dataform/src/index.ts +++ b/packages/google-cloud-dataform/src/index.ts @@ -17,11 +17,12 @@ // ** All changes to this file may be overwritten. ** import * as v1alpha2 from './v1alpha2'; +import * as v1beta1 from './v1beta1'; const DataformClient = v1alpha2.DataformClient; type DataformClient = v1alpha2.DataformClient; -export {v1alpha2, DataformClient}; -export default {v1alpha2, DataformClient}; +export {v1alpha2, v1beta1, DataformClient}; +export default {v1alpha2, v1beta1, DataformClient}; import * as protos from '../protos/protos'; export {protos}; diff --git a/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts b/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts new file mode 100644 index 00000000000..318b582569a --- /dev/null +++ b/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts @@ -0,0 +1,5293 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import * as gax from 'google-gax'; +import { + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + GaxCall, + IamClient, + IamProtos, + LocationsClient, + LocationProtos, +} from 'google-gax'; + +import {Transform} from 'stream'; +import {RequestType} from 'google-gax/build/src/apitypes'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1beta1/dataform_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './dataform_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * Dataform is a service to develop, create, document, test, and update curated + * tables in BigQuery. + * @class + * @memberof v1beta1 + */ +export class DataformClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + dataformStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of DataformClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + */ + constructor(opts?: ClientOptions) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof DataformClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.iamClient = new IamClient(this._gaxGrpc, opts); + + this.locationsClient = new LocationsClient(this._gaxGrpc, opts); + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + compilationResultPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/compilationResults/{compilation_result}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + repositoryPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}' + ), + workflowInvocationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/workflowInvocations/{workflow_invocation}' + ), + workspacePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/workspaces/{workspace}' + ), + }; + + // 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 = { + listRepositories: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'repositories' + ), + listWorkspaces: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'workspaces' + ), + queryDirectoryContents: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'directoryEntries' + ), + listCompilationResults: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'compilationResults' + ), + queryCompilationResultActions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'compilationResultActions' + ), + listWorkflowInvocations: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'workflowInvocations' + ), + queryWorkflowInvocationActions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'workflowInvocationActions' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.dataform.v1beta1.Dataform', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = gax.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.dataformStub) { + return this.dataformStub; + } + + // Put together the "service stub" for + // google.cloud.dataform.v1beta1.Dataform. + this.dataformStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.dataform.v1beta1.Dataform' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.dataform.v1beta1.Dataform, + 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 dataformStubMethods = [ + 'listRepositories', + 'getRepository', + 'createRepository', + 'updateRepository', + 'deleteRepository', + 'fetchRemoteBranches', + 'listWorkspaces', + 'getWorkspace', + 'createWorkspace', + 'deleteWorkspace', + 'installNpmPackages', + 'pullGitCommits', + 'pushGitCommits', + 'fetchFileGitStatuses', + 'fetchGitAheadBehind', + 'commitWorkspaceChanges', + 'resetWorkspaceChanges', + 'fetchFileDiff', + 'queryDirectoryContents', + 'makeDirectory', + 'removeDirectory', + 'moveDirectory', + 'readFile', + 'removeFile', + 'moveFile', + 'writeFile', + 'listCompilationResults', + 'getCompilationResult', + 'createCompilationResult', + 'queryCompilationResultActions', + 'listWorkflowInvocations', + 'getWorkflowInvocation', + 'createWorkflowInvocation', + 'deleteWorkflowInvocation', + 'cancelWorkflowInvocation', + 'queryWorkflowInvocationActions', + ]; + for (const methodName of dataformStubMethods) { + const callPromise = this.dataformStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = this.descriptors.page[methodName] || undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.dataformStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'dataform.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'dataform.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Fetches a single Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The repository's name. + * @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 [Repository]{@link google.cloud.dataform.v1beta1.Repository}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.get_repository.js + * region_tag:dataform_v1beta1_generated_Dataform_GetRepository_async + */ + getRepository( + request?: protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IRepository, + protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest | undefined, + {} | undefined + ] + >; + getRepository( + request: protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getRepository( + request: protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getRepository( + request?: protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IRepository, + protos.google.cloud.dataform.v1beta1.IGetRepositoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getRepository(request, options, callback); + } + /** + * Creates a new Repository in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The location in which to create the repository. Must be in the format + * `projects/* /locations/*`. + * @param {google.cloud.dataform.v1beta1.Repository} request.repository + * Required. The repository to create. + * @param {string} request.repositoryId + * Required. The ID to use for the repository, which will become the final component of + * the repository's resource name. + * @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 [Repository]{@link google.cloud.dataform.v1beta1.Repository}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.create_repository.js + * region_tag:dataform_v1beta1_generated_Dataform_CreateRepository_async + */ + createRepository( + request?: protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IRepository, + protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest | undefined, + {} | undefined + ] + >; + createRepository( + request: protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createRepository( + request: protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createRepository( + request?: protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IRepository, + protos.google.cloud.dataform.v1beta1.ICreateRepositoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createRepository(request, options, callback); + } + /** + * Updates a single Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. Specifies the fields to be updated in the repository. If left unset, + * all fields will be updated. + * @param {google.cloud.dataform.v1beta1.Repository} request.repository + * Required. The repository to update. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Repository]{@link google.cloud.dataform.v1beta1.Repository}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.update_repository.js + * region_tag:dataform_v1beta1_generated_Dataform_UpdateRepository_async + */ + updateRepository( + request?: protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IRepository, + protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest | undefined, + {} | undefined + ] + >; + updateRepository( + request: protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateRepository( + request: protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateRepository( + request?: protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IRepository, + | protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IRepository, + protos.google.cloud.dataform.v1beta1.IUpdateRepositoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'repository.name': request.repository!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateRepository(request, options, callback); + } + /** + * Deletes a single Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The repository's name. + * @param {boolean} request.force + * If set to true, any child resources of this repository will also be + * deleted. (Otherwise, the request will only succeed if the repository has no + * child resources.) + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.delete_repository.js + * region_tag:dataform_v1beta1_generated_Dataform_DeleteRepository_async + */ + deleteRepository( + request?: protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest | undefined, + {} | undefined + ] + >; + deleteRepository( + request: protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteRepository( + request: protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteRepository( + request?: protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IDeleteRepositoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteRepository(request, options, callback); + } + /** + * Fetches a Repository's remote branches. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The repository's name. + * @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 [FetchRemoteBranchesResponse]{@link google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.fetch_remote_branches.js + * region_tag:dataform_v1beta1_generated_Dataform_FetchRemoteBranches_async + */ + fetchRemoteBranches( + request?: protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse, + ( + | protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest + | undefined + ), + {} | undefined + ] + >; + fetchRemoteBranches( + request: protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse, + | protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchRemoteBranches( + request: protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse, + | protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchRemoteBranches( + request?: protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse, + | protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse, + | protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse, + ( + | protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.fetchRemoteBranches(request, options, callback); + } + /** + * Fetches a single Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @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 [Workspace]{@link google.cloud.dataform.v1beta1.Workspace}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.get_workspace.js + * region_tag:dataform_v1beta1_generated_Dataform_GetWorkspace_async + */ + getWorkspace( + request?: protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkspace, + protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest | undefined, + {} | undefined + ] + >; + getWorkspace( + request: protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWorkspace, + | protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getWorkspace( + request: protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWorkspace, + | protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getWorkspace( + request?: protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IWorkspace, + | protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IWorkspace, + | protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkspace, + protos.google.cloud.dataform.v1beta1.IGetWorkspaceRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getWorkspace(request, options, callback); + } + /** + * Creates a new Workspace in a given Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to create the workspace. Must be in the format + * `projects/* /locations/* /repositories/*`. + * @param {google.cloud.dataform.v1beta1.Workspace} request.workspace + * Required. The workspace to create. + * @param {string} request.workspaceId + * Required. The ID to use for the workspace, which will become the final component of + * the workspace's resource name. + * @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 [Workspace]{@link google.cloud.dataform.v1beta1.Workspace}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.create_workspace.js + * region_tag:dataform_v1beta1_generated_Dataform_CreateWorkspace_async + */ + createWorkspace( + request?: protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkspace, + protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest | undefined, + {} | undefined + ] + >; + createWorkspace( + request: protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWorkspace, + | protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createWorkspace( + request: protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWorkspace, + | protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createWorkspace( + request?: protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IWorkspace, + | protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IWorkspace, + | protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkspace, + protos.google.cloud.dataform.v1beta1.ICreateWorkspaceRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createWorkspace(request, options, callback); + } + /** + * Deletes a single Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace resource's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.delete_workspace.js + * region_tag:dataform_v1beta1_generated_Dataform_DeleteWorkspace_async + */ + deleteWorkspace( + request?: protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest | undefined, + {} | undefined + ] + >; + deleteWorkspace( + request: protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteWorkspace( + request: protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteWorkspace( + request?: protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IDeleteWorkspaceRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteWorkspace(request, options, callback); + } + /** + * Installs dependency NPM packages (inside a Workspace). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @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 [InstallNpmPackagesResponse]{@link google.cloud.dataform.v1beta1.InstallNpmPackagesResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.install_npm_packages.js + * region_tag:dataform_v1beta1_generated_Dataform_InstallNpmPackages_async + */ + installNpmPackages( + request?: protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse, + ( + | protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest + | undefined + ), + {} | undefined + ] + >; + installNpmPackages( + request: protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse, + | protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + installNpmPackages( + request: protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse, + | protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + installNpmPackages( + request?: protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse, + | protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse, + | protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse, + ( + | protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.installNpmPackages(request, options, callback); + } + /** + * Pulls Git commits from the Repository's remote into a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {string} [request.remoteBranch] + * Optional. The name of the branch in the Git remote from which to pull commits. + * If left unset, the repository's default branch name will be used. + * @param {google.cloud.dataform.v1beta1.CommitAuthor} request.author + * Required. The author of any merge commit which may be created as a result of merging + * fetched Git commits into this workspace. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.pull_git_commits.js + * region_tag:dataform_v1beta1_generated_Dataform_PullGitCommits_async + */ + pullGitCommits( + request?: protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest | undefined, + {} | undefined + ] + >; + pullGitCommits( + request: protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + pullGitCommits( + request: protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + pullGitCommits( + request?: protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IPullGitCommitsRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.pullGitCommits(request, options, callback); + } + /** + * Pushes Git commits from a Workspace to the Repository's remote. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {string} [request.remoteBranch] + * Optional. The name of the branch in the Git remote to which commits should be pushed. + * If left unset, the repository's default branch name will be used. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.push_git_commits.js + * region_tag:dataform_v1beta1_generated_Dataform_PushGitCommits_async + */ + pushGitCommits( + request?: protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest | undefined, + {} | undefined + ] + >; + pushGitCommits( + request: protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + pushGitCommits( + request: protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + pushGitCommits( + request?: protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IPushGitCommitsRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.pushGitCommits(request, options, callback); + } + /** + * Fetches Git statuses for the files in a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @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 [FetchFileGitStatusesResponse]{@link google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.fetch_file_git_statuses.js + * region_tag:dataform_v1beta1_generated_Dataform_FetchFileGitStatuses_async + */ + fetchFileGitStatuses( + request?: protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse, + ( + | protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest + | undefined + ), + {} | undefined + ] + >; + fetchFileGitStatuses( + request: protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse, + | protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchFileGitStatuses( + request: protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse, + | protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchFileGitStatuses( + request?: protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse, + | protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse, + | protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse, + ( + | protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.fetchFileGitStatuses(request, options, callback); + } + /** + * Fetches Git ahead/behind against a remote branch. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {string} [request.remoteBranch] + * Optional. The name of the branch in the Git remote against which this workspace + * should be compared. If left unset, the repository's default branch name + * will be used. + * @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 [FetchGitAheadBehindResponse]{@link google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js + * region_tag:dataform_v1beta1_generated_Dataform_FetchGitAheadBehind_async + */ + fetchGitAheadBehind( + request?: protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse, + ( + | protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest + | undefined + ), + {} | undefined + ] + >; + fetchGitAheadBehind( + request: protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse, + | protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchGitAheadBehind( + request: protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse, + | protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchGitAheadBehind( + request?: protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse, + | protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse, + | protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse, + ( + | protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.fetchGitAheadBehind(request, options, callback); + } + /** + * Applies a Git commit for uncommitted files in a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {google.cloud.dataform.v1beta1.CommitAuthor} request.author + * Required. The commit's author. + * @param {string} [request.commitMessage] + * Optional. The commit's message. + * @param {string[]} [request.paths] + * Optional. Full file paths to commit including filename, rooted at workspace root. If + * left empty, all files will be committed. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.commit_workspace_changes.js + * region_tag:dataform_v1beta1_generated_Dataform_CommitWorkspaceChanges_async + */ + commitWorkspaceChanges( + request?: protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest + | undefined + ), + {} | undefined + ] + >; + commitWorkspaceChanges( + request: protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + commitWorkspaceChanges( + request: protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + commitWorkspaceChanges( + request?: protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1beta1.ICommitWorkspaceChangesRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.commitWorkspaceChanges( + request, + options, + callback + ); + } + /** + * Performs a Git reset for uncommitted files in a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workspace's name. + * @param {string[]} [request.paths] + * Optional. Full file paths to reset back to their committed state including filename, + * rooted at workspace root. If left empty, all files will be reset. + * @param {boolean} [request.clean] + * Optional. If set to true, untracked files will be deleted. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.reset_workspace_changes.js + * region_tag:dataform_v1beta1_generated_Dataform_ResetWorkspaceChanges_async + */ + resetWorkspaceChanges( + request?: protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest + | undefined + ), + {} | undefined + ] + >; + resetWorkspaceChanges( + request: protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + resetWorkspaceChanges( + request: protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + resetWorkspaceChanges( + request?: protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1beta1.IResetWorkspaceChangesRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.resetWorkspaceChanges(request, options, callback); + } + /** + * Fetches Git diff for an uncommitted file in a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The file's full path including filename, relative to the workspace root. + * @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 [FetchFileDiffResponse]{@link google.cloud.dataform.v1beta1.FetchFileDiffResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.fetch_file_diff.js + * region_tag:dataform_v1beta1_generated_Dataform_FetchFileDiff_async + */ + fetchFileDiff( + request?: protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IFetchFileDiffResponse, + protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest | undefined, + {} | undefined + ] + >; + fetchFileDiff( + request: protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IFetchFileDiffResponse, + | protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchFileDiff( + request: protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IFetchFileDiffResponse, + | protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchFileDiff( + request?: protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IFetchFileDiffResponse, + | protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IFetchFileDiffResponse, + | protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IFetchFileDiffResponse, + protos.google.cloud.dataform.v1beta1.IFetchFileDiffRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.fetchFileDiff(request, options, callback); + } + /** + * Creates a directory inside a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The directory's full path including directory name, relative to the + * workspace root. + * @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 [MakeDirectoryResponse]{@link google.cloud.dataform.v1beta1.MakeDirectoryResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.make_directory.js + * region_tag:dataform_v1beta1_generated_Dataform_MakeDirectory_async + */ + makeDirectory( + request?: protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IMakeDirectoryResponse, + protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest | undefined, + {} | undefined + ] + >; + makeDirectory( + request: protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IMakeDirectoryResponse, + | protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + makeDirectory( + request: protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IMakeDirectoryResponse, + | protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + makeDirectory( + request?: protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IMakeDirectoryResponse, + | protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IMakeDirectoryResponse, + | protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IMakeDirectoryResponse, + protos.google.cloud.dataform.v1beta1.IMakeDirectoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.makeDirectory(request, options, callback); + } + /** + * Deletes a directory (inside a Workspace) and all of its contents. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The directory's full path including directory name, relative to the + * workspace root. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.remove_directory.js + * region_tag:dataform_v1beta1_generated_Dataform_RemoveDirectory_async + */ + removeDirectory( + request?: protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest | undefined, + {} | undefined + ] + >; + removeDirectory( + request: protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + removeDirectory( + request: protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + removeDirectory( + request?: protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IRemoveDirectoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.removeDirectory(request, options, callback); + } + /** + * Moves a directory (inside a Workspace), and all of its contents, to a new + * location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The directory's full path including directory name, relative to the + * workspace root. + * @param {string} request.newPath + * Required. The new path for the directory including directory name, rooted at + * workspace root. + * @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 [MoveDirectoryResponse]{@link google.cloud.dataform.v1beta1.MoveDirectoryResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.move_directory.js + * region_tag:dataform_v1beta1_generated_Dataform_MoveDirectory_async + */ + moveDirectory( + request?: protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IMoveDirectoryResponse, + protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest | undefined, + {} | undefined + ] + >; + moveDirectory( + request: protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IMoveDirectoryResponse, + | protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + moveDirectory( + request: protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IMoveDirectoryResponse, + | protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + moveDirectory( + request?: protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IMoveDirectoryResponse, + | protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IMoveDirectoryResponse, + | protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IMoveDirectoryResponse, + protos.google.cloud.dataform.v1beta1.IMoveDirectoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.moveDirectory(request, options, callback); + } + /** + * Returns the contents of a file (inside a Workspace). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The file's full path including filename, relative to the workspace root. + * @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 [ReadFileResponse]{@link google.cloud.dataform.v1beta1.ReadFileResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.read_file.js + * region_tag:dataform_v1beta1_generated_Dataform_ReadFile_async + */ + readFile( + request?: protos.google.cloud.dataform.v1beta1.IReadFileRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IReadFileResponse, + protos.google.cloud.dataform.v1beta1.IReadFileRequest | undefined, + {} | undefined + ] + >; + readFile( + request: protos.google.cloud.dataform.v1beta1.IReadFileRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IReadFileResponse, + protos.google.cloud.dataform.v1beta1.IReadFileRequest | null | undefined, + {} | null | undefined + > + ): void; + readFile( + request: protos.google.cloud.dataform.v1beta1.IReadFileRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IReadFileResponse, + protos.google.cloud.dataform.v1beta1.IReadFileRequest | null | undefined, + {} | null | undefined + > + ): void; + readFile( + request?: protos.google.cloud.dataform.v1beta1.IReadFileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IReadFileResponse, + | protos.google.cloud.dataform.v1beta1.IReadFileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IReadFileResponse, + protos.google.cloud.dataform.v1beta1.IReadFileRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IReadFileResponse, + protos.google.cloud.dataform.v1beta1.IReadFileRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.readFile(request, options, callback); + } + /** + * Deletes a file (inside a Workspace). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The file's full path including filename, relative to the workspace root. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.remove_file.js + * region_tag:dataform_v1beta1_generated_Dataform_RemoveFile_async + */ + removeFile( + request?: protos.google.cloud.dataform.v1beta1.IRemoveFileRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IRemoveFileRequest | undefined, + {} | undefined + ] + >; + removeFile( + request: protos.google.cloud.dataform.v1beta1.IRemoveFileRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IRemoveFileRequest + | null + | undefined, + {} | null | undefined + > + ): void; + removeFile( + request: protos.google.cloud.dataform.v1beta1.IRemoveFileRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IRemoveFileRequest + | null + | undefined, + {} | null | undefined + > + ): void; + removeFile( + request?: protos.google.cloud.dataform.v1beta1.IRemoveFileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IRemoveFileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IRemoveFileRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataform.v1beta1.IRemoveFileRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.removeFile(request, options, callback); + } + /** + * Moves a file (inside a Workspace) to a new location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The file's full path including filename, relative to the workspace root. + * @param {string} request.newPath + * Required. The file's new path including filename, relative to the workspace root. + * @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 [MoveFileResponse]{@link google.cloud.dataform.v1beta1.MoveFileResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.move_file.js + * region_tag:dataform_v1beta1_generated_Dataform_MoveFile_async + */ + moveFile( + request?: protos.google.cloud.dataform.v1beta1.IMoveFileRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IMoveFileResponse, + protos.google.cloud.dataform.v1beta1.IMoveFileRequest | undefined, + {} | undefined + ] + >; + moveFile( + request: protos.google.cloud.dataform.v1beta1.IMoveFileRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IMoveFileResponse, + protos.google.cloud.dataform.v1beta1.IMoveFileRequest | null | undefined, + {} | null | undefined + > + ): void; + moveFile( + request: protos.google.cloud.dataform.v1beta1.IMoveFileRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IMoveFileResponse, + protos.google.cloud.dataform.v1beta1.IMoveFileRequest | null | undefined, + {} | null | undefined + > + ): void; + moveFile( + request?: protos.google.cloud.dataform.v1beta1.IMoveFileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IMoveFileResponse, + | protos.google.cloud.dataform.v1beta1.IMoveFileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IMoveFileResponse, + protos.google.cloud.dataform.v1beta1.IMoveFileRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IMoveFileResponse, + protos.google.cloud.dataform.v1beta1.IMoveFileRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.moveFile(request, options, callback); + } + /** + * Writes to a file (inside a Workspace). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} request.path + * Required. The file. + * @param {Buffer} request.contents + * Required. The file's contents. + * @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 [WriteFileResponse]{@link google.cloud.dataform.v1beta1.WriteFileResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.write_file.js + * region_tag:dataform_v1beta1_generated_Dataform_WriteFile_async + */ + writeFile( + request?: protos.google.cloud.dataform.v1beta1.IWriteFileRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWriteFileResponse, + protos.google.cloud.dataform.v1beta1.IWriteFileRequest | undefined, + {} | undefined + ] + >; + writeFile( + request: protos.google.cloud.dataform.v1beta1.IWriteFileRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWriteFileResponse, + protos.google.cloud.dataform.v1beta1.IWriteFileRequest | null | undefined, + {} | null | undefined + > + ): void; + writeFile( + request: protos.google.cloud.dataform.v1beta1.IWriteFileRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWriteFileResponse, + protos.google.cloud.dataform.v1beta1.IWriteFileRequest | null | undefined, + {} | null | undefined + > + ): void; + writeFile( + request?: protos.google.cloud.dataform.v1beta1.IWriteFileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IWriteFileResponse, + | protos.google.cloud.dataform.v1beta1.IWriteFileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IWriteFileResponse, + protos.google.cloud.dataform.v1beta1.IWriteFileRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWriteFileResponse, + protos.google.cloud.dataform.v1beta1.IWriteFileRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.writeFile(request, options, callback); + } + /** + * Fetches a single CompilationResult. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The compilation result's name. + * @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 [CompilationResult]{@link google.cloud.dataform.v1beta1.CompilationResult}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.get_compilation_result.js + * region_tag:dataform_v1beta1_generated_Dataform_GetCompilationResult_async + */ + getCompilationResult( + request?: protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.ICompilationResult, + ( + | protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest + | undefined + ), + {} | undefined + ] + >; + getCompilationResult( + request: protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.ICompilationResult, + | protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getCompilationResult( + request: protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.ICompilationResult, + | protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getCompilationResult( + request?: protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.ICompilationResult, + | protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.ICompilationResult, + | protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.ICompilationResult, + ( + | protos.google.cloud.dataform.v1beta1.IGetCompilationResultRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getCompilationResult(request, options, callback); + } + /** + * Creates a new CompilationResult in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to create the compilation result. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {google.cloud.dataform.v1beta1.CompilationResult} request.compilationResult + * Required. The compilation result to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [CompilationResult]{@link google.cloud.dataform.v1beta1.CompilationResult}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.create_compilation_result.js + * region_tag:dataform_v1beta1_generated_Dataform_CreateCompilationResult_async + */ + createCompilationResult( + request?: protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.ICompilationResult, + ( + | protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest + | undefined + ), + {} | undefined + ] + >; + createCompilationResult( + request: protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.ICompilationResult, + | protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createCompilationResult( + request: protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.ICompilationResult, + | protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createCompilationResult( + request?: protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.ICompilationResult, + | protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.ICompilationResult, + | protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.ICompilationResult, + ( + | protos.google.cloud.dataform.v1beta1.ICreateCompilationResultRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createCompilationResult( + request, + options, + callback + ); + } + /** + * Fetches a single WorkflowInvocation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation resource's name. + * @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 [WorkflowInvocation]{@link google.cloud.dataform.v1beta1.WorkflowInvocation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.get_workflow_invocation.js + * region_tag:dataform_v1beta1_generated_Dataform_GetWorkflowInvocation_async + */ + getWorkflowInvocation( + request?: protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + ( + | protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + >; + getWorkflowInvocation( + request: protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + | protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getWorkflowInvocation( + request: protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + | protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getWorkflowInvocation( + request?: protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + | protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + | protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + ( + | protos.google.cloud.dataform.v1beta1.IGetWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getWorkflowInvocation(request, options, callback); + } + /** + * Creates a new WorkflowInvocation in a given Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to create the workflow invocation. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {google.cloud.dataform.v1beta1.WorkflowInvocation} request.workflowInvocation + * Required. The workflow invocation resource to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [WorkflowInvocation]{@link google.cloud.dataform.v1beta1.WorkflowInvocation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.create_workflow_invocation.js + * region_tag:dataform_v1beta1_generated_Dataform_CreateWorkflowInvocation_async + */ + createWorkflowInvocation( + request?: protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + ( + | protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + >; + createWorkflowInvocation( + request: protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + | protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createWorkflowInvocation( + request: protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest, + callback: Callback< + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + | protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createWorkflowInvocation( + request?: protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + | protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + | protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation, + ( + | protos.google.cloud.dataform.v1beta1.ICreateWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createWorkflowInvocation( + request, + options, + callback + ); + } + /** + * Deletes a single WorkflowInvocation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation resource's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.delete_workflow_invocation.js + * region_tag:dataform_v1beta1_generated_Dataform_DeleteWorkflowInvocation_async + */ + deleteWorkflowInvocation( + request?: protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + >; + deleteWorkflowInvocation( + request: protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteWorkflowInvocation( + request: protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteWorkflowInvocation( + request?: protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1beta1.IDeleteWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteWorkflowInvocation( + request, + options, + callback + ); + } + /** + * Requests cancellation of a running WorkflowInvocation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation resource's name. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.cancel_workflow_invocation.js + * region_tag:dataform_v1beta1_generated_Dataform_CancelWorkflowInvocation_async + */ + cancelWorkflowInvocation( + request?: protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + >; + cancelWorkflowInvocation( + request: protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + cancelWorkflowInvocation( + request: protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + cancelWorkflowInvocation( + request?: protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dataform.v1beta1.ICancelWorkflowInvocationRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.cancelWorkflowInvocation( + request, + options, + callback + ); + } + + /** + * Lists Repositories in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The location in which to list repositories. Must be in the format + * `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of repositories to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListRepositories` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListRepositories` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Repository]{@link google.cloud.dataform.v1beta1.Repository}. + * 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 `listRepositoriesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listRepositories( + request?: protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IRepository[], + protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest | null, + protos.google.cloud.dataform.v1beta1.IListRepositoriesResponse + ] + >; + listRepositories( + request: protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + | protos.google.cloud.dataform.v1beta1.IListRepositoriesResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IRepository + > + ): void; + listRepositories( + request: protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + | protos.google.cloud.dataform.v1beta1.IListRepositoriesResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IRepository + > + ): void; + listRepositories( + request?: protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + | protos.google.cloud.dataform.v1beta1.IListRepositoriesResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IRepository + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + | protos.google.cloud.dataform.v1beta1.IListRepositoriesResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IRepository + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IRepository[], + protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest | null, + protos.google.cloud.dataform.v1beta1.IListRepositoriesResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listRepositories(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The location in which to list repositories. Must be in the format + * `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of repositories to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListRepositories` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListRepositories` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Repository]{@link google.cloud.dataform.v1beta1.Repository} 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 `listRepositoriesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listRepositoriesStream( + request?: protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listRepositories']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listRepositories.createStream( + this.innerApiCalls.listRepositories as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listRepositories`, 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 location in which to list repositories. Must be in the format + * `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of repositories to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListRepositories` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListRepositories` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Repository]{@link google.cloud.dataform.v1beta1.Repository}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.list_repositories.js + * region_tag:dataform_v1beta1_generated_Dataform_ListRepositories_async + */ + listRepositoriesAsync( + request?: protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listRepositories']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listRepositories.asyncIterate( + this.innerApiCalls['listRepositories'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Lists Workspaces in a given Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to list workspaces. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workspaces to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkspaces` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkspaces` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Workspace]{@link google.cloud.dataform.v1beta1.Workspace}. + * 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 `listWorkspacesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listWorkspaces( + request?: protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkspace[], + protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest | null, + protos.google.cloud.dataform.v1beta1.IListWorkspacesResponse + ] + >; + listWorkspaces( + request: protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + | protos.google.cloud.dataform.v1beta1.IListWorkspacesResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkspace + > + ): void; + listWorkspaces( + request: protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + | protos.google.cloud.dataform.v1beta1.IListWorkspacesResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkspace + > + ): void; + listWorkspaces( + request?: protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + | protos.google.cloud.dataform.v1beta1.IListWorkspacesResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkspace + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + | protos.google.cloud.dataform.v1beta1.IListWorkspacesResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkspace + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkspace[], + protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest | null, + protos.google.cloud.dataform.v1beta1.IListWorkspacesResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listWorkspaces(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to list workspaces. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workspaces to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkspaces` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkspaces` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Workspace]{@link google.cloud.dataform.v1beta1.Workspace} 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 `listWorkspacesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listWorkspacesStream( + request?: protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listWorkspaces']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listWorkspaces.createStream( + this.innerApiCalls.listWorkspaces as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listWorkspaces`, 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 repository in which to list workspaces. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workspaces to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkspaces` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkspaces` + * must match the call that provided the page token. + * @param {string} [request.orderBy] + * Optional. This field only supports ordering by `name`. If unspecified, the server + * will choose the ordering. If specified, the default order is ascending for + * the `name` field. + * @param {string} [request.filter] + * Optional. Filter for the returned list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Workspace]{@link google.cloud.dataform.v1beta1.Workspace}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.list_workspaces.js + * region_tag:dataform_v1beta1_generated_Dataform_ListWorkspaces_async + */ + listWorkspacesAsync( + request?: protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listWorkspaces']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listWorkspaces.asyncIterate( + this.innerApiCalls['listWorkspaces'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Returns the contents of a given Workspace directory. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} [request.path] + * Optional. The directory's full path including directory name, relative to the + * workspace root. If left unset, the workspace root is used. + * @param {number} [request.pageSize] + * Optional. Maximum number of paths to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryDirectoryContents` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryDirectoryContents` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [DirectoryEntry]{@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry}. + * 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 `queryDirectoryContentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryDirectoryContents( + request?: protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry[], + protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest | null, + protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse + ] + >; + queryDirectoryContents( + request: protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry + > + ): void; + queryDirectoryContents( + request: protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry + > + ): void; + queryDirectoryContents( + request?: protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry[], + protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest | null, + protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + this.initialize(); + return this.innerApiCalls.queryDirectoryContents( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.workspace + * Required. The workspace's name. + * @param {string} [request.path] + * Optional. The directory's full path including directory name, relative to the + * workspace root. If left unset, the workspace root is used. + * @param {number} [request.pageSize] + * Optional. Maximum number of paths to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryDirectoryContents` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryDirectoryContents` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [DirectoryEntry]{@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry} 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 `queryDirectoryContentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryDirectoryContentsStream( + request?: protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + const defaultCallSettings = this._defaults['queryDirectoryContents']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryDirectoryContents.createStream( + this.innerApiCalls.queryDirectoryContents as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `queryDirectoryContents`, 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.workspace + * Required. The workspace's name. + * @param {string} [request.path] + * Optional. The directory's full path including directory name, relative to the + * workspace root. If left unset, the workspace root is used. + * @param {number} [request.pageSize] + * Optional. Maximum number of paths to return. The server may return fewer + * items than requested. If unspecified, the server will pick an appropriate + * default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryDirectoryContents` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryDirectoryContents` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [DirectoryEntry]{@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.query_directory_contents.js + * region_tag:dataform_v1beta1_generated_Dataform_QueryDirectoryContents_async + */ + queryDirectoryContentsAsync( + request?: protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + workspace: request.workspace || '', + }); + const defaultCallSettings = this._defaults['queryDirectoryContents']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryDirectoryContents.asyncIterate( + this.innerApiCalls['queryDirectoryContents'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Lists CompilationResults in a given Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to list compilation results. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListCompilationResults` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCompilationResults` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [CompilationResult]{@link google.cloud.dataform.v1beta1.CompilationResult}. + * 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 `listCompilationResultsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listCompilationResults( + request?: protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.ICompilationResult[], + protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest | null, + protos.google.cloud.dataform.v1beta1.IListCompilationResultsResponse + ] + >; + listCompilationResults( + request: protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + | protos.google.cloud.dataform.v1beta1.IListCompilationResultsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.ICompilationResult + > + ): void; + listCompilationResults( + request: protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + | protos.google.cloud.dataform.v1beta1.IListCompilationResultsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.ICompilationResult + > + ): void; + listCompilationResults( + request?: protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + | protos.google.cloud.dataform.v1beta1.IListCompilationResultsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.ICompilationResult + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + | protos.google.cloud.dataform.v1beta1.IListCompilationResultsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.ICompilationResult + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.ICompilationResult[], + protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest | null, + protos.google.cloud.dataform.v1beta1.IListCompilationResultsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listCompilationResults( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The repository in which to list compilation results. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListCompilationResults` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCompilationResults` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [CompilationResult]{@link google.cloud.dataform.v1beta1.CompilationResult} 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 `listCompilationResultsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listCompilationResultsStream( + request?: protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listCompilationResults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listCompilationResults.createStream( + this.innerApiCalls.listCompilationResults as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listCompilationResults`, 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 repository in which to list compilation results. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListCompilationResults` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCompilationResults` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [CompilationResult]{@link google.cloud.dataform.v1beta1.CompilationResult}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.list_compilation_results.js + * region_tag:dataform_v1beta1_generated_Dataform_ListCompilationResults_async + */ + listCompilationResultsAsync( + request?: protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listCompilationResults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listCompilationResults.asyncIterate( + this.innerApiCalls['listCompilationResults'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Returns CompilationResultActions in a given CompilationResult. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The compilation result's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryCompilationResultActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryCompilationResultActions` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Optional filter for the returned list. Filtering is only currently + * supported on the `file_path` field. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [CompilationResultAction]{@link google.cloud.dataform.v1beta1.CompilationResultAction}. + * 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 `queryCompilationResultActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryCompilationResultActions( + request?: protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.ICompilationResultAction[], + protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest | null, + protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse + ] + >; + queryCompilationResultActions( + request: protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.ICompilationResultAction + > + ): void; + queryCompilationResultActions( + request: protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.ICompilationResultAction + > + ): void; + queryCompilationResultActions( + request?: protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.ICompilationResultAction + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.ICompilationResultAction + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.ICompilationResultAction[], + protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest | null, + protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.queryCompilationResultActions( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The compilation result's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryCompilationResultActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryCompilationResultActions` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Optional filter for the returned list. Filtering is only currently + * supported on the `file_path` field. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [CompilationResultAction]{@link google.cloud.dataform.v1beta1.CompilationResultAction} 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 `queryCompilationResultActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryCompilationResultActionsStream( + request?: protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + const defaultCallSettings = this._defaults['queryCompilationResultActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryCompilationResultActions.createStream( + this.innerApiCalls.queryCompilationResultActions as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `queryCompilationResultActions`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The compilation result's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of compilation results to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryCompilationResultActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryCompilationResultActions` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Optional filter for the returned list. Filtering is only currently + * supported on the `file_path` field. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [CompilationResultAction]{@link google.cloud.dataform.v1beta1.CompilationResultAction}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.query_compilation_result_actions.js + * region_tag:dataform_v1beta1_generated_Dataform_QueryCompilationResultActions_async + */ + queryCompilationResultActionsAsync( + request?: protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + const defaultCallSettings = this._defaults['queryCompilationResultActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryCompilationResultActions.asyncIterate( + this.innerApiCalls['queryCompilationResultActions'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Lists WorkflowInvocations in a given Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the WorkflowInvocation type. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkflowInvocations` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkflowInvocations` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [WorkflowInvocation]{@link google.cloud.dataform.v1beta1.WorkflowInvocation}. + * 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 `listWorkflowInvocationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listWorkflowInvocations( + request?: protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation[], + protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest | null, + protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse + ] + >; + listWorkflowInvocations( + request: protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + | protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation + > + ): void; + listWorkflowInvocations( + request: protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + | protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation + > + ): void; + listWorkflowInvocations( + request?: protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + | protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + | protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkflowInvocation[], + protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest | null, + protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listWorkflowInvocations( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the WorkflowInvocation type. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkflowInvocations` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkflowInvocations` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [WorkflowInvocation]{@link google.cloud.dataform.v1beta1.WorkflowInvocation} 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 `listWorkflowInvocationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listWorkflowInvocationsStream( + request?: protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listWorkflowInvocations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listWorkflowInvocations.createStream( + this.innerApiCalls.listWorkflowInvocations as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listWorkflowInvocations`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the WorkflowInvocation type. Must be in the + * format `projects/* /locations/* /repositories/*`. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListWorkflowInvocations` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkflowInvocations` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [WorkflowInvocation]{@link google.cloud.dataform.v1beta1.WorkflowInvocation}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.list_workflow_invocations.js + * region_tag:dataform_v1beta1_generated_Dataform_ListWorkflowInvocations_async + */ + listWorkflowInvocationsAsync( + request?: protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listWorkflowInvocations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listWorkflowInvocations.asyncIterate( + this.innerApiCalls['listWorkflowInvocations'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Returns WorkflowInvocationActions in a given WorkflowInvocation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryWorkflowInvocationActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryWorkflowInvocationActions` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [WorkflowInvocationAction]{@link google.cloud.dataform.v1beta1.WorkflowInvocationAction}. + * 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 `queryWorkflowInvocationActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryWorkflowInvocationActions( + request?: protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkflowInvocationAction[], + protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest | null, + protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse + ] + >; + queryWorkflowInvocationActions( + request: protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkflowInvocationAction + > + ): void; + queryWorkflowInvocationActions( + request: protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + callback: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkflowInvocationAction + > + ): void; + queryWorkflowInvocationActions( + request?: protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkflowInvocationAction + >, + callback?: PaginationCallback< + protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + | protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse + | null + | undefined, + protos.google.cloud.dataform.v1beta1.IWorkflowInvocationAction + > + ): Promise< + [ + protos.google.cloud.dataform.v1beta1.IWorkflowInvocationAction[], + protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest | null, + protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.queryWorkflowInvocationActions( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryWorkflowInvocationActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryWorkflowInvocationActions` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [WorkflowInvocationAction]{@link google.cloud.dataform.v1beta1.WorkflowInvocationAction} 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 `queryWorkflowInvocationActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + queryWorkflowInvocationActionsStream( + request?: protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + const defaultCallSettings = + this._defaults['queryWorkflowInvocationActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryWorkflowInvocationActions.createStream( + this.innerApiCalls.queryWorkflowInvocationActions as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `queryWorkflowInvocationActions`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The workflow invocation's name. + * @param {number} [request.pageSize] + * Optional. Maximum number of workflow invocations to return. The server may return + * fewer items than requested. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `QueryWorkflowInvocationActions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `QueryWorkflowInvocationActions` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [WorkflowInvocationAction]{@link google.cloud.dataform.v1beta1.WorkflowInvocationAction}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js + * region_tag:dataform_v1beta1_generated_Dataform_QueryWorkflowInvocationActions_async + */ + queryWorkflowInvocationActionsAsync( + request?: protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + const defaultCallSettings = + this._defaults['queryWorkflowInvocationActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.queryWorkflowInvocationActions.asyncIterate( + this.innerApiCalls['queryWorkflowInvocationActions'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as [GetPolicyOptions]{@link google.iam.v1.GetPolicyOptions} + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} 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 [Policy]{@link google.iam.v1.Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.getIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} 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 [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.setIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} 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 [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + */ + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.testIamPermissions(request, options, callback); + } + + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Location]{@link google.cloud.location.Location}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * ``` + * const [response] = await client.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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Location]{@link google.cloud.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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * 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 compilationResult resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} compilation_result + * @returns {string} Resource name string. + */ + compilationResultPath( + project: string, + location: string, + repository: string, + compilationResult: string + ) { + return this.pathTemplates.compilationResultPathTemplate.render({ + project: project, + location: location, + repository: repository, + compilation_result: compilationResult, + }); + } + + /** + * Parse the project from CompilationResult resource. + * + * @param {string} compilationResultName + * A fully-qualified path representing CompilationResult resource. + * @returns {string} A string representing the project. + */ + matchProjectFromCompilationResultName(compilationResultName: string) { + return this.pathTemplates.compilationResultPathTemplate.match( + compilationResultName + ).project; + } + + /** + * Parse the location from CompilationResult resource. + * + * @param {string} compilationResultName + * A fully-qualified path representing CompilationResult resource. + * @returns {string} A string representing the location. + */ + matchLocationFromCompilationResultName(compilationResultName: string) { + return this.pathTemplates.compilationResultPathTemplate.match( + compilationResultName + ).location; + } + + /** + * Parse the repository from CompilationResult resource. + * + * @param {string} compilationResultName + * A fully-qualified path representing CompilationResult resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromCompilationResultName(compilationResultName: string) { + return this.pathTemplates.compilationResultPathTemplate.match( + compilationResultName + ).repository; + } + + /** + * Parse the compilation_result from CompilationResult resource. + * + * @param {string} compilationResultName + * A fully-qualified path representing CompilationResult resource. + * @returns {string} A string representing the compilation_result. + */ + matchCompilationResultFromCompilationResultName( + compilationResultName: string + ) { + return this.pathTemplates.compilationResultPathTemplate.match( + compilationResultName + ).compilation_result; + } + + /** + * 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 repository resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @returns {string} Resource name string. + */ + repositoryPath(project: string, location: string, repository: string) { + return this.pathTemplates.repositoryPathTemplate.render({ + project: project, + location: location, + repository: repository, + }); + } + + /** + * Parse the project from Repository resource. + * + * @param {string} repositoryName + * A fully-qualified path representing Repository resource. + * @returns {string} A string representing the project. + */ + matchProjectFromRepositoryName(repositoryName: string) { + return this.pathTemplates.repositoryPathTemplate.match(repositoryName) + .project; + } + + /** + * Parse the location from Repository resource. + * + * @param {string} repositoryName + * A fully-qualified path representing Repository resource. + * @returns {string} A string representing the location. + */ + matchLocationFromRepositoryName(repositoryName: string) { + return this.pathTemplates.repositoryPathTemplate.match(repositoryName) + .location; + } + + /** + * Parse the repository from Repository resource. + * + * @param {string} repositoryName + * A fully-qualified path representing Repository resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromRepositoryName(repositoryName: string) { + return this.pathTemplates.repositoryPathTemplate.match(repositoryName) + .repository; + } + + /** + * Return a fully-qualified workflowInvocation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} workflow_invocation + * @returns {string} Resource name string. + */ + workflowInvocationPath( + project: string, + location: string, + repository: string, + workflowInvocation: string + ) { + return this.pathTemplates.workflowInvocationPathTemplate.render({ + project: project, + location: location, + repository: repository, + workflow_invocation: workflowInvocation, + }); + } + + /** + * Parse the project from WorkflowInvocation resource. + * + * @param {string} workflowInvocationName + * A fully-qualified path representing WorkflowInvocation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromWorkflowInvocationName(workflowInvocationName: string) { + return this.pathTemplates.workflowInvocationPathTemplate.match( + workflowInvocationName + ).project; + } + + /** + * Parse the location from WorkflowInvocation resource. + * + * @param {string} workflowInvocationName + * A fully-qualified path representing WorkflowInvocation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromWorkflowInvocationName(workflowInvocationName: string) { + return this.pathTemplates.workflowInvocationPathTemplate.match( + workflowInvocationName + ).location; + } + + /** + * Parse the repository from WorkflowInvocation resource. + * + * @param {string} workflowInvocationName + * A fully-qualified path representing WorkflowInvocation resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromWorkflowInvocationName(workflowInvocationName: string) { + return this.pathTemplates.workflowInvocationPathTemplate.match( + workflowInvocationName + ).repository; + } + + /** + * Parse the workflow_invocation from WorkflowInvocation resource. + * + * @param {string} workflowInvocationName + * A fully-qualified path representing WorkflowInvocation resource. + * @returns {string} A string representing the workflow_invocation. + */ + matchWorkflowInvocationFromWorkflowInvocationName( + workflowInvocationName: string + ) { + return this.pathTemplates.workflowInvocationPathTemplate.match( + workflowInvocationName + ).workflow_invocation; + } + + /** + * Return a fully-qualified workspace resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} workspace + * @returns {string} Resource name string. + */ + workspacePath( + project: string, + location: string, + repository: string, + workspace: string + ) { + return this.pathTemplates.workspacePathTemplate.render({ + project: project, + location: location, + repository: repository, + workspace: workspace, + }); + } + + /** + * Parse the project from Workspace resource. + * + * @param {string} workspaceName + * A fully-qualified path representing Workspace resource. + * @returns {string} A string representing the project. + */ + matchProjectFromWorkspaceName(workspaceName: string) { + return this.pathTemplates.workspacePathTemplate.match(workspaceName) + .project; + } + + /** + * Parse the location from Workspace resource. + * + * @param {string} workspaceName + * A fully-qualified path representing Workspace resource. + * @returns {string} A string representing the location. + */ + matchLocationFromWorkspaceName(workspaceName: string) { + return this.pathTemplates.workspacePathTemplate.match(workspaceName) + .location; + } + + /** + * Parse the repository from Workspace resource. + * + * @param {string} workspaceName + * A fully-qualified path representing Workspace resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromWorkspaceName(workspaceName: string) { + return this.pathTemplates.workspacePathTemplate.match(workspaceName) + .repository; + } + + /** + * Parse the workspace from Workspace resource. + * + * @param {string} workspaceName + * A fully-qualified path representing Workspace resource. + * @returns {string} A string representing the workspace. + */ + matchWorkspaceFromWorkspaceName(workspaceName: string) { + return this.pathTemplates.workspacePathTemplate.match(workspaceName) + .workspace; + } + + /** + * 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.dataformStub && !this._terminated) { + return this.dataformStub.then(stub => { + this._terminated = true; + stub.close(); + this.iamClient.close(); + this.locationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-dataform/src/v1beta1/dataform_client_config.json b/packages/google-cloud-dataform/src/v1beta1/dataform_client_config.json new file mode 100644 index 00000000000..6e6161397a7 --- /dev/null +++ b/packages/google-cloud-dataform/src/v1beta1/dataform_client_config.json @@ -0,0 +1,170 @@ +{ + "interfaces": { + "google.cloud.dataform.v1beta1.Dataform": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "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 + } + }, + "methods": { + "ListRepositories": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetRepository": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateRepository": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateRepository": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteRepository": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FetchRemoteBranches": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListWorkspaces": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetWorkspace": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateWorkspace": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteWorkspace": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "InstallNpmPackages": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "PullGitCommits": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "PushGitCommits": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FetchFileGitStatuses": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FetchGitAheadBehind": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CommitWorkspaceChanges": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ResetWorkspaceChanges": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FetchFileDiff": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "QueryDirectoryContents": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "MakeDirectory": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RemoveDirectory": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "MoveDirectory": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ReadFile": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RemoveFile": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "MoveFile": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "WriteFile": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListCompilationResults": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetCompilationResult": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateCompilationResult": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "QueryCompilationResultActions": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListWorkflowInvocations": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetWorkflowInvocation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateWorkflowInvocation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteWorkflowInvocation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CancelWorkflowInvocation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "QueryWorkflowInvocationActions": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-dataform/src/v1beta1/dataform_proto_list.json b/packages/google-cloud-dataform/src/v1beta1/dataform_proto_list.json new file mode 100644 index 00000000000..8e9b5e1395c --- /dev/null +++ b/packages/google-cloud-dataform/src/v1beta1/dataform_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/cloud/dataform/v1beta1/dataform.proto" +] diff --git a/packages/google-cloud-dataform/src/v1beta1/gapic_metadata.json b/packages/google-cloud-dataform/src/v1beta1/gapic_metadata.json new file mode 100644 index 00000000000..72fc33e7959 --- /dev/null +++ b/packages/google-cloud-dataform/src/v1beta1/gapic_metadata.json @@ -0,0 +1,411 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.dataform.v1beta1", + "libraryPackage": "@google-cloud/dataform", + "services": { + "Dataform": { + "clients": { + "grpc": { + "libraryClient": "DataformClient", + "rpcs": { + "GetRepository": { + "methods": [ + "getRepository" + ] + }, + "CreateRepository": { + "methods": [ + "createRepository" + ] + }, + "UpdateRepository": { + "methods": [ + "updateRepository" + ] + }, + "DeleteRepository": { + "methods": [ + "deleteRepository" + ] + }, + "FetchRemoteBranches": { + "methods": [ + "fetchRemoteBranches" + ] + }, + "GetWorkspace": { + "methods": [ + "getWorkspace" + ] + }, + "CreateWorkspace": { + "methods": [ + "createWorkspace" + ] + }, + "DeleteWorkspace": { + "methods": [ + "deleteWorkspace" + ] + }, + "InstallNpmPackages": { + "methods": [ + "installNpmPackages" + ] + }, + "PullGitCommits": { + "methods": [ + "pullGitCommits" + ] + }, + "PushGitCommits": { + "methods": [ + "pushGitCommits" + ] + }, + "FetchFileGitStatuses": { + "methods": [ + "fetchFileGitStatuses" + ] + }, + "FetchGitAheadBehind": { + "methods": [ + "fetchGitAheadBehind" + ] + }, + "CommitWorkspaceChanges": { + "methods": [ + "commitWorkspaceChanges" + ] + }, + "ResetWorkspaceChanges": { + "methods": [ + "resetWorkspaceChanges" + ] + }, + "FetchFileDiff": { + "methods": [ + "fetchFileDiff" + ] + }, + "MakeDirectory": { + "methods": [ + "makeDirectory" + ] + }, + "RemoveDirectory": { + "methods": [ + "removeDirectory" + ] + }, + "MoveDirectory": { + "methods": [ + "moveDirectory" + ] + }, + "ReadFile": { + "methods": [ + "readFile" + ] + }, + "RemoveFile": { + "methods": [ + "removeFile" + ] + }, + "MoveFile": { + "methods": [ + "moveFile" + ] + }, + "WriteFile": { + "methods": [ + "writeFile" + ] + }, + "GetCompilationResult": { + "methods": [ + "getCompilationResult" + ] + }, + "CreateCompilationResult": { + "methods": [ + "createCompilationResult" + ] + }, + "GetWorkflowInvocation": { + "methods": [ + "getWorkflowInvocation" + ] + }, + "CreateWorkflowInvocation": { + "methods": [ + "createWorkflowInvocation" + ] + }, + "DeleteWorkflowInvocation": { + "methods": [ + "deleteWorkflowInvocation" + ] + }, + "CancelWorkflowInvocation": { + "methods": [ + "cancelWorkflowInvocation" + ] + }, + "ListRepositories": { + "methods": [ + "listRepositories", + "listRepositoriesStream", + "listRepositoriesAsync" + ] + }, + "ListWorkspaces": { + "methods": [ + "listWorkspaces", + "listWorkspacesStream", + "listWorkspacesAsync" + ] + }, + "QueryDirectoryContents": { + "methods": [ + "queryDirectoryContents", + "queryDirectoryContentsStream", + "queryDirectoryContentsAsync" + ] + }, + "ListCompilationResults": { + "methods": [ + "listCompilationResults", + "listCompilationResultsStream", + "listCompilationResultsAsync" + ] + }, + "QueryCompilationResultActions": { + "methods": [ + "queryCompilationResultActions", + "queryCompilationResultActionsStream", + "queryCompilationResultActionsAsync" + ] + }, + "ListWorkflowInvocations": { + "methods": [ + "listWorkflowInvocations", + "listWorkflowInvocationsStream", + "listWorkflowInvocationsAsync" + ] + }, + "QueryWorkflowInvocationActions": { + "methods": [ + "queryWorkflowInvocationActions", + "queryWorkflowInvocationActionsStream", + "queryWorkflowInvocationActionsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "DataformClient", + "rpcs": { + "GetRepository": { + "methods": [ + "getRepository" + ] + }, + "CreateRepository": { + "methods": [ + "createRepository" + ] + }, + "UpdateRepository": { + "methods": [ + "updateRepository" + ] + }, + "DeleteRepository": { + "methods": [ + "deleteRepository" + ] + }, + "FetchRemoteBranches": { + "methods": [ + "fetchRemoteBranches" + ] + }, + "GetWorkspace": { + "methods": [ + "getWorkspace" + ] + }, + "CreateWorkspace": { + "methods": [ + "createWorkspace" + ] + }, + "DeleteWorkspace": { + "methods": [ + "deleteWorkspace" + ] + }, + "InstallNpmPackages": { + "methods": [ + "installNpmPackages" + ] + }, + "PullGitCommits": { + "methods": [ + "pullGitCommits" + ] + }, + "PushGitCommits": { + "methods": [ + "pushGitCommits" + ] + }, + "FetchFileGitStatuses": { + "methods": [ + "fetchFileGitStatuses" + ] + }, + "FetchGitAheadBehind": { + "methods": [ + "fetchGitAheadBehind" + ] + }, + "CommitWorkspaceChanges": { + "methods": [ + "commitWorkspaceChanges" + ] + }, + "ResetWorkspaceChanges": { + "methods": [ + "resetWorkspaceChanges" + ] + }, + "FetchFileDiff": { + "methods": [ + "fetchFileDiff" + ] + }, + "MakeDirectory": { + "methods": [ + "makeDirectory" + ] + }, + "RemoveDirectory": { + "methods": [ + "removeDirectory" + ] + }, + "MoveDirectory": { + "methods": [ + "moveDirectory" + ] + }, + "ReadFile": { + "methods": [ + "readFile" + ] + }, + "RemoveFile": { + "methods": [ + "removeFile" + ] + }, + "MoveFile": { + "methods": [ + "moveFile" + ] + }, + "WriteFile": { + "methods": [ + "writeFile" + ] + }, + "GetCompilationResult": { + "methods": [ + "getCompilationResult" + ] + }, + "CreateCompilationResult": { + "methods": [ + "createCompilationResult" + ] + }, + "GetWorkflowInvocation": { + "methods": [ + "getWorkflowInvocation" + ] + }, + "CreateWorkflowInvocation": { + "methods": [ + "createWorkflowInvocation" + ] + }, + "DeleteWorkflowInvocation": { + "methods": [ + "deleteWorkflowInvocation" + ] + }, + "CancelWorkflowInvocation": { + "methods": [ + "cancelWorkflowInvocation" + ] + }, + "ListRepositories": { + "methods": [ + "listRepositories", + "listRepositoriesStream", + "listRepositoriesAsync" + ] + }, + "ListWorkspaces": { + "methods": [ + "listWorkspaces", + "listWorkspacesStream", + "listWorkspacesAsync" + ] + }, + "QueryDirectoryContents": { + "methods": [ + "queryDirectoryContents", + "queryDirectoryContentsStream", + "queryDirectoryContentsAsync" + ] + }, + "ListCompilationResults": { + "methods": [ + "listCompilationResults", + "listCompilationResultsStream", + "listCompilationResultsAsync" + ] + }, + "QueryCompilationResultActions": { + "methods": [ + "queryCompilationResultActions", + "queryCompilationResultActionsStream", + "queryCompilationResultActionsAsync" + ] + }, + "ListWorkflowInvocations": { + "methods": [ + "listWorkflowInvocations", + "listWorkflowInvocationsStream", + "listWorkflowInvocationsAsync" + ] + }, + "QueryWorkflowInvocationActions": { + "methods": [ + "queryWorkflowInvocationActions", + "queryWorkflowInvocationActionsStream", + "queryWorkflowInvocationActionsAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-dataform/src/v1beta1/index.ts b/packages/google-cloud-dataform/src/v1beta1/index.ts new file mode 100644 index 00000000000..a1e44870c79 --- /dev/null +++ b/packages/google-cloud-dataform/src/v1beta1/index.ts @@ -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 +// +// 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 {DataformClient} from './dataform_client'; diff --git a/packages/google-cloud-dataform/test/gapic_dataform_v1beta1.ts b/packages/google-cloud-dataform/test/gapic_dataform_v1beta1.ts new file mode 100644 index 00000000000..f559ab80227 --- /dev/null +++ b/packages/google-cloud-dataform/test/gapic_dataform_v1beta1.ts @@ -0,0 +1,7084 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as dataformModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, IamProtos, LocationProtos} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1beta1.DataformClient', () => { + it('has servicePath', () => { + const servicePath = dataformModule.v1beta1.DataformClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = dataformModule.v1beta1.DataformClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = dataformModule.v1beta1.DataformClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new dataformModule.v1beta1.DataformClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new dataformModule.v1beta1.DataformClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataformStub, undefined); + await client.initialize(); + assert(client.dataformStub); + }); + + it('has close method for the initialized client', done => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.dataformStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataformStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new dataformModule.v1beta1.DataformClient({ + 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 dataformModule.v1beta1.DataformClient({ + 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('getRepository', () => { + it('invokes getRepository without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetRepositoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ); + client.innerApiCalls.getRepository = stubSimpleCall(expectedResponse); + const [response] = await client.getRepository(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getRepository without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetRepositoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ); + client.innerApiCalls.getRepository = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getRepository( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IRepository | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getRepository with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetRepositoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getRepository = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getRepository(request), expectedError); + assert( + (client.innerApiCalls.getRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getRepository with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetRepositoryRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getRepository(request), expectedError); + }); + }); + + describe('createRepository', () => { + it('invokes createRepository without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateRepositoryRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ); + client.innerApiCalls.createRepository = stubSimpleCall(expectedResponse); + const [response] = await client.createRepository(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createRepository without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateRepositoryRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ); + client.innerApiCalls.createRepository = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createRepository( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IRepository | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createRepository with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateRepositoryRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createRepository = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createRepository(request), expectedError); + assert( + (client.innerApiCalls.createRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createRepository with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateRepositoryRequest() + ); + request.parent = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createRepository(request), expectedError); + }); + }); + + describe('updateRepository', () => { + it('invokes updateRepository without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.UpdateRepositoryRequest() + ); + request.repository = {}; + request.repository.name = ''; + const expectedHeaderRequestParams = 'repository.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ); + client.innerApiCalls.updateRepository = stubSimpleCall(expectedResponse); + const [response] = await client.updateRepository(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateRepository without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.UpdateRepositoryRequest() + ); + request.repository = {}; + request.repository.name = ''; + const expectedHeaderRequestParams = 'repository.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ); + client.innerApiCalls.updateRepository = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateRepository( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IRepository | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateRepository with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.UpdateRepositoryRequest() + ); + request.repository = {}; + request.repository.name = ''; + const expectedHeaderRequestParams = 'repository.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateRepository = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateRepository(request), expectedError); + assert( + (client.innerApiCalls.updateRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateRepository with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.UpdateRepositoryRequest() + ); + request.repository = {}; + request.repository.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateRepository(request), expectedError); + }); + }); + + describe('deleteRepository', () => { + it('invokes deleteRepository without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteRepositoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteRepository = stubSimpleCall(expectedResponse); + const [response] = await client.deleteRepository(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteRepository without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteRepositoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteRepository = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteRepository( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteRepository with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteRepositoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteRepository = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteRepository(request), expectedError); + assert( + (client.innerApiCalls.deleteRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteRepository with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteRepositoryRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteRepository(request), expectedError); + }); + }); + + describe('fetchRemoteBranches', () => { + it('invokes fetchRemoteBranches without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse() + ); + client.innerApiCalls.fetchRemoteBranches = + stubSimpleCall(expectedResponse); + const [response] = await client.fetchRemoteBranches(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchRemoteBranches as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes fetchRemoteBranches without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse() + ); + client.innerApiCalls.fetchRemoteBranches = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchRemoteBranches( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IFetchRemoteBranchesResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchRemoteBranches as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes fetchRemoteBranches with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchRemoteBranches = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.fetchRemoteBranches(request), expectedError); + assert( + (client.innerApiCalls.fetchRemoteBranches as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes fetchRemoteBranches with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.fetchRemoteBranches(request), expectedError); + }); + }); + + describe('getWorkspace', () => { + it('invokes getWorkspace without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetWorkspaceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ); + client.innerApiCalls.getWorkspace = stubSimpleCall(expectedResponse); + const [response] = await client.getWorkspace(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getWorkspace as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getWorkspace without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetWorkspaceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ); + client.innerApiCalls.getWorkspace = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getWorkspace( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IWorkspace | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getWorkspace as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getWorkspace with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetWorkspaceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getWorkspace = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getWorkspace(request), expectedError); + assert( + (client.innerApiCalls.getWorkspace as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getWorkspace with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetWorkspaceRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getWorkspace(request), expectedError); + }); + }); + + describe('createWorkspace', () => { + it('invokes createWorkspace without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateWorkspaceRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ); + client.innerApiCalls.createWorkspace = stubSimpleCall(expectedResponse); + const [response] = await client.createWorkspace(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createWorkspace as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createWorkspace without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateWorkspaceRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ); + client.innerApiCalls.createWorkspace = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createWorkspace( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IWorkspace | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createWorkspace as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createWorkspace with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateWorkspaceRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createWorkspace = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createWorkspace(request), expectedError); + assert( + (client.innerApiCalls.createWorkspace as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createWorkspace with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateWorkspaceRequest() + ); + request.parent = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createWorkspace(request), expectedError); + }); + }); + + describe('deleteWorkspace', () => { + it('invokes deleteWorkspace without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteWorkspace = stubSimpleCall(expectedResponse); + const [response] = await client.deleteWorkspace(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteWorkspace as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteWorkspace without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteWorkspace = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteWorkspace( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteWorkspace as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteWorkspace with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteWorkspace = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteWorkspace(request), expectedError); + assert( + (client.innerApiCalls.deleteWorkspace as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteWorkspace with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteWorkspace(request), expectedError); + }); + }); + + describe('installNpmPackages', () => { + it('invokes installNpmPackages without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesResponse() + ); + client.innerApiCalls.installNpmPackages = + stubSimpleCall(expectedResponse); + const [response] = await client.installNpmPackages(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.installNpmPackages as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes installNpmPackages without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesResponse() + ); + client.innerApiCalls.installNpmPackages = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.installNpmPackages( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IInstallNpmPackagesResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.installNpmPackages as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes installNpmPackages with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.installNpmPackages = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.installNpmPackages(request), expectedError); + assert( + (client.innerApiCalls.installNpmPackages as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes installNpmPackages with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest() + ); + request.workspace = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.installNpmPackages(request), expectedError); + }); + }); + + describe('pullGitCommits', () => { + it('invokes pullGitCommits without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.PullGitCommitsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.pullGitCommits = stubSimpleCall(expectedResponse); + const [response] = await client.pullGitCommits(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.pullGitCommits as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes pullGitCommits without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.PullGitCommitsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.pullGitCommits = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.pullGitCommits( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.pullGitCommits as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes pullGitCommits with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.PullGitCommitsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.pullGitCommits = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.pullGitCommits(request), expectedError); + assert( + (client.innerApiCalls.pullGitCommits as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes pullGitCommits with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.PullGitCommitsRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.pullGitCommits(request), expectedError); + }); + }); + + describe('pushGitCommits', () => { + it('invokes pushGitCommits without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.PushGitCommitsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.pushGitCommits = stubSimpleCall(expectedResponse); + const [response] = await client.pushGitCommits(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.pushGitCommits as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes pushGitCommits without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.PushGitCommitsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.pushGitCommits = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.pushGitCommits( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.pushGitCommits as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes pushGitCommits with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.PushGitCommitsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.pushGitCommits = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.pushGitCommits(request), expectedError); + assert( + (client.innerApiCalls.pushGitCommits as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes pushGitCommits with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.PushGitCommitsRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.pushGitCommits(request), expectedError); + }); + }); + + describe('fetchFileGitStatuses', () => { + it('invokes fetchFileGitStatuses without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse() + ); + client.innerApiCalls.fetchFileGitStatuses = + stubSimpleCall(expectedResponse); + const [response] = await client.fetchFileGitStatuses(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchFileGitStatuses as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes fetchFileGitStatuses without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse() + ); + client.innerApiCalls.fetchFileGitStatuses = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchFileGitStatuses( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IFetchFileGitStatusesResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchFileGitStatuses as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes fetchFileGitStatuses with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchFileGitStatuses = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.fetchFileGitStatuses(request), expectedError); + assert( + (client.innerApiCalls.fetchFileGitStatuses as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes fetchFileGitStatuses with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.fetchFileGitStatuses(request), expectedError); + }); + }); + + describe('fetchGitAheadBehind', () => { + it('invokes fetchGitAheadBehind without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse() + ); + client.innerApiCalls.fetchGitAheadBehind = + stubSimpleCall(expectedResponse); + const [response] = await client.fetchGitAheadBehind(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchGitAheadBehind as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes fetchGitAheadBehind without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse() + ); + client.innerApiCalls.fetchGitAheadBehind = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchGitAheadBehind( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IFetchGitAheadBehindResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchGitAheadBehind as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes fetchGitAheadBehind with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchGitAheadBehind = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.fetchGitAheadBehind(request), expectedError); + assert( + (client.innerApiCalls.fetchGitAheadBehind as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes fetchGitAheadBehind with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.fetchGitAheadBehind(request), expectedError); + }); + }); + + describe('commitWorkspaceChanges', () => { + it('invokes commitWorkspaceChanges without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.commitWorkspaceChanges = + stubSimpleCall(expectedResponse); + const [response] = await client.commitWorkspaceChanges(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.commitWorkspaceChanges as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes commitWorkspaceChanges without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.commitWorkspaceChanges = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.commitWorkspaceChanges( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.commitWorkspaceChanges as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes commitWorkspaceChanges with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.commitWorkspaceChanges = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.commitWorkspaceChanges(request), + expectedError + ); + assert( + (client.innerApiCalls.commitWorkspaceChanges as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes commitWorkspaceChanges with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.commitWorkspaceChanges(request), + expectedError + ); + }); + }); + + describe('resetWorkspaceChanges', () => { + it('invokes resetWorkspaceChanges without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.resetWorkspaceChanges = + stubSimpleCall(expectedResponse); + const [response] = await client.resetWorkspaceChanges(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.resetWorkspaceChanges as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes resetWorkspaceChanges without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.resetWorkspaceChanges = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.resetWorkspaceChanges( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.resetWorkspaceChanges as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes resetWorkspaceChanges with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.resetWorkspaceChanges = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.resetWorkspaceChanges(request), + expectedError + ); + assert( + (client.innerApiCalls.resetWorkspaceChanges as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes resetWorkspaceChanges with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.resetWorkspaceChanges(request), + expectedError + ); + }); + }); + + describe('fetchFileDiff', () => { + it('invokes fetchFileDiff without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileDiffRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileDiffResponse() + ); + client.innerApiCalls.fetchFileDiff = stubSimpleCall(expectedResponse); + const [response] = await client.fetchFileDiff(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchFileDiff as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes fetchFileDiff without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileDiffRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileDiffResponse() + ); + client.innerApiCalls.fetchFileDiff = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchFileDiff( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IFetchFileDiffResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchFileDiff as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes fetchFileDiff with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileDiffRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchFileDiff = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.fetchFileDiff(request), expectedError); + assert( + (client.innerApiCalls.fetchFileDiff as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes fetchFileDiff with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.FetchFileDiffRequest() + ); + request.workspace = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.fetchFileDiff(request), expectedError); + }); + }); + + describe('makeDirectory', () => { + it('invokes makeDirectory without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MakeDirectoryRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MakeDirectoryResponse() + ); + client.innerApiCalls.makeDirectory = stubSimpleCall(expectedResponse); + const [response] = await client.makeDirectory(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.makeDirectory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes makeDirectory without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MakeDirectoryRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MakeDirectoryResponse() + ); + client.innerApiCalls.makeDirectory = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.makeDirectory( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IMakeDirectoryResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.makeDirectory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes makeDirectory with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MakeDirectoryRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.makeDirectory = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.makeDirectory(request), expectedError); + assert( + (client.innerApiCalls.makeDirectory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes makeDirectory with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MakeDirectoryRequest() + ); + request.workspace = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.makeDirectory(request), expectedError); + }); + }); + + describe('removeDirectory', () => { + it('invokes removeDirectory without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.RemoveDirectoryRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.removeDirectory = stubSimpleCall(expectedResponse); + const [response] = await client.removeDirectory(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.removeDirectory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes removeDirectory without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.RemoveDirectoryRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.removeDirectory = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.removeDirectory( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.removeDirectory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes removeDirectory with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.RemoveDirectoryRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.removeDirectory = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.removeDirectory(request), expectedError); + assert( + (client.innerApiCalls.removeDirectory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes removeDirectory with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.RemoveDirectoryRequest() + ); + request.workspace = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.removeDirectory(request), expectedError); + }); + }); + + describe('moveDirectory', () => { + it('invokes moveDirectory without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveDirectoryRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveDirectoryResponse() + ); + client.innerApiCalls.moveDirectory = stubSimpleCall(expectedResponse); + const [response] = await client.moveDirectory(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.moveDirectory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes moveDirectory without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveDirectoryRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveDirectoryResponse() + ); + client.innerApiCalls.moveDirectory = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.moveDirectory( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IMoveDirectoryResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.moveDirectory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes moveDirectory with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveDirectoryRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.moveDirectory = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.moveDirectory(request), expectedError); + assert( + (client.innerApiCalls.moveDirectory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes moveDirectory with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveDirectoryRequest() + ); + request.workspace = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.moveDirectory(request), expectedError); + }); + }); + + describe('readFile', () => { + it('invokes readFile without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ReadFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ReadFileResponse() + ); + client.innerApiCalls.readFile = stubSimpleCall(expectedResponse); + const [response] = await client.readFile(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.readFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes readFile without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ReadFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ReadFileResponse() + ); + client.innerApiCalls.readFile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.readFile( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IReadFileResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.readFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes readFile with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ReadFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.readFile = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.readFile(request), expectedError); + assert( + (client.innerApiCalls.readFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes readFile with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ReadFileRequest() + ); + request.workspace = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.readFile(request), expectedError); + }); + }); + + describe('removeFile', () => { + it('invokes removeFile without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.RemoveFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.removeFile = stubSimpleCall(expectedResponse); + const [response] = await client.removeFile(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.removeFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes removeFile without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.RemoveFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.removeFile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.removeFile( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.removeFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes removeFile with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.RemoveFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.removeFile = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.removeFile(request), expectedError); + assert( + (client.innerApiCalls.removeFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes removeFile with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.RemoveFileRequest() + ); + request.workspace = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.removeFile(request), expectedError); + }); + }); + + describe('moveFile', () => { + it('invokes moveFile without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveFileResponse() + ); + client.innerApiCalls.moveFile = stubSimpleCall(expectedResponse); + const [response] = await client.moveFile(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.moveFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes moveFile without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveFileResponse() + ); + client.innerApiCalls.moveFile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.moveFile( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IMoveFileResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.moveFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes moveFile with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.moveFile = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.moveFile(request), expectedError); + assert( + (client.innerApiCalls.moveFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes moveFile with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.MoveFileRequest() + ); + request.workspace = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.moveFile(request), expectedError); + }); + }); + + describe('writeFile', () => { + it('invokes writeFile without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WriteFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WriteFileResponse() + ); + client.innerApiCalls.writeFile = stubSimpleCall(expectedResponse); + const [response] = await client.writeFile(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.writeFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes writeFile without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WriteFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WriteFileResponse() + ); + client.innerApiCalls.writeFile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.writeFile( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IWriteFileResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.writeFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes writeFile with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WriteFileRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.writeFile = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.writeFile(request), expectedError); + assert( + (client.innerApiCalls.writeFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes writeFile with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WriteFileRequest() + ); + request.workspace = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.writeFile(request), expectedError); + }); + }); + + describe('getCompilationResult', () => { + it('invokes getCompilationResult without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetCompilationResultRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ); + client.innerApiCalls.getCompilationResult = + stubSimpleCall(expectedResponse); + const [response] = await client.getCompilationResult(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getCompilationResult as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getCompilationResult without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetCompilationResultRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ); + client.innerApiCalls.getCompilationResult = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getCompilationResult( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.ICompilationResult | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getCompilationResult as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getCompilationResult with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetCompilationResultRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getCompilationResult = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getCompilationResult(request), expectedError); + assert( + (client.innerApiCalls.getCompilationResult as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getCompilationResult with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetCompilationResultRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getCompilationResult(request), expectedError); + }); + }); + + describe('createCompilationResult', () => { + it('invokes createCompilationResult without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateCompilationResultRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ); + client.innerApiCalls.createCompilationResult = + stubSimpleCall(expectedResponse); + const [response] = await client.createCompilationResult(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createCompilationResult as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createCompilationResult without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateCompilationResultRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ); + client.innerApiCalls.createCompilationResult = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createCompilationResult( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.ICompilationResult | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createCompilationResult as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createCompilationResult with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateCompilationResultRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createCompilationResult = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.createCompilationResult(request), + expectedError + ); + assert( + (client.innerApiCalls.createCompilationResult as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createCompilationResult with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateCompilationResultRequest() + ); + request.parent = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.createCompilationResult(request), + expectedError + ); + }); + }); + + describe('getWorkflowInvocation', () => { + it('invokes getWorkflowInvocation without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ); + client.innerApiCalls.getWorkflowInvocation = + stubSimpleCall(expectedResponse); + const [response] = await client.getWorkflowInvocation(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getWorkflowInvocation without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ); + client.innerApiCalls.getWorkflowInvocation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getWorkflowInvocation( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IWorkflowInvocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getWorkflowInvocation with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getWorkflowInvocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getWorkflowInvocation(request), + expectedError + ); + assert( + (client.innerApiCalls.getWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getWorkflowInvocation with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getWorkflowInvocation(request), + expectedError + ); + }); + }); + + describe('createWorkflowInvocation', () => { + it('invokes createWorkflowInvocation without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ); + client.innerApiCalls.createWorkflowInvocation = + stubSimpleCall(expectedResponse); + const [response] = await client.createWorkflowInvocation(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createWorkflowInvocation without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ); + client.innerApiCalls.createWorkflowInvocation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createWorkflowInvocation( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IWorkflowInvocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createWorkflowInvocation with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createWorkflowInvocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.createWorkflowInvocation(request), + expectedError + ); + assert( + (client.innerApiCalls.createWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createWorkflowInvocation with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest() + ); + request.parent = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.createWorkflowInvocation(request), + expectedError + ); + }); + }); + + describe('deleteWorkflowInvocation', () => { + it('invokes deleteWorkflowInvocation without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteWorkflowInvocation = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteWorkflowInvocation(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteWorkflowInvocation without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteWorkflowInvocation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteWorkflowInvocation( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteWorkflowInvocation with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteWorkflowInvocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteWorkflowInvocation(request), + expectedError + ); + assert( + (client.innerApiCalls.deleteWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteWorkflowInvocation with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.deleteWorkflowInvocation(request), + expectedError + ); + }); + }); + + describe('cancelWorkflowInvocation', () => { + it('invokes cancelWorkflowInvocation without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.cancelWorkflowInvocation = + stubSimpleCall(expectedResponse); + const [response] = await client.cancelWorkflowInvocation(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.cancelWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes cancelWorkflowInvocation without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.cancelWorkflowInvocation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.cancelWorkflowInvocation( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.cancelWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes cancelWorkflowInvocation with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.cancelWorkflowInvocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.cancelWorkflowInvocation(request), + expectedError + ); + assert( + (client.innerApiCalls.cancelWorkflowInvocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes cancelWorkflowInvocation with closed client', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.cancelWorkflowInvocation(request), + expectedError + ); + }); + }); + + describe('listRepositories', () => { + it('invokes listRepositories without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + ]; + client.innerApiCalls.listRepositories = stubSimpleCall(expectedResponse); + const [response] = await client.listRepositories(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listRepositories as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listRepositories without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + ]; + client.innerApiCalls.listRepositories = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listRepositories( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IRepository[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listRepositories as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listRepositories with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listRepositories = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listRepositories(request), expectedError); + assert( + (client.innerApiCalls.listRepositories as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listRepositoriesStream without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + ]; + client.descriptors.page.listRepositories.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listRepositoriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.Repository[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataform.v1beta1.Repository) => { + 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.listRepositories.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listRepositories, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listRepositories.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listRepositoriesStream with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listRepositories.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listRepositoriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.Repository[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataform.v1beta1.Repository) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listRepositories.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listRepositories, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listRepositories.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listRepositories without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Repository() + ), + ]; + client.descriptors.page.listRepositories.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1beta1.IRepository[] = []; + const iterable = client.listRepositoriesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listRepositories.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listRepositories.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listRepositories with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listRepositories.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listRepositoriesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1beta1.IRepository[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listRepositories.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listRepositories.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listWorkspaces', () => { + it('invokes listWorkspaces without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + ]; + client.innerApiCalls.listWorkspaces = stubSimpleCall(expectedResponse); + const [response] = await client.listWorkspaces(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listWorkspaces as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listWorkspaces without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + ]; + client.innerApiCalls.listWorkspaces = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listWorkspaces( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataform.v1beta1.IWorkspace[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listWorkspaces as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listWorkspaces with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listWorkspaces = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listWorkspaces(request), expectedError); + assert( + (client.innerApiCalls.listWorkspaces as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listWorkspacesStream without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + ]; + client.descriptors.page.listWorkspaces.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listWorkspacesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.Workspace[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataform.v1beta1.Workspace) => { + 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.listWorkspaces.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listWorkspaces, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listWorkspaces.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listWorkspacesStream with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listWorkspaces.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listWorkspacesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.Workspace[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataform.v1beta1.Workspace) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listWorkspaces.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listWorkspaces, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listWorkspaces.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listWorkspaces without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.Workspace() + ), + ]; + client.descriptors.page.listWorkspaces.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1beta1.IWorkspace[] = []; + const iterable = client.listWorkspacesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listWorkspaces.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listWorkspaces.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listWorkspaces with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listWorkspaces.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listWorkspacesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1beta1.IWorkspace[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listWorkspaces.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listWorkspaces.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('queryDirectoryContents', () => { + it('invokes queryDirectoryContents without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + ]; + client.innerApiCalls.queryDirectoryContents = + stubSimpleCall(expectedResponse); + const [response] = await client.queryDirectoryContents(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.queryDirectoryContents as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes queryDirectoryContents without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + ]; + client.innerApiCalls.queryDirectoryContents = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.queryDirectoryContents( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.queryDirectoryContents as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes queryDirectoryContents with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.queryDirectoryContents = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.queryDirectoryContents(request), + expectedError + ); + assert( + (client.innerApiCalls.queryDirectoryContents as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes queryDirectoryContentsStream without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + ]; + client.descriptors.page.queryDirectoryContents.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.queryDirectoryContentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + ) => { + 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.queryDirectoryContents + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.queryDirectoryContents, request) + ); + assert.strictEqual( + ( + client.descriptors.page.queryDirectoryContents + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes queryDirectoryContentsStream with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedError = new Error('expected'); + client.descriptors.page.queryDirectoryContents.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.queryDirectoryContentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.queryDirectoryContents + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.queryDirectoryContents, request) + ); + assert.strictEqual( + ( + client.descriptors.page.queryDirectoryContents + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with queryDirectoryContents without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() + ), + ]; + client.descriptors.page.queryDirectoryContents.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry[] = + []; + const iterable = client.queryDirectoryContentsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.queryDirectoryContents + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.queryDirectoryContents + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with queryDirectoryContents with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() + ); + request.workspace = ''; + const expectedHeaderRequestParams = 'workspace='; + const expectedError = new Error('expected'); + client.descriptors.page.queryDirectoryContents.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.queryDirectoryContentsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.IDirectoryEntry[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.queryDirectoryContents + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.queryDirectoryContents + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listCompilationResults', () => { + it('invokes listCompilationResults without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + ]; + client.innerApiCalls.listCompilationResults = + stubSimpleCall(expectedResponse); + const [response] = await client.listCompilationResults(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listCompilationResults as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listCompilationResults without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + ]; + client.innerApiCalls.listCompilationResults = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listCompilationResults( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.dataform.v1beta1.ICompilationResult[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listCompilationResults as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listCompilationResults with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listCompilationResults = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listCompilationResults(request), + expectedError + ); + assert( + (client.innerApiCalls.listCompilationResults as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listCompilationResultsStream without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + ]; + client.descriptors.page.listCompilationResults.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listCompilationResultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.CompilationResult[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.CompilationResult + ) => { + 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.listCompilationResults + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listCompilationResults, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listCompilationResults + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listCompilationResultsStream with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listCompilationResults.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listCompilationResultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.CompilationResult[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.CompilationResult + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listCompilationResults + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listCompilationResults, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listCompilationResults + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listCompilationResults without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResult() + ), + ]; + client.descriptors.page.listCompilationResults.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1beta1.ICompilationResult[] = + []; + const iterable = client.listCompilationResultsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listCompilationResults + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listCompilationResults + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listCompilationResults with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listCompilationResults.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listCompilationResultsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1beta1.ICompilationResult[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listCompilationResults + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listCompilationResults + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('queryCompilationResultActions', () => { + it('invokes queryCompilationResultActions without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + ]; + client.innerApiCalls.queryCompilationResultActions = + stubSimpleCall(expectedResponse); + const [response] = await client.queryCompilationResultActions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.queryCompilationResultActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes queryCompilationResultActions without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + ]; + client.innerApiCalls.queryCompilationResultActions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.queryCompilationResultActions( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.dataform.v1beta1.ICompilationResultAction[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.queryCompilationResultActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes queryCompilationResultActions with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.queryCompilationResultActions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.queryCompilationResultActions(request), + expectedError + ); + assert( + (client.innerApiCalls.queryCompilationResultActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes queryCompilationResultActionsStream without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + ]; + client.descriptors.page.queryCompilationResultActions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.queryCompilationResultActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.CompilationResultAction[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.CompilationResultAction + ) => { + 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.queryCompilationResultActions + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.queryCompilationResultActions, + request + ) + ); + assert.strictEqual( + ( + client.descriptors.page.queryCompilationResultActions + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes queryCompilationResultActionsStream with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.queryCompilationResultActions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.queryCompilationResultActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.CompilationResultAction[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.CompilationResultAction + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.queryCompilationResultActions + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.queryCompilationResultActions, + request + ) + ); + assert.strictEqual( + ( + client.descriptors.page.queryCompilationResultActions + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with queryCompilationResultActions without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CompilationResultAction() + ), + ]; + client.descriptors.page.queryCompilationResultActions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1beta1.ICompilationResultAction[] = + []; + const iterable = client.queryCompilationResultActionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.queryCompilationResultActions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.queryCompilationResultActions + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with queryCompilationResultActions with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.queryCompilationResultActions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.queryCompilationResultActionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1beta1.ICompilationResultAction[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.queryCompilationResultActions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.queryCompilationResultActions + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listWorkflowInvocations', () => { + it('invokes listWorkflowInvocations without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + ]; + client.innerApiCalls.listWorkflowInvocations = + stubSimpleCall(expectedResponse); + const [response] = await client.listWorkflowInvocations(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listWorkflowInvocations as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listWorkflowInvocations without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + ]; + client.innerApiCalls.listWorkflowInvocations = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listWorkflowInvocations( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.dataform.v1beta1.IWorkflowInvocation[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listWorkflowInvocations as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listWorkflowInvocations with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listWorkflowInvocations = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listWorkflowInvocations(request), + expectedError + ); + assert( + (client.innerApiCalls.listWorkflowInvocations as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listWorkflowInvocationsStream without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + ]; + client.descriptors.page.listWorkflowInvocations.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listWorkflowInvocationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.WorkflowInvocation[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.WorkflowInvocation + ) => { + 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.listWorkflowInvocations + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listWorkflowInvocations, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listWorkflowInvocations + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listWorkflowInvocationsStream with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listWorkflowInvocations.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listWorkflowInvocationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.WorkflowInvocation[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.WorkflowInvocation + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listWorkflowInvocations + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listWorkflowInvocations, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listWorkflowInvocations + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listWorkflowInvocations without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() + ), + ]; + client.descriptors.page.listWorkflowInvocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1beta1.IWorkflowInvocation[] = + []; + const iterable = client.listWorkflowInvocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listWorkflowInvocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listWorkflowInvocations + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listWorkflowInvocations with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listWorkflowInvocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listWorkflowInvocationsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1beta1.IWorkflowInvocation[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listWorkflowInvocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listWorkflowInvocations + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('queryWorkflowInvocationActions', () => { + it('invokes queryWorkflowInvocationActions without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + ]; + client.innerApiCalls.queryWorkflowInvocationActions = + stubSimpleCall(expectedResponse); + const [response] = await client.queryWorkflowInvocationActions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.queryWorkflowInvocationActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes queryWorkflowInvocationActions without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + ]; + client.innerApiCalls.queryWorkflowInvocationActions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.queryWorkflowInvocationActions( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.dataform.v1beta1.IWorkflowInvocationAction[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.queryWorkflowInvocationActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes queryWorkflowInvocationActions with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.queryWorkflowInvocationActions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.queryWorkflowInvocationActions(request), + expectedError + ); + assert( + (client.innerApiCalls.queryWorkflowInvocationActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes queryWorkflowInvocationActionsStream without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + ]; + client.descriptors.page.queryWorkflowInvocationActions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.queryWorkflowInvocationActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction + ) => { + 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.queryWorkflowInvocationActions + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.queryWorkflowInvocationActions, + request + ) + ); + assert.strictEqual( + ( + client.descriptors.page.queryWorkflowInvocationActions + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes queryWorkflowInvocationActionsStream with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.queryWorkflowInvocationActions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.queryWorkflowInvocationActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.queryWorkflowInvocationActions + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.queryWorkflowInvocationActions, + request + ) + ); + assert.strictEqual( + ( + client.descriptors.page.queryWorkflowInvocationActions + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with queryWorkflowInvocationActions without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() + ), + ]; + client.descriptors.page.queryWorkflowInvocationActions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataform.v1beta1.IWorkflowInvocationAction[] = + []; + const iterable = client.queryWorkflowInvocationActionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.queryWorkflowInvocationActions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.queryWorkflowInvocationActions + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with queryWorkflowInvocationActions with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.queryWorkflowInvocationActions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.queryWorkflowInvocationActionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataform.v1beta1.IWorkflowInvocationAction[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.queryWorkflowInvocationActions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.queryWorkflowInvocationActions + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub).getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.getIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub).getCall(0)); + }); + it('invokes setIamPolicy with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.setIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions( + request, + expectedOptions + ); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes testIamPermissions without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.TestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub).getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.testIamPermissions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.testIamPermissions(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('compilationResult', () => { + const fakePath = '/rendered/path/compilationResult'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + repository: 'repositoryValue', + compilation_result: 'compilationResultValue', + }; + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.compilationResultPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.compilationResultPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('compilationResultPath', () => { + const result = client.compilationResultPath( + 'projectValue', + 'locationValue', + 'repositoryValue', + 'compilationResultValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.compilationResultPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromCompilationResultName', () => { + const result = client.matchProjectFromCompilationResultName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.compilationResultPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromCompilationResultName', () => { + const result = client.matchLocationFromCompilationResultName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.compilationResultPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRepositoryFromCompilationResultName', () => { + const result = + client.matchRepositoryFromCompilationResultName(fakePath); + assert.strictEqual(result, 'repositoryValue'); + assert( + ( + client.pathTemplates.compilationResultPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCompilationResultFromCompilationResultName', () => { + const result = + client.matchCompilationResultFromCompilationResultName(fakePath); + assert.strictEqual(result, 'compilationResultValue'); + assert( + ( + client.pathTemplates.compilationResultPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('repository', () => { + const fakePath = '/rendered/path/repository'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + repository: 'repositoryValue', + }; + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.repositoryPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.repositoryPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('repositoryPath', () => { + const result = client.repositoryPath( + 'projectValue', + 'locationValue', + 'repositoryValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.repositoryPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromRepositoryName', () => { + const result = client.matchProjectFromRepositoryName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.repositoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromRepositoryName', () => { + const result = client.matchLocationFromRepositoryName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.repositoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRepositoryFromRepositoryName', () => { + const result = client.matchRepositoryFromRepositoryName(fakePath); + assert.strictEqual(result, 'repositoryValue'); + assert( + (client.pathTemplates.repositoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('workflowInvocation', () => { + const fakePath = '/rendered/path/workflowInvocation'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + repository: 'repositoryValue', + workflow_invocation: 'workflowInvocationValue', + }; + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.workflowInvocationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.workflowInvocationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('workflowInvocationPath', () => { + const result = client.workflowInvocationPath( + 'projectValue', + 'locationValue', + 'repositoryValue', + 'workflowInvocationValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.workflowInvocationPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromWorkflowInvocationName', () => { + const result = client.matchProjectFromWorkflowInvocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.workflowInvocationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromWorkflowInvocationName', () => { + const result = client.matchLocationFromWorkflowInvocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.workflowInvocationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRepositoryFromWorkflowInvocationName', () => { + const result = + client.matchRepositoryFromWorkflowInvocationName(fakePath); + assert.strictEqual(result, 'repositoryValue'); + assert( + ( + client.pathTemplates.workflowInvocationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchWorkflowInvocationFromWorkflowInvocationName', () => { + const result = + client.matchWorkflowInvocationFromWorkflowInvocationName(fakePath); + assert.strictEqual(result, 'workflowInvocationValue'); + assert( + ( + client.pathTemplates.workflowInvocationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('workspace', () => { + const fakePath = '/rendered/path/workspace'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + repository: 'repositoryValue', + workspace: 'workspaceValue', + }; + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.workspacePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.workspacePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('workspacePath', () => { + const result = client.workspacePath( + 'projectValue', + 'locationValue', + 'repositoryValue', + 'workspaceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.workspacePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromWorkspaceName', () => { + const result = client.matchProjectFromWorkspaceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.workspacePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromWorkspaceName', () => { + const result = client.matchLocationFromWorkspaceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.workspacePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRepositoryFromWorkspaceName', () => { + const result = client.matchRepositoryFromWorkspaceName(fakePath); + assert.strictEqual(result, 'repositoryValue'); + assert( + (client.pathTemplates.workspacePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchWorkspaceFromWorkspaceName', () => { + const result = client.matchWorkspaceFromWorkspaceName(fakePath); + assert.strictEqual(result, 'workspaceValue'); + assert( + (client.pathTemplates.workspacePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); From 9af7578f5889deff44e9378b726c46cc15cf386f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 23 Aug 2022 00:06:19 +0000 Subject: [PATCH 13/80] fix: better support for fallback mode (#13) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 468790263 Source-Link: https://github.com/googleapis/googleapis/commit/873ab456273d105245df0fb82a6c17a814553b80 Source-Link: https://github.com/googleapis/googleapis-gen/commit/cb6f37aeff2a3472e40a7bbace8c67d75e24bee5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2I2ZjM3YWVmZjJhMzQ3MmU0MGE3YmJhY2U4YzY3ZDc1ZTI0YmVlNSJ9 --- .../dataform.cancel_workflow_invocation.js | 3 + .../dataform.commit_workspace_changes.js | 3 + .../dataform.create_compilation_result.js | 3 + .../v1alpha2/dataform.create_repository.js | 3 + .../dataform.create_workflow_invocation.js | 3 + .../v1alpha2/dataform.create_workspace.js | 3 + .../v1alpha2/dataform.delete_repository.js | 3 + .../dataform.delete_workflow_invocation.js | 3 + .../v1alpha2/dataform.delete_workspace.js | 3 + .../v1alpha2/dataform.fetch_file_diff.js | 3 + .../dataform.fetch_file_git_statuses.js | 3 + .../dataform.fetch_git_ahead_behind.js | 3 + .../dataform.fetch_remote_branches.js | 3 + .../dataform.get_compilation_result.js | 3 + .../v1alpha2/dataform.get_repository.js | 3 + .../dataform.get_workflow_invocation.js | 3 + .../v1alpha2/dataform.get_workspace.js | 3 + .../v1alpha2/dataform.install_npm_packages.js | 3 + .../dataform.list_compilation_results.js | 3 + .../v1alpha2/dataform.list_repositories.js | 3 + .../dataform.list_workflow_invocations.js | 3 + .../v1alpha2/dataform.list_workspaces.js | 3 + .../v1alpha2/dataform.make_directory.js | 3 + .../v1alpha2/dataform.move_directory.js | 3 + .../generated/v1alpha2/dataform.move_file.js | 3 + .../v1alpha2/dataform.pull_git_commits.js | 3 + .../v1alpha2/dataform.push_git_commits.js | 3 + ...taform.query_compilation_result_actions.js | 3 + .../dataform.query_directory_contents.js | 3 + ...aform.query_workflow_invocation_actions.js | 3 + .../generated/v1alpha2/dataform.read_file.js | 3 + .../v1alpha2/dataform.remove_directory.js | 3 + .../v1alpha2/dataform.remove_file.js | 3 + .../dataform.reset_workspace_changes.js | 3 + .../v1alpha2/dataform.update_repository.js | 3 + .../generated/v1alpha2/dataform.write_file.js | 3 + ...tadata.google.cloud.dataform.v1alpha2.json | 72 ++++---- .../dataform.cancel_workflow_invocation.js | 3 + .../dataform.commit_workspace_changes.js | 3 + .../dataform.create_compilation_result.js | 3 + .../v1beta1/dataform.create_repository.js | 3 + .../dataform.create_workflow_invocation.js | 3 + .../v1beta1/dataform.create_workspace.js | 3 + .../v1beta1/dataform.delete_repository.js | 3 + .../dataform.delete_workflow_invocation.js | 3 + .../v1beta1/dataform.delete_workspace.js | 3 + .../v1beta1/dataform.fetch_file_diff.js | 3 + .../dataform.fetch_file_git_statuses.js | 3 + .../dataform.fetch_git_ahead_behind.js | 3 + .../v1beta1/dataform.fetch_remote_branches.js | 3 + .../dataform.get_compilation_result.js | 3 + .../v1beta1/dataform.get_repository.js | 3 + .../dataform.get_workflow_invocation.js | 3 + .../v1beta1/dataform.get_workspace.js | 3 + .../v1beta1/dataform.install_npm_packages.js | 3 + .../dataform.list_compilation_results.js | 3 + .../v1beta1/dataform.list_repositories.js | 3 + .../dataform.list_workflow_invocations.js | 3 + .../v1beta1/dataform.list_workspaces.js | 3 + .../v1beta1/dataform.make_directory.js | 3 + .../v1beta1/dataform.move_directory.js | 3 + .../generated/v1beta1/dataform.move_file.js | 3 + .../v1beta1/dataform.pull_git_commits.js | 3 + .../v1beta1/dataform.push_git_commits.js | 3 + ...taform.query_compilation_result_actions.js | 3 + .../dataform.query_directory_contents.js | 3 + ...aform.query_workflow_invocation_actions.js | 3 + .../generated/v1beta1/dataform.read_file.js | 3 + .../v1beta1/dataform.remove_directory.js | 3 + .../generated/v1beta1/dataform.remove_file.js | 3 + .../dataform.reset_workspace_changes.js | 3 + .../v1beta1/dataform.update_repository.js | 3 + .../generated/v1beta1/dataform.write_file.js | 3 + ...etadata.google.cloud.dataform.v1beta1.json | 72 ++++---- .../src/v1alpha2/dataform_client.ts | 32 ++-- .../src/v1beta1/dataform_client.ts | 32 ++-- .../test/gapic_dataform_v1alpha2.ts | 156 +++++++++--------- .../test/gapic_dataform_v1beta1.ts | 156 +++++++++--------- 78 files changed, 478 insertions(+), 258 deletions(-) diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.cancel_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.cancel_workflow_invocation.js index 9ba5e29e012..65ab5547c41 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.cancel_workflow_invocation.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.cancel_workflow_invocation.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1alpha2_generated_Dataform_CancelWorkflowInvocation_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.commit_workspace_changes.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.commit_workspace_changes.js index 205d23a8b74..e4b9e761de3 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.commit_workspace_changes.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.commit_workspace_changes.js @@ -23,6 +23,9 @@ function main(name, author) { // [START dataform_v1alpha2_generated_Dataform_CommitWorkspaceChanges_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_compilation_result.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_compilation_result.js index 800f91d05f6..42cafe8d99a 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_compilation_result.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_compilation_result.js @@ -23,6 +23,9 @@ function main(parent, compilationResult) { // [START dataform_v1alpha2_generated_Dataform_CreateCompilationResult_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_repository.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_repository.js index 50c7e43aa82..b734380020e 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_repository.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_repository.js @@ -23,6 +23,9 @@ function main(parent, repository, repositoryId) { // [START dataform_v1alpha2_generated_Dataform_CreateRepository_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workflow_invocation.js index cf8332560ee..7aeaceda0f4 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workflow_invocation.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workflow_invocation.js @@ -23,6 +23,9 @@ function main(parent, workflowInvocation) { // [START dataform_v1alpha2_generated_Dataform_CreateWorkflowInvocation_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workspace.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workspace.js index 60695fcc726..2b559562c54 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workspace.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workspace.js @@ -23,6 +23,9 @@ function main(parent, workspace, workspaceId) { // [START dataform_v1alpha2_generated_Dataform_CreateWorkspace_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_repository.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_repository.js index 5687647eaf6..bfe3dc9126d 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_repository.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_repository.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1alpha2_generated_Dataform_DeleteRepository_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workflow_invocation.js index 5a02d8c7b3a..800461d9124 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workflow_invocation.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workflow_invocation.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1alpha2_generated_Dataform_DeleteWorkflowInvocation_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workspace.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workspace.js index db8f6bf86c7..f773c399e77 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workspace.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workspace.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1alpha2_generated_Dataform_DeleteWorkspace_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_diff.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_diff.js index a600b93bc3b..df28731794a 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_diff.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_diff.js @@ -23,6 +23,9 @@ function main(workspace, path) { // [START dataform_v1alpha2_generated_Dataform_FetchFileDiff_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_git_statuses.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_git_statuses.js index c725234dfe5..ba0e827bd04 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_git_statuses.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_git_statuses.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1alpha2_generated_Dataform_FetchFileGitStatuses_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_git_ahead_behind.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_git_ahead_behind.js index 3dea2060598..1dcc54bc6cb 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_git_ahead_behind.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_git_ahead_behind.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1alpha2_generated_Dataform_FetchGitAheadBehind_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_remote_branches.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_remote_branches.js index fd742014782..c6c2b7f3ded 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_remote_branches.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_remote_branches.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1alpha2_generated_Dataform_FetchRemoteBranches_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_compilation_result.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_compilation_result.js index 0f074d34826..38711f93e03 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_compilation_result.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_compilation_result.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1alpha2_generated_Dataform_GetCompilationResult_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_repository.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_repository.js index 3c712d1b8bd..e6336754cfc 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_repository.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_repository.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1alpha2_generated_Dataform_GetRepository_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workflow_invocation.js index 7ffa3457dbb..8ed6ab49b2e 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workflow_invocation.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workflow_invocation.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1alpha2_generated_Dataform_GetWorkflowInvocation_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workspace.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workspace.js index bf3447d6f99..294d0279352 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workspace.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workspace.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1alpha2_generated_Dataform_GetWorkspace_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.install_npm_packages.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.install_npm_packages.js index aa80216019d..bfae9b7fe2a 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.install_npm_packages.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.install_npm_packages.js @@ -23,6 +23,9 @@ function main(workspace) { // [START dataform_v1alpha2_generated_Dataform_InstallNpmPackages_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_compilation_results.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_compilation_results.js index 44528b56ffe..f463dc17da8 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_compilation_results.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_compilation_results.js @@ -23,6 +23,9 @@ function main(parent) { // [START dataform_v1alpha2_generated_Dataform_ListCompilationResults_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_repositories.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_repositories.js index f203cdbe7fa..2f81c22c7b7 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_repositories.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_repositories.js @@ -23,6 +23,9 @@ function main(parent) { // [START dataform_v1alpha2_generated_Dataform_ListRepositories_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workflow_invocations.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workflow_invocations.js index 3ebf8940b69..12e7d3e6bb0 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workflow_invocations.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workflow_invocations.js @@ -23,6 +23,9 @@ function main(parent) { // [START dataform_v1alpha2_generated_Dataform_ListWorkflowInvocations_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workspaces.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workspaces.js index e2c4f0603c8..8a1f1c905b2 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workspaces.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workspaces.js @@ -23,6 +23,9 @@ function main(parent) { // [START dataform_v1alpha2_generated_Dataform_ListWorkspaces_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.make_directory.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.make_directory.js index 61119635e15..faf321e6b73 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.make_directory.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.make_directory.js @@ -23,6 +23,9 @@ function main(workspace, path) { // [START dataform_v1alpha2_generated_Dataform_MakeDirectory_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_directory.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_directory.js index 336a48092cc..d50b32be564 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_directory.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_directory.js @@ -23,6 +23,9 @@ function main(workspace, path, newPath) { // [START dataform_v1alpha2_generated_Dataform_MoveDirectory_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_file.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_file.js index c95054b5185..7f04c993cc4 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_file.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_file.js @@ -23,6 +23,9 @@ function main(workspace, path, newPath) { // [START dataform_v1alpha2_generated_Dataform_MoveFile_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.pull_git_commits.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.pull_git_commits.js index edbefad26b7..2b6de812c17 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.pull_git_commits.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.pull_git_commits.js @@ -23,6 +23,9 @@ function main(name, author) { // [START dataform_v1alpha2_generated_Dataform_PullGitCommits_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.push_git_commits.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.push_git_commits.js index ea15c74e8a0..bdcd4b26236 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.push_git_commits.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.push_git_commits.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1alpha2_generated_Dataform_PushGitCommits_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_compilation_result_actions.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_compilation_result_actions.js index d310fd72d72..e8297108755 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_compilation_result_actions.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_compilation_result_actions.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1alpha2_generated_Dataform_QueryCompilationResultActions_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_directory_contents.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_directory_contents.js index 37c747b7b95..2e5c0bc8776 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_directory_contents.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_directory_contents.js @@ -23,6 +23,9 @@ function main(workspace) { // [START dataform_v1alpha2_generated_Dataform_QueryDirectoryContents_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_workflow_invocation_actions.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_workflow_invocation_actions.js index bc2f32d3bf8..0abc8a2fb48 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_workflow_invocation_actions.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_workflow_invocation_actions.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1alpha2_generated_Dataform_QueryWorkflowInvocationActions_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.read_file.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.read_file.js index 0bd285c1900..7cd0572e1f9 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.read_file.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.read_file.js @@ -23,6 +23,9 @@ function main(workspace, path) { // [START dataform_v1alpha2_generated_Dataform_ReadFile_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_directory.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_directory.js index f414ee44976..157e01238e2 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_directory.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_directory.js @@ -23,6 +23,9 @@ function main(workspace, path) { // [START dataform_v1alpha2_generated_Dataform_RemoveDirectory_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_file.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_file.js index f8cfb94753f..396738b3ea1 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_file.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_file.js @@ -23,6 +23,9 @@ function main(workspace, path) { // [START dataform_v1alpha2_generated_Dataform_RemoveFile_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.reset_workspace_changes.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.reset_workspace_changes.js index 7efa0a00680..d91ec7f2332 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.reset_workspace_changes.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.reset_workspace_changes.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1alpha2_generated_Dataform_ResetWorkspaceChanges_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.update_repository.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.update_repository.js index 067c1ab6e81..48c5d6129fc 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.update_repository.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.update_repository.js @@ -23,6 +23,9 @@ function main(repository) { // [START dataform_v1alpha2_generated_Dataform_UpdateRepository_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.write_file.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.write_file.js index c5f695ace4b..08ed5bb0fd4 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.write_file.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.write_file.js @@ -23,6 +23,9 @@ function main(workspace, path, contents) { // [START dataform_v1alpha2_generated_Dataform_WriteFile_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json b/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json index 1595f999da3..344d9ef1048 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 79, "type": "FULL" } ], @@ -78,7 +78,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -118,7 +118,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -166,7 +166,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -210,7 +210,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -254,7 +254,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -294,7 +294,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 79, "type": "FULL" } ], @@ -350,7 +350,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -390,7 +390,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -438,7 +438,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -478,7 +478,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -518,7 +518,7 @@ "segments": [ { "start": 25, - "end": 61, + "end": 64, "type": "FULL" } ], @@ -566,7 +566,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -610,7 +610,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -650,7 +650,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -694,7 +694,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -746,7 +746,7 @@ "segments": [ { "start": 25, - "end": 59, + "end": 62, "type": "FULL" } ], @@ -794,7 +794,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -838,7 +838,7 @@ "segments": [ { "start": 25, - "end": 71, + "end": 74, "type": "FULL" } ], @@ -890,7 +890,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -934,7 +934,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -978,7 +978,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -1026,7 +1026,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -1070,7 +1070,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -1114,7 +1114,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -1162,7 +1162,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -1210,7 +1210,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -1258,7 +1258,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -1298,7 +1298,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -1342,7 +1342,7 @@ "segments": [ { "start": 25, - "end": 71, + "end": 74, "type": "FULL" } ], @@ -1394,7 +1394,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -1442,7 +1442,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -1482,7 +1482,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -1526,7 +1526,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -1566,7 +1566,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -1606,7 +1606,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.cancel_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.cancel_workflow_invocation.js index 24d1ecc0432..2028cb6127c 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.cancel_workflow_invocation.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.cancel_workflow_invocation.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1beta1_generated_Dataform_CancelWorkflowInvocation_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.commit_workspace_changes.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.commit_workspace_changes.js index 09bfef815ef..01e533e827b 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.commit_workspace_changes.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.commit_workspace_changes.js @@ -23,6 +23,9 @@ function main(name, author) { // [START dataform_v1beta1_generated_Dataform_CommitWorkspaceChanges_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_compilation_result.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_compilation_result.js index 98e7d25cf58..8826207f7b6 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_compilation_result.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_compilation_result.js @@ -23,6 +23,9 @@ function main(parent, compilationResult) { // [START dataform_v1beta1_generated_Dataform_CreateCompilationResult_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_repository.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_repository.js index e1ef1fd5f61..b0d66cd8143 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_repository.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_repository.js @@ -23,6 +23,9 @@ function main(parent, repository, repositoryId) { // [START dataform_v1beta1_generated_Dataform_CreateRepository_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workflow_invocation.js index 179dfbb60b8..9108d48c3f0 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workflow_invocation.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workflow_invocation.js @@ -23,6 +23,9 @@ function main(parent, workflowInvocation) { // [START dataform_v1beta1_generated_Dataform_CreateWorkflowInvocation_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workspace.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workspace.js index a99a33a73c4..531becbaaa9 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workspace.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workspace.js @@ -23,6 +23,9 @@ function main(parent, workspace, workspaceId) { // [START dataform_v1beta1_generated_Dataform_CreateWorkspace_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_repository.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_repository.js index 172f3a132b4..ad2ad43af77 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_repository.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_repository.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1beta1_generated_Dataform_DeleteRepository_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workflow_invocation.js index 697d2e33e7f..ab0aaac74c4 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workflow_invocation.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workflow_invocation.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1beta1_generated_Dataform_DeleteWorkflowInvocation_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workspace.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workspace.js index c6e8ae27ebd..5c0060ddca4 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workspace.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workspace.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1beta1_generated_Dataform_DeleteWorkspace_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_diff.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_diff.js index 362137ff127..2df2eb2bebf 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_diff.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_diff.js @@ -23,6 +23,9 @@ function main(workspace, path) { // [START dataform_v1beta1_generated_Dataform_FetchFileDiff_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_git_statuses.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_git_statuses.js index 53302d6f46f..03cfe21a07f 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_git_statuses.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_git_statuses.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1beta1_generated_Dataform_FetchFileGitStatuses_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js index e8b3db203e5..733dde9f9cf 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1beta1_generated_Dataform_FetchGitAheadBehind_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_remote_branches.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_remote_branches.js index 1c998ab8f51..43c3d2a6228 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_remote_branches.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_remote_branches.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1beta1_generated_Dataform_FetchRemoteBranches_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_compilation_result.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_compilation_result.js index 19ed3d1fa52..ee22ddbb3fb 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_compilation_result.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_compilation_result.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1beta1_generated_Dataform_GetCompilationResult_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_repository.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_repository.js index 25332299aed..071180cd33a 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_repository.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_repository.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1beta1_generated_Dataform_GetRepository_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workflow_invocation.js index 3fa01e1e32b..9e4875951b5 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workflow_invocation.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workflow_invocation.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1beta1_generated_Dataform_GetWorkflowInvocation_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workspace.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workspace.js index a49c65287c9..6c22c2e21ec 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workspace.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workspace.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1beta1_generated_Dataform_GetWorkspace_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.install_npm_packages.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.install_npm_packages.js index 0d06ee66187..d8ecbf9766b 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.install_npm_packages.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.install_npm_packages.js @@ -23,6 +23,9 @@ function main(workspace) { // [START dataform_v1beta1_generated_Dataform_InstallNpmPackages_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_compilation_results.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_compilation_results.js index 1ae1ad4e493..ec422ddb857 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_compilation_results.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_compilation_results.js @@ -23,6 +23,9 @@ function main(parent) { // [START dataform_v1beta1_generated_Dataform_ListCompilationResults_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_repositories.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_repositories.js index 787e921ab06..279161f4664 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_repositories.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_repositories.js @@ -23,6 +23,9 @@ function main(parent) { // [START dataform_v1beta1_generated_Dataform_ListRepositories_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workflow_invocations.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workflow_invocations.js index 2d599f0f2ad..e9194a1200e 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workflow_invocations.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workflow_invocations.js @@ -23,6 +23,9 @@ function main(parent) { // [START dataform_v1beta1_generated_Dataform_ListWorkflowInvocations_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workspaces.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workspaces.js index 708c9d0b661..fbf8647fb0c 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workspaces.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workspaces.js @@ -23,6 +23,9 @@ function main(parent) { // [START dataform_v1beta1_generated_Dataform_ListWorkspaces_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.make_directory.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.make_directory.js index fe239f6719f..b352c7bd671 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.make_directory.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.make_directory.js @@ -23,6 +23,9 @@ function main(workspace, path) { // [START dataform_v1beta1_generated_Dataform_MakeDirectory_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_directory.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_directory.js index 2d43a94763d..ec43257d354 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_directory.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_directory.js @@ -23,6 +23,9 @@ function main(workspace, path, newPath) { // [START dataform_v1beta1_generated_Dataform_MoveDirectory_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_file.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_file.js index 64efc208951..c00db1f9e7d 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_file.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_file.js @@ -23,6 +23,9 @@ function main(workspace, path, newPath) { // [START dataform_v1beta1_generated_Dataform_MoveFile_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.pull_git_commits.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.pull_git_commits.js index d3590eb808e..18c8f380b03 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.pull_git_commits.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.pull_git_commits.js @@ -23,6 +23,9 @@ function main(name, author) { // [START dataform_v1beta1_generated_Dataform_PullGitCommits_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.push_git_commits.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.push_git_commits.js index a9058497177..0863cf30597 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.push_git_commits.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.push_git_commits.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1beta1_generated_Dataform_PushGitCommits_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_compilation_result_actions.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_compilation_result_actions.js index 9d59881df43..1690b9436a5 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_compilation_result_actions.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_compilation_result_actions.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1beta1_generated_Dataform_QueryCompilationResultActions_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_directory_contents.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_directory_contents.js index a086f744a96..c7792118f98 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_directory_contents.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_directory_contents.js @@ -23,6 +23,9 @@ function main(workspace) { // [START dataform_v1beta1_generated_Dataform_QueryDirectoryContents_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js index 7a276ef49a3..9a7531e0b98 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1beta1_generated_Dataform_QueryWorkflowInvocationActions_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.read_file.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.read_file.js index 2893cebb35e..61d5eebf2f9 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.read_file.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.read_file.js @@ -23,6 +23,9 @@ function main(workspace, path) { // [START dataform_v1beta1_generated_Dataform_ReadFile_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_directory.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_directory.js index 9f941534c11..c22c6a154c4 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_directory.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_directory.js @@ -23,6 +23,9 @@ function main(workspace, path) { // [START dataform_v1beta1_generated_Dataform_RemoveDirectory_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_file.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_file.js index e7ef6a17f02..22a752981b1 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_file.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_file.js @@ -23,6 +23,9 @@ function main(workspace, path) { // [START dataform_v1beta1_generated_Dataform_RemoveFile_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.reset_workspace_changes.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.reset_workspace_changes.js index b3c26c242ba..e611fb11e87 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.reset_workspace_changes.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.reset_workspace_changes.js @@ -23,6 +23,9 @@ function main(name) { // [START dataform_v1beta1_generated_Dataform_ResetWorkspaceChanges_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.update_repository.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.update_repository.js index d8975adbe8b..ce879f0619e 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.update_repository.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.update_repository.js @@ -23,6 +23,9 @@ function main(repository) { // [START dataform_v1beta1_generated_Dataform_UpdateRepository_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.write_file.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.write_file.js index 9d60584c694..33502bde38f 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.write_file.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.write_file.js @@ -23,6 +23,9 @@ function main(workspace, path, contents) { // [START dataform_v1beta1_generated_Dataform_WriteFile_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json b/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json index 036ac39c900..4b31438335e 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 79, "type": "FULL" } ], @@ -78,7 +78,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -118,7 +118,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -166,7 +166,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -210,7 +210,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -254,7 +254,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -294,7 +294,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 79, "type": "FULL" } ], @@ -350,7 +350,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -390,7 +390,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -438,7 +438,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -478,7 +478,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -518,7 +518,7 @@ "segments": [ { "start": 25, - "end": 61, + "end": 64, "type": "FULL" } ], @@ -566,7 +566,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -610,7 +610,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -650,7 +650,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -694,7 +694,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -746,7 +746,7 @@ "segments": [ { "start": 25, - "end": 59, + "end": 62, "type": "FULL" } ], @@ -794,7 +794,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -838,7 +838,7 @@ "segments": [ { "start": 25, - "end": 71, + "end": 74, "type": "FULL" } ], @@ -890,7 +890,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -934,7 +934,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -978,7 +978,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -1026,7 +1026,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -1070,7 +1070,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -1114,7 +1114,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -1162,7 +1162,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -1210,7 +1210,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -1258,7 +1258,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -1298,7 +1298,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -1342,7 +1342,7 @@ "segments": [ { "start": 25, - "end": 71, + "end": 74, "type": "FULL" } ], @@ -1394,7 +1394,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -1442,7 +1442,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -1482,7 +1482,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -1526,7 +1526,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -1566,7 +1566,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -1606,7 +1606,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], diff --git a/packages/google-cloud-dataform/src/v1alpha2/dataform_client.ts b/packages/google-cloud-dataform/src/v1alpha2/dataform_client.ts index 1168c912122..2a4c45e0a7a 100644 --- a/packages/google-cloud-dataform/src/v1alpha2/dataform_client.ts +++ b/packages/google-cloud-dataform/src/v1alpha2/dataform_client.ts @@ -32,7 +32,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -337,7 +336,8 @@ export class DataformClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -3376,7 +3376,7 @@ export class DataformClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listRepositories.createStream( - this.innerApiCalls.listRepositories as gax.GaxCall, + this.innerApiCalls.listRepositories as GaxCall, request, callSettings ); @@ -3437,7 +3437,7 @@ export class DataformClient { this.initialize(); return this.descriptors.page.listRepositories.asyncIterate( this.innerApiCalls['listRepositories'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -3604,7 +3604,7 @@ export class DataformClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listWorkspaces.createStream( - this.innerApiCalls.listWorkspaces as gax.GaxCall, + this.innerApiCalls.listWorkspaces as GaxCall, request, callSettings ); @@ -3665,7 +3665,7 @@ export class DataformClient { this.initialize(); return this.descriptors.page.listWorkspaces.asyncIterate( this.innerApiCalls['listWorkspaces'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -3830,7 +3830,7 @@ export class DataformClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.queryDirectoryContents.createStream( - this.innerApiCalls.queryDirectoryContents as gax.GaxCall, + this.innerApiCalls.queryDirectoryContents as GaxCall, request, callSettings ); @@ -3888,7 +3888,7 @@ export class DataformClient { this.initialize(); return this.descriptors.page.queryDirectoryContents.asyncIterate( this.innerApiCalls['queryDirectoryContents'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -4047,7 +4047,7 @@ export class DataformClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listCompilationResults.createStream( - this.innerApiCalls.listCompilationResults as gax.GaxCall, + this.innerApiCalls.listCompilationResults as GaxCall, request, callSettings ); @@ -4102,7 +4102,7 @@ export class DataformClient { this.initialize(); return this.descriptors.page.listCompilationResults.asyncIterate( this.innerApiCalls['listCompilationResults'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -4267,7 +4267,7 @@ export class DataformClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.queryCompilationResultActions.createStream( - this.innerApiCalls.queryCompilationResultActions as gax.GaxCall, + this.innerApiCalls.queryCompilationResultActions as GaxCall, request, callSettings ); @@ -4325,7 +4325,7 @@ export class DataformClient { this.initialize(); return this.descriptors.page.queryCompilationResultActions.asyncIterate( this.innerApiCalls['queryCompilationResultActions'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -4484,7 +4484,7 @@ export class DataformClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listWorkflowInvocations.createStream( - this.innerApiCalls.listWorkflowInvocations as gax.GaxCall, + this.innerApiCalls.listWorkflowInvocations as GaxCall, request, callSettings ); @@ -4539,7 +4539,7 @@ export class DataformClient { this.initialize(); return this.descriptors.page.listWorkflowInvocations.asyncIterate( this.innerApiCalls['listWorkflowInvocations'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -4699,7 +4699,7 @@ export class DataformClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.queryWorkflowInvocationActions.createStream( - this.innerApiCalls.queryWorkflowInvocationActions as gax.GaxCall, + this.innerApiCalls.queryWorkflowInvocationActions as GaxCall, request, callSettings ); @@ -4755,7 +4755,7 @@ export class DataformClient { this.initialize(); return this.descriptors.page.queryWorkflowInvocationActions.asyncIterate( this.innerApiCalls['queryWorkflowInvocationActions'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts b/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts index 318b582569a..0e808b16498 100644 --- a/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts +++ b/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts @@ -32,7 +32,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -337,7 +336,8 @@ export class DataformClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -3353,7 +3353,7 @@ export class DataformClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listRepositories.createStream( - this.innerApiCalls.listRepositories as gax.GaxCall, + this.innerApiCalls.listRepositories as GaxCall, request, callSettings ); @@ -3414,7 +3414,7 @@ export class DataformClient { this.initialize(); return this.descriptors.page.listRepositories.asyncIterate( this.innerApiCalls['listRepositories'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -3581,7 +3581,7 @@ export class DataformClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listWorkspaces.createStream( - this.innerApiCalls.listWorkspaces as gax.GaxCall, + this.innerApiCalls.listWorkspaces as GaxCall, request, callSettings ); @@ -3642,7 +3642,7 @@ export class DataformClient { this.initialize(); return this.descriptors.page.listWorkspaces.asyncIterate( this.innerApiCalls['listWorkspaces'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -3807,7 +3807,7 @@ export class DataformClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.queryDirectoryContents.createStream( - this.innerApiCalls.queryDirectoryContents as gax.GaxCall, + this.innerApiCalls.queryDirectoryContents as GaxCall, request, callSettings ); @@ -3865,7 +3865,7 @@ export class DataformClient { this.initialize(); return this.descriptors.page.queryDirectoryContents.asyncIterate( this.innerApiCalls['queryDirectoryContents'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -4024,7 +4024,7 @@ export class DataformClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listCompilationResults.createStream( - this.innerApiCalls.listCompilationResults as gax.GaxCall, + this.innerApiCalls.listCompilationResults as GaxCall, request, callSettings ); @@ -4079,7 +4079,7 @@ export class DataformClient { this.initialize(); return this.descriptors.page.listCompilationResults.asyncIterate( this.innerApiCalls['listCompilationResults'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -4244,7 +4244,7 @@ export class DataformClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.queryCompilationResultActions.createStream( - this.innerApiCalls.queryCompilationResultActions as gax.GaxCall, + this.innerApiCalls.queryCompilationResultActions as GaxCall, request, callSettings ); @@ -4302,7 +4302,7 @@ export class DataformClient { this.initialize(); return this.descriptors.page.queryCompilationResultActions.asyncIterate( this.innerApiCalls['queryCompilationResultActions'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -4461,7 +4461,7 @@ export class DataformClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listWorkflowInvocations.createStream( - this.innerApiCalls.listWorkflowInvocations as gax.GaxCall, + this.innerApiCalls.listWorkflowInvocations as GaxCall, request, callSettings ); @@ -4516,7 +4516,7 @@ export class DataformClient { this.initialize(); return this.descriptors.page.listWorkflowInvocations.asyncIterate( this.innerApiCalls['listWorkflowInvocations'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -4676,7 +4676,7 @@ export class DataformClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.queryWorkflowInvocationActions.createStream( - this.innerApiCalls.queryWorkflowInvocationActions as gax.GaxCall, + this.innerApiCalls.queryWorkflowInvocationActions as GaxCall, request, callSettings ); @@ -4732,7 +4732,7 @@ export class DataformClient { this.initialize(); return this.descriptors.page.queryWorkflowInvocationActions.asyncIterate( this.innerApiCalls['queryWorkflowInvocationActions'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-dataform/test/gapic_dataform_v1alpha2.ts b/packages/google-cloud-dataform/test/gapic_dataform_v1alpha2.ts index ac59e608719..69dbd9cd1e4 100644 --- a/packages/google-cloud-dataform/test/gapic_dataform_v1alpha2.ts +++ b/packages/google-cloud-dataform/test/gapic_dataform_v1alpha2.ts @@ -113,99 +113,101 @@ function stubAsyncIterationCall( } describe('v1alpha2.DataformClient', () => { - it('has servicePath', () => { - const servicePath = dataformModule.v1alpha2.DataformClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = dataformModule.v1alpha2.DataformClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = dataformModule.v1alpha2.DataformClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = dataformModule.v1alpha2.DataformClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new dataformModule.v1alpha2.DataformClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = dataformModule.v1alpha2.DataformClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new dataformModule.v1alpha2.DataformClient({ - fallback: true, + it('has port', () => { + const port = dataformModule.v1alpha2.DataformClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new dataformModule.v1alpha2.DataformClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new dataformModule.v1alpha2.DataformClient(); + assert(client); }); - assert.strictEqual(client.dataformStub, undefined); - await client.initialize(); - assert(client.dataformStub); - }); - it('has close method for the initialized client', done => { - const client = new dataformModule.v1alpha2.DataformClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new dataformModule.v1alpha2.DataformClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.dataformStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataformStub, undefined); + await client.initialize(); + assert(client.dataformStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new dataformModule.v1alpha2.DataformClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.dataformStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.dataformStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataformStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new dataformModule.v1alpha2.DataformClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new dataformModule.v1alpha2.DataformClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new dataformModule.v1alpha2.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getRepository', () => { diff --git a/packages/google-cloud-dataform/test/gapic_dataform_v1beta1.ts b/packages/google-cloud-dataform/test/gapic_dataform_v1beta1.ts index f559ab80227..57db89adaa5 100644 --- a/packages/google-cloud-dataform/test/gapic_dataform_v1beta1.ts +++ b/packages/google-cloud-dataform/test/gapic_dataform_v1beta1.ts @@ -113,99 +113,101 @@ function stubAsyncIterationCall( } describe('v1beta1.DataformClient', () => { - it('has servicePath', () => { - const servicePath = dataformModule.v1beta1.DataformClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = dataformModule.v1beta1.DataformClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = dataformModule.v1beta1.DataformClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = dataformModule.v1beta1.DataformClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new dataformModule.v1beta1.DataformClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = dataformModule.v1beta1.DataformClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new dataformModule.v1beta1.DataformClient({ - fallback: true, + it('has port', () => { + const port = dataformModule.v1beta1.DataformClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new dataformModule.v1beta1.DataformClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new dataformModule.v1beta1.DataformClient(); + assert(client); }); - assert.strictEqual(client.dataformStub, undefined); - await client.initialize(); - assert(client.dataformStub); - }); - it('has close method for the initialized client', done => { - const client = new dataformModule.v1beta1.DataformClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new dataformModule.v1beta1.DataformClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.dataformStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataformStub, undefined); + await client.initialize(); + assert(client.dataformStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new dataformModule.v1beta1.DataformClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.dataformStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.dataformStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataformStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new dataformModule.v1beta1.DataformClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new dataformModule.v1beta1.DataformClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new dataformModule.v1beta1.DataformClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getRepository', () => { From 140e813e03496c00c4c4466dd14ccb3a7732ac26 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 23 Aug 2022 07:36:17 +0000 Subject: [PATCH 14/80] fix: change import long to require (#14) Source-Link: https://github.com/googleapis/synthtool/commit/d229a1258999f599a90a9b674a1c5541e00db588 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:74ab2b3c71ef27e6d8b69b1d0a0c9d31447777b79ac3cd4be82c265b45f37e5e --- .../google-cloud-dataform/protos/protos.d.ts | 1478 +++- .../google-cloud-dataform/protos/protos.js | 7752 ++++++++++++----- .../google-cloud-dataform/protos/protos.json | 24 + 3 files changed, 7036 insertions(+), 2218 deletions(-) diff --git a/packages/google-cloud-dataform/protos/protos.d.ts b/packages/google-cloud-dataform/protos/protos.d.ts index 630cd57e731..2c1fd7b01f4 100644 --- a/packages/google-cloud-dataform/protos/protos.d.ts +++ b/packages/google-cloud-dataform/protos/protos.d.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import * as Long from "long"; +import Long = require("long"); import {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { @@ -554,252 +554,252 @@ export namespace google { namespace Dataform { /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#listRepositories}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|listRepositories}. * @param error Error, if any * @param [response] ListRepositoriesResponse */ type ListRepositoriesCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.ListRepositoriesResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#getRepository}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|getRepository}. * @param error Error, if any * @param [response] Repository */ type GetRepositoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.Repository) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#createRepository}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|createRepository}. * @param error Error, if any * @param [response] Repository */ type CreateRepositoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.Repository) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#updateRepository}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|updateRepository}. * @param error Error, if any * @param [response] Repository */ type UpdateRepositoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.Repository) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#deleteRepository}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|deleteRepository}. * @param error Error, if any * @param [response] Empty */ type DeleteRepositoryCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#fetchRemoteBranches}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|fetchRemoteBranches}. * @param error Error, if any * @param [response] FetchRemoteBranchesResponse */ type FetchRemoteBranchesCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#listWorkspaces}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|listWorkspaces}. * @param error Error, if any * @param [response] ListWorkspacesResponse */ type ListWorkspacesCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.ListWorkspacesResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#getWorkspace}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|getWorkspace}. * @param error Error, if any * @param [response] Workspace */ type GetWorkspaceCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.Workspace) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#createWorkspace}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|createWorkspace}. * @param error Error, if any * @param [response] Workspace */ type CreateWorkspaceCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.Workspace) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#deleteWorkspace}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|deleteWorkspace}. * @param error Error, if any * @param [response] Empty */ type DeleteWorkspaceCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#installNpmPackages}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|installNpmPackages}. * @param error Error, if any * @param [response] InstallNpmPackagesResponse */ type InstallNpmPackagesCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#pullGitCommits}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|pullGitCommits}. * @param error Error, if any * @param [response] Empty */ type PullGitCommitsCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#pushGitCommits}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|pushGitCommits}. * @param error Error, if any * @param [response] Empty */ type PushGitCommitsCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#fetchFileGitStatuses}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|fetchFileGitStatuses}. * @param error Error, if any * @param [response] FetchFileGitStatusesResponse */ type FetchFileGitStatusesCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#fetchGitAheadBehind}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|fetchGitAheadBehind}. * @param error Error, if any * @param [response] FetchGitAheadBehindResponse */ type FetchGitAheadBehindCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#commitWorkspaceChanges}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|commitWorkspaceChanges}. * @param error Error, if any * @param [response] Empty */ type CommitWorkspaceChangesCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#resetWorkspaceChanges}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|resetWorkspaceChanges}. * @param error Error, if any * @param [response] Empty */ type ResetWorkspaceChangesCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#fetchFileDiff}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|fetchFileDiff}. * @param error Error, if any * @param [response] FetchFileDiffResponse */ type FetchFileDiffCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.FetchFileDiffResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#queryDirectoryContents}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|queryDirectoryContents}. * @param error Error, if any * @param [response] QueryDirectoryContentsResponse */ type QueryDirectoryContentsCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#makeDirectory}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|makeDirectory}. * @param error Error, if any * @param [response] MakeDirectoryResponse */ type MakeDirectoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.MakeDirectoryResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#removeDirectory}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|removeDirectory}. * @param error Error, if any * @param [response] Empty */ type RemoveDirectoryCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#moveDirectory}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|moveDirectory}. * @param error Error, if any * @param [response] MoveDirectoryResponse */ type MoveDirectoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.MoveDirectoryResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#readFile}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|readFile}. * @param error Error, if any * @param [response] ReadFileResponse */ type ReadFileCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.ReadFileResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#removeFile}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|removeFile}. * @param error Error, if any * @param [response] Empty */ type RemoveFileCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#moveFile}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|moveFile}. * @param error Error, if any * @param [response] MoveFileResponse */ type MoveFileCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.MoveFileResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#writeFile}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|writeFile}. * @param error Error, if any * @param [response] WriteFileResponse */ type WriteFileCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.WriteFileResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#listCompilationResults}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|listCompilationResults}. * @param error Error, if any * @param [response] ListCompilationResultsResponse */ type ListCompilationResultsCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.ListCompilationResultsResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#getCompilationResult}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|getCompilationResult}. * @param error Error, if any * @param [response] CompilationResult */ type GetCompilationResultCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.CompilationResult) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#createCompilationResult}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|createCompilationResult}. * @param error Error, if any * @param [response] CompilationResult */ type CreateCompilationResultCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.CompilationResult) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#queryCompilationResultActions}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|queryCompilationResultActions}. * @param error Error, if any * @param [response] QueryCompilationResultActionsResponse */ type QueryCompilationResultActionsCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#listWorkflowInvocations}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|listWorkflowInvocations}. * @param error Error, if any * @param [response] ListWorkflowInvocationsResponse */ type ListWorkflowInvocationsCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#getWorkflowInvocation}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|getWorkflowInvocation}. * @param error Error, if any * @param [response] WorkflowInvocation */ type GetWorkflowInvocationCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.WorkflowInvocation) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#createWorkflowInvocation}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|createWorkflowInvocation}. * @param error Error, if any * @param [response] WorkflowInvocation */ type CreateWorkflowInvocationCallback = (error: (Error|null), response?: google.cloud.dataform.v1alpha2.WorkflowInvocation) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#deleteWorkflowInvocation}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|deleteWorkflowInvocation}. * @param error Error, if any * @param [response] Empty */ type DeleteWorkflowInvocationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#cancelWorkflowInvocation}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|cancelWorkflowInvocation}. * @param error Error, if any * @param [response] Empty */ type CancelWorkflowInvocationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#queryWorkflowInvocationActions}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|queryWorkflowInvocationActions}. * @param error Error, if any * @param [response] QueryWorkflowInvocationActionsResponse */ @@ -900,6 +900,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Repository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Repository { @@ -1010,6 +1017,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GitRemoteSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace GitRemoteSettings { @@ -1136,6 +1150,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListRepositoriesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListRepositoriesResponse. */ @@ -1238,6 +1259,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListRepositoriesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetRepositoryRequest. */ @@ -1328,6 +1356,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetRepositoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateRepositoryRequest. */ @@ -1430,6 +1465,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateRepositoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateRepositoryRequest. */ @@ -1526,6 +1568,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateRepositoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteRepositoryRequest. */ @@ -1622,6 +1671,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteRepositoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FetchRemoteBranchesRequest. */ @@ -1712,6 +1768,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchRemoteBranchesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FetchRemoteBranchesResponse. */ @@ -1802,6 +1865,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchRemoteBranchesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Workspace. */ @@ -1892,6 +1962,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Workspace + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListWorkspacesRequest. */ @@ -2006,6 +2083,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListWorkspacesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListWorkspacesResponse. */ @@ -2108,6 +2192,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListWorkspacesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetWorkspaceRequest. */ @@ -2198,6 +2289,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetWorkspaceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateWorkspaceRequest. */ @@ -2300,6 +2398,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateWorkspaceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteWorkspaceRequest. */ @@ -2390,6 +2495,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteWorkspaceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CommitAuthor. */ @@ -2486,6 +2598,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommitAuthor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PullGitCommitsRequest. */ @@ -2588,6 +2707,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PullGitCommitsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PushGitCommitsRequest. */ @@ -2684,6 +2810,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PushGitCommitsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FetchFileGitStatusesRequest. */ @@ -2774,6 +2907,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchFileGitStatusesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FetchFileGitStatusesResponse. */ @@ -2864,6 +3004,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchFileGitStatusesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FetchFileGitStatusesResponse { @@ -2962,6 +3109,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UncommittedFileChange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace UncommittedFileChange { @@ -3071,6 +3225,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchGitAheadBehindRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FetchGitAheadBehindResponse. */ @@ -3167,6 +3328,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchGitAheadBehindResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CommitWorkspaceChangesRequest. */ @@ -3275,6 +3443,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommitWorkspaceChangesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ResetWorkspaceChangesRequest. */ @@ -3377,6 +3552,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResetWorkspaceChangesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FetchFileDiffRequest. */ @@ -3473,6 +3655,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchFileDiffRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FetchFileDiffResponse. */ @@ -3563,6 +3752,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchFileDiffResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a QueryDirectoryContentsRequest. */ @@ -3671,6 +3867,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryDirectoryContentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a QueryDirectoryContentsResponse. */ @@ -3767,6 +3970,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryDirectoryContentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace QueryDirectoryContentsResponse { @@ -3868,6 +4078,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DirectoryEntry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -3965,6 +4182,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MakeDirectoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MakeDirectoryResponse. */ @@ -4049,6 +4273,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MakeDirectoryResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RemoveDirectoryRequest. */ @@ -4145,6 +4376,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemoveDirectoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MoveDirectoryRequest. */ @@ -4247,6 +4485,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MoveDirectoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MoveDirectoryResponse. */ @@ -4331,6 +4576,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MoveDirectoryResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ReadFileRequest. */ @@ -4427,6 +4679,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReadFileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ReadFileResponse. */ @@ -4517,6 +4776,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReadFileResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RemoveFileRequest. */ @@ -4613,6 +4879,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemoveFileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MoveFileRequest. */ @@ -4715,6 +4988,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MoveFileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MoveFileResponse. */ @@ -4799,6 +5079,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MoveFileResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WriteFileRequest. */ @@ -4901,6 +5188,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WriteFileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WriteFileResponse. */ @@ -4985,6 +5279,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WriteFileResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an InstallNpmPackagesRequest. */ @@ -5075,6 +5376,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InstallNpmPackagesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an InstallNpmPackagesResponse. */ @@ -5159,6 +5467,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InstallNpmPackagesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CompilationResult. */ @@ -5282,6 +5597,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompilationResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace CompilationResult { @@ -5416,6 +5738,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CodeCompilationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CompilationError. */ @@ -5524,6 +5853,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompilationError + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -5627,6 +5963,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCompilationResultsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListCompilationResultsResponse. */ @@ -5729,6 +6072,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCompilationResultsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetCompilationResultRequest. */ @@ -5819,6 +6169,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetCompilationResultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateCompilationResultRequest. */ @@ -5915,6 +6272,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateCompilationResultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Target. */ @@ -6017,6 +6381,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Target + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RelationDescriptor. */ @@ -6119,6 +6490,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RelationDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace RelationDescriptor { @@ -6223,6 +6601,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ColumnDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -6353,6 +6738,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompilationResultAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace CompilationResultAction { @@ -6523,6 +6915,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Relation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Relation { @@ -6654,6 +7053,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IncrementalTableConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -6775,6 +7181,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Operations + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Assertion. */ @@ -6895,6 +7308,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Assertion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Declaration. */ @@ -6985,6 +7405,13 @@ export namespace google { * @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; } } @@ -7094,6 +7521,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryCompilationResultActionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a QueryCompilationResultActionsResponse. */ @@ -7190,6 +7624,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryCompilationResultActionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WorkflowInvocation. */ @@ -7304,6 +7745,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkflowInvocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace WorkflowInvocation { @@ -7420,6 +7868,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InvocationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** State enum. */ @@ -7533,6 +7988,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListWorkflowInvocationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListWorkflowInvocationsResponse. */ @@ -7635,6 +8097,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListWorkflowInvocationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetWorkflowInvocationRequest. */ @@ -7725,6 +8194,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetWorkflowInvocationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateWorkflowInvocationRequest. */ @@ -7821,6 +8297,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateWorkflowInvocationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteWorkflowInvocationRequest. */ @@ -7911,6 +8394,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteWorkflowInvocationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CancelWorkflowInvocationRequest. */ @@ -8001,6 +8491,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelWorkflowInvocationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WorkflowInvocationAction. */ @@ -8121,6 +8618,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkflowInvocationAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace WorkflowInvocationAction { @@ -8224,6 +8728,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -8327,6 +8838,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryWorkflowInvocationActionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a QueryWorkflowInvocationActionsResponse. */ @@ -8423,6 +8941,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryWorkflowInvocationActionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -8957,252 +9482,252 @@ export namespace google { namespace Dataform { /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#listRepositories}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|listRepositories}. * @param error Error, if any * @param [response] ListRepositoriesResponse */ type ListRepositoriesCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.ListRepositoriesResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#getRepository}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|getRepository}. * @param error Error, if any * @param [response] Repository */ type GetRepositoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.Repository) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#createRepository}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|createRepository}. * @param error Error, if any * @param [response] Repository */ type CreateRepositoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.Repository) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#updateRepository}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|updateRepository}. * @param error Error, if any * @param [response] Repository */ type UpdateRepositoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.Repository) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#deleteRepository}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|deleteRepository}. * @param error Error, if any * @param [response] Empty */ type DeleteRepositoryCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#fetchRemoteBranches}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|fetchRemoteBranches}. * @param error Error, if any * @param [response] FetchRemoteBranchesResponse */ type FetchRemoteBranchesCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#listWorkspaces}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|listWorkspaces}. * @param error Error, if any * @param [response] ListWorkspacesResponse */ type ListWorkspacesCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.ListWorkspacesResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#getWorkspace}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|getWorkspace}. * @param error Error, if any * @param [response] Workspace */ type GetWorkspaceCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.Workspace) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#createWorkspace}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|createWorkspace}. * @param error Error, if any * @param [response] Workspace */ type CreateWorkspaceCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.Workspace) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#deleteWorkspace}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|deleteWorkspace}. * @param error Error, if any * @param [response] Empty */ type DeleteWorkspaceCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#installNpmPackages}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|installNpmPackages}. * @param error Error, if any * @param [response] InstallNpmPackagesResponse */ type InstallNpmPackagesCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.InstallNpmPackagesResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#pullGitCommits}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|pullGitCommits}. * @param error Error, if any * @param [response] Empty */ type PullGitCommitsCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#pushGitCommits}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|pushGitCommits}. * @param error Error, if any * @param [response] Empty */ type PushGitCommitsCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#fetchFileGitStatuses}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|fetchFileGitStatuses}. * @param error Error, if any * @param [response] FetchFileGitStatusesResponse */ type FetchFileGitStatusesCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#fetchGitAheadBehind}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|fetchGitAheadBehind}. * @param error Error, if any * @param [response] FetchGitAheadBehindResponse */ type FetchGitAheadBehindCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#commitWorkspaceChanges}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|commitWorkspaceChanges}. * @param error Error, if any * @param [response] Empty */ type CommitWorkspaceChangesCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#resetWorkspaceChanges}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|resetWorkspaceChanges}. * @param error Error, if any * @param [response] Empty */ type ResetWorkspaceChangesCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#fetchFileDiff}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|fetchFileDiff}. * @param error Error, if any * @param [response] FetchFileDiffResponse */ type FetchFileDiffCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.FetchFileDiffResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#queryDirectoryContents}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|queryDirectoryContents}. * @param error Error, if any * @param [response] QueryDirectoryContentsResponse */ type QueryDirectoryContentsCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#makeDirectory}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|makeDirectory}. * @param error Error, if any * @param [response] MakeDirectoryResponse */ type MakeDirectoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.MakeDirectoryResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#removeDirectory}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|removeDirectory}. * @param error Error, if any * @param [response] Empty */ type RemoveDirectoryCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#moveDirectory}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|moveDirectory}. * @param error Error, if any * @param [response] MoveDirectoryResponse */ type MoveDirectoryCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.MoveDirectoryResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#readFile}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|readFile}. * @param error Error, if any * @param [response] ReadFileResponse */ type ReadFileCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.ReadFileResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#removeFile}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|removeFile}. * @param error Error, if any * @param [response] Empty */ type RemoveFileCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#moveFile}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|moveFile}. * @param error Error, if any * @param [response] MoveFileResponse */ type MoveFileCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.MoveFileResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#writeFile}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|writeFile}. * @param error Error, if any * @param [response] WriteFileResponse */ type WriteFileCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.WriteFileResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#listCompilationResults}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|listCompilationResults}. * @param error Error, if any * @param [response] ListCompilationResultsResponse */ type ListCompilationResultsCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.ListCompilationResultsResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#getCompilationResult}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|getCompilationResult}. * @param error Error, if any * @param [response] CompilationResult */ type GetCompilationResultCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.CompilationResult) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#createCompilationResult}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|createCompilationResult}. * @param error Error, if any * @param [response] CompilationResult */ type CreateCompilationResultCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.CompilationResult) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#queryCompilationResultActions}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|queryCompilationResultActions}. * @param error Error, if any * @param [response] QueryCompilationResultActionsResponse */ type QueryCompilationResultActionsCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#listWorkflowInvocations}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|listWorkflowInvocations}. * @param error Error, if any * @param [response] ListWorkflowInvocationsResponse */ type ListWorkflowInvocationsCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#getWorkflowInvocation}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|getWorkflowInvocation}. * @param error Error, if any * @param [response] WorkflowInvocation */ type GetWorkflowInvocationCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.WorkflowInvocation) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#createWorkflowInvocation}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|createWorkflowInvocation}. * @param error Error, if any * @param [response] WorkflowInvocation */ type CreateWorkflowInvocationCallback = (error: (Error|null), response?: google.cloud.dataform.v1beta1.WorkflowInvocation) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#deleteWorkflowInvocation}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|deleteWorkflowInvocation}. * @param error Error, if any * @param [response] Empty */ type DeleteWorkflowInvocationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#cancelWorkflowInvocation}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|cancelWorkflowInvocation}. * @param error Error, if any * @param [response] Empty */ type CancelWorkflowInvocationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#queryWorkflowInvocationActions}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|queryWorkflowInvocationActions}. * @param error Error, if any * @param [response] QueryWorkflowInvocationActionsResponse */ @@ -9303,6 +9828,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Repository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Repository { @@ -9413,6 +9945,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GitRemoteSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace GitRemoteSettings { @@ -9539,6 +10078,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListRepositoriesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListRepositoriesResponse. */ @@ -9641,6 +10187,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListRepositoriesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetRepositoryRequest. */ @@ -9731,6 +10284,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetRepositoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateRepositoryRequest. */ @@ -9833,6 +10393,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateRepositoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateRepositoryRequest. */ @@ -9929,6 +10496,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateRepositoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteRepositoryRequest. */ @@ -10025,6 +10599,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteRepositoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FetchRemoteBranchesRequest. */ @@ -10115,6 +10696,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchRemoteBranchesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FetchRemoteBranchesResponse. */ @@ -10205,6 +10793,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchRemoteBranchesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Workspace. */ @@ -10295,7 +10890,14 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; - } + + /** + * Gets the default type url for Workspace + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } /** Properties of a ListWorkspacesRequest. */ interface IListWorkspacesRequest { @@ -10409,6 +11011,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListWorkspacesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListWorkspacesResponse. */ @@ -10511,6 +11120,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListWorkspacesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetWorkspaceRequest. */ @@ -10601,6 +11217,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetWorkspaceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateWorkspaceRequest. */ @@ -10703,6 +11326,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateWorkspaceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteWorkspaceRequest. */ @@ -10793,6 +11423,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteWorkspaceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CommitAuthor. */ @@ -10889,6 +11526,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommitAuthor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PullGitCommitsRequest. */ @@ -10991,6 +11635,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PullGitCommitsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PushGitCommitsRequest. */ @@ -11087,6 +11738,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PushGitCommitsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FetchFileGitStatusesRequest. */ @@ -11177,6 +11835,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchFileGitStatusesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FetchFileGitStatusesResponse. */ @@ -11267,6 +11932,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchFileGitStatusesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FetchFileGitStatusesResponse { @@ -11365,6 +12037,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UncommittedFileChange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace UncommittedFileChange { @@ -11474,6 +12153,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchGitAheadBehindRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FetchGitAheadBehindResponse. */ @@ -11570,6 +12256,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchGitAheadBehindResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CommitWorkspaceChangesRequest. */ @@ -11678,6 +12371,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommitWorkspaceChangesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ResetWorkspaceChangesRequest. */ @@ -11780,6 +12480,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResetWorkspaceChangesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FetchFileDiffRequest. */ @@ -11876,6 +12583,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchFileDiffRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FetchFileDiffResponse. */ @@ -11966,6 +12680,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchFileDiffResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a QueryDirectoryContentsRequest. */ @@ -12074,6 +12795,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryDirectoryContentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a QueryDirectoryContentsResponse. */ @@ -12170,6 +12898,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryDirectoryContentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace QueryDirectoryContentsResponse { @@ -12271,6 +13006,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DirectoryEntry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -12368,6 +13110,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MakeDirectoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MakeDirectoryResponse. */ @@ -12452,6 +13201,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MakeDirectoryResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RemoveDirectoryRequest. */ @@ -12548,6 +13304,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemoveDirectoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MoveDirectoryRequest. */ @@ -12650,6 +13413,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MoveDirectoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MoveDirectoryResponse. */ @@ -12734,6 +13504,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MoveDirectoryResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ReadFileRequest. */ @@ -12830,6 +13607,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReadFileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ReadFileResponse. */ @@ -12920,6 +13704,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReadFileResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RemoveFileRequest. */ @@ -13016,6 +13807,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemoveFileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MoveFileRequest. */ @@ -13118,6 +13916,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MoveFileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MoveFileResponse. */ @@ -13202,6 +14007,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MoveFileResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WriteFileRequest. */ @@ -13304,6 +14116,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WriteFileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WriteFileResponse. */ @@ -13388,6 +14207,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WriteFileResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an InstallNpmPackagesRequest. */ @@ -13478,6 +14304,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InstallNpmPackagesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an InstallNpmPackagesResponse. */ @@ -13562,6 +14395,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InstallNpmPackagesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CompilationResult. */ @@ -13685,6 +14525,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompilationResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace CompilationResult { @@ -13819,6 +14666,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CodeCompilationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CompilationError. */ @@ -13927,6 +14781,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompilationError + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -14030,6 +14891,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCompilationResultsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListCompilationResultsResponse. */ @@ -14132,6 +15000,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCompilationResultsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetCompilationResultRequest. */ @@ -14222,6 +15097,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetCompilationResultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateCompilationResultRequest. */ @@ -14318,6 +15200,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateCompilationResultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Target. */ @@ -14420,6 +15309,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Target + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RelationDescriptor. */ @@ -14522,6 +15418,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RelationDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace RelationDescriptor { @@ -14626,6 +15529,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ColumnDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -14756,6 +15666,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompilationResultAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace CompilationResultAction { @@ -14926,6 +15843,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Relation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Relation { @@ -15057,6 +15981,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IncrementalTableConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -15178,6 +16109,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Operations + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Assertion. */ @@ -15298,6 +16236,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Assertion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Declaration. */ @@ -15388,6 +16333,13 @@ export namespace google { * @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; } } @@ -15497,6 +16449,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryCompilationResultActionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a QueryCompilationResultActionsResponse. */ @@ -15593,6 +16552,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryCompilationResultActionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WorkflowInvocation. */ @@ -15707,6 +16673,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkflowInvocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace WorkflowInvocation { @@ -15823,6 +16796,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InvocationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** State enum. */ @@ -15936,6 +16916,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListWorkflowInvocationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListWorkflowInvocationsResponse. */ @@ -16038,6 +17025,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListWorkflowInvocationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetWorkflowInvocationRequest. */ @@ -16128,6 +17122,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetWorkflowInvocationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateWorkflowInvocationRequest. */ @@ -16224,6 +17225,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateWorkflowInvocationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteWorkflowInvocationRequest. */ @@ -16314,6 +17322,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteWorkflowInvocationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CancelWorkflowInvocationRequest. */ @@ -16404,6 +17419,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelWorkflowInvocationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WorkflowInvocationAction. */ @@ -16524,6 +17546,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkflowInvocationAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace WorkflowInvocationAction { @@ -16627,6 +17656,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -16730,6 +17766,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryWorkflowInvocationActionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a QueryWorkflowInvocationActionsResponse. */ @@ -16826,6 +17869,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryWorkflowInvocationActionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } @@ -16928,6 +17978,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a HttpRule. */ @@ -17075,6 +18132,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CustomHttpPattern. */ @@ -17171,6 +18235,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** FieldBehavior enum. */ @@ -17309,6 +18380,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ResourceDescriptor { @@ -17421,6 +18499,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -17515,6 +18600,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FileDescriptorProto. */ @@ -17555,6 +18647,9 @@ export namespace google { /** FileDescriptorProto syntax */ syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); } /** Represents a FileDescriptorProto. */ @@ -17602,6 +18697,9 @@ export namespace google { /** FileDescriptorProto syntax. */ public syntax: string; + /** FileDescriptorProto edition. */ + public edition: string; + /** * Creates a new FileDescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -17671,6 +18769,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DescriptorProto. */ @@ -17815,6 +18920,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace DescriptorProto { @@ -17919,6 +19031,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ReservedRange. */ @@ -18015,6 +19134,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -18106,6 +19232,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FieldDescriptorProto. */ @@ -18256,6 +19389,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FieldDescriptorProto { @@ -18384,6 +19524,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumDescriptorProto. */ @@ -18498,6 +19645,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace EnumDescriptorProto { @@ -18596,6 +19750,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -18699,6 +19860,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ServiceDescriptorProto. */ @@ -18801,6 +19969,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MethodDescriptorProto. */ @@ -18921,6 +20096,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FileOptions. */ @@ -19134,6 +20316,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FileOptions { @@ -19261,6 +20450,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FieldOptions. */ @@ -19278,6 +20474,9 @@ export namespace google { /** FieldOptions lazy */ lazy?: (boolean|null); + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + /** FieldOptions deprecated */ deprecated?: (boolean|null); @@ -19315,6 +20514,9 @@ export namespace google { /** FieldOptions lazy. */ public lazy: boolean; + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + /** FieldOptions deprecated. */ public deprecated: boolean; @@ -19393,6 +20595,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FieldOptions { @@ -19500,6 +20709,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumOptions. */ @@ -19602,6 +20818,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumValueOptions. */ @@ -19698,6 +20921,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ServiceOptions. */ @@ -19800,6 +21030,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MethodOptions. */ @@ -19908,6 +21145,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace MethodOptions { @@ -20044,6 +21288,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace UninterpretedOption { @@ -20142,6 +21393,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -20233,6 +21491,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace SourceCodeInfo { @@ -20349,6 +21614,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -20440,6 +21712,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace GeneratedCodeInfo { @@ -20458,6 +21737,9 @@ export namespace google { /** Annotation end */ end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); } /** Represents an Annotation. */ @@ -20481,6 +21763,9 @@ export namespace google { /** Annotation end. */ public end: number; + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + /** * Creates a new Annotation instance using the specified properties. * @param [properties] Properties to set @@ -20550,6 +21835,23 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } } } @@ -20635,6 +21937,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FieldMask. */ @@ -20725,6 +22034,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Timestamp. */ @@ -20821,6 +22137,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -20921,6 +22244,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Interval + * @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-dataform/protos/protos.js b/packages/google-cloud-dataform/protos/protos.js index 4ebc3edaa92..c3d24985104 100644 --- a/packages/google-cloud-dataform/protos/protos.js +++ b/packages/google-cloud-dataform/protos/protos.js @@ -99,7 +99,7 @@ }; /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#listRepositories}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|listRepositories}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef ListRepositoriesCallback * @type {function} @@ -132,7 +132,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#getRepository}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|getRepository}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef GetRepositoryCallback * @type {function} @@ -165,7 +165,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#createRepository}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|createRepository}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef CreateRepositoryCallback * @type {function} @@ -198,7 +198,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#updateRepository}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|updateRepository}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef UpdateRepositoryCallback * @type {function} @@ -231,7 +231,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#deleteRepository}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|deleteRepository}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef DeleteRepositoryCallback * @type {function} @@ -264,7 +264,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#fetchRemoteBranches}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|fetchRemoteBranches}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef FetchRemoteBranchesCallback * @type {function} @@ -297,7 +297,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#listWorkspaces}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|listWorkspaces}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef ListWorkspacesCallback * @type {function} @@ -330,7 +330,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#getWorkspace}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|getWorkspace}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef GetWorkspaceCallback * @type {function} @@ -363,7 +363,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#createWorkspace}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|createWorkspace}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef CreateWorkspaceCallback * @type {function} @@ -396,7 +396,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#deleteWorkspace}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|deleteWorkspace}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef DeleteWorkspaceCallback * @type {function} @@ -429,7 +429,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#installNpmPackages}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|installNpmPackages}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef InstallNpmPackagesCallback * @type {function} @@ -462,7 +462,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#pullGitCommits}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|pullGitCommits}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef PullGitCommitsCallback * @type {function} @@ -495,7 +495,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#pushGitCommits}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|pushGitCommits}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef PushGitCommitsCallback * @type {function} @@ -528,7 +528,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#fetchFileGitStatuses}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|fetchFileGitStatuses}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef FetchFileGitStatusesCallback * @type {function} @@ -561,7 +561,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#fetchGitAheadBehind}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|fetchGitAheadBehind}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef FetchGitAheadBehindCallback * @type {function} @@ -594,7 +594,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#commitWorkspaceChanges}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|commitWorkspaceChanges}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef CommitWorkspaceChangesCallback * @type {function} @@ -627,7 +627,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#resetWorkspaceChanges}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|resetWorkspaceChanges}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef ResetWorkspaceChangesCallback * @type {function} @@ -660,7 +660,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#fetchFileDiff}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|fetchFileDiff}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef FetchFileDiffCallback * @type {function} @@ -693,7 +693,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#queryDirectoryContents}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|queryDirectoryContents}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef QueryDirectoryContentsCallback * @type {function} @@ -726,7 +726,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#makeDirectory}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|makeDirectory}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef MakeDirectoryCallback * @type {function} @@ -759,7 +759,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#removeDirectory}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|removeDirectory}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef RemoveDirectoryCallback * @type {function} @@ -792,7 +792,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#moveDirectory}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|moveDirectory}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef MoveDirectoryCallback * @type {function} @@ -825,7 +825,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#readFile}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|readFile}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef ReadFileCallback * @type {function} @@ -858,7 +858,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#removeFile}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|removeFile}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef RemoveFileCallback * @type {function} @@ -891,7 +891,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#moveFile}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|moveFile}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef MoveFileCallback * @type {function} @@ -924,7 +924,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#writeFile}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|writeFile}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef WriteFileCallback * @type {function} @@ -957,7 +957,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#listCompilationResults}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|listCompilationResults}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef ListCompilationResultsCallback * @type {function} @@ -990,7 +990,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#getCompilationResult}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|getCompilationResult}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef GetCompilationResultCallback * @type {function} @@ -1023,7 +1023,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#createCompilationResult}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|createCompilationResult}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef CreateCompilationResultCallback * @type {function} @@ -1056,7 +1056,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#queryCompilationResultActions}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|queryCompilationResultActions}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef QueryCompilationResultActionsCallback * @type {function} @@ -1089,7 +1089,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#listWorkflowInvocations}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|listWorkflowInvocations}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef ListWorkflowInvocationsCallback * @type {function} @@ -1122,7 +1122,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#getWorkflowInvocation}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|getWorkflowInvocation}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef GetWorkflowInvocationCallback * @type {function} @@ -1155,7 +1155,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#createWorkflowInvocation}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|createWorkflowInvocation}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef CreateWorkflowInvocationCallback * @type {function} @@ -1188,7 +1188,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#deleteWorkflowInvocation}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|deleteWorkflowInvocation}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef DeleteWorkflowInvocationCallback * @type {function} @@ -1221,7 +1221,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#cancelWorkflowInvocation}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|cancelWorkflowInvocation}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef CancelWorkflowInvocationCallback * @type {function} @@ -1254,7 +1254,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform#queryWorkflowInvocationActions}. + * Callback as used by {@link google.cloud.dataform.v1alpha2.Dataform|queryWorkflowInvocationActions}. * @memberof google.cloud.dataform.v1alpha2.Dataform * @typedef QueryWorkflowInvocationActionsCallback * @type {function} @@ -1392,12 +1392,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.gitRemoteSettings = $root.google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.gitRemoteSettings = $root.google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -1501,6 +1503,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Repository + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.Repository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Repository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.Repository"; + }; + Repository.GitRemoteSettings = (function() { /** @@ -1626,18 +1643,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.url = reader.string(); - break; - case 2: - message.defaultBranch = reader.string(); - break; - case 3: - message.authenticationTokenSecretVersion = reader.string(); - break; - case 4: - message.tokenStatus = reader.int32(); - break; + case 1: { + message.url = reader.string(); + break; + } + case 2: { + message.defaultBranch = reader.string(); + break; + } + case 3: { + message.authenticationTokenSecretVersion = reader.string(); + break; + } + case 4: { + message.tokenStatus = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -1775,6 +1796,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GitRemoteSettings + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GitRemoteSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings"; + }; + /** * TokenStatus enum. * @name google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.TokenStatus @@ -1935,21 +1971,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.orderBy = reader.string(); - break; - case 5: - message.filter = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -2072,6 +2113,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListRepositoriesRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRepositoriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.ListRepositoriesRequest"; + }; + return ListRepositoriesRequest; })(); @@ -2193,19 +2249,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.repositories && message.repositories.length)) - message.repositories = []; - message.repositories.push($root.google.cloud.dataform.v1alpha2.Repository.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; + case 1: { + if (!(message.repositories && message.repositories.length)) + message.repositories = []; + message.repositories.push($root.google.cloud.dataform.v1alpha2.Repository.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; @@ -2342,6 +2401,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListRepositoriesResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.ListRepositoriesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRepositoriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.ListRepositoriesResponse"; + }; + return ListRepositoriesResponse; })(); @@ -2437,9 +2511,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -2529,6 +2604,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetRepositoryRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.GetRepositoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.GetRepositoryRequest"; + }; + return GetRepositoryRequest; })(); @@ -2646,15 +2736,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.repository = $root.google.cloud.dataform.v1alpha2.Repository.decode(reader, reader.uint32()); - break; - case 3: - message.repositoryId = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.repository = $root.google.cloud.dataform.v1alpha2.Repository.decode(reader, reader.uint32()); + break; + } + case 3: { + message.repositoryId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -2766,6 +2859,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateRepositoryRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CreateRepositoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CreateRepositoryRequest"; + }; + return CreateRepositoryRequest; })(); @@ -2872,12 +2980,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 2: - message.repository = $root.google.cloud.dataform.v1alpha2.Repository.decode(reader, reader.uint32()); - break; + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.repository = $root.google.cloud.dataform.v1alpha2.Repository.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -2986,6 +3096,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateRepositoryRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.UpdateRepositoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.UpdateRepositoryRequest"; + }; + return UpdateRepositoryRequest; })(); @@ -3092,12 +3217,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.force = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.force = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -3196,6 +3323,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteRepositoryRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.DeleteRepositoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.DeleteRepositoryRequest"; + }; + return DeleteRepositoryRequest; })(); @@ -3291,9 +3433,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -3383,6 +3526,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FetchRemoteBranchesRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchRemoteBranchesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest"; + }; + return FetchRemoteBranchesRequest; })(); @@ -3480,11 +3638,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.branches && message.branches.length)) - message.branches = []; - message.branches.push(reader.string()); - break; + case 1: { + if (!(message.branches && message.branches.length)) + message.branches = []; + message.branches.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -3586,6 +3745,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FetchRemoteBranchesResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchRemoteBranchesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse"; + }; + return FetchRemoteBranchesResponse; })(); @@ -3681,9 +3855,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -3773,6 +3948,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Workspace + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.Workspace + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Workspace.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.Workspace"; + }; + return Workspace; })(); @@ -3912,21 +4102,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.orderBy = reader.string(); - break; - case 5: - message.filter = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -4049,6 +4244,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListWorkspacesRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListWorkspacesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.ListWorkspacesRequest"; + }; + return ListWorkspacesRequest; })(); @@ -4170,19 +4380,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.workspaces && message.workspaces.length)) - message.workspaces = []; - message.workspaces.push($root.google.cloud.dataform.v1alpha2.Workspace.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; + case 1: { + if (!(message.workspaces && message.workspaces.length)) + message.workspaces = []; + message.workspaces.push($root.google.cloud.dataform.v1alpha2.Workspace.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; @@ -4319,6 +4532,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListWorkspacesResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.ListWorkspacesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListWorkspacesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.ListWorkspacesResponse"; + }; + return ListWorkspacesResponse; })(); @@ -4414,9 +4642,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -4506,6 +4735,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetWorkspaceRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.GetWorkspaceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetWorkspaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.GetWorkspaceRequest"; + }; + return GetWorkspaceRequest; })(); @@ -4623,15 +4867,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.workspace = $root.google.cloud.dataform.v1alpha2.Workspace.decode(reader, reader.uint32()); - break; - case 3: - message.workspaceId = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.workspace = $root.google.cloud.dataform.v1alpha2.Workspace.decode(reader, reader.uint32()); + break; + } + case 3: { + message.workspaceId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -4743,6 +4990,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateWorkspaceRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CreateWorkspaceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateWorkspaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CreateWorkspaceRequest"; + }; + return CreateWorkspaceRequest; })(); @@ -4838,9 +5100,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -4930,6 +5193,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteWorkspaceRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteWorkspaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest"; + }; + return DeleteWorkspaceRequest; })(); @@ -5036,12 +5314,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.emailAddress = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.emailAddress = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -5140,6 +5420,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CommitAuthor + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CommitAuthor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommitAuthor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CommitAuthor"; + }; + return CommitAuthor; })(); @@ -5257,15 +5552,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.remoteBranch = reader.string(); - break; - case 3: - message.author = $root.google.cloud.dataform.v1alpha2.CommitAuthor.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.remoteBranch = reader.string(); + break; + } + case 3: { + message.author = $root.google.cloud.dataform.v1alpha2.CommitAuthor.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -5377,6 +5675,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PullGitCommitsRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.PullGitCommitsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PullGitCommitsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.PullGitCommitsRequest"; + }; + return PullGitCommitsRequest; })(); @@ -5483,12 +5796,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.remoteBranch = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.remoteBranch = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -5587,6 +5902,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PushGitCommitsRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.PushGitCommitsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PushGitCommitsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.PushGitCommitsRequest"; + }; + return PushGitCommitsRequest; })(); @@ -5682,9 +6012,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -5774,6 +6105,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FetchFileGitStatusesRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchFileGitStatusesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest"; + }; + return FetchFileGitStatusesRequest; })(); @@ -5871,11 +6217,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.uncommittedFileChanges && message.uncommittedFileChanges.length)) - message.uncommittedFileChanges = []; - message.uncommittedFileChanges.push($root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.uncommittedFileChanges && message.uncommittedFileChanges.length)) + message.uncommittedFileChanges = []; + message.uncommittedFileChanges.push($root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -5982,6 +6329,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FetchFileGitStatusesResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchFileGitStatusesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse"; + }; + FetchFileGitStatusesResponse.UncommittedFileChange = (function() { /** @@ -6085,12 +6447,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.path = reader.string(); - break; - case 2: - message.state = reader.int32(); - break; + case 1: { + message.path = reader.string(); + break; + } + case 2: { + message.state = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -6217,6 +6581,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UncommittedFileChange + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UncommittedFileChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange"; + }; + /** * State enum. * @name google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.State @@ -6346,12 +6725,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.remoteBranch = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.remoteBranch = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -6450,6 +6831,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FetchGitAheadBehindRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchGitAheadBehindRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest"; + }; + return FetchGitAheadBehindRequest; })(); @@ -6556,12 +6952,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.commitsAhead = reader.int32(); - break; - case 2: - message.commitsBehind = reader.int32(); - break; + case 1: { + message.commitsAhead = reader.int32(); + break; + } + case 2: { + message.commitsBehind = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -6660,6 +7058,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FetchGitAheadBehindResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchGitAheadBehindResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse"; + }; + return FetchGitAheadBehindResponse; })(); @@ -6790,20 +7203,24 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 4: - message.author = $root.google.cloud.dataform.v1alpha2.CommitAuthor.decode(reader, reader.uint32()); - break; - case 2: - message.commitMessage = reader.string(); - break; - case 3: - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 4: { + message.author = $root.google.cloud.dataform.v1alpha2.CommitAuthor.decode(reader, reader.uint32()); + break; + } + case 2: { + message.commitMessage = reader.string(); + break; + } + case 3: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -6936,6 +7353,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CommitWorkspaceChangesRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommitWorkspaceChangesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest"; + }; + return CommitWorkspaceChangesRequest; })(); @@ -7055,17 +7487,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; - case 3: - message.clean = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + case 3: { + message.clean = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -7185,6 +7620,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ResetWorkspaceChangesRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResetWorkspaceChangesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest"; + }; + return ResetWorkspaceChangesRequest; })(); @@ -7291,12 +7741,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.workspace = reader.string(); - break; - case 2: - message.path = reader.string(); - break; + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -7395,6 +7847,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FetchFileDiffRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchFileDiffRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.FetchFileDiffRequest"; + }; + return FetchFileDiffRequest; })(); @@ -7490,9 +7957,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.formattedDiff = reader.string(); - break; + case 1: { + message.formattedDiff = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -7582,6 +8050,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FetchFileDiffResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.FetchFileDiffResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchFileDiffResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.FetchFileDiffResponse"; + }; + return FetchFileDiffResponse; })(); @@ -7710,18 +8193,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.workspace = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; - case 4: - message.pageToken = reader.string(); - break; + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -7836,6 +8323,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for QueryDirectoryContentsRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryDirectoryContentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest"; + }; + return QueryDirectoryContentsRequest; })(); @@ -7944,14 +8446,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.directoryEntries && message.directoryEntries.length)) - message.directoryEntries = []; - message.directoryEntries.push($root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.directoryEntries && message.directoryEntries.length)) + message.directoryEntries = []; + message.directoryEntries.push($root.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -8067,6 +8571,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for QueryDirectoryContentsResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryDirectoryContentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse"; + }; + QueryDirectoryContentsResponse.DirectoryEntry = (function() { /** @@ -8184,12 +8703,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.file = reader.string(); - break; - case 2: - message.directory = reader.string(); - break; + case 1: { + message.file = reader.string(); + break; + } + case 2: { + message.directory = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -8297,6 +8818,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DirectoryEntry + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DirectoryEntry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry"; + }; + return DirectoryEntry; })(); @@ -8406,12 +8942,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.workspace = reader.string(); - break; - case 2: - message.path = reader.string(); - break; + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -8510,6 +9048,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MakeDirectoryRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MakeDirectoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.MakeDirectoryRequest"; + }; + return MakeDirectoryRequest; })(); @@ -8670,6 +9223,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MakeDirectoryResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.MakeDirectoryResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MakeDirectoryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.MakeDirectoryResponse"; + }; + return MakeDirectoryResponse; })(); @@ -8776,12 +9344,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.workspace = reader.string(); - break; - case 2: - message.path = reader.string(); - break; + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -8880,6 +9450,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RemoveDirectoryRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.RemoveDirectoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemoveDirectoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.RemoveDirectoryRequest"; + }; + return RemoveDirectoryRequest; })(); @@ -8997,15 +9582,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.workspace = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - case 3: - message.newPath = reader.string(); - break; + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + case 3: { + message.newPath = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -9112,6 +9700,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MoveDirectoryRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MoveDirectoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.MoveDirectoryRequest"; + }; + return MoveDirectoryRequest; })(); @@ -9272,6 +9875,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MoveDirectoryResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.MoveDirectoryResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MoveDirectoryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.MoveDirectoryResponse"; + }; + return MoveDirectoryResponse; })(); @@ -9378,12 +9996,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.workspace = reader.string(); - break; - case 2: - message.path = reader.string(); - break; + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -9482,6 +10102,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ReadFileRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.ReadFileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReadFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.ReadFileRequest"; + }; + return ReadFileRequest; })(); @@ -9577,9 +10212,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.fileContents = reader.bytes(); - break; + case 1: { + message.fileContents = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -9636,7 +10272,7 @@ if (object.fileContents != null) if (typeof object.fileContents === "string") $util.base64.decode(object.fileContents, message.fileContents = $util.newBuffer($util.base64.length(object.fileContents)), 0); - else if (object.fileContents.length) + else if (object.fileContents.length >= 0) message.fileContents = object.fileContents; return message; }; @@ -9678,6 +10314,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ReadFileResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.ReadFileResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReadFileResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.ReadFileResponse"; + }; + return ReadFileResponse; })(); @@ -9784,12 +10435,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.workspace = reader.string(); - break; - case 2: - message.path = reader.string(); - break; + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -9888,6 +10541,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RemoveFileRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.RemoveFileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemoveFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.RemoveFileRequest"; + }; + return RemoveFileRequest; })(); @@ -10005,15 +10673,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.workspace = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - case 3: - message.newPath = reader.string(); - break; + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + case 3: { + message.newPath = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -10120,6 +10791,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MoveFileRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.MoveFileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MoveFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.MoveFileRequest"; + }; + return MoveFileRequest; })(); @@ -10280,6 +10966,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MoveFileResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.MoveFileResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MoveFileResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.MoveFileResponse"; + }; + return MoveFileResponse; })(); @@ -10397,15 +11098,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.workspace = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - case 3: - message.contents = reader.bytes(); - break; + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + case 3: { + message.contents = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -10472,7 +11176,7 @@ if (object.contents != null) if (typeof object.contents === "string") $util.base64.decode(object.contents, message.contents = $util.newBuffer($util.base64.length(object.contents)), 0); - else if (object.contents.length) + else if (object.contents.length >= 0) message.contents = object.contents; return message; }; @@ -10521,6 +11225,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WriteFileRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.WriteFileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WriteFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.WriteFileRequest"; + }; + return WriteFileRequest; })(); @@ -10681,6 +11400,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WriteFileResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.WriteFileResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WriteFileResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.WriteFileResponse"; + }; + return WriteFileResponse; })(); @@ -10776,9 +11510,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.workspace = reader.string(); - break; + case 1: { + message.workspace = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -10868,6 +11603,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for InstallNpmPackagesRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InstallNpmPackagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest"; + }; + return InstallNpmPackagesRequest; })(); @@ -11028,6 +11778,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for InstallNpmPackagesResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InstallNpmPackagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse"; + }; + return InstallNpmPackagesResponse; })(); @@ -11194,26 +11959,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.gitCommitish = reader.string(); - break; - case 3: - message.workspace = reader.string(); - break; - case 4: - message.codeCompilationConfig = $root.google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig.decode(reader, reader.uint32()); - break; - case 5: - message.dataformCoreVersion = reader.string(); - break; - case 6: - if (!(message.compilationErrors && message.compilationErrors.length)) - message.compilationErrors = []; - message.compilationErrors.push($root.google.cloud.dataform.v1alpha2.CompilationResult.CompilationError.decode(reader, reader.uint32())); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.gitCommitish = reader.string(); + break; + } + case 3: { + message.workspace = reader.string(); + break; + } + case 4: { + message.codeCompilationConfig = $root.google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.dataformCoreVersion = reader.string(); + break; + } + case 6: { + if (!(message.compilationErrors && message.compilationErrors.length)) + message.compilationErrors = []; + message.compilationErrors.push($root.google.cloud.dataform.v1alpha2.CompilationResult.CompilationError.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -11378,6 +12149,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CompilationResult + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CompilationResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompilationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CompilationResult"; + }; + CompilationResult.CodeCompilationConfig = (function() { /** @@ -11549,49 +12335,57 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.defaultDatabase = reader.string(); - break; - case 2: - message.defaultSchema = reader.string(); - break; - case 8: - message.defaultLocation = reader.string(); - break; - case 3: - message.assertionSchema = reader.string(); - break; - case 4: - if (message.vars === $util.emptyObject) - message.vars = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.defaultDatabase = reader.string(); + break; + } + case 2: { + message.defaultSchema = reader.string(); + break; + } + case 8: { + message.defaultLocation = reader.string(); + break; + } + case 3: { + message.assertionSchema = reader.string(); + break; + } + case 4: { + if (message.vars === $util.emptyObject) + message.vars = {}; + 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.vars[key] = value; + break; + } + case 5: { + message.databaseSuffix = reader.string(); + break; + } + case 6: { + message.schemaSuffix = reader.string(); + break; + } + case 7: { + message.tablePrefix = reader.string(); + break; } - message.vars[key] = value; - break; - case 5: - message.databaseSuffix = reader.string(); - break; - case 6: - message.schemaSuffix = reader.string(); - break; - case 7: - message.tablePrefix = reader.string(); - break; default: reader.skipType(tag & 7); break; @@ -11753,6 +12547,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CodeCompilationConfig + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CodeCompilationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig"; + }; + return CodeCompilationConfig; })(); @@ -11881,18 +12690,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - case 2: - message.stack = reader.string(); - break; - case 3: - message.path = reader.string(); - break; - case 4: - message.actionTarget = $root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32()); - break; + case 1: { + message.message = reader.string(); + break; + } + case 2: { + message.stack = reader.string(); + break; + } + case 3: { + message.path = reader.string(); + break; + } + case 4: { + message.actionTarget = $root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -12012,6 +12825,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CompilationError + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompilationError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CompilationResult.CompilationError"; + }; + return CompilationError; })(); @@ -12132,15 +12960,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -12247,6 +13078,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListCompilationResultsRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCompilationResultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.ListCompilationResultsRequest"; + }; + return ListCompilationResultsRequest; })(); @@ -12368,19 +13214,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.compilationResults && message.compilationResults.length)) - message.compilationResults = []; - message.compilationResults.push($root.google.cloud.dataform.v1alpha2.CompilationResult.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; + case 1: { + if (!(message.compilationResults && message.compilationResults.length)) + message.compilationResults = []; + message.compilationResults.push($root.google.cloud.dataform.v1alpha2.CompilationResult.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; @@ -12517,6 +13366,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListCompilationResultsResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.ListCompilationResultsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCompilationResultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.ListCompilationResultsResponse"; + }; + return ListCompilationResultsResponse; })(); @@ -12612,9 +13476,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -12704,6 +13569,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetCompilationResultRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.GetCompilationResultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetCompilationResultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.GetCompilationResultRequest"; + }; + return GetCompilationResultRequest; })(); @@ -12810,12 +13690,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.compilationResult = $root.google.cloud.dataform.v1alpha2.CompilationResult.decode(reader, reader.uint32()); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.compilationResult = $root.google.cloud.dataform.v1alpha2.CompilationResult.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -12919,6 +13801,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateCompilationResultRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CreateCompilationResultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateCompilationResultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CreateCompilationResultRequest"; + }; + return CreateCompilationResultRequest; })(); @@ -13036,15 +13933,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.database = reader.string(); - break; - case 2: - message.schema = reader.string(); - break; - case 3: - message.name = reader.string(); - break; + case 1: { + message.database = reader.string(); + break; + } + case 2: { + message.schema = reader.string(); + break; + } + case 3: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -13151,6 +14051,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Target + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.Target + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Target.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.Target"; + }; + return Target; })(); @@ -13272,36 +14187,39 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.description = reader.string(); - break; - case 2: - if (!(message.columns && message.columns.length)) - message.columns = []; - message.columns.push($root.google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor.decode(reader, reader.uint32())); - break; - case 3: - if (message.bigqueryLabels === $util.emptyObject) - message.bigqueryLabels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.description = reader.string(); + break; + } + case 2: { + if (!(message.columns && message.columns.length)) + message.columns = []; + message.columns.push($root.google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor.decode(reader, reader.uint32())); + break; + } + case 3: { + if (message.bigqueryLabels === $util.emptyObject) + message.bigqueryLabels = {}; + 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.bigqueryLabels[key] = value; + break; } - message.bigqueryLabels[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -13440,6 +14358,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RelationDescriptor + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RelationDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.RelationDescriptor"; + }; + RelationDescriptor.ColumnDescriptor = (function() { /** @@ -13558,19 +14491,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - message.path.push(reader.string()); - break; - case 2: - message.description = reader.string(); - break; - case 3: - if (!(message.bigqueryPolicyTags && message.bigqueryPolicyTags.length)) - message.bigqueryPolicyTags = []; - message.bigqueryPolicyTags.push(reader.string()); - break; + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + message.path.push(reader.string()); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + if (!(message.bigqueryPolicyTags && message.bigqueryPolicyTags.length)) + message.bigqueryPolicyTags = []; + message.bigqueryPolicyTags.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -13702,6 +14638,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ColumnDescriptor + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ColumnDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor"; + }; + return ColumnDescriptor; })(); @@ -13880,27 +14831,34 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.target = $root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32()); - break; - case 2: - message.canonicalTarget = $root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32()); - break; - case 3: - message.filePath = reader.string(); - break; - case 4: - message.relation = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.decode(reader, reader.uint32()); - break; - case 5: - message.operations = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.decode(reader, reader.uint32()); - break; - case 6: - message.assertion = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.decode(reader, reader.uint32()); - break; - case 7: - message.declaration = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration.decode(reader, reader.uint32()); - break; + case 1: { + message.target = $root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32()); + break; + } + case 2: { + message.canonicalTarget = $root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32()); + break; + } + case 3: { + message.filePath = reader.string(); + break; + } + case 4: { + message.relation = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.decode(reader, reader.uint32()); + break; + } + case 5: { + message.operations = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.decode(reader, reader.uint32()); + break; + } + case 6: { + message.assertion = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.decode(reader, reader.uint32()); + break; + } + case 7: { + message.declaration = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -14096,6 +15054,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CompilationResultAction + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompilationResultAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CompilationResultAction"; + }; + CompilationResultAction.Relation = (function() { /** @@ -14343,77 +15316,91 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.dependencyTargets && message.dependencyTargets.length)) - message.dependencyTargets = []; - message.dependencyTargets.push($root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32())); - break; - case 2: - message.disabled = reader.bool(); - break; - case 3: - if (!(message.tags && message.tags.length)) - message.tags = []; - message.tags.push(reader.string()); - break; - case 4: - message.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.decode(reader, reader.uint32()); - break; - case 5: - message.relationType = reader.int32(); - break; - case 6: - message.selectQuery = reader.string(); - break; - case 7: - if (!(message.preOperations && message.preOperations.length)) - message.preOperations = []; - message.preOperations.push(reader.string()); - break; - case 8: - if (!(message.postOperations && message.postOperations.length)) - message.postOperations = []; - message.postOperations.push(reader.string()); - break; - case 9: - message.incrementalTableConfig = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig.decode(reader, reader.uint32()); - break; - case 10: - message.partitionExpression = reader.string(); - break; - case 11: - if (!(message.clusterExpressions && message.clusterExpressions.length)) - message.clusterExpressions = []; - message.clusterExpressions.push(reader.string()); - break; - case 12: - message.partitionExpirationDays = reader.int32(); - break; - case 13: - message.requirePartitionFilter = reader.bool(); - break; - case 14: - if (message.additionalOptions === $util.emptyObject) - message.additionalOptions = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + if (!(message.dependencyTargets && message.dependencyTargets.length)) + message.dependencyTargets = []; + message.dependencyTargets.push($root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32())); + break; + } + case 2: { + message.disabled = reader.bool(); + break; + } + case 3: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 4: { + message.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.decode(reader, reader.uint32()); + break; + } + case 5: { + message.relationType = reader.int32(); + break; + } + case 6: { + message.selectQuery = reader.string(); + break; + } + case 7: { + if (!(message.preOperations && message.preOperations.length)) + message.preOperations = []; + message.preOperations.push(reader.string()); + break; + } + case 8: { + if (!(message.postOperations && message.postOperations.length)) + message.postOperations = []; + message.postOperations.push(reader.string()); + break; + } + case 9: { + message.incrementalTableConfig = $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig.decode(reader, reader.uint32()); + break; + } + case 10: { + message.partitionExpression = reader.string(); + break; + } + case 11: { + if (!(message.clusterExpressions && message.clusterExpressions.length)) + message.clusterExpressions = []; + message.clusterExpressions.push(reader.string()); + break; + } + case 12: { + message.partitionExpirationDays = reader.int32(); + break; + } + case 13: { + message.requirePartitionFilter = reader.bool(); + break; + } + case 14: { + if (message.additionalOptions === $util.emptyObject) + message.additionalOptions = {}; + 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.additionalOptions[key] = value; + break; } - message.additionalOptions[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -14728,6 +15715,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Relation + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Relation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CompilationResultAction.Relation"; + }; + /** * RelationType enum. * @name google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.RelationType @@ -14901,30 +15903,36 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.incrementalSelectQuery = reader.string(); - break; - case 2: - message.refreshDisabled = reader.bool(); - break; - case 3: - if (!(message.uniqueKeyParts && message.uniqueKeyParts.length)) - message.uniqueKeyParts = []; - message.uniqueKeyParts.push(reader.string()); - break; - case 4: - message.updatePartitionFilter = reader.string(); - break; - case 5: - if (!(message.incrementalPreOperations && message.incrementalPreOperations.length)) - message.incrementalPreOperations = []; - message.incrementalPreOperations.push(reader.string()); - break; - case 6: - if (!(message.incrementalPostOperations && message.incrementalPostOperations.length)) - message.incrementalPostOperations = []; - message.incrementalPostOperations.push(reader.string()); - break; + case 1: { + message.incrementalSelectQuery = reader.string(); + break; + } + case 2: { + message.refreshDisabled = reader.bool(); + break; + } + case 3: { + if (!(message.uniqueKeyParts && message.uniqueKeyParts.length)) + message.uniqueKeyParts = []; + message.uniqueKeyParts.push(reader.string()); + break; + } + case 4: { + message.updatePartitionFilter = reader.string(); + break; + } + case 5: { + if (!(message.incrementalPreOperations && message.incrementalPreOperations.length)) + message.incrementalPreOperations = []; + message.incrementalPreOperations.push(reader.string()); + break; + } + case 6: { + if (!(message.incrementalPostOperations && message.incrementalPostOperations.length)) + message.incrementalPostOperations = []; + message.incrementalPostOperations.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -15093,6 +16101,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for IncrementalTableConfig + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IncrementalTableConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig"; + }; + return IncrementalTableConfig; })(); @@ -15252,30 +16275,36 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.dependencyTargets && message.dependencyTargets.length)) - message.dependencyTargets = []; - message.dependencyTargets.push($root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32())); - break; - case 2: - message.disabled = reader.bool(); - break; - case 3: - if (!(message.tags && message.tags.length)) - message.tags = []; - message.tags.push(reader.string()); - break; - case 6: - message.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.queries && message.queries.length)) - message.queries = []; - message.queries.push(reader.string()); - break; - case 5: - message.hasOutput = reader.bool(); - break; + case 1: { + if (!(message.dependencyTargets && message.dependencyTargets.length)) + message.dependencyTargets = []; + message.dependencyTargets.push($root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32())); + break; + } + case 2: { + message.disabled = reader.bool(); + break; + } + case 3: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 6: { + message.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.queries && message.queries.length)) + message.queries = []; + message.queries.push(reader.string()); + break; + } + case 5: { + message.hasOutput = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -15454,6 +16483,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Operations + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operations.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CompilationResultAction.Operations"; + }; + return Operations; })(); @@ -15608,28 +16652,34 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.dependencyTargets && message.dependencyTargets.length)) - message.dependencyTargets = []; - message.dependencyTargets.push($root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32())); - break; - case 5: - message.parentAction = $root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32()); - break; - case 2: - message.disabled = reader.bool(); - break; - case 3: - if (!(message.tags && message.tags.length)) - message.tags = []; - message.tags.push(reader.string()); - break; - case 4: - message.selectQuery = reader.string(); - break; - case 6: - message.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.decode(reader, reader.uint32()); - break; + case 1: { + if (!(message.dependencyTargets && message.dependencyTargets.length)) + message.dependencyTargets = []; + message.dependencyTargets.push($root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32())); + break; + } + case 5: { + message.parentAction = $root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32()); + break; + } + case 2: { + message.disabled = reader.bool(); + break; + } + case 3: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 4: { + message.selectQuery = reader.string(); + break; + } + case 6: { + message.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -15801,6 +16851,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Assertion + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Assertion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion"; + }; + return Assertion; })(); @@ -15896,9 +16961,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.decode(reader, reader.uint32()); - break; + case 1: { + message.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -15993,6 +17059,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CompilationResultAction.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.cloud.dataform.v1alpha2.CompilationResultAction.Declaration"; + }; + return Declaration; })(); @@ -16124,18 +17205,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.filter = reader.string(); - break; + case 1: { + message.name = 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; @@ -16250,6 +17335,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for QueryCompilationResultActionsRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryCompilationResultActionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest"; + }; + return QueryCompilationResultActionsRequest; })(); @@ -16358,14 +17458,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.compilationResultActions && message.compilationResultActions.length)) - message.compilationResultActions = []; - message.compilationResultActions.push($root.google.cloud.dataform.v1alpha2.CompilationResultAction.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.compilationResultActions && message.compilationResultActions.length)) + message.compilationResultActions = []; + message.compilationResultActions.push($root.google.cloud.dataform.v1alpha2.CompilationResultAction.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -16481,6 +17583,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for QueryCompilationResultActionsResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryCompilationResultActionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse"; + }; + return QueryCompilationResultActionsResponse; })(); @@ -16620,21 +17737,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.compilationResult = reader.string(); - break; - case 3: - message.invocationConfig = $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig.decode(reader, reader.uint32()); - break; - case 4: - message.state = reader.int32(); - break; - case 5: - message.invocationTiming = $root.google.type.Interval.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.compilationResult = reader.string(); + break; + } + case 3: { + message.invocationConfig = $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig.decode(reader, reader.uint32()); + break; + } + case 4: { + message.state = reader.int32(); + break; + } + case 5: { + message.invocationTiming = $root.google.type.Interval.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -16800,6 +17922,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WorkflowInvocation + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkflowInvocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.WorkflowInvocation"; + }; + WorkflowInvocation.InvocationConfig = (function() { /** @@ -16940,25 +18077,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.includedTargets && message.includedTargets.length)) - message.includedTargets = []; - message.includedTargets.push($root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.includedTags && message.includedTags.length)) - message.includedTags = []; - message.includedTags.push(reader.string()); - break; - case 3: - message.transitiveDependenciesIncluded = reader.bool(); - break; - case 4: - message.transitiveDependentsIncluded = reader.bool(); - break; - case 5: - message.fullyRefreshIncrementalTablesEnabled = reader.bool(); - break; + case 1: { + if (!(message.includedTargets && message.includedTargets.length)) + message.includedTargets = []; + message.includedTargets.push($root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.includedTags && message.includedTags.length)) + message.includedTags = []; + message.includedTags.push(reader.string()); + break; + } + case 3: { + message.transitiveDependenciesIncluded = reader.bool(); + break; + } + case 4: { + message.transitiveDependentsIncluded = reader.bool(); + break; + } + case 5: { + message.fullyRefreshIncrementalTablesEnabled = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -17112,6 +18254,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for InvocationConfig + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InvocationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig"; + }; + return InvocationConfig; })(); @@ -17254,15 +18411,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -17369,6 +18529,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListWorkflowInvocationsRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListWorkflowInvocationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest"; + }; + return ListWorkflowInvocationsRequest; })(); @@ -17490,19 +18665,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.workflowInvocations && message.workflowInvocations.length)) - message.workflowInvocations = []; - message.workflowInvocations.push($root.google.cloud.dataform.v1alpha2.WorkflowInvocation.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; + case 1: { + if (!(message.workflowInvocations && message.workflowInvocations.length)) + message.workflowInvocations = []; + message.workflowInvocations.push($root.google.cloud.dataform.v1alpha2.WorkflowInvocation.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; @@ -17639,6 +18817,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListWorkflowInvocationsResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListWorkflowInvocationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse"; + }; + return ListWorkflowInvocationsResponse; })(); @@ -17734,9 +18927,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -17826,6 +19020,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetWorkflowInvocationRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetWorkflowInvocationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest"; + }; + return GetWorkflowInvocationRequest; })(); @@ -17932,12 +19141,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.workflowInvocation = $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.decode(reader, reader.uint32()); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.workflowInvocation = $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -18041,6 +19252,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateWorkflowInvocationRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateWorkflowInvocationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest"; + }; + return CreateWorkflowInvocationRequest; })(); @@ -18136,9 +19362,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -18228,6 +19455,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteWorkflowInvocationRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteWorkflowInvocationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest"; + }; + return DeleteWorkflowInvocationRequest; })(); @@ -18323,9 +19565,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -18415,6 +19658,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CancelWorkflowInvocationRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelWorkflowInvocationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest"; + }; + return CancelWorkflowInvocationRequest; })(); @@ -18565,24 +19823,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.target = $root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32()); - break; - case 2: - message.canonicalTarget = $root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32()); - break; - case 4: - message.state = reader.int32(); - break; - case 7: - message.failureReason = reader.string(); - break; - case 5: - message.invocationTiming = $root.google.type.Interval.decode(reader, reader.uint32()); - break; - case 6: - message.bigqueryAction = $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction.decode(reader, reader.uint32()); - break; + case 1: { + message.target = $root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32()); + break; + } + case 2: { + message.canonicalTarget = $root.google.cloud.dataform.v1alpha2.Target.decode(reader, reader.uint32()); + break; + } + case 4: { + message.state = reader.int32(); + break; + } + case 7: { + message.failureReason = reader.string(); + break; + } + case 5: { + message.invocationTiming = $root.google.type.Interval.decode(reader, reader.uint32()); + break; + } + case 6: { + message.bigqueryAction = $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -18771,6 +20035,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WorkflowInvocationAction + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkflowInvocationAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.WorkflowInvocationAction"; + }; + /** * State enum. * @name google.cloud.dataform.v1alpha2.WorkflowInvocationAction.State @@ -18887,9 +20166,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sqlScript = reader.string(); - break; + case 1: { + message.sqlScript = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -18979,6 +20259,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BigQueryAction + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction"; + }; + return BigQueryAction; })(); @@ -19099,15 +20394,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -19214,6 +20512,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for QueryWorkflowInvocationActionsRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryWorkflowInvocationActionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest"; + }; + return QueryWorkflowInvocationActionsRequest; })(); @@ -19322,14 +20635,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.workflowInvocationActions && message.workflowInvocationActions.length)) - message.workflowInvocationActions = []; - message.workflowInvocationActions.push($root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.workflowInvocationActions && message.workflowInvocationActions.length)) + message.workflowInvocationActions = []; + message.workflowInvocationActions.push($root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -19445,6 +20760,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for QueryWorkflowInvocationActionsResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryWorkflowInvocationActionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse"; + }; + return QueryWorkflowInvocationActionsResponse; })(); @@ -19493,7 +20823,7 @@ }; /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#listRepositories}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|listRepositories}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef ListRepositoriesCallback * @type {function} @@ -19526,7 +20856,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#getRepository}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|getRepository}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef GetRepositoryCallback * @type {function} @@ -19559,7 +20889,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#createRepository}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|createRepository}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef CreateRepositoryCallback * @type {function} @@ -19592,7 +20922,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#updateRepository}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|updateRepository}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef UpdateRepositoryCallback * @type {function} @@ -19625,7 +20955,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#deleteRepository}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|deleteRepository}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef DeleteRepositoryCallback * @type {function} @@ -19658,7 +20988,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#fetchRemoteBranches}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|fetchRemoteBranches}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef FetchRemoteBranchesCallback * @type {function} @@ -19691,7 +21021,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#listWorkspaces}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|listWorkspaces}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef ListWorkspacesCallback * @type {function} @@ -19724,7 +21054,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#getWorkspace}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|getWorkspace}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef GetWorkspaceCallback * @type {function} @@ -19757,7 +21087,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#createWorkspace}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|createWorkspace}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef CreateWorkspaceCallback * @type {function} @@ -19790,7 +21120,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#deleteWorkspace}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|deleteWorkspace}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef DeleteWorkspaceCallback * @type {function} @@ -19823,7 +21153,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#installNpmPackages}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|installNpmPackages}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef InstallNpmPackagesCallback * @type {function} @@ -19856,7 +21186,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#pullGitCommits}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|pullGitCommits}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef PullGitCommitsCallback * @type {function} @@ -19889,7 +21219,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#pushGitCommits}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|pushGitCommits}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef PushGitCommitsCallback * @type {function} @@ -19922,7 +21252,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#fetchFileGitStatuses}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|fetchFileGitStatuses}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef FetchFileGitStatusesCallback * @type {function} @@ -19955,7 +21285,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#fetchGitAheadBehind}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|fetchGitAheadBehind}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef FetchGitAheadBehindCallback * @type {function} @@ -19988,7 +21318,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#commitWorkspaceChanges}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|commitWorkspaceChanges}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef CommitWorkspaceChangesCallback * @type {function} @@ -20021,7 +21351,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#resetWorkspaceChanges}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|resetWorkspaceChanges}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef ResetWorkspaceChangesCallback * @type {function} @@ -20054,7 +21384,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#fetchFileDiff}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|fetchFileDiff}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef FetchFileDiffCallback * @type {function} @@ -20087,7 +21417,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#queryDirectoryContents}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|queryDirectoryContents}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef QueryDirectoryContentsCallback * @type {function} @@ -20120,7 +21450,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#makeDirectory}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|makeDirectory}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef MakeDirectoryCallback * @type {function} @@ -20153,7 +21483,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#removeDirectory}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|removeDirectory}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef RemoveDirectoryCallback * @type {function} @@ -20186,7 +21516,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#moveDirectory}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|moveDirectory}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef MoveDirectoryCallback * @type {function} @@ -20219,7 +21549,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#readFile}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|readFile}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef ReadFileCallback * @type {function} @@ -20252,7 +21582,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#removeFile}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|removeFile}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef RemoveFileCallback * @type {function} @@ -20285,7 +21615,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#moveFile}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|moveFile}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef MoveFileCallback * @type {function} @@ -20318,7 +21648,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#writeFile}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|writeFile}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef WriteFileCallback * @type {function} @@ -20351,7 +21681,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#listCompilationResults}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|listCompilationResults}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef ListCompilationResultsCallback * @type {function} @@ -20384,7 +21714,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#getCompilationResult}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|getCompilationResult}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef GetCompilationResultCallback * @type {function} @@ -20417,7 +21747,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#createCompilationResult}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|createCompilationResult}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef CreateCompilationResultCallback * @type {function} @@ -20450,7 +21780,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#queryCompilationResultActions}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|queryCompilationResultActions}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef QueryCompilationResultActionsCallback * @type {function} @@ -20483,7 +21813,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#listWorkflowInvocations}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|listWorkflowInvocations}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef ListWorkflowInvocationsCallback * @type {function} @@ -20516,7 +21846,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#getWorkflowInvocation}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|getWorkflowInvocation}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef GetWorkflowInvocationCallback * @type {function} @@ -20549,7 +21879,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#createWorkflowInvocation}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|createWorkflowInvocation}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef CreateWorkflowInvocationCallback * @type {function} @@ -20582,7 +21912,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#deleteWorkflowInvocation}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|deleteWorkflowInvocation}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef DeleteWorkflowInvocationCallback * @type {function} @@ -20615,7 +21945,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#cancelWorkflowInvocation}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|cancelWorkflowInvocation}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef CancelWorkflowInvocationCallback * @type {function} @@ -20648,7 +21978,7 @@ */ /** - * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform#queryWorkflowInvocationActions}. + * Callback as used by {@link google.cloud.dataform.v1beta1.Dataform|queryWorkflowInvocationActions}. * @memberof google.cloud.dataform.v1beta1.Dataform * @typedef QueryWorkflowInvocationActionsCallback * @type {function} @@ -20786,12 +22116,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.gitRemoteSettings = $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.gitRemoteSettings = $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -20895,6 +22227,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Repository + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.Repository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Repository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.Repository"; + }; + Repository.GitRemoteSettings = (function() { /** @@ -21020,18 +22367,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.url = reader.string(); - break; - case 2: - message.defaultBranch = reader.string(); - break; - case 3: - message.authenticationTokenSecretVersion = reader.string(); - break; - case 4: - message.tokenStatus = reader.int32(); - break; + case 1: { + message.url = reader.string(); + break; + } + case 2: { + message.defaultBranch = reader.string(); + break; + } + case 3: { + message.authenticationTokenSecretVersion = reader.string(); + break; + } + case 4: { + message.tokenStatus = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -21169,6 +22520,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GitRemoteSettings + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.Repository.GitRemoteSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GitRemoteSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.Repository.GitRemoteSettings"; + }; + /** * TokenStatus enum. * @name google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus @@ -21329,21 +22695,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.orderBy = reader.string(); - break; - case 5: - message.filter = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -21466,6 +22837,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListRepositoriesRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRepositoriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.ListRepositoriesRequest"; + }; + return ListRepositoriesRequest; })(); @@ -21587,19 +22973,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.repositories && message.repositories.length)) - message.repositories = []; - message.repositories.push($root.google.cloud.dataform.v1beta1.Repository.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; + case 1: { + if (!(message.repositories && message.repositories.length)) + message.repositories = []; + message.repositories.push($root.google.cloud.dataform.v1beta1.Repository.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; @@ -21736,6 +23125,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListRepositoriesResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.ListRepositoriesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRepositoriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.ListRepositoriesResponse"; + }; + return ListRepositoriesResponse; })(); @@ -21831,9 +23235,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -21923,6 +23328,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetRepositoryRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.GetRepositoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.GetRepositoryRequest"; + }; + return GetRepositoryRequest; })(); @@ -22040,15 +23460,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.repository = $root.google.cloud.dataform.v1beta1.Repository.decode(reader, reader.uint32()); - break; - case 3: - message.repositoryId = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.repository = $root.google.cloud.dataform.v1beta1.Repository.decode(reader, reader.uint32()); + break; + } + case 3: { + message.repositoryId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -22160,6 +23583,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateRepositoryRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CreateRepositoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CreateRepositoryRequest"; + }; + return CreateRepositoryRequest; })(); @@ -22266,12 +23704,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 2: - message.repository = $root.google.cloud.dataform.v1beta1.Repository.decode(reader, reader.uint32()); - break; + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.repository = $root.google.cloud.dataform.v1beta1.Repository.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -22380,6 +23820,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateRepositoryRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.UpdateRepositoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.UpdateRepositoryRequest"; + }; + return UpdateRepositoryRequest; })(); @@ -22486,12 +23941,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.force = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.force = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -22590,6 +24047,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteRepositoryRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.DeleteRepositoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.DeleteRepositoryRequest"; + }; + return DeleteRepositoryRequest; })(); @@ -22685,9 +24157,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -22777,6 +24250,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FetchRemoteBranchesRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchRemoteBranchesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest"; + }; + return FetchRemoteBranchesRequest; })(); @@ -22874,11 +24362,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.branches && message.branches.length)) - message.branches = []; - message.branches.push(reader.string()); - break; + case 1: { + if (!(message.branches && message.branches.length)) + message.branches = []; + message.branches.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -22980,6 +24469,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FetchRemoteBranchesResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchRemoteBranchesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse"; + }; + return FetchRemoteBranchesResponse; })(); @@ -23075,9 +24579,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -23167,6 +24672,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Workspace + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.Workspace + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Workspace.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.Workspace"; + }; + return Workspace; })(); @@ -23306,21 +24826,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.orderBy = reader.string(); - break; - case 5: - message.filter = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -23443,6 +24968,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListWorkspacesRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListWorkspacesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.ListWorkspacesRequest"; + }; + return ListWorkspacesRequest; })(); @@ -23564,19 +25104,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.workspaces && message.workspaces.length)) - message.workspaces = []; - message.workspaces.push($root.google.cloud.dataform.v1beta1.Workspace.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; + case 1: { + if (!(message.workspaces && message.workspaces.length)) + message.workspaces = []; + message.workspaces.push($root.google.cloud.dataform.v1beta1.Workspace.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; @@ -23713,6 +25256,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListWorkspacesResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.ListWorkspacesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListWorkspacesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.ListWorkspacesResponse"; + }; + return ListWorkspacesResponse; })(); @@ -23808,9 +25366,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -23900,6 +25459,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetWorkspaceRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.GetWorkspaceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetWorkspaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.GetWorkspaceRequest"; + }; + return GetWorkspaceRequest; })(); @@ -24017,15 +25591,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.workspace = $root.google.cloud.dataform.v1beta1.Workspace.decode(reader, reader.uint32()); - break; - case 3: - message.workspaceId = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.workspace = $root.google.cloud.dataform.v1beta1.Workspace.decode(reader, reader.uint32()); + break; + } + case 3: { + message.workspaceId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -24137,6 +25714,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateWorkspaceRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CreateWorkspaceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateWorkspaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CreateWorkspaceRequest"; + }; + return CreateWorkspaceRequest; })(); @@ -24232,9 +25824,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -24324,6 +25917,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteWorkspaceRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.DeleteWorkspaceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteWorkspaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.DeleteWorkspaceRequest"; + }; + return DeleteWorkspaceRequest; })(); @@ -24430,12 +26038,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.emailAddress = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.emailAddress = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -24534,6 +26144,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CommitAuthor + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CommitAuthor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommitAuthor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CommitAuthor"; + }; + return CommitAuthor; })(); @@ -24651,15 +26276,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.remoteBranch = reader.string(); - break; - case 3: - message.author = $root.google.cloud.dataform.v1beta1.CommitAuthor.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.remoteBranch = reader.string(); + break; + } + case 3: { + message.author = $root.google.cloud.dataform.v1beta1.CommitAuthor.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -24771,6 +26399,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PullGitCommitsRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.PullGitCommitsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PullGitCommitsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.PullGitCommitsRequest"; + }; + return PullGitCommitsRequest; })(); @@ -24877,12 +26520,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.remoteBranch = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.remoteBranch = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -24981,6 +26626,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PushGitCommitsRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.PushGitCommitsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PushGitCommitsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.PushGitCommitsRequest"; + }; + return PushGitCommitsRequest; })(); @@ -25076,9 +26736,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -25168,6 +26829,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FetchFileGitStatusesRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchFileGitStatusesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest"; + }; + return FetchFileGitStatusesRequest; })(); @@ -25265,11 +26941,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.uncommittedFileChanges && message.uncommittedFileChanges.length)) - message.uncommittedFileChanges = []; - message.uncommittedFileChanges.push($root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.uncommittedFileChanges && message.uncommittedFileChanges.length)) + message.uncommittedFileChanges = []; + message.uncommittedFileChanges.push($root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -25376,6 +27053,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FetchFileGitStatusesResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchFileGitStatusesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse"; + }; + FetchFileGitStatusesResponse.UncommittedFileChange = (function() { /** @@ -25479,12 +27171,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.path = reader.string(); - break; - case 2: - message.state = reader.int32(); - break; + case 1: { + message.path = reader.string(); + break; + } + case 2: { + message.state = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -25611,6 +27305,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UncommittedFileChange + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UncommittedFileChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange"; + }; + /** * State enum. * @name google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.State @@ -25740,12 +27449,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.remoteBranch = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.remoteBranch = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -25844,6 +27555,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FetchGitAheadBehindRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchGitAheadBehindRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest"; + }; + return FetchGitAheadBehindRequest; })(); @@ -25950,12 +27676,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.commitsAhead = reader.int32(); - break; - case 2: - message.commitsBehind = reader.int32(); - break; + case 1: { + message.commitsAhead = reader.int32(); + break; + } + case 2: { + message.commitsBehind = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -26054,6 +27782,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FetchGitAheadBehindResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchGitAheadBehindResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse"; + }; + return FetchGitAheadBehindResponse; })(); @@ -26184,20 +27927,24 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 4: - message.author = $root.google.cloud.dataform.v1beta1.CommitAuthor.decode(reader, reader.uint32()); - break; - case 2: - message.commitMessage = reader.string(); - break; - case 3: - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 4: { + message.author = $root.google.cloud.dataform.v1beta1.CommitAuthor.decode(reader, reader.uint32()); + break; + } + case 2: { + message.commitMessage = reader.string(); + break; + } + case 3: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -26330,6 +28077,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CommitWorkspaceChangesRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommitWorkspaceChangesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest"; + }; + return CommitWorkspaceChangesRequest; })(); @@ -26449,17 +28211,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; - case 3: - message.clean = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + case 3: { + message.clean = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -26579,6 +28344,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ResetWorkspaceChangesRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResetWorkspaceChangesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest"; + }; + return ResetWorkspaceChangesRequest; })(); @@ -26685,12 +28465,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.workspace = reader.string(); - break; - case 2: - message.path = reader.string(); - break; + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -26789,6 +28571,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FetchFileDiffRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchFileDiffRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.FetchFileDiffRequest"; + }; + return FetchFileDiffRequest; })(); @@ -26884,9 +28681,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.formattedDiff = reader.string(); - break; + case 1: { + message.formattedDiff = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -26976,6 +28774,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FetchFileDiffResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.FetchFileDiffResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchFileDiffResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.FetchFileDiffResponse"; + }; + return FetchFileDiffResponse; })(); @@ -27104,18 +28917,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.workspace = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; - case 4: - message.pageToken = reader.string(); - break; + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -27230,6 +29047,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for QueryDirectoryContentsRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryDirectoryContentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest"; + }; + return QueryDirectoryContentsRequest; })(); @@ -27338,14 +29170,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.directoryEntries && message.directoryEntries.length)) - message.directoryEntries = []; - message.directoryEntries.push($root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.directoryEntries && message.directoryEntries.length)) + message.directoryEntries = []; + message.directoryEntries.push($root.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -27461,6 +29295,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for QueryDirectoryContentsResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryDirectoryContentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse"; + }; + QueryDirectoryContentsResponse.DirectoryEntry = (function() { /** @@ -27578,12 +29427,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.file = reader.string(); - break; - case 2: - message.directory = reader.string(); - break; + case 1: { + message.file = reader.string(); + break; + } + case 2: { + message.directory = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -27691,6 +29542,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DirectoryEntry + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DirectoryEntry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry"; + }; + return DirectoryEntry; })(); @@ -27800,12 +29666,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.workspace = reader.string(); - break; - case 2: - message.path = reader.string(); - break; + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -27904,6 +29772,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MakeDirectoryRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MakeDirectoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.MakeDirectoryRequest"; + }; + return MakeDirectoryRequest; })(); @@ -28064,6 +29947,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MakeDirectoryResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.MakeDirectoryResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MakeDirectoryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.MakeDirectoryResponse"; + }; + return MakeDirectoryResponse; })(); @@ -28170,12 +30068,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.workspace = reader.string(); - break; - case 2: - message.path = reader.string(); - break; + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -28274,6 +30174,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RemoveDirectoryRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.RemoveDirectoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemoveDirectoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.RemoveDirectoryRequest"; + }; + return RemoveDirectoryRequest; })(); @@ -28391,15 +30306,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.workspace = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - case 3: - message.newPath = reader.string(); - break; + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + case 3: { + message.newPath = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -28506,6 +30424,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MoveDirectoryRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MoveDirectoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.MoveDirectoryRequest"; + }; + return MoveDirectoryRequest; })(); @@ -28666,6 +30599,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MoveDirectoryResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.MoveDirectoryResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MoveDirectoryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.MoveDirectoryResponse"; + }; + return MoveDirectoryResponse; })(); @@ -28772,12 +30720,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.workspace = reader.string(); - break; - case 2: - message.path = reader.string(); - break; + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -28876,6 +30826,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ReadFileRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.ReadFileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReadFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.ReadFileRequest"; + }; + return ReadFileRequest; })(); @@ -28971,9 +30936,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.fileContents = reader.bytes(); - break; + case 1: { + message.fileContents = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -29030,7 +30996,7 @@ if (object.fileContents != null) if (typeof object.fileContents === "string") $util.base64.decode(object.fileContents, message.fileContents = $util.newBuffer($util.base64.length(object.fileContents)), 0); - else if (object.fileContents.length) + else if (object.fileContents.length >= 0) message.fileContents = object.fileContents; return message; }; @@ -29072,6 +31038,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ReadFileResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.ReadFileResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReadFileResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.ReadFileResponse"; + }; + return ReadFileResponse; })(); @@ -29178,12 +31159,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.workspace = reader.string(); - break; - case 2: - message.path = reader.string(); - break; + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -29282,6 +31265,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RemoveFileRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.RemoveFileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemoveFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.RemoveFileRequest"; + }; + return RemoveFileRequest; })(); @@ -29399,15 +31397,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.workspace = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - case 3: - message.newPath = reader.string(); - break; + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + case 3: { + message.newPath = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -29514,6 +31515,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MoveFileRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.MoveFileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MoveFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.MoveFileRequest"; + }; + return MoveFileRequest; })(); @@ -29674,6 +31690,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MoveFileResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.MoveFileResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MoveFileResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.MoveFileResponse"; + }; + return MoveFileResponse; })(); @@ -29791,15 +31822,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.workspace = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - case 3: - message.contents = reader.bytes(); - break; + case 1: { + message.workspace = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + case 3: { + message.contents = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -29866,7 +31900,7 @@ if (object.contents != null) if (typeof object.contents === "string") $util.base64.decode(object.contents, message.contents = $util.newBuffer($util.base64.length(object.contents)), 0); - else if (object.contents.length) + else if (object.contents.length >= 0) message.contents = object.contents; return message; }; @@ -29915,6 +31949,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WriteFileRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.WriteFileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WriteFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.WriteFileRequest"; + }; + return WriteFileRequest; })(); @@ -30075,6 +32124,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WriteFileResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.WriteFileResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WriteFileResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.WriteFileResponse"; + }; + return WriteFileResponse; })(); @@ -30170,9 +32234,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.workspace = reader.string(); - break; + case 1: { + message.workspace = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -30262,6 +32327,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for InstallNpmPackagesRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InstallNpmPackagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.InstallNpmPackagesRequest"; + }; + return InstallNpmPackagesRequest; })(); @@ -30422,6 +32502,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for InstallNpmPackagesResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.InstallNpmPackagesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InstallNpmPackagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.InstallNpmPackagesResponse"; + }; + return InstallNpmPackagesResponse; })(); @@ -30588,26 +32683,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.gitCommitish = reader.string(); - break; - case 3: - message.workspace = reader.string(); - break; - case 4: - message.codeCompilationConfig = $root.google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.decode(reader, reader.uint32()); - break; - case 5: - message.dataformCoreVersion = reader.string(); - break; - case 6: - if (!(message.compilationErrors && message.compilationErrors.length)) - message.compilationErrors = []; - message.compilationErrors.push($root.google.cloud.dataform.v1beta1.CompilationResult.CompilationError.decode(reader, reader.uint32())); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.gitCommitish = reader.string(); + break; + } + case 3: { + message.workspace = reader.string(); + break; + } + case 4: { + message.codeCompilationConfig = $root.google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.dataformCoreVersion = reader.string(); + break; + } + case 6: { + if (!(message.compilationErrors && message.compilationErrors.length)) + message.compilationErrors = []; + message.compilationErrors.push($root.google.cloud.dataform.v1beta1.CompilationResult.CompilationError.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -30772,6 +32873,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CompilationResult + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CompilationResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompilationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CompilationResult"; + }; + CompilationResult.CodeCompilationConfig = (function() { /** @@ -30943,49 +33059,57 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.defaultDatabase = reader.string(); - break; - case 2: - message.defaultSchema = reader.string(); - break; - case 8: - message.defaultLocation = reader.string(); - break; - case 3: - message.assertionSchema = reader.string(); - break; - case 4: - if (message.vars === $util.emptyObject) - message.vars = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.defaultDatabase = reader.string(); + break; + } + case 2: { + message.defaultSchema = reader.string(); + break; + } + case 8: { + message.defaultLocation = reader.string(); + break; + } + case 3: { + message.assertionSchema = reader.string(); + break; + } + case 4: { + if (message.vars === $util.emptyObject) + message.vars = {}; + 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.vars[key] = value; + break; + } + case 5: { + message.databaseSuffix = reader.string(); + break; + } + case 6: { + message.schemaSuffix = reader.string(); + break; + } + case 7: { + message.tablePrefix = reader.string(); + break; } - message.vars[key] = value; - break; - case 5: - message.databaseSuffix = reader.string(); - break; - case 6: - message.schemaSuffix = reader.string(); - break; - case 7: - message.tablePrefix = reader.string(); - break; default: reader.skipType(tag & 7); break; @@ -31147,6 +33271,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CodeCompilationConfig + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CodeCompilationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CompilationResult.CodeCompilationConfig"; + }; + return CodeCompilationConfig; })(); @@ -31275,18 +33414,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - case 2: - message.stack = reader.string(); - break; - case 3: - message.path = reader.string(); - break; - case 4: - message.actionTarget = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); - break; + case 1: { + message.message = reader.string(); + break; + } + case 2: { + message.stack = reader.string(); + break; + } + case 3: { + message.path = reader.string(); + break; + } + case 4: { + message.actionTarget = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -31406,6 +33549,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CompilationError + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CompilationResult.CompilationError + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompilationError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CompilationResult.CompilationError"; + }; + return CompilationError; })(); @@ -31526,15 +33684,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -31641,6 +33802,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListCompilationResultsRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCompilationResultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.ListCompilationResultsRequest"; + }; + return ListCompilationResultsRequest; })(); @@ -31762,19 +33938,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.compilationResults && message.compilationResults.length)) - message.compilationResults = []; - message.compilationResults.push($root.google.cloud.dataform.v1beta1.CompilationResult.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; + case 1: { + if (!(message.compilationResults && message.compilationResults.length)) + message.compilationResults = []; + message.compilationResults.push($root.google.cloud.dataform.v1beta1.CompilationResult.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; @@ -31911,6 +34090,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListCompilationResultsResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.ListCompilationResultsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCompilationResultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.ListCompilationResultsResponse"; + }; + return ListCompilationResultsResponse; })(); @@ -32006,9 +34200,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -32098,6 +34293,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetCompilationResultRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.GetCompilationResultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetCompilationResultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.GetCompilationResultRequest"; + }; + return GetCompilationResultRequest; })(); @@ -32204,12 +34414,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.compilationResult = $root.google.cloud.dataform.v1beta1.CompilationResult.decode(reader, reader.uint32()); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.compilationResult = $root.google.cloud.dataform.v1beta1.CompilationResult.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -32313,6 +34525,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateCompilationResultRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CreateCompilationResultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateCompilationResultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CreateCompilationResultRequest"; + }; + return CreateCompilationResultRequest; })(); @@ -32430,15 +34657,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.database = reader.string(); - break; - case 2: - message.schema = reader.string(); - break; - case 3: - message.name = reader.string(); - break; + case 1: { + message.database = reader.string(); + break; + } + case 2: { + message.schema = reader.string(); + break; + } + case 3: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -32545,6 +34775,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Target + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.Target + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Target.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.Target"; + }; + return Target; })(); @@ -32666,36 +34911,39 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.description = reader.string(); - break; - case 2: - if (!(message.columns && message.columns.length)) - message.columns = []; - message.columns.push($root.google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.decode(reader, reader.uint32())); - break; - case 3: - if (message.bigqueryLabels === $util.emptyObject) - message.bigqueryLabels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.description = reader.string(); + break; + } + case 2: { + if (!(message.columns && message.columns.length)) + message.columns = []; + message.columns.push($root.google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor.decode(reader, reader.uint32())); + break; + } + case 3: { + if (message.bigqueryLabels === $util.emptyObject) + message.bigqueryLabels = {}; + 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.bigqueryLabels[key] = value; + break; } - message.bigqueryLabels[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -32834,6 +35082,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RelationDescriptor + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RelationDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.RelationDescriptor"; + }; + RelationDescriptor.ColumnDescriptor = (function() { /** @@ -32952,19 +35215,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - message.path.push(reader.string()); - break; - case 2: - message.description = reader.string(); - break; - case 3: - if (!(message.bigqueryPolicyTags && message.bigqueryPolicyTags.length)) - message.bigqueryPolicyTags = []; - message.bigqueryPolicyTags.push(reader.string()); - break; + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + message.path.push(reader.string()); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + if (!(message.bigqueryPolicyTags && message.bigqueryPolicyTags.length)) + message.bigqueryPolicyTags = []; + message.bigqueryPolicyTags.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -33096,6 +35362,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ColumnDescriptor + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ColumnDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor"; + }; + return ColumnDescriptor; })(); @@ -33274,27 +35555,34 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.target = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); - break; - case 2: - message.canonicalTarget = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); - break; - case 3: - message.filePath = reader.string(); - break; - case 4: - message.relation = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.decode(reader, reader.uint32()); - break; - case 5: - message.operations = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Operations.decode(reader, reader.uint32()); - break; - case 6: - message.assertion = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.decode(reader, reader.uint32()); - break; - case 7: - message.declaration = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.decode(reader, reader.uint32()); - break; + case 1: { + message.target = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); + break; + } + case 2: { + message.canonicalTarget = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); + break; + } + case 3: { + message.filePath = reader.string(); + break; + } + case 4: { + message.relation = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.decode(reader, reader.uint32()); + break; + } + case 5: { + message.operations = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Operations.decode(reader, reader.uint32()); + break; + } + case 6: { + message.assertion = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Assertion.decode(reader, reader.uint32()); + break; + } + case 7: { + message.declaration = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Declaration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -33490,6 +35778,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CompilationResultAction + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompilationResultAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CompilationResultAction"; + }; + CompilationResultAction.Relation = (function() { /** @@ -33737,77 +36040,91 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.dependencyTargets && message.dependencyTargets.length)) - message.dependencyTargets = []; - message.dependencyTargets.push($root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32())); - break; - case 2: - message.disabled = reader.bool(); - break; - case 3: - if (!(message.tags && message.tags.length)) - message.tags = []; - message.tags.push(reader.string()); - break; - case 4: - message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.decode(reader, reader.uint32()); - break; - case 5: - message.relationType = reader.int32(); - break; - case 6: - message.selectQuery = reader.string(); - break; - case 7: - if (!(message.preOperations && message.preOperations.length)) - message.preOperations = []; - message.preOperations.push(reader.string()); - break; - case 8: - if (!(message.postOperations && message.postOperations.length)) - message.postOperations = []; - message.postOperations.push(reader.string()); - break; - case 9: - message.incrementalTableConfig = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.decode(reader, reader.uint32()); - break; - case 10: - message.partitionExpression = reader.string(); - break; - case 11: - if (!(message.clusterExpressions && message.clusterExpressions.length)) - message.clusterExpressions = []; - message.clusterExpressions.push(reader.string()); - break; - case 12: - message.partitionExpirationDays = reader.int32(); - break; - case 13: - message.requirePartitionFilter = reader.bool(); - break; - case 14: - if (message.additionalOptions === $util.emptyObject) - message.additionalOptions = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + if (!(message.dependencyTargets && message.dependencyTargets.length)) + message.dependencyTargets = []; + message.dependencyTargets.push($root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32())); + break; + } + case 2: { + message.disabled = reader.bool(); + break; + } + case 3: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 4: { + message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.decode(reader, reader.uint32()); + break; + } + case 5: { + message.relationType = reader.int32(); + break; + } + case 6: { + message.selectQuery = reader.string(); + break; + } + case 7: { + if (!(message.preOperations && message.preOperations.length)) + message.preOperations = []; + message.preOperations.push(reader.string()); + break; + } + case 8: { + if (!(message.postOperations && message.postOperations.length)) + message.postOperations = []; + message.postOperations.push(reader.string()); + break; + } + case 9: { + message.incrementalTableConfig = $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig.decode(reader, reader.uint32()); + break; + } + case 10: { + message.partitionExpression = reader.string(); + break; + } + case 11: { + if (!(message.clusterExpressions && message.clusterExpressions.length)) + message.clusterExpressions = []; + message.clusterExpressions.push(reader.string()); + break; + } + case 12: { + message.partitionExpirationDays = reader.int32(); + break; + } + case 13: { + message.requirePartitionFilter = reader.bool(); + break; + } + case 14: { + if (message.additionalOptions === $util.emptyObject) + message.additionalOptions = {}; + 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.additionalOptions[key] = value; + break; } - message.additionalOptions[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -34122,6 +36439,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Relation + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Relation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CompilationResultAction.Relation"; + }; + /** * RelationType enum. * @name google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType @@ -34295,30 +36627,36 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.incrementalSelectQuery = reader.string(); - break; - case 2: - message.refreshDisabled = reader.bool(); - break; - case 3: - if (!(message.uniqueKeyParts && message.uniqueKeyParts.length)) - message.uniqueKeyParts = []; - message.uniqueKeyParts.push(reader.string()); - break; - case 4: - message.updatePartitionFilter = reader.string(); - break; - case 5: - if (!(message.incrementalPreOperations && message.incrementalPreOperations.length)) - message.incrementalPreOperations = []; - message.incrementalPreOperations.push(reader.string()); - break; - case 6: - if (!(message.incrementalPostOperations && message.incrementalPostOperations.length)) - message.incrementalPostOperations = []; - message.incrementalPostOperations.push(reader.string()); - break; + case 1: { + message.incrementalSelectQuery = reader.string(); + break; + } + case 2: { + message.refreshDisabled = reader.bool(); + break; + } + case 3: { + if (!(message.uniqueKeyParts && message.uniqueKeyParts.length)) + message.uniqueKeyParts = []; + message.uniqueKeyParts.push(reader.string()); + break; + } + case 4: { + message.updatePartitionFilter = reader.string(); + break; + } + case 5: { + if (!(message.incrementalPreOperations && message.incrementalPreOperations.length)) + message.incrementalPreOperations = []; + message.incrementalPreOperations.push(reader.string()); + break; + } + case 6: { + if (!(message.incrementalPostOperations && message.incrementalPostOperations.length)) + message.incrementalPostOperations = []; + message.incrementalPostOperations.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -34487,6 +36825,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for IncrementalTableConfig + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IncrementalTableConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig"; + }; + return IncrementalTableConfig; })(); @@ -34646,30 +36999,36 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.dependencyTargets && message.dependencyTargets.length)) - message.dependencyTargets = []; - message.dependencyTargets.push($root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32())); - break; - case 2: - message.disabled = reader.bool(); - break; - case 3: - if (!(message.tags && message.tags.length)) - message.tags = []; - message.tags.push(reader.string()); - break; - case 6: - message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.queries && message.queries.length)) - message.queries = []; - message.queries.push(reader.string()); - break; - case 5: - message.hasOutput = reader.bool(); - break; + case 1: { + if (!(message.dependencyTargets && message.dependencyTargets.length)) + message.dependencyTargets = []; + message.dependencyTargets.push($root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32())); + break; + } + case 2: { + message.disabled = reader.bool(); + break; + } + case 3: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 6: { + message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.queries && message.queries.length)) + message.queries = []; + message.queries.push(reader.string()); + break; + } + case 5: { + message.hasOutput = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -34848,6 +37207,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Operations + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Operations + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operations.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CompilationResultAction.Operations"; + }; + return Operations; })(); @@ -35002,28 +37376,34 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.dependencyTargets && message.dependencyTargets.length)) - message.dependencyTargets = []; - message.dependencyTargets.push($root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32())); - break; - case 5: - message.parentAction = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); - break; - case 2: - message.disabled = reader.bool(); - break; - case 3: - if (!(message.tags && message.tags.length)) - message.tags = []; - message.tags.push(reader.string()); - break; - case 4: - message.selectQuery = reader.string(); - break; - case 6: - message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.decode(reader, reader.uint32()); - break; + case 1: { + if (!(message.dependencyTargets && message.dependencyTargets.length)) + message.dependencyTargets = []; + message.dependencyTargets.push($root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32())); + break; + } + case 5: { + message.parentAction = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); + break; + } + case 2: { + message.disabled = reader.bool(); + break; + } + case 3: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 4: { + message.selectQuery = reader.string(); + break; + } + case 6: { + message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -35195,6 +37575,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Assertion + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.Assertion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Assertion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CompilationResultAction.Assertion"; + }; + return Assertion; })(); @@ -35290,9 +37685,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.decode(reader, reader.uint32()); - break; + case 1: { + message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -35387,6 +37783,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CompilationResultAction.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.cloud.dataform.v1beta1.CompilationResultAction.Declaration"; + }; + return Declaration; })(); @@ -35518,18 +37929,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.filter = reader.string(); - break; + case 1: { + message.name = 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; @@ -35644,6 +38059,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for QueryCompilationResultActionsRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryCompilationResultActionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest"; + }; + return QueryCompilationResultActionsRequest; })(); @@ -35752,14 +38182,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.compilationResultActions && message.compilationResultActions.length)) - message.compilationResultActions = []; - message.compilationResultActions.push($root.google.cloud.dataform.v1beta1.CompilationResultAction.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.compilationResultActions && message.compilationResultActions.length)) + message.compilationResultActions = []; + message.compilationResultActions.push($root.google.cloud.dataform.v1beta1.CompilationResultAction.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -35875,6 +38307,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for QueryCompilationResultActionsResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryCompilationResultActionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse"; + }; + return QueryCompilationResultActionsResponse; })(); @@ -36014,21 +38461,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.compilationResult = reader.string(); - break; - case 3: - message.invocationConfig = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.decode(reader, reader.uint32()); - break; - case 4: - message.state = reader.int32(); - break; - case 5: - message.invocationTiming = $root.google.type.Interval.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.compilationResult = reader.string(); + break; + } + case 3: { + message.invocationConfig = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.decode(reader, reader.uint32()); + break; + } + case 4: { + message.state = reader.int32(); + break; + } + case 5: { + message.invocationTiming = $root.google.type.Interval.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -36194,6 +38646,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WorkflowInvocation + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkflowInvocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.WorkflowInvocation"; + }; + WorkflowInvocation.InvocationConfig = (function() { /** @@ -36334,25 +38801,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.includedTargets && message.includedTargets.length)) - message.includedTargets = []; - message.includedTargets.push($root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.includedTags && message.includedTags.length)) - message.includedTags = []; - message.includedTags.push(reader.string()); - break; - case 3: - message.transitiveDependenciesIncluded = reader.bool(); - break; - case 4: - message.transitiveDependentsIncluded = reader.bool(); - break; - case 5: - message.fullyRefreshIncrementalTablesEnabled = reader.bool(); - break; + case 1: { + if (!(message.includedTargets && message.includedTargets.length)) + message.includedTargets = []; + message.includedTargets.push($root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.includedTags && message.includedTags.length)) + message.includedTags = []; + message.includedTags.push(reader.string()); + break; + } + case 3: { + message.transitiveDependenciesIncluded = reader.bool(); + break; + } + case 4: { + message.transitiveDependentsIncluded = reader.bool(); + break; + } + case 5: { + message.fullyRefreshIncrementalTablesEnabled = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -36506,6 +38978,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for InvocationConfig + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InvocationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig"; + }; + return InvocationConfig; })(); @@ -36648,15 +39135,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -36763,6 +39253,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListWorkflowInvocationsRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListWorkflowInvocationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest"; + }; + return ListWorkflowInvocationsRequest; })(); @@ -36884,19 +39389,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.workflowInvocations && message.workflowInvocations.length)) - message.workflowInvocations = []; - message.workflowInvocations.push($root.google.cloud.dataform.v1beta1.WorkflowInvocation.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; + case 1: { + if (!(message.workflowInvocations && message.workflowInvocations.length)) + message.workflowInvocations = []; + message.workflowInvocations.push($root.google.cloud.dataform.v1beta1.WorkflowInvocation.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; @@ -37033,6 +39541,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListWorkflowInvocationsResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListWorkflowInvocationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse"; + }; + return ListWorkflowInvocationsResponse; })(); @@ -37128,9 +39651,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -37220,6 +39744,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetWorkflowInvocationRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetWorkflowInvocationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest"; + }; + return GetWorkflowInvocationRequest; })(); @@ -37326,12 +39865,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.workflowInvocation = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.decode(reader, reader.uint32()); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.workflowInvocation = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -37435,6 +39976,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateWorkflowInvocationRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateWorkflowInvocationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest"; + }; + return CreateWorkflowInvocationRequest; })(); @@ -37530,9 +40086,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -37622,6 +40179,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteWorkflowInvocationRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteWorkflowInvocationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest"; + }; + return DeleteWorkflowInvocationRequest; })(); @@ -37717,9 +40289,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -37809,6 +40382,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CancelWorkflowInvocationRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelWorkflowInvocationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest"; + }; + return CancelWorkflowInvocationRequest; })(); @@ -37959,24 +40547,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.target = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); - break; - case 2: - message.canonicalTarget = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); - break; - case 4: - message.state = reader.int32(); - break; - case 7: - message.failureReason = reader.string(); - break; - case 5: - message.invocationTiming = $root.google.type.Interval.decode(reader, reader.uint32()); - break; - case 6: - message.bigqueryAction = $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction.decode(reader, reader.uint32()); - break; + case 1: { + message.target = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); + break; + } + case 2: { + message.canonicalTarget = $root.google.cloud.dataform.v1beta1.Target.decode(reader, reader.uint32()); + break; + } + case 4: { + message.state = reader.int32(); + break; + } + case 7: { + message.failureReason = reader.string(); + break; + } + case 5: { + message.invocationTiming = $root.google.type.Interval.decode(reader, reader.uint32()); + break; + } + case 6: { + message.bigqueryAction = $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -38165,6 +40759,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WorkflowInvocationAction + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkflowInvocationAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.WorkflowInvocationAction"; + }; + /** * State enum. * @name google.cloud.dataform.v1beta1.WorkflowInvocationAction.State @@ -38281,9 +40890,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sqlScript = reader.string(); - break; + case 1: { + message.sqlScript = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -38373,6 +40983,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BigQueryAction + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryAction"; + }; + return BigQueryAction; })(); @@ -38493,15 +41118,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -38608,6 +41236,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for QueryWorkflowInvocationActionsRequest + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryWorkflowInvocationActionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest"; + }; + return QueryWorkflowInvocationActionsRequest; })(); @@ -38716,14 +41359,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.workflowInvocationActions && message.workflowInvocationActions.length)) - message.workflowInvocationActions = []; - message.workflowInvocationActions.push($root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.workflowInvocationActions && message.workflowInvocationActions.length)) + message.workflowInvocationActions = []; + message.workflowInvocationActions.push($root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -38839,6 +41484,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for QueryWorkflowInvocationActionsResponse + * @function getTypeUrl + * @memberof google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryWorkflowInvocationActionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse"; + }; + return QueryWorkflowInvocationActionsResponse; })(); @@ -38965,14 +41625,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -39088,6 +41750,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + return Http; })(); @@ -39298,38 +41975,48 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -39551,6 +42238,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + return HttpRule; })(); @@ -39657,12 +42359,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -39761,6 +42465,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + return CustomHttpPattern; })(); @@ -39955,36 +42674,43 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - case 3: - message.nameField = reader.string(); - break; - case 4: - message.history = reader.int32(); - break; - case 5: - message.plural = reader.string(); - break; - case 6: - message.singular = reader.string(); - break; - case 10: - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); - break; + break; + } default: reader.skipType(tag & 7); break; @@ -40182,6 +42908,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + /** * History enum. * @name google.api.ResourceDescriptor.History @@ -40318,12 +43059,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.childType = reader.string(); - break; + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -40422,6 +43165,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + return ResourceReference; })(); @@ -40531,11 +43289,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -40642,6 +43401,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + return FileDescriptorSet; })(); @@ -40663,6 +43437,7 @@ * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {string|null} [edition] FileDescriptorProto edition */ /** @@ -40783,6 +43558,14 @@ */ FileDescriptorProto.prototype.syntax = ""; + /** + * FileDescriptorProto edition. + * @member {string} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = ""; + /** * Creates a new FileDescriptorProto instance using the specified properties. * @function create @@ -40838,6 +43621,8 @@ writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.edition); return writer; }; @@ -40872,66 +43657,82 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message["package"] = reader.string(); - break; - case 3: - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - case 10: - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - case 11: - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - case 4: - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 13: { + message.edition = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -41043,6 +43844,9 @@ if (message.syntax != null && message.hasOwnProperty("syntax")) if (!$util.isString(message.syntax)) return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + if (!$util.isString(message.edition)) + return "edition: string expected"; return null; }; @@ -41135,6 +43939,8 @@ } if (object.syntax != null) message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); return message; }; @@ -41166,6 +43972,7 @@ object.options = null; object.sourceCodeInfo = null; object.syntax = ""; + object.edition = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -41212,6 +44019,8 @@ } if (message.syntax != null && message.hasOwnProperty("syntax")) object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = message.edition; return object; }; @@ -41226,6 +44035,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + return FileDescriptorProto; })(); @@ -41436,52 +44260,62 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -41782,6 +44616,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + DescriptorProto.ExtensionRange = (function() { /** @@ -41896,15 +44745,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -42016,6 +44868,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + return ExtensionRange; })(); @@ -42122,12 +44989,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -42226,6 +45095,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + return ReservedRange; })(); @@ -42326,11 +45210,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -42437,6 +45322,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + return ExtensionRangeOptions; })(); @@ -42642,39 +45542,50 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -42961,6 +45872,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + /** * Type enum. * @name google.protobuf.FieldDescriptorProto.Type @@ -43129,12 +46055,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -43238,6 +46166,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + return OneofDescriptorProto; })(); @@ -43383,27 +46326,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -43579,6 +46527,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + EnumDescriptorProto.EnumReservedRange = (function() { /** @@ -43682,12 +46645,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -43786,6 +46751,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + return EnumReservedRange; })(); @@ -43906,15 +46886,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -44026,6 +47009,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + return EnumValueDescriptorProto; })(); @@ -44145,17 +47143,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -44285,6 +47286,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + return ServiceDescriptorProto; })(); @@ -44435,24 +47451,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -44588,6 +47610,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + return MethodDescriptorProto; })(); @@ -44918,76 +47955,98 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1053: - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); - break; + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 42: { + message.phpGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -45300,6 +48359,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + /** * OptimizeMode enum. * @name google.protobuf.FileOptions.OptimizeMode @@ -45468,26 +48542,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1053: - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -45641,6 +48721,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + return MessageOptions; })(); @@ -45654,6 +48749,7 @@ * @property {boolean|null} [packed] FieldOptions packed * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy * @property {boolean|null} [deprecated] FieldOptions deprecated * @property {boolean|null} [weak] FieldOptions weak * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption @@ -45710,6 +48806,14 @@ */ FieldOptions.prototype.lazy = false; + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + /** * FieldOptions deprecated. * @member {boolean} deprecated @@ -45786,6 +48890,8 @@ writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); @@ -45831,42 +48937,55 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1052: - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - case 1055: - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -45926,6 +49045,9 @@ if (message.lazy != null && message.hasOwnProperty("lazy")) if (typeof message.lazy !== "boolean") return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; @@ -46011,6 +49133,8 @@ } if (object.lazy != null) message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); if (object.weak != null) @@ -46098,6 +49222,7 @@ object.lazy = false; object.jstype = options.enums === String ? "JS_NORMAL" : 0; object.weak = false; + object.unverifiedLazy = false; object[".google.api.resourceReference"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) @@ -46112,6 +49237,8 @@ object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; if (message.weak != null && message.hasOwnProperty("weak")) object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -46138,6 +49265,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + /** * CType enum. * @name google.protobuf.FieldOptions.CType @@ -46267,11 +49409,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -46378,6 +49521,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + return OneofOptions; })(); @@ -46497,17 +49655,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -46632,6 +49793,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + return EnumOptions; })(); @@ -46740,14 +49916,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 1: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -46863,6 +50041,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + return EnumValueOptions; })(); @@ -46993,20 +50186,24 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1049: - message[".google.api.defaultHost"] = reader.string(); - break; - case 1050: - message[".google.api.oauthScopes"] = reader.string(); - break; + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -47139,6 +50336,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + return ServiceOptions; })(); @@ -47282,25 +50494,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 72295728: - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - case 1051: - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -47477,6 +50694,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + /** * IdempotencyLevel enum. * @name google.protobuf.MethodOptions.IdempotencyLevel @@ -47656,29 +50888,36 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = reader.uint64(); - break; - case 5: - message.negativeIntValue = reader.int64(); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -47791,7 +51030,7 @@ if (object.stringValue != null) if (typeof object.stringValue === "string") $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length) + else if (object.stringValue.length >= 0) message.stringValue = object.stringValue; if (object.aggregateValue != null) message.aggregateValue = String(object.aggregateValue); @@ -47872,6 +51111,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + UninterpretedOption.NamePart = (function() { /** @@ -47973,12 +51227,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -48079,6 +51335,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + return NamePart; })(); @@ -48179,11 +51450,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -48290,6 +51562,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + SourceCodeInfo.Location = (function() { /** @@ -48438,37 +51725,42 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -48629,6 +51921,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + return Location; })(); @@ -48729,11 +52036,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -48840,6 +52148,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + GeneratedCodeInfo.Annotation = (function() { /** @@ -48850,6 +52173,7 @@ * @property {string|null} [sourceFile] Annotation sourceFile * @property {number|null} [begin] Annotation begin * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic */ /** @@ -48900,6 +52224,14 @@ */ Annotation.prototype.end = 0; + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + /** * Creates a new Annotation instance using the specified properties. * @function create @@ -48936,6 +52268,8 @@ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); return writer; }; @@ -48970,25 +52304,33 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -49040,6 +52382,15 @@ if (message.end != null && message.hasOwnProperty("end")) if (!$util.isInteger(message.end)) return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -49068,6 +52419,20 @@ message.begin = object.begin | 0; if (object.end != null) message.end = object.end | 0; + switch (object.semantic) { + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } return message; }; @@ -49090,6 +52455,7 @@ object.sourceFile = ""; object.begin = 0; object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; } if (message.path && message.path.length) { object.path = []; @@ -49102,6 +52468,8 @@ object.begin = message.begin; if (message.end != null && message.hasOwnProperty("end")) object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; return object; }; @@ -49116,6 +52484,37 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + return Annotation; })(); @@ -49279,6 +52678,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + return Empty; })(); @@ -49376,11 +52790,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -49482,6 +52897,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + return FieldMask; })(); @@ -49588,12 +53018,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); - break; + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -49706,6 +53138,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + return Timestamp; })(); @@ -49824,12 +53271,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 2: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -49938,6 +53387,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Interval + * @function getTypeUrl + * @memberof google.type.Interval + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Interval.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.Interval"; + }; + return Interval; })(); diff --git a/packages/google-cloud-dataform/protos/protos.json b/packages/google-cloud-dataform/protos/protos.json index d89a861a32f..b05df5035bf 100644 --- a/packages/google-cloud-dataform/protos/protos.json +++ b/packages/google-cloud-dataform/protos/protos.json @@ -4916,6 +4916,10 @@ "syntax": { "type": "string", "id": 12 + }, + "edition": { + "type": "string", + "id": 13 } } }, @@ -5444,6 +5448,13 @@ "default": false } }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, "deprecated": { "type": "bool", "id": 3, @@ -5736,6 +5747,19 @@ "end": { "type": "int32", "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } } } } From 79358580064e6d76a609d2f31b6b1703c68092dc Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 27 Aug 2022 05:06:32 +0000 Subject: [PATCH 15/80] fix: do not import the whole google-gax from proto JS (#1553) (#17) fix: use google-gax v3.3.0 Source-Link: https://github.com/googleapis/synthtool/commit/c73d112a11a1f1a93efa67c50495c19aa3a88910 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:b15a6f06cc06dcffa11e1bebdf1a74b6775a134aac24a0f86f51ddf728eb373e --- packages/google-cloud-dataform/package.json | 2 +- packages/google-cloud-dataform/protos/protos.d.ts | 2 +- packages/google-cloud-dataform/protos/protos.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-dataform/package.json b/packages/google-cloud-dataform/package.json index fe417d575cc..19239a9cb6d 100644 --- a/packages/google-cloud-dataform/package.json +++ b/packages/google-cloud-dataform/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^3.1.3" + "google-gax": "^3.3.0" }, "devDependencies": { "@types/mocha": "^9.0.0", diff --git a/packages/google-cloud-dataform/protos/protos.d.ts b/packages/google-cloud-dataform/protos/protos.d.ts index 2c1fd7b01f4..815dea9405a 100644 --- a/packages/google-cloud-dataform/protos/protos.d.ts +++ b/packages/google-cloud-dataform/protos/protos.d.ts @@ -13,7 +13,7 @@ // limitations under the License. import Long = require("long"); -import {protobuf as $protobuf} from "google-gax"; +import type {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { diff --git a/packages/google-cloud-dataform/protos/protos.js b/packages/google-cloud-dataform/protos/protos.js index c3d24985104..22cd3d2b500 100644 --- a/packages/google-cloud-dataform/protos/protos.js +++ b/packages/google-cloud-dataform/protos/protos.js @@ -19,7 +19,7 @@ define(["protobufjs/minimal"], factory); /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("google-gax").protobufMinimal); + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); })(this, function($protobuf) { "use strict"; From 75af73b6a8352d477bc079af8a25502328a4c418 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 1 Sep 2022 20:56:11 +0000 Subject: [PATCH 16/80] fix: allow passing gax instance to client constructor (#18) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 470911839 Source-Link: https://github.com/googleapis/googleapis/commit/352756699ebc5b2144c252867c265ea44448712e Source-Link: https://github.com/googleapis/googleapis-gen/commit/f16a1d224f00a630ea43d6a9a1a31f566f45cdea Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjE2YTFkMjI0ZjAwYTYzMGVhNDNkNmE5YTFhMzFmNTY2ZjQ1Y2RlYSJ9 feat: accept google-gax instance as a parameter Please see the documentation of the client constructor for details. PiperOrigin-RevId: 470332808 Source-Link: https://github.com/googleapis/googleapis/commit/d4a23675457cd8f0b44080e0594ec72de1291b89 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e97a1ac204ead4fe7341f91e72db7c6ac6016341 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTk3YTFhYzIwNGVhZDRmZTczNDFmOTFlNzJkYjdjNmFjNjAxNjM0MSJ9 --- .../src/v1alpha2/dataform_client.ts | 134 ++++++++++-------- .../src/v1beta1/dataform_client.ts | 134 ++++++++++-------- 2 files changed, 150 insertions(+), 118 deletions(-) diff --git a/packages/google-cloud-dataform/src/v1alpha2/dataform_client.ts b/packages/google-cloud-dataform/src/v1alpha2/dataform_client.ts index 2a4c45e0a7a..e596d503487 100644 --- a/packages/google-cloud-dataform/src/v1alpha2/dataform_client.ts +++ b/packages/google-cloud-dataform/src/v1alpha2/dataform_client.ts @@ -17,8 +17,8 @@ // ** All changes to this file may be overwritten. ** /* global window */ -import * as gax from 'google-gax'; -import { +import type * as gax from 'google-gax'; +import type { Callback, CallOptions, Descriptors, @@ -30,7 +30,6 @@ import { LocationsClient, LocationProtos, } from 'google-gax'; - import {Transform} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); @@ -40,7 +39,6 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './dataform_client_config.json'; - const version = require('../../../package.json').version; /** @@ -103,8 +101,18 @@ export class DataformClient { * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. * For more information, please check the * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new DataformClient({fallback: 'rest'}, gax); + * ``` */ - constructor(opts?: ClientOptions) { + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof DataformClient; const servicePath = @@ -124,8 +132,13 @@ export class DataformClient { opts['scopes'] = staticMembers.scopes; } + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gax.fallback : gax; + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. this._gaxGrpc = new this._gaxModule.GrpcClient(opts); @@ -146,9 +159,12 @@ export class DataformClient { if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; } - this.iamClient = new IamClient(this._gaxGrpc, opts); + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); - this.locationsClient = new LocationsClient(this._gaxGrpc, opts); + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; @@ -244,7 +260,7 @@ export class DataformClient { this.innerApiCalls = {}; // Add a warn function to the client constructor so it can be easily tested. - this.warn = gax.warn; + this.warn = this._gaxModule.warn; } /** @@ -484,7 +500,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -587,7 +603,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -687,7 +703,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ 'repository.name': request.repository!.name || '', }); this.initialize(); @@ -788,7 +804,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -885,7 +901,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -976,7 +992,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1073,7 +1089,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -1164,7 +1180,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1261,7 +1277,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ workspace: request.workspace || '', }); this.initialize(); @@ -1358,7 +1374,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1452,7 +1468,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1549,7 +1565,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1650,7 +1666,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1754,7 +1770,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1860,7 +1876,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1953,7 +1969,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ workspace: request.workspace || '', }); this.initialize(); @@ -2047,7 +2063,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ workspace: request.workspace || '', }); this.initialize(); @@ -2141,7 +2157,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ workspace: request.workspace || '', }); this.initialize(); @@ -2239,7 +2255,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ workspace: request.workspace || '', }); this.initialize(); @@ -2326,7 +2342,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ workspace: request.workspace || '', }); this.initialize(); @@ -2419,7 +2435,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ workspace: request.workspace || '', }); this.initialize(); @@ -2508,7 +2524,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ workspace: request.workspace || '', }); this.initialize(); @@ -2603,7 +2619,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ workspace: request.workspace || '', }); this.initialize(); @@ -2700,7 +2716,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -2800,7 +2816,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -2901,7 +2917,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -3000,7 +3016,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -3101,7 +3117,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -3202,7 +3218,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -3318,7 +3334,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -3369,7 +3385,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listRepositories']; @@ -3429,7 +3445,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listRepositories']; @@ -3546,7 +3562,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -3597,7 +3613,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listWorkspaces']; @@ -3657,7 +3673,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listWorkspaces']; @@ -3771,7 +3787,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ workspace: request.workspace || '', }); this.initialize(); @@ -3823,7 +3839,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ workspace: request.workspace || '', }); const defaultCallSettings = this._defaults['queryDirectoryContents']; @@ -3880,7 +3896,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ workspace: request.workspace || '', }); const defaultCallSettings = this._defaults['queryDirectoryContents']; @@ -3991,7 +4007,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -4040,7 +4056,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listCompilationResults']; @@ -4094,7 +4110,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listCompilationResults']; @@ -4208,7 +4224,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -4260,7 +4276,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); const defaultCallSettings = this._defaults['queryCompilationResultActions']; @@ -4317,7 +4333,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); const defaultCallSettings = this._defaults['queryCompilationResultActions']; @@ -4428,7 +4444,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -4477,7 +4493,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listWorkflowInvocations']; @@ -4531,7 +4547,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listWorkflowInvocations']; @@ -4642,7 +4658,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -4691,7 +4707,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); const defaultCallSettings = @@ -4746,7 +4762,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); const defaultCallSettings = diff --git a/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts b/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts index 0e808b16498..2565fe6bfb4 100644 --- a/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts +++ b/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts @@ -17,8 +17,8 @@ // ** All changes to this file may be overwritten. ** /* global window */ -import * as gax from 'google-gax'; -import { +import type * as gax from 'google-gax'; +import type { Callback, CallOptions, Descriptors, @@ -30,7 +30,6 @@ import { LocationsClient, LocationProtos, } from 'google-gax'; - import {Transform} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); @@ -40,7 +39,6 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './dataform_client_config.json'; - const version = require('../../../package.json').version; /** @@ -103,8 +101,18 @@ export class DataformClient { * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. * For more information, please check the * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new DataformClient({fallback: 'rest'}, gax); + * ``` */ - constructor(opts?: ClientOptions) { + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof DataformClient; const servicePath = @@ -124,8 +132,13 @@ export class DataformClient { opts['scopes'] = staticMembers.scopes; } + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gax.fallback : gax; + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. this._gaxGrpc = new this._gaxModule.GrpcClient(opts); @@ -146,9 +159,12 @@ export class DataformClient { if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; } - this.iamClient = new IamClient(this._gaxGrpc, opts); + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); - this.locationsClient = new LocationsClient(this._gaxGrpc, opts); + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; @@ -244,7 +260,7 @@ export class DataformClient { this.innerApiCalls = {}; // Add a warn function to the client constructor so it can be easily tested. - this.warn = gax.warn; + this.warn = this._gaxModule.warn; } /** @@ -484,7 +500,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -581,7 +597,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -675,7 +691,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ 'repository.name': request.repository!.name || '', }); this.initialize(); @@ -770,7 +786,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -867,7 +883,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -958,7 +974,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1055,7 +1071,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -1146,7 +1162,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1243,7 +1259,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ workspace: request.workspace || '', }); this.initialize(); @@ -1340,7 +1356,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1434,7 +1450,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1531,7 +1547,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1632,7 +1648,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1736,7 +1752,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1842,7 +1858,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1935,7 +1951,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ workspace: request.workspace || '', }); this.initialize(); @@ -2029,7 +2045,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ workspace: request.workspace || '', }); this.initialize(); @@ -2123,7 +2139,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ workspace: request.workspace || '', }); this.initialize(); @@ -2221,7 +2237,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ workspace: request.workspace || '', }); this.initialize(); @@ -2308,7 +2324,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ workspace: request.workspace || '', }); this.initialize(); @@ -2401,7 +2417,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ workspace: request.workspace || '', }); this.initialize(); @@ -2490,7 +2506,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ workspace: request.workspace || '', }); this.initialize(); @@ -2579,7 +2595,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ workspace: request.workspace || '', }); this.initialize(); @@ -2676,7 +2692,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -2776,7 +2792,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -2877,7 +2893,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -2977,7 +2993,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -3078,7 +3094,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -3179,7 +3195,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -3295,7 +3311,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -3346,7 +3362,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listRepositories']; @@ -3406,7 +3422,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listRepositories']; @@ -3523,7 +3539,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -3574,7 +3590,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listWorkspaces']; @@ -3634,7 +3650,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listWorkspaces']; @@ -3748,7 +3764,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ workspace: request.workspace || '', }); this.initialize(); @@ -3800,7 +3816,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ workspace: request.workspace || '', }); const defaultCallSettings = this._defaults['queryDirectoryContents']; @@ -3857,7 +3873,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ workspace: request.workspace || '', }); const defaultCallSettings = this._defaults['queryDirectoryContents']; @@ -3968,7 +3984,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -4017,7 +4033,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listCompilationResults']; @@ -4071,7 +4087,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listCompilationResults']; @@ -4185,7 +4201,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -4237,7 +4253,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); const defaultCallSettings = this._defaults['queryCompilationResultActions']; @@ -4294,7 +4310,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); const defaultCallSettings = this._defaults['queryCompilationResultActions']; @@ -4405,7 +4421,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -4454,7 +4470,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listWorkflowInvocations']; @@ -4508,7 +4524,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listWorkflowInvocations']; @@ -4619,7 +4635,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -4668,7 +4684,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); const defaultCallSettings = @@ -4723,7 +4739,7 @@ export class DataformClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); const defaultCallSettings = From 949d7eb83492d6d546c47d18097cc4cb2914b49f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 14 Sep 2022 22:34:11 +0000 Subject: [PATCH 17/80] fix: preserve default values in x-goog-request-params header (#19) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 474338479 Source-Link: https://github.com/googleapis/googleapis/commit/d5d35e0353b59719e8917103b1bc7df2782bf6ba Source-Link: https://github.com/googleapis/googleapis-gen/commit/efcd3f93962a103f68f003e2a1eecde6fa216a27 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9 --- .../src/v1alpha2/dataform_client.ts | 100 +- .../src/v1beta1/dataform_client.ts | 100 +- .../test/gapic_dataform_v1alpha2.ts | 3649 +++++++++-------- .../test/gapic_dataform_v1beta1.ts | 3649 +++++++++-------- 4 files changed, 3968 insertions(+), 3530 deletions(-) diff --git a/packages/google-cloud-dataform/src/v1alpha2/dataform_client.ts b/packages/google-cloud-dataform/src/v1alpha2/dataform_client.ts index e596d503487..50e966a5278 100644 --- a/packages/google-cloud-dataform/src/v1alpha2/dataform_client.ts +++ b/packages/google-cloud-dataform/src/v1alpha2/dataform_client.ts @@ -501,7 +501,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getRepository(request, options, callback); @@ -604,7 +604,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createRepository(request, options, callback); @@ -704,7 +704,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'repository.name': request.repository!.name || '', + 'repository.name': request.repository!.name ?? '', }); this.initialize(); return this.innerApiCalls.updateRepository(request, options, callback); @@ -805,7 +805,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.deleteRepository(request, options, callback); @@ -902,7 +902,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.fetchRemoteBranches(request, options, callback); @@ -993,7 +993,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getWorkspace(request, options, callback); @@ -1090,7 +1090,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createWorkspace(request, options, callback); @@ -1181,7 +1181,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.deleteWorkspace(request, options, callback); @@ -1278,7 +1278,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - workspace: request.workspace || '', + workspace: request.workspace ?? '', }); this.initialize(); return this.innerApiCalls.installNpmPackages(request, options, callback); @@ -1375,7 +1375,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.pullGitCommits(request, options, callback); @@ -1469,7 +1469,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.pushGitCommits(request, options, callback); @@ -1566,7 +1566,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.fetchFileGitStatuses(request, options, callback); @@ -1667,7 +1667,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.fetchGitAheadBehind(request, options, callback); @@ -1771,7 +1771,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.commitWorkspaceChanges( @@ -1877,7 +1877,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.resetWorkspaceChanges(request, options, callback); @@ -1970,7 +1970,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - workspace: request.workspace || '', + workspace: request.workspace ?? '', }); this.initialize(); return this.innerApiCalls.fetchFileDiff(request, options, callback); @@ -2064,7 +2064,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - workspace: request.workspace || '', + workspace: request.workspace ?? '', }); this.initialize(); return this.innerApiCalls.makeDirectory(request, options, callback); @@ -2158,7 +2158,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - workspace: request.workspace || '', + workspace: request.workspace ?? '', }); this.initialize(); return this.innerApiCalls.removeDirectory(request, options, callback); @@ -2256,7 +2256,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - workspace: request.workspace || '', + workspace: request.workspace ?? '', }); this.initialize(); return this.innerApiCalls.moveDirectory(request, options, callback); @@ -2343,7 +2343,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - workspace: request.workspace || '', + workspace: request.workspace ?? '', }); this.initialize(); return this.innerApiCalls.readFile(request, options, callback); @@ -2436,7 +2436,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - workspace: request.workspace || '', + workspace: request.workspace ?? '', }); this.initialize(); return this.innerApiCalls.removeFile(request, options, callback); @@ -2525,7 +2525,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - workspace: request.workspace || '', + workspace: request.workspace ?? '', }); this.initialize(); return this.innerApiCalls.moveFile(request, options, callback); @@ -2620,7 +2620,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - workspace: request.workspace || '', + workspace: request.workspace ?? '', }); this.initialize(); return this.innerApiCalls.writeFile(request, options, callback); @@ -2717,7 +2717,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getCompilationResult(request, options, callback); @@ -2817,7 +2817,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createCompilationResult( @@ -2918,7 +2918,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getWorkflowInvocation(request, options, callback); @@ -3017,7 +3017,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createWorkflowInvocation( @@ -3118,7 +3118,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.deleteWorkflowInvocation( @@ -3219,7 +3219,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.cancelWorkflowInvocation( @@ -3335,7 +3335,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listRepositories(request, options, callback); @@ -3386,7 +3386,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listRepositories']; const callSettings = defaultCallSettings.merge(options); @@ -3446,7 +3446,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listRepositories']; const callSettings = defaultCallSettings.merge(options); @@ -3563,7 +3563,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listWorkspaces(request, options, callback); @@ -3614,7 +3614,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listWorkspaces']; const callSettings = defaultCallSettings.merge(options); @@ -3674,7 +3674,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listWorkspaces']; const callSettings = defaultCallSettings.merge(options); @@ -3788,7 +3788,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - workspace: request.workspace || '', + workspace: request.workspace ?? '', }); this.initialize(); return this.innerApiCalls.queryDirectoryContents( @@ -3840,7 +3840,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - workspace: request.workspace || '', + workspace: request.workspace ?? '', }); const defaultCallSettings = this._defaults['queryDirectoryContents']; const callSettings = defaultCallSettings.merge(options); @@ -3897,7 +3897,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - workspace: request.workspace || '', + workspace: request.workspace ?? '', }); const defaultCallSettings = this._defaults['queryDirectoryContents']; const callSettings = defaultCallSettings.merge(options); @@ -4008,7 +4008,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listCompilationResults( @@ -4057,7 +4057,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listCompilationResults']; const callSettings = defaultCallSettings.merge(options); @@ -4111,7 +4111,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listCompilationResults']; const callSettings = defaultCallSettings.merge(options); @@ -4225,7 +4225,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.queryCompilationResultActions( @@ -4277,7 +4277,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); const defaultCallSettings = this._defaults['queryCompilationResultActions']; const callSettings = defaultCallSettings.merge(options); @@ -4334,7 +4334,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); const defaultCallSettings = this._defaults['queryCompilationResultActions']; const callSettings = defaultCallSettings.merge(options); @@ -4445,7 +4445,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listWorkflowInvocations( @@ -4494,7 +4494,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listWorkflowInvocations']; const callSettings = defaultCallSettings.merge(options); @@ -4548,7 +4548,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listWorkflowInvocations']; const callSettings = defaultCallSettings.merge(options); @@ -4659,7 +4659,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.queryWorkflowInvocationActions( @@ -4708,7 +4708,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); const defaultCallSettings = this._defaults['queryWorkflowInvocationActions']; @@ -4763,7 +4763,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); const defaultCallSettings = this._defaults['queryWorkflowInvocationActions']; diff --git a/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts b/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts index 2565fe6bfb4..e56c38d72f1 100644 --- a/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts +++ b/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts @@ -501,7 +501,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getRepository(request, options, callback); @@ -598,7 +598,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createRepository(request, options, callback); @@ -692,7 +692,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'repository.name': request.repository!.name || '', + 'repository.name': request.repository!.name ?? '', }); this.initialize(); return this.innerApiCalls.updateRepository(request, options, callback); @@ -787,7 +787,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.deleteRepository(request, options, callback); @@ -884,7 +884,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.fetchRemoteBranches(request, options, callback); @@ -975,7 +975,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getWorkspace(request, options, callback); @@ -1072,7 +1072,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createWorkspace(request, options, callback); @@ -1163,7 +1163,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.deleteWorkspace(request, options, callback); @@ -1260,7 +1260,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - workspace: request.workspace || '', + workspace: request.workspace ?? '', }); this.initialize(); return this.innerApiCalls.installNpmPackages(request, options, callback); @@ -1357,7 +1357,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.pullGitCommits(request, options, callback); @@ -1451,7 +1451,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.pushGitCommits(request, options, callback); @@ -1548,7 +1548,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.fetchFileGitStatuses(request, options, callback); @@ -1649,7 +1649,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.fetchGitAheadBehind(request, options, callback); @@ -1753,7 +1753,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.commitWorkspaceChanges( @@ -1859,7 +1859,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.resetWorkspaceChanges(request, options, callback); @@ -1952,7 +1952,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - workspace: request.workspace || '', + workspace: request.workspace ?? '', }); this.initialize(); return this.innerApiCalls.fetchFileDiff(request, options, callback); @@ -2046,7 +2046,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - workspace: request.workspace || '', + workspace: request.workspace ?? '', }); this.initialize(); return this.innerApiCalls.makeDirectory(request, options, callback); @@ -2140,7 +2140,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - workspace: request.workspace || '', + workspace: request.workspace ?? '', }); this.initialize(); return this.innerApiCalls.removeDirectory(request, options, callback); @@ -2238,7 +2238,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - workspace: request.workspace || '', + workspace: request.workspace ?? '', }); this.initialize(); return this.innerApiCalls.moveDirectory(request, options, callback); @@ -2325,7 +2325,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - workspace: request.workspace || '', + workspace: request.workspace ?? '', }); this.initialize(); return this.innerApiCalls.readFile(request, options, callback); @@ -2418,7 +2418,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - workspace: request.workspace || '', + workspace: request.workspace ?? '', }); this.initialize(); return this.innerApiCalls.removeFile(request, options, callback); @@ -2507,7 +2507,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - workspace: request.workspace || '', + workspace: request.workspace ?? '', }); this.initialize(); return this.innerApiCalls.moveFile(request, options, callback); @@ -2596,7 +2596,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - workspace: request.workspace || '', + workspace: request.workspace ?? '', }); this.initialize(); return this.innerApiCalls.writeFile(request, options, callback); @@ -2693,7 +2693,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getCompilationResult(request, options, callback); @@ -2793,7 +2793,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createCompilationResult( @@ -2894,7 +2894,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getWorkflowInvocation(request, options, callback); @@ -2994,7 +2994,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createWorkflowInvocation( @@ -3095,7 +3095,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.deleteWorkflowInvocation( @@ -3196,7 +3196,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.cancelWorkflowInvocation( @@ -3312,7 +3312,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listRepositories(request, options, callback); @@ -3363,7 +3363,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listRepositories']; const callSettings = defaultCallSettings.merge(options); @@ -3423,7 +3423,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listRepositories']; const callSettings = defaultCallSettings.merge(options); @@ -3540,7 +3540,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listWorkspaces(request, options, callback); @@ -3591,7 +3591,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listWorkspaces']; const callSettings = defaultCallSettings.merge(options); @@ -3651,7 +3651,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listWorkspaces']; const callSettings = defaultCallSettings.merge(options); @@ -3765,7 +3765,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - workspace: request.workspace || '', + workspace: request.workspace ?? '', }); this.initialize(); return this.innerApiCalls.queryDirectoryContents( @@ -3817,7 +3817,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - workspace: request.workspace || '', + workspace: request.workspace ?? '', }); const defaultCallSettings = this._defaults['queryDirectoryContents']; const callSettings = defaultCallSettings.merge(options); @@ -3874,7 +3874,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - workspace: request.workspace || '', + workspace: request.workspace ?? '', }); const defaultCallSettings = this._defaults['queryDirectoryContents']; const callSettings = defaultCallSettings.merge(options); @@ -3985,7 +3985,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listCompilationResults( @@ -4034,7 +4034,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listCompilationResults']; const callSettings = defaultCallSettings.merge(options); @@ -4088,7 +4088,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listCompilationResults']; const callSettings = defaultCallSettings.merge(options); @@ -4202,7 +4202,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.queryCompilationResultActions( @@ -4254,7 +4254,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); const defaultCallSettings = this._defaults['queryCompilationResultActions']; const callSettings = defaultCallSettings.merge(options); @@ -4311,7 +4311,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); const defaultCallSettings = this._defaults['queryCompilationResultActions']; const callSettings = defaultCallSettings.merge(options); @@ -4422,7 +4422,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listWorkflowInvocations( @@ -4471,7 +4471,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listWorkflowInvocations']; const callSettings = defaultCallSettings.merge(options); @@ -4525,7 +4525,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listWorkflowInvocations']; const callSettings = defaultCallSettings.merge(options); @@ -4636,7 +4636,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.queryWorkflowInvocationActions( @@ -4685,7 +4685,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); const defaultCallSettings = this._defaults['queryWorkflowInvocationActions']; @@ -4740,7 +4740,7 @@ export class DataformClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); const defaultCallSettings = this._defaults['queryWorkflowInvocationActions']; diff --git a/packages/google-cloud-dataform/test/gapic_dataform_v1alpha2.ts b/packages/google-cloud-dataform/test/gapic_dataform_v1alpha2.ts index 69dbd9cd1e4..a92ac94ceb0 100644 --- a/packages/google-cloud-dataform/test/gapic_dataform_v1alpha2.ts +++ b/packages/google-cloud-dataform/test/gapic_dataform_v1alpha2.ts @@ -27,6 +27,21 @@ import {PassThrough} from 'stream'; import {protobuf, IamProtos, LocationProtos} from 'google-gax'; +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + function generateSampleMessage(instance: T) { const filledObject = ( instance.constructor as typeof protobuf.Message @@ -220,26 +235,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.GetRepositoryRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetRepositoryRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.Repository() ); client.innerApiCalls.getRepository = stubSimpleCall(expectedResponse); const [response] = await client.getRepository(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getRepository as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getRepository without error using callback', async () => { @@ -251,15 +265,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.GetRepositoryRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetRepositoryRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.Repository() ); @@ -282,11 +292,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getRepository as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getRepository with error', async () => { @@ -298,26 +311,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.GetRepositoryRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetRepositoryRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getRepository = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getRepository(request), expectedError); - assert( - (client.innerApiCalls.getRepository as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getRepository with closed client', async () => { @@ -329,7 +341,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.GetRepositoryRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetRepositoryRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getRepository(request), expectedError); @@ -346,26 +361,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CreateRepositoryRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateRepositoryRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.Repository() ); client.innerApiCalls.createRepository = stubSimpleCall(expectedResponse); const [response] = await client.createRepository(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createRepository as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createRepository without error using callback', async () => { @@ -377,15 +391,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CreateRepositoryRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateRepositoryRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.Repository() ); @@ -408,11 +418,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createRepository as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createRepository with error', async () => { @@ -424,26 +437,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CreateRepositoryRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateRepositoryRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createRepository = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.createRepository(request), expectedError); - assert( - (client.innerApiCalls.createRepository as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createRepository with closed client', async () => { @@ -455,7 +467,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CreateRepositoryRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue('CreateRepositoryRequest', [ + 'parent', + ]); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createRepository(request), expectedError); @@ -472,27 +487,27 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest() ); - request.repository = {}; - request.repository.name = ''; - const expectedHeaderRequestParams = 'repository.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.repository ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateRepositoryRequest', [ + 'repository', + 'name', + ]); + request.repository.name = defaultValue1; + const expectedHeaderRequestParams = `repository.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.Repository() ); client.innerApiCalls.updateRepository = stubSimpleCall(expectedResponse); const [response] = await client.updateRepository(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateRepository as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateRepository without error using callback', async () => { @@ -504,16 +519,13 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest() ); - request.repository = {}; - request.repository.name = ''; - const expectedHeaderRequestParams = 'repository.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.repository ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateRepositoryRequest', [ + 'repository', + 'name', + ]); + request.repository.name = defaultValue1; + const expectedHeaderRequestParams = `repository.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.Repository() ); @@ -536,11 +548,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateRepository as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateRepository with error', async () => { @@ -552,27 +567,27 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest() ); - request.repository = {}; - request.repository.name = ''; - const expectedHeaderRequestParams = 'repository.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.repository ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateRepositoryRequest', [ + 'repository', + 'name', + ]); + request.repository.name = defaultValue1; + const expectedHeaderRequestParams = `repository.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateRepository = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.updateRepository(request), expectedError); - assert( - (client.innerApiCalls.updateRepository as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateRepository with closed client', async () => { @@ -584,8 +599,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest() ); - request.repository = {}; - request.repository.name = ''; + request.repository ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateRepositoryRequest', [ + 'repository', + 'name', + ]); + request.repository.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateRepository(request), expectedError); @@ -602,26 +621,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteRepositoryRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.deleteRepository = stubSimpleCall(expectedResponse); const [response] = await client.deleteRepository(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteRepository as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteRepository without error using callback', async () => { @@ -633,15 +651,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteRepositoryRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -664,11 +678,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteRepository as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteRepository with error', async () => { @@ -680,26 +697,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteRepositoryRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteRepository = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.deleteRepository(request), expectedError); - assert( - (client.innerApiCalls.deleteRepository as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteRepository with closed client', async () => { @@ -711,7 +727,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('DeleteRepositoryRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteRepository(request), expectedError); @@ -728,15 +747,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('FetchRemoteBranchesRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse() ); @@ -744,11 +759,14 @@ describe('v1alpha2.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.fetchRemoteBranches(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.fetchRemoteBranches as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.fetchRemoteBranches as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchRemoteBranches as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchRemoteBranches without error using callback', async () => { @@ -760,15 +778,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('FetchRemoteBranchesRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse() ); @@ -791,11 +805,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.fetchRemoteBranches as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.fetchRemoteBranches as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchRemoteBranches as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchRemoteBranches with error', async () => { @@ -807,26 +824,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('FetchRemoteBranchesRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.fetchRemoteBranches = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.fetchRemoteBranches(request), expectedError); - assert( - (client.innerApiCalls.fetchRemoteBranches as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.fetchRemoteBranches as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchRemoteBranches as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchRemoteBranches with closed client', async () => { @@ -838,7 +854,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('FetchRemoteBranchesRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.fetchRemoteBranches(request), expectedError); @@ -855,26 +874,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.GetWorkspaceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetWorkspaceRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.Workspace() ); client.innerApiCalls.getWorkspace = stubSimpleCall(expectedResponse); const [response] = await client.getWorkspace(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getWorkspace as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getWorkspace without error using callback', async () => { @@ -886,15 +904,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.GetWorkspaceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetWorkspaceRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.Workspace() ); @@ -917,11 +931,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getWorkspace as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getWorkspace with error', async () => { @@ -933,26 +950,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.GetWorkspaceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetWorkspaceRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getWorkspace = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getWorkspace(request), expectedError); - assert( - (client.innerApiCalls.getWorkspace as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getWorkspace with closed client', async () => { @@ -964,7 +980,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.GetWorkspaceRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetWorkspaceRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getWorkspace(request), expectedError); @@ -981,26 +1000,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateWorkspaceRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.Workspace() ); client.innerApiCalls.createWorkspace = stubSimpleCall(expectedResponse); const [response] = await client.createWorkspace(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createWorkspace as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createWorkspace without error using callback', async () => { @@ -1012,15 +1030,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateWorkspaceRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.Workspace() ); @@ -1043,11 +1057,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createWorkspace as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createWorkspace with error', async () => { @@ -1059,26 +1076,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateWorkspaceRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createWorkspace = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.createWorkspace(request), expectedError); - assert( - (client.innerApiCalls.createWorkspace as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createWorkspace with closed client', async () => { @@ -1090,7 +1106,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue('CreateWorkspaceRequest', [ + 'parent', + ]); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createWorkspace(request), expectedError); @@ -1107,26 +1126,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteWorkspaceRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.deleteWorkspace = stubSimpleCall(expectedResponse); const [response] = await client.deleteWorkspace(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteWorkspace as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteWorkspace without error using callback', async () => { @@ -1138,15 +1156,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteWorkspaceRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -1169,11 +1183,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteWorkspace as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteWorkspace with error', async () => { @@ -1185,26 +1202,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteWorkspaceRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteWorkspace = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.deleteWorkspace(request), expectedError); - assert( - (client.innerApiCalls.deleteWorkspace as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteWorkspace with closed client', async () => { @@ -1216,7 +1232,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('DeleteWorkspaceRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteWorkspace(request), expectedError); @@ -1233,15 +1252,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('InstallNpmPackagesRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse() ); @@ -1249,11 +1264,14 @@ describe('v1alpha2.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.installNpmPackages(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.installNpmPackages as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.installNpmPackages as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.installNpmPackages as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes installNpmPackages without error using callback', async () => { @@ -1265,15 +1283,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('InstallNpmPackagesRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse() ); @@ -1296,11 +1310,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.installNpmPackages as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.installNpmPackages as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.installNpmPackages as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes installNpmPackages with error', async () => { @@ -1312,26 +1329,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('InstallNpmPackagesRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.installNpmPackages = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.installNpmPackages(request), expectedError); - assert( - (client.innerApiCalls.installNpmPackages as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.installNpmPackages as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.installNpmPackages as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes installNpmPackages with closed client', async () => { @@ -1343,7 +1359,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest() ); - request.workspace = ''; + const defaultValue1 = getTypeDefaultValue('InstallNpmPackagesRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.installNpmPackages(request), expectedError); @@ -1360,26 +1379,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.PullGitCommitsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('PullGitCommitsRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.pullGitCommits = stubSimpleCall(expectedResponse); const [response] = await client.pullGitCommits(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.pullGitCommits as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.pullGitCommits as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pullGitCommits as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes pullGitCommits without error using callback', async () => { @@ -1391,15 +1409,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.PullGitCommitsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('PullGitCommitsRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -1422,11 +1436,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.pullGitCommits as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.pullGitCommits as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pullGitCommits as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes pullGitCommits with error', async () => { @@ -1438,26 +1455,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.PullGitCommitsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('PullGitCommitsRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.pullGitCommits = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.pullGitCommits(request), expectedError); - assert( - (client.innerApiCalls.pullGitCommits as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.pullGitCommits as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pullGitCommits as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes pullGitCommits with closed client', async () => { @@ -1469,7 +1485,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.PullGitCommitsRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('PullGitCommitsRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.pullGitCommits(request), expectedError); @@ -1486,26 +1505,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.PushGitCommitsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('PushGitCommitsRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.pushGitCommits = stubSimpleCall(expectedResponse); const [response] = await client.pushGitCommits(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.pushGitCommits as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.pushGitCommits as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pushGitCommits as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes pushGitCommits without error using callback', async () => { @@ -1517,15 +1535,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.PushGitCommitsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('PushGitCommitsRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -1548,11 +1562,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.pushGitCommits as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.pushGitCommits as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pushGitCommits as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes pushGitCommits with error', async () => { @@ -1564,26 +1581,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.PushGitCommitsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('PushGitCommitsRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.pushGitCommits = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.pushGitCommits(request), expectedError); - assert( - (client.innerApiCalls.pushGitCommits as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.pushGitCommits as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pushGitCommits as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes pushGitCommits with closed client', async () => { @@ -1595,7 +1611,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.PushGitCommitsRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('PushGitCommitsRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.pushGitCommits(request), expectedError); @@ -1612,15 +1631,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('FetchFileGitStatusesRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse() ); @@ -1628,11 +1643,14 @@ describe('v1alpha2.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.fetchFileGitStatuses(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.fetchFileGitStatuses as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.fetchFileGitStatuses as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchFileGitStatuses as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchFileGitStatuses without error using callback', async () => { @@ -1644,15 +1662,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('FetchFileGitStatusesRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse() ); @@ -1675,11 +1689,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.fetchFileGitStatuses as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.fetchFileGitStatuses as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchFileGitStatuses as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchFileGitStatuses with error', async () => { @@ -1691,26 +1708,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('FetchFileGitStatusesRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.fetchFileGitStatuses = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.fetchFileGitStatuses(request), expectedError); - assert( - (client.innerApiCalls.fetchFileGitStatuses as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.fetchFileGitStatuses as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchFileGitStatuses as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchFileGitStatuses with closed client', async () => { @@ -1722,7 +1738,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('FetchFileGitStatusesRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.fetchFileGitStatuses(request), expectedError); @@ -1739,15 +1758,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('FetchGitAheadBehindRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse() ); @@ -1755,11 +1770,14 @@ describe('v1alpha2.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.fetchGitAheadBehind(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.fetchGitAheadBehind as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.fetchGitAheadBehind as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchGitAheadBehind as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchGitAheadBehind without error using callback', async () => { @@ -1771,15 +1789,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('FetchGitAheadBehindRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse() ); @@ -1802,11 +1816,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.fetchGitAheadBehind as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.fetchGitAheadBehind as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchGitAheadBehind as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchGitAheadBehind with error', async () => { @@ -1818,26 +1835,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('FetchGitAheadBehindRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.fetchGitAheadBehind = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.fetchGitAheadBehind(request), expectedError); - assert( - (client.innerApiCalls.fetchGitAheadBehind as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.fetchGitAheadBehind as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchGitAheadBehind as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchGitAheadBehind with closed client', async () => { @@ -1849,7 +1865,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('FetchGitAheadBehindRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.fetchGitAheadBehind(request), expectedError); @@ -1866,15 +1885,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CommitWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -1882,11 +1898,14 @@ describe('v1alpha2.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.commitWorkspaceChanges(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.commitWorkspaceChanges as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.commitWorkspaceChanges as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.commitWorkspaceChanges as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes commitWorkspaceChanges without error using callback', async () => { @@ -1898,15 +1917,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CommitWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -1929,11 +1945,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.commitWorkspaceChanges as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.commitWorkspaceChanges as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.commitWorkspaceChanges as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes commitWorkspaceChanges with error', async () => { @@ -1945,15 +1964,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CommitWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.commitWorkspaceChanges = stubSimpleCall( undefined, @@ -1963,11 +1979,14 @@ describe('v1alpha2.DataformClient', () => { client.commitWorkspaceChanges(request), expectedError ); - assert( - (client.innerApiCalls.commitWorkspaceChanges as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.commitWorkspaceChanges as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.commitWorkspaceChanges as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes commitWorkspaceChanges with closed client', async () => { @@ -1979,7 +1998,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + 'CommitWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -1999,15 +2022,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ResetWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -2015,11 +2035,14 @@ describe('v1alpha2.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.resetWorkspaceChanges(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.resetWorkspaceChanges as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.resetWorkspaceChanges as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.resetWorkspaceChanges as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes resetWorkspaceChanges without error using callback', async () => { @@ -2031,15 +2054,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ResetWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -2062,11 +2082,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.resetWorkspaceChanges as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.resetWorkspaceChanges as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.resetWorkspaceChanges as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes resetWorkspaceChanges with error', async () => { @@ -2078,15 +2101,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ResetWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.resetWorkspaceChanges = stubSimpleCall( undefined, @@ -2096,11 +2116,14 @@ describe('v1alpha2.DataformClient', () => { client.resetWorkspaceChanges(request), expectedError ); - assert( - (client.innerApiCalls.resetWorkspaceChanges as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.resetWorkspaceChanges as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.resetWorkspaceChanges as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes resetWorkspaceChanges with closed client', async () => { @@ -2112,7 +2135,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + 'ResetWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -2132,26 +2159,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchFileDiffRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('FetchFileDiffRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchFileDiffResponse() ); client.innerApiCalls.fetchFileDiff = stubSimpleCall(expectedResponse); const [response] = await client.fetchFileDiff(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.fetchFileDiff as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.fetchFileDiff as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchFileDiff as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchFileDiff without error using callback', async () => { @@ -2163,15 +2189,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchFileDiffRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('FetchFileDiffRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchFileDiffResponse() ); @@ -2194,11 +2216,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.fetchFileDiff as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.fetchFileDiff as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchFileDiff as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchFileDiff with error', async () => { @@ -2210,26 +2235,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchFileDiffRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('FetchFileDiffRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.fetchFileDiff = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.fetchFileDiff(request), expectedError); - assert( - (client.innerApiCalls.fetchFileDiff as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.fetchFileDiff as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchFileDiff as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchFileDiff with closed client', async () => { @@ -2241,7 +2265,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchFileDiffRequest() ); - request.workspace = ''; + const defaultValue1 = getTypeDefaultValue('FetchFileDiffRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.fetchFileDiff(request), expectedError); @@ -2258,26 +2285,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MakeDirectoryRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('MakeDirectoryRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MakeDirectoryResponse() ); client.innerApiCalls.makeDirectory = stubSimpleCall(expectedResponse); const [response] = await client.makeDirectory(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.makeDirectory as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.makeDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.makeDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes makeDirectory without error using callback', async () => { @@ -2289,15 +2315,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MakeDirectoryRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('MakeDirectoryRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MakeDirectoryResponse() ); @@ -2320,11 +2342,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.makeDirectory as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.makeDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.makeDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes makeDirectory with error', async () => { @@ -2336,26 +2361,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MakeDirectoryRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('MakeDirectoryRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.makeDirectory = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.makeDirectory(request), expectedError); - assert( - (client.innerApiCalls.makeDirectory as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.makeDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.makeDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes makeDirectory with closed client', async () => { @@ -2367,7 +2391,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MakeDirectoryRequest() ); - request.workspace = ''; + const defaultValue1 = getTypeDefaultValue('MakeDirectoryRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.makeDirectory(request), expectedError); @@ -2384,26 +2411,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RemoveDirectoryRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.removeDirectory = stubSimpleCall(expectedResponse); const [response] = await client.removeDirectory(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.removeDirectory as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.removeDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes removeDirectory without error using callback', async () => { @@ -2415,15 +2441,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RemoveDirectoryRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -2446,11 +2468,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.removeDirectory as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.removeDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes removeDirectory with error', async () => { @@ -2462,26 +2487,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RemoveDirectoryRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.removeDirectory = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.removeDirectory(request), expectedError); - assert( - (client.innerApiCalls.removeDirectory as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.removeDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes removeDirectory with closed client', async () => { @@ -2493,7 +2517,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest() ); - request.workspace = ''; + const defaultValue1 = getTypeDefaultValue('RemoveDirectoryRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.removeDirectory(request), expectedError); @@ -2510,26 +2537,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MoveDirectoryRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('MoveDirectoryRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MoveDirectoryResponse() ); client.innerApiCalls.moveDirectory = stubSimpleCall(expectedResponse); const [response] = await client.moveDirectory(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.moveDirectory as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.moveDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.moveDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes moveDirectory without error using callback', async () => { @@ -2541,15 +2567,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MoveDirectoryRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('MoveDirectoryRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MoveDirectoryResponse() ); @@ -2572,11 +2594,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.moveDirectory as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.moveDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.moveDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes moveDirectory with error', async () => { @@ -2588,26 +2613,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MoveDirectoryRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('MoveDirectoryRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.moveDirectory = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.moveDirectory(request), expectedError); - assert( - (client.innerApiCalls.moveDirectory as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.moveDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.moveDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes moveDirectory with closed client', async () => { @@ -2619,7 +2643,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MoveDirectoryRequest() ); - request.workspace = ''; + const defaultValue1 = getTypeDefaultValue('MoveDirectoryRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.moveDirectory(request), expectedError); @@ -2636,26 +2663,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ReadFileRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ReadFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ReadFileResponse() ); client.innerApiCalls.readFile = stubSimpleCall(expectedResponse); const [response] = await client.readFile(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.readFile as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.readFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes readFile without error using callback', async () => { @@ -2667,15 +2693,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ReadFileRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ReadFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ReadFileResponse() ); @@ -2698,11 +2720,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.readFile as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.readFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes readFile with error', async () => { @@ -2711,26 +2736,25 @@ describe('v1alpha2.DataformClient', () => { projectId: 'bogus', }); client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataform.v1alpha2.ReadFileRequest() - ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.ReadFileRequest() + ); + const defaultValue1 = getTypeDefaultValue('ReadFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.readFile = stubSimpleCall(undefined, expectedError); await assert.rejects(client.readFile(request), expectedError); - assert( - (client.innerApiCalls.readFile as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.readFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes readFile with closed client', async () => { @@ -2742,7 +2766,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ReadFileRequest() ); - request.workspace = ''; + const defaultValue1 = getTypeDefaultValue('ReadFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.readFile(request), expectedError); @@ -2759,26 +2786,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.RemoveFileRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RemoveFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.removeFile = stubSimpleCall(expectedResponse); const [response] = await client.removeFile(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.removeFile as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.removeFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes removeFile without error using callback', async () => { @@ -2790,15 +2816,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.RemoveFileRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RemoveFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -2821,11 +2843,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.removeFile as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.removeFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes removeFile with error', async () => { @@ -2837,26 +2862,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.RemoveFileRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RemoveFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.removeFile = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.removeFile(request), expectedError); - assert( - (client.innerApiCalls.removeFile as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.removeFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes removeFile with closed client', async () => { @@ -2868,7 +2892,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.RemoveFileRequest() ); - request.workspace = ''; + const defaultValue1 = getTypeDefaultValue('RemoveFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.removeFile(request), expectedError); @@ -2885,26 +2912,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MoveFileRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('MoveFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MoveFileResponse() ); client.innerApiCalls.moveFile = stubSimpleCall(expectedResponse); const [response] = await client.moveFile(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.moveFile as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.moveFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.moveFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes moveFile without error using callback', async () => { @@ -2916,15 +2942,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MoveFileRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('MoveFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MoveFileResponse() ); @@ -2947,11 +2969,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.moveFile as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.moveFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.moveFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes moveFile with error', async () => { @@ -2963,23 +2988,22 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MoveFileRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('MoveFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.moveFile = stubSimpleCall(undefined, expectedError); await assert.rejects(client.moveFile(request), expectedError); - assert( - (client.innerApiCalls.moveFile as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.moveFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.moveFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes moveFile with closed client', async () => { @@ -2991,7 +3015,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MoveFileRequest() ); - request.workspace = ''; + const defaultValue1 = getTypeDefaultValue('MoveFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.moveFile(request), expectedError); @@ -3008,26 +3035,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.WriteFileRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('WriteFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.WriteFileResponse() ); client.innerApiCalls.writeFile = stubSimpleCall(expectedResponse); const [response] = await client.writeFile(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.writeFile as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.writeFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.writeFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes writeFile without error using callback', async () => { @@ -3039,15 +3065,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.WriteFileRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('WriteFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.WriteFileResponse() ); @@ -3070,11 +3092,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.writeFile as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.writeFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.writeFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes writeFile with error', async () => { @@ -3086,23 +3111,22 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.WriteFileRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('WriteFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.writeFile = stubSimpleCall(undefined, expectedError); await assert.rejects(client.writeFile(request), expectedError); - assert( - (client.innerApiCalls.writeFile as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.writeFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.writeFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes writeFile with closed client', async () => { @@ -3114,7 +3138,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.WriteFileRequest() ); - request.workspace = ''; + const defaultValue1 = getTypeDefaultValue('WriteFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.writeFile(request), expectedError); @@ -3131,15 +3158,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.GetCompilationResultRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetCompilationResultRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CompilationResult() ); @@ -3147,11 +3170,14 @@ describe('v1alpha2.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.getCompilationResult(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getCompilationResult as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getCompilationResult as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCompilationResult as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCompilationResult without error using callback', async () => { @@ -3163,15 +3189,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.GetCompilationResultRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetCompilationResultRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CompilationResult() ); @@ -3194,11 +3216,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getCompilationResult as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getCompilationResult as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCompilationResult as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCompilationResult with error', async () => { @@ -3210,26 +3235,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.GetCompilationResultRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetCompilationResultRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getCompilationResult = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getCompilationResult(request), expectedError); - assert( - (client.innerApiCalls.getCompilationResult as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getCompilationResult as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCompilationResult as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCompilationResult with closed client', async () => { @@ -3241,7 +3265,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.GetCompilationResultRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetCompilationResultRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getCompilationResult(request), expectedError); @@ -3258,15 +3285,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateCompilationResultRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CompilationResult() ); @@ -3274,11 +3298,14 @@ describe('v1alpha2.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.createCompilationResult(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createCompilationResult as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createCompilationResult as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCompilationResult as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createCompilationResult without error using callback', async () => { @@ -3290,15 +3317,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateCompilationResultRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CompilationResult() ); @@ -3321,11 +3345,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createCompilationResult as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createCompilationResult as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCompilationResult as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createCompilationResult with error', async () => { @@ -3337,15 +3364,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateCompilationResultRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createCompilationResult = stubSimpleCall( undefined, @@ -3355,11 +3379,14 @@ describe('v1alpha2.DataformClient', () => { client.createCompilationResult(request), expectedError ); - assert( - (client.innerApiCalls.createCompilationResult as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createCompilationResult as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCompilationResult as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createCompilationResult with closed client', async () => { @@ -3371,7 +3398,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue( + 'CreateCompilationResultRequest', + ['parent'] + ); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -3391,15 +3422,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() ); @@ -3407,11 +3435,14 @@ describe('v1alpha2.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.getWorkflowInvocation(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getWorkflowInvocation as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getWorkflowInvocation without error using callback', async () => { @@ -3423,15 +3454,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() ); @@ -3454,11 +3482,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getWorkflowInvocation as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getWorkflowInvocation with error', async () => { @@ -3470,15 +3501,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getWorkflowInvocation = stubSimpleCall( undefined, @@ -3488,11 +3516,14 @@ describe('v1alpha2.DataformClient', () => { client.getWorkflowInvocation(request), expectedError ); - assert( - (client.innerApiCalls.getWorkflowInvocation as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getWorkflowInvocation with closed client', async () => { @@ -3504,7 +3535,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + 'GetWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -3524,15 +3559,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateWorkflowInvocationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() ); @@ -3540,11 +3572,14 @@ describe('v1alpha2.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.createWorkflowInvocation(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createWorkflowInvocation as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createWorkflowInvocation without error using callback', async () => { @@ -3556,15 +3591,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateWorkflowInvocationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() ); @@ -3587,31 +3619,31 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createWorkflowInvocation as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createWorkflowInvocation with error', async () => { const client = new dataformModule.v1alpha2.DataformClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + 'CreateWorkflowInvocationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createWorkflowInvocation = stubSimpleCall( undefined, @@ -3621,11 +3653,14 @@ describe('v1alpha2.DataformClient', () => { client.createWorkflowInvocation(request), expectedError ); - assert( - (client.innerApiCalls.createWorkflowInvocation as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createWorkflowInvocation with closed client', async () => { @@ -3637,7 +3672,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue( + 'CreateWorkflowInvocationRequest', + ['parent'] + ); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -3657,15 +3696,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DeleteWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -3673,11 +3709,14 @@ describe('v1alpha2.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.deleteWorkflowInvocation(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteWorkflowInvocation as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteWorkflowInvocation without error using callback', async () => { @@ -3689,15 +3728,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DeleteWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -3720,11 +3756,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteWorkflowInvocation as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteWorkflowInvocation with error', async () => { @@ -3736,15 +3775,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DeleteWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteWorkflowInvocation = stubSimpleCall( undefined, @@ -3754,11 +3790,14 @@ describe('v1alpha2.DataformClient', () => { client.deleteWorkflowInvocation(request), expectedError ); - assert( - (client.innerApiCalls.deleteWorkflowInvocation as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteWorkflowInvocation with closed client', async () => { @@ -3770,7 +3809,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + 'DeleteWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -3790,15 +3833,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CancelWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -3806,11 +3846,14 @@ describe('v1alpha2.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.cancelWorkflowInvocation(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.cancelWorkflowInvocation as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.cancelWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes cancelWorkflowInvocation without error using callback', async () => { @@ -3822,15 +3865,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CancelWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -3853,11 +3893,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.cancelWorkflowInvocation as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.cancelWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes cancelWorkflowInvocation with error', async () => { @@ -3869,15 +3912,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CancelWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.cancelWorkflowInvocation = stubSimpleCall( undefined, @@ -3887,11 +3927,14 @@ describe('v1alpha2.DataformClient', () => { client.cancelWorkflowInvocation(request), expectedError ); - assert( - (client.innerApiCalls.cancelWorkflowInvocation as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.cancelWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes cancelWorkflowInvocation with closed client', async () => { @@ -3903,7 +3946,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + 'CancelWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -3923,15 +3970,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListRepositoriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListRepositoriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.Repository() @@ -3946,11 +3989,14 @@ describe('v1alpha2.DataformClient', () => { client.innerApiCalls.listRepositories = stubSimpleCall(expectedResponse); const [response] = await client.listRepositories(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listRepositories as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listRepositories without error using callback', async () => { @@ -3962,15 +4008,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListRepositoriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListRepositoriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.Repository() @@ -4001,11 +4043,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listRepositories as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listRepositories with error', async () => { @@ -4017,26 +4062,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListRepositoriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListRepositoriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listRepositories = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listRepositories(request), expectedError); - assert( - (client.innerApiCalls.listRepositories as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listRepositoriesStream without error', async () => { @@ -4048,8 +4092,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListRepositoriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListRepositoriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.Repository() @@ -4087,11 +4134,12 @@ describe('v1alpha2.DataformClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listRepositories, request) ); - assert.strictEqual( - ( - client.descriptors.page.listRepositories.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listRepositories.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4104,8 +4152,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListRepositoriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListRepositoriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listRepositories.createStream = stubPageStreamingCall(undefined, expectedError); @@ -4132,11 +4183,12 @@ describe('v1alpha2.DataformClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listRepositories, request) ); - assert.strictEqual( - ( - client.descriptors.page.listRepositories.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listRepositories.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4149,8 +4201,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListRepositoriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListRepositoriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.Repository() @@ -4176,11 +4231,12 @@ describe('v1alpha2.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listRepositories.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listRepositories.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4193,8 +4249,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListRepositoriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListRepositoriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listRepositories.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -4212,11 +4271,12 @@ describe('v1alpha2.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listRepositories.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listRepositories.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -4231,15 +4291,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListWorkspacesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListWorkspacesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.Workspace() @@ -4254,11 +4310,14 @@ describe('v1alpha2.DataformClient', () => { client.innerApiCalls.listWorkspaces = stubSimpleCall(expectedResponse); const [response] = await client.listWorkspaces(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listWorkspaces as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listWorkspaces as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkspaces as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listWorkspaces without error using callback', async () => { @@ -4270,15 +4329,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListWorkspacesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListWorkspacesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.Workspace() @@ -4309,11 +4364,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listWorkspaces as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listWorkspaces as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkspaces as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listWorkspaces with error', async () => { @@ -4325,26 +4383,25 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListWorkspacesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListWorkspacesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listWorkspaces = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listWorkspaces(request), expectedError); - assert( - (client.innerApiCalls.listWorkspaces as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listWorkspaces as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkspaces as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listWorkspacesStream without error', async () => { @@ -4356,8 +4413,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListWorkspacesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListWorkspacesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.Workspace() @@ -4394,11 +4454,12 @@ describe('v1alpha2.DataformClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listWorkspaces, request) ); - assert.strictEqual( - ( - client.descriptors.page.listWorkspaces.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listWorkspaces.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4411,8 +4472,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListWorkspacesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListWorkspacesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listWorkspaces.createStream = stubPageStreamingCall(undefined, expectedError); @@ -4438,11 +4502,12 @@ describe('v1alpha2.DataformClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listWorkspaces, request) ); - assert.strictEqual( - ( - client.descriptors.page.listWorkspaces.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listWorkspaces.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4455,8 +4520,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListWorkspacesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListWorkspacesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.Workspace() @@ -4482,11 +4550,12 @@ describe('v1alpha2.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listWorkspaces.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listWorkspaces.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4499,8 +4568,11 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListWorkspacesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListWorkspacesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listWorkspaces.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -4518,11 +4590,12 @@ describe('v1alpha2.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listWorkspaces.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listWorkspaces.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -4537,15 +4610,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'QueryDirectoryContentsRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry() @@ -4561,11 +4631,14 @@ describe('v1alpha2.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.queryDirectoryContents(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.queryDirectoryContents as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.queryDirectoryContents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryDirectoryContents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes queryDirectoryContents without error using callback', async () => { @@ -4577,15 +4650,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'QueryDirectoryContentsRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry() @@ -4618,11 +4688,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.queryDirectoryContents as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.queryDirectoryContents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryDirectoryContents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes queryDirectoryContents with error', async () => { @@ -4634,15 +4707,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'QueryDirectoryContentsRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.queryDirectoryContents = stubSimpleCall( undefined, @@ -4652,11 +4722,14 @@ describe('v1alpha2.DataformClient', () => { client.queryDirectoryContents(request), expectedError ); - assert( - (client.innerApiCalls.queryDirectoryContents as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.queryDirectoryContents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryDirectoryContents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes queryDirectoryContentsStream without error', async () => { @@ -4668,8 +4741,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; + const defaultValue1 = getTypeDefaultValue( + 'QueryDirectoryContentsRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry() @@ -4712,12 +4789,15 @@ describe('v1alpha2.DataformClient', () => { .getCall(0) .calledWith(client.innerApiCalls.queryDirectoryContents, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.queryDirectoryContents .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4730,8 +4810,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; + const defaultValue1 = getTypeDefaultValue( + 'QueryDirectoryContentsRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.queryDirectoryContents.createStream = stubPageStreamingCall(undefined, expectedError); @@ -4763,12 +4847,15 @@ describe('v1alpha2.DataformClient', () => { .getCall(0) .calledWith(client.innerApiCalls.queryDirectoryContents, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.queryDirectoryContents .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4781,8 +4868,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; + const defaultValue1 = getTypeDefaultValue( + 'QueryDirectoryContentsRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry() @@ -4810,12 +4901,15 @@ describe('v1alpha2.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.queryDirectoryContents .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4828,8 +4922,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; + const defaultValue1 = getTypeDefaultValue( + 'QueryDirectoryContentsRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.queryDirectoryContents.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -4848,12 +4946,15 @@ describe('v1alpha2.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.queryDirectoryContents .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -4868,15 +4969,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListCompilationResultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CompilationResult() @@ -4892,11 +4990,14 @@ describe('v1alpha2.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.listCompilationResults(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listCompilationResults as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listCompilationResults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCompilationResults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCompilationResults without error using callback', async () => { @@ -4908,15 +5009,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListCompilationResultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CompilationResult() @@ -4949,11 +5047,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listCompilationResults as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listCompilationResults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCompilationResults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCompilationResults with error', async () => { @@ -4965,15 +5066,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListCompilationResultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listCompilationResults = stubSimpleCall( undefined, @@ -4983,11 +5081,14 @@ describe('v1alpha2.DataformClient', () => { client.listCompilationResults(request), expectedError ); - assert( - (client.innerApiCalls.listCompilationResults as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listCompilationResults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCompilationResults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCompilationResultsStream without error', async () => { @@ -4999,8 +5100,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListCompilationResultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CompilationResult() @@ -5043,12 +5148,15 @@ describe('v1alpha2.DataformClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listCompilationResults, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.listCompilationResults .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5061,8 +5169,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListCompilationResultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listCompilationResults.createStream = stubPageStreamingCall(undefined, expectedError); @@ -5094,12 +5206,15 @@ describe('v1alpha2.DataformClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listCompilationResults, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.listCompilationResults .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5112,8 +5227,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListCompilationResultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CompilationResult() @@ -5141,12 +5260,15 @@ describe('v1alpha2.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listCompilationResults .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5159,8 +5281,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListCompilationResultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listCompilationResults.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -5179,12 +5305,15 @@ describe('v1alpha2.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listCompilationResults .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -5199,15 +5328,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'QueryCompilationResultActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CompilationResultAction() @@ -5223,11 +5349,14 @@ describe('v1alpha2.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.queryCompilationResultActions(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.queryCompilationResultActions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.queryCompilationResultActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryCompilationResultActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes queryCompilationResultActions without error using callback', async () => { @@ -5239,15 +5368,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'QueryCompilationResultActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CompilationResultAction() @@ -5280,11 +5406,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.queryCompilationResultActions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.queryCompilationResultActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryCompilationResultActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes queryCompilationResultActions with error', async () => { @@ -5296,15 +5425,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'QueryCompilationResultActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.queryCompilationResultActions = stubSimpleCall( undefined, @@ -5314,11 +5440,14 @@ describe('v1alpha2.DataformClient', () => { client.queryCompilationResultActions(request), expectedError ); - assert( - (client.innerApiCalls.queryCompilationResultActions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.queryCompilationResultActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryCompilationResultActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes queryCompilationResultActionsStream without error', async () => { @@ -5330,8 +5459,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + 'QueryCompilationResultActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CompilationResultAction() @@ -5377,12 +5510,15 @@ describe('v1alpha2.DataformClient', () => { request ) ); - assert.strictEqual( + assert( ( client.descriptors.page.queryCompilationResultActions .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5395,8 +5531,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + 'QueryCompilationResultActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.queryCompilationResultActions.createStream = stubPageStreamingCall(undefined, expectedError); @@ -5431,12 +5571,15 @@ describe('v1alpha2.DataformClient', () => { request ) ); - assert.strictEqual( + assert( ( client.descriptors.page.queryCompilationResultActions .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5449,8 +5592,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + 'QueryCompilationResultActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CompilationResultAction() @@ -5478,12 +5625,15 @@ describe('v1alpha2.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.queryCompilationResultActions .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5496,8 +5646,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + 'QueryCompilationResultActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.queryCompilationResultActions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -5516,12 +5670,15 @@ describe('v1alpha2.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.queryCompilationResultActions .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -5536,15 +5693,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListWorkflowInvocationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() @@ -5560,11 +5714,14 @@ describe('v1alpha2.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.listWorkflowInvocations(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listWorkflowInvocations as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listWorkflowInvocations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkflowInvocations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listWorkflowInvocations without error using callback', async () => { @@ -5576,15 +5733,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListWorkflowInvocationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() @@ -5617,11 +5771,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listWorkflowInvocations as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listWorkflowInvocations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkflowInvocations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listWorkflowInvocations with error', async () => { @@ -5633,15 +5790,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListWorkflowInvocationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listWorkflowInvocations = stubSimpleCall( undefined, @@ -5651,11 +5805,14 @@ describe('v1alpha2.DataformClient', () => { client.listWorkflowInvocations(request), expectedError ); - assert( - (client.innerApiCalls.listWorkflowInvocations as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listWorkflowInvocations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkflowInvocations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listWorkflowInvocationsStream without error', async () => { @@ -5667,8 +5824,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListWorkflowInvocationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() @@ -5711,12 +5872,15 @@ describe('v1alpha2.DataformClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listWorkflowInvocations, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.listWorkflowInvocations .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5729,8 +5893,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListWorkflowInvocationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listWorkflowInvocations.createStream = stubPageStreamingCall(undefined, expectedError); @@ -5762,12 +5930,15 @@ describe('v1alpha2.DataformClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listWorkflowInvocations, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.listWorkflowInvocations .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5780,8 +5951,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListWorkflowInvocationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.WorkflowInvocation() @@ -5809,12 +5984,15 @@ describe('v1alpha2.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listWorkflowInvocations .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5827,8 +6005,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListWorkflowInvocationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listWorkflowInvocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -5847,12 +6029,15 @@ describe('v1alpha2.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listWorkflowInvocations .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -5867,15 +6052,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'QueryWorkflowInvocationActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction() @@ -5891,11 +6073,14 @@ describe('v1alpha2.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.queryWorkflowInvocationActions(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.queryWorkflowInvocationActions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.queryWorkflowInvocationActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryWorkflowInvocationActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes queryWorkflowInvocationActions without error using callback', async () => { @@ -5907,15 +6092,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'QueryWorkflowInvocationActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction() @@ -5948,11 +6130,14 @@ describe('v1alpha2.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.queryWorkflowInvocationActions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.queryWorkflowInvocationActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryWorkflowInvocationActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes queryWorkflowInvocationActions with error', async () => { @@ -5964,15 +6149,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'QueryWorkflowInvocationActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.queryWorkflowInvocationActions = stubSimpleCall( undefined, @@ -5982,11 +6164,14 @@ describe('v1alpha2.DataformClient', () => { client.queryWorkflowInvocationActions(request), expectedError ); - assert( - (client.innerApiCalls.queryWorkflowInvocationActions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.queryWorkflowInvocationActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryWorkflowInvocationActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes queryWorkflowInvocationActionsStream without error', async () => { @@ -5998,8 +6183,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + 'QueryWorkflowInvocationActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction() @@ -6045,12 +6234,15 @@ describe('v1alpha2.DataformClient', () => { request ) ); - assert.strictEqual( + assert( ( client.descriptors.page.queryWorkflowInvocationActions .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -6063,8 +6255,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + 'QueryWorkflowInvocationActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.queryWorkflowInvocationActions.createStream = stubPageStreamingCall(undefined, expectedError); @@ -6099,12 +6295,15 @@ describe('v1alpha2.DataformClient', () => { request ) ); - assert.strictEqual( + assert( ( client.descriptors.page.queryWorkflowInvocationActions .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -6117,8 +6316,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + 'QueryWorkflowInvocationActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.WorkflowInvocationAction() @@ -6146,12 +6349,15 @@ describe('v1alpha2.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.queryWorkflowInvocationActions .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -6164,8 +6370,12 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + 'QueryWorkflowInvocationActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.queryWorkflowInvocationActions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -6184,12 +6394,15 @@ describe('v1alpha2.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.queryWorkflowInvocationActions .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -6664,12 +6877,15 @@ describe('v1alpha2.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.locationsClient.descriptors.page.listLocations .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); it('uses async iteration with listLocations with error', async () => { @@ -6700,12 +6916,15 @@ describe('v1alpha2.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.locationsClient.descriptors.page.listLocations .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); diff --git a/packages/google-cloud-dataform/test/gapic_dataform_v1beta1.ts b/packages/google-cloud-dataform/test/gapic_dataform_v1beta1.ts index 57db89adaa5..d3e66a349b4 100644 --- a/packages/google-cloud-dataform/test/gapic_dataform_v1beta1.ts +++ b/packages/google-cloud-dataform/test/gapic_dataform_v1beta1.ts @@ -27,6 +27,21 @@ import {PassThrough} from 'stream'; import {protobuf, IamProtos, LocationProtos} from 'google-gax'; +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + function generateSampleMessage(instance: T) { const filledObject = ( instance.constructor as typeof protobuf.Message @@ -220,26 +235,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetRepositoryRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetRepositoryRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.Repository() ); client.innerApiCalls.getRepository = stubSimpleCall(expectedResponse); const [response] = await client.getRepository(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getRepository as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getRepository without error using callback', async () => { @@ -251,15 +265,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetRepositoryRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetRepositoryRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.Repository() ); @@ -282,11 +292,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getRepository as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getRepository with error', async () => { @@ -298,26 +311,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetRepositoryRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetRepositoryRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getRepository = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getRepository(request), expectedError); - assert( - (client.innerApiCalls.getRepository as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getRepository with closed client', async () => { @@ -329,7 +341,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetRepositoryRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetRepositoryRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getRepository(request), expectedError); @@ -346,26 +361,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateRepositoryRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateRepositoryRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.Repository() ); client.innerApiCalls.createRepository = stubSimpleCall(expectedResponse); const [response] = await client.createRepository(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createRepository as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createRepository without error using callback', async () => { @@ -377,15 +391,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateRepositoryRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateRepositoryRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.Repository() ); @@ -408,11 +418,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createRepository as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createRepository with error', async () => { @@ -424,26 +437,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateRepositoryRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateRepositoryRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createRepository = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.createRepository(request), expectedError); - assert( - (client.innerApiCalls.createRepository as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createRepository with closed client', async () => { @@ -455,7 +467,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateRepositoryRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue('CreateRepositoryRequest', [ + 'parent', + ]); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createRepository(request), expectedError); @@ -472,27 +487,27 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.UpdateRepositoryRequest() ); - request.repository = {}; - request.repository.name = ''; - const expectedHeaderRequestParams = 'repository.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.repository ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateRepositoryRequest', [ + 'repository', + 'name', + ]); + request.repository.name = defaultValue1; + const expectedHeaderRequestParams = `repository.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.Repository() ); client.innerApiCalls.updateRepository = stubSimpleCall(expectedResponse); const [response] = await client.updateRepository(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateRepository as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateRepository without error using callback', async () => { @@ -504,16 +519,13 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.UpdateRepositoryRequest() ); - request.repository = {}; - request.repository.name = ''; - const expectedHeaderRequestParams = 'repository.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.repository ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateRepositoryRequest', [ + 'repository', + 'name', + ]); + request.repository.name = defaultValue1; + const expectedHeaderRequestParams = `repository.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.Repository() ); @@ -536,11 +548,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateRepository as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateRepository with error', async () => { @@ -552,27 +567,27 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.UpdateRepositoryRequest() ); - request.repository = {}; - request.repository.name = ''; - const expectedHeaderRequestParams = 'repository.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.repository ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateRepositoryRequest', [ + 'repository', + 'name', + ]); + request.repository.name = defaultValue1; + const expectedHeaderRequestParams = `repository.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateRepository = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.updateRepository(request), expectedError); - assert( - (client.innerApiCalls.updateRepository as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateRepository with closed client', async () => { @@ -584,8 +599,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.UpdateRepositoryRequest() ); - request.repository = {}; - request.repository.name = ''; + request.repository ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateRepositoryRequest', [ + 'repository', + 'name', + ]); + request.repository.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateRepository(request), expectedError); @@ -602,26 +621,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteRepositoryRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteRepositoryRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.deleteRepository = stubSimpleCall(expectedResponse); const [response] = await client.deleteRepository(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteRepository as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteRepository without error using callback', async () => { @@ -633,15 +651,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteRepositoryRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteRepositoryRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -664,11 +678,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteRepository as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteRepository with error', async () => { @@ -680,26 +697,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteRepositoryRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteRepositoryRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteRepository = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.deleteRepository(request), expectedError); - assert( - (client.innerApiCalls.deleteRepository as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteRepository with closed client', async () => { @@ -711,7 +727,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteRepositoryRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('DeleteRepositoryRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteRepository(request), expectedError); @@ -728,15 +747,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('FetchRemoteBranchesRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse() ); @@ -744,11 +759,14 @@ describe('v1beta1.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.fetchRemoteBranches(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.fetchRemoteBranches as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.fetchRemoteBranches as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchRemoteBranches as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchRemoteBranches without error using callback', async () => { @@ -760,15 +778,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('FetchRemoteBranchesRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse() ); @@ -791,11 +805,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.fetchRemoteBranches as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.fetchRemoteBranches as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchRemoteBranches as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchRemoteBranches with error', async () => { @@ -807,26 +824,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('FetchRemoteBranchesRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.fetchRemoteBranches = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.fetchRemoteBranches(request), expectedError); - assert( - (client.innerApiCalls.fetchRemoteBranches as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.fetchRemoteBranches as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchRemoteBranches as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchRemoteBranches with closed client', async () => { @@ -838,7 +854,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('FetchRemoteBranchesRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.fetchRemoteBranches(request), expectedError); @@ -855,26 +874,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetWorkspaceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetWorkspaceRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.Workspace() ); client.innerApiCalls.getWorkspace = stubSimpleCall(expectedResponse); const [response] = await client.getWorkspace(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getWorkspace as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getWorkspace without error using callback', async () => { @@ -886,15 +904,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetWorkspaceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetWorkspaceRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.Workspace() ); @@ -917,11 +931,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getWorkspace as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getWorkspace with error', async () => { @@ -933,26 +950,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetWorkspaceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetWorkspaceRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getWorkspace = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getWorkspace(request), expectedError); - assert( - (client.innerApiCalls.getWorkspace as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getWorkspace with closed client', async () => { @@ -964,7 +980,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetWorkspaceRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetWorkspaceRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getWorkspace(request), expectedError); @@ -981,26 +1000,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateWorkspaceRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateWorkspaceRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.Workspace() ); client.innerApiCalls.createWorkspace = stubSimpleCall(expectedResponse); const [response] = await client.createWorkspace(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createWorkspace as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createWorkspace without error using callback', async () => { @@ -1012,15 +1030,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateWorkspaceRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateWorkspaceRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.Workspace() ); @@ -1043,11 +1057,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createWorkspace as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createWorkspace with error', async () => { @@ -1059,26 +1076,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateWorkspaceRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateWorkspaceRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createWorkspace = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.createWorkspace(request), expectedError); - assert( - (client.innerApiCalls.createWorkspace as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createWorkspace with closed client', async () => { @@ -1090,7 +1106,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateWorkspaceRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue('CreateWorkspaceRequest', [ + 'parent', + ]); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createWorkspace(request), expectedError); @@ -1107,26 +1126,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteWorkspaceRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.deleteWorkspace = stubSimpleCall(expectedResponse); const [response] = await client.deleteWorkspace(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteWorkspace as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteWorkspace without error using callback', async () => { @@ -1138,15 +1156,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteWorkspaceRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -1169,11 +1183,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteWorkspace as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteWorkspace with error', async () => { @@ -1185,26 +1202,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteWorkspaceRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteWorkspace = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.deleteWorkspace(request), expectedError); - assert( - (client.innerApiCalls.deleteWorkspace as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteWorkspace with closed client', async () => { @@ -1216,7 +1232,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('DeleteWorkspaceRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteWorkspace(request), expectedError); @@ -1233,15 +1252,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('InstallNpmPackagesRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesResponse() ); @@ -1249,11 +1264,14 @@ describe('v1beta1.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.installNpmPackages(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.installNpmPackages as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.installNpmPackages as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.installNpmPackages as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes installNpmPackages without error using callback', async () => { @@ -1265,15 +1283,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('InstallNpmPackagesRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesResponse() ); @@ -1296,11 +1310,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.installNpmPackages as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.installNpmPackages as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.installNpmPackages as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes installNpmPackages with error', async () => { @@ -1312,26 +1329,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('InstallNpmPackagesRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.installNpmPackages = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.installNpmPackages(request), expectedError); - assert( - (client.innerApiCalls.installNpmPackages as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.installNpmPackages as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.installNpmPackages as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes installNpmPackages with closed client', async () => { @@ -1343,7 +1359,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest() ); - request.workspace = ''; + const defaultValue1 = getTypeDefaultValue('InstallNpmPackagesRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.installNpmPackages(request), expectedError); @@ -1360,26 +1379,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.PullGitCommitsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('PullGitCommitsRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.pullGitCommits = stubSimpleCall(expectedResponse); const [response] = await client.pullGitCommits(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.pullGitCommits as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.pullGitCommits as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pullGitCommits as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes pullGitCommits without error using callback', async () => { @@ -1391,15 +1409,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.PullGitCommitsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('PullGitCommitsRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -1422,11 +1436,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.pullGitCommits as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.pullGitCommits as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pullGitCommits as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes pullGitCommits with error', async () => { @@ -1438,26 +1455,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.PullGitCommitsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('PullGitCommitsRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.pullGitCommits = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.pullGitCommits(request), expectedError); - assert( - (client.innerApiCalls.pullGitCommits as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.pullGitCommits as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pullGitCommits as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes pullGitCommits with closed client', async () => { @@ -1469,7 +1485,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.PullGitCommitsRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('PullGitCommitsRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.pullGitCommits(request), expectedError); @@ -1486,26 +1505,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.PushGitCommitsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('PushGitCommitsRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.pushGitCommits = stubSimpleCall(expectedResponse); const [response] = await client.pushGitCommits(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.pushGitCommits as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.pushGitCommits as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pushGitCommits as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes pushGitCommits without error using callback', async () => { @@ -1517,15 +1535,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.PushGitCommitsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('PushGitCommitsRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -1548,11 +1562,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.pushGitCommits as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.pushGitCommits as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pushGitCommits as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes pushGitCommits with error', async () => { @@ -1564,26 +1581,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.PushGitCommitsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('PushGitCommitsRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.pushGitCommits = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.pushGitCommits(request), expectedError); - assert( - (client.innerApiCalls.pushGitCommits as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.pushGitCommits as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pushGitCommits as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes pushGitCommits with closed client', async () => { @@ -1595,7 +1611,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.PushGitCommitsRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('PushGitCommitsRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.pushGitCommits(request), expectedError); @@ -1612,15 +1631,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('FetchFileGitStatusesRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse() ); @@ -1628,11 +1643,14 @@ describe('v1beta1.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.fetchFileGitStatuses(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.fetchFileGitStatuses as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.fetchFileGitStatuses as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchFileGitStatuses as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchFileGitStatuses without error using callback', async () => { @@ -1644,15 +1662,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('FetchFileGitStatusesRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse() ); @@ -1675,11 +1689,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.fetchFileGitStatuses as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.fetchFileGitStatuses as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchFileGitStatuses as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchFileGitStatuses with error', async () => { @@ -1691,26 +1708,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('FetchFileGitStatusesRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.fetchFileGitStatuses = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.fetchFileGitStatuses(request), expectedError); - assert( - (client.innerApiCalls.fetchFileGitStatuses as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.fetchFileGitStatuses as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchFileGitStatuses as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchFileGitStatuses with closed client', async () => { @@ -1722,7 +1738,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('FetchFileGitStatusesRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.fetchFileGitStatuses(request), expectedError); @@ -1739,15 +1758,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('FetchGitAheadBehindRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse() ); @@ -1755,11 +1770,14 @@ describe('v1beta1.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.fetchGitAheadBehind(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.fetchGitAheadBehind as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.fetchGitAheadBehind as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchGitAheadBehind as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchGitAheadBehind without error using callback', async () => { @@ -1771,15 +1789,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('FetchGitAheadBehindRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse() ); @@ -1802,11 +1816,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.fetchGitAheadBehind as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.fetchGitAheadBehind as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchGitAheadBehind as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchGitAheadBehind with error', async () => { @@ -1818,26 +1835,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('FetchGitAheadBehindRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.fetchGitAheadBehind = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.fetchGitAheadBehind(request), expectedError); - assert( - (client.innerApiCalls.fetchGitAheadBehind as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.fetchGitAheadBehind as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchGitAheadBehind as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchGitAheadBehind with closed client', async () => { @@ -1849,7 +1865,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('FetchGitAheadBehindRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.fetchGitAheadBehind(request), expectedError); @@ -1866,15 +1885,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CommitWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -1882,11 +1898,14 @@ describe('v1beta1.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.commitWorkspaceChanges(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.commitWorkspaceChanges as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.commitWorkspaceChanges as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.commitWorkspaceChanges as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes commitWorkspaceChanges without error using callback', async () => { @@ -1898,15 +1917,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CommitWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -1929,11 +1945,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.commitWorkspaceChanges as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.commitWorkspaceChanges as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.commitWorkspaceChanges as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes commitWorkspaceChanges with error', async () => { @@ -1945,15 +1964,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CommitWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.commitWorkspaceChanges = stubSimpleCall( undefined, @@ -1963,11 +1979,14 @@ describe('v1beta1.DataformClient', () => { client.commitWorkspaceChanges(request), expectedError ); - assert( - (client.innerApiCalls.commitWorkspaceChanges as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.commitWorkspaceChanges as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.commitWorkspaceChanges as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes commitWorkspaceChanges with closed client', async () => { @@ -1979,7 +1998,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + 'CommitWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -1999,15 +2022,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ResetWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -2015,11 +2035,14 @@ describe('v1beta1.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.resetWorkspaceChanges(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.resetWorkspaceChanges as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.resetWorkspaceChanges as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.resetWorkspaceChanges as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes resetWorkspaceChanges without error using callback', async () => { @@ -2031,15 +2054,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ResetWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -2062,11 +2082,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.resetWorkspaceChanges as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.resetWorkspaceChanges as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.resetWorkspaceChanges as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes resetWorkspaceChanges with error', async () => { @@ -2078,15 +2101,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ResetWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.resetWorkspaceChanges = stubSimpleCall( undefined, @@ -2096,11 +2116,14 @@ describe('v1beta1.DataformClient', () => { client.resetWorkspaceChanges(request), expectedError ); - assert( - (client.innerApiCalls.resetWorkspaceChanges as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.resetWorkspaceChanges as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.resetWorkspaceChanges as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes resetWorkspaceChanges with closed client', async () => { @@ -2112,7 +2135,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + 'ResetWorkspaceChangesRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -2132,26 +2159,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchFileDiffRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('FetchFileDiffRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchFileDiffResponse() ); client.innerApiCalls.fetchFileDiff = stubSimpleCall(expectedResponse); const [response] = await client.fetchFileDiff(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.fetchFileDiff as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.fetchFileDiff as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchFileDiff as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchFileDiff without error using callback', async () => { @@ -2163,15 +2189,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchFileDiffRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('FetchFileDiffRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchFileDiffResponse() ); @@ -2194,11 +2216,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.fetchFileDiff as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.fetchFileDiff as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchFileDiff as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchFileDiff with error', async () => { @@ -2210,26 +2235,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchFileDiffRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('FetchFileDiffRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.fetchFileDiff = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.fetchFileDiff(request), expectedError); - assert( - (client.innerApiCalls.fetchFileDiff as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.fetchFileDiff as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchFileDiff as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchFileDiff with closed client', async () => { @@ -2241,7 +2265,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchFileDiffRequest() ); - request.workspace = ''; + const defaultValue1 = getTypeDefaultValue('FetchFileDiffRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.fetchFileDiff(request), expectedError); @@ -2258,26 +2285,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MakeDirectoryRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('MakeDirectoryRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MakeDirectoryResponse() ); client.innerApiCalls.makeDirectory = stubSimpleCall(expectedResponse); const [response] = await client.makeDirectory(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.makeDirectory as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.makeDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.makeDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes makeDirectory without error using callback', async () => { @@ -2289,15 +2315,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MakeDirectoryRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('MakeDirectoryRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MakeDirectoryResponse() ); @@ -2320,11 +2342,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.makeDirectory as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.makeDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.makeDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes makeDirectory with error', async () => { @@ -2336,26 +2361,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MakeDirectoryRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('MakeDirectoryRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.makeDirectory = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.makeDirectory(request), expectedError); - assert( - (client.innerApiCalls.makeDirectory as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.makeDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.makeDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes makeDirectory with closed client', async () => { @@ -2367,7 +2391,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MakeDirectoryRequest() ); - request.workspace = ''; + const defaultValue1 = getTypeDefaultValue('MakeDirectoryRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.makeDirectory(request), expectedError); @@ -2384,26 +2411,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.RemoveDirectoryRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RemoveDirectoryRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.removeDirectory = stubSimpleCall(expectedResponse); const [response] = await client.removeDirectory(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.removeDirectory as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.removeDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes removeDirectory without error using callback', async () => { @@ -2415,15 +2441,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.RemoveDirectoryRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RemoveDirectoryRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -2446,11 +2468,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.removeDirectory as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.removeDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes removeDirectory with error', async () => { @@ -2462,26 +2487,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.RemoveDirectoryRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RemoveDirectoryRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.removeDirectory = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.removeDirectory(request), expectedError); - assert( - (client.innerApiCalls.removeDirectory as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.removeDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes removeDirectory with closed client', async () => { @@ -2493,7 +2517,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.RemoveDirectoryRequest() ); - request.workspace = ''; + const defaultValue1 = getTypeDefaultValue('RemoveDirectoryRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.removeDirectory(request), expectedError); @@ -2510,26 +2537,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MoveDirectoryRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('MoveDirectoryRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MoveDirectoryResponse() ); client.innerApiCalls.moveDirectory = stubSimpleCall(expectedResponse); const [response] = await client.moveDirectory(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.moveDirectory as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.moveDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.moveDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes moveDirectory without error using callback', async () => { @@ -2541,15 +2567,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MoveDirectoryRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('MoveDirectoryRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MoveDirectoryResponse() ); @@ -2572,11 +2594,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.moveDirectory as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.moveDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.moveDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes moveDirectory with error', async () => { @@ -2588,26 +2613,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MoveDirectoryRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('MoveDirectoryRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.moveDirectory = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.moveDirectory(request), expectedError); - assert( - (client.innerApiCalls.moveDirectory as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.moveDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.moveDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes moveDirectory with closed client', async () => { @@ -2619,7 +2643,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MoveDirectoryRequest() ); - request.workspace = ''; + const defaultValue1 = getTypeDefaultValue('MoveDirectoryRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.moveDirectory(request), expectedError); @@ -2636,26 +2663,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ReadFileRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ReadFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ReadFileResponse() ); client.innerApiCalls.readFile = stubSimpleCall(expectedResponse); const [response] = await client.readFile(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.readFile as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.readFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes readFile without error using callback', async () => { @@ -2667,15 +2693,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ReadFileRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ReadFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ReadFileResponse() ); @@ -2698,11 +2720,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.readFile as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.readFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes readFile with error', async () => { @@ -2711,26 +2736,25 @@ describe('v1beta1.DataformClient', () => { projectId: 'bogus', }); client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataform.v1beta1.ReadFileRequest() - ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.ReadFileRequest() + ); + const defaultValue1 = getTypeDefaultValue('ReadFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.readFile = stubSimpleCall(undefined, expectedError); await assert.rejects(client.readFile(request), expectedError); - assert( - (client.innerApiCalls.readFile as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.readFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes readFile with closed client', async () => { @@ -2742,7 +2766,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ReadFileRequest() ); - request.workspace = ''; + const defaultValue1 = getTypeDefaultValue('ReadFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.readFile(request), expectedError); @@ -2759,26 +2786,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.RemoveFileRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RemoveFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.removeFile = stubSimpleCall(expectedResponse); const [response] = await client.removeFile(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.removeFile as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.removeFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes removeFile without error using callback', async () => { @@ -2790,15 +2816,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.RemoveFileRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RemoveFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -2821,11 +2843,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.removeFile as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.removeFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes removeFile with error', async () => { @@ -2837,26 +2862,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.RemoveFileRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RemoveFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.removeFile = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.removeFile(request), expectedError); - assert( - (client.innerApiCalls.removeFile as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.removeFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes removeFile with closed client', async () => { @@ -2868,7 +2892,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.RemoveFileRequest() ); - request.workspace = ''; + const defaultValue1 = getTypeDefaultValue('RemoveFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.removeFile(request), expectedError); @@ -2885,26 +2912,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MoveFileRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('MoveFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MoveFileResponse() ); client.innerApiCalls.moveFile = stubSimpleCall(expectedResponse); const [response] = await client.moveFile(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.moveFile as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.moveFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.moveFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes moveFile without error using callback', async () => { @@ -2916,15 +2942,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MoveFileRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('MoveFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MoveFileResponse() ); @@ -2947,11 +2969,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.moveFile as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.moveFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.moveFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes moveFile with error', async () => { @@ -2963,23 +2988,22 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MoveFileRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('MoveFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.moveFile = stubSimpleCall(undefined, expectedError); await assert.rejects(client.moveFile(request), expectedError); - assert( - (client.innerApiCalls.moveFile as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.moveFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.moveFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes moveFile with closed client', async () => { @@ -2991,7 +3015,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MoveFileRequest() ); - request.workspace = ''; + const defaultValue1 = getTypeDefaultValue('MoveFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.moveFile(request), expectedError); @@ -3008,26 +3035,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.WriteFileRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('WriteFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.WriteFileResponse() ); client.innerApiCalls.writeFile = stubSimpleCall(expectedResponse); const [response] = await client.writeFile(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.writeFile as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.writeFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.writeFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes writeFile without error using callback', async () => { @@ -3039,15 +3065,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.WriteFileRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('WriteFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.WriteFileResponse() ); @@ -3070,11 +3092,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.writeFile as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.writeFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.writeFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes writeFile with error', async () => { @@ -3086,23 +3111,22 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.WriteFileRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('WriteFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.writeFile = stubSimpleCall(undefined, expectedError); await assert.rejects(client.writeFile(request), expectedError); - assert( - (client.innerApiCalls.writeFile as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.writeFile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.writeFile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes writeFile with closed client', async () => { @@ -3114,7 +3138,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.WriteFileRequest() ); - request.workspace = ''; + const defaultValue1 = getTypeDefaultValue('WriteFileRequest', [ + 'workspace', + ]); + request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.writeFile(request), expectedError); @@ -3131,15 +3158,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetCompilationResultRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetCompilationResultRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CompilationResult() ); @@ -3147,11 +3170,14 @@ describe('v1beta1.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.getCompilationResult(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getCompilationResult as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getCompilationResult as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCompilationResult as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCompilationResult without error using callback', async () => { @@ -3163,15 +3189,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetCompilationResultRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetCompilationResultRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CompilationResult() ); @@ -3194,11 +3216,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getCompilationResult as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getCompilationResult as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCompilationResult as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCompilationResult with error', async () => { @@ -3210,26 +3235,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetCompilationResultRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetCompilationResultRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getCompilationResult = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getCompilationResult(request), expectedError); - assert( - (client.innerApiCalls.getCompilationResult as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getCompilationResult as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCompilationResult as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCompilationResult with closed client', async () => { @@ -3241,7 +3265,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetCompilationResultRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetCompilationResultRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getCompilationResult(request), expectedError); @@ -3258,15 +3285,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateCompilationResultRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateCompilationResultRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CompilationResult() ); @@ -3274,11 +3298,14 @@ describe('v1beta1.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.createCompilationResult(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createCompilationResult as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createCompilationResult as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCompilationResult as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createCompilationResult without error using callback', async () => { @@ -3290,15 +3317,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateCompilationResultRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateCompilationResultRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CompilationResult() ); @@ -3321,11 +3345,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createCompilationResult as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createCompilationResult as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCompilationResult as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createCompilationResult with error', async () => { @@ -3337,15 +3364,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateCompilationResultRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateCompilationResultRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createCompilationResult = stubSimpleCall( undefined, @@ -3355,11 +3379,14 @@ describe('v1beta1.DataformClient', () => { client.createCompilationResult(request), expectedError ); - assert( - (client.innerApiCalls.createCompilationResult as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createCompilationResult as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCompilationResult as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createCompilationResult with closed client', async () => { @@ -3371,7 +3398,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateCompilationResultRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue( + 'CreateCompilationResultRequest', + ['parent'] + ); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -3391,15 +3422,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() ); @@ -3407,11 +3435,14 @@ describe('v1beta1.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.getWorkflowInvocation(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getWorkflowInvocation as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getWorkflowInvocation without error using callback', async () => { @@ -3423,15 +3454,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() ); @@ -3454,11 +3482,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getWorkflowInvocation as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getWorkflowInvocation with error', async () => { @@ -3470,15 +3501,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getWorkflowInvocation = stubSimpleCall( undefined, @@ -3488,11 +3516,14 @@ describe('v1beta1.DataformClient', () => { client.getWorkflowInvocation(request), expectedError ); - assert( - (client.innerApiCalls.getWorkflowInvocation as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getWorkflowInvocation with closed client', async () => { @@ -3504,7 +3535,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + 'GetWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -3524,15 +3559,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateWorkflowInvocationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() ); @@ -3540,11 +3572,14 @@ describe('v1beta1.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.createWorkflowInvocation(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createWorkflowInvocation as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createWorkflowInvocation without error using callback', async () => { @@ -3556,15 +3591,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateWorkflowInvocationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() ); @@ -3587,31 +3619,31 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createWorkflowInvocation as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createWorkflowInvocation with error', async () => { const client = new dataformModule.v1beta1.DataformClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + 'CreateWorkflowInvocationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createWorkflowInvocation = stubSimpleCall( undefined, @@ -3621,11 +3653,14 @@ describe('v1beta1.DataformClient', () => { client.createWorkflowInvocation(request), expectedError ); - assert( - (client.innerApiCalls.createWorkflowInvocation as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createWorkflowInvocation with closed client', async () => { @@ -3637,7 +3672,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue( + 'CreateWorkflowInvocationRequest', + ['parent'] + ); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -3657,15 +3696,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DeleteWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -3673,11 +3709,14 @@ describe('v1beta1.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.deleteWorkflowInvocation(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteWorkflowInvocation as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteWorkflowInvocation without error using callback', async () => { @@ -3689,15 +3728,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DeleteWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -3720,11 +3756,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteWorkflowInvocation as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteWorkflowInvocation with error', async () => { @@ -3736,15 +3775,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DeleteWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteWorkflowInvocation = stubSimpleCall( undefined, @@ -3754,11 +3790,14 @@ describe('v1beta1.DataformClient', () => { client.deleteWorkflowInvocation(request), expectedError ); - assert( - (client.innerApiCalls.deleteWorkflowInvocation as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteWorkflowInvocation with closed client', async () => { @@ -3770,7 +3809,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + 'DeleteWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -3790,15 +3833,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CancelWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -3806,11 +3846,14 @@ describe('v1beta1.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.cancelWorkflowInvocation(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.cancelWorkflowInvocation as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.cancelWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes cancelWorkflowInvocation without error using callback', async () => { @@ -3822,15 +3865,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CancelWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -3853,11 +3893,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.cancelWorkflowInvocation as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.cancelWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes cancelWorkflowInvocation with error', async () => { @@ -3869,15 +3912,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CancelWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.cancelWorkflowInvocation = stubSimpleCall( undefined, @@ -3887,11 +3927,14 @@ describe('v1beta1.DataformClient', () => { client.cancelWorkflowInvocation(request), expectedError ); - assert( - (client.innerApiCalls.cancelWorkflowInvocation as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.cancelWorkflowInvocation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelWorkflowInvocation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes cancelWorkflowInvocation with closed client', async () => { @@ -3903,7 +3946,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + 'CancelWorkflowInvocationRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -3923,15 +3970,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListRepositoriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1beta1.Repository() @@ -3946,11 +3989,14 @@ describe('v1beta1.DataformClient', () => { client.innerApiCalls.listRepositories = stubSimpleCall(expectedResponse); const [response] = await client.listRepositories(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listRepositories as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listRepositories without error using callback', async () => { @@ -3962,15 +4008,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListRepositoriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1beta1.Repository() @@ -4001,11 +4043,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listRepositories as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listRepositories with error', async () => { @@ -4017,26 +4062,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListRepositoriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listRepositories = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listRepositories(request), expectedError); - assert( - (client.innerApiCalls.listRepositories as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listRepositoriesStream without error', async () => { @@ -4048,8 +4092,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListRepositoriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1beta1.Repository() @@ -4086,11 +4133,12 @@ describe('v1beta1.DataformClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listRepositories, request) ); - assert.strictEqual( - ( - client.descriptors.page.listRepositories.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listRepositories.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4103,8 +4151,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListRepositoriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listRepositories.createStream = stubPageStreamingCall(undefined, expectedError); @@ -4130,11 +4181,12 @@ describe('v1beta1.DataformClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listRepositories, request) ); - assert.strictEqual( - ( - client.descriptors.page.listRepositories.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listRepositories.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4147,8 +4199,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListRepositoriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1beta1.Repository() @@ -4174,11 +4229,12 @@ describe('v1beta1.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listRepositories.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listRepositories.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4191,8 +4247,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListRepositoriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listRepositories.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -4210,11 +4269,12 @@ describe('v1beta1.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listRepositories.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listRepositories.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -4229,15 +4289,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListWorkspacesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1beta1.Workspace() @@ -4252,11 +4308,14 @@ describe('v1beta1.DataformClient', () => { client.innerApiCalls.listWorkspaces = stubSimpleCall(expectedResponse); const [response] = await client.listWorkspaces(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listWorkspaces as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listWorkspaces as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkspaces as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listWorkspaces without error using callback', async () => { @@ -4268,15 +4327,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListWorkspacesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1beta1.Workspace() @@ -4307,11 +4362,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listWorkspaces as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listWorkspaces as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkspaces as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listWorkspaces with error', async () => { @@ -4323,26 +4381,25 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListWorkspacesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listWorkspaces = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listWorkspaces(request), expectedError); - assert( - (client.innerApiCalls.listWorkspaces as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listWorkspaces as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkspaces as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listWorkspacesStream without error', async () => { @@ -4354,8 +4411,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListWorkspacesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1beta1.Workspace() @@ -4392,11 +4452,12 @@ describe('v1beta1.DataformClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listWorkspaces, request) ); - assert.strictEqual( - ( - client.descriptors.page.listWorkspaces.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listWorkspaces.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4409,8 +4470,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListWorkspacesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listWorkspaces.createStream = stubPageStreamingCall(undefined, expectedError); @@ -4436,11 +4500,12 @@ describe('v1beta1.DataformClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listWorkspaces, request) ); - assert.strictEqual( - ( - client.descriptors.page.listWorkspaces.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listWorkspaces.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4453,8 +4518,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListWorkspacesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1beta1.Workspace() @@ -4480,11 +4548,12 @@ describe('v1beta1.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listWorkspaces.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listWorkspaces.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4497,8 +4566,11 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListWorkspacesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listWorkspaces.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -4515,11 +4587,12 @@ describe('v1beta1.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listWorkspaces.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listWorkspaces.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -4534,15 +4607,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'QueryDirectoryContentsRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() @@ -4558,11 +4628,14 @@ describe('v1beta1.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.queryDirectoryContents(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.queryDirectoryContents as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.queryDirectoryContents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryDirectoryContents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes queryDirectoryContents without error using callback', async () => { @@ -4574,15 +4647,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'QueryDirectoryContentsRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() @@ -4615,11 +4685,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.queryDirectoryContents as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.queryDirectoryContents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryDirectoryContents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes queryDirectoryContents with error', async () => { @@ -4631,15 +4704,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'QueryDirectoryContentsRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.queryDirectoryContents = stubSimpleCall( undefined, @@ -4649,11 +4719,14 @@ describe('v1beta1.DataformClient', () => { client.queryDirectoryContents(request), expectedError ); - assert( - (client.innerApiCalls.queryDirectoryContents as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.queryDirectoryContents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryDirectoryContents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes queryDirectoryContentsStream without error', async () => { @@ -4665,8 +4738,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; + const defaultValue1 = getTypeDefaultValue( + 'QueryDirectoryContentsRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() @@ -4709,12 +4786,15 @@ describe('v1beta1.DataformClient', () => { .getCall(0) .calledWith(client.innerApiCalls.queryDirectoryContents, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.queryDirectoryContents .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4727,8 +4807,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; + const defaultValue1 = getTypeDefaultValue( + 'QueryDirectoryContentsRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.queryDirectoryContents.createStream = stubPageStreamingCall(undefined, expectedError); @@ -4760,12 +4844,15 @@ describe('v1beta1.DataformClient', () => { .getCall(0) .calledWith(client.innerApiCalls.queryDirectoryContents, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.queryDirectoryContents .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4778,8 +4865,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; + const defaultValue1 = getTypeDefaultValue( + 'QueryDirectoryContentsRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry() @@ -4807,12 +4898,15 @@ describe('v1beta1.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.queryDirectoryContents .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4825,8 +4919,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() ); - request.workspace = ''; - const expectedHeaderRequestParams = 'workspace='; + const defaultValue1 = getTypeDefaultValue( + 'QueryDirectoryContentsRequest', + ['workspace'] + ); + request.workspace = defaultValue1; + const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.queryDirectoryContents.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -4845,12 +4943,15 @@ describe('v1beta1.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.queryDirectoryContents .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -4865,15 +4966,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListCompilationResultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CompilationResult() @@ -4889,11 +4987,14 @@ describe('v1beta1.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.listCompilationResults(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listCompilationResults as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listCompilationResults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCompilationResults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCompilationResults without error using callback', async () => { @@ -4905,15 +5006,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListCompilationResultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CompilationResult() @@ -4946,11 +5044,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listCompilationResults as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listCompilationResults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCompilationResults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCompilationResults with error', async () => { @@ -4962,15 +5063,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListCompilationResultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listCompilationResults = stubSimpleCall( undefined, @@ -4980,11 +5078,14 @@ describe('v1beta1.DataformClient', () => { client.listCompilationResults(request), expectedError ); - assert( - (client.innerApiCalls.listCompilationResults as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listCompilationResults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCompilationResults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCompilationResultsStream without error', async () => { @@ -4996,8 +5097,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListCompilationResultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CompilationResult() @@ -5040,12 +5145,15 @@ describe('v1beta1.DataformClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listCompilationResults, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.listCompilationResults .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5058,8 +5166,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListCompilationResultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listCompilationResults.createStream = stubPageStreamingCall(undefined, expectedError); @@ -5091,12 +5203,15 @@ describe('v1beta1.DataformClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listCompilationResults, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.listCompilationResults .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5109,8 +5224,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListCompilationResultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CompilationResult() @@ -5138,12 +5257,15 @@ describe('v1beta1.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listCompilationResults .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5156,8 +5278,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListCompilationResultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listCompilationResults.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -5176,12 +5302,15 @@ describe('v1beta1.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listCompilationResults .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -5196,15 +5325,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'QueryCompilationResultActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CompilationResultAction() @@ -5220,11 +5346,14 @@ describe('v1beta1.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.queryCompilationResultActions(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.queryCompilationResultActions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.queryCompilationResultActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryCompilationResultActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes queryCompilationResultActions without error using callback', async () => { @@ -5236,15 +5365,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'QueryCompilationResultActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CompilationResultAction() @@ -5277,11 +5403,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.queryCompilationResultActions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.queryCompilationResultActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryCompilationResultActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes queryCompilationResultActions with error', async () => { @@ -5293,15 +5422,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'QueryCompilationResultActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.queryCompilationResultActions = stubSimpleCall( undefined, @@ -5311,11 +5437,14 @@ describe('v1beta1.DataformClient', () => { client.queryCompilationResultActions(request), expectedError ); - assert( - (client.innerApiCalls.queryCompilationResultActions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.queryCompilationResultActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryCompilationResultActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes queryCompilationResultActionsStream without error', async () => { @@ -5327,8 +5456,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + 'QueryCompilationResultActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CompilationResultAction() @@ -5374,12 +5507,15 @@ describe('v1beta1.DataformClient', () => { request ) ); - assert.strictEqual( + assert( ( client.descriptors.page.queryCompilationResultActions .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5392,8 +5528,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + 'QueryCompilationResultActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.queryCompilationResultActions.createStream = stubPageStreamingCall(undefined, expectedError); @@ -5428,12 +5568,15 @@ describe('v1beta1.DataformClient', () => { request ) ); - assert.strictEqual( + assert( ( client.descriptors.page.queryCompilationResultActions .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5446,8 +5589,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + 'QueryCompilationResultActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CompilationResultAction() @@ -5475,12 +5622,15 @@ describe('v1beta1.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.queryCompilationResultActions .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5493,8 +5643,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + 'QueryCompilationResultActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.queryCompilationResultActions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -5513,12 +5667,15 @@ describe('v1beta1.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.queryCompilationResultActions .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -5533,15 +5690,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListWorkflowInvocationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() @@ -5557,11 +5711,14 @@ describe('v1beta1.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.listWorkflowInvocations(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listWorkflowInvocations as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listWorkflowInvocations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkflowInvocations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listWorkflowInvocations without error using callback', async () => { @@ -5573,15 +5730,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListWorkflowInvocationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() @@ -5614,11 +5768,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listWorkflowInvocations as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listWorkflowInvocations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkflowInvocations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listWorkflowInvocations with error', async () => { @@ -5630,15 +5787,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListWorkflowInvocationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listWorkflowInvocations = stubSimpleCall( undefined, @@ -5648,11 +5802,14 @@ describe('v1beta1.DataformClient', () => { client.listWorkflowInvocations(request), expectedError ); - assert( - (client.innerApiCalls.listWorkflowInvocations as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listWorkflowInvocations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkflowInvocations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listWorkflowInvocationsStream without error', async () => { @@ -5664,8 +5821,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListWorkflowInvocationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() @@ -5708,12 +5869,15 @@ describe('v1beta1.DataformClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listWorkflowInvocations, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.listWorkflowInvocations .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5726,8 +5890,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListWorkflowInvocationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listWorkflowInvocations.createStream = stubPageStreamingCall(undefined, expectedError); @@ -5759,12 +5927,15 @@ describe('v1beta1.DataformClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listWorkflowInvocations, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.listWorkflowInvocations .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5777,8 +5948,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListWorkflowInvocationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1beta1.WorkflowInvocation() @@ -5806,12 +5981,15 @@ describe('v1beta1.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listWorkflowInvocations .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5824,8 +6002,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListWorkflowInvocationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listWorkflowInvocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -5844,12 +6026,15 @@ describe('v1beta1.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listWorkflowInvocations .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -5864,15 +6049,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'QueryWorkflowInvocationActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() @@ -5888,11 +6070,14 @@ describe('v1beta1.DataformClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.queryWorkflowInvocationActions(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.queryWorkflowInvocationActions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.queryWorkflowInvocationActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryWorkflowInvocationActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes queryWorkflowInvocationActions without error using callback', async () => { @@ -5904,15 +6089,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'QueryWorkflowInvocationActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() @@ -5945,11 +6127,14 @@ describe('v1beta1.DataformClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.queryWorkflowInvocationActions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.queryWorkflowInvocationActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryWorkflowInvocationActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes queryWorkflowInvocationActions with error', async () => { @@ -5961,15 +6146,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'QueryWorkflowInvocationActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.queryWorkflowInvocationActions = stubSimpleCall( undefined, @@ -5979,11 +6161,14 @@ describe('v1beta1.DataformClient', () => { client.queryWorkflowInvocationActions(request), expectedError ); - assert( - (client.innerApiCalls.queryWorkflowInvocationActions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.queryWorkflowInvocationActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryWorkflowInvocationActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes queryWorkflowInvocationActionsStream without error', async () => { @@ -5995,8 +6180,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + 'QueryWorkflowInvocationActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() @@ -6042,12 +6231,15 @@ describe('v1beta1.DataformClient', () => { request ) ); - assert.strictEqual( + assert( ( client.descriptors.page.queryWorkflowInvocationActions .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -6060,8 +6252,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + 'QueryWorkflowInvocationActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.queryWorkflowInvocationActions.createStream = stubPageStreamingCall(undefined, expectedError); @@ -6096,12 +6292,15 @@ describe('v1beta1.DataformClient', () => { request ) ); - assert.strictEqual( + assert( ( client.descriptors.page.queryWorkflowInvocationActions .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -6114,8 +6313,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + 'QueryWorkflowInvocationActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataform.v1beta1.WorkflowInvocationAction() @@ -6143,12 +6346,15 @@ describe('v1beta1.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.queryWorkflowInvocationActions .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -6161,8 +6367,12 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + 'QueryWorkflowInvocationActionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.queryWorkflowInvocationActions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -6181,12 +6391,15 @@ describe('v1beta1.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.queryWorkflowInvocationActions .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -6661,12 +6874,15 @@ describe('v1beta1.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.locationsClient.descriptors.page.listLocations .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); it('uses async iteration with listLocations with error', async () => { @@ -6697,12 +6913,15 @@ describe('v1beta1.DataformClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.locationsClient.descriptors.page.listLocations .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); From 077b1adc3770835a6930ab136606405a8876ae10 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 26 Sep 2022 15:32:13 +0000 Subject: [PATCH 18/80] chore(main): release 0.2.0 (#12) :robot: I have created a release *beep* *boop* --- ## [0.2.0](https://github.com/googleapis/nodejs-dataform/compare/v0.1.0...v0.2.0) (2022-09-14) ### Features * Release API version v1beta1 (no changes to v1alpha2) ([#11](https://github.com/googleapis/nodejs-dataform/issues/11)) ([1ff35a6](https://github.com/googleapis/nodejs-dataform/commit/1ff35a6b63f9d64ea5f7d78a0022c1fab9c95411)) ### Bug Fixes * Allow passing gax instance to client constructor ([#18](https://github.com/googleapis/nodejs-dataform/issues/18)) ([34e62f5](https://github.com/googleapis/nodejs-dataform/commit/34e62f559325cf314e6c017da5f46b845a49ecef)) * Better support for fallback mode ([#13](https://github.com/googleapis/nodejs-dataform/issues/13)) ([f48d918](https://github.com/googleapis/nodejs-dataform/commit/f48d918863db5b1aeff084b562b087ce9b92e8ea)) * Change import long to require ([#14](https://github.com/googleapis/nodejs-dataform/issues/14)) ([3790bfd](https://github.com/googleapis/nodejs-dataform/commit/3790bfd0881957c089e22e372af19e172ade31eb)) * Do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-dataform/issues/1553)) ([#17](https://github.com/googleapis/nodejs-dataform/issues/17)) ([32373fd](https://github.com/googleapis/nodejs-dataform/commit/32373fd2c5b85df5517821d7105635bc3f7ec723)) * Preserve default values in x-goog-request-params header ([#19](https://github.com/googleapis/nodejs-dataform/issues/19)) ([bbb3790](https://github.com/googleapis/nodejs-dataform/commit/bbb379042b001ed4fcc49423cfcee126dcff9270)) * Remove pip install statements ([#1546](https://github.com/googleapis/nodejs-dataform/issues/1546)) ([#15](https://github.com/googleapis/nodejs-dataform/issues/15)) ([71f0add](https://github.com/googleapis/nodejs-dataform/commit/71f0add64a43424ee71c0bbe03f82bf78d98eb3c)) * use google-gax v3.3.0 ([32373fd](https://github.com/googleapis/nodejs-dataform/commit/32373fd2c5b85df5517821d7105635bc3f7ec723)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-dataform/CHANGELOG.md | 18 ++++++++++++++++++ packages/google-cloud-dataform/package.json | 2 +- ...etadata.google.cloud.dataform.v1alpha2.json | 2 +- ...metadata.google.cloud.dataform.v1beta1.json | 2 +- .../google-cloud-dataform/samples/package.json | 2 +- 5 files changed, 22 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-dataform/CHANGELOG.md b/packages/google-cloud-dataform/CHANGELOG.md index e3af8e036ef..c4f66d45e6c 100644 --- a/packages/google-cloud-dataform/CHANGELOG.md +++ b/packages/google-cloud-dataform/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +## [0.2.0](https://github.com/googleapis/nodejs-dataform/compare/v0.1.0...v0.2.0) (2022-09-14) + + +### Features + +* Release API version v1beta1 (no changes to v1alpha2) ([#11](https://github.com/googleapis/nodejs-dataform/issues/11)) ([1ff35a6](https://github.com/googleapis/nodejs-dataform/commit/1ff35a6b63f9d64ea5f7d78a0022c1fab9c95411)) + + +### Bug Fixes + +* Allow passing gax instance to client constructor ([#18](https://github.com/googleapis/nodejs-dataform/issues/18)) ([34e62f5](https://github.com/googleapis/nodejs-dataform/commit/34e62f559325cf314e6c017da5f46b845a49ecef)) +* Better support for fallback mode ([#13](https://github.com/googleapis/nodejs-dataform/issues/13)) ([f48d918](https://github.com/googleapis/nodejs-dataform/commit/f48d918863db5b1aeff084b562b087ce9b92e8ea)) +* Change import long to require ([#14](https://github.com/googleapis/nodejs-dataform/issues/14)) ([3790bfd](https://github.com/googleapis/nodejs-dataform/commit/3790bfd0881957c089e22e372af19e172ade31eb)) +* Do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-dataform/issues/1553)) ([#17](https://github.com/googleapis/nodejs-dataform/issues/17)) ([32373fd](https://github.com/googleapis/nodejs-dataform/commit/32373fd2c5b85df5517821d7105635bc3f7ec723)) +* Preserve default values in x-goog-request-params header ([#19](https://github.com/googleapis/nodejs-dataform/issues/19)) ([bbb3790](https://github.com/googleapis/nodejs-dataform/commit/bbb379042b001ed4fcc49423cfcee126dcff9270)) +* Remove pip install statements ([#1546](https://github.com/googleapis/nodejs-dataform/issues/1546)) ([#15](https://github.com/googleapis/nodejs-dataform/issues/15)) ([71f0add](https://github.com/googleapis/nodejs-dataform/commit/71f0add64a43424ee71c0bbe03f82bf78d98eb3c)) +* use google-gax v3.3.0 ([32373fd](https://github.com/googleapis/nodejs-dataform/commit/32373fd2c5b85df5517821d7105635bc3f7ec723)) + ## 0.1.0 (2022-07-22) diff --git a/packages/google-cloud-dataform/package.json b/packages/google-cloud-dataform/package.json index 19239a9cb6d..2b39eaa70a3 100644 --- a/packages/google-cloud-dataform/package.json +++ b/packages/google-cloud-dataform/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/dataform", - "version": "0.1.0", + "version": "0.2.0", "description": "dataform client for Node.js", "repository": "googleapis/nodejs-dataform", "license": "Apache-2.0", diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json b/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json index 344d9ef1048..34d0c9e775d 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataform", - "version": "0.1.0", + "version": "0.2.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json b/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json index 4b31438335e..1019a377f7e 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataform", - "version": "0.1.0", + "version": "0.2.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataform/samples/package.json b/packages/google-cloud-dataform/samples/package.json index 0f7efc41d26..54832549aed 100644 --- a/packages/google-cloud-dataform/samples/package.json +++ b/packages/google-cloud-dataform/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/dataform": "^0.1.0" + "@google-cloud/dataform": "^0.2.0" }, "devDependencies": { "c8": "^7.1.0", From 4754936156b8a956ea61ced3403802b60b20c7b0 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 29 Sep 2022 01:48:16 +0000 Subject: [PATCH 19/80] chore: override API mixins when needed (#21) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 477248447 Source-Link: https://github.com/googleapis/googleapis/commit/4689c7380444972caf11fd1b96e7ec1f864b7dfb Source-Link: https://github.com/googleapis/googleapis-gen/commit/c4059786a5cd805a0151d95b477fbc486bcbcedc Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzQwNTk3ODZhNWNkODA1YTAxNTFkOTViNDc3ZmJjNDg2YmNiY2VkYyJ9 test: use fully qualified request type name in tests PiperOrigin-RevId: 475685359 Source-Link: https://github.com/googleapis/googleapis/commit/7a129736313ceb1f277c3b7f7e16d2e04cc901dd Source-Link: https://github.com/googleapis/googleapis-gen/commit/370c729e2ba062a167449c27882ba5f379c5c34d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzcwYzcyOWUyYmEwNjJhMTY3NDQ5YzI3ODgyYmE1ZjM3OWM1YzM0ZCJ9 --- .../test/gapic_dataform_v1alpha2.ts | 844 ++++++++++-------- .../test/gapic_dataform_v1beta1.ts | 844 ++++++++++-------- 2 files changed, 942 insertions(+), 746 deletions(-) diff --git a/packages/google-cloud-dataform/test/gapic_dataform_v1alpha2.ts b/packages/google-cloud-dataform/test/gapic_dataform_v1alpha2.ts index a92ac94ceb0..32061a137fc 100644 --- a/packages/google-cloud-dataform/test/gapic_dataform_v1alpha2.ts +++ b/packages/google-cloud-dataform/test/gapic_dataform_v1alpha2.ts @@ -235,9 +235,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.GetRepositoryRequest() ); - const defaultValue1 = getTypeDefaultValue('GetRepositoryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.GetRepositoryRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -265,9 +266,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.GetRepositoryRequest() ); - const defaultValue1 = getTypeDefaultValue('GetRepositoryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.GetRepositoryRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -311,9 +313,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.GetRepositoryRequest() ); - const defaultValue1 = getTypeDefaultValue('GetRepositoryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.GetRepositoryRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -341,9 +344,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.GetRepositoryRequest() ); - const defaultValue1 = getTypeDefaultValue('GetRepositoryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.GetRepositoryRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -361,9 +365,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CreateRepositoryRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateRepositoryRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CreateRepositoryRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -391,9 +396,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CreateRepositoryRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateRepositoryRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CreateRepositoryRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -437,9 +443,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CreateRepositoryRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateRepositoryRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CreateRepositoryRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -467,9 +474,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CreateRepositoryRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateRepositoryRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CreateRepositoryRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -488,10 +496,10 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest() ); request.repository ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateRepositoryRequest', [ - 'repository', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest', + ['repository', 'name'] + ); request.repository.name = defaultValue1; const expectedHeaderRequestParams = `repository.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -520,10 +528,10 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest() ); request.repository ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateRepositoryRequest', [ - 'repository', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest', + ['repository', 'name'] + ); request.repository.name = defaultValue1; const expectedHeaderRequestParams = `repository.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -568,10 +576,10 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest() ); request.repository ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateRepositoryRequest', [ - 'repository', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest', + ['repository', 'name'] + ); request.repository.name = defaultValue1; const expectedHeaderRequestParams = `repository.name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -600,10 +608,10 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest() ); request.repository ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateRepositoryRequest', [ - 'repository', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest', + ['repository', 'name'] + ); request.repository.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -621,9 +629,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteRepositoryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -651,9 +660,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteRepositoryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -697,9 +707,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteRepositoryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -727,9 +738,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteRepositoryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -747,9 +759,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchRemoteBranchesRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -778,9 +791,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchRemoteBranchesRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -824,9 +838,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchRemoteBranchesRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -854,9 +869,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchRemoteBranchesRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -874,9 +890,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.GetWorkspaceRequest() ); - const defaultValue1 = getTypeDefaultValue('GetWorkspaceRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.GetWorkspaceRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -904,9 +921,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.GetWorkspaceRequest() ); - const defaultValue1 = getTypeDefaultValue('GetWorkspaceRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.GetWorkspaceRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -950,9 +968,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.GetWorkspaceRequest() ); - const defaultValue1 = getTypeDefaultValue('GetWorkspaceRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.GetWorkspaceRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -980,9 +999,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.GetWorkspaceRequest() ); - const defaultValue1 = getTypeDefaultValue('GetWorkspaceRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.GetWorkspaceRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1000,9 +1020,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateWorkspaceRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1030,9 +1051,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateWorkspaceRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1076,9 +1098,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateWorkspaceRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1106,9 +1129,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateWorkspaceRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1126,9 +1150,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteWorkspaceRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1156,9 +1181,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteWorkspaceRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1202,9 +1228,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteWorkspaceRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1232,9 +1259,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteWorkspaceRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1252,9 +1280,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest() ); - const defaultValue1 = getTypeDefaultValue('InstallNpmPackagesRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1283,9 +1312,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest() ); - const defaultValue1 = getTypeDefaultValue('InstallNpmPackagesRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1329,9 +1359,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest() ); - const defaultValue1 = getTypeDefaultValue('InstallNpmPackagesRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1359,9 +1390,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest() ); - const defaultValue1 = getTypeDefaultValue('InstallNpmPackagesRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1379,9 +1411,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.PullGitCommitsRequest() ); - const defaultValue1 = getTypeDefaultValue('PullGitCommitsRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.PullGitCommitsRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1409,9 +1442,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.PullGitCommitsRequest() ); - const defaultValue1 = getTypeDefaultValue('PullGitCommitsRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.PullGitCommitsRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1455,9 +1489,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.PullGitCommitsRequest() ); - const defaultValue1 = getTypeDefaultValue('PullGitCommitsRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.PullGitCommitsRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1485,9 +1520,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.PullGitCommitsRequest() ); - const defaultValue1 = getTypeDefaultValue('PullGitCommitsRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.PullGitCommitsRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1505,9 +1541,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.PushGitCommitsRequest() ); - const defaultValue1 = getTypeDefaultValue('PushGitCommitsRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.PushGitCommitsRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1535,9 +1572,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.PushGitCommitsRequest() ); - const defaultValue1 = getTypeDefaultValue('PushGitCommitsRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.PushGitCommitsRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1581,9 +1619,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.PushGitCommitsRequest() ); - const defaultValue1 = getTypeDefaultValue('PushGitCommitsRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.PushGitCommitsRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1611,9 +1650,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.PushGitCommitsRequest() ); - const defaultValue1 = getTypeDefaultValue('PushGitCommitsRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.PushGitCommitsRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1631,9 +1671,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchFileGitStatusesRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1662,9 +1703,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchFileGitStatusesRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1708,9 +1750,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchFileGitStatusesRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1738,9 +1781,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchFileGitStatusesRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1758,9 +1802,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchGitAheadBehindRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1789,9 +1834,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchGitAheadBehindRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1835,9 +1881,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchGitAheadBehindRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1865,9 +1912,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchGitAheadBehindRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1886,7 +1934,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CommitWorkspaceChangesRequest', + '.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest', ['name'] ); request.name = defaultValue1; @@ -1918,7 +1966,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CommitWorkspaceChangesRequest', + '.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest', ['name'] ); request.name = defaultValue1; @@ -1965,7 +2013,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CommitWorkspaceChangesRequest', + '.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest', ['name'] ); request.name = defaultValue1; @@ -1999,7 +2047,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CommitWorkspaceChangesRequest', + '.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest', ['name'] ); request.name = defaultValue1; @@ -2023,7 +2071,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ResetWorkspaceChangesRequest', + '.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest', ['name'] ); request.name = defaultValue1; @@ -2055,7 +2103,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ResetWorkspaceChangesRequest', + '.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest', ['name'] ); request.name = defaultValue1; @@ -2102,7 +2150,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ResetWorkspaceChangesRequest', + '.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest', ['name'] ); request.name = defaultValue1; @@ -2136,7 +2184,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ResetWorkspaceChangesRequest', + '.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest', ['name'] ); request.name = defaultValue1; @@ -2159,9 +2207,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchFileDiffRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchFileDiffRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchFileDiffRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2189,9 +2238,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchFileDiffRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchFileDiffRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchFileDiffRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2235,9 +2285,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchFileDiffRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchFileDiffRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchFileDiffRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2265,9 +2316,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.FetchFileDiffRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchFileDiffRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.FetchFileDiffRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -2285,9 +2337,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MakeDirectoryRequest() ); - const defaultValue1 = getTypeDefaultValue('MakeDirectoryRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.MakeDirectoryRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2315,9 +2368,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MakeDirectoryRequest() ); - const defaultValue1 = getTypeDefaultValue('MakeDirectoryRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.MakeDirectoryRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2361,9 +2415,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MakeDirectoryRequest() ); - const defaultValue1 = getTypeDefaultValue('MakeDirectoryRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.MakeDirectoryRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2391,9 +2446,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MakeDirectoryRequest() ); - const defaultValue1 = getTypeDefaultValue('MakeDirectoryRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.MakeDirectoryRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -2411,9 +2467,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest() ); - const defaultValue1 = getTypeDefaultValue('RemoveDirectoryRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2441,9 +2498,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest() ); - const defaultValue1 = getTypeDefaultValue('RemoveDirectoryRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2487,9 +2545,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest() ); - const defaultValue1 = getTypeDefaultValue('RemoveDirectoryRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2517,9 +2576,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest() ); - const defaultValue1 = getTypeDefaultValue('RemoveDirectoryRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -2537,9 +2597,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MoveDirectoryRequest() ); - const defaultValue1 = getTypeDefaultValue('MoveDirectoryRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.MoveDirectoryRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2567,9 +2628,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MoveDirectoryRequest() ); - const defaultValue1 = getTypeDefaultValue('MoveDirectoryRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.MoveDirectoryRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2613,9 +2675,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MoveDirectoryRequest() ); - const defaultValue1 = getTypeDefaultValue('MoveDirectoryRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.MoveDirectoryRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2643,9 +2706,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MoveDirectoryRequest() ); - const defaultValue1 = getTypeDefaultValue('MoveDirectoryRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.MoveDirectoryRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -2663,9 +2727,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ReadFileRequest() ); - const defaultValue1 = getTypeDefaultValue('ReadFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ReadFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2693,9 +2758,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ReadFileRequest() ); - const defaultValue1 = getTypeDefaultValue('ReadFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ReadFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2739,9 +2805,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ReadFileRequest() ); - const defaultValue1 = getTypeDefaultValue('ReadFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ReadFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2766,9 +2833,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ReadFileRequest() ); - const defaultValue1 = getTypeDefaultValue('ReadFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ReadFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -2786,9 +2854,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.RemoveFileRequest() ); - const defaultValue1 = getTypeDefaultValue('RemoveFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.RemoveFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2816,9 +2885,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.RemoveFileRequest() ); - const defaultValue1 = getTypeDefaultValue('RemoveFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.RemoveFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2862,9 +2932,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.RemoveFileRequest() ); - const defaultValue1 = getTypeDefaultValue('RemoveFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.RemoveFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2892,9 +2963,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.RemoveFileRequest() ); - const defaultValue1 = getTypeDefaultValue('RemoveFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.RemoveFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -2912,9 +2984,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MoveFileRequest() ); - const defaultValue1 = getTypeDefaultValue('MoveFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.MoveFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2942,9 +3015,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MoveFileRequest() ); - const defaultValue1 = getTypeDefaultValue('MoveFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.MoveFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2988,9 +3062,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MoveFileRequest() ); - const defaultValue1 = getTypeDefaultValue('MoveFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.MoveFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3015,9 +3090,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.MoveFileRequest() ); - const defaultValue1 = getTypeDefaultValue('MoveFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.MoveFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -3035,9 +3111,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.WriteFileRequest() ); - const defaultValue1 = getTypeDefaultValue('WriteFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.WriteFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -3065,9 +3142,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.WriteFileRequest() ); - const defaultValue1 = getTypeDefaultValue('WriteFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.WriteFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -3111,9 +3189,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.WriteFileRequest() ); - const defaultValue1 = getTypeDefaultValue('WriteFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.WriteFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3138,9 +3217,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.WriteFileRequest() ); - const defaultValue1 = getTypeDefaultValue('WriteFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.WriteFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -3158,9 +3238,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.GetCompilationResultRequest() ); - const defaultValue1 = getTypeDefaultValue('GetCompilationResultRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.GetCompilationResultRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -3189,9 +3270,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.GetCompilationResultRequest() ); - const defaultValue1 = getTypeDefaultValue('GetCompilationResultRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.GetCompilationResultRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -3235,9 +3317,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.GetCompilationResultRequest() ); - const defaultValue1 = getTypeDefaultValue('GetCompilationResultRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.GetCompilationResultRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3265,9 +3348,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.GetCompilationResultRequest() ); - const defaultValue1 = getTypeDefaultValue('GetCompilationResultRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.GetCompilationResultRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -3286,7 +3370,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateCompilationResultRequest', + '.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest', ['parent'] ); request.parent = defaultValue1; @@ -3318,7 +3402,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateCompilationResultRequest', + '.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest', ['parent'] ); request.parent = defaultValue1; @@ -3365,7 +3449,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateCompilationResultRequest', + '.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest', ['parent'] ); request.parent = defaultValue1; @@ -3399,7 +3483,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateCompilationResultRequest', + '.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest', ['parent'] ); request.parent = defaultValue1; @@ -3423,7 +3507,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetWorkflowInvocationRequest', + '.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest', ['name'] ); request.name = defaultValue1; @@ -3455,7 +3539,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetWorkflowInvocationRequest', + '.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest', ['name'] ); request.name = defaultValue1; @@ -3502,7 +3586,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetWorkflowInvocationRequest', + '.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest', ['name'] ); request.name = defaultValue1; @@ -3536,7 +3620,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetWorkflowInvocationRequest', + '.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest', ['name'] ); request.name = defaultValue1; @@ -3560,7 +3644,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateWorkflowInvocationRequest', + '.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest', ['parent'] ); request.parent = defaultValue1; @@ -3592,7 +3676,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateWorkflowInvocationRequest', + '.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest', ['parent'] ); request.parent = defaultValue1; @@ -3639,7 +3723,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateWorkflowInvocationRequest', + '.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest', ['parent'] ); request.parent = defaultValue1; @@ -3673,7 +3757,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateWorkflowInvocationRequest', + '.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest', ['parent'] ); request.parent = defaultValue1; @@ -3697,7 +3781,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeleteWorkflowInvocationRequest', + '.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest', ['name'] ); request.name = defaultValue1; @@ -3729,7 +3813,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeleteWorkflowInvocationRequest', + '.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest', ['name'] ); request.name = defaultValue1; @@ -3776,7 +3860,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeleteWorkflowInvocationRequest', + '.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest', ['name'] ); request.name = defaultValue1; @@ -3810,7 +3894,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeleteWorkflowInvocationRequest', + '.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest', ['name'] ); request.name = defaultValue1; @@ -3834,7 +3918,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CancelWorkflowInvocationRequest', + '.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest', ['name'] ); request.name = defaultValue1; @@ -3866,7 +3950,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CancelWorkflowInvocationRequest', + '.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest', ['name'] ); request.name = defaultValue1; @@ -3913,7 +3997,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CancelWorkflowInvocationRequest', + '.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest', ['name'] ); request.name = defaultValue1; @@ -3947,7 +4031,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CancelWorkflowInvocationRequest', + '.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest', ['name'] ); request.name = defaultValue1; @@ -3970,9 +4054,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListRepositoriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListRepositoriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListRepositoriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -4008,9 +4093,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListRepositoriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListRepositoriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListRepositoriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -4062,9 +4148,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListRepositoriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListRepositoriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListRepositoriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -4092,9 +4179,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListRepositoriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListRepositoriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListRepositoriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -4152,9 +4240,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListRepositoriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListRepositoriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListRepositoriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -4201,9 +4290,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListRepositoriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListRepositoriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListRepositoriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -4249,9 +4339,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListRepositoriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListRepositoriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListRepositoriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -4291,9 +4382,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListWorkspacesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListWorkspacesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListWorkspacesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -4329,9 +4421,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListWorkspacesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListWorkspacesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListWorkspacesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -4383,9 +4476,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListWorkspacesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListWorkspacesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListWorkspacesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -4413,9 +4507,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListWorkspacesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListWorkspacesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListWorkspacesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -4472,9 +4567,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListWorkspacesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListWorkspacesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListWorkspacesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -4520,9 +4616,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListWorkspacesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListWorkspacesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListWorkspacesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -4568,9 +4665,10 @@ describe('v1alpha2.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1alpha2.ListWorkspacesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListWorkspacesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1alpha2.ListWorkspacesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -4611,7 +4709,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryDirectoryContentsRequest', + '.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest', ['workspace'] ); request.workspace = defaultValue1; @@ -4651,7 +4749,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryDirectoryContentsRequest', + '.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest', ['workspace'] ); request.workspace = defaultValue1; @@ -4708,7 +4806,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryDirectoryContentsRequest', + '.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest', ['workspace'] ); request.workspace = defaultValue1; @@ -4742,7 +4840,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryDirectoryContentsRequest', + '.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest', ['workspace'] ); request.workspace = defaultValue1; @@ -4811,7 +4909,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryDirectoryContentsRequest', + '.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest', ['workspace'] ); request.workspace = defaultValue1; @@ -4869,7 +4967,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryDirectoryContentsRequest', + '.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest', ['workspace'] ); request.workspace = defaultValue1; @@ -4923,7 +5021,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryDirectoryContentsRequest', + '.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest', ['workspace'] ); request.workspace = defaultValue1; @@ -4970,7 +5068,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCompilationResultsRequest', + '.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest', ['parent'] ); request.parent = defaultValue1; @@ -5010,7 +5108,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCompilationResultsRequest', + '.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest', ['parent'] ); request.parent = defaultValue1; @@ -5067,7 +5165,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCompilationResultsRequest', + '.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest', ['parent'] ); request.parent = defaultValue1; @@ -5101,7 +5199,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCompilationResultsRequest', + '.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest', ['parent'] ); request.parent = defaultValue1; @@ -5170,7 +5268,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCompilationResultsRequest', + '.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest', ['parent'] ); request.parent = defaultValue1; @@ -5228,7 +5326,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCompilationResultsRequest', + '.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest', ['parent'] ); request.parent = defaultValue1; @@ -5282,7 +5380,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCompilationResultsRequest', + '.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest', ['parent'] ); request.parent = defaultValue1; @@ -5329,7 +5427,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryCompilationResultActionsRequest', + '.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest', ['name'] ); request.name = defaultValue1; @@ -5369,7 +5467,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryCompilationResultActionsRequest', + '.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest', ['name'] ); request.name = defaultValue1; @@ -5426,7 +5524,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryCompilationResultActionsRequest', + '.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest', ['name'] ); request.name = defaultValue1; @@ -5460,7 +5558,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryCompilationResultActionsRequest', + '.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest', ['name'] ); request.name = defaultValue1; @@ -5532,7 +5630,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryCompilationResultActionsRequest', + '.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest', ['name'] ); request.name = defaultValue1; @@ -5593,7 +5691,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryCompilationResultActionsRequest', + '.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest', ['name'] ); request.name = defaultValue1; @@ -5647,7 +5745,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryCompilationResultActionsRequest', + '.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest', ['name'] ); request.name = defaultValue1; @@ -5694,7 +5792,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListWorkflowInvocationsRequest', + '.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest', ['parent'] ); request.parent = defaultValue1; @@ -5734,7 +5832,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListWorkflowInvocationsRequest', + '.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest', ['parent'] ); request.parent = defaultValue1; @@ -5791,7 +5889,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListWorkflowInvocationsRequest', + '.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest', ['parent'] ); request.parent = defaultValue1; @@ -5825,7 +5923,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListWorkflowInvocationsRequest', + '.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest', ['parent'] ); request.parent = defaultValue1; @@ -5894,7 +5992,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListWorkflowInvocationsRequest', + '.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest', ['parent'] ); request.parent = defaultValue1; @@ -5952,7 +6050,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListWorkflowInvocationsRequest', + '.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest', ['parent'] ); request.parent = defaultValue1; @@ -6006,7 +6104,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListWorkflowInvocationsRequest', + '.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest', ['parent'] ); request.parent = defaultValue1; @@ -6053,7 +6151,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryWorkflowInvocationActionsRequest', + '.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest', ['name'] ); request.name = defaultValue1; @@ -6093,7 +6191,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryWorkflowInvocationActionsRequest', + '.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest', ['name'] ); request.name = defaultValue1; @@ -6150,7 +6248,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryWorkflowInvocationActionsRequest', + '.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest', ['name'] ); request.name = defaultValue1; @@ -6184,7 +6282,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryWorkflowInvocationActionsRequest', + '.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest', ['name'] ); request.name = defaultValue1; @@ -6256,7 +6354,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryWorkflowInvocationActionsRequest', + '.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest', ['name'] ); request.name = defaultValue1; @@ -6317,7 +6415,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryWorkflowInvocationActionsRequest', + '.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest', ['name'] ); request.name = defaultValue1; @@ -6371,7 +6469,7 @@ describe('v1alpha2.DataformClient', () => { new protos.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryWorkflowInvocationActionsRequest', + '.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest', ['name'] ); request.name = defaultValue1; diff --git a/packages/google-cloud-dataform/test/gapic_dataform_v1beta1.ts b/packages/google-cloud-dataform/test/gapic_dataform_v1beta1.ts index d3e66a349b4..c751bbbd4b7 100644 --- a/packages/google-cloud-dataform/test/gapic_dataform_v1beta1.ts +++ b/packages/google-cloud-dataform/test/gapic_dataform_v1beta1.ts @@ -235,9 +235,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetRepositoryRequest() ); - const defaultValue1 = getTypeDefaultValue('GetRepositoryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.GetRepositoryRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -265,9 +266,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetRepositoryRequest() ); - const defaultValue1 = getTypeDefaultValue('GetRepositoryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.GetRepositoryRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -311,9 +313,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetRepositoryRequest() ); - const defaultValue1 = getTypeDefaultValue('GetRepositoryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.GetRepositoryRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -341,9 +344,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetRepositoryRequest() ); - const defaultValue1 = getTypeDefaultValue('GetRepositoryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.GetRepositoryRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -361,9 +365,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateRepositoryRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateRepositoryRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CreateRepositoryRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -391,9 +396,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateRepositoryRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateRepositoryRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CreateRepositoryRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -437,9 +443,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateRepositoryRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateRepositoryRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CreateRepositoryRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -467,9 +474,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateRepositoryRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateRepositoryRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CreateRepositoryRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -488,10 +496,10 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.UpdateRepositoryRequest() ); request.repository ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateRepositoryRequest', [ - 'repository', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.UpdateRepositoryRequest', + ['repository', 'name'] + ); request.repository.name = defaultValue1; const expectedHeaderRequestParams = `repository.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -520,10 +528,10 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.UpdateRepositoryRequest() ); request.repository ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateRepositoryRequest', [ - 'repository', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.UpdateRepositoryRequest', + ['repository', 'name'] + ); request.repository.name = defaultValue1; const expectedHeaderRequestParams = `repository.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -568,10 +576,10 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.UpdateRepositoryRequest() ); request.repository ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateRepositoryRequest', [ - 'repository', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.UpdateRepositoryRequest', + ['repository', 'name'] + ); request.repository.name = defaultValue1; const expectedHeaderRequestParams = `repository.name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -600,10 +608,10 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.UpdateRepositoryRequest() ); request.repository ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateRepositoryRequest', [ - 'repository', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.UpdateRepositoryRequest', + ['repository', 'name'] + ); request.repository.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -621,9 +629,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteRepositoryRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteRepositoryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.DeleteRepositoryRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -651,9 +660,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteRepositoryRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteRepositoryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.DeleteRepositoryRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -697,9 +707,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteRepositoryRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteRepositoryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.DeleteRepositoryRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -727,9 +738,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteRepositoryRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteRepositoryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.DeleteRepositoryRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -747,9 +759,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchRemoteBranchesRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -778,9 +791,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchRemoteBranchesRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -824,9 +838,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchRemoteBranchesRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -854,9 +869,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchRemoteBranchesRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -874,9 +890,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetWorkspaceRequest() ); - const defaultValue1 = getTypeDefaultValue('GetWorkspaceRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.GetWorkspaceRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -904,9 +921,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetWorkspaceRequest() ); - const defaultValue1 = getTypeDefaultValue('GetWorkspaceRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.GetWorkspaceRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -950,9 +968,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetWorkspaceRequest() ); - const defaultValue1 = getTypeDefaultValue('GetWorkspaceRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.GetWorkspaceRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -980,9 +999,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetWorkspaceRequest() ); - const defaultValue1 = getTypeDefaultValue('GetWorkspaceRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.GetWorkspaceRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1000,9 +1020,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateWorkspaceRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateWorkspaceRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CreateWorkspaceRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1030,9 +1051,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateWorkspaceRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateWorkspaceRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CreateWorkspaceRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1076,9 +1098,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateWorkspaceRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateWorkspaceRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CreateWorkspaceRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1106,9 +1129,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateWorkspaceRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateWorkspaceRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.CreateWorkspaceRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1126,9 +1150,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteWorkspaceRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1156,9 +1181,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteWorkspaceRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1202,9 +1228,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteWorkspaceRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1232,9 +1259,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteWorkspaceRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1252,9 +1280,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest() ); - const defaultValue1 = getTypeDefaultValue('InstallNpmPackagesRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1283,9 +1312,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest() ); - const defaultValue1 = getTypeDefaultValue('InstallNpmPackagesRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1329,9 +1359,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest() ); - const defaultValue1 = getTypeDefaultValue('InstallNpmPackagesRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1359,9 +1390,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest() ); - const defaultValue1 = getTypeDefaultValue('InstallNpmPackagesRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1379,9 +1411,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.PullGitCommitsRequest() ); - const defaultValue1 = getTypeDefaultValue('PullGitCommitsRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.PullGitCommitsRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1409,9 +1442,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.PullGitCommitsRequest() ); - const defaultValue1 = getTypeDefaultValue('PullGitCommitsRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.PullGitCommitsRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1455,9 +1489,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.PullGitCommitsRequest() ); - const defaultValue1 = getTypeDefaultValue('PullGitCommitsRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.PullGitCommitsRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1485,9 +1520,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.PullGitCommitsRequest() ); - const defaultValue1 = getTypeDefaultValue('PullGitCommitsRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.PullGitCommitsRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1505,9 +1541,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.PushGitCommitsRequest() ); - const defaultValue1 = getTypeDefaultValue('PushGitCommitsRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.PushGitCommitsRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1535,9 +1572,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.PushGitCommitsRequest() ); - const defaultValue1 = getTypeDefaultValue('PushGitCommitsRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.PushGitCommitsRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1581,9 +1619,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.PushGitCommitsRequest() ); - const defaultValue1 = getTypeDefaultValue('PushGitCommitsRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.PushGitCommitsRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1611,9 +1650,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.PushGitCommitsRequest() ); - const defaultValue1 = getTypeDefaultValue('PushGitCommitsRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.PushGitCommitsRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1631,9 +1671,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchFileGitStatusesRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1662,9 +1703,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchFileGitStatusesRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1708,9 +1750,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchFileGitStatusesRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1738,9 +1781,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchFileGitStatusesRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1758,9 +1802,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchGitAheadBehindRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1789,9 +1834,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchGitAheadBehindRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1835,9 +1881,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchGitAheadBehindRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1865,9 +1912,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchGitAheadBehindRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1886,7 +1934,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CommitWorkspaceChangesRequest', + '.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest', ['name'] ); request.name = defaultValue1; @@ -1918,7 +1966,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CommitWorkspaceChangesRequest', + '.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest', ['name'] ); request.name = defaultValue1; @@ -1965,7 +2013,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CommitWorkspaceChangesRequest', + '.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest', ['name'] ); request.name = defaultValue1; @@ -1999,7 +2047,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CommitWorkspaceChangesRequest', + '.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest', ['name'] ); request.name = defaultValue1; @@ -2023,7 +2071,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ResetWorkspaceChangesRequest', + '.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest', ['name'] ); request.name = defaultValue1; @@ -2055,7 +2103,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ResetWorkspaceChangesRequest', + '.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest', ['name'] ); request.name = defaultValue1; @@ -2102,7 +2150,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ResetWorkspaceChangesRequest', + '.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest', ['name'] ); request.name = defaultValue1; @@ -2136,7 +2184,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ResetWorkspaceChangesRequest', + '.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest', ['name'] ); request.name = defaultValue1; @@ -2159,9 +2207,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchFileDiffRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchFileDiffRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchFileDiffRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2189,9 +2238,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchFileDiffRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchFileDiffRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchFileDiffRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2235,9 +2285,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchFileDiffRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchFileDiffRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchFileDiffRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2265,9 +2316,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchFileDiffRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchFileDiffRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.FetchFileDiffRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -2285,9 +2337,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MakeDirectoryRequest() ); - const defaultValue1 = getTypeDefaultValue('MakeDirectoryRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.MakeDirectoryRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2315,9 +2368,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MakeDirectoryRequest() ); - const defaultValue1 = getTypeDefaultValue('MakeDirectoryRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.MakeDirectoryRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2361,9 +2415,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MakeDirectoryRequest() ); - const defaultValue1 = getTypeDefaultValue('MakeDirectoryRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.MakeDirectoryRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2391,9 +2446,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MakeDirectoryRequest() ); - const defaultValue1 = getTypeDefaultValue('MakeDirectoryRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.MakeDirectoryRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -2411,9 +2467,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.RemoveDirectoryRequest() ); - const defaultValue1 = getTypeDefaultValue('RemoveDirectoryRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.RemoveDirectoryRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2441,9 +2498,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.RemoveDirectoryRequest() ); - const defaultValue1 = getTypeDefaultValue('RemoveDirectoryRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.RemoveDirectoryRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2487,9 +2545,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.RemoveDirectoryRequest() ); - const defaultValue1 = getTypeDefaultValue('RemoveDirectoryRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.RemoveDirectoryRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2517,9 +2576,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.RemoveDirectoryRequest() ); - const defaultValue1 = getTypeDefaultValue('RemoveDirectoryRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.RemoveDirectoryRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -2537,9 +2597,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MoveDirectoryRequest() ); - const defaultValue1 = getTypeDefaultValue('MoveDirectoryRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.MoveDirectoryRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2567,9 +2628,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MoveDirectoryRequest() ); - const defaultValue1 = getTypeDefaultValue('MoveDirectoryRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.MoveDirectoryRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2613,9 +2675,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MoveDirectoryRequest() ); - const defaultValue1 = getTypeDefaultValue('MoveDirectoryRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.MoveDirectoryRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2643,9 +2706,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MoveDirectoryRequest() ); - const defaultValue1 = getTypeDefaultValue('MoveDirectoryRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.MoveDirectoryRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -2663,9 +2727,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ReadFileRequest() ); - const defaultValue1 = getTypeDefaultValue('ReadFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ReadFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2693,9 +2758,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ReadFileRequest() ); - const defaultValue1 = getTypeDefaultValue('ReadFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ReadFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2739,9 +2805,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ReadFileRequest() ); - const defaultValue1 = getTypeDefaultValue('ReadFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ReadFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2766,9 +2833,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ReadFileRequest() ); - const defaultValue1 = getTypeDefaultValue('ReadFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ReadFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -2786,9 +2854,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.RemoveFileRequest() ); - const defaultValue1 = getTypeDefaultValue('RemoveFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.RemoveFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2816,9 +2885,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.RemoveFileRequest() ); - const defaultValue1 = getTypeDefaultValue('RemoveFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.RemoveFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2862,9 +2932,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.RemoveFileRequest() ); - const defaultValue1 = getTypeDefaultValue('RemoveFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.RemoveFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2892,9 +2963,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.RemoveFileRequest() ); - const defaultValue1 = getTypeDefaultValue('RemoveFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.RemoveFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -2912,9 +2984,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MoveFileRequest() ); - const defaultValue1 = getTypeDefaultValue('MoveFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.MoveFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2942,9 +3015,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MoveFileRequest() ); - const defaultValue1 = getTypeDefaultValue('MoveFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.MoveFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2988,9 +3062,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MoveFileRequest() ); - const defaultValue1 = getTypeDefaultValue('MoveFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.MoveFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3015,9 +3090,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MoveFileRequest() ); - const defaultValue1 = getTypeDefaultValue('MoveFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.MoveFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -3035,9 +3111,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.WriteFileRequest() ); - const defaultValue1 = getTypeDefaultValue('WriteFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.WriteFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -3065,9 +3142,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.WriteFileRequest() ); - const defaultValue1 = getTypeDefaultValue('WriteFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.WriteFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -3111,9 +3189,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.WriteFileRequest() ); - const defaultValue1 = getTypeDefaultValue('WriteFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.WriteFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedHeaderRequestParams = `workspace=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3138,9 +3217,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.WriteFileRequest() ); - const defaultValue1 = getTypeDefaultValue('WriteFileRequest', [ - 'workspace', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.WriteFileRequest', + ['workspace'] + ); request.workspace = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -3158,9 +3238,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetCompilationResultRequest() ); - const defaultValue1 = getTypeDefaultValue('GetCompilationResultRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.GetCompilationResultRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -3189,9 +3270,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetCompilationResultRequest() ); - const defaultValue1 = getTypeDefaultValue('GetCompilationResultRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.GetCompilationResultRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -3235,9 +3317,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetCompilationResultRequest() ); - const defaultValue1 = getTypeDefaultValue('GetCompilationResultRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.GetCompilationResultRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3265,9 +3348,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetCompilationResultRequest() ); - const defaultValue1 = getTypeDefaultValue('GetCompilationResultRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.GetCompilationResultRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -3286,7 +3370,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.CreateCompilationResultRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateCompilationResultRequest', + '.google.cloud.dataform.v1beta1.CreateCompilationResultRequest', ['parent'] ); request.parent = defaultValue1; @@ -3318,7 +3402,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.CreateCompilationResultRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateCompilationResultRequest', + '.google.cloud.dataform.v1beta1.CreateCompilationResultRequest', ['parent'] ); request.parent = defaultValue1; @@ -3365,7 +3449,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.CreateCompilationResultRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateCompilationResultRequest', + '.google.cloud.dataform.v1beta1.CreateCompilationResultRequest', ['parent'] ); request.parent = defaultValue1; @@ -3399,7 +3483,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.CreateCompilationResultRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateCompilationResultRequest', + '.google.cloud.dataform.v1beta1.CreateCompilationResultRequest', ['parent'] ); request.parent = defaultValue1; @@ -3423,7 +3507,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetWorkflowInvocationRequest', + '.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest', ['name'] ); request.name = defaultValue1; @@ -3455,7 +3539,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetWorkflowInvocationRequest', + '.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest', ['name'] ); request.name = defaultValue1; @@ -3502,7 +3586,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetWorkflowInvocationRequest', + '.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest', ['name'] ); request.name = defaultValue1; @@ -3536,7 +3620,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetWorkflowInvocationRequest', + '.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest', ['name'] ); request.name = defaultValue1; @@ -3560,7 +3644,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateWorkflowInvocationRequest', + '.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest', ['parent'] ); request.parent = defaultValue1; @@ -3592,7 +3676,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateWorkflowInvocationRequest', + '.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest', ['parent'] ); request.parent = defaultValue1; @@ -3639,7 +3723,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateWorkflowInvocationRequest', + '.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest', ['parent'] ); request.parent = defaultValue1; @@ -3673,7 +3757,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateWorkflowInvocationRequest', + '.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest', ['parent'] ); request.parent = defaultValue1; @@ -3697,7 +3781,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeleteWorkflowInvocationRequest', + '.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest', ['name'] ); request.name = defaultValue1; @@ -3729,7 +3813,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeleteWorkflowInvocationRequest', + '.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest', ['name'] ); request.name = defaultValue1; @@ -3776,7 +3860,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeleteWorkflowInvocationRequest', + '.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest', ['name'] ); request.name = defaultValue1; @@ -3810,7 +3894,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeleteWorkflowInvocationRequest', + '.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest', ['name'] ); request.name = defaultValue1; @@ -3834,7 +3918,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CancelWorkflowInvocationRequest', + '.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest', ['name'] ); request.name = defaultValue1; @@ -3866,7 +3950,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CancelWorkflowInvocationRequest', + '.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest', ['name'] ); request.name = defaultValue1; @@ -3913,7 +3997,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CancelWorkflowInvocationRequest', + '.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest', ['name'] ); request.name = defaultValue1; @@ -3947,7 +4031,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CancelWorkflowInvocationRequest', + '.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest', ['name'] ); request.name = defaultValue1; @@ -3970,9 +4054,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListRepositoriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListRepositoriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -4008,9 +4093,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListRepositoriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListRepositoriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -4062,9 +4148,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListRepositoriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListRepositoriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -4092,9 +4179,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListRepositoriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListRepositoriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -4151,9 +4239,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListRepositoriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListRepositoriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -4199,9 +4288,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListRepositoriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListRepositoriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -4247,9 +4337,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListRepositoriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListRepositoriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -4289,9 +4380,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListWorkspacesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListWorkspacesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -4327,9 +4419,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListWorkspacesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListWorkspacesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -4381,9 +4474,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListWorkspacesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListWorkspacesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -4411,9 +4505,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListWorkspacesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListWorkspacesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -4470,9 +4565,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListWorkspacesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListWorkspacesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -4518,9 +4614,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListWorkspacesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListWorkspacesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -4566,9 +4663,10 @@ describe('v1beta1.DataformClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListWorkspacesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataform.v1beta1.ListWorkspacesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -4608,7 +4706,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryDirectoryContentsRequest', + '.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest', ['workspace'] ); request.workspace = defaultValue1; @@ -4648,7 +4746,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryDirectoryContentsRequest', + '.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest', ['workspace'] ); request.workspace = defaultValue1; @@ -4705,7 +4803,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryDirectoryContentsRequest', + '.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest', ['workspace'] ); request.workspace = defaultValue1; @@ -4739,7 +4837,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryDirectoryContentsRequest', + '.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest', ['workspace'] ); request.workspace = defaultValue1; @@ -4808,7 +4906,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryDirectoryContentsRequest', + '.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest', ['workspace'] ); request.workspace = defaultValue1; @@ -4866,7 +4964,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryDirectoryContentsRequest', + '.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest', ['workspace'] ); request.workspace = defaultValue1; @@ -4920,7 +5018,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryDirectoryContentsRequest', + '.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest', ['workspace'] ); request.workspace = defaultValue1; @@ -4967,7 +5065,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCompilationResultsRequest', + '.google.cloud.dataform.v1beta1.ListCompilationResultsRequest', ['parent'] ); request.parent = defaultValue1; @@ -5007,7 +5105,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCompilationResultsRequest', + '.google.cloud.dataform.v1beta1.ListCompilationResultsRequest', ['parent'] ); request.parent = defaultValue1; @@ -5064,7 +5162,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCompilationResultsRequest', + '.google.cloud.dataform.v1beta1.ListCompilationResultsRequest', ['parent'] ); request.parent = defaultValue1; @@ -5098,7 +5196,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCompilationResultsRequest', + '.google.cloud.dataform.v1beta1.ListCompilationResultsRequest', ['parent'] ); request.parent = defaultValue1; @@ -5167,7 +5265,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCompilationResultsRequest', + '.google.cloud.dataform.v1beta1.ListCompilationResultsRequest', ['parent'] ); request.parent = defaultValue1; @@ -5225,7 +5323,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCompilationResultsRequest', + '.google.cloud.dataform.v1beta1.ListCompilationResultsRequest', ['parent'] ); request.parent = defaultValue1; @@ -5279,7 +5377,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCompilationResultsRequest', + '.google.cloud.dataform.v1beta1.ListCompilationResultsRequest', ['parent'] ); request.parent = defaultValue1; @@ -5326,7 +5424,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryCompilationResultActionsRequest', + '.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest', ['name'] ); request.name = defaultValue1; @@ -5366,7 +5464,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryCompilationResultActionsRequest', + '.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest', ['name'] ); request.name = defaultValue1; @@ -5423,7 +5521,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryCompilationResultActionsRequest', + '.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest', ['name'] ); request.name = defaultValue1; @@ -5457,7 +5555,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryCompilationResultActionsRequest', + '.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest', ['name'] ); request.name = defaultValue1; @@ -5529,7 +5627,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryCompilationResultActionsRequest', + '.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest', ['name'] ); request.name = defaultValue1; @@ -5590,7 +5688,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryCompilationResultActionsRequest', + '.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest', ['name'] ); request.name = defaultValue1; @@ -5644,7 +5742,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryCompilationResultActionsRequest', + '.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest', ['name'] ); request.name = defaultValue1; @@ -5691,7 +5789,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListWorkflowInvocationsRequest', + '.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest', ['parent'] ); request.parent = defaultValue1; @@ -5731,7 +5829,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListWorkflowInvocationsRequest', + '.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest', ['parent'] ); request.parent = defaultValue1; @@ -5788,7 +5886,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListWorkflowInvocationsRequest', + '.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest', ['parent'] ); request.parent = defaultValue1; @@ -5822,7 +5920,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListWorkflowInvocationsRequest', + '.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest', ['parent'] ); request.parent = defaultValue1; @@ -5891,7 +5989,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListWorkflowInvocationsRequest', + '.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest', ['parent'] ); request.parent = defaultValue1; @@ -5949,7 +6047,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListWorkflowInvocationsRequest', + '.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest', ['parent'] ); request.parent = defaultValue1; @@ -6003,7 +6101,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListWorkflowInvocationsRequest', + '.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest', ['parent'] ); request.parent = defaultValue1; @@ -6050,7 +6148,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryWorkflowInvocationActionsRequest', + '.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest', ['name'] ); request.name = defaultValue1; @@ -6090,7 +6188,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryWorkflowInvocationActionsRequest', + '.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest', ['name'] ); request.name = defaultValue1; @@ -6147,7 +6245,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryWorkflowInvocationActionsRequest', + '.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest', ['name'] ); request.name = defaultValue1; @@ -6181,7 +6279,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryWorkflowInvocationActionsRequest', + '.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest', ['name'] ); request.name = defaultValue1; @@ -6253,7 +6351,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryWorkflowInvocationActionsRequest', + '.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest', ['name'] ); request.name = defaultValue1; @@ -6314,7 +6412,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryWorkflowInvocationActionsRequest', + '.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest', ['name'] ); request.name = defaultValue1; @@ -6368,7 +6466,7 @@ describe('v1beta1.DataformClient', () => { new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'QueryWorkflowInvocationActionsRequest', + '.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest', ['name'] ); request.name = defaultValue1; From 0dbf5fc5a87fd1e1c9137f835b25d5e39ae520cf Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 3 Nov 2022 23:46:00 -0700 Subject: [PATCH 20/80] fix(deps): use google-gax v3.5.2 (#25) --- packages/google-cloud-dataform/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-dataform/package.json b/packages/google-cloud-dataform/package.json index 2b39eaa70a3..4a9b6ea9d35 100644 --- a/packages/google-cloud-dataform/package.json +++ b/packages/google-cloud-dataform/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^3.3.0" + "google-gax": "^3.5.2" }, "devDependencies": { "@types/mocha": "^9.0.0", From 9c87dfed85ad0c83334529a27e066c8af3f6baf3 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 10 Nov 2022 10:20:29 +0100 Subject: [PATCH 21/80] chore(deps): update dependency @types/node to v18 (#23) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/node](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped)) | [`^16.0.0` -> `^18.0.0`](https://renovatebot.com/diffs/npm/@types%2fnode/16.18.3/18.11.9) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.11.9/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.11.9/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.11.9/compatibility-slim/16.18.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.11.9/confidence-slim/16.18.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-dataform). --- packages/google-cloud-dataform/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-dataform/package.json b/packages/google-cloud-dataform/package.json index 4a9b6ea9d35..3221a8bba8e 100644 --- a/packages/google-cloud-dataform/package.json +++ b/packages/google-cloud-dataform/package.json @@ -43,7 +43,7 @@ }, "devDependencies": { "@types/mocha": "^9.0.0", - "@types/node": "^16.0.0", + "@types/node": "^18.0.0", "@types/sinon": "^10.0.0", "c8": "^7.7.2", "gts": "^3.1.0", From 61f46c43a5d21f2dcb7df953b9a217b216d0a4e5 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 10 Nov 2022 10:42:16 +0100 Subject: [PATCH 22/80] chore(deps): update dependency jsdoc to v4 (#28) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jsdoc](https://togithub.com/jsdoc/jsdoc) | [`^3.6.6` -> `^4.0.0`](https://renovatebot.com/diffs/npm/jsdoc/3.6.11/4.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/compatibility-slim/3.6.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/confidence-slim/3.6.11)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
jsdoc/jsdoc ### [`v4.0.0`](https://togithub.com/jsdoc/jsdoc/blob/HEAD/CHANGES.md#​400-November-2022) [Compare Source](https://togithub.com/jsdoc/jsdoc/compare/3.6.11...084218523a7d69fec14a852ce680f374f526af28) - JSDoc releases now use [semantic versioning](https://semver.org/). If JSDoc makes backwards-incompatible changes in the future, the major version will be incremented. - JSDoc no longer uses the [`taffydb`](https://taffydb.com/) package. If your JSDoc template or plugin uses the `taffydb` package, see the [instructions for replacing `taffydb` with `@jsdoc/salty`](https://togithub.com/jsdoc/jsdoc/tree/main/packages/jsdoc-salty#use-salty-in-a-jsdoc-template). - JSDoc now supports Node.js 12.0.0 and later.
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-dataform). --- packages/google-cloud-dataform/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-dataform/package.json b/packages/google-cloud-dataform/package.json index 3221a8bba8e..991be9bbe5f 100644 --- a/packages/google-cloud-dataform/package.json +++ b/packages/google-cloud-dataform/package.json @@ -47,7 +47,7 @@ "@types/sinon": "^10.0.0", "c8": "^7.7.2", "gts": "^3.1.0", - "jsdoc": "^3.6.6", + "jsdoc": "^4.0.0", "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", From e9d937158e3a1a4439ef8a39e0fe903172773722 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 10 Nov 2022 10:28:19 +0000 Subject: [PATCH 23/80] fix: regenerated protos JS and TS definitions (#29) samples: pull in latest typeless bot, clean up some comments Source-Link: https://togithub.com/googleapis/synthtool/commit/0a68e568b6911b60bb6fd452eba4848b176031d8 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:5b05f26103855c3a15433141389c478d1d3fe088fb5d4e3217c4793f6b3f245e --- .../google-cloud-dataform/protos/protos.d.ts | 2 +- .../google-cloud-dataform/protos/protos.js | 156 +++++++++++++++--- 2 files changed, 137 insertions(+), 21 deletions(-) diff --git a/packages/google-cloud-dataform/protos/protos.d.ts b/packages/google-cloud-dataform/protos/protos.d.ts index 815dea9405a..d97d51e9b28 100644 --- a/packages/google-cloud-dataform/protos/protos.d.ts +++ b/packages/google-cloud-dataform/protos/protos.d.ts @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import Long = require("long"); import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); /** Namespace google. */ export namespace google { diff --git a/packages/google-cloud-dataform/protos/protos.js b/packages/google-cloud-dataform/protos/protos.js index 22cd3d2b500..0a84e406032 100644 --- a/packages/google-cloud-dataform/protos/protos.js +++ b/packages/google-cloud-dataform/protos/protos.js @@ -1735,6 +1735,12 @@ if (object.authenticationTokenSecretVersion != null) message.authenticationTokenSecretVersion = String(object.authenticationTokenSecretVersion); switch (object.tokenStatus) { + default: + if (typeof object.tokenStatus === "number") { + message.tokenStatus = object.tokenStatus; + break; + } + break; case "TOKEN_STATUS_UNSPECIFIED": case 0: message.tokenStatus = 0; @@ -1781,7 +1787,7 @@ if (message.authenticationTokenSecretVersion != null && message.hasOwnProperty("authenticationTokenSecretVersion")) object.authenticationTokenSecretVersion = message.authenticationTokenSecretVersion; if (message.tokenStatus != null && message.hasOwnProperty("tokenStatus")) - object.tokenStatus = options.enums === String ? $root.google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.TokenStatus[message.tokenStatus] : message.tokenStatus; + object.tokenStatus = options.enums === String ? $root.google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.TokenStatus[message.tokenStatus] === undefined ? message.tokenStatus : $root.google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.TokenStatus[message.tokenStatus] : message.tokenStatus; return object; }; @@ -6522,6 +6528,12 @@ if (object.path != null) message.path = String(object.path); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -6566,7 +6578,7 @@ if (message.path != null && message.hasOwnProperty("path")) object.path = message.path; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.State[message.state] === undefined ? message.state : $root.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.State[message.state] : message.state; return object; }; @@ -15557,6 +15569,12 @@ message.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.fromObject(object.relationDescriptor); } switch (object.relationType) { + default: + if (typeof object.relationType === "number") { + message.relationType = object.relationType; + break; + } + break; case "RELATION_TYPE_UNSPECIFIED": case 0: message.relationType = 0; @@ -15669,7 +15687,7 @@ if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) object.relationDescriptor = $root.google.cloud.dataform.v1alpha2.RelationDescriptor.toObject(message.relationDescriptor, options); if (message.relationType != null && message.hasOwnProperty("relationType")) - object.relationType = options.enums === String ? $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.RelationType[message.relationType] : message.relationType; + object.relationType = options.enums === String ? $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.RelationType[message.relationType] === undefined ? message.relationType : $root.google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.RelationType[message.relationType] : message.relationType; if (message.selectQuery != null && message.hasOwnProperty("selectQuery")) object.selectQuery = message.selectQuery; if (message.preOperations && message.preOperations.length) { @@ -17845,6 +17863,12 @@ message.invocationConfig = $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig.fromObject(object.invocationConfig); } switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -17905,7 +17929,7 @@ if (message.invocationConfig != null && message.hasOwnProperty("invocationConfig")) object.invocationConfig = $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig.toObject(message.invocationConfig, options); if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.State[message.state] === undefined ? message.state : $root.google.cloud.dataform.v1alpha2.WorkflowInvocation.State[message.state] : message.state; if (message.invocationTiming != null && message.hasOwnProperty("invocationTiming")) object.invocationTiming = $root.google.type.Interval.toObject(message.invocationTiming, options); return object; @@ -19944,6 +19968,12 @@ message.canonicalTarget = $root.google.cloud.dataform.v1alpha2.Target.fromObject(object.canonicalTarget); } switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "PENDING": case 0: message.state = 0; @@ -20014,7 +20044,7 @@ if (message.canonicalTarget != null && message.hasOwnProperty("canonicalTarget")) object.canonicalTarget = $root.google.cloud.dataform.v1alpha2.Target.toObject(message.canonicalTarget, options); if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.State[message.state] === undefined ? message.state : $root.google.cloud.dataform.v1alpha2.WorkflowInvocationAction.State[message.state] : message.state; if (message.invocationTiming != null && message.hasOwnProperty("invocationTiming")) object.invocationTiming = $root.google.type.Interval.toObject(message.invocationTiming, options); if (message.bigqueryAction != null && message.hasOwnProperty("bigqueryAction")) @@ -22459,6 +22489,12 @@ if (object.authenticationTokenSecretVersion != null) message.authenticationTokenSecretVersion = String(object.authenticationTokenSecretVersion); switch (object.tokenStatus) { + default: + if (typeof object.tokenStatus === "number") { + message.tokenStatus = object.tokenStatus; + break; + } + break; case "TOKEN_STATUS_UNSPECIFIED": case 0: message.tokenStatus = 0; @@ -22505,7 +22541,7 @@ if (message.authenticationTokenSecretVersion != null && message.hasOwnProperty("authenticationTokenSecretVersion")) object.authenticationTokenSecretVersion = message.authenticationTokenSecretVersion; if (message.tokenStatus != null && message.hasOwnProperty("tokenStatus")) - object.tokenStatus = options.enums === String ? $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus[message.tokenStatus] : message.tokenStatus; + object.tokenStatus = options.enums === String ? $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus[message.tokenStatus] === undefined ? message.tokenStatus : $root.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus[message.tokenStatus] : message.tokenStatus; return object; }; @@ -27246,6 +27282,12 @@ if (object.path != null) message.path = String(object.path); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -27290,7 +27332,7 @@ if (message.path != null && message.hasOwnProperty("path")) object.path = message.path; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.State[message.state] === undefined ? message.state : $root.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange.State[message.state] : message.state; return object; }; @@ -36281,6 +36323,12 @@ message.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.fromObject(object.relationDescriptor); } switch (object.relationType) { + default: + if (typeof object.relationType === "number") { + message.relationType = object.relationType; + break; + } + break; case "RELATION_TYPE_UNSPECIFIED": case 0: message.relationType = 0; @@ -36393,7 +36441,7 @@ if (message.relationDescriptor != null && message.hasOwnProperty("relationDescriptor")) object.relationDescriptor = $root.google.cloud.dataform.v1beta1.RelationDescriptor.toObject(message.relationDescriptor, options); if (message.relationType != null && message.hasOwnProperty("relationType")) - object.relationType = options.enums === String ? $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType[message.relationType] : message.relationType; + object.relationType = options.enums === String ? $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType[message.relationType] === undefined ? message.relationType : $root.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType[message.relationType] : message.relationType; if (message.selectQuery != null && message.hasOwnProperty("selectQuery")) object.selectQuery = message.selectQuery; if (message.preOperations && message.preOperations.length) { @@ -38569,6 +38617,12 @@ message.invocationConfig = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.fromObject(object.invocationConfig); } switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -38629,7 +38683,7 @@ if (message.invocationConfig != null && message.hasOwnProperty("invocationConfig")) object.invocationConfig = $root.google.cloud.dataform.v1beta1.WorkflowInvocation.InvocationConfig.toObject(message.invocationConfig, options); if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataform.v1beta1.WorkflowInvocation.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.dataform.v1beta1.WorkflowInvocation.State[message.state] === undefined ? message.state : $root.google.cloud.dataform.v1beta1.WorkflowInvocation.State[message.state] : message.state; if (message.invocationTiming != null && message.hasOwnProperty("invocationTiming")) object.invocationTiming = $root.google.type.Interval.toObject(message.invocationTiming, options); return object; @@ -40668,6 +40722,12 @@ message.canonicalTarget = $root.google.cloud.dataform.v1beta1.Target.fromObject(object.canonicalTarget); } switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "PENDING": case 0: message.state = 0; @@ -40738,7 +40798,7 @@ if (message.canonicalTarget != null && message.hasOwnProperty("canonicalTarget")) object.canonicalTarget = $root.google.cloud.dataform.v1beta1.Target.toObject(message.canonicalTarget, options); if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.State[message.state] === undefined ? message.state : $root.google.cloud.dataform.v1beta1.WorkflowInvocationAction.State[message.state] : message.state; if (message.invocationTiming != null && message.hasOwnProperty("invocationTiming")) object.invocationTiming = $root.google.type.Interval.toObject(message.invocationTiming, options); if (message.bigqueryAction != null && message.hasOwnProperty("bigqueryAction")) @@ -42813,6 +42873,12 @@ if (object.nameField != null) message.nameField = String(object.nameField); switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; case "HISTORY_UNSPECIFIED": case 0: message.history = 0; @@ -42837,6 +42903,10 @@ for (var i = 0; i < object.style.length; ++i) switch (object.style[i]) { default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } case "STYLE_UNSPECIFIED": case 0: message.style[i] = 0; @@ -42884,7 +42954,7 @@ if (message.nameField != null && message.hasOwnProperty("nameField")) object.nameField = message.nameField; if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; if (message.plural != null && message.hasOwnProperty("plural")) object.plural = message.plural; if (message.singular != null && message.hasOwnProperty("singular")) @@ -42892,7 +42962,7 @@ if (message.style && message.style.length) { object.style = []; for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; } return object; }; @@ -45703,6 +45773,12 @@ if (object.number != null) message.number = object.number | 0; switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; case "LABEL_OPTIONAL": case 1: message.label = 1; @@ -45717,6 +45793,12 @@ break; } switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "TYPE_DOUBLE": case 1: message.type = 1; @@ -45843,9 +45925,9 @@ if (message.number != null && message.hasOwnProperty("number")) object.number = message.number; if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; if (message.typeName != null && message.hasOwnProperty("typeName")) object.typeName = message.typeName; if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) @@ -48192,6 +48274,12 @@ if (object.javaStringCheckUtf8 != null) message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; case "SPEED": case 1: message.optimizeFor = 1; @@ -48300,7 +48388,7 @@ if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) object.javaOuterClassname = message.javaOuterClassname; if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) object.javaMultipleFiles = message.javaMultipleFiles; if (message.goPackage != null && message.hasOwnProperty("goPackage")) @@ -49102,6 +49190,12 @@ return object; var message = new $root.google.protobuf.FieldOptions(); switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; case "STRING": case 0: message.ctype = 0; @@ -49118,6 +49212,12 @@ if (object.packed != null) message.packed = Boolean(object.packed); switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; case "JS_NORMAL": case 0: message.jstype = 0; @@ -49156,6 +49256,10 @@ for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) switch (object[".google.api.fieldBehavior"][i]) { default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } case "FIELD_BEHAVIOR_UNSPECIFIED": case 0: message[".google.api.fieldBehavior"][i] = 0; @@ -49226,7 +49330,7 @@ object[".google.api.resourceReference"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; if (message.packed != null && message.hasOwnProperty("packed")) object.packed = message.packed; if (message.deprecated != null && message.hasOwnProperty("deprecated")) @@ -49234,7 +49338,7 @@ if (message.lazy != null && message.hasOwnProperty("lazy")) object.lazy = message.lazy; if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; if (message.weak != null && message.hasOwnProperty("weak")) object.weak = message.weak; if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) @@ -49247,7 +49351,7 @@ if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { object[".google.api.fieldBehavior"] = []; for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; } if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); @@ -50604,6 +50708,12 @@ if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; case "IDEMPOTENCY_UNKNOWN": case 0: message.idempotencyLevel = 0; @@ -50667,7 +50777,7 @@ if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -52420,6 +52530,12 @@ if (object.end != null) message.end = object.end | 0; switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; case "NONE": case 0: message.semantic = 0; @@ -52469,7 +52585,7 @@ if (message.end != null && message.hasOwnProperty("end")) object.end = message.end; if (message.semantic != null && message.hasOwnProperty("semantic")) - object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; return object; }; From 4b8962d4912b3662638932451163823fc0630b9b Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 9 Feb 2023 19:59:40 +0000 Subject: [PATCH 24/80] chore(deps): update dependency sinon to v15 (#31) --- packages/google-cloud-dataform/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-dataform/package.json b/packages/google-cloud-dataform/package.json index 991be9bbe5f..b8886ae04f8 100644 --- a/packages/google-cloud-dataform/package.json +++ b/packages/google-cloud-dataform/package.json @@ -54,7 +54,7 @@ "mocha": "^10.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^14.0.0", + "sinon": "^15.0.0", "ts-loader": "^9.1.2", "typescript": "^4.2.4", "webpack": "^5.36.2", From 7de7561028834d427e7282dbf8e04fafcc453636 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 9 Feb 2023 20:06:14 +0000 Subject: [PATCH 25/80] chore(deps): update dependency webpack-cli to v5 (#30) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [webpack-cli](https://togithub.com/webpack/webpack-cli/tree/master/packages/webpack-cli) ([source](https://togithub.com/webpack/webpack-cli)) | [`^4.7.0` -> `^5.0.0`](https://renovatebot.com/diffs/npm/webpack-cli/4.10.0/5.0.1) | [![age](https://badges.renovateapi.com/packages/npm/webpack-cli/5.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/webpack-cli/5.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/webpack-cli/5.0.1/compatibility-slim/4.10.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/webpack-cli/5.0.1/confidence-slim/4.10.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
webpack/webpack-cli ### [`v5.0.1`](https://togithub.com/webpack/webpack-cli/blob/HEAD/CHANGELOG.md#​501-httpsgithubcomwebpackwebpack-clicomparewebpack-cli500webpack-cli501-2022-12-05) [Compare Source](https://togithub.com/webpack/webpack-cli/compare/webpack-cli@5.0.0...webpack-cli@5.0.1) ##### Bug Fixes - make `define-process-env-node-env` alias `node-env` ([#​3514](https://togithub.com/webpack/webpack-cli/issues/3514)) ([346a518](https://togithub.com/webpack/webpack-cli/commit/346a518dd7423a726810ef1012031f92d318c9c5)) ### [`v5.0.0`](https://togithub.com/webpack/webpack-cli/blob/HEAD/CHANGELOG.md#​500-httpsgithubcomwebpackwebpack-clicomparewebpack-cli4100webpack-cli500-2022-11-17) [Compare Source](https://togithub.com/webpack/webpack-cli/compare/webpack-cli@4.10.0...webpack-cli@5.0.0) ##### Bug Fixes - improve description of the `--disable-interpret` option ([#​3364](https://togithub.com/webpack/webpack-cli/issues/3364)) ([bdb7e20](https://togithub.com/webpack/webpack-cli/commit/bdb7e20a3fc5a676bf5ba9912c091a2c9b3a1cfd)) - remove the redundant `utils` export ([#​3343](https://togithub.com/webpack/webpack-cli/issues/3343)) ([a9ce5d0](https://togithub.com/webpack/webpack-cli/commit/a9ce5d077f90492558e2d5c14841b3b5b85f1186)) - respect `NODE_PATH` env variable ([#​3411](https://togithub.com/webpack/webpack-cli/issues/3411)) ([83d1f58](https://togithub.com/webpack/webpack-cli/commit/83d1f58fb52d9dcfa3499efb342dfc47d0cca73a)) - show all CLI specific flags in the minimum help output ([#​3354](https://togithub.com/webpack/webpack-cli/issues/3354)) ([35843e8](https://togithub.com/webpack/webpack-cli/commit/35843e87c61fd27be92afce11bd66ebf4f9519ae)) ##### Features - failOnWarnings option ([#​3317](https://togithub.com/webpack/webpack-cli/issues/3317)) ([c48c848](https://togithub.com/webpack/webpack-cli/commit/c48c848c6c84eb73fbd829dc41bee301b0b7e2de)) - update commander to v9 ([#​3460](https://togithub.com/webpack/webpack-cli/issues/3460)) ([6621c02](https://togithub.com/webpack/webpack-cli/commit/6621c023ab59cc510a5f76e262f2c81676d1920b)) - added the `--define-process-env-node-env` option - update `interpret` to v3 and `rechoir` to v0.8 - add an option for preventing interpret ([#​3329](https://togithub.com/webpack/webpack-cli/issues/3329)) ([c737383](https://togithub.com/webpack/webpack-cli/commit/c7373832b96af499ad0813e07d114bdc927afdf4)) ##### BREAKING CHANGES - the minimum supported webpack version is v5.0.0 ([#​3342](https://togithub.com/webpack/webpack-cli/issues/3342)) ([b1af0dc](https://togithub.com/webpack/webpack-cli/commit/b1af0dc7ebcdf746bc37889e4c1f978c65acc4a5)), closes [#​3342](https://togithub.com/webpack/webpack-cli/issues/3342) - webpack-cli no longer supports webpack v4, the minimum supported version is webpack v5.0.0 - webpack-cli no longer supports webpack-dev-server v3, the minimum supported version is webpack-dev-server v4.0.0 - remove the `migrate` command ([#​3291](https://togithub.com/webpack/webpack-cli/issues/3291)) ([56b43e4](https://togithub.com/webpack/webpack-cli/commit/56b43e4baf76c166ade3b282b40ad9d007cc52b6)), closes [#​3291](https://togithub.com/webpack/webpack-cli/issues/3291) - remove the `--prefetch` option in favor the `PrefetchPlugin` plugin - remove the `--node-env` option in favor `--define-process-env-node-env` - remove the `--hot` option in favor of directly using the `HotModuleReplacement` plugin (only for `build` command, for `serve` it will work) - the behavior logic of the `--entry` option has been changed - previously it replaced your entries, now the option adds a specified entry, if you want to return the previous behavior please use ` webpack --entry-reset --entry './src/my-entry.js' `
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-dataform). --- packages/google-cloud-dataform/package.json | 2 +- packages/google-cloud-dataform/protos/protos.d.ts | 2 +- packages/google-cloud-dataform/protos/protos.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-dataform/package.json b/packages/google-cloud-dataform/package.json index b8886ae04f8..e29d9177825 100644 --- a/packages/google-cloud-dataform/package.json +++ b/packages/google-cloud-dataform/package.json @@ -58,7 +58,7 @@ "ts-loader": "^9.1.2", "typescript": "^4.2.4", "webpack": "^5.36.2", - "webpack-cli": "^4.7.0" + "webpack-cli": "^5.0.0" }, "engines": { "node": ">=v12.0.0" diff --git a/packages/google-cloud-dataform/protos/protos.d.ts b/packages/google-cloud-dataform/protos/protos.d.ts index d97d51e9b28..6139767e7bb 100644 --- a/packages/google-cloud-dataform/protos/protos.d.ts +++ b/packages/google-cloud-dataform/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/protos/protos.js b/packages/google-cloud-dataform/protos/protos.js index 0a84e406032..15c7690bd85 100644 --- a/packages/google-cloud-dataform/protos/protos.js +++ b/packages/google-cloud-dataform/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From eaf6c343c401a132efc89fe21ec61664ae04fb8b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 9 Feb 2023 20:16:16 +0000 Subject: [PATCH 26/80] chore(gitignore): only ignore folders in the top level (#32) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 507603203 Source-Link: https://togithub.com/googleapis/googleapis/commit/a4f2de456480c0a4ed9feeeaa1f8ee620bbef23a Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/dcf882154e7c710ecf2a1abc77b35c95f9062371 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZGNmODgyMTU0ZTdjNzEwZWNmMmExYWJjNzdiMzVjOTVmOTA2MjM3MSJ9 BEGIN_NESTED_COMMIT chore: update .gitignore to always include protos folder Use gapic-generator-typescript v3.0.0. PiperOrigin-RevId: 507004755 Source-Link: https://togithub.com/googleapis/googleapis/commit/d784f3c1043616fc0646e9ce7afa1b9161cc02de Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/5e64ba8615f65fdedb1fcd6ac792e5ea621027e4 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNWU2NGJhODYxNWY2NWZkZWRiMWZjZDZhYzc5MmU1ZWE2MjEwMjdlNCJ9 END_NESTED_COMMIT BEGIN_NESTED_COMMIT chore: update import paths for Go targets to match open source location chore: update go_package in protos to match open source location chore: add explicit release levels to Go gapic targets PiperOrigin-RevId: 506711567 Source-Link: https://togithub.com/googleapis/googleapis/commit/d02e58244db5d01607ec2ad52a47e7edce8612f0 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/7f1c54153125eb5abd60a32de58cfda6a798a70a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiN2YxYzU0MTUzMTI1ZWI1YWJkNjBhMzJkZTU4Y2ZkYTZhNzk4YTcwYSJ9 END_NESTED_COMMITBEGIN_NESTED_COMMITfeat: Added Snooze API support PiperOrigin-RevId: 500543032 Source-Link: https://togithub.com/googleapis/googleapis/commit/d4864bf1425882fddb80ffb627c385ec22d1fd00 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/245031557f8852e8e089a6511f63fc226703fef9 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjQ1MDMxNTU3Zjg4NTJlOGUwODlhNjUxMWY2M2ZjMjI2NzAzZmVmOSJ9 END_NESTED_COMMITBEGIN_NESTED_COMMITchore: Enable requesting numeric enums in "transport=rest" responses for services supporting this (Java, Go, Python, PHP, TypeScript, C#, and Ruby), even if they do not yet turn on REST transport chore: disallow "transport=rest" for services where numeric enums are not confirmed to be supported (except in PHP and Java) PiperOrigin-RevId: 493113566 Source-Link: https://togithub.com/googleapis/googleapis/commit/758f0d1217d9c7fe398aa5efb1057ce4b6409e55 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/78bd8f05e1276363eb14eae70e91fe4bc20703ab Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzhiZDhmMDVlMTI3NjM2M2ViMTRlYWU3MGU5MWZlNGJjMjA3MDNhYiJ9 END_NESTED_COMMIT --- packages/google-cloud-dataform/.gitignore | 12 ++++++------ packages/google-cloud-dataform/.jsdoc.js | 4 ++-- .../google/cloud/dataform/v1alpha2/dataform.proto | 2 +- .../google/cloud/dataform/v1beta1/dataform.proto | 2 +- packages/google-cloud-dataform/protos/protos.json | 4 ++-- .../v1alpha2/dataform.cancel_workflow_invocation.js | 2 +- .../v1alpha2/dataform.commit_workspace_changes.js | 2 +- .../v1alpha2/dataform.create_compilation_result.js | 2 +- .../generated/v1alpha2/dataform.create_repository.js | 2 +- .../v1alpha2/dataform.create_workflow_invocation.js | 2 +- .../generated/v1alpha2/dataform.create_workspace.js | 2 +- .../generated/v1alpha2/dataform.delete_repository.js | 2 +- .../v1alpha2/dataform.delete_workflow_invocation.js | 2 +- .../generated/v1alpha2/dataform.delete_workspace.js | 2 +- .../generated/v1alpha2/dataform.fetch_file_diff.js | 2 +- .../v1alpha2/dataform.fetch_file_git_statuses.js | 2 +- .../v1alpha2/dataform.fetch_git_ahead_behind.js | 2 +- .../v1alpha2/dataform.fetch_remote_branches.js | 2 +- .../v1alpha2/dataform.get_compilation_result.js | 2 +- .../generated/v1alpha2/dataform.get_repository.js | 2 +- .../v1alpha2/dataform.get_workflow_invocation.js | 2 +- .../generated/v1alpha2/dataform.get_workspace.js | 2 +- .../v1alpha2/dataform.install_npm_packages.js | 2 +- .../v1alpha2/dataform.list_compilation_results.js | 2 +- .../generated/v1alpha2/dataform.list_repositories.js | 2 +- .../v1alpha2/dataform.list_workflow_invocations.js | 2 +- .../generated/v1alpha2/dataform.list_workspaces.js | 2 +- .../generated/v1alpha2/dataform.make_directory.js | 2 +- .../generated/v1alpha2/dataform.move_directory.js | 2 +- .../samples/generated/v1alpha2/dataform.move_file.js | 2 +- .../generated/v1alpha2/dataform.pull_git_commits.js | 2 +- .../generated/v1alpha2/dataform.push_git_commits.js | 2 +- .../dataform.query_compilation_result_actions.js | 2 +- .../v1alpha2/dataform.query_directory_contents.js | 2 +- .../dataform.query_workflow_invocation_actions.js | 2 +- .../samples/generated/v1alpha2/dataform.read_file.js | 2 +- .../generated/v1alpha2/dataform.remove_directory.js | 2 +- .../generated/v1alpha2/dataform.remove_file.js | 2 +- .../v1alpha2/dataform.reset_workspace_changes.js | 2 +- .../generated/v1alpha2/dataform.update_repository.js | 2 +- .../generated/v1alpha2/dataform.write_file.js | 2 +- .../v1beta1/dataform.cancel_workflow_invocation.js | 2 +- .../v1beta1/dataform.commit_workspace_changes.js | 2 +- .../v1beta1/dataform.create_compilation_result.js | 2 +- .../generated/v1beta1/dataform.create_repository.js | 2 +- .../v1beta1/dataform.create_workflow_invocation.js | 2 +- .../generated/v1beta1/dataform.create_workspace.js | 2 +- .../generated/v1beta1/dataform.delete_repository.js | 2 +- .../v1beta1/dataform.delete_workflow_invocation.js | 2 +- .../generated/v1beta1/dataform.delete_workspace.js | 2 +- .../generated/v1beta1/dataform.fetch_file_diff.js | 2 +- .../v1beta1/dataform.fetch_file_git_statuses.js | 2 +- .../v1beta1/dataform.fetch_git_ahead_behind.js | 2 +- .../v1beta1/dataform.fetch_remote_branches.js | 2 +- .../v1beta1/dataform.get_compilation_result.js | 2 +- .../generated/v1beta1/dataform.get_repository.js | 2 +- .../v1beta1/dataform.get_workflow_invocation.js | 2 +- .../generated/v1beta1/dataform.get_workspace.js | 2 +- .../v1beta1/dataform.install_npm_packages.js | 2 +- .../v1beta1/dataform.list_compilation_results.js | 2 +- .../generated/v1beta1/dataform.list_repositories.js | 2 +- .../v1beta1/dataform.list_workflow_invocations.js | 2 +- .../generated/v1beta1/dataform.list_workspaces.js | 2 +- .../generated/v1beta1/dataform.make_directory.js | 2 +- .../generated/v1beta1/dataform.move_directory.js | 2 +- .../samples/generated/v1beta1/dataform.move_file.js | 2 +- .../generated/v1beta1/dataform.pull_git_commits.js | 2 +- .../generated/v1beta1/dataform.push_git_commits.js | 2 +- .../dataform.query_compilation_result_actions.js | 2 +- .../v1beta1/dataform.query_directory_contents.js | 2 +- .../dataform.query_workflow_invocation_actions.js | 2 +- .../samples/generated/v1beta1/dataform.read_file.js | 2 +- .../generated/v1beta1/dataform.remove_directory.js | 2 +- .../generated/v1beta1/dataform.remove_file.js | 2 +- .../v1beta1/dataform.reset_workspace_changes.js | 2 +- .../generated/v1beta1/dataform.update_repository.js | 2 +- .../samples/generated/v1beta1/dataform.write_file.js | 2 +- .../src/v1alpha2/dataform_client.ts | 5 ++++- packages/google-cloud-dataform/src/v1alpha2/index.ts | 2 +- .../src/v1beta1/dataform_client.ts | 5 ++++- packages/google-cloud-dataform/src/v1beta1/index.ts | 2 +- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- .../google-cloud-dataform/system-test/install.ts | 2 +- .../test/gapic_dataform_v1alpha2.ts | 2 +- .../test/gapic_dataform_v1beta1.ts | 2 +- 86 files changed, 99 insertions(+), 93 deletions(-) diff --git a/packages/google-cloud-dataform/.gitignore b/packages/google-cloud-dataform/.gitignore index 5d32b23782f..d4f03a0df2e 100644 --- a/packages/google-cloud-dataform/.gitignore +++ b/packages/google-cloud-dataform/.gitignore @@ -1,11 +1,11 @@ **/*.log **/node_modules -.coverage -coverage -.nyc_output -docs/ -out/ -build/ +/.coverage +/coverage +/.nyc_output +/docs/ +/out/ +/build/ system-test/secrets.js system-test/*key.json *.lock diff --git a/packages/google-cloud-dataform/.jsdoc.js b/packages/google-cloud-dataform/.jsdoc.js index 166ea791ca2..fd3c4b2640a 100644 --- a/packages/google-cloud-dataform/.jsdoc.js +++ b/packages/google-cloud-dataform/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2022 Google LLC', + copyright: 'Copyright 2023 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/dataform', diff --git a/packages/google-cloud-dataform/protos/google/cloud/dataform/v1alpha2/dataform.proto b/packages/google-cloud-dataform/protos/google/cloud/dataform/v1alpha2/dataform.proto index 771acdb48ea..6547cba48b3 100644 --- a/packages/google-cloud-dataform/protos/google/cloud/dataform/v1alpha2/dataform.proto +++ b/packages/google-cloud-dataform/protos/google/cloud/dataform/v1alpha2/dataform.proto @@ -25,7 +25,7 @@ import "google/protobuf/field_mask.proto"; import "google/type/interval.proto"; option csharp_namespace = "Google.Cloud.Dataform.V1Alpha2"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2;dataform"; +option go_package = "cloud.google.com/go/dataform/apiv1alpha2/dataformpb;dataformpb"; option java_multiple_files = true; option java_outer_classname = "DataformProto"; option java_package = "com.google.cloud.dataform.v1alpha2"; diff --git a/packages/google-cloud-dataform/protos/google/cloud/dataform/v1beta1/dataform.proto b/packages/google-cloud-dataform/protos/google/cloud/dataform/v1beta1/dataform.proto index 57d43c3e0eb..466459c3092 100644 --- a/packages/google-cloud-dataform/protos/google/cloud/dataform/v1beta1/dataform.proto +++ b/packages/google-cloud-dataform/protos/google/cloud/dataform/v1beta1/dataform.proto @@ -25,7 +25,7 @@ import "google/protobuf/field_mask.proto"; import "google/type/interval.proto"; option csharp_namespace = "Google.Cloud.Dataform.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dataform/v1beta1;dataform"; +option go_package = "cloud.google.com/go/dataform/apiv1beta1/dataformpb;dataformpb"; option java_multiple_files = true; option java_outer_classname = "DataformProto"; option java_package = "com.google.cloud.dataform.v1beta1"; diff --git a/packages/google-cloud-dataform/protos/protos.json b/packages/google-cloud-dataform/protos/protos.json index b05df5035bf..82490501443 100644 --- a/packages/google-cloud-dataform/protos/protos.json +++ b/packages/google-cloud-dataform/protos/protos.json @@ -9,7 +9,7 @@ "v1alpha2": { "options": { "csharp_namespace": "Google.Cloud.Dataform.V1Alpha2", - "go_package": "google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2;dataform", + "go_package": "cloud.google.com/go/dataform/apiv1alpha2/dataformpb;dataformpb", "java_multiple_files": true, "java_outer_classname": "DataformProto", "java_package": "com.google.cloud.dataform.v1alpha2", @@ -2316,7 +2316,7 @@ "v1beta1": { "options": { "csharp_namespace": "Google.Cloud.Dataform.V1Beta1", - "go_package": "google.golang.org/genproto/googleapis/cloud/dataform/v1beta1;dataform", + "go_package": "cloud.google.com/go/dataform/apiv1beta1/dataformpb;dataformpb", "java_multiple_files": true, "java_outer_classname": "DataformProto", "java_package": "com.google.cloud.dataform.v1beta1", diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.cancel_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.cancel_workflow_invocation.js index 65ab5547c41..4aff9deaf76 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.cancel_workflow_invocation.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.cancel_workflow_invocation.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.commit_workspace_changes.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.commit_workspace_changes.js index e4b9e761de3..d56a4bc7ea2 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.commit_workspace_changes.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.commit_workspace_changes.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_compilation_result.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_compilation_result.js index 42cafe8d99a..5e42038a52d 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_compilation_result.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_compilation_result.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_repository.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_repository.js index b734380020e..c6eeb686011 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_repository.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_repository.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workflow_invocation.js index 7aeaceda0f4..df46f246f63 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workflow_invocation.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workflow_invocation.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workspace.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workspace.js index 2b559562c54..b04b2cd474a 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workspace.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workspace.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_repository.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_repository.js index bfe3dc9126d..ae1ff8c3410 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_repository.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_repository.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workflow_invocation.js index 800461d9124..0e7dddcd802 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workflow_invocation.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workflow_invocation.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workspace.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workspace.js index f773c399e77..dcb19203dd9 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workspace.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workspace.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_diff.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_diff.js index df28731794a..8b9ef68d8e9 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_diff.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_diff.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_git_statuses.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_git_statuses.js index ba0e827bd04..f14f636d586 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_git_statuses.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_git_statuses.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_git_ahead_behind.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_git_ahead_behind.js index 1dcc54bc6cb..f03c884aff3 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_git_ahead_behind.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_git_ahead_behind.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_remote_branches.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_remote_branches.js index c6c2b7f3ded..83f7f0b4811 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_remote_branches.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_remote_branches.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_compilation_result.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_compilation_result.js index 38711f93e03..3ba63ec7682 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_compilation_result.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_compilation_result.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_repository.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_repository.js index e6336754cfc..bcfe43b87ee 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_repository.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_repository.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workflow_invocation.js index 8ed6ab49b2e..1541c2d3d7b 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workflow_invocation.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workflow_invocation.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workspace.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workspace.js index 294d0279352..04d8270ddd0 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workspace.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workspace.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.install_npm_packages.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.install_npm_packages.js index bfae9b7fe2a..61471cd886a 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.install_npm_packages.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.install_npm_packages.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_compilation_results.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_compilation_results.js index f463dc17da8..b84d4c4fc38 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_compilation_results.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_compilation_results.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_repositories.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_repositories.js index 2f81c22c7b7..9ec45e2e19e 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_repositories.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_repositories.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workflow_invocations.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workflow_invocations.js index 12e7d3e6bb0..95d7d131454 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workflow_invocations.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workflow_invocations.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workspaces.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workspaces.js index 8a1f1c905b2..78a7f1896d6 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workspaces.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workspaces.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.make_directory.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.make_directory.js index faf321e6b73..97fd6ce27c4 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.make_directory.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.make_directory.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_directory.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_directory.js index d50b32be564..0badfd07c00 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_directory.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_directory.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_file.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_file.js index 7f04c993cc4..5a2e81b7add 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_file.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_file.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.pull_git_commits.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.pull_git_commits.js index 2b6de812c17..d4341d3e356 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.pull_git_commits.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.pull_git_commits.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.push_git_commits.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.push_git_commits.js index bdcd4b26236..2589d00cbeb 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.push_git_commits.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.push_git_commits.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_compilation_result_actions.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_compilation_result_actions.js index e8297108755..6e1c256c936 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_compilation_result_actions.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_compilation_result_actions.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_directory_contents.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_directory_contents.js index 2e5c0bc8776..5107e214f81 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_directory_contents.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_directory_contents.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_workflow_invocation_actions.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_workflow_invocation_actions.js index 0abc8a2fb48..cd92923c1c9 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_workflow_invocation_actions.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_workflow_invocation_actions.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.read_file.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.read_file.js index 7cd0572e1f9..7d3c2ba47c0 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.read_file.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.read_file.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_directory.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_directory.js index 157e01238e2..a0709f9592d 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_directory.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_directory.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_file.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_file.js index 396738b3ea1..31b54701307 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_file.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_file.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.reset_workspace_changes.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.reset_workspace_changes.js index d91ec7f2332..4179d277bbf 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.reset_workspace_changes.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.reset_workspace_changes.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.update_repository.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.update_repository.js index 48c5d6129fc..3c7c3636f98 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.update_repository.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.update_repository.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.write_file.js b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.write_file.js index 08ed5bb0fd4..d8305c71258 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.write_file.js +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.write_file.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.cancel_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.cancel_workflow_invocation.js index 2028cb6127c..929972fe4d4 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.cancel_workflow_invocation.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.cancel_workflow_invocation.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.commit_workspace_changes.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.commit_workspace_changes.js index 01e533e827b..2f4f876ccc5 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.commit_workspace_changes.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.commit_workspace_changes.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_compilation_result.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_compilation_result.js index 8826207f7b6..feb504bef02 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_compilation_result.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_compilation_result.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_repository.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_repository.js index b0d66cd8143..4599641b7f0 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_repository.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_repository.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workflow_invocation.js index 9108d48c3f0..14374f0a6f1 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workflow_invocation.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workflow_invocation.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workspace.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workspace.js index 531becbaaa9..f10789a32ad 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workspace.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workspace.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_repository.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_repository.js index ad2ad43af77..d4b29d8d5c0 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_repository.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_repository.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workflow_invocation.js index ab0aaac74c4..112f9b17ac5 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workflow_invocation.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workflow_invocation.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workspace.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workspace.js index 5c0060ddca4..b5ee288086d 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workspace.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workspace.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_diff.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_diff.js index 2df2eb2bebf..392a1bd31ec 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_diff.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_diff.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_git_statuses.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_git_statuses.js index 03cfe21a07f..76432adb9d3 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_git_statuses.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_git_statuses.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js index 733dde9f9cf..afa36f5e907 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_remote_branches.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_remote_branches.js index 43c3d2a6228..2b71f6ca0dc 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_remote_branches.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_remote_branches.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_compilation_result.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_compilation_result.js index ee22ddbb3fb..b745a0d9a86 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_compilation_result.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_compilation_result.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_repository.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_repository.js index 071180cd33a..5f9e22e4004 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_repository.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_repository.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workflow_invocation.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workflow_invocation.js index 9e4875951b5..416bd7db1bd 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workflow_invocation.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workflow_invocation.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workspace.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workspace.js index 6c22c2e21ec..02fdd5d9454 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workspace.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workspace.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.install_npm_packages.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.install_npm_packages.js index d8ecbf9766b..a1748730158 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.install_npm_packages.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.install_npm_packages.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_compilation_results.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_compilation_results.js index ec422ddb857..b79a68ddf5e 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_compilation_results.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_compilation_results.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_repositories.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_repositories.js index 279161f4664..a1c97348910 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_repositories.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_repositories.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workflow_invocations.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workflow_invocations.js index e9194a1200e..c59f981acfc 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workflow_invocations.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workflow_invocations.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workspaces.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workspaces.js index fbf8647fb0c..c1f6373caf9 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workspaces.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workspaces.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.make_directory.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.make_directory.js index b352c7bd671..796a2f4c337 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.make_directory.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.make_directory.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_directory.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_directory.js index ec43257d354..32b4a6c46f5 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_directory.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_directory.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_file.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_file.js index c00db1f9e7d..eff15304ee6 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_file.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_file.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.pull_git_commits.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.pull_git_commits.js index 18c8f380b03..e5d141fc50b 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.pull_git_commits.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.pull_git_commits.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.push_git_commits.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.push_git_commits.js index 0863cf30597..985f1257ae3 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.push_git_commits.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.push_git_commits.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_compilation_result_actions.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_compilation_result_actions.js index 1690b9436a5..dd5a82fefb3 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_compilation_result_actions.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_compilation_result_actions.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_directory_contents.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_directory_contents.js index c7792118f98..f11ebc2f4c7 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_directory_contents.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_directory_contents.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js index 9a7531e0b98..4e61bebc07b 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.read_file.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.read_file.js index 61d5eebf2f9..bcd470f0811 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.read_file.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.read_file.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_directory.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_directory.js index c22c6a154c4..975e2258de0 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_directory.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_directory.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_file.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_file.js index 22a752981b1..dd9031c5a5f 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_file.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_file.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.reset_workspace_changes.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.reset_workspace_changes.js index e611fb11e87..b5c255e3919 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.reset_workspace_changes.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.reset_workspace_changes.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.update_repository.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.update_repository.js index ce879f0619e..16e383a3b7d 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.update_repository.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.update_repository.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.write_file.js b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.write_file.js index 33502bde38f..62ed1b6e99d 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.write_file.js +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.write_file.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/src/v1alpha2/dataform_client.ts b/packages/google-cloud-dataform/src/v1alpha2/dataform_client.ts index 50e966a5278..b04bd05f34d 100644 --- a/packages/google-cloud-dataform/src/v1alpha2/dataform_client.ts +++ b/packages/google-cloud-dataform/src/v1alpha2/dataform_client.ts @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -127,6 +127,9 @@ export class DataformClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-dataform/src/v1alpha2/index.ts b/packages/google-cloud-dataform/src/v1alpha2/index.ts index a1e44870c79..20185442e0c 100644 --- a/packages/google-cloud-dataform/src/v1alpha2/index.ts +++ b/packages/google-cloud-dataform/src/v1alpha2/index.ts @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts b/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts index e56c38d72f1..4c9045b9b29 100644 --- a/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts +++ b/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -127,6 +127,9 @@ export class DataformClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-dataform/src/v1beta1/index.ts b/packages/google-cloud-dataform/src/v1beta1/index.ts index a1e44870c79..20185442e0c 100644 --- a/packages/google-cloud-dataform/src/v1beta1/index.ts +++ b/packages/google-cloud-dataform/src/v1beta1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/system-test/fixtures/sample/src/index.js b/packages/google-cloud-dataform/system-test/fixtures/sample/src/index.js index 2f4c3095189..b3cf17bc956 100644 --- a/packages/google-cloud-dataform/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-dataform/system-test/fixtures/sample/src/index.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-dataform/system-test/fixtures/sample/src/index.ts index 3f49bdde081..fbfd42e46a2 100644 --- a/packages/google-cloud-dataform/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-dataform/system-test/fixtures/sample/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/system-test/install.ts b/packages/google-cloud-dataform/system-test/install.ts index 6dd1eaadafa..f61fe236476 100644 --- a/packages/google-cloud-dataform/system-test/install.ts +++ b/packages/google-cloud-dataform/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/test/gapic_dataform_v1alpha2.ts b/packages/google-cloud-dataform/test/gapic_dataform_v1alpha2.ts index 32061a137fc..a17f029af33 100644 --- a/packages/google-cloud-dataform/test/gapic_dataform_v1alpha2.ts +++ b/packages/google-cloud-dataform/test/gapic_dataform_v1alpha2.ts @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/test/gapic_dataform_v1beta1.ts b/packages/google-cloud-dataform/test/gapic_dataform_v1beta1.ts index c751bbbd4b7..03a4187b590 100644 --- a/packages/google-cloud-dataform/test/gapic_dataform_v1beta1.ts +++ b/packages/google-cloud-dataform/test/gapic_dataform_v1beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From b82c44dc97f7b6760e09024b1ffdd05744f271cb Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 9 Feb 2023 21:04:16 +0000 Subject: [PATCH 27/80] chore(deps): update dependency @types/mocha to v10 (#22) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/mocha](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mocha) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped)) | [`^9.0.0` -> `^10.0.0`](https://renovatebot.com/diffs/npm/@types%2fmocha/9.1.1/10.0.1) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fmocha/10.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fmocha/10.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fmocha/10.0.1/compatibility-slim/9.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fmocha/10.0.1/confidence-slim/9.1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-dataform). --- packages/google-cloud-dataform/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-dataform/package.json b/packages/google-cloud-dataform/package.json index e29d9177825..537f8422122 100644 --- a/packages/google-cloud-dataform/package.json +++ b/packages/google-cloud-dataform/package.json @@ -42,7 +42,7 @@ "google-gax": "^3.5.2" }, "devDependencies": { - "@types/mocha": "^9.0.0", + "@types/mocha": "^10.0.0", "@types/node": "^18.0.0", "@types/sinon": "^10.0.0", "c8": "^7.7.2", From 8f40c93cb996375d41acddce1821657c32e7bb10 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 10 Feb 2023 10:04:35 -0800 Subject: [PATCH 28/80] chore(main): release 0.3.0 (#27) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 0.3.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- packages/google-cloud-dataform/CHANGELOG.md | 13 +++++++++++++ packages/google-cloud-dataform/package.json | 2 +- ...pet_metadata.google.cloud.dataform.v1alpha2.json | 2 +- ...ppet_metadata.google.cloud.dataform.v1beta1.json | 2 +- packages/google-cloud-dataform/samples/package.json | 2 +- 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-dataform/CHANGELOG.md b/packages/google-cloud-dataform/CHANGELOG.md index c4f66d45e6c..0d83395822e 100644 --- a/packages/google-cloud-dataform/CHANGELOG.md +++ b/packages/google-cloud-dataform/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [0.3.0](https://github.com/googleapis/nodejs-dataform/compare/v0.2.0...v0.3.0) (2023-02-09) + + +### Features + +* Added Snooze API support ([a261ce7](https://github.com/googleapis/nodejs-dataform/commit/a261ce7bd7138b8b236699e63f5c6030ea3803f0)) + + +### Bug Fixes + +* **deps:** Use google-gax v3.5.2 ([#25](https://github.com/googleapis/nodejs-dataform/issues/25)) ([9df841b](https://github.com/googleapis/nodejs-dataform/commit/9df841b7a8e573e777428e649f60de2076ada2c1)) +* Regenerated protos JS and TS definitions ([#29](https://github.com/googleapis/nodejs-dataform/issues/29)) ([cf713a7](https://github.com/googleapis/nodejs-dataform/commit/cf713a7d8b50323b33efbb0793fbe39c4faf5b89)) + ## [0.2.0](https://github.com/googleapis/nodejs-dataform/compare/v0.1.0...v0.2.0) (2022-09-14) diff --git a/packages/google-cloud-dataform/package.json b/packages/google-cloud-dataform/package.json index 537f8422122..0b9556d2856 100644 --- a/packages/google-cloud-dataform/package.json +++ b/packages/google-cloud-dataform/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/dataform", - "version": "0.2.0", + "version": "0.3.0", "description": "dataform client for Node.js", "repository": "googleapis/nodejs-dataform", "license": "Apache-2.0", diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json b/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json index 34d0c9e775d..142af4f96d4 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataform", - "version": "0.2.0", + "version": "0.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json b/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json index 1019a377f7e..7acbfacb570 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataform", - "version": "0.2.0", + "version": "0.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataform/samples/package.json b/packages/google-cloud-dataform/samples/package.json index 54832549aed..6101f3107cb 100644 --- a/packages/google-cloud-dataform/samples/package.json +++ b/packages/google-cloud-dataform/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/dataform": "^0.2.0" + "@google-cloud/dataform": "^0.3.0" }, "devDependencies": { "c8": "^7.1.0", From 57c0441e11fe7c7f2b185bb8061c8be1a036be11 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 16 Feb 2023 16:40:05 -0800 Subject: [PATCH 29/80] feat: [dialogflow] added support for AssistQueryParameters and SynthesizeSpeechConfig (#3995) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: added support for AssistQueryParameters and SynthesizeSpeechConfig docs: add more meaningful comments PiperOrigin-RevId: 510042252 Source-Link: https://github.com/googleapis/googleapis/commit/7b30db729561f4f426eedab20f2a54e54e87b4b5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/17beb9941750b31faa423a29d7a018346a6b88b5 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3cvLk93bEJvdC55YW1sIiwiaCI6IjE3YmViOTk0MTc1MGIzMWZhYTQyM2EyOWQ3YTAxODM0NmE2Yjg4YjUifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../google/cloud/dialogflow/v2/agent.proto | 1 + .../cloud/dialogflow/v2/conversation.proto | 3 + .../dialogflow/v2/conversation_dataset.proto | 1 + .../dialogflow/v2/conversation_model.proto | 1 + .../dialogflow/v2/conversation_profile.proto | 6 ++ .../google/cloud/dialogflow/v2/document.proto | 1 + .../cloud/dialogflow/v2/entity_type.proto | 1 + .../protos/protos.d.ts | 12 ++++ .../google-cloud-dialogflow/protos/protos.js | 56 +++++++++++++++++++ .../protos/protos.json | 8 +++ ...versations.suggest_conversation_summary.js | 4 ++ ...t_metadata.google.cloud.dialogflow.v2.json | 8 ++- ...adata.google.cloud.dialogflow.v2beta1.json | 2 +- .../src/v2/conversations_client.ts | 2 + 14 files changed, 103 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/agent.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/agent.proto index df767631b18..64b219e5f20 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/agent.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/agent.proto @@ -24,6 +24,7 @@ import "google/cloud/dialogflow/v2/validation_result.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Dialogflow.V2"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation.proto index 6d3a7867c20..a9dc36f7aca 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation.proto @@ -418,6 +418,9 @@ message SuggestConversationSummaryRequest { // [latest_message] to use as context when compiling the // suggestion. By default 500 and at most 1000. int32 context_size = 4; + + // Parameters for a human assist query. + AssistQueryParameters assist_query_params = 5; } // The response message for diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_dataset.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_dataset.proto index 1790d2ca296..5757ef379b2 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_dataset.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_dataset.proto @@ -22,6 +22,7 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/dialogflow/v2/gcs.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_model.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_model.proto index 64756eca5c3..91634700954 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_model.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_model.proto @@ -21,6 +21,7 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_profile.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_profile.proto index 98751d7cf18..73cdbea10c3 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_profile.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_profile.proto @@ -252,6 +252,12 @@ message ConversationProfile { string security_settings = 13 [(google.api.resource_reference) = { type: "dialogflow.googleapis.com/CXSecuritySettings" }]; + + // Configuration for Text-to-Speech synthesization. + // + // Used by Phone Gateway to specify synthesization options. If agent defines + // synthesization options as well, agent settings overrides the option here. + SynthesizeSpeechConfig tts_config = 18; } // The request message for diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/document.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/document.proto index 3293d29bfc4..6f1fab774ea 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/document.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/document.proto @@ -22,6 +22,7 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/dialogflow/v2/gcs.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/entity_type.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/entity_type.proto index 3a3e40d6085..1d783c08ae3 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/entity_type.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/entity_type.proto @@ -23,6 +23,7 @@ import "google/api/resource.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Dialogflow.V2"; diff --git a/packages/google-cloud-dialogflow/protos/protos.d.ts b/packages/google-cloud-dialogflow/protos/protos.d.ts index db182c6660b..23c85b403c6 100644 --- a/packages/google-cloud-dialogflow/protos/protos.d.ts +++ b/packages/google-cloud-dialogflow/protos/protos.d.ts @@ -18815,6 +18815,9 @@ export namespace google { /** SuggestConversationSummaryRequest contextSize */ contextSize?: (number|null); + + /** SuggestConversationSummaryRequest assistQueryParams */ + assistQueryParams?: (google.cloud.dialogflow.v2.IAssistQueryParameters|null); } /** Represents a SuggestConversationSummaryRequest. */ @@ -18835,6 +18838,9 @@ export namespace google { /** SuggestConversationSummaryRequest contextSize. */ public contextSize: number; + /** SuggestConversationSummaryRequest assistQueryParams. */ + public assistQueryParams?: (google.cloud.dialogflow.v2.IAssistQueryParameters|null); + /** * Creates a new SuggestConversationSummaryRequest instance using the specified properties. * @param [properties] Properties to set @@ -24155,6 +24161,9 @@ export namespace google { /** ConversationProfile securitySettings */ securitySettings?: (string|null); + + /** ConversationProfile ttsConfig */ + ttsConfig?: (google.cloud.dialogflow.v2.ISynthesizeSpeechConfig|null); } /** Represents a ConversationProfile. */ @@ -24208,6 +24217,9 @@ export namespace google { /** ConversationProfile securitySettings. */ public securitySettings: string; + /** ConversationProfile ttsConfig. */ + public ttsConfig?: (google.cloud.dialogflow.v2.ISynthesizeSpeechConfig|null); + /** * Creates a new ConversationProfile instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-dialogflow/protos/protos.js b/packages/google-cloud-dialogflow/protos/protos.js index 22f1400aadd..18807de3f9f 100644 --- a/packages/google-cloud-dialogflow/protos/protos.js +++ b/packages/google-cloud-dialogflow/protos/protos.js @@ -46202,6 +46202,7 @@ * @property {string|null} [conversation] SuggestConversationSummaryRequest conversation * @property {string|null} [latestMessage] SuggestConversationSummaryRequest latestMessage * @property {number|null} [contextSize] SuggestConversationSummaryRequest contextSize + * @property {google.cloud.dialogflow.v2.IAssistQueryParameters|null} [assistQueryParams] SuggestConversationSummaryRequest assistQueryParams */ /** @@ -46243,6 +46244,14 @@ */ SuggestConversationSummaryRequest.prototype.contextSize = 0; + /** + * SuggestConversationSummaryRequest assistQueryParams. + * @member {google.cloud.dialogflow.v2.IAssistQueryParameters|null|undefined} assistQueryParams + * @memberof google.cloud.dialogflow.v2.SuggestConversationSummaryRequest + * @instance + */ + SuggestConversationSummaryRequest.prototype.assistQueryParams = null; + /** * Creates a new SuggestConversationSummaryRequest instance using the specified properties. * @function create @@ -46273,6 +46282,8 @@ writer.uint32(/* id 3, wireType 2 =*/26).string(message.latestMessage); if (message.contextSize != null && Object.hasOwnProperty.call(message, "contextSize")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.contextSize); + if (message.assistQueryParams != null && Object.hasOwnProperty.call(message, "assistQueryParams")) + $root.google.cloud.dialogflow.v2.AssistQueryParameters.encode(message.assistQueryParams, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -46319,6 +46330,10 @@ message.contextSize = reader.int32(); break; } + case 5: { + message.assistQueryParams = $root.google.cloud.dialogflow.v2.AssistQueryParameters.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -46363,6 +46378,11 @@ if (message.contextSize != null && message.hasOwnProperty("contextSize")) if (!$util.isInteger(message.contextSize)) return "contextSize: integer expected"; + if (message.assistQueryParams != null && message.hasOwnProperty("assistQueryParams")) { + var error = $root.google.cloud.dialogflow.v2.AssistQueryParameters.verify(message.assistQueryParams); + if (error) + return "assistQueryParams." + error; + } return null; }; @@ -46384,6 +46404,11 @@ message.latestMessage = String(object.latestMessage); if (object.contextSize != null) message.contextSize = object.contextSize | 0; + if (object.assistQueryParams != null) { + if (typeof object.assistQueryParams !== "object") + throw TypeError(".google.cloud.dialogflow.v2.SuggestConversationSummaryRequest.assistQueryParams: object expected"); + message.assistQueryParams = $root.google.cloud.dialogflow.v2.AssistQueryParameters.fromObject(object.assistQueryParams); + } return message; }; @@ -46404,6 +46429,7 @@ object.conversation = ""; object.latestMessage = ""; object.contextSize = 0; + object.assistQueryParams = null; } if (message.conversation != null && message.hasOwnProperty("conversation")) object.conversation = message.conversation; @@ -46411,6 +46437,8 @@ object.latestMessage = message.latestMessage; if (message.contextSize != null && message.hasOwnProperty("contextSize")) object.contextSize = message.contextSize; + if (message.assistQueryParams != null && message.hasOwnProperty("assistQueryParams")) + object.assistQueryParams = $root.google.cloud.dialogflow.v2.AssistQueryParameters.toObject(message.assistQueryParams, options); return object; }; @@ -58284,6 +58312,7 @@ * @property {string|null} [languageCode] ConversationProfile languageCode * @property {string|null} [timeZone] ConversationProfile timeZone * @property {string|null} [securitySettings] ConversationProfile securitySettings + * @property {google.cloud.dialogflow.v2.ISynthesizeSpeechConfig|null} [ttsConfig] ConversationProfile ttsConfig */ /** @@ -58413,6 +58442,14 @@ */ ConversationProfile.prototype.securitySettings = ""; + /** + * ConversationProfile ttsConfig. + * @member {google.cloud.dialogflow.v2.ISynthesizeSpeechConfig|null|undefined} ttsConfig + * @memberof google.cloud.dialogflow.v2.ConversationProfile + * @instance + */ + ConversationProfile.prototype.ttsConfig = null; + /** * Creates a new ConversationProfile instance using the specified properties. * @function create @@ -58465,6 +58502,8 @@ writer.uint32(/* id 13, wireType 2 =*/106).string(message.securitySettings); if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) writer.uint32(/* id 14, wireType 2 =*/114).string(message.timeZone); + if (message.ttsConfig != null && Object.hasOwnProperty.call(message, "ttsConfig")) + $root.google.cloud.dialogflow.v2.SynthesizeSpeechConfig.encode(message.ttsConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); return writer; }; @@ -58555,6 +58594,10 @@ message.securitySettings = reader.string(); break; } + case 18: { + message.ttsConfig = $root.google.cloud.dialogflow.v2.SynthesizeSpeechConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -58650,6 +58693,11 @@ if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) if (!$util.isString(message.securitySettings)) return "securitySettings: string expected"; + if (message.ttsConfig != null && message.hasOwnProperty("ttsConfig")) { + var error = $root.google.cloud.dialogflow.v2.SynthesizeSpeechConfig.verify(message.ttsConfig); + if (error) + return "ttsConfig." + error; + } return null; }; @@ -58720,6 +58768,11 @@ message.timeZone = String(object.timeZone); if (object.securitySettings != null) message.securitySettings = String(object.securitySettings); + if (object.ttsConfig != null) { + if (typeof object.ttsConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2.ConversationProfile.ttsConfig: object expected"); + message.ttsConfig = $root.google.cloud.dialogflow.v2.SynthesizeSpeechConfig.fromObject(object.ttsConfig); + } return message; }; @@ -58751,6 +58804,7 @@ object.updateTime = null; object.securitySettings = ""; object.timeZone = ""; + object.ttsConfig = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -58780,6 +58834,8 @@ object.securitySettings = message.securitySettings; if (message.timeZone != null && message.hasOwnProperty("timeZone")) object.timeZone = message.timeZone; + if (message.ttsConfig != null && message.hasOwnProperty("ttsConfig")) + object.ttsConfig = $root.google.cloud.dialogflow.v2.SynthesizeSpeechConfig.toObject(message.ttsConfig, options); return object; }; diff --git a/packages/google-cloud-dialogflow/protos/protos.json b/packages/google-cloud-dialogflow/protos/protos.json index dd7e6eb032f..df660743409 100644 --- a/packages/google-cloud-dialogflow/protos/protos.json +++ b/packages/google-cloud-dialogflow/protos/protos.json @@ -5758,6 +5758,10 @@ "contextSize": { "type": "int32", "id": 4 + }, + "assistQueryParams": { + "type": "AssistQueryParameters", + "id": 5 } } }, @@ -7274,6 +7278,10 @@ "options": { "(google.api.resource_reference).type": "dialogflow.googleapis.com/CXSecuritySettings" } + }, + "ttsConfig": { + "type": "SynthesizeSpeechConfig", + "id": 18 } } }, diff --git a/packages/google-cloud-dialogflow/samples/generated/v2/conversations.suggest_conversation_summary.js b/packages/google-cloud-dialogflow/samples/generated/v2/conversations.suggest_conversation_summary.js index 50f784a2430..c0e3578b265 100644 --- a/packages/google-cloud-dialogflow/samples/generated/v2/conversations.suggest_conversation_summary.js +++ b/packages/google-cloud-dialogflow/samples/generated/v2/conversations.suggest_conversation_summary.js @@ -48,6 +48,10 @@ function main(conversation) { * suggestion. By default 500 and at most 1000. */ // const contextSize = 1234 + /** + * Parameters for a human assist query. + */ + // const assistQueryParams = {} // Imports the Dialogflow library const {ConversationsClient} = require('@google-cloud/dialogflow').v2; diff --git a/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata.google.cloud.dialogflow.v2.json b/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata.google.cloud.dialogflow.v2.json index c842bb49aab..45fcbc69546 100644 --- a/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata.google.cloud.dialogflow.v2.json +++ b/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata.google.cloud.dialogflow.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dialogflow", - "version": "5.5.0", + "version": "5.5.1", "language": "TYPESCRIPT", "apis": [ { @@ -1914,7 +1914,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 73, "type": "FULL" } ], @@ -1934,6 +1934,10 @@ { "name": "context_size", "type": "TYPE_INT32" + }, + { + "name": "assist_query_params", + "type": ".google.cloud.dialogflow.v2.AssistQueryParameters" } ], "resultType": ".google.cloud.dialogflow.v2.SuggestConversationSummaryResponse", diff --git a/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json b/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json index 4786986bacc..6fc91f5a00a 100644 --- a/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json +++ b/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dialogflow", - "version": "5.5.0", + "version": "5.5.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dialogflow/src/v2/conversations_client.ts b/packages/google-cloud-dialogflow/src/v2/conversations_client.ts index d1026e0ae21..7478c0734a7 100644 --- a/packages/google-cloud-dialogflow/src/v2/conversations_client.ts +++ b/packages/google-cloud-dialogflow/src/v2/conversations_client.ts @@ -826,6 +826,8 @@ export class ConversationsClient { * Max number of messages prior to and including * [latest_message] to use as context when compiling the * suggestion. By default 500 and at most 1000. + * @param {google.cloud.dialogflow.v2.AssistQueryParameters} request.assistQueryParams + * Parameters for a human assist query. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. From 904ac0cadd5b59c75309ac7766dad5da3080d105 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 21 Feb 2023 18:35:37 -0800 Subject: [PATCH 30/80] feat: [contentwarehouse] Added Training and Evaluation functions, request, responses and metadata to document_processor_service.proto (#4009) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Added Training and Evaluation functions, request, responses and metadata to document_processor_service.proto feat: Added evaluation.proto feat: Added latest_evaluation to processor.proto chore: removed deprecated flag from REPLACE in OperationType in document.proto PiperOrigin-RevId: 511230520 Source-Link: https://github.com/googleapis/googleapis/commit/c53bf8d535e342737aa479cbe2cdead26507cdf4 Source-Link: https://github.com/googleapis/googleapis-gen/commit/5693cbc98b6412085ff6d3aba719b68e307c5357 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbnRlbnR3YXJlaG91c2UvLk93bEJvdC55YW1sIiwiaCI6IjU2OTNjYmM5OGI2NDEyMDg1ZmY2ZDNhYmE3MTliNjhlMzA3YzUzNTcifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../google/cloud/documentai/v1/document.proto | 31 ++- .../v1/document_processor_service.proto | 202 ++++++++++++++++++ .../cloud/documentai/v1/document_schema.proto | 20 +- .../cloud/documentai/v1/evaluation.proto | 181 ++++++++++++++++ .../cloud/documentai/v1/processor.proto | 4 + .../protos/protos.d.ts | 1 + .../protos/protos.js | 7 + .../protos/protos.json | 17 +- ...data.google.cloud.contentwarehouse.v1.json | 2 +- 9 files changed, 446 insertions(+), 19 deletions(-) create mode 100644 packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/evaluation.proto diff --git a/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/document.proto b/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/document.proto index 18620dbca06..f3431b3d4af 100644 --- a/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/document.proto +++ b/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/document.proto @@ -735,22 +735,29 @@ message Document { // Remove an element identified by `parent`. REMOVE = 2; - // Replace an element identified by `parent`. + // Updates any fields within the given provenance scope of the message. It + // 'overwrites' the fields rather than replacing them. This is + // especially relevant when we just want to update a field value of an + // entity without also affecting all the child properties. + UPDATE = 7; + + // Currently unused. Replace an element identified by `parent`. REPLACE = 3; - // Request human review for the element identified by `parent`. - EVAL_REQUESTED = 4; + // Deprecated. Request human review for the element identified by + // `parent`. + EVAL_REQUESTED = 4 [deprecated = true]; - // Element is reviewed and approved at human review, confidence will be - // set to 1.0. - EVAL_APPROVED = 5; + // Deprecated. Element is reviewed and approved at human review, + // confidence will be set to 1.0. + EVAL_APPROVED = 5 [deprecated = true]; - // Element is skipped in the validation process. - EVAL_SKIPPED = 6; + // Deprecated. Element is skipped in the validation process. + EVAL_SKIPPED = 6 [deprecated = true]; } // The index of the revision that produced this element. - int32 revision = 1; + int32 revision = 1 [deprecated = true]; // The Id of this operation. Needs to be unique within the scope of the // revision. @@ -786,7 +793,8 @@ message Document { string processor = 5; } - // Id of the revision. Unique within the context of the document. + // Id of the revision, internally generated by doc proto storage. + // Unique within the context of the document. string id = 1; // The revisions that this revision is based on. This can include one or @@ -799,7 +807,8 @@ message Document { // `provenance.parent.revision` fields that index into this field. repeated string parent_ids = 7; - // The time that the revision was created. + // The time that the revision was created, internally generated by + // doc proto storage at the time of create. google.protobuf.Timestamp create_time = 3; // Human Review information of this revision. diff --git a/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/document_processor_service.proto b/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/document_processor_service.proto index 814cc94cc1f..eec77bd88e4 100644 --- a/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/document_processor_service.proto +++ b/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/document_processor_service.proto @@ -23,10 +23,12 @@ import "google/api/resource.proto"; import "google/cloud/documentai/v1/document.proto"; import "google/cloud/documentai/v1/document_io.proto"; import "google/cloud/documentai/v1/document_schema.proto"; +import "google/cloud/documentai/v1/evaluation.proto"; import "google/cloud/documentai/v1/operation_metadata.proto"; import "google/cloud/documentai/v1/processor.proto"; import "google/cloud/documentai/v1/processor_type.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; @@ -131,6 +133,22 @@ service DocumentProcessorService { option (google.api.method_signature) = "name"; } + // Trains a new processor version. + // Operation metadata is returned as + // cloud_documentai_core.TrainProcessorVersionMetadata. + rpc TrainProcessorVersion(TrainProcessorVersionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/processors/*}/processorVersions:train" + body: "*" + }; + option (google.api.method_signature) = "parent,processor_version"; + option (google.longrunning.operation_info) = { + response_type: "TrainProcessorVersionResponse" + metadata_type: "TrainProcessorVersionMetadata" + }; + } + // Gets a processor version detail. rpc GetProcessorVersion(GetProcessorVersionRequest) returns (ProcessorVersion) { @@ -272,6 +290,38 @@ service DocumentProcessorService { metadata_type: "ReviewDocumentOperationMetadata" }; } + + // Evaluates a ProcessorVersion against annotated documents, producing an + // Evaluation. + rpc EvaluateProcessorVersion(EvaluateProcessorVersionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{processor_version=projects/*/locations/*/processors/*/processorVersions/*}:evaluateProcessorVersion" + body: "*" + }; + option (google.api.method_signature) = "processor_version"; + option (google.longrunning.operation_info) = { + response_type: "EvaluateProcessorVersionResponse" + metadata_type: "EvaluateProcessorVersionMetadata" + }; + } + + // Retrieves a specific evaluation. + rpc GetEvaluation(GetEvaluationRequest) returns (Evaluation) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/processors/*/processorVersions/*/evaluations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Retrieves a set of evaluations for a given processor version. + rpc ListEvaluations(ListEvaluationsRequest) + returns (ListEvaluationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/processors/*/processorVersions/*}/evaluations" + }; + option (google.api.method_signature) = "parent"; + } } // Request message for the process document method. @@ -758,6 +808,81 @@ message SetDefaultProcessorVersionMetadata { CommonOperationMetadata common_metadata = 1; } +// Request message for the create processor version method. +message TrainProcessorVersionRequest { + // The input data used to train a new `ProcessorVersion`. + message InputData { + // The documents used for training the new version. + BatchDocumentsInputConfig training_documents = 3; + + // The documents used for testing the trained version. + BatchDocumentsInputConfig test_documents = 4; + } + + // Required. The parent (project, location and processor) to create the new + // version for. Format: + // `projects/{project}/locations/{location}/processors/{processor}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "documentai.googleapis.com/Processor" + } + ]; + + // Required. The processor version to be created. + ProcessorVersion processor_version = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The schema the processor version will be trained with. + DocumentSchema document_schema = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The input data used to train the `ProcessorVersion`. + InputData input_data = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The processor version to use as a base for training. This + // processor version must be a child of `parent`. Format: + // `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`. + string base_processor_version = 8 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response for the TrainProcessorVersion method. +message TrainProcessorVersionResponse { + // The resource name of the processor version produced by training. + string processor_version = 1; +} + +// The metadata that represents a processor version being created. +message TrainProcessorVersionMetadata { + // The dataset validation information. + // This includes any and all errors with documents and the dataset. + message DatasetValidation { + // The total number of document errors. + int32 document_error_count = 3; + + // The total number of dataset errors. + int32 dataset_error_count = 4; + + // Error information pertaining to specific documents. A maximum of 10 + // document errors will be returned. + // Any document with errors will not be used throughout training. + repeated google.rpc.Status document_errors = 1; + + // Error information for the dataset as a whole. A maximum of 10 dataset + // errors will be returned. + // A single dataset error is terminal for training. + repeated google.rpc.Status dataset_errors = 2; + } + + // The basic metadata of the long running operation. + CommonOperationMetadata common_metadata = 1; + + // The training dataset validation information. + DatasetValidation training_dataset_validation = 2; + + // The test dataset validation information. + DatasetValidation test_dataset_validation = 3; +} + // Request message for review document method. message ReviewDocumentRequest { // The priority level of the human review task. @@ -828,3 +953,80 @@ message ReviewDocumentOperationMetadata { // The Crowd Compute question ID. string question_id = 6; } + +// Evaluates the given ProcessorVersion against the supplied documents. +message EvaluateProcessorVersionRequest { + // Required. The resource name of the + // [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to + // evaluate. + // `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + string processor_version = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "documentai.googleapis.com/ProcessorVersion" + } + ]; + + // Optional. The documents used in the evaluation. If unspecified, use the + // processor's dataset as evaluation input. + BatchDocumentsInputConfig evaluation_documents = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Metadata of the EvaluateProcessorVersion method. +message EvaluateProcessorVersionMetadata { + // The basic metadata of the long running operation. + CommonOperationMetadata common_metadata = 1; +} + +// Metadata of the EvaluateProcessorVersion method. +message EvaluateProcessorVersionResponse { + // The resource name of the created evaluation. + string evaluation = 2; +} + +// Retrieves a specific Evaluation. +message GetEvaluationRequest { + // Required. The resource name of the + // [Evaluation][google.cloud.documentai.v1.Evaluation] to get. + // `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "documentai.googleapis.com/Evaluation" + } + ]; +} + +// Retrieves a list of evaluations for a given ProcessorVersion. +message ListEvaluationsRequest { + // Required. The resource name of the + // [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list + // evaluations for. + // `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "documentai.googleapis.com/ProcessorVersion" + } + ]; + + // The standard list page size. + // If unspecified, at most 5 evaluations will be returned. + // The maximum value is 100; values above 100 will be coerced to 100. + int32 page_size = 2; + + // A page token, received from a previous `ListEvaluations` call. + // Provide this to retrieve the subsequent page. + string page_token = 3; +} + +// The response from ListEvaluations. +message ListEvaluationsResponse { + // The evaluations requested. + repeated Evaluation evaluations = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} diff --git a/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/document_schema.proto b/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/document_schema.proto index 3fffba9fadb..0b2cf60c1e0 100644 --- a/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/document_schema.proto +++ b/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/document_schema.proto @@ -38,20 +38,28 @@ message DocumentSchema { // Defines properties that can be part of the entity type. message Property { - // Types of occurrences of the entity type in the document. Note: this - // represents the number of instances of an entity types, not number of - // mentions of a given entity instance. + // Types of occurrences of the entity type in the document. This + // represents the number of instances of instances of an entity, not + // number of mentions of an entity. For example, a bank statement may + // only have one `account_number`, but this account number may be + // mentioned in several places on the document. In this case the + // 'account_number' would be considered a `REQUIRED_ONCE` entity type. If, + // on the other hand, we expect a bank statement to contain the status of + // multiple different accounts for the customers, the occurrence type will + // be set to `REQUIRED_MULTIPLE`. enum OccurrenceType { // Unspecified occurrence type. OCCURRENCE_TYPE_UNSPECIFIED = 0; - // There will be zero or one instance of this entity type. + // There will be zero or one instance of this entity type. The same + // entity instance may be mentioned multiple times. OPTIONAL_ONCE = 1; // The entity type will appear zero or multiple times. OPTIONAL_MULTIPLE = 2; - // The entity type will only appear exactly once. + // The entity type will only appear exactly once. The same + // entity instance may be mentioned multiple times. REQUIRED_ONCE = 3; // The entity type will appear once or more times. @@ -103,7 +111,7 @@ message DocumentSchema { // one should be set. repeated string base_types = 2; - // Describing the nested structure, or composition of an entity. + // Description the nested structure, or composition of an entity. repeated Property properties = 6; } diff --git a/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/evaluation.proto b/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/evaluation.proto new file mode 100644 index 00000000000..0662470a8b2 --- /dev/null +++ b/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/evaluation.proto @@ -0,0 +1,181 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.documentai.v1; + +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.DocumentAI.V1"; +option go_package = "cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb"; +option java_multiple_files = true; +option java_outer_classname = "DocumentAiEvaluation"; +option java_package = "com.google.cloud.documentai.v1"; +option php_namespace = "Google\\Cloud\\DocumentAI\\V1"; +option ruby_package = "Google::Cloud::DocumentAI::V1"; + +// Gives a short summary of an evaluation, and links to the evaluation itself. +message EvaluationReference { + // The resource name of the Long Running Operation for the evaluation. + string operation = 1; + + // The resource name of the evaluation. + string evaluation = 2 [(google.api.resource_reference) = { + type: "documentai.googleapis.com/Evaluation" + }]; + + // An aggregate of the statistics for the evaluation with fuzzy matching on. + Evaluation.Metrics aggregate_metrics = 4; + + // An aggregate of the statistics for the evaluation with fuzzy matching off. + Evaluation.Metrics aggregate_metrics_exact = 5; +} + +// An evaluation of a ProcessorVersion's performance. +message Evaluation { + option (google.api.resource) = { + type: "documentai.googleapis.com/Evaluation" + pattern: "projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}" + }; + + // Evaluation counters for the documents that were used. + message Counters { + // How many documents were sent for evaluation. + int32 input_documents_count = 1; + + // How many documents were not included in the evaluation as they didn't + // pass validation. + int32 invalid_documents_count = 2; + + // How many documents were not included in the evaluation as Document AI + // failed to process them. + int32 failed_documents_count = 3; + + // How many documents were used in the evaluation. + int32 evaluated_documents_count = 4; + } + + // Evaluation metrics, either in aggregate or about a specific entity. + message Metrics { + // The calculated precision. + float precision = 1; + + // The calculated recall. + float recall = 2; + + // The calculated f1 score. + float f1_score = 3; + + // The amount of occurrences in predicted documents. + int32 predicted_occurrences_count = 4; + + // The amount of occurrences in ground truth documents. + int32 ground_truth_occurrences_count = 5; + + // The amount of documents with a predicted occurrence. + int32 predicted_document_count = 10; + + // The amount of documents with a ground truth occurrence. + int32 ground_truth_document_count = 11; + + // The amount of true positives. + int32 true_positives_count = 6; + + // The amount of false positives. + int32 false_positives_count = 7; + + // The amount of false negatives. + int32 false_negatives_count = 8; + + // The amount of documents that had an occurrence of this label. + int32 total_documents_count = 9; + } + + // Evaluations metrics, at a specific confidence level. + message ConfidenceLevelMetrics { + // The confidence level. + float confidence_level = 1; + + // The metrics at the specific confidence level. + Metrics metrics = 2; + } + + // Metrics across multiple confidence levels. + message MultiConfidenceMetrics { + // A type that determines how metrics should be interpreted. + enum MetricsType { + // The metrics type is unspecified. By default, metrics without a + // particular specification are for leaf entity types (i.e., top-level + // entity types without child types, or child types which are not + // parent types themselves). + METRICS_TYPE_UNSPECIFIED = 0; + + // Indicates whether metrics for this particular label type represent an + // aggregate of metrics for other types instead of being based on actual + // TP/FP/FN values for the label type. Metrics for parent (i.e., non-leaf) + // entity types are an aggregate of metrics for their children. + AGGREGATE = 1; + } + + // Metrics across confidence levels with fuzzy matching enabled. + repeated ConfidenceLevelMetrics confidence_level_metrics = 1; + + // Metrics across confidence levels with only exact matching. + repeated ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + + // The calculated area under the precision recall curve (AUPRC), computed by + // integrating over all confidence thresholds. + float auprc = 2; + + // The Estimated Calibration Error (ECE) of the confidence of the predicted + // entities. + float estimated_calibration_error = 3; + + // The AUPRC for metrics with fuzzy matching disabled, i.e., exact matching + // only. + float auprc_exact = 5; + + // The ECE for the predicted entities with fuzzy matching disabled, i.e., + // exact matching only. + float estimated_calibration_error_exact = 6; + + // The metrics type for the label. + MetricsType metrics_type = 7; + } + + // The resource name of the evaluation. + // Format: + // `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}` + string name = 1; + + // The time that the evaluation was created. + google.protobuf.Timestamp create_time = 2; + + // Counters for the documents used in the evaluation. + Counters document_counters = 5; + + // Metrics for all the entities in aggregate. + MultiConfidenceMetrics all_entities_metrics = 3; + + // Metrics across confidence levels, for different entities. + map entity_metrics = 4; + + // The KMS key name used for encryption. + string kms_key_name = 6; + + // The KMS key version with which data is encrypted. + string kms_key_version_name = 7; +} diff --git a/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/processor.proto b/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/processor.proto index 4dabe48fe6f..8c257c548b6 100644 --- a/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/processor.proto +++ b/packages/google-cloud-contentwarehouse/protos/google/cloud/documentai/v1/processor.proto @@ -19,6 +19,7 @@ package google.cloud.documentai.v1; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/documentai/v1/document_schema.proto"; +import "google/cloud/documentai/v1/evaluation.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.DocumentAI.V1"; @@ -96,6 +97,9 @@ message ProcessorVersion { // The time the processor version was created. google.protobuf.Timestamp create_time = 7; + // The most recently invoked evaluation for the processor version. + EvaluationReference latest_evaluation = 8; + // The KMS key name used for encryption. string kms_key_name = 9; diff --git a/packages/google-cloud-contentwarehouse/protos/protos.d.ts b/packages/google-cloud-contentwarehouse/protos/protos.d.ts index 025486af7b6..67185462783 100644 --- a/packages/google-cloud-contentwarehouse/protos/protos.d.ts +++ b/packages/google-cloud-contentwarehouse/protos/protos.d.ts @@ -15193,6 +15193,7 @@ export namespace google { OPERATION_TYPE_UNSPECIFIED = 0, ADD = 1, REMOVE = 2, + UPDATE = 7, REPLACE = 3, EVAL_REQUESTED = 4, EVAL_APPROVED = 5, diff --git a/packages/google-cloud-contentwarehouse/protos/protos.js b/packages/google-cloud-contentwarehouse/protos/protos.js index d46715ecf04..8d1b174cbbd 100644 --- a/packages/google-cloud-contentwarehouse/protos/protos.js +++ b/packages/google-cloud-contentwarehouse/protos/protos.js @@ -37147,6 +37147,7 @@ case 0: case 1: case 2: + case 7: case 3: case 4: case 5: @@ -37201,6 +37202,10 @@ case 2: message.type = 2; break; + case "UPDATE": + case 7: + message.type = 7; + break; case "REPLACE": case 3: message.type = 3; @@ -37538,6 +37543,7 @@ * @property {number} OPERATION_TYPE_UNSPECIFIED=0 OPERATION_TYPE_UNSPECIFIED value * @property {number} ADD=1 ADD value * @property {number} REMOVE=2 REMOVE value + * @property {number} UPDATE=7 UPDATE value * @property {number} REPLACE=3 REPLACE value * @property {number} EVAL_REQUESTED=4 EVAL_REQUESTED value * @property {number} EVAL_APPROVED=5 EVAL_APPROVED value @@ -37548,6 +37554,7 @@ values[valuesById[0] = "OPERATION_TYPE_UNSPECIFIED"] = 0; values[valuesById[1] = "ADD"] = 1; values[valuesById[2] = "REMOVE"] = 2; + values[valuesById[7] = "UPDATE"] = 7; values[valuesById[3] = "REPLACE"] = 3; values[valuesById[4] = "EVAL_REQUESTED"] = 4; values[valuesById[5] = "EVAL_APPROVED"] = 5; diff --git a/packages/google-cloud-contentwarehouse/protos/protos.json b/packages/google-cloud-contentwarehouse/protos/protos.json index c3e520cbd8d..3165dab79c0 100644 --- a/packages/google-cloud-contentwarehouse/protos/protos.json +++ b/packages/google-cloud-contentwarehouse/protos/protos.json @@ -3365,7 +3365,10 @@ "fields": { "revision": { "type": "int32", - "id": 1 + "id": 1, + "options": { + "deprecated": true + } }, "id": { "type": "int32", @@ -3405,10 +3408,22 @@ } }, "OperationType": { + "valuesOptions": { + "EVAL_REQUESTED": { + "deprecated": true + }, + "EVAL_APPROVED": { + "deprecated": true + }, + "EVAL_SKIPPED": { + "deprecated": true + } + }, "values": { "OPERATION_TYPE_UNSPECIFIED": 0, "ADD": 1, "REMOVE": 2, + "UPDATE": 7, "REPLACE": 3, "EVAL_REQUESTED": 4, "EVAL_APPROVED": 5, diff --git a/packages/google-cloud-contentwarehouse/samples/generated/v1/snippet_metadata.google.cloud.contentwarehouse.v1.json b/packages/google-cloud-contentwarehouse/samples/generated/v1/snippet_metadata.google.cloud.contentwarehouse.v1.json index 8aa1d1cf85a..d8574cfbffd 100644 --- a/packages/google-cloud-contentwarehouse/samples/generated/v1/snippet_metadata.google.cloud.contentwarehouse.v1.json +++ b/packages/google-cloud-contentwarehouse/samples/generated/v1/snippet_metadata.google.cloud.contentwarehouse.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-contentwarehouse", - "version": "0.3.0", + "version": "0.3.1", "language": "TYPESCRIPT", "apis": [ { From f81218fe90fb0ead2487c3e321e258edbde74039 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 21 Feb 2023 21:14:58 -0800 Subject: [PATCH 31/80] feat: [documentai] Added Training and Evaluation functions, request, responses and metadata to document_processor_service.proto (#4008) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Added Training and Evaluation functions, request, responses and metadata to document_processor_service.proto feat: Added evaluation.proto feat: Added latest_evaluation to processor.proto chore: removed deprecated flag from REPLACE in OperationType in document.proto PiperOrigin-RevId: 511230520 Source-Link: https://github.com/googleapis/googleapis/commit/c53bf8d535e342737aa479cbe2cdead26507cdf4 Source-Link: https://github.com/googleapis/googleapis-gen/commit/5693cbc98b6412085ff6d3aba719b68e307c5357 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRvY3VtZW50YWkvLk93bEJvdC55YW1sIiwiaCI6IjU2OTNjYmM5OGI2NDEyMDg1ZmY2ZDNhYmE3MTliNjhlMzA3YzUzNTcifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: Daniel Bankhead --- packages/google-cloud-documentai/README.md | 4 + .../google/cloud/documentai/v1/document.proto | 31 +- .../v1/document_processor_service.proto | 202 + .../cloud/documentai/v1/document_schema.proto | 20 +- .../cloud/documentai/v1/evaluation.proto | 181 + .../cloud/documentai/v1/processor.proto | 4 + .../protos/protos.d.ts | 3084 +++++-- .../google-cloud-documentai/protos/protos.js | 8161 +++++++++++++---- .../protos/protos.json | 479 +- .../google-cloud-documentai/samples/README.md | 72 + ...ssor_service.evaluate_processor_version.js | 70 + ...cument_processor_service.get_evaluation.js | 63 + ...ment_processor_service.list_evaluations.js | 77 + ...ocessor_service.train_processor_version.js | 83 + ...t_metadata.google.cloud.documentai.v1.json | 190 +- ...adata.google.cloud.documentai.v1beta1.json | 2 +- ...adata.google.cloud.documentai.v1beta2.json | 2 +- ...adata.google.cloud.documentai.v1beta3.json | 2 +- .../v1/document_processor_service_client.ts | 727 ++ ...ument_processor_service_client_config.json | 16 + ...document_processor_service_proto_list.json | 1 + .../src/v1/gapic_metadata.json | 44 + .../gapic_document_processor_service_v1.ts | 1508 ++- 23 files changed, 12556 insertions(+), 2467 deletions(-) create mode 100644 packages/google-cloud-documentai/protos/google/cloud/documentai/v1/evaluation.proto create mode 100644 packages/google-cloud-documentai/samples/generated/v1/document_processor_service.evaluate_processor_version.js create mode 100644 packages/google-cloud-documentai/samples/generated/v1/document_processor_service.get_evaluation.js create mode 100644 packages/google-cloud-documentai/samples/generated/v1/document_processor_service.list_evaluations.js create mode 100644 packages/google-cloud-documentai/samples/generated/v1/document_processor_service.train_processor_version.js diff --git a/packages/google-cloud-documentai/README.md b/packages/google-cloud-documentai/README.md index d37835acbb3..af2c6184620 100644 --- a/packages/google-cloud-documentai/README.md +++ b/packages/google-cloud-documentai/README.md @@ -142,16 +142,20 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Document_processor_service.deploy_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.deploy_processor_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1/document_processor_service.deploy_processor_version.js,samples/README.md) | | Document_processor_service.disable_processor | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.disable_processor.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1/document_processor_service.disable_processor.js,samples/README.md) | | Document_processor_service.enable_processor | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.enable_processor.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1/document_processor_service.enable_processor.js,samples/README.md) | +| Document_processor_service.evaluate_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.evaluate_processor_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1/document_processor_service.evaluate_processor_version.js,samples/README.md) | | Document_processor_service.fetch_processor_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.fetch_processor_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1/document_processor_service.fetch_processor_types.js,samples/README.md) | +| Document_processor_service.get_evaluation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.get_evaluation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1/document_processor_service.get_evaluation.js,samples/README.md) | | Document_processor_service.get_processor | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.get_processor.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1/document_processor_service.get_processor.js,samples/README.md) | | Document_processor_service.get_processor_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.get_processor_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1/document_processor_service.get_processor_type.js,samples/README.md) | | Document_processor_service.get_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.get_processor_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1/document_processor_service.get_processor_version.js,samples/README.md) | +| Document_processor_service.list_evaluations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.list_evaluations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1/document_processor_service.list_evaluations.js,samples/README.md) | | Document_processor_service.list_processor_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.list_processor_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1/document_processor_service.list_processor_types.js,samples/README.md) | | Document_processor_service.list_processor_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.list_processor_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1/document_processor_service.list_processor_versions.js,samples/README.md) | | Document_processor_service.list_processors | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.list_processors.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1/document_processor_service.list_processors.js,samples/README.md) | | Document_processor_service.process_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.process_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1/document_processor_service.process_document.js,samples/README.md) | | Document_processor_service.review_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.review_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1/document_processor_service.review_document.js,samples/README.md) | | Document_processor_service.set_default_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.set_default_processor_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1/document_processor_service.set_default_processor_version.js,samples/README.md) | +| Document_processor_service.train_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.train_processor_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1/document_processor_service.train_processor_version.js,samples/README.md) | | Document_processor_service.undeploy_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.undeploy_processor_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1/document_processor_service.undeploy_processor_version.js,samples/README.md) | | Document_understanding_service.batch_process_documents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta1/document_understanding_service.batch_process_documents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1beta1/document_understanding_service.batch_process_documents.js,samples/README.md) | | Document_understanding_service.batch_process_documents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta2/document_understanding_service.batch_process_documents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1beta2/document_understanding_service.batch_process_documents.js,samples/README.md) | diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document.proto index 18620dbca06..f3431b3d4af 100644 --- a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document.proto +++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document.proto @@ -735,22 +735,29 @@ message Document { // Remove an element identified by `parent`. REMOVE = 2; - // Replace an element identified by `parent`. + // Updates any fields within the given provenance scope of the message. It + // 'overwrites' the fields rather than replacing them. This is + // especially relevant when we just want to update a field value of an + // entity without also affecting all the child properties. + UPDATE = 7; + + // Currently unused. Replace an element identified by `parent`. REPLACE = 3; - // Request human review for the element identified by `parent`. - EVAL_REQUESTED = 4; + // Deprecated. Request human review for the element identified by + // `parent`. + EVAL_REQUESTED = 4 [deprecated = true]; - // Element is reviewed and approved at human review, confidence will be - // set to 1.0. - EVAL_APPROVED = 5; + // Deprecated. Element is reviewed and approved at human review, + // confidence will be set to 1.0. + EVAL_APPROVED = 5 [deprecated = true]; - // Element is skipped in the validation process. - EVAL_SKIPPED = 6; + // Deprecated. Element is skipped in the validation process. + EVAL_SKIPPED = 6 [deprecated = true]; } // The index of the revision that produced this element. - int32 revision = 1; + int32 revision = 1 [deprecated = true]; // The Id of this operation. Needs to be unique within the scope of the // revision. @@ -786,7 +793,8 @@ message Document { string processor = 5; } - // Id of the revision. Unique within the context of the document. + // Id of the revision, internally generated by doc proto storage. + // Unique within the context of the document. string id = 1; // The revisions that this revision is based on. This can include one or @@ -799,7 +807,8 @@ message Document { // `provenance.parent.revision` fields that index into this field. repeated string parent_ids = 7; - // The time that the revision was created. + // The time that the revision was created, internally generated by + // doc proto storage at the time of create. google.protobuf.Timestamp create_time = 3; // Human Review information of this revision. diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document_processor_service.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document_processor_service.proto index 814cc94cc1f..eec77bd88e4 100644 --- a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document_processor_service.proto +++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document_processor_service.proto @@ -23,10 +23,12 @@ import "google/api/resource.proto"; import "google/cloud/documentai/v1/document.proto"; import "google/cloud/documentai/v1/document_io.proto"; import "google/cloud/documentai/v1/document_schema.proto"; +import "google/cloud/documentai/v1/evaluation.proto"; import "google/cloud/documentai/v1/operation_metadata.proto"; import "google/cloud/documentai/v1/processor.proto"; import "google/cloud/documentai/v1/processor_type.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; @@ -131,6 +133,22 @@ service DocumentProcessorService { option (google.api.method_signature) = "name"; } + // Trains a new processor version. + // Operation metadata is returned as + // cloud_documentai_core.TrainProcessorVersionMetadata. + rpc TrainProcessorVersion(TrainProcessorVersionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/processors/*}/processorVersions:train" + body: "*" + }; + option (google.api.method_signature) = "parent,processor_version"; + option (google.longrunning.operation_info) = { + response_type: "TrainProcessorVersionResponse" + metadata_type: "TrainProcessorVersionMetadata" + }; + } + // Gets a processor version detail. rpc GetProcessorVersion(GetProcessorVersionRequest) returns (ProcessorVersion) { @@ -272,6 +290,38 @@ service DocumentProcessorService { metadata_type: "ReviewDocumentOperationMetadata" }; } + + // Evaluates a ProcessorVersion against annotated documents, producing an + // Evaluation. + rpc EvaluateProcessorVersion(EvaluateProcessorVersionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{processor_version=projects/*/locations/*/processors/*/processorVersions/*}:evaluateProcessorVersion" + body: "*" + }; + option (google.api.method_signature) = "processor_version"; + option (google.longrunning.operation_info) = { + response_type: "EvaluateProcessorVersionResponse" + metadata_type: "EvaluateProcessorVersionMetadata" + }; + } + + // Retrieves a specific evaluation. + rpc GetEvaluation(GetEvaluationRequest) returns (Evaluation) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/processors/*/processorVersions/*/evaluations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Retrieves a set of evaluations for a given processor version. + rpc ListEvaluations(ListEvaluationsRequest) + returns (ListEvaluationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/processors/*/processorVersions/*}/evaluations" + }; + option (google.api.method_signature) = "parent"; + } } // Request message for the process document method. @@ -758,6 +808,81 @@ message SetDefaultProcessorVersionMetadata { CommonOperationMetadata common_metadata = 1; } +// Request message for the create processor version method. +message TrainProcessorVersionRequest { + // The input data used to train a new `ProcessorVersion`. + message InputData { + // The documents used for training the new version. + BatchDocumentsInputConfig training_documents = 3; + + // The documents used for testing the trained version. + BatchDocumentsInputConfig test_documents = 4; + } + + // Required. The parent (project, location and processor) to create the new + // version for. Format: + // `projects/{project}/locations/{location}/processors/{processor}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "documentai.googleapis.com/Processor" + } + ]; + + // Required. The processor version to be created. + ProcessorVersion processor_version = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The schema the processor version will be trained with. + DocumentSchema document_schema = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The input data used to train the `ProcessorVersion`. + InputData input_data = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The processor version to use as a base for training. This + // processor version must be a child of `parent`. Format: + // `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`. + string base_processor_version = 8 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response for the TrainProcessorVersion method. +message TrainProcessorVersionResponse { + // The resource name of the processor version produced by training. + string processor_version = 1; +} + +// The metadata that represents a processor version being created. +message TrainProcessorVersionMetadata { + // The dataset validation information. + // This includes any and all errors with documents and the dataset. + message DatasetValidation { + // The total number of document errors. + int32 document_error_count = 3; + + // The total number of dataset errors. + int32 dataset_error_count = 4; + + // Error information pertaining to specific documents. A maximum of 10 + // document errors will be returned. + // Any document with errors will not be used throughout training. + repeated google.rpc.Status document_errors = 1; + + // Error information for the dataset as a whole. A maximum of 10 dataset + // errors will be returned. + // A single dataset error is terminal for training. + repeated google.rpc.Status dataset_errors = 2; + } + + // The basic metadata of the long running operation. + CommonOperationMetadata common_metadata = 1; + + // The training dataset validation information. + DatasetValidation training_dataset_validation = 2; + + // The test dataset validation information. + DatasetValidation test_dataset_validation = 3; +} + // Request message for review document method. message ReviewDocumentRequest { // The priority level of the human review task. @@ -828,3 +953,80 @@ message ReviewDocumentOperationMetadata { // The Crowd Compute question ID. string question_id = 6; } + +// Evaluates the given ProcessorVersion against the supplied documents. +message EvaluateProcessorVersionRequest { + // Required. The resource name of the + // [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to + // evaluate. + // `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + string processor_version = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "documentai.googleapis.com/ProcessorVersion" + } + ]; + + // Optional. The documents used in the evaluation. If unspecified, use the + // processor's dataset as evaluation input. + BatchDocumentsInputConfig evaluation_documents = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Metadata of the EvaluateProcessorVersion method. +message EvaluateProcessorVersionMetadata { + // The basic metadata of the long running operation. + CommonOperationMetadata common_metadata = 1; +} + +// Metadata of the EvaluateProcessorVersion method. +message EvaluateProcessorVersionResponse { + // The resource name of the created evaluation. + string evaluation = 2; +} + +// Retrieves a specific Evaluation. +message GetEvaluationRequest { + // Required. The resource name of the + // [Evaluation][google.cloud.documentai.v1.Evaluation] to get. + // `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "documentai.googleapis.com/Evaluation" + } + ]; +} + +// Retrieves a list of evaluations for a given ProcessorVersion. +message ListEvaluationsRequest { + // Required. The resource name of the + // [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list + // evaluations for. + // `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "documentai.googleapis.com/ProcessorVersion" + } + ]; + + // The standard list page size. + // If unspecified, at most 5 evaluations will be returned. + // The maximum value is 100; values above 100 will be coerced to 100. + int32 page_size = 2; + + // A page token, received from a previous `ListEvaluations` call. + // Provide this to retrieve the subsequent page. + string page_token = 3; +} + +// The response from ListEvaluations. +message ListEvaluationsResponse { + // The evaluations requested. + repeated Evaluation evaluations = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document_schema.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document_schema.proto index 3fffba9fadb..0b2cf60c1e0 100644 --- a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document_schema.proto +++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document_schema.proto @@ -38,20 +38,28 @@ message DocumentSchema { // Defines properties that can be part of the entity type. message Property { - // Types of occurrences of the entity type in the document. Note: this - // represents the number of instances of an entity types, not number of - // mentions of a given entity instance. + // Types of occurrences of the entity type in the document. This + // represents the number of instances of instances of an entity, not + // number of mentions of an entity. For example, a bank statement may + // only have one `account_number`, but this account number may be + // mentioned in several places on the document. In this case the + // 'account_number' would be considered a `REQUIRED_ONCE` entity type. If, + // on the other hand, we expect a bank statement to contain the status of + // multiple different accounts for the customers, the occurrence type will + // be set to `REQUIRED_MULTIPLE`. enum OccurrenceType { // Unspecified occurrence type. OCCURRENCE_TYPE_UNSPECIFIED = 0; - // There will be zero or one instance of this entity type. + // There will be zero or one instance of this entity type. The same + // entity instance may be mentioned multiple times. OPTIONAL_ONCE = 1; // The entity type will appear zero or multiple times. OPTIONAL_MULTIPLE = 2; - // The entity type will only appear exactly once. + // The entity type will only appear exactly once. The same + // entity instance may be mentioned multiple times. REQUIRED_ONCE = 3; // The entity type will appear once or more times. @@ -103,7 +111,7 @@ message DocumentSchema { // one should be set. repeated string base_types = 2; - // Describing the nested structure, or composition of an entity. + // Description the nested structure, or composition of an entity. repeated Property properties = 6; } diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/evaluation.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/evaluation.proto new file mode 100644 index 00000000000..0662470a8b2 --- /dev/null +++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/evaluation.proto @@ -0,0 +1,181 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.documentai.v1; + +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.DocumentAI.V1"; +option go_package = "cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb"; +option java_multiple_files = true; +option java_outer_classname = "DocumentAiEvaluation"; +option java_package = "com.google.cloud.documentai.v1"; +option php_namespace = "Google\\Cloud\\DocumentAI\\V1"; +option ruby_package = "Google::Cloud::DocumentAI::V1"; + +// Gives a short summary of an evaluation, and links to the evaluation itself. +message EvaluationReference { + // The resource name of the Long Running Operation for the evaluation. + string operation = 1; + + // The resource name of the evaluation. + string evaluation = 2 [(google.api.resource_reference) = { + type: "documentai.googleapis.com/Evaluation" + }]; + + // An aggregate of the statistics for the evaluation with fuzzy matching on. + Evaluation.Metrics aggregate_metrics = 4; + + // An aggregate of the statistics for the evaluation with fuzzy matching off. + Evaluation.Metrics aggregate_metrics_exact = 5; +} + +// An evaluation of a ProcessorVersion's performance. +message Evaluation { + option (google.api.resource) = { + type: "documentai.googleapis.com/Evaluation" + pattern: "projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}" + }; + + // Evaluation counters for the documents that were used. + message Counters { + // How many documents were sent for evaluation. + int32 input_documents_count = 1; + + // How many documents were not included in the evaluation as they didn't + // pass validation. + int32 invalid_documents_count = 2; + + // How many documents were not included in the evaluation as Document AI + // failed to process them. + int32 failed_documents_count = 3; + + // How many documents were used in the evaluation. + int32 evaluated_documents_count = 4; + } + + // Evaluation metrics, either in aggregate or about a specific entity. + message Metrics { + // The calculated precision. + float precision = 1; + + // The calculated recall. + float recall = 2; + + // The calculated f1 score. + float f1_score = 3; + + // The amount of occurrences in predicted documents. + int32 predicted_occurrences_count = 4; + + // The amount of occurrences in ground truth documents. + int32 ground_truth_occurrences_count = 5; + + // The amount of documents with a predicted occurrence. + int32 predicted_document_count = 10; + + // The amount of documents with a ground truth occurrence. + int32 ground_truth_document_count = 11; + + // The amount of true positives. + int32 true_positives_count = 6; + + // The amount of false positives. + int32 false_positives_count = 7; + + // The amount of false negatives. + int32 false_negatives_count = 8; + + // The amount of documents that had an occurrence of this label. + int32 total_documents_count = 9; + } + + // Evaluations metrics, at a specific confidence level. + message ConfidenceLevelMetrics { + // The confidence level. + float confidence_level = 1; + + // The metrics at the specific confidence level. + Metrics metrics = 2; + } + + // Metrics across multiple confidence levels. + message MultiConfidenceMetrics { + // A type that determines how metrics should be interpreted. + enum MetricsType { + // The metrics type is unspecified. By default, metrics without a + // particular specification are for leaf entity types (i.e., top-level + // entity types without child types, or child types which are not + // parent types themselves). + METRICS_TYPE_UNSPECIFIED = 0; + + // Indicates whether metrics for this particular label type represent an + // aggregate of metrics for other types instead of being based on actual + // TP/FP/FN values for the label type. Metrics for parent (i.e., non-leaf) + // entity types are an aggregate of metrics for their children. + AGGREGATE = 1; + } + + // Metrics across confidence levels with fuzzy matching enabled. + repeated ConfidenceLevelMetrics confidence_level_metrics = 1; + + // Metrics across confidence levels with only exact matching. + repeated ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + + // The calculated area under the precision recall curve (AUPRC), computed by + // integrating over all confidence thresholds. + float auprc = 2; + + // The Estimated Calibration Error (ECE) of the confidence of the predicted + // entities. + float estimated_calibration_error = 3; + + // The AUPRC for metrics with fuzzy matching disabled, i.e., exact matching + // only. + float auprc_exact = 5; + + // The ECE for the predicted entities with fuzzy matching disabled, i.e., + // exact matching only. + float estimated_calibration_error_exact = 6; + + // The metrics type for the label. + MetricsType metrics_type = 7; + } + + // The resource name of the evaluation. + // Format: + // `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}` + string name = 1; + + // The time that the evaluation was created. + google.protobuf.Timestamp create_time = 2; + + // Counters for the documents used in the evaluation. + Counters document_counters = 5; + + // Metrics for all the entities in aggregate. + MultiConfidenceMetrics all_entities_metrics = 3; + + // Metrics across confidence levels, for different entities. + map entity_metrics = 4; + + // The KMS key name used for encryption. + string kms_key_name = 6; + + // The KMS key version with which data is encrypted. + string kms_key_version_name = 7; +} diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/processor.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/processor.proto index 4dabe48fe6f..8c257c548b6 100644 --- a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/processor.proto +++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/processor.proto @@ -19,6 +19,7 @@ package google.cloud.documentai.v1; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/documentai/v1/document_schema.proto"; +import "google/cloud/documentai/v1/evaluation.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.DocumentAI.V1"; @@ -96,6 +97,9 @@ message ProcessorVersion { // The time the processor version was created. google.protobuf.Timestamp create_time = 7; + // The most recently invoked evaluation for the processor version. + EvaluationReference latest_evaluation = 8; + // The KMS key name used for encryption. string kms_key_name = 9; diff --git a/packages/google-cloud-documentai/protos/protos.d.ts b/packages/google-cloud-documentai/protos/protos.d.ts index 7bd7e2bec0c..ac3485042ab 100644 --- a/packages/google-cloud-documentai/protos/protos.d.ts +++ b/packages/google-cloud-documentai/protos/protos.d.ts @@ -4061,6 +4061,7 @@ export namespace google { OPERATION_TYPE_UNSPECIFIED = 0, ADD = 1, REMOVE = 2, + UPDATE = 7, REPLACE = 3, EVAL_REQUESTED = 4, EVAL_APPROVED = 5, @@ -5671,6 +5672,20 @@ export namespace google { */ public getProcessor(request: google.cloud.documentai.v1.IGetProcessorRequest): Promise; + /** + * Calls TrainProcessorVersion. + * @param request TrainProcessorVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public trainProcessorVersion(request: google.cloud.documentai.v1.ITrainProcessorVersionRequest, callback: google.cloud.documentai.v1.DocumentProcessorService.TrainProcessorVersionCallback): void; + + /** + * Calls TrainProcessorVersion. + * @param request TrainProcessorVersionRequest message or plain object + * @returns Promise + */ + public trainProcessorVersion(request: google.cloud.documentai.v1.ITrainProcessorVersionRequest): Promise; + /** * Calls GetProcessorVersion. * @param request GetProcessorVersionRequest message or plain object @@ -5824,6 +5839,48 @@ export namespace google { * @returns Promise */ public reviewDocument(request: google.cloud.documentai.v1.IReviewDocumentRequest): Promise; + + /** + * Calls EvaluateProcessorVersion. + * @param request EvaluateProcessorVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public evaluateProcessorVersion(request: google.cloud.documentai.v1.IEvaluateProcessorVersionRequest, callback: google.cloud.documentai.v1.DocumentProcessorService.EvaluateProcessorVersionCallback): void; + + /** + * Calls EvaluateProcessorVersion. + * @param request EvaluateProcessorVersionRequest message or plain object + * @returns Promise + */ + public evaluateProcessorVersion(request: google.cloud.documentai.v1.IEvaluateProcessorVersionRequest): Promise; + + /** + * Calls GetEvaluation. + * @param request GetEvaluationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Evaluation + */ + public getEvaluation(request: google.cloud.documentai.v1.IGetEvaluationRequest, callback: google.cloud.documentai.v1.DocumentProcessorService.GetEvaluationCallback): void; + + /** + * Calls GetEvaluation. + * @param request GetEvaluationRequest message or plain object + * @returns Promise + */ + public getEvaluation(request: google.cloud.documentai.v1.IGetEvaluationRequest): Promise; + + /** + * Calls ListEvaluations. + * @param request ListEvaluationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEvaluationsResponse + */ + public listEvaluations(request: google.cloud.documentai.v1.IListEvaluationsRequest, callback: google.cloud.documentai.v1.DocumentProcessorService.ListEvaluationsCallback): void; + + /** + * Calls ListEvaluations. + * @param request ListEvaluationsRequest message or plain object + * @returns Promise + */ + public listEvaluations(request: google.cloud.documentai.v1.IListEvaluationsRequest): Promise; } namespace DocumentProcessorService { @@ -5877,6 +5934,13 @@ export namespace google { */ type GetProcessorCallback = (error: (Error|null), response?: google.cloud.documentai.v1.Processor) => void; + /** + * Callback as used by {@link google.cloud.documentai.v1.DocumentProcessorService|trainProcessorVersion}. + * @param error Error, if any + * @param [response] Operation + */ + type TrainProcessorVersionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** * Callback as used by {@link google.cloud.documentai.v1.DocumentProcessorService|getProcessorVersion}. * @param error Error, if any @@ -5953,6 +6017,27 @@ export namespace google { * @param [response] Operation */ type ReviewDocumentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.documentai.v1.DocumentProcessorService|evaluateProcessorVersion}. + * @param error Error, if any + * @param [response] Operation + */ + type EvaluateProcessorVersionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.documentai.v1.DocumentProcessorService|getEvaluation}. + * @param error Error, if any + * @param [response] Evaluation + */ + type GetEvaluationCallback = (error: (Error|null), response?: google.cloud.documentai.v1.Evaluation) => void; + + /** + * Callback as used by {@link google.cloud.documentai.v1.DocumentProcessorService|listEvaluations}. + * @param error Error, if any + * @param [response] ListEvaluationsResponse + */ + type ListEvaluationsCallback = (error: (Error|null), response?: google.cloud.documentai.v1.ListEvaluationsResponse) => void; } /** Properties of a ProcessRequest. */ @@ -9802,937 +9887,2862 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ReviewDocumentRequest. */ - interface IReviewDocumentRequest { + /** Properties of a TrainProcessorVersionRequest. */ + interface ITrainProcessorVersionRequest { - /** ReviewDocumentRequest inlineDocument */ - inlineDocument?: (google.cloud.documentai.v1.IDocument|null); + /** TrainProcessorVersionRequest parent */ + parent?: (string|null); - /** ReviewDocumentRequest humanReviewConfig */ - humanReviewConfig?: (string|null); + /** TrainProcessorVersionRequest processorVersion */ + processorVersion?: (google.cloud.documentai.v1.IProcessorVersion|null); - /** ReviewDocumentRequest enableSchemaValidation */ - enableSchemaValidation?: (boolean|null); + /** TrainProcessorVersionRequest documentSchema */ + documentSchema?: (google.cloud.documentai.v1.IDocumentSchema|null); - /** ReviewDocumentRequest priority */ - priority?: (google.cloud.documentai.v1.ReviewDocumentRequest.Priority|keyof typeof google.cloud.documentai.v1.ReviewDocumentRequest.Priority|null); + /** TrainProcessorVersionRequest inputData */ + inputData?: (google.cloud.documentai.v1.TrainProcessorVersionRequest.IInputData|null); - /** ReviewDocumentRequest documentSchema */ - documentSchema?: (google.cloud.documentai.v1.IDocumentSchema|null); + /** TrainProcessorVersionRequest baseProcessorVersion */ + baseProcessorVersion?: (string|null); } - /** Represents a ReviewDocumentRequest. */ - class ReviewDocumentRequest implements IReviewDocumentRequest { + /** Represents a TrainProcessorVersionRequest. */ + class TrainProcessorVersionRequest implements ITrainProcessorVersionRequest { /** - * Constructs a new ReviewDocumentRequest. + * Constructs a new TrainProcessorVersionRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.documentai.v1.IReviewDocumentRequest); - - /** ReviewDocumentRequest inlineDocument. */ - public inlineDocument?: (google.cloud.documentai.v1.IDocument|null); - - /** ReviewDocumentRequest humanReviewConfig. */ - public humanReviewConfig: string; + constructor(properties?: google.cloud.documentai.v1.ITrainProcessorVersionRequest); - /** ReviewDocumentRequest enableSchemaValidation. */ - public enableSchemaValidation: boolean; + /** TrainProcessorVersionRequest parent. */ + public parent: string; - /** ReviewDocumentRequest priority. */ - public priority: (google.cloud.documentai.v1.ReviewDocumentRequest.Priority|keyof typeof google.cloud.documentai.v1.ReviewDocumentRequest.Priority); + /** TrainProcessorVersionRequest processorVersion. */ + public processorVersion?: (google.cloud.documentai.v1.IProcessorVersion|null); - /** ReviewDocumentRequest documentSchema. */ + /** TrainProcessorVersionRequest documentSchema. */ public documentSchema?: (google.cloud.documentai.v1.IDocumentSchema|null); - /** ReviewDocumentRequest source. */ - public source?: "inlineDocument"; + /** TrainProcessorVersionRequest inputData. */ + public inputData?: (google.cloud.documentai.v1.TrainProcessorVersionRequest.IInputData|null); + + /** TrainProcessorVersionRequest baseProcessorVersion. */ + public baseProcessorVersion: string; /** - * Creates a new ReviewDocumentRequest instance using the specified properties. + * Creates a new TrainProcessorVersionRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ReviewDocumentRequest instance + * @returns TrainProcessorVersionRequest instance */ - public static create(properties?: google.cloud.documentai.v1.IReviewDocumentRequest): google.cloud.documentai.v1.ReviewDocumentRequest; + public static create(properties?: google.cloud.documentai.v1.ITrainProcessorVersionRequest): google.cloud.documentai.v1.TrainProcessorVersionRequest; /** - * Encodes the specified ReviewDocumentRequest message. Does not implicitly {@link google.cloud.documentai.v1.ReviewDocumentRequest.verify|verify} messages. - * @param message ReviewDocumentRequest message or plain object to encode + * Encodes the specified TrainProcessorVersionRequest message. Does not implicitly {@link google.cloud.documentai.v1.TrainProcessorVersionRequest.verify|verify} messages. + * @param message TrainProcessorVersionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.documentai.v1.IReviewDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.documentai.v1.ITrainProcessorVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ReviewDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.ReviewDocumentRequest.verify|verify} messages. - * @param message ReviewDocumentRequest message or plain object to encode + * Encodes the specified TrainProcessorVersionRequest message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.TrainProcessorVersionRequest.verify|verify} messages. + * @param message TrainProcessorVersionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.documentai.v1.IReviewDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.documentai.v1.ITrainProcessorVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReviewDocumentRequest message from the specified reader or buffer. + * Decodes a TrainProcessorVersionRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ReviewDocumentRequest + * @returns TrainProcessorVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.ReviewDocumentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.TrainProcessorVersionRequest; /** - * Decodes a ReviewDocumentRequest message from the specified reader or buffer, length delimited. + * Decodes a TrainProcessorVersionRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReviewDocumentRequest + * @returns TrainProcessorVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.ReviewDocumentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.TrainProcessorVersionRequest; /** - * Verifies a ReviewDocumentRequest message. + * Verifies a TrainProcessorVersionRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ReviewDocumentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TrainProcessorVersionRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReviewDocumentRequest + * @returns TrainProcessorVersionRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.ReviewDocumentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.TrainProcessorVersionRequest; /** - * Creates a plain object from a ReviewDocumentRequest message. Also converts values to other types if specified. - * @param message ReviewDocumentRequest + * Creates a plain object from a TrainProcessorVersionRequest message. Also converts values to other types if specified. + * @param message TrainProcessorVersionRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.documentai.v1.ReviewDocumentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.documentai.v1.TrainProcessorVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReviewDocumentRequest to JSON. + * Converts this TrainProcessorVersionRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ReviewDocumentRequest + * Gets the default type url for TrainProcessorVersionRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ReviewDocumentRequest { - - /** Priority enum. */ - enum Priority { - DEFAULT = 0, - URGENT = 1 - } - } + namespace TrainProcessorVersionRequest { - /** Properties of a ReviewDocumentResponse. */ - interface IReviewDocumentResponse { + /** Properties of an InputData. */ + interface IInputData { - /** ReviewDocumentResponse gcsDestination */ - gcsDestination?: (string|null); + /** InputData trainingDocuments */ + trainingDocuments?: (google.cloud.documentai.v1.IBatchDocumentsInputConfig|null); - /** ReviewDocumentResponse state */ - state?: (google.cloud.documentai.v1.ReviewDocumentResponse.State|keyof typeof google.cloud.documentai.v1.ReviewDocumentResponse.State|null); + /** InputData testDocuments */ + testDocuments?: (google.cloud.documentai.v1.IBatchDocumentsInputConfig|null); + } - /** ReviewDocumentResponse rejectionReason */ - rejectionReason?: (string|null); - } + /** Represents an InputData. */ + class InputData implements IInputData { - /** Represents a ReviewDocumentResponse. */ - class ReviewDocumentResponse implements IReviewDocumentResponse { + /** + * Constructs a new InputData. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1.TrainProcessorVersionRequest.IInputData); - /** - * Constructs a new ReviewDocumentResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.documentai.v1.IReviewDocumentResponse); + /** InputData trainingDocuments. */ + public trainingDocuments?: (google.cloud.documentai.v1.IBatchDocumentsInputConfig|null); - /** ReviewDocumentResponse gcsDestination. */ - public gcsDestination: string; + /** InputData testDocuments. */ + public testDocuments?: (google.cloud.documentai.v1.IBatchDocumentsInputConfig|null); - /** ReviewDocumentResponse state. */ - public state: (google.cloud.documentai.v1.ReviewDocumentResponse.State|keyof typeof google.cloud.documentai.v1.ReviewDocumentResponse.State); + /** + * Creates a new InputData instance using the specified properties. + * @param [properties] Properties to set + * @returns InputData instance + */ + public static create(properties?: google.cloud.documentai.v1.TrainProcessorVersionRequest.IInputData): google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData; - /** ReviewDocumentResponse rejectionReason. */ - public rejectionReason: string; + /** + * Encodes the specified InputData message. Does not implicitly {@link google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData.verify|verify} messages. + * @param message InputData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1.TrainProcessorVersionRequest.IInputData, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new ReviewDocumentResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ReviewDocumentResponse instance - */ - public static create(properties?: google.cloud.documentai.v1.IReviewDocumentResponse): google.cloud.documentai.v1.ReviewDocumentResponse; + /** + * Encodes the specified InputData message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData.verify|verify} messages. + * @param message InputData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1.TrainProcessorVersionRequest.IInputData, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ReviewDocumentResponse message. Does not implicitly {@link google.cloud.documentai.v1.ReviewDocumentResponse.verify|verify} messages. - * @param message ReviewDocumentResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.documentai.v1.IReviewDocumentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an InputData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InputData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData; - /** - * Encodes the specified ReviewDocumentResponse message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.ReviewDocumentResponse.verify|verify} messages. - * @param message ReviewDocumentResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.documentai.v1.IReviewDocumentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an InputData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InputData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData; - /** - * Decodes a ReviewDocumentResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReviewDocumentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.ReviewDocumentResponse; - - /** - * Decodes a ReviewDocumentResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReviewDocumentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.ReviewDocumentResponse; - - /** - * Verifies a ReviewDocumentResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReviewDocumentResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReviewDocumentResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.ReviewDocumentResponse; - - /** - * Creates a plain object from a ReviewDocumentResponse message. Also converts values to other types if specified. - * @param message ReviewDocumentResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.documentai.v1.ReviewDocumentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies an InputData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this ReviewDocumentResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates an InputData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InputData + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData; - /** - * Gets the default type url for ReviewDocumentResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a plain object from an InputData message. Also converts values to other types if specified. + * @param message InputData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - namespace ReviewDocumentResponse { + /** + * Converts this InputData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - REJECTED = 1, - SUCCEEDED = 2 + /** + * Gets the default type url for InputData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } - /** Properties of a ReviewDocumentOperationMetadata. */ - interface IReviewDocumentOperationMetadata { - - /** ReviewDocumentOperationMetadata commonMetadata */ - commonMetadata?: (google.cloud.documentai.v1.ICommonOperationMetadata|null); + /** Properties of a TrainProcessorVersionResponse. */ + interface ITrainProcessorVersionResponse { - /** ReviewDocumentOperationMetadata questionId */ - questionId?: (string|null); + /** TrainProcessorVersionResponse processorVersion */ + processorVersion?: (string|null); } - /** Represents a ReviewDocumentOperationMetadata. */ - class ReviewDocumentOperationMetadata implements IReviewDocumentOperationMetadata { + /** Represents a TrainProcessorVersionResponse. */ + class TrainProcessorVersionResponse implements ITrainProcessorVersionResponse { /** - * Constructs a new ReviewDocumentOperationMetadata. + * Constructs a new TrainProcessorVersionResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.documentai.v1.IReviewDocumentOperationMetadata); - - /** ReviewDocumentOperationMetadata commonMetadata. */ - public commonMetadata?: (google.cloud.documentai.v1.ICommonOperationMetadata|null); + constructor(properties?: google.cloud.documentai.v1.ITrainProcessorVersionResponse); - /** ReviewDocumentOperationMetadata questionId. */ - public questionId: string; + /** TrainProcessorVersionResponse processorVersion. */ + public processorVersion: string; /** - * Creates a new ReviewDocumentOperationMetadata instance using the specified properties. + * Creates a new TrainProcessorVersionResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ReviewDocumentOperationMetadata instance + * @returns TrainProcessorVersionResponse instance */ - public static create(properties?: google.cloud.documentai.v1.IReviewDocumentOperationMetadata): google.cloud.documentai.v1.ReviewDocumentOperationMetadata; + public static create(properties?: google.cloud.documentai.v1.ITrainProcessorVersionResponse): google.cloud.documentai.v1.TrainProcessorVersionResponse; /** - * Encodes the specified ReviewDocumentOperationMetadata message. Does not implicitly {@link google.cloud.documentai.v1.ReviewDocumentOperationMetadata.verify|verify} messages. - * @param message ReviewDocumentOperationMetadata message or plain object to encode + * Encodes the specified TrainProcessorVersionResponse message. Does not implicitly {@link google.cloud.documentai.v1.TrainProcessorVersionResponse.verify|verify} messages. + * @param message TrainProcessorVersionResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.documentai.v1.IReviewDocumentOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.documentai.v1.ITrainProcessorVersionResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ReviewDocumentOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.ReviewDocumentOperationMetadata.verify|verify} messages. - * @param message ReviewDocumentOperationMetadata message or plain object to encode + * Encodes the specified TrainProcessorVersionResponse message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.TrainProcessorVersionResponse.verify|verify} messages. + * @param message TrainProcessorVersionResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.documentai.v1.IReviewDocumentOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.documentai.v1.ITrainProcessorVersionResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReviewDocumentOperationMetadata message from the specified reader or buffer. + * Decodes a TrainProcessorVersionResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ReviewDocumentOperationMetadata + * @returns TrainProcessorVersionResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.ReviewDocumentOperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.TrainProcessorVersionResponse; /** - * Decodes a ReviewDocumentOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a TrainProcessorVersionResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReviewDocumentOperationMetadata + * @returns TrainProcessorVersionResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.ReviewDocumentOperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.TrainProcessorVersionResponse; /** - * Verifies a ReviewDocumentOperationMetadata message. + * Verifies a TrainProcessorVersionResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ReviewDocumentOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a TrainProcessorVersionResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReviewDocumentOperationMetadata + * @returns TrainProcessorVersionResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.ReviewDocumentOperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.TrainProcessorVersionResponse; /** - * Creates a plain object from a ReviewDocumentOperationMetadata message. Also converts values to other types if specified. - * @param message ReviewDocumentOperationMetadata + * Creates a plain object from a TrainProcessorVersionResponse message. Also converts values to other types if specified. + * @param message TrainProcessorVersionResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.documentai.v1.ReviewDocumentOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.documentai.v1.TrainProcessorVersionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReviewDocumentOperationMetadata to JSON. + * Converts this TrainProcessorVersionResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ReviewDocumentOperationMetadata + * Gets the default type url for TrainProcessorVersionResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DocumentSchema. */ - interface IDocumentSchema { - - /** DocumentSchema displayName */ - displayName?: (string|null); + /** Properties of a TrainProcessorVersionMetadata. */ + interface ITrainProcessorVersionMetadata { - /** DocumentSchema description */ - description?: (string|null); + /** TrainProcessorVersionMetadata commonMetadata */ + commonMetadata?: (google.cloud.documentai.v1.ICommonOperationMetadata|null); - /** DocumentSchema entityTypes */ - entityTypes?: (google.cloud.documentai.v1.DocumentSchema.IEntityType[]|null); + /** TrainProcessorVersionMetadata trainingDatasetValidation */ + trainingDatasetValidation?: (google.cloud.documentai.v1.TrainProcessorVersionMetadata.IDatasetValidation|null); - /** DocumentSchema metadata */ - metadata?: (google.cloud.documentai.v1.DocumentSchema.IMetadata|null); + /** TrainProcessorVersionMetadata testDatasetValidation */ + testDatasetValidation?: (google.cloud.documentai.v1.TrainProcessorVersionMetadata.IDatasetValidation|null); } - /** Represents a DocumentSchema. */ - class DocumentSchema implements IDocumentSchema { + /** Represents a TrainProcessorVersionMetadata. */ + class TrainProcessorVersionMetadata implements ITrainProcessorVersionMetadata { /** - * Constructs a new DocumentSchema. + * Constructs a new TrainProcessorVersionMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.documentai.v1.IDocumentSchema); + constructor(properties?: google.cloud.documentai.v1.ITrainProcessorVersionMetadata); - /** DocumentSchema displayName. */ - public displayName: string; - - /** DocumentSchema description. */ - public description: string; + /** TrainProcessorVersionMetadata commonMetadata. */ + public commonMetadata?: (google.cloud.documentai.v1.ICommonOperationMetadata|null); - /** DocumentSchema entityTypes. */ - public entityTypes: google.cloud.documentai.v1.DocumentSchema.IEntityType[]; + /** TrainProcessorVersionMetadata trainingDatasetValidation. */ + public trainingDatasetValidation?: (google.cloud.documentai.v1.TrainProcessorVersionMetadata.IDatasetValidation|null); - /** DocumentSchema metadata. */ - public metadata?: (google.cloud.documentai.v1.DocumentSchema.IMetadata|null); + /** TrainProcessorVersionMetadata testDatasetValidation. */ + public testDatasetValidation?: (google.cloud.documentai.v1.TrainProcessorVersionMetadata.IDatasetValidation|null); /** - * Creates a new DocumentSchema instance using the specified properties. + * Creates a new TrainProcessorVersionMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns DocumentSchema instance + * @returns TrainProcessorVersionMetadata instance */ - public static create(properties?: google.cloud.documentai.v1.IDocumentSchema): google.cloud.documentai.v1.DocumentSchema; + public static create(properties?: google.cloud.documentai.v1.ITrainProcessorVersionMetadata): google.cloud.documentai.v1.TrainProcessorVersionMetadata; /** - * Encodes the specified DocumentSchema message. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.verify|verify} messages. - * @param message DocumentSchema message or plain object to encode + * Encodes the specified TrainProcessorVersionMetadata message. Does not implicitly {@link google.cloud.documentai.v1.TrainProcessorVersionMetadata.verify|verify} messages. + * @param message TrainProcessorVersionMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.documentai.v1.IDocumentSchema, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.documentai.v1.ITrainProcessorVersionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DocumentSchema message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.verify|verify} messages. - * @param message DocumentSchema message or plain object to encode + * Encodes the specified TrainProcessorVersionMetadata message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.TrainProcessorVersionMetadata.verify|verify} messages. + * @param message TrainProcessorVersionMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.documentai.v1.IDocumentSchema, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.documentai.v1.ITrainProcessorVersionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DocumentSchema message from the specified reader or buffer. + * Decodes a TrainProcessorVersionMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DocumentSchema + * @returns TrainProcessorVersionMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.DocumentSchema; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.TrainProcessorVersionMetadata; /** - * Decodes a DocumentSchema message from the specified reader or buffer, length delimited. + * Decodes a TrainProcessorVersionMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DocumentSchema + * @returns TrainProcessorVersionMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.DocumentSchema; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.TrainProcessorVersionMetadata; /** - * Verifies a DocumentSchema message. + * Verifies a TrainProcessorVersionMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DocumentSchema message from a plain object. Also converts values to their respective internal types. + * Creates a TrainProcessorVersionMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DocumentSchema + * @returns TrainProcessorVersionMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.DocumentSchema; + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.TrainProcessorVersionMetadata; /** - * Creates a plain object from a DocumentSchema message. Also converts values to other types if specified. - * @param message DocumentSchema + * Creates a plain object from a TrainProcessorVersionMetadata message. Also converts values to other types if specified. + * @param message TrainProcessorVersionMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.documentai.v1.DocumentSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.documentai.v1.TrainProcessorVersionMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DocumentSchema to JSON. + * Converts this TrainProcessorVersionMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DocumentSchema + * Gets the default type url for TrainProcessorVersionMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace DocumentSchema { - - /** Properties of an EntityType. */ - interface IEntityType { + namespace TrainProcessorVersionMetadata { - /** EntityType enumValues */ - enumValues?: (google.cloud.documentai.v1.DocumentSchema.EntityType.IEnumValues|null); + /** Properties of a DatasetValidation. */ + interface IDatasetValidation { - /** EntityType displayName */ - displayName?: (string|null); + /** DatasetValidation documentErrorCount */ + documentErrorCount?: (number|null); - /** EntityType name */ - name?: (string|null); + /** DatasetValidation datasetErrorCount */ + datasetErrorCount?: (number|null); - /** EntityType baseTypes */ - baseTypes?: (string[]|null); + /** DatasetValidation documentErrors */ + documentErrors?: (google.rpc.IStatus[]|null); - /** EntityType properties */ - properties?: (google.cloud.documentai.v1.DocumentSchema.EntityType.IProperty[]|null); + /** DatasetValidation datasetErrors */ + datasetErrors?: (google.rpc.IStatus[]|null); } - /** Represents an EntityType. */ - class EntityType implements IEntityType { + /** Represents a DatasetValidation. */ + class DatasetValidation implements IDatasetValidation { /** - * Constructs a new EntityType. + * Constructs a new DatasetValidation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.documentai.v1.DocumentSchema.IEntityType); + constructor(properties?: google.cloud.documentai.v1.TrainProcessorVersionMetadata.IDatasetValidation); - /** EntityType enumValues. */ - public enumValues?: (google.cloud.documentai.v1.DocumentSchema.EntityType.IEnumValues|null); - - /** EntityType displayName. */ - public displayName: string; - - /** EntityType name. */ - public name: string; + /** DatasetValidation documentErrorCount. */ + public documentErrorCount: number; - /** EntityType baseTypes. */ - public baseTypes: string[]; + /** DatasetValidation datasetErrorCount. */ + public datasetErrorCount: number; - /** EntityType properties. */ - public properties: google.cloud.documentai.v1.DocumentSchema.EntityType.IProperty[]; + /** DatasetValidation documentErrors. */ + public documentErrors: google.rpc.IStatus[]; - /** EntityType valueSource. */ - public valueSource?: "enumValues"; + /** DatasetValidation datasetErrors. */ + public datasetErrors: google.rpc.IStatus[]; /** - * Creates a new EntityType instance using the specified properties. + * Creates a new DatasetValidation instance using the specified properties. * @param [properties] Properties to set - * @returns EntityType instance + * @returns DatasetValidation instance */ - public static create(properties?: google.cloud.documentai.v1.DocumentSchema.IEntityType): google.cloud.documentai.v1.DocumentSchema.EntityType; + public static create(properties?: google.cloud.documentai.v1.TrainProcessorVersionMetadata.IDatasetValidation): google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation; /** - * Encodes the specified EntityType message. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.EntityType.verify|verify} messages. - * @param message EntityType message or plain object to encode + * Encodes the specified DatasetValidation message. Does not implicitly {@link google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation.verify|verify} messages. + * @param message DatasetValidation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.documentai.v1.DocumentSchema.IEntityType, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.documentai.v1.TrainProcessorVersionMetadata.IDatasetValidation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EntityType message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.EntityType.verify|verify} messages. - * @param message EntityType message or plain object to encode + * Encodes the specified DatasetValidation message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation.verify|verify} messages. + * @param message DatasetValidation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.documentai.v1.DocumentSchema.IEntityType, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.documentai.v1.TrainProcessorVersionMetadata.IDatasetValidation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EntityType message from the specified reader or buffer. + * Decodes a DatasetValidation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EntityType + * @returns DatasetValidation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.DocumentSchema.EntityType; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation; /** - * Decodes an EntityType message from the specified reader or buffer, length delimited. + * Decodes a DatasetValidation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EntityType + * @returns DatasetValidation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.DocumentSchema.EntityType; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation; /** - * Verifies an EntityType message. + * Verifies a DatasetValidation message. * @param message Plain 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 EntityType message from a plain object. Also converts values to their respective internal types. + * Creates a DatasetValidation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EntityType + * @returns DatasetValidation */ - public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.DocumentSchema.EntityType; + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation; /** - * Creates a plain object from an EntityType message. Also converts values to other types if specified. - * @param message EntityType + * Creates a plain object from a DatasetValidation message. Also converts values to other types if specified. + * @param message DatasetValidation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.documentai.v1.DocumentSchema.EntityType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EntityType to JSON. + * Converts this DatasetValidation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EntityType + * Gets the default type url for DatasetValidation * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } + } - namespace EntityType { + /** Properties of a ReviewDocumentRequest. */ + interface IReviewDocumentRequest { - /** Properties of an EnumValues. */ - interface IEnumValues { + /** ReviewDocumentRequest inlineDocument */ + inlineDocument?: (google.cloud.documentai.v1.IDocument|null); - /** EnumValues values */ - values?: (string[]|null); - } + /** ReviewDocumentRequest humanReviewConfig */ + humanReviewConfig?: (string|null); - /** Represents an EnumValues. */ - class EnumValues implements IEnumValues { + /** ReviewDocumentRequest enableSchemaValidation */ + enableSchemaValidation?: (boolean|null); - /** - * Constructs a new EnumValues. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.documentai.v1.DocumentSchema.EntityType.IEnumValues); + /** ReviewDocumentRequest priority */ + priority?: (google.cloud.documentai.v1.ReviewDocumentRequest.Priority|keyof typeof google.cloud.documentai.v1.ReviewDocumentRequest.Priority|null); - /** EnumValues values. */ - public values: string[]; + /** ReviewDocumentRequest documentSchema */ + documentSchema?: (google.cloud.documentai.v1.IDocumentSchema|null); + } - /** - * Creates a new EnumValues instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValues instance - */ - public static create(properties?: google.cloud.documentai.v1.DocumentSchema.EntityType.IEnumValues): google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues; + /** Represents a ReviewDocumentRequest. */ + class ReviewDocumentRequest implements IReviewDocumentRequest { - /** - * Encodes the specified EnumValues message. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues.verify|verify} messages. - * @param message EnumValues message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.documentai.v1.DocumentSchema.EntityType.IEnumValues, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new ReviewDocumentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1.IReviewDocumentRequest); - /** - * Encodes the specified EnumValues message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues.verify|verify} messages. - * @param message EnumValues message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.documentai.v1.DocumentSchema.EntityType.IEnumValues, writer?: $protobuf.Writer): $protobuf.Writer; + /** ReviewDocumentRequest inlineDocument. */ + public inlineDocument?: (google.cloud.documentai.v1.IDocument|null); - /** - * Decodes an EnumValues message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValues - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues; + /** ReviewDocumentRequest humanReviewConfig. */ + public humanReviewConfig: string; - /** - * Decodes an EnumValues message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValues - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues; + /** ReviewDocumentRequest enableSchemaValidation. */ + public enableSchemaValidation: boolean; - /** - * Verifies an EnumValues message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ReviewDocumentRequest priority. */ + public priority: (google.cloud.documentai.v1.ReviewDocumentRequest.Priority|keyof typeof google.cloud.documentai.v1.ReviewDocumentRequest.Priority); - /** - * Creates an EnumValues message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValues - */ - public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues; + /** ReviewDocumentRequest documentSchema. */ + public documentSchema?: (google.cloud.documentai.v1.IDocumentSchema|null); - /** - * Creates a plain object from an EnumValues message. Also converts values to other types if specified. - * @param message EnumValues - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ReviewDocumentRequest source. */ + public source?: "inlineDocument"; - /** - * Converts this EnumValues to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a new ReviewDocumentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ReviewDocumentRequest instance + */ + public static create(properties?: google.cloud.documentai.v1.IReviewDocumentRequest): google.cloud.documentai.v1.ReviewDocumentRequest; - /** - * Gets the default type url for EnumValues - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Encodes the specified ReviewDocumentRequest message. Does not implicitly {@link google.cloud.documentai.v1.ReviewDocumentRequest.verify|verify} messages. + * @param message ReviewDocumentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1.IReviewDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a Property. */ - interface IProperty { + /** + * Encodes the specified ReviewDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.ReviewDocumentRequest.verify|verify} messages. + * @param message ReviewDocumentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1.IReviewDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Property name */ - name?: (string|null); + /** + * Decodes a ReviewDocumentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReviewDocumentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.ReviewDocumentRequest; - /** Property valueType */ - valueType?: (string|null); + /** + * Decodes a ReviewDocumentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReviewDocumentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.ReviewDocumentRequest; - /** Property occurrenceType */ - occurrenceType?: (google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType|keyof typeof google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType|null); - } + /** + * Verifies a ReviewDocumentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Represents a Property. */ - class Property implements IProperty { + /** + * Creates a ReviewDocumentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReviewDocumentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.ReviewDocumentRequest; - /** - * Constructs a new Property. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.documentai.v1.DocumentSchema.EntityType.IProperty); + /** + * Creates a plain object from a ReviewDocumentRequest message. Also converts values to other types if specified. + * @param message ReviewDocumentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1.ReviewDocumentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Property name. */ - public name: string; + /** + * Converts this ReviewDocumentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReviewDocumentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ReviewDocumentRequest { + + /** Priority enum. */ + enum Priority { + DEFAULT = 0, + URGENT = 1 + } + } + + /** Properties of a ReviewDocumentResponse. */ + interface IReviewDocumentResponse { + + /** ReviewDocumentResponse gcsDestination */ + gcsDestination?: (string|null); + + /** ReviewDocumentResponse state */ + state?: (google.cloud.documentai.v1.ReviewDocumentResponse.State|keyof typeof google.cloud.documentai.v1.ReviewDocumentResponse.State|null); + + /** ReviewDocumentResponse rejectionReason */ + rejectionReason?: (string|null); + } + + /** Represents a ReviewDocumentResponse. */ + class ReviewDocumentResponse implements IReviewDocumentResponse { + + /** + * Constructs a new ReviewDocumentResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1.IReviewDocumentResponse); + + /** ReviewDocumentResponse gcsDestination. */ + public gcsDestination: string; + + /** ReviewDocumentResponse state. */ + public state: (google.cloud.documentai.v1.ReviewDocumentResponse.State|keyof typeof google.cloud.documentai.v1.ReviewDocumentResponse.State); + + /** ReviewDocumentResponse rejectionReason. */ + public rejectionReason: string; + + /** + * Creates a new ReviewDocumentResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ReviewDocumentResponse instance + */ + public static create(properties?: google.cloud.documentai.v1.IReviewDocumentResponse): google.cloud.documentai.v1.ReviewDocumentResponse; + + /** + * Encodes the specified ReviewDocumentResponse message. Does not implicitly {@link google.cloud.documentai.v1.ReviewDocumentResponse.verify|verify} messages. + * @param message ReviewDocumentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1.IReviewDocumentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReviewDocumentResponse message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.ReviewDocumentResponse.verify|verify} messages. + * @param message ReviewDocumentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1.IReviewDocumentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReviewDocumentResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReviewDocumentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.ReviewDocumentResponse; + + /** + * Decodes a ReviewDocumentResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReviewDocumentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.ReviewDocumentResponse; + + /** + * Verifies a ReviewDocumentResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReviewDocumentResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReviewDocumentResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.ReviewDocumentResponse; + + /** + * Creates a plain object from a ReviewDocumentResponse message. Also converts values to other types if specified. + * @param message ReviewDocumentResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1.ReviewDocumentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReviewDocumentResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReviewDocumentResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ReviewDocumentResponse { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + REJECTED = 1, + SUCCEEDED = 2 + } + } + + /** Properties of a ReviewDocumentOperationMetadata. */ + interface IReviewDocumentOperationMetadata { + + /** ReviewDocumentOperationMetadata commonMetadata */ + commonMetadata?: (google.cloud.documentai.v1.ICommonOperationMetadata|null); + + /** ReviewDocumentOperationMetadata questionId */ + questionId?: (string|null); + } + + /** Represents a ReviewDocumentOperationMetadata. */ + class ReviewDocumentOperationMetadata implements IReviewDocumentOperationMetadata { + + /** + * Constructs a new ReviewDocumentOperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1.IReviewDocumentOperationMetadata); + + /** ReviewDocumentOperationMetadata commonMetadata. */ + public commonMetadata?: (google.cloud.documentai.v1.ICommonOperationMetadata|null); + + /** ReviewDocumentOperationMetadata questionId. */ + public questionId: string; + + /** + * Creates a new ReviewDocumentOperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ReviewDocumentOperationMetadata instance + */ + public static create(properties?: google.cloud.documentai.v1.IReviewDocumentOperationMetadata): google.cloud.documentai.v1.ReviewDocumentOperationMetadata; + + /** + * Encodes the specified ReviewDocumentOperationMetadata message. Does not implicitly {@link google.cloud.documentai.v1.ReviewDocumentOperationMetadata.verify|verify} messages. + * @param message ReviewDocumentOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1.IReviewDocumentOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReviewDocumentOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.ReviewDocumentOperationMetadata.verify|verify} messages. + * @param message ReviewDocumentOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1.IReviewDocumentOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReviewDocumentOperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReviewDocumentOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.ReviewDocumentOperationMetadata; + + /** + * Decodes a ReviewDocumentOperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReviewDocumentOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.ReviewDocumentOperationMetadata; + + /** + * Verifies a ReviewDocumentOperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReviewDocumentOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReviewDocumentOperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.ReviewDocumentOperationMetadata; + + /** + * Creates a plain object from a ReviewDocumentOperationMetadata message. Also converts values to other types if specified. + * @param message ReviewDocumentOperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1.ReviewDocumentOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReviewDocumentOperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReviewDocumentOperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EvaluateProcessorVersionRequest. */ + interface IEvaluateProcessorVersionRequest { + + /** EvaluateProcessorVersionRequest processorVersion */ + processorVersion?: (string|null); + + /** EvaluateProcessorVersionRequest evaluationDocuments */ + evaluationDocuments?: (google.cloud.documentai.v1.IBatchDocumentsInputConfig|null); + } + + /** Represents an EvaluateProcessorVersionRequest. */ + class EvaluateProcessorVersionRequest implements IEvaluateProcessorVersionRequest { + + /** + * Constructs a new EvaluateProcessorVersionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1.IEvaluateProcessorVersionRequest); + + /** EvaluateProcessorVersionRequest processorVersion. */ + public processorVersion: string; + + /** EvaluateProcessorVersionRequest evaluationDocuments. */ + public evaluationDocuments?: (google.cloud.documentai.v1.IBatchDocumentsInputConfig|null); + + /** + * Creates a new EvaluateProcessorVersionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns EvaluateProcessorVersionRequest instance + */ + public static create(properties?: google.cloud.documentai.v1.IEvaluateProcessorVersionRequest): google.cloud.documentai.v1.EvaluateProcessorVersionRequest; + + /** + * Encodes the specified EvaluateProcessorVersionRequest message. Does not implicitly {@link google.cloud.documentai.v1.EvaluateProcessorVersionRequest.verify|verify} messages. + * @param message EvaluateProcessorVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1.IEvaluateProcessorVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EvaluateProcessorVersionRequest message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.EvaluateProcessorVersionRequest.verify|verify} messages. + * @param message EvaluateProcessorVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1.IEvaluateProcessorVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EvaluateProcessorVersionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EvaluateProcessorVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.EvaluateProcessorVersionRequest; + + /** + * Decodes an EvaluateProcessorVersionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EvaluateProcessorVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.EvaluateProcessorVersionRequest; + + /** + * Verifies an EvaluateProcessorVersionRequest message. + * @param message Plain 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 EvaluateProcessorVersionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EvaluateProcessorVersionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.EvaluateProcessorVersionRequest; + + /** + * Creates a plain object from an EvaluateProcessorVersionRequest message. Also converts values to other types if specified. + * @param message EvaluateProcessorVersionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1.EvaluateProcessorVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EvaluateProcessorVersionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EvaluateProcessorVersionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EvaluateProcessorVersionMetadata. */ + interface IEvaluateProcessorVersionMetadata { + + /** EvaluateProcessorVersionMetadata commonMetadata */ + commonMetadata?: (google.cloud.documentai.v1.ICommonOperationMetadata|null); + } + + /** Represents an EvaluateProcessorVersionMetadata. */ + class EvaluateProcessorVersionMetadata implements IEvaluateProcessorVersionMetadata { + + /** + * Constructs a new EvaluateProcessorVersionMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1.IEvaluateProcessorVersionMetadata); + + /** EvaluateProcessorVersionMetadata commonMetadata. */ + public commonMetadata?: (google.cloud.documentai.v1.ICommonOperationMetadata|null); + + /** + * Creates a new EvaluateProcessorVersionMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns EvaluateProcessorVersionMetadata instance + */ + public static create(properties?: google.cloud.documentai.v1.IEvaluateProcessorVersionMetadata): google.cloud.documentai.v1.EvaluateProcessorVersionMetadata; + + /** + * Encodes the specified EvaluateProcessorVersionMetadata message. Does not implicitly {@link google.cloud.documentai.v1.EvaluateProcessorVersionMetadata.verify|verify} messages. + * @param message EvaluateProcessorVersionMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1.IEvaluateProcessorVersionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EvaluateProcessorVersionMetadata message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.EvaluateProcessorVersionMetadata.verify|verify} messages. + * @param message EvaluateProcessorVersionMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1.IEvaluateProcessorVersionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EvaluateProcessorVersionMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EvaluateProcessorVersionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.EvaluateProcessorVersionMetadata; + + /** + * Decodes an EvaluateProcessorVersionMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EvaluateProcessorVersionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.EvaluateProcessorVersionMetadata; + + /** + * Verifies an EvaluateProcessorVersionMetadata message. + * @param message Plain 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 EvaluateProcessorVersionMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EvaluateProcessorVersionMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.EvaluateProcessorVersionMetadata; + + /** + * Creates a plain object from an EvaluateProcessorVersionMetadata message. Also converts values to other types if specified. + * @param message EvaluateProcessorVersionMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1.EvaluateProcessorVersionMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EvaluateProcessorVersionMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EvaluateProcessorVersionMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EvaluateProcessorVersionResponse. */ + interface IEvaluateProcessorVersionResponse { + + /** EvaluateProcessorVersionResponse evaluation */ + evaluation?: (string|null); + } + + /** Represents an EvaluateProcessorVersionResponse. */ + class EvaluateProcessorVersionResponse implements IEvaluateProcessorVersionResponse { + + /** + * Constructs a new EvaluateProcessorVersionResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1.IEvaluateProcessorVersionResponse); + + /** EvaluateProcessorVersionResponse evaluation. */ + public evaluation: string; + + /** + * Creates a new EvaluateProcessorVersionResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns EvaluateProcessorVersionResponse instance + */ + public static create(properties?: google.cloud.documentai.v1.IEvaluateProcessorVersionResponse): google.cloud.documentai.v1.EvaluateProcessorVersionResponse; + + /** + * Encodes the specified EvaluateProcessorVersionResponse message. Does not implicitly {@link google.cloud.documentai.v1.EvaluateProcessorVersionResponse.verify|verify} messages. + * @param message EvaluateProcessorVersionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1.IEvaluateProcessorVersionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EvaluateProcessorVersionResponse message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.EvaluateProcessorVersionResponse.verify|verify} messages. + * @param message EvaluateProcessorVersionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1.IEvaluateProcessorVersionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EvaluateProcessorVersionResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EvaluateProcessorVersionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.EvaluateProcessorVersionResponse; + + /** + * Decodes an EvaluateProcessorVersionResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EvaluateProcessorVersionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.EvaluateProcessorVersionResponse; + + /** + * Verifies an EvaluateProcessorVersionResponse message. + * @param message Plain 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 EvaluateProcessorVersionResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EvaluateProcessorVersionResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.EvaluateProcessorVersionResponse; + + /** + * Creates a plain object from an EvaluateProcessorVersionResponse message. Also converts values to other types if specified. + * @param message EvaluateProcessorVersionResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1.EvaluateProcessorVersionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EvaluateProcessorVersionResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EvaluateProcessorVersionResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetEvaluationRequest. */ + interface IGetEvaluationRequest { + + /** GetEvaluationRequest name */ + name?: (string|null); + } + + /** Represents a GetEvaluationRequest. */ + class GetEvaluationRequest implements IGetEvaluationRequest { + + /** + * Constructs a new GetEvaluationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1.IGetEvaluationRequest); + + /** GetEvaluationRequest name. */ + public name: string; + + /** + * Creates a new GetEvaluationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetEvaluationRequest instance + */ + public static create(properties?: google.cloud.documentai.v1.IGetEvaluationRequest): google.cloud.documentai.v1.GetEvaluationRequest; + + /** + * Encodes the specified GetEvaluationRequest message. Does not implicitly {@link google.cloud.documentai.v1.GetEvaluationRequest.verify|verify} messages. + * @param message GetEvaluationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1.IGetEvaluationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetEvaluationRequest message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.GetEvaluationRequest.verify|verify} messages. + * @param message GetEvaluationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1.IGetEvaluationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetEvaluationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetEvaluationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.GetEvaluationRequest; + + /** + * Decodes a GetEvaluationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetEvaluationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.GetEvaluationRequest; + + /** + * Verifies a GetEvaluationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetEvaluationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetEvaluationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.GetEvaluationRequest; + + /** + * Creates a plain object from a GetEvaluationRequest message. Also converts values to other types if specified. + * @param message GetEvaluationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1.GetEvaluationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetEvaluationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetEvaluationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListEvaluationsRequest. */ + interface IListEvaluationsRequest { + + /** ListEvaluationsRequest parent */ + parent?: (string|null); + + /** ListEvaluationsRequest pageSize */ + pageSize?: (number|null); + + /** ListEvaluationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListEvaluationsRequest. */ + class ListEvaluationsRequest implements IListEvaluationsRequest { + + /** + * Constructs a new ListEvaluationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1.IListEvaluationsRequest); + + /** ListEvaluationsRequest parent. */ + public parent: string; + + /** ListEvaluationsRequest pageSize. */ + public pageSize: number; + + /** ListEvaluationsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListEvaluationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEvaluationsRequest instance + */ + public static create(properties?: google.cloud.documentai.v1.IListEvaluationsRequest): google.cloud.documentai.v1.ListEvaluationsRequest; + + /** + * Encodes the specified ListEvaluationsRequest message. Does not implicitly {@link google.cloud.documentai.v1.ListEvaluationsRequest.verify|verify} messages. + * @param message ListEvaluationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1.IListEvaluationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEvaluationsRequest message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.ListEvaluationsRequest.verify|verify} messages. + * @param message ListEvaluationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1.IListEvaluationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEvaluationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEvaluationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.ListEvaluationsRequest; + + /** + * Decodes a ListEvaluationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEvaluationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.ListEvaluationsRequest; + + /** + * Verifies a ListEvaluationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListEvaluationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEvaluationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.ListEvaluationsRequest; + + /** + * Creates a plain object from a ListEvaluationsRequest message. Also converts values to other types if specified. + * @param message ListEvaluationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1.ListEvaluationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEvaluationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEvaluationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListEvaluationsResponse. */ + interface IListEvaluationsResponse { + + /** ListEvaluationsResponse evaluations */ + evaluations?: (google.cloud.documentai.v1.IEvaluation[]|null); + + /** ListEvaluationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListEvaluationsResponse. */ + class ListEvaluationsResponse implements IListEvaluationsResponse { + + /** + * Constructs a new ListEvaluationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1.IListEvaluationsResponse); + + /** ListEvaluationsResponse evaluations. */ + public evaluations: google.cloud.documentai.v1.IEvaluation[]; + + /** ListEvaluationsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListEvaluationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEvaluationsResponse instance + */ + public static create(properties?: google.cloud.documentai.v1.IListEvaluationsResponse): google.cloud.documentai.v1.ListEvaluationsResponse; + + /** + * Encodes the specified ListEvaluationsResponse message. Does not implicitly {@link google.cloud.documentai.v1.ListEvaluationsResponse.verify|verify} messages. + * @param message ListEvaluationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1.IListEvaluationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEvaluationsResponse message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.ListEvaluationsResponse.verify|verify} messages. + * @param message ListEvaluationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1.IListEvaluationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEvaluationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEvaluationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.ListEvaluationsResponse; + + /** + * Decodes a ListEvaluationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEvaluationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.ListEvaluationsResponse; + + /** + * Verifies a ListEvaluationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListEvaluationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEvaluationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.ListEvaluationsResponse; + + /** + * Creates a plain object from a ListEvaluationsResponse message. Also converts values to other types if specified. + * @param message ListEvaluationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1.ListEvaluationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEvaluationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEvaluationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DocumentSchema. */ + interface IDocumentSchema { + + /** DocumentSchema displayName */ + displayName?: (string|null); + + /** DocumentSchema description */ + description?: (string|null); + + /** DocumentSchema entityTypes */ + entityTypes?: (google.cloud.documentai.v1.DocumentSchema.IEntityType[]|null); + + /** DocumentSchema metadata */ + metadata?: (google.cloud.documentai.v1.DocumentSchema.IMetadata|null); + } + + /** Represents a DocumentSchema. */ + class DocumentSchema implements IDocumentSchema { + + /** + * Constructs a new DocumentSchema. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1.IDocumentSchema); + + /** DocumentSchema displayName. */ + public displayName: string; + + /** DocumentSchema description. */ + public description: string; + + /** DocumentSchema entityTypes. */ + public entityTypes: google.cloud.documentai.v1.DocumentSchema.IEntityType[]; + + /** DocumentSchema metadata. */ + public metadata?: (google.cloud.documentai.v1.DocumentSchema.IMetadata|null); + + /** + * Creates a new DocumentSchema instance using the specified properties. + * @param [properties] Properties to set + * @returns DocumentSchema instance + */ + public static create(properties?: google.cloud.documentai.v1.IDocumentSchema): google.cloud.documentai.v1.DocumentSchema; + + /** + * Encodes the specified DocumentSchema message. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.verify|verify} messages. + * @param message DocumentSchema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1.IDocumentSchema, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DocumentSchema message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.verify|verify} messages. + * @param message DocumentSchema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1.IDocumentSchema, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DocumentSchema message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DocumentSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.DocumentSchema; + + /** + * Decodes a DocumentSchema message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DocumentSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.DocumentSchema; + + /** + * Verifies a DocumentSchema message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DocumentSchema message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DocumentSchema + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.DocumentSchema; + + /** + * Creates a plain object from a DocumentSchema message. Also converts values to other types if specified. + * @param message DocumentSchema + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1.DocumentSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DocumentSchema to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DocumentSchema + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DocumentSchema { + + /** Properties of an EntityType. */ + interface IEntityType { + + /** EntityType enumValues */ + enumValues?: (google.cloud.documentai.v1.DocumentSchema.EntityType.IEnumValues|null); + + /** EntityType displayName */ + displayName?: (string|null); + + /** EntityType name */ + name?: (string|null); + + /** EntityType baseTypes */ + baseTypes?: (string[]|null); + + /** EntityType properties */ + properties?: (google.cloud.documentai.v1.DocumentSchema.EntityType.IProperty[]|null); + } + + /** Represents an EntityType. */ + class EntityType implements IEntityType { + + /** + * Constructs a new EntityType. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1.DocumentSchema.IEntityType); + + /** EntityType enumValues. */ + public enumValues?: (google.cloud.documentai.v1.DocumentSchema.EntityType.IEnumValues|null); + + /** EntityType displayName. */ + public displayName: string; + + /** EntityType name. */ + public name: string; + + /** EntityType baseTypes. */ + public baseTypes: string[]; + + /** EntityType properties. */ + public properties: google.cloud.documentai.v1.DocumentSchema.EntityType.IProperty[]; + + /** EntityType valueSource. */ + public valueSource?: "enumValues"; + + /** + * Creates a new EntityType instance using the specified properties. + * @param [properties] Properties to set + * @returns EntityType instance + */ + public static create(properties?: google.cloud.documentai.v1.DocumentSchema.IEntityType): google.cloud.documentai.v1.DocumentSchema.EntityType; + + /** + * Encodes the specified EntityType message. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.EntityType.verify|verify} messages. + * @param message EntityType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1.DocumentSchema.IEntityType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EntityType message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.EntityType.verify|verify} messages. + * @param message EntityType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1.DocumentSchema.IEntityType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EntityType message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EntityType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.DocumentSchema.EntityType; + + /** + * Decodes an EntityType message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EntityType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.DocumentSchema.EntityType; + + /** + * Verifies an EntityType message. + * @param message Plain 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 EntityType message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EntityType + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.DocumentSchema.EntityType; + + /** + * Creates a plain object from an EntityType message. Also converts values to other types if specified. + * @param message EntityType + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1.DocumentSchema.EntityType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EntityType to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EntityType + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EntityType { + + /** Properties of an EnumValues. */ + interface IEnumValues { + + /** EnumValues values */ + values?: (string[]|null); + } + + /** Represents an EnumValues. */ + class EnumValues implements IEnumValues { + + /** + * Constructs a new EnumValues. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1.DocumentSchema.EntityType.IEnumValues); + + /** EnumValues values. */ + public values: string[]; + + /** + * Creates a new EnumValues instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValues instance + */ + public static create(properties?: google.cloud.documentai.v1.DocumentSchema.EntityType.IEnumValues): google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues; + + /** + * Encodes the specified EnumValues message. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues.verify|verify} messages. + * @param message EnumValues message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1.DocumentSchema.EntityType.IEnumValues, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValues message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues.verify|verify} messages. + * @param message EnumValues message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1.DocumentSchema.EntityType.IEnumValues, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValues message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValues + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues; + + /** + * Decodes an EnumValues message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValues + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues; + + /** + * Verifies an EnumValues message. + * @param message Plain 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 EnumValues message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValues + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues; + + /** + * Creates a plain object from an EnumValues message. Also converts values to other types if specified. + * @param message EnumValues + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValues to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValues + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Property. */ + interface IProperty { + + /** Property name */ + name?: (string|null); + + /** Property valueType */ + valueType?: (string|null); + + /** Property occurrenceType */ + occurrenceType?: (google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType|keyof typeof google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType|null); + } + + /** Represents a Property. */ + class Property implements IProperty { + + /** + * Constructs a new Property. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1.DocumentSchema.EntityType.IProperty); + + /** Property name. */ + public name: string; + + /** Property valueType. */ + public valueType: string; + + /** Property occurrenceType. */ + public occurrenceType: (google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType|keyof typeof google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType); + + /** + * Creates a new Property instance using the specified properties. + * @param [properties] Properties to set + * @returns Property instance + */ + public static create(properties?: google.cloud.documentai.v1.DocumentSchema.EntityType.IProperty): google.cloud.documentai.v1.DocumentSchema.EntityType.Property; + + /** + * Encodes the specified Property message. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.EntityType.Property.verify|verify} messages. + * @param message Property message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1.DocumentSchema.EntityType.IProperty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Property message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.EntityType.Property.verify|verify} messages. + * @param message Property message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1.DocumentSchema.EntityType.IProperty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Property message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Property + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.DocumentSchema.EntityType.Property; + + /** + * Decodes a Property message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Property + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.DocumentSchema.EntityType.Property; + + /** + * Verifies a Property message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Property message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Property + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.DocumentSchema.EntityType.Property; + + /** + * Creates a plain object from a Property message. Also converts values to other types if specified. + * @param message Property + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1.DocumentSchema.EntityType.Property, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Property to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Property + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Property { + + /** OccurrenceType enum. */ + enum OccurrenceType { + OCCURRENCE_TYPE_UNSPECIFIED = 0, + OPTIONAL_ONCE = 1, + OPTIONAL_MULTIPLE = 2, + REQUIRED_ONCE = 3, + REQUIRED_MULTIPLE = 4 + } + } + } + + /** Properties of a Metadata. */ + interface IMetadata { + + /** Metadata documentSplitter */ + documentSplitter?: (boolean|null); + + /** Metadata documentAllowMultipleLabels */ + documentAllowMultipleLabels?: (boolean|null); + + /** Metadata prefixedNamingOnProperties */ + prefixedNamingOnProperties?: (boolean|null); + + /** Metadata skipNamingValidation */ + skipNamingValidation?: (boolean|null); + } + + /** Represents a Metadata. */ + class Metadata implements IMetadata { + + /** + * Constructs a new Metadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1.DocumentSchema.IMetadata); + + /** Metadata documentSplitter. */ + public documentSplitter: boolean; + + /** Metadata documentAllowMultipleLabels. */ + public documentAllowMultipleLabels: boolean; + + /** Metadata prefixedNamingOnProperties. */ + public prefixedNamingOnProperties: boolean; + + /** Metadata skipNamingValidation. */ + public skipNamingValidation: boolean; + + /** + * Creates a new Metadata instance using the specified properties. + * @param [properties] Properties to set + * @returns Metadata instance + */ + public static create(properties?: google.cloud.documentai.v1.DocumentSchema.IMetadata): google.cloud.documentai.v1.DocumentSchema.Metadata; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1.DocumentSchema.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1.DocumentSchema.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.DocumentSchema.Metadata; + + /** + * Decodes a Metadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.DocumentSchema.Metadata; + + /** + * Verifies a Metadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.DocumentSchema.Metadata; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @param message Metadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1.DocumentSchema.Metadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Metadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EvaluationReference. */ + interface IEvaluationReference { + + /** EvaluationReference operation */ + operation?: (string|null); + + /** EvaluationReference evaluation */ + evaluation?: (string|null); + + /** EvaluationReference aggregateMetrics */ + aggregateMetrics?: (google.cloud.documentai.v1.Evaluation.IMetrics|null); + + /** EvaluationReference aggregateMetricsExact */ + aggregateMetricsExact?: (google.cloud.documentai.v1.Evaluation.IMetrics|null); + } + + /** Represents an EvaluationReference. */ + class EvaluationReference implements IEvaluationReference { + + /** + * Constructs a new EvaluationReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1.IEvaluationReference); + + /** EvaluationReference operation. */ + public operation: string; + + /** EvaluationReference evaluation. */ + public evaluation: string; + + /** EvaluationReference aggregateMetrics. */ + public aggregateMetrics?: (google.cloud.documentai.v1.Evaluation.IMetrics|null); + + /** EvaluationReference aggregateMetricsExact. */ + public aggregateMetricsExact?: (google.cloud.documentai.v1.Evaluation.IMetrics|null); + + /** + * Creates a new EvaluationReference instance using the specified properties. + * @param [properties] Properties to set + * @returns EvaluationReference instance + */ + public static create(properties?: google.cloud.documentai.v1.IEvaluationReference): google.cloud.documentai.v1.EvaluationReference; + + /** + * Encodes the specified EvaluationReference message. Does not implicitly {@link google.cloud.documentai.v1.EvaluationReference.verify|verify} messages. + * @param message EvaluationReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1.IEvaluationReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EvaluationReference message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.EvaluationReference.verify|verify} messages. + * @param message EvaluationReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1.IEvaluationReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EvaluationReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EvaluationReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.EvaluationReference; + + /** + * Decodes an EvaluationReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EvaluationReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.EvaluationReference; + + /** + * Verifies an EvaluationReference message. + * @param message Plain 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 EvaluationReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EvaluationReference + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.EvaluationReference; + + /** + * Creates a plain object from an EvaluationReference message. Also converts values to other types if specified. + * @param message EvaluationReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1.EvaluationReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EvaluationReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EvaluationReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Evaluation. */ + interface IEvaluation { + + /** Evaluation name */ + name?: (string|null); + + /** Evaluation createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Evaluation documentCounters */ + documentCounters?: (google.cloud.documentai.v1.Evaluation.ICounters|null); + + /** Evaluation allEntitiesMetrics */ + allEntitiesMetrics?: (google.cloud.documentai.v1.Evaluation.IMultiConfidenceMetrics|null); + + /** Evaluation entityMetrics */ + entityMetrics?: ({ [k: string]: google.cloud.documentai.v1.Evaluation.IMultiConfidenceMetrics }|null); + + /** Evaluation kmsKeyName */ + kmsKeyName?: (string|null); + + /** Evaluation kmsKeyVersionName */ + kmsKeyVersionName?: (string|null); + } + + /** Represents an Evaluation. */ + class Evaluation implements IEvaluation { + + /** + * Constructs a new Evaluation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1.IEvaluation); + + /** Evaluation name. */ + public name: string; + + /** Evaluation createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Evaluation documentCounters. */ + public documentCounters?: (google.cloud.documentai.v1.Evaluation.ICounters|null); + + /** Evaluation allEntitiesMetrics. */ + public allEntitiesMetrics?: (google.cloud.documentai.v1.Evaluation.IMultiConfidenceMetrics|null); + + /** Evaluation entityMetrics. */ + public entityMetrics: { [k: string]: google.cloud.documentai.v1.Evaluation.IMultiConfidenceMetrics }; + + /** Evaluation kmsKeyName. */ + public kmsKeyName: string; + + /** Evaluation kmsKeyVersionName. */ + public kmsKeyVersionName: string; + + /** + * Creates a new Evaluation instance using the specified properties. + * @param [properties] Properties to set + * @returns Evaluation instance + */ + public static create(properties?: google.cloud.documentai.v1.IEvaluation): google.cloud.documentai.v1.Evaluation; + + /** + * Encodes the specified Evaluation message. Does not implicitly {@link google.cloud.documentai.v1.Evaluation.verify|verify} messages. + * @param message Evaluation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1.IEvaluation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Evaluation message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.Evaluation.verify|verify} messages. + * @param message Evaluation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1.IEvaluation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Evaluation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Evaluation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.Evaluation; + + /** + * Decodes an Evaluation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Evaluation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.Evaluation; + + /** + * Verifies an Evaluation message. + * @param message Plain 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 Evaluation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Evaluation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.Evaluation; + + /** + * Creates a plain object from an Evaluation message. Also converts values to other types if specified. + * @param message Evaluation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1.Evaluation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Evaluation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Evaluation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Evaluation { + + /** Properties of a Counters. */ + interface ICounters { + + /** Counters inputDocumentsCount */ + inputDocumentsCount?: (number|null); + + /** Counters invalidDocumentsCount */ + invalidDocumentsCount?: (number|null); + + /** Counters failedDocumentsCount */ + failedDocumentsCount?: (number|null); + + /** Counters evaluatedDocumentsCount */ + evaluatedDocumentsCount?: (number|null); + } + + /** Represents a Counters. */ + class Counters implements ICounters { + + /** + * Constructs a new Counters. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1.Evaluation.ICounters); + + /** Counters inputDocumentsCount. */ + public inputDocumentsCount: number; + + /** Counters invalidDocumentsCount. */ + public invalidDocumentsCount: number; + + /** Counters failedDocumentsCount. */ + public failedDocumentsCount: number; + + /** Counters evaluatedDocumentsCount. */ + public evaluatedDocumentsCount: number; + + /** + * Creates a new Counters instance using the specified properties. + * @param [properties] Properties to set + * @returns Counters instance + */ + public static create(properties?: google.cloud.documentai.v1.Evaluation.ICounters): google.cloud.documentai.v1.Evaluation.Counters; + + /** + * Encodes the specified Counters message. Does not implicitly {@link google.cloud.documentai.v1.Evaluation.Counters.verify|verify} messages. + * @param message Counters message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1.Evaluation.ICounters, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Counters message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.Evaluation.Counters.verify|verify} messages. + * @param message Counters message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1.Evaluation.ICounters, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Counters message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Counters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.Evaluation.Counters; + + /** + * Decodes a Counters message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Counters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.Evaluation.Counters; + + /** + * Verifies a Counters message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Counters message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Counters + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.Evaluation.Counters; + + /** + * Creates a plain object from a Counters message. Also converts values to other types if specified. + * @param message Counters + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1.Evaluation.Counters, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Counters to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Counters + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Metrics. */ + interface IMetrics { + + /** Metrics precision */ + precision?: (number|null); + + /** Metrics recall */ + recall?: (number|null); + + /** Metrics f1Score */ + f1Score?: (number|null); + + /** Metrics predictedOccurrencesCount */ + predictedOccurrencesCount?: (number|null); + + /** Metrics groundTruthOccurrencesCount */ + groundTruthOccurrencesCount?: (number|null); + + /** Metrics predictedDocumentCount */ + predictedDocumentCount?: (number|null); + + /** Metrics groundTruthDocumentCount */ + groundTruthDocumentCount?: (number|null); + + /** Metrics truePositivesCount */ + truePositivesCount?: (number|null); + + /** Metrics falsePositivesCount */ + falsePositivesCount?: (number|null); + + /** Metrics falseNegativesCount */ + falseNegativesCount?: (number|null); + + /** Metrics totalDocumentsCount */ + totalDocumentsCount?: (number|null); + } + + /** Represents a Metrics. */ + class Metrics implements IMetrics { + + /** + * Constructs a new Metrics. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1.Evaluation.IMetrics); + + /** Metrics precision. */ + public precision: number; + + /** Metrics recall. */ + public recall: number; + + /** Metrics f1Score. */ + public f1Score: number; + + /** Metrics predictedOccurrencesCount. */ + public predictedOccurrencesCount: number; + + /** Metrics groundTruthOccurrencesCount. */ + public groundTruthOccurrencesCount: number; + + /** Metrics predictedDocumentCount. */ + public predictedDocumentCount: number; + + /** Metrics groundTruthDocumentCount. */ + public groundTruthDocumentCount: number; + + /** Metrics truePositivesCount. */ + public truePositivesCount: number; + + /** Metrics falsePositivesCount. */ + public falsePositivesCount: number; + + /** Metrics falseNegativesCount. */ + public falseNegativesCount: number; + + /** Metrics totalDocumentsCount. */ + public totalDocumentsCount: number; + + /** + * Creates a new Metrics instance using the specified properties. + * @param [properties] Properties to set + * @returns Metrics instance + */ + public static create(properties?: google.cloud.documentai.v1.Evaluation.IMetrics): google.cloud.documentai.v1.Evaluation.Metrics; + + /** + * Encodes the specified Metrics message. Does not implicitly {@link google.cloud.documentai.v1.Evaluation.Metrics.verify|verify} messages. + * @param message Metrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1.Evaluation.IMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metrics message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.Evaluation.Metrics.verify|verify} messages. + * @param message Metrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1.Evaluation.IMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metrics message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.Evaluation.Metrics; + + /** + * Decodes a Metrics message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.Evaluation.Metrics; + + /** + * Verifies a Metrics message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Metrics message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metrics + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.Evaluation.Metrics; + + /** + * Creates a plain object from a Metrics message. Also converts values to other types if specified. + * @param message Metrics + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1.Evaluation.Metrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metrics to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Metrics + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConfidenceLevelMetrics. */ + interface IConfidenceLevelMetrics { + + /** ConfidenceLevelMetrics confidenceLevel */ + confidenceLevel?: (number|null); + + /** ConfidenceLevelMetrics metrics */ + metrics?: (google.cloud.documentai.v1.Evaluation.IMetrics|null); + } - /** Property valueType. */ - public valueType: string; + /** Represents a ConfidenceLevelMetrics. */ + class ConfidenceLevelMetrics implements IConfidenceLevelMetrics { - /** Property occurrenceType. */ - public occurrenceType: (google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType|keyof typeof google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType); + /** + * Constructs a new ConfidenceLevelMetrics. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1.Evaluation.IConfidenceLevelMetrics); - /** - * Creates a new Property instance using the specified properties. - * @param [properties] Properties to set - * @returns Property instance - */ - public static create(properties?: google.cloud.documentai.v1.DocumentSchema.EntityType.IProperty): google.cloud.documentai.v1.DocumentSchema.EntityType.Property; + /** ConfidenceLevelMetrics confidenceLevel. */ + public confidenceLevel: number; - /** - * Encodes the specified Property message. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.EntityType.Property.verify|verify} messages. - * @param message Property message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.documentai.v1.DocumentSchema.EntityType.IProperty, writer?: $protobuf.Writer): $protobuf.Writer; + /** ConfidenceLevelMetrics metrics. */ + public metrics?: (google.cloud.documentai.v1.Evaluation.IMetrics|null); - /** - * Encodes the specified Property message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.EntityType.Property.verify|verify} messages. - * @param message Property message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.documentai.v1.DocumentSchema.EntityType.IProperty, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new ConfidenceLevelMetrics instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfidenceLevelMetrics instance + */ + public static create(properties?: google.cloud.documentai.v1.Evaluation.IConfidenceLevelMetrics): google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics; - /** - * Decodes a Property message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Property - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.DocumentSchema.EntityType.Property; + /** + * Encodes the specified ConfidenceLevelMetrics message. Does not implicitly {@link google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics.verify|verify} messages. + * @param message ConfidenceLevelMetrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1.Evaluation.IConfidenceLevelMetrics, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Property message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Property - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.DocumentSchema.EntityType.Property; + /** + * Encodes the specified ConfidenceLevelMetrics message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics.verify|verify} messages. + * @param message ConfidenceLevelMetrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1.Evaluation.IConfidenceLevelMetrics, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a Property message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a ConfidenceLevelMetrics message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfidenceLevelMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics; - /** - * Creates a Property message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Property - */ - public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.DocumentSchema.EntityType.Property; + /** + * Decodes a ConfidenceLevelMetrics message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfidenceLevelMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics; - /** - * Creates a plain object from a Property message. Also converts values to other types if specified. - * @param message Property - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.documentai.v1.DocumentSchema.EntityType.Property, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a ConfidenceLevelMetrics message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this Property to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a ConfidenceLevelMetrics message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfidenceLevelMetrics + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics; - /** - * Gets the default type url for Property - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a plain object from a ConfidenceLevelMetrics message. Also converts values to other types if specified. + * @param message ConfidenceLevelMetrics + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; - namespace Property { + /** + * Converts this ConfidenceLevelMetrics to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** OccurrenceType enum. */ - enum OccurrenceType { - OCCURRENCE_TYPE_UNSPECIFIED = 0, - OPTIONAL_ONCE = 1, - OPTIONAL_MULTIPLE = 2, - REQUIRED_ONCE = 3, - REQUIRED_MULTIPLE = 4 - } - } + /** + * Gets the default type url for ConfidenceLevelMetrics + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Metadata. */ - interface IMetadata { + /** Properties of a MultiConfidenceMetrics. */ + interface IMultiConfidenceMetrics { - /** Metadata documentSplitter */ - documentSplitter?: (boolean|null); + /** MultiConfidenceMetrics confidenceLevelMetrics */ + confidenceLevelMetrics?: (google.cloud.documentai.v1.Evaluation.IConfidenceLevelMetrics[]|null); - /** Metadata documentAllowMultipleLabels */ - documentAllowMultipleLabels?: (boolean|null); + /** MultiConfidenceMetrics confidenceLevelMetricsExact */ + confidenceLevelMetricsExact?: (google.cloud.documentai.v1.Evaluation.IConfidenceLevelMetrics[]|null); - /** Metadata prefixedNamingOnProperties */ - prefixedNamingOnProperties?: (boolean|null); + /** MultiConfidenceMetrics auprc */ + auprc?: (number|null); - /** Metadata skipNamingValidation */ - skipNamingValidation?: (boolean|null); + /** MultiConfidenceMetrics estimatedCalibrationError */ + estimatedCalibrationError?: (number|null); + + /** MultiConfidenceMetrics auprcExact */ + auprcExact?: (number|null); + + /** MultiConfidenceMetrics estimatedCalibrationErrorExact */ + estimatedCalibrationErrorExact?: (number|null); + + /** MultiConfidenceMetrics metricsType */ + metricsType?: (google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.MetricsType|keyof typeof google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.MetricsType|null); } - /** Represents a Metadata. */ - class Metadata implements IMetadata { + /** Represents a MultiConfidenceMetrics. */ + class MultiConfidenceMetrics implements IMultiConfidenceMetrics { /** - * Constructs a new Metadata. + * Constructs a new MultiConfidenceMetrics. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.documentai.v1.DocumentSchema.IMetadata); + constructor(properties?: google.cloud.documentai.v1.Evaluation.IMultiConfidenceMetrics); - /** Metadata documentSplitter. */ - public documentSplitter: boolean; + /** MultiConfidenceMetrics confidenceLevelMetrics. */ + public confidenceLevelMetrics: google.cloud.documentai.v1.Evaluation.IConfidenceLevelMetrics[]; - /** Metadata documentAllowMultipleLabels. */ - public documentAllowMultipleLabels: boolean; + /** MultiConfidenceMetrics confidenceLevelMetricsExact. */ + public confidenceLevelMetricsExact: google.cloud.documentai.v1.Evaluation.IConfidenceLevelMetrics[]; - /** Metadata prefixedNamingOnProperties. */ - public prefixedNamingOnProperties: boolean; + /** MultiConfidenceMetrics auprc. */ + public auprc: number; - /** Metadata skipNamingValidation. */ - public skipNamingValidation: boolean; + /** MultiConfidenceMetrics estimatedCalibrationError. */ + public estimatedCalibrationError: number; + + /** MultiConfidenceMetrics auprcExact. */ + public auprcExact: number; + + /** MultiConfidenceMetrics estimatedCalibrationErrorExact. */ + public estimatedCalibrationErrorExact: number; + + /** MultiConfidenceMetrics metricsType. */ + public metricsType: (google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.MetricsType|keyof typeof google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.MetricsType); /** - * Creates a new Metadata instance using the specified properties. + * Creates a new MultiConfidenceMetrics instance using the specified properties. * @param [properties] Properties to set - * @returns Metadata instance + * @returns MultiConfidenceMetrics instance */ - public static create(properties?: google.cloud.documentai.v1.DocumentSchema.IMetadata): google.cloud.documentai.v1.DocumentSchema.Metadata; + public static create(properties?: google.cloud.documentai.v1.Evaluation.IMultiConfidenceMetrics): google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics; /** - * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.Metadata.verify|verify} messages. - * @param message Metadata message or plain object to encode + * Encodes the specified MultiConfidenceMetrics message. Does not implicitly {@link google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.verify|verify} messages. + * @param message MultiConfidenceMetrics message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.documentai.v1.DocumentSchema.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.documentai.v1.Evaluation.IMultiConfidenceMetrics, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.Metadata.verify|verify} messages. - * @param message Metadata message or plain object to encode + * Encodes the specified MultiConfidenceMetrics message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.verify|verify} messages. + * @param message MultiConfidenceMetrics message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.documentai.v1.DocumentSchema.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.documentai.v1.Evaluation.IMultiConfidenceMetrics, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Metadata message from the specified reader or buffer. + * Decodes a MultiConfidenceMetrics message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Metadata + * @returns MultiConfidenceMetrics * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.DocumentSchema.Metadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics; /** - * Decodes a Metadata message from the specified reader or buffer, length delimited. + * Decodes a MultiConfidenceMetrics message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Metadata + * @returns MultiConfidenceMetrics * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.DocumentSchema.Metadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics; /** - * Verifies a Metadata message. + * Verifies a MultiConfidenceMetrics message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * Creates a MultiConfidenceMetrics message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Metadata + * @returns MultiConfidenceMetrics */ - public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.DocumentSchema.Metadata; + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics; /** - * Creates a plain object from a Metadata message. Also converts values to other types if specified. - * @param message Metadata + * Creates a plain object from a MultiConfidenceMetrics message. Also converts values to other types if specified. + * @param message MultiConfidenceMetrics * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.documentai.v1.DocumentSchema.Metadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Metadata to JSON. + * Converts this MultiConfidenceMetrics to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Metadata + * Gets the default type url for MultiConfidenceMetrics * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + namespace MultiConfidenceMetrics { + + /** MetricsType enum. */ + enum MetricsType { + METRICS_TYPE_UNSPECIFIED = 0, + AGGREGATE = 1 + } + } } /** Properties of a CommonOperationMetadata. */ @@ -10887,6 +12897,9 @@ export namespace google { /** ProcessorVersion createTime */ createTime?: (google.protobuf.ITimestamp|null); + /** ProcessorVersion latestEvaluation */ + latestEvaluation?: (google.cloud.documentai.v1.IEvaluationReference|null); + /** ProcessorVersion kmsKeyName */ kmsKeyName?: (string|null); @@ -10924,6 +12937,9 @@ export namespace google { /** ProcessorVersion createTime. */ public createTime?: (google.protobuf.ITimestamp|null); + /** ProcessorVersion latestEvaluation. */ + public latestEvaluation?: (google.cloud.documentai.v1.IEvaluationReference|null); + /** ProcessorVersion kmsKeyName. */ public kmsKeyName: string; diff --git a/packages/google-cloud-documentai/protos/protos.js b/packages/google-cloud-documentai/protos/protos.js index 2dc1c91a503..17dcb18e2da 100644 --- a/packages/google-cloud-documentai/protos/protos.js +++ b/packages/google-cloud-documentai/protos/protos.js @@ -10503,6 +10503,7 @@ case 0: case 1: case 2: + case 7: case 3: case 4: case 5: @@ -10557,6 +10558,10 @@ case 2: message.type = 2; break; + case "UPDATE": + case 7: + message.type = 7; + break; case "REPLACE": case 3: message.type = 3; @@ -10894,6 +10899,7 @@ * @property {number} OPERATION_TYPE_UNSPECIFIED=0 OPERATION_TYPE_UNSPECIFIED value * @property {number} ADD=1 ADD value * @property {number} REMOVE=2 REMOVE value + * @property {number} UPDATE=7 UPDATE value * @property {number} REPLACE=3 REPLACE value * @property {number} EVAL_REQUESTED=4 EVAL_REQUESTED value * @property {number} EVAL_APPROVED=5 EVAL_APPROVED value @@ -10904,6 +10910,7 @@ values[valuesById[0] = "OPERATION_TYPE_UNSPECIFIED"] = 0; values[valuesById[1] = "ADD"] = 1; values[valuesById[2] = "REMOVE"] = 2; + values[valuesById[7] = "UPDATE"] = 7; values[valuesById[3] = "REPLACE"] = 3; values[valuesById[4] = "EVAL_REQUESTED"] = 4; values[valuesById[5] = "EVAL_APPROVED"] = 5; @@ -14692,6 +14699,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.documentai.v1.DocumentProcessorService|trainProcessorVersion}. + * @memberof google.cloud.documentai.v1.DocumentProcessorService + * @typedef TrainProcessorVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls TrainProcessorVersion. + * @function trainProcessorVersion + * @memberof google.cloud.documentai.v1.DocumentProcessorService + * @instance + * @param {google.cloud.documentai.v1.ITrainProcessorVersionRequest} request TrainProcessorVersionRequest message or plain object + * @param {google.cloud.documentai.v1.DocumentProcessorService.TrainProcessorVersionCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DocumentProcessorService.prototype.trainProcessorVersion = function trainProcessorVersion(request, callback) { + return this.rpcCall(trainProcessorVersion, $root.google.cloud.documentai.v1.TrainProcessorVersionRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "TrainProcessorVersion" }); + + /** + * Calls TrainProcessorVersion. + * @function trainProcessorVersion + * @memberof google.cloud.documentai.v1.DocumentProcessorService + * @instance + * @param {google.cloud.documentai.v1.ITrainProcessorVersionRequest} request TrainProcessorVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.cloud.documentai.v1.DocumentProcessorService|getProcessorVersion}. * @memberof google.cloud.documentai.v1.DocumentProcessorService @@ -15055,6 +15095,105 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.documentai.v1.DocumentProcessorService|evaluateProcessorVersion}. + * @memberof google.cloud.documentai.v1.DocumentProcessorService + * @typedef EvaluateProcessorVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls EvaluateProcessorVersion. + * @function evaluateProcessorVersion + * @memberof google.cloud.documentai.v1.DocumentProcessorService + * @instance + * @param {google.cloud.documentai.v1.IEvaluateProcessorVersionRequest} request EvaluateProcessorVersionRequest message or plain object + * @param {google.cloud.documentai.v1.DocumentProcessorService.EvaluateProcessorVersionCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DocumentProcessorService.prototype.evaluateProcessorVersion = function evaluateProcessorVersion(request, callback) { + return this.rpcCall(evaluateProcessorVersion, $root.google.cloud.documentai.v1.EvaluateProcessorVersionRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "EvaluateProcessorVersion" }); + + /** + * Calls EvaluateProcessorVersion. + * @function evaluateProcessorVersion + * @memberof google.cloud.documentai.v1.DocumentProcessorService + * @instance + * @param {google.cloud.documentai.v1.IEvaluateProcessorVersionRequest} request EvaluateProcessorVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.documentai.v1.DocumentProcessorService|getEvaluation}. + * @memberof google.cloud.documentai.v1.DocumentProcessorService + * @typedef GetEvaluationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.documentai.v1.Evaluation} [response] Evaluation + */ + + /** + * Calls GetEvaluation. + * @function getEvaluation + * @memberof google.cloud.documentai.v1.DocumentProcessorService + * @instance + * @param {google.cloud.documentai.v1.IGetEvaluationRequest} request GetEvaluationRequest message or plain object + * @param {google.cloud.documentai.v1.DocumentProcessorService.GetEvaluationCallback} callback Node-style callback called with the error, if any, and Evaluation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DocumentProcessorService.prototype.getEvaluation = function getEvaluation(request, callback) { + return this.rpcCall(getEvaluation, $root.google.cloud.documentai.v1.GetEvaluationRequest, $root.google.cloud.documentai.v1.Evaluation, request, callback); + }, "name", { value: "GetEvaluation" }); + + /** + * Calls GetEvaluation. + * @function getEvaluation + * @memberof google.cloud.documentai.v1.DocumentProcessorService + * @instance + * @param {google.cloud.documentai.v1.IGetEvaluationRequest} request GetEvaluationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.documentai.v1.DocumentProcessorService|listEvaluations}. + * @memberof google.cloud.documentai.v1.DocumentProcessorService + * @typedef ListEvaluationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.documentai.v1.ListEvaluationsResponse} [response] ListEvaluationsResponse + */ + + /** + * Calls ListEvaluations. + * @function listEvaluations + * @memberof google.cloud.documentai.v1.DocumentProcessorService + * @instance + * @param {google.cloud.documentai.v1.IListEvaluationsRequest} request ListEvaluationsRequest message or plain object + * @param {google.cloud.documentai.v1.DocumentProcessorService.ListEvaluationsCallback} callback Node-style callback called with the error, if any, and ListEvaluationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DocumentProcessorService.prototype.listEvaluations = function listEvaluations(request, callback) { + return this.rpcCall(listEvaluations, $root.google.cloud.documentai.v1.ListEvaluationsRequest, $root.google.cloud.documentai.v1.ListEvaluationsResponse, request, callback); + }, "name", { value: "ListEvaluations" }); + + /** + * Calls ListEvaluations. + * @function listEvaluations + * @memberof google.cloud.documentai.v1.DocumentProcessorService + * @instance + * @param {google.cloud.documentai.v1.IListEvaluationsRequest} request ListEvaluationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return DocumentProcessorService; })(); @@ -23612,28 +23751,28 @@ return SetDefaultProcessorVersionMetadata; })(); - v1.ReviewDocumentRequest = (function() { + v1.TrainProcessorVersionRequest = (function() { /** - * Properties of a ReviewDocumentRequest. + * Properties of a TrainProcessorVersionRequest. * @memberof google.cloud.documentai.v1 - * @interface IReviewDocumentRequest - * @property {google.cloud.documentai.v1.IDocument|null} [inlineDocument] ReviewDocumentRequest inlineDocument - * @property {string|null} [humanReviewConfig] ReviewDocumentRequest humanReviewConfig - * @property {boolean|null} [enableSchemaValidation] ReviewDocumentRequest enableSchemaValidation - * @property {google.cloud.documentai.v1.ReviewDocumentRequest.Priority|null} [priority] ReviewDocumentRequest priority - * @property {google.cloud.documentai.v1.IDocumentSchema|null} [documentSchema] ReviewDocumentRequest documentSchema + * @interface ITrainProcessorVersionRequest + * @property {string|null} [parent] TrainProcessorVersionRequest parent + * @property {google.cloud.documentai.v1.IProcessorVersion|null} [processorVersion] TrainProcessorVersionRequest processorVersion + * @property {google.cloud.documentai.v1.IDocumentSchema|null} [documentSchema] TrainProcessorVersionRequest documentSchema + * @property {google.cloud.documentai.v1.TrainProcessorVersionRequest.IInputData|null} [inputData] TrainProcessorVersionRequest inputData + * @property {string|null} [baseProcessorVersion] TrainProcessorVersionRequest baseProcessorVersion */ /** - * Constructs a new ReviewDocumentRequest. + * Constructs a new TrainProcessorVersionRequest. * @memberof google.cloud.documentai.v1 - * @classdesc Represents a ReviewDocumentRequest. - * @implements IReviewDocumentRequest + * @classdesc Represents a TrainProcessorVersionRequest. + * @implements ITrainProcessorVersionRequest * @constructor - * @param {google.cloud.documentai.v1.IReviewDocumentRequest=} [properties] Properties to set + * @param {google.cloud.documentai.v1.ITrainProcessorVersionRequest=} [properties] Properties to set */ - function ReviewDocumentRequest(properties) { + function TrainProcessorVersionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23641,145 +23780,131 @@ } /** - * ReviewDocumentRequest inlineDocument. - * @member {google.cloud.documentai.v1.IDocument|null|undefined} inlineDocument - * @memberof google.cloud.documentai.v1.ReviewDocumentRequest - * @instance - */ - ReviewDocumentRequest.prototype.inlineDocument = null; - - /** - * ReviewDocumentRequest humanReviewConfig. - * @member {string} humanReviewConfig - * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * TrainProcessorVersionRequest parent. + * @member {string} parent + * @memberof google.cloud.documentai.v1.TrainProcessorVersionRequest * @instance */ - ReviewDocumentRequest.prototype.humanReviewConfig = ""; + TrainProcessorVersionRequest.prototype.parent = ""; /** - * ReviewDocumentRequest enableSchemaValidation. - * @member {boolean} enableSchemaValidation - * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * TrainProcessorVersionRequest processorVersion. + * @member {google.cloud.documentai.v1.IProcessorVersion|null|undefined} processorVersion + * @memberof google.cloud.documentai.v1.TrainProcessorVersionRequest * @instance */ - ReviewDocumentRequest.prototype.enableSchemaValidation = false; + TrainProcessorVersionRequest.prototype.processorVersion = null; /** - * ReviewDocumentRequest priority. - * @member {google.cloud.documentai.v1.ReviewDocumentRequest.Priority} priority - * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * TrainProcessorVersionRequest documentSchema. + * @member {google.cloud.documentai.v1.IDocumentSchema|null|undefined} documentSchema + * @memberof google.cloud.documentai.v1.TrainProcessorVersionRequest * @instance */ - ReviewDocumentRequest.prototype.priority = 0; + TrainProcessorVersionRequest.prototype.documentSchema = null; /** - * ReviewDocumentRequest documentSchema. - * @member {google.cloud.documentai.v1.IDocumentSchema|null|undefined} documentSchema - * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * TrainProcessorVersionRequest inputData. + * @member {google.cloud.documentai.v1.TrainProcessorVersionRequest.IInputData|null|undefined} inputData + * @memberof google.cloud.documentai.v1.TrainProcessorVersionRequest * @instance */ - ReviewDocumentRequest.prototype.documentSchema = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + TrainProcessorVersionRequest.prototype.inputData = null; /** - * ReviewDocumentRequest source. - * @member {"inlineDocument"|undefined} source - * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * TrainProcessorVersionRequest baseProcessorVersion. + * @member {string} baseProcessorVersion + * @memberof google.cloud.documentai.v1.TrainProcessorVersionRequest * @instance */ - Object.defineProperty(ReviewDocumentRequest.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["inlineDocument"]), - set: $util.oneOfSetter($oneOfFields) - }); + TrainProcessorVersionRequest.prototype.baseProcessorVersion = ""; /** - * Creates a new ReviewDocumentRequest instance using the specified properties. + * Creates a new TrainProcessorVersionRequest instance using the specified properties. * @function create - * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * @memberof google.cloud.documentai.v1.TrainProcessorVersionRequest * @static - * @param {google.cloud.documentai.v1.IReviewDocumentRequest=} [properties] Properties to set - * @returns {google.cloud.documentai.v1.ReviewDocumentRequest} ReviewDocumentRequest instance + * @param {google.cloud.documentai.v1.ITrainProcessorVersionRequest=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.TrainProcessorVersionRequest} TrainProcessorVersionRequest instance */ - ReviewDocumentRequest.create = function create(properties) { - return new ReviewDocumentRequest(properties); + TrainProcessorVersionRequest.create = function create(properties) { + return new TrainProcessorVersionRequest(properties); }; /** - * Encodes the specified ReviewDocumentRequest message. Does not implicitly {@link google.cloud.documentai.v1.ReviewDocumentRequest.verify|verify} messages. + * Encodes the specified TrainProcessorVersionRequest message. Does not implicitly {@link google.cloud.documentai.v1.TrainProcessorVersionRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * @memberof google.cloud.documentai.v1.TrainProcessorVersionRequest * @static - * @param {google.cloud.documentai.v1.IReviewDocumentRequest} message ReviewDocumentRequest message or plain object to encode + * @param {google.cloud.documentai.v1.ITrainProcessorVersionRequest} message TrainProcessorVersionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReviewDocumentRequest.encode = function encode(message, writer) { + TrainProcessorVersionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.humanReviewConfig != null && Object.hasOwnProperty.call(message, "humanReviewConfig")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.humanReviewConfig); - if (message.enableSchemaValidation != null && Object.hasOwnProperty.call(message, "enableSchemaValidation")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enableSchemaValidation); - if (message.inlineDocument != null && Object.hasOwnProperty.call(message, "inlineDocument")) - $root.google.cloud.documentai.v1.Document.encode(message.inlineDocument, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.priority); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.processorVersion != null && Object.hasOwnProperty.call(message, "processorVersion")) + $root.google.cloud.documentai.v1.ProcessorVersion.encode(message.processorVersion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.inputData != null && Object.hasOwnProperty.call(message, "inputData")) + $root.google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData.encode(message.inputData, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.baseProcessorVersion != null && Object.hasOwnProperty.call(message, "baseProcessorVersion")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.baseProcessorVersion); if (message.documentSchema != null && Object.hasOwnProperty.call(message, "documentSchema")) - $root.google.cloud.documentai.v1.DocumentSchema.encode(message.documentSchema, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.cloud.documentai.v1.DocumentSchema.encode(message.documentSchema, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; /** - * Encodes the specified ReviewDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.ReviewDocumentRequest.verify|verify} messages. + * Encodes the specified TrainProcessorVersionRequest message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.TrainProcessorVersionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * @memberof google.cloud.documentai.v1.TrainProcessorVersionRequest * @static - * @param {google.cloud.documentai.v1.IReviewDocumentRequest} message ReviewDocumentRequest message or plain object to encode + * @param {google.cloud.documentai.v1.ITrainProcessorVersionRequest} message TrainProcessorVersionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReviewDocumentRequest.encodeDelimited = function encodeDelimited(message, writer) { + TrainProcessorVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReviewDocumentRequest message from the specified reader or buffer. + * Decodes a TrainProcessorVersionRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * @memberof google.cloud.documentai.v1.TrainProcessorVersionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.documentai.v1.ReviewDocumentRequest} ReviewDocumentRequest + * @returns {google.cloud.documentai.v1.TrainProcessorVersionRequest} TrainProcessorVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReviewDocumentRequest.decode = function decode(reader, length) { + TrainProcessorVersionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.ReviewDocumentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.TrainProcessorVersionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: { - message.inlineDocument = $root.google.cloud.documentai.v1.Document.decode(reader, reader.uint32()); + case 1: { + message.parent = reader.string(); break; } - case 1: { - message.humanReviewConfig = reader.string(); + case 2: { + message.processorVersion = $root.google.cloud.documentai.v1.ProcessorVersion.decode(reader, reader.uint32()); break; } - case 3: { - message.enableSchemaValidation = reader.bool(); + case 10: { + message.documentSchema = $root.google.cloud.documentai.v1.DocumentSchema.decode(reader, reader.uint32()); break; } - case 5: { - message.priority = reader.int32(); + case 4: { + message.inputData = $root.google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData.decode(reader, reader.uint32()); break; } - case 6: { - message.documentSchema = $root.google.cloud.documentai.v1.DocumentSchema.decode(reader, reader.uint32()); + case 8: { + message.baseProcessorVersion = reader.string(); break; } default: @@ -23791,310 +23916,483 @@ }; /** - * Decodes a ReviewDocumentRequest message from the specified reader or buffer, length delimited. + * Decodes a TrainProcessorVersionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * @memberof google.cloud.documentai.v1.TrainProcessorVersionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.documentai.v1.ReviewDocumentRequest} ReviewDocumentRequest + * @returns {google.cloud.documentai.v1.TrainProcessorVersionRequest} TrainProcessorVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReviewDocumentRequest.decodeDelimited = function decodeDelimited(reader) { + TrainProcessorVersionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReviewDocumentRequest message. + * Verifies a TrainProcessorVersionRequest message. * @function verify - * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * @memberof google.cloud.documentai.v1.TrainProcessorVersionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReviewDocumentRequest.verify = function verify(message) { + TrainProcessorVersionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.inlineDocument != null && message.hasOwnProperty("inlineDocument")) { - properties.source = 1; - { - var error = $root.google.cloud.documentai.v1.Document.verify(message.inlineDocument); - if (error) - return "inlineDocument." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.processorVersion != null && message.hasOwnProperty("processorVersion")) { + var error = $root.google.cloud.documentai.v1.ProcessorVersion.verify(message.processorVersion); + if (error) + return "processorVersion." + error; } - if (message.humanReviewConfig != null && message.hasOwnProperty("humanReviewConfig")) - if (!$util.isString(message.humanReviewConfig)) - return "humanReviewConfig: string expected"; - if (message.enableSchemaValidation != null && message.hasOwnProperty("enableSchemaValidation")) - if (typeof message.enableSchemaValidation !== "boolean") - return "enableSchemaValidation: boolean expected"; - if (message.priority != null && message.hasOwnProperty("priority")) - switch (message.priority) { - default: - return "priority: enum value expected"; - case 0: - case 1: - break; - } if (message.documentSchema != null && message.hasOwnProperty("documentSchema")) { var error = $root.google.cloud.documentai.v1.DocumentSchema.verify(message.documentSchema); if (error) return "documentSchema." + error; } + if (message.inputData != null && message.hasOwnProperty("inputData")) { + var error = $root.google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData.verify(message.inputData); + if (error) + return "inputData." + error; + } + if (message.baseProcessorVersion != null && message.hasOwnProperty("baseProcessorVersion")) + if (!$util.isString(message.baseProcessorVersion)) + return "baseProcessorVersion: string expected"; return null; }; /** - * Creates a ReviewDocumentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TrainProcessorVersionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * @memberof google.cloud.documentai.v1.TrainProcessorVersionRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.documentai.v1.ReviewDocumentRequest} ReviewDocumentRequest + * @returns {google.cloud.documentai.v1.TrainProcessorVersionRequest} TrainProcessorVersionRequest */ - ReviewDocumentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.documentai.v1.ReviewDocumentRequest) + TrainProcessorVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.TrainProcessorVersionRequest) return object; - var message = new $root.google.cloud.documentai.v1.ReviewDocumentRequest(); - if (object.inlineDocument != null) { - if (typeof object.inlineDocument !== "object") - throw TypeError(".google.cloud.documentai.v1.ReviewDocumentRequest.inlineDocument: object expected"); - message.inlineDocument = $root.google.cloud.documentai.v1.Document.fromObject(object.inlineDocument); - } - if (object.humanReviewConfig != null) - message.humanReviewConfig = String(object.humanReviewConfig); - if (object.enableSchemaValidation != null) - message.enableSchemaValidation = Boolean(object.enableSchemaValidation); - switch (object.priority) { - default: - if (typeof object.priority === "number") { - message.priority = object.priority; - break; - } - break; - case "DEFAULT": - case 0: - message.priority = 0; - break; - case "URGENT": - case 1: - message.priority = 1; - break; + var message = new $root.google.cloud.documentai.v1.TrainProcessorVersionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.processorVersion != null) { + if (typeof object.processorVersion !== "object") + throw TypeError(".google.cloud.documentai.v1.TrainProcessorVersionRequest.processorVersion: object expected"); + message.processorVersion = $root.google.cloud.documentai.v1.ProcessorVersion.fromObject(object.processorVersion); } if (object.documentSchema != null) { if (typeof object.documentSchema !== "object") - throw TypeError(".google.cloud.documentai.v1.ReviewDocumentRequest.documentSchema: object expected"); + throw TypeError(".google.cloud.documentai.v1.TrainProcessorVersionRequest.documentSchema: object expected"); message.documentSchema = $root.google.cloud.documentai.v1.DocumentSchema.fromObject(object.documentSchema); } + if (object.inputData != null) { + if (typeof object.inputData !== "object") + throw TypeError(".google.cloud.documentai.v1.TrainProcessorVersionRequest.inputData: object expected"); + message.inputData = $root.google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData.fromObject(object.inputData); + } + if (object.baseProcessorVersion != null) + message.baseProcessorVersion = String(object.baseProcessorVersion); return message; }; /** - * Creates a plain object from a ReviewDocumentRequest message. Also converts values to other types if specified. + * Creates a plain object from a TrainProcessorVersionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * @memberof google.cloud.documentai.v1.TrainProcessorVersionRequest * @static - * @param {google.cloud.documentai.v1.ReviewDocumentRequest} message ReviewDocumentRequest + * @param {google.cloud.documentai.v1.TrainProcessorVersionRequest} message TrainProcessorVersionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReviewDocumentRequest.toObject = function toObject(message, options) { + TrainProcessorVersionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.humanReviewConfig = ""; - object.enableSchemaValidation = false; - object.priority = options.enums === String ? "DEFAULT" : 0; + object.parent = ""; + object.processorVersion = null; + object.inputData = null; + object.baseProcessorVersion = ""; object.documentSchema = null; } - if (message.humanReviewConfig != null && message.hasOwnProperty("humanReviewConfig")) - object.humanReviewConfig = message.humanReviewConfig; - if (message.enableSchemaValidation != null && message.hasOwnProperty("enableSchemaValidation")) - object.enableSchemaValidation = message.enableSchemaValidation; - if (message.inlineDocument != null && message.hasOwnProperty("inlineDocument")) { - object.inlineDocument = $root.google.cloud.documentai.v1.Document.toObject(message.inlineDocument, options); - if (options.oneofs) - object.source = "inlineDocument"; - } - if (message.priority != null && message.hasOwnProperty("priority")) - object.priority = options.enums === String ? $root.google.cloud.documentai.v1.ReviewDocumentRequest.Priority[message.priority] === undefined ? message.priority : $root.google.cloud.documentai.v1.ReviewDocumentRequest.Priority[message.priority] : message.priority; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.processorVersion != null && message.hasOwnProperty("processorVersion")) + object.processorVersion = $root.google.cloud.documentai.v1.ProcessorVersion.toObject(message.processorVersion, options); + if (message.inputData != null && message.hasOwnProperty("inputData")) + object.inputData = $root.google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData.toObject(message.inputData, options); + if (message.baseProcessorVersion != null && message.hasOwnProperty("baseProcessorVersion")) + object.baseProcessorVersion = message.baseProcessorVersion; if (message.documentSchema != null && message.hasOwnProperty("documentSchema")) object.documentSchema = $root.google.cloud.documentai.v1.DocumentSchema.toObject(message.documentSchema, options); return object; }; /** - * Converts this ReviewDocumentRequest to JSON. + * Converts this TrainProcessorVersionRequest to JSON. * @function toJSON - * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * @memberof google.cloud.documentai.v1.TrainProcessorVersionRequest * @instance * @returns {Object.} JSON object */ - ReviewDocumentRequest.prototype.toJSON = function toJSON() { + TrainProcessorVersionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ReviewDocumentRequest + * Gets the default type url for TrainProcessorVersionRequest * @function getTypeUrl - * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * @memberof google.cloud.documentai.v1.TrainProcessorVersionRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ReviewDocumentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TrainProcessorVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.documentai.v1.ReviewDocumentRequest"; + return typeUrlPrefix + "/google.cloud.documentai.v1.TrainProcessorVersionRequest"; }; - /** - * Priority enum. - * @name google.cloud.documentai.v1.ReviewDocumentRequest.Priority - * @enum {number} - * @property {number} DEFAULT=0 DEFAULT value - * @property {number} URGENT=1 URGENT value - */ - ReviewDocumentRequest.Priority = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DEFAULT"] = 0; - values[valuesById[1] = "URGENT"] = 1; - return values; - })(); - - return ReviewDocumentRequest; - })(); + TrainProcessorVersionRequest.InputData = (function() { - v1.ReviewDocumentResponse = (function() { + /** + * Properties of an InputData. + * @memberof google.cloud.documentai.v1.TrainProcessorVersionRequest + * @interface IInputData + * @property {google.cloud.documentai.v1.IBatchDocumentsInputConfig|null} [trainingDocuments] InputData trainingDocuments + * @property {google.cloud.documentai.v1.IBatchDocumentsInputConfig|null} [testDocuments] InputData testDocuments + */ - /** - * Properties of a ReviewDocumentResponse. - * @memberof google.cloud.documentai.v1 - * @interface IReviewDocumentResponse - * @property {string|null} [gcsDestination] ReviewDocumentResponse gcsDestination - * @property {google.cloud.documentai.v1.ReviewDocumentResponse.State|null} [state] ReviewDocumentResponse state - * @property {string|null} [rejectionReason] ReviewDocumentResponse rejectionReason - */ + /** + * Constructs a new InputData. + * @memberof google.cloud.documentai.v1.TrainProcessorVersionRequest + * @classdesc Represents an InputData. + * @implements IInputData + * @constructor + * @param {google.cloud.documentai.v1.TrainProcessorVersionRequest.IInputData=} [properties] Properties to set + */ + function InputData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new ReviewDocumentResponse. - * @memberof google.cloud.documentai.v1 - * @classdesc Represents a ReviewDocumentResponse. - * @implements IReviewDocumentResponse - * @constructor - * @param {google.cloud.documentai.v1.IReviewDocumentResponse=} [properties] Properties to set - */ - function ReviewDocumentResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * InputData trainingDocuments. + * @member {google.cloud.documentai.v1.IBatchDocumentsInputConfig|null|undefined} trainingDocuments + * @memberof google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData + * @instance + */ + InputData.prototype.trainingDocuments = null; - /** - * ReviewDocumentResponse gcsDestination. - * @member {string} gcsDestination - * @memberof google.cloud.documentai.v1.ReviewDocumentResponse - * @instance - */ - ReviewDocumentResponse.prototype.gcsDestination = ""; + /** + * InputData testDocuments. + * @member {google.cloud.documentai.v1.IBatchDocumentsInputConfig|null|undefined} testDocuments + * @memberof google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData + * @instance + */ + InputData.prototype.testDocuments = null; - /** - * ReviewDocumentResponse state. - * @member {google.cloud.documentai.v1.ReviewDocumentResponse.State} state - * @memberof google.cloud.documentai.v1.ReviewDocumentResponse - * @instance - */ - ReviewDocumentResponse.prototype.state = 0; + /** + * Creates a new InputData instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData + * @static + * @param {google.cloud.documentai.v1.TrainProcessorVersionRequest.IInputData=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData} InputData instance + */ + InputData.create = function create(properties) { + return new InputData(properties); + }; - /** - * ReviewDocumentResponse rejectionReason. - * @member {string} rejectionReason - * @memberof google.cloud.documentai.v1.ReviewDocumentResponse - * @instance - */ - ReviewDocumentResponse.prototype.rejectionReason = ""; + /** + * Encodes the specified InputData message. Does not implicitly {@link google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData + * @static + * @param {google.cloud.documentai.v1.TrainProcessorVersionRequest.IInputData} message InputData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InputData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.trainingDocuments != null && Object.hasOwnProperty.call(message, "trainingDocuments")) + $root.google.cloud.documentai.v1.BatchDocumentsInputConfig.encode(message.trainingDocuments, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.testDocuments != null && Object.hasOwnProperty.call(message, "testDocuments")) + $root.google.cloud.documentai.v1.BatchDocumentsInputConfig.encode(message.testDocuments, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - /** - * Creates a new ReviewDocumentResponse instance using the specified properties. - * @function create - * @memberof google.cloud.documentai.v1.ReviewDocumentResponse - * @static - * @param {google.cloud.documentai.v1.IReviewDocumentResponse=} [properties] Properties to set - * @returns {google.cloud.documentai.v1.ReviewDocumentResponse} ReviewDocumentResponse instance - */ - ReviewDocumentResponse.create = function create(properties) { - return new ReviewDocumentResponse(properties); - }; + /** + * Encodes the specified InputData message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData + * @static + * @param {google.cloud.documentai.v1.TrainProcessorVersionRequest.IInputData} message InputData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InputData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified ReviewDocumentResponse message. Does not implicitly {@link google.cloud.documentai.v1.ReviewDocumentResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.documentai.v1.ReviewDocumentResponse - * @static - * @param {google.cloud.documentai.v1.IReviewDocumentResponse} message ReviewDocumentResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReviewDocumentResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gcsDestination != null && Object.hasOwnProperty.call(message, "gcsDestination")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsDestination); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); - if (message.rejectionReason != null && Object.hasOwnProperty.call(message, "rejectionReason")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.rejectionReason); + /** + * Decodes an InputData message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData} InputData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InputData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.trainingDocuments = $root.google.cloud.documentai.v1.BatchDocumentsInputConfig.decode(reader, reader.uint32()); + break; + } + case 4: { + message.testDocuments = $root.google.cloud.documentai.v1.BatchDocumentsInputConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InputData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData} InputData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InputData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InputData message. + * @function verify + * @memberof google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InputData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.trainingDocuments != null && message.hasOwnProperty("trainingDocuments")) { + var error = $root.google.cloud.documentai.v1.BatchDocumentsInputConfig.verify(message.trainingDocuments); + if (error) + return "trainingDocuments." + error; + } + if (message.testDocuments != null && message.hasOwnProperty("testDocuments")) { + var error = $root.google.cloud.documentai.v1.BatchDocumentsInputConfig.verify(message.testDocuments); + if (error) + return "testDocuments." + error; + } + return null; + }; + + /** + * Creates an InputData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData} InputData + */ + InputData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData) + return object; + var message = new $root.google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData(); + if (object.trainingDocuments != null) { + if (typeof object.trainingDocuments !== "object") + throw TypeError(".google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData.trainingDocuments: object expected"); + message.trainingDocuments = $root.google.cloud.documentai.v1.BatchDocumentsInputConfig.fromObject(object.trainingDocuments); + } + if (object.testDocuments != null) { + if (typeof object.testDocuments !== "object") + throw TypeError(".google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData.testDocuments: object expected"); + message.testDocuments = $root.google.cloud.documentai.v1.BatchDocumentsInputConfig.fromObject(object.testDocuments); + } + return message; + }; + + /** + * Creates a plain object from an InputData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData + * @static + * @param {google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData} message InputData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InputData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.trainingDocuments = null; + object.testDocuments = null; + } + if (message.trainingDocuments != null && message.hasOwnProperty("trainingDocuments")) + object.trainingDocuments = $root.google.cloud.documentai.v1.BatchDocumentsInputConfig.toObject(message.trainingDocuments, options); + if (message.testDocuments != null && message.hasOwnProperty("testDocuments")) + object.testDocuments = $root.google.cloud.documentai.v1.BatchDocumentsInputConfig.toObject(message.testDocuments, options); + return object; + }; + + /** + * Converts this InputData to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData + * @instance + * @returns {Object.} JSON object + */ + InputData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InputData + * @function getTypeUrl + * @memberof google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InputData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData"; + }; + + return InputData; + })(); + + return TrainProcessorVersionRequest; + })(); + + v1.TrainProcessorVersionResponse = (function() { + + /** + * Properties of a TrainProcessorVersionResponse. + * @memberof google.cloud.documentai.v1 + * @interface ITrainProcessorVersionResponse + * @property {string|null} [processorVersion] TrainProcessorVersionResponse processorVersion + */ + + /** + * Constructs a new TrainProcessorVersionResponse. + * @memberof google.cloud.documentai.v1 + * @classdesc Represents a TrainProcessorVersionResponse. + * @implements ITrainProcessorVersionResponse + * @constructor + * @param {google.cloud.documentai.v1.ITrainProcessorVersionResponse=} [properties] Properties to set + */ + function TrainProcessorVersionResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TrainProcessorVersionResponse processorVersion. + * @member {string} processorVersion + * @memberof google.cloud.documentai.v1.TrainProcessorVersionResponse + * @instance + */ + TrainProcessorVersionResponse.prototype.processorVersion = ""; + + /** + * Creates a new TrainProcessorVersionResponse instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1.TrainProcessorVersionResponse + * @static + * @param {google.cloud.documentai.v1.ITrainProcessorVersionResponse=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.TrainProcessorVersionResponse} TrainProcessorVersionResponse instance + */ + TrainProcessorVersionResponse.create = function create(properties) { + return new TrainProcessorVersionResponse(properties); + }; + + /** + * Encodes the specified TrainProcessorVersionResponse message. Does not implicitly {@link google.cloud.documentai.v1.TrainProcessorVersionResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1.TrainProcessorVersionResponse + * @static + * @param {google.cloud.documentai.v1.ITrainProcessorVersionResponse} message TrainProcessorVersionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TrainProcessorVersionResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.processorVersion != null && Object.hasOwnProperty.call(message, "processorVersion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.processorVersion); return writer; }; /** - * Encodes the specified ReviewDocumentResponse message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.ReviewDocumentResponse.verify|verify} messages. + * Encodes the specified TrainProcessorVersionResponse message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.TrainProcessorVersionResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.documentai.v1.ReviewDocumentResponse + * @memberof google.cloud.documentai.v1.TrainProcessorVersionResponse * @static - * @param {google.cloud.documentai.v1.IReviewDocumentResponse} message ReviewDocumentResponse message or plain object to encode + * @param {google.cloud.documentai.v1.ITrainProcessorVersionResponse} message TrainProcessorVersionResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReviewDocumentResponse.encodeDelimited = function encodeDelimited(message, writer) { + TrainProcessorVersionResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReviewDocumentResponse message from the specified reader or buffer. + * Decodes a TrainProcessorVersionResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.documentai.v1.ReviewDocumentResponse + * @memberof google.cloud.documentai.v1.TrainProcessorVersionResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.documentai.v1.ReviewDocumentResponse} ReviewDocumentResponse + * @returns {google.cloud.documentai.v1.TrainProcessorVersionResponse} TrainProcessorVersionResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReviewDocumentResponse.decode = function decode(reader, length) { + TrainProcessorVersionResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.ReviewDocumentResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.TrainProcessorVersionResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.gcsDestination = reader.string(); - break; - } - case 2: { - message.state = reader.int32(); - break; - } - case 3: { - message.rejectionReason = reader.string(); + message.processorVersion = reader.string(); break; } default: @@ -24106,180 +24404,124 @@ }; /** - * Decodes a ReviewDocumentResponse message from the specified reader or buffer, length delimited. + * Decodes a TrainProcessorVersionResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.documentai.v1.ReviewDocumentResponse + * @memberof google.cloud.documentai.v1.TrainProcessorVersionResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.documentai.v1.ReviewDocumentResponse} ReviewDocumentResponse + * @returns {google.cloud.documentai.v1.TrainProcessorVersionResponse} TrainProcessorVersionResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReviewDocumentResponse.decodeDelimited = function decodeDelimited(reader) { + TrainProcessorVersionResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReviewDocumentResponse message. + * Verifies a TrainProcessorVersionResponse message. * @function verify - * @memberof google.cloud.documentai.v1.ReviewDocumentResponse + * @memberof google.cloud.documentai.v1.TrainProcessorVersionResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReviewDocumentResponse.verify = function verify(message) { + TrainProcessorVersionResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) - if (!$util.isString(message.gcsDestination)) - return "gcsDestination: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.rejectionReason != null && message.hasOwnProperty("rejectionReason")) - if (!$util.isString(message.rejectionReason)) - return "rejectionReason: string expected"; + if (message.processorVersion != null && message.hasOwnProperty("processorVersion")) + if (!$util.isString(message.processorVersion)) + return "processorVersion: string expected"; return null; }; /** - * Creates a ReviewDocumentResponse message from a plain object. Also converts values to their respective internal types. + * Creates a TrainProcessorVersionResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.documentai.v1.ReviewDocumentResponse + * @memberof google.cloud.documentai.v1.TrainProcessorVersionResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.documentai.v1.ReviewDocumentResponse} ReviewDocumentResponse + * @returns {google.cloud.documentai.v1.TrainProcessorVersionResponse} TrainProcessorVersionResponse */ - ReviewDocumentResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.documentai.v1.ReviewDocumentResponse) + TrainProcessorVersionResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.TrainProcessorVersionResponse) return object; - var message = new $root.google.cloud.documentai.v1.ReviewDocumentResponse(); - if (object.gcsDestination != null) - message.gcsDestination = String(object.gcsDestination); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "REJECTED": - case 1: - message.state = 1; - break; - case "SUCCEEDED": - case 2: - message.state = 2; - break; - } - if (object.rejectionReason != null) - message.rejectionReason = String(object.rejectionReason); + var message = new $root.google.cloud.documentai.v1.TrainProcessorVersionResponse(); + if (object.processorVersion != null) + message.processorVersion = String(object.processorVersion); return message; }; /** - * Creates a plain object from a ReviewDocumentResponse message. Also converts values to other types if specified. + * Creates a plain object from a TrainProcessorVersionResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.documentai.v1.ReviewDocumentResponse + * @memberof google.cloud.documentai.v1.TrainProcessorVersionResponse * @static - * @param {google.cloud.documentai.v1.ReviewDocumentResponse} message ReviewDocumentResponse + * @param {google.cloud.documentai.v1.TrainProcessorVersionResponse} message TrainProcessorVersionResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReviewDocumentResponse.toObject = function toObject(message, options) { + TrainProcessorVersionResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.gcsDestination = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.rejectionReason = ""; - } - if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) - object.gcsDestination = message.gcsDestination; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.documentai.v1.ReviewDocumentResponse.State[message.state] === undefined ? message.state : $root.google.cloud.documentai.v1.ReviewDocumentResponse.State[message.state] : message.state; - if (message.rejectionReason != null && message.hasOwnProperty("rejectionReason")) - object.rejectionReason = message.rejectionReason; + if (options.defaults) + object.processorVersion = ""; + if (message.processorVersion != null && message.hasOwnProperty("processorVersion")) + object.processorVersion = message.processorVersion; return object; }; /** - * Converts this ReviewDocumentResponse to JSON. + * Converts this TrainProcessorVersionResponse to JSON. * @function toJSON - * @memberof google.cloud.documentai.v1.ReviewDocumentResponse + * @memberof google.cloud.documentai.v1.TrainProcessorVersionResponse * @instance * @returns {Object.} JSON object */ - ReviewDocumentResponse.prototype.toJSON = function toJSON() { + TrainProcessorVersionResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ReviewDocumentResponse + * Gets the default type url for TrainProcessorVersionResponse * @function getTypeUrl - * @memberof google.cloud.documentai.v1.ReviewDocumentResponse + * @memberof google.cloud.documentai.v1.TrainProcessorVersionResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ReviewDocumentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TrainProcessorVersionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.documentai.v1.ReviewDocumentResponse"; + return typeUrlPrefix + "/google.cloud.documentai.v1.TrainProcessorVersionResponse"; }; - /** - * State enum. - * @name google.cloud.documentai.v1.ReviewDocumentResponse.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} REJECTED=1 REJECTED value - * @property {number} SUCCEEDED=2 SUCCEEDED value - */ - ReviewDocumentResponse.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "REJECTED"] = 1; - values[valuesById[2] = "SUCCEEDED"] = 2; - return values; - })(); - - return ReviewDocumentResponse; + return TrainProcessorVersionResponse; })(); - v1.ReviewDocumentOperationMetadata = (function() { + v1.TrainProcessorVersionMetadata = (function() { /** - * Properties of a ReviewDocumentOperationMetadata. + * Properties of a TrainProcessorVersionMetadata. * @memberof google.cloud.documentai.v1 - * @interface IReviewDocumentOperationMetadata - * @property {google.cloud.documentai.v1.ICommonOperationMetadata|null} [commonMetadata] ReviewDocumentOperationMetadata commonMetadata - * @property {string|null} [questionId] ReviewDocumentOperationMetadata questionId + * @interface ITrainProcessorVersionMetadata + * @property {google.cloud.documentai.v1.ICommonOperationMetadata|null} [commonMetadata] TrainProcessorVersionMetadata commonMetadata + * @property {google.cloud.documentai.v1.TrainProcessorVersionMetadata.IDatasetValidation|null} [trainingDatasetValidation] TrainProcessorVersionMetadata trainingDatasetValidation + * @property {google.cloud.documentai.v1.TrainProcessorVersionMetadata.IDatasetValidation|null} [testDatasetValidation] TrainProcessorVersionMetadata testDatasetValidation */ /** - * Constructs a new ReviewDocumentOperationMetadata. + * Constructs a new TrainProcessorVersionMetadata. * @memberof google.cloud.documentai.v1 - * @classdesc Represents a ReviewDocumentOperationMetadata. - * @implements IReviewDocumentOperationMetadata + * @classdesc Represents a TrainProcessorVersionMetadata. + * @implements ITrainProcessorVersionMetadata * @constructor - * @param {google.cloud.documentai.v1.IReviewDocumentOperationMetadata=} [properties] Properties to set + * @param {google.cloud.documentai.v1.ITrainProcessorVersionMetadata=} [properties] Properties to set */ - function ReviewDocumentOperationMetadata(properties) { + function TrainProcessorVersionMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24287,89 +24529,103 @@ } /** - * ReviewDocumentOperationMetadata commonMetadata. + * TrainProcessorVersionMetadata commonMetadata. * @member {google.cloud.documentai.v1.ICommonOperationMetadata|null|undefined} commonMetadata - * @memberof google.cloud.documentai.v1.ReviewDocumentOperationMetadata + * @memberof google.cloud.documentai.v1.TrainProcessorVersionMetadata * @instance */ - ReviewDocumentOperationMetadata.prototype.commonMetadata = null; + TrainProcessorVersionMetadata.prototype.commonMetadata = null; /** - * ReviewDocumentOperationMetadata questionId. - * @member {string} questionId - * @memberof google.cloud.documentai.v1.ReviewDocumentOperationMetadata + * TrainProcessorVersionMetadata trainingDatasetValidation. + * @member {google.cloud.documentai.v1.TrainProcessorVersionMetadata.IDatasetValidation|null|undefined} trainingDatasetValidation + * @memberof google.cloud.documentai.v1.TrainProcessorVersionMetadata * @instance */ - ReviewDocumentOperationMetadata.prototype.questionId = ""; + TrainProcessorVersionMetadata.prototype.trainingDatasetValidation = null; /** - * Creates a new ReviewDocumentOperationMetadata instance using the specified properties. + * TrainProcessorVersionMetadata testDatasetValidation. + * @member {google.cloud.documentai.v1.TrainProcessorVersionMetadata.IDatasetValidation|null|undefined} testDatasetValidation + * @memberof google.cloud.documentai.v1.TrainProcessorVersionMetadata + * @instance + */ + TrainProcessorVersionMetadata.prototype.testDatasetValidation = null; + + /** + * Creates a new TrainProcessorVersionMetadata instance using the specified properties. * @function create - * @memberof google.cloud.documentai.v1.ReviewDocumentOperationMetadata + * @memberof google.cloud.documentai.v1.TrainProcessorVersionMetadata * @static - * @param {google.cloud.documentai.v1.IReviewDocumentOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.documentai.v1.ReviewDocumentOperationMetadata} ReviewDocumentOperationMetadata instance + * @param {google.cloud.documentai.v1.ITrainProcessorVersionMetadata=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.TrainProcessorVersionMetadata} TrainProcessorVersionMetadata instance */ - ReviewDocumentOperationMetadata.create = function create(properties) { - return new ReviewDocumentOperationMetadata(properties); + TrainProcessorVersionMetadata.create = function create(properties) { + return new TrainProcessorVersionMetadata(properties); }; /** - * Encodes the specified ReviewDocumentOperationMetadata message. Does not implicitly {@link google.cloud.documentai.v1.ReviewDocumentOperationMetadata.verify|verify} messages. + * Encodes the specified TrainProcessorVersionMetadata message. Does not implicitly {@link google.cloud.documentai.v1.TrainProcessorVersionMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.documentai.v1.ReviewDocumentOperationMetadata + * @memberof google.cloud.documentai.v1.TrainProcessorVersionMetadata * @static - * @param {google.cloud.documentai.v1.IReviewDocumentOperationMetadata} message ReviewDocumentOperationMetadata message or plain object to encode + * @param {google.cloud.documentai.v1.ITrainProcessorVersionMetadata} message TrainProcessorVersionMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReviewDocumentOperationMetadata.encode = function encode(message, writer) { + TrainProcessorVersionMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.commonMetadata != null && Object.hasOwnProperty.call(message, "commonMetadata")) - $root.google.cloud.documentai.v1.CommonOperationMetadata.encode(message.commonMetadata, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.questionId != null && Object.hasOwnProperty.call(message, "questionId")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.questionId); + $root.google.cloud.documentai.v1.CommonOperationMetadata.encode(message.commonMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.trainingDatasetValidation != null && Object.hasOwnProperty.call(message, "trainingDatasetValidation")) + $root.google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation.encode(message.trainingDatasetValidation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.testDatasetValidation != null && Object.hasOwnProperty.call(message, "testDatasetValidation")) + $root.google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation.encode(message.testDatasetValidation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ReviewDocumentOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.ReviewDocumentOperationMetadata.verify|verify} messages. + * Encodes the specified TrainProcessorVersionMetadata message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.TrainProcessorVersionMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.documentai.v1.ReviewDocumentOperationMetadata + * @memberof google.cloud.documentai.v1.TrainProcessorVersionMetadata * @static - * @param {google.cloud.documentai.v1.IReviewDocumentOperationMetadata} message ReviewDocumentOperationMetadata message or plain object to encode + * @param {google.cloud.documentai.v1.ITrainProcessorVersionMetadata} message TrainProcessorVersionMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReviewDocumentOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + TrainProcessorVersionMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReviewDocumentOperationMetadata message from the specified reader or buffer. + * Decodes a TrainProcessorVersionMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.documentai.v1.ReviewDocumentOperationMetadata + * @memberof google.cloud.documentai.v1.TrainProcessorVersionMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.documentai.v1.ReviewDocumentOperationMetadata} ReviewDocumentOperationMetadata + * @returns {google.cloud.documentai.v1.TrainProcessorVersionMetadata} TrainProcessorVersionMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReviewDocumentOperationMetadata.decode = function decode(reader, length) { + TrainProcessorVersionMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.ReviewDocumentOperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.TrainProcessorVersionMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: { + case 1: { message.commonMetadata = $root.google.cloud.documentai.v1.CommonOperationMetadata.decode(reader, reader.uint32()); break; } - case 6: { - message.questionId = reader.string(); + case 2: { + message.trainingDatasetValidation = $root.google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation.decode(reader, reader.uint32()); + break; + } + case 3: { + message.testDatasetValidation = $root.google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation.decode(reader, reader.uint32()); break; } default: @@ -24381,30 +24637,30 @@ }; /** - * Decodes a ReviewDocumentOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a TrainProcessorVersionMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.documentai.v1.ReviewDocumentOperationMetadata + * @memberof google.cloud.documentai.v1.TrainProcessorVersionMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.documentai.v1.ReviewDocumentOperationMetadata} ReviewDocumentOperationMetadata + * @returns {google.cloud.documentai.v1.TrainProcessorVersionMetadata} TrainProcessorVersionMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReviewDocumentOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + TrainProcessorVersionMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReviewDocumentOperationMetadata message. + * Verifies a TrainProcessorVersionMetadata message. * @function verify - * @memberof google.cloud.documentai.v1.ReviewDocumentOperationMetadata + * @memberof google.cloud.documentai.v1.TrainProcessorVersionMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReviewDocumentOperationMetadata.verify = function verify(message) { + TrainProcessorVersionMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.commonMetadata != null && message.hasOwnProperty("commonMetadata")) { @@ -24412,1288 +24668,5748 @@ if (error) return "commonMetadata." + error; } - if (message.questionId != null && message.hasOwnProperty("questionId")) - if (!$util.isString(message.questionId)) - return "questionId: string expected"; + if (message.trainingDatasetValidation != null && message.hasOwnProperty("trainingDatasetValidation")) { + var error = $root.google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation.verify(message.trainingDatasetValidation); + if (error) + return "trainingDatasetValidation." + error; + } + if (message.testDatasetValidation != null && message.hasOwnProperty("testDatasetValidation")) { + var error = $root.google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation.verify(message.testDatasetValidation); + if (error) + return "testDatasetValidation." + error; + } return null; }; /** - * Creates a ReviewDocumentOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a TrainProcessorVersionMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.documentai.v1.ReviewDocumentOperationMetadata + * @memberof google.cloud.documentai.v1.TrainProcessorVersionMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.documentai.v1.ReviewDocumentOperationMetadata} ReviewDocumentOperationMetadata + * @returns {google.cloud.documentai.v1.TrainProcessorVersionMetadata} TrainProcessorVersionMetadata */ - ReviewDocumentOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.documentai.v1.ReviewDocumentOperationMetadata) + TrainProcessorVersionMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.TrainProcessorVersionMetadata) return object; - var message = new $root.google.cloud.documentai.v1.ReviewDocumentOperationMetadata(); + var message = new $root.google.cloud.documentai.v1.TrainProcessorVersionMetadata(); if (object.commonMetadata != null) { if (typeof object.commonMetadata !== "object") - throw TypeError(".google.cloud.documentai.v1.ReviewDocumentOperationMetadata.commonMetadata: object expected"); + throw TypeError(".google.cloud.documentai.v1.TrainProcessorVersionMetadata.commonMetadata: object expected"); message.commonMetadata = $root.google.cloud.documentai.v1.CommonOperationMetadata.fromObject(object.commonMetadata); } - if (object.questionId != null) - message.questionId = String(object.questionId); + if (object.trainingDatasetValidation != null) { + if (typeof object.trainingDatasetValidation !== "object") + throw TypeError(".google.cloud.documentai.v1.TrainProcessorVersionMetadata.trainingDatasetValidation: object expected"); + message.trainingDatasetValidation = $root.google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation.fromObject(object.trainingDatasetValidation); + } + if (object.testDatasetValidation != null) { + if (typeof object.testDatasetValidation !== "object") + throw TypeError(".google.cloud.documentai.v1.TrainProcessorVersionMetadata.testDatasetValidation: object expected"); + message.testDatasetValidation = $root.google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation.fromObject(object.testDatasetValidation); + } return message; }; /** - * Creates a plain object from a ReviewDocumentOperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a TrainProcessorVersionMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.documentai.v1.ReviewDocumentOperationMetadata + * @memberof google.cloud.documentai.v1.TrainProcessorVersionMetadata * @static - * @param {google.cloud.documentai.v1.ReviewDocumentOperationMetadata} message ReviewDocumentOperationMetadata + * @param {google.cloud.documentai.v1.TrainProcessorVersionMetadata} message TrainProcessorVersionMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReviewDocumentOperationMetadata.toObject = function toObject(message, options) { + TrainProcessorVersionMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.commonMetadata = null; - object.questionId = ""; + object.trainingDatasetValidation = null; + object.testDatasetValidation = null; } if (message.commonMetadata != null && message.hasOwnProperty("commonMetadata")) object.commonMetadata = $root.google.cloud.documentai.v1.CommonOperationMetadata.toObject(message.commonMetadata, options); - if (message.questionId != null && message.hasOwnProperty("questionId")) - object.questionId = message.questionId; + if (message.trainingDatasetValidation != null && message.hasOwnProperty("trainingDatasetValidation")) + object.trainingDatasetValidation = $root.google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation.toObject(message.trainingDatasetValidation, options); + if (message.testDatasetValidation != null && message.hasOwnProperty("testDatasetValidation")) + object.testDatasetValidation = $root.google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation.toObject(message.testDatasetValidation, options); return object; }; /** - * Converts this ReviewDocumentOperationMetadata to JSON. + * Converts this TrainProcessorVersionMetadata to JSON. * @function toJSON - * @memberof google.cloud.documentai.v1.ReviewDocumentOperationMetadata + * @memberof google.cloud.documentai.v1.TrainProcessorVersionMetadata * @instance * @returns {Object.} JSON object */ - ReviewDocumentOperationMetadata.prototype.toJSON = function toJSON() { + TrainProcessorVersionMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ReviewDocumentOperationMetadata + * Gets the default type url for TrainProcessorVersionMetadata * @function getTypeUrl - * @memberof google.cloud.documentai.v1.ReviewDocumentOperationMetadata + * @memberof google.cloud.documentai.v1.TrainProcessorVersionMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ReviewDocumentOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TrainProcessorVersionMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.documentai.v1.ReviewDocumentOperationMetadata"; + return typeUrlPrefix + "/google.cloud.documentai.v1.TrainProcessorVersionMetadata"; }; - return ReviewDocumentOperationMetadata; - })(); + TrainProcessorVersionMetadata.DatasetValidation = (function() { - v1.DocumentSchema = (function() { + /** + * Properties of a DatasetValidation. + * @memberof google.cloud.documentai.v1.TrainProcessorVersionMetadata + * @interface IDatasetValidation + * @property {number|null} [documentErrorCount] DatasetValidation documentErrorCount + * @property {number|null} [datasetErrorCount] DatasetValidation datasetErrorCount + * @property {Array.|null} [documentErrors] DatasetValidation documentErrors + * @property {Array.|null} [datasetErrors] DatasetValidation datasetErrors + */ - /** - * Properties of a DocumentSchema. - * @memberof google.cloud.documentai.v1 - * @interface IDocumentSchema - * @property {string|null} [displayName] DocumentSchema displayName - * @property {string|null} [description] DocumentSchema description - * @property {Array.|null} [entityTypes] DocumentSchema entityTypes - * @property {google.cloud.documentai.v1.DocumentSchema.IMetadata|null} [metadata] DocumentSchema metadata - */ + /** + * Constructs a new DatasetValidation. + * @memberof google.cloud.documentai.v1.TrainProcessorVersionMetadata + * @classdesc Represents a DatasetValidation. + * @implements IDatasetValidation + * @constructor + * @param {google.cloud.documentai.v1.TrainProcessorVersionMetadata.IDatasetValidation=} [properties] Properties to set + */ + function DatasetValidation(properties) { + this.documentErrors = []; + this.datasetErrors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new DocumentSchema. - * @memberof google.cloud.documentai.v1 - * @classdesc Represents a DocumentSchema. - * @implements IDocumentSchema - * @constructor - * @param {google.cloud.documentai.v1.IDocumentSchema=} [properties] Properties to set - */ - function DocumentSchema(properties) { - this.entityTypes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * DatasetValidation documentErrorCount. + * @member {number} documentErrorCount + * @memberof google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation + * @instance + */ + DatasetValidation.prototype.documentErrorCount = 0; - /** - * DocumentSchema displayName. - * @member {string} displayName - * @memberof google.cloud.documentai.v1.DocumentSchema - * @instance - */ - DocumentSchema.prototype.displayName = ""; - - /** - * DocumentSchema description. - * @member {string} description - * @memberof google.cloud.documentai.v1.DocumentSchema - * @instance - */ - DocumentSchema.prototype.description = ""; + /** + * DatasetValidation datasetErrorCount. + * @member {number} datasetErrorCount + * @memberof google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation + * @instance + */ + DatasetValidation.prototype.datasetErrorCount = 0; - /** - * DocumentSchema entityTypes. - * @member {Array.} entityTypes - * @memberof google.cloud.documentai.v1.DocumentSchema - * @instance - */ - DocumentSchema.prototype.entityTypes = $util.emptyArray; + /** + * DatasetValidation documentErrors. + * @member {Array.} documentErrors + * @memberof google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation + * @instance + */ + DatasetValidation.prototype.documentErrors = $util.emptyArray; - /** - * DocumentSchema metadata. - * @member {google.cloud.documentai.v1.DocumentSchema.IMetadata|null|undefined} metadata - * @memberof google.cloud.documentai.v1.DocumentSchema - * @instance - */ - DocumentSchema.prototype.metadata = null; + /** + * DatasetValidation datasetErrors. + * @member {Array.} datasetErrors + * @memberof google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation + * @instance + */ + DatasetValidation.prototype.datasetErrors = $util.emptyArray; - /** - * Creates a new DocumentSchema instance using the specified properties. - * @function create - * @memberof google.cloud.documentai.v1.DocumentSchema - * @static - * @param {google.cloud.documentai.v1.IDocumentSchema=} [properties] Properties to set - * @returns {google.cloud.documentai.v1.DocumentSchema} DocumentSchema instance - */ - DocumentSchema.create = function create(properties) { - return new DocumentSchema(properties); - }; + /** + * Creates a new DatasetValidation instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation + * @static + * @param {google.cloud.documentai.v1.TrainProcessorVersionMetadata.IDatasetValidation=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation} DatasetValidation instance + */ + DatasetValidation.create = function create(properties) { + return new DatasetValidation(properties); + }; - /** - * Encodes the specified DocumentSchema message. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.verify|verify} messages. - * @function encode - * @memberof google.cloud.documentai.v1.DocumentSchema - * @static - * @param {google.cloud.documentai.v1.IDocumentSchema} message DocumentSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DocumentSchema.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.entityTypes != null && message.entityTypes.length) - for (var i = 0; i < message.entityTypes.length; ++i) - $root.google.cloud.documentai.v1.DocumentSchema.EntityType.encode(message.entityTypes[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.cloud.documentai.v1.DocumentSchema.Metadata.encode(message.metadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified DatasetValidation message. Does not implicitly {@link google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation + * @static + * @param {google.cloud.documentai.v1.TrainProcessorVersionMetadata.IDatasetValidation} message DatasetValidation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatasetValidation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.documentErrors != null && message.documentErrors.length) + for (var i = 0; i < message.documentErrors.length; ++i) + $root.google.rpc.Status.encode(message.documentErrors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.datasetErrors != null && message.datasetErrors.length) + for (var i = 0; i < message.datasetErrors.length; ++i) + $root.google.rpc.Status.encode(message.datasetErrors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.documentErrorCount != null && Object.hasOwnProperty.call(message, "documentErrorCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.documentErrorCount); + if (message.datasetErrorCount != null && Object.hasOwnProperty.call(message, "datasetErrorCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.datasetErrorCount); + return writer; + }; - /** - * Encodes the specified DocumentSchema message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.documentai.v1.DocumentSchema - * @static - * @param {google.cloud.documentai.v1.IDocumentSchema} message DocumentSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DocumentSchema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified DatasetValidation message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation + * @static + * @param {google.cloud.documentai.v1.TrainProcessorVersionMetadata.IDatasetValidation} message DatasetValidation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatasetValidation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a DocumentSchema message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.documentai.v1.DocumentSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.documentai.v1.DocumentSchema} DocumentSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DocumentSchema.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.DocumentSchema(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.description = reader.string(); + /** + * Decodes a DatasetValidation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation} DatasetValidation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatasetValidation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.documentErrorCount = reader.int32(); + break; + } + case 4: { + message.datasetErrorCount = reader.int32(); + break; + } + case 1: { + if (!(message.documentErrors && message.documentErrors.length)) + message.documentErrors = []; + message.documentErrors.push($root.google.rpc.Status.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.datasetErrors && message.datasetErrors.length)) + message.datasetErrors = []; + message.datasetErrors.push($root.google.rpc.Status.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; } - case 3: { - if (!(message.entityTypes && message.entityTypes.length)) - message.entityTypes = []; - message.entityTypes.push($root.google.cloud.documentai.v1.DocumentSchema.EntityType.decode(reader, reader.uint32())); - break; + } + return message; + }; + + /** + * Decodes a DatasetValidation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation} DatasetValidation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatasetValidation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatasetValidation message. + * @function verify + * @memberof google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatasetValidation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.documentErrorCount != null && message.hasOwnProperty("documentErrorCount")) + if (!$util.isInteger(message.documentErrorCount)) + return "documentErrorCount: integer expected"; + if (message.datasetErrorCount != null && message.hasOwnProperty("datasetErrorCount")) + if (!$util.isInteger(message.datasetErrorCount)) + return "datasetErrorCount: integer expected"; + if (message.documentErrors != null && message.hasOwnProperty("documentErrors")) { + if (!Array.isArray(message.documentErrors)) + return "documentErrors: array expected"; + for (var i = 0; i < message.documentErrors.length; ++i) { + var error = $root.google.rpc.Status.verify(message.documentErrors[i]); + if (error) + return "documentErrors." + error; } - case 4: { - message.metadata = $root.google.cloud.documentai.v1.DocumentSchema.Metadata.decode(reader, reader.uint32()); - break; + } + if (message.datasetErrors != null && message.hasOwnProperty("datasetErrors")) { + if (!Array.isArray(message.datasetErrors)) + return "datasetErrors: array expected"; + for (var i = 0; i < message.datasetErrors.length; ++i) { + var error = $root.google.rpc.Status.verify(message.datasetErrors[i]); + if (error) + return "datasetErrors." + error; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return null; + }; + + /** + * Creates a DatasetValidation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation} DatasetValidation + */ + DatasetValidation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation) + return object; + var message = new $root.google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation(); + if (object.documentErrorCount != null) + message.documentErrorCount = object.documentErrorCount | 0; + if (object.datasetErrorCount != null) + message.datasetErrorCount = object.datasetErrorCount | 0; + if (object.documentErrors) { + if (!Array.isArray(object.documentErrors)) + throw TypeError(".google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation.documentErrors: array expected"); + message.documentErrors = []; + for (var i = 0; i < object.documentErrors.length; ++i) { + if (typeof object.documentErrors[i] !== "object") + throw TypeError(".google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation.documentErrors: object expected"); + message.documentErrors[i] = $root.google.rpc.Status.fromObject(object.documentErrors[i]); + } + } + if (object.datasetErrors) { + if (!Array.isArray(object.datasetErrors)) + throw TypeError(".google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation.datasetErrors: array expected"); + message.datasetErrors = []; + for (var i = 0; i < object.datasetErrors.length; ++i) { + if (typeof object.datasetErrors[i] !== "object") + throw TypeError(".google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation.datasetErrors: object expected"); + message.datasetErrors[i] = $root.google.rpc.Status.fromObject(object.datasetErrors[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a DatasetValidation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation + * @static + * @param {google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation} message DatasetValidation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatasetValidation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.documentErrors = []; + object.datasetErrors = []; + } + if (options.defaults) { + object.documentErrorCount = 0; + object.datasetErrorCount = 0; + } + if (message.documentErrors && message.documentErrors.length) { + object.documentErrors = []; + for (var j = 0; j < message.documentErrors.length; ++j) + object.documentErrors[j] = $root.google.rpc.Status.toObject(message.documentErrors[j], options); + } + if (message.datasetErrors && message.datasetErrors.length) { + object.datasetErrors = []; + for (var j = 0; j < message.datasetErrors.length; ++j) + object.datasetErrors[j] = $root.google.rpc.Status.toObject(message.datasetErrors[j], options); + } + if (message.documentErrorCount != null && message.hasOwnProperty("documentErrorCount")) + object.documentErrorCount = message.documentErrorCount; + if (message.datasetErrorCount != null && message.hasOwnProperty("datasetErrorCount")) + object.datasetErrorCount = message.datasetErrorCount; + return object; + }; + + /** + * Converts this DatasetValidation to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation + * @instance + * @returns {Object.} JSON object + */ + DatasetValidation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DatasetValidation + * @function getTypeUrl + * @memberof google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatasetValidation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation"; + }; + + return DatasetValidation; + })(); + + return TrainProcessorVersionMetadata; + })(); + + v1.ReviewDocumentRequest = (function() { /** - * Decodes a DocumentSchema message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.documentai.v1.DocumentSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.documentai.v1.DocumentSchema} DocumentSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Properties of a ReviewDocumentRequest. + * @memberof google.cloud.documentai.v1 + * @interface IReviewDocumentRequest + * @property {google.cloud.documentai.v1.IDocument|null} [inlineDocument] ReviewDocumentRequest inlineDocument + * @property {string|null} [humanReviewConfig] ReviewDocumentRequest humanReviewConfig + * @property {boolean|null} [enableSchemaValidation] ReviewDocumentRequest enableSchemaValidation + * @property {google.cloud.documentai.v1.ReviewDocumentRequest.Priority|null} [priority] ReviewDocumentRequest priority + * @property {google.cloud.documentai.v1.IDocumentSchema|null} [documentSchema] ReviewDocumentRequest documentSchema */ - DocumentSchema.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a DocumentSchema message. - * @function verify - * @memberof google.cloud.documentai.v1.DocumentSchema - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Constructs a new ReviewDocumentRequest. + * @memberof google.cloud.documentai.v1 + * @classdesc Represents a ReviewDocumentRequest. + * @implements IReviewDocumentRequest + * @constructor + * @param {google.cloud.documentai.v1.IReviewDocumentRequest=} [properties] Properties to set */ - DocumentSchema.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.entityTypes != null && message.hasOwnProperty("entityTypes")) { - if (!Array.isArray(message.entityTypes)) - return "entityTypes: array expected"; - for (var i = 0; i < message.entityTypes.length; ++i) { - var error = $root.google.cloud.documentai.v1.DocumentSchema.EntityType.verify(message.entityTypes[i]); - if (error) - return "entityTypes." + error; - } - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.cloud.documentai.v1.DocumentSchema.Metadata.verify(message.metadata); - if (error) - return "metadata." + error; - } - return null; - }; + function ReviewDocumentRequest(properties) { + if (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 DocumentSchema message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.documentai.v1.DocumentSchema - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.documentai.v1.DocumentSchema} DocumentSchema + * ReviewDocumentRequest inlineDocument. + * @member {google.cloud.documentai.v1.IDocument|null|undefined} inlineDocument + * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * @instance */ - DocumentSchema.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.documentai.v1.DocumentSchema) - return object; - var message = new $root.google.cloud.documentai.v1.DocumentSchema(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.entityTypes) { - if (!Array.isArray(object.entityTypes)) - throw TypeError(".google.cloud.documentai.v1.DocumentSchema.entityTypes: array expected"); - message.entityTypes = []; - for (var i = 0; i < object.entityTypes.length; ++i) { - if (typeof object.entityTypes[i] !== "object") - throw TypeError(".google.cloud.documentai.v1.DocumentSchema.entityTypes: object expected"); - message.entityTypes[i] = $root.google.cloud.documentai.v1.DocumentSchema.EntityType.fromObject(object.entityTypes[i]); - } - } - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.documentai.v1.DocumentSchema.metadata: object expected"); - message.metadata = $root.google.cloud.documentai.v1.DocumentSchema.Metadata.fromObject(object.metadata); - } - return message; - }; + ReviewDocumentRequest.prototype.inlineDocument = null; /** - * Creates a plain object from a DocumentSchema message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.documentai.v1.DocumentSchema - * @static - * @param {google.cloud.documentai.v1.DocumentSchema} message DocumentSchema - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * ReviewDocumentRequest humanReviewConfig. + * @member {string} humanReviewConfig + * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * @instance */ - DocumentSchema.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.entityTypes = []; - if (options.defaults) { - object.displayName = ""; - object.description = ""; - object.metadata = null; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.entityTypes && message.entityTypes.length) { - object.entityTypes = []; - for (var j = 0; j < message.entityTypes.length; ++j) - object.entityTypes[j] = $root.google.cloud.documentai.v1.DocumentSchema.EntityType.toObject(message.entityTypes[j], options); - } - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.cloud.documentai.v1.DocumentSchema.Metadata.toObject(message.metadata, options); - return object; - }; + ReviewDocumentRequest.prototype.humanReviewConfig = ""; /** - * Converts this DocumentSchema to JSON. - * @function toJSON - * @memberof google.cloud.documentai.v1.DocumentSchema + * ReviewDocumentRequest enableSchemaValidation. + * @member {boolean} enableSchemaValidation + * @memberof google.cloud.documentai.v1.ReviewDocumentRequest * @instance - * @returns {Object.} JSON object */ - DocumentSchema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + ReviewDocumentRequest.prototype.enableSchemaValidation = false; /** - * Gets the default type url for DocumentSchema - * @function getTypeUrl - * @memberof google.cloud.documentai.v1.DocumentSchema - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * ReviewDocumentRequest priority. + * @member {google.cloud.documentai.v1.ReviewDocumentRequest.Priority} priority + * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * @instance */ - DocumentSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.documentai.v1.DocumentSchema"; - }; - - DocumentSchema.EntityType = (function() { + ReviewDocumentRequest.prototype.priority = 0; - /** - * Properties of an EntityType. - * @memberof google.cloud.documentai.v1.DocumentSchema - * @interface IEntityType - * @property {google.cloud.documentai.v1.DocumentSchema.EntityType.IEnumValues|null} [enumValues] EntityType enumValues - * @property {string|null} [displayName] EntityType displayName - * @property {string|null} [name] EntityType name - * @property {Array.|null} [baseTypes] EntityType baseTypes - * @property {Array.|null} [properties] EntityType properties - */ + /** + * ReviewDocumentRequest documentSchema. + * @member {google.cloud.documentai.v1.IDocumentSchema|null|undefined} documentSchema + * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * @instance + */ + ReviewDocumentRequest.prototype.documentSchema = null; - /** - * Constructs a new EntityType. - * @memberof google.cloud.documentai.v1.DocumentSchema - * @classdesc Represents an EntityType. - * @implements IEntityType - * @constructor - * @param {google.cloud.documentai.v1.DocumentSchema.IEntityType=} [properties] Properties to set - */ - function EntityType(properties) { - this.baseTypes = []; - this.properties = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * EntityType enumValues. - * @member {google.cloud.documentai.v1.DocumentSchema.EntityType.IEnumValues|null|undefined} enumValues - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType - * @instance - */ - EntityType.prototype.enumValues = null; + /** + * ReviewDocumentRequest source. + * @member {"inlineDocument"|undefined} source + * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * @instance + */ + Object.defineProperty(ReviewDocumentRequest.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["inlineDocument"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * EntityType displayName. - * @member {string} displayName - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType - * @instance - */ - EntityType.prototype.displayName = ""; + /** + * Creates a new ReviewDocumentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * @static + * @param {google.cloud.documentai.v1.IReviewDocumentRequest=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.ReviewDocumentRequest} ReviewDocumentRequest instance + */ + ReviewDocumentRequest.create = function create(properties) { + return new ReviewDocumentRequest(properties); + }; - /** - * EntityType name. - * @member {string} name - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType - * @instance - */ - EntityType.prototype.name = ""; + /** + * Encodes the specified ReviewDocumentRequest message. Does not implicitly {@link google.cloud.documentai.v1.ReviewDocumentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * @static + * @param {google.cloud.documentai.v1.IReviewDocumentRequest} message ReviewDocumentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReviewDocumentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.humanReviewConfig != null && Object.hasOwnProperty.call(message, "humanReviewConfig")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.humanReviewConfig); + if (message.enableSchemaValidation != null && Object.hasOwnProperty.call(message, "enableSchemaValidation")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enableSchemaValidation); + if (message.inlineDocument != null && Object.hasOwnProperty.call(message, "inlineDocument")) + $root.google.cloud.documentai.v1.Document.encode(message.inlineDocument, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.priority); + if (message.documentSchema != null && Object.hasOwnProperty.call(message, "documentSchema")) + $root.google.cloud.documentai.v1.DocumentSchema.encode(message.documentSchema, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; - /** - * EntityType baseTypes. - * @member {Array.} baseTypes - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType - * @instance - */ - EntityType.prototype.baseTypes = $util.emptyArray; + /** + * Encodes the specified ReviewDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.ReviewDocumentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * @static + * @param {google.cloud.documentai.v1.IReviewDocumentRequest} message ReviewDocumentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReviewDocumentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * EntityType properties. - * @member {Array.} properties - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType - * @instance - */ - EntityType.prototype.properties = $util.emptyArray; + /** + * Decodes a ReviewDocumentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.documentai.v1.ReviewDocumentRequest} ReviewDocumentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReviewDocumentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.ReviewDocumentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + message.inlineDocument = $root.google.cloud.documentai.v1.Document.decode(reader, reader.uint32()); + break; + } + case 1: { + message.humanReviewConfig = reader.string(); + break; + } + case 3: { + message.enableSchemaValidation = reader.bool(); + break; + } + case 5: { + message.priority = reader.int32(); + break; + } + case 6: { + message.documentSchema = $root.google.cloud.documentai.v1.DocumentSchema.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Decodes a ReviewDocumentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1.ReviewDocumentRequest} ReviewDocumentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReviewDocumentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * EntityType valueSource. - * @member {"enumValues"|undefined} valueSource - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType - * @instance - */ - Object.defineProperty(EntityType.prototype, "valueSource", { - get: $util.oneOfGetter($oneOfFields = ["enumValues"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Verifies a ReviewDocumentRequest message. + * @function verify + * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReviewDocumentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.inlineDocument != null && message.hasOwnProperty("inlineDocument")) { + properties.source = 1; + { + var error = $root.google.cloud.documentai.v1.Document.verify(message.inlineDocument); + if (error) + return "inlineDocument." + error; + } + } + if (message.humanReviewConfig != null && message.hasOwnProperty("humanReviewConfig")) + if (!$util.isString(message.humanReviewConfig)) + return "humanReviewConfig: string expected"; + if (message.enableSchemaValidation != null && message.hasOwnProperty("enableSchemaValidation")) + if (typeof message.enableSchemaValidation !== "boolean") + return "enableSchemaValidation: boolean expected"; + if (message.priority != null && message.hasOwnProperty("priority")) + switch (message.priority) { + default: + return "priority: enum value expected"; + case 0: + case 1: + break; + } + if (message.documentSchema != null && message.hasOwnProperty("documentSchema")) { + var error = $root.google.cloud.documentai.v1.DocumentSchema.verify(message.documentSchema); + if (error) + return "documentSchema." + error; + } + return null; + }; - /** - * Creates a new EntityType instance using the specified properties. - * @function create - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType - * @static - * @param {google.cloud.documentai.v1.DocumentSchema.IEntityType=} [properties] Properties to set - * @returns {google.cloud.documentai.v1.DocumentSchema.EntityType} EntityType instance - */ + /** + * Creates a ReviewDocumentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1.ReviewDocumentRequest} ReviewDocumentRequest + */ + ReviewDocumentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.ReviewDocumentRequest) + return object; + var message = new $root.google.cloud.documentai.v1.ReviewDocumentRequest(); + if (object.inlineDocument != null) { + if (typeof object.inlineDocument !== "object") + throw TypeError(".google.cloud.documentai.v1.ReviewDocumentRequest.inlineDocument: object expected"); + message.inlineDocument = $root.google.cloud.documentai.v1.Document.fromObject(object.inlineDocument); + } + if (object.humanReviewConfig != null) + message.humanReviewConfig = String(object.humanReviewConfig); + if (object.enableSchemaValidation != null) + message.enableSchemaValidation = Boolean(object.enableSchemaValidation); + switch (object.priority) { + default: + if (typeof object.priority === "number") { + message.priority = object.priority; + break; + } + break; + case "DEFAULT": + case 0: + message.priority = 0; + break; + case "URGENT": + case 1: + message.priority = 1; + break; + } + if (object.documentSchema != null) { + if (typeof object.documentSchema !== "object") + throw TypeError(".google.cloud.documentai.v1.ReviewDocumentRequest.documentSchema: object expected"); + message.documentSchema = $root.google.cloud.documentai.v1.DocumentSchema.fromObject(object.documentSchema); + } + return message; + }; + + /** + * Creates a plain object from a ReviewDocumentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * @static + * @param {google.cloud.documentai.v1.ReviewDocumentRequest} message ReviewDocumentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReviewDocumentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.humanReviewConfig = ""; + object.enableSchemaValidation = false; + object.priority = options.enums === String ? "DEFAULT" : 0; + object.documentSchema = null; + } + if (message.humanReviewConfig != null && message.hasOwnProperty("humanReviewConfig")) + object.humanReviewConfig = message.humanReviewConfig; + if (message.enableSchemaValidation != null && message.hasOwnProperty("enableSchemaValidation")) + object.enableSchemaValidation = message.enableSchemaValidation; + if (message.inlineDocument != null && message.hasOwnProperty("inlineDocument")) { + object.inlineDocument = $root.google.cloud.documentai.v1.Document.toObject(message.inlineDocument, options); + if (options.oneofs) + object.source = "inlineDocument"; + } + if (message.priority != null && message.hasOwnProperty("priority")) + object.priority = options.enums === String ? $root.google.cloud.documentai.v1.ReviewDocumentRequest.Priority[message.priority] === undefined ? message.priority : $root.google.cloud.documentai.v1.ReviewDocumentRequest.Priority[message.priority] : message.priority; + if (message.documentSchema != null && message.hasOwnProperty("documentSchema")) + object.documentSchema = $root.google.cloud.documentai.v1.DocumentSchema.toObject(message.documentSchema, options); + return object; + }; + + /** + * Converts this ReviewDocumentRequest to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * @instance + * @returns {Object.} JSON object + */ + ReviewDocumentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReviewDocumentRequest + * @function getTypeUrl + * @memberof google.cloud.documentai.v1.ReviewDocumentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReviewDocumentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1.ReviewDocumentRequest"; + }; + + /** + * Priority enum. + * @name google.cloud.documentai.v1.ReviewDocumentRequest.Priority + * @enum {number} + * @property {number} DEFAULT=0 DEFAULT value + * @property {number} URGENT=1 URGENT value + */ + ReviewDocumentRequest.Priority = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEFAULT"] = 0; + values[valuesById[1] = "URGENT"] = 1; + return values; + })(); + + return ReviewDocumentRequest; + })(); + + v1.ReviewDocumentResponse = (function() { + + /** + * Properties of a ReviewDocumentResponse. + * @memberof google.cloud.documentai.v1 + * @interface IReviewDocumentResponse + * @property {string|null} [gcsDestination] ReviewDocumentResponse gcsDestination + * @property {google.cloud.documentai.v1.ReviewDocumentResponse.State|null} [state] ReviewDocumentResponse state + * @property {string|null} [rejectionReason] ReviewDocumentResponse rejectionReason + */ + + /** + * Constructs a new ReviewDocumentResponse. + * @memberof google.cloud.documentai.v1 + * @classdesc Represents a ReviewDocumentResponse. + * @implements IReviewDocumentResponse + * @constructor + * @param {google.cloud.documentai.v1.IReviewDocumentResponse=} [properties] Properties to set + */ + function ReviewDocumentResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReviewDocumentResponse gcsDestination. + * @member {string} gcsDestination + * @memberof google.cloud.documentai.v1.ReviewDocumentResponse + * @instance + */ + ReviewDocumentResponse.prototype.gcsDestination = ""; + + /** + * ReviewDocumentResponse state. + * @member {google.cloud.documentai.v1.ReviewDocumentResponse.State} state + * @memberof google.cloud.documentai.v1.ReviewDocumentResponse + * @instance + */ + ReviewDocumentResponse.prototype.state = 0; + + /** + * ReviewDocumentResponse rejectionReason. + * @member {string} rejectionReason + * @memberof google.cloud.documentai.v1.ReviewDocumentResponse + * @instance + */ + ReviewDocumentResponse.prototype.rejectionReason = ""; + + /** + * Creates a new ReviewDocumentResponse instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1.ReviewDocumentResponse + * @static + * @param {google.cloud.documentai.v1.IReviewDocumentResponse=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.ReviewDocumentResponse} ReviewDocumentResponse instance + */ + ReviewDocumentResponse.create = function create(properties) { + return new ReviewDocumentResponse(properties); + }; + + /** + * Encodes the specified ReviewDocumentResponse message. Does not implicitly {@link google.cloud.documentai.v1.ReviewDocumentResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1.ReviewDocumentResponse + * @static + * @param {google.cloud.documentai.v1.IReviewDocumentResponse} message ReviewDocumentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReviewDocumentResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcsDestination != null && Object.hasOwnProperty.call(message, "gcsDestination")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsDestination); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + if (message.rejectionReason != null && Object.hasOwnProperty.call(message, "rejectionReason")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.rejectionReason); + return writer; + }; + + /** + * Encodes the specified ReviewDocumentResponse message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.ReviewDocumentResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1.ReviewDocumentResponse + * @static + * @param {google.cloud.documentai.v1.IReviewDocumentResponse} message ReviewDocumentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReviewDocumentResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReviewDocumentResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1.ReviewDocumentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.documentai.v1.ReviewDocumentResponse} ReviewDocumentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReviewDocumentResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.ReviewDocumentResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.gcsDestination = reader.string(); + break; + } + case 2: { + message.state = reader.int32(); + break; + } + case 3: { + message.rejectionReason = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReviewDocumentResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1.ReviewDocumentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1.ReviewDocumentResponse} ReviewDocumentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReviewDocumentResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReviewDocumentResponse message. + * @function verify + * @memberof google.cloud.documentai.v1.ReviewDocumentResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReviewDocumentResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) + if (!$util.isString(message.gcsDestination)) + return "gcsDestination: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.rejectionReason != null && message.hasOwnProperty("rejectionReason")) + if (!$util.isString(message.rejectionReason)) + return "rejectionReason: string expected"; + return null; + }; + + /** + * Creates a ReviewDocumentResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1.ReviewDocumentResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1.ReviewDocumentResponse} ReviewDocumentResponse + */ + ReviewDocumentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.ReviewDocumentResponse) + return object; + var message = new $root.google.cloud.documentai.v1.ReviewDocumentResponse(); + if (object.gcsDestination != null) + message.gcsDestination = String(object.gcsDestination); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "REJECTED": + case 1: + message.state = 1; + break; + case "SUCCEEDED": + case 2: + message.state = 2; + break; + } + if (object.rejectionReason != null) + message.rejectionReason = String(object.rejectionReason); + return message; + }; + + /** + * Creates a plain object from a ReviewDocumentResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1.ReviewDocumentResponse + * @static + * @param {google.cloud.documentai.v1.ReviewDocumentResponse} message ReviewDocumentResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReviewDocumentResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.gcsDestination = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.rejectionReason = ""; + } + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) + object.gcsDestination = message.gcsDestination; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.documentai.v1.ReviewDocumentResponse.State[message.state] === undefined ? message.state : $root.google.cloud.documentai.v1.ReviewDocumentResponse.State[message.state] : message.state; + if (message.rejectionReason != null && message.hasOwnProperty("rejectionReason")) + object.rejectionReason = message.rejectionReason; + return object; + }; + + /** + * Converts this ReviewDocumentResponse to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1.ReviewDocumentResponse + * @instance + * @returns {Object.} JSON object + */ + ReviewDocumentResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReviewDocumentResponse + * @function getTypeUrl + * @memberof google.cloud.documentai.v1.ReviewDocumentResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReviewDocumentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1.ReviewDocumentResponse"; + }; + + /** + * State enum. + * @name google.cloud.documentai.v1.ReviewDocumentResponse.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} REJECTED=1 REJECTED value + * @property {number} SUCCEEDED=2 SUCCEEDED value + */ + ReviewDocumentResponse.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "REJECTED"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + return values; + })(); + + return ReviewDocumentResponse; + })(); + + v1.ReviewDocumentOperationMetadata = (function() { + + /** + * Properties of a ReviewDocumentOperationMetadata. + * @memberof google.cloud.documentai.v1 + * @interface IReviewDocumentOperationMetadata + * @property {google.cloud.documentai.v1.ICommonOperationMetadata|null} [commonMetadata] ReviewDocumentOperationMetadata commonMetadata + * @property {string|null} [questionId] ReviewDocumentOperationMetadata questionId + */ + + /** + * Constructs a new ReviewDocumentOperationMetadata. + * @memberof google.cloud.documentai.v1 + * @classdesc Represents a ReviewDocumentOperationMetadata. + * @implements IReviewDocumentOperationMetadata + * @constructor + * @param {google.cloud.documentai.v1.IReviewDocumentOperationMetadata=} [properties] Properties to set + */ + function ReviewDocumentOperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReviewDocumentOperationMetadata commonMetadata. + * @member {google.cloud.documentai.v1.ICommonOperationMetadata|null|undefined} commonMetadata + * @memberof google.cloud.documentai.v1.ReviewDocumentOperationMetadata + * @instance + */ + ReviewDocumentOperationMetadata.prototype.commonMetadata = null; + + /** + * ReviewDocumentOperationMetadata questionId. + * @member {string} questionId + * @memberof google.cloud.documentai.v1.ReviewDocumentOperationMetadata + * @instance + */ + ReviewDocumentOperationMetadata.prototype.questionId = ""; + + /** + * Creates a new ReviewDocumentOperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1.ReviewDocumentOperationMetadata + * @static + * @param {google.cloud.documentai.v1.IReviewDocumentOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.ReviewDocumentOperationMetadata} ReviewDocumentOperationMetadata instance + */ + ReviewDocumentOperationMetadata.create = function create(properties) { + return new ReviewDocumentOperationMetadata(properties); + }; + + /** + * Encodes the specified ReviewDocumentOperationMetadata message. Does not implicitly {@link google.cloud.documentai.v1.ReviewDocumentOperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1.ReviewDocumentOperationMetadata + * @static + * @param {google.cloud.documentai.v1.IReviewDocumentOperationMetadata} message ReviewDocumentOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReviewDocumentOperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.commonMetadata != null && Object.hasOwnProperty.call(message, "commonMetadata")) + $root.google.cloud.documentai.v1.CommonOperationMetadata.encode(message.commonMetadata, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.questionId != null && Object.hasOwnProperty.call(message, "questionId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.questionId); + return writer; + }; + + /** + * Encodes the specified ReviewDocumentOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.ReviewDocumentOperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1.ReviewDocumentOperationMetadata + * @static + * @param {google.cloud.documentai.v1.IReviewDocumentOperationMetadata} message ReviewDocumentOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReviewDocumentOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReviewDocumentOperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1.ReviewDocumentOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.documentai.v1.ReviewDocumentOperationMetadata} ReviewDocumentOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReviewDocumentOperationMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.ReviewDocumentOperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: { + message.commonMetadata = $root.google.cloud.documentai.v1.CommonOperationMetadata.decode(reader, reader.uint32()); + break; + } + case 6: { + message.questionId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReviewDocumentOperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1.ReviewDocumentOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1.ReviewDocumentOperationMetadata} ReviewDocumentOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReviewDocumentOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReviewDocumentOperationMetadata message. + * @function verify + * @memberof google.cloud.documentai.v1.ReviewDocumentOperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReviewDocumentOperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.commonMetadata != null && message.hasOwnProperty("commonMetadata")) { + var error = $root.google.cloud.documentai.v1.CommonOperationMetadata.verify(message.commonMetadata); + if (error) + return "commonMetadata." + error; + } + if (message.questionId != null && message.hasOwnProperty("questionId")) + if (!$util.isString(message.questionId)) + return "questionId: string expected"; + return null; + }; + + /** + * Creates a ReviewDocumentOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1.ReviewDocumentOperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1.ReviewDocumentOperationMetadata} ReviewDocumentOperationMetadata + */ + ReviewDocumentOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.ReviewDocumentOperationMetadata) + return object; + var message = new $root.google.cloud.documentai.v1.ReviewDocumentOperationMetadata(); + if (object.commonMetadata != null) { + if (typeof object.commonMetadata !== "object") + throw TypeError(".google.cloud.documentai.v1.ReviewDocumentOperationMetadata.commonMetadata: object expected"); + message.commonMetadata = $root.google.cloud.documentai.v1.CommonOperationMetadata.fromObject(object.commonMetadata); + } + if (object.questionId != null) + message.questionId = String(object.questionId); + return message; + }; + + /** + * Creates a plain object from a ReviewDocumentOperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1.ReviewDocumentOperationMetadata + * @static + * @param {google.cloud.documentai.v1.ReviewDocumentOperationMetadata} message ReviewDocumentOperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReviewDocumentOperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.commonMetadata = null; + object.questionId = ""; + } + if (message.commonMetadata != null && message.hasOwnProperty("commonMetadata")) + object.commonMetadata = $root.google.cloud.documentai.v1.CommonOperationMetadata.toObject(message.commonMetadata, options); + if (message.questionId != null && message.hasOwnProperty("questionId")) + object.questionId = message.questionId; + return object; + }; + + /** + * Converts this ReviewDocumentOperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1.ReviewDocumentOperationMetadata + * @instance + * @returns {Object.} JSON object + */ + ReviewDocumentOperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReviewDocumentOperationMetadata + * @function getTypeUrl + * @memberof google.cloud.documentai.v1.ReviewDocumentOperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReviewDocumentOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1.ReviewDocumentOperationMetadata"; + }; + + return ReviewDocumentOperationMetadata; + })(); + + v1.EvaluateProcessorVersionRequest = (function() { + + /** + * Properties of an EvaluateProcessorVersionRequest. + * @memberof google.cloud.documentai.v1 + * @interface IEvaluateProcessorVersionRequest + * @property {string|null} [processorVersion] EvaluateProcessorVersionRequest processorVersion + * @property {google.cloud.documentai.v1.IBatchDocumentsInputConfig|null} [evaluationDocuments] EvaluateProcessorVersionRequest evaluationDocuments + */ + + /** + * Constructs a new EvaluateProcessorVersionRequest. + * @memberof google.cloud.documentai.v1 + * @classdesc Represents an EvaluateProcessorVersionRequest. + * @implements IEvaluateProcessorVersionRequest + * @constructor + * @param {google.cloud.documentai.v1.IEvaluateProcessorVersionRequest=} [properties] Properties to set + */ + function EvaluateProcessorVersionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EvaluateProcessorVersionRequest processorVersion. + * @member {string} processorVersion + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionRequest + * @instance + */ + EvaluateProcessorVersionRequest.prototype.processorVersion = ""; + + /** + * EvaluateProcessorVersionRequest evaluationDocuments. + * @member {google.cloud.documentai.v1.IBatchDocumentsInputConfig|null|undefined} evaluationDocuments + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionRequest + * @instance + */ + EvaluateProcessorVersionRequest.prototype.evaluationDocuments = null; + + /** + * Creates a new EvaluateProcessorVersionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionRequest + * @static + * @param {google.cloud.documentai.v1.IEvaluateProcessorVersionRequest=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.EvaluateProcessorVersionRequest} EvaluateProcessorVersionRequest instance + */ + EvaluateProcessorVersionRequest.create = function create(properties) { + return new EvaluateProcessorVersionRequest(properties); + }; + + /** + * Encodes the specified EvaluateProcessorVersionRequest message. Does not implicitly {@link google.cloud.documentai.v1.EvaluateProcessorVersionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionRequest + * @static + * @param {google.cloud.documentai.v1.IEvaluateProcessorVersionRequest} message EvaluateProcessorVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvaluateProcessorVersionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.processorVersion != null && Object.hasOwnProperty.call(message, "processorVersion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.processorVersion); + if (message.evaluationDocuments != null && Object.hasOwnProperty.call(message, "evaluationDocuments")) + $root.google.cloud.documentai.v1.BatchDocumentsInputConfig.encode(message.evaluationDocuments, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EvaluateProcessorVersionRequest message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.EvaluateProcessorVersionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionRequest + * @static + * @param {google.cloud.documentai.v1.IEvaluateProcessorVersionRequest} message EvaluateProcessorVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvaluateProcessorVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EvaluateProcessorVersionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.documentai.v1.EvaluateProcessorVersionRequest} EvaluateProcessorVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvaluateProcessorVersionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.EvaluateProcessorVersionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.processorVersion = reader.string(); + break; + } + case 3: { + message.evaluationDocuments = $root.google.cloud.documentai.v1.BatchDocumentsInputConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EvaluateProcessorVersionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1.EvaluateProcessorVersionRequest} EvaluateProcessorVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvaluateProcessorVersionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EvaluateProcessorVersionRequest message. + * @function verify + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EvaluateProcessorVersionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.processorVersion != null && message.hasOwnProperty("processorVersion")) + if (!$util.isString(message.processorVersion)) + return "processorVersion: string expected"; + if (message.evaluationDocuments != null && message.hasOwnProperty("evaluationDocuments")) { + var error = $root.google.cloud.documentai.v1.BatchDocumentsInputConfig.verify(message.evaluationDocuments); + if (error) + return "evaluationDocuments." + error; + } + return null; + }; + + /** + * Creates an EvaluateProcessorVersionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1.EvaluateProcessorVersionRequest} EvaluateProcessorVersionRequest + */ + EvaluateProcessorVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.EvaluateProcessorVersionRequest) + return object; + var message = new $root.google.cloud.documentai.v1.EvaluateProcessorVersionRequest(); + if (object.processorVersion != null) + message.processorVersion = String(object.processorVersion); + if (object.evaluationDocuments != null) { + if (typeof object.evaluationDocuments !== "object") + throw TypeError(".google.cloud.documentai.v1.EvaluateProcessorVersionRequest.evaluationDocuments: object expected"); + message.evaluationDocuments = $root.google.cloud.documentai.v1.BatchDocumentsInputConfig.fromObject(object.evaluationDocuments); + } + return message; + }; + + /** + * Creates a plain object from an EvaluateProcessorVersionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionRequest + * @static + * @param {google.cloud.documentai.v1.EvaluateProcessorVersionRequest} message EvaluateProcessorVersionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EvaluateProcessorVersionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.processorVersion = ""; + object.evaluationDocuments = null; + } + if (message.processorVersion != null && message.hasOwnProperty("processorVersion")) + object.processorVersion = message.processorVersion; + if (message.evaluationDocuments != null && message.hasOwnProperty("evaluationDocuments")) + object.evaluationDocuments = $root.google.cloud.documentai.v1.BatchDocumentsInputConfig.toObject(message.evaluationDocuments, options); + return object; + }; + + /** + * Converts this EvaluateProcessorVersionRequest to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionRequest + * @instance + * @returns {Object.} JSON object + */ + EvaluateProcessorVersionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EvaluateProcessorVersionRequest + * @function getTypeUrl + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EvaluateProcessorVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1.EvaluateProcessorVersionRequest"; + }; + + return EvaluateProcessorVersionRequest; + })(); + + v1.EvaluateProcessorVersionMetadata = (function() { + + /** + * Properties of an EvaluateProcessorVersionMetadata. + * @memberof google.cloud.documentai.v1 + * @interface IEvaluateProcessorVersionMetadata + * @property {google.cloud.documentai.v1.ICommonOperationMetadata|null} [commonMetadata] EvaluateProcessorVersionMetadata commonMetadata + */ + + /** + * Constructs a new EvaluateProcessorVersionMetadata. + * @memberof google.cloud.documentai.v1 + * @classdesc Represents an EvaluateProcessorVersionMetadata. + * @implements IEvaluateProcessorVersionMetadata + * @constructor + * @param {google.cloud.documentai.v1.IEvaluateProcessorVersionMetadata=} [properties] Properties to set + */ + function EvaluateProcessorVersionMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EvaluateProcessorVersionMetadata commonMetadata. + * @member {google.cloud.documentai.v1.ICommonOperationMetadata|null|undefined} commonMetadata + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionMetadata + * @instance + */ + EvaluateProcessorVersionMetadata.prototype.commonMetadata = null; + + /** + * Creates a new EvaluateProcessorVersionMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionMetadata + * @static + * @param {google.cloud.documentai.v1.IEvaluateProcessorVersionMetadata=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.EvaluateProcessorVersionMetadata} EvaluateProcessorVersionMetadata instance + */ + EvaluateProcessorVersionMetadata.create = function create(properties) { + return new EvaluateProcessorVersionMetadata(properties); + }; + + /** + * Encodes the specified EvaluateProcessorVersionMetadata message. Does not implicitly {@link google.cloud.documentai.v1.EvaluateProcessorVersionMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionMetadata + * @static + * @param {google.cloud.documentai.v1.IEvaluateProcessorVersionMetadata} message EvaluateProcessorVersionMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvaluateProcessorVersionMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.commonMetadata != null && Object.hasOwnProperty.call(message, "commonMetadata")) + $root.google.cloud.documentai.v1.CommonOperationMetadata.encode(message.commonMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EvaluateProcessorVersionMetadata message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.EvaluateProcessorVersionMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionMetadata + * @static + * @param {google.cloud.documentai.v1.IEvaluateProcessorVersionMetadata} message EvaluateProcessorVersionMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvaluateProcessorVersionMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EvaluateProcessorVersionMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.documentai.v1.EvaluateProcessorVersionMetadata} EvaluateProcessorVersionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvaluateProcessorVersionMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.EvaluateProcessorVersionMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.commonMetadata = $root.google.cloud.documentai.v1.CommonOperationMetadata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EvaluateProcessorVersionMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1.EvaluateProcessorVersionMetadata} EvaluateProcessorVersionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvaluateProcessorVersionMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EvaluateProcessorVersionMetadata message. + * @function verify + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EvaluateProcessorVersionMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.commonMetadata != null && message.hasOwnProperty("commonMetadata")) { + var error = $root.google.cloud.documentai.v1.CommonOperationMetadata.verify(message.commonMetadata); + if (error) + return "commonMetadata." + error; + } + return null; + }; + + /** + * Creates an EvaluateProcessorVersionMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1.EvaluateProcessorVersionMetadata} EvaluateProcessorVersionMetadata + */ + EvaluateProcessorVersionMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.EvaluateProcessorVersionMetadata) + return object; + var message = new $root.google.cloud.documentai.v1.EvaluateProcessorVersionMetadata(); + if (object.commonMetadata != null) { + if (typeof object.commonMetadata !== "object") + throw TypeError(".google.cloud.documentai.v1.EvaluateProcessorVersionMetadata.commonMetadata: object expected"); + message.commonMetadata = $root.google.cloud.documentai.v1.CommonOperationMetadata.fromObject(object.commonMetadata); + } + return message; + }; + + /** + * Creates a plain object from an EvaluateProcessorVersionMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionMetadata + * @static + * @param {google.cloud.documentai.v1.EvaluateProcessorVersionMetadata} message EvaluateProcessorVersionMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EvaluateProcessorVersionMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.commonMetadata = null; + if (message.commonMetadata != null && message.hasOwnProperty("commonMetadata")) + object.commonMetadata = $root.google.cloud.documentai.v1.CommonOperationMetadata.toObject(message.commonMetadata, options); + return object; + }; + + /** + * Converts this EvaluateProcessorVersionMetadata to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionMetadata + * @instance + * @returns {Object.} JSON object + */ + EvaluateProcessorVersionMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EvaluateProcessorVersionMetadata + * @function getTypeUrl + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EvaluateProcessorVersionMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1.EvaluateProcessorVersionMetadata"; + }; + + return EvaluateProcessorVersionMetadata; + })(); + + v1.EvaluateProcessorVersionResponse = (function() { + + /** + * Properties of an EvaluateProcessorVersionResponse. + * @memberof google.cloud.documentai.v1 + * @interface IEvaluateProcessorVersionResponse + * @property {string|null} [evaluation] EvaluateProcessorVersionResponse evaluation + */ + + /** + * Constructs a new EvaluateProcessorVersionResponse. + * @memberof google.cloud.documentai.v1 + * @classdesc Represents an EvaluateProcessorVersionResponse. + * @implements IEvaluateProcessorVersionResponse + * @constructor + * @param {google.cloud.documentai.v1.IEvaluateProcessorVersionResponse=} [properties] Properties to set + */ + function EvaluateProcessorVersionResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EvaluateProcessorVersionResponse evaluation. + * @member {string} evaluation + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionResponse + * @instance + */ + EvaluateProcessorVersionResponse.prototype.evaluation = ""; + + /** + * Creates a new EvaluateProcessorVersionResponse instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionResponse + * @static + * @param {google.cloud.documentai.v1.IEvaluateProcessorVersionResponse=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.EvaluateProcessorVersionResponse} EvaluateProcessorVersionResponse instance + */ + EvaluateProcessorVersionResponse.create = function create(properties) { + return new EvaluateProcessorVersionResponse(properties); + }; + + /** + * Encodes the specified EvaluateProcessorVersionResponse message. Does not implicitly {@link google.cloud.documentai.v1.EvaluateProcessorVersionResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionResponse + * @static + * @param {google.cloud.documentai.v1.IEvaluateProcessorVersionResponse} message EvaluateProcessorVersionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvaluateProcessorVersionResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.evaluation != null && Object.hasOwnProperty.call(message, "evaluation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.evaluation); + return writer; + }; + + /** + * Encodes the specified EvaluateProcessorVersionResponse message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.EvaluateProcessorVersionResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionResponse + * @static + * @param {google.cloud.documentai.v1.IEvaluateProcessorVersionResponse} message EvaluateProcessorVersionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvaluateProcessorVersionResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EvaluateProcessorVersionResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.documentai.v1.EvaluateProcessorVersionResponse} EvaluateProcessorVersionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvaluateProcessorVersionResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.EvaluateProcessorVersionResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.evaluation = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EvaluateProcessorVersionResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1.EvaluateProcessorVersionResponse} EvaluateProcessorVersionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvaluateProcessorVersionResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EvaluateProcessorVersionResponse message. + * @function verify + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EvaluateProcessorVersionResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.evaluation != null && message.hasOwnProperty("evaluation")) + if (!$util.isString(message.evaluation)) + return "evaluation: string expected"; + return null; + }; + + /** + * Creates an EvaluateProcessorVersionResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1.EvaluateProcessorVersionResponse} EvaluateProcessorVersionResponse + */ + EvaluateProcessorVersionResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.EvaluateProcessorVersionResponse) + return object; + var message = new $root.google.cloud.documentai.v1.EvaluateProcessorVersionResponse(); + if (object.evaluation != null) + message.evaluation = String(object.evaluation); + return message; + }; + + /** + * Creates a plain object from an EvaluateProcessorVersionResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionResponse + * @static + * @param {google.cloud.documentai.v1.EvaluateProcessorVersionResponse} message EvaluateProcessorVersionResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EvaluateProcessorVersionResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.evaluation = ""; + if (message.evaluation != null && message.hasOwnProperty("evaluation")) + object.evaluation = message.evaluation; + return object; + }; + + /** + * Converts this EvaluateProcessorVersionResponse to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionResponse + * @instance + * @returns {Object.} JSON object + */ + EvaluateProcessorVersionResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EvaluateProcessorVersionResponse + * @function getTypeUrl + * @memberof google.cloud.documentai.v1.EvaluateProcessorVersionResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EvaluateProcessorVersionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1.EvaluateProcessorVersionResponse"; + }; + + return EvaluateProcessorVersionResponse; + })(); + + v1.GetEvaluationRequest = (function() { + + /** + * Properties of a GetEvaluationRequest. + * @memberof google.cloud.documentai.v1 + * @interface IGetEvaluationRequest + * @property {string|null} [name] GetEvaluationRequest name + */ + + /** + * Constructs a new GetEvaluationRequest. + * @memberof google.cloud.documentai.v1 + * @classdesc Represents a GetEvaluationRequest. + * @implements IGetEvaluationRequest + * @constructor + * @param {google.cloud.documentai.v1.IGetEvaluationRequest=} [properties] Properties to set + */ + function GetEvaluationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetEvaluationRequest name. + * @member {string} name + * @memberof google.cloud.documentai.v1.GetEvaluationRequest + * @instance + */ + GetEvaluationRequest.prototype.name = ""; + + /** + * Creates a new GetEvaluationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1.GetEvaluationRequest + * @static + * @param {google.cloud.documentai.v1.IGetEvaluationRequest=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.GetEvaluationRequest} GetEvaluationRequest instance + */ + GetEvaluationRequest.create = function create(properties) { + return new GetEvaluationRequest(properties); + }; + + /** + * Encodes the specified GetEvaluationRequest message. Does not implicitly {@link google.cloud.documentai.v1.GetEvaluationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1.GetEvaluationRequest + * @static + * @param {google.cloud.documentai.v1.IGetEvaluationRequest} message GetEvaluationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEvaluationRequest.encode = function encode(message, writer) { + 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 GetEvaluationRequest message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.GetEvaluationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1.GetEvaluationRequest + * @static + * @param {google.cloud.documentai.v1.IGetEvaluationRequest} message GetEvaluationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEvaluationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetEvaluationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1.GetEvaluationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.documentai.v1.GetEvaluationRequest} GetEvaluationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEvaluationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.GetEvaluationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetEvaluationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1.GetEvaluationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1.GetEvaluationRequest} GetEvaluationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEvaluationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetEvaluationRequest message. + * @function verify + * @memberof google.cloud.documentai.v1.GetEvaluationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetEvaluationRequest.verify = function verify(message) { + if (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 GetEvaluationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1.GetEvaluationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1.GetEvaluationRequest} GetEvaluationRequest + */ + GetEvaluationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.GetEvaluationRequest) + return object; + var message = new $root.google.cloud.documentai.v1.GetEvaluationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetEvaluationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1.GetEvaluationRequest + * @static + * @param {google.cloud.documentai.v1.GetEvaluationRequest} message GetEvaluationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetEvaluationRequest.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 GetEvaluationRequest to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1.GetEvaluationRequest + * @instance + * @returns {Object.} JSON object + */ + GetEvaluationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetEvaluationRequest + * @function getTypeUrl + * @memberof google.cloud.documentai.v1.GetEvaluationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetEvaluationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1.GetEvaluationRequest"; + }; + + return GetEvaluationRequest; + })(); + + v1.ListEvaluationsRequest = (function() { + + /** + * Properties of a ListEvaluationsRequest. + * @memberof google.cloud.documentai.v1 + * @interface IListEvaluationsRequest + * @property {string|null} [parent] ListEvaluationsRequest parent + * @property {number|null} [pageSize] ListEvaluationsRequest pageSize + * @property {string|null} [pageToken] ListEvaluationsRequest pageToken + */ + + /** + * Constructs a new ListEvaluationsRequest. + * @memberof google.cloud.documentai.v1 + * @classdesc Represents a ListEvaluationsRequest. + * @implements IListEvaluationsRequest + * @constructor + * @param {google.cloud.documentai.v1.IListEvaluationsRequest=} [properties] Properties to set + */ + function ListEvaluationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListEvaluationsRequest parent. + * @member {string} parent + * @memberof google.cloud.documentai.v1.ListEvaluationsRequest + * @instance + */ + ListEvaluationsRequest.prototype.parent = ""; + + /** + * ListEvaluationsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.documentai.v1.ListEvaluationsRequest + * @instance + */ + ListEvaluationsRequest.prototype.pageSize = 0; + + /** + * ListEvaluationsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.documentai.v1.ListEvaluationsRequest + * @instance + */ + ListEvaluationsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListEvaluationsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1.ListEvaluationsRequest + * @static + * @param {google.cloud.documentai.v1.IListEvaluationsRequest=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.ListEvaluationsRequest} ListEvaluationsRequest instance + */ + ListEvaluationsRequest.create = function create(properties) { + return new ListEvaluationsRequest(properties); + }; + + /** + * Encodes the specified ListEvaluationsRequest message. Does not implicitly {@link google.cloud.documentai.v1.ListEvaluationsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1.ListEvaluationsRequest + * @static + * @param {google.cloud.documentai.v1.IListEvaluationsRequest} message ListEvaluationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEvaluationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListEvaluationsRequest message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.ListEvaluationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1.ListEvaluationsRequest + * @static + * @param {google.cloud.documentai.v1.IListEvaluationsRequest} message ListEvaluationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEvaluationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEvaluationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1.ListEvaluationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.documentai.v1.ListEvaluationsRequest} ListEvaluationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEvaluationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.ListEvaluationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListEvaluationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1.ListEvaluationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1.ListEvaluationsRequest} ListEvaluationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEvaluationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEvaluationsRequest message. + * @function verify + * @memberof google.cloud.documentai.v1.ListEvaluationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEvaluationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListEvaluationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1.ListEvaluationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1.ListEvaluationsRequest} ListEvaluationsRequest + */ + ListEvaluationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.ListEvaluationsRequest) + return object; + var message = new $root.google.cloud.documentai.v1.ListEvaluationsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListEvaluationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1.ListEvaluationsRequest + * @static + * @param {google.cloud.documentai.v1.ListEvaluationsRequest} message ListEvaluationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEvaluationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListEvaluationsRequest to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1.ListEvaluationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListEvaluationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListEvaluationsRequest + * @function getTypeUrl + * @memberof google.cloud.documentai.v1.ListEvaluationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEvaluationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1.ListEvaluationsRequest"; + }; + + return ListEvaluationsRequest; + })(); + + v1.ListEvaluationsResponse = (function() { + + /** + * Properties of a ListEvaluationsResponse. + * @memberof google.cloud.documentai.v1 + * @interface IListEvaluationsResponse + * @property {Array.|null} [evaluations] ListEvaluationsResponse evaluations + * @property {string|null} [nextPageToken] ListEvaluationsResponse nextPageToken + */ + + /** + * Constructs a new ListEvaluationsResponse. + * @memberof google.cloud.documentai.v1 + * @classdesc Represents a ListEvaluationsResponse. + * @implements IListEvaluationsResponse + * @constructor + * @param {google.cloud.documentai.v1.IListEvaluationsResponse=} [properties] Properties to set + */ + function ListEvaluationsResponse(properties) { + this.evaluations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListEvaluationsResponse evaluations. + * @member {Array.} evaluations + * @memberof google.cloud.documentai.v1.ListEvaluationsResponse + * @instance + */ + ListEvaluationsResponse.prototype.evaluations = $util.emptyArray; + + /** + * ListEvaluationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.documentai.v1.ListEvaluationsResponse + * @instance + */ + ListEvaluationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListEvaluationsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1.ListEvaluationsResponse + * @static + * @param {google.cloud.documentai.v1.IListEvaluationsResponse=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.ListEvaluationsResponse} ListEvaluationsResponse instance + */ + ListEvaluationsResponse.create = function create(properties) { + return new ListEvaluationsResponse(properties); + }; + + /** + * Encodes the specified ListEvaluationsResponse message. Does not implicitly {@link google.cloud.documentai.v1.ListEvaluationsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1.ListEvaluationsResponse + * @static + * @param {google.cloud.documentai.v1.IListEvaluationsResponse} message ListEvaluationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEvaluationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.evaluations != null && message.evaluations.length) + for (var i = 0; i < message.evaluations.length; ++i) + $root.google.cloud.documentai.v1.Evaluation.encode(message.evaluations[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 ListEvaluationsResponse message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.ListEvaluationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1.ListEvaluationsResponse + * @static + * @param {google.cloud.documentai.v1.IListEvaluationsResponse} message ListEvaluationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEvaluationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEvaluationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1.ListEvaluationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.documentai.v1.ListEvaluationsResponse} ListEvaluationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEvaluationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.ListEvaluationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.evaluations && message.evaluations.length)) + message.evaluations = []; + message.evaluations.push($root.google.cloud.documentai.v1.Evaluation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListEvaluationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1.ListEvaluationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1.ListEvaluationsResponse} ListEvaluationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEvaluationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEvaluationsResponse message. + * @function verify + * @memberof google.cloud.documentai.v1.ListEvaluationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEvaluationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.evaluations != null && message.hasOwnProperty("evaluations")) { + if (!Array.isArray(message.evaluations)) + return "evaluations: array expected"; + for (var i = 0; i < message.evaluations.length; ++i) { + var error = $root.google.cloud.documentai.v1.Evaluation.verify(message.evaluations[i]); + if (error) + return "evaluations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListEvaluationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1.ListEvaluationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1.ListEvaluationsResponse} ListEvaluationsResponse + */ + ListEvaluationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.ListEvaluationsResponse) + return object; + var message = new $root.google.cloud.documentai.v1.ListEvaluationsResponse(); + if (object.evaluations) { + if (!Array.isArray(object.evaluations)) + throw TypeError(".google.cloud.documentai.v1.ListEvaluationsResponse.evaluations: array expected"); + message.evaluations = []; + for (var i = 0; i < object.evaluations.length; ++i) { + if (typeof object.evaluations[i] !== "object") + throw TypeError(".google.cloud.documentai.v1.ListEvaluationsResponse.evaluations: object expected"); + message.evaluations[i] = $root.google.cloud.documentai.v1.Evaluation.fromObject(object.evaluations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListEvaluationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1.ListEvaluationsResponse + * @static + * @param {google.cloud.documentai.v1.ListEvaluationsResponse} message ListEvaluationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEvaluationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.evaluations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.evaluations && message.evaluations.length) { + object.evaluations = []; + for (var j = 0; j < message.evaluations.length; ++j) + object.evaluations[j] = $root.google.cloud.documentai.v1.Evaluation.toObject(message.evaluations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListEvaluationsResponse to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1.ListEvaluationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListEvaluationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListEvaluationsResponse + * @function getTypeUrl + * @memberof google.cloud.documentai.v1.ListEvaluationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEvaluationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1.ListEvaluationsResponse"; + }; + + return ListEvaluationsResponse; + })(); + + v1.DocumentSchema = (function() { + + /** + * Properties of a DocumentSchema. + * @memberof google.cloud.documentai.v1 + * @interface IDocumentSchema + * @property {string|null} [displayName] DocumentSchema displayName + * @property {string|null} [description] DocumentSchema description + * @property {Array.|null} [entityTypes] DocumentSchema entityTypes + * @property {google.cloud.documentai.v1.DocumentSchema.IMetadata|null} [metadata] DocumentSchema metadata + */ + + /** + * Constructs a new DocumentSchema. + * @memberof google.cloud.documentai.v1 + * @classdesc Represents a DocumentSchema. + * @implements IDocumentSchema + * @constructor + * @param {google.cloud.documentai.v1.IDocumentSchema=} [properties] Properties to set + */ + function DocumentSchema(properties) { + this.entityTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DocumentSchema displayName. + * @member {string} displayName + * @memberof google.cloud.documentai.v1.DocumentSchema + * @instance + */ + DocumentSchema.prototype.displayName = ""; + + /** + * DocumentSchema description. + * @member {string} description + * @memberof google.cloud.documentai.v1.DocumentSchema + * @instance + */ + DocumentSchema.prototype.description = ""; + + /** + * DocumentSchema entityTypes. + * @member {Array.} entityTypes + * @memberof google.cloud.documentai.v1.DocumentSchema + * @instance + */ + DocumentSchema.prototype.entityTypes = $util.emptyArray; + + /** + * DocumentSchema metadata. + * @member {google.cloud.documentai.v1.DocumentSchema.IMetadata|null|undefined} metadata + * @memberof google.cloud.documentai.v1.DocumentSchema + * @instance + */ + DocumentSchema.prototype.metadata = null; + + /** + * Creates a new DocumentSchema instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1.DocumentSchema + * @static + * @param {google.cloud.documentai.v1.IDocumentSchema=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.DocumentSchema} DocumentSchema instance + */ + DocumentSchema.create = function create(properties) { + return new DocumentSchema(properties); + }; + + /** + * Encodes the specified DocumentSchema message. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1.DocumentSchema + * @static + * @param {google.cloud.documentai.v1.IDocumentSchema} message DocumentSchema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentSchema.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.entityTypes != null && message.entityTypes.length) + for (var i = 0; i < message.entityTypes.length; ++i) + $root.google.cloud.documentai.v1.DocumentSchema.EntityType.encode(message.entityTypes[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.cloud.documentai.v1.DocumentSchema.Metadata.encode(message.metadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DocumentSchema message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1.DocumentSchema + * @static + * @param {google.cloud.documentai.v1.IDocumentSchema} message DocumentSchema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentSchema.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DocumentSchema message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1.DocumentSchema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.documentai.v1.DocumentSchema} DocumentSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentSchema.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.DocumentSchema(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + if (!(message.entityTypes && message.entityTypes.length)) + message.entityTypes = []; + message.entityTypes.push($root.google.cloud.documentai.v1.DocumentSchema.EntityType.decode(reader, reader.uint32())); + break; + } + case 4: { + message.metadata = $root.google.cloud.documentai.v1.DocumentSchema.Metadata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DocumentSchema message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1.DocumentSchema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1.DocumentSchema} DocumentSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentSchema.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DocumentSchema message. + * @function verify + * @memberof google.cloud.documentai.v1.DocumentSchema + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DocumentSchema.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.entityTypes != null && message.hasOwnProperty("entityTypes")) { + if (!Array.isArray(message.entityTypes)) + return "entityTypes: array expected"; + for (var i = 0; i < message.entityTypes.length; ++i) { + var error = $root.google.cloud.documentai.v1.DocumentSchema.EntityType.verify(message.entityTypes[i]); + if (error) + return "entityTypes." + error; + } + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.cloud.documentai.v1.DocumentSchema.Metadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + return null; + }; + + /** + * Creates a DocumentSchema message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1.DocumentSchema + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1.DocumentSchema} DocumentSchema + */ + DocumentSchema.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.DocumentSchema) + return object; + var message = new $root.google.cloud.documentai.v1.DocumentSchema(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.entityTypes) { + if (!Array.isArray(object.entityTypes)) + throw TypeError(".google.cloud.documentai.v1.DocumentSchema.entityTypes: array expected"); + message.entityTypes = []; + for (var i = 0; i < object.entityTypes.length; ++i) { + if (typeof object.entityTypes[i] !== "object") + throw TypeError(".google.cloud.documentai.v1.DocumentSchema.entityTypes: object expected"); + message.entityTypes[i] = $root.google.cloud.documentai.v1.DocumentSchema.EntityType.fromObject(object.entityTypes[i]); + } + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.documentai.v1.DocumentSchema.metadata: object expected"); + message.metadata = $root.google.cloud.documentai.v1.DocumentSchema.Metadata.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a DocumentSchema message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1.DocumentSchema + * @static + * @param {google.cloud.documentai.v1.DocumentSchema} message DocumentSchema + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DocumentSchema.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entityTypes = []; + if (options.defaults) { + object.displayName = ""; + object.description = ""; + object.metadata = null; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.entityTypes && message.entityTypes.length) { + object.entityTypes = []; + for (var j = 0; j < message.entityTypes.length; ++j) + object.entityTypes[j] = $root.google.cloud.documentai.v1.DocumentSchema.EntityType.toObject(message.entityTypes[j], options); + } + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.cloud.documentai.v1.DocumentSchema.Metadata.toObject(message.metadata, options); + return object; + }; + + /** + * Converts this DocumentSchema to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1.DocumentSchema + * @instance + * @returns {Object.} JSON object + */ + DocumentSchema.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DocumentSchema + * @function getTypeUrl + * @memberof google.cloud.documentai.v1.DocumentSchema + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DocumentSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1.DocumentSchema"; + }; + + DocumentSchema.EntityType = (function() { + + /** + * Properties of an EntityType. + * @memberof google.cloud.documentai.v1.DocumentSchema + * @interface IEntityType + * @property {google.cloud.documentai.v1.DocumentSchema.EntityType.IEnumValues|null} [enumValues] EntityType enumValues + * @property {string|null} [displayName] EntityType displayName + * @property {string|null} [name] EntityType name + * @property {Array.|null} [baseTypes] EntityType baseTypes + * @property {Array.|null} [properties] EntityType properties + */ + + /** + * Constructs a new EntityType. + * @memberof google.cloud.documentai.v1.DocumentSchema + * @classdesc Represents an EntityType. + * @implements IEntityType + * @constructor + * @param {google.cloud.documentai.v1.DocumentSchema.IEntityType=} [properties] Properties to set + */ + function EntityType(properties) { + this.baseTypes = []; + this.properties = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EntityType enumValues. + * @member {google.cloud.documentai.v1.DocumentSchema.EntityType.IEnumValues|null|undefined} enumValues + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType + * @instance + */ + EntityType.prototype.enumValues = null; + + /** + * EntityType displayName. + * @member {string} displayName + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType + * @instance + */ + EntityType.prototype.displayName = ""; + + /** + * EntityType name. + * @member {string} name + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType + * @instance + */ + EntityType.prototype.name = ""; + + /** + * EntityType baseTypes. + * @member {Array.} baseTypes + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType + * @instance + */ + EntityType.prototype.baseTypes = $util.emptyArray; + + /** + * EntityType properties. + * @member {Array.} properties + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType + * @instance + */ + EntityType.prototype.properties = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * EntityType valueSource. + * @member {"enumValues"|undefined} valueSource + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType + * @instance + */ + Object.defineProperty(EntityType.prototype, "valueSource", { + get: $util.oneOfGetter($oneOfFields = ["enumValues"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new EntityType instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType + * @static + * @param {google.cloud.documentai.v1.DocumentSchema.IEntityType=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.DocumentSchema.EntityType} EntityType instance + */ EntityType.create = function create(properties) { return new EntityType(properties); }; /** - * Encodes the specified EntityType message. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.EntityType.verify|verify} messages. + * Encodes the specified EntityType message. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.EntityType.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType + * @static + * @param {google.cloud.documentai.v1.DocumentSchema.IEntityType} message EntityType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityType.encode = function encode(message, writer) { + 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.baseTypes != null && message.baseTypes.length) + for (var i = 0; i < message.baseTypes.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.baseTypes[i]); + if (message.properties != null && message.properties.length) + for (var i = 0; i < message.properties.length; ++i) + $root.google.cloud.documentai.v1.DocumentSchema.EntityType.Property.encode(message.properties[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.displayName); + if (message.enumValues != null && Object.hasOwnProperty.call(message, "enumValues")) + $root.google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues.encode(message.enumValues, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EntityType message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.EntityType.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType + * @static + * @param {google.cloud.documentai.v1.DocumentSchema.IEntityType} message EntityType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityType.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EntityType message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.documentai.v1.DocumentSchema.EntityType} EntityType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityType.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.DocumentSchema.EntityType(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 14: { + message.enumValues = $root.google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues.decode(reader, reader.uint32()); + break; + } + case 13: { + message.displayName = reader.string(); + break; + } + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.baseTypes && message.baseTypes.length)) + message.baseTypes = []; + message.baseTypes.push(reader.string()); + break; + } + case 6: { + if (!(message.properties && message.properties.length)) + message.properties = []; + message.properties.push($root.google.cloud.documentai.v1.DocumentSchema.EntityType.Property.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EntityType message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1.DocumentSchema.EntityType} EntityType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityType.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EntityType message. + * @function verify + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EntityType.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enumValues != null && message.hasOwnProperty("enumValues")) { + properties.valueSource = 1; + { + var error = $root.google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues.verify(message.enumValues); + if (error) + return "enumValues." + error; + } + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.baseTypes != null && message.hasOwnProperty("baseTypes")) { + if (!Array.isArray(message.baseTypes)) + return "baseTypes: array expected"; + for (var i = 0; i < message.baseTypes.length; ++i) + if (!$util.isString(message.baseTypes[i])) + return "baseTypes: string[] expected"; + } + if (message.properties != null && message.hasOwnProperty("properties")) { + if (!Array.isArray(message.properties)) + return "properties: array expected"; + for (var i = 0; i < message.properties.length; ++i) { + var error = $root.google.cloud.documentai.v1.DocumentSchema.EntityType.Property.verify(message.properties[i]); + if (error) + return "properties." + error; + } + } + return null; + }; + + /** + * Creates an EntityType message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1.DocumentSchema.EntityType} EntityType + */ + EntityType.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.DocumentSchema.EntityType) + return object; + var message = new $root.google.cloud.documentai.v1.DocumentSchema.EntityType(); + if (object.enumValues != null) { + if (typeof object.enumValues !== "object") + throw TypeError(".google.cloud.documentai.v1.DocumentSchema.EntityType.enumValues: object expected"); + message.enumValues = $root.google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues.fromObject(object.enumValues); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.name != null) + message.name = String(object.name); + if (object.baseTypes) { + if (!Array.isArray(object.baseTypes)) + throw TypeError(".google.cloud.documentai.v1.DocumentSchema.EntityType.baseTypes: array expected"); + message.baseTypes = []; + for (var i = 0; i < object.baseTypes.length; ++i) + message.baseTypes[i] = String(object.baseTypes[i]); + } + if (object.properties) { + if (!Array.isArray(object.properties)) + throw TypeError(".google.cloud.documentai.v1.DocumentSchema.EntityType.properties: array expected"); + message.properties = []; + for (var i = 0; i < object.properties.length; ++i) { + if (typeof object.properties[i] !== "object") + throw TypeError(".google.cloud.documentai.v1.DocumentSchema.EntityType.properties: object expected"); + message.properties[i] = $root.google.cloud.documentai.v1.DocumentSchema.EntityType.Property.fromObject(object.properties[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EntityType message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType + * @static + * @param {google.cloud.documentai.v1.DocumentSchema.EntityType} message EntityType + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EntityType.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.baseTypes = []; + object.properties = []; + } + if (options.defaults) { + object.name = ""; + object.displayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.baseTypes && message.baseTypes.length) { + object.baseTypes = []; + for (var j = 0; j < message.baseTypes.length; ++j) + object.baseTypes[j] = message.baseTypes[j]; + } + if (message.properties && message.properties.length) { + object.properties = []; + for (var j = 0; j < message.properties.length; ++j) + object.properties[j] = $root.google.cloud.documentai.v1.DocumentSchema.EntityType.Property.toObject(message.properties[j], options); + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.enumValues != null && message.hasOwnProperty("enumValues")) { + object.enumValues = $root.google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues.toObject(message.enumValues, options); + if (options.oneofs) + object.valueSource = "enumValues"; + } + return object; + }; + + /** + * Converts this EntityType to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType + * @instance + * @returns {Object.} JSON object + */ + EntityType.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EntityType + * @function getTypeUrl + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EntityType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1.DocumentSchema.EntityType"; + }; + + EntityType.EnumValues = (function() { + + /** + * Properties of an EnumValues. + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType + * @interface IEnumValues + * @property {Array.|null} [values] EnumValues values + */ + + /** + * Constructs a new EnumValues. + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType + * @classdesc Represents an EnumValues. + * @implements IEnumValues + * @constructor + * @param {google.cloud.documentai.v1.DocumentSchema.EntityType.IEnumValues=} [properties] Properties to set + */ + function EnumValues(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]]; + } + + /** + * EnumValues values. + * @member {Array.} values + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues + * @instance + */ + EnumValues.prototype.values = $util.emptyArray; + + /** + * Creates a new EnumValues instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues + * @static + * @param {google.cloud.documentai.v1.DocumentSchema.EntityType.IEnumValues=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues} EnumValues instance + */ + EnumValues.create = function create(properties) { + return new EnumValues(properties); + }; + + /** + * Encodes the specified EnumValues message. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues + * @static + * @param {google.cloud.documentai.v1.DocumentSchema.EntityType.IEnumValues} message EnumValues message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValues.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) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]); + return writer; + }; + + /** + * Encodes the specified EnumValues message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues + * @static + * @param {google.cloud.documentai.v1.DocumentSchema.EntityType.IEnumValues} message EnumValues message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValues.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValues message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues} EnumValues + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValues.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValues message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues} EnumValues + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValues.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValues message. + * @function verify + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValues.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) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumValues message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues} EnumValues + */ + EnumValues.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues) + return object; + var message = new $root.google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumValues message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues + * @static + * @param {google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues} message EnumValues + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValues.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] = message.values[j]; + } + return object; + }; + + /** + * Converts this EnumValues to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues + * @instance + * @returns {Object.} JSON object + */ + EnumValues.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValues + * @function getTypeUrl + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValues.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues"; + }; + + return EnumValues; + })(); + + EntityType.Property = (function() { + + /** + * Properties of a Property. + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType + * @interface IProperty + * @property {string|null} [name] Property name + * @property {string|null} [valueType] Property valueType + * @property {google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType|null} [occurrenceType] Property occurrenceType + */ + + /** + * Constructs a new Property. + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType + * @classdesc Represents a Property. + * @implements IProperty + * @constructor + * @param {google.cloud.documentai.v1.DocumentSchema.EntityType.IProperty=} [properties] Properties to set + */ + function Property(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Property name. + * @member {string} name + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.Property + * @instance + */ + Property.prototype.name = ""; + + /** + * Property valueType. + * @member {string} valueType + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.Property + * @instance + */ + Property.prototype.valueType = ""; + + /** + * Property occurrenceType. + * @member {google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType} occurrenceType + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.Property + * @instance + */ + Property.prototype.occurrenceType = 0; + + /** + * Creates a new Property instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.Property + * @static + * @param {google.cloud.documentai.v1.DocumentSchema.EntityType.IProperty=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.DocumentSchema.EntityType.Property} Property instance + */ + Property.create = function create(properties) { + return new Property(properties); + }; + + /** + * Encodes the specified Property message. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.EntityType.Property.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.Property + * @static + * @param {google.cloud.documentai.v1.DocumentSchema.EntityType.IProperty} message Property message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Property.encode = function encode(message, writer) { + 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.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.valueType); + if (message.occurrenceType != null && Object.hasOwnProperty.call(message, "occurrenceType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.occurrenceType); + return writer; + }; + + /** + * Encodes the specified Property message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.EntityType.Property.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.Property + * @static + * @param {google.cloud.documentai.v1.DocumentSchema.EntityType.IProperty} message Property message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Property.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Property message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.Property + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.documentai.v1.DocumentSchema.EntityType.Property} Property + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Property.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.DocumentSchema.EntityType.Property(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.valueType = reader.string(); + break; + } + case 3: { + message.occurrenceType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Property message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.Property + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1.DocumentSchema.EntityType.Property} Property + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Property.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Property message. + * @function verify + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.Property + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Property.verify = function verify(message) { + if (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.valueType != null && message.hasOwnProperty("valueType")) + if (!$util.isString(message.valueType)) + return "valueType: string expected"; + if (message.occurrenceType != null && message.hasOwnProperty("occurrenceType")) + switch (message.occurrenceType) { + default: + return "occurrenceType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a Property message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.Property + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1.DocumentSchema.EntityType.Property} Property + */ + Property.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.DocumentSchema.EntityType.Property) + return object; + var message = new $root.google.cloud.documentai.v1.DocumentSchema.EntityType.Property(); + if (object.name != null) + message.name = String(object.name); + if (object.valueType != null) + message.valueType = String(object.valueType); + switch (object.occurrenceType) { + default: + if (typeof object.occurrenceType === "number") { + message.occurrenceType = object.occurrenceType; + break; + } + break; + case "OCCURRENCE_TYPE_UNSPECIFIED": + case 0: + message.occurrenceType = 0; + break; + case "OPTIONAL_ONCE": + case 1: + message.occurrenceType = 1; + break; + case "OPTIONAL_MULTIPLE": + case 2: + message.occurrenceType = 2; + break; + case "REQUIRED_ONCE": + case 3: + message.occurrenceType = 3; + break; + case "REQUIRED_MULTIPLE": + case 4: + message.occurrenceType = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a Property message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.Property + * @static + * @param {google.cloud.documentai.v1.DocumentSchema.EntityType.Property} message Property + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Property.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.valueType = ""; + object.occurrenceType = options.enums === String ? "OCCURRENCE_TYPE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.valueType != null && message.hasOwnProperty("valueType")) + object.valueType = message.valueType; + if (message.occurrenceType != null && message.hasOwnProperty("occurrenceType")) + object.occurrenceType = options.enums === String ? $root.google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType[message.occurrenceType] === undefined ? message.occurrenceType : $root.google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType[message.occurrenceType] : message.occurrenceType; + return object; + }; + + /** + * Converts this Property to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.Property + * @instance + * @returns {Object.} JSON object + */ + Property.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Property + * @function getTypeUrl + * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.Property + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Property.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1.DocumentSchema.EntityType.Property"; + }; + + /** + * OccurrenceType enum. + * @name google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType + * @enum {number} + * @property {number} OCCURRENCE_TYPE_UNSPECIFIED=0 OCCURRENCE_TYPE_UNSPECIFIED value + * @property {number} OPTIONAL_ONCE=1 OPTIONAL_ONCE value + * @property {number} OPTIONAL_MULTIPLE=2 OPTIONAL_MULTIPLE value + * @property {number} REQUIRED_ONCE=3 REQUIRED_ONCE value + * @property {number} REQUIRED_MULTIPLE=4 REQUIRED_MULTIPLE value + */ + Property.OccurrenceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OCCURRENCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL_ONCE"] = 1; + values[valuesById[2] = "OPTIONAL_MULTIPLE"] = 2; + values[valuesById[3] = "REQUIRED_ONCE"] = 3; + values[valuesById[4] = "REQUIRED_MULTIPLE"] = 4; + return values; + })(); + + return Property; + })(); + + return EntityType; + })(); + + DocumentSchema.Metadata = (function() { + + /** + * Properties of a Metadata. + * @memberof google.cloud.documentai.v1.DocumentSchema + * @interface IMetadata + * @property {boolean|null} [documentSplitter] Metadata documentSplitter + * @property {boolean|null} [documentAllowMultipleLabels] Metadata documentAllowMultipleLabels + * @property {boolean|null} [prefixedNamingOnProperties] Metadata prefixedNamingOnProperties + * @property {boolean|null} [skipNamingValidation] Metadata skipNamingValidation + */ + + /** + * Constructs a new Metadata. + * @memberof google.cloud.documentai.v1.DocumentSchema + * @classdesc Represents a Metadata. + * @implements IMetadata + * @constructor + * @param {google.cloud.documentai.v1.DocumentSchema.IMetadata=} [properties] Properties to set + */ + function Metadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metadata documentSplitter. + * @member {boolean} documentSplitter + * @memberof google.cloud.documentai.v1.DocumentSchema.Metadata + * @instance + */ + Metadata.prototype.documentSplitter = false; + + /** + * Metadata documentAllowMultipleLabels. + * @member {boolean} documentAllowMultipleLabels + * @memberof google.cloud.documentai.v1.DocumentSchema.Metadata + * @instance + */ + Metadata.prototype.documentAllowMultipleLabels = false; + + /** + * Metadata prefixedNamingOnProperties. + * @member {boolean} prefixedNamingOnProperties + * @memberof google.cloud.documentai.v1.DocumentSchema.Metadata + * @instance + */ + Metadata.prototype.prefixedNamingOnProperties = false; + + /** + * Metadata skipNamingValidation. + * @member {boolean} skipNamingValidation + * @memberof google.cloud.documentai.v1.DocumentSchema.Metadata + * @instance + */ + Metadata.prototype.skipNamingValidation = false; + + /** + * Creates a new Metadata instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1.DocumentSchema.Metadata + * @static + * @param {google.cloud.documentai.v1.DocumentSchema.IMetadata=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.DocumentSchema.Metadata} Metadata instance + */ + Metadata.create = function create(properties) { + return new Metadata(properties); + }; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.Metadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1.DocumentSchema.Metadata + * @static + * @param {google.cloud.documentai.v1.DocumentSchema.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.documentSplitter != null && Object.hasOwnProperty.call(message, "documentSplitter")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.documentSplitter); + if (message.documentAllowMultipleLabels != null && Object.hasOwnProperty.call(message, "documentAllowMultipleLabels")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.documentAllowMultipleLabels); + if (message.prefixedNamingOnProperties != null && Object.hasOwnProperty.call(message, "prefixedNamingOnProperties")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.prefixedNamingOnProperties); + if (message.skipNamingValidation != null && Object.hasOwnProperty.call(message, "skipNamingValidation")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.skipNamingValidation); + return writer; + }; + + /** + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.Metadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1.DocumentSchema.Metadata + * @static + * @param {google.cloud.documentai.v1.DocumentSchema.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1.DocumentSchema.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.documentai.v1.DocumentSchema.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.DocumentSchema.Metadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.documentSplitter = reader.bool(); + break; + } + case 2: { + message.documentAllowMultipleLabels = reader.bool(); + break; + } + case 6: { + message.prefixedNamingOnProperties = reader.bool(); + break; + } + case 7: { + message.skipNamingValidation = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1.DocumentSchema.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1.DocumentSchema.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metadata message. + * @function verify + * @memberof google.cloud.documentai.v1.DocumentSchema.Metadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.documentSplitter != null && message.hasOwnProperty("documentSplitter")) + if (typeof message.documentSplitter !== "boolean") + return "documentSplitter: boolean expected"; + if (message.documentAllowMultipleLabels != null && message.hasOwnProperty("documentAllowMultipleLabels")) + if (typeof message.documentAllowMultipleLabels !== "boolean") + return "documentAllowMultipleLabels: boolean expected"; + if (message.prefixedNamingOnProperties != null && message.hasOwnProperty("prefixedNamingOnProperties")) + if (typeof message.prefixedNamingOnProperties !== "boolean") + return "prefixedNamingOnProperties: boolean expected"; + if (message.skipNamingValidation != null && message.hasOwnProperty("skipNamingValidation")) + if (typeof message.skipNamingValidation !== "boolean") + return "skipNamingValidation: boolean expected"; + return null; + }; + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1.DocumentSchema.Metadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1.DocumentSchema.Metadata} Metadata + */ + Metadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.DocumentSchema.Metadata) + return object; + var message = new $root.google.cloud.documentai.v1.DocumentSchema.Metadata(); + if (object.documentSplitter != null) + message.documentSplitter = Boolean(object.documentSplitter); + if (object.documentAllowMultipleLabels != null) + message.documentAllowMultipleLabels = Boolean(object.documentAllowMultipleLabels); + if (object.prefixedNamingOnProperties != null) + message.prefixedNamingOnProperties = Boolean(object.prefixedNamingOnProperties); + if (object.skipNamingValidation != null) + message.skipNamingValidation = Boolean(object.skipNamingValidation); + return message; + }; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1.DocumentSchema.Metadata + * @static + * @param {google.cloud.documentai.v1.DocumentSchema.Metadata} message Metadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.documentSplitter = false; + object.documentAllowMultipleLabels = false; + object.prefixedNamingOnProperties = false; + object.skipNamingValidation = false; + } + if (message.documentSplitter != null && message.hasOwnProperty("documentSplitter")) + object.documentSplitter = message.documentSplitter; + if (message.documentAllowMultipleLabels != null && message.hasOwnProperty("documentAllowMultipleLabels")) + object.documentAllowMultipleLabels = message.documentAllowMultipleLabels; + if (message.prefixedNamingOnProperties != null && message.hasOwnProperty("prefixedNamingOnProperties")) + object.prefixedNamingOnProperties = message.prefixedNamingOnProperties; + if (message.skipNamingValidation != null && message.hasOwnProperty("skipNamingValidation")) + object.skipNamingValidation = message.skipNamingValidation; + return object; + }; + + /** + * Converts this Metadata to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1.DocumentSchema.Metadata + * @instance + * @returns {Object.} JSON object + */ + Metadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Metadata + * @function getTypeUrl + * @memberof google.cloud.documentai.v1.DocumentSchema.Metadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1.DocumentSchema.Metadata"; + }; + + return Metadata; + })(); + + return DocumentSchema; + })(); + + v1.EvaluationReference = (function() { + + /** + * Properties of an EvaluationReference. + * @memberof google.cloud.documentai.v1 + * @interface IEvaluationReference + * @property {string|null} [operation] EvaluationReference operation + * @property {string|null} [evaluation] EvaluationReference evaluation + * @property {google.cloud.documentai.v1.Evaluation.IMetrics|null} [aggregateMetrics] EvaluationReference aggregateMetrics + * @property {google.cloud.documentai.v1.Evaluation.IMetrics|null} [aggregateMetricsExact] EvaluationReference aggregateMetricsExact + */ + + /** + * Constructs a new EvaluationReference. + * @memberof google.cloud.documentai.v1 + * @classdesc Represents an EvaluationReference. + * @implements IEvaluationReference + * @constructor + * @param {google.cloud.documentai.v1.IEvaluationReference=} [properties] Properties to set + */ + function EvaluationReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EvaluationReference operation. + * @member {string} operation + * @memberof google.cloud.documentai.v1.EvaluationReference + * @instance + */ + EvaluationReference.prototype.operation = ""; + + /** + * EvaluationReference evaluation. + * @member {string} evaluation + * @memberof google.cloud.documentai.v1.EvaluationReference + * @instance + */ + EvaluationReference.prototype.evaluation = ""; + + /** + * EvaluationReference aggregateMetrics. + * @member {google.cloud.documentai.v1.Evaluation.IMetrics|null|undefined} aggregateMetrics + * @memberof google.cloud.documentai.v1.EvaluationReference + * @instance + */ + EvaluationReference.prototype.aggregateMetrics = null; + + /** + * EvaluationReference aggregateMetricsExact. + * @member {google.cloud.documentai.v1.Evaluation.IMetrics|null|undefined} aggregateMetricsExact + * @memberof google.cloud.documentai.v1.EvaluationReference + * @instance + */ + EvaluationReference.prototype.aggregateMetricsExact = null; + + /** + * Creates a new EvaluationReference instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1.EvaluationReference + * @static + * @param {google.cloud.documentai.v1.IEvaluationReference=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.EvaluationReference} EvaluationReference instance + */ + EvaluationReference.create = function create(properties) { + return new EvaluationReference(properties); + }; + + /** + * Encodes the specified EvaluationReference message. Does not implicitly {@link google.cloud.documentai.v1.EvaluationReference.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1.EvaluationReference + * @static + * @param {google.cloud.documentai.v1.IEvaluationReference} message EvaluationReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvaluationReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.operation); + if (message.evaluation != null && Object.hasOwnProperty.call(message, "evaluation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.evaluation); + if (message.aggregateMetrics != null && Object.hasOwnProperty.call(message, "aggregateMetrics")) + $root.google.cloud.documentai.v1.Evaluation.Metrics.encode(message.aggregateMetrics, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.aggregateMetricsExact != null && Object.hasOwnProperty.call(message, "aggregateMetricsExact")) + $root.google.cloud.documentai.v1.Evaluation.Metrics.encode(message.aggregateMetricsExact, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EvaluationReference message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.EvaluationReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1.EvaluationReference + * @static + * @param {google.cloud.documentai.v1.IEvaluationReference} message EvaluationReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvaluationReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EvaluationReference message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1.EvaluationReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.documentai.v1.EvaluationReference} EvaluationReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvaluationReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.EvaluationReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.operation = reader.string(); + break; + } + case 2: { + message.evaluation = reader.string(); + break; + } + case 4: { + message.aggregateMetrics = $root.google.cloud.documentai.v1.Evaluation.Metrics.decode(reader, reader.uint32()); + break; + } + case 5: { + message.aggregateMetricsExact = $root.google.cloud.documentai.v1.Evaluation.Metrics.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EvaluationReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1.EvaluationReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1.EvaluationReference} EvaluationReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvaluationReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EvaluationReference message. + * @function verify + * @memberof google.cloud.documentai.v1.EvaluationReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EvaluationReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operation != null && message.hasOwnProperty("operation")) + if (!$util.isString(message.operation)) + return "operation: string expected"; + if (message.evaluation != null && message.hasOwnProperty("evaluation")) + if (!$util.isString(message.evaluation)) + return "evaluation: string expected"; + if (message.aggregateMetrics != null && message.hasOwnProperty("aggregateMetrics")) { + var error = $root.google.cloud.documentai.v1.Evaluation.Metrics.verify(message.aggregateMetrics); + if (error) + return "aggregateMetrics." + error; + } + if (message.aggregateMetricsExact != null && message.hasOwnProperty("aggregateMetricsExact")) { + var error = $root.google.cloud.documentai.v1.Evaluation.Metrics.verify(message.aggregateMetricsExact); + if (error) + return "aggregateMetricsExact." + error; + } + return null; + }; + + /** + * Creates an EvaluationReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1.EvaluationReference + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1.EvaluationReference} EvaluationReference + */ + EvaluationReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.EvaluationReference) + return object; + var message = new $root.google.cloud.documentai.v1.EvaluationReference(); + if (object.operation != null) + message.operation = String(object.operation); + if (object.evaluation != null) + message.evaluation = String(object.evaluation); + if (object.aggregateMetrics != null) { + if (typeof object.aggregateMetrics !== "object") + throw TypeError(".google.cloud.documentai.v1.EvaluationReference.aggregateMetrics: object expected"); + message.aggregateMetrics = $root.google.cloud.documentai.v1.Evaluation.Metrics.fromObject(object.aggregateMetrics); + } + if (object.aggregateMetricsExact != null) { + if (typeof object.aggregateMetricsExact !== "object") + throw TypeError(".google.cloud.documentai.v1.EvaluationReference.aggregateMetricsExact: object expected"); + message.aggregateMetricsExact = $root.google.cloud.documentai.v1.Evaluation.Metrics.fromObject(object.aggregateMetricsExact); + } + return message; + }; + + /** + * Creates a plain object from an EvaluationReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1.EvaluationReference + * @static + * @param {google.cloud.documentai.v1.EvaluationReference} message EvaluationReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EvaluationReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.operation = ""; + object.evaluation = ""; + object.aggregateMetrics = null; + object.aggregateMetricsExact = null; + } + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = message.operation; + if (message.evaluation != null && message.hasOwnProperty("evaluation")) + object.evaluation = message.evaluation; + if (message.aggregateMetrics != null && message.hasOwnProperty("aggregateMetrics")) + object.aggregateMetrics = $root.google.cloud.documentai.v1.Evaluation.Metrics.toObject(message.aggregateMetrics, options); + if (message.aggregateMetricsExact != null && message.hasOwnProperty("aggregateMetricsExact")) + object.aggregateMetricsExact = $root.google.cloud.documentai.v1.Evaluation.Metrics.toObject(message.aggregateMetricsExact, options); + return object; + }; + + /** + * Converts this EvaluationReference to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1.EvaluationReference + * @instance + * @returns {Object.} JSON object + */ + EvaluationReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EvaluationReference + * @function getTypeUrl + * @memberof google.cloud.documentai.v1.EvaluationReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EvaluationReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1.EvaluationReference"; + }; + + return EvaluationReference; + })(); + + v1.Evaluation = (function() { + + /** + * Properties of an Evaluation. + * @memberof google.cloud.documentai.v1 + * @interface IEvaluation + * @property {string|null} [name] Evaluation name + * @property {google.protobuf.ITimestamp|null} [createTime] Evaluation createTime + * @property {google.cloud.documentai.v1.Evaluation.ICounters|null} [documentCounters] Evaluation documentCounters + * @property {google.cloud.documentai.v1.Evaluation.IMultiConfidenceMetrics|null} [allEntitiesMetrics] Evaluation allEntitiesMetrics + * @property {Object.|null} [entityMetrics] Evaluation entityMetrics + * @property {string|null} [kmsKeyName] Evaluation kmsKeyName + * @property {string|null} [kmsKeyVersionName] Evaluation kmsKeyVersionName + */ + + /** + * Constructs a new Evaluation. + * @memberof google.cloud.documentai.v1 + * @classdesc Represents an Evaluation. + * @implements IEvaluation + * @constructor + * @param {google.cloud.documentai.v1.IEvaluation=} [properties] Properties to set + */ + function Evaluation(properties) { + this.entityMetrics = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Evaluation name. + * @member {string} name + * @memberof google.cloud.documentai.v1.Evaluation + * @instance + */ + Evaluation.prototype.name = ""; + + /** + * Evaluation createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.documentai.v1.Evaluation + * @instance + */ + Evaluation.prototype.createTime = null; + + /** + * Evaluation documentCounters. + * @member {google.cloud.documentai.v1.Evaluation.ICounters|null|undefined} documentCounters + * @memberof google.cloud.documentai.v1.Evaluation + * @instance + */ + Evaluation.prototype.documentCounters = null; + + /** + * Evaluation allEntitiesMetrics. + * @member {google.cloud.documentai.v1.Evaluation.IMultiConfidenceMetrics|null|undefined} allEntitiesMetrics + * @memberof google.cloud.documentai.v1.Evaluation + * @instance + */ + Evaluation.prototype.allEntitiesMetrics = null; + + /** + * Evaluation entityMetrics. + * @member {Object.} entityMetrics + * @memberof google.cloud.documentai.v1.Evaluation + * @instance + */ + Evaluation.prototype.entityMetrics = $util.emptyObject; + + /** + * Evaluation kmsKeyName. + * @member {string} kmsKeyName + * @memberof google.cloud.documentai.v1.Evaluation + * @instance + */ + Evaluation.prototype.kmsKeyName = ""; + + /** + * Evaluation kmsKeyVersionName. + * @member {string} kmsKeyVersionName + * @memberof google.cloud.documentai.v1.Evaluation + * @instance + */ + Evaluation.prototype.kmsKeyVersionName = ""; + + /** + * Creates a new Evaluation instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1.Evaluation + * @static + * @param {google.cloud.documentai.v1.IEvaluation=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.Evaluation} Evaluation instance + */ + Evaluation.create = function create(properties) { + return new Evaluation(properties); + }; + + /** + * Encodes the specified Evaluation message. Does not implicitly {@link google.cloud.documentai.v1.Evaluation.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1.Evaluation + * @static + * @param {google.cloud.documentai.v1.IEvaluation} message Evaluation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Evaluation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.allEntitiesMetrics != null && Object.hasOwnProperty.call(message, "allEntitiesMetrics")) + $root.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.encode(message.allEntitiesMetrics, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.entityMetrics != null && Object.hasOwnProperty.call(message, "entityMetrics")) + for (var keys = Object.keys(message.entityMetrics), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.encode(message.entityMetrics[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.documentCounters != null && Object.hasOwnProperty.call(message, "documentCounters")) + $root.google.cloud.documentai.v1.Evaluation.Counters.encode(message.documentCounters, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.kmsKeyName); + if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.kmsKeyVersionName); + return writer; + }; + + /** + * Encodes the specified Evaluation message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.Evaluation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1.Evaluation + * @static + * @param {google.cloud.documentai.v1.IEvaluation} message Evaluation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Evaluation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Evaluation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1.Evaluation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.documentai.v1.Evaluation} Evaluation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Evaluation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.Evaluation(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.documentCounters = $root.google.cloud.documentai.v1.Evaluation.Counters.decode(reader, reader.uint32()); + break; + } + case 3: { + message.allEntitiesMetrics = $root.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.decode(reader, reader.uint32()); + break; + } + case 4: { + if (message.entityMetrics === $util.emptyObject) + message.entityMetrics = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.entityMetrics[key] = value; + break; + } + case 6: { + message.kmsKeyName = reader.string(); + break; + } + case 7: { + message.kmsKeyVersionName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Evaluation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1.Evaluation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1.Evaluation} Evaluation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Evaluation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Evaluation message. + * @function verify + * @memberof google.cloud.documentai.v1.Evaluation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Evaluation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.documentCounters != null && message.hasOwnProperty("documentCounters")) { + var error = $root.google.cloud.documentai.v1.Evaluation.Counters.verify(message.documentCounters); + if (error) + return "documentCounters." + error; + } + if (message.allEntitiesMetrics != null && message.hasOwnProperty("allEntitiesMetrics")) { + var error = $root.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.verify(message.allEntitiesMetrics); + if (error) + return "allEntitiesMetrics." + error; + } + if (message.entityMetrics != null && message.hasOwnProperty("entityMetrics")) { + if (!$util.isObject(message.entityMetrics)) + return "entityMetrics: object expected"; + var key = Object.keys(message.entityMetrics); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.verify(message.entityMetrics[key[i]]); + if (error) + return "entityMetrics." + error; + } + } + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (!$util.isString(message.kmsKeyName)) + return "kmsKeyName: string expected"; + if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) + if (!$util.isString(message.kmsKeyVersionName)) + return "kmsKeyVersionName: string expected"; + return null; + }; + + /** + * Creates an Evaluation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1.Evaluation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1.Evaluation} Evaluation + */ + Evaluation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.Evaluation) + return object; + var message = new $root.google.cloud.documentai.v1.Evaluation(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.documentai.v1.Evaluation.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.documentCounters != null) { + if (typeof object.documentCounters !== "object") + throw TypeError(".google.cloud.documentai.v1.Evaluation.documentCounters: object expected"); + message.documentCounters = $root.google.cloud.documentai.v1.Evaluation.Counters.fromObject(object.documentCounters); + } + if (object.allEntitiesMetrics != null) { + if (typeof object.allEntitiesMetrics !== "object") + throw TypeError(".google.cloud.documentai.v1.Evaluation.allEntitiesMetrics: object expected"); + message.allEntitiesMetrics = $root.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.fromObject(object.allEntitiesMetrics); + } + if (object.entityMetrics) { + if (typeof object.entityMetrics !== "object") + throw TypeError(".google.cloud.documentai.v1.Evaluation.entityMetrics: object expected"); + message.entityMetrics = {}; + for (var keys = Object.keys(object.entityMetrics), i = 0; i < keys.length; ++i) { + if (typeof object.entityMetrics[keys[i]] !== "object") + throw TypeError(".google.cloud.documentai.v1.Evaluation.entityMetrics: object expected"); + message.entityMetrics[keys[i]] = $root.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.fromObject(object.entityMetrics[keys[i]]); + } + } + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + if (object.kmsKeyVersionName != null) + message.kmsKeyVersionName = String(object.kmsKeyVersionName); + return message; + }; + + /** + * Creates a plain object from an Evaluation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1.Evaluation + * @static + * @param {google.cloud.documentai.v1.Evaluation} message Evaluation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Evaluation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.entityMetrics = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.allEntitiesMetrics = null; + object.documentCounters = null; + object.kmsKeyName = ""; + object.kmsKeyVersionName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.allEntitiesMetrics != null && message.hasOwnProperty("allEntitiesMetrics")) + object.allEntitiesMetrics = $root.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.toObject(message.allEntitiesMetrics, options); + var keys2; + if (message.entityMetrics && (keys2 = Object.keys(message.entityMetrics)).length) { + object.entityMetrics = {}; + for (var j = 0; j < keys2.length; ++j) + object.entityMetrics[keys2[j]] = $root.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.toObject(message.entityMetrics[keys2[j]], options); + } + if (message.documentCounters != null && message.hasOwnProperty("documentCounters")) + object.documentCounters = $root.google.cloud.documentai.v1.Evaluation.Counters.toObject(message.documentCounters, options); + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + object.kmsKeyName = message.kmsKeyName; + if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) + object.kmsKeyVersionName = message.kmsKeyVersionName; + return object; + }; + + /** + * Converts this Evaluation to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1.Evaluation + * @instance + * @returns {Object.} JSON object + */ + Evaluation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Evaluation + * @function getTypeUrl + * @memberof google.cloud.documentai.v1.Evaluation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Evaluation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1.Evaluation"; + }; + + Evaluation.Counters = (function() { + + /** + * Properties of a Counters. + * @memberof google.cloud.documentai.v1.Evaluation + * @interface ICounters + * @property {number|null} [inputDocumentsCount] Counters inputDocumentsCount + * @property {number|null} [invalidDocumentsCount] Counters invalidDocumentsCount + * @property {number|null} [failedDocumentsCount] Counters failedDocumentsCount + * @property {number|null} [evaluatedDocumentsCount] Counters evaluatedDocumentsCount + */ + + /** + * Constructs a new Counters. + * @memberof google.cloud.documentai.v1.Evaluation + * @classdesc Represents a Counters. + * @implements ICounters + * @constructor + * @param {google.cloud.documentai.v1.Evaluation.ICounters=} [properties] Properties to set + */ + function Counters(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Counters inputDocumentsCount. + * @member {number} inputDocumentsCount + * @memberof google.cloud.documentai.v1.Evaluation.Counters + * @instance + */ + Counters.prototype.inputDocumentsCount = 0; + + /** + * Counters invalidDocumentsCount. + * @member {number} invalidDocumentsCount + * @memberof google.cloud.documentai.v1.Evaluation.Counters + * @instance + */ + Counters.prototype.invalidDocumentsCount = 0; + + /** + * Counters failedDocumentsCount. + * @member {number} failedDocumentsCount + * @memberof google.cloud.documentai.v1.Evaluation.Counters + * @instance + */ + Counters.prototype.failedDocumentsCount = 0; + + /** + * Counters evaluatedDocumentsCount. + * @member {number} evaluatedDocumentsCount + * @memberof google.cloud.documentai.v1.Evaluation.Counters + * @instance + */ + Counters.prototype.evaluatedDocumentsCount = 0; + + /** + * Creates a new Counters instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1.Evaluation.Counters + * @static + * @param {google.cloud.documentai.v1.Evaluation.ICounters=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.Evaluation.Counters} Counters instance + */ + Counters.create = function create(properties) { + return new Counters(properties); + }; + + /** + * Encodes the specified Counters message. Does not implicitly {@link google.cloud.documentai.v1.Evaluation.Counters.verify|verify} messages. * @function encode - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType + * @memberof google.cloud.documentai.v1.Evaluation.Counters * @static - * @param {google.cloud.documentai.v1.DocumentSchema.IEntityType} message EntityType message or plain object to encode + * @param {google.cloud.documentai.v1.Evaluation.ICounters} message Counters message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Counters.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inputDocumentsCount != null && Object.hasOwnProperty.call(message, "inputDocumentsCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.inputDocumentsCount); + if (message.invalidDocumentsCount != null && Object.hasOwnProperty.call(message, "invalidDocumentsCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.invalidDocumentsCount); + if (message.failedDocumentsCount != null && Object.hasOwnProperty.call(message, "failedDocumentsCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.failedDocumentsCount); + if (message.evaluatedDocumentsCount != null && Object.hasOwnProperty.call(message, "evaluatedDocumentsCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.evaluatedDocumentsCount); + return writer; + }; + + /** + * Encodes the specified Counters message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.Evaluation.Counters.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1.Evaluation.Counters + * @static + * @param {google.cloud.documentai.v1.Evaluation.ICounters} message Counters message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EntityType.encode = function encode(message, writer) { - 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.baseTypes != null && message.baseTypes.length) - for (var i = 0; i < message.baseTypes.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.baseTypes[i]); - if (message.properties != null && message.properties.length) - for (var i = 0; i < message.properties.length; ++i) - $root.google.cloud.documentai.v1.DocumentSchema.EntityType.Property.encode(message.properties[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.displayName); - if (message.enumValues != null && Object.hasOwnProperty.call(message, "enumValues")) - $root.google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues.encode(message.enumValues, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - return writer; - }; + Counters.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Counters message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1.Evaluation.Counters + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.documentai.v1.Evaluation.Counters} Counters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Counters.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.Evaluation.Counters(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.inputDocumentsCount = reader.int32(); + break; + } + case 2: { + message.invalidDocumentsCount = reader.int32(); + break; + } + case 3: { + message.failedDocumentsCount = reader.int32(); + break; + } + case 4: { + message.evaluatedDocumentsCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Counters message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1.Evaluation.Counters + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1.Evaluation.Counters} Counters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Counters.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Counters message. + * @function verify + * @memberof google.cloud.documentai.v1.Evaluation.Counters + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Counters.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.inputDocumentsCount != null && message.hasOwnProperty("inputDocumentsCount")) + if (!$util.isInteger(message.inputDocumentsCount)) + return "inputDocumentsCount: integer expected"; + if (message.invalidDocumentsCount != null && message.hasOwnProperty("invalidDocumentsCount")) + if (!$util.isInteger(message.invalidDocumentsCount)) + return "invalidDocumentsCount: integer expected"; + if (message.failedDocumentsCount != null && message.hasOwnProperty("failedDocumentsCount")) + if (!$util.isInteger(message.failedDocumentsCount)) + return "failedDocumentsCount: integer expected"; + if (message.evaluatedDocumentsCount != null && message.hasOwnProperty("evaluatedDocumentsCount")) + if (!$util.isInteger(message.evaluatedDocumentsCount)) + return "evaluatedDocumentsCount: integer expected"; + return null; + }; + + /** + * Creates a Counters message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1.Evaluation.Counters + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1.Evaluation.Counters} Counters + */ + Counters.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.Evaluation.Counters) + return object; + var message = new $root.google.cloud.documentai.v1.Evaluation.Counters(); + if (object.inputDocumentsCount != null) + message.inputDocumentsCount = object.inputDocumentsCount | 0; + if (object.invalidDocumentsCount != null) + message.invalidDocumentsCount = object.invalidDocumentsCount | 0; + if (object.failedDocumentsCount != null) + message.failedDocumentsCount = object.failedDocumentsCount | 0; + if (object.evaluatedDocumentsCount != null) + message.evaluatedDocumentsCount = object.evaluatedDocumentsCount | 0; + return message; + }; + + /** + * Creates a plain object from a Counters message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1.Evaluation.Counters + * @static + * @param {google.cloud.documentai.v1.Evaluation.Counters} message Counters + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Counters.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.inputDocumentsCount = 0; + object.invalidDocumentsCount = 0; + object.failedDocumentsCount = 0; + object.evaluatedDocumentsCount = 0; + } + if (message.inputDocumentsCount != null && message.hasOwnProperty("inputDocumentsCount")) + object.inputDocumentsCount = message.inputDocumentsCount; + if (message.invalidDocumentsCount != null && message.hasOwnProperty("invalidDocumentsCount")) + object.invalidDocumentsCount = message.invalidDocumentsCount; + if (message.failedDocumentsCount != null && message.hasOwnProperty("failedDocumentsCount")) + object.failedDocumentsCount = message.failedDocumentsCount; + if (message.evaluatedDocumentsCount != null && message.hasOwnProperty("evaluatedDocumentsCount")) + object.evaluatedDocumentsCount = message.evaluatedDocumentsCount; + return object; + }; + + /** + * Converts this Counters to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1.Evaluation.Counters + * @instance + * @returns {Object.} JSON object + */ + Counters.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Counters + * @function getTypeUrl + * @memberof google.cloud.documentai.v1.Evaluation.Counters + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Counters.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1.Evaluation.Counters"; + }; + + return Counters; + })(); + + Evaluation.Metrics = (function() { + + /** + * Properties of a Metrics. + * @memberof google.cloud.documentai.v1.Evaluation + * @interface IMetrics + * @property {number|null} [precision] Metrics precision + * @property {number|null} [recall] Metrics recall + * @property {number|null} [f1Score] Metrics f1Score + * @property {number|null} [predictedOccurrencesCount] Metrics predictedOccurrencesCount + * @property {number|null} [groundTruthOccurrencesCount] Metrics groundTruthOccurrencesCount + * @property {number|null} [predictedDocumentCount] Metrics predictedDocumentCount + * @property {number|null} [groundTruthDocumentCount] Metrics groundTruthDocumentCount + * @property {number|null} [truePositivesCount] Metrics truePositivesCount + * @property {number|null} [falsePositivesCount] Metrics falsePositivesCount + * @property {number|null} [falseNegativesCount] Metrics falseNegativesCount + * @property {number|null} [totalDocumentsCount] Metrics totalDocumentsCount + */ + + /** + * Constructs a new Metrics. + * @memberof google.cloud.documentai.v1.Evaluation + * @classdesc Represents a Metrics. + * @implements IMetrics + * @constructor + * @param {google.cloud.documentai.v1.Evaluation.IMetrics=} [properties] Properties to set + */ + function Metrics(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metrics precision. + * @member {number} precision + * @memberof google.cloud.documentai.v1.Evaluation.Metrics + * @instance + */ + Metrics.prototype.precision = 0; + + /** + * Metrics recall. + * @member {number} recall + * @memberof google.cloud.documentai.v1.Evaluation.Metrics + * @instance + */ + Metrics.prototype.recall = 0; + + /** + * Metrics f1Score. + * @member {number} f1Score + * @memberof google.cloud.documentai.v1.Evaluation.Metrics + * @instance + */ + Metrics.prototype.f1Score = 0; + + /** + * Metrics predictedOccurrencesCount. + * @member {number} predictedOccurrencesCount + * @memberof google.cloud.documentai.v1.Evaluation.Metrics + * @instance + */ + Metrics.prototype.predictedOccurrencesCount = 0; + + /** + * Metrics groundTruthOccurrencesCount. + * @member {number} groundTruthOccurrencesCount + * @memberof google.cloud.documentai.v1.Evaluation.Metrics + * @instance + */ + Metrics.prototype.groundTruthOccurrencesCount = 0; + + /** + * Metrics predictedDocumentCount. + * @member {number} predictedDocumentCount + * @memberof google.cloud.documentai.v1.Evaluation.Metrics + * @instance + */ + Metrics.prototype.predictedDocumentCount = 0; + + /** + * Metrics groundTruthDocumentCount. + * @member {number} groundTruthDocumentCount + * @memberof google.cloud.documentai.v1.Evaluation.Metrics + * @instance + */ + Metrics.prototype.groundTruthDocumentCount = 0; /** - * Encodes the specified EntityType message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.EntityType.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType - * @static - * @param {google.cloud.documentai.v1.DocumentSchema.IEntityType} message EntityType message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Metrics truePositivesCount. + * @member {number} truePositivesCount + * @memberof google.cloud.documentai.v1.Evaluation.Metrics + * @instance */ - EntityType.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Metrics.prototype.truePositivesCount = 0; /** - * Decodes an EntityType message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.documentai.v1.DocumentSchema.EntityType} EntityType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Metrics falsePositivesCount. + * @member {number} falsePositivesCount + * @memberof google.cloud.documentai.v1.Evaluation.Metrics + * @instance */ - EntityType.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.DocumentSchema.EntityType(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 14: { - message.enumValues = $root.google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues.decode(reader, reader.uint32()); - break; - } - case 13: { - message.displayName = reader.string(); - break; - } - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.baseTypes && message.baseTypes.length)) - message.baseTypes = []; - message.baseTypes.push(reader.string()); - break; - } - case 6: { - if (!(message.properties && message.properties.length)) - message.properties = []; - message.properties.push($root.google.cloud.documentai.v1.DocumentSchema.EntityType.Property.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + Metrics.prototype.falsePositivesCount = 0; /** - * Decodes an EntityType message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.documentai.v1.DocumentSchema.EntityType} EntityType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Metrics falseNegativesCount. + * @member {number} falseNegativesCount + * @memberof google.cloud.documentai.v1.Evaluation.Metrics + * @instance */ - EntityType.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Metrics.prototype.falseNegativesCount = 0; /** - * Verifies an EntityType message. - * @function verify - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Metrics totalDocumentsCount. + * @member {number} totalDocumentsCount + * @memberof google.cloud.documentai.v1.Evaluation.Metrics + * @instance */ - EntityType.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.enumValues != null && message.hasOwnProperty("enumValues")) { - properties.valueSource = 1; - { - var error = $root.google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues.verify(message.enumValues); - if (error) - return "enumValues." + error; - } - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.baseTypes != null && message.hasOwnProperty("baseTypes")) { - if (!Array.isArray(message.baseTypes)) - return "baseTypes: array expected"; - for (var i = 0; i < message.baseTypes.length; ++i) - if (!$util.isString(message.baseTypes[i])) - return "baseTypes: string[] expected"; - } - if (message.properties != null && message.hasOwnProperty("properties")) { - if (!Array.isArray(message.properties)) - return "properties: array expected"; - for (var i = 0; i < message.properties.length; ++i) { - var error = $root.google.cloud.documentai.v1.DocumentSchema.EntityType.Property.verify(message.properties[i]); - if (error) - return "properties." + error; - } - } - return null; - }; + Metrics.prototype.totalDocumentsCount = 0; /** - * Creates an EntityType message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType + * Creates a new Metrics instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1.Evaluation.Metrics * @static - * @param {Object.} object Plain object - * @returns {google.cloud.documentai.v1.DocumentSchema.EntityType} EntityType + * @param {google.cloud.documentai.v1.Evaluation.IMetrics=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.Evaluation.Metrics} Metrics instance */ - EntityType.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.documentai.v1.DocumentSchema.EntityType) - return object; - var message = new $root.google.cloud.documentai.v1.DocumentSchema.EntityType(); - if (object.enumValues != null) { - if (typeof object.enumValues !== "object") - throw TypeError(".google.cloud.documentai.v1.DocumentSchema.EntityType.enumValues: object expected"); - message.enumValues = $root.google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues.fromObject(object.enumValues); - } - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.name != null) - message.name = String(object.name); - if (object.baseTypes) { - if (!Array.isArray(object.baseTypes)) - throw TypeError(".google.cloud.documentai.v1.DocumentSchema.EntityType.baseTypes: array expected"); - message.baseTypes = []; - for (var i = 0; i < object.baseTypes.length; ++i) - message.baseTypes[i] = String(object.baseTypes[i]); - } - if (object.properties) { - if (!Array.isArray(object.properties)) - throw TypeError(".google.cloud.documentai.v1.DocumentSchema.EntityType.properties: array expected"); - message.properties = []; - for (var i = 0; i < object.properties.length; ++i) { - if (typeof object.properties[i] !== "object") - throw TypeError(".google.cloud.documentai.v1.DocumentSchema.EntityType.properties: object expected"); - message.properties[i] = $root.google.cloud.documentai.v1.DocumentSchema.EntityType.Property.fromObject(object.properties[i]); - } - } - return message; + Metrics.create = function create(properties) { + return new Metrics(properties); }; /** - * Creates a plain object from an EntityType message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType + * Encodes the specified Metrics message. Does not implicitly {@link google.cloud.documentai.v1.Evaluation.Metrics.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1.Evaluation.Metrics * @static - * @param {google.cloud.documentai.v1.DocumentSchema.EntityType} message EntityType - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * @param {google.cloud.documentai.v1.Evaluation.IMetrics} message Metrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - EntityType.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.baseTypes = []; - object.properties = []; - } - if (options.defaults) { - object.name = ""; - object.displayName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.baseTypes && message.baseTypes.length) { - object.baseTypes = []; - for (var j = 0; j < message.baseTypes.length; ++j) - object.baseTypes[j] = message.baseTypes[j]; - } - if (message.properties && message.properties.length) { - object.properties = []; - for (var j = 0; j < message.properties.length; ++j) - object.properties[j] = $root.google.cloud.documentai.v1.DocumentSchema.EntityType.Property.toObject(message.properties[j], options); - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.enumValues != null && message.hasOwnProperty("enumValues")) { - object.enumValues = $root.google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues.toObject(message.enumValues, options); - if (options.oneofs) - object.valueSource = "enumValues"; - } - return object; + Metrics.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.precision != null && Object.hasOwnProperty.call(message, "precision")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.precision); + if (message.recall != null && Object.hasOwnProperty.call(message, "recall")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.recall); + if (message.f1Score != null && Object.hasOwnProperty.call(message, "f1Score")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.f1Score); + if (message.predictedOccurrencesCount != null && Object.hasOwnProperty.call(message, "predictedOccurrencesCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.predictedOccurrencesCount); + if (message.groundTruthOccurrencesCount != null && Object.hasOwnProperty.call(message, "groundTruthOccurrencesCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.groundTruthOccurrencesCount); + if (message.truePositivesCount != null && Object.hasOwnProperty.call(message, "truePositivesCount")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.truePositivesCount); + if (message.falsePositivesCount != null && Object.hasOwnProperty.call(message, "falsePositivesCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.falsePositivesCount); + if (message.falseNegativesCount != null && Object.hasOwnProperty.call(message, "falseNegativesCount")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.falseNegativesCount); + if (message.totalDocumentsCount != null && Object.hasOwnProperty.call(message, "totalDocumentsCount")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.totalDocumentsCount); + if (message.predictedDocumentCount != null && Object.hasOwnProperty.call(message, "predictedDocumentCount")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.predictedDocumentCount); + if (message.groundTruthDocumentCount != null && Object.hasOwnProperty.call(message, "groundTruthDocumentCount")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.groundTruthDocumentCount); + return writer; }; /** - * Converts this EntityType to JSON. - * @function toJSON - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType - * @instance - * @returns {Object.} JSON object + * Encodes the specified Metrics message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.Evaluation.Metrics.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1.Evaluation.Metrics + * @static + * @param {google.cloud.documentai.v1.Evaluation.IMetrics} message Metrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - EntityType.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Metrics.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); }; /** - * Gets the default type url for EntityType - * @function getTypeUrl - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType + * Decodes a Metrics message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1.Evaluation.Metrics * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.documentai.v1.Evaluation.Metrics} Metrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EntityType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.documentai.v1.DocumentSchema.EntityType"; - }; - - EntityType.EnumValues = (function() { - - /** - * Properties of an EnumValues. - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType - * @interface IEnumValues - * @property {Array.|null} [values] EnumValues values - */ - - /** - * Constructs a new EnumValues. - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType - * @classdesc Represents an EnumValues. - * @implements IEnumValues - * @constructor - * @param {google.cloud.documentai.v1.DocumentSchema.EntityType.IEnumValues=} [properties] Properties to set - */ - function EnumValues(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]]; - } - - /** - * EnumValues values. - * @member {Array.} values - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues - * @instance - */ - EnumValues.prototype.values = $util.emptyArray; - - /** - * Creates a new EnumValues instance using the specified properties. - * @function create - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues - * @static - * @param {google.cloud.documentai.v1.DocumentSchema.EntityType.IEnumValues=} [properties] Properties to set - * @returns {google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues} EnumValues instance - */ - EnumValues.create = function create(properties) { - return new EnumValues(properties); - }; - - /** - * Encodes the specified EnumValues message. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues.verify|verify} messages. - * @function encode - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues - * @static - * @param {google.cloud.documentai.v1.DocumentSchema.EntityType.IEnumValues} message EnumValues message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValues.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) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]); - return writer; - }; - - /** - * Encodes the specified EnumValues message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues - * @static - * @param {google.cloud.documentai.v1.DocumentSchema.EntityType.IEnumValues} message EnumValues message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValues.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValues message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues} EnumValues - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValues.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); + Metrics.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.Evaluation.Metrics(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.precision = reader.float(); break; } + case 2: { + message.recall = reader.float(); + break; + } + case 3: { + message.f1Score = reader.float(); + break; + } + case 4: { + message.predictedOccurrencesCount = reader.int32(); + break; + } + case 5: { + message.groundTruthOccurrencesCount = reader.int32(); + break; + } + case 10: { + message.predictedDocumentCount = reader.int32(); + break; + } + case 11: { + message.groundTruthDocumentCount = reader.int32(); + break; + } + case 6: { + message.truePositivesCount = reader.int32(); + break; + } + case 7: { + message.falsePositivesCount = reader.int32(); + break; + } + case 8: { + message.falseNegativesCount = reader.int32(); + break; + } + case 9: { + message.totalDocumentsCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes an EnumValues message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues} EnumValues - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValues.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValues message. - * @function verify - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValues.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) - if (!$util.isString(message.values[i])) - return "values: string[] expected"; - } - return null; - }; - - /** - * Creates an EnumValues message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues} EnumValues - */ - EnumValues.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues) - return object; - var message = new $root.google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues(); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) - message.values[i] = String(object.values[i]); - } - return message; - }; - - /** - * Creates a plain object from an EnumValues message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues - * @static - * @param {google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues} message EnumValues - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValues.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] = message.values[j]; - } - return object; - }; - - /** - * Converts this EnumValues to JSON. - * @function toJSON - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues - * @instance - * @returns {Object.} JSON object - */ - EnumValues.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValues - * @function getTypeUrl - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValues.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues"; - }; + } + return message; + }; - return EnumValues; - })(); + /** + * Decodes a Metrics message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1.Evaluation.Metrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1.Evaluation.Metrics} Metrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metrics.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - EntityType.Property = (function() { + /** + * Verifies a Metrics message. + * @function verify + * @memberof google.cloud.documentai.v1.Evaluation.Metrics + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metrics.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.precision != null && message.hasOwnProperty("precision")) + if (typeof message.precision !== "number") + return "precision: number expected"; + if (message.recall != null && message.hasOwnProperty("recall")) + if (typeof message.recall !== "number") + return "recall: number expected"; + if (message.f1Score != null && message.hasOwnProperty("f1Score")) + if (typeof message.f1Score !== "number") + return "f1Score: number expected"; + if (message.predictedOccurrencesCount != null && message.hasOwnProperty("predictedOccurrencesCount")) + if (!$util.isInteger(message.predictedOccurrencesCount)) + return "predictedOccurrencesCount: integer expected"; + if (message.groundTruthOccurrencesCount != null && message.hasOwnProperty("groundTruthOccurrencesCount")) + if (!$util.isInteger(message.groundTruthOccurrencesCount)) + return "groundTruthOccurrencesCount: integer expected"; + if (message.predictedDocumentCount != null && message.hasOwnProperty("predictedDocumentCount")) + if (!$util.isInteger(message.predictedDocumentCount)) + return "predictedDocumentCount: integer expected"; + if (message.groundTruthDocumentCount != null && message.hasOwnProperty("groundTruthDocumentCount")) + if (!$util.isInteger(message.groundTruthDocumentCount)) + return "groundTruthDocumentCount: integer expected"; + if (message.truePositivesCount != null && message.hasOwnProperty("truePositivesCount")) + if (!$util.isInteger(message.truePositivesCount)) + return "truePositivesCount: integer expected"; + if (message.falsePositivesCount != null && message.hasOwnProperty("falsePositivesCount")) + if (!$util.isInteger(message.falsePositivesCount)) + return "falsePositivesCount: integer expected"; + if (message.falseNegativesCount != null && message.hasOwnProperty("falseNegativesCount")) + if (!$util.isInteger(message.falseNegativesCount)) + return "falseNegativesCount: integer expected"; + if (message.totalDocumentsCount != null && message.hasOwnProperty("totalDocumentsCount")) + if (!$util.isInteger(message.totalDocumentsCount)) + return "totalDocumentsCount: integer expected"; + return null; + }; - /** - * Properties of a Property. - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType - * @interface IProperty - * @property {string|null} [name] Property name - * @property {string|null} [valueType] Property valueType - * @property {google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType|null} [occurrenceType] Property occurrenceType - */ + /** + * Creates a Metrics message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1.Evaluation.Metrics + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1.Evaluation.Metrics} Metrics + */ + Metrics.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.Evaluation.Metrics) + return object; + var message = new $root.google.cloud.documentai.v1.Evaluation.Metrics(); + if (object.precision != null) + message.precision = Number(object.precision); + if (object.recall != null) + message.recall = Number(object.recall); + if (object.f1Score != null) + message.f1Score = Number(object.f1Score); + if (object.predictedOccurrencesCount != null) + message.predictedOccurrencesCount = object.predictedOccurrencesCount | 0; + if (object.groundTruthOccurrencesCount != null) + message.groundTruthOccurrencesCount = object.groundTruthOccurrencesCount | 0; + if (object.predictedDocumentCount != null) + message.predictedDocumentCount = object.predictedDocumentCount | 0; + if (object.groundTruthDocumentCount != null) + message.groundTruthDocumentCount = object.groundTruthDocumentCount | 0; + if (object.truePositivesCount != null) + message.truePositivesCount = object.truePositivesCount | 0; + if (object.falsePositivesCount != null) + message.falsePositivesCount = object.falsePositivesCount | 0; + if (object.falseNegativesCount != null) + message.falseNegativesCount = object.falseNegativesCount | 0; + if (object.totalDocumentsCount != null) + message.totalDocumentsCount = object.totalDocumentsCount | 0; + return message; + }; - /** - * Constructs a new Property. - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType - * @classdesc Represents a Property. - * @implements IProperty - * @constructor - * @param {google.cloud.documentai.v1.DocumentSchema.EntityType.IProperty=} [properties] Properties to set - */ - function Property(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Creates a plain object from a Metrics message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1.Evaluation.Metrics + * @static + * @param {google.cloud.documentai.v1.Evaluation.Metrics} message Metrics + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metrics.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.precision = 0; + object.recall = 0; + object.f1Score = 0; + object.predictedOccurrencesCount = 0; + object.groundTruthOccurrencesCount = 0; + object.truePositivesCount = 0; + object.falsePositivesCount = 0; + object.falseNegativesCount = 0; + object.totalDocumentsCount = 0; + object.predictedDocumentCount = 0; + object.groundTruthDocumentCount = 0; } + if (message.precision != null && message.hasOwnProperty("precision")) + object.precision = options.json && !isFinite(message.precision) ? String(message.precision) : message.precision; + if (message.recall != null && message.hasOwnProperty("recall")) + object.recall = options.json && !isFinite(message.recall) ? String(message.recall) : message.recall; + if (message.f1Score != null && message.hasOwnProperty("f1Score")) + object.f1Score = options.json && !isFinite(message.f1Score) ? String(message.f1Score) : message.f1Score; + if (message.predictedOccurrencesCount != null && message.hasOwnProperty("predictedOccurrencesCount")) + object.predictedOccurrencesCount = message.predictedOccurrencesCount; + if (message.groundTruthOccurrencesCount != null && message.hasOwnProperty("groundTruthOccurrencesCount")) + object.groundTruthOccurrencesCount = message.groundTruthOccurrencesCount; + if (message.truePositivesCount != null && message.hasOwnProperty("truePositivesCount")) + object.truePositivesCount = message.truePositivesCount; + if (message.falsePositivesCount != null && message.hasOwnProperty("falsePositivesCount")) + object.falsePositivesCount = message.falsePositivesCount; + if (message.falseNegativesCount != null && message.hasOwnProperty("falseNegativesCount")) + object.falseNegativesCount = message.falseNegativesCount; + if (message.totalDocumentsCount != null && message.hasOwnProperty("totalDocumentsCount")) + object.totalDocumentsCount = message.totalDocumentsCount; + if (message.predictedDocumentCount != null && message.hasOwnProperty("predictedDocumentCount")) + object.predictedDocumentCount = message.predictedDocumentCount; + if (message.groundTruthDocumentCount != null && message.hasOwnProperty("groundTruthDocumentCount")) + object.groundTruthDocumentCount = message.groundTruthDocumentCount; + return object; + }; - /** - * Property name. - * @member {string} name - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.Property - * @instance - */ - Property.prototype.name = ""; - - /** - * Property valueType. - * @member {string} valueType - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.Property - * @instance - */ - Property.prototype.valueType = ""; - - /** - * Property occurrenceType. - * @member {google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType} occurrenceType - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.Property - * @instance - */ - Property.prototype.occurrenceType = 0; + /** + * Converts this Metrics to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1.Evaluation.Metrics + * @instance + * @returns {Object.} JSON object + */ + Metrics.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new Property instance using the specified properties. - * @function create - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.Property - * @static - * @param {google.cloud.documentai.v1.DocumentSchema.EntityType.IProperty=} [properties] Properties to set - * @returns {google.cloud.documentai.v1.DocumentSchema.EntityType.Property} Property instance - */ - Property.create = function create(properties) { - return new Property(properties); - }; + /** + * Gets the default type url for Metrics + * @function getTypeUrl + * @memberof google.cloud.documentai.v1.Evaluation.Metrics + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1.Evaluation.Metrics"; + }; - /** - * Encodes the specified Property message. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.EntityType.Property.verify|verify} messages. - * @function encode - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.Property - * @static - * @param {google.cloud.documentai.v1.DocumentSchema.EntityType.IProperty} message Property message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Property.encode = function encode(message, writer) { - 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.valueType != null && Object.hasOwnProperty.call(message, "valueType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.valueType); - if (message.occurrenceType != null && Object.hasOwnProperty.call(message, "occurrenceType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.occurrenceType); - return writer; - }; + return Metrics; + })(); - /** - * Encodes the specified Property message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.EntityType.Property.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.Property - * @static - * @param {google.cloud.documentai.v1.DocumentSchema.EntityType.IProperty} message Property message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Property.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Evaluation.ConfidenceLevelMetrics = (function() { - /** - * Decodes a Property message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.Property - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.documentai.v1.DocumentSchema.EntityType.Property} Property - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Property.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.DocumentSchema.EntityType.Property(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.valueType = reader.string(); - break; - } - case 3: { - message.occurrenceType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Properties of a ConfidenceLevelMetrics. + * @memberof google.cloud.documentai.v1.Evaluation + * @interface IConfidenceLevelMetrics + * @property {number|null} [confidenceLevel] ConfidenceLevelMetrics confidenceLevel + * @property {google.cloud.documentai.v1.Evaluation.IMetrics|null} [metrics] ConfidenceLevelMetrics metrics + */ - /** - * Decodes a Property message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.Property - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.documentai.v1.DocumentSchema.EntityType.Property} Property - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Property.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Constructs a new ConfidenceLevelMetrics. + * @memberof google.cloud.documentai.v1.Evaluation + * @classdesc Represents a ConfidenceLevelMetrics. + * @implements IConfidenceLevelMetrics + * @constructor + * @param {google.cloud.documentai.v1.Evaluation.IConfidenceLevelMetrics=} [properties] Properties to set + */ + function ConfidenceLevelMetrics(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Verifies a Property message. - * @function verify - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.Property - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Property.verify = function verify(message) { - if (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.valueType != null && message.hasOwnProperty("valueType")) - if (!$util.isString(message.valueType)) - return "valueType: string expected"; - if (message.occurrenceType != null && message.hasOwnProperty("occurrenceType")) - switch (message.occurrenceType) { - default: - return "occurrenceType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - return null; - }; + /** + * ConfidenceLevelMetrics confidenceLevel. + * @member {number} confidenceLevel + * @memberof google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics + * @instance + */ + ConfidenceLevelMetrics.prototype.confidenceLevel = 0; - /** - * Creates a Property message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.Property - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.documentai.v1.DocumentSchema.EntityType.Property} Property - */ - Property.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.documentai.v1.DocumentSchema.EntityType.Property) - return object; - var message = new $root.google.cloud.documentai.v1.DocumentSchema.EntityType.Property(); - if (object.name != null) - message.name = String(object.name); - if (object.valueType != null) - message.valueType = String(object.valueType); - switch (object.occurrenceType) { - default: - if (typeof object.occurrenceType === "number") { - message.occurrenceType = object.occurrenceType; - break; - } - break; - case "OCCURRENCE_TYPE_UNSPECIFIED": - case 0: - message.occurrenceType = 0; - break; - case "OPTIONAL_ONCE": - case 1: - message.occurrenceType = 1; - break; - case "OPTIONAL_MULTIPLE": - case 2: - message.occurrenceType = 2; - break; - case "REQUIRED_ONCE": - case 3: - message.occurrenceType = 3; - break; - case "REQUIRED_MULTIPLE": - case 4: - message.occurrenceType = 4; - break; - } - return message; - }; + /** + * ConfidenceLevelMetrics metrics. + * @member {google.cloud.documentai.v1.Evaluation.IMetrics|null|undefined} metrics + * @memberof google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics + * @instance + */ + ConfidenceLevelMetrics.prototype.metrics = null; - /** - * Creates a plain object from a Property message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.Property - * @static - * @param {google.cloud.documentai.v1.DocumentSchema.EntityType.Property} message Property - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Property.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.valueType = ""; - object.occurrenceType = options.enums === String ? "OCCURRENCE_TYPE_UNSPECIFIED" : 0; + /** + * Creates a new ConfidenceLevelMetrics instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics + * @static + * @param {google.cloud.documentai.v1.Evaluation.IConfidenceLevelMetrics=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics} ConfidenceLevelMetrics instance + */ + ConfidenceLevelMetrics.create = function create(properties) { + return new ConfidenceLevelMetrics(properties); + }; + + /** + * Encodes the specified ConfidenceLevelMetrics message. Does not implicitly {@link google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics + * @static + * @param {google.cloud.documentai.v1.Evaluation.IConfidenceLevelMetrics} message ConfidenceLevelMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfidenceLevelMetrics.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.confidenceLevel != null && Object.hasOwnProperty.call(message, "confidenceLevel")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.confidenceLevel); + if (message.metrics != null && Object.hasOwnProperty.call(message, "metrics")) + $root.google.cloud.documentai.v1.Evaluation.Metrics.encode(message.metrics, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConfidenceLevelMetrics message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics + * @static + * @param {google.cloud.documentai.v1.Evaluation.IConfidenceLevelMetrics} message ConfidenceLevelMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfidenceLevelMetrics.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConfidenceLevelMetrics message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics} ConfidenceLevelMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfidenceLevelMetrics.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.confidenceLevel = reader.float(); + break; + } + case 2: { + message.metrics = $root.google.cloud.documentai.v1.Evaluation.Metrics.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.valueType != null && message.hasOwnProperty("valueType")) - object.valueType = message.valueType; - if (message.occurrenceType != null && message.hasOwnProperty("occurrenceType")) - object.occurrenceType = options.enums === String ? $root.google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType[message.occurrenceType] === undefined ? message.occurrenceType : $root.google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType[message.occurrenceType] : message.occurrenceType; - return object; - }; + } + return message; + }; - /** - * Converts this Property to JSON. - * @function toJSON - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.Property - * @instance - * @returns {Object.} JSON object - */ - Property.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a ConfidenceLevelMetrics message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics} ConfidenceLevelMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfidenceLevelMetrics.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for Property - * @function getTypeUrl - * @memberof google.cloud.documentai.v1.DocumentSchema.EntityType.Property - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Property.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.documentai.v1.DocumentSchema.EntityType.Property"; - }; + /** + * Verifies a ConfidenceLevelMetrics message. + * @function verify + * @memberof google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConfidenceLevelMetrics.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.confidenceLevel != null && message.hasOwnProperty("confidenceLevel")) + if (typeof message.confidenceLevel !== "number") + return "confidenceLevel: number expected"; + if (message.metrics != null && message.hasOwnProperty("metrics")) { + var error = $root.google.cloud.documentai.v1.Evaluation.Metrics.verify(message.metrics); + if (error) + return "metrics." + error; + } + return null; + }; - /** - * OccurrenceType enum. - * @name google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType - * @enum {number} - * @property {number} OCCURRENCE_TYPE_UNSPECIFIED=0 OCCURRENCE_TYPE_UNSPECIFIED value - * @property {number} OPTIONAL_ONCE=1 OPTIONAL_ONCE value - * @property {number} OPTIONAL_MULTIPLE=2 OPTIONAL_MULTIPLE value - * @property {number} REQUIRED_ONCE=3 REQUIRED_ONCE value - * @property {number} REQUIRED_MULTIPLE=4 REQUIRED_MULTIPLE value - */ - Property.OccurrenceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OCCURRENCE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL_ONCE"] = 1; - values[valuesById[2] = "OPTIONAL_MULTIPLE"] = 2; - values[valuesById[3] = "REQUIRED_ONCE"] = 3; - values[valuesById[4] = "REQUIRED_MULTIPLE"] = 4; - return values; - })(); + /** + * Creates a ConfidenceLevelMetrics message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics} ConfidenceLevelMetrics + */ + ConfidenceLevelMetrics.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics) + return object; + var message = new $root.google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics(); + if (object.confidenceLevel != null) + message.confidenceLevel = Number(object.confidenceLevel); + if (object.metrics != null) { + if (typeof object.metrics !== "object") + throw TypeError(".google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics.metrics: object expected"); + message.metrics = $root.google.cloud.documentai.v1.Evaluation.Metrics.fromObject(object.metrics); + } + return message; + }; - return Property; - })(); + /** + * Creates a plain object from a ConfidenceLevelMetrics message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics + * @static + * @param {google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics} message ConfidenceLevelMetrics + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConfidenceLevelMetrics.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.confidenceLevel = 0; + object.metrics = null; + } + if (message.confidenceLevel != null && message.hasOwnProperty("confidenceLevel")) + object.confidenceLevel = options.json && !isFinite(message.confidenceLevel) ? String(message.confidenceLevel) : message.confidenceLevel; + if (message.metrics != null && message.hasOwnProperty("metrics")) + object.metrics = $root.google.cloud.documentai.v1.Evaluation.Metrics.toObject(message.metrics, options); + return object; + }; - return EntityType; + /** + * Converts this ConfidenceLevelMetrics to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics + * @instance + * @returns {Object.} JSON object + */ + ConfidenceLevelMetrics.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConfidenceLevelMetrics + * @function getTypeUrl + * @memberof google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConfidenceLevelMetrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics"; + }; + + return ConfidenceLevelMetrics; })(); - DocumentSchema.Metadata = (function() { + Evaluation.MultiConfidenceMetrics = (function() { /** - * Properties of a Metadata. - * @memberof google.cloud.documentai.v1.DocumentSchema - * @interface IMetadata - * @property {boolean|null} [documentSplitter] Metadata documentSplitter - * @property {boolean|null} [documentAllowMultipleLabels] Metadata documentAllowMultipleLabels - * @property {boolean|null} [prefixedNamingOnProperties] Metadata prefixedNamingOnProperties - * @property {boolean|null} [skipNamingValidation] Metadata skipNamingValidation + * Properties of a MultiConfidenceMetrics. + * @memberof google.cloud.documentai.v1.Evaluation + * @interface IMultiConfidenceMetrics + * @property {Array.|null} [confidenceLevelMetrics] MultiConfidenceMetrics confidenceLevelMetrics + * @property {Array.|null} [confidenceLevelMetricsExact] MultiConfidenceMetrics confidenceLevelMetricsExact + * @property {number|null} [auprc] MultiConfidenceMetrics auprc + * @property {number|null} [estimatedCalibrationError] MultiConfidenceMetrics estimatedCalibrationError + * @property {number|null} [auprcExact] MultiConfidenceMetrics auprcExact + * @property {number|null} [estimatedCalibrationErrorExact] MultiConfidenceMetrics estimatedCalibrationErrorExact + * @property {google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.MetricsType|null} [metricsType] MultiConfidenceMetrics metricsType */ /** - * Constructs a new Metadata. - * @memberof google.cloud.documentai.v1.DocumentSchema - * @classdesc Represents a Metadata. - * @implements IMetadata + * Constructs a new MultiConfidenceMetrics. + * @memberof google.cloud.documentai.v1.Evaluation + * @classdesc Represents a MultiConfidenceMetrics. + * @implements IMultiConfidenceMetrics * @constructor - * @param {google.cloud.documentai.v1.DocumentSchema.IMetadata=} [properties] Properties to set + * @param {google.cloud.documentai.v1.Evaluation.IMultiConfidenceMetrics=} [properties] Properties to set */ - function Metadata(properties) { + function MultiConfidenceMetrics(properties) { + this.confidenceLevelMetrics = []; + this.confidenceLevelMetricsExact = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25701,117 +30417,165 @@ } /** - * Metadata documentSplitter. - * @member {boolean} documentSplitter - * @memberof google.cloud.documentai.v1.DocumentSchema.Metadata + * MultiConfidenceMetrics confidenceLevelMetrics. + * @member {Array.} confidenceLevelMetrics + * @memberof google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics * @instance */ - Metadata.prototype.documentSplitter = false; + MultiConfidenceMetrics.prototype.confidenceLevelMetrics = $util.emptyArray; /** - * Metadata documentAllowMultipleLabels. - * @member {boolean} documentAllowMultipleLabels - * @memberof google.cloud.documentai.v1.DocumentSchema.Metadata + * MultiConfidenceMetrics confidenceLevelMetricsExact. + * @member {Array.} confidenceLevelMetricsExact + * @memberof google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics * @instance */ - Metadata.prototype.documentAllowMultipleLabels = false; + MultiConfidenceMetrics.prototype.confidenceLevelMetricsExact = $util.emptyArray; /** - * Metadata prefixedNamingOnProperties. - * @member {boolean} prefixedNamingOnProperties - * @memberof google.cloud.documentai.v1.DocumentSchema.Metadata + * MultiConfidenceMetrics auprc. + * @member {number} auprc + * @memberof google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics * @instance */ - Metadata.prototype.prefixedNamingOnProperties = false; + MultiConfidenceMetrics.prototype.auprc = 0; /** - * Metadata skipNamingValidation. - * @member {boolean} skipNamingValidation - * @memberof google.cloud.documentai.v1.DocumentSchema.Metadata + * MultiConfidenceMetrics estimatedCalibrationError. + * @member {number} estimatedCalibrationError + * @memberof google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics * @instance */ - Metadata.prototype.skipNamingValidation = false; + MultiConfidenceMetrics.prototype.estimatedCalibrationError = 0; /** - * Creates a new Metadata instance using the specified properties. + * MultiConfidenceMetrics auprcExact. + * @member {number} auprcExact + * @memberof google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics + * @instance + */ + MultiConfidenceMetrics.prototype.auprcExact = 0; + + /** + * MultiConfidenceMetrics estimatedCalibrationErrorExact. + * @member {number} estimatedCalibrationErrorExact + * @memberof google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics + * @instance + */ + MultiConfidenceMetrics.prototype.estimatedCalibrationErrorExact = 0; + + /** + * MultiConfidenceMetrics metricsType. + * @member {google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.MetricsType} metricsType + * @memberof google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics + * @instance + */ + MultiConfidenceMetrics.prototype.metricsType = 0; + + /** + * Creates a new MultiConfidenceMetrics instance using the specified properties. * @function create - * @memberof google.cloud.documentai.v1.DocumentSchema.Metadata + * @memberof google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics * @static - * @param {google.cloud.documentai.v1.DocumentSchema.IMetadata=} [properties] Properties to set - * @returns {google.cloud.documentai.v1.DocumentSchema.Metadata} Metadata instance + * @param {google.cloud.documentai.v1.Evaluation.IMultiConfidenceMetrics=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics} MultiConfidenceMetrics instance */ - Metadata.create = function create(properties) { - return new Metadata(properties); + MultiConfidenceMetrics.create = function create(properties) { + return new MultiConfidenceMetrics(properties); }; /** - * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.Metadata.verify|verify} messages. + * Encodes the specified MultiConfidenceMetrics message. Does not implicitly {@link google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.verify|verify} messages. * @function encode - * @memberof google.cloud.documentai.v1.DocumentSchema.Metadata + * @memberof google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics * @static - * @param {google.cloud.documentai.v1.DocumentSchema.IMetadata} message Metadata message or plain object to encode + * @param {google.cloud.documentai.v1.Evaluation.IMultiConfidenceMetrics} message MultiConfidenceMetrics message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Metadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.documentSplitter != null && Object.hasOwnProperty.call(message, "documentSplitter")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.documentSplitter); - if (message.documentAllowMultipleLabels != null && Object.hasOwnProperty.call(message, "documentAllowMultipleLabels")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.documentAllowMultipleLabels); - if (message.prefixedNamingOnProperties != null && Object.hasOwnProperty.call(message, "prefixedNamingOnProperties")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.prefixedNamingOnProperties); - if (message.skipNamingValidation != null && Object.hasOwnProperty.call(message, "skipNamingValidation")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.skipNamingValidation); + MultiConfidenceMetrics.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.confidenceLevelMetrics != null && message.confidenceLevelMetrics.length) + for (var i = 0; i < message.confidenceLevelMetrics.length; ++i) + $root.google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics.encode(message.confidenceLevelMetrics[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.auprc != null && Object.hasOwnProperty.call(message, "auprc")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.auprc); + if (message.estimatedCalibrationError != null && Object.hasOwnProperty.call(message, "estimatedCalibrationError")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.estimatedCalibrationError); + if (message.confidenceLevelMetricsExact != null && message.confidenceLevelMetricsExact.length) + for (var i = 0; i < message.confidenceLevelMetricsExact.length; ++i) + $root.google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics.encode(message.confidenceLevelMetricsExact[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.auprcExact != null && Object.hasOwnProperty.call(message, "auprcExact")) + writer.uint32(/* id 5, wireType 5 =*/45).float(message.auprcExact); + if (message.estimatedCalibrationErrorExact != null && Object.hasOwnProperty.call(message, "estimatedCalibrationErrorExact")) + writer.uint32(/* id 6, wireType 5 =*/53).float(message.estimatedCalibrationErrorExact); + if (message.metricsType != null && Object.hasOwnProperty.call(message, "metricsType")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.metricsType); return writer; }; /** - * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.DocumentSchema.Metadata.verify|verify} messages. + * Encodes the specified MultiConfidenceMetrics message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.documentai.v1.DocumentSchema.Metadata + * @memberof google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics * @static - * @param {google.cloud.documentai.v1.DocumentSchema.IMetadata} message Metadata message or plain object to encode + * @param {google.cloud.documentai.v1.Evaluation.IMultiConfidenceMetrics} message MultiConfidenceMetrics message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Metadata.encodeDelimited = function encodeDelimited(message, writer) { + MultiConfidenceMetrics.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Metadata message from the specified reader or buffer. + * Decodes a MultiConfidenceMetrics message from the specified reader or buffer. * @function decode - * @memberof google.cloud.documentai.v1.DocumentSchema.Metadata + * @memberof google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.documentai.v1.DocumentSchema.Metadata} Metadata + * @returns {google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics} MultiConfidenceMetrics * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Metadata.decode = function decode(reader, length) { + MultiConfidenceMetrics.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.DocumentSchema.Metadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.documentSplitter = reader.bool(); + if (!(message.confidenceLevelMetrics && message.confidenceLevelMetrics.length)) + message.confidenceLevelMetrics = []; + message.confidenceLevelMetrics.push($root.google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.confidenceLevelMetricsExact && message.confidenceLevelMetricsExact.length)) + message.confidenceLevelMetricsExact = []; + message.confidenceLevelMetricsExact.push($root.google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics.decode(reader, reader.uint32())); break; } case 2: { - message.documentAllowMultipleLabels = reader.bool(); + message.auprc = reader.float(); + break; + } + case 3: { + message.estimatedCalibrationError = reader.float(); + break; + } + case 5: { + message.auprcExact = reader.float(); break; } case 6: { - message.prefixedNamingOnProperties = reader.bool(); + message.estimatedCalibrationErrorExact = reader.float(); break; } case 7: { - message.skipNamingValidation = reader.bool(); + message.metricsType = reader.int32(); break; } default: @@ -25823,130 +30587,223 @@ }; /** - * Decodes a Metadata message from the specified reader or buffer, length delimited. + * Decodes a MultiConfidenceMetrics message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.documentai.v1.DocumentSchema.Metadata + * @memberof google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.documentai.v1.DocumentSchema.Metadata} Metadata + * @returns {google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics} MultiConfidenceMetrics * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Metadata.decodeDelimited = function decodeDelimited(reader) { + MultiConfidenceMetrics.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Metadata message. + * Verifies a MultiConfidenceMetrics message. * @function verify - * @memberof google.cloud.documentai.v1.DocumentSchema.Metadata + * @memberof google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Metadata.verify = function verify(message) { + MultiConfidenceMetrics.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.documentSplitter != null && message.hasOwnProperty("documentSplitter")) - if (typeof message.documentSplitter !== "boolean") - return "documentSplitter: boolean expected"; - if (message.documentAllowMultipleLabels != null && message.hasOwnProperty("documentAllowMultipleLabels")) - if (typeof message.documentAllowMultipleLabels !== "boolean") - return "documentAllowMultipleLabels: boolean expected"; - if (message.prefixedNamingOnProperties != null && message.hasOwnProperty("prefixedNamingOnProperties")) - if (typeof message.prefixedNamingOnProperties !== "boolean") - return "prefixedNamingOnProperties: boolean expected"; - if (message.skipNamingValidation != null && message.hasOwnProperty("skipNamingValidation")) - if (typeof message.skipNamingValidation !== "boolean") - return "skipNamingValidation: boolean expected"; + if (message.confidenceLevelMetrics != null && message.hasOwnProperty("confidenceLevelMetrics")) { + if (!Array.isArray(message.confidenceLevelMetrics)) + return "confidenceLevelMetrics: array expected"; + for (var i = 0; i < message.confidenceLevelMetrics.length; ++i) { + var error = $root.google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics.verify(message.confidenceLevelMetrics[i]); + if (error) + return "confidenceLevelMetrics." + error; + } + } + if (message.confidenceLevelMetricsExact != null && message.hasOwnProperty("confidenceLevelMetricsExact")) { + if (!Array.isArray(message.confidenceLevelMetricsExact)) + return "confidenceLevelMetricsExact: array expected"; + for (var i = 0; i < message.confidenceLevelMetricsExact.length; ++i) { + var error = $root.google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics.verify(message.confidenceLevelMetricsExact[i]); + if (error) + return "confidenceLevelMetricsExact." + error; + } + } + if (message.auprc != null && message.hasOwnProperty("auprc")) + if (typeof message.auprc !== "number") + return "auprc: number expected"; + if (message.estimatedCalibrationError != null && message.hasOwnProperty("estimatedCalibrationError")) + if (typeof message.estimatedCalibrationError !== "number") + return "estimatedCalibrationError: number expected"; + if (message.auprcExact != null && message.hasOwnProperty("auprcExact")) + if (typeof message.auprcExact !== "number") + return "auprcExact: number expected"; + if (message.estimatedCalibrationErrorExact != null && message.hasOwnProperty("estimatedCalibrationErrorExact")) + if (typeof message.estimatedCalibrationErrorExact !== "number") + return "estimatedCalibrationErrorExact: number expected"; + if (message.metricsType != null && message.hasOwnProperty("metricsType")) + switch (message.metricsType) { + default: + return "metricsType: enum value expected"; + case 0: + case 1: + break; + } return null; }; /** - * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * Creates a MultiConfidenceMetrics message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.documentai.v1.DocumentSchema.Metadata + * @memberof google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics * @static * @param {Object.} object Plain object - * @returns {google.cloud.documentai.v1.DocumentSchema.Metadata} Metadata + * @returns {google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics} MultiConfidenceMetrics */ - Metadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.documentai.v1.DocumentSchema.Metadata) + MultiConfidenceMetrics.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics) return object; - var message = new $root.google.cloud.documentai.v1.DocumentSchema.Metadata(); - if (object.documentSplitter != null) - message.documentSplitter = Boolean(object.documentSplitter); - if (object.documentAllowMultipleLabels != null) - message.documentAllowMultipleLabels = Boolean(object.documentAllowMultipleLabels); - if (object.prefixedNamingOnProperties != null) - message.prefixedNamingOnProperties = Boolean(object.prefixedNamingOnProperties); - if (object.skipNamingValidation != null) - message.skipNamingValidation = Boolean(object.skipNamingValidation); + var message = new $root.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics(); + if (object.confidenceLevelMetrics) { + if (!Array.isArray(object.confidenceLevelMetrics)) + throw TypeError(".google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.confidenceLevelMetrics: array expected"); + message.confidenceLevelMetrics = []; + for (var i = 0; i < object.confidenceLevelMetrics.length; ++i) { + if (typeof object.confidenceLevelMetrics[i] !== "object") + throw TypeError(".google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.confidenceLevelMetrics: object expected"); + message.confidenceLevelMetrics[i] = $root.google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics.fromObject(object.confidenceLevelMetrics[i]); + } + } + if (object.confidenceLevelMetricsExact) { + if (!Array.isArray(object.confidenceLevelMetricsExact)) + throw TypeError(".google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.confidenceLevelMetricsExact: array expected"); + message.confidenceLevelMetricsExact = []; + for (var i = 0; i < object.confidenceLevelMetricsExact.length; ++i) { + if (typeof object.confidenceLevelMetricsExact[i] !== "object") + throw TypeError(".google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.confidenceLevelMetricsExact: object expected"); + message.confidenceLevelMetricsExact[i] = $root.google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics.fromObject(object.confidenceLevelMetricsExact[i]); + } + } + if (object.auprc != null) + message.auprc = Number(object.auprc); + if (object.estimatedCalibrationError != null) + message.estimatedCalibrationError = Number(object.estimatedCalibrationError); + if (object.auprcExact != null) + message.auprcExact = Number(object.auprcExact); + if (object.estimatedCalibrationErrorExact != null) + message.estimatedCalibrationErrorExact = Number(object.estimatedCalibrationErrorExact); + switch (object.metricsType) { + default: + if (typeof object.metricsType === "number") { + message.metricsType = object.metricsType; + break; + } + break; + case "METRICS_TYPE_UNSPECIFIED": + case 0: + message.metricsType = 0; + break; + case "AGGREGATE": + case 1: + message.metricsType = 1; + break; + } return message; }; /** - * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * Creates a plain object from a MultiConfidenceMetrics message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.documentai.v1.DocumentSchema.Metadata + * @memberof google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics * @static - * @param {google.cloud.documentai.v1.DocumentSchema.Metadata} message Metadata + * @param {google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics} message MultiConfidenceMetrics * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Metadata.toObject = function toObject(message, options) { + MultiConfidenceMetrics.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.confidenceLevelMetrics = []; + object.confidenceLevelMetricsExact = []; + } if (options.defaults) { - object.documentSplitter = false; - object.documentAllowMultipleLabels = false; - object.prefixedNamingOnProperties = false; - object.skipNamingValidation = false; + object.auprc = 0; + object.estimatedCalibrationError = 0; + object.auprcExact = 0; + object.estimatedCalibrationErrorExact = 0; + object.metricsType = options.enums === String ? "METRICS_TYPE_UNSPECIFIED" : 0; } - if (message.documentSplitter != null && message.hasOwnProperty("documentSplitter")) - object.documentSplitter = message.documentSplitter; - if (message.documentAllowMultipleLabels != null && message.hasOwnProperty("documentAllowMultipleLabels")) - object.documentAllowMultipleLabels = message.documentAllowMultipleLabels; - if (message.prefixedNamingOnProperties != null && message.hasOwnProperty("prefixedNamingOnProperties")) - object.prefixedNamingOnProperties = message.prefixedNamingOnProperties; - if (message.skipNamingValidation != null && message.hasOwnProperty("skipNamingValidation")) - object.skipNamingValidation = message.skipNamingValidation; + if (message.confidenceLevelMetrics && message.confidenceLevelMetrics.length) { + object.confidenceLevelMetrics = []; + for (var j = 0; j < message.confidenceLevelMetrics.length; ++j) + object.confidenceLevelMetrics[j] = $root.google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics.toObject(message.confidenceLevelMetrics[j], options); + } + if (message.auprc != null && message.hasOwnProperty("auprc")) + object.auprc = options.json && !isFinite(message.auprc) ? String(message.auprc) : message.auprc; + if (message.estimatedCalibrationError != null && message.hasOwnProperty("estimatedCalibrationError")) + object.estimatedCalibrationError = options.json && !isFinite(message.estimatedCalibrationError) ? String(message.estimatedCalibrationError) : message.estimatedCalibrationError; + if (message.confidenceLevelMetricsExact && message.confidenceLevelMetricsExact.length) { + object.confidenceLevelMetricsExact = []; + for (var j = 0; j < message.confidenceLevelMetricsExact.length; ++j) + object.confidenceLevelMetricsExact[j] = $root.google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics.toObject(message.confidenceLevelMetricsExact[j], options); + } + if (message.auprcExact != null && message.hasOwnProperty("auprcExact")) + object.auprcExact = options.json && !isFinite(message.auprcExact) ? String(message.auprcExact) : message.auprcExact; + if (message.estimatedCalibrationErrorExact != null && message.hasOwnProperty("estimatedCalibrationErrorExact")) + object.estimatedCalibrationErrorExact = options.json && !isFinite(message.estimatedCalibrationErrorExact) ? String(message.estimatedCalibrationErrorExact) : message.estimatedCalibrationErrorExact; + if (message.metricsType != null && message.hasOwnProperty("metricsType")) + object.metricsType = options.enums === String ? $root.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.MetricsType[message.metricsType] === undefined ? message.metricsType : $root.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.MetricsType[message.metricsType] : message.metricsType; return object; }; /** - * Converts this Metadata to JSON. + * Converts this MultiConfidenceMetrics to JSON. * @function toJSON - * @memberof google.cloud.documentai.v1.DocumentSchema.Metadata + * @memberof google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics * @instance * @returns {Object.} JSON object */ - Metadata.prototype.toJSON = function toJSON() { + MultiConfidenceMetrics.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Metadata + * Gets the default type url for MultiConfidenceMetrics * @function getTypeUrl - * @memberof google.cloud.documentai.v1.DocumentSchema.Metadata + * @memberof google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Metadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MultiConfidenceMetrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.documentai.v1.DocumentSchema.Metadata"; + return typeUrlPrefix + "/google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics"; }; - return Metadata; + /** + * MetricsType enum. + * @name google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.MetricsType + * @enum {number} + * @property {number} METRICS_TYPE_UNSPECIFIED=0 METRICS_TYPE_UNSPECIFIED value + * @property {number} AGGREGATE=1 AGGREGATE value + */ + MultiConfidenceMetrics.MetricsType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METRICS_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "AGGREGATE"] = 1; + return values; + })(); + + return MultiConfidenceMetrics; })(); - return DocumentSchema; + return Evaluation; })(); v1.CommonOperationMetadata = (function() { @@ -26327,6 +31184,7 @@ * @property {google.cloud.documentai.v1.IDocumentSchema|null} [documentSchema] ProcessorVersion documentSchema * @property {google.cloud.documentai.v1.ProcessorVersion.State|null} [state] ProcessorVersion state * @property {google.protobuf.ITimestamp|null} [createTime] ProcessorVersion createTime + * @property {google.cloud.documentai.v1.IEvaluationReference|null} [latestEvaluation] ProcessorVersion latestEvaluation * @property {string|null} [kmsKeyName] ProcessorVersion kmsKeyName * @property {string|null} [kmsKeyVersionName] ProcessorVersion kmsKeyVersionName * @property {boolean|null} [googleManaged] ProcessorVersion googleManaged @@ -26388,6 +31246,14 @@ */ ProcessorVersion.prototype.createTime = null; + /** + * ProcessorVersion latestEvaluation. + * @member {google.cloud.documentai.v1.IEvaluationReference|null|undefined} latestEvaluation + * @memberof google.cloud.documentai.v1.ProcessorVersion + * @instance + */ + ProcessorVersion.prototype.latestEvaluation = null; + /** * ProcessorVersion kmsKeyName. * @member {string} kmsKeyName @@ -26452,6 +31318,8 @@ writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); 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.latestEvaluation != null && Object.hasOwnProperty.call(message, "latestEvaluation")) + $root.google.cloud.documentai.v1.EvaluationReference.encode(message.latestEvaluation, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.kmsKeyName); if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) @@ -26516,6 +31384,10 @@ message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } + case 8: { + message.latestEvaluation = $root.google.cloud.documentai.v1.EvaluationReference.decode(reader, reader.uint32()); + break; + } case 9: { message.kmsKeyName = reader.string(); break; @@ -26597,6 +31469,11 @@ if (error) return "createTime." + error; } + if (message.latestEvaluation != null && message.hasOwnProperty("latestEvaluation")) { + var error = $root.google.cloud.documentai.v1.EvaluationReference.verify(message.latestEvaluation); + if (error) + return "latestEvaluation." + error; + } if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) if (!$util.isString(message.kmsKeyName)) return "kmsKeyName: string expected"; @@ -26680,6 +31557,11 @@ throw TypeError(".google.cloud.documentai.v1.ProcessorVersion.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } + if (object.latestEvaluation != null) { + if (typeof object.latestEvaluation !== "object") + throw TypeError(".google.cloud.documentai.v1.ProcessorVersion.latestEvaluation: object expected"); + message.latestEvaluation = $root.google.cloud.documentai.v1.EvaluationReference.fromObject(object.latestEvaluation); + } if (object.kmsKeyName != null) message.kmsKeyName = String(object.kmsKeyName); if (object.kmsKeyVersionName != null) @@ -26712,6 +31594,7 @@ object.displayName = ""; object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; object.createTime = null; + object.latestEvaluation = null; object.kmsKeyName = ""; object.kmsKeyVersionName = ""; object.googleManaged = false; @@ -26726,6 +31609,8 @@ object.state = options.enums === String ? $root.google.cloud.documentai.v1.ProcessorVersion.State[message.state] === undefined ? message.state : $root.google.cloud.documentai.v1.ProcessorVersion.State[message.state] : message.state; if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.latestEvaluation != null && message.hasOwnProperty("latestEvaluation")) + object.latestEvaluation = $root.google.cloud.documentai.v1.EvaluationReference.toObject(message.latestEvaluation, options); if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) object.kmsKeyName = message.kmsKeyName; if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) diff --git a/packages/google-cloud-documentai/protos/protos.json b/packages/google-cloud-documentai/protos/protos.json index e7631b2a9b1..52de4afd3fb 100644 --- a/packages/google-cloud-documentai/protos/protos.json +++ b/packages/google-cloud-documentai/protos/protos.json @@ -884,7 +884,10 @@ "fields": { "revision": { "type": "int32", - "id": 1 + "id": 1, + "options": { + "deprecated": true + } }, "id": { "type": "int32", @@ -924,10 +927,22 @@ } }, "OperationType": { + "valuesOptions": { + "EVAL_REQUESTED": { + "deprecated": true + }, + "EVAL_APPROVED": { + "deprecated": true + }, + "EVAL_SKIPPED": { + "deprecated": true + } + }, "values": { "OPERATION_TYPE_UNSPECIFIED": 0, "ADD": 1, "REMOVE": 2, + "UPDATE": 7, "REPLACE": 3, "EVAL_REQUESTED": 4, "EVAL_APPROVED": 5, @@ -1319,6 +1334,34 @@ } ] }, + "TrainProcessorVersion": { + "requestType": "TrainProcessorVersionRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/processors/*}/processorVersions:train", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,processor_version", + "(google.longrunning.operation_info).response_type": "TrainProcessorVersionResponse", + "(google.longrunning.operation_info).metadata_type": "TrainProcessorVersionMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/processors/*}/processorVersions:train", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,processor_version" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "TrainProcessorVersionResponse", + "metadata_type": "TrainProcessorVersionMetadata" + } + } + ] + }, "GetProcessorVersion": { "requestType": "GetProcessorVersionRequest", "responseType": "ProcessorVersion", @@ -1582,6 +1625,70 @@ } } ] + }, + "EvaluateProcessorVersion": { + "requestType": "EvaluateProcessorVersionRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{processor_version=projects/*/locations/*/processors/*/processorVersions/*}:evaluateProcessorVersion", + "(google.api.http).body": "*", + "(google.api.method_signature)": "processor_version", + "(google.longrunning.operation_info).response_type": "EvaluateProcessorVersionResponse", + "(google.longrunning.operation_info).metadata_type": "EvaluateProcessorVersionMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{processor_version=projects/*/locations/*/processors/*/processorVersions/*}:evaluateProcessorVersion", + "body": "*" + } + }, + { + "(google.api.method_signature)": "processor_version" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "EvaluateProcessorVersionResponse", + "metadata_type": "EvaluateProcessorVersionMetadata" + } + } + ] + }, + "GetEvaluation": { + "requestType": "GetEvaluationRequest", + "responseType": "Evaluation", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/processors/*/processorVersions/*/evaluations/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/processors/*/processorVersions/*/evaluations/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListEvaluations": { + "requestType": "ListEvaluationsRequest", + "responseType": "ListEvaluationsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/processors/*/processorVersions/*}/evaluations", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/processors/*/processorVersions/*}/evaluations" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] } } }, @@ -2083,6 +2190,108 @@ } } }, + "TrainProcessorVersionRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "documentai.googleapis.com/Processor" + } + }, + "processorVersion": { + "type": "ProcessorVersion", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "documentSchema": { + "type": "DocumentSchema", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "inputData": { + "type": "InputData", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "baseProcessorVersion": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "InputData": { + "fields": { + "trainingDocuments": { + "type": "BatchDocumentsInputConfig", + "id": 3 + }, + "testDocuments": { + "type": "BatchDocumentsInputConfig", + "id": 4 + } + } + } + } + }, + "TrainProcessorVersionResponse": { + "fields": { + "processorVersion": { + "type": "string", + "id": 1 + } + } + }, + "TrainProcessorVersionMetadata": { + "fields": { + "commonMetadata": { + "type": "CommonOperationMetadata", + "id": 1 + }, + "trainingDatasetValidation": { + "type": "DatasetValidation", + "id": 2 + }, + "testDatasetValidation": { + "type": "DatasetValidation", + "id": 3 + } + }, + "nested": { + "DatasetValidation": { + "fields": { + "documentErrorCount": { + "type": "int32", + "id": 3 + }, + "datasetErrorCount": { + "type": "int32", + "id": 4 + }, + "documentErrors": { + "rule": "repeated", + "type": "google.rpc.Status", + "id": 1 + }, + "datasetErrors": { + "rule": "repeated", + "type": "google.rpc.Status", + "id": 2 + } + } + } + } + }, "ReviewDocumentRequest": { "oneofs": { "source": { @@ -2163,6 +2372,86 @@ } } }, + "EvaluateProcessorVersionRequest": { + "fields": { + "processorVersion": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "documentai.googleapis.com/ProcessorVersion" + } + }, + "evaluationDocuments": { + "type": "BatchDocumentsInputConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "EvaluateProcessorVersionMetadata": { + "fields": { + "commonMetadata": { + "type": "CommonOperationMetadata", + "id": 1 + } + } + }, + "EvaluateProcessorVersionResponse": { + "fields": { + "evaluation": { + "type": "string", + "id": 2 + } + } + }, + "GetEvaluationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "documentai.googleapis.com/Evaluation" + } + } + } + }, + "ListEvaluationsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "documentai.googleapis.com/ProcessorVersion" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListEvaluationsResponse": { + "fields": { + "evaluations": { + "rule": "repeated", + "type": "Evaluation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, "DocumentSchema": { "fields": { "displayName": { @@ -2277,6 +2566,190 @@ } } }, + "EvaluationReference": { + "fields": { + "operation": { + "type": "string", + "id": 1 + }, + "evaluation": { + "type": "string", + "id": 2, + "options": { + "(google.api.resource_reference).type": "documentai.googleapis.com/Evaluation" + } + }, + "aggregateMetrics": { + "type": "Evaluation.Metrics", + "id": 4 + }, + "aggregateMetricsExact": { + "type": "Evaluation.Metrics", + "id": 5 + } + } + }, + "Evaluation": { + "options": { + "(google.api.resource).type": "documentai.googleapis.com/Evaluation", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "documentCounters": { + "type": "Counters", + "id": 5 + }, + "allEntitiesMetrics": { + "type": "MultiConfidenceMetrics", + "id": 3 + }, + "entityMetrics": { + "keyType": "string", + "type": "MultiConfidenceMetrics", + "id": 4 + }, + "kmsKeyName": { + "type": "string", + "id": 6 + }, + "kmsKeyVersionName": { + "type": "string", + "id": 7 + } + }, + "nested": { + "Counters": { + "fields": { + "inputDocumentsCount": { + "type": "int32", + "id": 1 + }, + "invalidDocumentsCount": { + "type": "int32", + "id": 2 + }, + "failedDocumentsCount": { + "type": "int32", + "id": 3 + }, + "evaluatedDocumentsCount": { + "type": "int32", + "id": 4 + } + } + }, + "Metrics": { + "fields": { + "precision": { + "type": "float", + "id": 1 + }, + "recall": { + "type": "float", + "id": 2 + }, + "f1Score": { + "type": "float", + "id": 3 + }, + "predictedOccurrencesCount": { + "type": "int32", + "id": 4 + }, + "groundTruthOccurrencesCount": { + "type": "int32", + "id": 5 + }, + "predictedDocumentCount": { + "type": "int32", + "id": 10 + }, + "groundTruthDocumentCount": { + "type": "int32", + "id": 11 + }, + "truePositivesCount": { + "type": "int32", + "id": 6 + }, + "falsePositivesCount": { + "type": "int32", + "id": 7 + }, + "falseNegativesCount": { + "type": "int32", + "id": 8 + }, + "totalDocumentsCount": { + "type": "int32", + "id": 9 + } + } + }, + "ConfidenceLevelMetrics": { + "fields": { + "confidenceLevel": { + "type": "float", + "id": 1 + }, + "metrics": { + "type": "Metrics", + "id": 2 + } + } + }, + "MultiConfidenceMetrics": { + "fields": { + "confidenceLevelMetrics": { + "rule": "repeated", + "type": "ConfidenceLevelMetrics", + "id": 1 + }, + "confidenceLevelMetricsExact": { + "rule": "repeated", + "type": "ConfidenceLevelMetrics", + "id": 4 + }, + "auprc": { + "type": "float", + "id": 2 + }, + "estimatedCalibrationError": { + "type": "float", + "id": 3 + }, + "auprcExact": { + "type": "float", + "id": 5 + }, + "estimatedCalibrationErrorExact": { + "type": "float", + "id": 6 + }, + "metricsType": { + "type": "MetricsType", + "id": 7 + } + }, + "nested": { + "MetricsType": { + "values": { + "METRICS_TYPE_UNSPECIFIED": 0, + "AGGREGATE": 1 + } + } + } + } + } + }, "CommonOperationMetadata": { "fields": { "state": { @@ -2339,6 +2812,10 @@ "type": "google.protobuf.Timestamp", "id": 7 }, + "latestEvaluation": { + "type": "EvaluationReference", + "id": 8 + }, "kmsKeyName": { "type": "string", "id": 9 diff --git a/packages/google-cloud-documentai/samples/README.md b/packages/google-cloud-documentai/samples/README.md index 5ed50386338..f35373f3178 100644 --- a/packages/google-cloud-documentai/samples/README.md +++ b/packages/google-cloud-documentai/samples/README.md @@ -19,16 +19,20 @@ * [Document_processor_service.deploy_processor_version](#document_processor_service.deploy_processor_version) * [Document_processor_service.disable_processor](#document_processor_service.disable_processor) * [Document_processor_service.enable_processor](#document_processor_service.enable_processor) + * [Document_processor_service.evaluate_processor_version](#document_processor_service.evaluate_processor_version) * [Document_processor_service.fetch_processor_types](#document_processor_service.fetch_processor_types) + * [Document_processor_service.get_evaluation](#document_processor_service.get_evaluation) * [Document_processor_service.get_processor](#document_processor_service.get_processor) * [Document_processor_service.get_processor_type](#document_processor_service.get_processor_type) * [Document_processor_service.get_processor_version](#document_processor_service.get_processor_version) + * [Document_processor_service.list_evaluations](#document_processor_service.list_evaluations) * [Document_processor_service.list_processor_types](#document_processor_service.list_processor_types) * [Document_processor_service.list_processor_versions](#document_processor_service.list_processor_versions) * [Document_processor_service.list_processors](#document_processor_service.list_processors) * [Document_processor_service.process_document](#document_processor_service.process_document) * [Document_processor_service.review_document](#document_processor_service.review_document) * [Document_processor_service.set_default_processor_version](#document_processor_service.set_default_processor_version) + * [Document_processor_service.train_processor_version](#document_processor_service.train_processor_version) * [Document_processor_service.undeploy_processor_version](#document_processor_service.undeploy_processor_version) * [Document_understanding_service.batch_process_documents](#document_understanding_service.batch_process_documents) * [Document_understanding_service.batch_process_documents](#document_understanding_service.batch_process_documents) @@ -192,6 +196,23 @@ __Usage:__ +### Document_processor_service.evaluate_processor_version + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.evaluate_processor_version.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1/document_processor_service.evaluate_processor_version.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-documentai/samples/generated/v1/document_processor_service.evaluate_processor_version.js` + + +----- + + + + ### Document_processor_service.fetch_processor_types View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.fetch_processor_types.js). @@ -209,6 +230,23 @@ __Usage:__ +### Document_processor_service.get_evaluation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.get_evaluation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1/document_processor_service.get_evaluation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-documentai/samples/generated/v1/document_processor_service.get_evaluation.js` + + +----- + + + + ### Document_processor_service.get_processor View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.get_processor.js). @@ -260,6 +298,23 @@ __Usage:__ +### Document_processor_service.list_evaluations + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.list_evaluations.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1/document_processor_service.list_evaluations.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-documentai/samples/generated/v1/document_processor_service.list_evaluations.js` + + +----- + + + + ### Document_processor_service.list_processor_types View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.list_processor_types.js). @@ -362,6 +417,23 @@ __Usage:__ +### Document_processor_service.train_processor_version + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.train_processor_version.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1/document_processor_service.train_processor_version.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-documentai/samples/generated/v1/document_processor_service.train_processor_version.js` + + +----- + + + + ### Document_processor_service.undeploy_processor_version View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.undeploy_processor_version.js). diff --git a/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.evaluate_processor_version.js b/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.evaluate_processor_version.js new file mode 100644 index 00000000000..e0de854f1ba --- /dev/null +++ b/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.evaluate_processor_version.js @@ -0,0 +1,70 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(processorVersion) { + // [START documentai_v1_generated_DocumentProcessorService_EvaluateProcessorVersion_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the + * ProcessorVersion google.cloud.documentai.v1.ProcessorVersion to + * evaluate. + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + */ + // const processorVersion = 'abc123' + /** + * Optional. The documents used in the evaluation. If unspecified, use the + * processor's dataset as evaluation input. + */ + // const evaluationDocuments = {} + + // Imports the Documentai library + const {DocumentProcessorServiceClient} = require('@google-cloud/documentai').v1; + + // Instantiates a client + const documentaiClient = new DocumentProcessorServiceClient(); + + async function callEvaluateProcessorVersion() { + // Construct request + const request = { + processorVersion, + }; + + // Run request + const [operation] = await documentaiClient.evaluateProcessorVersion(request); + const [response] = await operation.promise(); + console.log(response); + } + + callEvaluateProcessorVersion(); + // [END documentai_v1_generated_DocumentProcessorService_EvaluateProcessorVersion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.get_evaluation.js b/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.get_evaluation.js new file mode 100644 index 00000000000..285110768af --- /dev/null +++ b/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.get_evaluation.js @@ -0,0 +1,63 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START documentai_v1_generated_DocumentProcessorService_GetEvaluation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the + * Evaluation google.cloud.documentai.v1.Evaluation to get. + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` + */ + // const name = 'abc123' + + // Imports the Documentai library + const {DocumentProcessorServiceClient} = require('@google-cloud/documentai').v1; + + // Instantiates a client + const documentaiClient = new DocumentProcessorServiceClient(); + + async function callGetEvaluation() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await documentaiClient.getEvaluation(request); + console.log(response); + } + + callGetEvaluation(); + // [END documentai_v1_generated_DocumentProcessorService_GetEvaluation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.list_evaluations.js b/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.list_evaluations.js new file mode 100644 index 00000000000..ab88b57a12f --- /dev/null +++ b/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.list_evaluations.js @@ -0,0 +1,77 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START documentai_v1_generated_DocumentProcessorService_ListEvaluations_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the + * ProcessorVersion google.cloud.documentai.v1.ProcessorVersion to list + * evaluations for. + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + */ + // const parent = 'abc123' + /** + * The standard list page size. + * If unspecified, at most 5 evaluations will be returned. + * The maximum value is 100; values above 100 will be coerced to 100. + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListEvaluations` call. + * Provide this to retrieve the subsequent page. + */ + // const pageToken = 'abc123' + + // Imports the Documentai library + const {DocumentProcessorServiceClient} = require('@google-cloud/documentai').v1; + + // Instantiates a client + const documentaiClient = new DocumentProcessorServiceClient(); + + async function callListEvaluations() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await documentaiClient.listEvaluationsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListEvaluations(); + // [END documentai_v1_generated_DocumentProcessorService_ListEvaluations_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.train_processor_version.js b/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.train_processor_version.js new file mode 100644 index 00000000000..aa75bcfeb20 --- /dev/null +++ b/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.train_processor_version.js @@ -0,0 +1,83 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, processorVersion) { + // [START documentai_v1_generated_DocumentProcessorService_TrainProcessorVersion_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent (project, location and processor) to create the new + * version for. Format: + * `projects/{project}/locations/{location}/processors/{processor}`. + */ + // const parent = 'abc123' + /** + * Required. The processor version to be created. + */ + // const processorVersion = {} + /** + * Optional. The schema the processor version will be trained with. + */ + // const documentSchema = {} + /** + * Optional. The input data used to train the `ProcessorVersion`. + */ + // const inputData = {} + /** + * Optional. The processor version to use as a base for training. This + * processor version must be a child of `parent`. Format: + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`. + */ + // const baseProcessorVersion = 'abc123' + + // Imports the Documentai library + const {DocumentProcessorServiceClient} = require('@google-cloud/documentai').v1; + + // Instantiates a client + const documentaiClient = new DocumentProcessorServiceClient(); + + async function callTrainProcessorVersion() { + // Construct request + const request = { + parent, + processorVersion, + }; + + // Run request + const [operation] = await documentaiClient.trainProcessorVersion(request); + const [response] = await operation.promise(); + console.log(response); + } + + callTrainProcessorVersion(); + // [END documentai_v1_generated_DocumentProcessorService_TrainProcessorVersion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata.google.cloud.documentai.v1.json b/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata.google.cloud.documentai.v1.json index 66381e49fcd..fc92848239a 100644 --- a/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata.google.cloud.documentai.v1.json +++ b/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata.google.cloud.documentai.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "7.0.0", + "version": "7.0.1", "language": "TYPESCRIPT", "apis": [ { @@ -335,6 +335,62 @@ } } }, + { + "regionTag": "documentai_v1_generated_DocumentProcessorService_TrainProcessorVersion_async", + "title": "DocumentProcessorService trainProcessorVersion Sample", + "origin": "API_DEFINITION", + "description": " Trains a new processor version. Operation metadata is returned as cloud_documentai_core.TrainProcessorVersionMetadata.", + "canonical": true, + "file": "document_processor_service.train_processor_version.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TrainProcessorVersion", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService.TrainProcessorVersion", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "processor_version", + "type": ".google.cloud.documentai.v1.ProcessorVersion" + }, + { + "name": "document_schema", + "type": ".google.cloud.documentai.v1.DocumentSchema" + }, + { + "name": "input_data", + "type": ".google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData" + }, + { + "name": "base_processor_version", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DocumentProcessorServiceClient", + "fullName": "google.cloud.documentai.v1.DocumentProcessorServiceClient" + }, + "method": { + "shortName": "TrainProcessorVersion", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService.TrainProcessorVersion", + "service": { + "shortName": "DocumentProcessorService", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService" + } + } + } + }, { "regionTag": "documentai_v1_generated_DocumentProcessorService_GetProcessorVersion_async", "title": "DocumentProcessorService getProcessorVersion Sample", @@ -806,6 +862,138 @@ } } } + }, + { + "regionTag": "documentai_v1_generated_DocumentProcessorService_EvaluateProcessorVersion_async", + "title": "DocumentProcessorService evaluateProcessorVersion Sample", + "origin": "API_DEFINITION", + "description": " Evaluates a ProcessorVersion against annotated documents, producing an Evaluation.", + "canonical": true, + "file": "document_processor_service.evaluate_processor_version.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "EvaluateProcessorVersion", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService.EvaluateProcessorVersion", + "async": true, + "parameters": [ + { + "name": "processor_version", + "type": "TYPE_STRING" + }, + { + "name": "evaluation_documents", + "type": ".google.cloud.documentai.v1.BatchDocumentsInputConfig" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DocumentProcessorServiceClient", + "fullName": "google.cloud.documentai.v1.DocumentProcessorServiceClient" + }, + "method": { + "shortName": "EvaluateProcessorVersion", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService.EvaluateProcessorVersion", + "service": { + "shortName": "DocumentProcessorService", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService" + } + } + } + }, + { + "regionTag": "documentai_v1_generated_DocumentProcessorService_GetEvaluation_async", + "title": "DocumentProcessorService getEvaluation Sample", + "origin": "API_DEFINITION", + "description": " Retrieves a specific evaluation.", + "canonical": true, + "file": "document_processor_service.get_evaluation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetEvaluation", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService.GetEvaluation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.documentai.v1.Evaluation", + "client": { + "shortName": "DocumentProcessorServiceClient", + "fullName": "google.cloud.documentai.v1.DocumentProcessorServiceClient" + }, + "method": { + "shortName": "GetEvaluation", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService.GetEvaluation", + "service": { + "shortName": "DocumentProcessorService", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService" + } + } + } + }, + { + "regionTag": "documentai_v1_generated_DocumentProcessorService_ListEvaluations_async", + "title": "DocumentProcessorService listEvaluations Sample", + "origin": "API_DEFINITION", + "description": " Retrieves a set of evaluations for a given processor version.", + "canonical": true, + "file": "document_processor_service.list_evaluations.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListEvaluations", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService.ListEvaluations", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.documentai.v1.ListEvaluationsResponse", + "client": { + "shortName": "DocumentProcessorServiceClient", + "fullName": "google.cloud.documentai.v1.DocumentProcessorServiceClient" + }, + "method": { + "shortName": "ListEvaluations", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService.ListEvaluations", + "service": { + "shortName": "DocumentProcessorService", + "fullName": "google.cloud.documentai.v1.DocumentProcessorService" + } + } + } } ] } \ No newline at end of file diff --git a/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata.google.cloud.documentai.v1beta1.json b/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata.google.cloud.documentai.v1beta1.json index 118a4edc8da..2b41fe65610 100644 --- a/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata.google.cloud.documentai.v1beta1.json +++ b/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata.google.cloud.documentai.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "7.0.0", + "version": "7.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata.google.cloud.documentai.v1beta2.json b/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata.google.cloud.documentai.v1beta2.json index b2f12cb6156..330ff8b03fc 100644 --- a/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata.google.cloud.documentai.v1beta2.json +++ b/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata.google.cloud.documentai.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "7.0.0", + "version": "7.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata.google.cloud.documentai.v1beta3.json b/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata.google.cloud.documentai.v1beta3.json index 6ae43c89590..d19cfb35d26 100644 --- a/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata.google.cloud.documentai.v1beta3.json +++ b/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata.google.cloud.documentai.v1beta3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "7.0.0", + "version": "7.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/src/v1/document_processor_service_client.ts b/packages/google-cloud-documentai/src/v1/document_processor_service_client.ts index 6840bf24442..19348ba6ef7 100644 --- a/packages/google-cloud-documentai/src/v1/document_processor_service_client.ts +++ b/packages/google-cloud-documentai/src/v1/document_processor_service_client.ts @@ -192,6 +192,9 @@ export class DocumentProcessorServiceClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this.pathTemplates = { + evaluationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}' + ), humanReviewConfigPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/processors/{processor}/humanReviewConfig' ), @@ -231,6 +234,11 @@ export class DocumentProcessorServiceClient { 'nextPageToken', 'processorVersions' ), + listEvaluations: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'evaluations' + ), }; const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); @@ -293,6 +301,12 @@ export class DocumentProcessorServiceClient { const batchProcessDocumentsMetadata = protoFilesRoot.lookup( '.google.cloud.documentai.v1.BatchProcessMetadata' ) as gax.protobuf.Type; + const trainProcessorVersionResponse = protoFilesRoot.lookup( + '.google.cloud.documentai.v1.TrainProcessorVersionResponse' + ) as gax.protobuf.Type; + const trainProcessorVersionMetadata = protoFilesRoot.lookup( + '.google.cloud.documentai.v1.TrainProcessorVersionMetadata' + ) as gax.protobuf.Type; const deleteProcessorVersionResponse = protoFilesRoot.lookup( '.google.protobuf.Empty' ) as gax.protobuf.Type; @@ -341,6 +355,12 @@ export class DocumentProcessorServiceClient { const reviewDocumentMetadata = protoFilesRoot.lookup( '.google.cloud.documentai.v1.ReviewDocumentOperationMetadata' ) as gax.protobuf.Type; + const evaluateProcessorVersionResponse = protoFilesRoot.lookup( + '.google.cloud.documentai.v1.EvaluateProcessorVersionResponse' + ) as gax.protobuf.Type; + const evaluateProcessorVersionMetadata = protoFilesRoot.lookup( + '.google.cloud.documentai.v1.EvaluateProcessorVersionMetadata' + ) as gax.protobuf.Type; this.descriptors.longrunning = { batchProcessDocuments: new this._gaxModule.LongrunningDescriptor( @@ -350,6 +370,13 @@ export class DocumentProcessorServiceClient { ), batchProcessDocumentsMetadata.decode.bind(batchProcessDocumentsMetadata) ), + trainProcessorVersion: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + trainProcessorVersionResponse.decode.bind( + trainProcessorVersionResponse + ), + trainProcessorVersionMetadata.decode.bind(trainProcessorVersionMetadata) + ), deleteProcessorVersion: new this._gaxModule.LongrunningDescriptor( this.operationsClient, deleteProcessorVersionResponse.decode.bind( @@ -406,6 +433,15 @@ export class DocumentProcessorServiceClient { reviewDocumentResponse.decode.bind(reviewDocumentResponse), reviewDocumentMetadata.decode.bind(reviewDocumentMetadata) ), + evaluateProcessorVersion: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + evaluateProcessorVersionResponse.decode.bind( + evaluateProcessorVersionResponse + ), + evaluateProcessorVersionMetadata.decode.bind( + evaluateProcessorVersionMetadata + ) + ), }; // Put together the default options sent with requests. @@ -466,6 +502,7 @@ export class DocumentProcessorServiceClient { 'getProcessorType', 'listProcessors', 'getProcessor', + 'trainProcessorVersion', 'getProcessorVersion', 'listProcessorVersions', 'deleteProcessorVersion', @@ -477,6 +514,9 @@ export class DocumentProcessorServiceClient { 'disableProcessor', 'setDefaultProcessorVersion', 'reviewDocument', + 'evaluateProcessorVersion', + 'getEvaluation', + 'listEvaluations', ]; for (const methodName of documentProcessorServiceStubMethods) { const callPromise = this.documentProcessorServiceStub.then( @@ -1124,6 +1164,99 @@ export class DocumentProcessorServiceClient { this.initialize(); return this.innerApiCalls.createProcessor(request, options, callback); } + /** + * Retrieves a specific evaluation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the + * {@link google.cloud.documentai.v1.Evaluation|Evaluation} to get. + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` + * @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.documentai.v1.Evaluation | Evaluation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/document_processor_service.get_evaluation.js + * region_tag:documentai_v1_generated_DocumentProcessorService_GetEvaluation_async + */ + getEvaluation( + request?: protos.google.cloud.documentai.v1.IGetEvaluationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.documentai.v1.IEvaluation, + protos.google.cloud.documentai.v1.IGetEvaluationRequest | undefined, + {} | undefined + ] + >; + getEvaluation( + request: protos.google.cloud.documentai.v1.IGetEvaluationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.documentai.v1.IEvaluation, + | protos.google.cloud.documentai.v1.IGetEvaluationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getEvaluation( + request: protos.google.cloud.documentai.v1.IGetEvaluationRequest, + callback: Callback< + protos.google.cloud.documentai.v1.IEvaluation, + | protos.google.cloud.documentai.v1.IGetEvaluationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getEvaluation( + request?: protos.google.cloud.documentai.v1.IGetEvaluationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.documentai.v1.IEvaluation, + | protos.google.cloud.documentai.v1.IGetEvaluationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.documentai.v1.IEvaluation, + | protos.google.cloud.documentai.v1.IGetEvaluationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.documentai.v1.IEvaluation, + protos.google.cloud.documentai.v1.IGetEvaluationRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getEvaluation(request, options, callback); + } /** * LRO endpoint to batch process many documents. The output is written @@ -1276,6 +1409,158 @@ export class DocumentProcessorServiceClient { protos.google.cloud.documentai.v1.BatchProcessMetadata >; } + /** + * Trains a new processor version. + * Operation metadata is returned as + * cloud_documentai_core.TrainProcessorVersionMetadata. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent (project, location and processor) to create the new + * version for. Format: + * `projects/{project}/locations/{location}/processors/{processor}`. + * @param {google.cloud.documentai.v1.ProcessorVersion} request.processorVersion + * Required. The processor version to be created. + * @param {google.cloud.documentai.v1.DocumentSchema} [request.documentSchema] + * Optional. The schema the processor version will be trained with. + * @param {google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData} [request.inputData] + * Optional. The input data used to train the `ProcessorVersion`. + * @param {string} [request.baseProcessorVersion] + * Optional. The processor version to use as a base for training. This + * processor version must be a child of `parent`. Format: + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/document_processor_service.train_processor_version.js + * region_tag:documentai_v1_generated_DocumentProcessorService_TrainProcessorVersion_async + */ + trainProcessorVersion( + request?: protos.google.cloud.documentai.v1.ITrainProcessorVersionRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.documentai.v1.ITrainProcessorVersionResponse, + protos.google.cloud.documentai.v1.ITrainProcessorVersionMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + trainProcessorVersion( + request: protos.google.cloud.documentai.v1.ITrainProcessorVersionRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.documentai.v1.ITrainProcessorVersionResponse, + protos.google.cloud.documentai.v1.ITrainProcessorVersionMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + trainProcessorVersion( + request: protos.google.cloud.documentai.v1.ITrainProcessorVersionRequest, + callback: Callback< + LROperation< + protos.google.cloud.documentai.v1.ITrainProcessorVersionResponse, + protos.google.cloud.documentai.v1.ITrainProcessorVersionMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + trainProcessorVersion( + request?: protos.google.cloud.documentai.v1.ITrainProcessorVersionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.documentai.v1.ITrainProcessorVersionResponse, + protos.google.cloud.documentai.v1.ITrainProcessorVersionMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.documentai.v1.ITrainProcessorVersionResponse, + protos.google.cloud.documentai.v1.ITrainProcessorVersionMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.documentai.v1.ITrainProcessorVersionResponse, + protos.google.cloud.documentai.v1.ITrainProcessorVersionMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.trainProcessorVersion(request, options, callback); + } + /** + * Check the status of the long running operation returned by `trainProcessorVersion()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/document_processor_service.train_processor_version.js + * region_tag:documentai_v1_generated_DocumentProcessorService_TrainProcessorVersion_async + */ + async checkTrainProcessorVersionProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.documentai.v1.TrainProcessorVersionResponse, + protos.google.cloud.documentai.v1.TrainProcessorVersionMetadata + > + > { + 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.trainProcessorVersion, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.documentai.v1.TrainProcessorVersionResponse, + protos.google.cloud.documentai.v1.TrainProcessorVersionMetadata + >; + } /** * Deletes the processor version, all artifacts under the processor version * will be deleted. @@ -2419,6 +2704,155 @@ export class DocumentProcessorServiceClient { protos.google.cloud.documentai.v1.ReviewDocumentOperationMetadata >; } + /** + * Evaluates a ProcessorVersion against annotated documents, producing an + * Evaluation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.processorVersion + * Required. The resource name of the + * {@link google.cloud.documentai.v1.ProcessorVersion|ProcessorVersion} to + * evaluate. + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + * @param {google.cloud.documentai.v1.BatchDocumentsInputConfig} [request.evaluationDocuments] + * Optional. The documents used in the evaluation. If unspecified, use the + * processor's dataset as evaluation input. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/document_processor_service.evaluate_processor_version.js + * region_tag:documentai_v1_generated_DocumentProcessorService_EvaluateProcessorVersion_async + */ + evaluateProcessorVersion( + request?: protos.google.cloud.documentai.v1.IEvaluateProcessorVersionRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.documentai.v1.IEvaluateProcessorVersionResponse, + protos.google.cloud.documentai.v1.IEvaluateProcessorVersionMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + evaluateProcessorVersion( + request: protos.google.cloud.documentai.v1.IEvaluateProcessorVersionRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.documentai.v1.IEvaluateProcessorVersionResponse, + protos.google.cloud.documentai.v1.IEvaluateProcessorVersionMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + evaluateProcessorVersion( + request: protos.google.cloud.documentai.v1.IEvaluateProcessorVersionRequest, + callback: Callback< + LROperation< + protos.google.cloud.documentai.v1.IEvaluateProcessorVersionResponse, + protos.google.cloud.documentai.v1.IEvaluateProcessorVersionMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + evaluateProcessorVersion( + request?: protos.google.cloud.documentai.v1.IEvaluateProcessorVersionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.documentai.v1.IEvaluateProcessorVersionResponse, + protos.google.cloud.documentai.v1.IEvaluateProcessorVersionMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.documentai.v1.IEvaluateProcessorVersionResponse, + protos.google.cloud.documentai.v1.IEvaluateProcessorVersionMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.documentai.v1.IEvaluateProcessorVersionResponse, + protos.google.cloud.documentai.v1.IEvaluateProcessorVersionMetadata + >, + 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({ + processor_version: request.processorVersion ?? '', + }); + this.initialize(); + return this.innerApiCalls.evaluateProcessorVersion( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `evaluateProcessorVersion()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/document_processor_service.evaluate_processor_version.js + * region_tag:documentai_v1_generated_DocumentProcessorService_EvaluateProcessorVersion_async + */ + async checkEvaluateProcessorVersionProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.documentai.v1.EvaluateProcessorVersionResponse, + protos.google.cloud.documentai.v1.EvaluateProcessorVersionMetadata + > + > { + 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.evaluateProcessorVersion, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.documentai.v1.EvaluateProcessorVersionResponse, + protos.google.cloud.documentai.v1.EvaluateProcessorVersionMetadata + >; + } /** * Lists the processor types that exist. * @@ -3025,6 +3459,213 @@ export class DocumentProcessorServiceClient { callSettings ) as AsyncIterable; } + /** + * Retrieves a set of evaluations for a given processor version. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the + * {@link google.cloud.documentai.v1.ProcessorVersion|ProcessorVersion} to list + * evaluations for. + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + * @param {number} request.pageSize + * The standard list page size. + * If unspecified, at most 5 evaluations will be returned. + * The maximum value is 100; values above 100 will be coerced to 100. + * @param {string} request.pageToken + * A page token, received from a previous `ListEvaluations` call. + * Provide this to retrieve the subsequent page. + * @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 google.cloud.documentai.v1.Evaluation | Evaluation}. + * 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 `listEvaluationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listEvaluations( + request?: protos.google.cloud.documentai.v1.IListEvaluationsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.documentai.v1.IEvaluation[], + protos.google.cloud.documentai.v1.IListEvaluationsRequest | null, + protos.google.cloud.documentai.v1.IListEvaluationsResponse + ] + >; + listEvaluations( + request: protos.google.cloud.documentai.v1.IListEvaluationsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.documentai.v1.IListEvaluationsRequest, + | protos.google.cloud.documentai.v1.IListEvaluationsResponse + | null + | undefined, + protos.google.cloud.documentai.v1.IEvaluation + > + ): void; + listEvaluations( + request: protos.google.cloud.documentai.v1.IListEvaluationsRequest, + callback: PaginationCallback< + protos.google.cloud.documentai.v1.IListEvaluationsRequest, + | protos.google.cloud.documentai.v1.IListEvaluationsResponse + | null + | undefined, + protos.google.cloud.documentai.v1.IEvaluation + > + ): void; + listEvaluations( + request?: protos.google.cloud.documentai.v1.IListEvaluationsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.documentai.v1.IListEvaluationsRequest, + | protos.google.cloud.documentai.v1.IListEvaluationsResponse + | null + | undefined, + protos.google.cloud.documentai.v1.IEvaluation + >, + callback?: PaginationCallback< + protos.google.cloud.documentai.v1.IListEvaluationsRequest, + | protos.google.cloud.documentai.v1.IListEvaluationsResponse + | null + | undefined, + protos.google.cloud.documentai.v1.IEvaluation + > + ): Promise< + [ + protos.google.cloud.documentai.v1.IEvaluation[], + protos.google.cloud.documentai.v1.IListEvaluationsRequest | null, + protos.google.cloud.documentai.v1.IListEvaluationsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listEvaluations(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the + * {@link google.cloud.documentai.v1.ProcessorVersion|ProcessorVersion} to list + * evaluations for. + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + * @param {number} request.pageSize + * The standard list page size. + * If unspecified, at most 5 evaluations will be returned. + * The maximum value is 100; values above 100 will be coerced to 100. + * @param {string} request.pageToken + * A page token, received from a previous `ListEvaluations` call. + * Provide this to retrieve the subsequent page. + * @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 google.cloud.documentai.v1.Evaluation | Evaluation} 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 `listEvaluationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listEvaluationsStream( + request?: protos.google.cloud.documentai.v1.IListEvaluationsRequest, + 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['listEvaluations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listEvaluations.createStream( + this.innerApiCalls.listEvaluations as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listEvaluations`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the + * {@link google.cloud.documentai.v1.ProcessorVersion|ProcessorVersion} to list + * evaluations for. + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + * @param {number} request.pageSize + * The standard list page size. + * If unspecified, at most 5 evaluations will be returned. + * The maximum value is 100; values above 100 will be coerced to 100. + * @param {string} request.pageToken + * A page token, received from a previous `ListEvaluations` call. + * Provide this to retrieve the subsequent page. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.documentai.v1.Evaluation | Evaluation}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/document_processor_service.list_evaluations.js + * region_tag:documentai_v1_generated_DocumentProcessorService_ListEvaluations_async + */ + listEvaluationsAsync( + request?: protos.google.cloud.documentai.v1.IListEvaluationsRequest, + 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['listEvaluations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listEvaluations.asyncIterate( + this.innerApiCalls['listEvaluations'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } /** * Gets information about a location. * @@ -3284,6 +3925,92 @@ export class DocumentProcessorServiceClient { // -- Path templates -- // -------------------- + /** + * Return a fully-qualified evaluation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} processor + * @param {string} processor_version + * @param {string} evaluation + * @returns {string} Resource name string. + */ + evaluationPath( + project: string, + location: string, + processor: string, + processorVersion: string, + evaluation: string + ) { + return this.pathTemplates.evaluationPathTemplate.render({ + project: project, + location: location, + processor: processor, + processor_version: processorVersion, + evaluation: evaluation, + }); + } + + /** + * Parse the project from Evaluation resource. + * + * @param {string} evaluationName + * A fully-qualified path representing Evaluation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEvaluationName(evaluationName: string) { + return this.pathTemplates.evaluationPathTemplate.match(evaluationName) + .project; + } + + /** + * Parse the location from Evaluation resource. + * + * @param {string} evaluationName + * A fully-qualified path representing Evaluation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEvaluationName(evaluationName: string) { + return this.pathTemplates.evaluationPathTemplate.match(evaluationName) + .location; + } + + /** + * Parse the processor from Evaluation resource. + * + * @param {string} evaluationName + * A fully-qualified path representing Evaluation resource. + * @returns {string} A string representing the processor. + */ + matchProcessorFromEvaluationName(evaluationName: string) { + return this.pathTemplates.evaluationPathTemplate.match(evaluationName) + .processor; + } + + /** + * Parse the processor_version from Evaluation resource. + * + * @param {string} evaluationName + * A fully-qualified path representing Evaluation resource. + * @returns {string} A string representing the processor_version. + */ + matchProcessorVersionFromEvaluationName(evaluationName: string) { + return this.pathTemplates.evaluationPathTemplate.match(evaluationName) + .processor_version; + } + + /** + * Parse the evaluation from Evaluation resource. + * + * @param {string} evaluationName + * A fully-qualified path representing Evaluation resource. + * @returns {string} A string representing the evaluation. + */ + matchEvaluationFromEvaluationName(evaluationName: string) { + return this.pathTemplates.evaluationPathTemplate.match(evaluationName) + .evaluation; + } + /** * Return a fully-qualified humanReviewConfig resource name string. * diff --git a/packages/google-cloud-documentai/src/v1/document_processor_service_client_config.json b/packages/google-cloud-documentai/src/v1/document_processor_service_client_config.json index 6bcdb07183c..2657b5ec58e 100644 --- a/packages/google-cloud-documentai/src/v1/document_processor_service_client_config.json +++ b/packages/google-cloud-documentai/src/v1/document_processor_service_client_config.json @@ -50,6 +50,10 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "TrainProcessorVersion": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "GetProcessorVersion": { "retry_codes_name": "non_idempotent", "retry_params_name": "default" @@ -94,6 +98,18 @@ "timeout_millis": 120000, "retry_codes_name": "idempotent", "retry_params_name": "default" + }, + "EvaluateProcessorVersion": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetEvaluation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListEvaluations": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-documentai/src/v1/document_processor_service_proto_list.json b/packages/google-cloud-documentai/src/v1/document_processor_service_proto_list.json index a19f0a8b0ca..6289f351f4a 100644 --- a/packages/google-cloud-documentai/src/v1/document_processor_service_proto_list.json +++ b/packages/google-cloud-documentai/src/v1/document_processor_service_proto_list.json @@ -4,6 +4,7 @@ "../../protos/google/cloud/documentai/v1/document_io.proto", "../../protos/google/cloud/documentai/v1/document_processor_service.proto", "../../protos/google/cloud/documentai/v1/document_schema.proto", + "../../protos/google/cloud/documentai/v1/evaluation.proto", "../../protos/google/cloud/documentai/v1/geometry.proto", "../../protos/google/cloud/documentai/v1/operation_metadata.proto", "../../protos/google/cloud/documentai/v1/processor.proto", diff --git a/packages/google-cloud-documentai/src/v1/gapic_metadata.json b/packages/google-cloud-documentai/src/v1/gapic_metadata.json index d0ad961b4a1..59cbeb99dc1 100644 --- a/packages/google-cloud-documentai/src/v1/gapic_metadata.json +++ b/packages/google-cloud-documentai/src/v1/gapic_metadata.json @@ -40,11 +40,21 @@ "createProcessor" ] }, + "GetEvaluation": { + "methods": [ + "getEvaluation" + ] + }, "BatchProcessDocuments": { "methods": [ "batchProcessDocuments" ] }, + "TrainProcessorVersion": { + "methods": [ + "trainProcessorVersion" + ] + }, "DeleteProcessorVersion": { "methods": [ "deleteProcessorVersion" @@ -85,6 +95,11 @@ "reviewDocument" ] }, + "EvaluateProcessorVersion": { + "methods": [ + "evaluateProcessorVersion" + ] + }, "ListProcessorTypes": { "methods": [ "listProcessorTypes", @@ -105,6 +120,13 @@ "listProcessorVersionsStream", "listProcessorVersionsAsync" ] + }, + "ListEvaluations": { + "methods": [ + "listEvaluations", + "listEvaluationsStream", + "listEvaluationsAsync" + ] } } }, @@ -141,11 +163,21 @@ "createProcessor" ] }, + "GetEvaluation": { + "methods": [ + "getEvaluation" + ] + }, "BatchProcessDocuments": { "methods": [ "batchProcessDocuments" ] }, + "TrainProcessorVersion": { + "methods": [ + "trainProcessorVersion" + ] + }, "DeleteProcessorVersion": { "methods": [ "deleteProcessorVersion" @@ -186,6 +218,11 @@ "reviewDocument" ] }, + "EvaluateProcessorVersion": { + "methods": [ + "evaluateProcessorVersion" + ] + }, "ListProcessorTypes": { "methods": [ "listProcessorTypes", @@ -206,6 +243,13 @@ "listProcessorVersionsStream", "listProcessorVersionsAsync" ] + }, + "ListEvaluations": { + "methods": [ + "listEvaluations", + "listEvaluationsStream", + "listEvaluationsAsync" + ] } } } diff --git a/packages/google-cloud-documentai/test/gapic_document_processor_service_v1.ts b/packages/google-cloud-documentai/test/gapic_document_processor_service_v1.ts index a6966def929..8834c1909d2 100644 --- a/packages/google-cloud-documentai/test/gapic_document_processor_service_v1.ts +++ b/packages/google-cloud-documentai/test/gapic_document_processor_service_v1.ts @@ -1080,6 +1080,140 @@ describe('v1.DocumentProcessorServiceClient', () => { }); }); + describe('getEvaluation', () => { + it('invokes getEvaluation without error', async () => { + const client = + new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.documentai.v1.GetEvaluationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.documentai.v1.GetEvaluationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.documentai.v1.Evaluation() + ); + client.innerApiCalls.getEvaluation = stubSimpleCall(expectedResponse); + const [response] = await client.getEvaluation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getEvaluation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getEvaluation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEvaluation without error using callback', async () => { + const client = + new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.documentai.v1.GetEvaluationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.documentai.v1.GetEvaluationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.documentai.v1.Evaluation() + ); + client.innerApiCalls.getEvaluation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getEvaluation( + request, + ( + err?: Error | null, + result?: protos.google.cloud.documentai.v1.IEvaluation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getEvaluation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getEvaluation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEvaluation with error', async () => { + const client = + new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.documentai.v1.GetEvaluationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.documentai.v1.GetEvaluationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getEvaluation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getEvaluation(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getEvaluation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getEvaluation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEvaluation with closed client', async () => { + const client = + new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.documentai.v1.GetEvaluationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.documentai.v1.GetEvaluationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getEvaluation(request), expectedError); + }); + }); + describe('batchProcessDocuments', () => { it('invokes batchProcessDocuments without error', async () => { const client = @@ -1283,8 +1417,8 @@ describe('v1.DocumentProcessorServiceClient', () => { }); }); - describe('deleteProcessorVersion', () => { - it('invokes deleteProcessorVersion without error', async () => { + describe('trainProcessorVersion', () => { + it('invokes trainProcessorVersion without error', async () => { const client = new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1292,33 +1426,33 @@ describe('v1.DocumentProcessorServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.documentai.v1.DeleteProcessorVersionRequest() + new protos.google.cloud.documentai.v1.TrainProcessorVersionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.documentai.v1.DeleteProcessorVersionRequest', - ['name'] + '.google.cloud.documentai.v1.TrainProcessorVersionRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.deleteProcessorVersion = + client.innerApiCalls.trainProcessorVersion = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteProcessorVersion(request); + const [operation] = await client.trainProcessorVersion(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deleteProcessorVersion as SinonStub + client.innerApiCalls.trainProcessorVersion as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteProcessorVersion as SinonStub + client.innerApiCalls.trainProcessorVersion as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteProcessorVersion without error using callback', async () => { + it('invokes trainProcessorVersion without error using callback', async () => { const client = new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1326,27 +1460,27 @@ describe('v1.DocumentProcessorServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.documentai.v1.DeleteProcessorVersionRequest() + new protos.google.cloud.documentai.v1.TrainProcessorVersionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.documentai.v1.DeleteProcessorVersionRequest', - ['name'] + '.google.cloud.documentai.v1.TrainProcessorVersionRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.deleteProcessorVersion = + client.innerApiCalls.trainProcessorVersion = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.deleteProcessorVersion( + client.trainProcessorVersion( request, ( err?: Error | null, result?: LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.documentai.v1.IDeleteProcessorVersionMetadata + protos.google.cloud.documentai.v1.ITrainProcessorVersionResponse, + protos.google.cloud.documentai.v1.ITrainProcessorVersionMetadata > | null ) => { if (err) { @@ -1358,22 +1492,22 @@ describe('v1.DocumentProcessorServiceClient', () => { ); }); const operation = (await promise) as LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.documentai.v1.IDeleteProcessorVersionMetadata + protos.google.cloud.documentai.v1.ITrainProcessorVersionResponse, + protos.google.cloud.documentai.v1.ITrainProcessorVersionMetadata >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deleteProcessorVersion as SinonStub + client.innerApiCalls.trainProcessorVersion as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteProcessorVersion as SinonStub + client.innerApiCalls.trainProcessorVersion as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteProcessorVersion with call error', async () => { + it('invokes trainProcessorVersion with call error', async () => { const client = new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1381,34 +1515,34 @@ describe('v1.DocumentProcessorServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.documentai.v1.DeleteProcessorVersionRequest() + new protos.google.cloud.documentai.v1.TrainProcessorVersionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.documentai.v1.DeleteProcessorVersionRequest', - ['name'] + '.google.cloud.documentai.v1.TrainProcessorVersionRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.deleteProcessorVersion = stubLongRunningCall( + client.innerApiCalls.trainProcessorVersion = stubLongRunningCall( undefined, expectedError ); await assert.rejects( - client.deleteProcessorVersion(request), + client.trainProcessorVersion(request), expectedError ); const actualRequest = ( - client.innerApiCalls.deleteProcessorVersion as SinonStub + client.innerApiCalls.trainProcessorVersion as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteProcessorVersion as SinonStub + client.innerApiCalls.trainProcessorVersion as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteProcessorVersion with LRO error', async () => { + it('invokes trainProcessorVersion with LRO error', async () => { const client = new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1416,33 +1550,33 @@ describe('v1.DocumentProcessorServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.documentai.v1.DeleteProcessorVersionRequest() + new protos.google.cloud.documentai.v1.TrainProcessorVersionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.documentai.v1.DeleteProcessorVersionRequest', - ['name'] + '.google.cloud.documentai.v1.TrainProcessorVersionRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.deleteProcessorVersion = stubLongRunningCall( + client.innerApiCalls.trainProcessorVersion = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.deleteProcessorVersion(request); + const [operation] = await client.trainProcessorVersion(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.deleteProcessorVersion as SinonStub + client.innerApiCalls.trainProcessorVersion as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteProcessorVersion as SinonStub + client.innerApiCalls.trainProcessorVersion as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkDeleteProcessorVersionProgress without error', async () => { + it('invokes checkTrainProcessorVersionProgress without error', async () => { const client = new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1457,7 +1591,7 @@ describe('v1.DocumentProcessorServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeleteProcessorVersionProgress( + const decodedOperation = await client.checkTrainProcessorVersionProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -1465,7 +1599,7 @@ describe('v1.DocumentProcessorServiceClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkDeleteProcessorVersionProgress with error', async () => { + it('invokes checkTrainProcessorVersionProgress with error', async () => { const client = new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1479,15 +1613,15 @@ describe('v1.DocumentProcessorServiceClient', () => { expectedError ); await assert.rejects( - client.checkDeleteProcessorVersionProgress(''), + client.checkTrainProcessorVersionProgress(''), expectedError ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('deployProcessorVersion', () => { - it('invokes deployProcessorVersion without error', async () => { + describe('deleteProcessorVersion', () => { + it('invokes deleteProcessorVersion without error', async () => { const client = new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1495,10 +1629,10 @@ describe('v1.DocumentProcessorServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.documentai.v1.DeployProcessorVersionRequest() + new protos.google.cloud.documentai.v1.DeleteProcessorVersionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.documentai.v1.DeployProcessorVersionRequest', + '.google.cloud.documentai.v1.DeleteProcessorVersionRequest', ['name'] ); request.name = defaultValue1; @@ -1506,22 +1640,22 @@ describe('v1.DocumentProcessorServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.deployProcessorVersion = + client.innerApiCalls.deleteProcessorVersion = stubLongRunningCall(expectedResponse); - const [operation] = await client.deployProcessorVersion(request); + const [operation] = await client.deleteProcessorVersion(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deployProcessorVersion as SinonStub + client.innerApiCalls.deleteProcessorVersion as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deployProcessorVersion as SinonStub + client.innerApiCalls.deleteProcessorVersion as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deployProcessorVersion without error using callback', async () => { + it('invokes deleteProcessorVersion without error using callback', async () => { const client = new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1529,10 +1663,10 @@ describe('v1.DocumentProcessorServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.documentai.v1.DeployProcessorVersionRequest() + new protos.google.cloud.documentai.v1.DeleteProcessorVersionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.documentai.v1.DeployProcessorVersionRequest', + '.google.cloud.documentai.v1.DeleteProcessorVersionRequest', ['name'] ); request.name = defaultValue1; @@ -1540,16 +1674,16 @@ describe('v1.DocumentProcessorServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.deployProcessorVersion = + client.innerApiCalls.deleteProcessorVersion = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.deployProcessorVersion( + client.deleteProcessorVersion( request, ( err?: Error | null, result?: LROperation< - protos.google.cloud.documentai.v1.IDeployProcessorVersionResponse, - protos.google.cloud.documentai.v1.IDeployProcessorVersionMetadata + protos.google.protobuf.IEmpty, + protos.google.cloud.documentai.v1.IDeleteProcessorVersionMetadata > | null ) => { if (err) { @@ -1561,22 +1695,22 @@ describe('v1.DocumentProcessorServiceClient', () => { ); }); const operation = (await promise) as LROperation< - protos.google.cloud.documentai.v1.IDeployProcessorVersionResponse, - protos.google.cloud.documentai.v1.IDeployProcessorVersionMetadata + protos.google.protobuf.IEmpty, + protos.google.cloud.documentai.v1.IDeleteProcessorVersionMetadata >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deployProcessorVersion as SinonStub + client.innerApiCalls.deleteProcessorVersion as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deployProcessorVersion as SinonStub + client.innerApiCalls.deleteProcessorVersion as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deployProcessorVersion with call error', async () => { + it('invokes deleteProcessorVersion with call error', async () => { const client = new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1584,34 +1718,34 @@ describe('v1.DocumentProcessorServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.documentai.v1.DeployProcessorVersionRequest() + new protos.google.cloud.documentai.v1.DeleteProcessorVersionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.documentai.v1.DeployProcessorVersionRequest', + '.google.cloud.documentai.v1.DeleteProcessorVersionRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.deployProcessorVersion = stubLongRunningCall( + client.innerApiCalls.deleteProcessorVersion = stubLongRunningCall( undefined, expectedError ); await assert.rejects( - client.deployProcessorVersion(request), + client.deleteProcessorVersion(request), expectedError ); const actualRequest = ( - client.innerApiCalls.deployProcessorVersion as SinonStub + client.innerApiCalls.deleteProcessorVersion as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deployProcessorVersion as SinonStub + client.innerApiCalls.deleteProcessorVersion as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deployProcessorVersion with LRO error', async () => { + it('invokes deleteProcessorVersion with LRO error', async () => { const client = new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1619,33 +1753,33 @@ describe('v1.DocumentProcessorServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.documentai.v1.DeployProcessorVersionRequest() + new protos.google.cloud.documentai.v1.DeleteProcessorVersionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.documentai.v1.DeployProcessorVersionRequest', + '.google.cloud.documentai.v1.DeleteProcessorVersionRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.deployProcessorVersion = stubLongRunningCall( + client.innerApiCalls.deleteProcessorVersion = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.deployProcessorVersion(request); + const [operation] = await client.deleteProcessorVersion(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.deployProcessorVersion as SinonStub + client.innerApiCalls.deleteProcessorVersion as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deployProcessorVersion as SinonStub + client.innerApiCalls.deleteProcessorVersion as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkDeployProcessorVersionProgress without error', async () => { + it('invokes checkDeleteProcessorVersionProgress without error', async () => { const client = new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1660,7 +1794,7 @@ describe('v1.DocumentProcessorServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeployProcessorVersionProgress( + const decodedOperation = await client.checkDeleteProcessorVersionProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -1668,7 +1802,7 @@ describe('v1.DocumentProcessorServiceClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkDeployProcessorVersionProgress with error', async () => { + it('invokes checkDeleteProcessorVersionProgress with error', async () => { const client = new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1682,15 +1816,15 @@ describe('v1.DocumentProcessorServiceClient', () => { expectedError ); await assert.rejects( - client.checkDeployProcessorVersionProgress(''), + client.checkDeleteProcessorVersionProgress(''), expectedError ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('undeployProcessorVersion', () => { - it('invokes undeployProcessorVersion without error', async () => { + describe('deployProcessorVersion', () => { + it('invokes deployProcessorVersion without error', async () => { const client = new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1698,10 +1832,10 @@ describe('v1.DocumentProcessorServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.documentai.v1.UndeployProcessorVersionRequest() + new protos.google.cloud.documentai.v1.DeployProcessorVersionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.documentai.v1.UndeployProcessorVersionRequest', + '.google.cloud.documentai.v1.DeployProcessorVersionRequest', ['name'] ); request.name = defaultValue1; @@ -1709,17 +1843,220 @@ describe('v1.DocumentProcessorServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.undeployProcessorVersion = + client.innerApiCalls.deployProcessorVersion = stubLongRunningCall(expectedResponse); - const [operation] = await client.undeployProcessorVersion(request); + const [operation] = await client.deployProcessorVersion(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.undeployProcessorVersion as SinonStub + client.innerApiCalls.deployProcessorVersion as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.undeployProcessorVersion as SinonStub + client.innerApiCalls.deployProcessorVersion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deployProcessorVersion without error using callback', async () => { + const client = + new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.documentai.v1.DeployProcessorVersionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.documentai.v1.DeployProcessorVersionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deployProcessorVersion = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deployProcessorVersion( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.documentai.v1.IDeployProcessorVersionResponse, + protos.google.cloud.documentai.v1.IDeployProcessorVersionMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.documentai.v1.IDeployProcessorVersionResponse, + protos.google.cloud.documentai.v1.IDeployProcessorVersionMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deployProcessorVersion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deployProcessorVersion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deployProcessorVersion with call error', async () => { + const client = + new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.documentai.v1.DeployProcessorVersionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.documentai.v1.DeployProcessorVersionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deployProcessorVersion = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.deployProcessorVersion(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.deployProcessorVersion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deployProcessorVersion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deployProcessorVersion with LRO error', async () => { + const client = + new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.documentai.v1.DeployProcessorVersionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.documentai.v1.DeployProcessorVersionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deployProcessorVersion = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deployProcessorVersion(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deployProcessorVersion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deployProcessorVersion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeployProcessorVersionProgress without error', async () => { + const client = + new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeployProcessorVersionProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeployProcessorVersionProgress with error', async () => { + const client = + new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeployProcessorVersionProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('undeployProcessorVersion', () => { + it('invokes undeployProcessorVersion without error', async () => { + const client = + new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.documentai.v1.UndeployProcessorVersionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.documentai.v1.UndeployProcessorVersionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.undeployProcessorVersion = + stubLongRunningCall(expectedResponse); + const [operation] = await client.undeployProcessorVersion(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.undeployProcessorVersion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.undeployProcessorVersion as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); @@ -2897,8 +3234,8 @@ describe('v1.DocumentProcessorServiceClient', () => { }); }); - describe('listProcessorTypes', () => { - it('invokes listProcessorTypes without error', async () => { + describe('evaluateProcessorVersion', () => { + it('invokes evaluateProcessorVersion without error', async () => { const client = new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2906,40 +3243,33 @@ describe('v1.DocumentProcessorServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.documentai.v1.ListProcessorTypesRequest() + new protos.google.cloud.documentai.v1.EvaluateProcessorVersionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.documentai.v1.ListProcessorTypesRequest', - ['parent'] + '.google.cloud.documentai.v1.EvaluateProcessorVersionRequest', + ['processorVersion'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.documentai.v1.ProcessorType() - ), - generateSampleMessage( - new protos.google.cloud.documentai.v1.ProcessorType() - ), - generateSampleMessage( - new protos.google.cloud.documentai.v1.ProcessorType() - ), - ]; - client.innerApiCalls.listProcessorTypes = - stubSimpleCall(expectedResponse); - const [response] = await client.listProcessorTypes(request); + request.processorVersion = defaultValue1; + const expectedHeaderRequestParams = `processor_version=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.evaluateProcessorVersion = + stubLongRunningCall(expectedResponse); + const [operation] = await client.evaluateProcessorVersion(request); + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listProcessorTypes as SinonStub + client.innerApiCalls.evaluateProcessorVersion as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listProcessorTypes as SinonStub + client.innerApiCalls.evaluateProcessorVersion as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listProcessorTypes without error using callback', async () => { + it('invokes evaluateProcessorVersion without error using callback', async () => { const client = new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2947,33 +3277,244 @@ describe('v1.DocumentProcessorServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.documentai.v1.ListProcessorTypesRequest() + new protos.google.cloud.documentai.v1.EvaluateProcessorVersionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.documentai.v1.ListProcessorTypesRequest', - ['parent'] + '.google.cloud.documentai.v1.EvaluateProcessorVersionRequest', + ['processorVersion'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.documentai.v1.ProcessorType() - ), - generateSampleMessage( - new protos.google.cloud.documentai.v1.ProcessorType() - ), - generateSampleMessage( - new protos.google.cloud.documentai.v1.ProcessorType() - ), - ]; - client.innerApiCalls.listProcessorTypes = - stubSimpleCallWithCallback(expectedResponse); + request.processorVersion = defaultValue1; + const expectedHeaderRequestParams = `processor_version=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.evaluateProcessorVersion = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listProcessorTypes( + client.evaluateProcessorVersion( request, ( err?: Error | null, - result?: protos.google.cloud.documentai.v1.IProcessorType[] | null + result?: LROperation< + protos.google.cloud.documentai.v1.IEvaluateProcessorVersionResponse, + protos.google.cloud.documentai.v1.IEvaluateProcessorVersionMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.documentai.v1.IEvaluateProcessorVersionResponse, + protos.google.cloud.documentai.v1.IEvaluateProcessorVersionMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.evaluateProcessorVersion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.evaluateProcessorVersion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes evaluateProcessorVersion with call error', async () => { + const client = + new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.documentai.v1.EvaluateProcessorVersionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.documentai.v1.EvaluateProcessorVersionRequest', + ['processorVersion'] + ); + request.processorVersion = defaultValue1; + const expectedHeaderRequestParams = `processor_version=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.evaluateProcessorVersion = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.evaluateProcessorVersion(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.evaluateProcessorVersion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.evaluateProcessorVersion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes evaluateProcessorVersion with LRO error', async () => { + const client = + new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.documentai.v1.EvaluateProcessorVersionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.documentai.v1.EvaluateProcessorVersionRequest', + ['processorVersion'] + ); + request.processorVersion = defaultValue1; + const expectedHeaderRequestParams = `processor_version=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.evaluateProcessorVersion = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.evaluateProcessorVersion(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.evaluateProcessorVersion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.evaluateProcessorVersion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkEvaluateProcessorVersionProgress without error', async () => { + const client = + new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkEvaluateProcessorVersionProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkEvaluateProcessorVersionProgress with error', async () => { + const client = + new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkEvaluateProcessorVersionProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listProcessorTypes', () => { + it('invokes listProcessorTypes without error', async () => { + const client = + new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.documentai.v1.ListProcessorTypesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.documentai.v1.ListProcessorTypesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.documentai.v1.ProcessorType() + ), + generateSampleMessage( + new protos.google.cloud.documentai.v1.ProcessorType() + ), + generateSampleMessage( + new protos.google.cloud.documentai.v1.ProcessorType() + ), + ]; + client.innerApiCalls.listProcessorTypes = + stubSimpleCall(expectedResponse); + const [response] = await client.listProcessorTypes(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listProcessorTypes as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listProcessorTypes as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listProcessorTypes without error using callback', async () => { + const client = + new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.documentai.v1.ListProcessorTypesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.documentai.v1.ListProcessorTypesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.documentai.v1.ProcessorType() + ), + generateSampleMessage( + new protos.google.cloud.documentai.v1.ProcessorType() + ), + generateSampleMessage( + new protos.google.cloud.documentai.v1.ProcessorType() + ), + ]; + client.innerApiCalls.listProcessorTypes = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listProcessorTypes( + request, + ( + err?: Error | null, + result?: protos.google.cloud.documentai.v1.IProcessorType[] | null ) => { if (err) { reject(err); @@ -3391,10 +3932,349 @@ describe('v1.DocumentProcessorServiceClient', () => { stubPageStreamingCall(expectedResponse); const stream = client.listProcessorsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.documentai.v1.Processor[] = []; + const responses: protos.google.cloud.documentai.v1.Processor[] = []; + stream.on( + 'data', + (response: protos.google.cloud.documentai.v1.Processor) => { + 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.listProcessors.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listProcessors, request) + ); + assert( + (client.descriptors.page.listProcessors.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listProcessorsStream with error', async () => { + const client = + new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.documentai.v1.ListProcessorsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.documentai.v1.ListProcessorsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listProcessors.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listProcessorsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.documentai.v1.Processor[] = []; + stream.on( + 'data', + (response: protos.google.cloud.documentai.v1.Processor) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listProcessors.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listProcessors, request) + ); + assert( + (client.descriptors.page.listProcessors.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listProcessors without error', async () => { + const client = + new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.documentai.v1.ListProcessorsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.documentai.v1.ListProcessorsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.documentai.v1.Processor() + ), + generateSampleMessage( + new protos.google.cloud.documentai.v1.Processor() + ), + generateSampleMessage( + new protos.google.cloud.documentai.v1.Processor() + ), + ]; + client.descriptors.page.listProcessors.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.documentai.v1.IProcessor[] = []; + const iterable = client.listProcessorsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listProcessors.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listProcessors.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listProcessors with error', async () => { + const client = + new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.documentai.v1.ListProcessorsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.documentai.v1.ListProcessorsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listProcessors.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listProcessorsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.documentai.v1.IProcessor[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listProcessors.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listProcessors.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listProcessorVersions', () => { + it('invokes listProcessorVersions without error', async () => { + const client = + new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.documentai.v1.ListProcessorVersionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.documentai.v1.ListProcessorVersionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.documentai.v1.ProcessorVersion() + ), + generateSampleMessage( + new protos.google.cloud.documentai.v1.ProcessorVersion() + ), + generateSampleMessage( + new protos.google.cloud.documentai.v1.ProcessorVersion() + ), + ]; + client.innerApiCalls.listProcessorVersions = + stubSimpleCall(expectedResponse); + const [response] = await client.listProcessorVersions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listProcessorVersions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listProcessorVersions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listProcessorVersions without error using callback', async () => { + const client = + new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.documentai.v1.ListProcessorVersionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.documentai.v1.ListProcessorVersionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.documentai.v1.ProcessorVersion() + ), + generateSampleMessage( + new protos.google.cloud.documentai.v1.ProcessorVersion() + ), + generateSampleMessage( + new protos.google.cloud.documentai.v1.ProcessorVersion() + ), + ]; + client.innerApiCalls.listProcessorVersions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listProcessorVersions( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.documentai.v1.IProcessorVersion[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listProcessorVersions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listProcessorVersions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listProcessorVersions with error', async () => { + const client = + new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.documentai.v1.ListProcessorVersionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.documentai.v1.ListProcessorVersionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listProcessorVersions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listProcessorVersions(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.listProcessorVersions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listProcessorVersions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listProcessorVersionsStream without error', async () => { + const client = + new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.documentai.v1.ListProcessorVersionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.documentai.v1.ListProcessorVersionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.documentai.v1.ProcessorVersion() + ), + generateSampleMessage( + new protos.google.cloud.documentai.v1.ProcessorVersion() + ), + generateSampleMessage( + new protos.google.cloud.documentai.v1.ProcessorVersion() + ), + ]; + client.descriptors.page.listProcessorVersions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listProcessorVersionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.documentai.v1.ProcessorVersion[] = + []; stream.on( 'data', - (response: protos.google.cloud.documentai.v1.Processor) => { + (response: protos.google.cloud.documentai.v1.ProcessorVersion) => { responses.push(response); } ); @@ -3408,12 +4288,18 @@ describe('v1.DocumentProcessorServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listProcessors.createStream as SinonStub) + ( + client.descriptors.page.listProcessorVersions + .createStream as SinonStub + ) .getCall(0) - .calledWith(client.innerApiCalls.listProcessors, request) + .calledWith(client.innerApiCalls.listProcessorVersions, request) ); assert( - (client.descriptors.page.listProcessors.createStream as SinonStub) + ( + client.descriptors.page.listProcessorVersions + .createStream as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3421,7 +4307,7 @@ describe('v1.DocumentProcessorServiceClient', () => { ); }); - it('invokes listProcessorsStream with error', async () => { + it('invokes listProcessorVersionsStream with error', async () => { const client = new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3429,23 +4315,24 @@ describe('v1.DocumentProcessorServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.documentai.v1.ListProcessorsRequest() + new protos.google.cloud.documentai.v1.ListProcessorVersionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.documentai.v1.ListProcessorsRequest', + '.google.cloud.documentai.v1.ListProcessorVersionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listProcessors.createStream = + client.descriptors.page.listProcessorVersions.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listProcessorsStream(request); + const stream = client.listProcessorVersionsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.documentai.v1.Processor[] = []; + const responses: protos.google.cloud.documentai.v1.ProcessorVersion[] = + []; stream.on( 'data', - (response: protos.google.cloud.documentai.v1.Processor) => { + (response: protos.google.cloud.documentai.v1.ProcessorVersion) => { responses.push(response); } ); @@ -3458,12 +4345,18 @@ describe('v1.DocumentProcessorServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listProcessors.createStream as SinonStub) + ( + client.descriptors.page.listProcessorVersions + .createStream as SinonStub + ) .getCall(0) - .calledWith(client.innerApiCalls.listProcessors, request) + .calledWith(client.innerApiCalls.listProcessorVersions, request) ); assert( - (client.descriptors.page.listProcessors.createStream as SinonStub) + ( + client.descriptors.page.listProcessorVersions + .createStream as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3471,7 +4364,7 @@ describe('v1.DocumentProcessorServiceClient', () => { ); }); - it('uses async iteration with listProcessors without error', async () => { + it('uses async iteration with listProcessorVersions without error', async () => { const client = new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3479,41 +4372,46 @@ describe('v1.DocumentProcessorServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.documentai.v1.ListProcessorsRequest() + new protos.google.cloud.documentai.v1.ListProcessorVersionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.documentai.v1.ListProcessorsRequest', + '.google.cloud.documentai.v1.ListProcessorVersionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.documentai.v1.Processor() + new protos.google.cloud.documentai.v1.ProcessorVersion() ), generateSampleMessage( - new protos.google.cloud.documentai.v1.Processor() + new protos.google.cloud.documentai.v1.ProcessorVersion() ), generateSampleMessage( - new protos.google.cloud.documentai.v1.Processor() + new protos.google.cloud.documentai.v1.ProcessorVersion() ), ]; - client.descriptors.page.listProcessors.asyncIterate = + client.descriptors.page.listProcessorVersions.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.documentai.v1.IProcessor[] = []; - const iterable = client.listProcessorsAsync(request); + const responses: protos.google.cloud.documentai.v1.IProcessorVersion[] = + []; + const iterable = client.listProcessorVersionsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listProcessors.asyncIterate as SinonStub + client.descriptors.page.listProcessorVersions + .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listProcessors.asyncIterate as SinonStub) + ( + client.descriptors.page.listProcessorVersions + .asyncIterate as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3521,7 +4419,7 @@ describe('v1.DocumentProcessorServiceClient', () => { ); }); - it('uses async iteration with listProcessors with error', async () => { + it('uses async iteration with listProcessorVersions with error', async () => { const client = new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3529,32 +4427,37 @@ describe('v1.DocumentProcessorServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.documentai.v1.ListProcessorsRequest() + new protos.google.cloud.documentai.v1.ListProcessorVersionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.documentai.v1.ListProcessorsRequest', + '.google.cloud.documentai.v1.ListProcessorVersionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listProcessors.asyncIterate = + client.descriptors.page.listProcessorVersions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listProcessorsAsync(request); + const iterable = client.listProcessorVersionsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.documentai.v1.IProcessor[] = []; + const responses: protos.google.cloud.documentai.v1.IProcessorVersion[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( ( - client.descriptors.page.listProcessors.asyncIterate as SinonStub + client.descriptors.page.listProcessorVersions + .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listProcessors.asyncIterate as SinonStub) + ( + client.descriptors.page.listProcessorVersions + .asyncIterate as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3563,8 +4466,8 @@ describe('v1.DocumentProcessorServiceClient', () => { }); }); - describe('listProcessorVersions', () => { - it('invokes listProcessorVersions without error', async () => { + describe('listEvaluations', () => { + it('invokes listEvaluations without error', async () => { const client = new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3572,40 +4475,39 @@ describe('v1.DocumentProcessorServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.documentai.v1.ListProcessorVersionsRequest() + new protos.google.cloud.documentai.v1.ListEvaluationsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.documentai.v1.ListProcessorVersionsRequest', + '.google.cloud.documentai.v1.ListEvaluationsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.documentai.v1.ProcessorVersion() + new protos.google.cloud.documentai.v1.Evaluation() ), generateSampleMessage( - new protos.google.cloud.documentai.v1.ProcessorVersion() + new protos.google.cloud.documentai.v1.Evaluation() ), generateSampleMessage( - new protos.google.cloud.documentai.v1.ProcessorVersion() + new protos.google.cloud.documentai.v1.Evaluation() ), ]; - client.innerApiCalls.listProcessorVersions = - stubSimpleCall(expectedResponse); - const [response] = await client.listProcessorVersions(request); + client.innerApiCalls.listEvaluations = stubSimpleCall(expectedResponse); + const [response] = await client.listEvaluations(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listProcessorVersions as SinonStub + client.innerApiCalls.listEvaluations as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listProcessorVersions as SinonStub + client.innerApiCalls.listEvaluations as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listProcessorVersions without error using callback', async () => { + it('invokes listEvaluations without error using callback', async () => { const client = new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3613,35 +4515,33 @@ describe('v1.DocumentProcessorServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.documentai.v1.ListProcessorVersionsRequest() + new protos.google.cloud.documentai.v1.ListEvaluationsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.documentai.v1.ListProcessorVersionsRequest', + '.google.cloud.documentai.v1.ListEvaluationsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.documentai.v1.ProcessorVersion() + new protos.google.cloud.documentai.v1.Evaluation() ), generateSampleMessage( - new protos.google.cloud.documentai.v1.ProcessorVersion() + new protos.google.cloud.documentai.v1.Evaluation() ), generateSampleMessage( - new protos.google.cloud.documentai.v1.ProcessorVersion() + new protos.google.cloud.documentai.v1.Evaluation() ), ]; - client.innerApiCalls.listProcessorVersions = + client.innerApiCalls.listEvaluations = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listProcessorVersions( + client.listEvaluations( request, ( err?: Error | null, - result?: - | protos.google.cloud.documentai.v1.IProcessorVersion[] - | null + result?: protos.google.cloud.documentai.v1.IEvaluation[] | null ) => { if (err) { reject(err); @@ -3654,16 +4554,16 @@ describe('v1.DocumentProcessorServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listProcessorVersions as SinonStub + client.innerApiCalls.listEvaluations as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listProcessorVersions as SinonStub + client.innerApiCalls.listEvaluations as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listProcessorVersions with error', async () => { + it('invokes listEvaluations with error', async () => { const client = new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3671,34 +4571,31 @@ describe('v1.DocumentProcessorServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.documentai.v1.ListProcessorVersionsRequest() + new protos.google.cloud.documentai.v1.ListEvaluationsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.documentai.v1.ListProcessorVersionsRequest', + '.google.cloud.documentai.v1.ListEvaluationsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listProcessorVersions = stubSimpleCall( + client.innerApiCalls.listEvaluations = stubSimpleCall( undefined, expectedError ); - await assert.rejects( - client.listProcessorVersions(request), - expectedError - ); + await assert.rejects(client.listEvaluations(request), expectedError); const actualRequest = ( - client.innerApiCalls.listProcessorVersions as SinonStub + client.innerApiCalls.listEvaluations as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listProcessorVersions as SinonStub + client.innerApiCalls.listEvaluations as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listProcessorVersionsStream without error', async () => { + it('invokes listEvaluationsStream without error', async () => { const client = new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3706,34 +4603,33 @@ describe('v1.DocumentProcessorServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.documentai.v1.ListProcessorVersionsRequest() + new protos.google.cloud.documentai.v1.ListEvaluationsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.documentai.v1.ListProcessorVersionsRequest', + '.google.cloud.documentai.v1.ListEvaluationsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.documentai.v1.ProcessorVersion() + new protos.google.cloud.documentai.v1.Evaluation() ), generateSampleMessage( - new protos.google.cloud.documentai.v1.ProcessorVersion() + new protos.google.cloud.documentai.v1.Evaluation() ), generateSampleMessage( - new protos.google.cloud.documentai.v1.ProcessorVersion() + new protos.google.cloud.documentai.v1.Evaluation() ), ]; - client.descriptors.page.listProcessorVersions.createStream = + client.descriptors.page.listEvaluations.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listProcessorVersionsStream(request); + const stream = client.listEvaluationsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.documentai.v1.ProcessorVersion[] = - []; + const responses: protos.google.cloud.documentai.v1.Evaluation[] = []; stream.on( 'data', - (response: protos.google.cloud.documentai.v1.ProcessorVersion) => { + (response: protos.google.cloud.documentai.v1.Evaluation) => { responses.push(response); } ); @@ -3747,18 +4643,12 @@ describe('v1.DocumentProcessorServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - ( - client.descriptors.page.listProcessorVersions - .createStream as SinonStub - ) + (client.descriptors.page.listEvaluations.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listProcessorVersions, request) + .calledWith(client.innerApiCalls.listEvaluations, request) ); assert( - ( - client.descriptors.page.listProcessorVersions - .createStream as SinonStub - ) + (client.descriptors.page.listEvaluations.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3766,7 +4656,7 @@ describe('v1.DocumentProcessorServiceClient', () => { ); }); - it('invokes listProcessorVersionsStream with error', async () => { + it('invokes listEvaluationsStream with error', async () => { const client = new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3774,24 +4664,23 @@ describe('v1.DocumentProcessorServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.documentai.v1.ListProcessorVersionsRequest() + new protos.google.cloud.documentai.v1.ListEvaluationsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.documentai.v1.ListProcessorVersionsRequest', + '.google.cloud.documentai.v1.ListEvaluationsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listProcessorVersions.createStream = + client.descriptors.page.listEvaluations.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listProcessorVersionsStream(request); + const stream = client.listEvaluationsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.documentai.v1.ProcessorVersion[] = - []; + const responses: protos.google.cloud.documentai.v1.Evaluation[] = []; stream.on( 'data', - (response: protos.google.cloud.documentai.v1.ProcessorVersion) => { + (response: protos.google.cloud.documentai.v1.Evaluation) => { responses.push(response); } ); @@ -3804,18 +4693,12 @@ describe('v1.DocumentProcessorServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - ( - client.descriptors.page.listProcessorVersions - .createStream as SinonStub - ) + (client.descriptors.page.listEvaluations.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listProcessorVersions, request) + .calledWith(client.innerApiCalls.listEvaluations, request) ); assert( - ( - client.descriptors.page.listProcessorVersions - .createStream as SinonStub - ) + (client.descriptors.page.listEvaluations.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3823,7 +4706,7 @@ describe('v1.DocumentProcessorServiceClient', () => { ); }); - it('uses async iteration with listProcessorVersions without error', async () => { + it('uses async iteration with listEvaluations without error', async () => { const client = new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3831,46 +4714,41 @@ describe('v1.DocumentProcessorServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.documentai.v1.ListProcessorVersionsRequest() + new protos.google.cloud.documentai.v1.ListEvaluationsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.documentai.v1.ListProcessorVersionsRequest', + '.google.cloud.documentai.v1.ListEvaluationsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.documentai.v1.ProcessorVersion() + new protos.google.cloud.documentai.v1.Evaluation() ), generateSampleMessage( - new protos.google.cloud.documentai.v1.ProcessorVersion() + new protos.google.cloud.documentai.v1.Evaluation() ), generateSampleMessage( - new protos.google.cloud.documentai.v1.ProcessorVersion() + new protos.google.cloud.documentai.v1.Evaluation() ), ]; - client.descriptors.page.listProcessorVersions.asyncIterate = + client.descriptors.page.listEvaluations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.documentai.v1.IProcessorVersion[] = - []; - const iterable = client.listProcessorVersionsAsync(request); + const responses: protos.google.cloud.documentai.v1.IEvaluation[] = []; + const iterable = client.listEvaluationsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listProcessorVersions - .asyncIterate as SinonStub + client.descriptors.page.listEvaluations.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - ( - client.descriptors.page.listProcessorVersions - .asyncIterate as SinonStub - ) + (client.descriptors.page.listEvaluations.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3878,7 +4756,7 @@ describe('v1.DocumentProcessorServiceClient', () => { ); }); - it('uses async iteration with listProcessorVersions with error', async () => { + it('uses async iteration with listEvaluations with error', async () => { const client = new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3886,37 +4764,32 @@ describe('v1.DocumentProcessorServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.documentai.v1.ListProcessorVersionsRequest() + new protos.google.cloud.documentai.v1.ListEvaluationsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.documentai.v1.ListProcessorVersionsRequest', + '.google.cloud.documentai.v1.ListEvaluationsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listProcessorVersions.asyncIterate = + client.descriptors.page.listEvaluations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listProcessorVersionsAsync(request); + const iterable = client.listEvaluationsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.documentai.v1.IProcessorVersion[] = - []; + const responses: protos.google.cloud.documentai.v1.IEvaluation[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( ( - client.descriptors.page.listProcessorVersions - .asyncIterate as SinonStub + client.descriptors.page.listEvaluations.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - ( - client.descriptors.page.listProcessorVersions - .asyncIterate as SinonStub - ) + (client.descriptors.page.listEvaluations.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -4445,6 +5318,95 @@ describe('v1.DocumentProcessorServiceClient', () => { }); describe('Path templates', () => { + describe('evaluation', () => { + const fakePath = '/rendered/path/evaluation'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + processor: 'processorValue', + processor_version: 'processorVersionValue', + evaluation: 'evaluationValue', + }; + const client = + new documentprocessorserviceModule.v1.DocumentProcessorServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.evaluationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.evaluationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('evaluationPath', () => { + const result = client.evaluationPath( + 'projectValue', + 'locationValue', + 'processorValue', + 'processorVersionValue', + 'evaluationValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.evaluationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromEvaluationName', () => { + const result = client.matchProjectFromEvaluationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.evaluationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromEvaluationName', () => { + const result = client.matchLocationFromEvaluationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.evaluationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchProcessorFromEvaluationName', () => { + const result = client.matchProcessorFromEvaluationName(fakePath); + assert.strictEqual(result, 'processorValue'); + assert( + (client.pathTemplates.evaluationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchProcessorVersionFromEvaluationName', () => { + const result = client.matchProcessorVersionFromEvaluationName(fakePath); + assert.strictEqual(result, 'processorVersionValue'); + assert( + (client.pathTemplates.evaluationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEvaluationFromEvaluationName', () => { + const result = client.matchEvaluationFromEvaluationName(fakePath); + assert.strictEqual(result, 'evaluationValue'); + assert( + (client.pathTemplates.evaluationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('humanReviewConfig', () => { const fakePath = '/rendered/path/humanReviewConfig'; const expectedParameters = { From b9c09e31a08a43bfa1049465aa7633c73ea91fc0 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 21 Feb 2023 21:23:22 -0800 Subject: [PATCH 32/80] feat: [translate] Add supported fields in document translation request and refresh translation v3 GA service proto documentation (#4007) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add supported fields in document translation request and refresh translation v3 GA service proto documentation PiperOrigin-RevId: 511225850 Source-Link: https://github.com/googleapis/googleapis/commit/84bbbc5438fbb7aaefa04447f37e91ff3a38a2f0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/431d15cddae84906d4ac2e1d75e243099747c52b Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRyYW5zbGF0ZS8uT3dsQm90LnlhbWwiLCJoIjoiNDMxZDE1Y2RkYWU4NDkwNmQ0YWMyZTFkNzVlMjQzMDk5NzQ3YzUyYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: Daniel Bankhead --- .../translate/v3/translation_service.proto | 88 +++++++++----- .../google-cloud-translate/protos/protos.d.ts | 30 +++++ .../google-cloud-translate/protos/protos.js | 115 ++++++++++++++++++ .../google-cloud-translate/protos/protos.json | 35 ++++++ ..._metadata.google.cloud.translation.v3.json | 24 +++- ...lation_service.batch_translate_document.js | 11 +- .../translation_service.translate_document.js | 23 +++- .../v3/translation_service.translate_text.js | 9 +- ...data.google.cloud.translation.v3beta1.json | 2 +- .../src/v3/translation_service_client.ts | 37 ++++-- 10 files changed, 319 insertions(+), 55 deletions(-) diff --git a/packages/google-cloud-translate/protos/google/cloud/translate/v3/translation_service.proto b/packages/google-cloud-translate/protos/google/cloud/translate/v3/translation_service.proto index b63b233c028..d5e93176aa7 100644 --- a/packages/google-cloud-translate/protos/google/cloud/translate/v3/translation_service.proto +++ b/packages/google-cloud-translate/protos/google/cloud/translate/v3/translation_service.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -183,37 +183,36 @@ service TranslationService { message TranslateTextGlossaryConfig { // Required. The `glossary` to be applied for this translation. // - // The format depends on glossary: + // The format depends on the glossary: // - // - User provided custom glossary: + // - User-provided custom glossary: // `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}` string glossary = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. Indicates match is case-insensitive. - // Default value is false if missing. + // Optional. Indicates match is case insensitive. The default value is `false` + // if missing. bool ignore_case = 2 [(google.api.field_behavior) = OPTIONAL]; } // The request message for synchronous translation. message TranslateTextRequest { // Required. The content of the input in string format. - // We recommend the total content be less than 30k codepoints. The max length - // of this field is 1024. - // Use BatchTranslateText for larger text. + // We recommend the total content be less than 30,000 codepoints. The max + // length of this field is 1024. Use BatchTranslateText for larger text. repeated string contents = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. The format of the source text, for example, "text/html", // "text/plain". If left blank, the MIME type defaults to "text/html". string mime_type = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The BCP-47 language code of the input text if + // Optional. The ISO-639 language code of the input text if // known, for example, "en-US" or "sr-Latn". Supported language codes are // listed in Language Support. If the source language isn't specified, the API // attempts to identify the source language automatically and returns the // source language within the response. string source_language_code = 4 [(google.api.field_behavior) = OPTIONAL]; - // Required. The BCP-47 language code to use for translation of the input + // Required. The ISO-639 language code to use for translation of the input // text, set to one of the language codes listed in Language Support. string target_language_code = 5 [(google.api.field_behavior) = REQUIRED]; @@ -305,7 +304,7 @@ message Translation { // `projects/{project-number}/locations/{location-id}/models/general/nmt`. string model = 2; - // The BCP-47 language code of source text in the initial request, detected + // The ISO-639 language code of source text in the initial request, detected // automatically, if no source language was passed within the initial // request. If the source language was passed, auto-detection of the language // does not occur and this field is empty. @@ -370,7 +369,7 @@ message DetectLanguageRequest { // The response message for language detection. message DetectedLanguage { - // The BCP-47 language code of source content in the request, detected + // The ISO-639 language code of the source content in the request, detected // automatically. string language_code = 1; @@ -439,19 +438,19 @@ message SupportedLanguages { // to one supported language. message SupportedLanguage { // Supported language code, generally consisting of its ISO 639-1 - // identifier, for example, 'en', 'ja'. In certain cases, BCP-47 codes + // identifier, for example, 'en', 'ja'. In certain cases, ISO-639 codes // including language and region identifiers are returned (for example, - // 'zh-TW' and 'zh-CN') + // 'zh-TW' and 'zh-CN'). string language_code = 1; - // Human readable name of the language localized in the display language + // Human-readable name of the language localized in the display language // specified in the request. string display_name = 2; - // Can be used as source language. + // Can be used as a source language. bool support_source = 3; - // Can be used as target language. + // Can be used as a target language. bool support_target = 4; } @@ -542,7 +541,7 @@ message OutputConfig { // Since index.csv will be keeping updated during the process, please make // sure there is no custom retention policy applied on the output bucket // that may avoid file updating. - // (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy) + // (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) // // The format of translations_file (for target language code 'trg') is: // `gs://translation_test/a_b_c_'trg'_translations.[extension]` @@ -696,7 +695,7 @@ message TranslateDocumentRequest { // location-id), otherwise an INVALID_ARGUMENT (400) error is returned. string parent = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. The BCP-47 language code of the input document if known, for + // Optional. The ISO-639 language code of the input document if known, for // example, "en-US" or "sr-Latn". Supported language codes are listed in // Language Support. If the source language isn't specified, the API attempts // to identify the source language automatically and returns the source @@ -704,7 +703,7 @@ message TranslateDocumentRequest { // request contains a glossary or a custom model. string source_language_code = 2 [(google.api.field_behavior) = OPTIONAL]; - // Required. The BCP-47 language code to use for translation of the input + // Required. The ISO-639 language code to use for translation of the input // document, set to one of the language codes listed in Language Support. string target_language_code = 3 [(google.api.field_behavior) = REQUIRED]; @@ -751,6 +750,24 @@ message TranslateDocumentRequest { // See https://cloud.google.com/translate/docs/advanced/labels for more // information. map labels = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This flag is to support user customized attribution. + // If not provided, the default is `Machine Translated by Google`. + // Customized attribution should follow rules in + // https://cloud.google.com/translate/attribution#attribution_and_logos + string customized_attribution = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the page limit of online native pdf translation is 300 + // and only native pdf pages will be translated. + bool is_translate_native_pdf_only = 11 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, use the text removal to remove the shadow text on + // background image for native pdf translation. + // Shadow removal feature can only be enabled when + // is_translate_native_pdf_only is false + bool enable_shadow_removal_native_pdf = 12 + [(google.api.field_behavior) = OPTIONAL]; } // A translated document message. @@ -947,10 +964,10 @@ message GlossaryInputConfig { // // For unidirectional glossaries: // - // - TSV/CSV (`.tsv`/`.csv`): 2 column file, tab- or comma-separated. + // - TSV/CSV (`.tsv`/`.csv`): Two column file, tab- or comma-separated. // The first column is source text. The second column is target text. - // The file must not contain headers. That is, the first row is data, not - // column names. + // No headers in this file. The first row contains data and not column + // names. // // - TMX (`.tmx`): TMX file with parallel data defining source/target term // pairs. @@ -964,7 +981,7 @@ message GlossaryInputConfig { } } -// Represents a glossary built from user provided data. +// Represents a glossary built from user-provided data. message Glossary { option (google.api.resource) = { type: "translate.googleapis.com/Glossary" @@ -973,18 +990,18 @@ message Glossary { // Used with unidirectional glossaries. message LanguageCodePair { - // Required. The BCP-47 language code of the input text, for example, + // Required. The ISO-639 language code of the input text, for example, // "en-US". Expected to be an exact match for GlossaryTerm.language_code. string source_language_code = 1; - // Required. The BCP-47 language code for translation output, for example, + // Required. The ISO-639 language code for translation output, for example, // "zh-CN". Expected to be an exact match for GlossaryTerm.language_code. string target_language_code = 2; } // Used with equivalent term set glossaries. message LanguageCodesSet { - // The BCP-47 language code(s) for terms defined in the glossary. + // The ISO-639 language code(s) for terms defined in the glossary. // All entries are unique. The list contains at least two entries. // Expected to be an exact match for GlossaryTerm.language_code. repeated string language_codes = 1; @@ -1017,6 +1034,9 @@ message Glossary { // Output only. When the glossary creation was finished. google.protobuf.Timestamp end_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The display name of the glossary. + string display_name = 9 [(google.api.field_behavior) = OPTIONAL]; } // Request message for CreateGlossary. @@ -1211,12 +1231,12 @@ message BatchTranslateDocumentRequest { } ]; - // Required. The BCP-47 language code of the input document if known, for + // Required. The ISO-639 language code of the input document if known, for // example, "en-US" or "sr-Latn". Supported language codes are listed in - // Language Support (https://cloud.google.com/translate/docs/languages). + // [Language Support](https://cloud.google.com/translate/docs/languages). string source_language_code = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. The BCP-47 language code to use for translation of the input + // Required. The ISO-639 language code to use for translation of the input // document. Specify up to 10 language codes here. repeated string target_language_codes = 3 [(google.api.field_behavior) = REQUIRED]; @@ -1267,6 +1287,12 @@ message BatchTranslateDocumentRequest { // original file. map format_conversions = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This flag is to support user customized attribution. + // If not provided, the default is `Machine Translated by Google`. + // Customized attribution should follow rules in + // https://cloud.google.com/translate/attribution#attribution_and_logos + string customized_attribution = 10 [(google.api.field_behavior) = OPTIONAL]; } // Input configuration for BatchTranslateDocument request. @@ -1332,7 +1358,7 @@ message BatchDocumentOutputConfig { // Since index.csv will be keeping updated during the process, please make // sure there is no custom retention policy applied on the output bucket // that may avoid file updating. - // (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy) + // (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) // // The naming format of translation output files follows (for target // language code [trg]): `translation_output`: diff --git a/packages/google-cloud-translate/protos/protos.d.ts b/packages/google-cloud-translate/protos/protos.d.ts index 15dbdecdad3..b1a43567854 100644 --- a/packages/google-cloud-translate/protos/protos.d.ts +++ b/packages/google-cloud-translate/protos/protos.d.ts @@ -2009,6 +2009,15 @@ export namespace google { /** TranslateDocumentRequest labels */ labels?: ({ [k: string]: string }|null); + + /** TranslateDocumentRequest customizedAttribution */ + customizedAttribution?: (string|null); + + /** TranslateDocumentRequest isTranslateNativePdfOnly */ + isTranslateNativePdfOnly?: (boolean|null); + + /** TranslateDocumentRequest enableShadowRemovalNativePdf */ + enableShadowRemovalNativePdf?: (boolean|null); } /** Represents a TranslateDocumentRequest. */ @@ -2044,6 +2053,15 @@ export namespace google { /** TranslateDocumentRequest labels. */ public labels: { [k: string]: string }; + /** TranslateDocumentRequest customizedAttribution. */ + public customizedAttribution: string; + + /** TranslateDocumentRequest isTranslateNativePdfOnly. */ + public isTranslateNativePdfOnly: boolean; + + /** TranslateDocumentRequest enableShadowRemovalNativePdf. */ + public enableShadowRemovalNativePdf: boolean; + /** * Creates a new TranslateDocumentRequest instance using the specified properties. * @param [properties] Properties to set @@ -2863,6 +2881,9 @@ export namespace google { /** Glossary endTime */ endTime?: (google.protobuf.ITimestamp|null); + + /** Glossary displayName */ + displayName?: (string|null); } /** Represents a Glossary. */ @@ -2895,6 +2916,9 @@ export namespace google { /** Glossary endTime. */ public endTime?: (google.protobuf.ITimestamp|null); + /** Glossary displayName. */ + public displayName: string; + /** Glossary languages. */ public languages?: ("languagePair"|"languageCodesSet"); @@ -4073,6 +4097,9 @@ export namespace google { /** BatchTranslateDocumentRequest formatConversions */ formatConversions?: ({ [k: string]: string }|null); + + /** BatchTranslateDocumentRequest customizedAttribution */ + customizedAttribution?: (string|null); } /** Represents a BatchTranslateDocumentRequest. */ @@ -4108,6 +4135,9 @@ export namespace google { /** BatchTranslateDocumentRequest formatConversions. */ public formatConversions: { [k: string]: string }; + /** BatchTranslateDocumentRequest customizedAttribution. */ + public customizedAttribution: string; + /** * Creates a new BatchTranslateDocumentRequest instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-translate/protos/protos.js b/packages/google-cloud-translate/protos/protos.js index 21a9e0a8b66..10c70261f31 100644 --- a/packages/google-cloud-translate/protos/protos.js +++ b/packages/google-cloud-translate/protos/protos.js @@ -4609,6 +4609,9 @@ * @property {string|null} [model] TranslateDocumentRequest model * @property {google.cloud.translation.v3.ITranslateTextGlossaryConfig|null} [glossaryConfig] TranslateDocumentRequest glossaryConfig * @property {Object.|null} [labels] TranslateDocumentRequest labels + * @property {string|null} [customizedAttribution] TranslateDocumentRequest customizedAttribution + * @property {boolean|null} [isTranslateNativePdfOnly] TranslateDocumentRequest isTranslateNativePdfOnly + * @property {boolean|null} [enableShadowRemovalNativePdf] TranslateDocumentRequest enableShadowRemovalNativePdf */ /** @@ -4691,6 +4694,30 @@ */ TranslateDocumentRequest.prototype.labels = $util.emptyObject; + /** + * TranslateDocumentRequest customizedAttribution. + * @member {string} customizedAttribution + * @memberof google.cloud.translation.v3.TranslateDocumentRequest + * @instance + */ + TranslateDocumentRequest.prototype.customizedAttribution = ""; + + /** + * TranslateDocumentRequest isTranslateNativePdfOnly. + * @member {boolean} isTranslateNativePdfOnly + * @memberof google.cloud.translation.v3.TranslateDocumentRequest + * @instance + */ + TranslateDocumentRequest.prototype.isTranslateNativePdfOnly = false; + + /** + * TranslateDocumentRequest enableShadowRemovalNativePdf. + * @member {boolean} enableShadowRemovalNativePdf + * @memberof google.cloud.translation.v3.TranslateDocumentRequest + * @instance + */ + TranslateDocumentRequest.prototype.enableShadowRemovalNativePdf = false; + /** * Creates a new TranslateDocumentRequest instance using the specified properties. * @function create @@ -4732,6 +4759,12 @@ if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.customizedAttribution != null && Object.hasOwnProperty.call(message, "customizedAttribution")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.customizedAttribution); + if (message.isTranslateNativePdfOnly != null && Object.hasOwnProperty.call(message, "isTranslateNativePdfOnly")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.isTranslateNativePdfOnly); + if (message.enableShadowRemovalNativePdf != null && Object.hasOwnProperty.call(message, "enableShadowRemovalNativePdf")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.enableShadowRemovalNativePdf); return writer; }; @@ -4817,6 +4850,18 @@ message.labels[key] = value; break; } + case 10: { + message.customizedAttribution = reader.string(); + break; + } + case 11: { + message.isTranslateNativePdfOnly = reader.bool(); + break; + } + case 12: { + message.enableShadowRemovalNativePdf = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -4887,6 +4932,15 @@ if (!$util.isString(message.labels[key[i]])) return "labels: string{k:string} expected"; } + if (message.customizedAttribution != null && message.hasOwnProperty("customizedAttribution")) + if (!$util.isString(message.customizedAttribution)) + return "customizedAttribution: string expected"; + if (message.isTranslateNativePdfOnly != null && message.hasOwnProperty("isTranslateNativePdfOnly")) + if (typeof message.isTranslateNativePdfOnly !== "boolean") + return "isTranslateNativePdfOnly: boolean expected"; + if (message.enableShadowRemovalNativePdf != null && message.hasOwnProperty("enableShadowRemovalNativePdf")) + if (typeof message.enableShadowRemovalNativePdf !== "boolean") + return "enableShadowRemovalNativePdf: boolean expected"; return null; }; @@ -4932,6 +4986,12 @@ for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) message.labels[keys[i]] = String(object.labels[keys[i]]); } + if (object.customizedAttribution != null) + message.customizedAttribution = String(object.customizedAttribution); + if (object.isTranslateNativePdfOnly != null) + message.isTranslateNativePdfOnly = Boolean(object.isTranslateNativePdfOnly); + if (object.enableShadowRemovalNativePdf != null) + message.enableShadowRemovalNativePdf = Boolean(object.enableShadowRemovalNativePdf); return message; }; @@ -4958,6 +5018,9 @@ object.documentOutputConfig = null; object.model = ""; object.glossaryConfig = null; + object.customizedAttribution = ""; + object.isTranslateNativePdfOnly = false; + object.enableShadowRemovalNativePdf = false; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; @@ -4979,6 +5042,12 @@ for (var j = 0; j < keys2.length; ++j) object.labels[keys2[j]] = message.labels[keys2[j]]; } + if (message.customizedAttribution != null && message.hasOwnProperty("customizedAttribution")) + object.customizedAttribution = message.customizedAttribution; + if (message.isTranslateNativePdfOnly != null && message.hasOwnProperty("isTranslateNativePdfOnly")) + object.isTranslateNativePdfOnly = message.isTranslateNativePdfOnly; + if (message.enableShadowRemovalNativePdf != null && message.hasOwnProperty("enableShadowRemovalNativePdf")) + object.enableShadowRemovalNativePdf = message.enableShadowRemovalNativePdf; return object; }; @@ -7082,6 +7151,7 @@ * @property {number|null} [entryCount] Glossary entryCount * @property {google.protobuf.ITimestamp|null} [submitTime] Glossary submitTime * @property {google.protobuf.ITimestamp|null} [endTime] Glossary endTime + * @property {string|null} [displayName] Glossary displayName */ /** @@ -7155,6 +7225,14 @@ */ Glossary.prototype.endTime = null; + /** + * Glossary displayName. + * @member {string} displayName + * @memberof google.cloud.translation.v3.Glossary + * @instance + */ + Glossary.prototype.displayName = ""; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -7207,6 +7285,8 @@ $root.google.protobuf.Timestamp.encode(message.submitTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.displayName); return writer; }; @@ -7269,6 +7349,10 @@ message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } + case 9: { + message.displayName = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -7344,6 +7428,9 @@ if (error) return "endTime." + error; } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; return null; }; @@ -7388,6 +7475,8 @@ throw TypeError(".google.cloud.translation.v3.Glossary.endTime: object expected"); message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); } + if (object.displayName != null) + message.displayName = String(object.displayName); return message; }; @@ -7410,6 +7499,7 @@ object.entryCount = 0; object.submitTime = null; object.endTime = null; + object.displayName = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -7431,6 +7521,8 @@ object.submitTime = $root.google.protobuf.Timestamp.toObject(message.submitTime, options); if (message.endTime != null && message.hasOwnProperty("endTime")) object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; return object; }; @@ -9974,6 +10066,7 @@ * @property {Object.|null} [models] BatchTranslateDocumentRequest models * @property {Object.|null} [glossaries] BatchTranslateDocumentRequest glossaries * @property {Object.|null} [formatConversions] BatchTranslateDocumentRequest formatConversions + * @property {string|null} [customizedAttribution] BatchTranslateDocumentRequest customizedAttribution */ /** @@ -10060,6 +10153,14 @@ */ BatchTranslateDocumentRequest.prototype.formatConversions = $util.emptyObject; + /** + * BatchTranslateDocumentRequest customizedAttribution. + * @member {string} customizedAttribution + * @memberof google.cloud.translation.v3.BatchTranslateDocumentRequest + * @instance + */ + BatchTranslateDocumentRequest.prototype.customizedAttribution = ""; + /** * Creates a new BatchTranslateDocumentRequest instance using the specified properties. * @function create @@ -10107,6 +10208,8 @@ if (message.formatConversions != null && Object.hasOwnProperty.call(message, "formatConversions")) for (var keys = Object.keys(message.formatConversions), i = 0; i < keys.length; ++i) writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.formatConversions[keys[i]]).ldelim(); + if (message.customizedAttribution != null && Object.hasOwnProperty.call(message, "customizedAttribution")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.customizedAttribution); return writer; }; @@ -10234,6 +10337,10 @@ message.formatConversions[key] = value; break; } + case 10: { + message.customizedAttribution = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -10322,6 +10429,9 @@ if (!$util.isString(message.formatConversions[key[i]])) return "formatConversions: string{k:string} expected"; } + if (message.customizedAttribution != null && message.hasOwnProperty("customizedAttribution")) + if (!$util.isString(message.customizedAttribution)) + return "customizedAttribution: string expected"; return null; }; @@ -10387,6 +10497,8 @@ for (var keys = Object.keys(object.formatConversions), i = 0; i < keys.length; ++i) message.formatConversions[keys[i]] = String(object.formatConversions[keys[i]]); } + if (object.customizedAttribution != null) + message.customizedAttribution = String(object.customizedAttribution); return message; }; @@ -10416,6 +10528,7 @@ object.parent = ""; object.sourceLanguageCode = ""; object.outputConfig = null; + object.customizedAttribution = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; @@ -10449,6 +10562,8 @@ for (var j = 0; j < keys2.length; ++j) object.formatConversions[keys2[j]] = message.formatConversions[keys2[j]]; } + if (message.customizedAttribution != null && message.hasOwnProperty("customizedAttribution")) + object.customizedAttribution = message.customizedAttribution; return object; }; diff --git a/packages/google-cloud-translate/protos/protos.json b/packages/google-cloud-translate/protos/protos.json index 31dc9660290..ca4d1231447 100644 --- a/packages/google-cloud-translate/protos/protos.json +++ b/packages/google-cloud-translate/protos/protos.json @@ -663,6 +663,27 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "customizedAttribution": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "isTranslateNativePdfOnly": { + "type": "bool", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "enableShadowRemovalNativePdf": { + "type": "bool", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -897,6 +918,13 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "displayName": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -1147,6 +1175,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "customizedAttribution": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, diff --git a/packages/google-cloud-translate/samples/generated/v3/snippet_metadata.google.cloud.translation.v3.json b/packages/google-cloud-translate/samples/generated/v3/snippet_metadata.google.cloud.translation.v3.json index e9c5dd46968..cce074cb254 100644 --- a/packages/google-cloud-translate/samples/generated/v3/snippet_metadata.google.cloud.translation.v3.json +++ b/packages/google-cloud-translate/samples/generated/v3/snippet_metadata.google.cloud.translation.v3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-translation", - "version": "7.1.0", + "version": "7.1.1", "language": "TYPESCRIPT", "apis": [ { @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 118, + "end": 117, "type": "FULL" } ], @@ -194,7 +194,7 @@ "segments": [ { "start": 25, - "end": 115, + "end": 134, "type": "FULL" } ], @@ -234,6 +234,18 @@ { "name": "labels", "type": "TYPE_MESSAGE[]" + }, + { + "name": "customized_attribution", + "type": "TYPE_STRING" + }, + { + "name": "is_translate_native_pdf_only", + "type": "TYPE_BOOL" + }, + { + "name": "enable_shadow_removal_native_pdf", + "type": "TYPE_BOOL" } ], "resultType": ".google.cloud.translation.v3.TranslateDocumentResponse", @@ -330,7 +342,7 @@ "segments": [ { "start": 25, - "end": 115, + "end": 122, "type": "FULL" } ], @@ -370,6 +382,10 @@ { "name": "format_conversions", "type": "TYPE_MESSAGE[]" + }, + { + "name": "customized_attribution", + "type": "TYPE_STRING" } ], "resultType": ".google.longrunning.Operation", diff --git a/packages/google-cloud-translate/samples/generated/v3/translation_service.batch_translate_document.js b/packages/google-cloud-translate/samples/generated/v3/translation_service.batch_translate_document.js index 97b7b39de65..b2b587ac487 100644 --- a/packages/google-cloud-translate/samples/generated/v3/translation_service.batch_translate_document.js +++ b/packages/google-cloud-translate/samples/generated/v3/translation_service.batch_translate_document.js @@ -38,13 +38,13 @@ function main(parent, sourceLanguageCode, targetLanguageCodes, inputConfigs, out */ // const parent = 'abc123' /** - * Required. The BCP-47 language code of the input document if known, for + * Required. The ISO-639 language code of the input document if known, for * example, "en-US" or "sr-Latn". Supported language codes are listed in * Language Support (https://cloud.google.com/translate/docs/languages). */ // const sourceLanguageCode = 'abc123' /** - * Required. The BCP-47 language code to use for translation of the input + * Required. The ISO-639 language code to use for translation of the input * document. Specify up to 10 language codes here. */ // const targetLanguageCodes = 'abc123' @@ -89,6 +89,13 @@ function main(parent, sourceLanguageCode, targetLanguageCodes, inputConfigs, out * original file. */ // const formatConversions = 1234 + /** + * Optional. This flag is to support user customized attribution. + * If not provided, the default is `Machine Translated by Google`. + * Customized attribution should follow rules in + * https://cloud.google.com/translate/attribution#attribution_and_logos + */ + // const customizedAttribution = 'abc123' // Imports the Translation library const {TranslationServiceClient} = require('@google-cloud/translate').v3; diff --git a/packages/google-cloud-translate/samples/generated/v3/translation_service.translate_document.js b/packages/google-cloud-translate/samples/generated/v3/translation_service.translate_document.js index 20ff935da55..69445cef518 100644 --- a/packages/google-cloud-translate/samples/generated/v3/translation_service.translate_document.js +++ b/packages/google-cloud-translate/samples/generated/v3/translation_service.translate_document.js @@ -40,7 +40,7 @@ function main(parent, targetLanguageCode, documentInputConfig) { */ // const parent = 'abc123' /** - * Optional. The BCP-47 language code of the input document if known, for + * Optional. The ISO-639 language code of the input document if known, for * example, "en-US" or "sr-Latn". Supported language codes are listed in * Language Support. If the source language isn't specified, the API attempts * to identify the source language automatically and returns the source @@ -49,7 +49,7 @@ function main(parent, targetLanguageCode, documentInputConfig) { */ // const sourceLanguageCode = 'abc123' /** - * Required. The BCP-47 language code to use for translation of the input + * Required. The ISO-639 language code to use for translation of the input * document, set to one of the language codes listed in Language Support. */ // const targetLanguageCode = 'abc123' @@ -92,6 +92,25 @@ function main(parent, targetLanguageCode, documentInputConfig) { * information. */ // const labels = 1234 + /** + * Optional. This flag is to support user customized attribution. + * If not provided, the default is `Machine Translated by Google`. + * Customized attribution should follow rules in + * https://cloud.google.com/translate/attribution#attribution_and_logos + */ + // const customizedAttribution = 'abc123' + /** + * Optional. If true, the page limit of online native pdf translation is 300 + * and only native pdf pages will be translated. + */ + // const isTranslateNativePdfOnly = true + /** + * Optional. If true, use the text removal to remove the shadow text on + * background image for native pdf translation. + * Shadow removal feature can only be enabled when + * is_translate_native_pdf_only is false + */ + // const enableShadowRemovalNativePdf = true // Imports the Translation library const {TranslationServiceClient} = require('@google-cloud/translate').v3; diff --git a/packages/google-cloud-translate/samples/generated/v3/translation_service.translate_text.js b/packages/google-cloud-translate/samples/generated/v3/translation_service.translate_text.js index 6575fbbb9d7..9d2ffd9d05f 100644 --- a/packages/google-cloud-translate/samples/generated/v3/translation_service.translate_text.js +++ b/packages/google-cloud-translate/samples/generated/v3/translation_service.translate_text.js @@ -30,9 +30,8 @@ function main(contents, targetLanguageCode, parent) { */ /** * Required. The content of the input in string format. - * We recommend the total content be less than 30k codepoints. The max length - * of this field is 1024. - * Use BatchTranslateText for larger text. + * We recommend the total content be less than 30,000 codepoints. The max + * length of this field is 1024. Use BatchTranslateText for larger text. */ // const contents = 'abc123' /** @@ -41,7 +40,7 @@ function main(contents, targetLanguageCode, parent) { */ // const mimeType = 'abc123' /** - * Optional. The BCP-47 language code of the input text if + * Optional. The ISO-639 language code of the input text if * known, for example, "en-US" or "sr-Latn". Supported language codes are * listed in Language Support. If the source language isn't specified, the API * attempts to identify the source language automatically and returns the @@ -49,7 +48,7 @@ function main(contents, targetLanguageCode, parent) { */ // const sourceLanguageCode = 'abc123' /** - * Required. The BCP-47 language code to use for translation of the input + * Required. The ISO-639 language code to use for translation of the input * text, set to one of the language codes listed in Language Support. */ // const targetLanguageCode = 'abc123' diff --git a/packages/google-cloud-translate/samples/generated/v3beta1/snippet_metadata.google.cloud.translation.v3beta1.json b/packages/google-cloud-translate/samples/generated/v3beta1/snippet_metadata.google.cloud.translation.v3beta1.json index be715c10f9d..d8b3f5058ba 100644 --- a/packages/google-cloud-translate/samples/generated/v3beta1/snippet_metadata.google.cloud.translation.v3beta1.json +++ b/packages/google-cloud-translate/samples/generated/v3beta1/snippet_metadata.google.cloud.translation.v3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-translation", - "version": "7.1.0", + "version": "7.1.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-translate/src/v3/translation_service_client.ts b/packages/google-cloud-translate/src/v3/translation_service_client.ts index 858e4c44262..99fbee530cb 100644 --- a/packages/google-cloud-translate/src/v3/translation_service_client.ts +++ b/packages/google-cloud-translate/src/v3/translation_service_client.ts @@ -454,20 +454,19 @@ export class TranslationServiceClient { * The request object that will be sent. * @param {string[]} request.contents * Required. The content of the input in string format. - * We recommend the total content be less than 30k codepoints. The max length - * of this field is 1024. - * Use BatchTranslateText for larger text. + * We recommend the total content be less than 30,000 codepoints. The max + * length of this field is 1024. Use BatchTranslateText for larger text. * @param {string} [request.mimeType] * Optional. The format of the source text, for example, "text/html", * "text/plain". If left blank, the MIME type defaults to "text/html". * @param {string} [request.sourceLanguageCode] - * Optional. The BCP-47 language code of the input text if + * Optional. The ISO-639 language code of the input text if * known, for example, "en-US" or "sr-Latn". Supported language codes are * listed in Language Support. If the source language isn't specified, the API * attempts to identify the source language automatically and returns the * source language within the response. * @param {string} request.targetLanguageCode - * Required. The BCP-47 language code to use for translation of the input + * Required. The ISO-639 language code to use for translation of the input * text, set to one of the language codes listed in Language Support. * @param {string} request.parent * Required. Project or location to make a call. Must refer to a caller's @@ -871,14 +870,14 @@ export class TranslationServiceClient { * Models and glossaries must be within the same region (have the same * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. * @param {string} [request.sourceLanguageCode] - * Optional. The BCP-47 language code of the input document if known, for + * Optional. The ISO-639 language code of the input document if known, for * example, "en-US" or "sr-Latn". Supported language codes are listed in * Language Support. If the source language isn't specified, the API attempts * to identify the source language automatically and returns the source * language within the response. Source language must be specified if the * request contains a glossary or a custom model. * @param {string} request.targetLanguageCode - * Required. The BCP-47 language code to use for translation of the input + * Required. The ISO-639 language code to use for translation of the input * document, set to one of the language codes listed in Language Support. * @param {google.cloud.translation.v3.DocumentInputConfig} request.documentInputConfig * Required. Input configurations. @@ -916,6 +915,19 @@ export class TranslationServiceClient { * * See https://cloud.google.com/translate/docs/advanced/labels for more * information. + * @param {string} [request.customizedAttribution] + * Optional. This flag is to support user customized attribution. + * If not provided, the default is `Machine Translated by Google`. + * Customized attribution should follow rules in + * https://cloud.google.com/translate/attribution#attribution_and_logos + * @param {boolean} [request.isTranslateNativePdfOnly] + * Optional. If true, the page limit of online native pdf translation is 300 + * and only native pdf pages will be translated. + * @param {boolean} [request.enableShadowRemovalNativePdf] + * Optional. If true, use the text removal to remove the shadow text on + * background image for native pdf translation. + * Shadow removal feature can only be enabled when + * is_translate_native_pdf_only is false * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1303,11 +1315,11 @@ export class TranslationServiceClient { * the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) * error is returned. * @param {string} request.sourceLanguageCode - * Required. The BCP-47 language code of the input document if known, for + * Required. The ISO-639 language code of the input document if known, for * example, "en-US" or "sr-Latn". Supported language codes are listed in - * Language Support (https://cloud.google.com/translate/docs/languages). + * [Language Support](https://cloud.google.com/translate/docs/languages). * @param {string[]} request.targetLanguageCodes - * Required. The BCP-47 language code to use for translation of the input + * Required. The ISO-639 language code to use for translation of the input * document. Specify up to 10 language codes here. * @param {number[]} request.inputConfigs * Required. Input configurations. @@ -1347,6 +1359,11 @@ export class TranslationServiceClient { * * If nothing specified, output files will be in the same format as the * original file. + * @param {string} [request.customizedAttribution] + * Optional. This flag is to support user customized attribution. + * If not provided, the default is `Machine Translated by Google`. + * Customized attribution should follow rules in + * https://cloud.google.com/translate/attribution#attribution_and_logos * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. From 0a5f6f3c6f2a993281b5336c1dc2537602a01a12 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 21 Feb 2023 21:25:49 -0800 Subject: [PATCH 33/80] docs: changing format of the jsdoc links (#35) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: changing format of the jsdoc links PiperOrigin-RevId: 509352615 Source-Link: https://github.com/googleapis/googleapis/commit/b737d30dae27222d86fa340ecb99292df4585762 Source-Link: https://github.com/googleapis/googleapis-gen/commit/8efadf3d58780ea1c550268d46a3dc701ba37fcf Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGVmYWRmM2Q1ODc4MGVhMWM1NTAyNjhkNDZhM2RjNzAxYmEzN2ZjZiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../src/v1alpha2/dataform_client.ts | 126 +++++++++--------- .../src/v1beta1/dataform_client.ts | 126 +++++++++--------- 2 files changed, 126 insertions(+), 126 deletions(-) diff --git a/packages/google-cloud-dataform/src/v1alpha2/dataform_client.ts b/packages/google-cloud-dataform/src/v1alpha2/dataform_client.ts index b04bd05f34d..4616fedc194 100644 --- a/packages/google-cloud-dataform/src/v1alpha2/dataform_client.ts +++ b/packages/google-cloud-dataform/src/v1alpha2/dataform_client.ts @@ -428,7 +428,7 @@ export class DataformClient { * @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 [Repository]{@link google.cloud.dataform.v1alpha2.Repository}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.Repository | Repository}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -525,7 +525,7 @@ export class DataformClient { * @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 [Repository]{@link google.cloud.dataform.v1alpha2.Repository}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.Repository | Repository}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -625,7 +625,7 @@ export class DataformClient { * @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 [Repository]{@link google.cloud.dataform.v1alpha2.Repository}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.Repository | Repository}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -726,7 +726,7 @@ export class DataformClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -823,7 +823,7 @@ export class DataformClient { * @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 [FetchRemoteBranchesResponse]{@link google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse | FetchRemoteBranchesResponse}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -920,7 +920,7 @@ export class DataformClient { * @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 [Workspace]{@link google.cloud.dataform.v1alpha2.Workspace}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.Workspace | Workspace}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1017,7 +1017,7 @@ export class DataformClient { * @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 [Workspace]{@link google.cloud.dataform.v1alpha2.Workspace}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.Workspace | Workspace}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1108,7 +1108,7 @@ export class DataformClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1199,7 +1199,7 @@ export class DataformClient { * @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 [InstallNpmPackagesResponse]{@link google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse | InstallNpmPackagesResponse}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1302,7 +1302,7 @@ export class DataformClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1396,7 +1396,7 @@ export class DataformClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1487,7 +1487,7 @@ export class DataformClient { * @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 [FetchFileGitStatusesResponse]{@link google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse | FetchFileGitStatusesResponse}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1588,7 +1588,7 @@ export class DataformClient { * @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 [FetchGitAheadBehindResponse]{@link google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse | FetchGitAheadBehindResponse}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1692,7 +1692,7 @@ export class DataformClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1798,7 +1798,7 @@ export class DataformClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1897,7 +1897,7 @@ export class DataformClient { * @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 [FetchFileDiffResponse]{@link google.cloud.dataform.v1alpha2.FetchFileDiffResponse}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.FetchFileDiffResponse | FetchFileDiffResponse}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1991,7 +1991,7 @@ export class DataformClient { * @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 [MakeDirectoryResponse]{@link google.cloud.dataform.v1alpha2.MakeDirectoryResponse}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.MakeDirectoryResponse | MakeDirectoryResponse}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2085,7 +2085,7 @@ export class DataformClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2183,7 +2183,7 @@ export class DataformClient { * @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 [MoveDirectoryResponse]{@link google.cloud.dataform.v1alpha2.MoveDirectoryResponse}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.MoveDirectoryResponse | MoveDirectoryResponse}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2276,7 +2276,7 @@ export class DataformClient { * @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 [ReadFileResponse]{@link google.cloud.dataform.v1alpha2.ReadFileResponse}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.ReadFileResponse | ReadFileResponse}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2363,7 +2363,7 @@ export class DataformClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2458,7 +2458,7 @@ export class DataformClient { * @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 [MoveFileResponse]{@link google.cloud.dataform.v1alpha2.MoveFileResponse}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.MoveFileResponse | MoveFileResponse}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2547,7 +2547,7 @@ export class DataformClient { * @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 [WriteFileResponse]{@link google.cloud.dataform.v1alpha2.WriteFileResponse}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.WriteFileResponse | WriteFileResponse}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2638,7 +2638,7 @@ export class DataformClient { * @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 [CompilationResult]{@link google.cloud.dataform.v1alpha2.CompilationResult}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.CompilationResult | CompilationResult}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2738,7 +2738,7 @@ export class DataformClient { * @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 [CompilationResult]{@link google.cloud.dataform.v1alpha2.CompilationResult}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.CompilationResult | CompilationResult}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2839,7 +2839,7 @@ export class DataformClient { * @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 [WorkflowInvocation]{@link google.cloud.dataform.v1alpha2.WorkflowInvocation}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.WorkflowInvocation | WorkflowInvocation}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2938,7 +2938,7 @@ export class DataformClient { * @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 [WorkflowInvocation]{@link google.cloud.dataform.v1alpha2.WorkflowInvocation}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1alpha2.WorkflowInvocation | WorkflowInvocation}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -3039,7 +3039,7 @@ export class DataformClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -3140,7 +3140,7 @@ export class DataformClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -3259,7 +3259,7 @@ export class DataformClient { * @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 [Repository]{@link google.cloud.dataform.v1alpha2.Repository}. + * The first element of the array is Array of {@link google.cloud.dataform.v1alpha2.Repository | Repository}. * 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. @@ -3370,7 +3370,7 @@ export class DataformClient { * @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 [Repository]{@link google.cloud.dataform.v1alpha2.Repository} on 'data' event. + * An object stream which emits an object representing {@link google.cloud.dataform.v1alpha2.Repository | Repository} 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 `listRepositoriesAsync()` @@ -3431,7 +3431,7 @@ export class DataformClient { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [Repository]{@link google.cloud.dataform.v1alpha2.Repository}. The API will be called under the hood as needed, once per the page, + * {@link google.cloud.dataform.v1alpha2.Repository | Repository}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) @@ -3487,7 +3487,7 @@ export class DataformClient { * @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 [Workspace]{@link google.cloud.dataform.v1alpha2.Workspace}. + * The first element of the array is Array of {@link google.cloud.dataform.v1alpha2.Workspace | Workspace}. * 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. @@ -3598,7 +3598,7 @@ export class DataformClient { * @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 [Workspace]{@link google.cloud.dataform.v1alpha2.Workspace} on 'data' event. + * An object stream which emits an object representing {@link google.cloud.dataform.v1alpha2.Workspace | Workspace} 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 `listWorkspacesAsync()` @@ -3659,7 +3659,7 @@ export class DataformClient { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [Workspace]{@link google.cloud.dataform.v1alpha2.Workspace}. The API will be called under the hood as needed, once per the page, + * {@link google.cloud.dataform.v1alpha2.Workspace | Workspace}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) @@ -3712,7 +3712,7 @@ export class DataformClient { * @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 [DirectoryEntry]{@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry}. + * The first element of the array is Array of {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry | DirectoryEntry}. * 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. @@ -3824,7 +3824,7 @@ export class DataformClient { * @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 [DirectoryEntry]{@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry} on 'data' event. + * An object stream which emits an object representing {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry | DirectoryEntry} 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 `queryDirectoryContentsAsync()` @@ -3882,7 +3882,7 @@ export class DataformClient { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [DirectoryEntry]{@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry}. The API will be called under the hood as needed, once per the page, + * {@link google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry | DirectoryEntry}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) @@ -3932,7 +3932,7 @@ export class DataformClient { * @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 [CompilationResult]{@link google.cloud.dataform.v1alpha2.CompilationResult}. + * The first element of the array is Array of {@link google.cloud.dataform.v1alpha2.CompilationResult | CompilationResult}. * 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. @@ -4041,7 +4041,7 @@ export class DataformClient { * @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 [CompilationResult]{@link google.cloud.dataform.v1alpha2.CompilationResult} on 'data' event. + * An object stream which emits an object representing {@link google.cloud.dataform.v1alpha2.CompilationResult | CompilationResult} 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 `listCompilationResultsAsync()` @@ -4096,7 +4096,7 @@ export class DataformClient { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [CompilationResult]{@link google.cloud.dataform.v1alpha2.CompilationResult}. The API will be called under the hood as needed, once per the page, + * {@link google.cloud.dataform.v1alpha2.CompilationResult | CompilationResult}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) @@ -4149,7 +4149,7 @@ export class DataformClient { * @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 [CompilationResultAction]{@link google.cloud.dataform.v1alpha2.CompilationResultAction}. + * The first element of the array is Array of {@link google.cloud.dataform.v1alpha2.CompilationResultAction | CompilationResultAction}. * 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. @@ -4261,7 +4261,7 @@ export class DataformClient { * @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 [CompilationResultAction]{@link google.cloud.dataform.v1alpha2.CompilationResultAction} on 'data' event. + * An object stream which emits an object representing {@link google.cloud.dataform.v1alpha2.CompilationResultAction | CompilationResultAction} 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 `queryCompilationResultActionsAsync()` @@ -4319,7 +4319,7 @@ export class DataformClient { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [CompilationResultAction]{@link google.cloud.dataform.v1alpha2.CompilationResultAction}. The API will be called under the hood as needed, once per the page, + * {@link google.cloud.dataform.v1alpha2.CompilationResultAction | CompilationResultAction}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) @@ -4369,7 +4369,7 @@ export class DataformClient { * @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 [WorkflowInvocation]{@link google.cloud.dataform.v1alpha2.WorkflowInvocation}. + * The first element of the array is Array of {@link google.cloud.dataform.v1alpha2.WorkflowInvocation | WorkflowInvocation}. * 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. @@ -4478,7 +4478,7 @@ export class DataformClient { * @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 [WorkflowInvocation]{@link google.cloud.dataform.v1alpha2.WorkflowInvocation} on 'data' event. + * An object stream which emits an object representing {@link google.cloud.dataform.v1alpha2.WorkflowInvocation | WorkflowInvocation} 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 `listWorkflowInvocationsAsync()` @@ -4533,7 +4533,7 @@ export class DataformClient { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [WorkflowInvocation]{@link google.cloud.dataform.v1alpha2.WorkflowInvocation}. The API will be called under the hood as needed, once per the page, + * {@link google.cloud.dataform.v1alpha2.WorkflowInvocation | WorkflowInvocation}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) @@ -4583,7 +4583,7 @@ export class DataformClient { * @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 [WorkflowInvocationAction]{@link google.cloud.dataform.v1alpha2.WorkflowInvocationAction}. + * The first element of the array is Array of {@link google.cloud.dataform.v1alpha2.WorkflowInvocationAction | WorkflowInvocationAction}. * 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. @@ -4692,7 +4692,7 @@ export class DataformClient { * @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 [WorkflowInvocationAction]{@link google.cloud.dataform.v1alpha2.WorkflowInvocationAction} on 'data' event. + * An object stream which emits an object representing {@link google.cloud.dataform.v1alpha2.WorkflowInvocationAction | WorkflowInvocationAction} 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 `queryWorkflowInvocationActionsAsync()` @@ -4748,7 +4748,7 @@ export class DataformClient { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [WorkflowInvocationAction]{@link google.cloud.dataform.v1alpha2.WorkflowInvocationAction}. The API will be called under the hood as needed, once per the page, + * {@link google.cloud.dataform.v1alpha2.WorkflowInvocationAction | WorkflowInvocationAction}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) @@ -4791,16 +4791,16 @@ export class DataformClient { * OPTIONAL: A `GetPolicyOptions` object for specifying options to * `GetIamPolicy`. This field is only used by Cloud IAM. * - * This object should have the same structure as [GetPolicyOptions]{@link google.iam.v1.GetPolicyOptions} + * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing [Policy]{@link google.iam.v1.Policy}. + * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. + * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. * The promise has a method named "cancel" which cancels the ongoing API call. */ getIamPolicy( @@ -4842,13 +4842,13 @@ export class DataformClient { * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. * The promise has a method named "cancel" which cancels the ongoing API call. */ setIamPolicy( @@ -4890,13 +4890,13 @@ export class DataformClient { * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. * The promise has a method named "cancel" which cancels the ongoing API call. * */ @@ -4926,9 +4926,9 @@ export class DataformClient { * @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. + * 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 [Location]{@link google.cloud.location.Location}. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -4978,7 +4978,7 @@ export class DataformClient { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [Location]{@link google.cloud.location.Location}. The API will be called under the hood as needed, once per the page, + * {@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 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) diff --git a/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts b/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts index 4c9045b9b29..8ef465478cd 100644 --- a/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts +++ b/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts @@ -428,7 +428,7 @@ export class DataformClient { * @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 [Repository]{@link google.cloud.dataform.v1beta1.Repository}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.Repository | Repository}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -525,7 +525,7 @@ export class DataformClient { * @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 [Repository]{@link google.cloud.dataform.v1beta1.Repository}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.Repository | Repository}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -619,7 +619,7 @@ export class DataformClient { * @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 [Repository]{@link google.cloud.dataform.v1beta1.Repository}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.Repository | Repository}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -714,7 +714,7 @@ export class DataformClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -805,7 +805,7 @@ export class DataformClient { * @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 [FetchRemoteBranchesResponse]{@link google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse | FetchRemoteBranchesResponse}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -902,7 +902,7 @@ export class DataformClient { * @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 [Workspace]{@link google.cloud.dataform.v1beta1.Workspace}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.Workspace | Workspace}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -999,7 +999,7 @@ export class DataformClient { * @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 [Workspace]{@link google.cloud.dataform.v1beta1.Workspace}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.Workspace | Workspace}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1090,7 +1090,7 @@ export class DataformClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1181,7 +1181,7 @@ export class DataformClient { * @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 [InstallNpmPackagesResponse]{@link google.cloud.dataform.v1beta1.InstallNpmPackagesResponse}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.InstallNpmPackagesResponse | InstallNpmPackagesResponse}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1284,7 +1284,7 @@ export class DataformClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1378,7 +1378,7 @@ export class DataformClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1469,7 +1469,7 @@ export class DataformClient { * @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 [FetchFileGitStatusesResponse]{@link google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse | FetchFileGitStatusesResponse}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1570,7 +1570,7 @@ export class DataformClient { * @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 [FetchGitAheadBehindResponse]{@link google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse | FetchGitAheadBehindResponse}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1674,7 +1674,7 @@ export class DataformClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1780,7 +1780,7 @@ export class DataformClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1879,7 +1879,7 @@ export class DataformClient { * @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 [FetchFileDiffResponse]{@link google.cloud.dataform.v1beta1.FetchFileDiffResponse}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.FetchFileDiffResponse | FetchFileDiffResponse}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1973,7 +1973,7 @@ export class DataformClient { * @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 [MakeDirectoryResponse]{@link google.cloud.dataform.v1beta1.MakeDirectoryResponse}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.MakeDirectoryResponse | MakeDirectoryResponse}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2067,7 +2067,7 @@ export class DataformClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2165,7 +2165,7 @@ export class DataformClient { * @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 [MoveDirectoryResponse]{@link google.cloud.dataform.v1beta1.MoveDirectoryResponse}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.MoveDirectoryResponse | MoveDirectoryResponse}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2258,7 +2258,7 @@ export class DataformClient { * @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 [ReadFileResponse]{@link google.cloud.dataform.v1beta1.ReadFileResponse}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.ReadFileResponse | ReadFileResponse}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2345,7 +2345,7 @@ export class DataformClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2440,7 +2440,7 @@ export class DataformClient { * @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 [MoveFileResponse]{@link google.cloud.dataform.v1beta1.MoveFileResponse}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.MoveFileResponse | MoveFileResponse}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2529,7 +2529,7 @@ export class DataformClient { * @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 [WriteFileResponse]{@link google.cloud.dataform.v1beta1.WriteFileResponse}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.WriteFileResponse | WriteFileResponse}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2614,7 +2614,7 @@ export class DataformClient { * @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 [CompilationResult]{@link google.cloud.dataform.v1beta1.CompilationResult}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.CompilationResult | CompilationResult}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2714,7 +2714,7 @@ export class DataformClient { * @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 [CompilationResult]{@link google.cloud.dataform.v1beta1.CompilationResult}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.CompilationResult | CompilationResult}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2815,7 +2815,7 @@ export class DataformClient { * @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 [WorkflowInvocation]{@link google.cloud.dataform.v1beta1.WorkflowInvocation}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.WorkflowInvocation | WorkflowInvocation}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2915,7 +2915,7 @@ export class DataformClient { * @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 [WorkflowInvocation]{@link google.cloud.dataform.v1beta1.WorkflowInvocation}. + * The first element of the array is an object representing {@link google.cloud.dataform.v1beta1.WorkflowInvocation | WorkflowInvocation}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -3016,7 +3016,7 @@ export class DataformClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -3117,7 +3117,7 @@ export class DataformClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -3236,7 +3236,7 @@ export class DataformClient { * @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 [Repository]{@link google.cloud.dataform.v1beta1.Repository}. + * The first element of the array is Array of {@link google.cloud.dataform.v1beta1.Repository | Repository}. * 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. @@ -3347,7 +3347,7 @@ export class DataformClient { * @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 [Repository]{@link google.cloud.dataform.v1beta1.Repository} on 'data' event. + * An object stream which emits an object representing {@link google.cloud.dataform.v1beta1.Repository | Repository} 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 `listRepositoriesAsync()` @@ -3408,7 +3408,7 @@ export class DataformClient { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [Repository]{@link google.cloud.dataform.v1beta1.Repository}. The API will be called under the hood as needed, once per the page, + * {@link google.cloud.dataform.v1beta1.Repository | Repository}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) @@ -3464,7 +3464,7 @@ export class DataformClient { * @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 [Workspace]{@link google.cloud.dataform.v1beta1.Workspace}. + * The first element of the array is Array of {@link google.cloud.dataform.v1beta1.Workspace | Workspace}. * 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. @@ -3575,7 +3575,7 @@ export class DataformClient { * @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 [Workspace]{@link google.cloud.dataform.v1beta1.Workspace} on 'data' event. + * An object stream which emits an object representing {@link google.cloud.dataform.v1beta1.Workspace | Workspace} 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 `listWorkspacesAsync()` @@ -3636,7 +3636,7 @@ export class DataformClient { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [Workspace]{@link google.cloud.dataform.v1beta1.Workspace}. The API will be called under the hood as needed, once per the page, + * {@link google.cloud.dataform.v1beta1.Workspace | Workspace}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) @@ -3689,7 +3689,7 @@ export class DataformClient { * @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 [DirectoryEntry]{@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry}. + * The first element of the array is Array of {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry | DirectoryEntry}. * 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. @@ -3801,7 +3801,7 @@ export class DataformClient { * @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 [DirectoryEntry]{@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry} on 'data' event. + * An object stream which emits an object representing {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry | DirectoryEntry} 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 `queryDirectoryContentsAsync()` @@ -3859,7 +3859,7 @@ export class DataformClient { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [DirectoryEntry]{@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry}. The API will be called under the hood as needed, once per the page, + * {@link google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse.DirectoryEntry | DirectoryEntry}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) @@ -3909,7 +3909,7 @@ export class DataformClient { * @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 [CompilationResult]{@link google.cloud.dataform.v1beta1.CompilationResult}. + * The first element of the array is Array of {@link google.cloud.dataform.v1beta1.CompilationResult | CompilationResult}. * 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. @@ -4018,7 +4018,7 @@ export class DataformClient { * @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 [CompilationResult]{@link google.cloud.dataform.v1beta1.CompilationResult} on 'data' event. + * An object stream which emits an object representing {@link google.cloud.dataform.v1beta1.CompilationResult | CompilationResult} 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 `listCompilationResultsAsync()` @@ -4073,7 +4073,7 @@ export class DataformClient { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [CompilationResult]{@link google.cloud.dataform.v1beta1.CompilationResult}. The API will be called under the hood as needed, once per the page, + * {@link google.cloud.dataform.v1beta1.CompilationResult | CompilationResult}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) @@ -4126,7 +4126,7 @@ export class DataformClient { * @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 [CompilationResultAction]{@link google.cloud.dataform.v1beta1.CompilationResultAction}. + * The first element of the array is Array of {@link google.cloud.dataform.v1beta1.CompilationResultAction | CompilationResultAction}. * 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. @@ -4238,7 +4238,7 @@ export class DataformClient { * @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 [CompilationResultAction]{@link google.cloud.dataform.v1beta1.CompilationResultAction} on 'data' event. + * An object stream which emits an object representing {@link google.cloud.dataform.v1beta1.CompilationResultAction | CompilationResultAction} 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 `queryCompilationResultActionsAsync()` @@ -4296,7 +4296,7 @@ export class DataformClient { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [CompilationResultAction]{@link google.cloud.dataform.v1beta1.CompilationResultAction}. The API will be called under the hood as needed, once per the page, + * {@link google.cloud.dataform.v1beta1.CompilationResultAction | CompilationResultAction}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) @@ -4346,7 +4346,7 @@ export class DataformClient { * @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 [WorkflowInvocation]{@link google.cloud.dataform.v1beta1.WorkflowInvocation}. + * The first element of the array is Array of {@link google.cloud.dataform.v1beta1.WorkflowInvocation | WorkflowInvocation}. * 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. @@ -4455,7 +4455,7 @@ export class DataformClient { * @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 [WorkflowInvocation]{@link google.cloud.dataform.v1beta1.WorkflowInvocation} on 'data' event. + * An object stream which emits an object representing {@link google.cloud.dataform.v1beta1.WorkflowInvocation | WorkflowInvocation} 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 `listWorkflowInvocationsAsync()` @@ -4510,7 +4510,7 @@ export class DataformClient { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [WorkflowInvocation]{@link google.cloud.dataform.v1beta1.WorkflowInvocation}. The API will be called under the hood as needed, once per the page, + * {@link google.cloud.dataform.v1beta1.WorkflowInvocation | WorkflowInvocation}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) @@ -4560,7 +4560,7 @@ export class DataformClient { * @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 [WorkflowInvocationAction]{@link google.cloud.dataform.v1beta1.WorkflowInvocationAction}. + * The first element of the array is Array of {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction | WorkflowInvocationAction}. * 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. @@ -4669,7 +4669,7 @@ export class DataformClient { * @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 [WorkflowInvocationAction]{@link google.cloud.dataform.v1beta1.WorkflowInvocationAction} on 'data' event. + * An object stream which emits an object representing {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction | WorkflowInvocationAction} 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 `queryWorkflowInvocationActionsAsync()` @@ -4725,7 +4725,7 @@ export class DataformClient { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [WorkflowInvocationAction]{@link google.cloud.dataform.v1beta1.WorkflowInvocationAction}. The API will be called under the hood as needed, once per the page, + * {@link google.cloud.dataform.v1beta1.WorkflowInvocationAction | WorkflowInvocationAction}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) @@ -4768,16 +4768,16 @@ export class DataformClient { * OPTIONAL: A `GetPolicyOptions` object for specifying options to * `GetIamPolicy`. This field is only used by Cloud IAM. * - * This object should have the same structure as [GetPolicyOptions]{@link google.iam.v1.GetPolicyOptions} + * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing [Policy]{@link google.iam.v1.Policy}. + * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. + * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. * The promise has a method named "cancel" which cancels the ongoing API call. */ getIamPolicy( @@ -4819,13 +4819,13 @@ export class DataformClient { * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. * The promise has a method named "cancel" which cancels the ongoing API call. */ setIamPolicy( @@ -4867,13 +4867,13 @@ export class DataformClient { * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. * The promise has a method named "cancel" which cancels the ongoing API call. * */ @@ -4903,9 +4903,9 @@ export class DataformClient { * @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. + * 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 [Location]{@link google.cloud.location.Location}. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -4955,7 +4955,7 @@ export class DataformClient { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [Location]{@link google.cloud.location.Location}. The API will be called under the hood as needed, once per the page, + * {@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 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) From 00d80460926860f5ba8d155bcf2a384f67ae9964 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 21 Feb 2023 21:38:03 -0800 Subject: [PATCH 34/80] chore: [container] Reformatting (#4006) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: Reformatting PiperOrigin-RevId: 511116336 Source-Link: https://github.com/googleapis/googleapis/commit/af2f5daac44399b9395c6be1049a3e70b47260b5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/9c6068e8821f07198ed6f06e294f9d27b160e645 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNvbnRhaW5lci8uT3dsQm90LnlhbWwiLCJoIjoiOWM2MDY4ZTg4MjFmMDcxOThlZDZmMDZlMjk0ZjlkMjdiMTYwZTY0NSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: Daniel Bankhead --- .../container/v1beta1/cluster_service.proto | 20 +- packages/google-container/protos/protos.d.ts | 40 +-- packages/google-container/protos/protos.js | 56 ++-- packages/google-container/protos/protos.json | 28 +- .../snippet_metadata.google.container.v1.json | 2 +- ...pet_metadata.google.container.v1beta1.json | 66 ++--- .../src/v1beta1/cluster_manager_client.ts | 146 +++++------ .../cluster_manager_client_config.json | 8 +- .../src/v1beta1/gapic_metadata.json | 16 +- .../test/gapic_cluster_manager_v1beta1.ts | 246 +++++++++--------- 10 files changed, 314 insertions(+), 314 deletions(-) diff --git a/packages/google-container/protos/google/container/v1beta1/cluster_service.proto b/packages/google-container/protos/google/container/v1beta1/cluster_service.proto index fee552d5f29..e9f06b2f913 100644 --- a/packages/google-container/protos/google/container/v1beta1/cluster_service.proto +++ b/packages/google-container/protos/google/container/v1beta1/cluster_service.proto @@ -286,6 +286,16 @@ service ClusterManager { option (google.api.method_signature) = "project_id,zone"; } + // Gets the public component of the cluster signing keys in + // JSON Web Key format. + // This API is not yet intended for general use, and is not available for all + // clusters. + rpc GetJSONWebKeys(GetJSONWebKeysRequest) returns (GetJSONWebKeysResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/clusters/*}/jwks" + }; + } + // Lists the node pools for a cluster. rpc ListNodePools(ListNodePoolsRequest) returns (ListNodePoolsResponse) { option (google.api.http) = { @@ -297,16 +307,6 @@ service ClusterManager { option (google.api.method_signature) = "project_id,zone,cluster_id"; } - // Gets the public component of the cluster signing keys in - // JSON Web Key format. - // This API is not yet intended for general use, and is not available for all - // clusters. - rpc GetJSONWebKeys(GetJSONWebKeysRequest) returns (GetJSONWebKeysResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*/clusters/*}/jwks" - }; - } - // Retrieves the requested node pool. rpc GetNodePool(GetNodePoolRequest) returns (NodePool) { option (google.api.http) = { diff --git a/packages/google-container/protos/protos.d.ts b/packages/google-container/protos/protos.d.ts index 3316868bc33..563b98d3237 100644 --- a/packages/google-container/protos/protos.d.ts +++ b/packages/google-container/protos/protos.d.ts @@ -19072,20 +19072,6 @@ export namespace google { */ public getServerConfig(request: google.container.v1beta1.IGetServerConfigRequest): Promise; - /** - * Calls ListNodePools. - * @param request ListNodePoolsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListNodePoolsResponse - */ - public listNodePools(request: google.container.v1beta1.IListNodePoolsRequest, callback: google.container.v1beta1.ClusterManager.ListNodePoolsCallback): void; - - /** - * Calls ListNodePools. - * @param request ListNodePoolsRequest message or plain object - * @returns Promise - */ - public listNodePools(request: google.container.v1beta1.IListNodePoolsRequest): Promise; - /** * Calls GetJSONWebKeys. * @param request GetJSONWebKeysRequest message or plain object @@ -19100,6 +19086,20 @@ export namespace google { */ public getJSONWebKeys(request: google.container.v1beta1.IGetJSONWebKeysRequest): Promise; + /** + * Calls ListNodePools. + * @param request ListNodePoolsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListNodePoolsResponse + */ + public listNodePools(request: google.container.v1beta1.IListNodePoolsRequest, callback: google.container.v1beta1.ClusterManager.ListNodePoolsCallback): void; + + /** + * Calls ListNodePools. + * @param request ListNodePoolsRequest message or plain object + * @returns Promise + */ + public listNodePools(request: google.container.v1beta1.IListNodePoolsRequest): Promise; + /** * Calls GetNodePool. * @param request GetNodePoolRequest message or plain object @@ -19433,18 +19433,18 @@ export namespace google { type GetServerConfigCallback = (error: (Error|null), response?: google.container.v1beta1.ServerConfig) => void; /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|listNodePools}. + * Callback as used by {@link google.container.v1beta1.ClusterManager|getJSONWebKeys}. * @param error Error, if any - * @param [response] ListNodePoolsResponse + * @param [response] GetJSONWebKeysResponse */ - type ListNodePoolsCallback = (error: (Error|null), response?: google.container.v1beta1.ListNodePoolsResponse) => void; + type GetJSONWebKeysCallback = (error: (Error|null), response?: google.container.v1beta1.GetJSONWebKeysResponse) => void; /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|getJSONWebKeys}. + * Callback as used by {@link google.container.v1beta1.ClusterManager|listNodePools}. * @param error Error, if any - * @param [response] GetJSONWebKeysResponse + * @param [response] ListNodePoolsResponse */ - type GetJSONWebKeysCallback = (error: (Error|null), response?: google.container.v1beta1.GetJSONWebKeysResponse) => void; + type ListNodePoolsCallback = (error: (Error|null), response?: google.container.v1beta1.ListNodePoolsResponse) => void; /** * Callback as used by {@link google.container.v1beta1.ClusterManager|getNodePool}. diff --git a/packages/google-container/protos/protos.js b/packages/google-container/protos/protos.js index b6cfbf8ff6c..246d2376c23 100644 --- a/packages/google-container/protos/protos.js +++ b/packages/google-container/protos/protos.js @@ -48282,68 +48282,68 @@ */ /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|listNodePools}. + * Callback as used by {@link google.container.v1beta1.ClusterManager|getJSONWebKeys}. * @memberof google.container.v1beta1.ClusterManager - * @typedef ListNodePoolsCallback + * @typedef GetJSONWebKeysCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.ListNodePoolsResponse} [response] ListNodePoolsResponse + * @param {google.container.v1beta1.GetJSONWebKeysResponse} [response] GetJSONWebKeysResponse */ /** - * Calls ListNodePools. - * @function listNodePools + * Calls GetJSONWebKeys. + * @function getJSONWebKeys * @memberof google.container.v1beta1.ClusterManager * @instance - * @param {google.container.v1beta1.IListNodePoolsRequest} request ListNodePoolsRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.ListNodePoolsCallback} callback Node-style callback called with the error, if any, and ListNodePoolsResponse + * @param {google.container.v1beta1.IGetJSONWebKeysRequest} request GetJSONWebKeysRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.GetJSONWebKeysCallback} callback Node-style callback called with the error, if any, and GetJSONWebKeysResponse * @returns {undefined} * @variation 1 */ - Object.defineProperty(ClusterManager.prototype.listNodePools = function listNodePools(request, callback) { - return this.rpcCall(listNodePools, $root.google.container.v1beta1.ListNodePoolsRequest, $root.google.container.v1beta1.ListNodePoolsResponse, request, callback); - }, "name", { value: "ListNodePools" }); + Object.defineProperty(ClusterManager.prototype.getJSONWebKeys = function getJSONWebKeys(request, callback) { + return this.rpcCall(getJSONWebKeys, $root.google.container.v1beta1.GetJSONWebKeysRequest, $root.google.container.v1beta1.GetJSONWebKeysResponse, request, callback); + }, "name", { value: "GetJSONWebKeys" }); /** - * Calls ListNodePools. - * @function listNodePools + * Calls GetJSONWebKeys. + * @function getJSONWebKeys * @memberof google.container.v1beta1.ClusterManager * @instance - * @param {google.container.v1beta1.IListNodePoolsRequest} request ListNodePoolsRequest message or plain object - * @returns {Promise} Promise + * @param {google.container.v1beta1.IGetJSONWebKeysRequest} request GetJSONWebKeysRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.container.v1beta1.ClusterManager|getJSONWebKeys}. + * Callback as used by {@link google.container.v1beta1.ClusterManager|listNodePools}. * @memberof google.container.v1beta1.ClusterManager - * @typedef GetJSONWebKeysCallback + * @typedef ListNodePoolsCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.container.v1beta1.GetJSONWebKeysResponse} [response] GetJSONWebKeysResponse + * @param {google.container.v1beta1.ListNodePoolsResponse} [response] ListNodePoolsResponse */ /** - * Calls GetJSONWebKeys. - * @function getJSONWebKeys + * Calls ListNodePools. + * @function listNodePools * @memberof google.container.v1beta1.ClusterManager * @instance - * @param {google.container.v1beta1.IGetJSONWebKeysRequest} request GetJSONWebKeysRequest message or plain object - * @param {google.container.v1beta1.ClusterManager.GetJSONWebKeysCallback} callback Node-style callback called with the error, if any, and GetJSONWebKeysResponse + * @param {google.container.v1beta1.IListNodePoolsRequest} request ListNodePoolsRequest message or plain object + * @param {google.container.v1beta1.ClusterManager.ListNodePoolsCallback} callback Node-style callback called with the error, if any, and ListNodePoolsResponse * @returns {undefined} * @variation 1 */ - Object.defineProperty(ClusterManager.prototype.getJSONWebKeys = function getJSONWebKeys(request, callback) { - return this.rpcCall(getJSONWebKeys, $root.google.container.v1beta1.GetJSONWebKeysRequest, $root.google.container.v1beta1.GetJSONWebKeysResponse, request, callback); - }, "name", { value: "GetJSONWebKeys" }); + Object.defineProperty(ClusterManager.prototype.listNodePools = function listNodePools(request, callback) { + return this.rpcCall(listNodePools, $root.google.container.v1beta1.ListNodePoolsRequest, $root.google.container.v1beta1.ListNodePoolsResponse, request, callback); + }, "name", { value: "ListNodePools" }); /** - * Calls GetJSONWebKeys. - * @function getJSONWebKeys + * Calls ListNodePools. + * @function listNodePools * @memberof google.container.v1beta1.ClusterManager * @instance - * @param {google.container.v1beta1.IGetJSONWebKeysRequest} request GetJSONWebKeysRequest message or plain object - * @returns {Promise} Promise + * @param {google.container.v1beta1.IListNodePoolsRequest} request ListNodePoolsRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ diff --git a/packages/google-container/protos/protos.json b/packages/google-container/protos/protos.json index bbc3be45e3f..fce5a8d6591 100644 --- a/packages/google-container/protos/protos.json +++ b/packages/google-container/protos/protos.json @@ -5449,6 +5449,20 @@ } ] }, + "GetJSONWebKeys": { + "requestType": "GetJSONWebKeysRequest", + "responseType": "GetJSONWebKeysResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/clusters/*}/jwks" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*/clusters/*}/jwks" + } + } + ] + }, "ListNodePools": { "requestType": "ListNodePoolsRequest", "responseType": "ListNodePoolsResponse", @@ -5471,20 +5485,6 @@ } ] }, - "GetJSONWebKeys": { - "requestType": "GetJSONWebKeysRequest", - "responseType": "GetJSONWebKeysResponse", - "options": { - "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/clusters/*}/jwks" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{parent=projects/*/locations/*/clusters/*}/jwks" - } - } - ] - }, "GetNodePool": { "requestType": "GetNodePoolRequest", "responseType": "NodePool", diff --git a/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json b/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json index e1dcc40ef6f..ca0c108974a 100644 --- a/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json +++ b/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-container", - "version": "4.7.0", + "version": "4.7.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json b/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json index 977cde90c9f..ebe0e50545c 100644 --- a/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json +++ b/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-container", - "version": "4.7.0", + "version": "4.7.1", "language": "TYPESCRIPT", "apis": [ { @@ -1004,50 +1004,38 @@ } }, { - "regionTag": "container_v1beta1_generated_ClusterManager_ListNodePools_async", - "title": "ClusterManager listNodePools Sample", + "regionTag": "container_v1beta1_generated_ClusterManager_GetJSONWebKeys_async", + "title": "ClusterManager getJSONWebKeys Sample", "origin": "API_DEFINITION", - "description": " Lists the node pools for a cluster.", + "description": " Gets the public component of the cluster signing keys in JSON Web Key format. This API is not yet intended for general use, and is not available for all clusters.", "canonical": true, - "file": "cluster_manager.list_node_pools.js", + "file": "cluster_manager.get_j_s_o_n_web_keys.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 56, + "end": 53, "type": "FULL" } ], "clientMethod": { - "shortName": "ListNodePools", - "fullName": "google.container.v1beta1.ClusterManager.ListNodePools", + "shortName": "GetJSONWebKeys", + "fullName": "google.container.v1beta1.ClusterManager.GetJSONWebKeys", "async": true, "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, { "name": "parent", "type": "TYPE_STRING" } ], - "resultType": ".google.container.v1beta1.ListNodePoolsResponse", + "resultType": ".google.container.v1beta1.GetJSONWebKeysResponse", "client": { "shortName": "ClusterManagerClient", "fullName": "google.container.v1beta1.ClusterManagerClient" }, "method": { - "shortName": "ListNodePools", - "fullName": "google.container.v1beta1.ClusterManager.ListNodePools", + "shortName": "GetJSONWebKeys", + "fullName": "google.container.v1beta1.ClusterManager.GetJSONWebKeys", "service": { "shortName": "ClusterManager", "fullName": "google.container.v1beta1.ClusterManager" @@ -1056,38 +1044,50 @@ } }, { - "regionTag": "container_v1beta1_generated_ClusterManager_GetJSONWebKeys_async", - "title": "ClusterManager getJSONWebKeys Sample", + "regionTag": "container_v1beta1_generated_ClusterManager_ListNodePools_async", + "title": "ClusterManager listNodePools Sample", "origin": "API_DEFINITION", - "description": " Gets the public component of the cluster signing keys in JSON Web Key format. This API is not yet intended for general use, and is not available for all clusters.", + "description": " Lists the node pools for a cluster.", "canonical": true, - "file": "cluster_manager.get_j_s_o_n_web_keys.js", + "file": "cluster_manager.list_node_pools.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 53, + "end": 56, "type": "FULL" } ], "clientMethod": { - "shortName": "GetJSONWebKeys", - "fullName": "google.container.v1beta1.ClusterManager.GetJSONWebKeys", + "shortName": "ListNodePools", + "fullName": "google.container.v1beta1.ClusterManager.ListNodePools", "async": true, "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + }, + { + "name": "cluster_id", + "type": "TYPE_STRING" + }, { "name": "parent", "type": "TYPE_STRING" } ], - "resultType": ".google.container.v1beta1.GetJSONWebKeysResponse", + "resultType": ".google.container.v1beta1.ListNodePoolsResponse", "client": { "shortName": "ClusterManagerClient", "fullName": "google.container.v1beta1.ClusterManagerClient" }, "method": { - "shortName": "GetJSONWebKeys", - "fullName": "google.container.v1beta1.ClusterManager.GetJSONWebKeys", + "shortName": "ListNodePools", + "fullName": "google.container.v1beta1.ClusterManager.ListNodePools", "service": { "shortName": "ClusterManager", "fullName": "google.container.v1beta1.ClusterManager" diff --git a/packages/google-container/src/v1beta1/cluster_manager_client.ts b/packages/google-container/src/v1beta1/cluster_manager_client.ts index 90eac2215ce..cad055b79c9 100644 --- a/packages/google-container/src/v1beta1/cluster_manager_client.ts +++ b/packages/google-container/src/v1beta1/cluster_manager_client.ts @@ -251,8 +251,8 @@ export class ClusterManagerClient { 'getOperation', 'cancelOperation', 'getServerConfig', - 'listNodePools', 'getJsonWebKeys', + 'listNodePools', 'getNodePool', 'createNodePool', 'deleteNodePool', @@ -2263,82 +2263,73 @@ export class ClusterManagerClient { return this.innerApiCalls.getServerConfig(request, options, callback); } /** - * Lists the node pools for a cluster. + * Gets the public component of the cluster signing keys in + * JSON Web Key format. + * This API is not yet intended for general use, and is not available for all + * clusters. * * @param {Object} request * The request object that will be sent. - * @param {string} request.projectId - * Required. Deprecated. The Google Developers Console [project ID or project - * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - * This field has been deprecated and replaced by the parent field. - * @param {string} request.zone - * Required. Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the parent - * field. - * @param {string} request.clusterId - * Required. Deprecated. The name of the cluster. - * This field has been deprecated and replaced by the parent field. * @param {string} request.parent - * The parent (project, location, cluster name) where the node pools will be - * listed. Specified in the format `projects/* /locations/* /clusters/*`. + * The cluster (project, location, cluster name) to get keys for. Specified in + * the format `projects/* /locations/* /clusters/*`. * @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.container.v1beta1.ListNodePoolsResponse | ListNodePoolsResponse}. + * The first element of the array is an object representing {@link google.container.v1beta1.GetJSONWebKeysResponse | GetJSONWebKeysResponse}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.list_node_pools.js - * region_tag:container_v1beta1_generated_ClusterManager_ListNodePools_async + * @example include:samples/generated/v1beta1/cluster_manager.get_j_s_o_n_web_keys.js + * region_tag:container_v1beta1_generated_ClusterManager_GetJSONWebKeys_async */ - listNodePools( - request?: protos.google.container.v1beta1.IListNodePoolsRequest, + getJSONWebKeys( + request?: protos.google.container.v1beta1.IGetJSONWebKeysRequest, options?: CallOptions ): Promise< [ - protos.google.container.v1beta1.IListNodePoolsResponse, - protos.google.container.v1beta1.IListNodePoolsRequest | undefined, + protos.google.container.v1beta1.IGetJSONWebKeysResponse, + protos.google.container.v1beta1.IGetJSONWebKeysRequest | undefined, {} | undefined ] >; - listNodePools( - request: protos.google.container.v1beta1.IListNodePoolsRequest, + getJSONWebKeys( + request: protos.google.container.v1beta1.IGetJSONWebKeysRequest, options: CallOptions, callback: Callback< - protos.google.container.v1beta1.IListNodePoolsResponse, - protos.google.container.v1beta1.IListNodePoolsRequest | null | undefined, + protos.google.container.v1beta1.IGetJSONWebKeysResponse, + protos.google.container.v1beta1.IGetJSONWebKeysRequest | null | undefined, {} | null | undefined > ): void; - listNodePools( - request: protos.google.container.v1beta1.IListNodePoolsRequest, + getJSONWebKeys( + request: protos.google.container.v1beta1.IGetJSONWebKeysRequest, callback: Callback< - protos.google.container.v1beta1.IListNodePoolsResponse, - protos.google.container.v1beta1.IListNodePoolsRequest | null | undefined, + protos.google.container.v1beta1.IGetJSONWebKeysResponse, + protos.google.container.v1beta1.IGetJSONWebKeysRequest | null | undefined, {} | null | undefined > ): void; - listNodePools( - request?: protos.google.container.v1beta1.IListNodePoolsRequest, + getJSONWebKeys( + request?: protos.google.container.v1beta1.IGetJSONWebKeysRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.container.v1beta1.IListNodePoolsResponse, - | protos.google.container.v1beta1.IListNodePoolsRequest + protos.google.container.v1beta1.IGetJSONWebKeysResponse, + | protos.google.container.v1beta1.IGetJSONWebKeysRequest | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.container.v1beta1.IListNodePoolsResponse, - protos.google.container.v1beta1.IListNodePoolsRequest | null | undefined, + protos.google.container.v1beta1.IGetJSONWebKeysResponse, + protos.google.container.v1beta1.IGetJSONWebKeysRequest | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.container.v1beta1.IListNodePoolsResponse, - protos.google.container.v1beta1.IListNodePoolsRequest | undefined, + protos.google.container.v1beta1.IGetJSONWebKeysResponse, + protos.google.container.v1beta1.IGetJSONWebKeysRequest | undefined, {} | undefined ] > | void { @@ -2356,81 +2347,87 @@ export class ClusterManagerClient { options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', - project_id: request.projectId ?? '', - zone: request.zone ?? '', - cluster_id: request.clusterId ?? '', }); this.initialize(); - return this.innerApiCalls.listNodePools(request, options, callback); + return this.innerApiCalls.getJsonWebKeys(request, options, callback); } /** - * Gets the public component of the cluster signing keys in - * JSON Web Key format. - * This API is not yet intended for general use, and is not available for all - * clusters. + * Lists the node pools for a cluster. * * @param {Object} request * The request object that will be sent. + * @param {string} request.projectId + * Required. Deprecated. The Google Developers Console [project ID or project + * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + * This field has been deprecated and replaced by the parent field. + * @param {string} request.zone + * Required. Deprecated. The name of the Google Compute Engine + * [zone](https://cloud.google.com/compute/docs/zones#available) in which the + * cluster resides. This field has been deprecated and replaced by the parent + * field. + * @param {string} request.clusterId + * Required. Deprecated. The name of the cluster. + * This field has been deprecated and replaced by the parent field. * @param {string} request.parent - * The cluster (project, location, cluster name) to get keys for. Specified in - * the format `projects/* /locations/* /clusters/*`. + * The parent (project, location, cluster name) where the node pools will be + * listed. Specified in the format `projects/* /locations/* /clusters/*`. * @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.container.v1beta1.GetJSONWebKeysResponse | GetJSONWebKeysResponse}. + * The first element of the array is an object representing {@link google.container.v1beta1.ListNodePoolsResponse | ListNodePoolsResponse}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example include:samples/generated/v1beta1/cluster_manager.get_j_s_o_n_web_keys.js - * region_tag:container_v1beta1_generated_ClusterManager_GetJSONWebKeys_async + * @example include:samples/generated/v1beta1/cluster_manager.list_node_pools.js + * region_tag:container_v1beta1_generated_ClusterManager_ListNodePools_async */ - getJSONWebKeys( - request?: protos.google.container.v1beta1.IGetJSONWebKeysRequest, + listNodePools( + request?: protos.google.container.v1beta1.IListNodePoolsRequest, options?: CallOptions ): Promise< [ - protos.google.container.v1beta1.IGetJSONWebKeysResponse, - protos.google.container.v1beta1.IGetJSONWebKeysRequest | undefined, + protos.google.container.v1beta1.IListNodePoolsResponse, + protos.google.container.v1beta1.IListNodePoolsRequest | undefined, {} | undefined ] >; - getJSONWebKeys( - request: protos.google.container.v1beta1.IGetJSONWebKeysRequest, + listNodePools( + request: protos.google.container.v1beta1.IListNodePoolsRequest, options: CallOptions, callback: Callback< - protos.google.container.v1beta1.IGetJSONWebKeysResponse, - protos.google.container.v1beta1.IGetJSONWebKeysRequest | null | undefined, + protos.google.container.v1beta1.IListNodePoolsResponse, + protos.google.container.v1beta1.IListNodePoolsRequest | null | undefined, {} | null | undefined > ): void; - getJSONWebKeys( - request: protos.google.container.v1beta1.IGetJSONWebKeysRequest, + listNodePools( + request: protos.google.container.v1beta1.IListNodePoolsRequest, callback: Callback< - protos.google.container.v1beta1.IGetJSONWebKeysResponse, - protos.google.container.v1beta1.IGetJSONWebKeysRequest | null | undefined, + protos.google.container.v1beta1.IListNodePoolsResponse, + protos.google.container.v1beta1.IListNodePoolsRequest | null | undefined, {} | null | undefined > ): void; - getJSONWebKeys( - request?: protos.google.container.v1beta1.IGetJSONWebKeysRequest, + listNodePools( + request?: protos.google.container.v1beta1.IListNodePoolsRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.container.v1beta1.IGetJSONWebKeysResponse, - | protos.google.container.v1beta1.IGetJSONWebKeysRequest + protos.google.container.v1beta1.IListNodePoolsResponse, + | protos.google.container.v1beta1.IListNodePoolsRequest | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.container.v1beta1.IGetJSONWebKeysResponse, - protos.google.container.v1beta1.IGetJSONWebKeysRequest | null | undefined, + protos.google.container.v1beta1.IListNodePoolsResponse, + protos.google.container.v1beta1.IListNodePoolsRequest | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.container.v1beta1.IGetJSONWebKeysResponse, - protos.google.container.v1beta1.IGetJSONWebKeysRequest | undefined, + protos.google.container.v1beta1.IListNodePoolsResponse, + protos.google.container.v1beta1.IListNodePoolsRequest | undefined, {} | undefined ] > | void { @@ -2448,9 +2445,12 @@ export class ClusterManagerClient { options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', + project_id: request.projectId ?? '', + zone: request.zone ?? '', + cluster_id: request.clusterId ?? '', }); this.initialize(); - return this.innerApiCalls.getJsonWebKeys(request, options, callback); + return this.innerApiCalls.listNodePools(request, options, callback); } /** * Retrieves the requested node pool. diff --git a/packages/google-container/src/v1beta1/cluster_manager_client_config.json b/packages/google-container/src/v1beta1/cluster_manager_client_config.json index 27fa3c1f158..3b6cd441bf1 100644 --- a/packages/google-container/src/v1beta1/cluster_manager_client_config.json +++ b/packages/google-container/src/v1beta1/cluster_manager_client_config.json @@ -105,15 +105,15 @@ "retry_codes_name": "idempotent", "retry_params_name": "default" }, + "GetJSONWebKeys": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "ListNodePools": { "timeout_millis": 20000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, - "GetJSONWebKeys": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, "GetNodePool": { "timeout_millis": 20000, "retry_codes_name": "idempotent", diff --git a/packages/google-container/src/v1beta1/gapic_metadata.json b/packages/google-container/src/v1beta1/gapic_metadata.json index 21241d45ef6..b2369e37ab4 100644 --- a/packages/google-container/src/v1beta1/gapic_metadata.json +++ b/packages/google-container/src/v1beta1/gapic_metadata.json @@ -95,14 +95,14 @@ "getServerConfig" ] }, - "ListNodePools": { + "GetJSONWebKeys": { "methods": [ - "listNodePools" + "getJSONWebKeys" ] }, - "GetJSONWebKeys": { + "ListNodePools": { "methods": [ - "getJSONWebKeys" + "listNodePools" ] }, "GetNodePool": { @@ -272,14 +272,14 @@ "getServerConfig" ] }, - "ListNodePools": { + "GetJSONWebKeys": { "methods": [ - "listNodePools" + "getJSONWebKeys" ] }, - "GetJSONWebKeys": { + "ListNodePools": { "methods": [ - "getJSONWebKeys" + "listNodePools" ] }, "GetNodePool": { diff --git a/packages/google-container/test/gapic_cluster_manager_v1beta1.ts b/packages/google-container/test/gapic_cluster_manager_v1beta1.ts index a4e009d8b21..824821bc7af 100644 --- a/packages/google-container/test/gapic_cluster_manager_v1beta1.ts +++ b/packages/google-container/test/gapic_cluster_manager_v1beta1.ts @@ -3433,94 +3433,64 @@ describe('v1beta1.ClusterManagerClient', () => { }); }); - describe('listNodePools', () => { - it('invokes listNodePools without error', async () => { + describe('getJSONWebKeys', () => { + it('invokes getJSONWebKeys without error', async () => { const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.container.v1beta1.ListNodePoolsRequest() + new protos.google.container.v1beta1.GetJSONWebKeysRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.container.v1beta1.ListNodePoolsRequest', + '.google.container.v1beta1.GetJSONWebKeysRequest', ['parent'] ); request.parent = defaultValue1; - const defaultValue2 = getTypeDefaultValue( - '.google.container.v1beta1.ListNodePoolsRequest', - ['projectId'] - ); - request.projectId = defaultValue2; - const defaultValue3 = getTypeDefaultValue( - '.google.container.v1beta1.ListNodePoolsRequest', - ['zone'] - ); - request.zone = defaultValue3; - const defaultValue4 = getTypeDefaultValue( - '.google.container.v1beta1.ListNodePoolsRequest', - ['clusterId'] - ); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.ListNodePoolsResponse() + new protos.google.container.v1beta1.GetJSONWebKeysResponse() ); - client.innerApiCalls.listNodePools = stubSimpleCall(expectedResponse); - const [response] = await client.listNodePools(request); + client.innerApiCalls.getJsonWebKeys = stubSimpleCall(expectedResponse); + const [response] = await client.getJSONWebKeys(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listNodePools as SinonStub + client.innerApiCalls.getJsonWebKeys as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listNodePools as SinonStub + client.innerApiCalls.getJsonWebKeys as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listNodePools without error using callback', async () => { + it('invokes getJSONWebKeys without error using callback', async () => { const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.container.v1beta1.ListNodePoolsRequest() + new protos.google.container.v1beta1.GetJSONWebKeysRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.container.v1beta1.ListNodePoolsRequest', + '.google.container.v1beta1.GetJSONWebKeysRequest', ['parent'] ); request.parent = defaultValue1; - const defaultValue2 = getTypeDefaultValue( - '.google.container.v1beta1.ListNodePoolsRequest', - ['projectId'] - ); - request.projectId = defaultValue2; - const defaultValue3 = getTypeDefaultValue( - '.google.container.v1beta1.ListNodePoolsRequest', - ['zone'] - ); - request.zone = defaultValue3; - const defaultValue4 = getTypeDefaultValue( - '.google.container.v1beta1.ListNodePoolsRequest', - ['clusterId'] - ); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.ListNodePoolsResponse() + new protos.google.container.v1beta1.GetJSONWebKeysResponse() ); - client.innerApiCalls.listNodePools = + client.innerApiCalls.getJsonWebKeys = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listNodePools( + client.getJSONWebKeys( request, ( err?: Error | null, - result?: protos.google.container.v1beta1.IListNodePoolsResponse | null + result?: protos.google.container.v1beta1.IGetJSONWebKeysResponse | null ) => { if (err) { reject(err); @@ -3533,62 +3503,68 @@ describe('v1beta1.ClusterManagerClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listNodePools as SinonStub + client.innerApiCalls.getJsonWebKeys as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listNodePools as SinonStub + client.innerApiCalls.getJsonWebKeys as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listNodePools with error', async () => { + it('invokes getJSONWebKeys with error', async () => { const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.container.v1beta1.ListNodePoolsRequest() + new protos.google.container.v1beta1.GetJSONWebKeysRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.container.v1beta1.ListNodePoolsRequest', + '.google.container.v1beta1.GetJSONWebKeysRequest', ['parent'] ); request.parent = defaultValue1; - const defaultValue2 = getTypeDefaultValue( - '.google.container.v1beta1.ListNodePoolsRequest', - ['projectId'] - ); - request.projectId = defaultValue2; - const defaultValue3 = getTypeDefaultValue( - '.google.container.v1beta1.ListNodePoolsRequest', - ['zone'] - ); - request.zone = defaultValue3; - const defaultValue4 = getTypeDefaultValue( - '.google.container.v1beta1.ListNodePoolsRequest', - ['clusterId'] - ); - request.clusterId = defaultValue4; - const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listNodePools = stubSimpleCall( + client.innerApiCalls.getJsonWebKeys = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listNodePools(request), expectedError); + await assert.rejects(client.getJSONWebKeys(request), expectedError); const actualRequest = ( - client.innerApiCalls.listNodePools as SinonStub + client.innerApiCalls.getJsonWebKeys as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listNodePools as SinonStub + client.innerApiCalls.getJsonWebKeys as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listNodePools with closed client', async () => { + it('invokes getJSONWebKeys with closed client', async () => { + const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.container.v1beta1.GetJSONWebKeysRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.container.v1beta1.GetJSONWebKeysRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getJSONWebKeys(request), expectedError); + }); + }); + + describe('listNodePools', () => { + it('invokes listNodePools without error', async () => { const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -3617,70 +3593,64 @@ describe('v1beta1.ClusterManagerClient', () => { ['clusterId'] ); request.clusterId = defaultValue4; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.listNodePools(request), expectedError); - }); - }); - - describe('getJSONWebKeys', () => { - it('invokes getJSONWebKeys without error', async () => { - const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.container.v1beta1.GetJSONWebKeysRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.container.v1beta1.GetJSONWebKeysRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.GetJSONWebKeysResponse() + new protos.google.container.v1beta1.ListNodePoolsResponse() ); - client.innerApiCalls.getJsonWebKeys = stubSimpleCall(expectedResponse); - const [response] = await client.getJSONWebKeys(request); + client.innerApiCalls.listNodePools = stubSimpleCall(expectedResponse); + const [response] = await client.listNodePools(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getJsonWebKeys as SinonStub + client.innerApiCalls.listNodePools as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getJsonWebKeys as SinonStub + client.innerApiCalls.listNodePools as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getJSONWebKeys without error using callback', async () => { + it('invokes listNodePools without error using callback', async () => { const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.container.v1beta1.GetJSONWebKeysRequest() + new protos.google.container.v1beta1.ListNodePoolsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.container.v1beta1.GetJSONWebKeysRequest', + '.google.container.v1beta1.ListNodePoolsRequest', ['parent'] ); request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const defaultValue2 = getTypeDefaultValue( + '.google.container.v1beta1.ListNodePoolsRequest', + ['projectId'] + ); + request.projectId = defaultValue2; + const defaultValue3 = getTypeDefaultValue( + '.google.container.v1beta1.ListNodePoolsRequest', + ['zone'] + ); + request.zone = defaultValue3; + const defaultValue4 = getTypeDefaultValue( + '.google.container.v1beta1.ListNodePoolsRequest', + ['clusterId'] + ); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; const expectedResponse = generateSampleMessage( - new protos.google.container.v1beta1.GetJSONWebKeysResponse() + new protos.google.container.v1beta1.ListNodePoolsResponse() ); - client.innerApiCalls.getJsonWebKeys = + client.innerApiCalls.listNodePools = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.getJSONWebKeys( + client.listNodePools( request, ( err?: Error | null, - result?: protos.google.container.v1beta1.IGetJSONWebKeysResponse | null + result?: protos.google.container.v1beta1.IListNodePoolsResponse | null ) => { if (err) { reject(err); @@ -3693,63 +3663,93 @@ describe('v1beta1.ClusterManagerClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getJsonWebKeys as SinonStub + client.innerApiCalls.listNodePools as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getJsonWebKeys as SinonStub + client.innerApiCalls.listNodePools as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getJSONWebKeys with error', async () => { + it('invokes listNodePools with error', async () => { const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.container.v1beta1.GetJSONWebKeysRequest() + new protos.google.container.v1beta1.ListNodePoolsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.container.v1beta1.GetJSONWebKeysRequest', + '.google.container.v1beta1.ListNodePoolsRequest', ['parent'] ); request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const defaultValue2 = getTypeDefaultValue( + '.google.container.v1beta1.ListNodePoolsRequest', + ['projectId'] + ); + request.projectId = defaultValue2; + const defaultValue3 = getTypeDefaultValue( + '.google.container.v1beta1.ListNodePoolsRequest', + ['zone'] + ); + request.zone = defaultValue3; + const defaultValue4 = getTypeDefaultValue( + '.google.container.v1beta1.ListNodePoolsRequest', + ['clusterId'] + ); + request.clusterId = defaultValue4; + const expectedHeaderRequestParams = `parent=${defaultValue1}&project_id=${defaultValue2}&zone=${defaultValue3}&cluster_id=${defaultValue4}`; const expectedError = new Error('expected'); - client.innerApiCalls.getJsonWebKeys = stubSimpleCall( + client.innerApiCalls.listNodePools = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.getJSONWebKeys(request), expectedError); + await assert.rejects(client.listNodePools(request), expectedError); const actualRequest = ( - client.innerApiCalls.getJsonWebKeys as SinonStub + client.innerApiCalls.listNodePools as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getJsonWebKeys as SinonStub + client.innerApiCalls.listNodePools as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getJSONWebKeys with closed client', async () => { + it('invokes listNodePools with closed client', async () => { const client = new clustermanagerModule.v1beta1.ClusterManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.container.v1beta1.GetJSONWebKeysRequest() + new protos.google.container.v1beta1.ListNodePoolsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.container.v1beta1.GetJSONWebKeysRequest', + '.google.container.v1beta1.ListNodePoolsRequest', ['parent'] ); request.parent = defaultValue1; + const defaultValue2 = getTypeDefaultValue( + '.google.container.v1beta1.ListNodePoolsRequest', + ['projectId'] + ); + request.projectId = defaultValue2; + const defaultValue3 = getTypeDefaultValue( + '.google.container.v1beta1.ListNodePoolsRequest', + ['zone'] + ); + request.zone = defaultValue3; + const defaultValue4 = getTypeDefaultValue( + '.google.container.v1beta1.ListNodePoolsRequest', + ['clusterId'] + ); + request.clusterId = defaultValue4; const expectedError = new Error('The client has already been closed.'); client.close(); - await assert.rejects(client.getJSONWebKeys(request), expectedError); + await assert.rejects(client.listNodePools(request), expectedError); }); }); From e2944f565b39ae151e11f938fb9dcbefd337880e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 21 Feb 2023 22:02:46 -0800 Subject: [PATCH 35/80] feat: add match service in aiplatform v1beta1 match_service.proto (#4002) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add match service in aiplatform v1beta1 match_service.proto PiperOrigin-RevId: 510525846 Source-Link: https://github.com/googleapis/googleapis/commit/972667feb1a4d14ccd12cf83024641b23808615f Source-Link: https://github.com/googleapis/googleapis-gen/commit/de94b6fa4e2d2eabdba855e0f6347aae68f5cd25 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6ImRlOTRiNmZhNGUyZDJlYWJkYmE4NTVlMGY2MzQ3YWFlNjhmNWNkMjUifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: Daniel Bankhead --- packages/google-cloud-aiplatform/README.md | 2 + .../aiplatform/v1beta1/match_service.proto | 176 + .../protos/protos.d.ts | 817 ++++ .../google-cloud-aiplatform/protos/protos.js | 1892 +++++++++ .../protos/protos.json | 160 + .../google-cloud-aiplatform/samples/README.md | 36 + ...t_metadata.google.cloud.aiplatform.v1.json | 2 +- .../v1beta1/match_service.find_neighbors.js | 83 + .../match_service.read_index_datapoints.js | 71 + ...adata.google.cloud.aiplatform.v1beta1.json | 102 +- .../v1beta1/dataset_service_proto_list.json | 1 + ...ment_resource_pool_service_proto_list.json | 1 + .../v1beta1/endpoint_service_proto_list.json | 1 + ...ore_online_serving_service_proto_list.json | 1 + .../featurestore_service_proto_list.json | 1 + .../src/v1beta1/gapic_metadata.json | 34 + .../src/v1beta1/index.ts | 1 + .../index_endpoint_service_proto_list.json | 1 + .../src/v1beta1/index_service_proto_list.json | 1 + .../src/v1beta1/job_service_proto_list.json | 1 + .../src/v1beta1/match_service_client.ts | 3252 +++++++++++++++ .../v1beta1/match_service_client_config.json | 34 + .../src/v1beta1/match_service_proto_list.json | 124 + .../v1beta1/metadata_service_proto_list.json | 1 + .../v1beta1/migration_service_proto_list.json | 1 + .../src/v1beta1/model_service_proto_list.json | 1 + .../v1beta1/pipeline_service_proto_list.json | 1 + .../prediction_service_proto_list.json | 1 + .../specialist_pool_service_proto_list.json | 1 + .../tensorboard_service_proto_list.json | 1 + .../v1beta1/vizier_service_proto_list.json | 1 + .../test/gapic_match_service_v1beta1.ts | 3692 +++++++++++++++++ 32 files changed, 10492 insertions(+), 2 deletions(-) create mode 100644 packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/match_service.proto create mode 100644 packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.find_neighbors.js create mode 100644 packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.read_index_datapoints.js create mode 100644 packages/google-cloud-aiplatform/src/v1beta1/match_service_client.ts create mode 100644 packages/google-cloud-aiplatform/src/v1beta1/match_service_client_config.json create mode 100644 packages/google-cloud-aiplatform/src/v1beta1/match_service_proto_list.json create mode 100644 packages/google-cloud-aiplatform/test/gapic_match_service_v1beta1.ts diff --git a/packages/google-cloud-aiplatform/README.md b/packages/google-cloud-aiplatform/README.md index 2864235ad9a..5f217c275cb 100644 --- a/packages/google-cloud-aiplatform/README.md +++ b/packages/google-cloud-aiplatform/README.md @@ -404,6 +404,8 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Job_service.resume_model_deployment_monitoring_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.resume_model_deployment_monitoring_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.resume_model_deployment_monitoring_job.js,samples/README.md) | | Job_service.search_model_deployment_monitoring_stats_anomalies | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.search_model_deployment_monitoring_stats_anomalies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.search_model_deployment_monitoring_stats_anomalies.js,samples/README.md) | | Job_service.update_model_deployment_monitoring_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.update_model_deployment_monitoring_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.update_model_deployment_monitoring_job.js,samples/README.md) | +| Match_service.find_neighbors | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.find_neighbors.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.find_neighbors.js,samples/README.md) | +| Match_service.read_index_datapoints | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.read_index_datapoints.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.read_index_datapoints.js,samples/README.md) | | Metadata_service.add_context_artifacts_and_executions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.add_context_artifacts_and_executions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.add_context_artifacts_and_executions.js,samples/README.md) | | Metadata_service.add_context_children | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.add_context_children.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.add_context_children.js,samples/README.md) | | Metadata_service.add_execution_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.add_execution_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.add_execution_events.js,samples/README.md) | diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/match_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/match_service.proto new file mode 100644 index 00000000000..07acb17b08f --- /dev/null +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/match_service.proto @@ -0,0 +1,176 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1beta1/index.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "MatchServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; + +// MatchService is a Google managed service for efficient vector similarity +// search at scale. +service MatchService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Finds the nearest neighbors of each vector within the request. + rpc FindNeighbors(FindNeighborsRequest) returns (FindNeighborsResponse) { + option (google.api.http) = { + post: "/v1beta1/{index_endpoint=projects/*/locations/*/indexEndpoints/*}:findNeighbors" + body: "*" + }; + } + + // Reads the datapoints/vectors of the given IDs. + // A maximum of 1000 datapoints can be retrieved in a batch. + rpc ReadIndexDatapoints(ReadIndexDatapointsRequest) + returns (ReadIndexDatapointsResponse) { + option (google.api.http) = { + post: "/v1beta1/{index_endpoint=projects/*/locations/*/indexEndpoints/*}:readIndexDatapoints" + body: "*" + }; + } +} + +// The request message for +// [MatchService.FindNeighbors][google.cloud.aiplatform.v1beta1.MatchService.FindNeighbors]. +message FindNeighborsRequest { + // A query to find a number of the nearest neighbors (most similar vectors) + // of a vector. + message Query { + // Required. The datapoint/vector whose nearest neighbors should be searched + // for. + IndexDatapoint datapoint = 1 [(google.api.field_behavior) = REQUIRED]; + + // The number of nearest neighbors to be retrieved from database for each + // query. If not set, will use the default from the service configuration + // (https://cloud.google.com/vertex-ai/docs/matching-engine/configuring-indexes#nearest-neighbor-search-config). + int32 neighbor_count = 2; + + // Crowding is a constraint on a neighbor list produced by nearest neighbor + // search requiring that no more than some value k' of the k neighbors + // returned have the same value of crowding_attribute. + // It's used for improving result diversity. + // This field is the maximum number of matches with the same crowding tag. + int32 per_crowding_attribute_neighbor_count = 3; + + // The number of neighbors to find via approximate search before + // exact reordering is performed. If not set, the default value from scam + // config is used; if set, this value must be > 0. + int32 approximate_neighbor_count = 4; + + // The fraction of the number of leaves to search, set at query time allows + // user to tune search performance. This value increase result in both + // search accuracy and latency increase. The value should be between 0.0 + // and 1.0. If not set or set to 0.0, query uses the default value specified + // in + // NearestNeighborSearchConfig.TreeAHConfig.fraction_leaf_nodes_to_search. + double fraction_leaf_nodes_to_search_override = 5; + } + + // Required. The name of the index endpoint. + // Format: + // `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` + string index_endpoint = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/IndexEndpoint" + } + ]; + + // The ID of the DeploydIndex that will serve the request. This request is + // sent to a specific IndexEndpoint, as per the IndexEndpoint.network. That + // IndexEndpoint also has IndexEndpoint.deployed_indexes, and each such index + // has a DeployedIndex.id field. + // The value of the field below must equal one of the DeployedIndex.id + // fields of the IndexEndpoint that is being called for this request. + string deployed_index_id = 2; + + // The list of queries. + repeated Query queries = 3; + + // If set to true, the full datapoints (including all vector values and + // restricts) of the nearest neighbors are returned. + // Note that returning full datapoint will significantly increase the + // latency and cost of the query. + bool return_full_datapoint = 4; +} + +// The response message for +// [MatchService.FindNeighbors][google.cloud.aiplatform.v1beta1.MatchService.FindNeighbors]. +message FindNeighborsResponse { + // A neighbor of the query vector. + message Neighbor { + // The datapoint of the neighbor. + // Note that full datapoints are returned only when "return_full_datapoint" + // is set to true. Otherwise, only the "datapoint_id" and "crowding_tag" + // fields are populated. + IndexDatapoint datapoint = 1; + + // The distance between the neighbor and the query vector. + double distance = 2; + } + + // Nearest neighbors for one query. + message NearestNeighbors { + // The ID of the query datapoint. + string id = 1; + + // All its neighbors. + repeated Neighbor neighbors = 2; + } + + // The nearest neighbors of the query datapoints. + repeated NearestNeighbors nearest_neighbors = 1; +} + +// The request message for +// [MatchService.ReadIndexDatapoints][google.cloud.aiplatform.v1beta1.MatchService.ReadIndexDatapoints]. +message ReadIndexDatapointsRequest { + // Required. The name of the index endpoint. + // Format: + // `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` + string index_endpoint = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/IndexEndpoint" + } + ]; + + // The ID of the DeploydIndex that will serve the request. + string deployed_index_id = 2; + + // IDs of the datapoints to be searched for. + repeated string ids = 3; +} + +// The response message for +// [MatchService.ReadIndexDatapoints][google.cloud.aiplatform.v1beta1.MatchService.ReadIndexDatapoints]. +message ReadIndexDatapointsResponse { + // The result list of datapoints. + repeated IndexDatapoint datapoints = 1; +} diff --git a/packages/google-cloud-aiplatform/protos/protos.d.ts b/packages/google-cloud-aiplatform/protos/protos.d.ts index 6bd2b72a98e..c10cea7b743 100644 --- a/packages/google-cloud-aiplatform/protos/protos.d.ts +++ b/packages/google-cloud-aiplatform/protos/protos.d.ts @@ -115294,6 +115294,823 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Represents a MatchService */ + class MatchService extends $protobuf.rpc.Service { + + /** + * Constructs a new MatchService 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 MatchService 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): MatchService; + + /** + * Calls FindNeighbors. + * @param request FindNeighborsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FindNeighborsResponse + */ + public findNeighbors(request: google.cloud.aiplatform.v1beta1.IFindNeighborsRequest, callback: google.cloud.aiplatform.v1beta1.MatchService.FindNeighborsCallback): void; + + /** + * Calls FindNeighbors. + * @param request FindNeighborsRequest message or plain object + * @returns Promise + */ + public findNeighbors(request: google.cloud.aiplatform.v1beta1.IFindNeighborsRequest): Promise; + + /** + * Calls ReadIndexDatapoints. + * @param request ReadIndexDatapointsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ReadIndexDatapointsResponse + */ + public readIndexDatapoints(request: google.cloud.aiplatform.v1beta1.IReadIndexDatapointsRequest, callback: google.cloud.aiplatform.v1beta1.MatchService.ReadIndexDatapointsCallback): void; + + /** + * Calls ReadIndexDatapoints. + * @param request ReadIndexDatapointsRequest message or plain object + * @returns Promise + */ + public readIndexDatapoints(request: google.cloud.aiplatform.v1beta1.IReadIndexDatapointsRequest): Promise; + } + + namespace MatchService { + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.MatchService|findNeighbors}. + * @param error Error, if any + * @param [response] FindNeighborsResponse + */ + type FindNeighborsCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1beta1.FindNeighborsResponse) => void; + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.MatchService|readIndexDatapoints}. + * @param error Error, if any + * @param [response] ReadIndexDatapointsResponse + */ + type ReadIndexDatapointsCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse) => void; + } + + /** Properties of a FindNeighborsRequest. */ + interface IFindNeighborsRequest { + + /** FindNeighborsRequest indexEndpoint */ + indexEndpoint?: (string|null); + + /** FindNeighborsRequest deployedIndexId */ + deployedIndexId?: (string|null); + + /** FindNeighborsRequest queries */ + queries?: (google.cloud.aiplatform.v1beta1.FindNeighborsRequest.IQuery[]|null); + + /** FindNeighborsRequest returnFullDatapoint */ + returnFullDatapoint?: (boolean|null); + } + + /** Represents a FindNeighborsRequest. */ + class FindNeighborsRequest implements IFindNeighborsRequest { + + /** + * Constructs a new FindNeighborsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IFindNeighborsRequest); + + /** FindNeighborsRequest indexEndpoint. */ + public indexEndpoint: string; + + /** FindNeighborsRequest deployedIndexId. */ + public deployedIndexId: string; + + /** FindNeighborsRequest queries. */ + public queries: google.cloud.aiplatform.v1beta1.FindNeighborsRequest.IQuery[]; + + /** FindNeighborsRequest returnFullDatapoint. */ + public returnFullDatapoint: boolean; + + /** + * Creates a new FindNeighborsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FindNeighborsRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IFindNeighborsRequest): google.cloud.aiplatform.v1beta1.FindNeighborsRequest; + + /** + * Encodes the specified FindNeighborsRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FindNeighborsRequest.verify|verify} messages. + * @param message FindNeighborsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IFindNeighborsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FindNeighborsRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FindNeighborsRequest.verify|verify} messages. + * @param message FindNeighborsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IFindNeighborsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FindNeighborsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FindNeighborsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.FindNeighborsRequest; + + /** + * Decodes a FindNeighborsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FindNeighborsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.FindNeighborsRequest; + + /** + * Verifies a FindNeighborsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FindNeighborsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FindNeighborsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.FindNeighborsRequest; + + /** + * Creates a plain object from a FindNeighborsRequest message. Also converts values to other types if specified. + * @param message FindNeighborsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.FindNeighborsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FindNeighborsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FindNeighborsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FindNeighborsRequest { + + /** Properties of a Query. */ + interface IQuery { + + /** Query datapoint */ + datapoint?: (google.cloud.aiplatform.v1beta1.IIndexDatapoint|null); + + /** Query neighborCount */ + neighborCount?: (number|null); + + /** Query perCrowdingAttributeNeighborCount */ + perCrowdingAttributeNeighborCount?: (number|null); + + /** Query approximateNeighborCount */ + approximateNeighborCount?: (number|null); + + /** Query fractionLeafNodesToSearchOverride */ + fractionLeafNodesToSearchOverride?: (number|null); + } + + /** Represents a Query. */ + class Query implements IQuery { + + /** + * Constructs a new Query. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.FindNeighborsRequest.IQuery); + + /** Query datapoint. */ + public datapoint?: (google.cloud.aiplatform.v1beta1.IIndexDatapoint|null); + + /** Query neighborCount. */ + public neighborCount: number; + + /** Query perCrowdingAttributeNeighborCount. */ + public perCrowdingAttributeNeighborCount: number; + + /** Query approximateNeighborCount. */ + public approximateNeighborCount: number; + + /** Query fractionLeafNodesToSearchOverride. */ + public fractionLeafNodesToSearchOverride: number; + + /** + * Creates a new Query instance using the specified properties. + * @param [properties] Properties to set + * @returns Query instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.FindNeighborsRequest.IQuery): google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query; + + /** + * Encodes the specified Query message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query.verify|verify} messages. + * @param message Query message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.FindNeighborsRequest.IQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Query message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query.verify|verify} messages. + * @param message Query message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.FindNeighborsRequest.IQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Query message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Query + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query; + + /** + * Decodes a Query message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Query + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query; + + /** + * Verifies a Query message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Query message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Query + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query; + + /** + * Creates a plain object from a Query message. Also converts values to other types if specified. + * @param message Query + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Query to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Query + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a FindNeighborsResponse. */ + interface IFindNeighborsResponse { + + /** FindNeighborsResponse nearestNeighbors */ + nearestNeighbors?: (google.cloud.aiplatform.v1beta1.FindNeighborsResponse.INearestNeighbors[]|null); + } + + /** Represents a FindNeighborsResponse. */ + class FindNeighborsResponse implements IFindNeighborsResponse { + + /** + * Constructs a new FindNeighborsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IFindNeighborsResponse); + + /** FindNeighborsResponse nearestNeighbors. */ + public nearestNeighbors: google.cloud.aiplatform.v1beta1.FindNeighborsResponse.INearestNeighbors[]; + + /** + * Creates a new FindNeighborsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FindNeighborsResponse instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IFindNeighborsResponse): google.cloud.aiplatform.v1beta1.FindNeighborsResponse; + + /** + * Encodes the specified FindNeighborsResponse message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FindNeighborsResponse.verify|verify} messages. + * @param message FindNeighborsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IFindNeighborsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FindNeighborsResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FindNeighborsResponse.verify|verify} messages. + * @param message FindNeighborsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IFindNeighborsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FindNeighborsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FindNeighborsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.FindNeighborsResponse; + + /** + * Decodes a FindNeighborsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FindNeighborsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.FindNeighborsResponse; + + /** + * Verifies a FindNeighborsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FindNeighborsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FindNeighborsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.FindNeighborsResponse; + + /** + * Creates a plain object from a FindNeighborsResponse message. Also converts values to other types if specified. + * @param message FindNeighborsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.FindNeighborsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FindNeighborsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FindNeighborsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FindNeighborsResponse { + + /** Properties of a Neighbor. */ + interface INeighbor { + + /** Neighbor datapoint */ + datapoint?: (google.cloud.aiplatform.v1beta1.IIndexDatapoint|null); + + /** Neighbor distance */ + distance?: (number|null); + } + + /** Represents a Neighbor. */ + class Neighbor implements INeighbor { + + /** + * Constructs a new Neighbor. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.FindNeighborsResponse.INeighbor); + + /** Neighbor datapoint. */ + public datapoint?: (google.cloud.aiplatform.v1beta1.IIndexDatapoint|null); + + /** Neighbor distance. */ + public distance: number; + + /** + * Creates a new Neighbor instance using the specified properties. + * @param [properties] Properties to set + * @returns Neighbor instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.FindNeighborsResponse.INeighbor): google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor; + + /** + * Encodes the specified Neighbor message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor.verify|verify} messages. + * @param message Neighbor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.FindNeighborsResponse.INeighbor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Neighbor message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor.verify|verify} messages. + * @param message Neighbor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.FindNeighborsResponse.INeighbor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Neighbor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Neighbor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor; + + /** + * Decodes a Neighbor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Neighbor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor; + + /** + * Verifies a Neighbor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Neighbor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Neighbor + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor; + + /** + * Creates a plain object from a Neighbor message. Also converts values to other types if specified. + * @param message Neighbor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Neighbor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Neighbor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NearestNeighbors. */ + interface INearestNeighbors { + + /** NearestNeighbors id */ + id?: (string|null); + + /** NearestNeighbors neighbors */ + neighbors?: (google.cloud.aiplatform.v1beta1.FindNeighborsResponse.INeighbor[]|null); + } + + /** Represents a NearestNeighbors. */ + class NearestNeighbors implements INearestNeighbors { + + /** + * Constructs a new NearestNeighbors. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.FindNeighborsResponse.INearestNeighbors); + + /** NearestNeighbors id. */ + public id: string; + + /** NearestNeighbors neighbors. */ + public neighbors: google.cloud.aiplatform.v1beta1.FindNeighborsResponse.INeighbor[]; + + /** + * Creates a new NearestNeighbors instance using the specified properties. + * @param [properties] Properties to set + * @returns NearestNeighbors instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.FindNeighborsResponse.INearestNeighbors): google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors; + + /** + * Encodes the specified NearestNeighbors message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors.verify|verify} messages. + * @param message NearestNeighbors message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.FindNeighborsResponse.INearestNeighbors, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NearestNeighbors message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors.verify|verify} messages. + * @param message NearestNeighbors message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.FindNeighborsResponse.INearestNeighbors, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NearestNeighbors message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NearestNeighbors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors; + + /** + * Decodes a NearestNeighbors message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NearestNeighbors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors; + + /** + * Verifies a NearestNeighbors message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NearestNeighbors message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NearestNeighbors + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors; + + /** + * Creates a plain object from a NearestNeighbors message. Also converts values to other types if specified. + * @param message NearestNeighbors + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NearestNeighbors to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NearestNeighbors + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ReadIndexDatapointsRequest. */ + interface IReadIndexDatapointsRequest { + + /** ReadIndexDatapointsRequest indexEndpoint */ + indexEndpoint?: (string|null); + + /** ReadIndexDatapointsRequest deployedIndexId */ + deployedIndexId?: (string|null); + + /** ReadIndexDatapointsRequest ids */ + ids?: (string[]|null); + } + + /** Represents a ReadIndexDatapointsRequest. */ + class ReadIndexDatapointsRequest implements IReadIndexDatapointsRequest { + + /** + * Constructs a new ReadIndexDatapointsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IReadIndexDatapointsRequest); + + /** ReadIndexDatapointsRequest indexEndpoint. */ + public indexEndpoint: string; + + /** ReadIndexDatapointsRequest deployedIndexId. */ + public deployedIndexId: string; + + /** ReadIndexDatapointsRequest ids. */ + public ids: string[]; + + /** + * Creates a new ReadIndexDatapointsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ReadIndexDatapointsRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IReadIndexDatapointsRequest): google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest; + + /** + * Encodes the specified ReadIndexDatapointsRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest.verify|verify} messages. + * @param message ReadIndexDatapointsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IReadIndexDatapointsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReadIndexDatapointsRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest.verify|verify} messages. + * @param message ReadIndexDatapointsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IReadIndexDatapointsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReadIndexDatapointsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReadIndexDatapointsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest; + + /** + * Decodes a ReadIndexDatapointsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReadIndexDatapointsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest; + + /** + * Verifies a ReadIndexDatapointsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReadIndexDatapointsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReadIndexDatapointsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest; + + /** + * Creates a plain object from a ReadIndexDatapointsRequest message. Also converts values to other types if specified. + * @param message ReadIndexDatapointsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReadIndexDatapointsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReadIndexDatapointsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReadIndexDatapointsResponse. */ + interface IReadIndexDatapointsResponse { + + /** ReadIndexDatapointsResponse datapoints */ + datapoints?: (google.cloud.aiplatform.v1beta1.IIndexDatapoint[]|null); + } + + /** Represents a ReadIndexDatapointsResponse. */ + class ReadIndexDatapointsResponse implements IReadIndexDatapointsResponse { + + /** + * Constructs a new ReadIndexDatapointsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IReadIndexDatapointsResponse); + + /** ReadIndexDatapointsResponse datapoints. */ + public datapoints: google.cloud.aiplatform.v1beta1.IIndexDatapoint[]; + + /** + * Creates a new ReadIndexDatapointsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ReadIndexDatapointsResponse instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IReadIndexDatapointsResponse): google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse; + + /** + * Encodes the specified ReadIndexDatapointsResponse message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse.verify|verify} messages. + * @param message ReadIndexDatapointsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IReadIndexDatapointsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReadIndexDatapointsResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse.verify|verify} messages. + * @param message ReadIndexDatapointsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IReadIndexDatapointsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReadIndexDatapointsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReadIndexDatapointsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse; + + /** + * Decodes a ReadIndexDatapointsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReadIndexDatapointsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse; + + /** + * Verifies a ReadIndexDatapointsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReadIndexDatapointsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReadIndexDatapointsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse; + + /** + * Creates a plain object from a ReadIndexDatapointsResponse message. Also converts values to other types if specified. + * @param message ReadIndexDatapointsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReadIndexDatapointsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReadIndexDatapointsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a MetadataSchema. */ interface IMetadataSchema { diff --git a/packages/google-cloud-aiplatform/protos/protos.js b/packages/google-cloud-aiplatform/protos/protos.js index 9415e413fd4..8ee8e8c7dd2 100644 --- a/packages/google-cloud-aiplatform/protos/protos.js +++ b/packages/google-cloud-aiplatform/protos/protos.js @@ -279857,6 +279857,1898 @@ return LineageSubgraph; })(); + v1beta1.MatchService = (function() { + + /** + * Constructs a new MatchService service. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a MatchService + * @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 MatchService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (MatchService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MatchService; + + /** + * Creates new MatchService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.MatchService + * @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 {MatchService} RPC service. Useful where requests and/or responses are streamed. + */ + MatchService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.MatchService|findNeighbors}. + * @memberof google.cloud.aiplatform.v1beta1.MatchService + * @typedef FindNeighborsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.aiplatform.v1beta1.FindNeighborsResponse} [response] FindNeighborsResponse + */ + + /** + * Calls FindNeighbors. + * @function findNeighbors + * @memberof google.cloud.aiplatform.v1beta1.MatchService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IFindNeighborsRequest} request FindNeighborsRequest message or plain object + * @param {google.cloud.aiplatform.v1beta1.MatchService.FindNeighborsCallback} callback Node-style callback called with the error, if any, and FindNeighborsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MatchService.prototype.findNeighbors = function findNeighbors(request, callback) { + return this.rpcCall(findNeighbors, $root.google.cloud.aiplatform.v1beta1.FindNeighborsRequest, $root.google.cloud.aiplatform.v1beta1.FindNeighborsResponse, request, callback); + }, "name", { value: "FindNeighbors" }); + + /** + * Calls FindNeighbors. + * @function findNeighbors + * @memberof google.cloud.aiplatform.v1beta1.MatchService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IFindNeighborsRequest} request FindNeighborsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.MatchService|readIndexDatapoints}. + * @memberof google.cloud.aiplatform.v1beta1.MatchService + * @typedef ReadIndexDatapointsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse} [response] ReadIndexDatapointsResponse + */ + + /** + * Calls ReadIndexDatapoints. + * @function readIndexDatapoints + * @memberof google.cloud.aiplatform.v1beta1.MatchService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IReadIndexDatapointsRequest} request ReadIndexDatapointsRequest message or plain object + * @param {google.cloud.aiplatform.v1beta1.MatchService.ReadIndexDatapointsCallback} callback Node-style callback called with the error, if any, and ReadIndexDatapointsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MatchService.prototype.readIndexDatapoints = function readIndexDatapoints(request, callback) { + return this.rpcCall(readIndexDatapoints, $root.google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest, $root.google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse, request, callback); + }, "name", { value: "ReadIndexDatapoints" }); + + /** + * Calls ReadIndexDatapoints. + * @function readIndexDatapoints + * @memberof google.cloud.aiplatform.v1beta1.MatchService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IReadIndexDatapointsRequest} request ReadIndexDatapointsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return MatchService; + })(); + + v1beta1.FindNeighborsRequest = (function() { + + /** + * Properties of a FindNeighborsRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IFindNeighborsRequest + * @property {string|null} [indexEndpoint] FindNeighborsRequest indexEndpoint + * @property {string|null} [deployedIndexId] FindNeighborsRequest deployedIndexId + * @property {Array.|null} [queries] FindNeighborsRequest queries + * @property {boolean|null} [returnFullDatapoint] FindNeighborsRequest returnFullDatapoint + */ + + /** + * Constructs a new FindNeighborsRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a FindNeighborsRequest. + * @implements IFindNeighborsRequest + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IFindNeighborsRequest=} [properties] Properties to set + */ + function FindNeighborsRequest(properties) { + this.queries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FindNeighborsRequest indexEndpoint. + * @member {string} indexEndpoint + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest + * @instance + */ + FindNeighborsRequest.prototype.indexEndpoint = ""; + + /** + * FindNeighborsRequest deployedIndexId. + * @member {string} deployedIndexId + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest + * @instance + */ + FindNeighborsRequest.prototype.deployedIndexId = ""; + + /** + * FindNeighborsRequest queries. + * @member {Array.} queries + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest + * @instance + */ + FindNeighborsRequest.prototype.queries = $util.emptyArray; + + /** + * FindNeighborsRequest returnFullDatapoint. + * @member {boolean} returnFullDatapoint + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest + * @instance + */ + FindNeighborsRequest.prototype.returnFullDatapoint = false; + + /** + * Creates a new FindNeighborsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IFindNeighborsRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.FindNeighborsRequest} FindNeighborsRequest instance + */ + FindNeighborsRequest.create = function create(properties) { + return new FindNeighborsRequest(properties); + }; + + /** + * Encodes the specified FindNeighborsRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FindNeighborsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IFindNeighborsRequest} message FindNeighborsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FindNeighborsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.indexEndpoint != null && Object.hasOwnProperty.call(message, "indexEndpoint")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.indexEndpoint); + if (message.deployedIndexId != null && Object.hasOwnProperty.call(message, "deployedIndexId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.deployedIndexId); + if (message.queries != null && message.queries.length) + for (var i = 0; i < message.queries.length; ++i) + $root.google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query.encode(message.queries[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.returnFullDatapoint != null && Object.hasOwnProperty.call(message, "returnFullDatapoint")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.returnFullDatapoint); + return writer; + }; + + /** + * Encodes the specified FindNeighborsRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FindNeighborsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IFindNeighborsRequest} message FindNeighborsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FindNeighborsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FindNeighborsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.FindNeighborsRequest} FindNeighborsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FindNeighborsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.FindNeighborsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.indexEndpoint = reader.string(); + break; + } + case 2: { + message.deployedIndexId = reader.string(); + break; + } + case 3: { + if (!(message.queries && message.queries.length)) + message.queries = []; + message.queries.push($root.google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query.decode(reader, reader.uint32())); + break; + } + case 4: { + message.returnFullDatapoint = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FindNeighborsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.FindNeighborsRequest} FindNeighborsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FindNeighborsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FindNeighborsRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FindNeighborsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.indexEndpoint != null && message.hasOwnProperty("indexEndpoint")) + if (!$util.isString(message.indexEndpoint)) + return "indexEndpoint: string expected"; + if (message.deployedIndexId != null && message.hasOwnProperty("deployedIndexId")) + if (!$util.isString(message.deployedIndexId)) + return "deployedIndexId: string expected"; + if (message.queries != null && message.hasOwnProperty("queries")) { + if (!Array.isArray(message.queries)) + return "queries: array expected"; + for (var i = 0; i < message.queries.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query.verify(message.queries[i]); + if (error) + return "queries." + error; + } + } + if (message.returnFullDatapoint != null && message.hasOwnProperty("returnFullDatapoint")) + if (typeof message.returnFullDatapoint !== "boolean") + return "returnFullDatapoint: boolean expected"; + return null; + }; + + /** + * Creates a FindNeighborsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.FindNeighborsRequest} FindNeighborsRequest + */ + FindNeighborsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.FindNeighborsRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.FindNeighborsRequest(); + if (object.indexEndpoint != null) + message.indexEndpoint = String(object.indexEndpoint); + if (object.deployedIndexId != null) + message.deployedIndexId = String(object.deployedIndexId); + if (object.queries) { + if (!Array.isArray(object.queries)) + throw TypeError(".google.cloud.aiplatform.v1beta1.FindNeighborsRequest.queries: array expected"); + message.queries = []; + for (var i = 0; i < object.queries.length; ++i) { + if (typeof object.queries[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.FindNeighborsRequest.queries: object expected"); + message.queries[i] = $root.google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query.fromObject(object.queries[i]); + } + } + if (object.returnFullDatapoint != null) + message.returnFullDatapoint = Boolean(object.returnFullDatapoint); + return message; + }; + + /** + * Creates a plain object from a FindNeighborsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.FindNeighborsRequest} message FindNeighborsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FindNeighborsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.queries = []; + if (options.defaults) { + object.indexEndpoint = ""; + object.deployedIndexId = ""; + object.returnFullDatapoint = false; + } + if (message.indexEndpoint != null && message.hasOwnProperty("indexEndpoint")) + object.indexEndpoint = message.indexEndpoint; + if (message.deployedIndexId != null && message.hasOwnProperty("deployedIndexId")) + object.deployedIndexId = message.deployedIndexId; + if (message.queries && message.queries.length) { + object.queries = []; + for (var j = 0; j < message.queries.length; ++j) + object.queries[j] = $root.google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query.toObject(message.queries[j], options); + } + if (message.returnFullDatapoint != null && message.hasOwnProperty("returnFullDatapoint")) + object.returnFullDatapoint = message.returnFullDatapoint; + return object; + }; + + /** + * Converts this FindNeighborsRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest + * @instance + * @returns {Object.} JSON object + */ + FindNeighborsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FindNeighborsRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FindNeighborsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.FindNeighborsRequest"; + }; + + FindNeighborsRequest.Query = (function() { + + /** + * Properties of a Query. + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest + * @interface IQuery + * @property {google.cloud.aiplatform.v1beta1.IIndexDatapoint|null} [datapoint] Query datapoint + * @property {number|null} [neighborCount] Query neighborCount + * @property {number|null} [perCrowdingAttributeNeighborCount] Query perCrowdingAttributeNeighborCount + * @property {number|null} [approximateNeighborCount] Query approximateNeighborCount + * @property {number|null} [fractionLeafNodesToSearchOverride] Query fractionLeafNodesToSearchOverride + */ + + /** + * Constructs a new Query. + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest + * @classdesc Represents a Query. + * @implements IQuery + * @constructor + * @param {google.cloud.aiplatform.v1beta1.FindNeighborsRequest.IQuery=} [properties] Properties to set + */ + function Query(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Query datapoint. + * @member {google.cloud.aiplatform.v1beta1.IIndexDatapoint|null|undefined} datapoint + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query + * @instance + */ + Query.prototype.datapoint = null; + + /** + * Query neighborCount. + * @member {number} neighborCount + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query + * @instance + */ + Query.prototype.neighborCount = 0; + + /** + * Query perCrowdingAttributeNeighborCount. + * @member {number} perCrowdingAttributeNeighborCount + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query + * @instance + */ + Query.prototype.perCrowdingAttributeNeighborCount = 0; + + /** + * Query approximateNeighborCount. + * @member {number} approximateNeighborCount + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query + * @instance + */ + Query.prototype.approximateNeighborCount = 0; + + /** + * Query fractionLeafNodesToSearchOverride. + * @member {number} fractionLeafNodesToSearchOverride + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query + * @instance + */ + Query.prototype.fractionLeafNodesToSearchOverride = 0; + + /** + * Creates a new Query instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query + * @static + * @param {google.cloud.aiplatform.v1beta1.FindNeighborsRequest.IQuery=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query} Query instance + */ + Query.create = function create(properties) { + return new Query(properties); + }; + + /** + * Encodes the specified Query message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query + * @static + * @param {google.cloud.aiplatform.v1beta1.FindNeighborsRequest.IQuery} message Query message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Query.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.datapoint != null && Object.hasOwnProperty.call(message, "datapoint")) + $root.google.cloud.aiplatform.v1beta1.IndexDatapoint.encode(message.datapoint, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.neighborCount != null && Object.hasOwnProperty.call(message, "neighborCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.neighborCount); + if (message.perCrowdingAttributeNeighborCount != null && Object.hasOwnProperty.call(message, "perCrowdingAttributeNeighborCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.perCrowdingAttributeNeighborCount); + if (message.approximateNeighborCount != null && Object.hasOwnProperty.call(message, "approximateNeighborCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.approximateNeighborCount); + if (message.fractionLeafNodesToSearchOverride != null && Object.hasOwnProperty.call(message, "fractionLeafNodesToSearchOverride")) + writer.uint32(/* id 5, wireType 1 =*/41).double(message.fractionLeafNodesToSearchOverride); + return writer; + }; + + /** + * Encodes the specified Query message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query + * @static + * @param {google.cloud.aiplatform.v1beta1.FindNeighborsRequest.IQuery} message Query message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Query.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Query message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query} Query + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Query.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.datapoint = $root.google.cloud.aiplatform.v1beta1.IndexDatapoint.decode(reader, reader.uint32()); + break; + } + case 2: { + message.neighborCount = reader.int32(); + break; + } + case 3: { + message.perCrowdingAttributeNeighborCount = reader.int32(); + break; + } + case 4: { + message.approximateNeighborCount = reader.int32(); + break; + } + case 5: { + message.fractionLeafNodesToSearchOverride = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Query message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query} Query + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Query.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Query message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Query.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.datapoint != null && message.hasOwnProperty("datapoint")) { + var error = $root.google.cloud.aiplatform.v1beta1.IndexDatapoint.verify(message.datapoint); + if (error) + return "datapoint." + error; + } + if (message.neighborCount != null && message.hasOwnProperty("neighborCount")) + if (!$util.isInteger(message.neighborCount)) + return "neighborCount: integer expected"; + if (message.perCrowdingAttributeNeighborCount != null && message.hasOwnProperty("perCrowdingAttributeNeighborCount")) + if (!$util.isInteger(message.perCrowdingAttributeNeighborCount)) + return "perCrowdingAttributeNeighborCount: integer expected"; + if (message.approximateNeighborCount != null && message.hasOwnProperty("approximateNeighborCount")) + if (!$util.isInteger(message.approximateNeighborCount)) + return "approximateNeighborCount: integer expected"; + if (message.fractionLeafNodesToSearchOverride != null && message.hasOwnProperty("fractionLeafNodesToSearchOverride")) + if (typeof message.fractionLeafNodesToSearchOverride !== "number") + return "fractionLeafNodesToSearchOverride: number expected"; + return null; + }; + + /** + * Creates a Query message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query} Query + */ + Query.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query(); + if (object.datapoint != null) { + if (typeof object.datapoint !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query.datapoint: object expected"); + message.datapoint = $root.google.cloud.aiplatform.v1beta1.IndexDatapoint.fromObject(object.datapoint); + } + if (object.neighborCount != null) + message.neighborCount = object.neighborCount | 0; + if (object.perCrowdingAttributeNeighborCount != null) + message.perCrowdingAttributeNeighborCount = object.perCrowdingAttributeNeighborCount | 0; + if (object.approximateNeighborCount != null) + message.approximateNeighborCount = object.approximateNeighborCount | 0; + if (object.fractionLeafNodesToSearchOverride != null) + message.fractionLeafNodesToSearchOverride = Number(object.fractionLeafNodesToSearchOverride); + return message; + }; + + /** + * Creates a plain object from a Query message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query + * @static + * @param {google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query} message Query + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Query.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.datapoint = null; + object.neighborCount = 0; + object.perCrowdingAttributeNeighborCount = 0; + object.approximateNeighborCount = 0; + object.fractionLeafNodesToSearchOverride = 0; + } + if (message.datapoint != null && message.hasOwnProperty("datapoint")) + object.datapoint = $root.google.cloud.aiplatform.v1beta1.IndexDatapoint.toObject(message.datapoint, options); + if (message.neighborCount != null && message.hasOwnProperty("neighborCount")) + object.neighborCount = message.neighborCount; + if (message.perCrowdingAttributeNeighborCount != null && message.hasOwnProperty("perCrowdingAttributeNeighborCount")) + object.perCrowdingAttributeNeighborCount = message.perCrowdingAttributeNeighborCount; + if (message.approximateNeighborCount != null && message.hasOwnProperty("approximateNeighborCount")) + object.approximateNeighborCount = message.approximateNeighborCount; + if (message.fractionLeafNodesToSearchOverride != null && message.hasOwnProperty("fractionLeafNodesToSearchOverride")) + object.fractionLeafNodesToSearchOverride = options.json && !isFinite(message.fractionLeafNodesToSearchOverride) ? String(message.fractionLeafNodesToSearchOverride) : message.fractionLeafNodesToSearchOverride; + return object; + }; + + /** + * Converts this Query to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query + * @instance + * @returns {Object.} JSON object + */ + Query.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Query + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Query.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query"; + }; + + return Query; + })(); + + return FindNeighborsRequest; + })(); + + v1beta1.FindNeighborsResponse = (function() { + + /** + * Properties of a FindNeighborsResponse. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IFindNeighborsResponse + * @property {Array.|null} [nearestNeighbors] FindNeighborsResponse nearestNeighbors + */ + + /** + * Constructs a new FindNeighborsResponse. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a FindNeighborsResponse. + * @implements IFindNeighborsResponse + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IFindNeighborsResponse=} [properties] Properties to set + */ + function FindNeighborsResponse(properties) { + this.nearestNeighbors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FindNeighborsResponse nearestNeighbors. + * @member {Array.} nearestNeighbors + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse + * @instance + */ + FindNeighborsResponse.prototype.nearestNeighbors = $util.emptyArray; + + /** + * Creates a new FindNeighborsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IFindNeighborsResponse=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.FindNeighborsResponse} FindNeighborsResponse instance + */ + FindNeighborsResponse.create = function create(properties) { + return new FindNeighborsResponse(properties); + }; + + /** + * Encodes the specified FindNeighborsResponse message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FindNeighborsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IFindNeighborsResponse} message FindNeighborsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FindNeighborsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nearestNeighbors != null && message.nearestNeighbors.length) + for (var i = 0; i < message.nearestNeighbors.length; ++i) + $root.google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors.encode(message.nearestNeighbors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FindNeighborsResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FindNeighborsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IFindNeighborsResponse} message FindNeighborsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FindNeighborsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FindNeighborsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.FindNeighborsResponse} FindNeighborsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FindNeighborsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.FindNeighborsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.nearestNeighbors && message.nearestNeighbors.length)) + message.nearestNeighbors = []; + message.nearestNeighbors.push($root.google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FindNeighborsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.FindNeighborsResponse} FindNeighborsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FindNeighborsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FindNeighborsResponse message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FindNeighborsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.nearestNeighbors != null && message.hasOwnProperty("nearestNeighbors")) { + if (!Array.isArray(message.nearestNeighbors)) + return "nearestNeighbors: array expected"; + for (var i = 0; i < message.nearestNeighbors.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors.verify(message.nearestNeighbors[i]); + if (error) + return "nearestNeighbors." + error; + } + } + return null; + }; + + /** + * Creates a FindNeighborsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.FindNeighborsResponse} FindNeighborsResponse + */ + FindNeighborsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.FindNeighborsResponse) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.FindNeighborsResponse(); + if (object.nearestNeighbors) { + if (!Array.isArray(object.nearestNeighbors)) + throw TypeError(".google.cloud.aiplatform.v1beta1.FindNeighborsResponse.nearestNeighbors: array expected"); + message.nearestNeighbors = []; + for (var i = 0; i < object.nearestNeighbors.length; ++i) { + if (typeof object.nearestNeighbors[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.FindNeighborsResponse.nearestNeighbors: object expected"); + message.nearestNeighbors[i] = $root.google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors.fromObject(object.nearestNeighbors[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FindNeighborsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.FindNeighborsResponse} message FindNeighborsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FindNeighborsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.nearestNeighbors = []; + if (message.nearestNeighbors && message.nearestNeighbors.length) { + object.nearestNeighbors = []; + for (var j = 0; j < message.nearestNeighbors.length; ++j) + object.nearestNeighbors[j] = $root.google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors.toObject(message.nearestNeighbors[j], options); + } + return object; + }; + + /** + * Converts this FindNeighborsResponse to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse + * @instance + * @returns {Object.} JSON object + */ + FindNeighborsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FindNeighborsResponse + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FindNeighborsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.FindNeighborsResponse"; + }; + + FindNeighborsResponse.Neighbor = (function() { + + /** + * Properties of a Neighbor. + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse + * @interface INeighbor + * @property {google.cloud.aiplatform.v1beta1.IIndexDatapoint|null} [datapoint] Neighbor datapoint + * @property {number|null} [distance] Neighbor distance + */ + + /** + * Constructs a new Neighbor. + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse + * @classdesc Represents a Neighbor. + * @implements INeighbor + * @constructor + * @param {google.cloud.aiplatform.v1beta1.FindNeighborsResponse.INeighbor=} [properties] Properties to set + */ + function Neighbor(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Neighbor datapoint. + * @member {google.cloud.aiplatform.v1beta1.IIndexDatapoint|null|undefined} datapoint + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor + * @instance + */ + Neighbor.prototype.datapoint = null; + + /** + * Neighbor distance. + * @member {number} distance + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor + * @instance + */ + Neighbor.prototype.distance = 0; + + /** + * Creates a new Neighbor instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor + * @static + * @param {google.cloud.aiplatform.v1beta1.FindNeighborsResponse.INeighbor=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor} Neighbor instance + */ + Neighbor.create = function create(properties) { + return new Neighbor(properties); + }; + + /** + * Encodes the specified Neighbor message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor + * @static + * @param {google.cloud.aiplatform.v1beta1.FindNeighborsResponse.INeighbor} message Neighbor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Neighbor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.datapoint != null && Object.hasOwnProperty.call(message, "datapoint")) + $root.google.cloud.aiplatform.v1beta1.IndexDatapoint.encode(message.datapoint, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.distance != null && Object.hasOwnProperty.call(message, "distance")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.distance); + return writer; + }; + + /** + * Encodes the specified Neighbor message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor + * @static + * @param {google.cloud.aiplatform.v1beta1.FindNeighborsResponse.INeighbor} message Neighbor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Neighbor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Neighbor message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor} Neighbor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Neighbor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.datapoint = $root.google.cloud.aiplatform.v1beta1.IndexDatapoint.decode(reader, reader.uint32()); + break; + } + case 2: { + message.distance = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Neighbor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor} Neighbor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Neighbor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Neighbor message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Neighbor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.datapoint != null && message.hasOwnProperty("datapoint")) { + var error = $root.google.cloud.aiplatform.v1beta1.IndexDatapoint.verify(message.datapoint); + if (error) + return "datapoint." + error; + } + if (message.distance != null && message.hasOwnProperty("distance")) + if (typeof message.distance !== "number") + return "distance: number expected"; + return null; + }; + + /** + * Creates a Neighbor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor} Neighbor + */ + Neighbor.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor(); + if (object.datapoint != null) { + if (typeof object.datapoint !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor.datapoint: object expected"); + message.datapoint = $root.google.cloud.aiplatform.v1beta1.IndexDatapoint.fromObject(object.datapoint); + } + if (object.distance != null) + message.distance = Number(object.distance); + return message; + }; + + /** + * Creates a plain object from a Neighbor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor + * @static + * @param {google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor} message Neighbor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Neighbor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.datapoint = null; + object.distance = 0; + } + if (message.datapoint != null && message.hasOwnProperty("datapoint")) + object.datapoint = $root.google.cloud.aiplatform.v1beta1.IndexDatapoint.toObject(message.datapoint, options); + if (message.distance != null && message.hasOwnProperty("distance")) + object.distance = options.json && !isFinite(message.distance) ? String(message.distance) : message.distance; + return object; + }; + + /** + * Converts this Neighbor to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor + * @instance + * @returns {Object.} JSON object + */ + Neighbor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Neighbor + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Neighbor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor"; + }; + + return Neighbor; + })(); + + FindNeighborsResponse.NearestNeighbors = (function() { + + /** + * Properties of a NearestNeighbors. + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse + * @interface INearestNeighbors + * @property {string|null} [id] NearestNeighbors id + * @property {Array.|null} [neighbors] NearestNeighbors neighbors + */ + + /** + * Constructs a new NearestNeighbors. + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse + * @classdesc Represents a NearestNeighbors. + * @implements INearestNeighbors + * @constructor + * @param {google.cloud.aiplatform.v1beta1.FindNeighborsResponse.INearestNeighbors=} [properties] Properties to set + */ + function NearestNeighbors(properties) { + this.neighbors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NearestNeighbors id. + * @member {string} id + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors + * @instance + */ + NearestNeighbors.prototype.id = ""; + + /** + * NearestNeighbors neighbors. + * @member {Array.} neighbors + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors + * @instance + */ + NearestNeighbors.prototype.neighbors = $util.emptyArray; + + /** + * Creates a new NearestNeighbors instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors + * @static + * @param {google.cloud.aiplatform.v1beta1.FindNeighborsResponse.INearestNeighbors=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors} NearestNeighbors instance + */ + NearestNeighbors.create = function create(properties) { + return new NearestNeighbors(properties); + }; + + /** + * Encodes the specified NearestNeighbors message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors + * @static + * @param {google.cloud.aiplatform.v1beta1.FindNeighborsResponse.INearestNeighbors} message NearestNeighbors message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NearestNeighbors.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.neighbors != null && message.neighbors.length) + for (var i = 0; i < message.neighbors.length; ++i) + $root.google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor.encode(message.neighbors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NearestNeighbors message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors + * @static + * @param {google.cloud.aiplatform.v1beta1.FindNeighborsResponse.INearestNeighbors} message NearestNeighbors message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NearestNeighbors.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NearestNeighbors message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors} NearestNeighbors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NearestNeighbors.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + if (!(message.neighbors && message.neighbors.length)) + message.neighbors = []; + message.neighbors.push($root.google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NearestNeighbors message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors} NearestNeighbors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NearestNeighbors.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NearestNeighbors message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NearestNeighbors.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.neighbors != null && message.hasOwnProperty("neighbors")) { + if (!Array.isArray(message.neighbors)) + return "neighbors: array expected"; + for (var i = 0; i < message.neighbors.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor.verify(message.neighbors[i]); + if (error) + return "neighbors." + error; + } + } + return null; + }; + + /** + * Creates a NearestNeighbors message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors} NearestNeighbors + */ + NearestNeighbors.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors(); + if (object.id != null) + message.id = String(object.id); + if (object.neighbors) { + if (!Array.isArray(object.neighbors)) + throw TypeError(".google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors.neighbors: array expected"); + message.neighbors = []; + for (var i = 0; i < object.neighbors.length; ++i) { + if (typeof object.neighbors[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors.neighbors: object expected"); + message.neighbors[i] = $root.google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor.fromObject(object.neighbors[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a NearestNeighbors message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors + * @static + * @param {google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors} message NearestNeighbors + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NearestNeighbors.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.neighbors = []; + if (options.defaults) + object.id = ""; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.neighbors && message.neighbors.length) { + object.neighbors = []; + for (var j = 0; j < message.neighbors.length; ++j) + object.neighbors[j] = $root.google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor.toObject(message.neighbors[j], options); + } + return object; + }; + + /** + * Converts this NearestNeighbors to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors + * @instance + * @returns {Object.} JSON object + */ + NearestNeighbors.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NearestNeighbors + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NearestNeighbors.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.FindNeighborsResponse.NearestNeighbors"; + }; + + return NearestNeighbors; + })(); + + return FindNeighborsResponse; + })(); + + v1beta1.ReadIndexDatapointsRequest = (function() { + + /** + * Properties of a ReadIndexDatapointsRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IReadIndexDatapointsRequest + * @property {string|null} [indexEndpoint] ReadIndexDatapointsRequest indexEndpoint + * @property {string|null} [deployedIndexId] ReadIndexDatapointsRequest deployedIndexId + * @property {Array.|null} [ids] ReadIndexDatapointsRequest ids + */ + + /** + * Constructs a new ReadIndexDatapointsRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ReadIndexDatapointsRequest. + * @implements IReadIndexDatapointsRequest + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IReadIndexDatapointsRequest=} [properties] Properties to set + */ + function ReadIndexDatapointsRequest(properties) { + this.ids = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReadIndexDatapointsRequest indexEndpoint. + * @member {string} indexEndpoint + * @memberof google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest + * @instance + */ + ReadIndexDatapointsRequest.prototype.indexEndpoint = ""; + + /** + * ReadIndexDatapointsRequest deployedIndexId. + * @member {string} deployedIndexId + * @memberof google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest + * @instance + */ + ReadIndexDatapointsRequest.prototype.deployedIndexId = ""; + + /** + * ReadIndexDatapointsRequest ids. + * @member {Array.} ids + * @memberof google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest + * @instance + */ + ReadIndexDatapointsRequest.prototype.ids = $util.emptyArray; + + /** + * Creates a new ReadIndexDatapointsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IReadIndexDatapointsRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest} ReadIndexDatapointsRequest instance + */ + ReadIndexDatapointsRequest.create = function create(properties) { + return new ReadIndexDatapointsRequest(properties); + }; + + /** + * Encodes the specified ReadIndexDatapointsRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IReadIndexDatapointsRequest} message ReadIndexDatapointsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadIndexDatapointsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.indexEndpoint != null && Object.hasOwnProperty.call(message, "indexEndpoint")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.indexEndpoint); + if (message.deployedIndexId != null && Object.hasOwnProperty.call(message, "deployedIndexId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.deployedIndexId); + if (message.ids != null && message.ids.length) + for (var i = 0; i < message.ids.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ids[i]); + return writer; + }; + + /** + * Encodes the specified ReadIndexDatapointsRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IReadIndexDatapointsRequest} message ReadIndexDatapointsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadIndexDatapointsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReadIndexDatapointsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest} ReadIndexDatapointsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadIndexDatapointsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.indexEndpoint = reader.string(); + break; + } + case 2: { + message.deployedIndexId = reader.string(); + break; + } + case 3: { + if (!(message.ids && message.ids.length)) + message.ids = []; + message.ids.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReadIndexDatapointsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest} ReadIndexDatapointsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadIndexDatapointsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReadIndexDatapointsRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReadIndexDatapointsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.indexEndpoint != null && message.hasOwnProperty("indexEndpoint")) + if (!$util.isString(message.indexEndpoint)) + return "indexEndpoint: string expected"; + if (message.deployedIndexId != null && message.hasOwnProperty("deployedIndexId")) + if (!$util.isString(message.deployedIndexId)) + return "deployedIndexId: string expected"; + if (message.ids != null && message.hasOwnProperty("ids")) { + if (!Array.isArray(message.ids)) + return "ids: array expected"; + for (var i = 0; i < message.ids.length; ++i) + if (!$util.isString(message.ids[i])) + return "ids: string[] expected"; + } + return null; + }; + + /** + * Creates a ReadIndexDatapointsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest} ReadIndexDatapointsRequest + */ + ReadIndexDatapointsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest(); + if (object.indexEndpoint != null) + message.indexEndpoint = String(object.indexEndpoint); + if (object.deployedIndexId != null) + message.deployedIndexId = String(object.deployedIndexId); + if (object.ids) { + if (!Array.isArray(object.ids)) + throw TypeError(".google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest.ids: array expected"); + message.ids = []; + for (var i = 0; i < object.ids.length; ++i) + message.ids[i] = String(object.ids[i]); + } + return message; + }; + + /** + * Creates a plain object from a ReadIndexDatapointsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest} message ReadIndexDatapointsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReadIndexDatapointsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.ids = []; + if (options.defaults) { + object.indexEndpoint = ""; + object.deployedIndexId = ""; + } + if (message.indexEndpoint != null && message.hasOwnProperty("indexEndpoint")) + object.indexEndpoint = message.indexEndpoint; + if (message.deployedIndexId != null && message.hasOwnProperty("deployedIndexId")) + object.deployedIndexId = message.deployedIndexId; + if (message.ids && message.ids.length) { + object.ids = []; + for (var j = 0; j < message.ids.length; ++j) + object.ids[j] = message.ids[j]; + } + return object; + }; + + /** + * Converts this ReadIndexDatapointsRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest + * @instance + * @returns {Object.} JSON object + */ + ReadIndexDatapointsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReadIndexDatapointsRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReadIndexDatapointsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest"; + }; + + return ReadIndexDatapointsRequest; + })(); + + v1beta1.ReadIndexDatapointsResponse = (function() { + + /** + * Properties of a ReadIndexDatapointsResponse. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IReadIndexDatapointsResponse + * @property {Array.|null} [datapoints] ReadIndexDatapointsResponse datapoints + */ + + /** + * Constructs a new ReadIndexDatapointsResponse. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ReadIndexDatapointsResponse. + * @implements IReadIndexDatapointsResponse + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IReadIndexDatapointsResponse=} [properties] Properties to set + */ + function ReadIndexDatapointsResponse(properties) { + this.datapoints = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReadIndexDatapointsResponse datapoints. + * @member {Array.} datapoints + * @memberof google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse + * @instance + */ + ReadIndexDatapointsResponse.prototype.datapoints = $util.emptyArray; + + /** + * Creates a new ReadIndexDatapointsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IReadIndexDatapointsResponse=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse} ReadIndexDatapointsResponse instance + */ + ReadIndexDatapointsResponse.create = function create(properties) { + return new ReadIndexDatapointsResponse(properties); + }; + + /** + * Encodes the specified ReadIndexDatapointsResponse message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IReadIndexDatapointsResponse} message ReadIndexDatapointsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadIndexDatapointsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.datapoints != null && message.datapoints.length) + for (var i = 0; i < message.datapoints.length; ++i) + $root.google.cloud.aiplatform.v1beta1.IndexDatapoint.encode(message.datapoints[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ReadIndexDatapointsResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IReadIndexDatapointsResponse} message ReadIndexDatapointsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadIndexDatapointsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReadIndexDatapointsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse} ReadIndexDatapointsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadIndexDatapointsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.datapoints && message.datapoints.length)) + message.datapoints = []; + message.datapoints.push($root.google.cloud.aiplatform.v1beta1.IndexDatapoint.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReadIndexDatapointsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse} ReadIndexDatapointsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadIndexDatapointsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReadIndexDatapointsResponse message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReadIndexDatapointsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.datapoints != null && message.hasOwnProperty("datapoints")) { + if (!Array.isArray(message.datapoints)) + return "datapoints: array expected"; + for (var i = 0; i < message.datapoints.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.IndexDatapoint.verify(message.datapoints[i]); + if (error) + return "datapoints." + error; + } + } + return null; + }; + + /** + * Creates a ReadIndexDatapointsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse} ReadIndexDatapointsResponse + */ + ReadIndexDatapointsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse(); + if (object.datapoints) { + if (!Array.isArray(object.datapoints)) + throw TypeError(".google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse.datapoints: array expected"); + message.datapoints = []; + for (var i = 0; i < object.datapoints.length; ++i) { + if (typeof object.datapoints[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse.datapoints: object expected"); + message.datapoints[i] = $root.google.cloud.aiplatform.v1beta1.IndexDatapoint.fromObject(object.datapoints[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ReadIndexDatapointsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse} message ReadIndexDatapointsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReadIndexDatapointsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.datapoints = []; + if (message.datapoints && message.datapoints.length) { + object.datapoints = []; + for (var j = 0; j < message.datapoints.length; ++j) + object.datapoints[j] = $root.google.cloud.aiplatform.v1beta1.IndexDatapoint.toObject(message.datapoints[j], options); + } + return object; + }; + + /** + * Converts this ReadIndexDatapointsResponse to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse + * @instance + * @returns {Object.} JSON object + */ + ReadIndexDatapointsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReadIndexDatapointsResponse + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReadIndexDatapointsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse"; + }; + + return ReadIndexDatapointsResponse; + })(); + v1beta1.MetadataSchema = (function() { /** diff --git a/packages/google-cloud-aiplatform/protos/protos.json b/packages/google-cloud-aiplatform/protos/protos.json index 8e726d9de51..f7fd1296325 100644 --- a/packages/google-cloud-aiplatform/protos/protos.json +++ b/packages/google-cloud-aiplatform/protos/protos.json @@ -29758,6 +29758,166 @@ } } }, + "MatchService": { + "options": { + "(google.api.default_host)": "aiplatform.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "FindNeighbors": { + "requestType": "FindNeighborsRequest", + "responseType": "FindNeighborsResponse", + "options": { + "(google.api.http).post": "/v1beta1/{index_endpoint=projects/*/locations/*/indexEndpoints/*}:findNeighbors", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{index_endpoint=projects/*/locations/*/indexEndpoints/*}:findNeighbors", + "body": "*" + } + } + ] + }, + "ReadIndexDatapoints": { + "requestType": "ReadIndexDatapointsRequest", + "responseType": "ReadIndexDatapointsResponse", + "options": { + "(google.api.http).post": "/v1beta1/{index_endpoint=projects/*/locations/*/indexEndpoints/*}:readIndexDatapoints", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{index_endpoint=projects/*/locations/*/indexEndpoints/*}:readIndexDatapoints", + "body": "*" + } + } + ] + } + } + }, + "FindNeighborsRequest": { + "fields": { + "indexEndpoint": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/IndexEndpoint" + } + }, + "deployedIndexId": { + "type": "string", + "id": 2 + }, + "queries": { + "rule": "repeated", + "type": "Query", + "id": 3 + }, + "returnFullDatapoint": { + "type": "bool", + "id": 4 + } + }, + "nested": { + "Query": { + "fields": { + "datapoint": { + "type": "IndexDatapoint", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "neighborCount": { + "type": "int32", + "id": 2 + }, + "perCrowdingAttributeNeighborCount": { + "type": "int32", + "id": 3 + }, + "approximateNeighborCount": { + "type": "int32", + "id": 4 + }, + "fractionLeafNodesToSearchOverride": { + "type": "double", + "id": 5 + } + } + } + } + }, + "FindNeighborsResponse": { + "fields": { + "nearestNeighbors": { + "rule": "repeated", + "type": "NearestNeighbors", + "id": 1 + } + }, + "nested": { + "Neighbor": { + "fields": { + "datapoint": { + "type": "IndexDatapoint", + "id": 1 + }, + "distance": { + "type": "double", + "id": 2 + } + } + }, + "NearestNeighbors": { + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "neighbors": { + "rule": "repeated", + "type": "Neighbor", + "id": 2 + } + } + } + } + }, + "ReadIndexDatapointsRequest": { + "fields": { + "indexEndpoint": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/IndexEndpoint" + } + }, + "deployedIndexId": { + "type": "string", + "id": 2 + }, + "ids": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "ReadIndexDatapointsResponse": { + "fields": { + "datapoints": { + "rule": "repeated", + "type": "IndexDatapoint", + "id": 1 + } + } + }, "MetadataSchema": { "options": { "(google.api.resource).type": "aiplatform.googleapis.com/MetadataSchema", diff --git a/packages/google-cloud-aiplatform/samples/README.md b/packages/google-cloud-aiplatform/samples/README.md index 16f54ddf6e1..30efdb06f5d 100644 --- a/packages/google-cloud-aiplatform/samples/README.md +++ b/packages/google-cloud-aiplatform/samples/README.md @@ -314,6 +314,8 @@ * [Job_service.resume_model_deployment_monitoring_job](#job_service.resume_model_deployment_monitoring_job) * [Job_service.search_model_deployment_monitoring_stats_anomalies](#job_service.search_model_deployment_monitoring_stats_anomalies) * [Job_service.update_model_deployment_monitoring_job](#job_service.update_model_deployment_monitoring_job) + * [Match_service.find_neighbors](#match_service.find_neighbors) + * [Match_service.read_index_datapoints](#match_service.read_index_datapoints) * [Metadata_service.add_context_artifacts_and_executions](#metadata_service.add_context_artifacts_and_executions) * [Metadata_service.add_context_children](#metadata_service.add_context_children) * [Metadata_service.add_execution_events](#metadata_service.add_execution_events) @@ -5579,6 +5581,40 @@ __Usage:__ +### Match_service.find_neighbors + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.find_neighbors.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.find_neighbors.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.find_neighbors.js` + + +----- + + + + +### Match_service.read_index_datapoints + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.read_index_datapoints.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.read_index_datapoints.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.read_index_datapoints.js` + + +----- + + + + ### Metadata_service.add_context_artifacts_and_executions View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.add_context_artifacts_and_executions.js). diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json index e94665a46d8..b3cee0ca22b 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-aiplatform", - "version": "2.6.0", + "version": "2.6.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.find_neighbors.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.find_neighbors.js new file mode 100644 index 00000000000..a59431e2e8d --- /dev/null +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.find_neighbors.js @@ -0,0 +1,83 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(indexEndpoint) { + // [START aiplatform_v1beta1_generated_MatchService_FindNeighbors_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the index endpoint. + * Format: + * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` + */ + // const indexEndpoint = 'abc123' + /** + * The ID of the DeploydIndex that will serve the request. This request is + * sent to a specific IndexEndpoint, as per the IndexEndpoint.network. That + * IndexEndpoint also has IndexEndpoint.deployed_indexes, and each such index + * has a DeployedIndex.id field. + * The value of the field below must equal one of the DeployedIndex.id + * fields of the IndexEndpoint that is being called for this request. + */ + // const deployedIndexId = 'abc123' + /** + * The list of queries. + */ + // const queries = 1234 + /** + * If set to true, the full datapoints (including all vector values and + * restricts) of the nearest neighbors are returned. + * Note that returning full datapoint will significantly increase the + * latency and cost of the query. + */ + // const returnFullDatapoint = true + + // Imports the Aiplatform library + const {MatchServiceClient} = require('@google-cloud/aiplatform').v1beta1; + + // Instantiates a client + const aiplatformClient = new MatchServiceClient(); + + async function callFindNeighbors() { + // Construct request + const request = { + indexEndpoint, + }; + + // Run request + const response = await aiplatformClient.findNeighbors(request); + console.log(response); + } + + callFindNeighbors(); + // [END aiplatform_v1beta1_generated_MatchService_FindNeighbors_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.read_index_datapoints.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.read_index_datapoints.js new file mode 100644 index 00000000000..0b8bd4d4fc6 --- /dev/null +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.read_index_datapoints.js @@ -0,0 +1,71 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(indexEndpoint) { + // [START aiplatform_v1beta1_generated_MatchService_ReadIndexDatapoints_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the index endpoint. + * Format: + * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` + */ + // const indexEndpoint = 'abc123' + /** + * The ID of the DeploydIndex that will serve the request. + */ + // const deployedIndexId = 'abc123' + /** + * IDs of the datapoints to be searched for. + */ + // const ids = 'abc123' + + // Imports the Aiplatform library + const {MatchServiceClient} = require('@google-cloud/aiplatform').v1beta1; + + // Instantiates a client + const aiplatformClient = new MatchServiceClient(); + + async function callReadIndexDatapoints() { + // Construct request + const request = { + indexEndpoint, + }; + + // Run request + const response = await aiplatformClient.readIndexDatapoints(request); + console.log(response); + } + + callReadIndexDatapoints(); + // [END aiplatform_v1beta1_generated_MatchService_ReadIndexDatapoints_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json index 72a74c0153a..4918a329ff1 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-aiplatform", - "version": "2.6.0", + "version": "2.6.1", "language": "TYPESCRIPT", "apis": [ { @@ -4619,6 +4619,106 @@ } } }, + { + "regionTag": "aiplatform_v1beta1_generated_MatchService_FindNeighbors_async", + "title": "DatasetService findNeighbors Sample", + "origin": "API_DEFINITION", + "description": " Finds the nearest neighbors of each vector within the request.", + "canonical": true, + "file": "match_service.find_neighbors.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FindNeighbors", + "fullName": "google.cloud.aiplatform.v1beta1.MatchService.FindNeighbors", + "async": true, + "parameters": [ + { + "name": "index_endpoint", + "type": "TYPE_STRING" + }, + { + "name": "deployed_index_id", + "type": "TYPE_STRING" + }, + { + "name": "queries", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "return_full_datapoint", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.aiplatform.v1beta1.FindNeighborsResponse", + "client": { + "shortName": "MatchServiceClient", + "fullName": "google.cloud.aiplatform.v1beta1.MatchServiceClient" + }, + "method": { + "shortName": "FindNeighbors", + "fullName": "google.cloud.aiplatform.v1beta1.MatchService.FindNeighbors", + "service": { + "shortName": "MatchService", + "fullName": "google.cloud.aiplatform.v1beta1.MatchService" + } + } + } + }, + { + "regionTag": "aiplatform_v1beta1_generated_MatchService_ReadIndexDatapoints_async", + "title": "DatasetService readIndexDatapoints Sample", + "origin": "API_DEFINITION", + "description": " Reads the datapoints/vectors of the given IDs. A maximum of 1000 datapoints can be retrieved in a batch.", + "canonical": true, + "file": "match_service.read_index_datapoints.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ReadIndexDatapoints", + "fullName": "google.cloud.aiplatform.v1beta1.MatchService.ReadIndexDatapoints", + "async": true, + "parameters": [ + { + "name": "index_endpoint", + "type": "TYPE_STRING" + }, + { + "name": "deployed_index_id", + "type": "TYPE_STRING" + }, + { + "name": "ids", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse", + "client": { + "shortName": "MatchServiceClient", + "fullName": "google.cloud.aiplatform.v1beta1.MatchServiceClient" + }, + "method": { + "shortName": "ReadIndexDatapoints", + "fullName": "google.cloud.aiplatform.v1beta1.MatchService.ReadIndexDatapoints", + "service": { + "shortName": "MatchService", + "fullName": "google.cloud.aiplatform.v1beta1.MatchService" + } + } + } + }, { "regionTag": "aiplatform_v1beta1_generated_MetadataService_CreateMetadataStore_async", "title": "DatasetService createMetadataStore Sample", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_proto_list.json index 9bd0ad172e5..aa3de3bda26 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_proto_list.json @@ -42,6 +42,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1beta1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1beta1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1beta1/match_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_store.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_proto_list.json index 9bd0ad172e5..aa3de3bda26 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_proto_list.json @@ -42,6 +42,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1beta1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1beta1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1beta1/match_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_store.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_proto_list.json index 9bd0ad172e5..aa3de3bda26 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_proto_list.json @@ -42,6 +42,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1beta1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1beta1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1beta1/match_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_store.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_proto_list.json index 9bd0ad172e5..aa3de3bda26 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_proto_list.json @@ -42,6 +42,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1beta1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1beta1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1beta1/match_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_store.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_proto_list.json index 9bd0ad172e5..aa3de3bda26 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_proto_list.json @@ -42,6 +42,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1beta1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1beta1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1beta1/match_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_store.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json b/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json index 46c4a0d0801..4d587a2b7b4 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json @@ -1180,6 +1180,40 @@ } } }, + "MatchService": { + "clients": { + "grpc": { + "libraryClient": "MatchServiceClient", + "rpcs": { + "FindNeighbors": { + "methods": [ + "findNeighbors" + ] + }, + "ReadIndexDatapoints": { + "methods": [ + "readIndexDatapoints" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "MatchServiceClient", + "rpcs": { + "FindNeighbors": { + "methods": [ + "findNeighbors" + ] + }, + "ReadIndexDatapoints": { + "methods": [ + "readIndexDatapoints" + ] + } + } + } + } + }, "MetadataService": { "clients": { "grpc": { diff --git a/packages/google-cloud-aiplatform/src/v1beta1/index.ts b/packages/google-cloud-aiplatform/src/v1beta1/index.ts index ba40ede8c26..83d7be94beb 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/index.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/index.ts @@ -24,6 +24,7 @@ export {FeaturestoreServiceClient} from './featurestore_service_client'; export {IndexEndpointServiceClient} from './index_endpoint_service_client'; export {IndexServiceClient} from './index_service_client'; export {JobServiceClient} from './job_service_client'; +export {MatchServiceClient} from './match_service_client'; export {MetadataServiceClient} from './metadata_service_client'; export {MigrationServiceClient} from './migration_service_client'; export {ModelServiceClient} from './model_service_client'; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_proto_list.json index 9bd0ad172e5..aa3de3bda26 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_proto_list.json @@ -42,6 +42,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1beta1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1beta1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1beta1/match_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_store.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/index_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/index_service_proto_list.json index 9bd0ad172e5..aa3de3bda26 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/index_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/index_service_proto_list.json @@ -42,6 +42,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1beta1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1beta1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1beta1/match_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_store.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/job_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/job_service_proto_list.json index 9bd0ad172e5..aa3de3bda26 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/job_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/job_service_proto_list.json @@ -42,6 +42,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1beta1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1beta1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1beta1/match_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_store.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/match_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/match_service_client.ts new file mode 100644 index 00000000000..d95d6e84f24 --- /dev/null +++ b/packages/google-cloud-aiplatform/src/v1beta1/match_service_client.ts @@ -0,0 +1,3252 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, + IamClient, + IamProtos, + LocationsClient, + LocationProtos, +} from 'google-gax'; + +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1beta1/match_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './match_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * MatchService is a Google managed service for efficient vector similarity + * search at scale. + * @class + * @memberof v1beta1 + */ +export class MatchServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + matchServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of MatchServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @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 MatchServiceClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof MatchServiceClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); + + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + annotationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}/annotations/{annotation}' + ), + annotationSpecPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}' + ), + artifactPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataStores/{metadata_store}/artifacts/{artifact}' + ), + batchPredictionJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}' + ), + contextPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataStores/{metadata_store}/contexts/{context}' + ), + customJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/customJobs/{custom_job}' + ), + dataItemPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}' + ), + dataLabelingJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}' + ), + datasetPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}' + ), + deploymentResourcePoolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}' + ), + endpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + entityTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' + ), + executionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataStores/{metadata_store}/executions/{execution}' + ), + featurePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}' + ), + featurestorePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/featurestores/{featurestore}' + ), + hyperparameterTuningJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}' + ), + indexPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/indexes/{index}' + ), + indexEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}' + ), + metadataSchemaPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataStores/{metadata_store}/metadataSchemas/{metadata_schema}' + ), + metadataStorePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataStores/{metadata_store}' + ), + modelPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/models/{model}' + ), + modelDeploymentMonitoringJobPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}' + ), + modelEvaluationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}' + ), + modelEvaluationSlicePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}' + ), + nasJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/nasJobs/{nas_job}' + ), + nasTrialDetailPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}' + ), + pipelineJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' + ), + savedQueryPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' + ), + specialistPoolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/specialistPools/{specialist_pool}' + ), + studyPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/studies/{study}' + ), + tensorboardPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/tensorboards/{tensorboard}' + ), + tensorboardExperimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}' + ), + tensorboardRunPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}' + ), + tensorboardTimeSeriesPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}' + ), + trainingPipelinePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}' + ), + trialPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/studies/{study}/trials/{trial}' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.aiplatform.v1beta1.MatchService', + 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.matchServiceStub) { + return this.matchServiceStub; + } + + // Put together the "service stub" for + // google.cloud.aiplatform.v1beta1.MatchService. + this.matchServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.aiplatform.v1beta1.MatchService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.aiplatform.v1beta1.MatchService, + 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 matchServiceStubMethods = ['findNeighbors', 'readIndexDatapoints']; + for (const methodName of matchServiceStubMethods) { + const callPromise = this.matchServiceStub.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 = undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.matchServiceStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'aiplatform.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'aiplatform.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Finds the nearest neighbors of each vector within the request. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.indexEndpoint + * Required. The name of the index endpoint. + * Format: + * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` + * @param {string} request.deployedIndexId + * The ID of the DeploydIndex that will serve the request. This request is + * sent to a specific IndexEndpoint, as per the IndexEndpoint.network. That + * IndexEndpoint also has IndexEndpoint.deployed_indexes, and each such index + * has a DeployedIndex.id field. + * The value of the field below must equal one of the DeployedIndex.id + * fields of the IndexEndpoint that is being called for this request. + * @param {number[]} request.queries + * The list of queries. + * @param {boolean} request.returnFullDatapoint + * If set to true, the full datapoints (including all vector values and + * restricts) of the nearest neighbors are returned. + * Note that returning full datapoint will significantly increase the + * latency and cost of the query. + * @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.aiplatform.v1beta1.FindNeighborsResponse | FindNeighborsResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/match_service.find_neighbors.js + * region_tag:aiplatform_v1beta1_generated_MatchService_FindNeighbors_async + */ + findNeighbors( + request?: protos.google.cloud.aiplatform.v1beta1.IFindNeighborsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.aiplatform.v1beta1.IFindNeighborsResponse, + protos.google.cloud.aiplatform.v1beta1.IFindNeighborsRequest | undefined, + {} | undefined + ] + >; + findNeighbors( + request: protos.google.cloud.aiplatform.v1beta1.IFindNeighborsRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.aiplatform.v1beta1.IFindNeighborsResponse, + | protos.google.cloud.aiplatform.v1beta1.IFindNeighborsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + findNeighbors( + request: protos.google.cloud.aiplatform.v1beta1.IFindNeighborsRequest, + callback: Callback< + protos.google.cloud.aiplatform.v1beta1.IFindNeighborsResponse, + | protos.google.cloud.aiplatform.v1beta1.IFindNeighborsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + findNeighbors( + request?: protos.google.cloud.aiplatform.v1beta1.IFindNeighborsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.aiplatform.v1beta1.IFindNeighborsResponse, + | protos.google.cloud.aiplatform.v1beta1.IFindNeighborsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.aiplatform.v1beta1.IFindNeighborsResponse, + | protos.google.cloud.aiplatform.v1beta1.IFindNeighborsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.aiplatform.v1beta1.IFindNeighborsResponse, + protos.google.cloud.aiplatform.v1beta1.IFindNeighborsRequest | 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({ + index_endpoint: request.indexEndpoint ?? '', + }); + this.initialize(); + return this.innerApiCalls.findNeighbors(request, options, callback); + } + /** + * Reads the datapoints/vectors of the given IDs. + * A maximum of 1000 datapoints can be retrieved in a batch. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.indexEndpoint + * Required. The name of the index endpoint. + * Format: + * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` + * @param {string} request.deployedIndexId + * The ID of the DeploydIndex that will serve the request. + * @param {string[]} request.ids + * IDs of the datapoints to be searched for. + * @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.aiplatform.v1beta1.ReadIndexDatapointsResponse | ReadIndexDatapointsResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/match_service.read_index_datapoints.js + * region_tag:aiplatform_v1beta1_generated_MatchService_ReadIndexDatapoints_async + */ + readIndexDatapoints( + request?: protos.google.cloud.aiplatform.v1beta1.IReadIndexDatapointsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.aiplatform.v1beta1.IReadIndexDatapointsResponse, + ( + | protos.google.cloud.aiplatform.v1beta1.IReadIndexDatapointsRequest + | undefined + ), + {} | undefined + ] + >; + readIndexDatapoints( + request: protos.google.cloud.aiplatform.v1beta1.IReadIndexDatapointsRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.aiplatform.v1beta1.IReadIndexDatapointsResponse, + | protos.google.cloud.aiplatform.v1beta1.IReadIndexDatapointsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + readIndexDatapoints( + request: protos.google.cloud.aiplatform.v1beta1.IReadIndexDatapointsRequest, + callback: Callback< + protos.google.cloud.aiplatform.v1beta1.IReadIndexDatapointsResponse, + | protos.google.cloud.aiplatform.v1beta1.IReadIndexDatapointsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + readIndexDatapoints( + request?: protos.google.cloud.aiplatform.v1beta1.IReadIndexDatapointsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.aiplatform.v1beta1.IReadIndexDatapointsResponse, + | protos.google.cloud.aiplatform.v1beta1.IReadIndexDatapointsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.aiplatform.v1beta1.IReadIndexDatapointsResponse, + | protos.google.cloud.aiplatform.v1beta1.IReadIndexDatapointsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.aiplatform.v1beta1.IReadIndexDatapointsResponse, + ( + | protos.google.cloud.aiplatform.v1beta1.IReadIndexDatapointsRequest + | 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({ + index_endpoint: request.indexEndpoint ?? '', + }); + this.initialize(); + return this.innerApiCalls.readIndexDatapoints(request, options, callback); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.getIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.setIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + */ + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.testIamPermissions(request, options, callback); + } + + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * 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 annotation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @param {string} data_item + * @param {string} annotation + * @returns {string} Resource name string. + */ + annotationPath( + project: string, + location: string, + dataset: string, + dataItem: string, + annotation: string + ) { + return this.pathTemplates.annotationPathTemplate.render({ + project: project, + location: location, + dataset: dataset, + data_item: dataItem, + annotation: annotation, + }); + } + + /** + * Parse the project from Annotation resource. + * + * @param {string} annotationName + * A fully-qualified path representing Annotation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAnnotationName(annotationName: string) { + return this.pathTemplates.annotationPathTemplate.match(annotationName) + .project; + } + + /** + * Parse the location from Annotation resource. + * + * @param {string} annotationName + * A fully-qualified path representing Annotation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAnnotationName(annotationName: string) { + return this.pathTemplates.annotationPathTemplate.match(annotationName) + .location; + } + + /** + * Parse the dataset from Annotation resource. + * + * @param {string} annotationName + * A fully-qualified path representing Annotation resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromAnnotationName(annotationName: string) { + return this.pathTemplates.annotationPathTemplate.match(annotationName) + .dataset; + } + + /** + * Parse the data_item from Annotation resource. + * + * @param {string} annotationName + * A fully-qualified path representing Annotation resource. + * @returns {string} A string representing the data_item. + */ + matchDataItemFromAnnotationName(annotationName: string) { + return this.pathTemplates.annotationPathTemplate.match(annotationName) + .data_item; + } + + /** + * Parse the annotation from Annotation resource. + * + * @param {string} annotationName + * A fully-qualified path representing Annotation resource. + * @returns {string} A string representing the annotation. + */ + matchAnnotationFromAnnotationName(annotationName: string) { + return this.pathTemplates.annotationPathTemplate.match(annotationName) + .annotation; + } + + /** + * Return a fully-qualified annotationSpec resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @param {string} annotation_spec + * @returns {string} Resource name string. + */ + annotationSpecPath( + project: string, + location: string, + dataset: string, + annotationSpec: string + ) { + return this.pathTemplates.annotationSpecPathTemplate.render({ + project: project, + location: location, + dataset: dataset, + annotation_spec: annotationSpec, + }); + } + + /** + * Parse the project from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAnnotationSpecName(annotationSpecName: string) { + return this.pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).project; + } + + /** + * Parse the location from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAnnotationSpecName(annotationSpecName: string) { + return this.pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).location; + } + + /** + * Parse the dataset from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromAnnotationSpecName(annotationSpecName: string) { + return this.pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).dataset; + } + + /** + * Parse the annotation_spec from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the annotation_spec. + */ + matchAnnotationSpecFromAnnotationSpecName(annotationSpecName: string) { + return this.pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).annotation_spec; + } + + /** + * Return a fully-qualified artifact resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadata_store + * @param {string} artifact + * @returns {string} Resource name string. + */ + artifactPath( + project: string, + location: string, + metadataStore: string, + artifact: string + ) { + return this.pathTemplates.artifactPathTemplate.render({ + project: project, + location: location, + metadata_store: metadataStore, + artifact: artifact, + }); + } + + /** + * Parse the project from Artifact resource. + * + * @param {string} artifactName + * A fully-qualified path representing Artifact resource. + * @returns {string} A string representing the project. + */ + matchProjectFromArtifactName(artifactName: string) { + return this.pathTemplates.artifactPathTemplate.match(artifactName).project; + } + + /** + * Parse the location from Artifact resource. + * + * @param {string} artifactName + * A fully-qualified path representing Artifact resource. + * @returns {string} A string representing the location. + */ + matchLocationFromArtifactName(artifactName: string) { + return this.pathTemplates.artifactPathTemplate.match(artifactName).location; + } + + /** + * Parse the metadata_store from Artifact resource. + * + * @param {string} artifactName + * A fully-qualified path representing Artifact resource. + * @returns {string} A string representing the metadata_store. + */ + matchMetadataStoreFromArtifactName(artifactName: string) { + return this.pathTemplates.artifactPathTemplate.match(artifactName) + .metadata_store; + } + + /** + * Parse the artifact from Artifact resource. + * + * @param {string} artifactName + * A fully-qualified path representing Artifact resource. + * @returns {string} A string representing the artifact. + */ + matchArtifactFromArtifactName(artifactName: string) { + return this.pathTemplates.artifactPathTemplate.match(artifactName).artifact; + } + + /** + * Return a fully-qualified batchPredictionJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} batch_prediction_job + * @returns {string} Resource name string. + */ + batchPredictionJobPath( + project: string, + location: string, + batchPredictionJob: string + ) { + return this.pathTemplates.batchPredictionJobPathTemplate.render({ + project: project, + location: location, + batch_prediction_job: batchPredictionJob, + }); + } + + /** + * Parse the project from BatchPredictionJob resource. + * + * @param {string} batchPredictionJobName + * A fully-qualified path representing BatchPredictionJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBatchPredictionJobName(batchPredictionJobName: string) { + return this.pathTemplates.batchPredictionJobPathTemplate.match( + batchPredictionJobName + ).project; + } + + /** + * Parse the location from BatchPredictionJob resource. + * + * @param {string} batchPredictionJobName + * A fully-qualified path representing BatchPredictionJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBatchPredictionJobName(batchPredictionJobName: string) { + return this.pathTemplates.batchPredictionJobPathTemplate.match( + batchPredictionJobName + ).location; + } + + /** + * Parse the batch_prediction_job from BatchPredictionJob resource. + * + * @param {string} batchPredictionJobName + * A fully-qualified path representing BatchPredictionJob resource. + * @returns {string} A string representing the batch_prediction_job. + */ + matchBatchPredictionJobFromBatchPredictionJobName( + batchPredictionJobName: string + ) { + return this.pathTemplates.batchPredictionJobPathTemplate.match( + batchPredictionJobName + ).batch_prediction_job; + } + + /** + * Return a fully-qualified context resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadata_store + * @param {string} context + * @returns {string} Resource name string. + */ + contextPath( + project: string, + location: string, + metadataStore: string, + context: string + ) { + return this.pathTemplates.contextPathTemplate.render({ + project: project, + location: location, + metadata_store: metadataStore, + context: context, + }); + } + + /** + * Parse the project from Context resource. + * + * @param {string} contextName + * A fully-qualified path representing Context resource. + * @returns {string} A string representing the project. + */ + matchProjectFromContextName(contextName: string) { + return this.pathTemplates.contextPathTemplate.match(contextName).project; + } + + /** + * Parse the location from Context resource. + * + * @param {string} contextName + * A fully-qualified path representing Context resource. + * @returns {string} A string representing the location. + */ + matchLocationFromContextName(contextName: string) { + return this.pathTemplates.contextPathTemplate.match(contextName).location; + } + + /** + * Parse the metadata_store from Context resource. + * + * @param {string} contextName + * A fully-qualified path representing Context resource. + * @returns {string} A string representing the metadata_store. + */ + matchMetadataStoreFromContextName(contextName: string) { + return this.pathTemplates.contextPathTemplate.match(contextName) + .metadata_store; + } + + /** + * Parse the context from Context resource. + * + * @param {string} contextName + * A fully-qualified path representing Context resource. + * @returns {string} A string representing the context. + */ + matchContextFromContextName(contextName: string) { + return this.pathTemplates.contextPathTemplate.match(contextName).context; + } + + /** + * Return a fully-qualified customJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} custom_job + * @returns {string} Resource name string. + */ + customJobPath(project: string, location: string, customJob: string) { + return this.pathTemplates.customJobPathTemplate.render({ + project: project, + location: location, + custom_job: customJob, + }); + } + + /** + * Parse the project from CustomJob resource. + * + * @param {string} customJobName + * A fully-qualified path representing CustomJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromCustomJobName(customJobName: string) { + return this.pathTemplates.customJobPathTemplate.match(customJobName) + .project; + } + + /** + * Parse the location from CustomJob resource. + * + * @param {string} customJobName + * A fully-qualified path representing CustomJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromCustomJobName(customJobName: string) { + return this.pathTemplates.customJobPathTemplate.match(customJobName) + .location; + } + + /** + * Parse the custom_job from CustomJob resource. + * + * @param {string} customJobName + * A fully-qualified path representing CustomJob resource. + * @returns {string} A string representing the custom_job. + */ + matchCustomJobFromCustomJobName(customJobName: string) { + return this.pathTemplates.customJobPathTemplate.match(customJobName) + .custom_job; + } + + /** + * Return a fully-qualified dataItem resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @param {string} data_item + * @returns {string} Resource name string. + */ + dataItemPath( + project: string, + location: string, + dataset: string, + dataItem: string + ) { + return this.pathTemplates.dataItemPathTemplate.render({ + project: project, + location: location, + dataset: dataset, + data_item: dataItem, + }); + } + + /** + * Parse the project from DataItem resource. + * + * @param {string} dataItemName + * A fully-qualified path representing DataItem resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataItemName(dataItemName: string) { + return this.pathTemplates.dataItemPathTemplate.match(dataItemName).project; + } + + /** + * Parse the location from DataItem resource. + * + * @param {string} dataItemName + * A fully-qualified path representing DataItem resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataItemName(dataItemName: string) { + return this.pathTemplates.dataItemPathTemplate.match(dataItemName).location; + } + + /** + * Parse the dataset from DataItem resource. + * + * @param {string} dataItemName + * A fully-qualified path representing DataItem resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromDataItemName(dataItemName: string) { + return this.pathTemplates.dataItemPathTemplate.match(dataItemName).dataset; + } + + /** + * Parse the data_item from DataItem resource. + * + * @param {string} dataItemName + * A fully-qualified path representing DataItem resource. + * @returns {string} A string representing the data_item. + */ + matchDataItemFromDataItemName(dataItemName: string) { + return this.pathTemplates.dataItemPathTemplate.match(dataItemName) + .data_item; + } + + /** + * Return a fully-qualified dataLabelingJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_labeling_job + * @returns {string} Resource name string. + */ + dataLabelingJobPath( + project: string, + location: string, + dataLabelingJob: string + ) { + return this.pathTemplates.dataLabelingJobPathTemplate.render({ + project: project, + location: location, + data_labeling_job: dataLabelingJob, + }); + } + + /** + * Parse the project from DataLabelingJob resource. + * + * @param {string} dataLabelingJobName + * A fully-qualified path representing DataLabelingJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataLabelingJobName(dataLabelingJobName: string) { + return this.pathTemplates.dataLabelingJobPathTemplate.match( + dataLabelingJobName + ).project; + } + + /** + * Parse the location from DataLabelingJob resource. + * + * @param {string} dataLabelingJobName + * A fully-qualified path representing DataLabelingJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataLabelingJobName(dataLabelingJobName: string) { + return this.pathTemplates.dataLabelingJobPathTemplate.match( + dataLabelingJobName + ).location; + } + + /** + * Parse the data_labeling_job from DataLabelingJob resource. + * + * @param {string} dataLabelingJobName + * A fully-qualified path representing DataLabelingJob resource. + * @returns {string} A string representing the data_labeling_job. + */ + matchDataLabelingJobFromDataLabelingJobName(dataLabelingJobName: string) { + return this.pathTemplates.dataLabelingJobPathTemplate.match( + dataLabelingJobName + ).data_labeling_job; + } + + /** + * Return a fully-qualified dataset resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @returns {string} Resource name string. + */ + datasetPath(project: string, location: string, dataset: string) { + return this.pathTemplates.datasetPathTemplate.render({ + project: project, + location: location, + dataset: dataset, + }); + } + + /** + * Parse the project from Dataset resource. + * + * @param {string} datasetName + * A fully-qualified path representing Dataset resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDatasetName(datasetName: string) { + return this.pathTemplates.datasetPathTemplate.match(datasetName).project; + } + + /** + * Parse the location from Dataset resource. + * + * @param {string} datasetName + * A fully-qualified path representing Dataset resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDatasetName(datasetName: string) { + return this.pathTemplates.datasetPathTemplate.match(datasetName).location; + } + + /** + * Parse the dataset from Dataset resource. + * + * @param {string} datasetName + * A fully-qualified path representing Dataset resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromDatasetName(datasetName: string) { + return this.pathTemplates.datasetPathTemplate.match(datasetName).dataset; + } + + /** + * Return a fully-qualified deploymentResourcePool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} deployment_resource_pool + * @returns {string} Resource name string. + */ + deploymentResourcePoolPath( + project: string, + location: string, + deploymentResourcePool: string + ) { + return this.pathTemplates.deploymentResourcePoolPathTemplate.render({ + project: project, + location: location, + deployment_resource_pool: deploymentResourcePool, + }); + } + + /** + * Parse the project from DeploymentResourcePool resource. + * + * @param {string} deploymentResourcePoolName + * A fully-qualified path representing DeploymentResourcePool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDeploymentResourcePoolName( + deploymentResourcePoolName: string + ) { + return this.pathTemplates.deploymentResourcePoolPathTemplate.match( + deploymentResourcePoolName + ).project; + } + + /** + * Parse the location from DeploymentResourcePool resource. + * + * @param {string} deploymentResourcePoolName + * A fully-qualified path representing DeploymentResourcePool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDeploymentResourcePoolName( + deploymentResourcePoolName: string + ) { + return this.pathTemplates.deploymentResourcePoolPathTemplate.match( + deploymentResourcePoolName + ).location; + } + + /** + * Parse the deployment_resource_pool from DeploymentResourcePool resource. + * + * @param {string} deploymentResourcePoolName + * A fully-qualified path representing DeploymentResourcePool resource. + * @returns {string} A string representing the deployment_resource_pool. + */ + matchDeploymentResourcePoolFromDeploymentResourcePoolName( + deploymentResourcePoolName: string + ) { + return this.pathTemplates.deploymentResourcePoolPathTemplate.match( + deploymentResourcePoolName + ).deployment_resource_pool; + } + + /** + * Return a fully-qualified endpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + endpointPath(project: string, location: string, endpoint: string) { + return this.pathTemplates.endpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from Endpoint resource. + * + * @param {string} endpointName + * A fully-qualified path representing Endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEndpointName(endpointName: string) { + return this.pathTemplates.endpointPathTemplate.match(endpointName).project; + } + + /** + * Parse the location from Endpoint resource. + * + * @param {string} endpointName + * A fully-qualified path representing Endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEndpointName(endpointName: string) { + return this.pathTemplates.endpointPathTemplate.match(endpointName).location; + } + + /** + * Parse the endpoint from Endpoint resource. + * + * @param {string} endpointName + * A fully-qualified path representing Endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromEndpointName(endpointName: string) { + return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; + } + + /** + * Return a fully-qualified entityType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} featurestore + * @param {string} entity_type + * @returns {string} Resource name string. + */ + entityTypePath( + project: string, + location: string, + featurestore: string, + entityType: string + ) { + return this.pathTemplates.entityTypePathTemplate.render({ + project: project, + location: location, + featurestore: featurestore, + entity_type: entityType, + }); + } + + /** + * Parse the project from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName) + .project; + } + + /** + * Parse the location from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName) + .location; + } + + /** + * Parse the featurestore from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the featurestore. + */ + matchFeaturestoreFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName) + .featurestore; + } + + /** + * Parse the entity_type from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the entity_type. + */ + matchEntityTypeFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName) + .entity_type; + } + + /** + * Return a fully-qualified execution resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadata_store + * @param {string} execution + * @returns {string} Resource name string. + */ + executionPath( + project: string, + location: string, + metadataStore: string, + execution: string + ) { + return this.pathTemplates.executionPathTemplate.render({ + project: project, + location: location, + metadata_store: metadataStore, + execution: execution, + }); + } + + /** + * Parse the project from Execution resource. + * + * @param {string} executionName + * A fully-qualified path representing Execution resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExecutionName(executionName: string) { + return this.pathTemplates.executionPathTemplate.match(executionName) + .project; + } + + /** + * Parse the location from Execution resource. + * + * @param {string} executionName + * A fully-qualified path representing Execution resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExecutionName(executionName: string) { + return this.pathTemplates.executionPathTemplate.match(executionName) + .location; + } + + /** + * Parse the metadata_store from Execution resource. + * + * @param {string} executionName + * A fully-qualified path representing Execution resource. + * @returns {string} A string representing the metadata_store. + */ + matchMetadataStoreFromExecutionName(executionName: string) { + return this.pathTemplates.executionPathTemplate.match(executionName) + .metadata_store; + } + + /** + * Parse the execution from Execution resource. + * + * @param {string} executionName + * A fully-qualified path representing Execution resource. + * @returns {string} A string representing the execution. + */ + matchExecutionFromExecutionName(executionName: string) { + return this.pathTemplates.executionPathTemplate.match(executionName) + .execution; + } + + /** + * Return a fully-qualified feature resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} featurestore + * @param {string} entity_type + * @param {string} feature + * @returns {string} Resource name string. + */ + featurePath( + project: string, + location: string, + featurestore: string, + entityType: string, + feature: string + ) { + return this.pathTemplates.featurePathTemplate.render({ + project: project, + location: location, + featurestore: featurestore, + entity_type: entityType, + feature: feature, + }); + } + + /** + * Parse the project from Feature resource. + * + * @param {string} featureName + * A fully-qualified path representing Feature resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFeatureName(featureName: string) { + return this.pathTemplates.featurePathTemplate.match(featureName).project; + } + + /** + * Parse the location from Feature resource. + * + * @param {string} featureName + * A fully-qualified path representing Feature resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFeatureName(featureName: string) { + return this.pathTemplates.featurePathTemplate.match(featureName).location; + } + + /** + * Parse the featurestore from Feature resource. + * + * @param {string} featureName + * A fully-qualified path representing Feature resource. + * @returns {string} A string representing the featurestore. + */ + matchFeaturestoreFromFeatureName(featureName: string) { + return this.pathTemplates.featurePathTemplate.match(featureName) + .featurestore; + } + + /** + * Parse the entity_type from Feature resource. + * + * @param {string} featureName + * A fully-qualified path representing Feature resource. + * @returns {string} A string representing the entity_type. + */ + matchEntityTypeFromFeatureName(featureName: string) { + return this.pathTemplates.featurePathTemplate.match(featureName) + .entity_type; + } + + /** + * Parse the feature from Feature resource. + * + * @param {string} featureName + * A fully-qualified path representing Feature resource. + * @returns {string} A string representing the feature. + */ + matchFeatureFromFeatureName(featureName: string) { + return this.pathTemplates.featurePathTemplate.match(featureName).feature; + } + + /** + * Return a fully-qualified featurestore resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} featurestore + * @returns {string} Resource name string. + */ + featurestorePath(project: string, location: string, featurestore: string) { + return this.pathTemplates.featurestorePathTemplate.render({ + project: project, + location: location, + featurestore: featurestore, + }); + } + + /** + * Parse the project from Featurestore resource. + * + * @param {string} featurestoreName + * A fully-qualified path representing Featurestore resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFeaturestoreName(featurestoreName: string) { + return this.pathTemplates.featurestorePathTemplate.match(featurestoreName) + .project; + } + + /** + * Parse the location from Featurestore resource. + * + * @param {string} featurestoreName + * A fully-qualified path representing Featurestore resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFeaturestoreName(featurestoreName: string) { + return this.pathTemplates.featurestorePathTemplate.match(featurestoreName) + .location; + } + + /** + * Parse the featurestore from Featurestore resource. + * + * @param {string} featurestoreName + * A fully-qualified path representing Featurestore resource. + * @returns {string} A string representing the featurestore. + */ + matchFeaturestoreFromFeaturestoreName(featurestoreName: string) { + return this.pathTemplates.featurestorePathTemplate.match(featurestoreName) + .featurestore; + } + + /** + * Return a fully-qualified hyperparameterTuningJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} hyperparameter_tuning_job + * @returns {string} Resource name string. + */ + hyperparameterTuningJobPath( + project: string, + location: string, + hyperparameterTuningJob: string + ) { + return this.pathTemplates.hyperparameterTuningJobPathTemplate.render({ + project: project, + location: location, + hyperparameter_tuning_job: hyperparameterTuningJob, + }); + } + + /** + * Parse the project from HyperparameterTuningJob resource. + * + * @param {string} hyperparameterTuningJobName + * A fully-qualified path representing HyperparameterTuningJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromHyperparameterTuningJobName( + hyperparameterTuningJobName: string + ) { + return this.pathTemplates.hyperparameterTuningJobPathTemplate.match( + hyperparameterTuningJobName + ).project; + } + + /** + * Parse the location from HyperparameterTuningJob resource. + * + * @param {string} hyperparameterTuningJobName + * A fully-qualified path representing HyperparameterTuningJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromHyperparameterTuningJobName( + hyperparameterTuningJobName: string + ) { + return this.pathTemplates.hyperparameterTuningJobPathTemplate.match( + hyperparameterTuningJobName + ).location; + } + + /** + * Parse the hyperparameter_tuning_job from HyperparameterTuningJob resource. + * + * @param {string} hyperparameterTuningJobName + * A fully-qualified path representing HyperparameterTuningJob resource. + * @returns {string} A string representing the hyperparameter_tuning_job. + */ + matchHyperparameterTuningJobFromHyperparameterTuningJobName( + hyperparameterTuningJobName: string + ) { + return this.pathTemplates.hyperparameterTuningJobPathTemplate.match( + hyperparameterTuningJobName + ).hyperparameter_tuning_job; + } + + /** + * Return a fully-qualified index resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} index + * @returns {string} Resource name string. + */ + indexPath(project: string, location: string, index: string) { + return this.pathTemplates.indexPathTemplate.render({ + project: project, + location: location, + index: index, + }); + } + + /** + * Parse the project from Index resource. + * + * @param {string} indexName + * A fully-qualified path representing Index resource. + * @returns {string} A string representing the project. + */ + matchProjectFromIndexName(indexName: string) { + return this.pathTemplates.indexPathTemplate.match(indexName).project; + } + + /** + * Parse the location from Index resource. + * + * @param {string} indexName + * A fully-qualified path representing Index resource. + * @returns {string} A string representing the location. + */ + matchLocationFromIndexName(indexName: string) { + return this.pathTemplates.indexPathTemplate.match(indexName).location; + } + + /** + * Parse the index from Index resource. + * + * @param {string} indexName + * A fully-qualified path representing Index resource. + * @returns {string} A string representing the index. + */ + matchIndexFromIndexName(indexName: string) { + return this.pathTemplates.indexPathTemplate.match(indexName).index; + } + + /** + * Return a fully-qualified indexEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} index_endpoint + * @returns {string} Resource name string. + */ + indexEndpointPath(project: string, location: string, indexEndpoint: string) { + return this.pathTemplates.indexEndpointPathTemplate.render({ + project: project, + location: location, + index_endpoint: indexEndpoint, + }); + } + + /** + * Parse the project from IndexEndpoint resource. + * + * @param {string} indexEndpointName + * A fully-qualified path representing IndexEndpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromIndexEndpointName(indexEndpointName: string) { + return this.pathTemplates.indexEndpointPathTemplate.match(indexEndpointName) + .project; + } + + /** + * Parse the location from IndexEndpoint resource. + * + * @param {string} indexEndpointName + * A fully-qualified path representing IndexEndpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromIndexEndpointName(indexEndpointName: string) { + return this.pathTemplates.indexEndpointPathTemplate.match(indexEndpointName) + .location; + } + + /** + * Parse the index_endpoint from IndexEndpoint resource. + * + * @param {string} indexEndpointName + * A fully-qualified path representing IndexEndpoint resource. + * @returns {string} A string representing the index_endpoint. + */ + matchIndexEndpointFromIndexEndpointName(indexEndpointName: string) { + return this.pathTemplates.indexEndpointPathTemplate.match(indexEndpointName) + .index_endpoint; + } + + /** + * Return a fully-qualified metadataSchema resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadata_store + * @param {string} metadata_schema + * @returns {string} Resource name string. + */ + metadataSchemaPath( + project: string, + location: string, + metadataStore: string, + metadataSchema: string + ) { + return this.pathTemplates.metadataSchemaPathTemplate.render({ + project: project, + location: location, + metadata_store: metadataStore, + metadata_schema: metadataSchema, + }); + } + + /** + * Parse the project from MetadataSchema resource. + * + * @param {string} metadataSchemaName + * A fully-qualified path representing MetadataSchema resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMetadataSchemaName(metadataSchemaName: string) { + return this.pathTemplates.metadataSchemaPathTemplate.match( + metadataSchemaName + ).project; + } + + /** + * Parse the location from MetadataSchema resource. + * + * @param {string} metadataSchemaName + * A fully-qualified path representing MetadataSchema resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMetadataSchemaName(metadataSchemaName: string) { + return this.pathTemplates.metadataSchemaPathTemplate.match( + metadataSchemaName + ).location; + } + + /** + * Parse the metadata_store from MetadataSchema resource. + * + * @param {string} metadataSchemaName + * A fully-qualified path representing MetadataSchema resource. + * @returns {string} A string representing the metadata_store. + */ + matchMetadataStoreFromMetadataSchemaName(metadataSchemaName: string) { + return this.pathTemplates.metadataSchemaPathTemplate.match( + metadataSchemaName + ).metadata_store; + } + + /** + * Parse the metadata_schema from MetadataSchema resource. + * + * @param {string} metadataSchemaName + * A fully-qualified path representing MetadataSchema resource. + * @returns {string} A string representing the metadata_schema. + */ + matchMetadataSchemaFromMetadataSchemaName(metadataSchemaName: string) { + return this.pathTemplates.metadataSchemaPathTemplate.match( + metadataSchemaName + ).metadata_schema; + } + + /** + * Return a fully-qualified metadataStore resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadata_store + * @returns {string} Resource name string. + */ + metadataStorePath(project: string, location: string, metadataStore: string) { + return this.pathTemplates.metadataStorePathTemplate.render({ + project: project, + location: location, + metadata_store: metadataStore, + }); + } + + /** + * Parse the project from MetadataStore resource. + * + * @param {string} metadataStoreName + * A fully-qualified path representing MetadataStore resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMetadataStoreName(metadataStoreName: string) { + return this.pathTemplates.metadataStorePathTemplate.match(metadataStoreName) + .project; + } + + /** + * Parse the location from MetadataStore resource. + * + * @param {string} metadataStoreName + * A fully-qualified path representing MetadataStore resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMetadataStoreName(metadataStoreName: string) { + return this.pathTemplates.metadataStorePathTemplate.match(metadataStoreName) + .location; + } + + /** + * Parse the metadata_store from MetadataStore resource. + * + * @param {string} metadataStoreName + * A fully-qualified path representing MetadataStore resource. + * @returns {string} A string representing the metadata_store. + */ + matchMetadataStoreFromMetadataStoreName(metadataStoreName: string) { + return this.pathTemplates.metadataStorePathTemplate.match(metadataStoreName) + .metadata_store; + } + + /** + * Return a fully-qualified model resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} model + * @returns {string} Resource name string. + */ + modelPath(project: string, location: string, model: string) { + return this.pathTemplates.modelPathTemplate.render({ + project: project, + location: location, + model: model, + }); + } + + /** + * Parse the project from Model resource. + * + * @param {string} modelName + * A fully-qualified path representing Model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromModelName(modelName: string) { + return this.pathTemplates.modelPathTemplate.match(modelName).project; + } + + /** + * Parse the location from Model resource. + * + * @param {string} modelName + * A fully-qualified path representing Model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromModelName(modelName: string) { + return this.pathTemplates.modelPathTemplate.match(modelName).location; + } + + /** + * Parse the model from Model resource. + * + * @param {string} modelName + * A fully-qualified path representing Model resource. + * @returns {string} A string representing the model. + */ + matchModelFromModelName(modelName: string) { + return this.pathTemplates.modelPathTemplate.match(modelName).model; + } + + /** + * Return a fully-qualified modelDeploymentMonitoringJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} model_deployment_monitoring_job + * @returns {string} Resource name string. + */ + modelDeploymentMonitoringJobPath( + project: string, + location: string, + modelDeploymentMonitoringJob: string + ) { + return this.pathTemplates.modelDeploymentMonitoringJobPathTemplate.render({ + project: project, + location: location, + model_deployment_monitoring_job: modelDeploymentMonitoringJob, + }); + } + + /** + * Parse the project from ModelDeploymentMonitoringJob resource. + * + * @param {string} modelDeploymentMonitoringJobName + * A fully-qualified path representing ModelDeploymentMonitoringJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromModelDeploymentMonitoringJobName( + modelDeploymentMonitoringJobName: string + ) { + return this.pathTemplates.modelDeploymentMonitoringJobPathTemplate.match( + modelDeploymentMonitoringJobName + ).project; + } + + /** + * Parse the location from ModelDeploymentMonitoringJob resource. + * + * @param {string} modelDeploymentMonitoringJobName + * A fully-qualified path representing ModelDeploymentMonitoringJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromModelDeploymentMonitoringJobName( + modelDeploymentMonitoringJobName: string + ) { + return this.pathTemplates.modelDeploymentMonitoringJobPathTemplate.match( + modelDeploymentMonitoringJobName + ).location; + } + + /** + * Parse the model_deployment_monitoring_job from ModelDeploymentMonitoringJob resource. + * + * @param {string} modelDeploymentMonitoringJobName + * A fully-qualified path representing ModelDeploymentMonitoringJob resource. + * @returns {string} A string representing the model_deployment_monitoring_job. + */ + matchModelDeploymentMonitoringJobFromModelDeploymentMonitoringJobName( + modelDeploymentMonitoringJobName: string + ) { + return this.pathTemplates.modelDeploymentMonitoringJobPathTemplate.match( + modelDeploymentMonitoringJobName + ).model_deployment_monitoring_job; + } + + /** + * Return a fully-qualified modelEvaluation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} model + * @param {string} evaluation + * @returns {string} Resource name string. + */ + modelEvaluationPath( + project: string, + location: string, + model: string, + evaluation: string + ) { + return this.pathTemplates.modelEvaluationPathTemplate.render({ + project: project, + location: location, + model: model, + evaluation: evaluation, + }); + } + + /** + * Parse the project from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromModelEvaluationName(modelEvaluationName: string) { + return this.pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).project; + } + + /** + * Parse the location from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromModelEvaluationName(modelEvaluationName: string) { + return this.pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).location; + } + + /** + * Parse the model from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the model. + */ + matchModelFromModelEvaluationName(modelEvaluationName: string) { + return this.pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).model; + } + + /** + * Parse the evaluation from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the evaluation. + */ + matchEvaluationFromModelEvaluationName(modelEvaluationName: string) { + return this.pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).evaluation; + } + + /** + * Return a fully-qualified modelEvaluationSlice resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} model + * @param {string} evaluation + * @param {string} slice + * @returns {string} Resource name string. + */ + modelEvaluationSlicePath( + project: string, + location: string, + model: string, + evaluation: string, + slice: string + ) { + return this.pathTemplates.modelEvaluationSlicePathTemplate.render({ + project: project, + location: location, + model: model, + evaluation: evaluation, + slice: slice, + }); + } + + /** + * Parse the project from ModelEvaluationSlice resource. + * + * @param {string} modelEvaluationSliceName + * A fully-qualified path representing ModelEvaluationSlice resource. + * @returns {string} A string representing the project. + */ + matchProjectFromModelEvaluationSliceName(modelEvaluationSliceName: string) { + return this.pathTemplates.modelEvaluationSlicePathTemplate.match( + modelEvaluationSliceName + ).project; + } + + /** + * Parse the location from ModelEvaluationSlice resource. + * + * @param {string} modelEvaluationSliceName + * A fully-qualified path representing ModelEvaluationSlice resource. + * @returns {string} A string representing the location. + */ + matchLocationFromModelEvaluationSliceName(modelEvaluationSliceName: string) { + return this.pathTemplates.modelEvaluationSlicePathTemplate.match( + modelEvaluationSliceName + ).location; + } + + /** + * Parse the model from ModelEvaluationSlice resource. + * + * @param {string} modelEvaluationSliceName + * A fully-qualified path representing ModelEvaluationSlice resource. + * @returns {string} A string representing the model. + */ + matchModelFromModelEvaluationSliceName(modelEvaluationSliceName: string) { + return this.pathTemplates.modelEvaluationSlicePathTemplate.match( + modelEvaluationSliceName + ).model; + } + + /** + * Parse the evaluation from ModelEvaluationSlice resource. + * + * @param {string} modelEvaluationSliceName + * A fully-qualified path representing ModelEvaluationSlice resource. + * @returns {string} A string representing the evaluation. + */ + matchEvaluationFromModelEvaluationSliceName( + modelEvaluationSliceName: string + ) { + return this.pathTemplates.modelEvaluationSlicePathTemplate.match( + modelEvaluationSliceName + ).evaluation; + } + + /** + * Parse the slice from ModelEvaluationSlice resource. + * + * @param {string} modelEvaluationSliceName + * A fully-qualified path representing ModelEvaluationSlice resource. + * @returns {string} A string representing the slice. + */ + matchSliceFromModelEvaluationSliceName(modelEvaluationSliceName: string) { + return this.pathTemplates.modelEvaluationSlicePathTemplate.match( + modelEvaluationSliceName + ).slice; + } + + /** + * Return a fully-qualified nasJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} nas_job + * @returns {string} Resource name string. + */ + nasJobPath(project: string, location: string, nasJob: string) { + return this.pathTemplates.nasJobPathTemplate.render({ + project: project, + location: location, + nas_job: nasJob, + }); + } + + /** + * Parse the project from NasJob resource. + * + * @param {string} nasJobName + * A fully-qualified path representing NasJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromNasJobName(nasJobName: string) { + return this.pathTemplates.nasJobPathTemplate.match(nasJobName).project; + } + + /** + * Parse the location from NasJob resource. + * + * @param {string} nasJobName + * A fully-qualified path representing NasJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromNasJobName(nasJobName: string) { + return this.pathTemplates.nasJobPathTemplate.match(nasJobName).location; + } + + /** + * Parse the nas_job from NasJob resource. + * + * @param {string} nasJobName + * A fully-qualified path representing NasJob resource. + * @returns {string} A string representing the nas_job. + */ + matchNasJobFromNasJobName(nasJobName: string) { + return this.pathTemplates.nasJobPathTemplate.match(nasJobName).nas_job; + } + + /** + * Return a fully-qualified nasTrialDetail resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} nas_job + * @param {string} nas_trial_detail + * @returns {string} Resource name string. + */ + nasTrialDetailPath( + project: string, + location: string, + nasJob: string, + nasTrialDetail: string + ) { + return this.pathTemplates.nasTrialDetailPathTemplate.render({ + project: project, + location: location, + nas_job: nasJob, + nas_trial_detail: nasTrialDetail, + }); + } + + /** + * Parse the project from NasTrialDetail resource. + * + * @param {string} nasTrialDetailName + * A fully-qualified path representing NasTrialDetail resource. + * @returns {string} A string representing the project. + */ + matchProjectFromNasTrialDetailName(nasTrialDetailName: string) { + return this.pathTemplates.nasTrialDetailPathTemplate.match( + nasTrialDetailName + ).project; + } + + /** + * Parse the location from NasTrialDetail resource. + * + * @param {string} nasTrialDetailName + * A fully-qualified path representing NasTrialDetail resource. + * @returns {string} A string representing the location. + */ + matchLocationFromNasTrialDetailName(nasTrialDetailName: string) { + return this.pathTemplates.nasTrialDetailPathTemplate.match( + nasTrialDetailName + ).location; + } + + /** + * Parse the nas_job from NasTrialDetail resource. + * + * @param {string} nasTrialDetailName + * A fully-qualified path representing NasTrialDetail resource. + * @returns {string} A string representing the nas_job. + */ + matchNasJobFromNasTrialDetailName(nasTrialDetailName: string) { + return this.pathTemplates.nasTrialDetailPathTemplate.match( + nasTrialDetailName + ).nas_job; + } + + /** + * Parse the nas_trial_detail from NasTrialDetail resource. + * + * @param {string} nasTrialDetailName + * A fully-qualified path representing NasTrialDetail resource. + * @returns {string} A string representing the nas_trial_detail. + */ + matchNasTrialDetailFromNasTrialDetailName(nasTrialDetailName: string) { + return this.pathTemplates.nasTrialDetailPathTemplate.match( + nasTrialDetailName + ).nas_trial_detail; + } + + /** + * Return a fully-qualified pipelineJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} pipeline_job + * @returns {string} Resource name string. + */ + pipelineJobPath(project: string, location: string, pipelineJob: string) { + return this.pathTemplates.pipelineJobPathTemplate.render({ + project: project, + location: location, + pipeline_job: pipelineJob, + }); + } + + /** + * Parse the project from PipelineJob resource. + * + * @param {string} pipelineJobName + * A fully-qualified path representing PipelineJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPipelineJobName(pipelineJobName: string) { + return this.pathTemplates.pipelineJobPathTemplate.match(pipelineJobName) + .project; + } + + /** + * Parse the location from PipelineJob resource. + * + * @param {string} pipelineJobName + * A fully-qualified path representing PipelineJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPipelineJobName(pipelineJobName: string) { + return this.pathTemplates.pipelineJobPathTemplate.match(pipelineJobName) + .location; + } + + /** + * Parse the pipeline_job from PipelineJob resource. + * + * @param {string} pipelineJobName + * A fully-qualified path representing PipelineJob resource. + * @returns {string} A string representing the pipeline_job. + */ + matchPipelineJobFromPipelineJobName(pipelineJobName: string) { + return this.pathTemplates.pipelineJobPathTemplate.match(pipelineJobName) + .pipeline_job; + } + + /** + * Return a fully-qualified savedQuery resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @param {string} saved_query + * @returns {string} Resource name string. + */ + savedQueryPath( + project: string, + location: string, + dataset: string, + savedQuery: string + ) { + return this.pathTemplates.savedQueryPathTemplate.render({ + project: project, + location: location, + dataset: dataset, + saved_query: savedQuery, + }); + } + + /** + * Parse the project from SavedQuery resource. + * + * @param {string} savedQueryName + * A fully-qualified path representing SavedQuery resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSavedQueryName(savedQueryName: string) { + return this.pathTemplates.savedQueryPathTemplate.match(savedQueryName) + .project; + } + + /** + * Parse the location from SavedQuery resource. + * + * @param {string} savedQueryName + * A fully-qualified path representing SavedQuery resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSavedQueryName(savedQueryName: string) { + return this.pathTemplates.savedQueryPathTemplate.match(savedQueryName) + .location; + } + + /** + * Parse the dataset from SavedQuery resource. + * + * @param {string} savedQueryName + * A fully-qualified path representing SavedQuery resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromSavedQueryName(savedQueryName: string) { + return this.pathTemplates.savedQueryPathTemplate.match(savedQueryName) + .dataset; + } + + /** + * Parse the saved_query from SavedQuery resource. + * + * @param {string} savedQueryName + * A fully-qualified path representing SavedQuery resource. + * @returns {string} A string representing the saved_query. + */ + matchSavedQueryFromSavedQueryName(savedQueryName: string) { + return this.pathTemplates.savedQueryPathTemplate.match(savedQueryName) + .saved_query; + } + + /** + * Return a fully-qualified specialistPool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} specialist_pool + * @returns {string} Resource name string. + */ + specialistPoolPath( + project: string, + location: string, + specialistPool: string + ) { + return this.pathTemplates.specialistPoolPathTemplate.render({ + project: project, + location: location, + specialist_pool: specialistPool, + }); + } + + /** + * Parse the project from SpecialistPool resource. + * + * @param {string} specialistPoolName + * A fully-qualified path representing SpecialistPool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSpecialistPoolName(specialistPoolName: string) { + return this.pathTemplates.specialistPoolPathTemplate.match( + specialistPoolName + ).project; + } + + /** + * Parse the location from SpecialistPool resource. + * + * @param {string} specialistPoolName + * A fully-qualified path representing SpecialistPool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSpecialistPoolName(specialistPoolName: string) { + return this.pathTemplates.specialistPoolPathTemplate.match( + specialistPoolName + ).location; + } + + /** + * Parse the specialist_pool from SpecialistPool resource. + * + * @param {string} specialistPoolName + * A fully-qualified path representing SpecialistPool resource. + * @returns {string} A string representing the specialist_pool. + */ + matchSpecialistPoolFromSpecialistPoolName(specialistPoolName: string) { + return this.pathTemplates.specialistPoolPathTemplate.match( + specialistPoolName + ).specialist_pool; + } + + /** + * Return a fully-qualified study resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} study + * @returns {string} Resource name string. + */ + studyPath(project: string, location: string, study: string) { + return this.pathTemplates.studyPathTemplate.render({ + project: project, + location: location, + study: study, + }); + } + + /** + * Parse the project from Study resource. + * + * @param {string} studyName + * A fully-qualified path representing Study resource. + * @returns {string} A string representing the project. + */ + matchProjectFromStudyName(studyName: string) { + return this.pathTemplates.studyPathTemplate.match(studyName).project; + } + + /** + * Parse the location from Study resource. + * + * @param {string} studyName + * A fully-qualified path representing Study resource. + * @returns {string} A string representing the location. + */ + matchLocationFromStudyName(studyName: string) { + return this.pathTemplates.studyPathTemplate.match(studyName).location; + } + + /** + * Parse the study from Study resource. + * + * @param {string} studyName + * A fully-qualified path representing Study resource. + * @returns {string} A string representing the study. + */ + matchStudyFromStudyName(studyName: string) { + return this.pathTemplates.studyPathTemplate.match(studyName).study; + } + + /** + * Return a fully-qualified tensorboard resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} tensorboard + * @returns {string} Resource name string. + */ + tensorboardPath(project: string, location: string, tensorboard: string) { + return this.pathTemplates.tensorboardPathTemplate.render({ + project: project, + location: location, + tensorboard: tensorboard, + }); + } + + /** + * Parse the project from Tensorboard resource. + * + * @param {string} tensorboardName + * A fully-qualified path representing Tensorboard resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTensorboardName(tensorboardName: string) { + return this.pathTemplates.tensorboardPathTemplate.match(tensorboardName) + .project; + } + + /** + * Parse the location from Tensorboard resource. + * + * @param {string} tensorboardName + * A fully-qualified path representing Tensorboard resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTensorboardName(tensorboardName: string) { + return this.pathTemplates.tensorboardPathTemplate.match(tensorboardName) + .location; + } + + /** + * Parse the tensorboard from Tensorboard resource. + * + * @param {string} tensorboardName + * A fully-qualified path representing Tensorboard resource. + * @returns {string} A string representing the tensorboard. + */ + matchTensorboardFromTensorboardName(tensorboardName: string) { + return this.pathTemplates.tensorboardPathTemplate.match(tensorboardName) + .tensorboard; + } + + /** + * Return a fully-qualified tensorboardExperiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} tensorboard + * @param {string} experiment + * @returns {string} Resource name string. + */ + tensorboardExperimentPath( + project: string, + location: string, + tensorboard: string, + experiment: string + ) { + return this.pathTemplates.tensorboardExperimentPathTemplate.render({ + project: project, + location: location, + tensorboard: tensorboard, + experiment: experiment, + }); + } + + /** + * Parse the project from TensorboardExperiment resource. + * + * @param {string} tensorboardExperimentName + * A fully-qualified path representing TensorboardExperiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTensorboardExperimentName(tensorboardExperimentName: string) { + return this.pathTemplates.tensorboardExperimentPathTemplate.match( + tensorboardExperimentName + ).project; + } + + /** + * Parse the location from TensorboardExperiment resource. + * + * @param {string} tensorboardExperimentName + * A fully-qualified path representing TensorboardExperiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTensorboardExperimentName( + tensorboardExperimentName: string + ) { + return this.pathTemplates.tensorboardExperimentPathTemplate.match( + tensorboardExperimentName + ).location; + } + + /** + * Parse the tensorboard from TensorboardExperiment resource. + * + * @param {string} tensorboardExperimentName + * A fully-qualified path representing TensorboardExperiment resource. + * @returns {string} A string representing the tensorboard. + */ + matchTensorboardFromTensorboardExperimentName( + tensorboardExperimentName: string + ) { + return this.pathTemplates.tensorboardExperimentPathTemplate.match( + tensorboardExperimentName + ).tensorboard; + } + + /** + * Parse the experiment from TensorboardExperiment resource. + * + * @param {string} tensorboardExperimentName + * A fully-qualified path representing TensorboardExperiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromTensorboardExperimentName( + tensorboardExperimentName: string + ) { + return this.pathTemplates.tensorboardExperimentPathTemplate.match( + tensorboardExperimentName + ).experiment; + } + + /** + * Return a fully-qualified tensorboardRun resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} tensorboard + * @param {string} experiment + * @param {string} run + * @returns {string} Resource name string. + */ + tensorboardRunPath( + project: string, + location: string, + tensorboard: string, + experiment: string, + run: string + ) { + return this.pathTemplates.tensorboardRunPathTemplate.render({ + project: project, + location: location, + tensorboard: tensorboard, + experiment: experiment, + run: run, + }); + } + + /** + * Parse the project from TensorboardRun resource. + * + * @param {string} tensorboardRunName + * A fully-qualified path representing TensorboardRun resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTensorboardRunName(tensorboardRunName: string) { + return this.pathTemplates.tensorboardRunPathTemplate.match( + tensorboardRunName + ).project; + } + + /** + * Parse the location from TensorboardRun resource. + * + * @param {string} tensorboardRunName + * A fully-qualified path representing TensorboardRun resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTensorboardRunName(tensorboardRunName: string) { + return this.pathTemplates.tensorboardRunPathTemplate.match( + tensorboardRunName + ).location; + } + + /** + * Parse the tensorboard from TensorboardRun resource. + * + * @param {string} tensorboardRunName + * A fully-qualified path representing TensorboardRun resource. + * @returns {string} A string representing the tensorboard. + */ + matchTensorboardFromTensorboardRunName(tensorboardRunName: string) { + return this.pathTemplates.tensorboardRunPathTemplate.match( + tensorboardRunName + ).tensorboard; + } + + /** + * Parse the experiment from TensorboardRun resource. + * + * @param {string} tensorboardRunName + * A fully-qualified path representing TensorboardRun resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromTensorboardRunName(tensorboardRunName: string) { + return this.pathTemplates.tensorboardRunPathTemplate.match( + tensorboardRunName + ).experiment; + } + + /** + * Parse the run from TensorboardRun resource. + * + * @param {string} tensorboardRunName + * A fully-qualified path representing TensorboardRun resource. + * @returns {string} A string representing the run. + */ + matchRunFromTensorboardRunName(tensorboardRunName: string) { + return this.pathTemplates.tensorboardRunPathTemplate.match( + tensorboardRunName + ).run; + } + + /** + * Return a fully-qualified tensorboardTimeSeries resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} tensorboard + * @param {string} experiment + * @param {string} run + * @param {string} time_series + * @returns {string} Resource name string. + */ + tensorboardTimeSeriesPath( + project: string, + location: string, + tensorboard: string, + experiment: string, + run: string, + timeSeries: string + ) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.render({ + project: project, + location: location, + tensorboard: tensorboard, + experiment: experiment, + run: run, + time_series: timeSeries, + }); + } + + /** + * Parse the project from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTensorboardTimeSeriesName(tensorboardTimeSeriesName: string) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).project; + } + + /** + * Parse the location from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTensorboardTimeSeriesName( + tensorboardTimeSeriesName: string + ) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).location; + } + + /** + * Parse the tensorboard from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the tensorboard. + */ + matchTensorboardFromTensorboardTimeSeriesName( + tensorboardTimeSeriesName: string + ) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).tensorboard; + } + + /** + * Parse the experiment from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromTensorboardTimeSeriesName( + tensorboardTimeSeriesName: string + ) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).experiment; + } + + /** + * Parse the run from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the run. + */ + matchRunFromTensorboardTimeSeriesName(tensorboardTimeSeriesName: string) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).run; + } + + /** + * Parse the time_series from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the time_series. + */ + matchTimeSeriesFromTensorboardTimeSeriesName( + tensorboardTimeSeriesName: string + ) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).time_series; + } + + /** + * Return a fully-qualified trainingPipeline resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} training_pipeline + * @returns {string} Resource name string. + */ + trainingPipelinePath( + project: string, + location: string, + trainingPipeline: string + ) { + return this.pathTemplates.trainingPipelinePathTemplate.render({ + project: project, + location: location, + training_pipeline: trainingPipeline, + }); + } + + /** + * Parse the project from TrainingPipeline resource. + * + * @param {string} trainingPipelineName + * A fully-qualified path representing TrainingPipeline resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTrainingPipelineName(trainingPipelineName: string) { + return this.pathTemplates.trainingPipelinePathTemplate.match( + trainingPipelineName + ).project; + } + + /** + * Parse the location from TrainingPipeline resource. + * + * @param {string} trainingPipelineName + * A fully-qualified path representing TrainingPipeline resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTrainingPipelineName(trainingPipelineName: string) { + return this.pathTemplates.trainingPipelinePathTemplate.match( + trainingPipelineName + ).location; + } + + /** + * Parse the training_pipeline from TrainingPipeline resource. + * + * @param {string} trainingPipelineName + * A fully-qualified path representing TrainingPipeline resource. + * @returns {string} A string representing the training_pipeline. + */ + matchTrainingPipelineFromTrainingPipelineName(trainingPipelineName: string) { + return this.pathTemplates.trainingPipelinePathTemplate.match( + trainingPipelineName + ).training_pipeline; + } + + /** + * Return a fully-qualified trial resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} study + * @param {string} trial + * @returns {string} Resource name string. + */ + trialPath(project: string, location: string, study: string, trial: string) { + return this.pathTemplates.trialPathTemplate.render({ + project: project, + location: location, + study: study, + trial: trial, + }); + } + + /** + * Parse the project from Trial resource. + * + * @param {string} trialName + * A fully-qualified path representing Trial resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTrialName(trialName: string) { + return this.pathTemplates.trialPathTemplate.match(trialName).project; + } + + /** + * Parse the location from Trial resource. + * + * @param {string} trialName + * A fully-qualified path representing Trial resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTrialName(trialName: string) { + return this.pathTemplates.trialPathTemplate.match(trialName).location; + } + + /** + * Parse the study from Trial resource. + * + * @param {string} trialName + * A fully-qualified path representing Trial resource. + * @returns {string} A string representing the study. + */ + matchStudyFromTrialName(trialName: string) { + return this.pathTemplates.trialPathTemplate.match(trialName).study; + } + + /** + * Parse the trial from Trial resource. + * + * @param {string} trialName + * A fully-qualified path representing Trial resource. + * @returns {string} A string representing the trial. + */ + matchTrialFromTrialName(trialName: string) { + return this.pathTemplates.trialPathTemplate.match(trialName).trial; + } + + /** + * 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.matchServiceStub && !this._terminated) { + return this.matchServiceStub.then(stub => { + this._terminated = true; + stub.close(); + this.iamClient.close(); + this.locationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-aiplatform/src/v1beta1/match_service_client_config.json b/packages/google-cloud-aiplatform/src/v1beta1/match_service_client_config.json new file mode 100644 index 00000000000..935371a2a10 --- /dev/null +++ b/packages/google-cloud-aiplatform/src/v1beta1/match_service_client_config.json @@ -0,0 +1,34 @@ +{ + "interfaces": { + "google.cloud.aiplatform.v1beta1.MatchService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "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 + } + }, + "methods": { + "FindNeighbors": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ReadIndexDatapoints": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-aiplatform/src/v1beta1/match_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/match_service_proto_list.json new file mode 100644 index 00000000000..aa3de3bda26 --- /dev/null +++ b/packages/google-cloud-aiplatform/src/v1beta1/match_service_proto_list.json @@ -0,0 +1,124 @@ +[ + "../../protos/google/cloud/aiplatform/v1beta1/accelerator_type.proto", + "../../protos/google/cloud/aiplatform/v1beta1/annotation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/annotation_spec.proto", + "../../protos/google/cloud/aiplatform/v1beta1/artifact.proto", + "../../protos/google/cloud/aiplatform/v1beta1/batch_prediction_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/completion_stats.proto", + "../../protos/google/cloud/aiplatform/v1beta1/context.proto", + "../../protos/google/cloud/aiplatform/v1beta1/custom_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/data_item.proto", + "../../protos/google/cloud/aiplatform/v1beta1/data_labeling_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/dataset.proto", + "../../protos/google/cloud/aiplatform/v1beta1/dataset_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/deployed_index_ref.proto", + "../../protos/google/cloud/aiplatform/v1beta1/deployed_model_ref.proto", + "../../protos/google/cloud/aiplatform/v1beta1/deployment_resource_pool.proto", + "../../protos/google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/encryption_spec.proto", + "../../protos/google/cloud/aiplatform/v1beta1/endpoint.proto", + "../../protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/entity_type.proto", + "../../protos/google/cloud/aiplatform/v1beta1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1beta1/event.proto", + "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", + "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/explanation_metadata.proto", + "../../protos/google/cloud/aiplatform/v1beta1/feature.proto", + "../../protos/google/cloud/aiplatform/v1beta1/feature_monitoring_stats.proto", + "../../protos/google/cloud/aiplatform/v1beta1/feature_selector.proto", + "../../protos/google/cloud/aiplatform/v1beta1/featurestore.proto", + "../../protos/google/cloud/aiplatform/v1beta1/featurestore_monitoring.proto", + "../../protos/google/cloud/aiplatform/v1beta1/featurestore_online_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/featurestore_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/hyperparameter_tuning_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/index.proto", + "../../protos/google/cloud/aiplatform/v1beta1/index_endpoint.proto", + "../../protos/google/cloud/aiplatform/v1beta1/index_endpoint_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/index_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/io.proto", + "../../protos/google/cloud/aiplatform/v1beta1/job_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/job_state.proto", + "../../protos/google/cloud/aiplatform/v1beta1/lineage_subgraph.proto", + "../../protos/google/cloud/aiplatform/v1beta1/machine_resources.proto", + "../../protos/google/cloud/aiplatform/v1beta1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1beta1/match_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/metadata_schema.proto", + "../../protos/google/cloud/aiplatform/v1beta1/metadata_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/metadata_store.proto", + "../../protos/google/cloud/aiplatform/v1beta1/migratable_resource.proto", + "../../protos/google/cloud/aiplatform/v1beta1/migration_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_deployment_monitoring_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_monitoring.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/operation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/pipeline_failure_policy.proto", + "../../protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", + "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/annotation_payload.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/annotation_spec_color.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/data_item_payload.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/dataset_metadata.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/geometry.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/image_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/image_object_detection.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/image_segmentation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/text_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/text_extraction.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/text_sentiment.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/video_action_recognition.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/video_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/video_object_tracking.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/image_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/image_object_detection.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/image_segmentation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/video_action_recognition.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/video_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/video_object_tracking.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/image_object_detection.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/image_segmentation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/tabular_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/tabular_regression.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/text_extraction.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/text_sentiment.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/time_series_forecasting.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_action_recognition.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_object_tracking.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_object_detection.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_segmentation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_tables.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_extraction.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_sentiment.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_time_series_forecasting.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_action_recognition.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_object_tracking.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/export_evaluated_data_items_config.proto", + "../../protos/google/cloud/aiplatform/v1beta1/service_networking.proto", + "../../protos/google/cloud/aiplatform/v1beta1/specialist_pool.proto", + "../../protos/google/cloud/aiplatform/v1beta1/specialist_pool_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/study.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard_data.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard_experiment.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard_run.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard_time_series.proto", + "../../protos/google/cloud/aiplatform/v1beta1/training_pipeline.proto", + "../../protos/google/cloud/aiplatform/v1beta1/types.proto", + "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", + "../../protos/google/cloud/aiplatform/v1beta1/value.proto", + "../../protos/google/cloud/aiplatform/v1beta1/vizier_service.proto" +] diff --git a/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_proto_list.json index 9bd0ad172e5..aa3de3bda26 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_proto_list.json @@ -42,6 +42,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1beta1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1beta1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1beta1/match_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_store.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/migration_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/migration_service_proto_list.json index 9bd0ad172e5..aa3de3bda26 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/migration_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/migration_service_proto_list.json @@ -42,6 +42,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1beta1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1beta1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1beta1/match_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_store.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/model_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/model_service_proto_list.json index 9bd0ad172e5..aa3de3bda26 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/model_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/model_service_proto_list.json @@ -42,6 +42,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1beta1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1beta1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1beta1/match_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_store.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_proto_list.json index 9bd0ad172e5..aa3de3bda26 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_proto_list.json @@ -42,6 +42,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1beta1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1beta1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1beta1/match_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_store.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_proto_list.json index 9bd0ad172e5..aa3de3bda26 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_proto_list.json @@ -42,6 +42,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1beta1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1beta1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1beta1/match_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_store.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_proto_list.json index 9bd0ad172e5..aa3de3bda26 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_proto_list.json @@ -42,6 +42,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1beta1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1beta1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1beta1/match_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_store.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_proto_list.json index 9bd0ad172e5..aa3de3bda26 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_proto_list.json @@ -42,6 +42,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1beta1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1beta1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1beta1/match_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_store.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_proto_list.json index 9bd0ad172e5..aa3de3bda26 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_proto_list.json @@ -42,6 +42,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/lineage_subgraph.proto", "../../protos/google/cloud/aiplatform/v1beta1/machine_resources.proto", "../../protos/google/cloud/aiplatform/v1beta1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1beta1/match_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_schema.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/metadata_store.proto", diff --git a/packages/google-cloud-aiplatform/test/gapic_match_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_match_service_v1beta1.ts new file mode 100644 index 00000000000..2d8291cf67d --- /dev/null +++ b/packages/google-cloud-aiplatform/test/gapic_match_service_v1beta1.ts @@ -0,0 +1,3692 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as matchserviceModule from '../src'; + +import {protobuf, IamProtos, LocationProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function 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('v1beta1.MatchServiceClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + matchserviceModule.v1beta1.MatchServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + matchserviceModule.v1beta1.MatchServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = matchserviceModule.v1beta1.MatchServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new matchserviceModule.v1beta1.MatchServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.matchServiceStub, undefined); + await client.initialize(); + assert(client.matchServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.matchServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.matchServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + 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 matchserviceModule.v1beta1.MatchServiceClient({ + 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('findNeighbors', () => { + it('invokes findNeighbors without error', async () => { + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.FindNeighborsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.FindNeighborsRequest', + ['indexEndpoint'] + ); + request.indexEndpoint = defaultValue1; + const expectedHeaderRequestParams = `index_endpoint=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.FindNeighborsResponse() + ); + client.innerApiCalls.findNeighbors = stubSimpleCall(expectedResponse); + const [response] = await client.findNeighbors(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.findNeighbors as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.findNeighbors as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes findNeighbors without error using callback', async () => { + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.FindNeighborsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.FindNeighborsRequest', + ['indexEndpoint'] + ); + request.indexEndpoint = defaultValue1; + const expectedHeaderRequestParams = `index_endpoint=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.FindNeighborsResponse() + ); + client.innerApiCalls.findNeighbors = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.findNeighbors( + request, + ( + err?: Error | null, + result?: protos.google.cloud.aiplatform.v1beta1.IFindNeighborsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.findNeighbors as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.findNeighbors as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes findNeighbors with error', async () => { + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.FindNeighborsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.FindNeighborsRequest', + ['indexEndpoint'] + ); + request.indexEndpoint = defaultValue1; + const expectedHeaderRequestParams = `index_endpoint=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.findNeighbors = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.findNeighbors(request), expectedError); + const actualRequest = ( + client.innerApiCalls.findNeighbors as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.findNeighbors as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes findNeighbors with closed client', async () => { + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.FindNeighborsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.FindNeighborsRequest', + ['indexEndpoint'] + ); + request.indexEndpoint = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.findNeighbors(request), expectedError); + }); + }); + + describe('readIndexDatapoints', () => { + it('invokes readIndexDatapoints without error', async () => { + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest', + ['indexEndpoint'] + ); + request.indexEndpoint = defaultValue1; + const expectedHeaderRequestParams = `index_endpoint=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse() + ); + client.innerApiCalls.readIndexDatapoints = + stubSimpleCall(expectedResponse); + const [response] = await client.readIndexDatapoints(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.readIndexDatapoints as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readIndexDatapoints as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes readIndexDatapoints without error using callback', async () => { + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest', + ['indexEndpoint'] + ); + request.indexEndpoint = defaultValue1; + const expectedHeaderRequestParams = `index_endpoint=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ReadIndexDatapointsResponse() + ); + client.innerApiCalls.readIndexDatapoints = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.readIndexDatapoints( + request, + ( + err?: Error | null, + result?: protos.google.cloud.aiplatform.v1beta1.IReadIndexDatapointsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.readIndexDatapoints as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readIndexDatapoints as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes readIndexDatapoints with error', async () => { + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest', + ['indexEndpoint'] + ); + request.indexEndpoint = defaultValue1; + const expectedHeaderRequestParams = `index_endpoint=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.readIndexDatapoints = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.readIndexDatapoints(request), expectedError); + const actualRequest = ( + client.innerApiCalls.readIndexDatapoints as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.readIndexDatapoints as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes readIndexDatapoints with closed client', async () => { + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.ReadIndexDatapointsRequest', + ['indexEndpoint'] + ); + request.indexEndpoint = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.readIndexDatapoints(request), expectedError); + }); + }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub).getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.getIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub).getCall(0)); + }); + it('invokes setIamPolicy with error', async () => { + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.setIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions( + request, + expectedOptions + ); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes testIamPermissions without error using callback', async () => { + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.TestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub).getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.testIamPermissions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.testIamPermissions(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + describe('annotation', () => { + const fakePath = '/rendered/path/annotation'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + dataset: 'datasetValue', + data_item: 'dataItemValue', + annotation: 'annotationValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.annotationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.annotationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('annotationPath', () => { + const result = client.annotationPath( + 'projectValue', + 'locationValue', + 'datasetValue', + 'dataItemValue', + 'annotationValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.annotationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAnnotationName', () => { + const result = client.matchProjectFromAnnotationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.annotationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAnnotationName', () => { + const result = client.matchLocationFromAnnotationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.annotationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDatasetFromAnnotationName', () => { + const result = client.matchDatasetFromAnnotationName(fakePath); + assert.strictEqual(result, 'datasetValue'); + assert( + (client.pathTemplates.annotationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataItemFromAnnotationName', () => { + const result = client.matchDataItemFromAnnotationName(fakePath); + assert.strictEqual(result, 'dataItemValue'); + assert( + (client.pathTemplates.annotationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAnnotationFromAnnotationName', () => { + const result = client.matchAnnotationFromAnnotationName(fakePath); + assert.strictEqual(result, 'annotationValue'); + assert( + (client.pathTemplates.annotationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('annotationSpec', () => { + const fakePath = '/rendered/path/annotationSpec'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + dataset: 'datasetValue', + annotation_spec: 'annotationSpecValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.annotationSpecPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.annotationSpecPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('annotationSpecPath', () => { + const result = client.annotationSpecPath( + 'projectValue', + 'locationValue', + 'datasetValue', + 'annotationSpecValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.annotationSpecPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAnnotationSpecName', () => { + const result = client.matchProjectFromAnnotationSpecName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.annotationSpecPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAnnotationSpecName', () => { + const result = client.matchLocationFromAnnotationSpecName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.annotationSpecPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDatasetFromAnnotationSpecName', () => { + const result = client.matchDatasetFromAnnotationSpecName(fakePath); + assert.strictEqual(result, 'datasetValue'); + assert( + (client.pathTemplates.annotationSpecPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAnnotationSpecFromAnnotationSpecName', () => { + const result = + client.matchAnnotationSpecFromAnnotationSpecName(fakePath); + assert.strictEqual(result, 'annotationSpecValue'); + assert( + (client.pathTemplates.annotationSpecPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('artifact', () => { + const fakePath = '/rendered/path/artifact'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + metadata_store: 'metadataStoreValue', + artifact: 'artifactValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.artifactPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.artifactPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('artifactPath', () => { + const result = client.artifactPath( + 'projectValue', + 'locationValue', + 'metadataStoreValue', + 'artifactValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.artifactPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromArtifactName', () => { + const result = client.matchProjectFromArtifactName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.artifactPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromArtifactName', () => { + const result = client.matchLocationFromArtifactName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.artifactPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetadataStoreFromArtifactName', () => { + const result = client.matchMetadataStoreFromArtifactName(fakePath); + assert.strictEqual(result, 'metadataStoreValue'); + assert( + (client.pathTemplates.artifactPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchArtifactFromArtifactName', () => { + const result = client.matchArtifactFromArtifactName(fakePath); + assert.strictEqual(result, 'artifactValue'); + assert( + (client.pathTemplates.artifactPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('batchPredictionJob', () => { + const fakePath = '/rendered/path/batchPredictionJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + batch_prediction_job: 'batchPredictionJobValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.batchPredictionJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.batchPredictionJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('batchPredictionJobPath', () => { + const result = client.batchPredictionJobPath( + 'projectValue', + 'locationValue', + 'batchPredictionJobValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.batchPredictionJobPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromBatchPredictionJobName', () => { + const result = client.matchProjectFromBatchPredictionJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.batchPredictionJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromBatchPredictionJobName', () => { + const result = client.matchLocationFromBatchPredictionJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.batchPredictionJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBatchPredictionJobFromBatchPredictionJobName', () => { + const result = + client.matchBatchPredictionJobFromBatchPredictionJobName(fakePath); + assert.strictEqual(result, 'batchPredictionJobValue'); + assert( + ( + client.pathTemplates.batchPredictionJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('context', () => { + const fakePath = '/rendered/path/context'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + metadata_store: 'metadataStoreValue', + context: 'contextValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.contextPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.contextPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('contextPath', () => { + const result = client.contextPath( + 'projectValue', + 'locationValue', + 'metadataStoreValue', + 'contextValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.contextPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromContextName', () => { + const result = client.matchProjectFromContextName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.contextPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromContextName', () => { + const result = client.matchLocationFromContextName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.contextPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetadataStoreFromContextName', () => { + const result = client.matchMetadataStoreFromContextName(fakePath); + assert.strictEqual(result, 'metadataStoreValue'); + assert( + (client.pathTemplates.contextPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchContextFromContextName', () => { + const result = client.matchContextFromContextName(fakePath); + assert.strictEqual(result, 'contextValue'); + assert( + (client.pathTemplates.contextPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('customJob', () => { + const fakePath = '/rendered/path/customJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + custom_job: 'customJobValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.customJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.customJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('customJobPath', () => { + const result = client.customJobPath( + 'projectValue', + 'locationValue', + 'customJobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.customJobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromCustomJobName', () => { + const result = client.matchProjectFromCustomJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.customJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromCustomJobName', () => { + const result = client.matchLocationFromCustomJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.customJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCustomJobFromCustomJobName', () => { + const result = client.matchCustomJobFromCustomJobName(fakePath); + assert.strictEqual(result, 'customJobValue'); + assert( + (client.pathTemplates.customJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('dataItem', () => { + const fakePath = '/rendered/path/dataItem'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + dataset: 'datasetValue', + data_item: 'dataItemValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataItemPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.dataItemPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('dataItemPath', () => { + const result = client.dataItemPath( + 'projectValue', + 'locationValue', + 'datasetValue', + 'dataItemValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.dataItemPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDataItemName', () => { + const result = client.matchProjectFromDataItemName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.dataItemPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromDataItemName', () => { + const result = client.matchLocationFromDataItemName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.dataItemPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDatasetFromDataItemName', () => { + const result = client.matchDatasetFromDataItemName(fakePath); + assert.strictEqual(result, 'datasetValue'); + assert( + (client.pathTemplates.dataItemPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataItemFromDataItemName', () => { + const result = client.matchDataItemFromDataItemName(fakePath); + assert.strictEqual(result, 'dataItemValue'); + assert( + (client.pathTemplates.dataItemPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('dataLabelingJob', () => { + const fakePath = '/rendered/path/dataLabelingJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_labeling_job: 'dataLabelingJobValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataLabelingJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.dataLabelingJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('dataLabelingJobPath', () => { + const result = client.dataLabelingJobPath( + 'projectValue', + 'locationValue', + 'dataLabelingJobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.dataLabelingJobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDataLabelingJobName', () => { + const result = client.matchProjectFromDataLabelingJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.dataLabelingJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromDataLabelingJobName', () => { + const result = client.matchLocationFromDataLabelingJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.dataLabelingJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataLabelingJobFromDataLabelingJobName', () => { + const result = + client.matchDataLabelingJobFromDataLabelingJobName(fakePath); + assert.strictEqual(result, 'dataLabelingJobValue'); + assert( + (client.pathTemplates.dataLabelingJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('dataset', () => { + const fakePath = '/rendered/path/dataset'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + dataset: 'datasetValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.datasetPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.datasetPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('datasetPath', () => { + const result = client.datasetPath( + 'projectValue', + 'locationValue', + 'datasetValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.datasetPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDatasetName', () => { + const result = client.matchProjectFromDatasetName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.datasetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromDatasetName', () => { + const result = client.matchLocationFromDatasetName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.datasetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDatasetFromDatasetName', () => { + const result = client.matchDatasetFromDatasetName(fakePath); + assert.strictEqual(result, 'datasetValue'); + assert( + (client.pathTemplates.datasetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('deploymentResourcePool', () => { + const fakePath = '/rendered/path/deploymentResourcePool'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + deployment_resource_pool: 'deploymentResourcePoolValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.deploymentResourcePoolPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.deploymentResourcePoolPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('deploymentResourcePoolPath', () => { + const result = client.deploymentResourcePoolPath( + 'projectValue', + 'locationValue', + 'deploymentResourcePoolValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.deploymentResourcePoolPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDeploymentResourcePoolName', () => { + const result = + client.matchProjectFromDeploymentResourcePoolName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.deploymentResourcePoolPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromDeploymentResourcePoolName', () => { + const result = + client.matchLocationFromDeploymentResourcePoolName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.deploymentResourcePoolPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDeploymentResourcePoolFromDeploymentResourcePoolName', () => { + const result = + client.matchDeploymentResourcePoolFromDeploymentResourcePoolName( + fakePath + ); + assert.strictEqual(result, 'deploymentResourcePoolValue'); + assert( + ( + client.pathTemplates.deploymentResourcePoolPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('endpoint', () => { + const fakePath = '/rendered/path/endpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.endpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.endpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('endpointPath', () => { + const result = client.endpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.endpointPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromEndpointName', () => { + const result = client.matchProjectFromEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.endpointPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromEndpointName', () => { + const result = client.matchLocationFromEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.endpointPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromEndpointName', () => { + const result = client.matchEndpointFromEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + (client.pathTemplates.endpointPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('entityType', () => { + const fakePath = '/rendered/path/entityType'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + featurestore: 'featurestoreValue', + entity_type: 'entityTypeValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.entityTypePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.entityTypePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('entityTypePath', () => { + const result = client.entityTypePath( + 'projectValue', + 'locationValue', + 'featurestoreValue', + 'entityTypeValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.entityTypePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromEntityTypeName', () => { + const result = client.matchProjectFromEntityTypeName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromEntityTypeName', () => { + const result = client.matchLocationFromEntityTypeName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeaturestoreFromEntityTypeName', () => { + const result = client.matchFeaturestoreFromEntityTypeName(fakePath); + assert.strictEqual(result, 'featurestoreValue'); + assert( + (client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEntityTypeFromEntityTypeName', () => { + const result = client.matchEntityTypeFromEntityTypeName(fakePath); + assert.strictEqual(result, 'entityTypeValue'); + assert( + (client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('execution', () => { + const fakePath = '/rendered/path/execution'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + metadata_store: 'metadataStoreValue', + execution: 'executionValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.executionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.executionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('executionPath', () => { + const result = client.executionPath( + 'projectValue', + 'locationValue', + 'metadataStoreValue', + 'executionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.executionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromExecutionName', () => { + const result = client.matchProjectFromExecutionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.executionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromExecutionName', () => { + const result = client.matchLocationFromExecutionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.executionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetadataStoreFromExecutionName', () => { + const result = client.matchMetadataStoreFromExecutionName(fakePath); + assert.strictEqual(result, 'metadataStoreValue'); + assert( + (client.pathTemplates.executionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExecutionFromExecutionName', () => { + const result = client.matchExecutionFromExecutionName(fakePath); + assert.strictEqual(result, 'executionValue'); + assert( + (client.pathTemplates.executionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('feature', () => { + const fakePath = '/rendered/path/feature'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + featurestore: 'featurestoreValue', + entity_type: 'entityTypeValue', + feature: 'featureValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.featurePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.featurePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('featurePath', () => { + const result = client.featurePath( + 'projectValue', + 'locationValue', + 'featurestoreValue', + 'entityTypeValue', + 'featureValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.featurePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromFeatureName', () => { + const result = client.matchProjectFromFeatureName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.featurePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFeatureName', () => { + const result = client.matchLocationFromFeatureName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.featurePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeaturestoreFromFeatureName', () => { + const result = client.matchFeaturestoreFromFeatureName(fakePath); + assert.strictEqual(result, 'featurestoreValue'); + assert( + (client.pathTemplates.featurePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEntityTypeFromFeatureName', () => { + const result = client.matchEntityTypeFromFeatureName(fakePath); + assert.strictEqual(result, 'entityTypeValue'); + assert( + (client.pathTemplates.featurePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeatureFromFeatureName', () => { + const result = client.matchFeatureFromFeatureName(fakePath); + assert.strictEqual(result, 'featureValue'); + assert( + (client.pathTemplates.featurePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('featurestore', () => { + const fakePath = '/rendered/path/featurestore'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + featurestore: 'featurestoreValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.featurestorePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.featurestorePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('featurestorePath', () => { + const result = client.featurestorePath( + 'projectValue', + 'locationValue', + 'featurestoreValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.featurestorePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromFeaturestoreName', () => { + const result = client.matchProjectFromFeaturestoreName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.featurestorePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFeaturestoreName', () => { + const result = client.matchLocationFromFeaturestoreName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.featurestorePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeaturestoreFromFeaturestoreName', () => { + const result = client.matchFeaturestoreFromFeaturestoreName(fakePath); + assert.strictEqual(result, 'featurestoreValue'); + assert( + (client.pathTemplates.featurestorePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('hyperparameterTuningJob', () => { + const fakePath = '/rendered/path/hyperparameterTuningJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + hyperparameter_tuning_job: 'hyperparameterTuningJobValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.hyperparameterTuningJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.hyperparameterTuningJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('hyperparameterTuningJobPath', () => { + const result = client.hyperparameterTuningJobPath( + 'projectValue', + 'locationValue', + 'hyperparameterTuningJobValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.hyperparameterTuningJobPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromHyperparameterTuningJobName', () => { + const result = + client.matchProjectFromHyperparameterTuningJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.hyperparameterTuningJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromHyperparameterTuningJobName', () => { + const result = + client.matchLocationFromHyperparameterTuningJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.hyperparameterTuningJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchHyperparameterTuningJobFromHyperparameterTuningJobName', () => { + const result = + client.matchHyperparameterTuningJobFromHyperparameterTuningJobName( + fakePath + ); + assert.strictEqual(result, 'hyperparameterTuningJobValue'); + assert( + ( + client.pathTemplates.hyperparameterTuningJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('index', () => { + const fakePath = '/rendered/path/index'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + index: 'indexValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.indexPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.indexPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('indexPath', () => { + const result = client.indexPath( + 'projectValue', + 'locationValue', + 'indexValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.indexPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromIndexName', () => { + const result = client.matchProjectFromIndexName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.indexPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromIndexName', () => { + const result = client.matchLocationFromIndexName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.indexPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchIndexFromIndexName', () => { + const result = client.matchIndexFromIndexName(fakePath); + assert.strictEqual(result, 'indexValue'); + assert( + (client.pathTemplates.indexPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('indexEndpoint', () => { + const fakePath = '/rendered/path/indexEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + index_endpoint: 'indexEndpointValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.indexEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.indexEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('indexEndpointPath', () => { + const result = client.indexEndpointPath( + 'projectValue', + 'locationValue', + 'indexEndpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.indexEndpointPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromIndexEndpointName', () => { + const result = client.matchProjectFromIndexEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.indexEndpointPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromIndexEndpointName', () => { + const result = client.matchLocationFromIndexEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.indexEndpointPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchIndexEndpointFromIndexEndpointName', () => { + const result = client.matchIndexEndpointFromIndexEndpointName(fakePath); + assert.strictEqual(result, 'indexEndpointValue'); + assert( + (client.pathTemplates.indexEndpointPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('metadataSchema', () => { + const fakePath = '/rendered/path/metadataSchema'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + metadata_store: 'metadataStoreValue', + metadata_schema: 'metadataSchemaValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.metadataSchemaPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.metadataSchemaPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('metadataSchemaPath', () => { + const result = client.metadataSchemaPath( + 'projectValue', + 'locationValue', + 'metadataStoreValue', + 'metadataSchemaValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.metadataSchemaPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromMetadataSchemaName', () => { + const result = client.matchProjectFromMetadataSchemaName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.metadataSchemaPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromMetadataSchemaName', () => { + const result = client.matchLocationFromMetadataSchemaName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.metadataSchemaPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetadataStoreFromMetadataSchemaName', () => { + const result = + client.matchMetadataStoreFromMetadataSchemaName(fakePath); + assert.strictEqual(result, 'metadataStoreValue'); + assert( + (client.pathTemplates.metadataSchemaPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetadataSchemaFromMetadataSchemaName', () => { + const result = + client.matchMetadataSchemaFromMetadataSchemaName(fakePath); + assert.strictEqual(result, 'metadataSchemaValue'); + assert( + (client.pathTemplates.metadataSchemaPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('metadataStore', () => { + const fakePath = '/rendered/path/metadataStore'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + metadata_store: 'metadataStoreValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.metadataStorePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.metadataStorePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('metadataStorePath', () => { + const result = client.metadataStorePath( + 'projectValue', + 'locationValue', + 'metadataStoreValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.metadataStorePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromMetadataStoreName', () => { + const result = client.matchProjectFromMetadataStoreName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.metadataStorePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromMetadataStoreName', () => { + const result = client.matchLocationFromMetadataStoreName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.metadataStorePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetadataStoreFromMetadataStoreName', () => { + const result = client.matchMetadataStoreFromMetadataStoreName(fakePath); + assert.strictEqual(result, 'metadataStoreValue'); + assert( + (client.pathTemplates.metadataStorePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('model', () => { + const fakePath = '/rendered/path/model'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + model: 'modelValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.modelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.modelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('modelPath', () => { + const result = client.modelPath( + 'projectValue', + 'locationValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.modelPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromModelName', () => { + const result = client.matchProjectFromModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.modelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromModelName', () => { + const result = client.matchLocationFromModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.modelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromModelName', () => { + const result = client.matchModelFromModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + (client.pathTemplates.modelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('modelDeploymentMonitoringJob', () => { + const fakePath = '/rendered/path/modelDeploymentMonitoringJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + model_deployment_monitoring_job: 'modelDeploymentMonitoringJobValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.modelDeploymentMonitoringJobPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.modelDeploymentMonitoringJobPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('modelDeploymentMonitoringJobPath', () => { + const result = client.modelDeploymentMonitoringJobPath( + 'projectValue', + 'locationValue', + 'modelDeploymentMonitoringJobValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.modelDeploymentMonitoringJobPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromModelDeploymentMonitoringJobName', () => { + const result = + client.matchProjectFromModelDeploymentMonitoringJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.modelDeploymentMonitoringJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromModelDeploymentMonitoringJobName', () => { + const result = + client.matchLocationFromModelDeploymentMonitoringJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.modelDeploymentMonitoringJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelDeploymentMonitoringJobFromModelDeploymentMonitoringJobName', () => { + const result = + client.matchModelDeploymentMonitoringJobFromModelDeploymentMonitoringJobName( + fakePath + ); + assert.strictEqual(result, 'modelDeploymentMonitoringJobValue'); + assert( + ( + client.pathTemplates.modelDeploymentMonitoringJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('modelEvaluation', () => { + const fakePath = '/rendered/path/modelEvaluation'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + model: 'modelValue', + evaluation: 'evaluationValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.modelEvaluationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.modelEvaluationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('modelEvaluationPath', () => { + const result = client.modelEvaluationPath( + 'projectValue', + 'locationValue', + 'modelValue', + 'evaluationValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.modelEvaluationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromModelEvaluationName', () => { + const result = client.matchProjectFromModelEvaluationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.modelEvaluationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromModelEvaluationName', () => { + const result = client.matchLocationFromModelEvaluationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.modelEvaluationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromModelEvaluationName', () => { + const result = client.matchModelFromModelEvaluationName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + (client.pathTemplates.modelEvaluationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEvaluationFromModelEvaluationName', () => { + const result = client.matchEvaluationFromModelEvaluationName(fakePath); + assert.strictEqual(result, 'evaluationValue'); + assert( + (client.pathTemplates.modelEvaluationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('modelEvaluationSlice', () => { + const fakePath = '/rendered/path/modelEvaluationSlice'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + model: 'modelValue', + evaluation: 'evaluationValue', + slice: 'sliceValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.modelEvaluationSlicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.modelEvaluationSlicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('modelEvaluationSlicePath', () => { + const result = client.modelEvaluationSlicePath( + 'projectValue', + 'locationValue', + 'modelValue', + 'evaluationValue', + 'sliceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.modelEvaluationSlicePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromModelEvaluationSliceName', () => { + const result = + client.matchProjectFromModelEvaluationSliceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.modelEvaluationSlicePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromModelEvaluationSliceName', () => { + const result = + client.matchLocationFromModelEvaluationSliceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.modelEvaluationSlicePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromModelEvaluationSliceName', () => { + const result = client.matchModelFromModelEvaluationSliceName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.modelEvaluationSlicePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEvaluationFromModelEvaluationSliceName', () => { + const result = + client.matchEvaluationFromModelEvaluationSliceName(fakePath); + assert.strictEqual(result, 'evaluationValue'); + assert( + ( + client.pathTemplates.modelEvaluationSlicePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSliceFromModelEvaluationSliceName', () => { + const result = client.matchSliceFromModelEvaluationSliceName(fakePath); + assert.strictEqual(result, 'sliceValue'); + assert( + ( + client.pathTemplates.modelEvaluationSlicePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('nasJob', () => { + const fakePath = '/rendered/path/nasJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + nas_job: 'nasJobValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.nasJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.nasJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('nasJobPath', () => { + const result = client.nasJobPath( + 'projectValue', + 'locationValue', + 'nasJobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.nasJobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromNasJobName', () => { + const result = client.matchProjectFromNasJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.nasJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromNasJobName', () => { + const result = client.matchLocationFromNasJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.nasJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNasJobFromNasJobName', () => { + const result = client.matchNasJobFromNasJobName(fakePath); + assert.strictEqual(result, 'nasJobValue'); + assert( + (client.pathTemplates.nasJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('nasTrialDetail', () => { + const fakePath = '/rendered/path/nasTrialDetail'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + nas_job: 'nasJobValue', + nas_trial_detail: 'nasTrialDetailValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.nasTrialDetailPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.nasTrialDetailPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('nasTrialDetailPath', () => { + const result = client.nasTrialDetailPath( + 'projectValue', + 'locationValue', + 'nasJobValue', + 'nasTrialDetailValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.nasTrialDetailPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromNasTrialDetailName', () => { + const result = client.matchProjectFromNasTrialDetailName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.nasTrialDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromNasTrialDetailName', () => { + const result = client.matchLocationFromNasTrialDetailName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.nasTrialDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNasJobFromNasTrialDetailName', () => { + const result = client.matchNasJobFromNasTrialDetailName(fakePath); + assert.strictEqual(result, 'nasJobValue'); + assert( + (client.pathTemplates.nasTrialDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNasTrialDetailFromNasTrialDetailName', () => { + const result = + client.matchNasTrialDetailFromNasTrialDetailName(fakePath); + assert.strictEqual(result, 'nasTrialDetailValue'); + assert( + (client.pathTemplates.nasTrialDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('pipelineJob', () => { + const fakePath = '/rendered/path/pipelineJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + pipeline_job: 'pipelineJobValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.pipelineJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.pipelineJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('pipelineJobPath', () => { + const result = client.pipelineJobPath( + 'projectValue', + 'locationValue', + 'pipelineJobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.pipelineJobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPipelineJobName', () => { + const result = client.matchProjectFromPipelineJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.pipelineJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPipelineJobName', () => { + const result = client.matchLocationFromPipelineJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.pipelineJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPipelineJobFromPipelineJobName', () => { + const result = client.matchPipelineJobFromPipelineJobName(fakePath); + assert.strictEqual(result, 'pipelineJobValue'); + assert( + (client.pathTemplates.pipelineJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('savedQuery', () => { + const fakePath = '/rendered/path/savedQuery'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + dataset: 'datasetValue', + saved_query: 'savedQueryValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.savedQueryPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.savedQueryPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('savedQueryPath', () => { + const result = client.savedQueryPath( + 'projectValue', + 'locationValue', + 'datasetValue', + 'savedQueryValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.savedQueryPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromSavedQueryName', () => { + const result = client.matchProjectFromSavedQueryName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.savedQueryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromSavedQueryName', () => { + const result = client.matchLocationFromSavedQueryName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.savedQueryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDatasetFromSavedQueryName', () => { + const result = client.matchDatasetFromSavedQueryName(fakePath); + assert.strictEqual(result, 'datasetValue'); + assert( + (client.pathTemplates.savedQueryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSavedQueryFromSavedQueryName', () => { + const result = client.matchSavedQueryFromSavedQueryName(fakePath); + assert.strictEqual(result, 'savedQueryValue'); + assert( + (client.pathTemplates.savedQueryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('specialistPool', () => { + const fakePath = '/rendered/path/specialistPool'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + specialist_pool: 'specialistPoolValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.specialistPoolPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.specialistPoolPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('specialistPoolPath', () => { + const result = client.specialistPoolPath( + 'projectValue', + 'locationValue', + 'specialistPoolValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.specialistPoolPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromSpecialistPoolName', () => { + const result = client.matchProjectFromSpecialistPoolName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.specialistPoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromSpecialistPoolName', () => { + const result = client.matchLocationFromSpecialistPoolName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.specialistPoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSpecialistPoolFromSpecialistPoolName', () => { + const result = + client.matchSpecialistPoolFromSpecialistPoolName(fakePath); + assert.strictEqual(result, 'specialistPoolValue'); + assert( + (client.pathTemplates.specialistPoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('study', () => { + const fakePath = '/rendered/path/study'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + study: 'studyValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.studyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.studyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('studyPath', () => { + const result = client.studyPath( + 'projectValue', + 'locationValue', + 'studyValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.studyPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromStudyName', () => { + const result = client.matchProjectFromStudyName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.studyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromStudyName', () => { + const result = client.matchLocationFromStudyName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.studyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchStudyFromStudyName', () => { + const result = client.matchStudyFromStudyName(fakePath); + assert.strictEqual(result, 'studyValue'); + assert( + (client.pathTemplates.studyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('tensorboard', () => { + const fakePath = '/rendered/path/tensorboard'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + tensorboard: 'tensorboardValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.tensorboardPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.tensorboardPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('tensorboardPath', () => { + const result = client.tensorboardPath( + 'projectValue', + 'locationValue', + 'tensorboardValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.tensorboardPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTensorboardName', () => { + const result = client.matchProjectFromTensorboardName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.tensorboardPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromTensorboardName', () => { + const result = client.matchLocationFromTensorboardName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.tensorboardPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTensorboardFromTensorboardName', () => { + const result = client.matchTensorboardFromTensorboardName(fakePath); + assert.strictEqual(result, 'tensorboardValue'); + assert( + (client.pathTemplates.tensorboardPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('tensorboardExperiment', () => { + const fakePath = '/rendered/path/tensorboardExperiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + tensorboard: 'tensorboardValue', + experiment: 'experimentValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.tensorboardExperimentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.tensorboardExperimentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('tensorboardExperimentPath', () => { + const result = client.tensorboardExperimentPath( + 'projectValue', + 'locationValue', + 'tensorboardValue', + 'experimentValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.tensorboardExperimentPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTensorboardExperimentName', () => { + const result = + client.matchProjectFromTensorboardExperimentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.tensorboardExperimentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromTensorboardExperimentName', () => { + const result = + client.matchLocationFromTensorboardExperimentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.tensorboardExperimentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTensorboardFromTensorboardExperimentName', () => { + const result = + client.matchTensorboardFromTensorboardExperimentName(fakePath); + assert.strictEqual(result, 'tensorboardValue'); + assert( + ( + client.pathTemplates.tensorboardExperimentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromTensorboardExperimentName', () => { + const result = + client.matchExperimentFromTensorboardExperimentName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + ( + client.pathTemplates.tensorboardExperimentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('tensorboardRun', () => { + const fakePath = '/rendered/path/tensorboardRun'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + tensorboard: 'tensorboardValue', + experiment: 'experimentValue', + run: 'runValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.tensorboardRunPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.tensorboardRunPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('tensorboardRunPath', () => { + const result = client.tensorboardRunPath( + 'projectValue', + 'locationValue', + 'tensorboardValue', + 'experimentValue', + 'runValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.tensorboardRunPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTensorboardRunName', () => { + const result = client.matchProjectFromTensorboardRunName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.tensorboardRunPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromTensorboardRunName', () => { + const result = client.matchLocationFromTensorboardRunName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.tensorboardRunPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTensorboardFromTensorboardRunName', () => { + const result = client.matchTensorboardFromTensorboardRunName(fakePath); + assert.strictEqual(result, 'tensorboardValue'); + assert( + (client.pathTemplates.tensorboardRunPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromTensorboardRunName', () => { + const result = client.matchExperimentFromTensorboardRunName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + (client.pathTemplates.tensorboardRunPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRunFromTensorboardRunName', () => { + const result = client.matchRunFromTensorboardRunName(fakePath); + assert.strictEqual(result, 'runValue'); + assert( + (client.pathTemplates.tensorboardRunPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('tensorboardTimeSeries', () => { + const fakePath = '/rendered/path/tensorboardTimeSeries'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + tensorboard: 'tensorboardValue', + experiment: 'experimentValue', + run: 'runValue', + time_series: 'timeSeriesValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.tensorboardTimeSeriesPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.tensorboardTimeSeriesPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('tensorboardTimeSeriesPath', () => { + const result = client.tensorboardTimeSeriesPath( + 'projectValue', + 'locationValue', + 'tensorboardValue', + 'experimentValue', + 'runValue', + 'timeSeriesValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.tensorboardTimeSeriesPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTensorboardTimeSeriesName', () => { + const result = + client.matchProjectFromTensorboardTimeSeriesName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.tensorboardTimeSeriesPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromTensorboardTimeSeriesName', () => { + const result = + client.matchLocationFromTensorboardTimeSeriesName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.tensorboardTimeSeriesPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTensorboardFromTensorboardTimeSeriesName', () => { + const result = + client.matchTensorboardFromTensorboardTimeSeriesName(fakePath); + assert.strictEqual(result, 'tensorboardValue'); + assert( + ( + client.pathTemplates.tensorboardTimeSeriesPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromTensorboardTimeSeriesName', () => { + const result = + client.matchExperimentFromTensorboardTimeSeriesName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + ( + client.pathTemplates.tensorboardTimeSeriesPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRunFromTensorboardTimeSeriesName', () => { + const result = client.matchRunFromTensorboardTimeSeriesName(fakePath); + assert.strictEqual(result, 'runValue'); + assert( + ( + client.pathTemplates.tensorboardTimeSeriesPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTimeSeriesFromTensorboardTimeSeriesName', () => { + const result = + client.matchTimeSeriesFromTensorboardTimeSeriesName(fakePath); + assert.strictEqual(result, 'timeSeriesValue'); + assert( + ( + client.pathTemplates.tensorboardTimeSeriesPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('trainingPipeline', () => { + const fakePath = '/rendered/path/trainingPipeline'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + training_pipeline: 'trainingPipelineValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.trainingPipelinePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.trainingPipelinePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('trainingPipelinePath', () => { + const result = client.trainingPipelinePath( + 'projectValue', + 'locationValue', + 'trainingPipelineValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.trainingPipelinePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTrainingPipelineName', () => { + const result = client.matchProjectFromTrainingPipelineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.trainingPipelinePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromTrainingPipelineName', () => { + const result = client.matchLocationFromTrainingPipelineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.trainingPipelinePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTrainingPipelineFromTrainingPipelineName', () => { + const result = + client.matchTrainingPipelineFromTrainingPipelineName(fakePath); + assert.strictEqual(result, 'trainingPipelineValue'); + assert( + (client.pathTemplates.trainingPipelinePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('trial', () => { + const fakePath = '/rendered/path/trial'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + study: 'studyValue', + trial: 'trialValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.trialPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.trialPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('trialPath', () => { + const result = client.trialPath( + 'projectValue', + 'locationValue', + 'studyValue', + 'trialValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.trialPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTrialName', () => { + const result = client.matchProjectFromTrialName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.trialPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromTrialName', () => { + const result = client.matchLocationFromTrialName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.trialPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchStudyFromTrialName', () => { + const result = client.matchStudyFromTrialName(fakePath); + assert.strictEqual(result, 'studyValue'); + assert( + (client.pathTemplates.trialPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTrialFromTrialName', () => { + const result = client.matchTrialFromTrialName(fakePath); + assert.strictEqual(result, 'trialValue'); + assert( + (client.pathTemplates.trialPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); From 2455997eef197bb7dcba4e5c4bd1f6380e950fb3 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Wed, 22 Feb 2023 09:31:22 -0800 Subject: [PATCH 36/80] build: update .repo-metadata.jsons (#3996) * build: update .repo-metadata.jsons --------- Co-authored-by: Owl Bot --- .../__snapshots__/templating.test.js | 5 +++-- .../templates/bootstrap-templates/.repo-metadata.json | 5 +++-- packages/google-api-apikeys/.repo-metadata.json | 3 ++- packages/google-api-apikeys/README.md | 9 ++++----- .../v2/snippet_metadata.google.api.apikeys.v2.json | 2 +- packages/google-cloud-asset/.repo-metadata.json | 2 +- .../v1/snippet_metadata.google.cloud.asset.v1.json | 2 +- .../snippet_metadata.google.cloud.asset.v1p1beta1.json | 2 +- .../snippet_metadata.google.cloud.asset.v1p2beta1.json | 2 +- .../snippet_metadata.google.cloud.asset.v1p4beta1.json | 2 +- .../snippet_metadata.google.cloud.asset.v1p5beta1.json | 2 +- .../snippet_metadata.google.cloud.asset.v1p7beta1.json | 2 +- packages/google-cloud-batch/.repo-metadata.json | 5 +++-- packages/google-cloud-batch/README.md | 9 ++++----- .../v1/snippet_metadata.google.cloud.batch.v1.json | 2 +- .../snippet_metadata.google.cloud.batch.v1alpha.json | 2 +- .../.repo-metadata.json | 5 +++-- .../google-cloud-beyondcorp-appconnections/README.md | 9 ++++----- ...data.google.cloud.beyondcorp.appconnections.v1.json | 2 +- .../.repo-metadata.json | 5 +++-- .../google-cloud-beyondcorp-appconnectors/README.md | 9 ++++----- ...adata.google.cloud.beyondcorp.appconnectors.v1.json | 2 +- .../.repo-metadata.json | 5 +++-- packages/google-cloud-beyondcorp-appgateways/README.md | 9 ++++----- ...etadata.google.cloud.beyondcorp.appgateways.v1.json | 2 +- .../.repo-metadata.json | 5 +++-- .../README.md | 9 ++++----- ...le.cloud.beyondcorp.clientconnectorservices.v1.json | 2 +- .../.repo-metadata.json | 5 +++-- .../google-cloud-beyondcorp-clientgateways/README.md | 9 ++++----- ...data.google.cloud.beyondcorp.clientgateways.v1.json | 2 +- .../.repo-metadata.json | 5 +++-- packages/google-cloud-bigquery-analyticshub/README.md | 9 ++++----- ...metadata.google.cloud.bigquery.analyticshub.v1.json | 2 +- .../.repo-metadata.json | 3 ++- ...ata.google.cloud.bigquery.dataexchange.v1beta1.json | 2 +- .../.repo-metadata.json | 3 ++- packages/google-cloud-bigquery-datapolicies/README.md | 9 ++++----- ...metadata.google.cloud.bigquery.datapolicies.v1.json | 2 +- ...ata.google.cloud.bigquery.datapolicies.v1beta1.json | 2 +- packages/google-cloud-clouddms/.repo-metadata.json | 2 +- .../v1/snippet_metadata.google.cloud.clouddms.v1.json | 2 +- .../google-cloud-contentwarehouse/.repo-metadata.json | 5 +++-- packages/google-cloud-contentwarehouse/README.md | 7 +------ .../.repo-metadata.json | 5 +++-- packages/google-cloud-datacatalog-lineage/README.md | 9 ++++----- ...t_metadata.google.cloud.datacatalog.lineage.v1.json | 2 +- .../google-cloud-discoveryengine/.repo-metadata.json | 5 +++-- packages/google-cloud-discoveryengine/README.md | 9 ++++----- ...t_metadata.google.cloud.discoveryengine.v1beta.json | 2 +- packages/google-cloud-filestore/.repo-metadata.json | 2 +- .../v1/snippet_metadata.google.cloud.filestore.v1.json | 2 +- ...nippet_metadata.google.cloud.filestore.v1beta1.json | 2 +- .../google-cloud-gkemulticloud/.repo-metadata.json | 5 +++-- packages/google-cloud-gkemulticloud/README.md | 9 ++++----- ...snippet_metadata.google.cloud.gkemulticloud.v1.json | 2 +- packages/google-cloud-gsuiteaddons/.repo-metadata.json | 5 +++-- packages/google-cloud-gsuiteaddons/README.md | 9 ++++----- .../snippet_metadata.google.cloud.gsuiteaddons.v1.json | 2 +- packages/google-cloud-run/.repo-metadata.json | 5 +++-- packages/google-cloud-run/README.md | 10 +++++----- .../v2/snippet_metadata.google.cloud.run.v2.json | 2 +- .../google-cloud-security-publicca/.repo-metadata.json | 2 +- packages/google-cloud-security-publicca/README.md | 9 ++++----- ...etadata.google.cloud.security.publicca.v1beta1.json | 2 +- .../google-cloud-video-stitcher/.repo-metadata.json | 5 +++-- packages/google-cloud-video-stitcher/README.md | 10 +++++----- ...nippet_metadata.google.cloud.video.stitcher.v1.json | 2 +- packages/google-cloud-vmwareengine/.repo-metadata.json | 5 +++-- packages/google-cloud-vmwareengine/README.md | 10 +++++----- .../snippet_metadata.google.cloud.vmwareengine.v1.json | 2 +- packages/google-iam/.repo-metadata.json | 5 +++-- packages/google-iam/README.md | 10 +++++----- .../generated/v2/snippet_metadata.google.iam.v2.json | 2 +- .../google-maps-addressvalidation/.repo-metadata.json | 5 +++-- packages/google-maps-addressvalidation/README.md | 10 +++++----- ...ppet_metadata.google.maps.addressvalidation.v1.json | 2 +- .../.repo-metadata.json | 5 +++-- packages/google-maps-mapsplatformdatasets/README.md | 9 ++++----- ...adata.google.maps.mapsplatformdatasets.v1alpha.json | 2 +- packages/google-maps-routing/.repo-metadata.json | 5 +++-- packages/google-maps-routing/README.md | 9 ++++----- .../v2/snippet_metadata.google.maps.routing.v2.json | 2 +- 83 files changed, 196 insertions(+), 193 deletions(-) diff --git a/packages/gapic-node-templating/__snapshots__/templating.test.js b/packages/gapic-node-templating/__snapshots__/templating.test.js index 52ddecd761c..2a16ad0fb11 100644 --- a/packages/gapic-node-templating/__snapshots__/templating.test.js +++ b/packages/gapic-node-templating/__snapshots__/templating.test.js @@ -27,14 +27,15 @@ exports['tests for templates it should create the templates in the directory 2'] "product_documentation": "https://cloud.google.com/kms", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/kms/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/kms", "api_id": "kms.googleapis.com", "default_version": "v1", "requires_billing": true, - "library_type": "GAPIC_AUTO" + "library_type": "GAPIC_AUTO", + "api_shortname": "kms" } diff --git a/packages/gapic-node-templating/templates/bootstrap-templates/.repo-metadata.json b/packages/gapic-node-templating/templates/bootstrap-templates/.repo-metadata.json index d53b310546e..c2f9f4e03eb 100644 --- a/packages/gapic-node-templating/templates/bootstrap-templates/.repo-metadata.json +++ b/packages/gapic-node-templating/templates/bootstrap-templates/.repo-metadata.json @@ -4,13 +4,14 @@ "product_documentation": "{{productDocumentation}}", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/{{name}}/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "{{language}}", "repo": "googleapis/{{monoRepoName}}", "distribution_name": "{{distributionName}}", "api_id": "{{hostName}}", "default_version": "{{version}}", "requires_billing": true, - "library_type": "GAPIC_AUTO" + "library_type": "GAPIC_AUTO", + "api_shortname": "{{name}}" } diff --git a/packages/google-api-apikeys/.repo-metadata.json b/packages/google-api-apikeys/.repo-metadata.json index e4cd982ff50..30c57c2615e 100644 --- a/packages/google-api-apikeys/.repo-metadata.json +++ b/packages/google-api-apikeys/.repo-metadata.json @@ -1,10 +1,11 @@ { + "api_shortname": "apikeys", "name": "apikeys", "name_pretty": "API Keys API", "product_documentation": "cloud.google.com/api-keys/", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/apikeys/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/apikeys", diff --git a/packages/google-api-apikeys/README.md b/packages/google-api-apikeys/README.md index 70faaeac8cb..dc0202a428c 100644 --- a/packages/google-api-apikeys/README.md +++ b/packages/google-api-apikeys/README.md @@ -4,7 +4,7 @@ # [API Keys API: Node.js Client](https://github.com/googleapis/google-cloud-node) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/apikeys.svg)](https://www.npmjs.org/package/@google-cloud/apikeys) @@ -156,13 +156,12 @@ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. More Information: [Google Cloud Platform Launch Stages][launch_stages] diff --git a/packages/google-api-apikeys/samples/generated/v2/snippet_metadata.google.api.apikeys.v2.json b/packages/google-api-apikeys/samples/generated/v2/snippet_metadata.google.api.apikeys.v2.json index f8f0081b92d..e2368ddb5bf 100644 --- a/packages/google-api-apikeys/samples/generated/v2/snippet_metadata.google.api.apikeys.v2.json +++ b/packages/google-api-apikeys/samples/generated/v2/snippet_metadata.google.api.apikeys.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-apikeys", - "version": "0.2.0", + "version": "0.2.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-asset/.repo-metadata.json b/packages/google-cloud-asset/.repo-metadata.json index 15f51f6e3a0..60bfb3b2ea2 100644 --- a/packages/google-cloud-asset/.repo-metadata.json +++ b/packages/google-cloud-asset/.repo-metadata.json @@ -12,6 +12,6 @@ "requires_billing": true, "default_version": "v1", "codeowner_team": "@googleapis/cloud-asset-team", - "api_shortname": "asset", + "api_shortname": "cloudasset", "library_type": "GAPIC_AUTO" } diff --git a/packages/google-cloud-asset/samples/generated/v1/snippet_metadata.google.cloud.asset.v1.json b/packages/google-cloud-asset/samples/generated/v1/snippet_metadata.google.cloud.asset.v1.json index 3e2eb16ba16..5d5caaff4ff 100644 --- a/packages/google-cloud-asset/samples/generated/v1/snippet_metadata.google.cloud.asset.v1.json +++ b/packages/google-cloud-asset/samples/generated/v1/snippet_metadata.google.cloud.asset.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-asset", - "version": "4.6.0", + "version": "4.6.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-asset/samples/generated/v1p1beta1/snippet_metadata.google.cloud.asset.v1p1beta1.json b/packages/google-cloud-asset/samples/generated/v1p1beta1/snippet_metadata.google.cloud.asset.v1p1beta1.json index 1c5f05d8ff5..ab5430c7299 100644 --- a/packages/google-cloud-asset/samples/generated/v1p1beta1/snippet_metadata.google.cloud.asset.v1p1beta1.json +++ b/packages/google-cloud-asset/samples/generated/v1p1beta1/snippet_metadata.google.cloud.asset.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-asset", - "version": "4.6.0", + "version": "4.6.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-asset/samples/generated/v1p2beta1/snippet_metadata.google.cloud.asset.v1p2beta1.json b/packages/google-cloud-asset/samples/generated/v1p2beta1/snippet_metadata.google.cloud.asset.v1p2beta1.json index bd50b351021..508cdc7e7ae 100644 --- a/packages/google-cloud-asset/samples/generated/v1p2beta1/snippet_metadata.google.cloud.asset.v1p2beta1.json +++ b/packages/google-cloud-asset/samples/generated/v1p2beta1/snippet_metadata.google.cloud.asset.v1p2beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-asset", - "version": "4.6.0", + "version": "4.6.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-asset/samples/generated/v1p4beta1/snippet_metadata.google.cloud.asset.v1p4beta1.json b/packages/google-cloud-asset/samples/generated/v1p4beta1/snippet_metadata.google.cloud.asset.v1p4beta1.json index ede6b387583..6e4f47b06ae 100644 --- a/packages/google-cloud-asset/samples/generated/v1p4beta1/snippet_metadata.google.cloud.asset.v1p4beta1.json +++ b/packages/google-cloud-asset/samples/generated/v1p4beta1/snippet_metadata.google.cloud.asset.v1p4beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-asset", - "version": "4.6.0", + "version": "4.6.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-asset/samples/generated/v1p5beta1/snippet_metadata.google.cloud.asset.v1p5beta1.json b/packages/google-cloud-asset/samples/generated/v1p5beta1/snippet_metadata.google.cloud.asset.v1p5beta1.json index 5be7d5f18c7..ecfb6617799 100644 --- a/packages/google-cloud-asset/samples/generated/v1p5beta1/snippet_metadata.google.cloud.asset.v1p5beta1.json +++ b/packages/google-cloud-asset/samples/generated/v1p5beta1/snippet_metadata.google.cloud.asset.v1p5beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-asset", - "version": "4.6.0", + "version": "4.6.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-asset/samples/generated/v1p7beta1/snippet_metadata.google.cloud.asset.v1p7beta1.json b/packages/google-cloud-asset/samples/generated/v1p7beta1/snippet_metadata.google.cloud.asset.v1p7beta1.json index 29382f16756..6e08a0b7ede 100644 --- a/packages/google-cloud-asset/samples/generated/v1p7beta1/snippet_metadata.google.cloud.asset.v1p7beta1.json +++ b/packages/google-cloud-asset/samples/generated/v1p7beta1/snippet_metadata.google.cloud.asset.v1p7beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-asset", - "version": "4.6.0", + "version": "4.6.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-batch/.repo-metadata.json b/packages/google-cloud-batch/.repo-metadata.json index 1c3553aa4d8..423143a099a 100644 --- a/packages/google-cloud-batch/.repo-metadata.json +++ b/packages/google-cloud-batch/.repo-metadata.json @@ -4,13 +4,14 @@ "product_documentation": "cloud.google.com/batch/", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/batch/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/batch", "api_id": "batch.googleapis.com", "default_version": "v1", "requires_billing": true, - "library_type": "GAPIC_AUTO" + "library_type": "GAPIC_AUTO", + "api_shortname": "batch" } diff --git a/packages/google-cloud-batch/README.md b/packages/google-cloud-batch/README.md index 987498a9010..e1bbc1927fe 100644 --- a/packages/google-cloud-batch/README.md +++ b/packages/google-cloud-batch/README.md @@ -4,7 +4,7 @@ # [Batch: Node.js Client](https://github.com/googleapis/google-cloud-node) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/batch.svg)](https://www.npmjs.org/package/@google-cloud/batch) @@ -159,13 +159,12 @@ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. More Information: [Google Cloud Platform Launch Stages][launch_stages] diff --git a/packages/google-cloud-batch/samples/generated/v1/snippet_metadata.google.cloud.batch.v1.json b/packages/google-cloud-batch/samples/generated/v1/snippet_metadata.google.cloud.batch.v1.json index a3f909bae50..2db7a37f5a0 100644 --- a/packages/google-cloud-batch/samples/generated/v1/snippet_metadata.google.cloud.batch.v1.json +++ b/packages/google-cloud-batch/samples/generated/v1/snippet_metadata.google.cloud.batch.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-batch", - "version": "0.6.0", + "version": "0.6.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata.google.cloud.batch.v1alpha.json b/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata.google.cloud.batch.v1alpha.json index 5f510536d5d..02f4d21af05 100644 --- a/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata.google.cloud.batch.v1alpha.json +++ b/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata.google.cloud.batch.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-batch", - "version": "0.6.0", + "version": "0.6.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-beyondcorp-appconnections/.repo-metadata.json b/packages/google-cloud-beyondcorp-appconnections/.repo-metadata.json index d9aa28d3085..90b0b55fa91 100644 --- a/packages/google-cloud-beyondcorp-appconnections/.repo-metadata.json +++ b/packages/google-cloud-beyondcorp-appconnections/.repo-metadata.json @@ -4,13 +4,14 @@ "product_documentation": "", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/appconnections/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/appconnections", "api_id": "beyondcorp.googleapis.com", "default_version": "v1", "requires_billing": true, - "library_type": "GAPIC_AUTO" + "library_type": "GAPIC_AUTO", + "api_shortname": "beyondcorp" } diff --git a/packages/google-cloud-beyondcorp-appconnections/README.md b/packages/google-cloud-beyondcorp-appconnections/README.md index 01a000aa924..715a1b673c5 100644 --- a/packages/google-cloud-beyondcorp-appconnections/README.md +++ b/packages/google-cloud-beyondcorp-appconnections/README.md @@ -4,7 +4,7 @@ # [BeyondCorp API: Node.js Client](https://github.com/googleapis/google-cloud-node) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/appconnections.svg)](https://www.npmjs.org/package/@google-cloud/appconnections) @@ -167,13 +167,12 @@ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. More Information: [Google Cloud Platform Launch Stages][launch_stages] diff --git a/packages/google-cloud-beyondcorp-appconnections/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appconnections.v1.json b/packages/google-cloud-beyondcorp-appconnections/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appconnections.v1.json index 2c14a32af95..282b8b2e15a 100644 --- a/packages/google-cloud-beyondcorp-appconnections/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appconnections.v1.json +++ b/packages/google-cloud-beyondcorp-appconnections/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appconnections.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-appconnections", - "version": "0.3.0", + "version": "0.3.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-beyondcorp-appconnectors/.repo-metadata.json b/packages/google-cloud-beyondcorp-appconnectors/.repo-metadata.json index 52dd86b46b6..005a35c26fc 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/.repo-metadata.json +++ b/packages/google-cloud-beyondcorp-appconnectors/.repo-metadata.json @@ -4,13 +4,14 @@ "product_documentation": "https://cloud.google.com/beyondcorp", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/beyondcorp/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/appconnectors", "api_id": "beyondcorp.googleapis.com", "default_version": "v1", "requires_billing": true, - "library_type": "GAPIC_AUTO" + "library_type": "GAPIC_AUTO", + "api_shortname": "beyondcorp" } diff --git a/packages/google-cloud-beyondcorp-appconnectors/README.md b/packages/google-cloud-beyondcorp-appconnectors/README.md index d37d1d55c30..ba34d3374a5 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/README.md +++ b/packages/google-cloud-beyondcorp-appconnectors/README.md @@ -4,7 +4,7 @@ # [BeyondCorp API: Node.js Client](https://github.com/googleapis/google-cloud-node) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/appconnectors.svg)](https://www.npmjs.org/package/@google-cloud/appconnectors) @@ -165,13 +165,12 @@ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. More Information: [Google Cloud Platform Launch Stages][launch_stages] diff --git a/packages/google-cloud-beyondcorp-appconnectors/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appconnectors.v1.json b/packages/google-cloud-beyondcorp-appconnectors/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appconnectors.v1.json index 2b4eeb66e49..59c17415b19 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appconnectors.v1.json +++ b/packages/google-cloud-beyondcorp-appconnectors/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appconnectors.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-appconnectors", - "version": "0.4.0", + "version": "0.4.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-beyondcorp-appgateways/.repo-metadata.json b/packages/google-cloud-beyondcorp-appgateways/.repo-metadata.json index 7b6dba14c37..6ab7b3a32f3 100644 --- a/packages/google-cloud-beyondcorp-appgateways/.repo-metadata.json +++ b/packages/google-cloud-beyondcorp-appgateways/.repo-metadata.json @@ -4,12 +4,13 @@ "product_documentation": "https://cloud.google.com/beyondcorp", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/appgateways/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/appgateways", "api_id": "beyondcorp.googleapis.com", "default_version": "v1", "requires_billing": true, - "library_type": "GAPIC_AUTO" + "library_type": "GAPIC_AUTO", + "api_shortname": "beyondcorp" } diff --git a/packages/google-cloud-beyondcorp-appgateways/README.md b/packages/google-cloud-beyondcorp-appgateways/README.md index ceb0542907d..fc96ccd36cc 100644 --- a/packages/google-cloud-beyondcorp-appgateways/README.md +++ b/packages/google-cloud-beyondcorp-appgateways/README.md @@ -4,7 +4,7 @@ # [BeyondCorp API: Node.js Client](https://github.com/googleapis/google-cloud-node) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/appgateways.svg)](https://www.npmjs.org/package/@google-cloud/appgateways) @@ -162,13 +162,12 @@ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. More Information: [Google Cloud Platform Launch Stages][launch_stages] diff --git a/packages/google-cloud-beyondcorp-appgateways/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appgateways.v1.json b/packages/google-cloud-beyondcorp-appgateways/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appgateways.v1.json index 6c226eb7962..904ed029bfa 100644 --- a/packages/google-cloud-beyondcorp-appgateways/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appgateways.v1.json +++ b/packages/google-cloud-beyondcorp-appgateways/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appgateways.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-appgateways", - "version": "0.3.0", + "version": "0.3.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/.repo-metadata.json b/packages/google-cloud-beyondcorp-clientconnectorservices/.repo-metadata.json index 04edad61fcb..c70d6fbddd8 100644 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/.repo-metadata.json +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/.repo-metadata.json @@ -4,13 +4,14 @@ "product_documentation": "", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/clientconnectorservices/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/clientconnectorservices", "api_id": "beyondcorp.googleapis.com", "default_version": "v1", "requires_billing": true, - "library_type": "GAPIC_AUTO" + "library_type": "GAPIC_AUTO", + "api_shortname": "beyondcorp" } diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/README.md b/packages/google-cloud-beyondcorp-clientconnectorservices/README.md index b0f2e21fdf7..755c618fc06 100644 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/README.md +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/README.md @@ -4,7 +4,7 @@ # [BeyondCorp API: Node.js Client](https://github.com/googleapis/google-cloud-node) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/clientconnectorservices.svg)](https://www.npmjs.org/package/@google-cloud/clientconnectorservices) @@ -159,13 +159,12 @@ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. More Information: [Google Cloud Platform Launch Stages][launch_stages] diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.clientconnectorservices.v1.json b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.clientconnectorservices.v1.json index 5c5480d0b42..48c465475bc 100644 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.clientconnectorservices.v1.json +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.clientconnectorservices.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-clientconnectorservices", - "version": "0.3.0", + "version": "0.3.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-beyondcorp-clientgateways/.repo-metadata.json b/packages/google-cloud-beyondcorp-clientgateways/.repo-metadata.json index d2a633ec34b..3d9a9a9f472 100644 --- a/packages/google-cloud-beyondcorp-clientgateways/.repo-metadata.json +++ b/packages/google-cloud-beyondcorp-clientgateways/.repo-metadata.json @@ -4,13 +4,14 @@ "product_documentation": "", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/clientgateways/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/clientgateways", "api_id": "analyticshub.googleapis.com", "default_version": "v1", "requires_billing": true, - "library_type": "GAPIC_AUTO" + "library_type": "GAPIC_AUTO", + "api_shortname": "beyondcorp" } diff --git a/packages/google-cloud-beyondcorp-clientgateways/README.md b/packages/google-cloud-beyondcorp-clientgateways/README.md index b6fa6ffdc50..ff166021614 100644 --- a/packages/google-cloud-beyondcorp-clientgateways/README.md +++ b/packages/google-cloud-beyondcorp-clientgateways/README.md @@ -4,7 +4,7 @@ # [BeyondCorp API: Node.js Client](https://github.com/googleapis/google-cloud-node) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/clientgateways.svg)](https://www.npmjs.org/package/@google-cloud/clientgateways) @@ -156,13 +156,12 @@ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. More Information: [Google Cloud Platform Launch Stages][launch_stages] diff --git a/packages/google-cloud-beyondcorp-clientgateways/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.clientgateways.v1.json b/packages/google-cloud-beyondcorp-clientgateways/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.clientgateways.v1.json index 12fba8da24f..a502f471844 100644 --- a/packages/google-cloud-beyondcorp-clientgateways/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.clientgateways.v1.json +++ b/packages/google-cloud-beyondcorp-clientgateways/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.clientgateways.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-clientgateways", - "version": "0.3.0", + "version": "0.3.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-analyticshub/.repo-metadata.json b/packages/google-cloud-bigquery-analyticshub/.repo-metadata.json index 472b2d84f0c..4d5aff9c769 100644 --- a/packages/google-cloud-bigquery-analyticshub/.repo-metadata.json +++ b/packages/google-cloud-bigquery-analyticshub/.repo-metadata.json @@ -4,13 +4,14 @@ "product_documentation": "", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/analyticshub/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/analyticshub", "api_id": "google.cloud.bigquery.analyticshub.v1", "default_version": "v1", "requires_billing": true, - "library_type": "GAPIC_AUTO" + "library_type": "GAPIC_AUTO", + "api_shortname": "analyticshub" } diff --git a/packages/google-cloud-bigquery-analyticshub/README.md b/packages/google-cloud-bigquery-analyticshub/README.md index 6e0f0db4440..2222ff79a26 100644 --- a/packages/google-cloud-bigquery-analyticshub/README.md +++ b/packages/google-cloud-bigquery-analyticshub/README.md @@ -4,7 +4,7 @@ # [Analytics Hub API: Node.js Client](https://github.com/googleapis/google-cloud-node) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/bigquery-analyticshub.svg)](https://www.npmjs.org/package/@google-cloud/bigquery-analyticshub) @@ -162,13 +162,12 @@ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. More Information: [Google Cloud Platform Launch Stages][launch_stages] diff --git a/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata.google.cloud.bigquery.analyticshub.v1.json b/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata.google.cloud.bigquery.analyticshub.v1.json index de789d4fe3c..dc3d09f44d5 100644 --- a/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata.google.cloud.bigquery.analyticshub.v1.json +++ b/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata.google.cloud.bigquery.analyticshub.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-analyticshub", - "version": "0.2.0", + "version": "0.2.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-dataexchange/.repo-metadata.json b/packages/google-cloud-bigquery-dataexchange/.repo-metadata.json index 43938d4177c..6df4b7d2a33 100644 --- a/packages/google-cloud-bigquery-dataexchange/.repo-metadata.json +++ b/packages/google-cloud-bigquery-dataexchange/.repo-metadata.json @@ -11,5 +11,6 @@ "api_id": "bigquerydatapolicy.googleapis.com", "default_version": "v1beta1", "requires_billing": true, - "library_type": "GAPIC_AUTO" + "library_type": "GAPIC_AUTO", + "api_shortname": "analyticshub" } diff --git a/packages/google-cloud-bigquery-dataexchange/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.dataexchange.v1beta1.json b/packages/google-cloud-bigquery-dataexchange/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.dataexchange.v1beta1.json index 107a8ce9c59..1eaea9aae20 100644 --- a/packages/google-cloud-bigquery-dataexchange/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.dataexchange.v1beta1.json +++ b/packages/google-cloud-bigquery-dataexchange/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.dataexchange.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataexchange", - "version": "0.4.0", + "version": "0.4.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-datapolicies/.repo-metadata.json b/packages/google-cloud-bigquery-datapolicies/.repo-metadata.json index 100c2944457..f6da66fd347 100644 --- a/packages/google-cloud-bigquery-datapolicies/.repo-metadata.json +++ b/packages/google-cloud-bigquery-datapolicies/.repo-metadata.json @@ -4,13 +4,14 @@ "product_documentation": "", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/datapolicies/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/bigquery-datapolicies", "api_id": "google.cloud.bigquery.datapolicies.v1beta1", "default_version": "v1beta1", "requires_billing": true, + "api_shortname": "bigquerydatapolicy", "library_type": "GAPIC_AUTO" } diff --git a/packages/google-cloud-bigquery-datapolicies/README.md b/packages/google-cloud-bigquery-datapolicies/README.md index 7842fd00d4a..eaa2d006e59 100644 --- a/packages/google-cloud-bigquery-datapolicies/README.md +++ b/packages/google-cloud-bigquery-datapolicies/README.md @@ -4,7 +4,7 @@ # [: Node.js Client](https://github.com/googleapis/google-cloud-node) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/bigquery-datapolicies.svg)](https://www.npmjs.org/package/@google-cloud/bigquery-datapolicies) @@ -165,13 +165,12 @@ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. More Information: [Google Cloud Platform Launch Stages][launch_stages] diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datapolicies.v1.json b/packages/google-cloud-bigquery-datapolicies/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datapolicies.v1.json index c6725e87a37..2f6625a4fd0 100644 --- a/packages/google-cloud-bigquery-datapolicies/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datapolicies.v1.json +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datapolicies.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datapolicies", - "version": "0.3.0", + "version": "0.3.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.datapolicies.v1beta1.json b/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.datapolicies.v1beta1.json index 5a982adbfe0..ca3b5bbdd48 100644 --- a/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.datapolicies.v1beta1.json +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.datapolicies.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datapolicies", - "version": "0.3.0", + "version": "0.3.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-clouddms/.repo-metadata.json b/packages/google-cloud-clouddms/.repo-metadata.json index 1576d826c1c..2d88057879b 100644 --- a/packages/google-cloud-clouddms/.repo-metadata.json +++ b/packages/google-cloud-clouddms/.repo-metadata.json @@ -12,6 +12,6 @@ "api_id": "datamigration.googleapis.com", "requires_billing": true, "default_version": "v1", - "api_shortname": "dms", + "api_shortname": "clouddms", "library_type": "GAPIC_AUTO" } diff --git a/packages/google-cloud-clouddms/samples/generated/v1/snippet_metadata.google.cloud.clouddms.v1.json b/packages/google-cloud-clouddms/samples/generated/v1/snippet_metadata.google.cloud.clouddms.v1.json index c52e872982e..fb947b49d95 100644 --- a/packages/google-cloud-clouddms/samples/generated/v1/snippet_metadata.google.cloud.clouddms.v1.json +++ b/packages/google-cloud-clouddms/samples/generated/v1/snippet_metadata.google.cloud.clouddms.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-clouddms", - "version": "2.2.0", + "version": "2.2.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-contentwarehouse/.repo-metadata.json b/packages/google-cloud-contentwarehouse/.repo-metadata.json index 7a5e1e1e894..7391d5aceef 100644 --- a/packages/google-cloud-contentwarehouse/.repo-metadata.json +++ b/packages/google-cloud-contentwarehouse/.repo-metadata.json @@ -4,12 +4,13 @@ "product_documentation": "cloud.google.com/document-warehouse/", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/contentwarehouse/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "GA", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/contentwarehouse", "api_id": "contentwarehouse.googleapis.com", "default_version": "v1", "requires_billing": true, - "library_type": "GAPIC_AUTO" + "library_type": "GAPIC_AUTO", + "api_shortname": "contentwarehouse" } diff --git a/packages/google-cloud-contentwarehouse/README.md b/packages/google-cloud-contentwarehouse/README.md index c18c1944713..e9551cd4aba 100644 --- a/packages/google-cloud-contentwarehouse/README.md +++ b/packages/google-cloud-contentwarehouse/README.md @@ -4,7 +4,7 @@ # [Document AI Warehouse: Node.js Client](https://github.com/googleapis/google-cloud-node) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/contentwarehouse.svg)](https://www.npmjs.org/package/@google-cloud/contentwarehouse) @@ -176,11 +176,6 @@ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. - diff --git a/packages/google-cloud-datacatalog-lineage/.repo-metadata.json b/packages/google-cloud-datacatalog-lineage/.repo-metadata.json index 38033573d3e..b39e05c6642 100644 --- a/packages/google-cloud-datacatalog-lineage/.repo-metadata.json +++ b/packages/google-cloud-datacatalog-lineage/.repo-metadata.json @@ -4,13 +4,14 @@ "product_documentation": "", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/lineage/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/lineage", "api_id": "datalineage.googleapis.com", "default_version": "v1", "requires_billing": true, - "library_type": "GAPIC_AUTO" + "library_type": "GAPIC_AUTO", + "api_shortname": "datalineage" } diff --git a/packages/google-cloud-datacatalog-lineage/README.md b/packages/google-cloud-datacatalog-lineage/README.md index 176d5cb0f96..bdaa5e2cf3a 100644 --- a/packages/google-cloud-datacatalog-lineage/README.md +++ b/packages/google-cloud-datacatalog-lineage/README.md @@ -4,7 +4,7 @@ # [Data Lineage API: Node.js Client](https://github.com/googleapis/google-cloud-node) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/lineage.svg)](https://www.npmjs.org/package/@google-cloud/lineage) @@ -166,13 +166,12 @@ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. More Information: [Google Cloud Platform Launch Stages][launch_stages] diff --git a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/snippet_metadata.google.cloud.datacatalog.lineage.v1.json b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/snippet_metadata.google.cloud.datacatalog.lineage.v1.json index 340b2edd58b..19c86ed4292 100644 --- a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/snippet_metadata.google.cloud.datacatalog.lineage.v1.json +++ b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/snippet_metadata.google.cloud.datacatalog.lineage.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-lineage", - "version": "0.1.0", + "version": "0.1.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-discoveryengine/.repo-metadata.json b/packages/google-cloud-discoveryengine/.repo-metadata.json index 90e8581d685..be983330fa5 100644 --- a/packages/google-cloud-discoveryengine/.repo-metadata.json +++ b/packages/google-cloud-discoveryengine/.repo-metadata.json @@ -4,13 +4,14 @@ "product_documentation": "cloud.google.com/discovery-engine/", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/discoveryengine/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/discoveryengine", "api_id": "discoveryengine.googleapis.com", "default_version": "v1beta", "requires_billing": true, - "library_type": "GAPIC_AUTO" + "library_type": "GAPIC_AUTO", + "api_shortname": "discoveryengine" } diff --git a/packages/google-cloud-discoveryengine/README.md b/packages/google-cloud-discoveryengine/README.md index 8ba22ccfd3d..490aeca3b21 100644 --- a/packages/google-cloud-discoveryengine/README.md +++ b/packages/google-cloud-discoveryengine/README.md @@ -4,7 +4,7 @@ # [Discovery Engine API: Node.js Client](https://github.com/googleapis/google-cloud-node) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/discoveryengine.svg)](https://www.npmjs.org/package/@google-cloud/discoveryengine) @@ -171,13 +171,12 @@ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. More Information: [Google Cloud Platform Launch Stages][launch_stages] diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1beta/snippet_metadata.google.cloud.discoveryengine.v1beta.json b/packages/google-cloud-discoveryengine/samples/generated/v1beta/snippet_metadata.google.cloud.discoveryengine.v1beta.json index 74a4df877f6..68c538026b2 100644 --- a/packages/google-cloud-discoveryengine/samples/generated/v1beta/snippet_metadata.google.cloud.discoveryengine.v1beta.json +++ b/packages/google-cloud-discoveryengine/samples/generated/v1beta/snippet_metadata.google.cloud.discoveryengine.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-discoveryengine", - "version": "0.3.0", + "version": "0.3.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-filestore/.repo-metadata.json b/packages/google-cloud-filestore/.repo-metadata.json index cccd51f65b1..06a85f82a75 100644 --- a/packages/google-cloud-filestore/.repo-metadata.json +++ b/packages/google-cloud-filestore/.repo-metadata.json @@ -1,5 +1,5 @@ { - "name": "filestore", + "name": "file", "api_shortname": "filestore", "name_pretty": "Filestore", "product_documentation": "https://cloud.google.com/filestore/", diff --git a/packages/google-cloud-filestore/samples/generated/v1/snippet_metadata.google.cloud.filestore.v1.json b/packages/google-cloud-filestore/samples/generated/v1/snippet_metadata.google.cloud.filestore.v1.json index 70f70b40ce5..1477398b7b5 100644 --- a/packages/google-cloud-filestore/samples/generated/v1/snippet_metadata.google.cloud.filestore.v1.json +++ b/packages/google-cloud-filestore/samples/generated/v1/snippet_metadata.google.cloud.filestore.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-filestore", - "version": "2.3.0", + "version": "2.3.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-filestore/samples/generated/v1beta1/snippet_metadata.google.cloud.filestore.v1beta1.json b/packages/google-cloud-filestore/samples/generated/v1beta1/snippet_metadata.google.cloud.filestore.v1beta1.json index bceca44d804..923e53df884 100644 --- a/packages/google-cloud-filestore/samples/generated/v1beta1/snippet_metadata.google.cloud.filestore.v1beta1.json +++ b/packages/google-cloud-filestore/samples/generated/v1beta1/snippet_metadata.google.cloud.filestore.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-filestore", - "version": "2.3.0", + "version": "2.3.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gkemulticloud/.repo-metadata.json b/packages/google-cloud-gkemulticloud/.repo-metadata.json index d078c70ac2b..fa456da6306 100644 --- a/packages/google-cloud-gkemulticloud/.repo-metadata.json +++ b/packages/google-cloud-gkemulticloud/.repo-metadata.json @@ -4,13 +4,14 @@ "product_documentation": "", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/gkemulticloud/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/gkemulticloud", "api_id": "gkemulticloud.googleapis.com", "default_version": "v1", "requires_billing": true, - "library_type": "GAPIC_AUTO" + "library_type": "GAPIC_AUTO", + "api_shortname": "gkemulticloud" } diff --git a/packages/google-cloud-gkemulticloud/README.md b/packages/google-cloud-gkemulticloud/README.md index f6796dcb027..2213f5adde2 100644 --- a/packages/google-cloud-gkemulticloud/README.md +++ b/packages/google-cloud-gkemulticloud/README.md @@ -4,7 +4,7 @@ # [Anthos Multi-Cloud API: Node.js Client](https://github.com/googleapis/google-cloud-node) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/gkemulticloud.svg)](https://www.npmjs.org/package/@google-cloud/gkemulticloud) @@ -192,13 +192,12 @@ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. More Information: [Google Cloud Platform Launch Stages][launch_stages] diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/snippet_metadata.google.cloud.gkemulticloud.v1.json b/packages/google-cloud-gkemulticloud/samples/generated/v1/snippet_metadata.google.cloud.gkemulticloud.v1.json index e4329cfb2a4..61c308fb122 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/snippet_metadata.google.cloud.gkemulticloud.v1.json +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/snippet_metadata.google.cloud.gkemulticloud.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gkemulticloud", - "version": "0.3.0", + "version": "0.3.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gsuiteaddons/.repo-metadata.json b/packages/google-cloud-gsuiteaddons/.repo-metadata.json index 82c84241d44..3db549fcbc9 100644 --- a/packages/google-cloud-gsuiteaddons/.repo-metadata.json +++ b/packages/google-cloud-gsuiteaddons/.repo-metadata.json @@ -4,13 +4,14 @@ "product_documentation": "developers.google.com/workspace/add-ons/", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/gsuiteaddons/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/gsuiteaddons", "api_id": "gsuiteaddons.googleapis.com", "default_version": "v1", "requires_billing": true, - "library_type": "GAPIC_AUTO" + "library_type": "GAPIC_AUTO", + "api_shortname": "gsuiteaddons" } diff --git a/packages/google-cloud-gsuiteaddons/README.md b/packages/google-cloud-gsuiteaddons/README.md index 23482e616dd..1e2d9447f50 100644 --- a/packages/google-cloud-gsuiteaddons/README.md +++ b/packages/google-cloud-gsuiteaddons/README.md @@ -4,7 +4,7 @@ # [Google Workspace Add-ons API: Node.js Client](https://github.com/googleapis/google-cloud-node) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/gsuiteaddons.svg)](https://www.npmjs.org/package/@google-cloud/gsuiteaddons) @@ -159,13 +159,12 @@ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. More Information: [Google Cloud Platform Launch Stages][launch_stages] diff --git a/packages/google-cloud-gsuiteaddons/samples/generated/v1/snippet_metadata.google.cloud.gsuiteaddons.v1.json b/packages/google-cloud-gsuiteaddons/samples/generated/v1/snippet_metadata.google.cloud.gsuiteaddons.v1.json index d18720a1072..5521221ef5d 100644 --- a/packages/google-cloud-gsuiteaddons/samples/generated/v1/snippet_metadata.google.cloud.gsuiteaddons.v1.json +++ b/packages/google-cloud-gsuiteaddons/samples/generated/v1/snippet_metadata.google.cloud.gsuiteaddons.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gsuiteaddons", - "version": "0.1.0", + "version": "0.1.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-run/.repo-metadata.json b/packages/google-cloud-run/.repo-metadata.json index 86c53514cca..8fed0af62fb 100644 --- a/packages/google-cloud-run/.repo-metadata.json +++ b/packages/google-cloud-run/.repo-metadata.json @@ -4,11 +4,12 @@ "product_documentation": "https://cloud.google.com/run", "client_documentation": "https://googleapis.dev/nodejs/run/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "stable", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/run", "api_id": "run.googleapis.com", "default_version": "v2", - "requires_billing": true + "requires_billing": true, + "library_type": "GAPIC_AUTO" } diff --git a/packages/google-cloud-run/README.md b/packages/google-cloud-run/README.md index fd466ea5888..75be8b6cad0 100644 --- a/packages/google-cloud-run/README.md +++ b/packages/google-cloud-run/README.md @@ -4,7 +4,7 @@ # [Cloud Run: Node.js Client](https://github.com/googleapis/google-cloud-node) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/run.svg)](https://www.npmjs.org/package/@google-cloud/run) @@ -171,11 +171,11 @@ This library follows [Semantic Versioning](http://semver.org/). +This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways +unless absolutely necessary (e.g. because of critical security issues) or with +an extensive deprecation period. Issues and requests against **stable** libraries +are addressed with the highest priority. -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. diff --git a/packages/google-cloud-run/samples/generated/v2/snippet_metadata.google.cloud.run.v2.json b/packages/google-cloud-run/samples/generated/v2/snippet_metadata.google.cloud.run.v2.json index 0234765d1b2..e89379f66a4 100644 --- a/packages/google-cloud-run/samples/generated/v2/snippet_metadata.google.cloud.run.v2.json +++ b/packages/google-cloud-run/samples/generated/v2/snippet_metadata.google.cloud.run.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-run", - "version": "0.4.0", + "version": "0.4.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-security-publicca/.repo-metadata.json b/packages/google-cloud-security-publicca/.repo-metadata.json index bb7d60817af..126e06a6bbe 100644 --- a/packages/google-cloud-security-publicca/.repo-metadata.json +++ b/packages/google-cloud-security-publicca/.repo-metadata.json @@ -4,7 +4,7 @@ "product_documentation": "cloud.google.com/certificate-manager/docs/public-ca/", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/publicca/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/publicca", diff --git a/packages/google-cloud-security-publicca/README.md b/packages/google-cloud-security-publicca/README.md index 1150435f357..e42fac48d1b 100644 --- a/packages/google-cloud-security-publicca/README.md +++ b/packages/google-cloud-security-publicca/README.md @@ -4,7 +4,7 @@ # [Public Certificate Authority: Node.js Client](https://github.com/googleapis/google-cloud-node) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/publicca.svg)](https://www.npmjs.org/package/@google-cloud/publicca) @@ -145,13 +145,12 @@ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. More Information: [Google Cloud Platform Launch Stages][launch_stages] diff --git a/packages/google-cloud-security-publicca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.publicca.v1beta1.json b/packages/google-cloud-security-publicca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.publicca.v1beta1.json index 94551d66165..cef59520c71 100644 --- a/packages/google-cloud-security-publicca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.publicca.v1beta1.json +++ b/packages/google-cloud-security-publicca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.publicca.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-publicca", - "version": "0.1.3", + "version": "0.1.4", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-video-stitcher/.repo-metadata.json b/packages/google-cloud-video-stitcher/.repo-metadata.json index 74bf930a1c4..4464d187248 100644 --- a/packages/google-cloud-video-stitcher/.repo-metadata.json +++ b/packages/google-cloud-video-stitcher/.repo-metadata.json @@ -4,12 +4,13 @@ "product_documentation": "https://cloud.google.com/video-stitcher/", "client_documentation": "https://googleapis.dev/nodejs/videostitcher/latest/", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "stable", "language": "nodejs", "repo": "googleapis/google-cloud-node", "codeowner_team": "@googleapis/cloud-media-team", "distribution_name": "@google-cloud/video-stitcher", "api_id": "stitcher.googleapis.com", "default_version": "v1", - "requires_billing": true + "requires_billing": true, + "library_type": "GAPIC_AUTO" } diff --git a/packages/google-cloud-video-stitcher/README.md b/packages/google-cloud-video-stitcher/README.md index 7a823185293..9dab194ba27 100644 --- a/packages/google-cloud-video-stitcher/README.md +++ b/packages/google-cloud-video-stitcher/README.md @@ -4,7 +4,7 @@ # [Video Stitcher API: Node.js Client](https://github.com/googleapis/google-cloud-node) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/video-stitcher.svg)](https://www.npmjs.org/package/@google-cloud/video-stitcher) @@ -117,11 +117,11 @@ This library follows [Semantic Versioning](http://semver.org/). +This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways +unless absolutely necessary (e.g. because of critical security issues) or with +an extensive deprecation period. Issues and requests against **stable** libraries +are addressed with the highest priority. -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/snippet_metadata.google.cloud.video.stitcher.v1.json b/packages/google-cloud-video-stitcher/samples/generated/v1/snippet_metadata.google.cloud.video.stitcher.v1.json index 4d0041bb0c7..574e878a261 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/snippet_metadata.google.cloud.video.stitcher.v1.json +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/snippet_metadata.google.cloud.video.stitcher.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-stitcher", - "version": "0.3.0", + "version": "0.3.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vmwareengine/.repo-metadata.json b/packages/google-cloud-vmwareengine/.repo-metadata.json index c8f7524ac10..44d298fe812 100644 --- a/packages/google-cloud-vmwareengine/.repo-metadata.json +++ b/packages/google-cloud-vmwareengine/.repo-metadata.json @@ -4,13 +4,14 @@ "product_documentation": "cloud.google.com/vmware-engine/", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/vmwareengine/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "stable", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/vmwareengine", "api_id": "vmwareengine.googleapis.com", "default_version": "v1", "requires_billing": true, - "library_type": "GAPIC_AUTO" + "library_type": "GAPIC_AUTO", + "api_shortname": "vmwareengine" } diff --git a/packages/google-cloud-vmwareengine/README.md b/packages/google-cloud-vmwareengine/README.md index 9b299df3a4e..c160f4c5f17 100644 --- a/packages/google-cloud-vmwareengine/README.md +++ b/packages/google-cloud-vmwareengine/README.md @@ -4,7 +4,7 @@ # [VMware Engine API: Node.js Client](https://github.com/googleapis/google-cloud-node) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/vmwareengine.svg)](https://www.npmjs.org/package/@google-cloud/vmwareengine) @@ -217,11 +217,11 @@ This library follows [Semantic Versioning](http://semver.org/). +This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways +unless absolutely necessary (e.g. because of critical security issues) or with +an extensive deprecation period. Issues and requests against **stable** libraries +are addressed with the highest priority. -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. diff --git a/packages/google-cloud-vmwareengine/samples/generated/v1/snippet_metadata.google.cloud.vmwareengine.v1.json b/packages/google-cloud-vmwareengine/samples/generated/v1/snippet_metadata.google.cloud.vmwareengine.v1.json index eb489294b51..bd328ff94f6 100644 --- a/packages/google-cloud-vmwareengine/samples/generated/v1/snippet_metadata.google.cloud.vmwareengine.v1.json +++ b/packages/google-cloud-vmwareengine/samples/generated/v1/snippet_metadata.google.cloud.vmwareengine.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vmwareengine", - "version": "0.1.0", + "version": "0.1.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-iam/.repo-metadata.json b/packages/google-iam/.repo-metadata.json index 6ec757aa108..87fb423d696 100644 --- a/packages/google-iam/.repo-metadata.json +++ b/packages/google-iam/.repo-metadata.json @@ -4,13 +4,14 @@ "product_documentation": "cloud.google.com/iam/", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/iam/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "stable", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/iam", "api_id": "google.iam.v2", "default_version": "v2", "requires_billing": true, - "library_type": "GAPIC_AUTO" + "library_type": "GAPIC_AUTO", + "api_shortname": "iam" } diff --git a/packages/google-iam/README.md b/packages/google-iam/README.md index 3b70b204b74..3ca9faaf645 100644 --- a/packages/google-iam/README.md +++ b/packages/google-iam/README.md @@ -4,7 +4,7 @@ # [Identity and Access Management: Node.js Client](https://github.com/googleapis/google-cloud-node) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/iam.svg)](https://www.npmjs.org/package/@google-cloud/iam) @@ -103,11 +103,11 @@ This library follows [Semantic Versioning](http://semver.org/). +This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways +unless absolutely necessary (e.g. because of critical security issues) or with +an extensive deprecation period. Issues and requests against **stable** libraries +are addressed with the highest priority. -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. diff --git a/packages/google-iam/samples/generated/v2/snippet_metadata.google.iam.v2.json b/packages/google-iam/samples/generated/v2/snippet_metadata.google.iam.v2.json index 4c33bdaee99..445649d74cb 100644 --- a/packages/google-iam/samples/generated/v2/snippet_metadata.google.iam.v2.json +++ b/packages/google-iam/samples/generated/v2/snippet_metadata.google.iam.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-iam", - "version": "0.3.0", + "version": "0.3.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-addressvalidation/.repo-metadata.json b/packages/google-maps-addressvalidation/.repo-metadata.json index fd0caf3a767..a5313354ad8 100644 --- a/packages/google-maps-addressvalidation/.repo-metadata.json +++ b/packages/google-maps-addressvalidation/.repo-metadata.json @@ -4,13 +4,14 @@ "product_documentation": "https://mapsplatform.google.com/maps-products/address-validation/", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/addressvalidation/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "stable", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/addressvalidation", "api_id": "addressvalidation.googleapis.com", "default_version": "v1", "requires_billing": true, - "library_type": "GAPIC_AUTO" + "library_type": "GAPIC_AUTO", + "api_shortname": "addressvalidation" } diff --git a/packages/google-maps-addressvalidation/README.md b/packages/google-maps-addressvalidation/README.md index 89a9d72fe6a..39d4266a098 100644 --- a/packages/google-maps-addressvalidation/README.md +++ b/packages/google-maps-addressvalidation/README.md @@ -4,7 +4,7 @@ # [Address Validation API: Node.js Client](https://github.com/googleapis/google-cloud-node) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@googlemaps/addressvalidation.svg)](https://www.npmjs.org/package/@googlemaps/addressvalidation) @@ -174,11 +174,11 @@ This library follows [Semantic Versioning](http://semver.org/). +This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways +unless absolutely necessary (e.g. because of critical security issues) or with +an extensive deprecation period. Issues and requests against **stable** libraries +are addressed with the highest priority. -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. diff --git a/packages/google-maps-addressvalidation/samples/generated/v1/snippet_metadata.google.maps.addressvalidation.v1.json b/packages/google-maps-addressvalidation/samples/generated/v1/snippet_metadata.google.maps.addressvalidation.v1.json index 6663855ed14..e632a307e3d 100644 --- a/packages/google-maps-addressvalidation/samples/generated/v1/snippet_metadata.google.maps.addressvalidation.v1.json +++ b/packages/google-maps-addressvalidation/samples/generated/v1/snippet_metadata.google.maps.addressvalidation.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-addressvalidation", - "version": "1.0.0", + "version": "1.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-mapsplatformdatasets/.repo-metadata.json b/packages/google-maps-mapsplatformdatasets/.repo-metadata.json index d93b6503f69..ddac9e0dc01 100644 --- a/packages/google-maps-mapsplatformdatasets/.repo-metadata.json +++ b/packages/google-maps-mapsplatformdatasets/.repo-metadata.json @@ -4,13 +4,14 @@ "product_documentation": "", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/mapsplatformdatasets/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/mapsplatformdatasets", "api_id": "mapsplatformdatasets.googleapis.com", "default_version": "v1alpha", "requires_billing": true, - "library_type": "GAPIC_AUTO" + "library_type": "GAPIC_AUTO", + "api_shortname": "mapsplatformdatasets" } diff --git a/packages/google-maps-mapsplatformdatasets/README.md b/packages/google-maps-mapsplatformdatasets/README.md index 28b074120e7..f8e272e70c1 100644 --- a/packages/google-maps-mapsplatformdatasets/README.md +++ b/packages/google-maps-mapsplatformdatasets/README.md @@ -4,7 +4,7 @@ # [Maps Platform Datasets API: Node.js Client](https://github.com/googleapis/google-cloud-node) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@googlemaps/maps-platform-datasets.svg)](https://www.npmjs.org/package/@googlemaps/maps-platform-datasets) @@ -157,13 +157,12 @@ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. More Information: [Google Cloud Platform Launch Stages][launch_stages] diff --git a/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/snippet_metadata.google.maps.mapsplatformdatasets.v1alpha.json b/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/snippet_metadata.google.maps.mapsplatformdatasets.v1alpha.json index 55e73277186..8702d4bf131 100644 --- a/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/snippet_metadata.google.maps.mapsplatformdatasets.v1alpha.json +++ b/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/snippet_metadata.google.maps.mapsplatformdatasets.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-mapsplatformdatasets", - "version": "0.1.0", + "version": "0.1.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-routing/.repo-metadata.json b/packages/google-maps-routing/.repo-metadata.json index 55245842dcb..fbe17c4f778 100644 --- a/packages/google-maps-routing/.repo-metadata.json +++ b/packages/google-maps-routing/.repo-metadata.json @@ -4,13 +4,14 @@ "product_documentation": "", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/routing/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@googlemaps/routing", "api_id": "routes.googleapis.com", "default_version": "v2", "requires_billing": true, - "library_type": "GAPIC_AUTO" + "library_type": "GAPIC_AUTO", + "api_shortname": "routing" } diff --git a/packages/google-maps-routing/README.md b/packages/google-maps-routing/README.md index eb752d1642b..22e0e0aa828 100644 --- a/packages/google-maps-routing/README.md +++ b/packages/google-maps-routing/README.md @@ -4,7 +4,7 @@ # [Google Maps Routing: Node.js Client](https://github.com/googleapis/google-cloud-node) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@googlemaps/routing.svg)](https://www.npmjs.org/package/@googlemaps/routing) @@ -200,13 +200,12 @@ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. More Information: [Google Cloud Platform Launch Stages][launch_stages] diff --git a/packages/google-maps-routing/samples/generated/v2/snippet_metadata.google.maps.routing.v2.json b/packages/google-maps-routing/samples/generated/v2/snippet_metadata.google.maps.routing.v2.json index dd3ac3a9174..2a0eebd3d29 100644 --- a/packages/google-maps-routing/samples/generated/v2/snippet_metadata.google.maps.routing.v2.json +++ b/packages/google-maps-routing/samples/generated/v2/snippet_metadata.google.maps.routing.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-routing", - "version": "0.3.0", + "version": "0.3.1", "language": "TYPESCRIPT", "apis": [ { From 0bc0e904fa8890c60e61176f7e48fcbb58def595 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Wed, 22 Feb 2023 09:33:03 -0800 Subject: [PATCH 37/80] feat!: change default version to v1beta1 (#36) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat!: change default version to v1beta1 Release-As: v0.4.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- packages/google-cloud-dataform/.repo-metadata.json | 4 ++-- packages/google-cloud-dataform/src/index.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-dataform/.repo-metadata.json b/packages/google-cloud-dataform/.repo-metadata.json index 3a9fde6f925..1a482202a03 100644 --- a/packages/google-cloud-dataform/.repo-metadata.json +++ b/packages/google-cloud-dataform/.repo-metadata.json @@ -9,6 +9,6 @@ "repo": "googleapis/nodejs-dataform", "distribution_name": "@google-cloud/dataform", "api_id": "dataform.googleapis.com", - "default_version": "v1alpha2", + "default_version": "v1beta1", "requires_billing": true - } \ No newline at end of file + } diff --git a/packages/google-cloud-dataform/src/index.ts b/packages/google-cloud-dataform/src/index.ts index 5a59890dcc3..ecc9dcba7af 100644 --- a/packages/google-cloud-dataform/src/index.ts +++ b/packages/google-cloud-dataform/src/index.ts @@ -19,8 +19,8 @@ import * as v1alpha2 from './v1alpha2'; import * as v1beta1 from './v1beta1'; -const DataformClient = v1alpha2.DataformClient; -type DataformClient = v1alpha2.DataformClient; +const DataformClient = v1beta1.DataformClient; +type DataformClient = v1beta1.DataformClient; export {v1alpha2, v1beta1, DataformClient}; export default {v1alpha2, v1beta1, DataformClient}; From 52816f9a522088c74eae71716234f1efc69d33c1 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 22 Feb 2023 11:47:55 -0800 Subject: [PATCH 38/80] chore(main): release 0.4.0 (#37) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 0.4.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: trigger ci --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot Co-authored-by: Alexander Fenster --- packages/google-cloud-dataform/CHANGELOG.md | 11 +++++++++++ packages/google-cloud-dataform/package.json | 2 +- ...ippet_metadata.google.cloud.dataform.v1alpha2.json | 2 +- ...nippet_metadata.google.cloud.dataform.v1beta1.json | 2 +- packages/google-cloud-dataform/samples/package.json | 2 +- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-dataform/CHANGELOG.md b/packages/google-cloud-dataform/CHANGELOG.md index 0d83395822e..3736db89f3f 100644 --- a/packages/google-cloud-dataform/CHANGELOG.md +++ b/packages/google-cloud-dataform/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [0.4.0](https://github.com/googleapis/nodejs-dataform/compare/v0.3.0...v0.4.0) (2023-02-22) + + +### ⚠ BREAKING CHANGES + +* change default version to v1beta1 + +### Features + +* Change default version to v1beta1 ([34c9527](https://github.com/googleapis/nodejs-dataform/commit/34c9527e36d1e148480f33942a5d7745e320ecca)) + ## [0.3.0](https://github.com/googleapis/nodejs-dataform/compare/v0.2.0...v0.3.0) (2023-02-09) diff --git a/packages/google-cloud-dataform/package.json b/packages/google-cloud-dataform/package.json index 0b9556d2856..81eb1b65cca 100644 --- a/packages/google-cloud-dataform/package.json +++ b/packages/google-cloud-dataform/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/dataform", - "version": "0.3.0", + "version": "0.4.0", "description": "dataform client for Node.js", "repository": "googleapis/nodejs-dataform", "license": "Apache-2.0", diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json b/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json index 142af4f96d4..33b4e90044a 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataform", - "version": "0.3.0", + "version": "0.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json b/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json index 7acbfacb570..db73c05ad4b 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataform", - "version": "0.3.0", + "version": "0.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataform/samples/package.json b/packages/google-cloud-dataform/samples/package.json index 6101f3107cb..be75b9aaa75 100644 --- a/packages/google-cloud-dataform/samples/package.json +++ b/packages/google-cloud-dataform/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/dataform": "^0.3.0" + "@google-cloud/dataform": "^0.4.0" }, "devDependencies": { "c8": "^7.1.0", From b77694dc45df7ff6f4e72d463aa2e5c531cd5f99 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 23 Feb 2023 00:24:12 +0000 Subject: [PATCH 39/80] chore: release main (#3997) :robot: I have created a release *beep* *boop* ---
aiplatform: 2.7.0 ## [2.7.0](https://togithub.com/googleapis/google-cloud-node/compare/aiplatform-v2.6.1...aiplatform-v2.7.0) (2023-02-22) ### Features * Add match service in aiplatform v1beta1 match_service.proto ([#4002](https://togithub.com/googleapis/google-cloud-node/issues/4002)) ([e2944f5](https://togithub.com/googleapis/google-cloud-node/commit/e2944f565b39ae151e11f938fb9dcbefd337880e))
contentwarehouse: 0.4.0 ## [0.4.0](https://togithub.com/googleapis/google-cloud-node/compare/contentwarehouse-v0.3.1...contentwarehouse-v0.4.0) (2023-02-22) ### Features * [contentwarehouse] Added Training and Evaluation functions, request, responses and metadata to document_processor_service.proto ([#4009](https://togithub.com/googleapis/google-cloud-node/issues/4009)) ([904ac0c](https://togithub.com/googleapis/google-cloud-node/commit/904ac0cadd5b59c75309ac7766dad5da3080d105))
dialogflow: 5.6.0 ## [5.6.0](https://togithub.com/googleapis/google-cloud-node/compare/dialogflow-v5.5.1...dialogflow-v5.6.0) (2023-02-22) ### Features * [dialogflow] added support for AssistQueryParameters and SynthesizeSpeechConfig ([#3995](https://togithub.com/googleapis/google-cloud-node/issues/3995)) ([57c0441](https://togithub.com/googleapis/google-cloud-node/commit/57c0441e11fe7c7f2b185bb8061c8be1a036be11))
documentai: 7.1.0 ## [7.1.0](https://togithub.com/googleapis/google-cloud-node/compare/documentai-v7.0.1...documentai-v7.1.0) (2023-02-22) ### Features * [documentai] Added Training and Evaluation functions, request, responses and metadata to document_processor_service.proto ([#4008](https://togithub.com/googleapis/google-cloud-node/issues/4008)) ([f81218f](https://togithub.com/googleapis/google-cloud-node/commit/f81218fe90fb0ead2487c3e321e258edbde74039))
translate: 7.2.0 ## [7.2.0](https://togithub.com/googleapis/google-cloud-node/compare/translate-v7.1.1...translate-v7.2.0) (2023-02-22) ### Features * [translate] Add supported fields in document translation request and refresh translation v3 GA service proto documentation ([#4007](https://togithub.com/googleapis/google-cloud-node/issues/4007)) ([b9c09e3](https://togithub.com/googleapis/google-cloud-node/commit/b9c09e31a08a43bfa1049465aa7633c73ea91fc0))
--- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). --- .release-please-manifest.json | 10 +-- changelog.json | 87 ++++++++++++++++++- packages/google-cloud-aiplatform/CHANGELOG.md | 7 ++ packages/google-cloud-aiplatform/package.json | 2 +- ...t_metadata.google.cloud.aiplatform.v1.json | 2 +- ...adata.google.cloud.aiplatform.v1beta1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 ++ .../package.json | 2 +- ...data.google.cloud.contentwarehouse.v1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-dialogflow/CHANGELOG.md | 7 ++ packages/google-cloud-dialogflow/package.json | 2 +- ...t_metadata.google.cloud.dialogflow.v2.json | 2 +- ...adata.google.cloud.dialogflow.v2beta1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-documentai/CHANGELOG.md | 7 ++ packages/google-cloud-documentai/package.json | 2 +- ...t_metadata.google.cloud.documentai.v1.json | 2 +- ...adata.google.cloud.documentai.v1beta1.json | 2 +- ...adata.google.cloud.documentai.v1beta2.json | 2 +- ...adata.google.cloud.documentai.v1beta3.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-translate/CHANGELOG.md | 7 ++ packages/google-cloud-translate/package.json | 2 +- ..._metadata.google.cloud.translation.v3.json | 2 +- ...data.google.cloud.translation.v3beta1.json | 2 +- .../samples/package.json | 2 +- 28 files changed, 147 insertions(+), 27 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3c38b959ef2..f16892e6cd4 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -9,7 +9,7 @@ "packages/google-appengine": "2.2.1", "packages/google-area120-tables": "2.2.1", "packages/google-cloud-accessapproval": "2.2.1", - "packages/google-cloud-aiplatform": "2.6.1", + "packages/google-cloud-aiplatform": "2.7.0", "packages/google-cloud-apigateway": "2.2.1", "packages/google-cloud-apigeeconnect": "2.2.1", "packages/google-cloud-asset": "4.6.1", @@ -35,7 +35,7 @@ "packages/google-cloud-clouddms": "2.2.1", "packages/google-cloud-compute": "3.8.1", "packages/google-cloud-contactcenterinsights": "2.4.1", - "packages/google-cloud-contentwarehouse": "0.3.1", + "packages/google-cloud-contentwarehouse": "0.4.0", "packages/google-cloud-datacatalog": "3.2.1", "packages/google-cloud-datafusion": "2.2.1", "packages/google-cloud-datalabeling": "3.2.1", @@ -44,10 +44,10 @@ "packages/google-cloud-dataqna": "2.1.1", "packages/google-cloud-datastream": "2.2.1", "packages/google-cloud-deploy": "2.3.1", - "packages/google-cloud-dialogflow": "5.5.1", + "packages/google-cloud-dialogflow": "5.6.0", "packages/google-cloud-dialogflow-cx": "3.2.1", "packages/google-cloud-discoveryengine": "0.3.1", - "packages/google-cloud-documentai": "7.0.1", + "packages/google-cloud-documentai": "7.1.0", "packages/google-cloud-domains": "2.2.1", "packages/google-cloud-essentialcontacts": "2.1.1", "packages/google-cloud-eventarc": "2.3.1", @@ -101,7 +101,7 @@ "packages/google-cloud-tasks": "3.1.1", "packages/google-cloud-texttospeech": "4.2.1", "packages/google-cloud-tpu": "2.4.1", - "packages/google-cloud-translate": "7.1.1", + "packages/google-cloud-translate": "7.2.0", "packages/google-cloud-video-livestream": "0.4.1", "packages/google-cloud-video-stitcher": "0.3.1", "packages/google-cloud-video-transcoder": "2.4.1", diff --git a/changelog.json b/changelog.json index 2ce4b5ffa5e..4e8667c4804 100644 --- a/changelog.json +++ b/changelog.json @@ -1,6 +1,91 @@ { "repository": "googleapis/google-cloud-node", "entries": [ + { + "changes": [ + { + "type": "feat", + "sha": "b9c09e31a08a43bfa1049465aa7633c73ea91fc0", + "message": "[translate] Add supported fields in document translation request and refresh translation v3 GA service proto documentation", + "issues": [ + "4007" + ] + } + ], + "version": "7.2.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/translate", + "id": "b1cca3dc-fccb-4290-8bd8-4d9107df8f33", + "createTime": "2023-02-22T06:11:36.250Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "f81218fe90fb0ead2487c3e321e258edbde74039", + "message": "[documentai] Added Training and Evaluation functions, request, responses and metadata to document_processor_service.proto", + "issues": [ + "4008" + ] + } + ], + "version": "7.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/documentai", + "id": "1446e8f8-1d18-49b0-a0c5-1bd1f5b5bb93", + "createTime": "2023-02-22T06:11:36.249Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "57c0441e11fe7c7f2b185bb8061c8be1a036be11", + "message": "[dialogflow] added support for AssistQueryParameters and SynthesizeSpeechConfig", + "issues": [ + "3995" + ] + } + ], + "version": "5.6.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dialogflow", + "id": "e970007f-4f35-4621-8bdf-d0ab72eda267", + "createTime": "2023-02-22T06:11:36.248Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "904ac0cadd5b59c75309ac7766dad5da3080d105", + "message": "[contentwarehouse] Added Training and Evaluation functions, request, responses and metadata to document_processor_service.proto", + "issues": [ + "4009" + ] + } + ], + "version": "0.4.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/contentwarehouse", + "id": "093b1f50-c319-4241-a82e-3adf2ed3f1cb", + "createTime": "2023-02-22T06:11:36.246Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "e2944f565b39ae151e11f938fb9dcbefd337880e", + "message": "Add match service in aiplatform v1beta1 match_service.proto", + "issues": [ + "4002" + ] + } + ], + "version": "2.7.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/aiplatform", + "id": "52a207d6-c69c-437c-8b84-cb32466f2142", + "createTime": "2023-02-22T06:11:36.245Z" + }, { "changes": [ { @@ -4071,5 +4156,5 @@ "createTime": "2023-01-28T04:18:24.718Z" } ], - "updateTime": "2023-02-15T18:51:29.272Z" + "updateTime": "2023-02-22T06:11:36.250Z" } \ No newline at end of file diff --git a/packages/google-cloud-aiplatform/CHANGELOG.md b/packages/google-cloud-aiplatform/CHANGELOG.md index 91fd1742b16..d80b28e4f94 100644 --- a/packages/google-cloud-aiplatform/CHANGELOG.md +++ b/packages/google-cloud-aiplatform/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.7.0](https://github.com/googleapis/google-cloud-node/compare/aiplatform-v2.6.1...aiplatform-v2.7.0) (2023-02-22) + + +### Features + +* Add match service in aiplatform v1beta1 match_service.proto ([#4002](https://github.com/googleapis/google-cloud-node/issues/4002)) ([e2944f5](https://github.com/googleapis/google-cloud-node/commit/e2944f565b39ae151e11f938fb9dcbefd337880e)) + ## [2.6.1](https://github.com/googleapis/google-cloud-node/compare/aiplatform-v2.6.0...aiplatform-v2.6.1) (2023-02-15) diff --git a/packages/google-cloud-aiplatform/package.json b/packages/google-cloud-aiplatform/package.json index 730cf7bbb83..aff343d24e2 100644 --- a/packages/google-cloud-aiplatform/package.json +++ b/packages/google-cloud-aiplatform/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/aiplatform", - "version": "2.6.1", + "version": "2.7.0", "description": "Vertex AI client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json index b3cee0ca22b..f94e6d9f906 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-aiplatform", - "version": "2.6.1", + "version": "2.7.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json index 4918a329ff1..d9d02e3a5be 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-aiplatform", - "version": "2.6.1", + "version": "2.7.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-aiplatform/samples/package.json b/packages/google-cloud-aiplatform/samples/package.json index a9d647aada1..530c4d055f7 100644 --- a/packages/google-cloud-aiplatform/samples/package.json +++ b/packages/google-cloud-aiplatform/samples/package.json @@ -13,7 +13,7 @@ "test": "mocha --timeout 1200000 test/*.js" }, "dependencies": { - "@google-cloud/aiplatform": "^2.6.1" + "@google-cloud/aiplatform": "^2.7.0" }, "devDependencies": { "chai": "^4.2.0", diff --git a/packages/google-cloud-contentwarehouse/CHANGELOG.md b/packages/google-cloud-contentwarehouse/CHANGELOG.md index d7f18a4bab8..61a716a0e2b 100644 --- a/packages/google-cloud-contentwarehouse/CHANGELOG.md +++ b/packages/google-cloud-contentwarehouse/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.4.0](https://github.com/googleapis/google-cloud-node/compare/contentwarehouse-v0.3.1...contentwarehouse-v0.4.0) (2023-02-22) + + +### Features + +* [contentwarehouse] Added Training and Evaluation functions, request, responses and metadata to document_processor_service.proto ([#4009](https://github.com/googleapis/google-cloud-node/issues/4009)) ([904ac0c](https://github.com/googleapis/google-cloud-node/commit/904ac0cadd5b59c75309ac7766dad5da3080d105)) + ## [0.3.1](https://github.com/googleapis/google-cloud-node/compare/contentwarehouse-v0.3.0...contentwarehouse-v0.3.1) (2023-02-15) diff --git a/packages/google-cloud-contentwarehouse/package.json b/packages/google-cloud-contentwarehouse/package.json index 84a9390374f..a68e890462d 100644 --- a/packages/google-cloud-contentwarehouse/package.json +++ b/packages/google-cloud-contentwarehouse/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/contentwarehouse", - "version": "0.3.1", + "version": "0.4.0", "description": "Document AI Warehouse client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-contentwarehouse/samples/generated/v1/snippet_metadata.google.cloud.contentwarehouse.v1.json b/packages/google-cloud-contentwarehouse/samples/generated/v1/snippet_metadata.google.cloud.contentwarehouse.v1.json index d8574cfbffd..965b961ac8b 100644 --- a/packages/google-cloud-contentwarehouse/samples/generated/v1/snippet_metadata.google.cloud.contentwarehouse.v1.json +++ b/packages/google-cloud-contentwarehouse/samples/generated/v1/snippet_metadata.google.cloud.contentwarehouse.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-contentwarehouse", - "version": "0.3.1", + "version": "0.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-contentwarehouse/samples/package.json b/packages/google-cloud-contentwarehouse/samples/package.json index ed7db345b4f..b8bdcc58c9d 100644 --- a/packages/google-cloud-contentwarehouse/samples/package.json +++ b/packages/google-cloud-contentwarehouse/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/contentwarehouse": "^0.3.1" + "@google-cloud/contentwarehouse": "^0.4.0" }, "devDependencies": { "c8": "^7.1.0", diff --git a/packages/google-cloud-dialogflow/CHANGELOG.md b/packages/google-cloud-dialogflow/CHANGELOG.md index 4a1f598b4a3..2140096af27 100644 --- a/packages/google-cloud-dialogflow/CHANGELOG.md +++ b/packages/google-cloud-dialogflow/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/dialogflow?activeTab=versions +## [5.6.0](https://github.com/googleapis/google-cloud-node/compare/dialogflow-v5.5.1...dialogflow-v5.6.0) (2023-02-22) + + +### Features + +* [dialogflow] added support for AssistQueryParameters and SynthesizeSpeechConfig ([#3995](https://github.com/googleapis/google-cloud-node/issues/3995)) ([57c0441](https://github.com/googleapis/google-cloud-node/commit/57c0441e11fe7c7f2b185bb8061c8be1a036be11)) + ## [5.5.1](https://github.com/googleapis/google-cloud-node/compare/dialogflow-v5.5.0...dialogflow-v5.5.1) (2023-02-15) diff --git a/packages/google-cloud-dialogflow/package.json b/packages/google-cloud-dialogflow/package.json index e4a130a8081..e562fcf0454 100644 --- a/packages/google-cloud-dialogflow/package.json +++ b/packages/google-cloud-dialogflow/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/dialogflow", "description": "Dialogflow API client for Node.js", - "version": "5.5.1", + "version": "5.6.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata.google.cloud.dialogflow.v2.json b/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata.google.cloud.dialogflow.v2.json index 45fcbc69546..d5013d21dcd 100644 --- a/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata.google.cloud.dialogflow.v2.json +++ b/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata.google.cloud.dialogflow.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dialogflow", - "version": "5.5.1", + "version": "5.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json b/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json index 6fc91f5a00a..e7715fb8c63 100644 --- a/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json +++ b/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dialogflow", - "version": "5.5.1", + "version": "5.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dialogflow/samples/package.json b/packages/google-cloud-dialogflow/samples/package.json index 96856fa69ea..3ee4bef89cc 100644 --- a/packages/google-cloud-dialogflow/samples/package.json +++ b/packages/google-cloud-dialogflow/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha test --timeout=600000" }, "dependencies": { - "@google-cloud/dialogflow": "^5.5.1", + "@google-cloud/dialogflow": "^5.6.0", "pb-util": "^1.0.0", "uuid": "^9.0.0", "yargs": "^16.0.0" diff --git a/packages/google-cloud-documentai/CHANGELOG.md b/packages/google-cloud-documentai/CHANGELOG.md index 263f5d4a2f3..692d2f18396 100644 --- a/packages/google-cloud-documentai/CHANGELOG.md +++ b/packages/google-cloud-documentai/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [7.1.0](https://github.com/googleapis/google-cloud-node/compare/documentai-v7.0.1...documentai-v7.1.0) (2023-02-22) + + +### Features + +* [documentai] Added Training and Evaluation functions, request, responses and metadata to document_processor_service.proto ([#4008](https://github.com/googleapis/google-cloud-node/issues/4008)) ([f81218f](https://github.com/googleapis/google-cloud-node/commit/f81218fe90fb0ead2487c3e321e258edbde74039)) + ## [7.0.1](https://github.com/googleapis/google-cloud-node/compare/documentai-v7.0.0...documentai-v7.0.1) (2023-02-15) diff --git a/packages/google-cloud-documentai/package.json b/packages/google-cloud-documentai/package.json index 393ebaed58f..c065047a773 100644 --- a/packages/google-cloud-documentai/package.json +++ b/packages/google-cloud-documentai/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/documentai", - "version": "7.0.1", + "version": "7.1.0", "description": "Document AI client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata.google.cloud.documentai.v1.json b/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata.google.cloud.documentai.v1.json index fc92848239a..6c852872522 100644 --- a/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata.google.cloud.documentai.v1.json +++ b/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata.google.cloud.documentai.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "7.0.1", + "version": "7.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata.google.cloud.documentai.v1beta1.json b/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata.google.cloud.documentai.v1beta1.json index 2b41fe65610..e7fa2e7a109 100644 --- a/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata.google.cloud.documentai.v1beta1.json +++ b/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata.google.cloud.documentai.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "7.0.1", + "version": "7.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata.google.cloud.documentai.v1beta2.json b/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata.google.cloud.documentai.v1beta2.json index 330ff8b03fc..b4ce191f4cb 100644 --- a/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata.google.cloud.documentai.v1beta2.json +++ b/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata.google.cloud.documentai.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "7.0.1", + "version": "7.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata.google.cloud.documentai.v1beta3.json b/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata.google.cloud.documentai.v1beta3.json index d19cfb35d26..4fbcbe9b805 100644 --- a/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata.google.cloud.documentai.v1beta3.json +++ b/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata.google.cloud.documentai.v1beta3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "7.0.1", + "version": "7.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/samples/package.json b/packages/google-cloud-documentai/samples/package.json index 5cd198e3879..9801249abec 100644 --- a/packages/google-cloud-documentai/samples/package.json +++ b/packages/google-cloud-documentai/samples/package.json @@ -13,7 +13,7 @@ "test": "mocha test/*.js --timeout 600000" }, "dependencies": { - "@google-cloud/documentai": "^7.0.1", + "@google-cloud/documentai": "^7.1.0", "@google-cloud/storage": "^6.0.0", "p-queue": "^7.0.0", "uuid": "^9.0.0" diff --git a/packages/google-cloud-translate/CHANGELOG.md b/packages/google-cloud-translate/CHANGELOG.md index 9be99d599ac..f2122882969 100644 --- a/packages/google-cloud-translate/CHANGELOG.md +++ b/packages/google-cloud-translate/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-translate?activeTab=versions +## [7.2.0](https://github.com/googleapis/google-cloud-node/compare/translate-v7.1.1...translate-v7.2.0) (2023-02-22) + + +### Features + +* [translate] Add supported fields in document translation request and refresh translation v3 GA service proto documentation ([#4007](https://github.com/googleapis/google-cloud-node/issues/4007)) ([b9c09e3](https://github.com/googleapis/google-cloud-node/commit/b9c09e31a08a43bfa1049465aa7633c73ea91fc0)) + ## [7.1.1](https://github.com/googleapis/google-cloud-node/compare/translate-v7.1.0...translate-v7.1.1) (2023-02-15) diff --git a/packages/google-cloud-translate/package.json b/packages/google-cloud-translate/package.json index cef05f1e6ee..9bbdd9abcae 100644 --- a/packages/google-cloud-translate/package.json +++ b/packages/google-cloud-translate/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/translate", "description": "Cloud Translation API Client Library for Node.js", - "version": "7.1.1", + "version": "7.2.0", "license": "Apache-2.0", "author": "Google Inc.", "engines": { diff --git a/packages/google-cloud-translate/samples/generated/v3/snippet_metadata.google.cloud.translation.v3.json b/packages/google-cloud-translate/samples/generated/v3/snippet_metadata.google.cloud.translation.v3.json index cce074cb254..b7c5e765b16 100644 --- a/packages/google-cloud-translate/samples/generated/v3/snippet_metadata.google.cloud.translation.v3.json +++ b/packages/google-cloud-translate/samples/generated/v3/snippet_metadata.google.cloud.translation.v3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-translation", - "version": "7.1.1", + "version": "7.2.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-translate/samples/generated/v3beta1/snippet_metadata.google.cloud.translation.v3beta1.json b/packages/google-cloud-translate/samples/generated/v3beta1/snippet_metadata.google.cloud.translation.v3beta1.json index d8b3f5058ba..8a2c6dbc95b 100644 --- a/packages/google-cloud-translate/samples/generated/v3beta1/snippet_metadata.google.cloud.translation.v3beta1.json +++ b/packages/google-cloud-translate/samples/generated/v3beta1/snippet_metadata.google.cloud.translation.v3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-translation", - "version": "7.1.1", + "version": "7.2.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-translate/samples/package.json b/packages/google-cloud-translate/samples/package.json index e0aba293fde..87871eafcfe 100644 --- a/packages/google-cloud-translate/samples/package.json +++ b/packages/google-cloud-translate/samples/package.json @@ -16,7 +16,7 @@ "dependencies": { "@google-cloud/automl": "^3.0.0", "@google-cloud/text-to-speech": "^4.0.0", - "@google-cloud/translate": "^7.1.1", + "@google-cloud/translate": "^7.2.0", "@google-cloud/vision": "^3.0.0", "yargs": "^16.0.0" }, From 2f36d79adafb5638b4369bb459b1529eaed19175 Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Wed, 22 Feb 2023 20:10:39 -0800 Subject: [PATCH 40/80] docs: update the list of available APIs (#3993) --- README.md | 11 +-- libraries.json | 241 +++++++++++++++++++++++++------------------------ 2 files changed, 126 insertions(+), 126 deletions(-) diff --git a/README.md b/README.md index e51834d0407..104fb808132 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ applications that interact with individual Google Cloud services: | [Dialogflow CX API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-dialogflow-cx) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/dialogflow-cx)](https://npm.im/@google-cloud/dialogflow-cx) | | [DNS](https://github.com/googleapis/nodejs-dns) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/dns)](https://npm.im/@google-cloud/dns) | | [Document AI](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-documentai) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/documentai)](https://npm.im/@google-cloud/documentai) | +| [Document AI Warehouse](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-contentwarehouse) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/contentwarehouse)](https://npm.im/@google-cloud/contentwarehouse) | | [Domains](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-domains) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/domains)](https://npm.im/@google-cloud/domains) | | [Error Reporting](https://github.com/googleapis/nodejs-error-reporting) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/error-reporting)](https://npm.im/@google-cloud/error-reporting) | | [Essential Contacts API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-essentialcontacts) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/essential-contacts)](https://npm.im/@google-cloud/essential-contacts) | @@ -67,6 +68,7 @@ applications that interact with individual Google Cloud services: | [Grafeas](https://github.com/googleapis/google-cloud-node/tree/main/packages/grafeas) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/grafeas)](https://npm.im/@google-cloud/grafeas) | | [IAM Policy Troubleshooter API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-policytroubleshooter) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/policy-troubleshooter)](https://npm.im/@google-cloud/policy-troubleshooter) | | [IAM Service Account Credentials API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-iam-credentials) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/iam-credentials)](https://npm.im/@google-cloud/iam-credentials) | +| [Identity and Access Management](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-iam) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/iam)](https://npm.im/@google-cloud/iam) | | [Identity-Aware Proxy](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-iap) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/iap)](https://npm.im/@google-cloud/iap) | | [IDS](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-ids) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/ids)](https://npm.im/@google-cloud/ids) | | [Internet of Things (IoT) Core](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-iot) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/iot)](https://npm.im/@google-cloud/iot) | @@ -96,6 +98,7 @@ applications that interact with individual Google Cloud services: | [Resource Manager API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-resourcemanager) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/resource-manager)](https://npm.im/@google-cloud/resource-manager) | | [Resource Settings API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-resourcesettings) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/resource-settings)](https://npm.im/@google-cloud/resource-settings) | | [Retail API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-retail) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/retail)](https://npm.im/@google-cloud/retail) | +| [Run](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-run) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/run)](https://npm.im/@google-cloud/run) | | [Scheduler](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-scheduler) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/scheduler)](https://npm.im/@google-cloud/scheduler) | | [Secret Manager](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-secretmanager) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/secret-manager)](https://npm.im/@google-cloud/secret-manager) | | [Security Command Center](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-securitycenter) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/security-center)](https://npm.im/@google-cloud/security-center) | @@ -110,7 +113,6 @@ applications that interact with individual Google Cloud services: | [Stackdriver Monitoring](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-monitoring) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/monitoring)](https://npm.im/@google-cloud/monitoring) | | [Storage](https://github.com/googleapis/nodejs-storage) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/storage)](https://npm.im/@google-cloud/storage) | | [Storage Transfer Service](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-storagetransfer) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/storage-transfer)](https://npm.im/@google-cloud/storage-transfer) | -| [Storage Transfer Service](https://github.com/googleapis/nodejs-storage-transfer) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/storage-transfer)](https://npm.im/@google-cloud/storage-transfer) | | [Talent Solution](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-talent) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/talent)](https://npm.im/@google-cloud/talent) | | [Tasks](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-tasks) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/tasks)](https://npm.im/@google-cloud/tasks) | | [Text-to-Speech](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-texttospeech) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/text-to-speech)](https://npm.im/@google-cloud/text-to-speech) | @@ -119,8 +121,10 @@ applications that interact with individual Google Cloud services: | [Translation](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-translate) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/translate)](https://npm.im/@google-cloud/translate) | | [Vertex AI](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-aiplatform) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/aiplatform)](https://npm.im/@google-cloud/aiplatform) | | [Video Intelligence](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-videointelligence) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/video-intelligence)](https://npm.im/@google-cloud/video-intelligence) | +| [Video Stitcher API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-video-stitcher) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/video-stitcher)](https://npm.im/@google-cloud/video-stitcher) | | [Virtual Private Cloud](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-vpcaccess) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/vpc-access)](https://npm.im/@google-cloud/vpc-access) | | [Vision API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-vision) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/vision)](https://npm.im/@google-cloud/vision) | +| [VMware Engine API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-vmwareengine) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/vmwareengine)](https://npm.im/@google-cloud/vmwareengine) | | [Web Risk API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-webrisk) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/web-risk)](https://npm.im/@google-cloud/web-risk) | | [Web Security Scanner](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-websecurityscanner) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/web-security-scanner)](https://npm.im/@google-cloud/web-security-scanner) | | [Workflows](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-workflows-executions) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/workflows)](https://npm.im/@google-cloud/workflows) | @@ -144,23 +148,18 @@ applications that interact with individual Google Cloud services: | [Dataflow](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-dataflow) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/dataflow)](https://npm.im/@google-cloud/dataflow) | | [Dataform API](https://github.com/googleapis/nodejs-dataform) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/dataform)](https://npm.im/@google-cloud/dataform) | | [Discovery Engine API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-discoveryengine) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/discoveryengine)](https://npm.im/@google-cloud/discoveryengine) | -| [Document AI Warehouse](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-contentwarehouse) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/contentwarehouse)](https://npm.im/@google-cloud/contentwarehouse) | | [GKE Connect Gateway](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-gkeconnect-gateway) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/gke-connect-gateway)](https://npm.im/@google-cloud/gke-connect-gateway) | | [Google Analytics Admin](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-analytics-admin) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-analytics/admin)](https://npm.im/@google-analytics/admin) | | [Google Analytics Admin](https://github.com/googleapis/nodejs-analytics-admin) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-analytics/admin)](https://npm.im/@google-analytics/admin) | | [Google Analytics Data](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-analytics-data) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-analytics/data)](https://npm.im/@google-analytics/data) | | [Google Maps Routing](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-maps-routing) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@googlemaps/routing)](https://npm.im/@googlemaps/routing) | | [Google Workspace Add-ons API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-gsuiteaddons) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/gsuiteaddons)](https://npm.im/@google-cloud/gsuiteaddons) | -| [Identity and Access Management](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-iam) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/iam)](https://npm.im/@google-cloud/iam) | | [Life Sciences](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-lifesciences) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/life-sciences)](https://npm.im/@google-cloud/life-sciences) | | [Network Security API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-networksecurity) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/network-security)](https://npm.im/@google-cloud/network-security) | | [Phishing Protection](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-phishingprotection) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/phishing-protection)](https://npm.im/@google-cloud/phishing-protection) | | [Private Catalog](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-privatecatalog) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/private-catalog)](https://npm.im/@google-cloud/private-catalog) | | [Public Certificate Authority](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-security-publicca) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/publicca)](https://npm.im/@google-cloud/publicca) | -| [Run](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-run) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/run)](https://npm.im/@google-cloud/run) | | [Trace](https://github.com/googleapis/cloud-trace-nodejs) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/trace-agent)](https://npm.im/@google-cloud/trace-agent) | -| [Video Stitcher API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-video-stitcher) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/video-stitcher)](https://npm.im/@google-cloud/video-stitcher) | -| [VMware Engine API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-vmwareengine) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/vmwareengine)](https://npm.im/@google-cloud/vmwareengine) | If the service is not listed above, [google-api-nodejs-client](https://github.com/googleapis/google-api-nodejs-client) interfaces diff --git a/libraries.json b/libraries.json index ef158cd6c98..7cb8a02d073 100644 --- a/libraries.json +++ b/libraries.json @@ -142,7 +142,7 @@ "requires_billing": true, "default_version": "v1", "codeowner_team": "@googleapis/cloud-asset-team", - "api_shortname": "asset", + "api_shortname": "cloudasset", "library_type": "GAPIC_AUTO", "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-asset", "support_documentation": "https://cloud.google.com/resource-manager/docs/getting-support" @@ -454,7 +454,7 @@ "api_id": "datamigration.googleapis.com", "requires_billing": true, "default_version": "v1", - "api_shortname": "dms", + "api_shortname": "clouddms", "library_type": "GAPIC_AUTO", "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-clouddms", "support_documentation": "https://cloud.google.com/database-migration/docs/getting-support" @@ -674,6 +674,24 @@ "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-documentai", "support_documentation": "https://cloud.google.com/document-ai/docs/getting-support" }, + { + "name": "contentwarehouse", + "name_pretty": "Document AI Warehouse", + "product_documentation": "cloud.google.com/document-warehouse/", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/contentwarehouse/latest", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "ga", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "distribution_name": "@google-cloud/contentwarehouse", + "api_id": "contentwarehouse.googleapis.com", + "default_version": "v1", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "api_shortname": "contentwarehouse", + "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-contentwarehouse", + "support_documentation": "https://cloud.google.com/document-warehouse/docs/getting-support" + }, { "client_documentation": "https://cloud.google.com/nodejs/docs/reference/domains/latest", "api_id": "domains.googleapis.com", @@ -765,7 +783,7 @@ "support_documentation": "https://cloud.google.com/eventarc/docs/getting-support" }, { - "name": "filestore", + "name": "file", "api_shortname": "filestore", "name_pretty": "Filestore", "product_documentation": "https://cloud.google.com/filestore/", @@ -1059,6 +1077,24 @@ "library_type": "GAPIC_AUTO", "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-iam-credentials" }, + { + "name": "iam", + "name_pretty": "Identity and Access Management", + "product_documentation": "cloud.google.com/iam/", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/iam/latest", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "stable", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "distribution_name": "@google-cloud/iam", + "api_id": "google.iam.v2", + "default_version": "v2", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "api_shortname": "iam", + "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-iam", + "support_documentation": "https://cloud.google.com/iam/docs/getting-support" + }, { "name": "iap", "name_pretty": "Identity-Aware Proxy", @@ -1583,6 +1619,23 @@ "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-retail", "support_documentation": "https://cloud.google.com/recommendations/docs/getting-support" }, + { + "name": "run", + "name_pretty": "Run", + "product_documentation": "https://cloud.google.com/run", + "client_documentation": "https://googleapis.dev/nodejs/run/latest", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "stable", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "distribution_name": "@google-cloud/run", + "api_id": "run.googleapis.com", + "default_version": "v2", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-run", + "support_documentation": "https://cloud.google.com/run/docs/getting-support" + }, { "default_version": "v1", "release_level": "stable", @@ -1837,24 +1890,6 @@ "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-storagetransfer", "support_documentation": "https://cloud.google.com/storage-transfer/docs/getting-support" }, - { - "name": "storagetransfer", - "name_pretty": "Storage Transfer Service", - "product_documentation": "https://cloud.google.com/storage-transfer/", - "client_documentation": "https://googleapis.dev/nodejs/storagetransfer/latest/index.html", - "issue_tracker": "https://github.com/googleapis/nodejs-storage-transfer/issues", - "release_level": "stable", - "language": "nodejs", - "repo": "googleapis/nodejs-storage-transfer", - "distribution_name": "@google-cloud/storage-transfer", - "api_id": "storagetransfer.googleapis.com", - "default_version": "v1", - "requires_billing": true, - "api_shortname": "storagetransfer", - "library_type": "GAPIC_AUTO", - "linkToRepoHomepage": "https://github.com/googleapis/nodejs-storage-transfer", - "support_documentation": "https://cloud.google.com/storage-transfer/docs/getting-support" - }, { "client_documentation": "https://cloud.google.com/nodejs/docs/reference/talent/latest", "api_id": "jobs.googleapis.com", @@ -2005,6 +2040,24 @@ "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-videointelligence", "support_documentation": "https://cloud.google.com/video-intelligence/docs/getting-support" }, + { + "name": "videostitcher", + "name_pretty": "Video Stitcher API", + "product_documentation": "https://cloud.google.com/video-stitcher/", + "client_documentation": "https://googleapis.dev/nodejs/videostitcher/latest/", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "stable", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "codeowner_team": "@googleapis/cloud-media-team", + "distribution_name": "@google-cloud/video-stitcher", + "api_id": "stitcher.googleapis.com", + "default_version": "v1", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-video-stitcher", + "support_documentation": "https://cloud.google.com/video-stitcher/docs/getting-support" + }, { "name": "vpcaccess", "name_pretty": "Virtual Private Cloud", @@ -2042,6 +2095,24 @@ "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-vision", "support_documentation": "https://cloud.google.com/vision/docs/getting-support" }, + { + "name": "vmwareengine", + "name_pretty": "VMware Engine API", + "product_documentation": "cloud.google.com/vmware-engine/", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/vmwareengine/latest", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "stable", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "distribution_name": "@google-cloud/vmwareengine", + "api_id": "vmwareengine.googleapis.com", + "default_version": "v1", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "api_shortname": "vmwareengine", + "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-vmwareengine", + "support_documentation": "https://cloud.google.com/vmware-engine/docs/getting-support" + }, { "name_pretty": "Web Risk API", "language": "nodejs", @@ -2103,13 +2174,14 @@ "product_documentation": "", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/datapolicies/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/bigquery-datapolicies", "api_id": "google.cloud.bigquery.datapolicies.v1beta1", "default_version": "v1beta1", "requires_billing": true, + "api_shortname": "bigquerydatapolicy", "library_type": "GAPIC_AUTO", "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-bigquery-datapolicies" }, @@ -2127,6 +2199,7 @@ "default_version": "v1beta1", "requires_billing": true, "library_type": "GAPIC_AUTO", + "api_shortname": "analyticshub", "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-bigquery-dataexchange", "support_documentation": "https://cloud.google.com/analytics-hub/docs/getting-support" }, @@ -2136,7 +2209,7 @@ "product_documentation": "", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/gkemulticloud/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/gkemulticloud", @@ -2144,15 +2217,17 @@ "default_version": "v1", "requires_billing": true, "library_type": "GAPIC_AUTO", + "api_shortname": "gkemulticloud", "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-gkemulticloud" }, { + "api_shortname": "apikeys", "name": "apikeys", "name_pretty": "API Keys API", "product_documentation": "cloud.google.com/api-keys/", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/apikeys/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/apikeys", @@ -2222,7 +2297,7 @@ "product_documentation": "cloud.google.com/batch/", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/batch/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/batch", @@ -2230,6 +2305,7 @@ "default_version": "v1", "requires_billing": true, "library_type": "GAPIC_AUTO", + "api_shortname": "batch", "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-batch", "support_documentation": "https://cloud.google.com/batch/docs/getting-support" }, @@ -2239,7 +2315,7 @@ "product_documentation": "", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/appconnections/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/appconnections", @@ -2247,6 +2323,7 @@ "default_version": "v1", "requires_billing": true, "library_type": "GAPIC_AUTO", + "api_shortname": "beyondcorp", "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-beyondcorp-appconnections" }, { @@ -2255,7 +2332,7 @@ "product_documentation": "https://cloud.google.com/beyondcorp", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/beyondcorp/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/appconnectors", @@ -2263,6 +2340,7 @@ "default_version": "v1", "requires_billing": true, "library_type": "GAPIC_AUTO", + "api_shortname": "beyondcorp", "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-beyondcorp-appconnectors", "support_documentation": "https://cloud.google.com/beyondcorp/docs/getting-support" }, @@ -2272,7 +2350,7 @@ "product_documentation": "https://cloud.google.com/beyondcorp", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/appgateways/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/appgateways", @@ -2280,6 +2358,7 @@ "default_version": "v1", "requires_billing": true, "library_type": "GAPIC_AUTO", + "api_shortname": "beyondcorp", "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-beyondcorp-appgateways", "support_documentation": "https://cloud.google.com/beyondcorp/docs/getting-support" }, @@ -2289,7 +2368,7 @@ "product_documentation": "", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/clientconnectorservices/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/clientconnectorservices", @@ -2297,6 +2376,7 @@ "default_version": "v1", "requires_billing": true, "library_type": "GAPIC_AUTO", + "api_shortname": "beyondcorp", "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-beyondcorp-clientconnectorservices" }, { @@ -2305,7 +2385,7 @@ "product_documentation": "", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/clientgateways/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/clientgateways", @@ -2313,6 +2393,7 @@ "default_version": "v1", "requires_billing": true, "library_type": "GAPIC_AUTO", + "api_shortname": "beyondcorp", "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-beyondcorp-clientgateways" }, { @@ -2356,7 +2437,7 @@ "product_documentation": "", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/lineage/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/lineage", @@ -2364,6 +2445,7 @@ "default_version": "v1", "requires_billing": true, "library_type": "GAPIC_AUTO", + "api_shortname": "datalineage", "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-datacatalog-lineage" }, { @@ -2413,7 +2495,7 @@ "repo": "googleapis/nodejs-dataform", "distribution_name": "@google-cloud/dataform", "api_id": "dataform.googleapis.com", - "default_version": "v1alpha2", + "default_version": "v1beta1", "requires_billing": true, "linkToRepoHomepage": "https://github.com/googleapis/nodejs-dataform", "support_documentation": "https://dataform.co/docs/getting-support" @@ -2424,7 +2506,7 @@ "product_documentation": "cloud.google.com/discovery-engine/", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/discoveryengine/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/discoveryengine", @@ -2432,26 +2514,10 @@ "default_version": "v1beta", "requires_billing": true, "library_type": "GAPIC_AUTO", + "api_shortname": "discoveryengine", "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-discoveryengine", "support_documentation": "https://cloud.google.com/discovery-engine/docs/getting-support" }, - { - "name": "contentwarehouse", - "name_pretty": "Document AI Warehouse", - "product_documentation": "cloud.google.com/document-warehouse/", - "client_documentation": "https://cloud.google.com/nodejs/docs/reference/contentwarehouse/latest", - "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", - "language": "nodejs", - "repo": "googleapis/google-cloud-node", - "distribution_name": "@google-cloud/contentwarehouse", - "api_id": "contentwarehouse.googleapis.com", - "default_version": "v1", - "requires_billing": true, - "library_type": "GAPIC_AUTO", - "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-contentwarehouse", - "support_documentation": "https://cloud.google.com/document-warehouse/docs/getting-support" - }, { "name": "connectgateway", "name_pretty": "GKE Connect Gateway", @@ -2531,7 +2597,7 @@ "product_documentation": "", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/routing/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@googlemaps/routing", @@ -2539,6 +2605,7 @@ "default_version": "v2", "requires_billing": true, "library_type": "GAPIC_AUTO", + "api_shortname": "routing", "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-maps-routing" }, { @@ -2547,7 +2614,7 @@ "product_documentation": "developers.google.com/workspace/add-ons/", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/gsuiteaddons/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/gsuiteaddons", @@ -2555,26 +2622,10 @@ "default_version": "v1", "requires_billing": true, "library_type": "GAPIC_AUTO", + "api_shortname": "gsuiteaddons", "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-gsuiteaddons", "support_documentation": "https://developers.google.com/workspace/add-ons/docs/getting-support" }, - { - "name": "iam", - "name_pretty": "Identity and Access Management", - "product_documentation": "cloud.google.com/iam/", - "client_documentation": "https://cloud.google.com/nodejs/docs/reference/iam/latest", - "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", - "language": "nodejs", - "repo": "googleapis/google-cloud-node", - "distribution_name": "@google-cloud/iam", - "api_id": "google.iam.v2", - "default_version": "v2", - "requires_billing": true, - "library_type": "GAPIC_AUTO", - "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-iam", - "support_documentation": "https://cloud.google.com/iam/docs/getting-support" - }, { "name": "lifesciences", "name_pretty": "Life Sciences", @@ -2653,7 +2704,7 @@ "product_documentation": "cloud.google.com/certificate-manager/docs/public-ca/", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/publicca/latest", "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/publicca", @@ -2664,22 +2715,6 @@ "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-security-publicca", "support_documentation": "https://cloud.google.com/certificate-manager/docs/getting-support" }, - { - "name": "run", - "name_pretty": "Run", - "product_documentation": "https://cloud.google.com/run", - "client_documentation": "https://googleapis.dev/nodejs/run/latest", - "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", - "language": "nodejs", - "repo": "googleapis/google-cloud-node", - "distribution_name": "@google-cloud/run", - "api_id": "run.googleapis.com", - "default_version": "v2", - "requires_billing": true, - "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-run", - "support_documentation": "https://cloud.google.com/run/docs/getting-support" - }, { "name": "trace", "name_pretty": "Trace", @@ -2696,39 +2731,5 @@ "library_type": "AGENT", "linkToRepoHomepage": "https://github.com/googleapis/cloud-trace-nodejs", "support_documentation": "https://cloud.google.com/trace/docs/getting-support" - }, - { - "name": "videostitcher", - "name_pretty": "Video Stitcher API", - "product_documentation": "https://cloud.google.com/video-stitcher/", - "client_documentation": "https://googleapis.dev/nodejs/videostitcher/latest/", - "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", - "language": "nodejs", - "repo": "googleapis/google-cloud-node", - "codeowner_team": "@googleapis/cloud-media-team", - "distribution_name": "@google-cloud/video-stitcher", - "api_id": "stitcher.googleapis.com", - "default_version": "v1", - "requires_billing": true, - "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-video-stitcher", - "support_documentation": "https://cloud.google.com/video-stitcher/docs/getting-support" - }, - { - "name": "vmwareengine", - "name_pretty": "VMware Engine API", - "product_documentation": "cloud.google.com/vmware-engine/", - "client_documentation": "https://cloud.google.com/nodejs/docs/reference/vmwareengine/latest", - "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "release_level": "beta", - "language": "nodejs", - "repo": "googleapis/google-cloud-node", - "distribution_name": "@google-cloud/vmwareengine", - "api_id": "vmwareengine.googleapis.com", - "default_version": "v1", - "requires_billing": true, - "library_type": "GAPIC_AUTO", - "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-vmwareengine", - "support_documentation": "https://cloud.google.com/vmware-engine/docs/getting-support" } ] \ No newline at end of file From 55e5c3e032adaaa5fad77cdcc4333f28509a89df Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Wed, 22 Feb 2023 21:00:18 -0800 Subject: [PATCH 41/80] build: update .repo-metedata.json --- packages/google-cloud-dataform/.repo-metadata.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-dataform/.repo-metadata.json b/packages/google-cloud-dataform/.repo-metadata.json index 1a482202a03..862e920450a 100644 --- a/packages/google-cloud-dataform/.repo-metadata.json +++ b/packages/google-cloud-dataform/.repo-metadata.json @@ -4,11 +4,12 @@ "product_documentation": "https://dataform.co/", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/dataform/latest", "issue_tracker": "https://github.com/googleapis/nodejs-dataform/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/nodejs-dataform", "distribution_name": "@google-cloud/dataform", "api_id": "dataform.googleapis.com", "default_version": "v1beta1", - "requires_billing": true - } + "requires_billing": true, + "library_type": "GAPIC_AUTO" +} From c60425585046cfb874d8895737c75ed67db7382e Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Wed, 22 Feb 2023 21:10:50 -0800 Subject: [PATCH 42/80] build: add release-please config, fix owlbot-config --- .release-please-manifest.json | 9 +- .../{.github => }/.OwlBot.yaml | 6 +- packages/google-cloud-dataform/.mocharc.js | 2 +- packages/google-cloud-dataform/.prettierrc.js | 2 +- .../google-cloud-dataform/.repo-metadata.json | 26 +- packages/google-cloud-dataform/README.md | 103 +- packages/google-cloud-dataform/package.json | 133 +- .../google-cloud-dataform/samples/README.md | 1364 +++++++++++++++++ packages/google-cloud-dataform/src/index.ts | 2 +- release-please-config.json | 9 +- 10 files changed, 1553 insertions(+), 103 deletions(-) rename packages/google-cloud-dataform/{.github => }/.OwlBot.yaml (79%) create mode 100644 packages/google-cloud-dataform/samples/README.md diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f16892e6cd4..695332f5dda 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -37,6 +37,8 @@ "packages/google-cloud-contactcenterinsights": "2.4.1", "packages/google-cloud-contentwarehouse": "0.4.0", "packages/google-cloud-datacatalog": "3.2.1", + "packages/google-cloud-datacatalog-lineage": "0.1.1", + "packages/google-cloud-dataform": "0.4.0", "packages/google-cloud-datafusion": "2.2.1", "packages/google-cloud-datalabeling": "3.2.1", "packages/google-cloud-dataplex": "2.3.1", @@ -59,6 +61,7 @@ "packages/google-cloud-gkeconnect-gateway": "2.1.1", "packages/google-cloud-gkehub": "3.3.1", "packages/google-cloud-gkemulticloud": "0.3.1", + "packages/google-cloud-gsuiteaddons": "0.1.1", "packages/google-cloud-iap": "2.2.1", "packages/google-cloud-ids": "2.2.1", "packages/google-cloud-iot": "3.2.1", @@ -122,13 +125,11 @@ "packages/google-iam-credentials": "2.0.3", "packages/google-identity-accesscontextmanager": "2.3.1", "packages/google-maps-addressvalidation": "1.0.1", + "packages/google-maps-mapsplatformdatasets": "0.1.1", "packages/google-maps-routing": "0.3.1", "packages/google-monitoring-dashboard": "2.9.1", "packages/google-privacy-dlp": "4.4.1", "packages/google-storagetransfer": "2.3.1", "packages/grafeas": "4.2.2", - "packages/typeless-sample-bot": "1.3.0", - "packages/google-cloud-datacatalog-lineage": "0.1.1", - "packages/google-maps-mapsplatformdatasets": "0.1.1", - "packages/google-cloud-gsuiteaddons": "0.1.1" + "packages/typeless-sample-bot": "1.3.0" } diff --git a/packages/google-cloud-dataform/.github/.OwlBot.yaml b/packages/google-cloud-dataform/.OwlBot.yaml similarity index 79% rename from packages/google-cloud-dataform/.github/.OwlBot.yaml rename to packages/google-cloud-dataform/.OwlBot.yaml index 745d446d1ae..dc941a81d74 100644 --- a/packages/google-cloud-dataform/.github/.OwlBot.yaml +++ b/packages/google-cloud-dataform/.OwlBot.yaml @@ -11,12 +11,10 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -docker: - image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest deep-remove-regex: - /owl-bot-staging deep-copy-regex: - - source: /google/cloud/dataform/(.*)/.*-nodejs/(.*) - dest: /owl-bot-staging/$1/$2 + - source: /google/cloud/dataform/(.*)/.*-nodejs + dest: /owl-bot-staging/google-cloud-dataform/$1 diff --git a/packages/google-cloud-dataform/.mocharc.js b/packages/google-cloud-dataform/.mocharc.js index 0b600509bed..49e7e228701 100644 --- a/packages/google-cloud-dataform/.mocharc.js +++ b/packages/google-cloud-dataform/.mocharc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/.prettierrc.js b/packages/google-cloud-dataform/.prettierrc.js index d1b95106f4c..1e6cec783e4 100644 --- a/packages/google-cloud-dataform/.prettierrc.js +++ b/packages/google-cloud-dataform/.prettierrc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataform/.repo-metadata.json b/packages/google-cloud-dataform/.repo-metadata.json index 862e920450a..386816ec8fe 100644 --- a/packages/google-cloud-dataform/.repo-metadata.json +++ b/packages/google-cloud-dataform/.repo-metadata.json @@ -1,15 +1,15 @@ { - "name": "dataform", - "name_pretty": "Dataform API", - "product_documentation": "https://dataform.co/", - "client_documentation": "https://cloud.google.com/nodejs/docs/reference/dataform/latest", - "issue_tracker": "https://github.com/googleapis/nodejs-dataform/issues", - "release_level": "preview", - "language": "nodejs", - "repo": "googleapis/nodejs-dataform", - "distribution_name": "@google-cloud/dataform", - "api_id": "dataform.googleapis.com", - "default_version": "v1beta1", - "requires_billing": true, - "library_type": "GAPIC_AUTO" + "name": "dataform", + "name_pretty": "Dataform API", + "product_documentation": "https://dataform.co/", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/dataform/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/dataform", + "api_id": "dataform.googleapis.com", + "default_version": "v1beta1", + "requires_billing": true, + "library_type": "GAPIC_AUTO" } diff --git a/packages/google-cloud-dataform/README.md b/packages/google-cloud-dataform/README.md index 2119dc0e917..871cc4a77f0 100644 --- a/packages/google-cloud-dataform/README.md +++ b/packages/google-cloud-dataform/README.md @@ -2,9 +2,9 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Dataform API: Node.js Client](https://github.com/googleapis/nodejs-dataform) +# [Dataform API: Node.js Client](https://github.com/googleapis/google-cloud-node) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/dataform.svg)](https://www.npmjs.org/package/@google-cloud/dataform) @@ -14,11 +14,11 @@ dataform client for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-dataform/blob/main/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-dataform/CHANGELOG.md). * [Dataform API Node.js Client API Reference][client-docs] * [Dataform API Documentation][product-docs] -* [github.com/googleapis/nodejs-dataform](https://github.com/googleapis/nodejs-dataform) +* [github.com/googleapis/google-cloud-node/packages/google-cloud-dataform](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-dataform) Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in [Client Libraries Explained][explained]. @@ -32,7 +32,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. * [Before you begin](#before-you-begin) * [Installing the client library](#installing-the-client-library) - +* [Samples](#samples) * [Versioning](#versioning) * [Contributing](#contributing) * [License](#license) @@ -56,6 +56,88 @@ npm install @google-cloud/dataform +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Dataform.cancel_workflow_invocation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.cancel_workflow_invocation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.cancel_workflow_invocation.js,samples/README.md) | +| Dataform.commit_workspace_changes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.commit_workspace_changes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.commit_workspace_changes.js,samples/README.md) | +| Dataform.create_compilation_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_compilation_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_compilation_result.js,samples/README.md) | +| Dataform.create_repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_repository.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_repository.js,samples/README.md) | +| Dataform.create_workflow_invocation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workflow_invocation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workflow_invocation.js,samples/README.md) | +| Dataform.create_workspace | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workspace.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workspace.js,samples/README.md) | +| Dataform.delete_repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_repository.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_repository.js,samples/README.md) | +| Dataform.delete_workflow_invocation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workflow_invocation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workflow_invocation.js,samples/README.md) | +| Dataform.delete_workspace | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workspace.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workspace.js,samples/README.md) | +| Dataform.fetch_file_diff | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_diff.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_diff.js,samples/README.md) | +| Dataform.fetch_file_git_statuses | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_git_statuses.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_git_statuses.js,samples/README.md) | +| Dataform.fetch_git_ahead_behind | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_git_ahead_behind.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_git_ahead_behind.js,samples/README.md) | +| Dataform.fetch_remote_branches | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_remote_branches.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_remote_branches.js,samples/README.md) | +| Dataform.get_compilation_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_compilation_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_compilation_result.js,samples/README.md) | +| Dataform.get_repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_repository.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_repository.js,samples/README.md) | +| Dataform.get_workflow_invocation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workflow_invocation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workflow_invocation.js,samples/README.md) | +| Dataform.get_workspace | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workspace.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workspace.js,samples/README.md) | +| Dataform.install_npm_packages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.install_npm_packages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.install_npm_packages.js,samples/README.md) | +| Dataform.list_compilation_results | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_compilation_results.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_compilation_results.js,samples/README.md) | +| Dataform.list_repositories | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_repositories.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_repositories.js,samples/README.md) | +| Dataform.list_workflow_invocations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workflow_invocations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workflow_invocations.js,samples/README.md) | +| Dataform.list_workspaces | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workspaces.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workspaces.js,samples/README.md) | +| Dataform.make_directory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.make_directory.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.make_directory.js,samples/README.md) | +| Dataform.move_directory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_directory.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_directory.js,samples/README.md) | +| Dataform.move_file | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_file.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_file.js,samples/README.md) | +| Dataform.pull_git_commits | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.pull_git_commits.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.pull_git_commits.js,samples/README.md) | +| Dataform.push_git_commits | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.push_git_commits.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.push_git_commits.js,samples/README.md) | +| Dataform.query_compilation_result_actions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_compilation_result_actions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_compilation_result_actions.js,samples/README.md) | +| Dataform.query_directory_contents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_directory_contents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_directory_contents.js,samples/README.md) | +| Dataform.query_workflow_invocation_actions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_workflow_invocation_actions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_workflow_invocation_actions.js,samples/README.md) | +| Dataform.read_file | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.read_file.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.read_file.js,samples/README.md) | +| Dataform.remove_directory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_directory.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_directory.js,samples/README.md) | +| Dataform.remove_file | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_file.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_file.js,samples/README.md) | +| Dataform.reset_workspace_changes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.reset_workspace_changes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.reset_workspace_changes.js,samples/README.md) | +| Dataform.update_repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.update_repository.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.update_repository.js,samples/README.md) | +| Dataform.write_file | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.write_file.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.write_file.js,samples/README.md) | +| Dataform.cancel_workflow_invocation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.cancel_workflow_invocation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.cancel_workflow_invocation.js,samples/README.md) | +| Dataform.commit_workspace_changes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.commit_workspace_changes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.commit_workspace_changes.js,samples/README.md) | +| Dataform.create_compilation_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_compilation_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_compilation_result.js,samples/README.md) | +| Dataform.create_repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_repository.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_repository.js,samples/README.md) | +| Dataform.create_workflow_invocation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workflow_invocation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workflow_invocation.js,samples/README.md) | +| Dataform.create_workspace | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workspace.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workspace.js,samples/README.md) | +| Dataform.delete_repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_repository.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_repository.js,samples/README.md) | +| Dataform.delete_workflow_invocation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workflow_invocation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workflow_invocation.js,samples/README.md) | +| Dataform.delete_workspace | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workspace.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workspace.js,samples/README.md) | +| Dataform.fetch_file_diff | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_diff.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_diff.js,samples/README.md) | +| Dataform.fetch_file_git_statuses | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_git_statuses.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_git_statuses.js,samples/README.md) | +| Dataform.fetch_git_ahead_behind | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js,samples/README.md) | +| Dataform.fetch_remote_branches | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_remote_branches.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_remote_branches.js,samples/README.md) | +| Dataform.get_compilation_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_compilation_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_compilation_result.js,samples/README.md) | +| Dataform.get_repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_repository.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_repository.js,samples/README.md) | +| Dataform.get_workflow_invocation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workflow_invocation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workflow_invocation.js,samples/README.md) | +| Dataform.get_workspace | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workspace.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workspace.js,samples/README.md) | +| Dataform.install_npm_packages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.install_npm_packages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.install_npm_packages.js,samples/README.md) | +| Dataform.list_compilation_results | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_compilation_results.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_compilation_results.js,samples/README.md) | +| Dataform.list_repositories | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_repositories.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_repositories.js,samples/README.md) | +| Dataform.list_workflow_invocations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workflow_invocations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workflow_invocations.js,samples/README.md) | +| Dataform.list_workspaces | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workspaces.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workspaces.js,samples/README.md) | +| Dataform.make_directory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.make_directory.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.make_directory.js,samples/README.md) | +| Dataform.move_directory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_directory.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_directory.js,samples/README.md) | +| Dataform.move_file | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_file.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_file.js,samples/README.md) | +| Dataform.pull_git_commits | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.pull_git_commits.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.pull_git_commits.js,samples/README.md) | +| Dataform.push_git_commits | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.push_git_commits.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.push_git_commits.js,samples/README.md) | +| Dataform.query_compilation_result_actions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_compilation_result_actions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_compilation_result_actions.js,samples/README.md) | +| Dataform.query_directory_contents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_directory_contents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_directory_contents.js,samples/README.md) | +| Dataform.query_workflow_invocation_actions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js,samples/README.md) | +| Dataform.read_file | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.read_file.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.read_file.js,samples/README.md) | +| Dataform.remove_directory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_directory.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_directory.js,samples/README.md) | +| Dataform.remove_file | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_file.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_file.js,samples/README.md) | +| Dataform.reset_workspace_changes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.reset_workspace_changes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.reset_workspace_changes.js,samples/README.md) | +| Dataform.update_repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.update_repository.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.update_repository.js,samples/README.md) | +| Dataform.write_file | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.write_file.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.write_file.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/quickstart.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/test/quickstart.js,samples/README.md) | + + The [Dataform API Node.js Client API Reference][client-docs] documentation also contains samples. @@ -88,13 +170,12 @@ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. More Information: [Google Cloud Platform Launch Stages][launch_stages] @@ -103,7 +184,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-dataform/blob/main/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md). Please note that this `README.md`, the `samples/README.md`, and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) @@ -115,7 +196,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-dataform/blob/main/LICENSE) +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/dataform/latest [product-docs]: https://dataform.co/ diff --git a/packages/google-cloud-dataform/package.json b/packages/google-cloud-dataform/package.json index 81eb1b65cca..b818983d26f 100644 --- a/packages/google-cloud-dataform/package.json +++ b/packages/google-cloud-dataform/package.json @@ -1,66 +1,71 @@ { - "name": "@google-cloud/dataform", - "version": "0.4.0", - "description": "dataform client for Node.js", - "repository": "googleapis/nodejs-dataform", - "license": "Apache-2.0", - "author": "Google LLC", - "main": "build/src/index.js", - "files": [ - "build/src", - "build/protos" - ], - "keywords": [ - "google apis client", - "google api client", - "google apis", - "google api", - "google", - "google cloud platform", - "google cloud", - "cloud", - "google dataform", - "dataform", - "dataform service" - ], - "scripts": { - "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/", - "compile-protos": "compileProtos src", - "docs": "jsdoc -c .jsdoc.js", - "predocs-test": "npm run docs", - "docs-test": "linkinator docs", - "fix": "gts fix", - "lint": "gts check", - "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "cd samples/ && npm link ../ && npm test", - "prelint": "cd samples; npm link ../; npm i" - }, - "dependencies": { - "google-gax": "^3.5.2" - }, - "devDependencies": { - "@types/mocha": "^10.0.0", - "@types/node": "^18.0.0", - "@types/sinon": "^10.0.0", - "c8": "^7.7.2", - "gts": "^3.1.0", - "jsdoc": "^4.0.0", - "jsdoc-fresh": "^2.0.0", - "jsdoc-region-tag": "^2.0.0", - "linkinator": "^4.0.0", - "mocha": "^10.0.0", - "null-loader": "^4.0.1", - "pack-n-play": "^1.0.0-2", - "sinon": "^15.0.0", - "ts-loader": "^9.1.2", - "typescript": "^4.2.4", - "webpack": "^5.36.2", - "webpack-cli": "^5.0.0" - }, - "engines": { - "node": ">=v12.0.0" - } + "name": "@google-cloud/dataform", + "version": "0.4.0", + "description": "dataform client for Node.js", + "repository": { + "type": "git", + "directory": "packages/google-cloud-dataform", + "url": "https://github.com/googleapis/google-cloud-node.git" + }, + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google dataform", + "dataform", + "dataform service" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "npm run compile && c8 mocha build/system-test", + "test": "c8 mocha build/test", + "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", + "prelint": "cd samples; npm link ../; npm i" + }, + "dependencies": { + "google-gax": "^3.5.2" + }, + "devDependencies": { + "@types/mocha": "^10.0.0", + "@types/node": "^18.0.0", + "@types/sinon": "^10.0.0", + "c8": "^7.7.2", + "gts": "^3.1.0", + "jsdoc": "^4.0.0", + "jsdoc-fresh": "^2.0.0", + "jsdoc-region-tag": "^2.0.0", + "linkinator": "^4.0.0", + "mocha": "^10.0.0", + "null-loader": "^4.0.1", + "pack-n-play": "^1.0.0-2", + "sinon": "^15.0.0", + "ts-loader": "^9.1.2", + "typescript": "^4.2.4", + "webpack": "^5.36.2", + "webpack-cli": "^5.0.0" + }, + "engines": { + "node": ">=v12.0.0" + }, + "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-dataform" } diff --git a/packages/google-cloud-dataform/samples/README.md b/packages/google-cloud-dataform/samples/README.md new file mode 100644 index 00000000000..e1b05f2171d --- /dev/null +++ b/packages/google-cloud-dataform/samples/README.md @@ -0,0 +1,1364 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Dataform API: Node.js Samples](https://github.com/googleapis/google-cloud-node) + +[![Open in Cloud Shell][shell_img]][shell_link] + + + +## Table of Contents + +* [Before you begin](#before-you-begin) +* [Samples](#samples) + * [Dataform.cancel_workflow_invocation](#dataform.cancel_workflow_invocation) + * [Dataform.commit_workspace_changes](#dataform.commit_workspace_changes) + * [Dataform.create_compilation_result](#dataform.create_compilation_result) + * [Dataform.create_repository](#dataform.create_repository) + * [Dataform.create_workflow_invocation](#dataform.create_workflow_invocation) + * [Dataform.create_workspace](#dataform.create_workspace) + * [Dataform.delete_repository](#dataform.delete_repository) + * [Dataform.delete_workflow_invocation](#dataform.delete_workflow_invocation) + * [Dataform.delete_workspace](#dataform.delete_workspace) + * [Dataform.fetch_file_diff](#dataform.fetch_file_diff) + * [Dataform.fetch_file_git_statuses](#dataform.fetch_file_git_statuses) + * [Dataform.fetch_git_ahead_behind](#dataform.fetch_git_ahead_behind) + * [Dataform.fetch_remote_branches](#dataform.fetch_remote_branches) + * [Dataform.get_compilation_result](#dataform.get_compilation_result) + * [Dataform.get_repository](#dataform.get_repository) + * [Dataform.get_workflow_invocation](#dataform.get_workflow_invocation) + * [Dataform.get_workspace](#dataform.get_workspace) + * [Dataform.install_npm_packages](#dataform.install_npm_packages) + * [Dataform.list_compilation_results](#dataform.list_compilation_results) + * [Dataform.list_repositories](#dataform.list_repositories) + * [Dataform.list_workflow_invocations](#dataform.list_workflow_invocations) + * [Dataform.list_workspaces](#dataform.list_workspaces) + * [Dataform.make_directory](#dataform.make_directory) + * [Dataform.move_directory](#dataform.move_directory) + * [Dataform.move_file](#dataform.move_file) + * [Dataform.pull_git_commits](#dataform.pull_git_commits) + * [Dataform.push_git_commits](#dataform.push_git_commits) + * [Dataform.query_compilation_result_actions](#dataform.query_compilation_result_actions) + * [Dataform.query_directory_contents](#dataform.query_directory_contents) + * [Dataform.query_workflow_invocation_actions](#dataform.query_workflow_invocation_actions) + * [Dataform.read_file](#dataform.read_file) + * [Dataform.remove_directory](#dataform.remove_directory) + * [Dataform.remove_file](#dataform.remove_file) + * [Dataform.reset_workspace_changes](#dataform.reset_workspace_changes) + * [Dataform.update_repository](#dataform.update_repository) + * [Dataform.write_file](#dataform.write_file) + * [Dataform.cancel_workflow_invocation](#dataform.cancel_workflow_invocation) + * [Dataform.commit_workspace_changes](#dataform.commit_workspace_changes) + * [Dataform.create_compilation_result](#dataform.create_compilation_result) + * [Dataform.create_repository](#dataform.create_repository) + * [Dataform.create_workflow_invocation](#dataform.create_workflow_invocation) + * [Dataform.create_workspace](#dataform.create_workspace) + * [Dataform.delete_repository](#dataform.delete_repository) + * [Dataform.delete_workflow_invocation](#dataform.delete_workflow_invocation) + * [Dataform.delete_workspace](#dataform.delete_workspace) + * [Dataform.fetch_file_diff](#dataform.fetch_file_diff) + * [Dataform.fetch_file_git_statuses](#dataform.fetch_file_git_statuses) + * [Dataform.fetch_git_ahead_behind](#dataform.fetch_git_ahead_behind) + * [Dataform.fetch_remote_branches](#dataform.fetch_remote_branches) + * [Dataform.get_compilation_result](#dataform.get_compilation_result) + * [Dataform.get_repository](#dataform.get_repository) + * [Dataform.get_workflow_invocation](#dataform.get_workflow_invocation) + * [Dataform.get_workspace](#dataform.get_workspace) + * [Dataform.install_npm_packages](#dataform.install_npm_packages) + * [Dataform.list_compilation_results](#dataform.list_compilation_results) + * [Dataform.list_repositories](#dataform.list_repositories) + * [Dataform.list_workflow_invocations](#dataform.list_workflow_invocations) + * [Dataform.list_workspaces](#dataform.list_workspaces) + * [Dataform.make_directory](#dataform.make_directory) + * [Dataform.move_directory](#dataform.move_directory) + * [Dataform.move_file](#dataform.move_file) + * [Dataform.pull_git_commits](#dataform.pull_git_commits) + * [Dataform.push_git_commits](#dataform.push_git_commits) + * [Dataform.query_compilation_result_actions](#dataform.query_compilation_result_actions) + * [Dataform.query_directory_contents](#dataform.query_directory_contents) + * [Dataform.query_workflow_invocation_actions](#dataform.query_workflow_invocation_actions) + * [Dataform.read_file](#dataform.read_file) + * [Dataform.remove_directory](#dataform.remove_directory) + * [Dataform.remove_file](#dataform.remove_file) + * [Dataform.reset_workspace_changes](#dataform.reset_workspace_changes) + * [Dataform.update_repository](#dataform.update_repository) + * [Dataform.write_file](#dataform.write_file) + * [Quickstart](#quickstart) + * [Quickstart](#quickstart) + +## Before you begin + +Before running the samples, make sure you've followed the steps outlined in +[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library). + +`cd samples` + +`npm install` + +`cd ..` + +## Samples + + + +### Dataform.cancel_workflow_invocation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.cancel_workflow_invocation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.cancel_workflow_invocation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.cancel_workflow_invocation.js` + + +----- + + + + +### Dataform.commit_workspace_changes + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.commit_workspace_changes.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.commit_workspace_changes.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.commit_workspace_changes.js` + + +----- + + + + +### Dataform.create_compilation_result + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_compilation_result.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_compilation_result.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_compilation_result.js` + + +----- + + + + +### Dataform.create_repository + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_repository.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_repository.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_repository.js` + + +----- + + + + +### Dataform.create_workflow_invocation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workflow_invocation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workflow_invocation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workflow_invocation.js` + + +----- + + + + +### Dataform.create_workspace + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workspace.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workspace.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.create_workspace.js` + + +----- + + + + +### Dataform.delete_repository + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_repository.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_repository.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_repository.js` + + +----- + + + + +### Dataform.delete_workflow_invocation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workflow_invocation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workflow_invocation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workflow_invocation.js` + + +----- + + + + +### Dataform.delete_workspace + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workspace.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workspace.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.delete_workspace.js` + + +----- + + + + +### Dataform.fetch_file_diff + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_diff.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_diff.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_diff.js` + + +----- + + + + +### Dataform.fetch_file_git_statuses + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_git_statuses.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_git_statuses.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_file_git_statuses.js` + + +----- + + + + +### Dataform.fetch_git_ahead_behind + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_git_ahead_behind.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_git_ahead_behind.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_git_ahead_behind.js` + + +----- + + + + +### Dataform.fetch_remote_branches + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_remote_branches.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_remote_branches.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.fetch_remote_branches.js` + + +----- + + + + +### Dataform.get_compilation_result + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_compilation_result.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_compilation_result.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_compilation_result.js` + + +----- + + + + +### Dataform.get_repository + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_repository.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_repository.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_repository.js` + + +----- + + + + +### Dataform.get_workflow_invocation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workflow_invocation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workflow_invocation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workflow_invocation.js` + + +----- + + + + +### Dataform.get_workspace + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workspace.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workspace.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.get_workspace.js` + + +----- + + + + +### Dataform.install_npm_packages + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.install_npm_packages.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.install_npm_packages.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.install_npm_packages.js` + + +----- + + + + +### Dataform.list_compilation_results + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_compilation_results.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_compilation_results.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_compilation_results.js` + + +----- + + + + +### Dataform.list_repositories + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_repositories.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_repositories.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_repositories.js` + + +----- + + + + +### Dataform.list_workflow_invocations + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workflow_invocations.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workflow_invocations.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workflow_invocations.js` + + +----- + + + + +### Dataform.list_workspaces + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workspaces.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workspaces.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.list_workspaces.js` + + +----- + + + + +### Dataform.make_directory + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.make_directory.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.make_directory.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.make_directory.js` + + +----- + + + + +### Dataform.move_directory + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_directory.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_directory.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_directory.js` + + +----- + + + + +### Dataform.move_file + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_file.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_file.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.move_file.js` + + +----- + + + + +### Dataform.pull_git_commits + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.pull_git_commits.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.pull_git_commits.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.pull_git_commits.js` + + +----- + + + + +### Dataform.push_git_commits + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.push_git_commits.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.push_git_commits.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.push_git_commits.js` + + +----- + + + + +### Dataform.query_compilation_result_actions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_compilation_result_actions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_compilation_result_actions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_compilation_result_actions.js` + + +----- + + + + +### Dataform.query_directory_contents + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_directory_contents.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_directory_contents.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_directory_contents.js` + + +----- + + + + +### Dataform.query_workflow_invocation_actions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_workflow_invocation_actions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_workflow_invocation_actions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.query_workflow_invocation_actions.js` + + +----- + + + + +### Dataform.read_file + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.read_file.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.read_file.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.read_file.js` + + +----- + + + + +### Dataform.remove_directory + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_directory.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_directory.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_directory.js` + + +----- + + + + +### Dataform.remove_file + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_file.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_file.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.remove_file.js` + + +----- + + + + +### Dataform.reset_workspace_changes + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.reset_workspace_changes.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.reset_workspace_changes.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.reset_workspace_changes.js` + + +----- + + + + +### Dataform.update_repository + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.update_repository.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.update_repository.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.update_repository.js` + + +----- + + + + +### Dataform.write_file + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.write_file.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.write_file.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1alpha2/dataform.write_file.js` + + +----- + + + + +### Dataform.cancel_workflow_invocation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.cancel_workflow_invocation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.cancel_workflow_invocation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.cancel_workflow_invocation.js` + + +----- + + + + +### Dataform.commit_workspace_changes + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.commit_workspace_changes.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.commit_workspace_changes.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.commit_workspace_changes.js` + + +----- + + + + +### Dataform.create_compilation_result + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_compilation_result.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_compilation_result.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_compilation_result.js` + + +----- + + + + +### Dataform.create_repository + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_repository.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_repository.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_repository.js` + + +----- + + + + +### Dataform.create_workflow_invocation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workflow_invocation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workflow_invocation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workflow_invocation.js` + + +----- + + + + +### Dataform.create_workspace + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workspace.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workspace.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.create_workspace.js` + + +----- + + + + +### Dataform.delete_repository + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_repository.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_repository.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_repository.js` + + +----- + + + + +### Dataform.delete_workflow_invocation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workflow_invocation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workflow_invocation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workflow_invocation.js` + + +----- + + + + +### Dataform.delete_workspace + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workspace.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workspace.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.delete_workspace.js` + + +----- + + + + +### Dataform.fetch_file_diff + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_diff.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_diff.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_diff.js` + + +----- + + + + +### Dataform.fetch_file_git_statuses + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_git_statuses.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_git_statuses.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_file_git_statuses.js` + + +----- + + + + +### Dataform.fetch_git_ahead_behind + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_git_ahead_behind.js` + + +----- + + + + +### Dataform.fetch_remote_branches + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_remote_branches.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_remote_branches.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.fetch_remote_branches.js` + + +----- + + + + +### Dataform.get_compilation_result + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_compilation_result.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_compilation_result.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_compilation_result.js` + + +----- + + + + +### Dataform.get_repository + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_repository.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_repository.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_repository.js` + + +----- + + + + +### Dataform.get_workflow_invocation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workflow_invocation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workflow_invocation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workflow_invocation.js` + + +----- + + + + +### Dataform.get_workspace + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workspace.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workspace.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.get_workspace.js` + + +----- + + + + +### Dataform.install_npm_packages + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.install_npm_packages.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.install_npm_packages.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.install_npm_packages.js` + + +----- + + + + +### Dataform.list_compilation_results + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_compilation_results.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_compilation_results.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_compilation_results.js` + + +----- + + + + +### Dataform.list_repositories + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_repositories.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_repositories.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_repositories.js` + + +----- + + + + +### Dataform.list_workflow_invocations + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workflow_invocations.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workflow_invocations.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workflow_invocations.js` + + +----- + + + + +### Dataform.list_workspaces + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workspaces.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workspaces.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.list_workspaces.js` + + +----- + + + + +### Dataform.make_directory + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.make_directory.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.make_directory.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.make_directory.js` + + +----- + + + + +### Dataform.move_directory + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_directory.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_directory.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_directory.js` + + +----- + + + + +### Dataform.move_file + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_file.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_file.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.move_file.js` + + +----- + + + + +### Dataform.pull_git_commits + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.pull_git_commits.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.pull_git_commits.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.pull_git_commits.js` + + +----- + + + + +### Dataform.push_git_commits + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.push_git_commits.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.push_git_commits.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.push_git_commits.js` + + +----- + + + + +### Dataform.query_compilation_result_actions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_compilation_result_actions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_compilation_result_actions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_compilation_result_actions.js` + + +----- + + + + +### Dataform.query_directory_contents + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_directory_contents.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_directory_contents.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_directory_contents.js` + + +----- + + + + +### Dataform.query_workflow_invocation_actions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.query_workflow_invocation_actions.js` + + +----- + + + + +### Dataform.read_file + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.read_file.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.read_file.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.read_file.js` + + +----- + + + + +### Dataform.remove_directory + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_directory.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_directory.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_directory.js` + + +----- + + + + +### Dataform.remove_file + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_file.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_file.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.remove_file.js` + + +----- + + + + +### Dataform.reset_workspace_changes + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.reset_workspace_changes.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.reset_workspace_changes.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.reset_workspace_changes.js` + + +----- + + + + +### Dataform.update_repository + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.update_repository.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.update_repository.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.update_repository.js` + + +----- + + + + +### Dataform.write_file + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/generated/v1beta1/dataform.write_file.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/generated/v1beta1/dataform.write_file.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/generated/v1beta1/dataform.write_file.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/quickstart.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataform/samples/test/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataform/samples/test/quickstart.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataform/samples/test/quickstart.js` + + + + + + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=samples/README.md +[product-docs]: https://dataform.co/ diff --git a/packages/google-cloud-dataform/src/index.ts b/packages/google-cloud-dataform/src/index.ts index ecc9dcba7af..2b1e5eecac7 100644 --- a/packages/google-cloud-dataform/src/index.ts +++ b/packages/google-cloud-dataform/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/release-please-config.json b/release-please-config.json index 7accf5885fd..ed5cd7095a7 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -38,6 +38,8 @@ "packages/google-cloud-contactcenterinsights": {}, "packages/google-cloud-contentwarehouse": {}, "packages/google-cloud-datacatalog": {}, + "packages/google-cloud-datacatalog-lineage": {}, + "packages/google-cloud-dataform": {}, "packages/google-cloud-datafusion": {}, "packages/google-cloud-datalabeling": {}, "packages/google-cloud-dataplex": {}, @@ -60,6 +62,7 @@ "packages/google-cloud-gkeconnect-gateway": {}, "packages/google-cloud-gkehub": {}, "packages/google-cloud-gkemulticloud": {}, + "packages/google-cloud-gsuiteaddons": {}, "packages/google-cloud-iap": {}, "packages/google-cloud-ids": {}, "packages/google-cloud-iot": {}, @@ -123,15 +126,13 @@ "packages/google-iam-credentials": {}, "packages/google-identity-accesscontextmanager": {}, "packages/google-maps-addressvalidation": {}, + "packages/google-maps-mapsplatformdatasets": {}, "packages/google-maps-routing": {}, "packages/google-monitoring-dashboard": {}, "packages/google-privacy-dlp": {}, "packages/google-storagetransfer": {}, "packages/grafeas": {}, - "packages/typeless-sample-bot": {}, - "packages/google-maps-mapsplatformdatasets": {}, - "packages/google-cloud-datacatalog-lineage": {}, - "packages/google-cloud-gsuiteaddons": {} + "packages/typeless-sample-bot": {} }, "plugins": [ { From f98ece2ab73b44cdab04892f9b0e81ef18995390 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 23 Feb 2023 10:11:26 -0800 Subject: [PATCH 43/80] feat: [dialogflow-cx] added gcs.proto. added support for GcsDestination and TextToSpeechSettings (#3998) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: added gcs.proto. added support for GcsDestination and TextToSpeechSettings. feat!: Remove [REQUIRED] for VersionConfig docs: add more meaningful comments PiperOrigin-RevId: 510257108 Source-Link: https://github.com/googleapis/googleapis/commit/140334ba7124add3d6a6068db353b1578b43c9c9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/88ee5015667d71642e8e9cf9c6e605a382ee394c Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3ctY3gvLk93bEJvdC55YW1sIiwiaCI6Ijg4ZWU1MDE1NjY3ZDcxNjQyZThlOWNmOWM2ZTYwNWEzODJlZTM5NGMifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: added gcs.proto. added support for GcsDestination and TextToSpeechSettings feat!: Remove [REQUIRED] for VersionConfig docs: add more meaningful comments PiperOrigin-RevId: 511306725 Source-Link: https://github.com/googleapis/googleapis/commit/57673deca3ffe1b4f5f42549de19698fc73c6c6f Source-Link: https://github.com/googleapis/googleapis-gen/commit/9adddda268e1b131d6dfcb934f8b34f78489bf08 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3ctY3gvLk93bEJvdC55YW1sIiwiaCI6IjlhZGRkZGEyNjhlMWIxMzFkNmRmY2I5MzRmOGIzNGY3ODQ4OWJmMDgifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- .../dialogflow/cx/v3/advanced_settings.proto | 8 + .../google/cloud/dialogflow/cx/v3/agent.proto | 6 + .../cloud/dialogflow/cx/v3/audio_config.proto | 8 + .../cloud/dialogflow/cx/v3/environment.proto | 8 +- .../google/cloud/dialogflow/cx/v3/flow.proto | 1 + .../google/cloud/dialogflow/cx/v3/gcs.proto | 39 + .../cloud/dialogflow/cx/v3/version.proto | 1 + .../cx/v3beta1/advanced_settings.proto | 8 + .../cloud/dialogflow/cx/v3beta1/agent.proto | 6 + .../dialogflow/cx/v3beta1/audio_config.proto | 8 + .../dialogflow/cx/v3beta1/environment.proto | 8 +- .../cloud/dialogflow/cx/v3beta1/flow.proto | 1 + .../cloud/dialogflow/cx/v3beta1/gcs.proto | 39 + .../cloud/dialogflow/cx/v3beta1/version.proto | 1 + .../protos/protos.d.ts | 12392 ++--- .../protos/protos.js | 42322 ++++++++-------- .../protos/protos.json | 742 +- ...etadata.google.cloud.dialogflow.cx.v3.json | 2 +- ...ta.google.cloud.dialogflow.cx.v3beta1.json | 2 +- .../src/v3/agents_proto_list.json | 1 + .../src/v3/changelogs_proto_list.json | 1 + .../src/v3/deployments_proto_list.json | 1 + .../src/v3/entity_types_proto_list.json | 1 + .../src/v3/environments_proto_list.json | 1 + .../src/v3/experiments_proto_list.json | 1 + .../src/v3/flows_proto_list.json | 1 + .../src/v3/intents_proto_list.json | 1 + .../src/v3/pages_proto_list.json | 1 + .../security_settings_service_proto_list.json | 1 + .../v3/session_entity_types_proto_list.json | 1 + .../src/v3/sessions_proto_list.json | 1 + .../src/v3/test_cases_proto_list.json | 1 + .../transition_route_groups_proto_list.json | 1 + .../src/v3/versions_proto_list.json | 1 + .../src/v3/webhooks_proto_list.json | 1 + .../src/v3beta1/agents_proto_list.json | 1 + .../src/v3beta1/changelogs_proto_list.json | 1 + .../src/v3beta1/deployments_proto_list.json | 1 + .../src/v3beta1/entity_types_proto_list.json | 1 + .../src/v3beta1/environments_proto_list.json | 1 + .../src/v3beta1/experiments_proto_list.json | 1 + .../src/v3beta1/flows_proto_list.json | 1 + .../src/v3beta1/intents_proto_list.json | 1 + .../src/v3beta1/pages_proto_list.json | 1 + .../security_settings_service_proto_list.json | 1 + .../session_entity_types_proto_list.json | 1 + .../src/v3beta1/sessions_proto_list.json | 1 + .../src/v3beta1/test_cases_proto_list.json | 1 + .../transition_route_groups_proto_list.json | 1 + .../src/v3beta1/versions_proto_list.json | 1 + .../src/v3beta1/webhooks_proto_list.json | 1 + 51 files changed, 28632 insertions(+), 27002 deletions(-) create mode 100644 packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/gcs.proto create mode 100644 packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/advanced_settings.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/advanced_settings.proto index 01d0485775e..05460932a81 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/advanced_settings.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/advanced_settings.proto @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.dialogflow.cx.v3; import "google/api/field_behavior.proto"; +import "google/cloud/dialogflow/cx/v3/gcs.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; @@ -48,6 +49,13 @@ message AdvancedSettings { bool enable_interaction_logging = 3; } + // If present, incoming audio is exported by Dialogflow to the configured + // Google Cloud Storage destination. + // Exposed at the following levels: + // - Agent level + // - Flow level + GcsDestination audio_export_gcs_destination = 2; + // Settings for logging. // Settings for Dialogflow History, Contact Center messages, StackDriver logs, // and speech logging. diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/agent.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/agent.proto index 1f5f93f9275..2c7ed1adb5e 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/agent.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/agent.proto @@ -21,10 +21,12 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/dialogflow/cx/v3/advanced_settings.proto"; +import "google/cloud/dialogflow/cx/v3/audio_config.proto"; import "google/cloud/dialogflow/cx/v3/flow.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; @@ -266,6 +268,10 @@ message Agent { // Hierarchical advanced settings for this agent. The settings exposed at the // lower level overrides the settings exposed at the higher level. AdvancedSettings advanced_settings = 22; + + // Settings on instructing the speech synthesizer on how to generate the + // output audio content. + TextToSpeechSettings text_to_speech_settings = 31; } // The request message for diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/audio_config.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/audio_config.proto index ea06c183942..259c81cb40c 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/audio_config.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/audio_config.proto @@ -316,3 +316,11 @@ message OutputAudioConfig { // Optional. Configuration of how speech should be synthesized. SynthesizeSpeechConfig synthesize_speech_config = 3; } + +// Settings related to speech generating. +message TextToSpeechSettings { + // Configuration of how speech should be synthesized, mapping from + // language (https://dialogflow.com/docs/reference/language) to + // SynthesizeSpeechConfig. + map synthesize_speech_configs = 1; +} diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/environment.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/environment.proto index 8b42411d542..5175a15f79b 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/environment.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/environment.proto @@ -25,6 +25,7 @@ import "google/cloud/dialogflow/cx/v3/webhook.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; @@ -253,12 +254,11 @@ message Environment { // 500 characters. If exceeded, the request is rejected. string description = 3; - // Required. A list of configurations for flow versions. You should include - // version configs for all flows that are reachable from [`Start + // A list of configurations for flow versions. You should include version + // configs for all flows that are reachable from [`Start // Flow`][Agent.start_flow] in the agent. Otherwise, an error will be // returned. - repeated VersionConfig version_configs = 6 - [(google.api.field_behavior) = REQUIRED]; + repeated VersionConfig version_configs = 6; // Output only. Update time of this environment. google.protobuf.Timestamp update_time = 5 diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/flow.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/flow.proto index ea7d71a73ee..d84be312f72 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/flow.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/flow.proto @@ -25,6 +25,7 @@ import "google/cloud/dialogflow/cx/v3/validation_message.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/gcs.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/gcs.proto new file mode 100644 index 00000000000..bf1a43cb2b7 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/gcs.proto @@ -0,0 +1,39 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3; + +import "google/api/field_behavior.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb"; +option java_multiple_files = true; +option java_outer_classname = "GcsProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; +option ruby_package = "Google::Cloud::Dialogflow::CX::V3"; + +// Google Cloud Storage location for a Dialogflow operation that writes or +// exports objects (e.g. exported agent or transcripts) outside of Dialogflow. +message GcsDestination { + // Required. The Google Cloud Storage URI for the exported objects. A URI is + // of the form: + // gs://bucket/object-name-or-prefix + // Whether a full object name, or just a prefix, its usage depends on the + // Dialogflow operation. + string uri = 1 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/version.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/version.proto index 335cb835de7..d2adfee4fd3 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/version.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/version.proto @@ -24,6 +24,7 @@ import "google/cloud/dialogflow/cx/v3/flow.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto index 4b5ee62bd1f..32e181b8a84 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.dialogflow.cx.v3beta1; import "google/api/field_behavior.proto"; +import "google/cloud/dialogflow/cx/v3beta1/gcs.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1"; @@ -48,6 +49,13 @@ message AdvancedSettings { bool enable_interaction_logging = 3; } + // If present, incoming audio is exported by Dialogflow to the configured + // Google Cloud Storage destination. + // Exposed at the following levels: + // - Agent level + // - Flow level + GcsDestination audio_export_gcs_destination = 2; + // Settings for logging. // Settings for Dialogflow History, Contact Center messages, StackDriver logs, // and speech logging. diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/agent.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/agent.proto index 96ce5cdd312..d3f314ee4fa 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/agent.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/agent.proto @@ -21,10 +21,12 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto"; +import "google/cloud/dialogflow/cx/v3beta1/audio_config.proto"; import "google/cloud/dialogflow/cx/v3beta1/flow.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1"; @@ -266,6 +268,10 @@ message Agent { // Hierarchical advanced settings for this agent. The settings exposed at the // lower level overrides the settings exposed at the higher level. AdvancedSettings advanced_settings = 22; + + // Settings on instructing the speech synthesizer on how to generate the + // output audio content. + TextToSpeechSettings text_to_speech_settings = 31; } // The request message for diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto index bc8a5c5839a..455b3695cb2 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto @@ -316,3 +316,11 @@ message OutputAudioConfig { // Optional. Configuration of how speech should be synthesized. SynthesizeSpeechConfig synthesize_speech_config = 3; } + +// Settings related to speech generating. +message TextToSpeechSettings { + // Configuration of how speech should be synthesized, mapping from + // language (https://dialogflow.com/docs/reference/language) to + // SynthesizeSpeechConfig. + map synthesize_speech_configs = 1; +} diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/environment.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/environment.proto index b1822e2327f..6b975bf997a 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/environment.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/environment.proto @@ -25,6 +25,7 @@ import "google/cloud/dialogflow/cx/v3beta1/webhook.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; @@ -253,12 +254,11 @@ message Environment { // 500 characters. If exceeded, the request is rejected. string description = 3; - // Required. A list of configurations for flow versions. You should include - // version configs for all flows that are reachable from [`Start + // A list of configurations for flow versions. You should include version + // configs for all flows that are reachable from [`Start // Flow`][Agent.start_flow] in the agent. Otherwise, an error will be // returned. - repeated VersionConfig version_configs = 6 - [(google.api.field_behavior) = REQUIRED]; + repeated VersionConfig version_configs = 6; // Output only. Update time of this environment. google.protobuf.Timestamp update_time = 5 diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/flow.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/flow.proto index ded289e759c..736ce1acdd4 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/flow.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/flow.proto @@ -25,6 +25,7 @@ import "google/cloud/dialogflow/cx/v3beta1/validation_message.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto new file mode 100644 index 00000000000..19ed9a8f1ed --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto @@ -0,0 +1,39 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3beta1; + +import "google/api/field_behavior.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1"; +option go_package = "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb;cxpb"; +option java_multiple_files = true; +option java_outer_classname = "GcsProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3beta1"; +option objc_class_prefix = "DF"; +option ruby_package = "Google::Cloud::Dialogflow::CX::V3beta1"; + +// Google Cloud Storage location for a Dialogflow operation that writes or +// exports objects (e.g. exported agent or transcripts) outside of Dialogflow. +message GcsDestination { + // Required. The Google Cloud Storage URI for the exported objects. A URI is + // of the form: + // gs://bucket/object-name-or-prefix + // Whether a full object name, or just a prefix, its usage depends on the + // Dialogflow operation. + string uri = 1 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/version.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/version.proto index 0a07206a4c6..52b58025be2 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/version.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/version.proto @@ -24,6 +24,7 @@ import "google/cloud/dialogflow/cx/v3beta1/flow.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; diff --git a/packages/google-cloud-dialogflow-cx/protos/protos.d.ts b/packages/google-cloud-dialogflow-cx/protos/protos.d.ts index e1c5e4e6fd6..b1545bf5d90 100644 --- a/packages/google-cloud-dialogflow-cx/protos/protos.d.ts +++ b/packages/google-cloud-dialogflow-cx/protos/protos.d.ts @@ -32,6 +32,9 @@ export namespace google { /** Properties of an AdvancedSettings. */ interface IAdvancedSettings { + /** AdvancedSettings audioExportGcsDestination */ + audioExportGcsDestination?: (google.cloud.dialogflow.cx.v3.IGcsDestination|null); + /** AdvancedSettings loggingSettings */ loggingSettings?: (google.cloud.dialogflow.cx.v3.AdvancedSettings.ILoggingSettings|null); } @@ -45,6 +48,9 @@ export namespace google { */ constructor(properties?: google.cloud.dialogflow.cx.v3.IAdvancedSettings); + /** AdvancedSettings audioExportGcsDestination. */ + public audioExportGcsDestination?: (google.cloud.dialogflow.cx.v3.IGcsDestination|null); + /** AdvancedSettings loggingSettings. */ public loggingSettings?: (google.cloud.dialogflow.cx.v3.AdvancedSettings.ILoggingSettings|null); @@ -232,6 +238,103 @@ export namespace google { } } + /** Properties of a GcsDestination. */ + interface IGcsDestination { + + /** GcsDestination uri */ + uri?: (string|null); + } + + /** Represents a GcsDestination. */ + class GcsDestination implements IGcsDestination { + + /** + * Constructs a new GcsDestination. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IGcsDestination); + + /** GcsDestination uri. */ + public uri: string; + + /** + * Creates a new GcsDestination instance using the specified properties. + * @param [properties] Properties to set + * @returns GcsDestination instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IGcsDestination): google.cloud.dialogflow.cx.v3.GcsDestination; + + /** + * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GcsDestination.verify|verify} messages. + * @param message GcsDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GcsDestination.verify|verify} messages. + * @param message GcsDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcsDestination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcsDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GcsDestination; + + /** + * Decodes a GcsDestination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcsDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GcsDestination; + + /** + * Verifies a GcsDestination message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcsDestination + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GcsDestination; + + /** + * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. + * @param message GcsDestination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.GcsDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcsDestination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcsDestination + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Represents an Agents */ class Agents extends $protobuf.rpc.Service { @@ -586,6 +689,9 @@ export namespace google { /** Agent advancedSettings */ advancedSettings?: (google.cloud.dialogflow.cx.v3.IAdvancedSettings|null); + + /** Agent textToSpeechSettings */ + textToSpeechSettings?: (google.cloud.dialogflow.cx.v3.ITextToSpeechSettings|null); } /** Represents an Agent. */ @@ -639,6 +745,9 @@ export namespace google { /** Agent advancedSettings. */ public advancedSettings?: (google.cloud.dialogflow.cx.v3.IAdvancedSettings|null); + /** Agent textToSpeechSettings. */ + public textToSpeechSettings?: (google.cloud.dialogflow.cx.v3.ITextToSpeechSettings|null); + /** * Creates a new Agent instance using the specified properties. * @param [properties] Properties to set @@ -1997,3255 +2106,3971 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a Flows */ - class Flows extends $protobuf.rpc.Service { + /** AudioEncoding enum. */ + enum AudioEncoding { + AUDIO_ENCODING_UNSPECIFIED = 0, + AUDIO_ENCODING_LINEAR_16 = 1, + AUDIO_ENCODING_FLAC = 2, + AUDIO_ENCODING_MULAW = 3, + AUDIO_ENCODING_AMR = 4, + AUDIO_ENCODING_AMR_WB = 5, + AUDIO_ENCODING_OGG_OPUS = 6, + AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7 + } - /** - * Constructs a new Flows 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); + /** SpeechModelVariant enum. */ + enum SpeechModelVariant { + SPEECH_MODEL_VARIANT_UNSPECIFIED = 0, + USE_BEST_AVAILABLE = 1, + USE_STANDARD = 2, + USE_ENHANCED = 3 + } - /** - * Creates new Flows 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): Flows; + /** Properties of a SpeechWordInfo. */ + interface ISpeechWordInfo { - /** - * Calls CreateFlow. - * @param request CreateFlowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Flow - */ - public createFlow(request: google.cloud.dialogflow.cx.v3.ICreateFlowRequest, callback: google.cloud.dialogflow.cx.v3.Flows.CreateFlowCallback): void; + /** SpeechWordInfo word */ + word?: (string|null); - /** - * Calls CreateFlow. - * @param request CreateFlowRequest message or plain object - * @returns Promise - */ - public createFlow(request: google.cloud.dialogflow.cx.v3.ICreateFlowRequest): Promise; + /** SpeechWordInfo startOffset */ + startOffset?: (google.protobuf.IDuration|null); - /** - * Calls DeleteFlow. - * @param request DeleteFlowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteFlow(request: google.cloud.dialogflow.cx.v3.IDeleteFlowRequest, callback: google.cloud.dialogflow.cx.v3.Flows.DeleteFlowCallback): void; + /** SpeechWordInfo endOffset */ + endOffset?: (google.protobuf.IDuration|null); - /** - * Calls DeleteFlow. - * @param request DeleteFlowRequest message or plain object - * @returns Promise - */ - public deleteFlow(request: google.cloud.dialogflow.cx.v3.IDeleteFlowRequest): Promise; + /** SpeechWordInfo confidence */ + confidence?: (number|null); + } - /** - * Calls ListFlows. - * @param request ListFlowsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListFlowsResponse - */ - public listFlows(request: google.cloud.dialogflow.cx.v3.IListFlowsRequest, callback: google.cloud.dialogflow.cx.v3.Flows.ListFlowsCallback): void; + /** Represents a SpeechWordInfo. */ + class SpeechWordInfo implements ISpeechWordInfo { /** - * Calls ListFlows. - * @param request ListFlowsRequest message or plain object - * @returns Promise + * Constructs a new SpeechWordInfo. + * @param [properties] Properties to set */ - public listFlows(request: google.cloud.dialogflow.cx.v3.IListFlowsRequest): Promise; + constructor(properties?: google.cloud.dialogflow.cx.v3.ISpeechWordInfo); - /** - * Calls GetFlow. - * @param request GetFlowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Flow - */ - public getFlow(request: google.cloud.dialogflow.cx.v3.IGetFlowRequest, callback: google.cloud.dialogflow.cx.v3.Flows.GetFlowCallback): void; + /** SpeechWordInfo word. */ + public word: string; - /** - * Calls GetFlow. - * @param request GetFlowRequest message or plain object - * @returns Promise - */ - public getFlow(request: google.cloud.dialogflow.cx.v3.IGetFlowRequest): Promise; + /** SpeechWordInfo startOffset. */ + public startOffset?: (google.protobuf.IDuration|null); - /** - * Calls UpdateFlow. - * @param request UpdateFlowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Flow - */ - public updateFlow(request: google.cloud.dialogflow.cx.v3.IUpdateFlowRequest, callback: google.cloud.dialogflow.cx.v3.Flows.UpdateFlowCallback): void; + /** SpeechWordInfo endOffset. */ + public endOffset?: (google.protobuf.IDuration|null); + + /** SpeechWordInfo confidence. */ + public confidence: number; /** - * Calls UpdateFlow. - * @param request UpdateFlowRequest message or plain object - * @returns Promise + * Creates a new SpeechWordInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SpeechWordInfo instance */ - public updateFlow(request: google.cloud.dialogflow.cx.v3.IUpdateFlowRequest): Promise; + public static create(properties?: google.cloud.dialogflow.cx.v3.ISpeechWordInfo): google.cloud.dialogflow.cx.v3.SpeechWordInfo; /** - * Calls TrainFlow. - * @param request TrainFlowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Encodes the specified SpeechWordInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SpeechWordInfo.verify|verify} messages. + * @param message SpeechWordInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public trainFlow(request: google.cloud.dialogflow.cx.v3.ITrainFlowRequest, callback: google.cloud.dialogflow.cx.v3.Flows.TrainFlowCallback): void; + public static encode(message: google.cloud.dialogflow.cx.v3.ISpeechWordInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls TrainFlow. - * @param request TrainFlowRequest message or plain object - * @returns Promise + * Encodes the specified SpeechWordInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SpeechWordInfo.verify|verify} messages. + * @param message SpeechWordInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public trainFlow(request: google.cloud.dialogflow.cx.v3.ITrainFlowRequest): Promise; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ISpeechWordInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ValidateFlow. - * @param request ValidateFlowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and FlowValidationResult + * Decodes a SpeechWordInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SpeechWordInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public validateFlow(request: google.cloud.dialogflow.cx.v3.IValidateFlowRequest, callback: google.cloud.dialogflow.cx.v3.Flows.ValidateFlowCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.SpeechWordInfo; /** - * Calls ValidateFlow. - * @param request ValidateFlowRequest message or plain object - * @returns Promise + * Decodes a SpeechWordInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SpeechWordInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public validateFlow(request: google.cloud.dialogflow.cx.v3.IValidateFlowRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.SpeechWordInfo; /** - * Calls GetFlowValidationResult. - * @param request GetFlowValidationResultRequest message or plain object - * @param callback Node-style callback called with the error, if any, and FlowValidationResult + * Verifies a SpeechWordInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public getFlowValidationResult(request: google.cloud.dialogflow.cx.v3.IGetFlowValidationResultRequest, callback: google.cloud.dialogflow.cx.v3.Flows.GetFlowValidationResultCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls GetFlowValidationResult. - * @param request GetFlowValidationResultRequest message or plain object - * @returns Promise + * Creates a SpeechWordInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SpeechWordInfo */ - public getFlowValidationResult(request: google.cloud.dialogflow.cx.v3.IGetFlowValidationResultRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.SpeechWordInfo; /** - * Calls ImportFlow. - * @param request ImportFlowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a plain object from a SpeechWordInfo message. Also converts values to other types if specified. + * @param message SpeechWordInfo + * @param [options] Conversion options + * @returns Plain object */ - public importFlow(request: google.cloud.dialogflow.cx.v3.IImportFlowRequest, callback: google.cloud.dialogflow.cx.v3.Flows.ImportFlowCallback): void; + public static toObject(message: google.cloud.dialogflow.cx.v3.SpeechWordInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls ImportFlow. - * @param request ImportFlowRequest message or plain object - * @returns Promise + * Converts this SpeechWordInfo to JSON. + * @returns JSON object */ - public importFlow(request: google.cloud.dialogflow.cx.v3.IImportFlowRequest): Promise; + public toJSON(): { [k: string]: any }; /** - * Calls ExportFlow. - * @param request ExportFlowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Gets the default type url for SpeechWordInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public exportFlow(request: google.cloud.dialogflow.cx.v3.IExportFlowRequest, callback: google.cloud.dialogflow.cx.v3.Flows.ExportFlowCallback): void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InputAudioConfig. */ + interface IInputAudioConfig { + + /** InputAudioConfig audioEncoding */ + audioEncoding?: (google.cloud.dialogflow.cx.v3.AudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3.AudioEncoding|null); + + /** InputAudioConfig sampleRateHertz */ + sampleRateHertz?: (number|null); + + /** InputAudioConfig enableWordInfo */ + enableWordInfo?: (boolean|null); + + /** InputAudioConfig phraseHints */ + phraseHints?: (string[]|null); + + /** InputAudioConfig model */ + model?: (string|null); + + /** InputAudioConfig modelVariant */ + modelVariant?: (google.cloud.dialogflow.cx.v3.SpeechModelVariant|keyof typeof google.cloud.dialogflow.cx.v3.SpeechModelVariant|null); + + /** InputAudioConfig singleUtterance */ + singleUtterance?: (boolean|null); + } + + /** Represents an InputAudioConfig. */ + class InputAudioConfig implements IInputAudioConfig { /** - * Calls ExportFlow. - * @param request ExportFlowRequest message or plain object - * @returns Promise + * Constructs a new InputAudioConfig. + * @param [properties] Properties to set */ - public exportFlow(request: google.cloud.dialogflow.cx.v3.IExportFlowRequest): Promise; - } + constructor(properties?: google.cloud.dialogflow.cx.v3.IInputAudioConfig); - namespace Flows { + /** InputAudioConfig audioEncoding. */ + public audioEncoding: (google.cloud.dialogflow.cx.v3.AudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3.AudioEncoding); + + /** InputAudioConfig sampleRateHertz. */ + public sampleRateHertz: number; + + /** InputAudioConfig enableWordInfo. */ + public enableWordInfo: boolean; + + /** InputAudioConfig phraseHints. */ + public phraseHints: string[]; + + /** InputAudioConfig model. */ + public model: string; + + /** InputAudioConfig modelVariant. */ + public modelVariant: (google.cloud.dialogflow.cx.v3.SpeechModelVariant|keyof typeof google.cloud.dialogflow.cx.v3.SpeechModelVariant); + + /** InputAudioConfig singleUtterance. */ + public singleUtterance: boolean; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|createFlow}. - * @param error Error, if any - * @param [response] Flow + * Creates a new InputAudioConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns InputAudioConfig instance */ - type CreateFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Flow) => void; + public static create(properties?: google.cloud.dialogflow.cx.v3.IInputAudioConfig): google.cloud.dialogflow.cx.v3.InputAudioConfig; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|deleteFlow}. - * @param error Error, if any - * @param [response] Empty + * Encodes the specified InputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.InputAudioConfig.verify|verify} messages. + * @param message InputAudioConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type DeleteFlowCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static encode(message: google.cloud.dialogflow.cx.v3.IInputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|listFlows}. - * @param error Error, if any - * @param [response] ListFlowsResponse + * Encodes the specified InputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.InputAudioConfig.verify|verify} messages. + * @param message InputAudioConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type ListFlowsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListFlowsResponse) => void; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IInputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|getFlow}. - * @param error Error, if any - * @param [response] Flow + * Decodes an InputAudioConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InputAudioConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type GetFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Flow) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.InputAudioConfig; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|updateFlow}. - * @param error Error, if any - * @param [response] Flow + * Decodes an InputAudioConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InputAudioConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type UpdateFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Flow) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.InputAudioConfig; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|trainFlow}. - * @param error Error, if any - * @param [response] Operation + * Verifies an InputAudioConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type TrainFlowCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|validateFlow}. - * @param error Error, if any - * @param [response] FlowValidationResult + * Creates an InputAudioConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InputAudioConfig */ - type ValidateFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.FlowValidationResult) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.InputAudioConfig; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|getFlowValidationResult}. - * @param error Error, if any - * @param [response] FlowValidationResult + * Creates a plain object from an InputAudioConfig message. Also converts values to other types if specified. + * @param message InputAudioConfig + * @param [options] Conversion options + * @returns Plain object */ - type GetFlowValidationResultCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.FlowValidationResult) => void; + public static toObject(message: google.cloud.dialogflow.cx.v3.InputAudioConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|importFlow}. - * @param error Error, if any - * @param [response] Operation + * Converts this InputAudioConfig to JSON. + * @returns JSON object */ - type ImportFlowCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public toJSON(): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|exportFlow}. - * @param error Error, if any - * @param [response] Operation + * Gets the default type url for InputAudioConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - type ExportFlowCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a NluSettings. */ - interface INluSettings { + /** SsmlVoiceGender enum. */ + enum SsmlVoiceGender { + SSML_VOICE_GENDER_UNSPECIFIED = 0, + SSML_VOICE_GENDER_MALE = 1, + SSML_VOICE_GENDER_FEMALE = 2, + SSML_VOICE_GENDER_NEUTRAL = 3 + } - /** NluSettings modelType */ - modelType?: (google.cloud.dialogflow.cx.v3.NluSettings.ModelType|keyof typeof google.cloud.dialogflow.cx.v3.NluSettings.ModelType|null); + /** Properties of a VoiceSelectionParams. */ + interface IVoiceSelectionParams { - /** NluSettings classificationThreshold */ - classificationThreshold?: (number|null); + /** VoiceSelectionParams name */ + name?: (string|null); - /** NluSettings modelTrainingMode */ - modelTrainingMode?: (google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode|keyof typeof google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode|null); + /** VoiceSelectionParams ssmlGender */ + ssmlGender?: (google.cloud.dialogflow.cx.v3.SsmlVoiceGender|keyof typeof google.cloud.dialogflow.cx.v3.SsmlVoiceGender|null); } - /** Represents a NluSettings. */ - class NluSettings implements INluSettings { + /** Represents a VoiceSelectionParams. */ + class VoiceSelectionParams implements IVoiceSelectionParams { /** - * Constructs a new NluSettings. + * Constructs a new VoiceSelectionParams. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.INluSettings); - - /** NluSettings modelType. */ - public modelType: (google.cloud.dialogflow.cx.v3.NluSettings.ModelType|keyof typeof google.cloud.dialogflow.cx.v3.NluSettings.ModelType); + constructor(properties?: google.cloud.dialogflow.cx.v3.IVoiceSelectionParams); - /** NluSettings classificationThreshold. */ - public classificationThreshold: number; + /** VoiceSelectionParams name. */ + public name: string; - /** NluSettings modelTrainingMode. */ - public modelTrainingMode: (google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode|keyof typeof google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode); + /** VoiceSelectionParams ssmlGender. */ + public ssmlGender: (google.cloud.dialogflow.cx.v3.SsmlVoiceGender|keyof typeof google.cloud.dialogflow.cx.v3.SsmlVoiceGender); /** - * Creates a new NluSettings instance using the specified properties. + * Creates a new VoiceSelectionParams instance using the specified properties. * @param [properties] Properties to set - * @returns NluSettings instance + * @returns VoiceSelectionParams instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.INluSettings): google.cloud.dialogflow.cx.v3.NluSettings; + public static create(properties?: google.cloud.dialogflow.cx.v3.IVoiceSelectionParams): google.cloud.dialogflow.cx.v3.VoiceSelectionParams; /** - * Encodes the specified NluSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.NluSettings.verify|verify} messages. - * @param message NluSettings message or plain object to encode + * Encodes the specified VoiceSelectionParams message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VoiceSelectionParams.verify|verify} messages. + * @param message VoiceSelectionParams message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.INluSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IVoiceSelectionParams, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NluSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.NluSettings.verify|verify} messages. - * @param message NluSettings message or plain object to encode + * Encodes the specified VoiceSelectionParams message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VoiceSelectionParams.verify|verify} messages. + * @param message VoiceSelectionParams message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.INluSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IVoiceSelectionParams, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NluSettings message from the specified reader or buffer. + * Decodes a VoiceSelectionParams message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NluSettings + * @returns VoiceSelectionParams * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.NluSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.VoiceSelectionParams; /** - * Decodes a NluSettings message from the specified reader or buffer, length delimited. + * Decodes a VoiceSelectionParams message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NluSettings + * @returns VoiceSelectionParams * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.NluSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.VoiceSelectionParams; /** - * Verifies a NluSettings message. + * Verifies a VoiceSelectionParams message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a NluSettings message from a plain object. Also converts values to their respective internal types. + * Creates a VoiceSelectionParams message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NluSettings + * @returns VoiceSelectionParams */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.NluSettings; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.VoiceSelectionParams; /** - * Creates a plain object from a NluSettings message. Also converts values to other types if specified. - * @param message NluSettings + * Creates a plain object from a VoiceSelectionParams message. Also converts values to other types if specified. + * @param message VoiceSelectionParams * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.NluSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.VoiceSelectionParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NluSettings to JSON. + * Converts this VoiceSelectionParams to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for NluSettings + * Gets the default type url for VoiceSelectionParams * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace NluSettings { + /** Properties of a SynthesizeSpeechConfig. */ + interface ISynthesizeSpeechConfig { - /** ModelType enum. */ - enum ModelType { - MODEL_TYPE_UNSPECIFIED = 0, - MODEL_TYPE_STANDARD = 1, - MODEL_TYPE_ADVANCED = 3 - } + /** SynthesizeSpeechConfig speakingRate */ + speakingRate?: (number|null); - /** ModelTrainingMode enum. */ - enum ModelTrainingMode { - MODEL_TRAINING_MODE_UNSPECIFIED = 0, - MODEL_TRAINING_MODE_AUTOMATIC = 1, - MODEL_TRAINING_MODE_MANUAL = 2 - } - } - - /** Properties of a Flow. */ - interface IFlow { - - /** Flow name */ - name?: (string|null); - - /** Flow displayName */ - displayName?: (string|null); - - /** Flow description */ - description?: (string|null); - - /** Flow transitionRoutes */ - transitionRoutes?: (google.cloud.dialogflow.cx.v3.ITransitionRoute[]|null); + /** SynthesizeSpeechConfig pitch */ + pitch?: (number|null); - /** Flow eventHandlers */ - eventHandlers?: (google.cloud.dialogflow.cx.v3.IEventHandler[]|null); + /** SynthesizeSpeechConfig volumeGainDb */ + volumeGainDb?: (number|null); - /** Flow transitionRouteGroups */ - transitionRouteGroups?: (string[]|null); + /** SynthesizeSpeechConfig effectsProfileId */ + effectsProfileId?: (string[]|null); - /** Flow nluSettings */ - nluSettings?: (google.cloud.dialogflow.cx.v3.INluSettings|null); + /** SynthesizeSpeechConfig voice */ + voice?: (google.cloud.dialogflow.cx.v3.IVoiceSelectionParams|null); } - /** Represents a Flow. */ - class Flow implements IFlow { + /** Represents a SynthesizeSpeechConfig. */ + class SynthesizeSpeechConfig implements ISynthesizeSpeechConfig { /** - * Constructs a new Flow. + * Constructs a new SynthesizeSpeechConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IFlow); - - /** Flow name. */ - public name: string; - - /** Flow displayName. */ - public displayName: string; + constructor(properties?: google.cloud.dialogflow.cx.v3.ISynthesizeSpeechConfig); - /** Flow description. */ - public description: string; + /** SynthesizeSpeechConfig speakingRate. */ + public speakingRate: number; - /** Flow transitionRoutes. */ - public transitionRoutes: google.cloud.dialogflow.cx.v3.ITransitionRoute[]; + /** SynthesizeSpeechConfig pitch. */ + public pitch: number; - /** Flow eventHandlers. */ - public eventHandlers: google.cloud.dialogflow.cx.v3.IEventHandler[]; + /** SynthesizeSpeechConfig volumeGainDb. */ + public volumeGainDb: number; - /** Flow transitionRouteGroups. */ - public transitionRouteGroups: string[]; + /** SynthesizeSpeechConfig effectsProfileId. */ + public effectsProfileId: string[]; - /** Flow nluSettings. */ - public nluSettings?: (google.cloud.dialogflow.cx.v3.INluSettings|null); + /** SynthesizeSpeechConfig voice. */ + public voice?: (google.cloud.dialogflow.cx.v3.IVoiceSelectionParams|null); /** - * Creates a new Flow instance using the specified properties. + * Creates a new SynthesizeSpeechConfig instance using the specified properties. * @param [properties] Properties to set - * @returns Flow instance + * @returns SynthesizeSpeechConfig instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IFlow): google.cloud.dialogflow.cx.v3.Flow; + public static create(properties?: google.cloud.dialogflow.cx.v3.ISynthesizeSpeechConfig): google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig; /** - * Encodes the specified Flow message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Flow.verify|verify} messages. - * @param message Flow message or plain object to encode + * Encodes the specified SynthesizeSpeechConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig.verify|verify} messages. + * @param message SynthesizeSpeechConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IFlow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ISynthesizeSpeechConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Flow message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Flow.verify|verify} messages. - * @param message Flow message or plain object to encode + * Encodes the specified SynthesizeSpeechConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig.verify|verify} messages. + * @param message SynthesizeSpeechConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IFlow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ISynthesizeSpeechConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Flow message from the specified reader or buffer. + * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Flow + * @returns SynthesizeSpeechConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Flow; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig; /** - * Decodes a Flow message from the specified reader or buffer, length delimited. + * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Flow + * @returns SynthesizeSpeechConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Flow; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig; /** - * Verifies a Flow message. + * Verifies a SynthesizeSpeechConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Flow message from a plain object. Also converts values to their respective internal types. + * Creates a SynthesizeSpeechConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Flow + * @returns SynthesizeSpeechConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Flow; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig; /** - * Creates a plain object from a Flow message. Also converts values to other types if specified. - * @param message Flow + * Creates a plain object from a SynthesizeSpeechConfig message. Also converts values to other types if specified. + * @param message SynthesizeSpeechConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.Flow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Flow to JSON. + * Converts this SynthesizeSpeechConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Flow + * Gets the default type url for SynthesizeSpeechConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateFlowRequest. */ - interface ICreateFlowRequest { + /** OutputAudioEncoding enum. */ + enum OutputAudioEncoding { + OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0, + OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1, + OUTPUT_AUDIO_ENCODING_MP3 = 2, + OUTPUT_AUDIO_ENCODING_MP3_64_KBPS = 4, + OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3, + OUTPUT_AUDIO_ENCODING_MULAW = 5 + } - /** CreateFlowRequest parent */ - parent?: (string|null); + /** Properties of an OutputAudioConfig. */ + interface IOutputAudioConfig { - /** CreateFlowRequest flow */ - flow?: (google.cloud.dialogflow.cx.v3.IFlow|null); + /** OutputAudioConfig audioEncoding */ + audioEncoding?: (google.cloud.dialogflow.cx.v3.OutputAudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3.OutputAudioEncoding|null); - /** CreateFlowRequest languageCode */ - languageCode?: (string|null); + /** OutputAudioConfig sampleRateHertz */ + sampleRateHertz?: (number|null); + + /** OutputAudioConfig synthesizeSpeechConfig */ + synthesizeSpeechConfig?: (google.cloud.dialogflow.cx.v3.ISynthesizeSpeechConfig|null); } - /** Represents a CreateFlowRequest. */ - class CreateFlowRequest implements ICreateFlowRequest { + /** Represents an OutputAudioConfig. */ + class OutputAudioConfig implements IOutputAudioConfig { /** - * Constructs a new CreateFlowRequest. + * Constructs a new OutputAudioConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateFlowRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IOutputAudioConfig); - /** CreateFlowRequest parent. */ - public parent: string; + /** OutputAudioConfig audioEncoding. */ + public audioEncoding: (google.cloud.dialogflow.cx.v3.OutputAudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3.OutputAudioEncoding); - /** CreateFlowRequest flow. */ - public flow?: (google.cloud.dialogflow.cx.v3.IFlow|null); + /** OutputAudioConfig sampleRateHertz. */ + public sampleRateHertz: number; - /** CreateFlowRequest languageCode. */ - public languageCode: string; + /** OutputAudioConfig synthesizeSpeechConfig. */ + public synthesizeSpeechConfig?: (google.cloud.dialogflow.cx.v3.ISynthesizeSpeechConfig|null); /** - * Creates a new CreateFlowRequest instance using the specified properties. + * Creates a new OutputAudioConfig instance using the specified properties. * @param [properties] Properties to set - * @returns CreateFlowRequest instance + * @returns OutputAudioConfig instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateFlowRequest): google.cloud.dialogflow.cx.v3.CreateFlowRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IOutputAudioConfig): google.cloud.dialogflow.cx.v3.OutputAudioConfig; /** - * Encodes the specified CreateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateFlowRequest.verify|verify} messages. - * @param message CreateFlowRequest message or plain object to encode + * Encodes the specified OutputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.OutputAudioConfig.verify|verify} messages. + * @param message OutputAudioConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.ICreateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IOutputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateFlowRequest.verify|verify} messages. - * @param message CreateFlowRequest message or plain object to encode + * Encodes the specified OutputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.OutputAudioConfig.verify|verify} messages. + * @param message OutputAudioConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IOutputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateFlowRequest message from the specified reader or buffer. + * Decodes an OutputAudioConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateFlowRequest + * @returns OutputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CreateFlowRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.OutputAudioConfig; /** - * Decodes a CreateFlowRequest message from the specified reader or buffer, length delimited. + * Decodes an OutputAudioConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateFlowRequest + * @returns OutputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.CreateFlowRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.OutputAudioConfig; /** - * Verifies a CreateFlowRequest message. + * Verifies an OutputAudioConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates an OutputAudioConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateFlowRequest + * @returns OutputAudioConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateFlowRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.OutputAudioConfig; /** - * Creates a plain object from a CreateFlowRequest message. Also converts values to other types if specified. - * @param message CreateFlowRequest + * Creates a plain object from an OutputAudioConfig message. Also converts values to other types if specified. + * @param message OutputAudioConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.CreateFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.OutputAudioConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateFlowRequest to JSON. + * Converts this OutputAudioConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateFlowRequest + * Gets the default type url for OutputAudioConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteFlowRequest. */ - interface IDeleteFlowRequest { - - /** DeleteFlowRequest name */ - name?: (string|null); + /** Properties of a TextToSpeechSettings. */ + interface ITextToSpeechSettings { - /** DeleteFlowRequest force */ - force?: (boolean|null); + /** TextToSpeechSettings synthesizeSpeechConfigs */ + synthesizeSpeechConfigs?: ({ [k: string]: google.cloud.dialogflow.cx.v3.ISynthesizeSpeechConfig }|null); } - /** Represents a DeleteFlowRequest. */ - class DeleteFlowRequest implements IDeleteFlowRequest { + /** Represents a TextToSpeechSettings. */ + class TextToSpeechSettings implements ITextToSpeechSettings { /** - * Constructs a new DeleteFlowRequest. + * Constructs a new TextToSpeechSettings. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteFlowRequest); - - /** DeleteFlowRequest name. */ - public name: string; + constructor(properties?: google.cloud.dialogflow.cx.v3.ITextToSpeechSettings); - /** DeleteFlowRequest force. */ - public force: boolean; + /** TextToSpeechSettings synthesizeSpeechConfigs. */ + public synthesizeSpeechConfigs: { [k: string]: google.cloud.dialogflow.cx.v3.ISynthesizeSpeechConfig }; /** - * Creates a new DeleteFlowRequest instance using the specified properties. + * Creates a new TextToSpeechSettings instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteFlowRequest instance + * @returns TextToSpeechSettings instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteFlowRequest): google.cloud.dialogflow.cx.v3.DeleteFlowRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.ITextToSpeechSettings): google.cloud.dialogflow.cx.v3.TextToSpeechSettings; /** - * Encodes the specified DeleteFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteFlowRequest.verify|verify} messages. - * @param message DeleteFlowRequest message or plain object to encode + * Encodes the specified TextToSpeechSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TextToSpeechSettings.verify|verify} messages. + * @param message TextToSpeechSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ITextToSpeechSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteFlowRequest.verify|verify} messages. - * @param message DeleteFlowRequest message or plain object to encode + * Encodes the specified TextToSpeechSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TextToSpeechSettings.verify|verify} messages. + * @param message TextToSpeechSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ITextToSpeechSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteFlowRequest message from the specified reader or buffer. + * Decodes a TextToSpeechSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteFlowRequest + * @returns TextToSpeechSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.DeleteFlowRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.TextToSpeechSettings; /** - * Decodes a DeleteFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a TextToSpeechSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteFlowRequest + * @returns TextToSpeechSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.DeleteFlowRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.TextToSpeechSettings; /** - * Verifies a DeleteFlowRequest message. + * Verifies a TextToSpeechSettings message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TextToSpeechSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteFlowRequest + * @returns TextToSpeechSettings */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteFlowRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.TextToSpeechSettings; /** - * Creates a plain object from a DeleteFlowRequest message. Also converts values to other types if specified. - * @param message DeleteFlowRequest + * Creates a plain object from a TextToSpeechSettings message. Also converts values to other types if specified. + * @param message TextToSpeechSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.TextToSpeechSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteFlowRequest to JSON. + * Converts this TextToSpeechSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteFlowRequest + * Gets the default type url for TextToSpeechSettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListFlowsRequest. */ - interface IListFlowsRequest { - - /** ListFlowsRequest parent */ - parent?: (string|null); - - /** ListFlowsRequest pageSize */ - pageSize?: (number|null); - - /** ListFlowsRequest pageToken */ - pageToken?: (string|null); - - /** ListFlowsRequest languageCode */ - languageCode?: (string|null); - } - - /** Represents a ListFlowsRequest. */ - class ListFlowsRequest implements IListFlowsRequest { + /** Represents a Flows */ + class Flows extends $protobuf.rpc.Service { /** - * Constructs a new ListFlowsRequest. - * @param [properties] Properties to set + * Constructs a new Flows service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListFlowsRequest); - - /** ListFlowsRequest parent. */ - public parent: string; - - /** ListFlowsRequest pageSize. */ - public pageSize: number; - - /** ListFlowsRequest pageToken. */ - public pageToken: string; - - /** ListFlowsRequest languageCode. */ - public languageCode: string; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates a new ListFlowsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListFlowsRequest instance + * Creates new Flows 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(properties?: google.cloud.dialogflow.cx.v3.IListFlowsRequest): google.cloud.dialogflow.cx.v3.ListFlowsRequest; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Flows; /** - * Encodes the specified ListFlowsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListFlowsRequest.verify|verify} messages. - * @param message ListFlowsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls CreateFlow. + * @param request CreateFlowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Flow */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListFlowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public createFlow(request: google.cloud.dialogflow.cx.v3.ICreateFlowRequest, callback: google.cloud.dialogflow.cx.v3.Flows.CreateFlowCallback): void; /** - * Encodes the specified ListFlowsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListFlowsRequest.verify|verify} messages. - * @param message ListFlowsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls CreateFlow. + * @param request CreateFlowRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListFlowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public createFlow(request: google.cloud.dialogflow.cx.v3.ICreateFlowRequest): Promise; /** - * Decodes a ListFlowsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListFlowsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteFlow. + * @param request DeleteFlowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListFlowsRequest; + public deleteFlow(request: google.cloud.dialogflow.cx.v3.IDeleteFlowRequest, callback: google.cloud.dialogflow.cx.v3.Flows.DeleteFlowCallback): void; /** - * Decodes a ListFlowsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListFlowsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteFlow. + * @param request DeleteFlowRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListFlowsRequest; + public deleteFlow(request: google.cloud.dialogflow.cx.v3.IDeleteFlowRequest): Promise; /** - * Verifies a ListFlowsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls ListFlows. + * @param request ListFlowsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFlowsResponse */ - public static verify(message: { [k: string]: any }): (string|null); + public listFlows(request: google.cloud.dialogflow.cx.v3.IListFlowsRequest, callback: google.cloud.dialogflow.cx.v3.Flows.ListFlowsCallback): void; /** - * Creates a ListFlowsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListFlowsRequest + * Calls ListFlows. + * @param request ListFlowsRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListFlowsRequest; + public listFlows(request: google.cloud.dialogflow.cx.v3.IListFlowsRequest): Promise; /** - * Creates a plain object from a ListFlowsRequest message. Also converts values to other types if specified. - * @param message ListFlowsRequest - * @param [options] Conversion options - * @returns Plain object + * Calls GetFlow. + * @param request GetFlowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Flow */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListFlowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public getFlow(request: google.cloud.dialogflow.cx.v3.IGetFlowRequest, callback: google.cloud.dialogflow.cx.v3.Flows.GetFlowCallback): void; /** - * Converts this ListFlowsRequest to JSON. - * @returns JSON object + * Calls GetFlow. + * @param request GetFlowRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; + public getFlow(request: google.cloud.dialogflow.cx.v3.IGetFlowRequest): Promise; /** - * Gets the default type url for ListFlowsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Calls UpdateFlow. + * @param request UpdateFlowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Flow */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListFlowsResponse. */ - interface IListFlowsResponse { - - /** ListFlowsResponse flows */ - flows?: (google.cloud.dialogflow.cx.v3.IFlow[]|null); - - /** ListFlowsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListFlowsResponse. */ - class ListFlowsResponse implements IListFlowsResponse { + public updateFlow(request: google.cloud.dialogflow.cx.v3.IUpdateFlowRequest, callback: google.cloud.dialogflow.cx.v3.Flows.UpdateFlowCallback): void; /** - * Constructs a new ListFlowsResponse. - * @param [properties] Properties to set + * Calls UpdateFlow. + * @param request UpdateFlowRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListFlowsResponse); - - /** ListFlowsResponse flows. */ - public flows: google.cloud.dialogflow.cx.v3.IFlow[]; - - /** ListFlowsResponse nextPageToken. */ - public nextPageToken: string; + public updateFlow(request: google.cloud.dialogflow.cx.v3.IUpdateFlowRequest): Promise; /** - * Creates a new ListFlowsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListFlowsResponse instance + * Calls TrainFlow. + * @param request TrainFlowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListFlowsResponse): google.cloud.dialogflow.cx.v3.ListFlowsResponse; + public trainFlow(request: google.cloud.dialogflow.cx.v3.ITrainFlowRequest, callback: google.cloud.dialogflow.cx.v3.Flows.TrainFlowCallback): void; /** - * Encodes the specified ListFlowsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListFlowsResponse.verify|verify} messages. - * @param message ListFlowsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls TrainFlow. + * @param request TrainFlowRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListFlowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public trainFlow(request: google.cloud.dialogflow.cx.v3.ITrainFlowRequest): Promise; /** - * Encodes the specified ListFlowsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListFlowsResponse.verify|verify} messages. - * @param message ListFlowsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ValidateFlow. + * @param request ValidateFlowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FlowValidationResult */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListFlowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public validateFlow(request: google.cloud.dialogflow.cx.v3.IValidateFlowRequest, callback: google.cloud.dialogflow.cx.v3.Flows.ValidateFlowCallback): void; /** - * Decodes a ListFlowsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListFlowsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ValidateFlow. + * @param request ValidateFlowRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListFlowsResponse; + public validateFlow(request: google.cloud.dialogflow.cx.v3.IValidateFlowRequest): Promise; /** - * Decodes a ListFlowsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListFlowsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetFlowValidationResult. + * @param request GetFlowValidationResultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FlowValidationResult */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListFlowsResponse; + public getFlowValidationResult(request: google.cloud.dialogflow.cx.v3.IGetFlowValidationResultRequest, callback: google.cloud.dialogflow.cx.v3.Flows.GetFlowValidationResultCallback): void; /** - * Verifies a ListFlowsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls GetFlowValidationResult. + * @param request GetFlowValidationResultRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public getFlowValidationResult(request: google.cloud.dialogflow.cx.v3.IGetFlowValidationResultRequest): Promise; /** - * Creates a ListFlowsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListFlowsResponse + * Calls ImportFlow. + * @param request ImportFlowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListFlowsResponse; + public importFlow(request: google.cloud.dialogflow.cx.v3.IImportFlowRequest, callback: google.cloud.dialogflow.cx.v3.Flows.ImportFlowCallback): void; /** - * Creates a plain object from a ListFlowsResponse message. Also converts values to other types if specified. - * @param message ListFlowsResponse - * @param [options] Conversion options - * @returns Plain object + * Calls ImportFlow. + * @param request ImportFlowRequest message or plain object + * @returns Promise */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListFlowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public importFlow(request: google.cloud.dialogflow.cx.v3.IImportFlowRequest): Promise; /** - * Converts this ListFlowsResponse to JSON. - * @returns JSON object + * Calls ExportFlow. + * @param request ExportFlowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public toJSON(): { [k: string]: any }; + public exportFlow(request: google.cloud.dialogflow.cx.v3.IExportFlowRequest, callback: google.cloud.dialogflow.cx.v3.Flows.ExportFlowCallback): void; /** - * Gets the default type url for ListFlowsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Calls ExportFlow. + * @param request ExportFlowRequest message or plain object + * @returns Promise */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetFlowRequest. */ - interface IGetFlowRequest { - - /** GetFlowRequest name */ - name?: (string|null); - - /** GetFlowRequest languageCode */ - languageCode?: (string|null); + public exportFlow(request: google.cloud.dialogflow.cx.v3.IExportFlowRequest): Promise; } - /** Represents a GetFlowRequest. */ - class GetFlowRequest implements IGetFlowRequest { + namespace Flows { /** - * Constructs a new GetFlowRequest. - * @param [properties] Properties to set + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|createFlow}. + * @param error Error, if any + * @param [response] Flow */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IGetFlowRequest); - - /** GetFlowRequest name. */ - public name: string; - - /** GetFlowRequest languageCode. */ - public languageCode: string; - - /** - * Creates a new GetFlowRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetFlowRequest instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IGetFlowRequest): google.cloud.dialogflow.cx.v3.GetFlowRequest; + type CreateFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Flow) => void; /** - * Encodes the specified GetFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetFlowRequest.verify|verify} messages. - * @param message GetFlowRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|deleteFlow}. + * @param error Error, if any + * @param [response] Empty */ - public static encode(message: google.cloud.dialogflow.cx.v3.IGetFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type DeleteFlowCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Encodes the specified GetFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetFlowRequest.verify|verify} messages. - * @param message GetFlowRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|listFlows}. + * @param error Error, if any + * @param [response] ListFlowsResponse */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type ListFlowsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListFlowsResponse) => void; /** - * Decodes a GetFlowRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetFlowRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|getFlow}. + * @param error Error, if any + * @param [response] Flow */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetFlowRequest; + type GetFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Flow) => void; /** - * Decodes a GetFlowRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetFlowRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|updateFlow}. + * @param error Error, if any + * @param [response] Flow */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetFlowRequest; + type UpdateFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Flow) => void; /** - * Verifies a GetFlowRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|trainFlow}. + * @param error Error, if any + * @param [response] Operation */ - public static verify(message: { [k: string]: any }): (string|null); + type TrainFlowCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Creates a GetFlowRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetFlowRequest + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|validateFlow}. + * @param error Error, if any + * @param [response] FlowValidationResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetFlowRequest; + type ValidateFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.FlowValidationResult) => void; /** - * Creates a plain object from a GetFlowRequest message. Also converts values to other types if specified. - * @param message GetFlowRequest - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|getFlowValidationResult}. + * @param error Error, if any + * @param [response] FlowValidationResult */ - public static toObject(message: google.cloud.dialogflow.cx.v3.GetFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type GetFlowValidationResultCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.FlowValidationResult) => void; /** - * Converts this GetFlowRequest to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|importFlow}. + * @param error Error, if any + * @param [response] Operation */ - public toJSON(): { [k: string]: any }; + type ImportFlowCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Gets the default type url for GetFlowRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|exportFlow}. + * @param error Error, if any + * @param [response] Operation */ - public static getTypeUrl(typeUrlPrefix?: string): string; + type ExportFlowCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; } - /** Properties of an UpdateFlowRequest. */ - interface IUpdateFlowRequest { + /** Properties of a NluSettings. */ + interface INluSettings { - /** UpdateFlowRequest flow */ - flow?: (google.cloud.dialogflow.cx.v3.IFlow|null); + /** NluSettings modelType */ + modelType?: (google.cloud.dialogflow.cx.v3.NluSettings.ModelType|keyof typeof google.cloud.dialogflow.cx.v3.NluSettings.ModelType|null); - /** UpdateFlowRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** NluSettings classificationThreshold */ + classificationThreshold?: (number|null); - /** UpdateFlowRequest languageCode */ - languageCode?: (string|null); + /** NluSettings modelTrainingMode */ + modelTrainingMode?: (google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode|keyof typeof google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode|null); } - /** Represents an UpdateFlowRequest. */ - class UpdateFlowRequest implements IUpdateFlowRequest { + /** Represents a NluSettings. */ + class NluSettings implements INluSettings { /** - * Constructs a new UpdateFlowRequest. + * Constructs a new NluSettings. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateFlowRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.INluSettings); - /** UpdateFlowRequest flow. */ - public flow?: (google.cloud.dialogflow.cx.v3.IFlow|null); + /** NluSettings modelType. */ + public modelType: (google.cloud.dialogflow.cx.v3.NluSettings.ModelType|keyof typeof google.cloud.dialogflow.cx.v3.NluSettings.ModelType); - /** UpdateFlowRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** NluSettings classificationThreshold. */ + public classificationThreshold: number; - /** UpdateFlowRequest languageCode. */ - public languageCode: string; + /** NluSettings modelTrainingMode. */ + public modelTrainingMode: (google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode|keyof typeof google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode); /** - * Creates a new UpdateFlowRequest instance using the specified properties. + * Creates a new NluSettings instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateFlowRequest instance + * @returns NluSettings instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateFlowRequest): google.cloud.dialogflow.cx.v3.UpdateFlowRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.INluSettings): google.cloud.dialogflow.cx.v3.NluSettings; /** - * Encodes the specified UpdateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateFlowRequest.verify|verify} messages. - * @param message UpdateFlowRequest message or plain object to encode + * Encodes the specified NluSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.NluSettings.verify|verify} messages. + * @param message NluSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IUpdateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.INluSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateFlowRequest.verify|verify} messages. - * @param message UpdateFlowRequest message or plain object to encode + * Encodes the specified NluSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.NluSettings.verify|verify} messages. + * @param message NluSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.INluSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateFlowRequest message from the specified reader or buffer. + * Decodes a NluSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateFlowRequest + * @returns NluSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.UpdateFlowRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.NluSettings; /** - * Decodes an UpdateFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a NluSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateFlowRequest + * @returns NluSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.UpdateFlowRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.NluSettings; /** - * Verifies an UpdateFlowRequest message. + * Verifies a NluSettings message. * @param message Plain 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 UpdateFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a NluSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateFlowRequest + * @returns NluSettings */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateFlowRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.NluSettings; /** - * Creates a plain object from an UpdateFlowRequest message. Also converts values to other types if specified. - * @param message UpdateFlowRequest + * Creates a plain object from a NluSettings message. Also converts values to other types if specified. + * @param message NluSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.UpdateFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.NluSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateFlowRequest to JSON. + * Converts this NluSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateFlowRequest + * Gets the default type url for NluSettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a TrainFlowRequest. */ - interface ITrainFlowRequest { + namespace NluSettings { - /** TrainFlowRequest name */ + /** ModelType enum. */ + enum ModelType { + MODEL_TYPE_UNSPECIFIED = 0, + MODEL_TYPE_STANDARD = 1, + MODEL_TYPE_ADVANCED = 3 + } + + /** ModelTrainingMode enum. */ + enum ModelTrainingMode { + MODEL_TRAINING_MODE_UNSPECIFIED = 0, + MODEL_TRAINING_MODE_AUTOMATIC = 1, + MODEL_TRAINING_MODE_MANUAL = 2 + } + } + + /** Properties of a Flow. */ + interface IFlow { + + /** Flow name */ name?: (string|null); + + /** Flow displayName */ + displayName?: (string|null); + + /** Flow description */ + description?: (string|null); + + /** Flow transitionRoutes */ + transitionRoutes?: (google.cloud.dialogflow.cx.v3.ITransitionRoute[]|null); + + /** Flow eventHandlers */ + eventHandlers?: (google.cloud.dialogflow.cx.v3.IEventHandler[]|null); + + /** Flow transitionRouteGroups */ + transitionRouteGroups?: (string[]|null); + + /** Flow nluSettings */ + nluSettings?: (google.cloud.dialogflow.cx.v3.INluSettings|null); } - /** Represents a TrainFlowRequest. */ - class TrainFlowRequest implements ITrainFlowRequest { + /** Represents a Flow. */ + class Flow implements IFlow { /** - * Constructs a new TrainFlowRequest. + * Constructs a new Flow. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ITrainFlowRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IFlow); - /** TrainFlowRequest name. */ + /** Flow name. */ public name: string; + /** Flow displayName. */ + public displayName: string; + + /** Flow description. */ + public description: string; + + /** Flow transitionRoutes. */ + public transitionRoutes: google.cloud.dialogflow.cx.v3.ITransitionRoute[]; + + /** Flow eventHandlers. */ + public eventHandlers: google.cloud.dialogflow.cx.v3.IEventHandler[]; + + /** Flow transitionRouteGroups. */ + public transitionRouteGroups: string[]; + + /** Flow nluSettings. */ + public nluSettings?: (google.cloud.dialogflow.cx.v3.INluSettings|null); + /** - * Creates a new TrainFlowRequest instance using the specified properties. + * Creates a new Flow instance using the specified properties. * @param [properties] Properties to set - * @returns TrainFlowRequest instance + * @returns Flow instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ITrainFlowRequest): google.cloud.dialogflow.cx.v3.TrainFlowRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IFlow): google.cloud.dialogflow.cx.v3.Flow; /** - * Encodes the specified TrainFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TrainFlowRequest.verify|verify} messages. - * @param message TrainFlowRequest message or plain object to encode + * Encodes the specified Flow message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Flow.verify|verify} messages. + * @param message Flow message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.ITrainFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IFlow, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TrainFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TrainFlowRequest.verify|verify} messages. - * @param message TrainFlowRequest message or plain object to encode + * Encodes the specified Flow message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Flow.verify|verify} messages. + * @param message Flow message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ITrainFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IFlow, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TrainFlowRequest message from the specified reader or buffer. + * Decodes a Flow message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TrainFlowRequest + * @returns Flow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.TrainFlowRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Flow; /** - * Decodes a TrainFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a Flow message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TrainFlowRequest + * @returns Flow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.TrainFlowRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Flow; /** - * Verifies a TrainFlowRequest message. + * Verifies a Flow message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TrainFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Flow message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TrainFlowRequest + * @returns Flow */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.TrainFlowRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Flow; /** - * Creates a plain object from a TrainFlowRequest message. Also converts values to other types if specified. - * @param message TrainFlowRequest + * Creates a plain object from a Flow message. Also converts values to other types if specified. + * @param message Flow * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.TrainFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.Flow, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TrainFlowRequest to JSON. + * Converts this Flow to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for TrainFlowRequest + * Gets the default type url for Flow * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ValidateFlowRequest. */ - interface IValidateFlowRequest { + /** Properties of a CreateFlowRequest. */ + interface ICreateFlowRequest { - /** ValidateFlowRequest name */ - name?: (string|null); + /** CreateFlowRequest parent */ + parent?: (string|null); - /** ValidateFlowRequest languageCode */ + /** CreateFlowRequest flow */ + flow?: (google.cloud.dialogflow.cx.v3.IFlow|null); + + /** CreateFlowRequest languageCode */ languageCode?: (string|null); } - /** Represents a ValidateFlowRequest. */ - class ValidateFlowRequest implements IValidateFlowRequest { + /** Represents a CreateFlowRequest. */ + class CreateFlowRequest implements ICreateFlowRequest { /** - * Constructs a new ValidateFlowRequest. + * Constructs a new CreateFlowRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IValidateFlowRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateFlowRequest); - /** ValidateFlowRequest name. */ - public name: string; + /** CreateFlowRequest parent. */ + public parent: string; - /** ValidateFlowRequest languageCode. */ + /** CreateFlowRequest flow. */ + public flow?: (google.cloud.dialogflow.cx.v3.IFlow|null); + + /** CreateFlowRequest languageCode. */ public languageCode: string; /** - * Creates a new ValidateFlowRequest instance using the specified properties. + * Creates a new CreateFlowRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ValidateFlowRequest instance + * @returns CreateFlowRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IValidateFlowRequest): google.cloud.dialogflow.cx.v3.ValidateFlowRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateFlowRequest): google.cloud.dialogflow.cx.v3.CreateFlowRequest; /** - * Encodes the specified ValidateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ValidateFlowRequest.verify|verify} messages. - * @param message ValidateFlowRequest message or plain object to encode + * Encodes the specified CreateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateFlowRequest.verify|verify} messages. + * @param message CreateFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IValidateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ICreateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ValidateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ValidateFlowRequest.verify|verify} messages. - * @param message ValidateFlowRequest message or plain object to encode + * Encodes the specified CreateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateFlowRequest.verify|verify} messages. + * @param message CreateFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IValidateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ValidateFlowRequest message from the specified reader or buffer. + * Decodes a CreateFlowRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ValidateFlowRequest + * @returns CreateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ValidateFlowRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CreateFlowRequest; /** - * Decodes a ValidateFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateFlowRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ValidateFlowRequest + * @returns CreateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ValidateFlowRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.CreateFlowRequest; /** - * Verifies a ValidateFlowRequest message. + * Verifies a CreateFlowRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ValidateFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateFlowRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ValidateFlowRequest + * @returns CreateFlowRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ValidateFlowRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateFlowRequest; /** - * Creates a plain object from a ValidateFlowRequest message. Also converts values to other types if specified. - * @param message ValidateFlowRequest + * Creates a plain object from a CreateFlowRequest message. Also converts values to other types if specified. + * @param message CreateFlowRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ValidateFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.CreateFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ValidateFlowRequest to JSON. + * Converts this CreateFlowRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ValidateFlowRequest + * Gets the default type url for CreateFlowRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetFlowValidationResultRequest. */ - interface IGetFlowValidationResultRequest { + /** Properties of a DeleteFlowRequest. */ + interface IDeleteFlowRequest { - /** GetFlowValidationResultRequest name */ + /** DeleteFlowRequest name */ name?: (string|null); - /** GetFlowValidationResultRequest languageCode */ - languageCode?: (string|null); + /** DeleteFlowRequest force */ + force?: (boolean|null); } - /** Represents a GetFlowValidationResultRequest. */ - class GetFlowValidationResultRequest implements IGetFlowValidationResultRequest { + /** Represents a DeleteFlowRequest. */ + class DeleteFlowRequest implements IDeleteFlowRequest { /** - * Constructs a new GetFlowValidationResultRequest. + * Constructs a new DeleteFlowRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IGetFlowValidationResultRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteFlowRequest); - /** GetFlowValidationResultRequest name. */ + /** DeleteFlowRequest name. */ public name: string; - /** GetFlowValidationResultRequest languageCode. */ - public languageCode: string; + /** DeleteFlowRequest force. */ + public force: boolean; /** - * Creates a new GetFlowValidationResultRequest instance using the specified properties. + * Creates a new DeleteFlowRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetFlowValidationResultRequest instance + * @returns DeleteFlowRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IGetFlowValidationResultRequest): google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteFlowRequest): google.cloud.dialogflow.cx.v3.DeleteFlowRequest; /** - * Encodes the specified GetFlowValidationResultRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest.verify|verify} messages. - * @param message GetFlowValidationResultRequest message or plain object to encode + * Encodes the specified DeleteFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteFlowRequest.verify|verify} messages. + * @param message DeleteFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IGetFlowValidationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetFlowValidationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest.verify|verify} messages. - * @param message GetFlowValidationResultRequest message or plain object to encode + * Encodes the specified DeleteFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteFlowRequest.verify|verify} messages. + * @param message DeleteFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetFlowValidationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetFlowValidationResultRequest message from the specified reader or buffer. + * Decodes a DeleteFlowRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetFlowValidationResultRequest + * @returns DeleteFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.DeleteFlowRequest; /** - * Decodes a GetFlowValidationResultRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteFlowRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetFlowValidationResultRequest + * @returns DeleteFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.DeleteFlowRequest; /** - * Verifies a GetFlowValidationResultRequest message. + * Verifies a DeleteFlowRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetFlowValidationResultRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteFlowRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetFlowValidationResultRequest + * @returns DeleteFlowRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteFlowRequest; /** - * Creates a plain object from a GetFlowValidationResultRequest message. Also converts values to other types if specified. - * @param message GetFlowValidationResultRequest + * Creates a plain object from a DeleteFlowRequest message. Also converts values to other types if specified. + * @param message DeleteFlowRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetFlowValidationResultRequest to JSON. + * Converts this DeleteFlowRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetFlowValidationResultRequest + * Gets the default type url for DeleteFlowRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FlowValidationResult. */ - interface IFlowValidationResult { + /** Properties of a ListFlowsRequest. */ + interface IListFlowsRequest { - /** FlowValidationResult name */ - name?: (string|null); + /** ListFlowsRequest parent */ + parent?: (string|null); - /** FlowValidationResult validationMessages */ - validationMessages?: (google.cloud.dialogflow.cx.v3.IValidationMessage[]|null); + /** ListFlowsRequest pageSize */ + pageSize?: (number|null); - /** FlowValidationResult updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** ListFlowsRequest pageToken */ + pageToken?: (string|null); + + /** ListFlowsRequest languageCode */ + languageCode?: (string|null); } - /** Represents a FlowValidationResult. */ - class FlowValidationResult implements IFlowValidationResult { + /** Represents a ListFlowsRequest. */ + class ListFlowsRequest implements IListFlowsRequest { /** - * Constructs a new FlowValidationResult. + * Constructs a new ListFlowsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IFlowValidationResult); + constructor(properties?: google.cloud.dialogflow.cx.v3.IListFlowsRequest); - /** FlowValidationResult name. */ - public name: string; + /** ListFlowsRequest parent. */ + public parent: string; - /** FlowValidationResult validationMessages. */ - public validationMessages: google.cloud.dialogflow.cx.v3.IValidationMessage[]; + /** ListFlowsRequest pageSize. */ + public pageSize: number; - /** FlowValidationResult updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** ListFlowsRequest pageToken. */ + public pageToken: string; + + /** ListFlowsRequest languageCode. */ + public languageCode: string; /** - * Creates a new FlowValidationResult instance using the specified properties. + * Creates a new ListFlowsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns FlowValidationResult instance + * @returns ListFlowsRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IFlowValidationResult): google.cloud.dialogflow.cx.v3.FlowValidationResult; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListFlowsRequest): google.cloud.dialogflow.cx.v3.ListFlowsRequest; /** - * Encodes the specified FlowValidationResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FlowValidationResult.verify|verify} messages. - * @param message FlowValidationResult message or plain object to encode + * Encodes the specified ListFlowsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListFlowsRequest.verify|verify} messages. + * @param message ListFlowsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IFlowValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListFlowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FlowValidationResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FlowValidationResult.verify|verify} messages. - * @param message FlowValidationResult message or plain object to encode + * Encodes the specified ListFlowsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListFlowsRequest.verify|verify} messages. + * @param message ListFlowsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IFlowValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListFlowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FlowValidationResult message from the specified reader or buffer. + * Decodes a ListFlowsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FlowValidationResult + * @returns ListFlowsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.FlowValidationResult; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListFlowsRequest; /** - * Decodes a FlowValidationResult message from the specified reader or buffer, length delimited. + * Decodes a ListFlowsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FlowValidationResult + * @returns ListFlowsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.FlowValidationResult; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListFlowsRequest; /** - * Verifies a FlowValidationResult message. + * Verifies a ListFlowsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FlowValidationResult message from a plain object. Also converts values to their respective internal types. + * Creates a ListFlowsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FlowValidationResult + * @returns ListFlowsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.FlowValidationResult; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListFlowsRequest; /** - * Creates a plain object from a FlowValidationResult message. Also converts values to other types if specified. - * @param message FlowValidationResult + * Creates a plain object from a ListFlowsRequest message. Also converts values to other types if specified. + * @param message ListFlowsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.FlowValidationResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListFlowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FlowValidationResult to JSON. + * Converts this ListFlowsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FlowValidationResult + * Gets the default type url for ListFlowsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ImportFlowRequest. */ - interface IImportFlowRequest { - - /** ImportFlowRequest parent */ - parent?: (string|null); - - /** ImportFlowRequest flowUri */ - flowUri?: (string|null); + /** Properties of a ListFlowsResponse. */ + interface IListFlowsResponse { - /** ImportFlowRequest flowContent */ - flowContent?: (Uint8Array|string|null); + /** ListFlowsResponse flows */ + flows?: (google.cloud.dialogflow.cx.v3.IFlow[]|null); - /** ImportFlowRequest importOption */ - importOption?: (google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption|keyof typeof google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption|null); + /** ListFlowsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an ImportFlowRequest. */ - class ImportFlowRequest implements IImportFlowRequest { + /** Represents a ListFlowsResponse. */ + class ListFlowsResponse implements IListFlowsResponse { /** - * Constructs a new ImportFlowRequest. + * Constructs a new ListFlowsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IImportFlowRequest); - - /** ImportFlowRequest parent. */ - public parent: string; - - /** ImportFlowRequest flowUri. */ - public flowUri?: (string|null); - - /** ImportFlowRequest flowContent. */ - public flowContent?: (Uint8Array|string|null); + constructor(properties?: google.cloud.dialogflow.cx.v3.IListFlowsResponse); - /** ImportFlowRequest importOption. */ - public importOption: (google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption|keyof typeof google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption); + /** ListFlowsResponse flows. */ + public flows: google.cloud.dialogflow.cx.v3.IFlow[]; - /** ImportFlowRequest flow. */ - public flow?: ("flowUri"|"flowContent"); + /** ListFlowsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new ImportFlowRequest instance using the specified properties. + * Creates a new ListFlowsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ImportFlowRequest instance + * @returns ListFlowsResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IImportFlowRequest): google.cloud.dialogflow.cx.v3.ImportFlowRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListFlowsResponse): google.cloud.dialogflow.cx.v3.ListFlowsResponse; /** - * Encodes the specified ImportFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportFlowRequest.verify|verify} messages. - * @param message ImportFlowRequest message or plain object to encode + * Encodes the specified ListFlowsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListFlowsResponse.verify|verify} messages. + * @param message ListFlowsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IImportFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListFlowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportFlowRequest.verify|verify} messages. - * @param message ImportFlowRequest message or plain object to encode + * Encodes the specified ListFlowsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListFlowsResponse.verify|verify} messages. + * @param message ListFlowsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IImportFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListFlowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportFlowRequest message from the specified reader or buffer. + * Decodes a ListFlowsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportFlowRequest + * @returns ListFlowsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ImportFlowRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListFlowsResponse; /** - * Decodes an ImportFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a ListFlowsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportFlowRequest + * @returns ListFlowsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ImportFlowRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListFlowsResponse; /** - * Verifies an ImportFlowRequest message. + * Verifies a ListFlowsResponse message. * @param message Plain 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 ImportFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListFlowsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportFlowRequest + * @returns ListFlowsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ImportFlowRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListFlowsResponse; /** - * Creates a plain object from an ImportFlowRequest message. Also converts values to other types if specified. - * @param message ImportFlowRequest + * Creates a plain object from a ListFlowsResponse message. Also converts values to other types if specified. + * @param message ListFlowsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ImportFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListFlowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportFlowRequest to JSON. + * Converts this ListFlowsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportFlowRequest + * Gets the default type url for ListFlowsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ImportFlowRequest { - - /** ImportOption enum. */ - enum ImportOption { - IMPORT_OPTION_UNSPECIFIED = 0, - KEEP = 1, - FALLBACK = 2 - } - } + /** Properties of a GetFlowRequest. */ + interface IGetFlowRequest { - /** Properties of an ImportFlowResponse. */ - interface IImportFlowResponse { + /** GetFlowRequest name */ + name?: (string|null); - /** ImportFlowResponse flow */ - flow?: (string|null); + /** GetFlowRequest languageCode */ + languageCode?: (string|null); } - /** Represents an ImportFlowResponse. */ - class ImportFlowResponse implements IImportFlowResponse { + /** Represents a GetFlowRequest. */ + class GetFlowRequest implements IGetFlowRequest { /** - * Constructs a new ImportFlowResponse. + * Constructs a new GetFlowRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IImportFlowResponse); + constructor(properties?: google.cloud.dialogflow.cx.v3.IGetFlowRequest); - /** ImportFlowResponse flow. */ - public flow: string; + /** GetFlowRequest name. */ + public name: string; + + /** GetFlowRequest languageCode. */ + public languageCode: string; /** - * Creates a new ImportFlowResponse instance using the specified properties. + * Creates a new GetFlowRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ImportFlowResponse instance + * @returns GetFlowRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IImportFlowResponse): google.cloud.dialogflow.cx.v3.ImportFlowResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3.IGetFlowRequest): google.cloud.dialogflow.cx.v3.GetFlowRequest; /** - * Encodes the specified ImportFlowResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportFlowResponse.verify|verify} messages. - * @param message ImportFlowResponse message or plain object to encode + * Encodes the specified GetFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetFlowRequest.verify|verify} messages. + * @param message GetFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IImportFlowResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IGetFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportFlowResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportFlowResponse.verify|verify} messages. - * @param message ImportFlowResponse message or plain object to encode + * Encodes the specified GetFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetFlowRequest.verify|verify} messages. + * @param message GetFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IImportFlowResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportFlowResponse message from the specified reader or buffer. + * Decodes a GetFlowRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportFlowResponse + * @returns GetFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ImportFlowResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetFlowRequest; /** - * Decodes an ImportFlowResponse message from the specified reader or buffer, length delimited. + * Decodes a GetFlowRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportFlowResponse + * @returns GetFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ImportFlowResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetFlowRequest; /** - * Verifies an ImportFlowResponse message. + * Verifies a GetFlowRequest message. * @param message Plain 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 ImportFlowResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetFlowRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportFlowResponse + * @returns GetFlowRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ImportFlowResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetFlowRequest; /** - * Creates a plain object from an ImportFlowResponse message. Also converts values to other types if specified. - * @param message ImportFlowResponse + * Creates a plain object from a GetFlowRequest message. Also converts values to other types if specified. + * @param message GetFlowRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ImportFlowResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.GetFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportFlowResponse to JSON. + * Converts this GetFlowRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportFlowResponse + * Gets the default type url for GetFlowRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ExportFlowRequest. */ - interface IExportFlowRequest { + /** Properties of an UpdateFlowRequest. */ + interface IUpdateFlowRequest { - /** ExportFlowRequest name */ - name?: (string|null); + /** UpdateFlowRequest flow */ + flow?: (google.cloud.dialogflow.cx.v3.IFlow|null); - /** ExportFlowRequest flowUri */ - flowUri?: (string|null); + /** UpdateFlowRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); - /** ExportFlowRequest includeReferencedFlows */ - includeReferencedFlows?: (boolean|null); + /** UpdateFlowRequest languageCode */ + languageCode?: (string|null); } - /** Represents an ExportFlowRequest. */ - class ExportFlowRequest implements IExportFlowRequest { + /** Represents an UpdateFlowRequest. */ + class UpdateFlowRequest implements IUpdateFlowRequest { /** - * Constructs a new ExportFlowRequest. + * Constructs a new UpdateFlowRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IExportFlowRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateFlowRequest); - /** ExportFlowRequest name. */ - public name: string; + /** UpdateFlowRequest flow. */ + public flow?: (google.cloud.dialogflow.cx.v3.IFlow|null); - /** ExportFlowRequest flowUri. */ - public flowUri: string; + /** UpdateFlowRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** ExportFlowRequest includeReferencedFlows. */ - public includeReferencedFlows: boolean; + /** UpdateFlowRequest languageCode. */ + public languageCode: string; /** - * Creates a new ExportFlowRequest instance using the specified properties. + * Creates a new UpdateFlowRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ExportFlowRequest instance + * @returns UpdateFlowRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IExportFlowRequest): google.cloud.dialogflow.cx.v3.ExportFlowRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateFlowRequest): google.cloud.dialogflow.cx.v3.UpdateFlowRequest; /** - * Encodes the specified ExportFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportFlowRequest.verify|verify} messages. - * @param message ExportFlowRequest message or plain object to encode + * Encodes the specified UpdateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateFlowRequest.verify|verify} messages. + * @param message UpdateFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IExportFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IUpdateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportFlowRequest.verify|verify} messages. - * @param message ExportFlowRequest message or plain object to encode + * Encodes the specified UpdateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateFlowRequest.verify|verify} messages. + * @param message UpdateFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IExportFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportFlowRequest message from the specified reader or buffer. + * Decodes an UpdateFlowRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportFlowRequest + * @returns UpdateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ExportFlowRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.UpdateFlowRequest; /** - * Decodes an ExportFlowRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateFlowRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportFlowRequest + * @returns UpdateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ExportFlowRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.UpdateFlowRequest; /** - * Verifies an ExportFlowRequest message. + * Verifies an UpdateFlowRequest message. * @param message Plain 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 ExportFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateFlowRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportFlowRequest + * @returns UpdateFlowRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ExportFlowRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateFlowRequest; /** - * Creates a plain object from an ExportFlowRequest message. Also converts values to other types if specified. - * @param message ExportFlowRequest + * Creates a plain object from an UpdateFlowRequest message. Also converts values to other types if specified. + * @param message UpdateFlowRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ExportFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.UpdateFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportFlowRequest to JSON. + * Converts this UpdateFlowRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExportFlowRequest + * Gets the default type url for UpdateFlowRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ExportFlowResponse. */ - interface IExportFlowResponse { - - /** ExportFlowResponse flowUri */ - flowUri?: (string|null); + /** Properties of a TrainFlowRequest. */ + interface ITrainFlowRequest { - /** ExportFlowResponse flowContent */ - flowContent?: (Uint8Array|string|null); + /** TrainFlowRequest name */ + name?: (string|null); } - /** Represents an ExportFlowResponse. */ - class ExportFlowResponse implements IExportFlowResponse { + /** Represents a TrainFlowRequest. */ + class TrainFlowRequest implements ITrainFlowRequest { /** - * Constructs a new ExportFlowResponse. + * Constructs a new TrainFlowRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IExportFlowResponse); - - /** ExportFlowResponse flowUri. */ - public flowUri?: (string|null); - - /** ExportFlowResponse flowContent. */ - public flowContent?: (Uint8Array|string|null); + constructor(properties?: google.cloud.dialogflow.cx.v3.ITrainFlowRequest); - /** ExportFlowResponse flow. */ - public flow?: ("flowUri"|"flowContent"); + /** TrainFlowRequest name. */ + public name: string; /** - * Creates a new ExportFlowResponse instance using the specified properties. + * Creates a new TrainFlowRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ExportFlowResponse instance + * @returns TrainFlowRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IExportFlowResponse): google.cloud.dialogflow.cx.v3.ExportFlowResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3.ITrainFlowRequest): google.cloud.dialogflow.cx.v3.TrainFlowRequest; /** - * Encodes the specified ExportFlowResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportFlowResponse.verify|verify} messages. - * @param message ExportFlowResponse message or plain object to encode + * Encodes the specified TrainFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TrainFlowRequest.verify|verify} messages. + * @param message TrainFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IExportFlowResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ITrainFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportFlowResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportFlowResponse.verify|verify} messages. - * @param message ExportFlowResponse message or plain object to encode + * Encodes the specified TrainFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TrainFlowRequest.verify|verify} messages. + * @param message TrainFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IExportFlowResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ITrainFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportFlowResponse message from the specified reader or buffer. + * Decodes a TrainFlowRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportFlowResponse + * @returns TrainFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ExportFlowResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.TrainFlowRequest; /** - * Decodes an ExportFlowResponse message from the specified reader or buffer, length delimited. + * Decodes a TrainFlowRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportFlowResponse + * @returns TrainFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ExportFlowResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.TrainFlowRequest; /** - * Verifies an ExportFlowResponse message. + * Verifies a TrainFlowRequest message. * @param message Plain 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 ExportFlowResponse message from a plain object. Also converts values to their respective internal types. + * Creates a TrainFlowRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportFlowResponse + * @returns TrainFlowRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ExportFlowResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.TrainFlowRequest; /** - * Creates a plain object from an ExportFlowResponse message. Also converts values to other types if specified. - * @param message ExportFlowResponse + * Creates a plain object from a TrainFlowRequest message. Also converts values to other types if specified. + * @param message TrainFlowRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ExportFlowResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.TrainFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportFlowResponse to JSON. + * Converts this TrainFlowRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExportFlowResponse + * Gets the default type url for TrainFlowRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a Pages */ - class Pages extends $protobuf.rpc.Service { + /** Properties of a ValidateFlowRequest. */ + interface IValidateFlowRequest { - /** - * Constructs a new Pages 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); + /** ValidateFlowRequest name */ + name?: (string|null); + + /** ValidateFlowRequest languageCode */ + languageCode?: (string|null); + } + + /** Represents a ValidateFlowRequest. */ + class ValidateFlowRequest implements IValidateFlowRequest { /** - * Creates new Pages 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. + * Constructs a new ValidateFlowRequest. + * @param [properties] Properties to set */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Pages; + constructor(properties?: google.cloud.dialogflow.cx.v3.IValidateFlowRequest); + + /** ValidateFlowRequest name. */ + public name: string; + + /** ValidateFlowRequest languageCode. */ + public languageCode: string; /** - * Calls ListPages. - * @param request ListPagesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListPagesResponse + * Creates a new ValidateFlowRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidateFlowRequest instance */ - public listPages(request: google.cloud.dialogflow.cx.v3.IListPagesRequest, callback: google.cloud.dialogflow.cx.v3.Pages.ListPagesCallback): void; + public static create(properties?: google.cloud.dialogflow.cx.v3.IValidateFlowRequest): google.cloud.dialogflow.cx.v3.ValidateFlowRequest; /** - * Calls ListPages. - * @param request ListPagesRequest message or plain object - * @returns Promise + * Encodes the specified ValidateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ValidateFlowRequest.verify|verify} messages. + * @param message ValidateFlowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listPages(request: google.cloud.dialogflow.cx.v3.IListPagesRequest): Promise; + public static encode(message: google.cloud.dialogflow.cx.v3.IValidateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetPage. - * @param request GetPageRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Page + * Encodes the specified ValidateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ValidateFlowRequest.verify|verify} messages. + * @param message ValidateFlowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getPage(request: google.cloud.dialogflow.cx.v3.IGetPageRequest, callback: google.cloud.dialogflow.cx.v3.Pages.GetPageCallback): void; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IValidateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetPage. - * @param request GetPageRequest message or plain object - * @returns Promise + * Decodes a ValidateFlowRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValidateFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getPage(request: google.cloud.dialogflow.cx.v3.IGetPageRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ValidateFlowRequest; /** - * Calls CreatePage. - * @param request CreatePageRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Page + * Decodes a ValidateFlowRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValidateFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createPage(request: google.cloud.dialogflow.cx.v3.ICreatePageRequest, callback: google.cloud.dialogflow.cx.v3.Pages.CreatePageCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ValidateFlowRequest; /** - * Calls CreatePage. - * @param request CreatePageRequest message or plain object - * @returns Promise + * Verifies a ValidateFlowRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public createPage(request: google.cloud.dialogflow.cx.v3.ICreatePageRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls UpdatePage. - * @param request UpdatePageRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Page + * Creates a ValidateFlowRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidateFlowRequest */ - public updatePage(request: google.cloud.dialogflow.cx.v3.IUpdatePageRequest, callback: google.cloud.dialogflow.cx.v3.Pages.UpdatePageCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ValidateFlowRequest; /** - * Calls UpdatePage. - * @param request UpdatePageRequest message or plain object - * @returns Promise + * Creates a plain object from a ValidateFlowRequest message. Also converts values to other types if specified. + * @param message ValidateFlowRequest + * @param [options] Conversion options + * @returns Plain object */ - public updatePage(request: google.cloud.dialogflow.cx.v3.IUpdatePageRequest): Promise; + public static toObject(message: google.cloud.dialogflow.cx.v3.ValidateFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls DeletePage. - * @param request DeletePageRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Converts this ValidateFlowRequest to JSON. + * @returns JSON object */ - public deletePage(request: google.cloud.dialogflow.cx.v3.IDeletePageRequest, callback: google.cloud.dialogflow.cx.v3.Pages.DeletePageCallback): void; + public toJSON(): { [k: string]: any }; /** - * Calls DeletePage. - * @param request DeletePageRequest message or plain object - * @returns Promise + * Gets the default type url for ValidateFlowRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public deletePage(request: google.cloud.dialogflow.cx.v3.IDeletePageRequest): Promise; + public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Pages { + /** Properties of a GetFlowValidationResultRequest. */ + interface IGetFlowValidationResultRequest { + + /** GetFlowValidationResultRequest name */ + name?: (string|null); + + /** GetFlowValidationResultRequest languageCode */ + languageCode?: (string|null); + } + + /** Represents a GetFlowValidationResultRequest. */ + class GetFlowValidationResultRequest implements IGetFlowValidationResultRequest { /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Pages|listPages}. - * @param error Error, if any - * @param [response] ListPagesResponse + * Constructs a new GetFlowValidationResultRequest. + * @param [properties] Properties to set */ - type ListPagesCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListPagesResponse) => void; + constructor(properties?: google.cloud.dialogflow.cx.v3.IGetFlowValidationResultRequest); + + /** GetFlowValidationResultRequest name. */ + public name: string; + + /** GetFlowValidationResultRequest languageCode. */ + public languageCode: string; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Pages|getPage}. - * @param error Error, if any - * @param [response] Page + * Creates a new GetFlowValidationResultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetFlowValidationResultRequest instance */ - type GetPageCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Page) => void; + public static create(properties?: google.cloud.dialogflow.cx.v3.IGetFlowValidationResultRequest): google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Pages|createPage}. - * @param error Error, if any - * @param [response] Page + * Encodes the specified GetFlowValidationResultRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest.verify|verify} messages. + * @param message GetFlowValidationResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type CreatePageCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Page) => void; + public static encode(message: google.cloud.dialogflow.cx.v3.IGetFlowValidationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Pages|updatePage}. - * @param error Error, if any - * @param [response] Page + * Encodes the specified GetFlowValidationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest.verify|verify} messages. + * @param message GetFlowValidationResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type UpdatePageCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Page) => void; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetFlowValidationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Pages|deletePage}. - * @param error Error, if any - * @param [response] Empty + * Decodes a GetFlowValidationResultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetFlowValidationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type DeletePageCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - } + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest; - /** Properties of a Page. */ - interface IPage { + /** + * Decodes a GetFlowValidationResultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetFlowValidationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest; - /** Page name */ - name?: (string|null); + /** + * Verifies a GetFlowValidationResultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Page displayName */ - displayName?: (string|null); + /** + * Creates a GetFlowValidationResultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetFlowValidationResultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest; - /** Page entryFulfillment */ - entryFulfillment?: (google.cloud.dialogflow.cx.v3.IFulfillment|null); + /** + * Creates a plain object from a GetFlowValidationResultRequest message. Also converts values to other types if specified. + * @param message GetFlowValidationResultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Page form */ - form?: (google.cloud.dialogflow.cx.v3.IForm|null); + /** + * Converts this GetFlowValidationResultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Page transitionRouteGroups */ - transitionRouteGroups?: (string[]|null); + /** + * Gets the default type url for GetFlowValidationResultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Page transitionRoutes */ - transitionRoutes?: (google.cloud.dialogflow.cx.v3.ITransitionRoute[]|null); + /** Properties of a FlowValidationResult. */ + interface IFlowValidationResult { - /** Page eventHandlers */ - eventHandlers?: (google.cloud.dialogflow.cx.v3.IEventHandler[]|null); + /** FlowValidationResult name */ + name?: (string|null); + + /** FlowValidationResult validationMessages */ + validationMessages?: (google.cloud.dialogflow.cx.v3.IValidationMessage[]|null); + + /** FlowValidationResult updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); } - /** Represents a Page. */ - class Page implements IPage { + /** Represents a FlowValidationResult. */ + class FlowValidationResult implements IFlowValidationResult { /** - * Constructs a new Page. + * Constructs a new FlowValidationResult. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IPage); + constructor(properties?: google.cloud.dialogflow.cx.v3.IFlowValidationResult); - /** Page name. */ + /** FlowValidationResult name. */ public name: string; - /** Page displayName. */ - public displayName: string; - - /** Page entryFulfillment. */ - public entryFulfillment?: (google.cloud.dialogflow.cx.v3.IFulfillment|null); - - /** Page form. */ - public form?: (google.cloud.dialogflow.cx.v3.IForm|null); - - /** Page transitionRouteGroups. */ - public transitionRouteGroups: string[]; - - /** Page transitionRoutes. */ - public transitionRoutes: google.cloud.dialogflow.cx.v3.ITransitionRoute[]; + /** FlowValidationResult validationMessages. */ + public validationMessages: google.cloud.dialogflow.cx.v3.IValidationMessage[]; - /** Page eventHandlers. */ - public eventHandlers: google.cloud.dialogflow.cx.v3.IEventHandler[]; + /** FlowValidationResult updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new Page instance using the specified properties. + * Creates a new FlowValidationResult instance using the specified properties. * @param [properties] Properties to set - * @returns Page instance + * @returns FlowValidationResult instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IPage): google.cloud.dialogflow.cx.v3.Page; + public static create(properties?: google.cloud.dialogflow.cx.v3.IFlowValidationResult): google.cloud.dialogflow.cx.v3.FlowValidationResult; /** - * Encodes the specified Page message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Page.verify|verify} messages. - * @param message Page message or plain object to encode + * Encodes the specified FlowValidationResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FlowValidationResult.verify|verify} messages. + * @param message FlowValidationResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IPage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IFlowValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Page message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Page.verify|verify} messages. - * @param message Page message or plain object to encode + * Encodes the specified FlowValidationResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FlowValidationResult.verify|verify} messages. + * @param message FlowValidationResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IPage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IFlowValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Page message from the specified reader or buffer. + * Decodes a FlowValidationResult message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Page + * @returns FlowValidationResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Page; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.FlowValidationResult; /** - * Decodes a Page message from the specified reader or buffer, length delimited. + * Decodes a FlowValidationResult message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Page + * @returns FlowValidationResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Page; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.FlowValidationResult; /** - * Verifies a Page message. + * Verifies a FlowValidationResult message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Page message from a plain object. Also converts values to their respective internal types. + * Creates a FlowValidationResult message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Page + * @returns FlowValidationResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Page; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.FlowValidationResult; /** - * Creates a plain object from a Page message. Also converts values to other types if specified. - * @param message Page + * Creates a plain object from a FlowValidationResult message. Also converts values to other types if specified. + * @param message FlowValidationResult * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.Page, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.FlowValidationResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Page to JSON. + * Converts this FlowValidationResult to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Page + * Gets the default type url for FlowValidationResult * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Form. */ - interface IForm { + /** Properties of an ImportFlowRequest. */ + interface IImportFlowRequest { - /** Form parameters */ - parameters?: (google.cloud.dialogflow.cx.v3.Form.IParameter[]|null); + /** ImportFlowRequest parent */ + parent?: (string|null); + + /** ImportFlowRequest flowUri */ + flowUri?: (string|null); + + /** ImportFlowRequest flowContent */ + flowContent?: (Uint8Array|string|null); + + /** ImportFlowRequest importOption */ + importOption?: (google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption|keyof typeof google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption|null); } - /** Represents a Form. */ - class Form implements IForm { + /** Represents an ImportFlowRequest. */ + class ImportFlowRequest implements IImportFlowRequest { /** - * Constructs a new Form. + * Constructs a new ImportFlowRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IForm); + constructor(properties?: google.cloud.dialogflow.cx.v3.IImportFlowRequest); - /** Form parameters. */ - public parameters: google.cloud.dialogflow.cx.v3.Form.IParameter[]; + /** ImportFlowRequest parent. */ + public parent: string; + + /** ImportFlowRequest flowUri. */ + public flowUri?: (string|null); + + /** ImportFlowRequest flowContent. */ + public flowContent?: (Uint8Array|string|null); + + /** ImportFlowRequest importOption. */ + public importOption: (google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption|keyof typeof google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption); + + /** ImportFlowRequest flow. */ + public flow?: ("flowUri"|"flowContent"); /** - * Creates a new Form instance using the specified properties. + * Creates a new ImportFlowRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Form instance + * @returns ImportFlowRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IForm): google.cloud.dialogflow.cx.v3.Form; + public static create(properties?: google.cloud.dialogflow.cx.v3.IImportFlowRequest): google.cloud.dialogflow.cx.v3.ImportFlowRequest; /** - * Encodes the specified Form message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Form.verify|verify} messages. - * @param message Form message or plain object to encode + * Encodes the specified ImportFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportFlowRequest.verify|verify} messages. + * @param message ImportFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IForm, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IImportFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Form message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Form.verify|verify} messages. - * @param message Form message or plain object to encode + * Encodes the specified ImportFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportFlowRequest.verify|verify} messages. + * @param message ImportFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IForm, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IImportFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Form message from the specified reader or buffer. + * Decodes an ImportFlowRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Form + * @returns ImportFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Form; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ImportFlowRequest; /** - * Decodes a Form message from the specified reader or buffer, length delimited. + * Decodes an ImportFlowRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Form + * @returns ImportFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Form; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ImportFlowRequest; /** - * Verifies a Form message. + * Verifies an ImportFlowRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Form message from a plain object. Also converts values to their respective internal types. + * Creates an ImportFlowRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Form + * @returns ImportFlowRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Form; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ImportFlowRequest; /** - * Creates a plain object from a Form message. Also converts values to other types if specified. - * @param message Form + * Creates a plain object from an ImportFlowRequest message. Also converts values to other types if specified. + * @param message ImportFlowRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.Form, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ImportFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Form to JSON. + * Converts this ImportFlowRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Form + * Gets the default type url for ImportFlowRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Form { - - /** Properties of a Parameter. */ - interface IParameter { - - /** Parameter displayName */ - displayName?: (string|null); - - /** Parameter required */ - required?: (boolean|null); + namespace ImportFlowRequest { - /** Parameter entityType */ - entityType?: (string|null); + /** ImportOption enum. */ + enum ImportOption { + IMPORT_OPTION_UNSPECIFIED = 0, + KEEP = 1, + FALLBACK = 2 + } + } - /** Parameter isList */ - isList?: (boolean|null); + /** Properties of an ImportFlowResponse. */ + interface IImportFlowResponse { - /** Parameter fillBehavior */ - fillBehavior?: (google.cloud.dialogflow.cx.v3.Form.Parameter.IFillBehavior|null); + /** ImportFlowResponse flow */ + flow?: (string|null); + } - /** Parameter defaultValue */ - defaultValue?: (google.protobuf.IValue|null); + /** Represents an ImportFlowResponse. */ + class ImportFlowResponse implements IImportFlowResponse { - /** Parameter redact */ - redact?: (boolean|null); - } + /** + * Constructs a new ImportFlowResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IImportFlowResponse); - /** Represents a Parameter. */ - class Parameter implements IParameter { + /** ImportFlowResponse flow. */ + public flow: string; - /** - * Constructs a new Parameter. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.Form.IParameter); + /** + * Creates a new ImportFlowResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportFlowResponse instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IImportFlowResponse): google.cloud.dialogflow.cx.v3.ImportFlowResponse; - /** Parameter displayName. */ - public displayName: string; + /** + * Encodes the specified ImportFlowResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportFlowResponse.verify|verify} messages. + * @param message ImportFlowResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IImportFlowResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** Parameter required. */ - public required: boolean; + /** + * Encodes the specified ImportFlowResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportFlowResponse.verify|verify} messages. + * @param message ImportFlowResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IImportFlowResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** Parameter entityType. */ - public entityType: string; + /** + * Decodes an ImportFlowResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportFlowResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ImportFlowResponse; - /** Parameter isList. */ - public isList: boolean; + /** + * Decodes an ImportFlowResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportFlowResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ImportFlowResponse; - /** Parameter fillBehavior. */ - public fillBehavior?: (google.cloud.dialogflow.cx.v3.Form.Parameter.IFillBehavior|null); + /** + * Verifies an ImportFlowResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Parameter defaultValue. */ - public defaultValue?: (google.protobuf.IValue|null); + /** + * Creates an ImportFlowResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportFlowResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ImportFlowResponse; - /** Parameter redact. */ - public redact: boolean; + /** + * Creates a plain object from an ImportFlowResponse message. Also converts values to other types if specified. + * @param message ImportFlowResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.ImportFlowResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a new Parameter instance using the specified properties. - * @param [properties] Properties to set - * @returns Parameter instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.Form.IParameter): google.cloud.dialogflow.cx.v3.Form.Parameter; + /** + * Converts this ImportFlowResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Form.Parameter.verify|verify} messages. - * @param message Parameter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.Form.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Gets the default type url for ImportFlowResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Form.Parameter.verify|verify} messages. - * @param message Parameter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Form.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of an ExportFlowRequest. */ + interface IExportFlowRequest { - /** - * Decodes a Parameter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Parameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Form.Parameter; + /** ExportFlowRequest name */ + name?: (string|null); - /** - * Decodes a Parameter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Parameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Form.Parameter; + /** ExportFlowRequest flowUri */ + flowUri?: (string|null); - /** - * Verifies a Parameter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ExportFlowRequest includeReferencedFlows */ + includeReferencedFlows?: (boolean|null); + } - /** - * Creates a Parameter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Parameter - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Form.Parameter; + /** Represents an ExportFlowRequest. */ + class ExportFlowRequest implements IExportFlowRequest { - /** - * Creates a plain object from a Parameter message. Also converts values to other types if specified. - * @param message Parameter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.Form.Parameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new ExportFlowRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IExportFlowRequest); - /** - * Converts this Parameter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** ExportFlowRequest name. */ + public name: string; - /** - * Gets the default type url for Parameter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** ExportFlowRequest flowUri. */ + public flowUri: string; - namespace Parameter { + /** ExportFlowRequest includeReferencedFlows. */ + public includeReferencedFlows: boolean; - /** Properties of a FillBehavior. */ - interface IFillBehavior { + /** + * Creates a new ExportFlowRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportFlowRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IExportFlowRequest): google.cloud.dialogflow.cx.v3.ExportFlowRequest; - /** FillBehavior initialPromptFulfillment */ - initialPromptFulfillment?: (google.cloud.dialogflow.cx.v3.IFulfillment|null); + /** + * Encodes the specified ExportFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportFlowRequest.verify|verify} messages. + * @param message ExportFlowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IExportFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** FillBehavior repromptEventHandlers */ - repromptEventHandlers?: (google.cloud.dialogflow.cx.v3.IEventHandler[]|null); - } + /** + * Encodes the specified ExportFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportFlowRequest.verify|verify} messages. + * @param message ExportFlowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IExportFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a FillBehavior. */ - class FillBehavior implements IFillBehavior { - - /** - * Constructs a new FillBehavior. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.Form.Parameter.IFillBehavior); - - /** FillBehavior initialPromptFulfillment. */ - public initialPromptFulfillment?: (google.cloud.dialogflow.cx.v3.IFulfillment|null); - - /** FillBehavior repromptEventHandlers. */ - public repromptEventHandlers: google.cloud.dialogflow.cx.v3.IEventHandler[]; - - /** - * Creates a new FillBehavior instance using the specified properties. - * @param [properties] Properties to set - * @returns FillBehavior instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.Form.Parameter.IFillBehavior): google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior; - - /** - * Encodes the specified FillBehavior message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior.verify|verify} messages. - * @param message FillBehavior message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.Form.Parameter.IFillBehavior, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FillBehavior message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior.verify|verify} messages. - * @param message FillBehavior message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Form.Parameter.IFillBehavior, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FillBehavior message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FillBehavior - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior; + /** + * Decodes an ExportFlowRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ExportFlowRequest; - /** - * Decodes a FillBehavior message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FillBehavior - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior; + /** + * Decodes an ExportFlowRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ExportFlowRequest; - /** - * Verifies a FillBehavior message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies an ExportFlowRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a FillBehavior message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FillBehavior - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior; + /** + * Creates an ExportFlowRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportFlowRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ExportFlowRequest; - /** - * Creates a plain object from a FillBehavior message. Also converts values to other types if specified. - * @param message FillBehavior - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from an ExportFlowRequest message. Also converts values to other types if specified. + * @param message ExportFlowRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.ExportFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this FillBehavior to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this ExportFlowRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for FillBehavior - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** + * Gets the default type url for ExportFlowRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an EventHandler. */ - interface IEventHandler { - - /** EventHandler name */ - name?: (string|null); - - /** EventHandler event */ - event?: (string|null); - - /** EventHandler triggerFulfillment */ - triggerFulfillment?: (google.cloud.dialogflow.cx.v3.IFulfillment|null); + /** Properties of an ExportFlowResponse. */ + interface IExportFlowResponse { - /** EventHandler targetPage */ - targetPage?: (string|null); + /** ExportFlowResponse flowUri */ + flowUri?: (string|null); - /** EventHandler targetFlow */ - targetFlow?: (string|null); + /** ExportFlowResponse flowContent */ + flowContent?: (Uint8Array|string|null); } - /** Represents an EventHandler. */ - class EventHandler implements IEventHandler { + /** Represents an ExportFlowResponse. */ + class ExportFlowResponse implements IExportFlowResponse { /** - * Constructs a new EventHandler. + * Constructs a new ExportFlowResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IEventHandler); - - /** EventHandler name. */ - public name: string; - - /** EventHandler event. */ - public event: string; - - /** EventHandler triggerFulfillment. */ - public triggerFulfillment?: (google.cloud.dialogflow.cx.v3.IFulfillment|null); + constructor(properties?: google.cloud.dialogflow.cx.v3.IExportFlowResponse); - /** EventHandler targetPage. */ - public targetPage?: (string|null); + /** ExportFlowResponse flowUri. */ + public flowUri?: (string|null); - /** EventHandler targetFlow. */ - public targetFlow?: (string|null); + /** ExportFlowResponse flowContent. */ + public flowContent?: (Uint8Array|string|null); - /** EventHandler target. */ - public target?: ("targetPage"|"targetFlow"); + /** ExportFlowResponse flow. */ + public flow?: ("flowUri"|"flowContent"); /** - * Creates a new EventHandler instance using the specified properties. + * Creates a new ExportFlowResponse instance using the specified properties. * @param [properties] Properties to set - * @returns EventHandler instance + * @returns ExportFlowResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IEventHandler): google.cloud.dialogflow.cx.v3.EventHandler; + public static create(properties?: google.cloud.dialogflow.cx.v3.IExportFlowResponse): google.cloud.dialogflow.cx.v3.ExportFlowResponse; /** - * Encodes the specified EventHandler message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EventHandler.verify|verify} messages. - * @param message EventHandler message or plain object to encode + * Encodes the specified ExportFlowResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportFlowResponse.verify|verify} messages. + * @param message ExportFlowResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IEventHandler, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IExportFlowResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EventHandler message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EventHandler.verify|verify} messages. - * @param message EventHandler message or plain object to encode + * Encodes the specified ExportFlowResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportFlowResponse.verify|verify} messages. + * @param message ExportFlowResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IEventHandler, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IExportFlowResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EventHandler message from the specified reader or buffer. + * Decodes an ExportFlowResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EventHandler + * @returns ExportFlowResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.EventHandler; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ExportFlowResponse; /** - * Decodes an EventHandler message from the specified reader or buffer, length delimited. + * Decodes an ExportFlowResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EventHandler + * @returns ExportFlowResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.EventHandler; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ExportFlowResponse; /** - * Verifies an EventHandler message. + * Verifies an ExportFlowResponse message. * @param message Plain 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 EventHandler message from a plain object. Also converts values to their respective internal types. + * Creates an ExportFlowResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EventHandler + * @returns ExportFlowResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.EventHandler; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ExportFlowResponse; /** - * Creates a plain object from an EventHandler message. Also converts values to other types if specified. - * @param message EventHandler + * Creates a plain object from an ExportFlowResponse message. Also converts values to other types if specified. + * @param message ExportFlowResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.EventHandler, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ExportFlowResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EventHandler to JSON. + * Converts this ExportFlowResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EventHandler + * Gets the default type url for ExportFlowResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a TransitionRoute. */ - interface ITransitionRoute { - - /** TransitionRoute name */ - name?: (string|null); - - /** TransitionRoute intent */ - intent?: (string|null); - - /** TransitionRoute condition */ - condition?: (string|null); - - /** TransitionRoute triggerFulfillment */ - triggerFulfillment?: (google.cloud.dialogflow.cx.v3.IFulfillment|null); - - /** TransitionRoute targetPage */ - targetPage?: (string|null); - - /** TransitionRoute targetFlow */ - targetFlow?: (string|null); - } - - /** Represents a TransitionRoute. */ - class TransitionRoute implements ITransitionRoute { + /** Represents a Pages */ + class Pages extends $protobuf.rpc.Service { /** - * Constructs a new TransitionRoute. - * @param [properties] Properties to set + * Constructs a new Pages service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ITransitionRoute); - - /** TransitionRoute name. */ - public name: string; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** TransitionRoute intent. */ - public intent: string; + /** + * Creates new Pages 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): Pages; - /** TransitionRoute condition. */ - public condition: string; + /** + * Calls ListPages. + * @param request ListPagesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPagesResponse + */ + public listPages(request: google.cloud.dialogflow.cx.v3.IListPagesRequest, callback: google.cloud.dialogflow.cx.v3.Pages.ListPagesCallback): void; - /** TransitionRoute triggerFulfillment. */ - public triggerFulfillment?: (google.cloud.dialogflow.cx.v3.IFulfillment|null); + /** + * Calls ListPages. + * @param request ListPagesRequest message or plain object + * @returns Promise + */ + public listPages(request: google.cloud.dialogflow.cx.v3.IListPagesRequest): Promise; - /** TransitionRoute targetPage. */ - public targetPage?: (string|null); + /** + * Calls GetPage. + * @param request GetPageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Page + */ + public getPage(request: google.cloud.dialogflow.cx.v3.IGetPageRequest, callback: google.cloud.dialogflow.cx.v3.Pages.GetPageCallback): void; - /** TransitionRoute targetFlow. */ - public targetFlow?: (string|null); + /** + * Calls GetPage. + * @param request GetPageRequest message or plain object + * @returns Promise + */ + public getPage(request: google.cloud.dialogflow.cx.v3.IGetPageRequest): Promise; - /** TransitionRoute target. */ - public target?: ("targetPage"|"targetFlow"); + /** + * Calls CreatePage. + * @param request CreatePageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Page + */ + public createPage(request: google.cloud.dialogflow.cx.v3.ICreatePageRequest, callback: google.cloud.dialogflow.cx.v3.Pages.CreatePageCallback): void; /** - * Creates a new TransitionRoute instance using the specified properties. - * @param [properties] Properties to set - * @returns TransitionRoute instance + * Calls CreatePage. + * @param request CreatePageRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ITransitionRoute): google.cloud.dialogflow.cx.v3.TransitionRoute; + public createPage(request: google.cloud.dialogflow.cx.v3.ICreatePageRequest): Promise; /** - * Encodes the specified TransitionRoute message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRoute.verify|verify} messages. - * @param message TransitionRoute message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls UpdatePage. + * @param request UpdatePageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Page */ - public static encode(message: google.cloud.dialogflow.cx.v3.ITransitionRoute, writer?: $protobuf.Writer): $protobuf.Writer; + public updatePage(request: google.cloud.dialogflow.cx.v3.IUpdatePageRequest, callback: google.cloud.dialogflow.cx.v3.Pages.UpdatePageCallback): void; /** - * Encodes the specified TransitionRoute message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRoute.verify|verify} messages. - * @param message TransitionRoute message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls UpdatePage. + * @param request UpdatePageRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ITransitionRoute, writer?: $protobuf.Writer): $protobuf.Writer; + public updatePage(request: google.cloud.dialogflow.cx.v3.IUpdatePageRequest): Promise; /** - * Decodes a TransitionRoute message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TransitionRoute - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeletePage. + * @param request DeletePageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.TransitionRoute; + public deletePage(request: google.cloud.dialogflow.cx.v3.IDeletePageRequest, callback: google.cloud.dialogflow.cx.v3.Pages.DeletePageCallback): void; /** - * Decodes a TransitionRoute message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TransitionRoute - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeletePage. + * @param request DeletePageRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.TransitionRoute; + public deletePage(request: google.cloud.dialogflow.cx.v3.IDeletePageRequest): Promise; + } + + namespace Pages { /** - * Verifies a TransitionRoute message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Pages|listPages}. + * @param error Error, if any + * @param [response] ListPagesResponse */ - public static verify(message: { [k: string]: any }): (string|null); + type ListPagesCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListPagesResponse) => void; /** - * Creates a TransitionRoute message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TransitionRoute + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Pages|getPage}. + * @param error Error, if any + * @param [response] Page */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.TransitionRoute; + type GetPageCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Page) => void; /** - * Creates a plain object from a TransitionRoute message. Also converts values to other types if specified. - * @param message TransitionRoute - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Pages|createPage}. + * @param error Error, if any + * @param [response] Page */ - public static toObject(message: google.cloud.dialogflow.cx.v3.TransitionRoute, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type CreatePageCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Page) => void; /** - * Converts this TransitionRoute to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Pages|updatePage}. + * @param error Error, if any + * @param [response] Page */ - public toJSON(): { [k: string]: any }; + type UpdatePageCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Page) => void; /** - * Gets the default type url for TransitionRoute - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Pages|deletePage}. + * @param error Error, if any + * @param [response] Empty */ - public static getTypeUrl(typeUrlPrefix?: string): string; + type DeletePageCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; } - /** Properties of a ListPagesRequest. */ - interface IListPagesRequest { + /** Properties of a Page. */ + interface IPage { - /** ListPagesRequest parent */ - parent?: (string|null); + /** Page name */ + name?: (string|null); - /** ListPagesRequest languageCode */ - languageCode?: (string|null); + /** Page displayName */ + displayName?: (string|null); - /** ListPagesRequest pageSize */ - pageSize?: (number|null); + /** Page entryFulfillment */ + entryFulfillment?: (google.cloud.dialogflow.cx.v3.IFulfillment|null); - /** ListPagesRequest pageToken */ - pageToken?: (string|null); + /** Page form */ + form?: (google.cloud.dialogflow.cx.v3.IForm|null); + + /** Page transitionRouteGroups */ + transitionRouteGroups?: (string[]|null); + + /** Page transitionRoutes */ + transitionRoutes?: (google.cloud.dialogflow.cx.v3.ITransitionRoute[]|null); + + /** Page eventHandlers */ + eventHandlers?: (google.cloud.dialogflow.cx.v3.IEventHandler[]|null); } - /** Represents a ListPagesRequest. */ - class ListPagesRequest implements IListPagesRequest { + /** Represents a Page. */ + class Page implements IPage { /** - * Constructs a new ListPagesRequest. + * Constructs a new Page. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListPagesRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IPage); - /** ListPagesRequest parent. */ - public parent: string; + /** Page name. */ + public name: string; - /** ListPagesRequest languageCode. */ - public languageCode: string; + /** Page displayName. */ + public displayName: string; - /** ListPagesRequest pageSize. */ - public pageSize: number; + /** Page entryFulfillment. */ + public entryFulfillment?: (google.cloud.dialogflow.cx.v3.IFulfillment|null); - /** ListPagesRequest pageToken. */ - public pageToken: string; + /** Page form. */ + public form?: (google.cloud.dialogflow.cx.v3.IForm|null); + + /** Page transitionRouteGroups. */ + public transitionRouteGroups: string[]; + + /** Page transitionRoutes. */ + public transitionRoutes: google.cloud.dialogflow.cx.v3.ITransitionRoute[]; + + /** Page eventHandlers. */ + public eventHandlers: google.cloud.dialogflow.cx.v3.IEventHandler[]; /** - * Creates a new ListPagesRequest instance using the specified properties. + * Creates a new Page instance using the specified properties. * @param [properties] Properties to set - * @returns ListPagesRequest instance + * @returns Page instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListPagesRequest): google.cloud.dialogflow.cx.v3.ListPagesRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IPage): google.cloud.dialogflow.cx.v3.Page; /** - * Encodes the specified ListPagesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPagesRequest.verify|verify} messages. - * @param message ListPagesRequest message or plain object to encode + * Encodes the specified Page message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Page.verify|verify} messages. + * @param message Page message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListPagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IPage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListPagesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPagesRequest.verify|verify} messages. - * @param message ListPagesRequest message or plain object to encode + * Encodes the specified Page message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Page.verify|verify} messages. + * @param message Page message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListPagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IPage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListPagesRequest message from the specified reader or buffer. + * Decodes a Page message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListPagesRequest + * @returns Page * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListPagesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Page; /** - * Decodes a ListPagesRequest message from the specified reader or buffer, length delimited. + * Decodes a Page message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListPagesRequest + * @returns Page * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListPagesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Page; /** - * Verifies a ListPagesRequest message. + * Verifies a Page message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListPagesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Page message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListPagesRequest + * @returns Page */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListPagesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Page; /** - * Creates a plain object from a ListPagesRequest message. Also converts values to other types if specified. - * @param message ListPagesRequest - * @param [options] Conversion options + * Creates a plain object from a Page message. Also converts values to other types if specified. + * @param message Page + * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListPagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.Page, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListPagesRequest to JSON. + * Converts this Page to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListPagesRequest + * Gets the default type url for Page * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListPagesResponse. */ - interface IListPagesResponse { - - /** ListPagesResponse pages */ - pages?: (google.cloud.dialogflow.cx.v3.IPage[]|null); + /** Properties of a Form. */ + interface IForm { - /** ListPagesResponse nextPageToken */ - nextPageToken?: (string|null); + /** Form parameters */ + parameters?: (google.cloud.dialogflow.cx.v3.Form.IParameter[]|null); } - /** Represents a ListPagesResponse. */ - class ListPagesResponse implements IListPagesResponse { + /** Represents a Form. */ + class Form implements IForm { /** - * Constructs a new ListPagesResponse. + * Constructs a new Form. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListPagesResponse); - - /** ListPagesResponse pages. */ - public pages: google.cloud.dialogflow.cx.v3.IPage[]; + constructor(properties?: google.cloud.dialogflow.cx.v3.IForm); - /** ListPagesResponse nextPageToken. */ - public nextPageToken: string; + /** Form parameters. */ + public parameters: google.cloud.dialogflow.cx.v3.Form.IParameter[]; /** - * Creates a new ListPagesResponse instance using the specified properties. + * Creates a new Form instance using the specified properties. * @param [properties] Properties to set - * @returns ListPagesResponse instance + * @returns Form instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListPagesResponse): google.cloud.dialogflow.cx.v3.ListPagesResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3.IForm): google.cloud.dialogflow.cx.v3.Form; /** - * Encodes the specified ListPagesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPagesResponse.verify|verify} messages. - * @param message ListPagesResponse message or plain object to encode + * Encodes the specified Form message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Form.verify|verify} messages. + * @param message Form message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListPagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IForm, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListPagesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPagesResponse.verify|verify} messages. - * @param message ListPagesResponse message or plain object to encode + * Encodes the specified Form message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Form.verify|verify} messages. + * @param message Form message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListPagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IForm, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListPagesResponse message from the specified reader or buffer. + * Decodes a Form message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListPagesResponse + * @returns Form * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListPagesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Form; /** - * Decodes a ListPagesResponse message from the specified reader or buffer, length delimited. + * Decodes a Form message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListPagesResponse + * @returns Form * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListPagesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Form; /** - * Verifies a ListPagesResponse message. + * Verifies a Form message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListPagesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Form message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListPagesResponse + * @returns Form */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListPagesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Form; /** - * Creates a plain object from a ListPagesResponse message. Also converts values to other types if specified. - * @param message ListPagesResponse + * Creates a plain object from a Form message. Also converts values to other types if specified. + * @param message Form * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListPagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.Form, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListPagesResponse to JSON. + * Converts this Form to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListPagesResponse + * Gets the default type url for Form * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetPageRequest. */ - interface IGetPageRequest { + namespace Form { - /** GetPageRequest name */ + /** Properties of a Parameter. */ + interface IParameter { + + /** Parameter displayName */ + displayName?: (string|null); + + /** Parameter required */ + required?: (boolean|null); + + /** Parameter entityType */ + entityType?: (string|null); + + /** Parameter isList */ + isList?: (boolean|null); + + /** Parameter fillBehavior */ + fillBehavior?: (google.cloud.dialogflow.cx.v3.Form.Parameter.IFillBehavior|null); + + /** Parameter defaultValue */ + defaultValue?: (google.protobuf.IValue|null); + + /** Parameter redact */ + redact?: (boolean|null); + } + + /** Represents a Parameter. */ + class Parameter implements IParameter { + + /** + * Constructs a new Parameter. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Form.IParameter); + + /** Parameter displayName. */ + public displayName: string; + + /** Parameter required. */ + public required: boolean; + + /** Parameter entityType. */ + public entityType: string; + + /** Parameter isList. */ + public isList: boolean; + + /** Parameter fillBehavior. */ + public fillBehavior?: (google.cloud.dialogflow.cx.v3.Form.Parameter.IFillBehavior|null); + + /** Parameter defaultValue. */ + public defaultValue?: (google.protobuf.IValue|null); + + /** Parameter redact. */ + public redact: boolean; + + /** + * Creates a new Parameter instance using the specified properties. + * @param [properties] Properties to set + * @returns Parameter instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Form.IParameter): google.cloud.dialogflow.cx.v3.Form.Parameter; + + /** + * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Form.Parameter.verify|verify} messages. + * @param message Parameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Form.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Form.Parameter.verify|verify} messages. + * @param message Parameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Form.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Parameter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Parameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Form.Parameter; + + /** + * Decodes a Parameter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Parameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Form.Parameter; + + /** + * Verifies a Parameter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Parameter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Parameter + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Form.Parameter; + + /** + * Creates a plain object from a Parameter message. Also converts values to other types if specified. + * @param message Parameter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Form.Parameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Parameter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Parameter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Parameter { + + /** Properties of a FillBehavior. */ + interface IFillBehavior { + + /** FillBehavior initialPromptFulfillment */ + initialPromptFulfillment?: (google.cloud.dialogflow.cx.v3.IFulfillment|null); + + /** FillBehavior repromptEventHandlers */ + repromptEventHandlers?: (google.cloud.dialogflow.cx.v3.IEventHandler[]|null); + } + + /** Represents a FillBehavior. */ + class FillBehavior implements IFillBehavior { + + /** + * Constructs a new FillBehavior. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Form.Parameter.IFillBehavior); + + /** FillBehavior initialPromptFulfillment. */ + public initialPromptFulfillment?: (google.cloud.dialogflow.cx.v3.IFulfillment|null); + + /** FillBehavior repromptEventHandlers. */ + public repromptEventHandlers: google.cloud.dialogflow.cx.v3.IEventHandler[]; + + /** + * Creates a new FillBehavior instance using the specified properties. + * @param [properties] Properties to set + * @returns FillBehavior instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Form.Parameter.IFillBehavior): google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior; + + /** + * Encodes the specified FillBehavior message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior.verify|verify} messages. + * @param message FillBehavior message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Form.Parameter.IFillBehavior, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FillBehavior message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior.verify|verify} messages. + * @param message FillBehavior message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Form.Parameter.IFillBehavior, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FillBehavior message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FillBehavior + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior; + + /** + * Decodes a FillBehavior message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FillBehavior + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior; + + /** + * Verifies a FillBehavior message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FillBehavior message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FillBehavior + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior; + + /** + * Creates a plain object from a FillBehavior message. Also converts values to other types if specified. + * @param message FillBehavior + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FillBehavior to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FillBehavior + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of an EventHandler. */ + interface IEventHandler { + + /** EventHandler name */ name?: (string|null); - /** GetPageRequest languageCode */ - languageCode?: (string|null); + /** EventHandler event */ + event?: (string|null); + + /** EventHandler triggerFulfillment */ + triggerFulfillment?: (google.cloud.dialogflow.cx.v3.IFulfillment|null); + + /** EventHandler targetPage */ + targetPage?: (string|null); + + /** EventHandler targetFlow */ + targetFlow?: (string|null); } - /** Represents a GetPageRequest. */ - class GetPageRequest implements IGetPageRequest { + /** Represents an EventHandler. */ + class EventHandler implements IEventHandler { /** - * Constructs a new GetPageRequest. + * Constructs a new EventHandler. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IGetPageRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IEventHandler); - /** GetPageRequest name. */ + /** EventHandler name. */ public name: string; - /** GetPageRequest languageCode. */ - public languageCode: string; + /** EventHandler event. */ + public event: string; + + /** EventHandler triggerFulfillment. */ + public triggerFulfillment?: (google.cloud.dialogflow.cx.v3.IFulfillment|null); + + /** EventHandler targetPage. */ + public targetPage?: (string|null); + + /** EventHandler targetFlow. */ + public targetFlow?: (string|null); + + /** EventHandler target. */ + public target?: ("targetPage"|"targetFlow"); /** - * Creates a new GetPageRequest instance using the specified properties. + * Creates a new EventHandler instance using the specified properties. * @param [properties] Properties to set - * @returns GetPageRequest instance + * @returns EventHandler instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IGetPageRequest): google.cloud.dialogflow.cx.v3.GetPageRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IEventHandler): google.cloud.dialogflow.cx.v3.EventHandler; /** - * Encodes the specified GetPageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetPageRequest.verify|verify} messages. - * @param message GetPageRequest message or plain object to encode + * Encodes the specified EventHandler message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EventHandler.verify|verify} messages. + * @param message EventHandler message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IGetPageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IEventHandler, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetPageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetPageRequest.verify|verify} messages. - * @param message GetPageRequest message or plain object to encode + * Encodes the specified EventHandler message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EventHandler.verify|verify} messages. + * @param message EventHandler message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetPageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IEventHandler, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetPageRequest message from the specified reader or buffer. + * Decodes an EventHandler message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetPageRequest + * @returns EventHandler * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetPageRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.EventHandler; /** - * Decodes a GetPageRequest message from the specified reader or buffer, length delimited. + * Decodes an EventHandler message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetPageRequest + * @returns EventHandler * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetPageRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.EventHandler; /** - * Verifies a GetPageRequest message. + * Verifies an EventHandler message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetPageRequest message from a plain object. Also converts values to their respective internal types. + * Creates an EventHandler message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetPageRequest + * @returns EventHandler */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetPageRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.EventHandler; /** - * Creates a plain object from a GetPageRequest message. Also converts values to other types if specified. - * @param message GetPageRequest + * Creates a plain object from an EventHandler message. Also converts values to other types if specified. + * @param message EventHandler * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.GetPageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.EventHandler, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetPageRequest to JSON. + * Converts this EventHandler to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetPageRequest + * Gets the default type url for EventHandler * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreatePageRequest. */ - interface ICreatePageRequest { + /** Properties of a TransitionRoute. */ + interface ITransitionRoute { - /** CreatePageRequest parent */ - parent?: (string|null); + /** TransitionRoute name */ + name?: (string|null); - /** CreatePageRequest page */ - page?: (google.cloud.dialogflow.cx.v3.IPage|null); + /** TransitionRoute intent */ + intent?: (string|null); - /** CreatePageRequest languageCode */ - languageCode?: (string|null); + /** TransitionRoute condition */ + condition?: (string|null); + + /** TransitionRoute triggerFulfillment */ + triggerFulfillment?: (google.cloud.dialogflow.cx.v3.IFulfillment|null); + + /** TransitionRoute targetPage */ + targetPage?: (string|null); + + /** TransitionRoute targetFlow */ + targetFlow?: (string|null); } - /** Represents a CreatePageRequest. */ - class CreatePageRequest implements ICreatePageRequest { + /** Represents a TransitionRoute. */ + class TransitionRoute implements ITransitionRoute { /** - * Constructs a new CreatePageRequest. + * Constructs a new TransitionRoute. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ICreatePageRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.ITransitionRoute); - /** CreatePageRequest parent. */ - public parent: string; + /** TransitionRoute name. */ + public name: string; - /** CreatePageRequest page. */ - public page?: (google.cloud.dialogflow.cx.v3.IPage|null); + /** TransitionRoute intent. */ + public intent: string; - /** CreatePageRequest languageCode. */ - public languageCode: string; + /** TransitionRoute condition. */ + public condition: string; + + /** TransitionRoute triggerFulfillment. */ + public triggerFulfillment?: (google.cloud.dialogflow.cx.v3.IFulfillment|null); + + /** TransitionRoute targetPage. */ + public targetPage?: (string|null); + + /** TransitionRoute targetFlow. */ + public targetFlow?: (string|null); + + /** TransitionRoute target. */ + public target?: ("targetPage"|"targetFlow"); /** - * Creates a new CreatePageRequest instance using the specified properties. + * Creates a new TransitionRoute instance using the specified properties. * @param [properties] Properties to set - * @returns CreatePageRequest instance + * @returns TransitionRoute instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ICreatePageRequest): google.cloud.dialogflow.cx.v3.CreatePageRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.ITransitionRoute): google.cloud.dialogflow.cx.v3.TransitionRoute; /** - * Encodes the specified CreatePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreatePageRequest.verify|verify} messages. - * @param message CreatePageRequest message or plain object to encode + * Encodes the specified TransitionRoute message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRoute.verify|verify} messages. + * @param message TransitionRoute message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.ICreatePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ITransitionRoute, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreatePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreatePageRequest.verify|verify} messages. - * @param message CreatePageRequest message or plain object to encode + * Encodes the specified TransitionRoute message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRoute.verify|verify} messages. + * @param message TransitionRoute message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreatePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ITransitionRoute, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreatePageRequest message from the specified reader or buffer. + * Decodes a TransitionRoute message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreatePageRequest + * @returns TransitionRoute * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CreatePageRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.TransitionRoute; /** - * Decodes a CreatePageRequest message from the specified reader or buffer, length delimited. + * Decodes a TransitionRoute message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreatePageRequest + * @returns TransitionRoute * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.CreatePageRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.TransitionRoute; /** - * Verifies a CreatePageRequest message. + * Verifies a TransitionRoute message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreatePageRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TransitionRoute message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreatePageRequest + * @returns TransitionRoute */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreatePageRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.TransitionRoute; + + /** + * Creates a plain object from a TransitionRoute message. Also converts values to other types if specified. + * @param message TransitionRoute + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.TransitionRoute, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TransitionRoute to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TransitionRoute + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPagesRequest. */ + interface IListPagesRequest { + + /** ListPagesRequest parent */ + parent?: (string|null); + + /** ListPagesRequest languageCode */ + languageCode?: (string|null); + + /** ListPagesRequest pageSize */ + pageSize?: (number|null); + + /** ListPagesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListPagesRequest. */ + class ListPagesRequest implements IListPagesRequest { + + /** + * Constructs a new ListPagesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IListPagesRequest); + + /** ListPagesRequest parent. */ + public parent: string; + + /** ListPagesRequest languageCode. */ + public languageCode: string; + + /** ListPagesRequest pageSize. */ + public pageSize: number; + + /** ListPagesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListPagesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPagesRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IListPagesRequest): google.cloud.dialogflow.cx.v3.ListPagesRequest; + + /** + * Encodes the specified ListPagesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPagesRequest.verify|verify} messages. + * @param message ListPagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IListPagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPagesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPagesRequest.verify|verify} messages. + * @param message ListPagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListPagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPagesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListPagesRequest; + + /** + * Decodes a ListPagesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListPagesRequest; + + /** + * Verifies a ListPagesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPagesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPagesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListPagesRequest; + + /** + * Creates a plain object from a ListPagesRequest message. Also converts values to other types if specified. + * @param message ListPagesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.ListPagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPagesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPagesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPagesResponse. */ + interface IListPagesResponse { + + /** ListPagesResponse pages */ + pages?: (google.cloud.dialogflow.cx.v3.IPage[]|null); + + /** ListPagesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListPagesResponse. */ + class ListPagesResponse implements IListPagesResponse { + + /** + * Constructs a new ListPagesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IListPagesResponse); + + /** ListPagesResponse pages. */ + public pages: google.cloud.dialogflow.cx.v3.IPage[]; + + /** ListPagesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListPagesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPagesResponse instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IListPagesResponse): google.cloud.dialogflow.cx.v3.ListPagesResponse; + + /** + * Encodes the specified ListPagesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPagesResponse.verify|verify} messages. + * @param message ListPagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IListPagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPagesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPagesResponse.verify|verify} messages. + * @param message ListPagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListPagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPagesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListPagesResponse; + + /** + * Decodes a ListPagesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListPagesResponse; + + /** + * Verifies a ListPagesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPagesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPagesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListPagesResponse; + + /** + * Creates a plain object from a ListPagesResponse message. Also converts values to other types if specified. + * @param message ListPagesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.ListPagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPagesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPagesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetPageRequest. */ + interface IGetPageRequest { + + /** GetPageRequest name */ + name?: (string|null); + + /** GetPageRequest languageCode */ + languageCode?: (string|null); + } + + /** Represents a GetPageRequest. */ + class GetPageRequest implements IGetPageRequest { + + /** + * Constructs a new GetPageRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IGetPageRequest); + + /** GetPageRequest name. */ + public name: string; + + /** GetPageRequest languageCode. */ + public languageCode: string; + + /** + * Creates a new GetPageRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPageRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IGetPageRequest): google.cloud.dialogflow.cx.v3.GetPageRequest; + + /** + * Encodes the specified GetPageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetPageRequest.verify|verify} messages. + * @param message GetPageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IGetPageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetPageRequest.verify|verify} messages. + * @param message GetPageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetPageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPageRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetPageRequest; + + /** + * Decodes a GetPageRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetPageRequest; + + /** + * Verifies a GetPageRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPageRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPageRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetPageRequest; + + /** + * Creates a plain object from a GetPageRequest message. Also converts values to other types if specified. + * @param message GetPageRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.GetPageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPageRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPageRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreatePageRequest. */ + interface ICreatePageRequest { + + /** CreatePageRequest parent */ + parent?: (string|null); + + /** CreatePageRequest page */ + page?: (google.cloud.dialogflow.cx.v3.IPage|null); + + /** CreatePageRequest languageCode */ + languageCode?: (string|null); + } + + /** Represents a CreatePageRequest. */ + class CreatePageRequest implements ICreatePageRequest { + + /** + * Constructs a new CreatePageRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.ICreatePageRequest); + + /** CreatePageRequest parent. */ + public parent: string; + + /** CreatePageRequest page. */ + public page?: (google.cloud.dialogflow.cx.v3.IPage|null); + + /** CreatePageRequest languageCode. */ + public languageCode: string; + + /** + * Creates a new CreatePageRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreatePageRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.ICreatePageRequest): google.cloud.dialogflow.cx.v3.CreatePageRequest; + + /** + * Encodes the specified CreatePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreatePageRequest.verify|verify} messages. + * @param message CreatePageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.ICreatePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreatePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreatePageRequest.verify|verify} messages. + * @param message CreatePageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreatePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreatePageRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreatePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CreatePageRequest; + + /** + * Decodes a CreatePageRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreatePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.CreatePageRequest; + + /** + * Verifies a CreatePageRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreatePageRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreatePageRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreatePageRequest; /** * Creates a plain object from a CreatePageRequest message. Also converts values to other types if specified. @@ -7351,2999 +8176,2380 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** AudioEncoding enum. */ - enum AudioEncoding { - AUDIO_ENCODING_UNSPECIFIED = 0, - AUDIO_ENCODING_LINEAR_16 = 1, - AUDIO_ENCODING_FLAC = 2, - AUDIO_ENCODING_MULAW = 3, - AUDIO_ENCODING_AMR = 4, - AUDIO_ENCODING_AMR_WB = 5, - AUDIO_ENCODING_OGG_OPUS = 6, - AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7 + /** Represents a Changelogs */ + class Changelogs extends $protobuf.rpc.Service { + + /** + * Constructs a new Changelogs 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 Changelogs 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): Changelogs; + + /** + * Calls ListChangelogs. + * @param request ListChangelogsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListChangelogsResponse + */ + public listChangelogs(request: google.cloud.dialogflow.cx.v3.IListChangelogsRequest, callback: google.cloud.dialogflow.cx.v3.Changelogs.ListChangelogsCallback): void; + + /** + * Calls ListChangelogs. + * @param request ListChangelogsRequest message or plain object + * @returns Promise + */ + public listChangelogs(request: google.cloud.dialogflow.cx.v3.IListChangelogsRequest): Promise; + + /** + * Calls GetChangelog. + * @param request GetChangelogRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Changelog + */ + public getChangelog(request: google.cloud.dialogflow.cx.v3.IGetChangelogRequest, callback: google.cloud.dialogflow.cx.v3.Changelogs.GetChangelogCallback): void; + + /** + * Calls GetChangelog. + * @param request GetChangelogRequest message or plain object + * @returns Promise + */ + public getChangelog(request: google.cloud.dialogflow.cx.v3.IGetChangelogRequest): Promise; } - /** SpeechModelVariant enum. */ - enum SpeechModelVariant { - SPEECH_MODEL_VARIANT_UNSPECIFIED = 0, - USE_BEST_AVAILABLE = 1, - USE_STANDARD = 2, - USE_ENHANCED = 3 + namespace Changelogs { + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Changelogs|listChangelogs}. + * @param error Error, if any + * @param [response] ListChangelogsResponse + */ + type ListChangelogsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListChangelogsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Changelogs|getChangelog}. + * @param error Error, if any + * @param [response] Changelog + */ + type GetChangelogCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Changelog) => void; } - /** Properties of a SpeechWordInfo. */ - interface ISpeechWordInfo { + /** Properties of a ListChangelogsRequest. */ + interface IListChangelogsRequest { - /** SpeechWordInfo word */ - word?: (string|null); + /** ListChangelogsRequest parent */ + parent?: (string|null); - /** SpeechWordInfo startOffset */ - startOffset?: (google.protobuf.IDuration|null); + /** ListChangelogsRequest filter */ + filter?: (string|null); - /** SpeechWordInfo endOffset */ - endOffset?: (google.protobuf.IDuration|null); + /** ListChangelogsRequest pageSize */ + pageSize?: (number|null); - /** SpeechWordInfo confidence */ - confidence?: (number|null); + /** ListChangelogsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a SpeechWordInfo. */ - class SpeechWordInfo implements ISpeechWordInfo { + /** Represents a ListChangelogsRequest. */ + class ListChangelogsRequest implements IListChangelogsRequest { /** - * Constructs a new SpeechWordInfo. + * Constructs a new ListChangelogsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ISpeechWordInfo); + constructor(properties?: google.cloud.dialogflow.cx.v3.IListChangelogsRequest); - /** SpeechWordInfo word. */ - public word: string; + /** ListChangelogsRequest parent. */ + public parent: string; - /** SpeechWordInfo startOffset. */ - public startOffset?: (google.protobuf.IDuration|null); + /** ListChangelogsRequest filter. */ + public filter: string; - /** SpeechWordInfo endOffset. */ - public endOffset?: (google.protobuf.IDuration|null); + /** ListChangelogsRequest pageSize. */ + public pageSize: number; - /** SpeechWordInfo confidence. */ - public confidence: number; + /** ListChangelogsRequest pageToken. */ + public pageToken: string; /** - * Creates a new SpeechWordInfo instance using the specified properties. + * Creates a new ListChangelogsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SpeechWordInfo instance + * @returns ListChangelogsRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ISpeechWordInfo): google.cloud.dialogflow.cx.v3.SpeechWordInfo; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListChangelogsRequest): google.cloud.dialogflow.cx.v3.ListChangelogsRequest; /** - * Encodes the specified SpeechWordInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SpeechWordInfo.verify|verify} messages. - * @param message SpeechWordInfo message or plain object to encode + * Encodes the specified ListChangelogsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsRequest.verify|verify} messages. + * @param message ListChangelogsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.ISpeechWordInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListChangelogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SpeechWordInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SpeechWordInfo.verify|verify} messages. - * @param message SpeechWordInfo message or plain object to encode + * Encodes the specified ListChangelogsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsRequest.verify|verify} messages. + * @param message ListChangelogsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ISpeechWordInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListChangelogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SpeechWordInfo message from the specified reader or buffer. + * Decodes a ListChangelogsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SpeechWordInfo + * @returns ListChangelogsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.SpeechWordInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListChangelogsRequest; /** - * Decodes a SpeechWordInfo message from the specified reader or buffer, length delimited. + * Decodes a ListChangelogsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SpeechWordInfo + * @returns ListChangelogsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.SpeechWordInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListChangelogsRequest; /** - * Verifies a SpeechWordInfo message. + * Verifies a ListChangelogsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SpeechWordInfo message from a plain object. Also converts values to their respective internal types. + * Creates a ListChangelogsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SpeechWordInfo + * @returns ListChangelogsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.SpeechWordInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListChangelogsRequest; /** - * Creates a plain object from a SpeechWordInfo message. Also converts values to other types if specified. - * @param message SpeechWordInfo + * Creates a plain object from a ListChangelogsRequest message. Also converts values to other types if specified. + * @param message ListChangelogsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.SpeechWordInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListChangelogsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SpeechWordInfo to JSON. + * Converts this ListChangelogsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SpeechWordInfo + * Gets the default type url for ListChangelogsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an InputAudioConfig. */ - interface IInputAudioConfig { - - /** InputAudioConfig audioEncoding */ - audioEncoding?: (google.cloud.dialogflow.cx.v3.AudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3.AudioEncoding|null); - - /** InputAudioConfig sampleRateHertz */ - sampleRateHertz?: (number|null); - - /** InputAudioConfig enableWordInfo */ - enableWordInfo?: (boolean|null); - - /** InputAudioConfig phraseHints */ - phraseHints?: (string[]|null); - - /** InputAudioConfig model */ - model?: (string|null); + /** Properties of a ListChangelogsResponse. */ + interface IListChangelogsResponse { - /** InputAudioConfig modelVariant */ - modelVariant?: (google.cloud.dialogflow.cx.v3.SpeechModelVariant|keyof typeof google.cloud.dialogflow.cx.v3.SpeechModelVariant|null); + /** ListChangelogsResponse changelogs */ + changelogs?: (google.cloud.dialogflow.cx.v3.IChangelog[]|null); - /** InputAudioConfig singleUtterance */ - singleUtterance?: (boolean|null); + /** ListChangelogsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an InputAudioConfig. */ - class InputAudioConfig implements IInputAudioConfig { + /** Represents a ListChangelogsResponse. */ + class ListChangelogsResponse implements IListChangelogsResponse { /** - * Constructs a new InputAudioConfig. + * Constructs a new ListChangelogsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IInputAudioConfig); - - /** InputAudioConfig audioEncoding. */ - public audioEncoding: (google.cloud.dialogflow.cx.v3.AudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3.AudioEncoding); - - /** InputAudioConfig sampleRateHertz. */ - public sampleRateHertz: number; - - /** InputAudioConfig enableWordInfo. */ - public enableWordInfo: boolean; - - /** InputAudioConfig phraseHints. */ - public phraseHints: string[]; - - /** InputAudioConfig model. */ - public model: string; + constructor(properties?: google.cloud.dialogflow.cx.v3.IListChangelogsResponse); - /** InputAudioConfig modelVariant. */ - public modelVariant: (google.cloud.dialogflow.cx.v3.SpeechModelVariant|keyof typeof google.cloud.dialogflow.cx.v3.SpeechModelVariant); + /** ListChangelogsResponse changelogs. */ + public changelogs: google.cloud.dialogflow.cx.v3.IChangelog[]; - /** InputAudioConfig singleUtterance. */ - public singleUtterance: boolean; + /** ListChangelogsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new InputAudioConfig instance using the specified properties. + * Creates a new ListChangelogsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns InputAudioConfig instance + * @returns ListChangelogsResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IInputAudioConfig): google.cloud.dialogflow.cx.v3.InputAudioConfig; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListChangelogsResponse): google.cloud.dialogflow.cx.v3.ListChangelogsResponse; /** - * Encodes the specified InputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.InputAudioConfig.verify|verify} messages. - * @param message InputAudioConfig message or plain object to encode + * Encodes the specified ListChangelogsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsResponse.verify|verify} messages. + * @param message ListChangelogsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IInputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListChangelogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified InputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.InputAudioConfig.verify|verify} messages. - * @param message InputAudioConfig message or plain object to encode + * Encodes the specified ListChangelogsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsResponse.verify|verify} messages. + * @param message ListChangelogsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IInputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListChangelogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an InputAudioConfig message from the specified reader or buffer. + * Decodes a ListChangelogsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns InputAudioConfig + * @returns ListChangelogsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.InputAudioConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListChangelogsResponse; /** - * Decodes an InputAudioConfig message from the specified reader or buffer, length delimited. + * Decodes a ListChangelogsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns InputAudioConfig + * @returns ListChangelogsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.InputAudioConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListChangelogsResponse; /** - * Verifies an InputAudioConfig message. + * Verifies a ListChangelogsResponse message. * @param message Plain 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 InputAudioConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListChangelogsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns InputAudioConfig + * @returns ListChangelogsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.InputAudioConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListChangelogsResponse; /** - * Creates a plain object from an InputAudioConfig message. Also converts values to other types if specified. - * @param message InputAudioConfig + * Creates a plain object from a ListChangelogsResponse message. Also converts values to other types if specified. + * @param message ListChangelogsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.InputAudioConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListChangelogsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this InputAudioConfig to JSON. + * Converts this ListChangelogsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for InputAudioConfig + * Gets the default type url for ListChangelogsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** SsmlVoiceGender enum. */ - enum SsmlVoiceGender { - SSML_VOICE_GENDER_UNSPECIFIED = 0, - SSML_VOICE_GENDER_MALE = 1, - SSML_VOICE_GENDER_FEMALE = 2, - SSML_VOICE_GENDER_NEUTRAL = 3 - } - - /** Properties of a VoiceSelectionParams. */ - interface IVoiceSelectionParams { + /** Properties of a GetChangelogRequest. */ + interface IGetChangelogRequest { - /** VoiceSelectionParams name */ + /** GetChangelogRequest name */ name?: (string|null); - - /** VoiceSelectionParams ssmlGender */ - ssmlGender?: (google.cloud.dialogflow.cx.v3.SsmlVoiceGender|keyof typeof google.cloud.dialogflow.cx.v3.SsmlVoiceGender|null); } - /** Represents a VoiceSelectionParams. */ - class VoiceSelectionParams implements IVoiceSelectionParams { + /** Represents a GetChangelogRequest. */ + class GetChangelogRequest implements IGetChangelogRequest { /** - * Constructs a new VoiceSelectionParams. + * Constructs a new GetChangelogRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IVoiceSelectionParams); + constructor(properties?: google.cloud.dialogflow.cx.v3.IGetChangelogRequest); - /** VoiceSelectionParams name. */ + /** GetChangelogRequest name. */ public name: string; - /** VoiceSelectionParams ssmlGender. */ - public ssmlGender: (google.cloud.dialogflow.cx.v3.SsmlVoiceGender|keyof typeof google.cloud.dialogflow.cx.v3.SsmlVoiceGender); - /** - * Creates a new VoiceSelectionParams instance using the specified properties. + * Creates a new GetChangelogRequest instance using the specified properties. * @param [properties] Properties to set - * @returns VoiceSelectionParams instance + * @returns GetChangelogRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IVoiceSelectionParams): google.cloud.dialogflow.cx.v3.VoiceSelectionParams; + public static create(properties?: google.cloud.dialogflow.cx.v3.IGetChangelogRequest): google.cloud.dialogflow.cx.v3.GetChangelogRequest; /** - * Encodes the specified VoiceSelectionParams message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VoiceSelectionParams.verify|verify} messages. - * @param message VoiceSelectionParams message or plain object to encode + * Encodes the specified GetChangelogRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetChangelogRequest.verify|verify} messages. + * @param message GetChangelogRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IVoiceSelectionParams, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IGetChangelogRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VoiceSelectionParams message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VoiceSelectionParams.verify|verify} messages. - * @param message VoiceSelectionParams message or plain object to encode + * Encodes the specified GetChangelogRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetChangelogRequest.verify|verify} messages. + * @param message GetChangelogRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IVoiceSelectionParams, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetChangelogRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VoiceSelectionParams message from the specified reader or buffer. + * Decodes a GetChangelogRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VoiceSelectionParams + * @returns GetChangelogRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.VoiceSelectionParams; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetChangelogRequest; /** - * Decodes a VoiceSelectionParams message from the specified reader or buffer, length delimited. + * Decodes a GetChangelogRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VoiceSelectionParams + * @returns GetChangelogRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.VoiceSelectionParams; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetChangelogRequest; /** - * Verifies a VoiceSelectionParams message. + * Verifies a GetChangelogRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a VoiceSelectionParams message from a plain object. Also converts values to their respective internal types. + * Creates a GetChangelogRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VoiceSelectionParams + * @returns GetChangelogRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.VoiceSelectionParams; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetChangelogRequest; /** - * Creates a plain object from a VoiceSelectionParams message. Also converts values to other types if specified. - * @param message VoiceSelectionParams + * Creates a plain object from a GetChangelogRequest message. Also converts values to other types if specified. + * @param message GetChangelogRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.VoiceSelectionParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.GetChangelogRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VoiceSelectionParams to JSON. + * Converts this GetChangelogRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for VoiceSelectionParams + * Gets the default type url for GetChangelogRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SynthesizeSpeechConfig. */ - interface ISynthesizeSpeechConfig { + /** Properties of a Changelog. */ + interface IChangelog { - /** SynthesizeSpeechConfig speakingRate */ - speakingRate?: (number|null); + /** Changelog name */ + name?: (string|null); - /** SynthesizeSpeechConfig pitch */ - pitch?: (number|null); + /** Changelog userEmail */ + userEmail?: (string|null); - /** SynthesizeSpeechConfig volumeGainDb */ - volumeGainDb?: (number|null); + /** Changelog displayName */ + displayName?: (string|null); - /** SynthesizeSpeechConfig effectsProfileId */ - effectsProfileId?: (string[]|null); + /** Changelog action */ + action?: (string|null); - /** SynthesizeSpeechConfig voice */ - voice?: (google.cloud.dialogflow.cx.v3.IVoiceSelectionParams|null); + /** Changelog type */ + type?: (string|null); + + /** Changelog resource */ + resource?: (string|null); + + /** Changelog createTime */ + createTime?: (google.protobuf.ITimestamp|null); } - /** Represents a SynthesizeSpeechConfig. */ - class SynthesizeSpeechConfig implements ISynthesizeSpeechConfig { + /** Represents a Changelog. */ + class Changelog implements IChangelog { /** - * Constructs a new SynthesizeSpeechConfig. + * Constructs a new Changelog. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ISynthesizeSpeechConfig); + constructor(properties?: google.cloud.dialogflow.cx.v3.IChangelog); - /** SynthesizeSpeechConfig speakingRate. */ - public speakingRate: number; + /** Changelog name. */ + public name: string; - /** SynthesizeSpeechConfig pitch. */ - public pitch: number; + /** Changelog userEmail. */ + public userEmail: string; - /** SynthesizeSpeechConfig volumeGainDb. */ - public volumeGainDb: number; + /** Changelog displayName. */ + public displayName: string; - /** SynthesizeSpeechConfig effectsProfileId. */ - public effectsProfileId: string[]; + /** Changelog action. */ + public action: string; - /** SynthesizeSpeechConfig voice. */ - public voice?: (google.cloud.dialogflow.cx.v3.IVoiceSelectionParams|null); + /** Changelog type. */ + public type: string; + + /** Changelog resource. */ + public resource: string; + + /** Changelog createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new SynthesizeSpeechConfig instance using the specified properties. + * Creates a new Changelog instance using the specified properties. * @param [properties] Properties to set - * @returns SynthesizeSpeechConfig instance + * @returns Changelog instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ISynthesizeSpeechConfig): google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig; + public static create(properties?: google.cloud.dialogflow.cx.v3.IChangelog): google.cloud.dialogflow.cx.v3.Changelog; /** - * Encodes the specified SynthesizeSpeechConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig.verify|verify} messages. - * @param message SynthesizeSpeechConfig message or plain object to encode + * Encodes the specified Changelog message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Changelog.verify|verify} messages. + * @param message Changelog message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.ISynthesizeSpeechConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IChangelog, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SynthesizeSpeechConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig.verify|verify} messages. - * @param message SynthesizeSpeechConfig message or plain object to encode + * Encodes the specified Changelog message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Changelog.verify|verify} messages. + * @param message Changelog message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ISynthesizeSpeechConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IChangelog, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer. + * Decodes a Changelog message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SynthesizeSpeechConfig + * @returns Changelog * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Changelog; /** - * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer, length delimited. + * Decodes a Changelog message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SynthesizeSpeechConfig + * @returns Changelog * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Changelog; /** - * Verifies a SynthesizeSpeechConfig message. + * Verifies a Changelog message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SynthesizeSpeechConfig message from a plain object. Also converts values to their respective internal types. + * Creates a Changelog message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SynthesizeSpeechConfig + * @returns Changelog */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Changelog; /** - * Creates a plain object from a SynthesizeSpeechConfig message. Also converts values to other types if specified. - * @param message SynthesizeSpeechConfig + * Creates a plain object from a Changelog message. Also converts values to other types if specified. + * @param message Changelog * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.Changelog, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SynthesizeSpeechConfig to JSON. + * Converts this Changelog to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SynthesizeSpeechConfig + * Gets the default type url for Changelog * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** OutputAudioEncoding enum. */ - enum OutputAudioEncoding { - OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0, - OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1, - OUTPUT_AUDIO_ENCODING_MP3 = 2, - OUTPUT_AUDIO_ENCODING_MP3_64_KBPS = 4, - OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3, - OUTPUT_AUDIO_ENCODING_MULAW = 5 - } - - /** Properties of an OutputAudioConfig. */ - interface IOutputAudioConfig { - - /** OutputAudioConfig audioEncoding */ - audioEncoding?: (google.cloud.dialogflow.cx.v3.OutputAudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3.OutputAudioEncoding|null); - - /** OutputAudioConfig sampleRateHertz */ - sampleRateHertz?: (number|null); - - /** OutputAudioConfig synthesizeSpeechConfig */ - synthesizeSpeechConfig?: (google.cloud.dialogflow.cx.v3.ISynthesizeSpeechConfig|null); - } - - /** Represents an OutputAudioConfig. */ - class OutputAudioConfig implements IOutputAudioConfig { + /** Represents a Deployments */ + class Deployments extends $protobuf.rpc.Service { /** - * Constructs a new OutputAudioConfig. - * @param [properties] Properties to set + * Constructs a new Deployments service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IOutputAudioConfig); - - /** OutputAudioConfig audioEncoding. */ - public audioEncoding: (google.cloud.dialogflow.cx.v3.OutputAudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3.OutputAudioEncoding); - - /** OutputAudioConfig sampleRateHertz. */ - public sampleRateHertz: number; - - /** OutputAudioConfig synthesizeSpeechConfig. */ - public synthesizeSpeechConfig?: (google.cloud.dialogflow.cx.v3.ISynthesizeSpeechConfig|null); + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates a new OutputAudioConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns OutputAudioConfig instance + * Creates new Deployments 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(properties?: google.cloud.dialogflow.cx.v3.IOutputAudioConfig): google.cloud.dialogflow.cx.v3.OutputAudioConfig; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Deployments; /** - * Encodes the specified OutputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.OutputAudioConfig.verify|verify} messages. - * @param message OutputAudioConfig message or plain object to encode + * Calls ListDeployments. + * @param request ListDeploymentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDeploymentsResponse + */ + public listDeployments(request: google.cloud.dialogflow.cx.v3.IListDeploymentsRequest, callback: google.cloud.dialogflow.cx.v3.Deployments.ListDeploymentsCallback): void; + + /** + * Calls ListDeployments. + * @param request ListDeploymentsRequest message or plain object + * @returns Promise + */ + public listDeployments(request: google.cloud.dialogflow.cx.v3.IListDeploymentsRequest): Promise; + + /** + * Calls GetDeployment. + * @param request GetDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Deployment + */ + public getDeployment(request: google.cloud.dialogflow.cx.v3.IGetDeploymentRequest, callback: google.cloud.dialogflow.cx.v3.Deployments.GetDeploymentCallback): void; + + /** + * Calls GetDeployment. + * @param request GetDeploymentRequest message or plain object + * @returns Promise + */ + public getDeployment(request: google.cloud.dialogflow.cx.v3.IGetDeploymentRequest): Promise; + } + + namespace Deployments { + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Deployments|listDeployments}. + * @param error Error, if any + * @param [response] ListDeploymentsResponse + */ + type ListDeploymentsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListDeploymentsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Deployments|getDeployment}. + * @param error Error, if any + * @param [response] Deployment + */ + type GetDeploymentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Deployment) => void; + } + + /** Properties of a Deployment. */ + interface IDeployment { + + /** Deployment name */ + name?: (string|null); + + /** Deployment flowVersion */ + flowVersion?: (string|null); + + /** Deployment state */ + state?: (google.cloud.dialogflow.cx.v3.Deployment.State|keyof typeof google.cloud.dialogflow.cx.v3.Deployment.State|null); + + /** Deployment result */ + result?: (google.cloud.dialogflow.cx.v3.Deployment.IResult|null); + + /** Deployment startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** Deployment endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a Deployment. */ + class Deployment implements IDeployment { + + /** + * Constructs a new Deployment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IDeployment); + + /** Deployment name. */ + public name: string; + + /** Deployment flowVersion. */ + public flowVersion: string; + + /** Deployment state. */ + public state: (google.cloud.dialogflow.cx.v3.Deployment.State|keyof typeof google.cloud.dialogflow.cx.v3.Deployment.State); + + /** Deployment result. */ + public result?: (google.cloud.dialogflow.cx.v3.Deployment.IResult|null); + + /** Deployment startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** Deployment endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new Deployment instance using the specified properties. + * @param [properties] Properties to set + * @returns Deployment instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IDeployment): google.cloud.dialogflow.cx.v3.Deployment; + + /** + * Encodes the specified Deployment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.verify|verify} messages. + * @param message Deployment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IOutputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IDeployment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OutputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.OutputAudioConfig.verify|verify} messages. - * @param message OutputAudioConfig message or plain object to encode + * Encodes the specified Deployment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.verify|verify} messages. + * @param message Deployment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IOutputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeployment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OutputAudioConfig message from the specified reader or buffer. + * Decodes a Deployment message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OutputAudioConfig + * @returns Deployment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.OutputAudioConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Deployment; /** - * Decodes an OutputAudioConfig message from the specified reader or buffer, length delimited. + * Decodes a Deployment message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OutputAudioConfig + * @returns Deployment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.OutputAudioConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Deployment; /** - * Verifies an OutputAudioConfig message. + * Verifies a Deployment message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an OutputAudioConfig message from a plain object. Also converts values to their respective internal types. + * Creates a Deployment message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OutputAudioConfig + * @returns Deployment */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.OutputAudioConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Deployment; /** - * Creates a plain object from an OutputAudioConfig message. Also converts values to other types if specified. - * @param message OutputAudioConfig + * Creates a plain object from a Deployment message. Also converts values to other types if specified. + * @param message Deployment * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.OutputAudioConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.Deployment, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OutputAudioConfig to JSON. + * Converts this Deployment to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OutputAudioConfig + * Gets the default type url for Deployment * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a Changelogs */ - class Changelogs extends $protobuf.rpc.Service { + namespace Deployment { - /** - * Constructs a new Changelogs 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); + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + RUNNING = 1, + SUCCEEDED = 2, + FAILED = 3 + } - /** - * Creates new Changelogs 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): Changelogs; + /** Properties of a Result. */ + interface IResult { - /** - * Calls ListChangelogs. - * @param request ListChangelogsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListChangelogsResponse - */ - public listChangelogs(request: google.cloud.dialogflow.cx.v3.IListChangelogsRequest, callback: google.cloud.dialogflow.cx.v3.Changelogs.ListChangelogsCallback): void; + /** Result deploymentTestResults */ + deploymentTestResults?: (string[]|null); - /** - * Calls ListChangelogs. - * @param request ListChangelogsRequest message or plain object - * @returns Promise - */ - public listChangelogs(request: google.cloud.dialogflow.cx.v3.IListChangelogsRequest): Promise; + /** Result experiment */ + experiment?: (string|null); + } - /** - * Calls GetChangelog. - * @param request GetChangelogRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Changelog - */ - public getChangelog(request: google.cloud.dialogflow.cx.v3.IGetChangelogRequest, callback: google.cloud.dialogflow.cx.v3.Changelogs.GetChangelogCallback): void; + /** Represents a Result. */ + class Result implements IResult { - /** - * Calls GetChangelog. - * @param request GetChangelogRequest message or plain object - * @returns Promise - */ - public getChangelog(request: google.cloud.dialogflow.cx.v3.IGetChangelogRequest): Promise; - } + /** + * Constructs a new Result. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Deployment.IResult); - namespace Changelogs { + /** Result deploymentTestResults. */ + public deploymentTestResults: string[]; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Changelogs|listChangelogs}. - * @param error Error, if any - * @param [response] ListChangelogsResponse - */ - type ListChangelogsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListChangelogsResponse) => void; + /** Result experiment. */ + public experiment: string; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Changelogs|getChangelog}. - * @param error Error, if any - * @param [response] Changelog - */ - type GetChangelogCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Changelog) => void; + /** + * Creates a new Result instance using the specified properties. + * @param [properties] Properties to set + * @returns Result instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Deployment.IResult): google.cloud.dialogflow.cx.v3.Deployment.Result; + + /** + * Encodes the specified Result message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.Result.verify|verify} messages. + * @param message Result message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Deployment.IResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Result message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.Result.verify|verify} messages. + * @param message Result message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Deployment.IResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Result message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Result + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Deployment.Result; + + /** + * Decodes a Result message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Result + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Deployment.Result; + + /** + * Verifies a Result message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Result message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Result + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Deployment.Result; + + /** + * Creates a plain object from a Result message. Also converts values to other types if specified. + * @param message Result + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Deployment.Result, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Result to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Result + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - /** Properties of a ListChangelogsRequest. */ - interface IListChangelogsRequest { + /** Properties of a ListDeploymentsRequest. */ + interface IListDeploymentsRequest { - /** ListChangelogsRequest parent */ + /** ListDeploymentsRequest parent */ parent?: (string|null); - /** ListChangelogsRequest filter */ - filter?: (string|null); - - /** ListChangelogsRequest pageSize */ + /** ListDeploymentsRequest pageSize */ pageSize?: (number|null); - /** ListChangelogsRequest pageToken */ + /** ListDeploymentsRequest pageToken */ pageToken?: (string|null); } - /** Represents a ListChangelogsRequest. */ - class ListChangelogsRequest implements IListChangelogsRequest { + /** Represents a ListDeploymentsRequest. */ + class ListDeploymentsRequest implements IListDeploymentsRequest { /** - * Constructs a new ListChangelogsRequest. + * Constructs a new ListDeploymentsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListChangelogsRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IListDeploymentsRequest); - /** ListChangelogsRequest parent. */ + /** ListDeploymentsRequest parent. */ public parent: string; - /** ListChangelogsRequest filter. */ - public filter: string; - - /** ListChangelogsRequest pageSize. */ + /** ListDeploymentsRequest pageSize. */ public pageSize: number; - /** ListChangelogsRequest pageToken. */ + /** ListDeploymentsRequest pageToken. */ public pageToken: string; /** - * Creates a new ListChangelogsRequest instance using the specified properties. + * Creates a new ListDeploymentsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListChangelogsRequest instance + * @returns ListDeploymentsRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListChangelogsRequest): google.cloud.dialogflow.cx.v3.ListChangelogsRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListDeploymentsRequest): google.cloud.dialogflow.cx.v3.ListDeploymentsRequest; /** - * Encodes the specified ListChangelogsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsRequest.verify|verify} messages. - * @param message ListChangelogsRequest message or plain object to encode + * Encodes the specified ListDeploymentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsRequest.verify|verify} messages. + * @param message ListDeploymentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListChangelogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListChangelogsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsRequest.verify|verify} messages. - * @param message ListChangelogsRequest message or plain object to encode + * Encodes the specified ListDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsRequest.verify|verify} messages. + * @param message ListDeploymentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListChangelogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListChangelogsRequest message from the specified reader or buffer. + * Decodes a ListDeploymentsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListChangelogsRequest + * @returns ListDeploymentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListChangelogsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListDeploymentsRequest; /** - * Decodes a ListChangelogsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDeploymentsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListChangelogsRequest + * @returns ListDeploymentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListChangelogsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListDeploymentsRequest; /** - * Verifies a ListChangelogsRequest message. + * Verifies a ListDeploymentsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListChangelogsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeploymentsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListChangelogsRequest + * @returns ListDeploymentsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListChangelogsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListDeploymentsRequest; /** - * Creates a plain object from a ListChangelogsRequest message. Also converts values to other types if specified. - * @param message ListChangelogsRequest + * Creates a plain object from a ListDeploymentsRequest message. Also converts values to other types if specified. + * @param message ListDeploymentsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListChangelogsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListDeploymentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListChangelogsRequest to JSON. + * Converts this ListDeploymentsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListChangelogsRequest + * Gets the default type url for ListDeploymentsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListChangelogsResponse. */ - interface IListChangelogsResponse { + /** Properties of a ListDeploymentsResponse. */ + interface IListDeploymentsResponse { - /** ListChangelogsResponse changelogs */ - changelogs?: (google.cloud.dialogflow.cx.v3.IChangelog[]|null); + /** ListDeploymentsResponse deployments */ + deployments?: (google.cloud.dialogflow.cx.v3.IDeployment[]|null); - /** ListChangelogsResponse nextPageToken */ + /** ListDeploymentsResponse nextPageToken */ nextPageToken?: (string|null); } - /** Represents a ListChangelogsResponse. */ - class ListChangelogsResponse implements IListChangelogsResponse { + /** Represents a ListDeploymentsResponse. */ + class ListDeploymentsResponse implements IListDeploymentsResponse { /** - * Constructs a new ListChangelogsResponse. + * Constructs a new ListDeploymentsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListChangelogsResponse); + constructor(properties?: google.cloud.dialogflow.cx.v3.IListDeploymentsResponse); - /** ListChangelogsResponse changelogs. */ - public changelogs: google.cloud.dialogflow.cx.v3.IChangelog[]; + /** ListDeploymentsResponse deployments. */ + public deployments: google.cloud.dialogflow.cx.v3.IDeployment[]; - /** ListChangelogsResponse nextPageToken. */ + /** ListDeploymentsResponse nextPageToken. */ public nextPageToken: string; /** - * Creates a new ListChangelogsResponse instance using the specified properties. + * Creates a new ListDeploymentsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListChangelogsResponse instance + * @returns ListDeploymentsResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListChangelogsResponse): google.cloud.dialogflow.cx.v3.ListChangelogsResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListDeploymentsResponse): google.cloud.dialogflow.cx.v3.ListDeploymentsResponse; /** - * Encodes the specified ListChangelogsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsResponse.verify|verify} messages. - * @param message ListChangelogsResponse message or plain object to encode + * Encodes the specified ListDeploymentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsResponse.verify|verify} messages. + * @param message ListDeploymentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListChangelogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListChangelogsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsResponse.verify|verify} messages. - * @param message ListChangelogsResponse message or plain object to encode + * Encodes the specified ListDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsResponse.verify|verify} messages. + * @param message ListDeploymentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListChangelogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListChangelogsResponse message from the specified reader or buffer. + * Decodes a ListDeploymentsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListChangelogsResponse + * @returns ListDeploymentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListChangelogsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListDeploymentsResponse; /** - * Decodes a ListChangelogsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListDeploymentsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListChangelogsResponse + * @returns ListDeploymentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListChangelogsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListDeploymentsResponse; /** - * Verifies a ListChangelogsResponse message. + * Verifies a ListDeploymentsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListChangelogsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeploymentsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListChangelogsResponse + * @returns ListDeploymentsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListChangelogsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListDeploymentsResponse; /** - * Creates a plain object from a ListChangelogsResponse message. Also converts values to other types if specified. - * @param message ListChangelogsResponse + * Creates a plain object from a ListDeploymentsResponse message. Also converts values to other types if specified. + * @param message ListDeploymentsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListChangelogsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListDeploymentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListChangelogsResponse to JSON. + * Converts this ListDeploymentsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListChangelogsResponse + * Gets the default type url for ListDeploymentsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetChangelogRequest. */ - interface IGetChangelogRequest { + /** Properties of a GetDeploymentRequest. */ + interface IGetDeploymentRequest { - /** GetChangelogRequest name */ + /** GetDeploymentRequest name */ name?: (string|null); } - /** Represents a GetChangelogRequest. */ - class GetChangelogRequest implements IGetChangelogRequest { + /** Represents a GetDeploymentRequest. */ + class GetDeploymentRequest implements IGetDeploymentRequest { /** - * Constructs a new GetChangelogRequest. + * Constructs a new GetDeploymentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IGetChangelogRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IGetDeploymentRequest); - /** GetChangelogRequest name. */ + /** GetDeploymentRequest name. */ public name: string; /** - * Creates a new GetChangelogRequest instance using the specified properties. + * Creates a new GetDeploymentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetChangelogRequest instance + * @returns GetDeploymentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IGetChangelogRequest): google.cloud.dialogflow.cx.v3.GetChangelogRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IGetDeploymentRequest): google.cloud.dialogflow.cx.v3.GetDeploymentRequest; /** - * Encodes the specified GetChangelogRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetChangelogRequest.verify|verify} messages. - * @param message GetChangelogRequest message or plain object to encode + * Encodes the specified GetDeploymentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetDeploymentRequest.verify|verify} messages. + * @param message GetDeploymentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IGetChangelogRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IGetDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetChangelogRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetChangelogRequest.verify|verify} messages. - * @param message GetChangelogRequest message or plain object to encode + * Encodes the specified GetDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetDeploymentRequest.verify|verify} messages. + * @param message GetDeploymentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetChangelogRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetChangelogRequest message from the specified reader or buffer. + * Decodes a GetDeploymentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetChangelogRequest + * @returns GetDeploymentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetChangelogRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetDeploymentRequest; /** - * Decodes a GetChangelogRequest message from the specified reader or buffer, length delimited. + * Decodes a GetDeploymentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetChangelogRequest + * @returns GetDeploymentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetChangelogRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetDeploymentRequest; /** - * Verifies a GetChangelogRequest message. + * Verifies a GetDeploymentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetChangelogRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetDeploymentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetChangelogRequest + * @returns GetDeploymentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetChangelogRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetDeploymentRequest; /** - * Creates a plain object from a GetChangelogRequest message. Also converts values to other types if specified. - * @param message GetChangelogRequest + * Creates a plain object from a GetDeploymentRequest message. Also converts values to other types if specified. + * @param message GetDeploymentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.GetChangelogRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.GetDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetChangelogRequest to JSON. + * Converts this GetDeploymentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetChangelogRequest + * Gets the default type url for GetDeploymentRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Changelog. */ - interface IChangelog { - - /** Changelog name */ - name?: (string|null); - - /** Changelog userEmail */ - userEmail?: (string|null); - - /** Changelog displayName */ - displayName?: (string|null); - - /** Changelog action */ - action?: (string|null); - - /** Changelog type */ - type?: (string|null); - - /** Changelog resource */ - resource?: (string|null); - - /** Changelog createTime */ - createTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a Changelog. */ - class Changelog implements IChangelog { - - /** - * Constructs a new Changelog. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IChangelog); - - /** Changelog name. */ - public name: string; - - /** Changelog userEmail. */ - public userEmail: string; - - /** Changelog displayName. */ - public displayName: string; - - /** Changelog action. */ - public action: string; - - /** Changelog type. */ - public type: string; - - /** Changelog resource. */ - public resource: string; - - /** Changelog createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** Represents an EntityTypes */ + class EntityTypes extends $protobuf.rpc.Service { /** - * Creates a new Changelog instance using the specified properties. - * @param [properties] Properties to set - * @returns Changelog instance + * Constructs a new EntityTypes service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IChangelog): google.cloud.dialogflow.cx.v3.Changelog; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Encodes the specified Changelog message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Changelog.verify|verify} messages. - * @param message Changelog message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Creates new EntityTypes 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 encode(message: google.cloud.dialogflow.cx.v3.IChangelog, writer?: $protobuf.Writer): $protobuf.Writer; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): EntityTypes; /** - * Encodes the specified Changelog message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Changelog.verify|verify} messages. - * @param message Changelog message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListEntityTypes. + * @param request ListEntityTypesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEntityTypesResponse */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IChangelog, writer?: $protobuf.Writer): $protobuf.Writer; + public listEntityTypes(request: google.cloud.dialogflow.cx.v3.IListEntityTypesRequest, callback: google.cloud.dialogflow.cx.v3.EntityTypes.ListEntityTypesCallback): void; /** - * Decodes a Changelog message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Changelog - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListEntityTypes. + * @param request ListEntityTypesRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Changelog; + public listEntityTypes(request: google.cloud.dialogflow.cx.v3.IListEntityTypesRequest): Promise; /** - * Decodes a Changelog message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Changelog - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetEntityType. + * @param request GetEntityTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EntityType */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Changelog; + public getEntityType(request: google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3.EntityTypes.GetEntityTypeCallback): void; /** - * Verifies a Changelog message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls GetEntityType. + * @param request GetEntityTypeRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public getEntityType(request: google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest): Promise; /** - * Creates a Changelog message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Changelog + * Calls CreateEntityType. + * @param request CreateEntityTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EntityType */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Changelog; + public createEntityType(request: google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3.EntityTypes.CreateEntityTypeCallback): void; /** - * Creates a plain object from a Changelog message. Also converts values to other types if specified. - * @param message Changelog - * @param [options] Conversion options - * @returns Plain object + * Calls CreateEntityType. + * @param request CreateEntityTypeRequest message or plain object + * @returns Promise */ - public static toObject(message: google.cloud.dialogflow.cx.v3.Changelog, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public createEntityType(request: google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest): Promise; /** - * Converts this Changelog to JSON. - * @returns JSON object + * Calls UpdateEntityType. + * @param request UpdateEntityTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EntityType */ - public toJSON(): { [k: string]: any }; + public updateEntityType(request: google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3.EntityTypes.UpdateEntityTypeCallback): void; /** - * Gets the default type url for Changelog - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Calls UpdateEntityType. + * @param request UpdateEntityTypeRequest message or plain object + * @returns Promise */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Represents a Deployments */ - class Deployments extends $protobuf.rpc.Service { + public updateEntityType(request: google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest): Promise; /** - * Constructs a new Deployments service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited + * Calls DeleteEntityType. + * @param request DeleteEntityTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + public deleteEntityType(request: google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3.EntityTypes.DeleteEntityTypeCallback): void; /** - * Creates new Deployments 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. + * Calls DeleteEntityType. + * @param request DeleteEntityTypeRequest message or plain object + * @returns Promise */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Deployments; + public deleteEntityType(request: google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest): Promise; + } - /** - * Calls ListDeployments. - * @param request ListDeploymentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDeploymentsResponse - */ - public listDeployments(request: google.cloud.dialogflow.cx.v3.IListDeploymentsRequest, callback: google.cloud.dialogflow.cx.v3.Deployments.ListDeploymentsCallback): void; + namespace EntityTypes { /** - * Calls ListDeployments. - * @param request ListDeploymentsRequest message or plain object - * @returns Promise + * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|listEntityTypes}. + * @param error Error, if any + * @param [response] ListEntityTypesResponse */ - public listDeployments(request: google.cloud.dialogflow.cx.v3.IListDeploymentsRequest): Promise; + type ListEntityTypesCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListEntityTypesResponse) => void; /** - * Calls GetDeployment. - * @param request GetDeploymentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Deployment + * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|getEntityType}. + * @param error Error, if any + * @param [response] EntityType */ - public getDeployment(request: google.cloud.dialogflow.cx.v3.IGetDeploymentRequest, callback: google.cloud.dialogflow.cx.v3.Deployments.GetDeploymentCallback): void; + type GetEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.EntityType) => void; /** - * Calls GetDeployment. - * @param request GetDeploymentRequest message or plain object - * @returns Promise + * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|createEntityType}. + * @param error Error, if any + * @param [response] EntityType */ - public getDeployment(request: google.cloud.dialogflow.cx.v3.IGetDeploymentRequest): Promise; - } - - namespace Deployments { + type CreateEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.EntityType) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Deployments|listDeployments}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|updateEntityType}. * @param error Error, if any - * @param [response] ListDeploymentsResponse + * @param [response] EntityType */ - type ListDeploymentsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListDeploymentsResponse) => void; + type UpdateEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.EntityType) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Deployments|getDeployment}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|deleteEntityType}. * @param error Error, if any - * @param [response] Deployment + * @param [response] Empty */ - type GetDeploymentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Deployment) => void; + type DeleteEntityTypeCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; } - /** Properties of a Deployment. */ - interface IDeployment { + /** Properties of an EntityType. */ + interface IEntityType { - /** Deployment name */ + /** EntityType name */ name?: (string|null); - /** Deployment flowVersion */ - flowVersion?: (string|null); + /** EntityType displayName */ + displayName?: (string|null); - /** Deployment state */ - state?: (google.cloud.dialogflow.cx.v3.Deployment.State|keyof typeof google.cloud.dialogflow.cx.v3.Deployment.State|null); + /** EntityType kind */ + kind?: (google.cloud.dialogflow.cx.v3.EntityType.Kind|keyof typeof google.cloud.dialogflow.cx.v3.EntityType.Kind|null); - /** Deployment result */ - result?: (google.cloud.dialogflow.cx.v3.Deployment.IResult|null); + /** EntityType autoExpansionMode */ + autoExpansionMode?: (google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode|keyof typeof google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode|null); - /** Deployment startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** EntityType entities */ + entities?: (google.cloud.dialogflow.cx.v3.EntityType.IEntity[]|null); - /** Deployment endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** EntityType excludedPhrases */ + excludedPhrases?: (google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase[]|null); + + /** EntityType enableFuzzyExtraction */ + enableFuzzyExtraction?: (boolean|null); + + /** EntityType redact */ + redact?: (boolean|null); } - /** Represents a Deployment. */ - class Deployment implements IDeployment { + /** Represents an EntityType. */ + class EntityType implements IEntityType { /** - * Constructs a new Deployment. + * Constructs a new EntityType. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IDeployment); + constructor(properties?: google.cloud.dialogflow.cx.v3.IEntityType); - /** Deployment name. */ + /** EntityType name. */ public name: string; - /** Deployment flowVersion. */ - public flowVersion: string; + /** EntityType displayName. */ + public displayName: string; - /** Deployment state. */ - public state: (google.cloud.dialogflow.cx.v3.Deployment.State|keyof typeof google.cloud.dialogflow.cx.v3.Deployment.State); + /** EntityType kind. */ + public kind: (google.cloud.dialogflow.cx.v3.EntityType.Kind|keyof typeof google.cloud.dialogflow.cx.v3.EntityType.Kind); - /** Deployment result. */ - public result?: (google.cloud.dialogflow.cx.v3.Deployment.IResult|null); + /** EntityType autoExpansionMode. */ + public autoExpansionMode: (google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode|keyof typeof google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode); - /** Deployment startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** EntityType entities. */ + public entities: google.cloud.dialogflow.cx.v3.EntityType.IEntity[]; - /** Deployment endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** EntityType excludedPhrases. */ + public excludedPhrases: google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase[]; + + /** EntityType enableFuzzyExtraction. */ + public enableFuzzyExtraction: boolean; + + /** EntityType redact. */ + public redact: boolean; /** - * Creates a new Deployment instance using the specified properties. + * Creates a new EntityType instance using the specified properties. * @param [properties] Properties to set - * @returns Deployment instance + * @returns EntityType instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IDeployment): google.cloud.dialogflow.cx.v3.Deployment; + public static create(properties?: google.cloud.dialogflow.cx.v3.IEntityType): google.cloud.dialogflow.cx.v3.EntityType; /** - * Encodes the specified Deployment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.verify|verify} messages. - * @param message Deployment message or plain object to encode + * Encodes the specified EntityType message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.verify|verify} messages. + * @param message EntityType message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IDeployment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IEntityType, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Deployment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.verify|verify} messages. - * @param message Deployment message or plain object to encode + * Encodes the specified EntityType message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.verify|verify} messages. + * @param message EntityType message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeployment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IEntityType, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Deployment message from the specified reader or buffer. + * Decodes an EntityType message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Deployment + * @returns EntityType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Deployment; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.EntityType; /** - * Decodes a Deployment message from the specified reader or buffer, length delimited. + * Decodes an EntityType message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Deployment + * @returns EntityType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Deployment; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.EntityType; /** - * Verifies a Deployment message. + * Verifies an EntityType message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Deployment message from a plain object. Also converts values to their respective internal types. + * Creates an EntityType message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Deployment + * @returns EntityType */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Deployment; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.EntityType; /** - * Creates a plain object from a Deployment message. Also converts values to other types if specified. - * @param message Deployment + * Creates a plain object from an EntityType message. Also converts values to other types if specified. + * @param message EntityType * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.Deployment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.EntityType, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Deployment to JSON. + * Converts this EntityType to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Deployment + * Gets the default type url for EntityType * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Deployment { + namespace EntityType { - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - RUNNING = 1, - SUCCEEDED = 2, - FAILED = 3 + /** Kind enum. */ + enum Kind { + KIND_UNSPECIFIED = 0, + KIND_MAP = 1, + KIND_LIST = 2, + KIND_REGEXP = 3 } - /** Properties of a Result. */ - interface IResult { + /** AutoExpansionMode enum. */ + enum AutoExpansionMode { + AUTO_EXPANSION_MODE_UNSPECIFIED = 0, + AUTO_EXPANSION_MODE_DEFAULT = 1 + } - /** Result deploymentTestResults */ - deploymentTestResults?: (string[]|null); + /** Properties of an Entity. */ + interface IEntity { - /** Result experiment */ - experiment?: (string|null); + /** Entity value */ + value?: (string|null); + + /** Entity synonyms */ + synonyms?: (string[]|null); } - /** Represents a Result. */ - class Result implements IResult { + /** Represents an Entity. */ + class Entity implements IEntity { /** - * Constructs a new Result. + * Constructs a new Entity. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.Deployment.IResult); + constructor(properties?: google.cloud.dialogflow.cx.v3.EntityType.IEntity); - /** Result deploymentTestResults. */ - public deploymentTestResults: string[]; + /** Entity value. */ + public value: string; - /** Result experiment. */ - public experiment: string; + /** Entity synonyms. */ + public synonyms: string[]; /** - * Creates a new Result instance using the specified properties. + * Creates a new Entity instance using the specified properties. * @param [properties] Properties to set - * @returns Result instance + * @returns Entity instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.Deployment.IResult): google.cloud.dialogflow.cx.v3.Deployment.Result; + public static create(properties?: google.cloud.dialogflow.cx.v3.EntityType.IEntity): google.cloud.dialogflow.cx.v3.EntityType.Entity; /** - * Encodes the specified Result message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.Result.verify|verify} messages. - * @param message Result message or plain object to encode + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.Entity.verify|verify} messages. + * @param message Entity message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.Deployment.IResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.EntityType.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Result message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.Result.verify|verify} messages. - * @param message Result message or plain object to encode + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.Entity.verify|verify} messages. + * @param message Entity message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Deployment.IResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.EntityType.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Result message from the specified reader or buffer. + * Decodes an Entity message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Result + * @returns Entity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Deployment.Result; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.EntityType.Entity; /** - * Decodes a Result message from the specified reader or buffer, length delimited. + * Decodes an Entity message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Result + * @returns Entity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Deployment.Result; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.EntityType.Entity; /** - * Verifies a Result message. + * Verifies an Entity message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Result message from a plain object. Also converts values to their respective internal types. + * Creates an Entity message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Result + * @returns Entity */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Deployment.Result; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.EntityType.Entity; /** - * Creates a plain object from a Result message. Also converts values to other types if specified. - * @param message Result + * Creates a plain object from an Entity message. Also converts values to other types if specified. + * @param message Entity * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.Deployment.Result, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.EntityType.Entity, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Result to JSON. + * Converts this Entity to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Result + * Gets the default type url for Entity * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - } - /** Properties of a ListDeploymentsRequest. */ - interface IListDeploymentsRequest { + /** Properties of an ExcludedPhrase. */ + interface IExcludedPhrase { - /** ListDeploymentsRequest parent */ - parent?: (string|null); + /** ExcludedPhrase value */ + value?: (string|null); + } - /** ListDeploymentsRequest pageSize */ - pageSize?: (number|null); + /** Represents an ExcludedPhrase. */ + class ExcludedPhrase implements IExcludedPhrase { - /** ListDeploymentsRequest pageToken */ - pageToken?: (string|null); - } + /** + * Constructs a new ExcludedPhrase. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase); - /** Represents a ListDeploymentsRequest. */ - class ListDeploymentsRequest implements IListDeploymentsRequest { + /** ExcludedPhrase value. */ + public value: string; - /** - * Constructs a new ListDeploymentsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListDeploymentsRequest); + /** + * Creates a new ExcludedPhrase instance using the specified properties. + * @param [properties] Properties to set + * @returns ExcludedPhrase instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase): google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase; - /** ListDeploymentsRequest parent. */ - public parent: string; + /** + * Encodes the specified ExcludedPhrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.verify|verify} messages. + * @param message ExcludedPhrase message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListDeploymentsRequest pageSize. */ - public pageSize: number; + /** + * Encodes the specified ExcludedPhrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.verify|verify} messages. + * @param message ExcludedPhrase message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListDeploymentsRequest pageToken. */ - public pageToken: string; + /** + * Decodes an ExcludedPhrase message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExcludedPhrase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase; - /** - * Creates a new ListDeploymentsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDeploymentsRequest instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListDeploymentsRequest): google.cloud.dialogflow.cx.v3.ListDeploymentsRequest; + /** + * Decodes an ExcludedPhrase message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExcludedPhrase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase; + + /** + * Verifies an ExcludedPhrase message. + * @param message Plain 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 ExcludedPhrase message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExcludedPhrase + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase; + + /** + * Creates a plain object from an ExcludedPhrase message. Also converts values to other types if specified. + * @param message ExcludedPhrase + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExcludedPhrase to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExcludedPhrase + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ListEntityTypesRequest. */ + interface IListEntityTypesRequest { + + /** ListEntityTypesRequest parent */ + parent?: (string|null); + + /** ListEntityTypesRequest languageCode */ + languageCode?: (string|null); + + /** ListEntityTypesRequest pageSize */ + pageSize?: (number|null); + + /** ListEntityTypesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListEntityTypesRequest. */ + class ListEntityTypesRequest implements IListEntityTypesRequest { /** - * Encodes the specified ListDeploymentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsRequest.verify|verify} messages. - * @param message ListDeploymentsRequest message or plain object to encode + * Constructs a new ListEntityTypesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IListEntityTypesRequest); + + /** ListEntityTypesRequest parent. */ + public parent: string; + + /** ListEntityTypesRequest languageCode. */ + public languageCode: string; + + /** ListEntityTypesRequest pageSize. */ + public pageSize: number; + + /** ListEntityTypesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListEntityTypesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEntityTypesRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IListEntityTypesRequest): google.cloud.dialogflow.cx.v3.ListEntityTypesRequest; + + /** + * Encodes the specified ListEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesRequest.verify|verify} messages. + * @param message ListEntityTypesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsRequest.verify|verify} messages. - * @param message ListDeploymentsRequest message or plain object to encode + * Encodes the specified ListEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesRequest.verify|verify} messages. + * @param message ListEntityTypesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListDeploymentsRequest message from the specified reader or buffer. + * Decodes a ListEntityTypesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListDeploymentsRequest + * @returns ListEntityTypesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListDeploymentsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListEntityTypesRequest; /** - * Decodes a ListDeploymentsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEntityTypesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListDeploymentsRequest + * @returns ListEntityTypesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListDeploymentsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListEntityTypesRequest; /** - * Verifies a ListDeploymentsRequest message. + * Verifies a ListEntityTypesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListDeploymentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEntityTypesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListDeploymentsRequest + * @returns ListEntityTypesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListDeploymentsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListEntityTypesRequest; /** - * Creates a plain object from a ListDeploymentsRequest message. Also converts values to other types if specified. - * @param message ListDeploymentsRequest + * Creates a plain object from a ListEntityTypesRequest message. Also converts values to other types if specified. + * @param message ListEntityTypesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListDeploymentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListEntityTypesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListDeploymentsRequest to JSON. + * Converts this ListEntityTypesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListDeploymentsRequest + * Gets the default type url for ListEntityTypesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListDeploymentsResponse. */ - interface IListDeploymentsResponse { + /** Properties of a ListEntityTypesResponse. */ + interface IListEntityTypesResponse { - /** ListDeploymentsResponse deployments */ - deployments?: (google.cloud.dialogflow.cx.v3.IDeployment[]|null); + /** ListEntityTypesResponse entityTypes */ + entityTypes?: (google.cloud.dialogflow.cx.v3.IEntityType[]|null); - /** ListDeploymentsResponse nextPageToken */ + /** ListEntityTypesResponse nextPageToken */ nextPageToken?: (string|null); } - /** Represents a ListDeploymentsResponse. */ - class ListDeploymentsResponse implements IListDeploymentsResponse { + /** Represents a ListEntityTypesResponse. */ + class ListEntityTypesResponse implements IListEntityTypesResponse { /** - * Constructs a new ListDeploymentsResponse. + * Constructs a new ListEntityTypesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListDeploymentsResponse); + constructor(properties?: google.cloud.dialogflow.cx.v3.IListEntityTypesResponse); - /** ListDeploymentsResponse deployments. */ - public deployments: google.cloud.dialogflow.cx.v3.IDeployment[]; + /** ListEntityTypesResponse entityTypes. */ + public entityTypes: google.cloud.dialogflow.cx.v3.IEntityType[]; - /** ListDeploymentsResponse nextPageToken. */ + /** ListEntityTypesResponse nextPageToken. */ public nextPageToken: string; /** - * Creates a new ListDeploymentsResponse instance using the specified properties. + * Creates a new ListEntityTypesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListDeploymentsResponse instance + * @returns ListEntityTypesResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListDeploymentsResponse): google.cloud.dialogflow.cx.v3.ListDeploymentsResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListEntityTypesResponse): google.cloud.dialogflow.cx.v3.ListEntityTypesResponse; /** - * Encodes the specified ListDeploymentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsResponse.verify|verify} messages. - * @param message ListDeploymentsResponse message or plain object to encode + * Encodes the specified ListEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesResponse.verify|verify} messages. + * @param message ListEntityTypesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsResponse.verify|verify} messages. - * @param message ListDeploymentsResponse message or plain object to encode + * Encodes the specified ListEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesResponse.verify|verify} messages. + * @param message ListEntityTypesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListDeploymentsResponse message from the specified reader or buffer. + * Decodes a ListEntityTypesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListDeploymentsResponse + * @returns ListEntityTypesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListDeploymentsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListEntityTypesResponse; /** - * Decodes a ListDeploymentsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListEntityTypesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListDeploymentsResponse + * @returns ListEntityTypesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListDeploymentsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListEntityTypesResponse; /** - * Verifies a ListDeploymentsResponse message. + * Verifies a ListEntityTypesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListDeploymentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListEntityTypesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListDeploymentsResponse + * @returns ListEntityTypesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListDeploymentsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListEntityTypesResponse; /** - * Creates a plain object from a ListDeploymentsResponse message. Also converts values to other types if specified. - * @param message ListDeploymentsResponse + * Creates a plain object from a ListEntityTypesResponse message. Also converts values to other types if specified. + * @param message ListEntityTypesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListDeploymentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListEntityTypesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListDeploymentsResponse to JSON. + * Converts this ListEntityTypesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListDeploymentsResponse + * Gets the default type url for ListEntityTypesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetDeploymentRequest. */ - interface IGetDeploymentRequest { + /** Properties of a GetEntityTypeRequest. */ + interface IGetEntityTypeRequest { - /** GetDeploymentRequest name */ + /** GetEntityTypeRequest name */ name?: (string|null); + + /** GetEntityTypeRequest languageCode */ + languageCode?: (string|null); } - /** Represents a GetDeploymentRequest. */ - class GetDeploymentRequest implements IGetDeploymentRequest { + /** Represents a GetEntityTypeRequest. */ + class GetEntityTypeRequest implements IGetEntityTypeRequest { /** - * Constructs a new GetDeploymentRequest. + * Constructs a new GetEntityTypeRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IGetDeploymentRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest); - /** GetDeploymentRequest name. */ + /** GetEntityTypeRequest name. */ public name: string; + /** GetEntityTypeRequest languageCode. */ + public languageCode: string; + /** - * Creates a new GetDeploymentRequest instance using the specified properties. + * Creates a new GetEntityTypeRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetDeploymentRequest instance + * @returns GetEntityTypeRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IGetDeploymentRequest): google.cloud.dialogflow.cx.v3.GetDeploymentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest): google.cloud.dialogflow.cx.v3.GetEntityTypeRequest; /** - * Encodes the specified GetDeploymentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetDeploymentRequest.verify|verify} messages. - * @param message GetDeploymentRequest message or plain object to encode + * Encodes the specified GetEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetEntityTypeRequest.verify|verify} messages. + * @param message GetEntityTypeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IGetDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetDeploymentRequest.verify|verify} messages. - * @param message GetDeploymentRequest message or plain object to encode + * Encodes the specified GetEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetEntityTypeRequest.verify|verify} messages. + * @param message GetEntityTypeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetDeploymentRequest message from the specified reader or buffer. + * Decodes a GetEntityTypeRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetDeploymentRequest + * @returns GetEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetDeploymentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetEntityTypeRequest; /** - * Decodes a GetDeploymentRequest message from the specified reader or buffer, length delimited. + * Decodes a GetEntityTypeRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetDeploymentRequest + * @returns GetEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetDeploymentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetEntityTypeRequest; /** - * Verifies a GetDeploymentRequest message. + * Verifies a GetEntityTypeRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetEntityTypeRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetDeploymentRequest + * @returns GetEntityTypeRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetDeploymentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetEntityTypeRequest; /** - * Creates a plain object from a GetDeploymentRequest message. Also converts values to other types if specified. - * @param message GetDeploymentRequest + * Creates a plain object from a GetEntityTypeRequest message. Also converts values to other types if specified. + * @param message GetEntityTypeRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.GetDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.GetEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetDeploymentRequest to JSON. + * Converts this GetEntityTypeRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetDeploymentRequest + * Gets the default type url for GetEntityTypeRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents an EntityTypes */ - class EntityTypes extends $protobuf.rpc.Service { + /** Properties of a CreateEntityTypeRequest. */ + interface ICreateEntityTypeRequest { - /** - * Constructs a new EntityTypes 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); + /** CreateEntityTypeRequest parent */ + parent?: (string|null); - /** - * Creates new EntityTypes 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): EntityTypes; + /** CreateEntityTypeRequest entityType */ + entityType?: (google.cloud.dialogflow.cx.v3.IEntityType|null); - /** - * Calls ListEntityTypes. - * @param request ListEntityTypesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListEntityTypesResponse - */ - public listEntityTypes(request: google.cloud.dialogflow.cx.v3.IListEntityTypesRequest, callback: google.cloud.dialogflow.cx.v3.EntityTypes.ListEntityTypesCallback): void; + /** CreateEntityTypeRequest languageCode */ + languageCode?: (string|null); + } - /** - * Calls ListEntityTypes. - * @param request ListEntityTypesRequest message or plain object - * @returns Promise - */ - public listEntityTypes(request: google.cloud.dialogflow.cx.v3.IListEntityTypesRequest): Promise; + /** Represents a CreateEntityTypeRequest. */ + class CreateEntityTypeRequest implements ICreateEntityTypeRequest { /** - * Calls GetEntityType. - * @param request GetEntityTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EntityType + * Constructs a new CreateEntityTypeRequest. + * @param [properties] Properties to set */ - public getEntityType(request: google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3.EntityTypes.GetEntityTypeCallback): void; + constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest); - /** - * Calls GetEntityType. - * @param request GetEntityTypeRequest message or plain object - * @returns Promise - */ - public getEntityType(request: google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest): Promise; + /** CreateEntityTypeRequest parent. */ + public parent: string; - /** - * Calls CreateEntityType. - * @param request CreateEntityTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EntityType - */ - public createEntityType(request: google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3.EntityTypes.CreateEntityTypeCallback): void; + /** CreateEntityTypeRequest entityType. */ + public entityType?: (google.cloud.dialogflow.cx.v3.IEntityType|null); + + /** CreateEntityTypeRequest languageCode. */ + public languageCode: string; /** - * Calls CreateEntityType. - * @param request CreateEntityTypeRequest message or plain object - * @returns Promise + * Creates a new CreateEntityTypeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateEntityTypeRequest instance */ - public createEntityType(request: google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest): Promise; + public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest): google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest; /** - * Calls UpdateEntityType. - * @param request UpdateEntityTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EntityType + * Encodes the specified CreateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest.verify|verify} messages. + * @param message CreateEntityTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public updateEntityType(request: google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3.EntityTypes.UpdateEntityTypeCallback): void; + public static encode(message: google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls UpdateEntityType. - * @param request UpdateEntityTypeRequest message or plain object - * @returns Promise + * Encodes the specified CreateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest.verify|verify} messages. + * @param message CreateEntityTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public updateEntityType(request: google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest): Promise; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls DeleteEntityType. - * @param request DeleteEntityTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Decodes a CreateEntityTypeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateEntityTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public deleteEntityType(request: google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3.EntityTypes.DeleteEntityTypeCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest; /** - * Calls DeleteEntityType. - * @param request DeleteEntityTypeRequest message or plain object - * @returns Promise + * Decodes a CreateEntityTypeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateEntityTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public deleteEntityType(request: google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest): Promise; - } - - namespace EntityTypes { + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|listEntityTypes}. - * @param error Error, if any - * @param [response] ListEntityTypesResponse + * Verifies a CreateEntityTypeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type ListEntityTypesCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListEntityTypesResponse) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|getEntityType}. - * @param error Error, if any - * @param [response] EntityType + * Creates a CreateEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateEntityTypeRequest */ - type GetEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.EntityType) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|createEntityType}. - * @param error Error, if any - * @param [response] EntityType + * Creates a plain object from a CreateEntityTypeRequest message. Also converts values to other types if specified. + * @param message CreateEntityTypeRequest + * @param [options] Conversion options + * @returns Plain object */ - type CreateEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.EntityType) => void; + public static toObject(message: google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|updateEntityType}. - * @param error Error, if any - * @param [response] EntityType + * Converts this CreateEntityTypeRequest to JSON. + * @returns JSON object */ - type UpdateEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.EntityType) => void; + public toJSON(): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|deleteEntityType}. - * @param error Error, if any - * @param [response] Empty + * Gets the default type url for CreateEntityTypeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - type DeleteEntityTypeCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an EntityType. */ - interface IEntityType { - - /** EntityType name */ - name?: (string|null); - - /** EntityType displayName */ - displayName?: (string|null); - - /** EntityType kind */ - kind?: (google.cloud.dialogflow.cx.v3.EntityType.Kind|keyof typeof google.cloud.dialogflow.cx.v3.EntityType.Kind|null); - - /** EntityType autoExpansionMode */ - autoExpansionMode?: (google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode|keyof typeof google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode|null); - - /** EntityType entities */ - entities?: (google.cloud.dialogflow.cx.v3.EntityType.IEntity[]|null); + /** Properties of an UpdateEntityTypeRequest. */ + interface IUpdateEntityTypeRequest { - /** EntityType excludedPhrases */ - excludedPhrases?: (google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase[]|null); + /** UpdateEntityTypeRequest entityType */ + entityType?: (google.cloud.dialogflow.cx.v3.IEntityType|null); - /** EntityType enableFuzzyExtraction */ - enableFuzzyExtraction?: (boolean|null); + /** UpdateEntityTypeRequest languageCode */ + languageCode?: (string|null); - /** EntityType redact */ - redact?: (boolean|null); + /** UpdateEntityTypeRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents an EntityType. */ - class EntityType implements IEntityType { + /** Represents an UpdateEntityTypeRequest. */ + class UpdateEntityTypeRequest implements IUpdateEntityTypeRequest { /** - * Constructs a new EntityType. + * Constructs a new UpdateEntityTypeRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IEntityType); - - /** EntityType name. */ - public name: string; - - /** EntityType displayName. */ - public displayName: string; - - /** EntityType kind. */ - public kind: (google.cloud.dialogflow.cx.v3.EntityType.Kind|keyof typeof google.cloud.dialogflow.cx.v3.EntityType.Kind); - - /** EntityType autoExpansionMode. */ - public autoExpansionMode: (google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode|keyof typeof google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode); - - /** EntityType entities. */ - public entities: google.cloud.dialogflow.cx.v3.EntityType.IEntity[]; + constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest); - /** EntityType excludedPhrases. */ - public excludedPhrases: google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase[]; + /** UpdateEntityTypeRequest entityType. */ + public entityType?: (google.cloud.dialogflow.cx.v3.IEntityType|null); - /** EntityType enableFuzzyExtraction. */ - public enableFuzzyExtraction: boolean; + /** UpdateEntityTypeRequest languageCode. */ + public languageCode: string; - /** EntityType redact. */ - public redact: boolean; + /** UpdateEntityTypeRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new EntityType instance using the specified properties. + * Creates a new UpdateEntityTypeRequest instance using the specified properties. * @param [properties] Properties to set - * @returns EntityType instance + * @returns UpdateEntityTypeRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IEntityType): google.cloud.dialogflow.cx.v3.EntityType; + public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest): google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest; /** - * Encodes the specified EntityType message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.verify|verify} messages. - * @param message EntityType message or plain object to encode + * Encodes the specified UpdateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest.verify|verify} messages. + * @param message UpdateEntityTypeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IEntityType, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EntityType message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.verify|verify} messages. - * @param message EntityType message or plain object to encode + * Encodes the specified UpdateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest.verify|verify} messages. + * @param message UpdateEntityTypeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IEntityType, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EntityType message from the specified reader or buffer. + * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EntityType + * @returns UpdateEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.EntityType; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest; /** - * Decodes an EntityType message from the specified reader or buffer, length delimited. + * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EntityType + * @returns UpdateEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.EntityType; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest; /** - * Verifies an EntityType message. + * Verifies an UpdateEntityTypeRequest message. * @param message Plain 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 EntityType message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateEntityTypeRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EntityType + * @returns UpdateEntityTypeRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.EntityType; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest; /** - * Creates a plain object from an EntityType message. Also converts values to other types if specified. - * @param message EntityType + * Creates a plain object from an UpdateEntityTypeRequest message. Also converts values to other types if specified. + * @param message UpdateEntityTypeRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.EntityType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EntityType to JSON. + * Converts this UpdateEntityTypeRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EntityType + * Gets the default type url for UpdateEntityTypeRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace EntityType { - - /** Kind enum. */ - enum Kind { - KIND_UNSPECIFIED = 0, - KIND_MAP = 1, - KIND_LIST = 2, - KIND_REGEXP = 3 - } - - /** AutoExpansionMode enum. */ - enum AutoExpansionMode { - AUTO_EXPANSION_MODE_UNSPECIFIED = 0, - AUTO_EXPANSION_MODE_DEFAULT = 1 - } - - /** Properties of an Entity. */ - interface IEntity { - - /** Entity value */ - value?: (string|null); - - /** Entity synonyms */ - synonyms?: (string[]|null); - } - - /** Represents an Entity. */ - class Entity implements IEntity { - - /** - * Constructs a new Entity. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.EntityType.IEntity); - - /** Entity value. */ - public value: string; - - /** Entity synonyms. */ - public synonyms: string[]; - - /** - * Creates a new Entity instance using the specified properties. - * @param [properties] Properties to set - * @returns Entity instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.EntityType.IEntity): google.cloud.dialogflow.cx.v3.EntityType.Entity; - - /** - * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.Entity.verify|verify} messages. - * @param message Entity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.EntityType.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.Entity.verify|verify} messages. - * @param message Entity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.EntityType.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Entity message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Entity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.EntityType.Entity; - - /** - * Decodes an Entity message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Entity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.EntityType.Entity; - - /** - * Verifies an Entity message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Entity message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Entity - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.EntityType.Entity; - - /** - * Creates a plain object from an Entity message. Also converts values to other types if specified. - * @param message Entity - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.EntityType.Entity, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Entity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Entity - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExcludedPhrase. */ - interface IExcludedPhrase { - - /** ExcludedPhrase value */ - value?: (string|null); - } - - /** Represents an ExcludedPhrase. */ - class ExcludedPhrase implements IExcludedPhrase { - - /** - * Constructs a new ExcludedPhrase. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase); - - /** ExcludedPhrase value. */ - public value: string; - - /** - * Creates a new ExcludedPhrase instance using the specified properties. - * @param [properties] Properties to set - * @returns ExcludedPhrase instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase): google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase; - - /** - * Encodes the specified ExcludedPhrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.verify|verify} messages. - * @param message ExcludedPhrase message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExcludedPhrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.verify|verify} messages. - * @param message ExcludedPhrase message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExcludedPhrase message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExcludedPhrase - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase; - - /** - * Decodes an ExcludedPhrase message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExcludedPhrase - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase; - - /** - * Verifies an ExcludedPhrase message. - * @param message Plain 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 ExcludedPhrase message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExcludedPhrase - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase; - - /** - * Creates a plain object from an ExcludedPhrase message. Also converts values to other types if specified. - * @param message ExcludedPhrase - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExcludedPhrase to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExcludedPhrase - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a ListEntityTypesRequest. */ - interface IListEntityTypesRequest { - - /** ListEntityTypesRequest parent */ - parent?: (string|null); - - /** ListEntityTypesRequest languageCode */ - languageCode?: (string|null); + /** Properties of a DeleteEntityTypeRequest. */ + interface IDeleteEntityTypeRequest { - /** ListEntityTypesRequest pageSize */ - pageSize?: (number|null); + /** DeleteEntityTypeRequest name */ + name?: (string|null); - /** ListEntityTypesRequest pageToken */ - pageToken?: (string|null); + /** DeleteEntityTypeRequest force */ + force?: (boolean|null); } - /** Represents a ListEntityTypesRequest. */ - class ListEntityTypesRequest implements IListEntityTypesRequest { + /** Represents a DeleteEntityTypeRequest. */ + class DeleteEntityTypeRequest implements IDeleteEntityTypeRequest { /** - * Constructs a new ListEntityTypesRequest. + * Constructs a new DeleteEntityTypeRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListEntityTypesRequest); - - /** ListEntityTypesRequest parent. */ - public parent: string; - - /** ListEntityTypesRequest languageCode. */ - public languageCode: string; + constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest); - /** ListEntityTypesRequest pageSize. */ - public pageSize: number; + /** DeleteEntityTypeRequest name. */ + public name: string; - /** ListEntityTypesRequest pageToken. */ - public pageToken: string; + /** DeleteEntityTypeRequest force. */ + public force: boolean; /** - * Creates a new ListEntityTypesRequest instance using the specified properties. + * Creates a new DeleteEntityTypeRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListEntityTypesRequest instance + * @returns DeleteEntityTypeRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListEntityTypesRequest): google.cloud.dialogflow.cx.v3.ListEntityTypesRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest): google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest; /** - * Encodes the specified ListEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesRequest.verify|verify} messages. - * @param message ListEntityTypesRequest message or plain object to encode + * Encodes the specified DeleteEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest.verify|verify} messages. + * @param message DeleteEntityTypeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesRequest.verify|verify} messages. - * @param message ListEntityTypesRequest message or plain object to encode + * Encodes the specified DeleteEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest.verify|verify} messages. + * @param message DeleteEntityTypeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListEntityTypesRequest message from the specified reader or buffer. + * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListEntityTypesRequest + * @returns DeleteEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListEntityTypesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest; /** - * Decodes a ListEntityTypesRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListEntityTypesRequest + * @returns DeleteEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListEntityTypesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest; /** - * Verifies a ListEntityTypesRequest message. + * Verifies a DeleteEntityTypeRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListEntityTypesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteEntityTypeRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListEntityTypesRequest + * @returns DeleteEntityTypeRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListEntityTypesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest; /** - * Creates a plain object from a ListEntityTypesRequest message. Also converts values to other types if specified. - * @param message ListEntityTypesRequest + * Creates a plain object from a DeleteEntityTypeRequest message. Also converts values to other types if specified. + * @param message DeleteEntityTypeRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListEntityTypesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListEntityTypesRequest to JSON. + * Converts this DeleteEntityTypeRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListEntityTypesRequest + * Gets the default type url for DeleteEntityTypeRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListEntityTypesResponse. */ - interface IListEntityTypesResponse { - - /** ListEntityTypesResponse entityTypes */ - entityTypes?: (google.cloud.dialogflow.cx.v3.IEntityType[]|null); - - /** ListEntityTypesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListEntityTypesResponse. */ - class ListEntityTypesResponse implements IListEntityTypesResponse { + /** Represents an Environments */ + class Environments extends $protobuf.rpc.Service { /** - * Constructs a new ListEntityTypesResponse. - * @param [properties] Properties to set + * Constructs a new Environments service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListEntityTypesResponse); - - /** ListEntityTypesResponse entityTypes. */ - public entityTypes: google.cloud.dialogflow.cx.v3.IEntityType[]; - - /** ListEntityTypesResponse nextPageToken. */ - public nextPageToken: string; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates a new ListEntityTypesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEntityTypesResponse instance + * Creates new Environments 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(properties?: google.cloud.dialogflow.cx.v3.IListEntityTypesResponse): google.cloud.dialogflow.cx.v3.ListEntityTypesResponse; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Environments; /** - * Encodes the specified ListEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesResponse.verify|verify} messages. - * @param message ListEntityTypesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListEnvironments. + * @param request ListEnvironmentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEnvironmentsResponse */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public listEnvironments(request: google.cloud.dialogflow.cx.v3.IListEnvironmentsRequest, callback: google.cloud.dialogflow.cx.v3.Environments.ListEnvironmentsCallback): void; /** - * Encodes the specified ListEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesResponse.verify|verify} messages. - * @param message ListEntityTypesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListEnvironments. + * @param request ListEnvironmentsRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public listEnvironments(request: google.cloud.dialogflow.cx.v3.IListEnvironmentsRequest): Promise; /** - * Decodes a ListEntityTypesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListEntityTypesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetEnvironment. + * @param request GetEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Environment */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListEntityTypesResponse; + public getEnvironment(request: google.cloud.dialogflow.cx.v3.IGetEnvironmentRequest, callback: google.cloud.dialogflow.cx.v3.Environments.GetEnvironmentCallback): void; /** - * Decodes a ListEntityTypesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListEntityTypesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetEnvironment. + * @param request GetEnvironmentRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListEntityTypesResponse; + public getEnvironment(request: google.cloud.dialogflow.cx.v3.IGetEnvironmentRequest): Promise; /** - * Verifies a ListEntityTypesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls CreateEnvironment. + * @param request CreateEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static verify(message: { [k: string]: any }): (string|null); + public createEnvironment(request: google.cloud.dialogflow.cx.v3.ICreateEnvironmentRequest, callback: google.cloud.dialogflow.cx.v3.Environments.CreateEnvironmentCallback): void; /** - * Creates a ListEntityTypesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListEntityTypesResponse + * Calls CreateEnvironment. + * @param request CreateEnvironmentRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListEntityTypesResponse; + public createEnvironment(request: google.cloud.dialogflow.cx.v3.ICreateEnvironmentRequest): Promise; /** - * Creates a plain object from a ListEntityTypesResponse message. Also converts values to other types if specified. - * @param message ListEntityTypesResponse - * @param [options] Conversion options - * @returns Plain object + * Calls UpdateEnvironment. + * @param request UpdateEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListEntityTypesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public updateEnvironment(request: google.cloud.dialogflow.cx.v3.IUpdateEnvironmentRequest, callback: google.cloud.dialogflow.cx.v3.Environments.UpdateEnvironmentCallback): void; /** - * Converts this ListEntityTypesResponse to JSON. - * @returns JSON object + * Calls UpdateEnvironment. + * @param request UpdateEnvironmentRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; + public updateEnvironment(request: google.cloud.dialogflow.cx.v3.IUpdateEnvironmentRequest): Promise; /** - * Gets the default type url for ListEntityTypesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Calls DeleteEnvironment. + * @param request DeleteEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetEntityTypeRequest. */ - interface IGetEntityTypeRequest { - - /** GetEntityTypeRequest name */ - name?: (string|null); - - /** GetEntityTypeRequest languageCode */ - languageCode?: (string|null); - } - - /** Represents a GetEntityTypeRequest. */ - class GetEntityTypeRequest implements IGetEntityTypeRequest { + public deleteEnvironment(request: google.cloud.dialogflow.cx.v3.IDeleteEnvironmentRequest, callback: google.cloud.dialogflow.cx.v3.Environments.DeleteEnvironmentCallback): void; /** - * Constructs a new GetEntityTypeRequest. - * @param [properties] Properties to set + * Calls DeleteEnvironment. + * @param request DeleteEnvironmentRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest); - - /** GetEntityTypeRequest name. */ - public name: string; + public deleteEnvironment(request: google.cloud.dialogflow.cx.v3.IDeleteEnvironmentRequest): Promise; - /** GetEntityTypeRequest languageCode. */ - public languageCode: string; + /** + * Calls LookupEnvironmentHistory. + * @param request LookupEnvironmentHistoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LookupEnvironmentHistoryResponse + */ + public lookupEnvironmentHistory(request: google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryRequest, callback: google.cloud.dialogflow.cx.v3.Environments.LookupEnvironmentHistoryCallback): void; /** - * Creates a new GetEntityTypeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetEntityTypeRequest instance + * Calls LookupEnvironmentHistory. + * @param request LookupEnvironmentHistoryRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest): google.cloud.dialogflow.cx.v3.GetEntityTypeRequest; + public lookupEnvironmentHistory(request: google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryRequest): Promise; /** - * Encodes the specified GetEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetEntityTypeRequest.verify|verify} messages. - * @param message GetEntityTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls RunContinuousTest. + * @param request RunContinuousTestRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static encode(message: google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public runContinuousTest(request: google.cloud.dialogflow.cx.v3.IRunContinuousTestRequest, callback: google.cloud.dialogflow.cx.v3.Environments.RunContinuousTestCallback): void; /** - * Encodes the specified GetEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetEntityTypeRequest.verify|verify} messages. - * @param message GetEntityTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls RunContinuousTest. + * @param request RunContinuousTestRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetEntityTypeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetEntityTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetEntityTypeRequest; - - /** - * Decodes a GetEntityTypeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetEntityTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetEntityTypeRequest; - - /** - * Verifies a GetEntityTypeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetEntityTypeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetEntityTypeRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetEntityTypeRequest; - - /** - * Creates a plain object from a GetEntityTypeRequest message. Also converts values to other types if specified. - * @param message GetEntityTypeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.GetEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetEntityTypeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetEntityTypeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateEntityTypeRequest. */ - interface ICreateEntityTypeRequest { - - /** CreateEntityTypeRequest parent */ - parent?: (string|null); - - /** CreateEntityTypeRequest entityType */ - entityType?: (google.cloud.dialogflow.cx.v3.IEntityType|null); - - /** CreateEntityTypeRequest languageCode */ - languageCode?: (string|null); - } - - /** Represents a CreateEntityTypeRequest. */ - class CreateEntityTypeRequest implements ICreateEntityTypeRequest { - - /** - * Constructs a new CreateEntityTypeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest); - - /** CreateEntityTypeRequest parent. */ - public parent: string; - - /** CreateEntityTypeRequest entityType. */ - public entityType?: (google.cloud.dialogflow.cx.v3.IEntityType|null); - - /** CreateEntityTypeRequest languageCode. */ - public languageCode: string; - - /** - * Creates a new CreateEntityTypeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateEntityTypeRequest instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest): google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest; - - /** - * Encodes the specified CreateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest.verify|verify} messages. - * @param message CreateEntityTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest.verify|verify} messages. - * @param message CreateEntityTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateEntityTypeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateEntityTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest; - - /** - * Decodes a CreateEntityTypeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateEntityTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest; - - /** - * Verifies a CreateEntityTypeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateEntityTypeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateEntityTypeRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest; - - /** - * Creates a plain object from a CreateEntityTypeRequest message. Also converts values to other types if specified. - * @param message CreateEntityTypeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateEntityTypeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateEntityTypeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateEntityTypeRequest. */ - interface IUpdateEntityTypeRequest { - - /** UpdateEntityTypeRequest entityType */ - entityType?: (google.cloud.dialogflow.cx.v3.IEntityType|null); - - /** UpdateEntityTypeRequest languageCode */ - languageCode?: (string|null); - - /** UpdateEntityTypeRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateEntityTypeRequest. */ - class UpdateEntityTypeRequest implements IUpdateEntityTypeRequest { - - /** - * Constructs a new UpdateEntityTypeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest); - - /** UpdateEntityTypeRequest entityType. */ - public entityType?: (google.cloud.dialogflow.cx.v3.IEntityType|null); - - /** UpdateEntityTypeRequest languageCode. */ - public languageCode: string; - - /** UpdateEntityTypeRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateEntityTypeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateEntityTypeRequest instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest): google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest; - - /** - * Encodes the specified UpdateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest.verify|verify} messages. - * @param message UpdateEntityTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest.verify|verify} messages. - * @param message UpdateEntityTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateEntityTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest; - - /** - * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateEntityTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest; - - /** - * Verifies an UpdateEntityTypeRequest message. - * @param message Plain 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 UpdateEntityTypeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateEntityTypeRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest; - - /** - * Creates a plain object from an UpdateEntityTypeRequest message. Also converts values to other types if specified. - * @param message UpdateEntityTypeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateEntityTypeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateEntityTypeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteEntityTypeRequest. */ - interface IDeleteEntityTypeRequest { - - /** DeleteEntityTypeRequest name */ - name?: (string|null); - - /** DeleteEntityTypeRequest force */ - force?: (boolean|null); - } - - /** Represents a DeleteEntityTypeRequest. */ - class DeleteEntityTypeRequest implements IDeleteEntityTypeRequest { - - /** - * Constructs a new DeleteEntityTypeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest); - - /** DeleteEntityTypeRequest name. */ - public name: string; - - /** DeleteEntityTypeRequest force. */ - public force: boolean; - - /** - * Creates a new DeleteEntityTypeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteEntityTypeRequest instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest): google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest; - - /** - * Encodes the specified DeleteEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest.verify|verify} messages. - * @param message DeleteEntityTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest.verify|verify} messages. - * @param message DeleteEntityTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteEntityTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest; - - /** - * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteEntityTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest; - - /** - * Verifies a DeleteEntityTypeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteEntityTypeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteEntityTypeRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest; - - /** - * Creates a plain object from a DeleteEntityTypeRequest message. Also converts values to other types if specified. - * @param message DeleteEntityTypeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteEntityTypeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteEntityTypeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Represents an Environments */ - class Environments extends $protobuf.rpc.Service { - - /** - * Constructs a new Environments 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 Environments 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): Environments; - - /** - * Calls ListEnvironments. - * @param request ListEnvironmentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListEnvironmentsResponse - */ - public listEnvironments(request: google.cloud.dialogflow.cx.v3.IListEnvironmentsRequest, callback: google.cloud.dialogflow.cx.v3.Environments.ListEnvironmentsCallback): void; - - /** - * Calls ListEnvironments. - * @param request ListEnvironmentsRequest message or plain object - * @returns Promise - */ - public listEnvironments(request: google.cloud.dialogflow.cx.v3.IListEnvironmentsRequest): Promise; - - /** - * Calls GetEnvironment. - * @param request GetEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Environment - */ - public getEnvironment(request: google.cloud.dialogflow.cx.v3.IGetEnvironmentRequest, callback: google.cloud.dialogflow.cx.v3.Environments.GetEnvironmentCallback): void; - - /** - * Calls GetEnvironment. - * @param request GetEnvironmentRequest message or plain object - * @returns Promise - */ - public getEnvironment(request: google.cloud.dialogflow.cx.v3.IGetEnvironmentRequest): Promise; - - /** - * Calls CreateEnvironment. - * @param request CreateEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createEnvironment(request: google.cloud.dialogflow.cx.v3.ICreateEnvironmentRequest, callback: google.cloud.dialogflow.cx.v3.Environments.CreateEnvironmentCallback): void; - - /** - * Calls CreateEnvironment. - * @param request CreateEnvironmentRequest message or plain object - * @returns Promise - */ - public createEnvironment(request: google.cloud.dialogflow.cx.v3.ICreateEnvironmentRequest): Promise; - - /** - * Calls UpdateEnvironment. - * @param request UpdateEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateEnvironment(request: google.cloud.dialogflow.cx.v3.IUpdateEnvironmentRequest, callback: google.cloud.dialogflow.cx.v3.Environments.UpdateEnvironmentCallback): void; - - /** - * Calls UpdateEnvironment. - * @param request UpdateEnvironmentRequest message or plain object - * @returns Promise - */ - public updateEnvironment(request: google.cloud.dialogflow.cx.v3.IUpdateEnvironmentRequest): Promise; - - /** - * Calls DeleteEnvironment. - * @param request DeleteEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteEnvironment(request: google.cloud.dialogflow.cx.v3.IDeleteEnvironmentRequest, callback: google.cloud.dialogflow.cx.v3.Environments.DeleteEnvironmentCallback): void; - - /** - * Calls DeleteEnvironment. - * @param request DeleteEnvironmentRequest message or plain object - * @returns Promise - */ - public deleteEnvironment(request: google.cloud.dialogflow.cx.v3.IDeleteEnvironmentRequest): Promise; - - /** - * Calls LookupEnvironmentHistory. - * @param request LookupEnvironmentHistoryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LookupEnvironmentHistoryResponse - */ - public lookupEnvironmentHistory(request: google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryRequest, callback: google.cloud.dialogflow.cx.v3.Environments.LookupEnvironmentHistoryCallback): void; - - /** - * Calls LookupEnvironmentHistory. - * @param request LookupEnvironmentHistoryRequest message or plain object - * @returns Promise - */ - public lookupEnvironmentHistory(request: google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryRequest): Promise; - - /** - * Calls RunContinuousTest. - * @param request RunContinuousTestRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public runContinuousTest(request: google.cloud.dialogflow.cx.v3.IRunContinuousTestRequest, callback: google.cloud.dialogflow.cx.v3.Environments.RunContinuousTestCallback): void; - - /** - * Calls RunContinuousTest. - * @param request RunContinuousTestRequest message or plain object - * @returns Promise - */ - public runContinuousTest(request: google.cloud.dialogflow.cx.v3.IRunContinuousTestRequest): Promise; + public runContinuousTest(request: google.cloud.dialogflow.cx.v3.IRunContinuousTestRequest): Promise; /** * Calls ListContinuousTestResults. @@ -29923,6 +30129,9 @@ export namespace google { /** Properties of an AdvancedSettings. */ interface IAdvancedSettings { + /** AdvancedSettings audioExportGcsDestination */ + audioExportGcsDestination?: (google.cloud.dialogflow.cx.v3beta1.IGcsDestination|null); + /** AdvancedSettings loggingSettings */ loggingSettings?: (google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.ILoggingSettings|null); } @@ -29936,6 +30145,9 @@ export namespace google { */ constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings); + /** AdvancedSettings audioExportGcsDestination. */ + public audioExportGcsDestination?: (google.cloud.dialogflow.cx.v3beta1.IGcsDestination|null); + /** AdvancedSettings loggingSettings. */ public loggingSettings?: (google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.ILoggingSettings|null); @@ -30123,6 +30335,103 @@ export namespace google { } } + /** Properties of a GcsDestination. */ + interface IGcsDestination { + + /** GcsDestination uri */ + uri?: (string|null); + } + + /** Represents a GcsDestination. */ + class GcsDestination implements IGcsDestination { + + /** + * Constructs a new GcsDestination. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGcsDestination); + + /** GcsDestination uri. */ + public uri: string; + + /** + * Creates a new GcsDestination instance using the specified properties. + * @param [properties] Properties to set + * @returns GcsDestination instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGcsDestination): google.cloud.dialogflow.cx.v3beta1.GcsDestination; + + /** + * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GcsDestination.verify|verify} messages. + * @param message GcsDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GcsDestination.verify|verify} messages. + * @param message GcsDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcsDestination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcsDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GcsDestination; + + /** + * Decodes a GcsDestination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcsDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GcsDestination; + + /** + * Verifies a GcsDestination message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcsDestination + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GcsDestination; + + /** + * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. + * @param message GcsDestination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GcsDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcsDestination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcsDestination + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Represents an Agents */ class Agents extends $protobuf.rpc.Service { @@ -30477,6 +30786,9 @@ export namespace google { /** Agent advancedSettings */ advancedSettings?: (google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null); + + /** Agent textToSpeechSettings */ + textToSpeechSettings?: (google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings|null); } /** Represents an Agent. */ @@ -30530,6 +30842,9 @@ export namespace google { /** Agent advancedSettings. */ public advancedSettings?: (google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null); + /** Agent textToSpeechSettings. */ + public textToSpeechSettings?: (google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings|null); + /** * Creates a new Agent instance using the specified properties. * @param [properties] Properties to set @@ -31888,3255 +32203,3971 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a Flows */ - class Flows extends $protobuf.rpc.Service { + /** AudioEncoding enum. */ + enum AudioEncoding { + AUDIO_ENCODING_UNSPECIFIED = 0, + AUDIO_ENCODING_LINEAR_16 = 1, + AUDIO_ENCODING_FLAC = 2, + AUDIO_ENCODING_MULAW = 3, + AUDIO_ENCODING_AMR = 4, + AUDIO_ENCODING_AMR_WB = 5, + AUDIO_ENCODING_OGG_OPUS = 6, + AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7 + } - /** - * Constructs a new Flows 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); + /** SpeechModelVariant enum. */ + enum SpeechModelVariant { + SPEECH_MODEL_VARIANT_UNSPECIFIED = 0, + USE_BEST_AVAILABLE = 1, + USE_STANDARD = 2, + USE_ENHANCED = 3 + } - /** - * Creates new Flows 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): Flows; + /** Properties of a SpeechWordInfo. */ + interface ISpeechWordInfo { - /** - * Calls CreateFlow. - * @param request CreateFlowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Flow - */ - public createFlow(request: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.CreateFlowCallback): void; + /** SpeechWordInfo word */ + word?: (string|null); - /** - * Calls CreateFlow. - * @param request CreateFlowRequest message or plain object - * @returns Promise - */ - public createFlow(request: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest): Promise; + /** SpeechWordInfo startOffset */ + startOffset?: (google.protobuf.IDuration|null); - /** - * Calls DeleteFlow. - * @param request DeleteFlowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteFlow(request: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.DeleteFlowCallback): void; + /** SpeechWordInfo endOffset */ + endOffset?: (google.protobuf.IDuration|null); - /** - * Calls DeleteFlow. - * @param request DeleteFlowRequest message or plain object - * @returns Promise - */ - public deleteFlow(request: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest): Promise; + /** SpeechWordInfo confidence */ + confidence?: (number|null); + } - /** - * Calls ListFlows. - * @param request ListFlowsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListFlowsResponse - */ - public listFlows(request: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.ListFlowsCallback): void; + /** Represents a SpeechWordInfo. */ + class SpeechWordInfo implements ISpeechWordInfo { /** - * Calls ListFlows. - * @param request ListFlowsRequest message or plain object - * @returns Promise + * Constructs a new SpeechWordInfo. + * @param [properties] Properties to set */ - public listFlows(request: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest): Promise; + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo); - /** - * Calls GetFlow. - * @param request GetFlowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Flow - */ - public getFlow(request: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowCallback): void; + /** SpeechWordInfo word. */ + public word: string; - /** - * Calls GetFlow. - * @param request GetFlowRequest message or plain object - * @returns Promise - */ - public getFlow(request: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest): Promise; + /** SpeechWordInfo startOffset. */ + public startOffset?: (google.protobuf.IDuration|null); - /** - * Calls UpdateFlow. - * @param request UpdateFlowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Flow - */ - public updateFlow(request: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.UpdateFlowCallback): void; + /** SpeechWordInfo endOffset. */ + public endOffset?: (google.protobuf.IDuration|null); + + /** SpeechWordInfo confidence. */ + public confidence: number; /** - * Calls UpdateFlow. - * @param request UpdateFlowRequest message or plain object - * @returns Promise + * Creates a new SpeechWordInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SpeechWordInfo instance */ - public updateFlow(request: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest): Promise; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo): google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo; /** - * Calls TrainFlow. - * @param request TrainFlowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Encodes the specified SpeechWordInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.verify|verify} messages. + * @param message SpeechWordInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public trainFlow(request: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.TrainFlowCallback): void; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls TrainFlow. - * @param request TrainFlowRequest message or plain object - * @returns Promise + * Encodes the specified SpeechWordInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.verify|verify} messages. + * @param message SpeechWordInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public trainFlow(request: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest): Promise; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ValidateFlow. - * @param request ValidateFlowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and FlowValidationResult + * Decodes a SpeechWordInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SpeechWordInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public validateFlow(request: google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.ValidateFlowCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo; /** - * Calls ValidateFlow. - * @param request ValidateFlowRequest message or plain object - * @returns Promise + * Decodes a SpeechWordInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SpeechWordInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public validateFlow(request: google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo; /** - * Calls GetFlowValidationResult. - * @param request GetFlowValidationResultRequest message or plain object - * @param callback Node-style callback called with the error, if any, and FlowValidationResult + * Verifies a SpeechWordInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public getFlowValidationResult(request: google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowValidationResultCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls GetFlowValidationResult. - * @param request GetFlowValidationResultRequest message or plain object - * @returns Promise + * Creates a SpeechWordInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SpeechWordInfo */ - public getFlowValidationResult(request: google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo; /** - * Calls ImportFlow. - * @param request ImportFlowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a plain object from a SpeechWordInfo message. Also converts values to other types if specified. + * @param message SpeechWordInfo + * @param [options] Conversion options + * @returns Plain object */ - public importFlow(request: google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.ImportFlowCallback): void; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls ImportFlow. - * @param request ImportFlowRequest message or plain object - * @returns Promise + * Converts this SpeechWordInfo to JSON. + * @returns JSON object */ - public importFlow(request: google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest): Promise; + public toJSON(): { [k: string]: any }; /** - * Calls ExportFlow. - * @param request ExportFlowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Gets the default type url for SpeechWordInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public exportFlow(request: google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.ExportFlowCallback): void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InputAudioConfig. */ + interface IInputAudioConfig { + + /** InputAudioConfig audioEncoding */ + audioEncoding?: (google.cloud.dialogflow.cx.v3beta1.AudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3beta1.AudioEncoding|null); + + /** InputAudioConfig sampleRateHertz */ + sampleRateHertz?: (number|null); + + /** InputAudioConfig enableWordInfo */ + enableWordInfo?: (boolean|null); + + /** InputAudioConfig phraseHints */ + phraseHints?: (string[]|null); + + /** InputAudioConfig model */ + model?: (string|null); + + /** InputAudioConfig modelVariant */ + modelVariant?: (google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant|keyof typeof google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant|null); + + /** InputAudioConfig singleUtterance */ + singleUtterance?: (boolean|null); + } + + /** Represents an InputAudioConfig. */ + class InputAudioConfig implements IInputAudioConfig { /** - * Calls ExportFlow. - * @param request ExportFlowRequest message or plain object - * @returns Promise + * Constructs a new InputAudioConfig. + * @param [properties] Properties to set */ - public exportFlow(request: google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest): Promise; - } + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig); - namespace Flows { + /** InputAudioConfig audioEncoding. */ + public audioEncoding: (google.cloud.dialogflow.cx.v3beta1.AudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3beta1.AudioEncoding); + + /** InputAudioConfig sampleRateHertz. */ + public sampleRateHertz: number; + + /** InputAudioConfig enableWordInfo. */ + public enableWordInfo: boolean; + + /** InputAudioConfig phraseHints. */ + public phraseHints: string[]; + + /** InputAudioConfig model. */ + public model: string; + + /** InputAudioConfig modelVariant. */ + public modelVariant: (google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant|keyof typeof google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant); + + /** InputAudioConfig singleUtterance. */ + public singleUtterance: boolean; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|createFlow}. - * @param error Error, if any - * @param [response] Flow + * Creates a new InputAudioConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns InputAudioConfig instance */ - type CreateFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Flow) => void; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig): google.cloud.dialogflow.cx.v3beta1.InputAudioConfig; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|deleteFlow}. - * @param error Error, if any - * @param [response] Empty + * Encodes the specified InputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.verify|verify} messages. + * @param message InputAudioConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type DeleteFlowCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|listFlows}. - * @param error Error, if any - * @param [response] ListFlowsResponse + * Encodes the specified InputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.verify|verify} messages. + * @param message InputAudioConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type ListFlowsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse) => void; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|getFlow}. - * @param error Error, if any - * @param [response] Flow + * Decodes an InputAudioConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InputAudioConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type GetFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Flow) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.InputAudioConfig; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|updateFlow}. - * @param error Error, if any - * @param [response] Flow + * Decodes an InputAudioConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InputAudioConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type UpdateFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Flow) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.InputAudioConfig; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|trainFlow}. - * @param error Error, if any - * @param [response] Operation + * Verifies an InputAudioConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type TrainFlowCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|validateFlow}. - * @param error Error, if any - * @param [response] FlowValidationResult + * Creates an InputAudioConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InputAudioConfig */ - type ValidateFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.FlowValidationResult) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.InputAudioConfig; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|getFlowValidationResult}. - * @param error Error, if any - * @param [response] FlowValidationResult + * Creates a plain object from an InputAudioConfig message. Also converts values to other types if specified. + * @param message InputAudioConfig + * @param [options] Conversion options + * @returns Plain object */ - type GetFlowValidationResultCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.FlowValidationResult) => void; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.InputAudioConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|importFlow}. - * @param error Error, if any - * @param [response] Operation + * Converts this InputAudioConfig to JSON. + * @returns JSON object */ - type ImportFlowCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public toJSON(): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|exportFlow}. - * @param error Error, if any - * @param [response] Operation + * Gets the default type url for InputAudioConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - type ExportFlowCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a NluSettings. */ - interface INluSettings { + /** SsmlVoiceGender enum. */ + enum SsmlVoiceGender { + SSML_VOICE_GENDER_UNSPECIFIED = 0, + SSML_VOICE_GENDER_MALE = 1, + SSML_VOICE_GENDER_FEMALE = 2, + SSML_VOICE_GENDER_NEUTRAL = 3 + } - /** NluSettings modelType */ - modelType?: (google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType|keyof typeof google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType|null); + /** Properties of a VoiceSelectionParams. */ + interface IVoiceSelectionParams { - /** NluSettings classificationThreshold */ - classificationThreshold?: (number|null); + /** VoiceSelectionParams name */ + name?: (string|null); - /** NluSettings modelTrainingMode */ - modelTrainingMode?: (google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode|keyof typeof google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode|null); + /** VoiceSelectionParams ssmlGender */ + ssmlGender?: (google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender|keyof typeof google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender|null); } - /** Represents a NluSettings. */ - class NluSettings implements INluSettings { + /** Represents a VoiceSelectionParams. */ + class VoiceSelectionParams implements IVoiceSelectionParams { /** - * Constructs a new NluSettings. + * Constructs a new VoiceSelectionParams. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.INluSettings); - - /** NluSettings modelType. */ - public modelType: (google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType|keyof typeof google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams); - /** NluSettings classificationThreshold. */ - public classificationThreshold: number; + /** VoiceSelectionParams name. */ + public name: string; - /** NluSettings modelTrainingMode. */ - public modelTrainingMode: (google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode|keyof typeof google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode); + /** VoiceSelectionParams ssmlGender. */ + public ssmlGender: (google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender|keyof typeof google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender); /** - * Creates a new NluSettings instance using the specified properties. + * Creates a new VoiceSelectionParams instance using the specified properties. * @param [properties] Properties to set - * @returns NluSettings instance + * @returns VoiceSelectionParams instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.INluSettings): google.cloud.dialogflow.cx.v3beta1.NluSettings; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams): google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams; /** - * Encodes the specified NluSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.NluSettings.verify|verify} messages. - * @param message NluSettings message or plain object to encode + * Encodes the specified VoiceSelectionParams message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify|verify} messages. + * @param message VoiceSelectionParams message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.INluSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NluSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.NluSettings.verify|verify} messages. - * @param message NluSettings message or plain object to encode + * Encodes the specified VoiceSelectionParams message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify|verify} messages. + * @param message VoiceSelectionParams message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.INluSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NluSettings message from the specified reader or buffer. + * Decodes a VoiceSelectionParams message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NluSettings + * @returns VoiceSelectionParams * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.NluSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams; /** - * Decodes a NluSettings message from the specified reader or buffer, length delimited. + * Decodes a VoiceSelectionParams message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NluSettings + * @returns VoiceSelectionParams * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.NluSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams; /** - * Verifies a NluSettings message. + * Verifies a VoiceSelectionParams message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a NluSettings message from a plain object. Also converts values to their respective internal types. + * Creates a VoiceSelectionParams message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NluSettings + * @returns VoiceSelectionParams */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.NluSettings; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams; /** - * Creates a plain object from a NluSettings message. Also converts values to other types if specified. - * @param message NluSettings + * Creates a plain object from a VoiceSelectionParams message. Also converts values to other types if specified. + * @param message VoiceSelectionParams * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.NluSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NluSettings to JSON. + * Converts this VoiceSelectionParams to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for NluSettings + * Gets the default type url for VoiceSelectionParams * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace NluSettings { + /** Properties of a SynthesizeSpeechConfig. */ + interface ISynthesizeSpeechConfig { - /** ModelType enum. */ - enum ModelType { - MODEL_TYPE_UNSPECIFIED = 0, - MODEL_TYPE_STANDARD = 1, - MODEL_TYPE_ADVANCED = 3 - } + /** SynthesizeSpeechConfig speakingRate */ + speakingRate?: (number|null); - /** ModelTrainingMode enum. */ - enum ModelTrainingMode { - MODEL_TRAINING_MODE_UNSPECIFIED = 0, - MODEL_TRAINING_MODE_AUTOMATIC = 1, - MODEL_TRAINING_MODE_MANUAL = 2 - } - } - - /** Properties of a Flow. */ - interface IFlow { - - /** Flow name */ - name?: (string|null); - - /** Flow displayName */ - displayName?: (string|null); - - /** Flow description */ - description?: (string|null); - - /** Flow transitionRoutes */ - transitionRoutes?: (google.cloud.dialogflow.cx.v3beta1.ITransitionRoute[]|null); + /** SynthesizeSpeechConfig pitch */ + pitch?: (number|null); - /** Flow eventHandlers */ - eventHandlers?: (google.cloud.dialogflow.cx.v3beta1.IEventHandler[]|null); + /** SynthesizeSpeechConfig volumeGainDb */ + volumeGainDb?: (number|null); - /** Flow transitionRouteGroups */ - transitionRouteGroups?: (string[]|null); + /** SynthesizeSpeechConfig effectsProfileId */ + effectsProfileId?: (string[]|null); - /** Flow nluSettings */ - nluSettings?: (google.cloud.dialogflow.cx.v3beta1.INluSettings|null); + /** SynthesizeSpeechConfig voice */ + voice?: (google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams|null); } - /** Represents a Flow. */ - class Flow implements IFlow { + /** Represents a SynthesizeSpeechConfig. */ + class SynthesizeSpeechConfig implements ISynthesizeSpeechConfig { /** - * Constructs a new Flow. + * Constructs a new SynthesizeSpeechConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IFlow); - - /** Flow name. */ - public name: string; - - /** Flow displayName. */ - public displayName: string; + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig); - /** Flow description. */ - public description: string; + /** SynthesizeSpeechConfig speakingRate. */ + public speakingRate: number; - /** Flow transitionRoutes. */ - public transitionRoutes: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute[]; + /** SynthesizeSpeechConfig pitch. */ + public pitch: number; - /** Flow eventHandlers. */ - public eventHandlers: google.cloud.dialogflow.cx.v3beta1.IEventHandler[]; + /** SynthesizeSpeechConfig volumeGainDb. */ + public volumeGainDb: number; - /** Flow transitionRouteGroups. */ - public transitionRouteGroups: string[]; + /** SynthesizeSpeechConfig effectsProfileId. */ + public effectsProfileId: string[]; - /** Flow nluSettings. */ - public nluSettings?: (google.cloud.dialogflow.cx.v3beta1.INluSettings|null); + /** SynthesizeSpeechConfig voice. */ + public voice?: (google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams|null); /** - * Creates a new Flow instance using the specified properties. + * Creates a new SynthesizeSpeechConfig instance using the specified properties. * @param [properties] Properties to set - * @returns Flow instance + * @returns SynthesizeSpeechConfig instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IFlow): google.cloud.dialogflow.cx.v3beta1.Flow; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig): google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig; /** - * Encodes the specified Flow message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Flow.verify|verify} messages. - * @param message Flow message or plain object to encode + * Encodes the specified SynthesizeSpeechConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify|verify} messages. + * @param message SynthesizeSpeechConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IFlow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Flow message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Flow.verify|verify} messages. - * @param message Flow message or plain object to encode + * Encodes the specified SynthesizeSpeechConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify|verify} messages. + * @param message SynthesizeSpeechConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IFlow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Flow message from the specified reader or buffer. + * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Flow + * @returns SynthesizeSpeechConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Flow; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig; /** - * Decodes a Flow message from the specified reader or buffer, length delimited. + * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Flow + * @returns SynthesizeSpeechConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Flow; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig; /** - * Verifies a Flow message. + * Verifies a SynthesizeSpeechConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Flow message from a plain object. Also converts values to their respective internal types. + * Creates a SynthesizeSpeechConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Flow + * @returns SynthesizeSpeechConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Flow; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig; /** - * Creates a plain object from a Flow message. Also converts values to other types if specified. - * @param message Flow + * Creates a plain object from a SynthesizeSpeechConfig message. Also converts values to other types if specified. + * @param message SynthesizeSpeechConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Flow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Flow to JSON. + * Converts this SynthesizeSpeechConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Flow + * Gets the default type url for SynthesizeSpeechConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateFlowRequest. */ - interface ICreateFlowRequest { + /** OutputAudioEncoding enum. */ + enum OutputAudioEncoding { + OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0, + OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1, + OUTPUT_AUDIO_ENCODING_MP3 = 2, + OUTPUT_AUDIO_ENCODING_MP3_64_KBPS = 4, + OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3, + OUTPUT_AUDIO_ENCODING_MULAW = 5 + } - /** CreateFlowRequest parent */ - parent?: (string|null); + /** Properties of an OutputAudioConfig. */ + interface IOutputAudioConfig { - /** CreateFlowRequest flow */ - flow?: (google.cloud.dialogflow.cx.v3beta1.IFlow|null); + /** OutputAudioConfig audioEncoding */ + audioEncoding?: (google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding|null); - /** CreateFlowRequest languageCode */ - languageCode?: (string|null); + /** OutputAudioConfig sampleRateHertz */ + sampleRateHertz?: (number|null); + + /** OutputAudioConfig synthesizeSpeechConfig */ + synthesizeSpeechConfig?: (google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig|null); } - /** Represents a CreateFlowRequest. */ - class CreateFlowRequest implements ICreateFlowRequest { + /** Represents an OutputAudioConfig. */ + class OutputAudioConfig implements IOutputAudioConfig { /** - * Constructs a new CreateFlowRequest. + * Constructs a new OutputAudioConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig); - /** CreateFlowRequest parent. */ - public parent: string; + /** OutputAudioConfig audioEncoding. */ + public audioEncoding: (google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding); - /** CreateFlowRequest flow. */ - public flow?: (google.cloud.dialogflow.cx.v3beta1.IFlow|null); + /** OutputAudioConfig sampleRateHertz. */ + public sampleRateHertz: number; - /** CreateFlowRequest languageCode. */ - public languageCode: string; + /** OutputAudioConfig synthesizeSpeechConfig. */ + public synthesizeSpeechConfig?: (google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig|null); /** - * Creates a new CreateFlowRequest instance using the specified properties. + * Creates a new OutputAudioConfig instance using the specified properties. * @param [properties] Properties to set - * @returns CreateFlowRequest instance + * @returns OutputAudioConfig instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest): google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig): google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig; /** - * Encodes the specified CreateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.verify|verify} messages. - * @param message CreateFlowRequest message or plain object to encode + * Encodes the specified OutputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.verify|verify} messages. + * @param message OutputAudioConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.verify|verify} messages. - * @param message CreateFlowRequest message or plain object to encode + * Encodes the specified OutputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.verify|verify} messages. + * @param message OutputAudioConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateFlowRequest message from the specified reader or buffer. + * Decodes an OutputAudioConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateFlowRequest + * @returns OutputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig; /** - * Decodes a CreateFlowRequest message from the specified reader or buffer, length delimited. + * Decodes an OutputAudioConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateFlowRequest + * @returns OutputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig; /** - * Verifies a CreateFlowRequest message. + * Verifies an OutputAudioConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates an OutputAudioConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateFlowRequest + * @returns OutputAudioConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig; /** - * Creates a plain object from a CreateFlowRequest message. Also converts values to other types if specified. - * @param message CreateFlowRequest + * Creates a plain object from an OutputAudioConfig message. Also converts values to other types if specified. + * @param message OutputAudioConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateFlowRequest to JSON. + * Converts this OutputAudioConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateFlowRequest + * Gets the default type url for OutputAudioConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteFlowRequest. */ - interface IDeleteFlowRequest { - - /** DeleteFlowRequest name */ - name?: (string|null); + /** Properties of a TextToSpeechSettings. */ + interface ITextToSpeechSettings { - /** DeleteFlowRequest force */ - force?: (boolean|null); + /** TextToSpeechSettings synthesizeSpeechConfigs */ + synthesizeSpeechConfigs?: ({ [k: string]: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig }|null); } - /** Represents a DeleteFlowRequest. */ - class DeleteFlowRequest implements IDeleteFlowRequest { + /** Represents a TextToSpeechSettings. */ + class TextToSpeechSettings implements ITextToSpeechSettings { /** - * Constructs a new DeleteFlowRequest. + * Constructs a new TextToSpeechSettings. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest); - - /** DeleteFlowRequest name. */ - public name: string; + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings); - /** DeleteFlowRequest force. */ - public force: boolean; + /** TextToSpeechSettings synthesizeSpeechConfigs. */ + public synthesizeSpeechConfigs: { [k: string]: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig }; /** - * Creates a new DeleteFlowRequest instance using the specified properties. + * Creates a new TextToSpeechSettings instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteFlowRequest instance + * @returns TextToSpeechSettings instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest): google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings): google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings; /** - * Encodes the specified DeleteFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest.verify|verify} messages. - * @param message DeleteFlowRequest message or plain object to encode + * Encodes the specified TextToSpeechSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.verify|verify} messages. + * @param message TextToSpeechSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest.verify|verify} messages. - * @param message DeleteFlowRequest message or plain object to encode + * Encodes the specified TextToSpeechSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.verify|verify} messages. + * @param message TextToSpeechSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteFlowRequest message from the specified reader or buffer. + * Decodes a TextToSpeechSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteFlowRequest + * @returns TextToSpeechSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings; /** - * Decodes a DeleteFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a TextToSpeechSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteFlowRequest + * @returns TextToSpeechSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings; /** - * Verifies a DeleteFlowRequest message. + * Verifies a TextToSpeechSettings message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TextToSpeechSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteFlowRequest + * @returns TextToSpeechSettings */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings; /** - * Creates a plain object from a DeleteFlowRequest message. Also converts values to other types if specified. - * @param message DeleteFlowRequest + * Creates a plain object from a TextToSpeechSettings message. Also converts values to other types if specified. + * @param message TextToSpeechSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteFlowRequest to JSON. + * Converts this TextToSpeechSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteFlowRequest + * Gets the default type url for TextToSpeechSettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListFlowsRequest. */ - interface IListFlowsRequest { - - /** ListFlowsRequest parent */ - parent?: (string|null); - - /** ListFlowsRequest pageSize */ - pageSize?: (number|null); - - /** ListFlowsRequest pageToken */ - pageToken?: (string|null); - - /** ListFlowsRequest languageCode */ - languageCode?: (string|null); - } - - /** Represents a ListFlowsRequest. */ - class ListFlowsRequest implements IListFlowsRequest { + /** Represents a Flows */ + class Flows extends $protobuf.rpc.Service { /** - * Constructs a new ListFlowsRequest. - * @param [properties] Properties to set + * Constructs a new Flows service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest); - - /** ListFlowsRequest parent. */ - public parent: string; - - /** ListFlowsRequest pageSize. */ - public pageSize: number; - - /** ListFlowsRequest pageToken. */ - public pageToken: string; - - /** ListFlowsRequest languageCode. */ - public languageCode: string; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates a new ListFlowsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListFlowsRequest instance + * Creates new Flows 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(properties?: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest): google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Flows; /** - * Encodes the specified ListFlowsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest.verify|verify} messages. - * @param message ListFlowsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls CreateFlow. + * @param request CreateFlowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Flow */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public createFlow(request: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.CreateFlowCallback): void; /** - * Encodes the specified ListFlowsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest.verify|verify} messages. - * @param message ListFlowsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls CreateFlow. + * @param request CreateFlowRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public createFlow(request: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest): Promise; /** - * Decodes a ListFlowsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListFlowsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteFlow. + * @param request DeleteFlowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest; + public deleteFlow(request: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.DeleteFlowCallback): void; /** - * Decodes a ListFlowsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListFlowsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteFlow. + * @param request DeleteFlowRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest; + public deleteFlow(request: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest): Promise; /** - * Verifies a ListFlowsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls ListFlows. + * @param request ListFlowsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFlowsResponse */ - public static verify(message: { [k: string]: any }): (string|null); + public listFlows(request: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.ListFlowsCallback): void; /** - * Creates a ListFlowsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListFlowsRequest + * Calls ListFlows. + * @param request ListFlowsRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest; + public listFlows(request: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest): Promise; /** - * Creates a plain object from a ListFlowsRequest message. Also converts values to other types if specified. - * @param message ListFlowsRequest - * @param [options] Conversion options - * @returns Plain object + * Calls GetFlow. + * @param request GetFlowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Flow */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public getFlow(request: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowCallback): void; /** - * Converts this ListFlowsRequest to JSON. - * @returns JSON object + * Calls GetFlow. + * @param request GetFlowRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; + public getFlow(request: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest): Promise; /** - * Gets the default type url for ListFlowsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Calls UpdateFlow. + * @param request UpdateFlowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Flow */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListFlowsResponse. */ - interface IListFlowsResponse { - - /** ListFlowsResponse flows */ - flows?: (google.cloud.dialogflow.cx.v3beta1.IFlow[]|null); - - /** ListFlowsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListFlowsResponse. */ - class ListFlowsResponse implements IListFlowsResponse { + public updateFlow(request: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.UpdateFlowCallback): void; /** - * Constructs a new ListFlowsResponse. - * @param [properties] Properties to set + * Calls UpdateFlow. + * @param request UpdateFlowRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse); - - /** ListFlowsResponse flows. */ - public flows: google.cloud.dialogflow.cx.v3beta1.IFlow[]; - - /** ListFlowsResponse nextPageToken. */ - public nextPageToken: string; + public updateFlow(request: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest): Promise; /** - * Creates a new ListFlowsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListFlowsResponse instance + * Calls TrainFlow. + * @param request TrainFlowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse): google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse; + public trainFlow(request: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.TrainFlowCallback): void; /** - * Encodes the specified ListFlowsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.verify|verify} messages. - * @param message ListFlowsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls TrainFlow. + * @param request TrainFlowRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public trainFlow(request: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest): Promise; /** - * Encodes the specified ListFlowsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.verify|verify} messages. - * @param message ListFlowsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ValidateFlow. + * @param request ValidateFlowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FlowValidationResult */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public validateFlow(request: google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.ValidateFlowCallback): void; /** - * Decodes a ListFlowsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListFlowsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ValidateFlow. + * @param request ValidateFlowRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse; + public validateFlow(request: google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest): Promise; /** - * Decodes a ListFlowsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListFlowsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetFlowValidationResult. + * @param request GetFlowValidationResultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FlowValidationResult */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse; + public getFlowValidationResult(request: google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowValidationResultCallback): void; /** - * Verifies a ListFlowsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls GetFlowValidationResult. + * @param request GetFlowValidationResultRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public getFlowValidationResult(request: google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest): Promise; /** - * Creates a ListFlowsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListFlowsResponse + * Calls ImportFlow. + * @param request ImportFlowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse; + public importFlow(request: google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.ImportFlowCallback): void; /** - * Creates a plain object from a ListFlowsResponse message. Also converts values to other types if specified. - * @param message ListFlowsResponse - * @param [options] Conversion options - * @returns Plain object + * Calls ImportFlow. + * @param request ImportFlowRequest message or plain object + * @returns Promise */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public importFlow(request: google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest): Promise; /** - * Converts this ListFlowsResponse to JSON. - * @returns JSON object + * Calls ExportFlow. + * @param request ExportFlowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public toJSON(): { [k: string]: any }; + public exportFlow(request: google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.ExportFlowCallback): void; /** - * Gets the default type url for ListFlowsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Calls ExportFlow. + * @param request ExportFlowRequest message or plain object + * @returns Promise */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetFlowRequest. */ - interface IGetFlowRequest { - - /** GetFlowRequest name */ - name?: (string|null); - - /** GetFlowRequest languageCode */ - languageCode?: (string|null); + public exportFlow(request: google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest): Promise; } - /** Represents a GetFlowRequest. */ - class GetFlowRequest implements IGetFlowRequest { + namespace Flows { /** - * Constructs a new GetFlowRequest. - * @param [properties] Properties to set + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|createFlow}. + * @param error Error, if any + * @param [response] Flow */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest); - - /** GetFlowRequest name. */ - public name: string; - - /** GetFlowRequest languageCode. */ - public languageCode: string; - - /** - * Creates a new GetFlowRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetFlowRequest instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest): google.cloud.dialogflow.cx.v3beta1.GetFlowRequest; + type CreateFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Flow) => void; /** - * Encodes the specified GetFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowRequest.verify|verify} messages. - * @param message GetFlowRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|deleteFlow}. + * @param error Error, if any + * @param [response] Empty */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type DeleteFlowCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Encodes the specified GetFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowRequest.verify|verify} messages. - * @param message GetFlowRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|listFlows}. + * @param error Error, if any + * @param [response] ListFlowsResponse */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type ListFlowsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse) => void; /** - * Decodes a GetFlowRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetFlowRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|getFlow}. + * @param error Error, if any + * @param [response] Flow */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetFlowRequest; + type GetFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Flow) => void; /** - * Decodes a GetFlowRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetFlowRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|updateFlow}. + * @param error Error, if any + * @param [response] Flow */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetFlowRequest; + type UpdateFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Flow) => void; /** - * Verifies a GetFlowRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|trainFlow}. + * @param error Error, if any + * @param [response] Operation */ - public static verify(message: { [k: string]: any }): (string|null); + type TrainFlowCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Creates a GetFlowRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetFlowRequest + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|validateFlow}. + * @param error Error, if any + * @param [response] FlowValidationResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetFlowRequest; + type ValidateFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.FlowValidationResult) => void; /** - * Creates a plain object from a GetFlowRequest message. Also converts values to other types if specified. - * @param message GetFlowRequest - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|getFlowValidationResult}. + * @param error Error, if any + * @param [response] FlowValidationResult */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type GetFlowValidationResultCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.FlowValidationResult) => void; /** - * Converts this GetFlowRequest to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|importFlow}. + * @param error Error, if any + * @param [response] Operation */ - public toJSON(): { [k: string]: any }; + type ImportFlowCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Gets the default type url for GetFlowRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|exportFlow}. + * @param error Error, if any + * @param [response] Operation */ - public static getTypeUrl(typeUrlPrefix?: string): string; + type ExportFlowCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; } - /** Properties of an UpdateFlowRequest. */ - interface IUpdateFlowRequest { + /** Properties of a NluSettings. */ + interface INluSettings { - /** UpdateFlowRequest flow */ - flow?: (google.cloud.dialogflow.cx.v3beta1.IFlow|null); + /** NluSettings modelType */ + modelType?: (google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType|keyof typeof google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType|null); - /** UpdateFlowRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** NluSettings classificationThreshold */ + classificationThreshold?: (number|null); - /** UpdateFlowRequest languageCode */ - languageCode?: (string|null); + /** NluSettings modelTrainingMode */ + modelTrainingMode?: (google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode|keyof typeof google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode|null); } - /** Represents an UpdateFlowRequest. */ - class UpdateFlowRequest implements IUpdateFlowRequest { + /** Represents a NluSettings. */ + class NluSettings implements INluSettings { /** - * Constructs a new UpdateFlowRequest. + * Constructs a new NluSettings. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.INluSettings); - /** UpdateFlowRequest flow. */ - public flow?: (google.cloud.dialogflow.cx.v3beta1.IFlow|null); + /** NluSettings modelType. */ + public modelType: (google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType|keyof typeof google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType); - /** UpdateFlowRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** NluSettings classificationThreshold. */ + public classificationThreshold: number; - /** UpdateFlowRequest languageCode. */ - public languageCode: string; + /** NluSettings modelTrainingMode. */ + public modelTrainingMode: (google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode|keyof typeof google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode); /** - * Creates a new UpdateFlowRequest instance using the specified properties. + * Creates a new NluSettings instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateFlowRequest instance + * @returns NluSettings instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest): google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.INluSettings): google.cloud.dialogflow.cx.v3beta1.NluSettings; /** - * Encodes the specified UpdateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.verify|verify} messages. - * @param message UpdateFlowRequest message or plain object to encode + * Encodes the specified NluSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.NluSettings.verify|verify} messages. + * @param message NluSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.INluSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.verify|verify} messages. - * @param message UpdateFlowRequest message or plain object to encode + * Encodes the specified NluSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.NluSettings.verify|verify} messages. + * @param message NluSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.INluSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateFlowRequest message from the specified reader or buffer. + * Decodes a NluSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateFlowRequest + * @returns NluSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.NluSettings; /** - * Decodes an UpdateFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a NluSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateFlowRequest + * @returns NluSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.NluSettings; /** - * Verifies an UpdateFlowRequest message. + * Verifies a NluSettings message. * @param message Plain 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 UpdateFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a NluSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateFlowRequest + * @returns NluSettings */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.NluSettings; /** - * Creates a plain object from an UpdateFlowRequest message. Also converts values to other types if specified. - * @param message UpdateFlowRequest + * Creates a plain object from a NluSettings message. Also converts values to other types if specified. + * @param message NluSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.NluSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateFlowRequest to JSON. + * Converts this NluSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateFlowRequest + * Gets the default type url for NluSettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a TrainFlowRequest. */ - interface ITrainFlowRequest { + namespace NluSettings { - /** TrainFlowRequest name */ + /** ModelType enum. */ + enum ModelType { + MODEL_TYPE_UNSPECIFIED = 0, + MODEL_TYPE_STANDARD = 1, + MODEL_TYPE_ADVANCED = 3 + } + + /** ModelTrainingMode enum. */ + enum ModelTrainingMode { + MODEL_TRAINING_MODE_UNSPECIFIED = 0, + MODEL_TRAINING_MODE_AUTOMATIC = 1, + MODEL_TRAINING_MODE_MANUAL = 2 + } + } + + /** Properties of a Flow. */ + interface IFlow { + + /** Flow name */ name?: (string|null); + + /** Flow displayName */ + displayName?: (string|null); + + /** Flow description */ + description?: (string|null); + + /** Flow transitionRoutes */ + transitionRoutes?: (google.cloud.dialogflow.cx.v3beta1.ITransitionRoute[]|null); + + /** Flow eventHandlers */ + eventHandlers?: (google.cloud.dialogflow.cx.v3beta1.IEventHandler[]|null); + + /** Flow transitionRouteGroups */ + transitionRouteGroups?: (string[]|null); + + /** Flow nluSettings */ + nluSettings?: (google.cloud.dialogflow.cx.v3beta1.INluSettings|null); } - /** Represents a TrainFlowRequest. */ - class TrainFlowRequest implements ITrainFlowRequest { + /** Represents a Flow. */ + class Flow implements IFlow { /** - * Constructs a new TrainFlowRequest. + * Constructs a new Flow. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IFlow); - /** TrainFlowRequest name. */ + /** Flow name. */ public name: string; + /** Flow displayName. */ + public displayName: string; + + /** Flow description. */ + public description: string; + + /** Flow transitionRoutes. */ + public transitionRoutes: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute[]; + + /** Flow eventHandlers. */ + public eventHandlers: google.cloud.dialogflow.cx.v3beta1.IEventHandler[]; + + /** Flow transitionRouteGroups. */ + public transitionRouteGroups: string[]; + + /** Flow nluSettings. */ + public nluSettings?: (google.cloud.dialogflow.cx.v3beta1.INluSettings|null); + /** - * Creates a new TrainFlowRequest instance using the specified properties. + * Creates a new Flow instance using the specified properties. * @param [properties] Properties to set - * @returns TrainFlowRequest instance + * @returns Flow instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest): google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IFlow): google.cloud.dialogflow.cx.v3beta1.Flow; /** - * Encodes the specified TrainFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest.verify|verify} messages. - * @param message TrainFlowRequest message or plain object to encode + * Encodes the specified Flow message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Flow.verify|verify} messages. + * @param message Flow message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IFlow, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TrainFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest.verify|verify} messages. - * @param message TrainFlowRequest message or plain object to encode + * Encodes the specified Flow message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Flow.verify|verify} messages. + * @param message Flow message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IFlow, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TrainFlowRequest message from the specified reader or buffer. + * Decodes a Flow message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TrainFlowRequest + * @returns Flow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Flow; /** - * Decodes a TrainFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a Flow message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TrainFlowRequest + * @returns Flow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Flow; /** - * Verifies a TrainFlowRequest message. + * Verifies a Flow message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TrainFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Flow message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TrainFlowRequest + * @returns Flow */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Flow; /** - * Creates a plain object from a TrainFlowRequest message. Also converts values to other types if specified. - * @param message TrainFlowRequest + * Creates a plain object from a Flow message. Also converts values to other types if specified. + * @param message Flow * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Flow, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TrainFlowRequest to JSON. + * Converts this Flow to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for TrainFlowRequest + * Gets the default type url for Flow * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ValidateFlowRequest. */ - interface IValidateFlowRequest { + /** Properties of a CreateFlowRequest. */ + interface ICreateFlowRequest { - /** ValidateFlowRequest name */ - name?: (string|null); + /** CreateFlowRequest parent */ + parent?: (string|null); - /** ValidateFlowRequest languageCode */ + /** CreateFlowRequest flow */ + flow?: (google.cloud.dialogflow.cx.v3beta1.IFlow|null); + + /** CreateFlowRequest languageCode */ languageCode?: (string|null); } - /** Represents a ValidateFlowRequest. */ - class ValidateFlowRequest implements IValidateFlowRequest { + /** Represents a CreateFlowRequest. */ + class CreateFlowRequest implements ICreateFlowRequest { /** - * Constructs a new ValidateFlowRequest. + * Constructs a new CreateFlowRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest); - /** ValidateFlowRequest name. */ - public name: string; + /** CreateFlowRequest parent. */ + public parent: string; - /** ValidateFlowRequest languageCode. */ + /** CreateFlowRequest flow. */ + public flow?: (google.cloud.dialogflow.cx.v3beta1.IFlow|null); + + /** CreateFlowRequest languageCode. */ public languageCode: string; /** - * Creates a new ValidateFlowRequest instance using the specified properties. + * Creates a new CreateFlowRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ValidateFlowRequest instance + * @returns CreateFlowRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest): google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest): google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest; /** - * Encodes the specified ValidateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest.verify|verify} messages. - * @param message ValidateFlowRequest message or plain object to encode + * Encodes the specified CreateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.verify|verify} messages. + * @param message CreateFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ValidateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest.verify|verify} messages. - * @param message ValidateFlowRequest message or plain object to encode + * Encodes the specified CreateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.verify|verify} messages. + * @param message CreateFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ValidateFlowRequest message from the specified reader or buffer. + * Decodes a CreateFlowRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ValidateFlowRequest + * @returns CreateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest; /** - * Decodes a ValidateFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateFlowRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ValidateFlowRequest + * @returns CreateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest; /** - * Verifies a ValidateFlowRequest message. + * Verifies a CreateFlowRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ValidateFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateFlowRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ValidateFlowRequest + * @returns CreateFlowRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest; /** - * Creates a plain object from a ValidateFlowRequest message. Also converts values to other types if specified. - * @param message ValidateFlowRequest + * Creates a plain object from a CreateFlowRequest message. Also converts values to other types if specified. + * @param message CreateFlowRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ValidateFlowRequest to JSON. + * Converts this CreateFlowRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ValidateFlowRequest + * Gets the default type url for CreateFlowRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetFlowValidationResultRequest. */ - interface IGetFlowValidationResultRequest { + /** Properties of a DeleteFlowRequest. */ + interface IDeleteFlowRequest { - /** GetFlowValidationResultRequest name */ + /** DeleteFlowRequest name */ name?: (string|null); - /** GetFlowValidationResultRequest languageCode */ - languageCode?: (string|null); + /** DeleteFlowRequest force */ + force?: (boolean|null); } - /** Represents a GetFlowValidationResultRequest. */ - class GetFlowValidationResultRequest implements IGetFlowValidationResultRequest { + /** Represents a DeleteFlowRequest. */ + class DeleteFlowRequest implements IDeleteFlowRequest { /** - * Constructs a new GetFlowValidationResultRequest. + * Constructs a new DeleteFlowRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest); - /** GetFlowValidationResultRequest name. */ + /** DeleteFlowRequest name. */ public name: string; - /** GetFlowValidationResultRequest languageCode. */ - public languageCode: string; + /** DeleteFlowRequest force. */ + public force: boolean; /** - * Creates a new GetFlowValidationResultRequest instance using the specified properties. + * Creates a new DeleteFlowRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetFlowValidationResultRequest instance + * @returns DeleteFlowRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest): google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest): google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest; /** - * Encodes the specified GetFlowValidationResultRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest.verify|verify} messages. - * @param message GetFlowValidationResultRequest message or plain object to encode + * Encodes the specified DeleteFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest.verify|verify} messages. + * @param message DeleteFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetFlowValidationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest.verify|verify} messages. - * @param message GetFlowValidationResultRequest message or plain object to encode + * Encodes the specified DeleteFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest.verify|verify} messages. + * @param message DeleteFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetFlowValidationResultRequest message from the specified reader or buffer. + * Decodes a DeleteFlowRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetFlowValidationResultRequest + * @returns DeleteFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest; /** - * Decodes a GetFlowValidationResultRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteFlowRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetFlowValidationResultRequest + * @returns DeleteFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest; /** - * Verifies a GetFlowValidationResultRequest message. + * Verifies a DeleteFlowRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetFlowValidationResultRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteFlowRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetFlowValidationResultRequest + * @returns DeleteFlowRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest; /** - * Creates a plain object from a GetFlowValidationResultRequest message. Also converts values to other types if specified. - * @param message GetFlowValidationResultRequest + * Creates a plain object from a DeleteFlowRequest message. Also converts values to other types if specified. + * @param message DeleteFlowRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetFlowValidationResultRequest to JSON. + * Converts this DeleteFlowRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetFlowValidationResultRequest + * Gets the default type url for DeleteFlowRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FlowValidationResult. */ - interface IFlowValidationResult { + /** Properties of a ListFlowsRequest. */ + interface IListFlowsRequest { - /** FlowValidationResult name */ - name?: (string|null); + /** ListFlowsRequest parent */ + parent?: (string|null); - /** FlowValidationResult validationMessages */ - validationMessages?: (google.cloud.dialogflow.cx.v3beta1.IValidationMessage[]|null); + /** ListFlowsRequest pageSize */ + pageSize?: (number|null); - /** FlowValidationResult updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** ListFlowsRequest pageToken */ + pageToken?: (string|null); + + /** ListFlowsRequest languageCode */ + languageCode?: (string|null); } - /** Represents a FlowValidationResult. */ - class FlowValidationResult implements IFlowValidationResult { + /** Represents a ListFlowsRequest. */ + class ListFlowsRequest implements IListFlowsRequest { /** - * Constructs a new FlowValidationResult. + * Constructs a new ListFlowsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest); - /** FlowValidationResult name. */ - public name: string; + /** ListFlowsRequest parent. */ + public parent: string; - /** FlowValidationResult validationMessages. */ - public validationMessages: google.cloud.dialogflow.cx.v3beta1.IValidationMessage[]; + /** ListFlowsRequest pageSize. */ + public pageSize: number; - /** FlowValidationResult updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** ListFlowsRequest pageToken. */ + public pageToken: string; + + /** ListFlowsRequest languageCode. */ + public languageCode: string; /** - * Creates a new FlowValidationResult instance using the specified properties. + * Creates a new ListFlowsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns FlowValidationResult instance + * @returns ListFlowsRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult): google.cloud.dialogflow.cx.v3beta1.FlowValidationResult; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest): google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest; /** - * Encodes the specified FlowValidationResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.verify|verify} messages. - * @param message FlowValidationResult message or plain object to encode + * Encodes the specified ListFlowsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest.verify|verify} messages. + * @param message ListFlowsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FlowValidationResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.verify|verify} messages. - * @param message FlowValidationResult message or plain object to encode + * Encodes the specified ListFlowsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest.verify|verify} messages. + * @param message ListFlowsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FlowValidationResult message from the specified reader or buffer. + * Decodes a ListFlowsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FlowValidationResult + * @returns ListFlowsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.FlowValidationResult; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest; /** - * Decodes a FlowValidationResult message from the specified reader or buffer, length delimited. + * Decodes a ListFlowsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FlowValidationResult + * @returns ListFlowsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.FlowValidationResult; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest; /** - * Verifies a FlowValidationResult message. + * Verifies a ListFlowsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FlowValidationResult message from a plain object. Also converts values to their respective internal types. + * Creates a ListFlowsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FlowValidationResult + * @returns ListFlowsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.FlowValidationResult; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest; /** - * Creates a plain object from a FlowValidationResult message. Also converts values to other types if specified. - * @param message FlowValidationResult + * Creates a plain object from a ListFlowsRequest message. Also converts values to other types if specified. + * @param message ListFlowsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.FlowValidationResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FlowValidationResult to JSON. + * Converts this ListFlowsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FlowValidationResult + * Gets the default type url for ListFlowsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ImportFlowRequest. */ - interface IImportFlowRequest { - - /** ImportFlowRequest parent */ - parent?: (string|null); - - /** ImportFlowRequest flowUri */ - flowUri?: (string|null); + /** Properties of a ListFlowsResponse. */ + interface IListFlowsResponse { - /** ImportFlowRequest flowContent */ - flowContent?: (Uint8Array|string|null); + /** ListFlowsResponse flows */ + flows?: (google.cloud.dialogflow.cx.v3beta1.IFlow[]|null); - /** ImportFlowRequest importOption */ - importOption?: (google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption|keyof typeof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption|null); + /** ListFlowsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an ImportFlowRequest. */ - class ImportFlowRequest implements IImportFlowRequest { + /** Represents a ListFlowsResponse. */ + class ListFlowsResponse implements IListFlowsResponse { /** - * Constructs a new ImportFlowRequest. + * Constructs a new ListFlowsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest); - - /** ImportFlowRequest parent. */ - public parent: string; - - /** ImportFlowRequest flowUri. */ - public flowUri?: (string|null); - - /** ImportFlowRequest flowContent. */ - public flowContent?: (Uint8Array|string|null); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse); - /** ImportFlowRequest importOption. */ - public importOption: (google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption|keyof typeof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption); + /** ListFlowsResponse flows. */ + public flows: google.cloud.dialogflow.cx.v3beta1.IFlow[]; - /** ImportFlowRequest flow. */ - public flow?: ("flowUri"|"flowContent"); + /** ListFlowsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new ImportFlowRequest instance using the specified properties. + * Creates a new ListFlowsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ImportFlowRequest instance + * @returns ListFlowsResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest): google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse): google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse; /** - * Encodes the specified ImportFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.verify|verify} messages. - * @param message ImportFlowRequest message or plain object to encode + * Encodes the specified ListFlowsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.verify|verify} messages. + * @param message ListFlowsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.verify|verify} messages. - * @param message ImportFlowRequest message or plain object to encode + * Encodes the specified ListFlowsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.verify|verify} messages. + * @param message ListFlowsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportFlowRequest message from the specified reader or buffer. + * Decodes a ListFlowsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportFlowRequest + * @returns ListFlowsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse; /** - * Decodes an ImportFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a ListFlowsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportFlowRequest + * @returns ListFlowsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse; /** - * Verifies an ImportFlowRequest message. + * Verifies a ListFlowsResponse message. * @param message Plain 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 ImportFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListFlowsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportFlowRequest + * @returns ListFlowsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse; /** - * Creates a plain object from an ImportFlowRequest message. Also converts values to other types if specified. - * @param message ImportFlowRequest + * Creates a plain object from a ListFlowsResponse message. Also converts values to other types if specified. + * @param message ListFlowsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportFlowRequest to JSON. + * Converts this ListFlowsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportFlowRequest + * Gets the default type url for ListFlowsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ImportFlowRequest { - - /** ImportOption enum. */ - enum ImportOption { - IMPORT_OPTION_UNSPECIFIED = 0, - KEEP = 1, - FALLBACK = 2 - } - } + /** Properties of a GetFlowRequest. */ + interface IGetFlowRequest { - /** Properties of an ImportFlowResponse. */ - interface IImportFlowResponse { + /** GetFlowRequest name */ + name?: (string|null); - /** ImportFlowResponse flow */ - flow?: (string|null); + /** GetFlowRequest languageCode */ + languageCode?: (string|null); } - /** Represents an ImportFlowResponse. */ - class ImportFlowResponse implements IImportFlowResponse { + /** Represents a GetFlowRequest. */ + class GetFlowRequest implements IGetFlowRequest { /** - * Constructs a new ImportFlowResponse. + * Constructs a new GetFlowRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest); - /** ImportFlowResponse flow. */ - public flow: string; + /** GetFlowRequest name. */ + public name: string; + + /** GetFlowRequest languageCode. */ + public languageCode: string; /** - * Creates a new ImportFlowResponse instance using the specified properties. + * Creates a new GetFlowRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ImportFlowResponse instance + * @returns GetFlowRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse): google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest): google.cloud.dialogflow.cx.v3beta1.GetFlowRequest; /** - * Encodes the specified ImportFlowResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse.verify|verify} messages. - * @param message ImportFlowResponse message or plain object to encode + * Encodes the specified GetFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowRequest.verify|verify} messages. + * @param message GetFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportFlowResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse.verify|verify} messages. - * @param message ImportFlowResponse message or plain object to encode + * Encodes the specified GetFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowRequest.verify|verify} messages. + * @param message GetFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportFlowResponse message from the specified reader or buffer. + * Decodes a GetFlowRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportFlowResponse + * @returns GetFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetFlowRequest; /** - * Decodes an ImportFlowResponse message from the specified reader or buffer, length delimited. + * Decodes a GetFlowRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportFlowResponse + * @returns GetFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetFlowRequest; /** - * Verifies an ImportFlowResponse message. + * Verifies a GetFlowRequest message. * @param message Plain 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 ImportFlowResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetFlowRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportFlowResponse + * @returns GetFlowRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetFlowRequest; /** - * Creates a plain object from an ImportFlowResponse message. Also converts values to other types if specified. - * @param message ImportFlowResponse + * Creates a plain object from a GetFlowRequest message. Also converts values to other types if specified. + * @param message GetFlowRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportFlowResponse to JSON. + * Converts this GetFlowRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportFlowResponse + * Gets the default type url for GetFlowRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ExportFlowRequest. */ - interface IExportFlowRequest { + /** Properties of an UpdateFlowRequest. */ + interface IUpdateFlowRequest { - /** ExportFlowRequest name */ - name?: (string|null); + /** UpdateFlowRequest flow */ + flow?: (google.cloud.dialogflow.cx.v3beta1.IFlow|null); - /** ExportFlowRequest flowUri */ - flowUri?: (string|null); + /** UpdateFlowRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); - /** ExportFlowRequest includeReferencedFlows */ - includeReferencedFlows?: (boolean|null); + /** UpdateFlowRequest languageCode */ + languageCode?: (string|null); } - /** Represents an ExportFlowRequest. */ - class ExportFlowRequest implements IExportFlowRequest { + /** Represents an UpdateFlowRequest. */ + class UpdateFlowRequest implements IUpdateFlowRequest { /** - * Constructs a new ExportFlowRequest. + * Constructs a new UpdateFlowRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest); - /** ExportFlowRequest name. */ - public name: string; + /** UpdateFlowRequest flow. */ + public flow?: (google.cloud.dialogflow.cx.v3beta1.IFlow|null); - /** ExportFlowRequest flowUri. */ - public flowUri: string; + /** UpdateFlowRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** ExportFlowRequest includeReferencedFlows. */ - public includeReferencedFlows: boolean; + /** UpdateFlowRequest languageCode. */ + public languageCode: string; /** - * Creates a new ExportFlowRequest instance using the specified properties. + * Creates a new UpdateFlowRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ExportFlowRequest instance + * @returns UpdateFlowRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest): google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest): google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest; /** - * Encodes the specified ExportFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest.verify|verify} messages. - * @param message ExportFlowRequest message or plain object to encode + * Encodes the specified UpdateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.verify|verify} messages. + * @param message UpdateFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest.verify|verify} messages. - * @param message ExportFlowRequest message or plain object to encode + * Encodes the specified UpdateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.verify|verify} messages. + * @param message UpdateFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportFlowRequest message from the specified reader or buffer. + * Decodes an UpdateFlowRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportFlowRequest + * @returns UpdateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest; /** - * Decodes an ExportFlowRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateFlowRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportFlowRequest + * @returns UpdateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest; /** - * Verifies an ExportFlowRequest message. + * Verifies an UpdateFlowRequest message. * @param message Plain 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 ExportFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateFlowRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportFlowRequest + * @returns UpdateFlowRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest; /** - * Creates a plain object from an ExportFlowRequest message. Also converts values to other types if specified. - * @param message ExportFlowRequest + * Creates a plain object from an UpdateFlowRequest message. Also converts values to other types if specified. + * @param message UpdateFlowRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportFlowRequest to JSON. + * Converts this UpdateFlowRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExportFlowRequest + * Gets the default type url for UpdateFlowRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ExportFlowResponse. */ - interface IExportFlowResponse { - - /** ExportFlowResponse flowUri */ - flowUri?: (string|null); + /** Properties of a TrainFlowRequest. */ + interface ITrainFlowRequest { - /** ExportFlowResponse flowContent */ - flowContent?: (Uint8Array|string|null); + /** TrainFlowRequest name */ + name?: (string|null); } - /** Represents an ExportFlowResponse. */ - class ExportFlowResponse implements IExportFlowResponse { + /** Represents a TrainFlowRequest. */ + class TrainFlowRequest implements ITrainFlowRequest { /** - * Constructs a new ExportFlowResponse. + * Constructs a new TrainFlowRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse); - - /** ExportFlowResponse flowUri. */ - public flowUri?: (string|null); - - /** ExportFlowResponse flowContent. */ - public flowContent?: (Uint8Array|string|null); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest); - /** ExportFlowResponse flow. */ - public flow?: ("flowUri"|"flowContent"); + /** TrainFlowRequest name. */ + public name: string; /** - * Creates a new ExportFlowResponse instance using the specified properties. + * Creates a new TrainFlowRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ExportFlowResponse instance + * @returns TrainFlowRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse): google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest): google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest; /** - * Encodes the specified ExportFlowResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse.verify|verify} messages. - * @param message ExportFlowResponse message or plain object to encode + * Encodes the specified TrainFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest.verify|verify} messages. + * @param message TrainFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportFlowResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse.verify|verify} messages. - * @param message ExportFlowResponse message or plain object to encode + * Encodes the specified TrainFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest.verify|verify} messages. + * @param message TrainFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportFlowResponse message from the specified reader or buffer. + * Decodes a TrainFlowRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportFlowResponse + * @returns TrainFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest; /** - * Decodes an ExportFlowResponse message from the specified reader or buffer, length delimited. + * Decodes a TrainFlowRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportFlowResponse + * @returns TrainFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest; /** - * Verifies an ExportFlowResponse message. + * Verifies a TrainFlowRequest message. * @param message Plain 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 ExportFlowResponse message from a plain object. Also converts values to their respective internal types. + * Creates a TrainFlowRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportFlowResponse + * @returns TrainFlowRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest; /** - * Creates a plain object from an ExportFlowResponse message. Also converts values to other types if specified. - * @param message ExportFlowResponse + * Creates a plain object from a TrainFlowRequest message. Also converts values to other types if specified. + * @param message TrainFlowRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportFlowResponse to JSON. + * Converts this TrainFlowRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExportFlowResponse + * Gets the default type url for TrainFlowRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a Pages */ - class Pages extends $protobuf.rpc.Service { + /** Properties of a ValidateFlowRequest. */ + interface IValidateFlowRequest { - /** - * Constructs a new Pages 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); + /** ValidateFlowRequest name */ + name?: (string|null); + + /** ValidateFlowRequest languageCode */ + languageCode?: (string|null); + } + + /** Represents a ValidateFlowRequest. */ + class ValidateFlowRequest implements IValidateFlowRequest { /** - * Creates new Pages 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. + * Constructs a new ValidateFlowRequest. + * @param [properties] Properties to set */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Pages; + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest); + + /** ValidateFlowRequest name. */ + public name: string; + + /** ValidateFlowRequest languageCode. */ + public languageCode: string; /** - * Calls ListPages. - * @param request ListPagesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListPagesResponse + * Creates a new ValidateFlowRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidateFlowRequest instance */ - public listPages(request: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.ListPagesCallback): void; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest): google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest; /** - * Calls ListPages. - * @param request ListPagesRequest message or plain object - * @returns Promise + * Encodes the specified ValidateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest.verify|verify} messages. + * @param message ValidateFlowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listPages(request: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest): Promise; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetPage. - * @param request GetPageRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Page + * Encodes the specified ValidateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest.verify|verify} messages. + * @param message ValidateFlowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getPage(request: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.GetPageCallback): void; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetPage. - * @param request GetPageRequest message or plain object - * @returns Promise + * Decodes a ValidateFlowRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValidateFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getPage(request: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest; /** - * Calls CreatePage. - * @param request CreatePageRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Page + * Decodes a ValidateFlowRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValidateFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createPage(request: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.CreatePageCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest; /** - * Calls CreatePage. - * @param request CreatePageRequest message or plain object - * @returns Promise + * Verifies a ValidateFlowRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public createPage(request: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls UpdatePage. - * @param request UpdatePageRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Page + * Creates a ValidateFlowRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidateFlowRequest */ - public updatePage(request: google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.UpdatePageCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest; /** - * Calls UpdatePage. - * @param request UpdatePageRequest message or plain object - * @returns Promise + * Creates a plain object from a ValidateFlowRequest message. Also converts values to other types if specified. + * @param message ValidateFlowRequest + * @param [options] Conversion options + * @returns Plain object */ - public updatePage(request: google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest): Promise; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls DeletePage. - * @param request DeletePageRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Converts this ValidateFlowRequest to JSON. + * @returns JSON object */ - public deletePage(request: google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.DeletePageCallback): void; + public toJSON(): { [k: string]: any }; /** - * Calls DeletePage. - * @param request DeletePageRequest message or plain object - * @returns Promise + * Gets the default type url for ValidateFlowRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public deletePage(request: google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest): Promise; + public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Pages { + /** Properties of a GetFlowValidationResultRequest. */ + interface IGetFlowValidationResultRequest { + + /** GetFlowValidationResultRequest name */ + name?: (string|null); + + /** GetFlowValidationResultRequest languageCode */ + languageCode?: (string|null); + } + + /** Represents a GetFlowValidationResultRequest. */ + class GetFlowValidationResultRequest implements IGetFlowValidationResultRequest { /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|listPages}. - * @param error Error, if any - * @param [response] ListPagesResponse + * Constructs a new GetFlowValidationResultRequest. + * @param [properties] Properties to set */ - type ListPagesCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.ListPagesResponse) => void; + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest); + + /** GetFlowValidationResultRequest name. */ + public name: string; + + /** GetFlowValidationResultRequest languageCode. */ + public languageCode: string; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|getPage}. - * @param error Error, if any - * @param [response] Page + * Creates a new GetFlowValidationResultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetFlowValidationResultRequest instance */ - type GetPageCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Page) => void; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest): google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|createPage}. - * @param error Error, if any - * @param [response] Page + * Encodes the specified GetFlowValidationResultRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest.verify|verify} messages. + * @param message GetFlowValidationResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type CreatePageCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Page) => void; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|updatePage}. - * @param error Error, if any - * @param [response] Page + * Encodes the specified GetFlowValidationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest.verify|verify} messages. + * @param message GetFlowValidationResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type UpdatePageCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Page) => void; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|deletePage}. - * @param error Error, if any - * @param [response] Empty + * Decodes a GetFlowValidationResultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetFlowValidationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type DeletePageCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - } + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest; - /** Properties of a Page. */ - interface IPage { + /** + * Decodes a GetFlowValidationResultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetFlowValidationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest; - /** Page name */ - name?: (string|null); + /** + * Verifies a GetFlowValidationResultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Page displayName */ - displayName?: (string|null); + /** + * Creates a GetFlowValidationResultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetFlowValidationResultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest; - /** Page entryFulfillment */ - entryFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); + /** + * Creates a plain object from a GetFlowValidationResultRequest message. Also converts values to other types if specified. + * @param message GetFlowValidationResultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Page form */ - form?: (google.cloud.dialogflow.cx.v3beta1.IForm|null); + /** + * Converts this GetFlowValidationResultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Page transitionRouteGroups */ - transitionRouteGroups?: (string[]|null); + /** + * Gets the default type url for GetFlowValidationResultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Page transitionRoutes */ - transitionRoutes?: (google.cloud.dialogflow.cx.v3beta1.ITransitionRoute[]|null); + /** Properties of a FlowValidationResult. */ + interface IFlowValidationResult { - /** Page eventHandlers */ - eventHandlers?: (google.cloud.dialogflow.cx.v3beta1.IEventHandler[]|null); + /** FlowValidationResult name */ + name?: (string|null); + + /** FlowValidationResult validationMessages */ + validationMessages?: (google.cloud.dialogflow.cx.v3beta1.IValidationMessage[]|null); + + /** FlowValidationResult updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); } - /** Represents a Page. */ - class Page implements IPage { + /** Represents a FlowValidationResult. */ + class FlowValidationResult implements IFlowValidationResult { /** - * Constructs a new Page. + * Constructs a new FlowValidationResult. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IPage); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult); - /** Page name. */ + /** FlowValidationResult name. */ public name: string; - /** Page displayName. */ - public displayName: string; - - /** Page entryFulfillment. */ - public entryFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); - - /** Page form. */ - public form?: (google.cloud.dialogflow.cx.v3beta1.IForm|null); - - /** Page transitionRouteGroups. */ - public transitionRouteGroups: string[]; - - /** Page transitionRoutes. */ - public transitionRoutes: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute[]; + /** FlowValidationResult validationMessages. */ + public validationMessages: google.cloud.dialogflow.cx.v3beta1.IValidationMessage[]; - /** Page eventHandlers. */ - public eventHandlers: google.cloud.dialogflow.cx.v3beta1.IEventHandler[]; + /** FlowValidationResult updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new Page instance using the specified properties. + * Creates a new FlowValidationResult instance using the specified properties. * @param [properties] Properties to set - * @returns Page instance + * @returns FlowValidationResult instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IPage): google.cloud.dialogflow.cx.v3beta1.Page; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult): google.cloud.dialogflow.cx.v3beta1.FlowValidationResult; /** - * Encodes the specified Page message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Page.verify|verify} messages. - * @param message Page message or plain object to encode + * Encodes the specified FlowValidationResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.verify|verify} messages. + * @param message FlowValidationResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IPage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Page message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Page.verify|verify} messages. - * @param message Page message or plain object to encode + * Encodes the specified FlowValidationResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.verify|verify} messages. + * @param message FlowValidationResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IPage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Page message from the specified reader or buffer. + * Decodes a FlowValidationResult message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Page + * @returns FlowValidationResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Page; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.FlowValidationResult; /** - * Decodes a Page message from the specified reader or buffer, length delimited. + * Decodes a FlowValidationResult message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Page + * @returns FlowValidationResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Page; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.FlowValidationResult; /** - * Verifies a Page message. + * Verifies a FlowValidationResult message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Page message from a plain object. Also converts values to their respective internal types. + * Creates a FlowValidationResult message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Page + * @returns FlowValidationResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Page; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.FlowValidationResult; /** - * Creates a plain object from a Page message. Also converts values to other types if specified. - * @param message Page + * Creates a plain object from a FlowValidationResult message. Also converts values to other types if specified. + * @param message FlowValidationResult * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Page, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.FlowValidationResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Page to JSON. + * Converts this FlowValidationResult to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Page + * Gets the default type url for FlowValidationResult * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Form. */ - interface IForm { + /** Properties of an ImportFlowRequest. */ + interface IImportFlowRequest { - /** Form parameters */ - parameters?: (google.cloud.dialogflow.cx.v3beta1.Form.IParameter[]|null); + /** ImportFlowRequest parent */ + parent?: (string|null); + + /** ImportFlowRequest flowUri */ + flowUri?: (string|null); + + /** ImportFlowRequest flowContent */ + flowContent?: (Uint8Array|string|null); + + /** ImportFlowRequest importOption */ + importOption?: (google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption|keyof typeof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption|null); } - /** Represents a Form. */ - class Form implements IForm { + /** Represents an ImportFlowRequest. */ + class ImportFlowRequest implements IImportFlowRequest { /** - * Constructs a new Form. + * Constructs a new ImportFlowRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IForm); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest); - /** Form parameters. */ - public parameters: google.cloud.dialogflow.cx.v3beta1.Form.IParameter[]; + /** ImportFlowRequest parent. */ + public parent: string; + + /** ImportFlowRequest flowUri. */ + public flowUri?: (string|null); + + /** ImportFlowRequest flowContent. */ + public flowContent?: (Uint8Array|string|null); + + /** ImportFlowRequest importOption. */ + public importOption: (google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption|keyof typeof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption); + + /** ImportFlowRequest flow. */ + public flow?: ("flowUri"|"flowContent"); /** - * Creates a new Form instance using the specified properties. + * Creates a new ImportFlowRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Form instance + * @returns ImportFlowRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IForm): google.cloud.dialogflow.cx.v3beta1.Form; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest): google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest; /** - * Encodes the specified Form message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.verify|verify} messages. - * @param message Form message or plain object to encode + * Encodes the specified ImportFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.verify|verify} messages. + * @param message ImportFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IForm, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Form message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.verify|verify} messages. - * @param message Form message or plain object to encode + * Encodes the specified ImportFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.verify|verify} messages. + * @param message ImportFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IForm, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Form message from the specified reader or buffer. + * Decodes an ImportFlowRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Form + * @returns ImportFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Form; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest; /** - * Decodes a Form message from the specified reader or buffer, length delimited. + * Decodes an ImportFlowRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Form + * @returns ImportFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Form; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest; /** - * Verifies a Form message. + * Verifies an ImportFlowRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Form message from a plain object. Also converts values to their respective internal types. + * Creates an ImportFlowRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Form + * @returns ImportFlowRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Form; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest; /** - * Creates a plain object from a Form message. Also converts values to other types if specified. - * @param message Form + * Creates a plain object from an ImportFlowRequest message. Also converts values to other types if specified. + * @param message ImportFlowRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Form, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Form to JSON. + * Converts this ImportFlowRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Form + * Gets the default type url for ImportFlowRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Form { - - /** Properties of a Parameter. */ - interface IParameter { - - /** Parameter displayName */ - displayName?: (string|null); - - /** Parameter required */ - required?: (boolean|null); + namespace ImportFlowRequest { - /** Parameter entityType */ - entityType?: (string|null); + /** ImportOption enum. */ + enum ImportOption { + IMPORT_OPTION_UNSPECIFIED = 0, + KEEP = 1, + FALLBACK = 2 + } + } - /** Parameter isList */ - isList?: (boolean|null); + /** Properties of an ImportFlowResponse. */ + interface IImportFlowResponse { - /** Parameter fillBehavior */ - fillBehavior?: (google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior|null); + /** ImportFlowResponse flow */ + flow?: (string|null); + } - /** Parameter defaultValue */ - defaultValue?: (google.protobuf.IValue|null); + /** Represents an ImportFlowResponse. */ + class ImportFlowResponse implements IImportFlowResponse { - /** Parameter redact */ - redact?: (boolean|null); - } + /** + * Constructs a new ImportFlowResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse); - /** Represents a Parameter. */ - class Parameter implements IParameter { + /** ImportFlowResponse flow. */ + public flow: string; - /** - * Constructs a new Parameter. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Form.IParameter); + /** + * Creates a new ImportFlowResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportFlowResponse instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse): google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse; - /** Parameter displayName. */ - public displayName: string; + /** + * Encodes the specified ImportFlowResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse.verify|verify} messages. + * @param message ImportFlowResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** Parameter required. */ - public required: boolean; + /** + * Encodes the specified ImportFlowResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse.verify|verify} messages. + * @param message ImportFlowResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** Parameter entityType. */ - public entityType: string; + /** + * Decodes an ImportFlowResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportFlowResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse; - /** Parameter isList. */ - public isList: boolean; + /** + * Decodes an ImportFlowResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportFlowResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse; - /** Parameter fillBehavior. */ - public fillBehavior?: (google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior|null); + /** + * Verifies an ImportFlowResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Parameter defaultValue. */ - public defaultValue?: (google.protobuf.IValue|null); + /** + * Creates an ImportFlowResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportFlowResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse; - /** Parameter redact. */ - public redact: boolean; + /** + * Creates a plain object from an ImportFlowResponse message. Also converts values to other types if specified. + * @param message ImportFlowResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a new Parameter instance using the specified properties. - * @param [properties] Properties to set - * @returns Parameter instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Form.IParameter): google.cloud.dialogflow.cx.v3beta1.Form.Parameter; + /** + * Converts this ImportFlowResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.verify|verify} messages. - * @param message Parameter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.Form.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Gets the default type url for ImportFlowResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.verify|verify} messages. - * @param message Parameter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Form.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of an ExportFlowRequest. */ + interface IExportFlowRequest { - /** - * Decodes a Parameter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Parameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Form.Parameter; + /** ExportFlowRequest name */ + name?: (string|null); - /** - * Decodes a Parameter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Parameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Form.Parameter; + /** ExportFlowRequest flowUri */ + flowUri?: (string|null); - /** - * Verifies a Parameter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ExportFlowRequest includeReferencedFlows */ + includeReferencedFlows?: (boolean|null); + } - /** - * Creates a Parameter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Parameter - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Form.Parameter; + /** Represents an ExportFlowRequest. */ + class ExportFlowRequest implements IExportFlowRequest { - /** - * Creates a plain object from a Parameter message. Also converts values to other types if specified. - * @param message Parameter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Form.Parameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new ExportFlowRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest); - /** - * Converts this Parameter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** ExportFlowRequest name. */ + public name: string; - /** - * Gets the default type url for Parameter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** ExportFlowRequest flowUri. */ + public flowUri: string; - namespace Parameter { + /** ExportFlowRequest includeReferencedFlows. */ + public includeReferencedFlows: boolean; - /** Properties of a FillBehavior. */ - interface IFillBehavior { + /** + * Creates a new ExportFlowRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportFlowRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest): google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest; - /** FillBehavior initialPromptFulfillment */ - initialPromptFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); + /** + * Encodes the specified ExportFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest.verify|verify} messages. + * @param message ExportFlowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** FillBehavior repromptEventHandlers */ - repromptEventHandlers?: (google.cloud.dialogflow.cx.v3beta1.IEventHandler[]|null); - } + /** + * Encodes the specified ExportFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest.verify|verify} messages. + * @param message ExportFlowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a FillBehavior. */ - class FillBehavior implements IFillBehavior { - - /** - * Constructs a new FillBehavior. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior); - - /** FillBehavior initialPromptFulfillment. */ - public initialPromptFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); - - /** FillBehavior repromptEventHandlers. */ - public repromptEventHandlers: google.cloud.dialogflow.cx.v3beta1.IEventHandler[]; - - /** - * Creates a new FillBehavior instance using the specified properties. - * @param [properties] Properties to set - * @returns FillBehavior instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior): google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior; - - /** - * Encodes the specified FillBehavior message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify|verify} messages. - * @param message FillBehavior message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FillBehavior message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify|verify} messages. - * @param message FillBehavior message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FillBehavior message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FillBehavior - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior; + /** + * Decodes an ExportFlowRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest; - /** - * Decodes a FillBehavior message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FillBehavior - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior; + /** + * Decodes an ExportFlowRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest; - /** - * Verifies a FillBehavior message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies an ExportFlowRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a FillBehavior message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FillBehavior - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior; + /** + * Creates an ExportFlowRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportFlowRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest; - /** - * Creates a plain object from a FillBehavior message. Also converts values to other types if specified. - * @param message FillBehavior - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from an ExportFlowRequest message. Also converts values to other types if specified. + * @param message ExportFlowRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this FillBehavior to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this ExportFlowRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for FillBehavior - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** + * Gets the default type url for ExportFlowRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an EventHandler. */ - interface IEventHandler { - - /** EventHandler name */ - name?: (string|null); - - /** EventHandler event */ - event?: (string|null); - - /** EventHandler triggerFulfillment */ - triggerFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); + /** Properties of an ExportFlowResponse. */ + interface IExportFlowResponse { - /** EventHandler targetPage */ - targetPage?: (string|null); + /** ExportFlowResponse flowUri */ + flowUri?: (string|null); - /** EventHandler targetFlow */ - targetFlow?: (string|null); + /** ExportFlowResponse flowContent */ + flowContent?: (Uint8Array|string|null); } - /** Represents an EventHandler. */ - class EventHandler implements IEventHandler { + /** Represents an ExportFlowResponse. */ + class ExportFlowResponse implements IExportFlowResponse { /** - * Constructs a new EventHandler. + * Constructs a new ExportFlowResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IEventHandler); - - /** EventHandler name. */ - public name: string; - - /** EventHandler event. */ - public event: string; - - /** EventHandler triggerFulfillment. */ - public triggerFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse); - /** EventHandler targetPage. */ - public targetPage?: (string|null); + /** ExportFlowResponse flowUri. */ + public flowUri?: (string|null); - /** EventHandler targetFlow. */ - public targetFlow?: (string|null); + /** ExportFlowResponse flowContent. */ + public flowContent?: (Uint8Array|string|null); - /** EventHandler target. */ - public target?: ("targetPage"|"targetFlow"); + /** ExportFlowResponse flow. */ + public flow?: ("flowUri"|"flowContent"); /** - * Creates a new EventHandler instance using the specified properties. + * Creates a new ExportFlowResponse instance using the specified properties. * @param [properties] Properties to set - * @returns EventHandler instance + * @returns ExportFlowResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IEventHandler): google.cloud.dialogflow.cx.v3beta1.EventHandler; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse): google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse; /** - * Encodes the specified EventHandler message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EventHandler.verify|verify} messages. - * @param message EventHandler message or plain object to encode + * Encodes the specified ExportFlowResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse.verify|verify} messages. + * @param message ExportFlowResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IEventHandler, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EventHandler message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EventHandler.verify|verify} messages. - * @param message EventHandler message or plain object to encode + * Encodes the specified ExportFlowResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse.verify|verify} messages. + * @param message ExportFlowResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IEventHandler, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EventHandler message from the specified reader or buffer. + * Decodes an ExportFlowResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EventHandler + * @returns ExportFlowResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.EventHandler; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse; /** - * Decodes an EventHandler message from the specified reader or buffer, length delimited. + * Decodes an ExportFlowResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EventHandler + * @returns ExportFlowResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.EventHandler; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse; /** - * Verifies an EventHandler message. + * Verifies an ExportFlowResponse message. * @param message Plain 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 EventHandler message from a plain object. Also converts values to their respective internal types. + * Creates an ExportFlowResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EventHandler + * @returns ExportFlowResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.EventHandler; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse; /** - * Creates a plain object from an EventHandler message. Also converts values to other types if specified. - * @param message EventHandler + * Creates a plain object from an ExportFlowResponse message. Also converts values to other types if specified. + * @param message ExportFlowResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.EventHandler, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EventHandler to JSON. + * Converts this ExportFlowResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EventHandler + * Gets the default type url for ExportFlowResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a TransitionRoute. */ - interface ITransitionRoute { - - /** TransitionRoute name */ - name?: (string|null); - - /** TransitionRoute intent */ - intent?: (string|null); - - /** TransitionRoute condition */ - condition?: (string|null); - - /** TransitionRoute triggerFulfillment */ - triggerFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); - - /** TransitionRoute targetPage */ - targetPage?: (string|null); - - /** TransitionRoute targetFlow */ - targetFlow?: (string|null); - } - - /** Represents a TransitionRoute. */ - class TransitionRoute implements ITransitionRoute { + /** Represents a Pages */ + class Pages extends $protobuf.rpc.Service { /** - * Constructs a new TransitionRoute. - * @param [properties] Properties to set + * Constructs a new Pages service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute); - - /** TransitionRoute name. */ - public name: string; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** TransitionRoute intent. */ - public intent: string; + /** + * Creates new Pages 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): Pages; - /** TransitionRoute condition. */ - public condition: string; + /** + * Calls ListPages. + * @param request ListPagesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPagesResponse + */ + public listPages(request: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.ListPagesCallback): void; - /** TransitionRoute triggerFulfillment. */ - public triggerFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); + /** + * Calls ListPages. + * @param request ListPagesRequest message or plain object + * @returns Promise + */ + public listPages(request: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest): Promise; - /** TransitionRoute targetPage. */ - public targetPage?: (string|null); + /** + * Calls GetPage. + * @param request GetPageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Page + */ + public getPage(request: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.GetPageCallback): void; - /** TransitionRoute targetFlow. */ - public targetFlow?: (string|null); + /** + * Calls GetPage. + * @param request GetPageRequest message or plain object + * @returns Promise + */ + public getPage(request: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest): Promise; - /** TransitionRoute target. */ - public target?: ("targetPage"|"targetFlow"); + /** + * Calls CreatePage. + * @param request CreatePageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Page + */ + public createPage(request: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.CreatePageCallback): void; /** - * Creates a new TransitionRoute instance using the specified properties. - * @param [properties] Properties to set - * @returns TransitionRoute instance + * Calls CreatePage. + * @param request CreatePageRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute): google.cloud.dialogflow.cx.v3beta1.TransitionRoute; + public createPage(request: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest): Promise; /** - * Encodes the specified TransitionRoute message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify|verify} messages. - * @param message TransitionRoute message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls UpdatePage. + * @param request UpdatePageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Page */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute, writer?: $protobuf.Writer): $protobuf.Writer; + public updatePage(request: google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.UpdatePageCallback): void; /** - * Encodes the specified TransitionRoute message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify|verify} messages. - * @param message TransitionRoute message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls UpdatePage. + * @param request UpdatePageRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute, writer?: $protobuf.Writer): $protobuf.Writer; + public updatePage(request: google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest): Promise; /** - * Decodes a TransitionRoute message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TransitionRoute - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeletePage. + * @param request DeletePageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.TransitionRoute; + public deletePage(request: google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.DeletePageCallback): void; /** - * Decodes a TransitionRoute message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TransitionRoute - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeletePage. + * @param request DeletePageRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.TransitionRoute; + public deletePage(request: google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest): Promise; + } + + namespace Pages { /** - * Verifies a TransitionRoute message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|listPages}. + * @param error Error, if any + * @param [response] ListPagesResponse */ - public static verify(message: { [k: string]: any }): (string|null); + type ListPagesCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.ListPagesResponse) => void; /** - * Creates a TransitionRoute message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TransitionRoute + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|getPage}. + * @param error Error, if any + * @param [response] Page */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.TransitionRoute; + type GetPageCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Page) => void; /** - * Creates a plain object from a TransitionRoute message. Also converts values to other types if specified. - * @param message TransitionRoute - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|createPage}. + * @param error Error, if any + * @param [response] Page */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.TransitionRoute, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type CreatePageCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Page) => void; /** - * Converts this TransitionRoute to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|updatePage}. + * @param error Error, if any + * @param [response] Page */ - public toJSON(): { [k: string]: any }; + type UpdatePageCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Page) => void; /** - * Gets the default type url for TransitionRoute - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|deletePage}. + * @param error Error, if any + * @param [response] Empty */ - public static getTypeUrl(typeUrlPrefix?: string): string; + type DeletePageCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; } - /** Properties of a ListPagesRequest. */ - interface IListPagesRequest { + /** Properties of a Page. */ + interface IPage { - /** ListPagesRequest parent */ - parent?: (string|null); + /** Page name */ + name?: (string|null); - /** ListPagesRequest languageCode */ - languageCode?: (string|null); + /** Page displayName */ + displayName?: (string|null); - /** ListPagesRequest pageSize */ - pageSize?: (number|null); + /** Page entryFulfillment */ + entryFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); - /** ListPagesRequest pageToken */ - pageToken?: (string|null); + /** Page form */ + form?: (google.cloud.dialogflow.cx.v3beta1.IForm|null); + + /** Page transitionRouteGroups */ + transitionRouteGroups?: (string[]|null); + + /** Page transitionRoutes */ + transitionRoutes?: (google.cloud.dialogflow.cx.v3beta1.ITransitionRoute[]|null); + + /** Page eventHandlers */ + eventHandlers?: (google.cloud.dialogflow.cx.v3beta1.IEventHandler[]|null); } - /** Represents a ListPagesRequest. */ - class ListPagesRequest implements IListPagesRequest { + /** Represents a Page. */ + class Page implements IPage { /** - * Constructs a new ListPagesRequest. + * Constructs a new Page. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IPage); - /** ListPagesRequest parent. */ - public parent: string; + /** Page name. */ + public name: string; - /** ListPagesRequest languageCode. */ - public languageCode: string; + /** Page displayName. */ + public displayName: string; - /** ListPagesRequest pageSize. */ - public pageSize: number; + /** Page entryFulfillment. */ + public entryFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); - /** ListPagesRequest pageToken. */ - public pageToken: string; + /** Page form. */ + public form?: (google.cloud.dialogflow.cx.v3beta1.IForm|null); + + /** Page transitionRouteGroups. */ + public transitionRouteGroups: string[]; + + /** Page transitionRoutes. */ + public transitionRoutes: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute[]; + + /** Page eventHandlers. */ + public eventHandlers: google.cloud.dialogflow.cx.v3beta1.IEventHandler[]; /** - * Creates a new ListPagesRequest instance using the specified properties. + * Creates a new Page instance using the specified properties. * @param [properties] Properties to set - * @returns ListPagesRequest instance + * @returns Page instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest): google.cloud.dialogflow.cx.v3beta1.ListPagesRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IPage): google.cloud.dialogflow.cx.v3beta1.Page; /** - * Encodes the specified ListPagesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesRequest.verify|verify} messages. - * @param message ListPagesRequest message or plain object to encode + * Encodes the specified Page message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Page.verify|verify} messages. + * @param message Page message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IPage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListPagesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesRequest.verify|verify} messages. - * @param message ListPagesRequest message or plain object to encode + * Encodes the specified Page message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Page.verify|verify} messages. + * @param message Page message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IPage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListPagesRequest message from the specified reader or buffer. + * Decodes a Page message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListPagesRequest + * @returns Page * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListPagesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Page; /** - * Decodes a ListPagesRequest message from the specified reader or buffer, length delimited. + * Decodes a Page message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListPagesRequest + * @returns Page * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListPagesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Page; /** - * Verifies a ListPagesRequest message. + * Verifies a Page message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListPagesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Page message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListPagesRequest + * @returns Page */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListPagesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Page; /** - * Creates a plain object from a ListPagesRequest message. Also converts values to other types if specified. - * @param message ListPagesRequest - * @param [options] Conversion options + * Creates a plain object from a Page message. Also converts values to other types if specified. + * @param message Page + * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListPagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Page, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListPagesRequest to JSON. + * Converts this Page to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListPagesRequest + * Gets the default type url for Page * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListPagesResponse. */ - interface IListPagesResponse { - - /** ListPagesResponse pages */ - pages?: (google.cloud.dialogflow.cx.v3beta1.IPage[]|null); + /** Properties of a Form. */ + interface IForm { - /** ListPagesResponse nextPageToken */ - nextPageToken?: (string|null); + /** Form parameters */ + parameters?: (google.cloud.dialogflow.cx.v3beta1.Form.IParameter[]|null); } - /** Represents a ListPagesResponse. */ - class ListPagesResponse implements IListPagesResponse { + /** Represents a Form. */ + class Form implements IForm { /** - * Constructs a new ListPagesResponse. + * Constructs a new Form. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListPagesResponse); - - /** ListPagesResponse pages. */ - public pages: google.cloud.dialogflow.cx.v3beta1.IPage[]; + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IForm); - /** ListPagesResponse nextPageToken. */ - public nextPageToken: string; + /** Form parameters. */ + public parameters: google.cloud.dialogflow.cx.v3beta1.Form.IParameter[]; /** - * Creates a new ListPagesResponse instance using the specified properties. + * Creates a new Form instance using the specified properties. * @param [properties] Properties to set - * @returns ListPagesResponse instance + * @returns Form instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListPagesResponse): google.cloud.dialogflow.cx.v3beta1.ListPagesResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IForm): google.cloud.dialogflow.cx.v3beta1.Form; /** - * Encodes the specified ListPagesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.verify|verify} messages. - * @param message ListPagesResponse message or plain object to encode + * Encodes the specified Form message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.verify|verify} messages. + * @param message Form message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListPagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IForm, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListPagesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.verify|verify} messages. - * @param message ListPagesResponse message or plain object to encode + * Encodes the specified Form message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.verify|verify} messages. + * @param message Form message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListPagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IForm, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListPagesResponse message from the specified reader or buffer. + * Decodes a Form message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListPagesResponse + * @returns Form * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListPagesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Form; /** - * Decodes a ListPagesResponse message from the specified reader or buffer, length delimited. + * Decodes a Form message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListPagesResponse + * @returns Form * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListPagesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Form; /** - * Verifies a ListPagesResponse message. + * Verifies a Form message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListPagesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Form message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListPagesResponse + * @returns Form */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListPagesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Form; /** - * Creates a plain object from a ListPagesResponse message. Also converts values to other types if specified. - * @param message ListPagesResponse + * Creates a plain object from a Form message. Also converts values to other types if specified. + * @param message Form * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListPagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Form, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListPagesResponse to JSON. + * Converts this Form to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListPagesResponse + * Gets the default type url for Form * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetPageRequest. */ - interface IGetPageRequest { + namespace Form { - /** GetPageRequest name */ + /** Properties of a Parameter. */ + interface IParameter { + + /** Parameter displayName */ + displayName?: (string|null); + + /** Parameter required */ + required?: (boolean|null); + + /** Parameter entityType */ + entityType?: (string|null); + + /** Parameter isList */ + isList?: (boolean|null); + + /** Parameter fillBehavior */ + fillBehavior?: (google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior|null); + + /** Parameter defaultValue */ + defaultValue?: (google.protobuf.IValue|null); + + /** Parameter redact */ + redact?: (boolean|null); + } + + /** Represents a Parameter. */ + class Parameter implements IParameter { + + /** + * Constructs a new Parameter. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Form.IParameter); + + /** Parameter displayName. */ + public displayName: string; + + /** Parameter required. */ + public required: boolean; + + /** Parameter entityType. */ + public entityType: string; + + /** Parameter isList. */ + public isList: boolean; + + /** Parameter fillBehavior. */ + public fillBehavior?: (google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior|null); + + /** Parameter defaultValue. */ + public defaultValue?: (google.protobuf.IValue|null); + + /** Parameter redact. */ + public redact: boolean; + + /** + * Creates a new Parameter instance using the specified properties. + * @param [properties] Properties to set + * @returns Parameter instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Form.IParameter): google.cloud.dialogflow.cx.v3beta1.Form.Parameter; + + /** + * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.verify|verify} messages. + * @param message Parameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.Form.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.verify|verify} messages. + * @param message Parameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Form.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Parameter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Parameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Form.Parameter; + + /** + * Decodes a Parameter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Parameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Form.Parameter; + + /** + * Verifies a Parameter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Parameter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Parameter + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Form.Parameter; + + /** + * Creates a plain object from a Parameter message. Also converts values to other types if specified. + * @param message Parameter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Form.Parameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Parameter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Parameter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Parameter { + + /** Properties of a FillBehavior. */ + interface IFillBehavior { + + /** FillBehavior initialPromptFulfillment */ + initialPromptFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); + + /** FillBehavior repromptEventHandlers */ + repromptEventHandlers?: (google.cloud.dialogflow.cx.v3beta1.IEventHandler[]|null); + } + + /** Represents a FillBehavior. */ + class FillBehavior implements IFillBehavior { + + /** + * Constructs a new FillBehavior. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior); + + /** FillBehavior initialPromptFulfillment. */ + public initialPromptFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); + + /** FillBehavior repromptEventHandlers. */ + public repromptEventHandlers: google.cloud.dialogflow.cx.v3beta1.IEventHandler[]; + + /** + * Creates a new FillBehavior instance using the specified properties. + * @param [properties] Properties to set + * @returns FillBehavior instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior): google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior; + + /** + * Encodes the specified FillBehavior message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify|verify} messages. + * @param message FillBehavior message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FillBehavior message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify|verify} messages. + * @param message FillBehavior message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FillBehavior message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FillBehavior + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior; + + /** + * Decodes a FillBehavior message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FillBehavior + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior; + + /** + * Verifies a FillBehavior message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FillBehavior message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FillBehavior + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior; + + /** + * Creates a plain object from a FillBehavior message. Also converts values to other types if specified. + * @param message FillBehavior + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FillBehavior to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FillBehavior + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of an EventHandler. */ + interface IEventHandler { + + /** EventHandler name */ name?: (string|null); - /** GetPageRequest languageCode */ - languageCode?: (string|null); + /** EventHandler event */ + event?: (string|null); + + /** EventHandler triggerFulfillment */ + triggerFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); + + /** EventHandler targetPage */ + targetPage?: (string|null); + + /** EventHandler targetFlow */ + targetFlow?: (string|null); } - /** Represents a GetPageRequest. */ - class GetPageRequest implements IGetPageRequest { + /** Represents an EventHandler. */ + class EventHandler implements IEventHandler { /** - * Constructs a new GetPageRequest. + * Constructs a new EventHandler. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IEventHandler); - /** GetPageRequest name. */ + /** EventHandler name. */ public name: string; - /** GetPageRequest languageCode. */ - public languageCode: string; + /** EventHandler event. */ + public event: string; + + /** EventHandler triggerFulfillment. */ + public triggerFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); + + /** EventHandler targetPage. */ + public targetPage?: (string|null); + + /** EventHandler targetFlow. */ + public targetFlow?: (string|null); + + /** EventHandler target. */ + public target?: ("targetPage"|"targetFlow"); /** - * Creates a new GetPageRequest instance using the specified properties. + * Creates a new EventHandler instance using the specified properties. * @param [properties] Properties to set - * @returns GetPageRequest instance + * @returns EventHandler instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest): google.cloud.dialogflow.cx.v3beta1.GetPageRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IEventHandler): google.cloud.dialogflow.cx.v3beta1.EventHandler; /** - * Encodes the specified GetPageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetPageRequest.verify|verify} messages. - * @param message GetPageRequest message or plain object to encode + * Encodes the specified EventHandler message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EventHandler.verify|verify} messages. + * @param message EventHandler message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IEventHandler, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetPageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetPageRequest.verify|verify} messages. - * @param message GetPageRequest message or plain object to encode + * Encodes the specified EventHandler message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EventHandler.verify|verify} messages. + * @param message EventHandler message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IEventHandler, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetPageRequest message from the specified reader or buffer. + * Decodes an EventHandler message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetPageRequest + * @returns EventHandler * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetPageRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.EventHandler; /** - * Decodes a GetPageRequest message from the specified reader or buffer, length delimited. + * Decodes an EventHandler message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetPageRequest + * @returns EventHandler * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetPageRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.EventHandler; /** - * Verifies a GetPageRequest message. + * Verifies an EventHandler message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetPageRequest message from a plain object. Also converts values to their respective internal types. + * Creates an EventHandler message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetPageRequest + * @returns EventHandler */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetPageRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.EventHandler; /** - * Creates a plain object from a GetPageRequest message. Also converts values to other types if specified. - * @param message GetPageRequest + * Creates a plain object from an EventHandler message. Also converts values to other types if specified. + * @param message EventHandler * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetPageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.EventHandler, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetPageRequest to JSON. + * Converts this EventHandler to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetPageRequest + * Gets the default type url for EventHandler * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreatePageRequest. */ - interface ICreatePageRequest { + /** Properties of a TransitionRoute. */ + interface ITransitionRoute { - /** CreatePageRequest parent */ - parent?: (string|null); + /** TransitionRoute name */ + name?: (string|null); - /** CreatePageRequest page */ - page?: (google.cloud.dialogflow.cx.v3beta1.IPage|null); + /** TransitionRoute intent */ + intent?: (string|null); - /** CreatePageRequest languageCode */ - languageCode?: (string|null); + /** TransitionRoute condition */ + condition?: (string|null); + + /** TransitionRoute triggerFulfillment */ + triggerFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); + + /** TransitionRoute targetPage */ + targetPage?: (string|null); + + /** TransitionRoute targetFlow */ + targetFlow?: (string|null); } - /** Represents a CreatePageRequest. */ - class CreatePageRequest implements ICreatePageRequest { + /** Represents a TransitionRoute. */ + class TransitionRoute implements ITransitionRoute { /** - * Constructs a new CreatePageRequest. + * Constructs a new TransitionRoute. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute); - /** CreatePageRequest parent. */ - public parent: string; + /** TransitionRoute name. */ + public name: string; - /** CreatePageRequest page. */ - public page?: (google.cloud.dialogflow.cx.v3beta1.IPage|null); + /** TransitionRoute intent. */ + public intent: string; - /** CreatePageRequest languageCode. */ - public languageCode: string; + /** TransitionRoute condition. */ + public condition: string; + + /** TransitionRoute triggerFulfillment. */ + public triggerFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); + + /** TransitionRoute targetPage. */ + public targetPage?: (string|null); + + /** TransitionRoute targetFlow. */ + public targetFlow?: (string|null); + + /** TransitionRoute target. */ + public target?: ("targetPage"|"targetFlow"); /** - * Creates a new CreatePageRequest instance using the specified properties. + * Creates a new TransitionRoute instance using the specified properties. * @param [properties] Properties to set - * @returns CreatePageRequest instance + * @returns TransitionRoute instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest): google.cloud.dialogflow.cx.v3beta1.CreatePageRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute): google.cloud.dialogflow.cx.v3beta1.TransitionRoute; /** - * Encodes the specified CreatePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.verify|verify} messages. - * @param message CreatePageRequest message or plain object to encode + * Encodes the specified TransitionRoute message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify|verify} messages. + * @param message TransitionRoute message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreatePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.verify|verify} messages. - * @param message CreatePageRequest message or plain object to encode + * Encodes the specified TransitionRoute message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify|verify} messages. + * @param message TransitionRoute message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreatePageRequest message from the specified reader or buffer. + * Decodes a TransitionRoute message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreatePageRequest + * @returns TransitionRoute * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.CreatePageRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.TransitionRoute; /** - * Decodes a CreatePageRequest message from the specified reader or buffer, length delimited. + * Decodes a TransitionRoute message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreatePageRequest + * @returns TransitionRoute * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.CreatePageRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.TransitionRoute; /** - * Verifies a CreatePageRequest message. + * Verifies a TransitionRoute message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreatePageRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TransitionRoute message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreatePageRequest + * @returns TransitionRoute */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.CreatePageRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.TransitionRoute; + + /** + * Creates a plain object from a TransitionRoute message. Also converts values to other types if specified. + * @param message TransitionRoute + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.TransitionRoute, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TransitionRoute to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TransitionRoute + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPagesRequest. */ + interface IListPagesRequest { + + /** ListPagesRequest parent */ + parent?: (string|null); + + /** ListPagesRequest languageCode */ + languageCode?: (string|null); + + /** ListPagesRequest pageSize */ + pageSize?: (number|null); + + /** ListPagesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListPagesRequest. */ + class ListPagesRequest implements IListPagesRequest { + + /** + * Constructs a new ListPagesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest); + + /** ListPagesRequest parent. */ + public parent: string; + + /** ListPagesRequest languageCode. */ + public languageCode: string; + + /** ListPagesRequest pageSize. */ + public pageSize: number; + + /** ListPagesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListPagesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPagesRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest): google.cloud.dialogflow.cx.v3beta1.ListPagesRequest; + + /** + * Encodes the specified ListPagesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesRequest.verify|verify} messages. + * @param message ListPagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPagesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesRequest.verify|verify} messages. + * @param message ListPagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPagesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListPagesRequest; + + /** + * Decodes a ListPagesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListPagesRequest; + + /** + * Verifies a ListPagesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPagesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPagesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListPagesRequest; + + /** + * Creates a plain object from a ListPagesRequest message. Also converts values to other types if specified. + * @param message ListPagesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListPagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPagesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPagesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPagesResponse. */ + interface IListPagesResponse { + + /** ListPagesResponse pages */ + pages?: (google.cloud.dialogflow.cx.v3beta1.IPage[]|null); + + /** ListPagesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListPagesResponse. */ + class ListPagesResponse implements IListPagesResponse { + + /** + * Constructs a new ListPagesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListPagesResponse); + + /** ListPagesResponse pages. */ + public pages: google.cloud.dialogflow.cx.v3beta1.IPage[]; + + /** ListPagesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListPagesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPagesResponse instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListPagesResponse): google.cloud.dialogflow.cx.v3beta1.ListPagesResponse; + + /** + * Encodes the specified ListPagesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.verify|verify} messages. + * @param message ListPagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListPagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPagesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.verify|verify} messages. + * @param message ListPagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListPagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPagesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListPagesResponse; + + /** + * Decodes a ListPagesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListPagesResponse; + + /** + * Verifies a ListPagesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPagesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPagesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListPagesResponse; + + /** + * Creates a plain object from a ListPagesResponse message. Also converts values to other types if specified. + * @param message ListPagesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListPagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPagesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPagesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetPageRequest. */ + interface IGetPageRequest { + + /** GetPageRequest name */ + name?: (string|null); + + /** GetPageRequest languageCode */ + languageCode?: (string|null); + } + + /** Represents a GetPageRequest. */ + class GetPageRequest implements IGetPageRequest { + + /** + * Constructs a new GetPageRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest); + + /** GetPageRequest name. */ + public name: string; + + /** GetPageRequest languageCode. */ + public languageCode: string; + + /** + * Creates a new GetPageRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPageRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest): google.cloud.dialogflow.cx.v3beta1.GetPageRequest; + + /** + * Encodes the specified GetPageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetPageRequest.verify|verify} messages. + * @param message GetPageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetPageRequest.verify|verify} messages. + * @param message GetPageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPageRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetPageRequest; + + /** + * Decodes a GetPageRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetPageRequest; + + /** + * Verifies a GetPageRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPageRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPageRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetPageRequest; + + /** + * Creates a plain object from a GetPageRequest message. Also converts values to other types if specified. + * @param message GetPageRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetPageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPageRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPageRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreatePageRequest. */ + interface ICreatePageRequest { + + /** CreatePageRequest parent */ + parent?: (string|null); + + /** CreatePageRequest page */ + page?: (google.cloud.dialogflow.cx.v3beta1.IPage|null); + + /** CreatePageRequest languageCode */ + languageCode?: (string|null); + } + + /** Represents a CreatePageRequest. */ + class CreatePageRequest implements ICreatePageRequest { + + /** + * Constructs a new CreatePageRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest); + + /** CreatePageRequest parent. */ + public parent: string; + + /** CreatePageRequest page. */ + public page?: (google.cloud.dialogflow.cx.v3beta1.IPage|null); + + /** CreatePageRequest languageCode. */ + public languageCode: string; + + /** + * Creates a new CreatePageRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreatePageRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest): google.cloud.dialogflow.cx.v3beta1.CreatePageRequest; + + /** + * Encodes the specified CreatePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.verify|verify} messages. + * @param message CreatePageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreatePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.verify|verify} messages. + * @param message CreatePageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreatePageRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreatePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.CreatePageRequest; + + /** + * Decodes a CreatePageRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreatePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.CreatePageRequest; + + /** + * Verifies a CreatePageRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreatePageRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreatePageRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.CreatePageRequest; /** * Creates a plain object from a CreatePageRequest message. Also converts values to other types if specified. @@ -36930,931 +37961,312 @@ export namespace google { * @param message TelephonyTransferCall message or plain object to encode * @param [writer] Writer to encode to * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ITelephonyTransferCall, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TelephonyTransferCall message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TelephonyTransferCall - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall; - - /** - * Decodes a TelephonyTransferCall message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TelephonyTransferCall - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall; - - /** - * Verifies a TelephonyTransferCall message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TelephonyTransferCall message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TelephonyTransferCall - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall; - - /** - * Creates a plain object from a TelephonyTransferCall message. Also converts values to other types if specified. - * @param message TelephonyTransferCall - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TelephonyTransferCall to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TelephonyTransferCall - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a ValidationMessage. */ - interface IValidationMessage { - - /** ValidationMessage resourceType */ - resourceType?: (google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType|keyof typeof google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType|null); - - /** ValidationMessage resources */ - resources?: (string[]|null); - - /** ValidationMessage resourceNames */ - resourceNames?: (google.cloud.dialogflow.cx.v3beta1.IResourceName[]|null); - - /** ValidationMessage severity */ - severity?: (google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity|keyof typeof google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity|null); - - /** ValidationMessage detail */ - detail?: (string|null); - } - - /** Represents a ValidationMessage. */ - class ValidationMessage implements IValidationMessage { - - /** - * Constructs a new ValidationMessage. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IValidationMessage); - - /** ValidationMessage resourceType. */ - public resourceType: (google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType|keyof typeof google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType); - - /** ValidationMessage resources. */ - public resources: string[]; - - /** ValidationMessage resourceNames. */ - public resourceNames: google.cloud.dialogflow.cx.v3beta1.IResourceName[]; - - /** ValidationMessage severity. */ - public severity: (google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity|keyof typeof google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity); - - /** ValidationMessage detail. */ - public detail: string; - - /** - * Creates a new ValidationMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidationMessage instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IValidationMessage): google.cloud.dialogflow.cx.v3beta1.ValidationMessage; - - /** - * Encodes the specified ValidationMessage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidationMessage.verify|verify} messages. - * @param message ValidationMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IValidationMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValidationMessage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidationMessage.verify|verify} messages. - * @param message ValidationMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IValidationMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ValidationMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ValidationMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ValidationMessage; - - /** - * Decodes a ValidationMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidationMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ValidationMessage; - - /** - * Verifies a ValidationMessage message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ValidationMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidationMessage - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ValidationMessage; - - /** - * Creates a plain object from a ValidationMessage message. Also converts values to other types if specified. - * @param message ValidationMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ValidationMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValidationMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ValidationMessage - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ValidationMessage { - - /** ResourceType enum. */ - enum ResourceType { - RESOURCE_TYPE_UNSPECIFIED = 0, - AGENT = 1, - INTENT = 2, - INTENT_TRAINING_PHRASE = 8, - INTENT_PARAMETER = 9, - INTENTS = 10, - INTENT_TRAINING_PHRASES = 11, - ENTITY_TYPE = 3, - ENTITY_TYPES = 12, - WEBHOOK = 4, - FLOW = 5, - PAGE = 6, - PAGES = 13, - TRANSITION_ROUTE_GROUP = 7 - } - - /** Severity enum. */ - enum Severity { - SEVERITY_UNSPECIFIED = 0, - INFO = 1, - WARNING = 2, - ERROR = 3 - } - } - - /** Properties of a ResourceName. */ - interface IResourceName { - - /** ResourceName name */ - name?: (string|null); - - /** ResourceName displayName */ - displayName?: (string|null); - } - - /** Represents a ResourceName. */ - class ResourceName implements IResourceName { - - /** - * Constructs a new ResourceName. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IResourceName); - - /** ResourceName name. */ - public name: string; - - /** ResourceName displayName. */ - public displayName: string; - - /** - * Creates a new ResourceName instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceName instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IResourceName): google.cloud.dialogflow.cx.v3beta1.ResourceName; - - /** - * Encodes the specified ResourceName message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResourceName.verify|verify} messages. - * @param message ResourceName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IResourceName, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceName message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResourceName.verify|verify} messages. - * @param message ResourceName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IResourceName, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceName message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceName - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResourceName; - - /** - * Decodes a ResourceName message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceName - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResourceName; - - /** - * Verifies a ResourceName message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceName message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceName - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResourceName; - - /** - * Creates a plain object from a ResourceName message. Also converts values to other types if specified. - * @param message ResourceName - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResourceName, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceName to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceName - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** AudioEncoding enum. */ - enum AudioEncoding { - AUDIO_ENCODING_UNSPECIFIED = 0, - AUDIO_ENCODING_LINEAR_16 = 1, - AUDIO_ENCODING_FLAC = 2, - AUDIO_ENCODING_MULAW = 3, - AUDIO_ENCODING_AMR = 4, - AUDIO_ENCODING_AMR_WB = 5, - AUDIO_ENCODING_OGG_OPUS = 6, - AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7 - } - - /** SpeechModelVariant enum. */ - enum SpeechModelVariant { - SPEECH_MODEL_VARIANT_UNSPECIFIED = 0, - USE_BEST_AVAILABLE = 1, - USE_STANDARD = 2, - USE_ENHANCED = 3 - } - - /** Properties of a SpeechWordInfo. */ - interface ISpeechWordInfo { - - /** SpeechWordInfo word */ - word?: (string|null); - - /** SpeechWordInfo startOffset */ - startOffset?: (google.protobuf.IDuration|null); - - /** SpeechWordInfo endOffset */ - endOffset?: (google.protobuf.IDuration|null); - - /** SpeechWordInfo confidence */ - confidence?: (number|null); - } - - /** Represents a SpeechWordInfo. */ - class SpeechWordInfo implements ISpeechWordInfo { - - /** - * Constructs a new SpeechWordInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo); - - /** SpeechWordInfo word. */ - public word: string; - - /** SpeechWordInfo startOffset. */ - public startOffset?: (google.protobuf.IDuration|null); - - /** SpeechWordInfo endOffset. */ - public endOffset?: (google.protobuf.IDuration|null); - - /** SpeechWordInfo confidence. */ - public confidence: number; - - /** - * Creates a new SpeechWordInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns SpeechWordInfo instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo): google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo; - - /** - * Encodes the specified SpeechWordInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.verify|verify} messages. - * @param message SpeechWordInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SpeechWordInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.verify|verify} messages. - * @param message SpeechWordInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SpeechWordInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SpeechWordInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo; - - /** - * Decodes a SpeechWordInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SpeechWordInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo; - - /** - * Verifies a SpeechWordInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SpeechWordInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SpeechWordInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo; - - /** - * Creates a plain object from a SpeechWordInfo message. Also converts values to other types if specified. - * @param message SpeechWordInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SpeechWordInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SpeechWordInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an InputAudioConfig. */ - interface IInputAudioConfig { - - /** InputAudioConfig audioEncoding */ - audioEncoding?: (google.cloud.dialogflow.cx.v3beta1.AudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3beta1.AudioEncoding|null); - - /** InputAudioConfig sampleRateHertz */ - sampleRateHertz?: (number|null); - - /** InputAudioConfig enableWordInfo */ - enableWordInfo?: (boolean|null); - - /** InputAudioConfig phraseHints */ - phraseHints?: (string[]|null); - - /** InputAudioConfig model */ - model?: (string|null); - - /** InputAudioConfig modelVariant */ - modelVariant?: (google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant|keyof typeof google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant|null); - - /** InputAudioConfig singleUtterance */ - singleUtterance?: (boolean|null); - } - - /** Represents an InputAudioConfig. */ - class InputAudioConfig implements IInputAudioConfig { - - /** - * Constructs a new InputAudioConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig); - - /** InputAudioConfig audioEncoding. */ - public audioEncoding: (google.cloud.dialogflow.cx.v3beta1.AudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3beta1.AudioEncoding); - - /** InputAudioConfig sampleRateHertz. */ - public sampleRateHertz: number; - - /** InputAudioConfig enableWordInfo. */ - public enableWordInfo: boolean; - - /** InputAudioConfig phraseHints. */ - public phraseHints: string[]; - - /** InputAudioConfig model. */ - public model: string; - - /** InputAudioConfig modelVariant. */ - public modelVariant: (google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant|keyof typeof google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant); - - /** InputAudioConfig singleUtterance. */ - public singleUtterance: boolean; - - /** - * Creates a new InputAudioConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns InputAudioConfig instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig): google.cloud.dialogflow.cx.v3beta1.InputAudioConfig; - - /** - * Encodes the specified InputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.verify|verify} messages. - * @param message InputAudioConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.verify|verify} messages. - * @param message InputAudioConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InputAudioConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InputAudioConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.InputAudioConfig; - - /** - * Decodes an InputAudioConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InputAudioConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.InputAudioConfig; - - /** - * Verifies an InputAudioConfig message. - * @param message Plain 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 InputAudioConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InputAudioConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.InputAudioConfig; - - /** - * Creates a plain object from an InputAudioConfig message. Also converts values to other types if specified. - * @param message InputAudioConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.InputAudioConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InputAudioConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InputAudioConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** SsmlVoiceGender enum. */ - enum SsmlVoiceGender { - SSML_VOICE_GENDER_UNSPECIFIED = 0, - SSML_VOICE_GENDER_MALE = 1, - SSML_VOICE_GENDER_FEMALE = 2, - SSML_VOICE_GENDER_NEUTRAL = 3 - } - - /** Properties of a VoiceSelectionParams. */ - interface IVoiceSelectionParams { - - /** VoiceSelectionParams name */ - name?: (string|null); - - /** VoiceSelectionParams ssmlGender */ - ssmlGender?: (google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender|keyof typeof google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender|null); - } - - /** Represents a VoiceSelectionParams. */ - class VoiceSelectionParams implements IVoiceSelectionParams { - - /** - * Constructs a new VoiceSelectionParams. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams); - - /** VoiceSelectionParams name. */ - public name: string; - - /** VoiceSelectionParams ssmlGender. */ - public ssmlGender: (google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender|keyof typeof google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender); - - /** - * Creates a new VoiceSelectionParams instance using the specified properties. - * @param [properties] Properties to set - * @returns VoiceSelectionParams instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams): google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams; - - /** - * Encodes the specified VoiceSelectionParams message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify|verify} messages. - * @param message VoiceSelectionParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VoiceSelectionParams message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify|verify} messages. - * @param message VoiceSelectionParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VoiceSelectionParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VoiceSelectionParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams; + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ITelephonyTransferCall, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a VoiceSelectionParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VoiceSelectionParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams; + /** + * Decodes a TelephonyTransferCall message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TelephonyTransferCall + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall; - /** - * Verifies a VoiceSelectionParams message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a TelephonyTransferCall message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TelephonyTransferCall + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall; - /** - * Creates a VoiceSelectionParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VoiceSelectionParams - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams; + /** + * Verifies a TelephonyTransferCall message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from a VoiceSelectionParams message. Also converts values to other types if specified. - * @param message VoiceSelectionParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a TelephonyTransferCall message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TelephonyTransferCall + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall; - /** - * Converts this VoiceSelectionParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from a TelephonyTransferCall message. Also converts values to other types if specified. + * @param message TelephonyTransferCall + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Gets the default type url for VoiceSelectionParams - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** + * Converts this TelephonyTransferCall to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TelephonyTransferCall + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - /** Properties of a SynthesizeSpeechConfig. */ - interface ISynthesizeSpeechConfig { + /** Properties of a ValidationMessage. */ + interface IValidationMessage { - /** SynthesizeSpeechConfig speakingRate */ - speakingRate?: (number|null); + /** ValidationMessage resourceType */ + resourceType?: (google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType|keyof typeof google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType|null); - /** SynthesizeSpeechConfig pitch */ - pitch?: (number|null); + /** ValidationMessage resources */ + resources?: (string[]|null); - /** SynthesizeSpeechConfig volumeGainDb */ - volumeGainDb?: (number|null); + /** ValidationMessage resourceNames */ + resourceNames?: (google.cloud.dialogflow.cx.v3beta1.IResourceName[]|null); - /** SynthesizeSpeechConfig effectsProfileId */ - effectsProfileId?: (string[]|null); + /** ValidationMessage severity */ + severity?: (google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity|keyof typeof google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity|null); - /** SynthesizeSpeechConfig voice */ - voice?: (google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams|null); + /** ValidationMessage detail */ + detail?: (string|null); } - /** Represents a SynthesizeSpeechConfig. */ - class SynthesizeSpeechConfig implements ISynthesizeSpeechConfig { + /** Represents a ValidationMessage. */ + class ValidationMessage implements IValidationMessage { /** - * Constructs a new SynthesizeSpeechConfig. + * Constructs a new ValidationMessage. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IValidationMessage); - /** SynthesizeSpeechConfig speakingRate. */ - public speakingRate: number; + /** ValidationMessage resourceType. */ + public resourceType: (google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType|keyof typeof google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType); - /** SynthesizeSpeechConfig pitch. */ - public pitch: number; + /** ValidationMessage resources. */ + public resources: string[]; - /** SynthesizeSpeechConfig volumeGainDb. */ - public volumeGainDb: number; + /** ValidationMessage resourceNames. */ + public resourceNames: google.cloud.dialogflow.cx.v3beta1.IResourceName[]; - /** SynthesizeSpeechConfig effectsProfileId. */ - public effectsProfileId: string[]; + /** ValidationMessage severity. */ + public severity: (google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity|keyof typeof google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity); - /** SynthesizeSpeechConfig voice. */ - public voice?: (google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams|null); + /** ValidationMessage detail. */ + public detail: string; /** - * Creates a new SynthesizeSpeechConfig instance using the specified properties. + * Creates a new ValidationMessage instance using the specified properties. * @param [properties] Properties to set - * @returns SynthesizeSpeechConfig instance + * @returns ValidationMessage instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig): google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IValidationMessage): google.cloud.dialogflow.cx.v3beta1.ValidationMessage; /** - * Encodes the specified SynthesizeSpeechConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify|verify} messages. - * @param message SynthesizeSpeechConfig message or plain object to encode + * Encodes the specified ValidationMessage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidationMessage.verify|verify} messages. + * @param message ValidationMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IValidationMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SynthesizeSpeechConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify|verify} messages. - * @param message SynthesizeSpeechConfig message or plain object to encode + * Encodes the specified ValidationMessage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidationMessage.verify|verify} messages. + * @param message ValidationMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IValidationMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer. + * Decodes a ValidationMessage message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SynthesizeSpeechConfig + * @returns ValidationMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ValidationMessage; /** - * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer, length delimited. + * Decodes a ValidationMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SynthesizeSpeechConfig + * @returns ValidationMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ValidationMessage; /** - * Verifies a SynthesizeSpeechConfig message. + * Verifies a ValidationMessage message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SynthesizeSpeechConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ValidationMessage message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SynthesizeSpeechConfig + * @returns ValidationMessage */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ValidationMessage; /** - * Creates a plain object from a SynthesizeSpeechConfig message. Also converts values to other types if specified. - * @param message SynthesizeSpeechConfig + * Creates a plain object from a ValidationMessage message. Also converts values to other types if specified. + * @param message ValidationMessage * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ValidationMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SynthesizeSpeechConfig to JSON. + * Converts this ValidationMessage to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SynthesizeSpeechConfig + * Gets the default type url for ValidationMessage * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** OutputAudioEncoding enum. */ - enum OutputAudioEncoding { - OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0, - OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1, - OUTPUT_AUDIO_ENCODING_MP3 = 2, - OUTPUT_AUDIO_ENCODING_MP3_64_KBPS = 4, - OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3, - OUTPUT_AUDIO_ENCODING_MULAW = 5 - } + namespace ValidationMessage { - /** Properties of an OutputAudioConfig. */ - interface IOutputAudioConfig { + /** ResourceType enum. */ + enum ResourceType { + RESOURCE_TYPE_UNSPECIFIED = 0, + AGENT = 1, + INTENT = 2, + INTENT_TRAINING_PHRASE = 8, + INTENT_PARAMETER = 9, + INTENTS = 10, + INTENT_TRAINING_PHRASES = 11, + ENTITY_TYPE = 3, + ENTITY_TYPES = 12, + WEBHOOK = 4, + FLOW = 5, + PAGE = 6, + PAGES = 13, + TRANSITION_ROUTE_GROUP = 7 + } - /** OutputAudioConfig audioEncoding */ - audioEncoding?: (google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding|null); + /** Severity enum. */ + enum Severity { + SEVERITY_UNSPECIFIED = 0, + INFO = 1, + WARNING = 2, + ERROR = 3 + } + } - /** OutputAudioConfig sampleRateHertz */ - sampleRateHertz?: (number|null); + /** Properties of a ResourceName. */ + interface IResourceName { - /** OutputAudioConfig synthesizeSpeechConfig */ - synthesizeSpeechConfig?: (google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig|null); + /** ResourceName name */ + name?: (string|null); + + /** ResourceName displayName */ + displayName?: (string|null); } - /** Represents an OutputAudioConfig. */ - class OutputAudioConfig implements IOutputAudioConfig { + /** Represents a ResourceName. */ + class ResourceName implements IResourceName { /** - * Constructs a new OutputAudioConfig. + * Constructs a new ResourceName. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig); - - /** OutputAudioConfig audioEncoding. */ - public audioEncoding: (google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IResourceName); - /** OutputAudioConfig sampleRateHertz. */ - public sampleRateHertz: number; + /** ResourceName name. */ + public name: string; - /** OutputAudioConfig synthesizeSpeechConfig. */ - public synthesizeSpeechConfig?: (google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig|null); + /** ResourceName displayName. */ + public displayName: string; /** - * Creates a new OutputAudioConfig instance using the specified properties. + * Creates a new ResourceName instance using the specified properties. * @param [properties] Properties to set - * @returns OutputAudioConfig instance + * @returns ResourceName instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig): google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IResourceName): google.cloud.dialogflow.cx.v3beta1.ResourceName; /** - * Encodes the specified OutputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.verify|verify} messages. - * @param message OutputAudioConfig message or plain object to encode + * Encodes the specified ResourceName message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResourceName.verify|verify} messages. + * @param message ResourceName message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IResourceName, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OutputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.verify|verify} messages. - * @param message OutputAudioConfig message or plain object to encode + * Encodes the specified ResourceName message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResourceName.verify|verify} messages. + * @param message ResourceName message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IResourceName, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OutputAudioConfig message from the specified reader or buffer. + * Decodes a ResourceName message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OutputAudioConfig + * @returns ResourceName * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResourceName; /** - * Decodes an OutputAudioConfig message from the specified reader or buffer, length delimited. + * Decodes a ResourceName message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OutputAudioConfig + * @returns ResourceName * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResourceName; /** - * Verifies an OutputAudioConfig message. + * Verifies a ResourceName message. * @param message Plain 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 OutputAudioConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceName message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OutputAudioConfig + * @returns ResourceName */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResourceName; /** - * Creates a plain object from an OutputAudioConfig message. Also converts values to other types if specified. - * @param message OutputAudioConfig + * Creates a plain object from a ResourceName message. Also converts values to other types if specified. + * @param message ResourceName * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResourceName, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OutputAudioConfig to JSON. + * Converts this ResourceName to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OutputAudioConfig + * Gets the default type url for ResourceName * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -63788,6 +64200,109 @@ export namespace google { } } + /** 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 Struct. */ interface IStruct { @@ -64408,109 +64923,6 @@ export namespace google { 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 Timestamp. */ interface ITimestamp { diff --git a/packages/google-cloud-dialogflow-cx/protos/protos.js b/packages/google-cloud-dialogflow-cx/protos/protos.js index 06a73d260de..459154e1d8c 100644 --- a/packages/google-cloud-dialogflow-cx/protos/protos.js +++ b/packages/google-cloud-dialogflow-cx/protos/protos.js @@ -81,6 +81,7 @@ * Properties of an AdvancedSettings. * @memberof google.cloud.dialogflow.cx.v3 * @interface IAdvancedSettings + * @property {google.cloud.dialogflow.cx.v3.IGcsDestination|null} [audioExportGcsDestination] AdvancedSettings audioExportGcsDestination * @property {google.cloud.dialogflow.cx.v3.AdvancedSettings.ILoggingSettings|null} [loggingSettings] AdvancedSettings loggingSettings */ @@ -99,6 +100,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * AdvancedSettings audioExportGcsDestination. + * @member {google.cloud.dialogflow.cx.v3.IGcsDestination|null|undefined} audioExportGcsDestination + * @memberof google.cloud.dialogflow.cx.v3.AdvancedSettings + * @instance + */ + AdvancedSettings.prototype.audioExportGcsDestination = null; + /** * AdvancedSettings loggingSettings. * @member {google.cloud.dialogflow.cx.v3.AdvancedSettings.ILoggingSettings|null|undefined} loggingSettings @@ -131,6 +140,8 @@ AdvancedSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.audioExportGcsDestination != null && Object.hasOwnProperty.call(message, "audioExportGcsDestination")) + $root.google.cloud.dialogflow.cx.v3.GcsDestination.encode(message.audioExportGcsDestination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.loggingSettings != null && Object.hasOwnProperty.call(message, "loggingSettings")) $root.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings.encode(message.loggingSettings, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; @@ -167,6 +178,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 2: { + message.audioExportGcsDestination = $root.google.cloud.dialogflow.cx.v3.GcsDestination.decode(reader, reader.uint32()); + break; + } case 6: { message.loggingSettings = $root.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings.decode(reader, reader.uint32()); break; @@ -206,6 +221,11 @@ AdvancedSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.audioExportGcsDestination != null && message.hasOwnProperty("audioExportGcsDestination")) { + var error = $root.google.cloud.dialogflow.cx.v3.GcsDestination.verify(message.audioExportGcsDestination); + if (error) + return "audioExportGcsDestination." + error; + } if (message.loggingSettings != null && message.hasOwnProperty("loggingSettings")) { var error = $root.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings.verify(message.loggingSettings); if (error) @@ -226,6 +246,11 @@ if (object instanceof $root.google.cloud.dialogflow.cx.v3.AdvancedSettings) return object; var message = new $root.google.cloud.dialogflow.cx.v3.AdvancedSettings(); + if (object.audioExportGcsDestination != null) { + if (typeof object.audioExportGcsDestination !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.AdvancedSettings.audioExportGcsDestination: object expected"); + message.audioExportGcsDestination = $root.google.cloud.dialogflow.cx.v3.GcsDestination.fromObject(object.audioExportGcsDestination); + } if (object.loggingSettings != null) { if (typeof object.loggingSettings !== "object") throw TypeError(".google.cloud.dialogflow.cx.v3.AdvancedSettings.loggingSettings: object expected"); @@ -247,8 +272,12 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { + object.audioExportGcsDestination = null; object.loggingSettings = null; + } + if (message.audioExportGcsDestination != null && message.hasOwnProperty("audioExportGcsDestination")) + object.audioExportGcsDestination = $root.google.cloud.dialogflow.cx.v3.GcsDestination.toObject(message.audioExportGcsDestination, options); if (message.loggingSettings != null && message.hasOwnProperty("loggingSettings")) object.loggingSettings = $root.google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings.toObject(message.loggingSettings, options); return object; @@ -510,6 +539,209 @@ return AdvancedSettings; })(); + v3.GcsDestination = (function() { + + /** + * Properties of a GcsDestination. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IGcsDestination + * @property {string|null} [uri] GcsDestination uri + */ + + /** + * Constructs a new GcsDestination. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a GcsDestination. + * @implements IGcsDestination + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IGcsDestination=} [properties] Properties to set + */ + function GcsDestination(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcsDestination uri. + * @member {string} uri + * @memberof google.cloud.dialogflow.cx.v3.GcsDestination + * @instance + */ + GcsDestination.prototype.uri = ""; + + /** + * Creates a new GcsDestination instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.GcsDestination + * @static + * @param {google.cloud.dialogflow.cx.v3.IGcsDestination=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GcsDestination} GcsDestination instance + */ + GcsDestination.create = function create(properties) { + return new GcsDestination(properties); + }; + + /** + * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GcsDestination.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.GcsDestination + * @static + * @param {google.cloud.dialogflow.cx.v3.IGcsDestination} message GcsDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsDestination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + return writer; + }; + + /** + * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GcsDestination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GcsDestination + * @static + * @param {google.cloud.dialogflow.cx.v3.IGcsDestination} message GcsDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsDestination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcsDestination message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.GcsDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.GcsDestination} GcsDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsDestination.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GcsDestination(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcsDestination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GcsDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.GcsDestination} GcsDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsDestination.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcsDestination message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.GcsDestination + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcsDestination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + return null; + }; + + /** + * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.GcsDestination + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.GcsDestination} GcsDestination + */ + GcsDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GcsDestination) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.GcsDestination(); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.GcsDestination + * @static + * @param {google.cloud.dialogflow.cx.v3.GcsDestination} message GcsDestination + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcsDestination.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; + }; + + /** + * Converts this GcsDestination to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.GcsDestination + * @instance + * @returns {Object.} JSON object + */ + GcsDestination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcsDestination + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.GcsDestination + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcsDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GcsDestination"; + }; + + return GcsDestination; + })(); + v3.Agents = (function() { /** @@ -1065,6 +1297,7 @@ * @property {boolean|null} [enableSpellCorrection] Agent enableSpellCorrection * @property {boolean|null} [locked] Agent locked * @property {google.cloud.dialogflow.cx.v3.IAdvancedSettings|null} [advancedSettings] Agent advancedSettings + * @property {google.cloud.dialogflow.cx.v3.ITextToSpeechSettings|null} [textToSpeechSettings] Agent textToSpeechSettings */ /** @@ -1195,6 +1428,14 @@ */ Agent.prototype.advancedSettings = null; + /** + * Agent textToSpeechSettings. + * @member {google.cloud.dialogflow.cx.v3.ITextToSpeechSettings|null|undefined} textToSpeechSettings + * @memberof google.cloud.dialogflow.cx.v3.Agent + * @instance + */ + Agent.prototype.textToSpeechSettings = null; + /** * Creates a new Agent instance using the specified properties. * @function create @@ -1248,6 +1489,8 @@ $root.google.cloud.dialogflow.cx.v3.AdvancedSettings.encode(message.advancedSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); if (message.locked != null && Object.hasOwnProperty.call(message, "locked")) writer.uint32(/* id 27, wireType 0 =*/216).bool(message.locked); + if (message.textToSpeechSettings != null && Object.hasOwnProperty.call(message, "textToSpeechSettings")) + $root.google.cloud.dialogflow.cx.v3.TextToSpeechSettings.encode(message.textToSpeechSettings, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); return writer; }; @@ -1340,6 +1583,10 @@ message.advancedSettings = $root.google.cloud.dialogflow.cx.v3.AdvancedSettings.decode(reader, reader.uint32()); break; } + case 31: { + message.textToSpeechSettings = $root.google.cloud.dialogflow.cx.v3.TextToSpeechSettings.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -1425,6 +1672,11 @@ if (error) return "advancedSettings." + error; } + if (message.textToSpeechSettings != null && message.hasOwnProperty("textToSpeechSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3.TextToSpeechSettings.verify(message.textToSpeechSettings); + if (error) + return "textToSpeechSettings." + error; + } return null; }; @@ -1479,6 +1731,11 @@ throw TypeError(".google.cloud.dialogflow.cx.v3.Agent.advancedSettings: object expected"); message.advancedSettings = $root.google.cloud.dialogflow.cx.v3.AdvancedSettings.fromObject(object.advancedSettings); } + if (object.textToSpeechSettings != null) { + if (typeof object.textToSpeechSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Agent.textToSpeechSettings: object expected"); + message.textToSpeechSettings = $root.google.cloud.dialogflow.cx.v3.TextToSpeechSettings.fromObject(object.textToSpeechSettings); + } return message; }; @@ -1511,6 +1768,7 @@ object.enableSpellCorrection = false; object.advancedSettings = null; object.locked = false; + object.textToSpeechSettings = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -1543,6 +1801,8 @@ object.advancedSettings = $root.google.cloud.dialogflow.cx.v3.AdvancedSettings.toObject(message.advancedSettings, options); if (message.locked != null && message.hasOwnProperty("locked")) object.locked = message.locked; + if (message.textToSpeechSettings != null && message.hasOwnProperty("textToSpeechSettings")) + object.textToSpeechSettings = $root.google.cloud.dialogflow.cx.v3.TextToSpeechSettings.toObject(message.textToSpeechSettings, options); return object; }; @@ -4557,391 +4817,71 @@ return AgentValidationResult; })(); - v3.Flows = (function() { - - /** - * Constructs a new Flows service. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a Flows - * @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 Flows(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Flows.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Flows; - - /** - * Creates new Flows service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @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 {Flows} RPC service. Useful where requests and/or responses are streamed. - */ - Flows.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|createFlow}. - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @typedef CreateFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Flow} [response] Flow - */ - - /** - * Calls CreateFlow. - * @function createFlow - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateFlowRequest} request CreateFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Flows.CreateFlowCallback} callback Node-style callback called with the error, if any, and Flow - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Flows.prototype.createFlow = function createFlow(request, callback) { - return this.rpcCall(createFlow, $root.google.cloud.dialogflow.cx.v3.CreateFlowRequest, $root.google.cloud.dialogflow.cx.v3.Flow, request, callback); - }, "name", { value: "CreateFlow" }); - - /** - * Calls CreateFlow. - * @function createFlow - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateFlowRequest} request CreateFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|deleteFlow}. - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @typedef DeleteFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteFlow. - * @function deleteFlow - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteFlowRequest} request DeleteFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Flows.DeleteFlowCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Flows.prototype.deleteFlow = function deleteFlow(request, callback) { - return this.rpcCall(deleteFlow, $root.google.cloud.dialogflow.cx.v3.DeleteFlowRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteFlow" }); - - /** - * Calls DeleteFlow. - * @function deleteFlow - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteFlowRequest} request DeleteFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|listFlows}. - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @typedef ListFlowsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.ListFlowsResponse} [response] ListFlowsResponse - */ - - /** - * Calls ListFlows. - * @function listFlows - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListFlowsRequest} request ListFlowsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Flows.ListFlowsCallback} callback Node-style callback called with the error, if any, and ListFlowsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Flows.prototype.listFlows = function listFlows(request, callback) { - return this.rpcCall(listFlows, $root.google.cloud.dialogflow.cx.v3.ListFlowsRequest, $root.google.cloud.dialogflow.cx.v3.ListFlowsResponse, request, callback); - }, "name", { value: "ListFlows" }); - - /** - * Calls ListFlows. - * @function listFlows - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListFlowsRequest} request ListFlowsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|getFlow}. - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @typedef GetFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Flow} [response] Flow - */ - - /** - * Calls GetFlow. - * @function getFlow - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetFlowRequest} request GetFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Flows.GetFlowCallback} callback Node-style callback called with the error, if any, and Flow - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Flows.prototype.getFlow = function getFlow(request, callback) { - return this.rpcCall(getFlow, $root.google.cloud.dialogflow.cx.v3.GetFlowRequest, $root.google.cloud.dialogflow.cx.v3.Flow, request, callback); - }, "name", { value: "GetFlow" }); - - /** - * Calls GetFlow. - * @function getFlow - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetFlowRequest} request GetFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|updateFlow}. - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @typedef UpdateFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Flow} [response] Flow - */ - - /** - * Calls UpdateFlow. - * @function updateFlow - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateFlowRequest} request UpdateFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Flows.UpdateFlowCallback} callback Node-style callback called with the error, if any, and Flow - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Flows.prototype.updateFlow = function updateFlow(request, callback) { - return this.rpcCall(updateFlow, $root.google.cloud.dialogflow.cx.v3.UpdateFlowRequest, $root.google.cloud.dialogflow.cx.v3.Flow, request, callback); - }, "name", { value: "UpdateFlow" }); - - /** - * Calls UpdateFlow. - * @function updateFlow - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateFlowRequest} request UpdateFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|trainFlow}. - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @typedef TrainFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls TrainFlow. - * @function trainFlow - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3.ITrainFlowRequest} request TrainFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Flows.TrainFlowCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Flows.prototype.trainFlow = function trainFlow(request, callback) { - return this.rpcCall(trainFlow, $root.google.cloud.dialogflow.cx.v3.TrainFlowRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "TrainFlow" }); - - /** - * Calls TrainFlow. - * @function trainFlow - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3.ITrainFlowRequest} request TrainFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|validateFlow}. - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @typedef ValidateFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.FlowValidationResult} [response] FlowValidationResult - */ - - /** - * Calls ValidateFlow. - * @function validateFlow - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3.IValidateFlowRequest} request ValidateFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Flows.ValidateFlowCallback} callback Node-style callback called with the error, if any, and FlowValidationResult - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Flows.prototype.validateFlow = function validateFlow(request, callback) { - return this.rpcCall(validateFlow, $root.google.cloud.dialogflow.cx.v3.ValidateFlowRequest, $root.google.cloud.dialogflow.cx.v3.FlowValidationResult, request, callback); - }, "name", { value: "ValidateFlow" }); - - /** - * Calls ValidateFlow. - * @function validateFlow - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3.IValidateFlowRequest} request ValidateFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|getFlowValidationResult}. - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @typedef GetFlowValidationResultCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.FlowValidationResult} [response] FlowValidationResult - */ - - /** - * Calls GetFlowValidationResult. - * @function getFlowValidationResult - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetFlowValidationResultRequest} request GetFlowValidationResultRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Flows.GetFlowValidationResultCallback} callback Node-style callback called with the error, if any, and FlowValidationResult - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Flows.prototype.getFlowValidationResult = function getFlowValidationResult(request, callback) { - return this.rpcCall(getFlowValidationResult, $root.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest, $root.google.cloud.dialogflow.cx.v3.FlowValidationResult, request, callback); - }, "name", { value: "GetFlowValidationResult" }); - - /** - * Calls GetFlowValidationResult. - * @function getFlowValidationResult - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetFlowValidationResultRequest} request GetFlowValidationResultRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|importFlow}. - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @typedef ImportFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls ImportFlow. - * @function importFlow - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3.IImportFlowRequest} request ImportFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Flows.ImportFlowCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Flows.prototype.importFlow = function importFlow(request, callback) { - return this.rpcCall(importFlow, $root.google.cloud.dialogflow.cx.v3.ImportFlowRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ImportFlow" }); - - /** - * Calls ImportFlow. - * @function importFlow - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3.IImportFlowRequest} request ImportFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|exportFlow}. - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @typedef ExportFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls ExportFlow. - * @function exportFlow - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3.IExportFlowRequest} request ExportFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Flows.ExportFlowCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Flows.prototype.exportFlow = function exportFlow(request, callback) { - return this.rpcCall(exportFlow, $root.google.cloud.dialogflow.cx.v3.ExportFlowRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ExportFlow" }); - - /** - * Calls ExportFlow. - * @function exportFlow - * @memberof google.cloud.dialogflow.cx.v3.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3.IExportFlowRequest} request ExportFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * AudioEncoding enum. + * @name google.cloud.dialogflow.cx.v3.AudioEncoding + * @enum {number} + * @property {number} AUDIO_ENCODING_UNSPECIFIED=0 AUDIO_ENCODING_UNSPECIFIED value + * @property {number} AUDIO_ENCODING_LINEAR_16=1 AUDIO_ENCODING_LINEAR_16 value + * @property {number} AUDIO_ENCODING_FLAC=2 AUDIO_ENCODING_FLAC value + * @property {number} AUDIO_ENCODING_MULAW=3 AUDIO_ENCODING_MULAW value + * @property {number} AUDIO_ENCODING_AMR=4 AUDIO_ENCODING_AMR value + * @property {number} AUDIO_ENCODING_AMR_WB=5 AUDIO_ENCODING_AMR_WB value + * @property {number} AUDIO_ENCODING_OGG_OPUS=6 AUDIO_ENCODING_OGG_OPUS value + * @property {number} AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE=7 AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE value + */ + v3.AudioEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AUDIO_ENCODING_UNSPECIFIED"] = 0; + values[valuesById[1] = "AUDIO_ENCODING_LINEAR_16"] = 1; + values[valuesById[2] = "AUDIO_ENCODING_FLAC"] = 2; + values[valuesById[3] = "AUDIO_ENCODING_MULAW"] = 3; + values[valuesById[4] = "AUDIO_ENCODING_AMR"] = 4; + values[valuesById[5] = "AUDIO_ENCODING_AMR_WB"] = 5; + values[valuesById[6] = "AUDIO_ENCODING_OGG_OPUS"] = 6; + values[valuesById[7] = "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE"] = 7; + return values; + })(); - return Flows; + /** + * SpeechModelVariant enum. + * @name google.cloud.dialogflow.cx.v3.SpeechModelVariant + * @enum {number} + * @property {number} SPEECH_MODEL_VARIANT_UNSPECIFIED=0 SPEECH_MODEL_VARIANT_UNSPECIFIED value + * @property {number} USE_BEST_AVAILABLE=1 USE_BEST_AVAILABLE value + * @property {number} USE_STANDARD=2 USE_STANDARD value + * @property {number} USE_ENHANCED=3 USE_ENHANCED value + */ + v3.SpeechModelVariant = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SPEECH_MODEL_VARIANT_UNSPECIFIED"] = 0; + values[valuesById[1] = "USE_BEST_AVAILABLE"] = 1; + values[valuesById[2] = "USE_STANDARD"] = 2; + values[valuesById[3] = "USE_ENHANCED"] = 3; + return values; })(); - v3.NluSettings = (function() { + v3.SpeechWordInfo = (function() { /** - * Properties of a NluSettings. + * Properties of a SpeechWordInfo. * @memberof google.cloud.dialogflow.cx.v3 - * @interface INluSettings - * @property {google.cloud.dialogflow.cx.v3.NluSettings.ModelType|null} [modelType] NluSettings modelType - * @property {number|null} [classificationThreshold] NluSettings classificationThreshold - * @property {google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode|null} [modelTrainingMode] NluSettings modelTrainingMode + * @interface ISpeechWordInfo + * @property {string|null} [word] SpeechWordInfo word + * @property {google.protobuf.IDuration|null} [startOffset] SpeechWordInfo startOffset + * @property {google.protobuf.IDuration|null} [endOffset] SpeechWordInfo endOffset + * @property {number|null} [confidence] SpeechWordInfo confidence */ /** - * Constructs a new NluSettings. + * Constructs a new SpeechWordInfo. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a NluSettings. - * @implements INluSettings + * @classdesc Represents a SpeechWordInfo. + * @implements ISpeechWordInfo * @constructor - * @param {google.cloud.dialogflow.cx.v3.INluSettings=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ISpeechWordInfo=} [properties] Properties to set */ - function NluSettings(properties) { + function SpeechWordInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4949,103 +4889,117 @@ } /** - * NluSettings modelType. - * @member {google.cloud.dialogflow.cx.v3.NluSettings.ModelType} modelType - * @memberof google.cloud.dialogflow.cx.v3.NluSettings + * SpeechWordInfo word. + * @member {string} word + * @memberof google.cloud.dialogflow.cx.v3.SpeechWordInfo * @instance */ - NluSettings.prototype.modelType = 0; + SpeechWordInfo.prototype.word = ""; /** - * NluSettings classificationThreshold. - * @member {number} classificationThreshold - * @memberof google.cloud.dialogflow.cx.v3.NluSettings + * SpeechWordInfo startOffset. + * @member {google.protobuf.IDuration|null|undefined} startOffset + * @memberof google.cloud.dialogflow.cx.v3.SpeechWordInfo * @instance */ - NluSettings.prototype.classificationThreshold = 0; + SpeechWordInfo.prototype.startOffset = null; /** - * NluSettings modelTrainingMode. - * @member {google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode} modelTrainingMode - * @memberof google.cloud.dialogflow.cx.v3.NluSettings + * SpeechWordInfo endOffset. + * @member {google.protobuf.IDuration|null|undefined} endOffset + * @memberof google.cloud.dialogflow.cx.v3.SpeechWordInfo * @instance */ - NluSettings.prototype.modelTrainingMode = 0; + SpeechWordInfo.prototype.endOffset = null; /** - * Creates a new NluSettings instance using the specified properties. + * SpeechWordInfo confidence. + * @member {number} confidence + * @memberof google.cloud.dialogflow.cx.v3.SpeechWordInfo + * @instance + */ + SpeechWordInfo.prototype.confidence = 0; + + /** + * Creates a new SpeechWordInfo instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.NluSettings + * @memberof google.cloud.dialogflow.cx.v3.SpeechWordInfo * @static - * @param {google.cloud.dialogflow.cx.v3.INluSettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.NluSettings} NluSettings instance + * @param {google.cloud.dialogflow.cx.v3.ISpeechWordInfo=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.SpeechWordInfo} SpeechWordInfo instance */ - NluSettings.create = function create(properties) { - return new NluSettings(properties); + SpeechWordInfo.create = function create(properties) { + return new SpeechWordInfo(properties); }; /** - * Encodes the specified NluSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.NluSettings.verify|verify} messages. + * Encodes the specified SpeechWordInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SpeechWordInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.NluSettings + * @memberof google.cloud.dialogflow.cx.v3.SpeechWordInfo * @static - * @param {google.cloud.dialogflow.cx.v3.INluSettings} message NluSettings message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ISpeechWordInfo} message SpeechWordInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NluSettings.encode = function encode(message, writer) { + SpeechWordInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.modelType != null && Object.hasOwnProperty.call(message, "modelType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.modelType); - if (message.classificationThreshold != null && Object.hasOwnProperty.call(message, "classificationThreshold")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.classificationThreshold); - if (message.modelTrainingMode != null && Object.hasOwnProperty.call(message, "modelTrainingMode")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.modelTrainingMode); + if (message.startOffset != null && Object.hasOwnProperty.call(message, "startOffset")) + $root.google.protobuf.Duration.encode(message.startOffset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset")) + $root.google.protobuf.Duration.encode(message.endOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.word != null && Object.hasOwnProperty.call(message, "word")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.word); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence); return writer; }; /** - * Encodes the specified NluSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.NluSettings.verify|verify} messages. + * Encodes the specified SpeechWordInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SpeechWordInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.NluSettings + * @memberof google.cloud.dialogflow.cx.v3.SpeechWordInfo * @static - * @param {google.cloud.dialogflow.cx.v3.INluSettings} message NluSettings message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ISpeechWordInfo} message SpeechWordInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NluSettings.encodeDelimited = function encodeDelimited(message, writer) { + SpeechWordInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NluSettings message from the specified reader or buffer. + * Decodes a SpeechWordInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.NluSettings + * @memberof google.cloud.dialogflow.cx.v3.SpeechWordInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.NluSettings} NluSettings + * @returns {google.cloud.dialogflow.cx.v3.SpeechWordInfo} SpeechWordInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NluSettings.decode = function decode(reader, length) { + SpeechWordInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.NluSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.SpeechWordInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 3: { + message.word = reader.string(); + break; + } case 1: { - message.modelType = reader.int32(); + message.startOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } - case 3: { - message.classificationThreshold = reader.float(); + case 2: { + message.endOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } case 4: { - message.modelTrainingMode = reader.int32(); + message.confidence = reader.float(); break; } default: @@ -5057,228 +5011,164 @@ }; /** - * Decodes a NluSettings message from the specified reader or buffer, length delimited. + * Decodes a SpeechWordInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.NluSettings + * @memberof google.cloud.dialogflow.cx.v3.SpeechWordInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.NluSettings} NluSettings + * @returns {google.cloud.dialogflow.cx.v3.SpeechWordInfo} SpeechWordInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NluSettings.decodeDelimited = function decodeDelimited(reader) { + SpeechWordInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NluSettings message. + * Verifies a SpeechWordInfo message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.NluSettings + * @memberof google.cloud.dialogflow.cx.v3.SpeechWordInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NluSettings.verify = function verify(message) { + SpeechWordInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.modelType != null && message.hasOwnProperty("modelType")) - switch (message.modelType) { - default: - return "modelType: enum value expected"; - case 0: - case 1: - case 3: - break; - } - if (message.classificationThreshold != null && message.hasOwnProperty("classificationThreshold")) - if (typeof message.classificationThreshold !== "number") - return "classificationThreshold: number expected"; - if (message.modelTrainingMode != null && message.hasOwnProperty("modelTrainingMode")) - switch (message.modelTrainingMode) { - default: - return "modelTrainingMode: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.word != null && message.hasOwnProperty("word")) + if (!$util.isString(message.word)) + return "word: string expected"; + if (message.startOffset != null && message.hasOwnProperty("startOffset")) { + var error = $root.google.protobuf.Duration.verify(message.startOffset); + if (error) + return "startOffset." + error; + } + if (message.endOffset != null && message.hasOwnProperty("endOffset")) { + var error = $root.google.protobuf.Duration.verify(message.endOffset); + if (error) + return "endOffset." + error; + } + if (message.confidence != null && message.hasOwnProperty("confidence")) + if (typeof message.confidence !== "number") + return "confidence: number expected"; return null; }; /** - * Creates a NluSettings message from a plain object. Also converts values to their respective internal types. + * Creates a SpeechWordInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.NluSettings + * @memberof google.cloud.dialogflow.cx.v3.SpeechWordInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.NluSettings} NluSettings + * @returns {google.cloud.dialogflow.cx.v3.SpeechWordInfo} SpeechWordInfo */ - NluSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.NluSettings) + SpeechWordInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.SpeechWordInfo) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.NluSettings(); - switch (object.modelType) { - default: - if (typeof object.modelType === "number") { - message.modelType = object.modelType; - break; - } - break; - case "MODEL_TYPE_UNSPECIFIED": - case 0: - message.modelType = 0; - break; - case "MODEL_TYPE_STANDARD": - case 1: - message.modelType = 1; - break; - case "MODEL_TYPE_ADVANCED": - case 3: - message.modelType = 3; - break; + var message = new $root.google.cloud.dialogflow.cx.v3.SpeechWordInfo(); + if (object.word != null) + message.word = String(object.word); + if (object.startOffset != null) { + if (typeof object.startOffset !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.SpeechWordInfo.startOffset: object expected"); + message.startOffset = $root.google.protobuf.Duration.fromObject(object.startOffset); } - if (object.classificationThreshold != null) - message.classificationThreshold = Number(object.classificationThreshold); - switch (object.modelTrainingMode) { - default: - if (typeof object.modelTrainingMode === "number") { - message.modelTrainingMode = object.modelTrainingMode; - break; - } - break; - case "MODEL_TRAINING_MODE_UNSPECIFIED": - case 0: - message.modelTrainingMode = 0; - break; - case "MODEL_TRAINING_MODE_AUTOMATIC": - case 1: - message.modelTrainingMode = 1; - break; - case "MODEL_TRAINING_MODE_MANUAL": - case 2: - message.modelTrainingMode = 2; - break; + if (object.endOffset != null) { + if (typeof object.endOffset !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.SpeechWordInfo.endOffset: object expected"); + message.endOffset = $root.google.protobuf.Duration.fromObject(object.endOffset); } + if (object.confidence != null) + message.confidence = Number(object.confidence); return message; }; /** - * Creates a plain object from a NluSettings message. Also converts values to other types if specified. + * Creates a plain object from a SpeechWordInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.NluSettings + * @memberof google.cloud.dialogflow.cx.v3.SpeechWordInfo * @static - * @param {google.cloud.dialogflow.cx.v3.NluSettings} message NluSettings + * @param {google.cloud.dialogflow.cx.v3.SpeechWordInfo} message SpeechWordInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NluSettings.toObject = function toObject(message, options) { + SpeechWordInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.modelType = options.enums === String ? "MODEL_TYPE_UNSPECIFIED" : 0; - object.classificationThreshold = 0; - object.modelTrainingMode = options.enums === String ? "MODEL_TRAINING_MODE_UNSPECIFIED" : 0; + object.startOffset = null; + object.endOffset = null; + object.word = ""; + object.confidence = 0; } - if (message.modelType != null && message.hasOwnProperty("modelType")) - object.modelType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.NluSettings.ModelType[message.modelType] === undefined ? message.modelType : $root.google.cloud.dialogflow.cx.v3.NluSettings.ModelType[message.modelType] : message.modelType; - if (message.classificationThreshold != null && message.hasOwnProperty("classificationThreshold")) - object.classificationThreshold = options.json && !isFinite(message.classificationThreshold) ? String(message.classificationThreshold) : message.classificationThreshold; - if (message.modelTrainingMode != null && message.hasOwnProperty("modelTrainingMode")) - object.modelTrainingMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode[message.modelTrainingMode] === undefined ? message.modelTrainingMode : $root.google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode[message.modelTrainingMode] : message.modelTrainingMode; + if (message.startOffset != null && message.hasOwnProperty("startOffset")) + object.startOffset = $root.google.protobuf.Duration.toObject(message.startOffset, options); + if (message.endOffset != null && message.hasOwnProperty("endOffset")) + object.endOffset = $root.google.protobuf.Duration.toObject(message.endOffset, options); + if (message.word != null && message.hasOwnProperty("word")) + object.word = message.word; + if (message.confidence != null && message.hasOwnProperty("confidence")) + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; return object; }; /** - * Converts this NluSettings to JSON. + * Converts this SpeechWordInfo to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.NluSettings + * @memberof google.cloud.dialogflow.cx.v3.SpeechWordInfo * @instance * @returns {Object.} JSON object */ - NluSettings.prototype.toJSON = function toJSON() { + SpeechWordInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for NluSettings + * Gets the default type url for SpeechWordInfo * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.NluSettings + * @memberof google.cloud.dialogflow.cx.v3.SpeechWordInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - NluSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SpeechWordInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.NluSettings"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SpeechWordInfo"; }; - /** - * ModelType enum. - * @name google.cloud.dialogflow.cx.v3.NluSettings.ModelType - * @enum {number} - * @property {number} MODEL_TYPE_UNSPECIFIED=0 MODEL_TYPE_UNSPECIFIED value - * @property {number} MODEL_TYPE_STANDARD=1 MODEL_TYPE_STANDARD value - * @property {number} MODEL_TYPE_ADVANCED=3 MODEL_TYPE_ADVANCED value - */ - NluSettings.ModelType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODEL_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MODEL_TYPE_STANDARD"] = 1; - values[valuesById[3] = "MODEL_TYPE_ADVANCED"] = 3; - return values; - })(); - - /** - * ModelTrainingMode enum. - * @name google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode - * @enum {number} - * @property {number} MODEL_TRAINING_MODE_UNSPECIFIED=0 MODEL_TRAINING_MODE_UNSPECIFIED value - * @property {number} MODEL_TRAINING_MODE_AUTOMATIC=1 MODEL_TRAINING_MODE_AUTOMATIC value - * @property {number} MODEL_TRAINING_MODE_MANUAL=2 MODEL_TRAINING_MODE_MANUAL value - */ - NluSettings.ModelTrainingMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODEL_TRAINING_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MODEL_TRAINING_MODE_AUTOMATIC"] = 1; - values[valuesById[2] = "MODEL_TRAINING_MODE_MANUAL"] = 2; - return values; - })(); - - return NluSettings; + return SpeechWordInfo; })(); - v3.Flow = (function() { + v3.InputAudioConfig = (function() { /** - * Properties of a Flow. + * Properties of an InputAudioConfig. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IFlow - * @property {string|null} [name] Flow name - * @property {string|null} [displayName] Flow displayName - * @property {string|null} [description] Flow description - * @property {Array.|null} [transitionRoutes] Flow transitionRoutes - * @property {Array.|null} [eventHandlers] Flow eventHandlers - * @property {Array.|null} [transitionRouteGroups] Flow transitionRouteGroups - * @property {google.cloud.dialogflow.cx.v3.INluSettings|null} [nluSettings] Flow nluSettings + * @interface IInputAudioConfig + * @property {google.cloud.dialogflow.cx.v3.AudioEncoding|null} [audioEncoding] InputAudioConfig audioEncoding + * @property {number|null} [sampleRateHertz] InputAudioConfig sampleRateHertz + * @property {boolean|null} [enableWordInfo] InputAudioConfig enableWordInfo + * @property {Array.|null} [phraseHints] InputAudioConfig phraseHints + * @property {string|null} [model] InputAudioConfig model + * @property {google.cloud.dialogflow.cx.v3.SpeechModelVariant|null} [modelVariant] InputAudioConfig modelVariant + * @property {boolean|null} [singleUtterance] InputAudioConfig singleUtterance */ /** - * Constructs a new Flow. + * Constructs a new InputAudioConfig. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a Flow. - * @implements IFlow + * @classdesc Represents an InputAudioConfig. + * @implements IInputAudioConfig * @constructor - * @param {google.cloud.dialogflow.cx.v3.IFlow=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IInputAudioConfig=} [properties] Properties to set */ - function Flow(properties) { - this.transitionRoutes = []; - this.eventHandlers = []; - this.transitionRouteGroups = []; + function InputAudioConfig(properties) { + this.phraseHints = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5286,168 +5176,162 @@ } /** - * Flow name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.Flow + * InputAudioConfig audioEncoding. + * @member {google.cloud.dialogflow.cx.v3.AudioEncoding} audioEncoding + * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig * @instance */ - Flow.prototype.name = ""; + InputAudioConfig.prototype.audioEncoding = 0; /** - * Flow displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3.Flow + * InputAudioConfig sampleRateHertz. + * @member {number} sampleRateHertz + * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig * @instance */ - Flow.prototype.displayName = ""; + InputAudioConfig.prototype.sampleRateHertz = 0; /** - * Flow description. - * @member {string} description - * @memberof google.cloud.dialogflow.cx.v3.Flow + * InputAudioConfig enableWordInfo. + * @member {boolean} enableWordInfo + * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig * @instance */ - Flow.prototype.description = ""; + InputAudioConfig.prototype.enableWordInfo = false; /** - * Flow transitionRoutes. - * @member {Array.} transitionRoutes - * @memberof google.cloud.dialogflow.cx.v3.Flow + * InputAudioConfig phraseHints. + * @member {Array.} phraseHints + * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig * @instance */ - Flow.prototype.transitionRoutes = $util.emptyArray; + InputAudioConfig.prototype.phraseHints = $util.emptyArray; /** - * Flow eventHandlers. - * @member {Array.} eventHandlers - * @memberof google.cloud.dialogflow.cx.v3.Flow + * InputAudioConfig model. + * @member {string} model + * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig * @instance */ - Flow.prototype.eventHandlers = $util.emptyArray; + InputAudioConfig.prototype.model = ""; /** - * Flow transitionRouteGroups. - * @member {Array.} transitionRouteGroups - * @memberof google.cloud.dialogflow.cx.v3.Flow + * InputAudioConfig modelVariant. + * @member {google.cloud.dialogflow.cx.v3.SpeechModelVariant} modelVariant + * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig * @instance */ - Flow.prototype.transitionRouteGroups = $util.emptyArray; + InputAudioConfig.prototype.modelVariant = 0; /** - * Flow nluSettings. - * @member {google.cloud.dialogflow.cx.v3.INluSettings|null|undefined} nluSettings - * @memberof google.cloud.dialogflow.cx.v3.Flow + * InputAudioConfig singleUtterance. + * @member {boolean} singleUtterance + * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig * @instance */ - Flow.prototype.nluSettings = null; + InputAudioConfig.prototype.singleUtterance = false; /** - * Creates a new Flow instance using the specified properties. + * Creates a new InputAudioConfig instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Flow + * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig * @static - * @param {google.cloud.dialogflow.cx.v3.IFlow=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Flow} Flow instance + * @param {google.cloud.dialogflow.cx.v3.IInputAudioConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.InputAudioConfig} InputAudioConfig instance */ - Flow.create = function create(properties) { - return new Flow(properties); + InputAudioConfig.create = function create(properties) { + return new InputAudioConfig(properties); }; /** - * Encodes the specified Flow message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Flow.verify|verify} messages. + * Encodes the specified InputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.InputAudioConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Flow + * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig * @static - * @param {google.cloud.dialogflow.cx.v3.IFlow} message Flow message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IInputAudioConfig} message InputAudioConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Flow.encode = function encode(message, writer) { + InputAudioConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.transitionRoutes != null && message.transitionRoutes.length) - for (var i = 0; i < message.transitionRoutes.length; ++i) - $root.google.cloud.dialogflow.cx.v3.TransitionRoute.encode(message.transitionRoutes[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.eventHandlers != null && message.eventHandlers.length) - for (var i = 0; i < message.eventHandlers.length; ++i) - $root.google.cloud.dialogflow.cx.v3.EventHandler.encode(message.eventHandlers[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.nluSettings != null && Object.hasOwnProperty.call(message, "nluSettings")) - $root.google.cloud.dialogflow.cx.v3.NluSettings.encode(message.nluSettings, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.transitionRouteGroups != null && message.transitionRouteGroups.length) - for (var i = 0; i < message.transitionRouteGroups.length; ++i) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.transitionRouteGroups[i]); + if (message.audioEncoding != null && Object.hasOwnProperty.call(message, "audioEncoding")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.audioEncoding); + if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sampleRateHertz); + if (message.phraseHints != null && message.phraseHints.length) + for (var i = 0; i < message.phraseHints.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.phraseHints[i]); + if (message.model != null && Object.hasOwnProperty.call(message, "model")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.model); + if (message.singleUtterance != null && Object.hasOwnProperty.call(message, "singleUtterance")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.singleUtterance); + if (message.modelVariant != null && Object.hasOwnProperty.call(message, "modelVariant")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.modelVariant); + if (message.enableWordInfo != null && Object.hasOwnProperty.call(message, "enableWordInfo")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.enableWordInfo); return writer; }; /** - * Encodes the specified Flow message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Flow.verify|verify} messages. + * Encodes the specified InputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.InputAudioConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Flow + * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig * @static - * @param {google.cloud.dialogflow.cx.v3.IFlow} message Flow message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IInputAudioConfig} message InputAudioConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Flow.encodeDelimited = function encodeDelimited(message, writer) { + InputAudioConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Flow message from the specified reader or buffer. + * Decodes an InputAudioConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Flow + * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.Flow} Flow + * @returns {google.cloud.dialogflow.cx.v3.InputAudioConfig} InputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Flow.decode = function decode(reader, length) { + InputAudioConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Flow(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.InputAudioConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.audioEncoding = reader.int32(); break; } case 2: { - message.displayName = reader.string(); + message.sampleRateHertz = reader.int32(); break; } - case 3: { - message.description = reader.string(); + case 13: { + message.enableWordInfo = reader.bool(); break; } case 4: { - if (!(message.transitionRoutes && message.transitionRoutes.length)) - message.transitionRoutes = []; - message.transitionRoutes.push($root.google.cloud.dialogflow.cx.v3.TransitionRoute.decode(reader, reader.uint32())); + if (!(message.phraseHints && message.phraseHints.length)) + message.phraseHints = []; + message.phraseHints.push(reader.string()); break; } - case 10: { - if (!(message.eventHandlers && message.eventHandlers.length)) - message.eventHandlers = []; - message.eventHandlers.push($root.google.cloud.dialogflow.cx.v3.EventHandler.decode(reader, reader.uint32())); + case 7: { + message.model = reader.string(); break; } - case 15: { - if (!(message.transitionRouteGroups && message.transitionRouteGroups.length)) - message.transitionRouteGroups = []; - message.transitionRouteGroups.push(reader.string()); + case 10: { + message.modelVariant = reader.int32(); break; } - case 11: { - message.nluSettings = $root.google.cloud.dialogflow.cx.v3.NluSettings.decode(reader, reader.uint32()); + case 8: { + message.singleUtterance = reader.bool(); break; } default: @@ -5459,226 +5343,281 @@ }; /** - * Decodes a Flow message from the specified reader or buffer, length delimited. + * Decodes an InputAudioConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Flow + * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Flow} Flow + * @returns {google.cloud.dialogflow.cx.v3.InputAudioConfig} InputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Flow.decodeDelimited = function decodeDelimited(reader) { + InputAudioConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Flow message. + * Verifies an InputAudioConfig message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Flow + * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Flow.verify = function verify(message) { + InputAudioConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.transitionRoutes != null && message.hasOwnProperty("transitionRoutes")) { - if (!Array.isArray(message.transitionRoutes)) - return "transitionRoutes: array expected"; - for (var i = 0; i < message.transitionRoutes.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.verify(message.transitionRoutes[i]); - if (error) - return "transitionRoutes." + error; + if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) + switch (message.audioEncoding) { + default: + return "audioEncoding: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; } + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + if (!$util.isInteger(message.sampleRateHertz)) + return "sampleRateHertz: integer expected"; + if (message.enableWordInfo != null && message.hasOwnProperty("enableWordInfo")) + if (typeof message.enableWordInfo !== "boolean") + return "enableWordInfo: boolean expected"; + if (message.phraseHints != null && message.hasOwnProperty("phraseHints")) { + if (!Array.isArray(message.phraseHints)) + return "phraseHints: array expected"; + for (var i = 0; i < message.phraseHints.length; ++i) + if (!$util.isString(message.phraseHints[i])) + return "phraseHints: string[] expected"; } - if (message.eventHandlers != null && message.hasOwnProperty("eventHandlers")) { - if (!Array.isArray(message.eventHandlers)) - return "eventHandlers: array expected"; - for (var i = 0; i < message.eventHandlers.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.EventHandler.verify(message.eventHandlers[i]); - if (error) - return "eventHandlers." + error; + if (message.model != null && message.hasOwnProperty("model")) + if (!$util.isString(message.model)) + return "model: string expected"; + if (message.modelVariant != null && message.hasOwnProperty("modelVariant")) + switch (message.modelVariant) { + default: + return "modelVariant: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } - } - if (message.transitionRouteGroups != null && message.hasOwnProperty("transitionRouteGroups")) { - if (!Array.isArray(message.transitionRouteGroups)) - return "transitionRouteGroups: array expected"; - for (var i = 0; i < message.transitionRouteGroups.length; ++i) - if (!$util.isString(message.transitionRouteGroups[i])) - return "transitionRouteGroups: string[] expected"; - } - if (message.nluSettings != null && message.hasOwnProperty("nluSettings")) { - var error = $root.google.cloud.dialogflow.cx.v3.NluSettings.verify(message.nluSettings); - if (error) - return "nluSettings." + error; - } + if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) + if (typeof message.singleUtterance !== "boolean") + return "singleUtterance: boolean expected"; return null; }; /** - * Creates a Flow message from a plain object. Also converts values to their respective internal types. + * Creates an InputAudioConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Flow + * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Flow} Flow + * @returns {google.cloud.dialogflow.cx.v3.InputAudioConfig} InputAudioConfig */ - Flow.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Flow) + InputAudioConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.InputAudioConfig) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Flow(); - 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.transitionRoutes) { - if (!Array.isArray(object.transitionRoutes)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Flow.transitionRoutes: array expected"); - message.transitionRoutes = []; - for (var i = 0; i < object.transitionRoutes.length; ++i) { - if (typeof object.transitionRoutes[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Flow.transitionRoutes: object expected"); - message.transitionRoutes[i] = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.fromObject(object.transitionRoutes[i]); - } - } - if (object.eventHandlers) { - if (!Array.isArray(object.eventHandlers)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Flow.eventHandlers: array expected"); - message.eventHandlers = []; - for (var i = 0; i < object.eventHandlers.length; ++i) { - if (typeof object.eventHandlers[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Flow.eventHandlers: object expected"); - message.eventHandlers[i] = $root.google.cloud.dialogflow.cx.v3.EventHandler.fromObject(object.eventHandlers[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.InputAudioConfig(); + switch (object.audioEncoding) { + default: + if (typeof object.audioEncoding === "number") { + message.audioEncoding = object.audioEncoding; + break; } + break; + case "AUDIO_ENCODING_UNSPECIFIED": + case 0: + message.audioEncoding = 0; + break; + case "AUDIO_ENCODING_LINEAR_16": + case 1: + message.audioEncoding = 1; + break; + case "AUDIO_ENCODING_FLAC": + case 2: + message.audioEncoding = 2; + break; + case "AUDIO_ENCODING_MULAW": + case 3: + message.audioEncoding = 3; + break; + case "AUDIO_ENCODING_AMR": + case 4: + message.audioEncoding = 4; + break; + case "AUDIO_ENCODING_AMR_WB": + case 5: + message.audioEncoding = 5; + break; + case "AUDIO_ENCODING_OGG_OPUS": + case 6: + message.audioEncoding = 6; + break; + case "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE": + case 7: + message.audioEncoding = 7; + break; } - if (object.transitionRouteGroups) { - if (!Array.isArray(object.transitionRouteGroups)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Flow.transitionRouteGroups: array expected"); - message.transitionRouteGroups = []; - for (var i = 0; i < object.transitionRouteGroups.length; ++i) - message.transitionRouteGroups[i] = String(object.transitionRouteGroups[i]); + if (object.sampleRateHertz != null) + message.sampleRateHertz = object.sampleRateHertz | 0; + if (object.enableWordInfo != null) + message.enableWordInfo = Boolean(object.enableWordInfo); + if (object.phraseHints) { + if (!Array.isArray(object.phraseHints)) + throw TypeError(".google.cloud.dialogflow.cx.v3.InputAudioConfig.phraseHints: array expected"); + message.phraseHints = []; + for (var i = 0; i < object.phraseHints.length; ++i) + message.phraseHints[i] = String(object.phraseHints[i]); } - if (object.nluSettings != null) { - if (typeof object.nluSettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Flow.nluSettings: object expected"); - message.nluSettings = $root.google.cloud.dialogflow.cx.v3.NluSettings.fromObject(object.nluSettings); + if (object.model != null) + message.model = String(object.model); + switch (object.modelVariant) { + default: + if (typeof object.modelVariant === "number") { + message.modelVariant = object.modelVariant; + break; + } + break; + case "SPEECH_MODEL_VARIANT_UNSPECIFIED": + case 0: + message.modelVariant = 0; + break; + case "USE_BEST_AVAILABLE": + case 1: + message.modelVariant = 1; + break; + case "USE_STANDARD": + case 2: + message.modelVariant = 2; + break; + case "USE_ENHANCED": + case 3: + message.modelVariant = 3; + break; } + if (object.singleUtterance != null) + message.singleUtterance = Boolean(object.singleUtterance); return message; }; /** - * Creates a plain object from a Flow message. Also converts values to other types if specified. + * Creates a plain object from an InputAudioConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Flow + * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig * @static - * @param {google.cloud.dialogflow.cx.v3.Flow} message Flow + * @param {google.cloud.dialogflow.cx.v3.InputAudioConfig} message InputAudioConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Flow.toObject = function toObject(message, options) { + InputAudioConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.transitionRoutes = []; - object.eventHandlers = []; - object.transitionRouteGroups = []; - } + if (options.arrays || options.defaults) + object.phraseHints = []; if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - object.nluSettings = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.transitionRoutes && message.transitionRoutes.length) { - object.transitionRoutes = []; - for (var j = 0; j < message.transitionRoutes.length; ++j) - object.transitionRoutes[j] = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.toObject(message.transitionRoutes[j], options); - } - if (message.eventHandlers && message.eventHandlers.length) { - object.eventHandlers = []; - for (var j = 0; j < message.eventHandlers.length; ++j) - object.eventHandlers[j] = $root.google.cloud.dialogflow.cx.v3.EventHandler.toObject(message.eventHandlers[j], options); + object.audioEncoding = options.enums === String ? "AUDIO_ENCODING_UNSPECIFIED" : 0; + object.sampleRateHertz = 0; + object.model = ""; + object.singleUtterance = false; + object.modelVariant = options.enums === String ? "SPEECH_MODEL_VARIANT_UNSPECIFIED" : 0; + object.enableWordInfo = false; } - if (message.nluSettings != null && message.hasOwnProperty("nluSettings")) - object.nluSettings = $root.google.cloud.dialogflow.cx.v3.NluSettings.toObject(message.nluSettings, options); - if (message.transitionRouteGroups && message.transitionRouteGroups.length) { - object.transitionRouteGroups = []; - for (var j = 0; j < message.transitionRouteGroups.length; ++j) - object.transitionRouteGroups[j] = message.transitionRouteGroups[j]; + if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) + object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.AudioEncoding[message.audioEncoding] === undefined ? message.audioEncoding : $root.google.cloud.dialogflow.cx.v3.AudioEncoding[message.audioEncoding] : message.audioEncoding; + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + object.sampleRateHertz = message.sampleRateHertz; + if (message.phraseHints && message.phraseHints.length) { + object.phraseHints = []; + for (var j = 0; j < message.phraseHints.length; ++j) + object.phraseHints[j] = message.phraseHints[j]; } + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) + object.singleUtterance = message.singleUtterance; + if (message.modelVariant != null && message.hasOwnProperty("modelVariant")) + object.modelVariant = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SpeechModelVariant[message.modelVariant] === undefined ? message.modelVariant : $root.google.cloud.dialogflow.cx.v3.SpeechModelVariant[message.modelVariant] : message.modelVariant; + if (message.enableWordInfo != null && message.hasOwnProperty("enableWordInfo")) + object.enableWordInfo = message.enableWordInfo; return object; }; /** - * Converts this Flow to JSON. + * Converts this InputAudioConfig to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Flow + * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig * @instance * @returns {Object.} JSON object */ - Flow.prototype.toJSON = function toJSON() { + InputAudioConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Flow + * Gets the default type url for InputAudioConfig * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Flow + * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Flow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + InputAudioConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Flow"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.InputAudioConfig"; }; - return Flow; + return InputAudioConfig; })(); - v3.CreateFlowRequest = (function() { + /** + * SsmlVoiceGender enum. + * @name google.cloud.dialogflow.cx.v3.SsmlVoiceGender + * @enum {number} + * @property {number} SSML_VOICE_GENDER_UNSPECIFIED=0 SSML_VOICE_GENDER_UNSPECIFIED value + * @property {number} SSML_VOICE_GENDER_MALE=1 SSML_VOICE_GENDER_MALE value + * @property {number} SSML_VOICE_GENDER_FEMALE=2 SSML_VOICE_GENDER_FEMALE value + * @property {number} SSML_VOICE_GENDER_NEUTRAL=3 SSML_VOICE_GENDER_NEUTRAL value + */ + v3.SsmlVoiceGender = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SSML_VOICE_GENDER_UNSPECIFIED"] = 0; + values[valuesById[1] = "SSML_VOICE_GENDER_MALE"] = 1; + values[valuesById[2] = "SSML_VOICE_GENDER_FEMALE"] = 2; + values[valuesById[3] = "SSML_VOICE_GENDER_NEUTRAL"] = 3; + return values; + })(); + + v3.VoiceSelectionParams = (function() { /** - * Properties of a CreateFlowRequest. + * Properties of a VoiceSelectionParams. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ICreateFlowRequest - * @property {string|null} [parent] CreateFlowRequest parent - * @property {google.cloud.dialogflow.cx.v3.IFlow|null} [flow] CreateFlowRequest flow - * @property {string|null} [languageCode] CreateFlowRequest languageCode + * @interface IVoiceSelectionParams + * @property {string|null} [name] VoiceSelectionParams name + * @property {google.cloud.dialogflow.cx.v3.SsmlVoiceGender|null} [ssmlGender] VoiceSelectionParams ssmlGender */ /** - * Constructs a new CreateFlowRequest. + * Constructs a new VoiceSelectionParams. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a CreateFlowRequest. - * @implements ICreateFlowRequest + * @classdesc Represents a VoiceSelectionParams. + * @implements IVoiceSelectionParams * @constructor - * @param {google.cloud.dialogflow.cx.v3.ICreateFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IVoiceSelectionParams=} [properties] Properties to set */ - function CreateFlowRequest(properties) { + function VoiceSelectionParams(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5686,103 +5625,89 @@ } /** - * CreateFlowRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.CreateFlowRequest - * @instance - */ - CreateFlowRequest.prototype.parent = ""; - - /** - * CreateFlowRequest flow. - * @member {google.cloud.dialogflow.cx.v3.IFlow|null|undefined} flow - * @memberof google.cloud.dialogflow.cx.v3.CreateFlowRequest + * VoiceSelectionParams name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.VoiceSelectionParams * @instance */ - CreateFlowRequest.prototype.flow = null; + VoiceSelectionParams.prototype.name = ""; /** - * CreateFlowRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.CreateFlowRequest + * VoiceSelectionParams ssmlGender. + * @member {google.cloud.dialogflow.cx.v3.SsmlVoiceGender} ssmlGender + * @memberof google.cloud.dialogflow.cx.v3.VoiceSelectionParams * @instance */ - CreateFlowRequest.prototype.languageCode = ""; + VoiceSelectionParams.prototype.ssmlGender = 0; /** - * Creates a new CreateFlowRequest instance using the specified properties. + * Creates a new VoiceSelectionParams instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.VoiceSelectionParams * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.CreateFlowRequest} CreateFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3.IVoiceSelectionParams=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.VoiceSelectionParams} VoiceSelectionParams instance */ - CreateFlowRequest.create = function create(properties) { - return new CreateFlowRequest(properties); + VoiceSelectionParams.create = function create(properties) { + return new VoiceSelectionParams(properties); }; /** - * Encodes the specified CreateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateFlowRequest.verify|verify} messages. + * Encodes the specified VoiceSelectionParams message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VoiceSelectionParams.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.VoiceSelectionParams * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateFlowRequest} message CreateFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IVoiceSelectionParams} message VoiceSelectionParams message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateFlowRequest.encode = function encode(message, writer) { + VoiceSelectionParams.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.flow != null && Object.hasOwnProperty.call(message, "flow")) - $root.google.cloud.dialogflow.cx.v3.Flow.encode(message.flow, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.ssmlGender != null && Object.hasOwnProperty.call(message, "ssmlGender")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.ssmlGender); return writer; }; /** - * Encodes the specified CreateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateFlowRequest.verify|verify} messages. + * Encodes the specified VoiceSelectionParams message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VoiceSelectionParams.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.VoiceSelectionParams * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateFlowRequest} message CreateFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IVoiceSelectionParams} message VoiceSelectionParams message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + VoiceSelectionParams.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateFlowRequest message from the specified reader or buffer. + * Decodes a VoiceSelectionParams message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.VoiceSelectionParams * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.CreateFlowRequest} CreateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.VoiceSelectionParams} VoiceSelectionParams * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateFlowRequest.decode = function decode(reader, length) { + VoiceSelectionParams.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.VoiceSelectionParams(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.name = reader.string(); break; } case 2: { - message.flow = $root.google.cloud.dialogflow.cx.v3.Flow.decode(reader, reader.uint32()); - break; - } - case 3: { - message.languageCode = reader.string(); + message.ssmlGender = reader.int32(); break; } default: @@ -5794,145 +5719,165 @@ }; /** - * Decodes a CreateFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a VoiceSelectionParams message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.VoiceSelectionParams * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.CreateFlowRequest} CreateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.VoiceSelectionParams} VoiceSelectionParams * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateFlowRequest.decodeDelimited = function decodeDelimited(reader) { + VoiceSelectionParams.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateFlowRequest message. + * Verifies a VoiceSelectionParams message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.VoiceSelectionParams * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateFlowRequest.verify = function verify(message) { + VoiceSelectionParams.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.flow != null && message.hasOwnProperty("flow")) { - var error = $root.google.cloud.dialogflow.cx.v3.Flow.verify(message.flow); - if (error) - return "flow." + error; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.ssmlGender != null && message.hasOwnProperty("ssmlGender")) + switch (message.ssmlGender) { + default: + return "ssmlGender: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } return null; }; /** - * Creates a CreateFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VoiceSelectionParams message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.VoiceSelectionParams * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.CreateFlowRequest} CreateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.VoiceSelectionParams} VoiceSelectionParams */ - CreateFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateFlowRequest) + VoiceSelectionParams.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.VoiceSelectionParams) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.CreateFlowRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.flow != null) { - if (typeof object.flow !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CreateFlowRequest.flow: object expected"); - message.flow = $root.google.cloud.dialogflow.cx.v3.Flow.fromObject(object.flow); + var message = new $root.google.cloud.dialogflow.cx.v3.VoiceSelectionParams(); + if (object.name != null) + message.name = String(object.name); + switch (object.ssmlGender) { + default: + if (typeof object.ssmlGender === "number") { + message.ssmlGender = object.ssmlGender; + break; + } + break; + case "SSML_VOICE_GENDER_UNSPECIFIED": + case 0: + message.ssmlGender = 0; + break; + case "SSML_VOICE_GENDER_MALE": + case 1: + message.ssmlGender = 1; + break; + case "SSML_VOICE_GENDER_FEMALE": + case 2: + message.ssmlGender = 2; + break; + case "SSML_VOICE_GENDER_NEUTRAL": + case 3: + message.ssmlGender = 3; + break; } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a CreateFlowRequest message. Also converts values to other types if specified. + * Creates a plain object from a VoiceSelectionParams message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.VoiceSelectionParams * @static - * @param {google.cloud.dialogflow.cx.v3.CreateFlowRequest} message CreateFlowRequest + * @param {google.cloud.dialogflow.cx.v3.VoiceSelectionParams} message VoiceSelectionParams * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateFlowRequest.toObject = function toObject(message, options) { + VoiceSelectionParams.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.flow = null; - object.languageCode = ""; + object.name = ""; + object.ssmlGender = options.enums === String ? "SSML_VOICE_GENDER_UNSPECIFIED" : 0; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.flow != null && message.hasOwnProperty("flow")) - object.flow = $root.google.cloud.dialogflow.cx.v3.Flow.toObject(message.flow, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.ssmlGender != null && message.hasOwnProperty("ssmlGender")) + object.ssmlGender = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SsmlVoiceGender[message.ssmlGender] === undefined ? message.ssmlGender : $root.google.cloud.dialogflow.cx.v3.SsmlVoiceGender[message.ssmlGender] : message.ssmlGender; return object; }; /** - * Converts this CreateFlowRequest to JSON. + * Converts this VoiceSelectionParams to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.VoiceSelectionParams * @instance * @returns {Object.} JSON object */ - CreateFlowRequest.prototype.toJSON = function toJSON() { + VoiceSelectionParams.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateFlowRequest + * Gets the default type url for VoiceSelectionParams * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.VoiceSelectionParams * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + VoiceSelectionParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateFlowRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.VoiceSelectionParams"; }; - return CreateFlowRequest; + return VoiceSelectionParams; })(); - v3.DeleteFlowRequest = (function() { + v3.SynthesizeSpeechConfig = (function() { /** - * Properties of a DeleteFlowRequest. + * Properties of a SynthesizeSpeechConfig. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDeleteFlowRequest - * @property {string|null} [name] DeleteFlowRequest name - * @property {boolean|null} [force] DeleteFlowRequest force + * @interface ISynthesizeSpeechConfig + * @property {number|null} [speakingRate] SynthesizeSpeechConfig speakingRate + * @property {number|null} [pitch] SynthesizeSpeechConfig pitch + * @property {number|null} [volumeGainDb] SynthesizeSpeechConfig volumeGainDb + * @property {Array.|null} [effectsProfileId] SynthesizeSpeechConfig effectsProfileId + * @property {google.cloud.dialogflow.cx.v3.IVoiceSelectionParams|null} [voice] SynthesizeSpeechConfig voice */ /** - * Constructs a new DeleteFlowRequest. + * Constructs a new SynthesizeSpeechConfig. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a DeleteFlowRequest. - * @implements IDeleteFlowRequest + * @classdesc Represents a SynthesizeSpeechConfig. + * @implements ISynthesizeSpeechConfig * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDeleteFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ISynthesizeSpeechConfig=} [properties] Properties to set */ - function DeleteFlowRequest(properties) { + function SynthesizeSpeechConfig(properties) { + this.effectsProfileId = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5940,89 +5885,134 @@ } /** - * DeleteFlowRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.DeleteFlowRequest + * SynthesizeSpeechConfig speakingRate. + * @member {number} speakingRate + * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig * @instance */ - DeleteFlowRequest.prototype.name = ""; + SynthesizeSpeechConfig.prototype.speakingRate = 0; /** - * DeleteFlowRequest force. - * @member {boolean} force - * @memberof google.cloud.dialogflow.cx.v3.DeleteFlowRequest + * SynthesizeSpeechConfig pitch. + * @member {number} pitch + * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig * @instance */ - DeleteFlowRequest.prototype.force = false; + SynthesizeSpeechConfig.prototype.pitch = 0; /** - * Creates a new DeleteFlowRequest instance using the specified properties. + * SynthesizeSpeechConfig volumeGainDb. + * @member {number} volumeGainDb + * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig + * @instance + */ + SynthesizeSpeechConfig.prototype.volumeGainDb = 0; + + /** + * SynthesizeSpeechConfig effectsProfileId. + * @member {Array.} effectsProfileId + * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig + * @instance + */ + SynthesizeSpeechConfig.prototype.effectsProfileId = $util.emptyArray; + + /** + * SynthesizeSpeechConfig voice. + * @member {google.cloud.dialogflow.cx.v3.IVoiceSelectionParams|null|undefined} voice + * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig + * @instance + */ + SynthesizeSpeechConfig.prototype.voice = null; + + /** + * Creates a new SynthesizeSpeechConfig instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.DeleteFlowRequest} DeleteFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3.ISynthesizeSpeechConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig} SynthesizeSpeechConfig instance */ - DeleteFlowRequest.create = function create(properties) { - return new DeleteFlowRequest(properties); + SynthesizeSpeechConfig.create = function create(properties) { + return new SynthesizeSpeechConfig(properties); }; /** - * Encodes the specified DeleteFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteFlowRequest.verify|verify} messages. + * Encodes the specified SynthesizeSpeechConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteFlowRequest} message DeleteFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ISynthesizeSpeechConfig} message SynthesizeSpeechConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteFlowRequest.encode = function encode(message, writer) { + SynthesizeSpeechConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + if (message.speakingRate != null && Object.hasOwnProperty.call(message, "speakingRate")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.speakingRate); + if (message.pitch != null && Object.hasOwnProperty.call(message, "pitch")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.pitch); + if (message.volumeGainDb != null && Object.hasOwnProperty.call(message, "volumeGainDb")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.volumeGainDb); + if (message.voice != null && Object.hasOwnProperty.call(message, "voice")) + $root.google.cloud.dialogflow.cx.v3.VoiceSelectionParams.encode(message.voice, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.effectsProfileId != null && message.effectsProfileId.length) + for (var i = 0; i < message.effectsProfileId.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.effectsProfileId[i]); return writer; }; /** - * Encodes the specified DeleteFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteFlowRequest.verify|verify} messages. + * Encodes the specified SynthesizeSpeechConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteFlowRequest} message DeleteFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ISynthesizeSpeechConfig} message SynthesizeSpeechConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + SynthesizeSpeechConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteFlowRequest message from the specified reader or buffer. + * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.DeleteFlowRequest} DeleteFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig} SynthesizeSpeechConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteFlowRequest.decode = function decode(reader, length) { + SynthesizeSpeechConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DeleteFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.speakingRate = reader.double(); break; } case 2: { - message.force = reader.bool(); + message.pitch = reader.double(); + break; + } + case 3: { + message.volumeGainDb = reader.double(); + break; + } + case 5: { + if (!(message.effectsProfileId && message.effectsProfileId.length)) + message.effectsProfileId = []; + message.effectsProfileId.push(reader.string()); + break; + } + case 4: { + message.voice = $root.google.cloud.dialogflow.cx.v3.VoiceSelectionParams.decode(reader, reader.uint32()); break; } default: @@ -6034,134 +6024,197 @@ }; /** - * Decodes a DeleteFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.DeleteFlowRequest} DeleteFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig} SynthesizeSpeechConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteFlowRequest.decodeDelimited = function decodeDelimited(reader) { + SynthesizeSpeechConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteFlowRequest message. + * Verifies a SynthesizeSpeechConfig message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteFlowRequest.verify = function verify(message) { + SynthesizeSpeechConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; + if (message.speakingRate != null && message.hasOwnProperty("speakingRate")) + if (typeof message.speakingRate !== "number") + return "speakingRate: number expected"; + if (message.pitch != null && message.hasOwnProperty("pitch")) + if (typeof message.pitch !== "number") + return "pitch: number expected"; + if (message.volumeGainDb != null && message.hasOwnProperty("volumeGainDb")) + if (typeof message.volumeGainDb !== "number") + return "volumeGainDb: number expected"; + if (message.effectsProfileId != null && message.hasOwnProperty("effectsProfileId")) { + if (!Array.isArray(message.effectsProfileId)) + return "effectsProfileId: array expected"; + for (var i = 0; i < message.effectsProfileId.length; ++i) + if (!$util.isString(message.effectsProfileId[i])) + return "effectsProfileId: string[] expected"; + } + if (message.voice != null && message.hasOwnProperty("voice")) { + var error = $root.google.cloud.dialogflow.cx.v3.VoiceSelectionParams.verify(message.voice); + if (error) + return "voice." + error; + } return null; }; /** - * Creates a DeleteFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SynthesizeSpeechConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.DeleteFlowRequest} DeleteFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig} SynthesizeSpeechConfig */ - DeleteFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteFlowRequest) + SynthesizeSpeechConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.DeleteFlowRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); + var message = new $root.google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig(); + if (object.speakingRate != null) + message.speakingRate = Number(object.speakingRate); + if (object.pitch != null) + message.pitch = Number(object.pitch); + if (object.volumeGainDb != null) + message.volumeGainDb = Number(object.volumeGainDb); + if (object.effectsProfileId) { + if (!Array.isArray(object.effectsProfileId)) + throw TypeError(".google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig.effectsProfileId: array expected"); + message.effectsProfileId = []; + for (var i = 0; i < object.effectsProfileId.length; ++i) + message.effectsProfileId[i] = String(object.effectsProfileId[i]); + } + if (object.voice != null) { + if (typeof object.voice !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig.voice: object expected"); + message.voice = $root.google.cloud.dialogflow.cx.v3.VoiceSelectionParams.fromObject(object.voice); + } return message; }; /** - * Creates a plain object from a DeleteFlowRequest message. Also converts values to other types if specified. + * Creates a plain object from a SynthesizeSpeechConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig * @static - * @param {google.cloud.dialogflow.cx.v3.DeleteFlowRequest} message DeleteFlowRequest + * @param {google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig} message SynthesizeSpeechConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteFlowRequest.toObject = function toObject(message, options) { + SynthesizeSpeechConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.effectsProfileId = []; if (options.defaults) { - object.name = ""; - object.force = false; + object.speakingRate = 0; + object.pitch = 0; + object.volumeGainDb = 0; + object.voice = null; + } + if (message.speakingRate != null && message.hasOwnProperty("speakingRate")) + object.speakingRate = options.json && !isFinite(message.speakingRate) ? String(message.speakingRate) : message.speakingRate; + if (message.pitch != null && message.hasOwnProperty("pitch")) + object.pitch = options.json && !isFinite(message.pitch) ? String(message.pitch) : message.pitch; + if (message.volumeGainDb != null && message.hasOwnProperty("volumeGainDb")) + object.volumeGainDb = options.json && !isFinite(message.volumeGainDb) ? String(message.volumeGainDb) : message.volumeGainDb; + if (message.voice != null && message.hasOwnProperty("voice")) + object.voice = $root.google.cloud.dialogflow.cx.v3.VoiceSelectionParams.toObject(message.voice, options); + if (message.effectsProfileId && message.effectsProfileId.length) { + object.effectsProfileId = []; + for (var j = 0; j < message.effectsProfileId.length; ++j) + object.effectsProfileId[j] = message.effectsProfileId[j]; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; return object; }; /** - * Converts this DeleteFlowRequest to JSON. + * Converts this SynthesizeSpeechConfig to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig * @instance * @returns {Object.} JSON object */ - DeleteFlowRequest.prototype.toJSON = function toJSON() { + SynthesizeSpeechConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteFlowRequest + * Gets the default type url for SynthesizeSpeechConfig * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SynthesizeSpeechConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeleteFlowRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig"; }; - return DeleteFlowRequest; + return SynthesizeSpeechConfig; })(); - v3.ListFlowsRequest = (function() { + /** + * OutputAudioEncoding enum. + * @name google.cloud.dialogflow.cx.v3.OutputAudioEncoding + * @enum {number} + * @property {number} OUTPUT_AUDIO_ENCODING_UNSPECIFIED=0 OUTPUT_AUDIO_ENCODING_UNSPECIFIED value + * @property {number} OUTPUT_AUDIO_ENCODING_LINEAR_16=1 OUTPUT_AUDIO_ENCODING_LINEAR_16 value + * @property {number} OUTPUT_AUDIO_ENCODING_MP3=2 OUTPUT_AUDIO_ENCODING_MP3 value + * @property {number} OUTPUT_AUDIO_ENCODING_MP3_64_KBPS=4 OUTPUT_AUDIO_ENCODING_MP3_64_KBPS value + * @property {number} OUTPUT_AUDIO_ENCODING_OGG_OPUS=3 OUTPUT_AUDIO_ENCODING_OGG_OPUS value + * @property {number} OUTPUT_AUDIO_ENCODING_MULAW=5 OUTPUT_AUDIO_ENCODING_MULAW value + */ + v3.OutputAudioEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OUTPUT_AUDIO_ENCODING_UNSPECIFIED"] = 0; + values[valuesById[1] = "OUTPUT_AUDIO_ENCODING_LINEAR_16"] = 1; + values[valuesById[2] = "OUTPUT_AUDIO_ENCODING_MP3"] = 2; + values[valuesById[4] = "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS"] = 4; + values[valuesById[3] = "OUTPUT_AUDIO_ENCODING_OGG_OPUS"] = 3; + values[valuesById[5] = "OUTPUT_AUDIO_ENCODING_MULAW"] = 5; + return values; + })(); + + v3.OutputAudioConfig = (function() { /** - * Properties of a ListFlowsRequest. + * Properties of an OutputAudioConfig. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListFlowsRequest - * @property {string|null} [parent] ListFlowsRequest parent - * @property {number|null} [pageSize] ListFlowsRequest pageSize - * @property {string|null} [pageToken] ListFlowsRequest pageToken - * @property {string|null} [languageCode] ListFlowsRequest languageCode + * @interface IOutputAudioConfig + * @property {google.cloud.dialogflow.cx.v3.OutputAudioEncoding|null} [audioEncoding] OutputAudioConfig audioEncoding + * @property {number|null} [sampleRateHertz] OutputAudioConfig sampleRateHertz + * @property {google.cloud.dialogflow.cx.v3.ISynthesizeSpeechConfig|null} [synthesizeSpeechConfig] OutputAudioConfig synthesizeSpeechConfig */ /** - * Constructs a new ListFlowsRequest. + * Constructs a new OutputAudioConfig. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListFlowsRequest. - * @implements IListFlowsRequest + * @classdesc Represents an OutputAudioConfig. + * @implements IOutputAudioConfig * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListFlowsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IOutputAudioConfig=} [properties] Properties to set */ - function ListFlowsRequest(properties) { + function OutputAudioConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6169,117 +6222,103 @@ } /** - * ListFlowsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ListFlowsRequest - * @instance - */ - ListFlowsRequest.prototype.parent = ""; - - /** - * ListFlowsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3.ListFlowsRequest + * OutputAudioConfig audioEncoding. + * @member {google.cloud.dialogflow.cx.v3.OutputAudioEncoding} audioEncoding + * @memberof google.cloud.dialogflow.cx.v3.OutputAudioConfig * @instance */ - ListFlowsRequest.prototype.pageSize = 0; + OutputAudioConfig.prototype.audioEncoding = 0; /** - * ListFlowsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3.ListFlowsRequest + * OutputAudioConfig sampleRateHertz. + * @member {number} sampleRateHertz + * @memberof google.cloud.dialogflow.cx.v3.OutputAudioConfig * @instance */ - ListFlowsRequest.prototype.pageToken = ""; + OutputAudioConfig.prototype.sampleRateHertz = 0; /** - * ListFlowsRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.ListFlowsRequest + * OutputAudioConfig synthesizeSpeechConfig. + * @member {google.cloud.dialogflow.cx.v3.ISynthesizeSpeechConfig|null|undefined} synthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3.OutputAudioConfig * @instance */ - ListFlowsRequest.prototype.languageCode = ""; + OutputAudioConfig.prototype.synthesizeSpeechConfig = null; /** - * Creates a new ListFlowsRequest instance using the specified properties. + * Creates a new OutputAudioConfig instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3.OutputAudioConfig * @static - * @param {google.cloud.dialogflow.cx.v3.IListFlowsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListFlowsRequest} ListFlowsRequest instance + * @param {google.cloud.dialogflow.cx.v3.IOutputAudioConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.OutputAudioConfig} OutputAudioConfig instance */ - ListFlowsRequest.create = function create(properties) { - return new ListFlowsRequest(properties); + OutputAudioConfig.create = function create(properties) { + return new OutputAudioConfig(properties); }; /** - * Encodes the specified ListFlowsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListFlowsRequest.verify|verify} messages. + * Encodes the specified OutputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.OutputAudioConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3.OutputAudioConfig * @static - * @param {google.cloud.dialogflow.cx.v3.IListFlowsRequest} message ListFlowsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IOutputAudioConfig} message OutputAudioConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFlowsRequest.encode = function encode(message, writer) { + OutputAudioConfig.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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); + if (message.audioEncoding != null && Object.hasOwnProperty.call(message, "audioEncoding")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.audioEncoding); + if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sampleRateHertz); + if (message.synthesizeSpeechConfig != null && Object.hasOwnProperty.call(message, "synthesizeSpeechConfig")) + $root.google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig.encode(message.synthesizeSpeechConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListFlowsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListFlowsRequest.verify|verify} messages. + * Encodes the specified OutputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.OutputAudioConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3.OutputAudioConfig * @static - * @param {google.cloud.dialogflow.cx.v3.IListFlowsRequest} message ListFlowsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IOutputAudioConfig} message OutputAudioConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFlowsRequest.encodeDelimited = function encodeDelimited(message, writer) { + OutputAudioConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListFlowsRequest message from the specified reader or buffer. + * Decodes an OutputAudioConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3.OutputAudioConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ListFlowsRequest} ListFlowsRequest + * @returns {google.cloud.dialogflow.cx.v3.OutputAudioConfig} OutputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFlowsRequest.decode = function decode(reader, length) { + OutputAudioConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListFlowsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.audioEncoding = reader.int32(); break; } case 2: { - message.pageSize = reader.int32(); + message.sampleRateHertz = reader.int32(); break; } case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.languageCode = reader.string(); + message.synthesizeSpeechConfig = $root.google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig.decode(reader, reader.uint32()); break; } default: @@ -6291,149 +6330,184 @@ }; /** - * Decodes a ListFlowsRequest message from the specified reader or buffer, length delimited. + * Decodes an OutputAudioConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3.OutputAudioConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListFlowsRequest} ListFlowsRequest + * @returns {google.cloud.dialogflow.cx.v3.OutputAudioConfig} OutputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFlowsRequest.decodeDelimited = function decodeDelimited(reader) { + OutputAudioConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListFlowsRequest message. + * Verifies an OutputAudioConfig message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3.OutputAudioConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListFlowsRequest.verify = function verify(message) { + OutputAudioConfig.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.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; + if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) + switch (message.audioEncoding) { + default: + return "audioEncoding: enum value expected"; + case 0: + case 1: + case 2: + case 4: + case 3: + case 5: + break; + } + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + if (!$util.isInteger(message.sampleRateHertz)) + return "sampleRateHertz: integer expected"; + if (message.synthesizeSpeechConfig != null && message.hasOwnProperty("synthesizeSpeechConfig")) { + var error = $root.google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig.verify(message.synthesizeSpeechConfig); + if (error) + return "synthesizeSpeechConfig." + error; + } return null; }; /** - * Creates a ListFlowsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an OutputAudioConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3.OutputAudioConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListFlowsRequest} ListFlowsRequest + * @returns {google.cloud.dialogflow.cx.v3.OutputAudioConfig} OutputAudioConfig */ - ListFlowsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListFlowsRequest) + OutputAudioConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListFlowsRequest(); - 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.languageCode != null) - message.languageCode = String(object.languageCode); + var message = new $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig(); + switch (object.audioEncoding) { + default: + if (typeof object.audioEncoding === "number") { + message.audioEncoding = object.audioEncoding; + break; + } + break; + case "OUTPUT_AUDIO_ENCODING_UNSPECIFIED": + case 0: + message.audioEncoding = 0; + break; + case "OUTPUT_AUDIO_ENCODING_LINEAR_16": + case 1: + message.audioEncoding = 1; + break; + case "OUTPUT_AUDIO_ENCODING_MP3": + case 2: + message.audioEncoding = 2; + break; + case "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS": + case 4: + message.audioEncoding = 4; + break; + case "OUTPUT_AUDIO_ENCODING_OGG_OPUS": + case 3: + message.audioEncoding = 3; + break; + case "OUTPUT_AUDIO_ENCODING_MULAW": + case 5: + message.audioEncoding = 5; + break; + } + if (object.sampleRateHertz != null) + message.sampleRateHertz = object.sampleRateHertz | 0; + if (object.synthesizeSpeechConfig != null) { + if (typeof object.synthesizeSpeechConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.OutputAudioConfig.synthesizeSpeechConfig: object expected"); + message.synthesizeSpeechConfig = $root.google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig.fromObject(object.synthesizeSpeechConfig); + } return message; }; /** - * Creates a plain object from a ListFlowsRequest message. Also converts values to other types if specified. + * Creates a plain object from an OutputAudioConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3.OutputAudioConfig * @static - * @param {google.cloud.dialogflow.cx.v3.ListFlowsRequest} message ListFlowsRequest + * @param {google.cloud.dialogflow.cx.v3.OutputAudioConfig} message OutputAudioConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListFlowsRequest.toObject = function toObject(message, options) { + OutputAudioConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.languageCode = ""; + object.audioEncoding = options.enums === String ? "OUTPUT_AUDIO_ENCODING_UNSPECIFIED" : 0; + object.sampleRateHertz = 0; + object.synthesizeSpeechConfig = null; } - 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.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) + object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.OutputAudioEncoding[message.audioEncoding] === undefined ? message.audioEncoding : $root.google.cloud.dialogflow.cx.v3.OutputAudioEncoding[message.audioEncoding] : message.audioEncoding; + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + object.sampleRateHertz = message.sampleRateHertz; + if (message.synthesizeSpeechConfig != null && message.hasOwnProperty("synthesizeSpeechConfig")) + object.synthesizeSpeechConfig = $root.google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig.toObject(message.synthesizeSpeechConfig, options); return object; }; /** - * Converts this ListFlowsRequest to JSON. + * Converts this OutputAudioConfig to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3.OutputAudioConfig * @instance * @returns {Object.} JSON object */ - ListFlowsRequest.prototype.toJSON = function toJSON() { + OutputAudioConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListFlowsRequest + * Gets the default type url for OutputAudioConfig * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3.OutputAudioConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListFlowsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OutputAudioConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListFlowsRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.OutputAudioConfig"; }; - return ListFlowsRequest; + return OutputAudioConfig; })(); - v3.ListFlowsResponse = (function() { + v3.TextToSpeechSettings = (function() { /** - * Properties of a ListFlowsResponse. + * Properties of a TextToSpeechSettings. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListFlowsResponse - * @property {Array.|null} [flows] ListFlowsResponse flows - * @property {string|null} [nextPageToken] ListFlowsResponse nextPageToken + * @interface ITextToSpeechSettings + * @property {Object.|null} [synthesizeSpeechConfigs] TextToSpeechSettings synthesizeSpeechConfigs */ /** - * Constructs a new ListFlowsResponse. + * Constructs a new TextToSpeechSettings. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListFlowsResponse. - * @implements IListFlowsResponse + * @classdesc Represents a TextToSpeechSettings. + * @implements ITextToSpeechSettings * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListFlowsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ITextToSpeechSettings=} [properties] Properties to set */ - function ListFlowsResponse(properties) { - this.flows = []; + function TextToSpeechSettings(properties) { + this.synthesizeSpeechConfigs = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6441,92 +6515,97 @@ } /** - * ListFlowsResponse flows. - * @member {Array.} flows - * @memberof google.cloud.dialogflow.cx.v3.ListFlowsResponse - * @instance - */ - ListFlowsResponse.prototype.flows = $util.emptyArray; - - /** - * ListFlowsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3.ListFlowsResponse + * TextToSpeechSettings synthesizeSpeechConfigs. + * @member {Object.} synthesizeSpeechConfigs + * @memberof google.cloud.dialogflow.cx.v3.TextToSpeechSettings * @instance */ - ListFlowsResponse.prototype.nextPageToken = ""; + TextToSpeechSettings.prototype.synthesizeSpeechConfigs = $util.emptyObject; /** - * Creates a new ListFlowsResponse instance using the specified properties. + * Creates a new TextToSpeechSettings instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3.TextToSpeechSettings * @static - * @param {google.cloud.dialogflow.cx.v3.IListFlowsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListFlowsResponse} ListFlowsResponse instance + * @param {google.cloud.dialogflow.cx.v3.ITextToSpeechSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.TextToSpeechSettings} TextToSpeechSettings instance */ - ListFlowsResponse.create = function create(properties) { - return new ListFlowsResponse(properties); + TextToSpeechSettings.create = function create(properties) { + return new TextToSpeechSettings(properties); }; /** - * Encodes the specified ListFlowsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListFlowsResponse.verify|verify} messages. + * Encodes the specified TextToSpeechSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TextToSpeechSettings.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3.TextToSpeechSettings * @static - * @param {google.cloud.dialogflow.cx.v3.IListFlowsResponse} message ListFlowsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ITextToSpeechSettings} message TextToSpeechSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFlowsResponse.encode = function encode(message, writer) { + TextToSpeechSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.flows != null && message.flows.length) - for (var i = 0; i < message.flows.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Flow.encode(message.flows[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.synthesizeSpeechConfigs != null && Object.hasOwnProperty.call(message, "synthesizeSpeechConfigs")) + for (var keys = Object.keys(message.synthesizeSpeechConfigs), 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.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig.encode(message.synthesizeSpeechConfigs[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified ListFlowsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListFlowsResponse.verify|verify} messages. + * Encodes the specified TextToSpeechSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TextToSpeechSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3.TextToSpeechSettings * @static - * @param {google.cloud.dialogflow.cx.v3.IListFlowsResponse} message ListFlowsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ITextToSpeechSettings} message TextToSpeechSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFlowsResponse.encodeDelimited = function encodeDelimited(message, writer) { + TextToSpeechSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListFlowsResponse message from the specified reader or buffer. + * Decodes a TextToSpeechSettings message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3.TextToSpeechSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ListFlowsResponse} ListFlowsResponse + * @returns {google.cloud.dialogflow.cx.v3.TextToSpeechSettings} TextToSpeechSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFlowsResponse.decode = function decode(reader, length) { + TextToSpeechSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListFlowsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.TextToSpeechSettings(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.flows && message.flows.length)) - message.flows = []; - message.flows.push($root.google.cloud.dialogflow.cx.v3.Flow.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); + if (message.synthesizeSpeechConfigs === $util.emptyObject) + message.synthesizeSpeechConfigs = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.synthesizeSpeechConfigs[key] = value; break; } default: @@ -6538,149 +6617,508 @@ }; /** - * Decodes a ListFlowsResponse message from the specified reader or buffer, length delimited. + * Decodes a TextToSpeechSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3.TextToSpeechSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListFlowsResponse} ListFlowsResponse + * @returns {google.cloud.dialogflow.cx.v3.TextToSpeechSettings} TextToSpeechSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFlowsResponse.decodeDelimited = function decodeDelimited(reader) { + TextToSpeechSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListFlowsResponse message. + * Verifies a TextToSpeechSettings message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3.TextToSpeechSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListFlowsResponse.verify = function verify(message) { + TextToSpeechSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.flows != null && message.hasOwnProperty("flows")) { - if (!Array.isArray(message.flows)) - return "flows: array expected"; - for (var i = 0; i < message.flows.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Flow.verify(message.flows[i]); + if (message.synthesizeSpeechConfigs != null && message.hasOwnProperty("synthesizeSpeechConfigs")) { + if (!$util.isObject(message.synthesizeSpeechConfigs)) + return "synthesizeSpeechConfigs: object expected"; + var key = Object.keys(message.synthesizeSpeechConfigs); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig.verify(message.synthesizeSpeechConfigs[key[i]]); if (error) - return "flows." + error; + return "synthesizeSpeechConfigs." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListFlowsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a TextToSpeechSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3.TextToSpeechSettings * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListFlowsResponse} ListFlowsResponse + * @returns {google.cloud.dialogflow.cx.v3.TextToSpeechSettings} TextToSpeechSettings */ - ListFlowsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListFlowsResponse) + TextToSpeechSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.TextToSpeechSettings) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListFlowsResponse(); - if (object.flows) { - if (!Array.isArray(object.flows)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ListFlowsResponse.flows: array expected"); - message.flows = []; - for (var i = 0; i < object.flows.length; ++i) { - if (typeof object.flows[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ListFlowsResponse.flows: object expected"); - message.flows[i] = $root.google.cloud.dialogflow.cx.v3.Flow.fromObject(object.flows[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.TextToSpeechSettings(); + if (object.synthesizeSpeechConfigs) { + if (typeof object.synthesizeSpeechConfigs !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.TextToSpeechSettings.synthesizeSpeechConfigs: object expected"); + message.synthesizeSpeechConfigs = {}; + for (var keys = Object.keys(object.synthesizeSpeechConfigs), i = 0; i < keys.length; ++i) { + if (typeof object.synthesizeSpeechConfigs[keys[i]] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.TextToSpeechSettings.synthesizeSpeechConfigs: object expected"); + message.synthesizeSpeechConfigs[keys[i]] = $root.google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig.fromObject(object.synthesizeSpeechConfigs[keys[i]]); } } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListFlowsResponse message. Also converts values to other types if specified. + * Creates a plain object from a TextToSpeechSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3.TextToSpeechSettings * @static - * @param {google.cloud.dialogflow.cx.v3.ListFlowsResponse} message ListFlowsResponse + * @param {google.cloud.dialogflow.cx.v3.TextToSpeechSettings} message TextToSpeechSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListFlowsResponse.toObject = function toObject(message, options) { + TextToSpeechSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.flows = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.flows && message.flows.length) { - object.flows = []; - for (var j = 0; j < message.flows.length; ++j) - object.flows[j] = $root.google.cloud.dialogflow.cx.v3.Flow.toObject(message.flows[j], options); + if (options.objects || options.defaults) + object.synthesizeSpeechConfigs = {}; + var keys2; + if (message.synthesizeSpeechConfigs && (keys2 = Object.keys(message.synthesizeSpeechConfigs)).length) { + object.synthesizeSpeechConfigs = {}; + for (var j = 0; j < keys2.length; ++j) + object.synthesizeSpeechConfigs[keys2[j]] = $root.google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig.toObject(message.synthesizeSpeechConfigs[keys2[j]], options); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListFlowsResponse to JSON. + * Converts this TextToSpeechSettings to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3.TextToSpeechSettings * @instance * @returns {Object.} JSON object */ - ListFlowsResponse.prototype.toJSON = function toJSON() { + TextToSpeechSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListFlowsResponse + * Gets the default type url for TextToSpeechSettings * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3.TextToSpeechSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListFlowsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TextToSpeechSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListFlowsResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TextToSpeechSettings"; }; - return ListFlowsResponse; + return TextToSpeechSettings; })(); - v3.GetFlowRequest = (function() { + v3.Flows = (function() { /** - * Properties of a GetFlowRequest. + * Constructs a new Flows service. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IGetFlowRequest - * @property {string|null} [name] GetFlowRequest name - * @property {string|null} [languageCode] GetFlowRequest languageCode + * @classdesc Represents a Flows + * @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 Flows(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Flows.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Flows; + + /** + * Creates new Flows service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @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 {Flows} RPC service. Useful where requests and/or responses are streamed. */ + Flows.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * Constructs a new GetFlowRequest. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|createFlow}. + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @typedef CreateFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Flow} [response] Flow + */ + + /** + * Calls CreateFlow. + * @function createFlow + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateFlowRequest} request CreateFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Flows.CreateFlowCallback} callback Node-style callback called with the error, if any, and Flow + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.createFlow = function createFlow(request, callback) { + return this.rpcCall(createFlow, $root.google.cloud.dialogflow.cx.v3.CreateFlowRequest, $root.google.cloud.dialogflow.cx.v3.Flow, request, callback); + }, "name", { value: "CreateFlow" }); + + /** + * Calls CreateFlow. + * @function createFlow + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateFlowRequest} request CreateFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|deleteFlow}. + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @typedef DeleteFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteFlow. + * @function deleteFlow + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteFlowRequest} request DeleteFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Flows.DeleteFlowCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.deleteFlow = function deleteFlow(request, callback) { + return this.rpcCall(deleteFlow, $root.google.cloud.dialogflow.cx.v3.DeleteFlowRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteFlow" }); + + /** + * Calls DeleteFlow. + * @function deleteFlow + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteFlowRequest} request DeleteFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|listFlows}. + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @typedef ListFlowsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListFlowsResponse} [response] ListFlowsResponse + */ + + /** + * Calls ListFlows. + * @function listFlows + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListFlowsRequest} request ListFlowsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Flows.ListFlowsCallback} callback Node-style callback called with the error, if any, and ListFlowsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.listFlows = function listFlows(request, callback) { + return this.rpcCall(listFlows, $root.google.cloud.dialogflow.cx.v3.ListFlowsRequest, $root.google.cloud.dialogflow.cx.v3.ListFlowsResponse, request, callback); + }, "name", { value: "ListFlows" }); + + /** + * Calls ListFlows. + * @function listFlows + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListFlowsRequest} request ListFlowsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|getFlow}. + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @typedef GetFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Flow} [response] Flow + */ + + /** + * Calls GetFlow. + * @function getFlow + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetFlowRequest} request GetFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Flows.GetFlowCallback} callback Node-style callback called with the error, if any, and Flow + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.getFlow = function getFlow(request, callback) { + return this.rpcCall(getFlow, $root.google.cloud.dialogflow.cx.v3.GetFlowRequest, $root.google.cloud.dialogflow.cx.v3.Flow, request, callback); + }, "name", { value: "GetFlow" }); + + /** + * Calls GetFlow. + * @function getFlow + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetFlowRequest} request GetFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|updateFlow}. + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @typedef UpdateFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Flow} [response] Flow + */ + + /** + * Calls UpdateFlow. + * @function updateFlow + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateFlowRequest} request UpdateFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Flows.UpdateFlowCallback} callback Node-style callback called with the error, if any, and Flow + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.updateFlow = function updateFlow(request, callback) { + return this.rpcCall(updateFlow, $root.google.cloud.dialogflow.cx.v3.UpdateFlowRequest, $root.google.cloud.dialogflow.cx.v3.Flow, request, callback); + }, "name", { value: "UpdateFlow" }); + + /** + * Calls UpdateFlow. + * @function updateFlow + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateFlowRequest} request UpdateFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|trainFlow}. + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @typedef TrainFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls TrainFlow. + * @function trainFlow + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3.ITrainFlowRequest} request TrainFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Flows.TrainFlowCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.trainFlow = function trainFlow(request, callback) { + return this.rpcCall(trainFlow, $root.google.cloud.dialogflow.cx.v3.TrainFlowRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "TrainFlow" }); + + /** + * Calls TrainFlow. + * @function trainFlow + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3.ITrainFlowRequest} request TrainFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|validateFlow}. + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @typedef ValidateFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.FlowValidationResult} [response] FlowValidationResult + */ + + /** + * Calls ValidateFlow. + * @function validateFlow + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3.IValidateFlowRequest} request ValidateFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Flows.ValidateFlowCallback} callback Node-style callback called with the error, if any, and FlowValidationResult + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.validateFlow = function validateFlow(request, callback) { + return this.rpcCall(validateFlow, $root.google.cloud.dialogflow.cx.v3.ValidateFlowRequest, $root.google.cloud.dialogflow.cx.v3.FlowValidationResult, request, callback); + }, "name", { value: "ValidateFlow" }); + + /** + * Calls ValidateFlow. + * @function validateFlow + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3.IValidateFlowRequest} request ValidateFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|getFlowValidationResult}. + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @typedef GetFlowValidationResultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.FlowValidationResult} [response] FlowValidationResult + */ + + /** + * Calls GetFlowValidationResult. + * @function getFlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetFlowValidationResultRequest} request GetFlowValidationResultRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Flows.GetFlowValidationResultCallback} callback Node-style callback called with the error, if any, and FlowValidationResult + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.getFlowValidationResult = function getFlowValidationResult(request, callback) { + return this.rpcCall(getFlowValidationResult, $root.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest, $root.google.cloud.dialogflow.cx.v3.FlowValidationResult, request, callback); + }, "name", { value: "GetFlowValidationResult" }); + + /** + * Calls GetFlowValidationResult. + * @function getFlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetFlowValidationResultRequest} request GetFlowValidationResultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|importFlow}. + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @typedef ImportFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ImportFlow. + * @function importFlow + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3.IImportFlowRequest} request ImportFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Flows.ImportFlowCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.importFlow = function importFlow(request, callback) { + return this.rpcCall(importFlow, $root.google.cloud.dialogflow.cx.v3.ImportFlowRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ImportFlow" }); + + /** + * Calls ImportFlow. + * @function importFlow + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3.IImportFlowRequest} request ImportFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Flows|exportFlow}. + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @typedef ExportFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ExportFlow. + * @function exportFlow + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3.IExportFlowRequest} request ExportFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Flows.ExportFlowCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.exportFlow = function exportFlow(request, callback) { + return this.rpcCall(exportFlow, $root.google.cloud.dialogflow.cx.v3.ExportFlowRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ExportFlow" }); + + /** + * Calls ExportFlow. + * @function exportFlow + * @memberof google.cloud.dialogflow.cx.v3.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3.IExportFlowRequest} request ExportFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Flows; + })(); + + v3.NluSettings = (function() { + + /** + * Properties of a NluSettings. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a GetFlowRequest. - * @implements IGetFlowRequest + * @interface INluSettings + * @property {google.cloud.dialogflow.cx.v3.NluSettings.ModelType|null} [modelType] NluSettings modelType + * @property {number|null} [classificationThreshold] NluSettings classificationThreshold + * @property {google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode|null} [modelTrainingMode] NluSettings modelTrainingMode + */ + + /** + * Constructs a new NluSettings. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a NluSettings. + * @implements INluSettings * @constructor - * @param {google.cloud.dialogflow.cx.v3.IGetFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.INluSettings=} [properties] Properties to set */ - function GetFlowRequest(properties) { + function NluSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6688,89 +7126,103 @@ } /** - * GetFlowRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.GetFlowRequest + * NluSettings modelType. + * @member {google.cloud.dialogflow.cx.v3.NluSettings.ModelType} modelType + * @memberof google.cloud.dialogflow.cx.v3.NluSettings * @instance */ - GetFlowRequest.prototype.name = ""; + NluSettings.prototype.modelType = 0; /** - * GetFlowRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.GetFlowRequest + * NluSettings classificationThreshold. + * @member {number} classificationThreshold + * @memberof google.cloud.dialogflow.cx.v3.NluSettings * @instance */ - GetFlowRequest.prototype.languageCode = ""; + NluSettings.prototype.classificationThreshold = 0; /** - * Creates a new GetFlowRequest instance using the specified properties. + * NluSettings modelTrainingMode. + * @member {google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode} modelTrainingMode + * @memberof google.cloud.dialogflow.cx.v3.NluSettings + * @instance + */ + NluSettings.prototype.modelTrainingMode = 0; + + /** + * Creates a new NluSettings instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.NluSettings * @static - * @param {google.cloud.dialogflow.cx.v3.IGetFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GetFlowRequest} GetFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3.INluSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.NluSettings} NluSettings instance */ - GetFlowRequest.create = function create(properties) { - return new GetFlowRequest(properties); + NluSettings.create = function create(properties) { + return new NluSettings(properties); }; /** - * Encodes the specified GetFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetFlowRequest.verify|verify} messages. + * Encodes the specified NluSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.NluSettings.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.NluSettings * @static - * @param {google.cloud.dialogflow.cx.v3.IGetFlowRequest} message GetFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.INluSettings} message NluSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFlowRequest.encode = function encode(message, writer) { + NluSettings.encode = function encode(message, writer) { 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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.modelType != null && Object.hasOwnProperty.call(message, "modelType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.modelType); + if (message.classificationThreshold != null && Object.hasOwnProperty.call(message, "classificationThreshold")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.classificationThreshold); + if (message.modelTrainingMode != null && Object.hasOwnProperty.call(message, "modelTrainingMode")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.modelTrainingMode); return writer; }; /** - * Encodes the specified GetFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetFlowRequest.verify|verify} messages. + * Encodes the specified NluSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.NluSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.NluSettings * @static - * @param {google.cloud.dialogflow.cx.v3.IGetFlowRequest} message GetFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.INluSettings} message NluSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + NluSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetFlowRequest message from the specified reader or buffer. + * Decodes a NluSettings message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.NluSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.GetFlowRequest} GetFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.NluSettings} NluSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetFlowRequest.decode = function decode(reader, length) { + NluSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.NluSettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.modelType = reader.int32(); break; } - case 2: { - message.languageCode = reader.string(); + case 3: { + message.classificationThreshold = reader.float(); + break; + } + case 4: { + message.modelTrainingMode = reader.int32(); break; } default: @@ -6782,133 +7234,228 @@ }; /** - * Decodes a GetFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a NluSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.NluSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.GetFlowRequest} GetFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.NluSettings} NluSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetFlowRequest.decodeDelimited = function decodeDelimited(reader) { + NluSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetFlowRequest message. + * Verifies a NluSettings message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.NluSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetFlowRequest.verify = function verify(message) { + NluSettings.verify = function verify(message) { if (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.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; + if (message.modelType != null && message.hasOwnProperty("modelType")) + switch (message.modelType) { + default: + return "modelType: enum value expected"; + case 0: + case 1: + case 3: + break; + } + if (message.classificationThreshold != null && message.hasOwnProperty("classificationThreshold")) + if (typeof message.classificationThreshold !== "number") + return "classificationThreshold: number expected"; + if (message.modelTrainingMode != null && message.hasOwnProperty("modelTrainingMode")) + switch (message.modelTrainingMode) { + default: + return "modelTrainingMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a GetFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a NluSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.NluSettings * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GetFlowRequest} GetFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.NluSettings} NluSettings */ - GetFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetFlowRequest) + NluSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.NluSettings) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.GetFlowRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + var message = new $root.google.cloud.dialogflow.cx.v3.NluSettings(); + switch (object.modelType) { + default: + if (typeof object.modelType === "number") { + message.modelType = object.modelType; + break; + } + break; + case "MODEL_TYPE_UNSPECIFIED": + case 0: + message.modelType = 0; + break; + case "MODEL_TYPE_STANDARD": + case 1: + message.modelType = 1; + break; + case "MODEL_TYPE_ADVANCED": + case 3: + message.modelType = 3; + break; + } + if (object.classificationThreshold != null) + message.classificationThreshold = Number(object.classificationThreshold); + switch (object.modelTrainingMode) { + default: + if (typeof object.modelTrainingMode === "number") { + message.modelTrainingMode = object.modelTrainingMode; + break; + } + break; + case "MODEL_TRAINING_MODE_UNSPECIFIED": + case 0: + message.modelTrainingMode = 0; + break; + case "MODEL_TRAINING_MODE_AUTOMATIC": + case 1: + message.modelTrainingMode = 1; + break; + case "MODEL_TRAINING_MODE_MANUAL": + case 2: + message.modelTrainingMode = 2; + break; + } return message; }; /** - * Creates a plain object from a GetFlowRequest message. Also converts values to other types if specified. + * Creates a plain object from a NluSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.NluSettings * @static - * @param {google.cloud.dialogflow.cx.v3.GetFlowRequest} message GetFlowRequest + * @param {google.cloud.dialogflow.cx.v3.NluSettings} message NluSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetFlowRequest.toObject = function toObject(message, options) { + NluSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.languageCode = ""; + object.modelType = options.enums === String ? "MODEL_TYPE_UNSPECIFIED" : 0; + object.classificationThreshold = 0; + object.modelTrainingMode = options.enums === String ? "MODEL_TRAINING_MODE_UNSPECIFIED" : 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (message.modelType != null && message.hasOwnProperty("modelType")) + object.modelType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.NluSettings.ModelType[message.modelType] === undefined ? message.modelType : $root.google.cloud.dialogflow.cx.v3.NluSettings.ModelType[message.modelType] : message.modelType; + if (message.classificationThreshold != null && message.hasOwnProperty("classificationThreshold")) + object.classificationThreshold = options.json && !isFinite(message.classificationThreshold) ? String(message.classificationThreshold) : message.classificationThreshold; + if (message.modelTrainingMode != null && message.hasOwnProperty("modelTrainingMode")) + object.modelTrainingMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode[message.modelTrainingMode] === undefined ? message.modelTrainingMode : $root.google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode[message.modelTrainingMode] : message.modelTrainingMode; return object; }; /** - * Converts this GetFlowRequest to JSON. + * Converts this NluSettings to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.NluSettings * @instance * @returns {Object.} JSON object */ - GetFlowRequest.prototype.toJSON = function toJSON() { + NluSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetFlowRequest + * Gets the default type url for NluSettings * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.NluSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + NluSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetFlowRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.NluSettings"; }; - return GetFlowRequest; + /** + * ModelType enum. + * @name google.cloud.dialogflow.cx.v3.NluSettings.ModelType + * @enum {number} + * @property {number} MODEL_TYPE_UNSPECIFIED=0 MODEL_TYPE_UNSPECIFIED value + * @property {number} MODEL_TYPE_STANDARD=1 MODEL_TYPE_STANDARD value + * @property {number} MODEL_TYPE_ADVANCED=3 MODEL_TYPE_ADVANCED value + */ + NluSettings.ModelType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODEL_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MODEL_TYPE_STANDARD"] = 1; + values[valuesById[3] = "MODEL_TYPE_ADVANCED"] = 3; + return values; + })(); + + /** + * ModelTrainingMode enum. + * @name google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode + * @enum {number} + * @property {number} MODEL_TRAINING_MODE_UNSPECIFIED=0 MODEL_TRAINING_MODE_UNSPECIFIED value + * @property {number} MODEL_TRAINING_MODE_AUTOMATIC=1 MODEL_TRAINING_MODE_AUTOMATIC value + * @property {number} MODEL_TRAINING_MODE_MANUAL=2 MODEL_TRAINING_MODE_MANUAL value + */ + NluSettings.ModelTrainingMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODEL_TRAINING_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MODEL_TRAINING_MODE_AUTOMATIC"] = 1; + values[valuesById[2] = "MODEL_TRAINING_MODE_MANUAL"] = 2; + return values; + })(); + + return NluSettings; })(); - v3.UpdateFlowRequest = (function() { + v3.Flow = (function() { /** - * Properties of an UpdateFlowRequest. + * Properties of a Flow. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IUpdateFlowRequest - * @property {google.cloud.dialogflow.cx.v3.IFlow|null} [flow] UpdateFlowRequest flow - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFlowRequest updateMask - * @property {string|null} [languageCode] UpdateFlowRequest languageCode + * @interface IFlow + * @property {string|null} [name] Flow name + * @property {string|null} [displayName] Flow displayName + * @property {string|null} [description] Flow description + * @property {Array.|null} [transitionRoutes] Flow transitionRoutes + * @property {Array.|null} [eventHandlers] Flow eventHandlers + * @property {Array.|null} [transitionRouteGroups] Flow transitionRouteGroups + * @property {google.cloud.dialogflow.cx.v3.INluSettings|null} [nluSettings] Flow nluSettings */ /** - * Constructs a new UpdateFlowRequest. + * Constructs a new Flow. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an UpdateFlowRequest. - * @implements IUpdateFlowRequest + * @classdesc Represents a Flow. + * @implements IFlow * @constructor - * @param {google.cloud.dialogflow.cx.v3.IUpdateFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IFlow=} [properties] Properties to set */ - function UpdateFlowRequest(properties) { + function Flow(properties) { + this.transitionRoutes = []; + this.eventHandlers = []; + this.transitionRouteGroups = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6916,257 +7463,399 @@ } /** - * UpdateFlowRequest flow. - * @member {google.cloud.dialogflow.cx.v3.IFlow|null|undefined} flow - * @memberof google.cloud.dialogflow.cx.v3.UpdateFlowRequest + * Flow name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.Flow * @instance */ - UpdateFlowRequest.prototype.flow = null; + Flow.prototype.name = ""; /** - * UpdateFlowRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3.UpdateFlowRequest + * Flow displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.Flow * @instance */ - UpdateFlowRequest.prototype.updateMask = null; + Flow.prototype.displayName = ""; /** - * UpdateFlowRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.UpdateFlowRequest + * Flow description. + * @member {string} description + * @memberof google.cloud.dialogflow.cx.v3.Flow * @instance */ - UpdateFlowRequest.prototype.languageCode = ""; + Flow.prototype.description = ""; /** - * Creates a new UpdateFlowRequest instance using the specified properties. + * Flow transitionRoutes. + * @member {Array.} transitionRoutes + * @memberof google.cloud.dialogflow.cx.v3.Flow + * @instance + */ + Flow.prototype.transitionRoutes = $util.emptyArray; + + /** + * Flow eventHandlers. + * @member {Array.} eventHandlers + * @memberof google.cloud.dialogflow.cx.v3.Flow + * @instance + */ + Flow.prototype.eventHandlers = $util.emptyArray; + + /** + * Flow transitionRouteGroups. + * @member {Array.} transitionRouteGroups + * @memberof google.cloud.dialogflow.cx.v3.Flow + * @instance + */ + Flow.prototype.transitionRouteGroups = $util.emptyArray; + + /** + * Flow nluSettings. + * @member {google.cloud.dialogflow.cx.v3.INluSettings|null|undefined} nluSettings + * @memberof google.cloud.dialogflow.cx.v3.Flow + * @instance + */ + Flow.prototype.nluSettings = null; + + /** + * Creates a new Flow instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.Flow * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.UpdateFlowRequest} UpdateFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3.IFlow=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Flow} Flow instance */ - UpdateFlowRequest.create = function create(properties) { - return new UpdateFlowRequest(properties); + Flow.create = function create(properties) { + return new Flow(properties); }; /** - * Encodes the specified UpdateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateFlowRequest.verify|verify} messages. + * Encodes the specified Flow message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Flow.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.Flow * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateFlowRequest} message UpdateFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IFlow} message Flow message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateFlowRequest.encode = function encode(message, writer) { + Flow.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.flow != null && Object.hasOwnProperty.call(message, "flow")) - $root.google.cloud.dialogflow.cx.v3.Flow.encode(message.flow, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.transitionRoutes != null && message.transitionRoutes.length) + for (var i = 0; i < message.transitionRoutes.length; ++i) + $root.google.cloud.dialogflow.cx.v3.TransitionRoute.encode(message.transitionRoutes[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.eventHandlers != null && message.eventHandlers.length) + for (var i = 0; i < message.eventHandlers.length; ++i) + $root.google.cloud.dialogflow.cx.v3.EventHandler.encode(message.eventHandlers[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.nluSettings != null && Object.hasOwnProperty.call(message, "nluSettings")) + $root.google.cloud.dialogflow.cx.v3.NluSettings.encode(message.nluSettings, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.transitionRouteGroups != null && message.transitionRouteGroups.length) + for (var i = 0; i < message.transitionRouteGroups.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.transitionRouteGroups[i]); return writer; }; /** - * Encodes the specified UpdateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateFlowRequest.verify|verify} messages. + * Encodes the specified Flow message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Flow.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.Flow * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateFlowRequest} message UpdateFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IFlow} message Flow message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + Flow.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateFlowRequest message from the specified reader or buffer. + * Decodes a Flow message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.Flow * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.UpdateFlowRequest} UpdateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.Flow} Flow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateFlowRequest.decode = function decode(reader, length) { + Flow.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.UpdateFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Flow(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.flow = $root.google.cloud.dialogflow.cx.v3.Flow.decode(reader, reader.uint32()); + message.name = reader.string(); break; } case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.displayName = reader.string(); break; } case 3: { - message.languageCode = reader.string(); + message.description = reader.string(); break; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateFlowRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateFlowRequest + case 4: { + if (!(message.transitionRoutes && message.transitionRoutes.length)) + message.transitionRoutes = []; + message.transitionRoutes.push($root.google.cloud.dialogflow.cx.v3.TransitionRoute.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.eventHandlers && message.eventHandlers.length)) + message.eventHandlers = []; + message.eventHandlers.push($root.google.cloud.dialogflow.cx.v3.EventHandler.decode(reader, reader.uint32())); + break; + } + case 15: { + if (!(message.transitionRouteGroups && message.transitionRouteGroups.length)) + message.transitionRouteGroups = []; + message.transitionRouteGroups.push(reader.string()); + break; + } + case 11: { + message.nluSettings = $root.google.cloud.dialogflow.cx.v3.NluSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Flow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Flow * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.UpdateFlowRequest} UpdateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.Flow} Flow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateFlowRequest.decodeDelimited = function decodeDelimited(reader) { + Flow.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateFlowRequest message. + * Verifies a Flow message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.Flow * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateFlowRequest.verify = function verify(message) { + Flow.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.flow != null && message.hasOwnProperty("flow")) { - var error = $root.google.cloud.dialogflow.cx.v3.Flow.verify(message.flow); - if (error) - return "flow." + 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.transitionRoutes != null && message.hasOwnProperty("transitionRoutes")) { + if (!Array.isArray(message.transitionRoutes)) + return "transitionRoutes: array expected"; + for (var i = 0; i < message.transitionRoutes.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.verify(message.transitionRoutes[i]); + if (error) + return "transitionRoutes." + error; + } } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (message.eventHandlers != null && message.hasOwnProperty("eventHandlers")) { + if (!Array.isArray(message.eventHandlers)) + return "eventHandlers: array expected"; + for (var i = 0; i < message.eventHandlers.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.EventHandler.verify(message.eventHandlers[i]); + if (error) + return "eventHandlers." + error; + } + } + if (message.transitionRouteGroups != null && message.hasOwnProperty("transitionRouteGroups")) { + if (!Array.isArray(message.transitionRouteGroups)) + return "transitionRouteGroups: array expected"; + for (var i = 0; i < message.transitionRouteGroups.length; ++i) + if (!$util.isString(message.transitionRouteGroups[i])) + return "transitionRouteGroups: string[] expected"; + } + if (message.nluSettings != null && message.hasOwnProperty("nluSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3.NluSettings.verify(message.nluSettings); if (error) - return "updateMask." + error; + return "nluSettings." + error; } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; return null; }; /** - * Creates an UpdateFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Flow message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.Flow * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.UpdateFlowRequest} UpdateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.Flow} Flow */ - UpdateFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateFlowRequest) + Flow.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Flow) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.UpdateFlowRequest(); - if (object.flow != null) { - if (typeof object.flow !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateFlowRequest.flow: object expected"); - message.flow = $root.google.cloud.dialogflow.cx.v3.Flow.fromObject(object.flow); + var message = new $root.google.cloud.dialogflow.cx.v3.Flow(); + 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.transitionRoutes) { + if (!Array.isArray(object.transitionRoutes)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Flow.transitionRoutes: array expected"); + message.transitionRoutes = []; + for (var i = 0; i < object.transitionRoutes.length; ++i) { + if (typeof object.transitionRoutes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Flow.transitionRoutes: object expected"); + message.transitionRoutes[i] = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.fromObject(object.transitionRoutes[i]); + } } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateFlowRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + if (object.eventHandlers) { + if (!Array.isArray(object.eventHandlers)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Flow.eventHandlers: array expected"); + message.eventHandlers = []; + for (var i = 0; i < object.eventHandlers.length; ++i) { + if (typeof object.eventHandlers[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Flow.eventHandlers: object expected"); + message.eventHandlers[i] = $root.google.cloud.dialogflow.cx.v3.EventHandler.fromObject(object.eventHandlers[i]); + } + } + if (object.transitionRouteGroups) { + if (!Array.isArray(object.transitionRouteGroups)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Flow.transitionRouteGroups: array expected"); + message.transitionRouteGroups = []; + for (var i = 0; i < object.transitionRouteGroups.length; ++i) + message.transitionRouteGroups[i] = String(object.transitionRouteGroups[i]); + } + if (object.nluSettings != null) { + if (typeof object.nluSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Flow.nluSettings: object expected"); + message.nluSettings = $root.google.cloud.dialogflow.cx.v3.NluSettings.fromObject(object.nluSettings); } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from an UpdateFlowRequest message. Also converts values to other types if specified. + * Creates a plain object from a Flow message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.Flow * @static - * @param {google.cloud.dialogflow.cx.v3.UpdateFlowRequest} message UpdateFlowRequest + * @param {google.cloud.dialogflow.cx.v3.Flow} message Flow * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateFlowRequest.toObject = function toObject(message, options) { + Flow.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.transitionRoutes = []; + object.eventHandlers = []; + object.transitionRouteGroups = []; + } if (options.defaults) { - object.flow = null; - object.updateMask = null; - object.languageCode = ""; + object.name = ""; + object.displayName = ""; + object.description = ""; + object.nluSettings = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.transitionRoutes && message.transitionRoutes.length) { + object.transitionRoutes = []; + for (var j = 0; j < message.transitionRoutes.length; ++j) + object.transitionRoutes[j] = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.toObject(message.transitionRoutes[j], options); + } + if (message.eventHandlers && message.eventHandlers.length) { + object.eventHandlers = []; + for (var j = 0; j < message.eventHandlers.length; ++j) + object.eventHandlers[j] = $root.google.cloud.dialogflow.cx.v3.EventHandler.toObject(message.eventHandlers[j], options); + } + if (message.nluSettings != null && message.hasOwnProperty("nluSettings")) + object.nluSettings = $root.google.cloud.dialogflow.cx.v3.NluSettings.toObject(message.nluSettings, options); + if (message.transitionRouteGroups && message.transitionRouteGroups.length) { + object.transitionRouteGroups = []; + for (var j = 0; j < message.transitionRouteGroups.length; ++j) + object.transitionRouteGroups[j] = message.transitionRouteGroups[j]; } - if (message.flow != null && message.hasOwnProperty("flow")) - object.flow = $root.google.cloud.dialogflow.cx.v3.Flow.toObject(message.flow, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; return object; }; /** - * Converts this UpdateFlowRequest to JSON. + * Converts this Flow to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.Flow * @instance * @returns {Object.} JSON object */ - UpdateFlowRequest.prototype.toJSON = function toJSON() { + Flow.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateFlowRequest + * Gets the default type url for Flow * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.Flow * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Flow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateFlowRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Flow"; }; - return UpdateFlowRequest; + return Flow; })(); - v3.TrainFlowRequest = (function() { + v3.CreateFlowRequest = (function() { /** - * Properties of a TrainFlowRequest. + * Properties of a CreateFlowRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ITrainFlowRequest - * @property {string|null} [name] TrainFlowRequest name + * @interface ICreateFlowRequest + * @property {string|null} [parent] CreateFlowRequest parent + * @property {google.cloud.dialogflow.cx.v3.IFlow|null} [flow] CreateFlowRequest flow + * @property {string|null} [languageCode] CreateFlowRequest languageCode */ /** - * Constructs a new TrainFlowRequest. + * Constructs a new CreateFlowRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a TrainFlowRequest. - * @implements ITrainFlowRequest + * @classdesc Represents a CreateFlowRequest. + * @implements ICreateFlowRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.ITrainFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ICreateFlowRequest=} [properties] Properties to set */ - function TrainFlowRequest(properties) { + function CreateFlowRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7174,75 +7863,103 @@ } /** - * TrainFlowRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.TrainFlowRequest + * CreateFlowRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.CreateFlowRequest * @instance */ - TrainFlowRequest.prototype.name = ""; + CreateFlowRequest.prototype.parent = ""; /** - * Creates a new TrainFlowRequest instance using the specified properties. + * CreateFlowRequest flow. + * @member {google.cloud.dialogflow.cx.v3.IFlow|null|undefined} flow + * @memberof google.cloud.dialogflow.cx.v3.CreateFlowRequest + * @instance + */ + CreateFlowRequest.prototype.flow = null; + + /** + * CreateFlowRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.CreateFlowRequest + * @instance + */ + CreateFlowRequest.prototype.languageCode = ""; + + /** + * Creates a new CreateFlowRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ITrainFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.TrainFlowRequest} TrainFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3.ICreateFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreateFlowRequest} CreateFlowRequest instance */ - TrainFlowRequest.create = function create(properties) { - return new TrainFlowRequest(properties); + CreateFlowRequest.create = function create(properties) { + return new CreateFlowRequest(properties); }; /** - * Encodes the specified TrainFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TrainFlowRequest.verify|verify} messages. + * Encodes the specified CreateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateFlowRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ITrainFlowRequest} message TrainFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateFlowRequest} message CreateFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TrainFlowRequest.encode = function encode(message, writer) { + CreateFlowRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.flow != null && Object.hasOwnProperty.call(message, "flow")) + $root.google.cloud.dialogflow.cx.v3.Flow.encode(message.flow, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); return writer; }; /** - * Encodes the specified TrainFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TrainFlowRequest.verify|verify} messages. + * Encodes the specified CreateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateFlowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ITrainFlowRequest} message TrainFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateFlowRequest} message CreateFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TrainFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TrainFlowRequest message from the specified reader or buffer. + * Decodes a CreateFlowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.TrainFlowRequest} TrainFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateFlowRequest} CreateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TrainFlowRequest.decode = function decode(reader, length) { + CreateFlowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.TrainFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateFlowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.flow = $root.google.cloud.dialogflow.cx.v3.Flow.decode(reader, reader.uint32()); + break; + } + case 3: { + message.languageCode = reader.string(); break; } default: @@ -7254,123 +7971,145 @@ }; /** - * Decodes a TrainFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateFlowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.TrainFlowRequest} TrainFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateFlowRequest} CreateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TrainFlowRequest.decodeDelimited = function decodeDelimited(reader) { + CreateFlowRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TrainFlowRequest message. + * Verifies a CreateFlowRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateFlowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TrainFlowRequest.verify = function verify(message) { + CreateFlowRequest.verify = function verify(message) { if (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.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.flow != null && message.hasOwnProperty("flow")) { + var error = $root.google.cloud.dialogflow.cx.v3.Flow.verify(message.flow); + if (error) + return "flow." + error; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a TrainFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateFlowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateFlowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.TrainFlowRequest} TrainFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateFlowRequest} CreateFlowRequest */ - TrainFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.TrainFlowRequest) + CreateFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateFlowRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.TrainFlowRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.cx.v3.CreateFlowRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.flow != null) { + if (typeof object.flow !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CreateFlowRequest.flow: object expected"); + message.flow = $root.google.cloud.dialogflow.cx.v3.Flow.fromObject(object.flow); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a TrainFlowRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateFlowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3.TrainFlowRequest} message TrainFlowRequest + * @param {google.cloud.dialogflow.cx.v3.CreateFlowRequest} message CreateFlowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TrainFlowRequest.toObject = function toObject(message, options) { + CreateFlowRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.flow = null; + object.languageCode = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.flow != null && message.hasOwnProperty("flow")) + object.flow = $root.google.cloud.dialogflow.cx.v3.Flow.toObject(message.flow, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this TrainFlowRequest to JSON. + * Converts this CreateFlowRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateFlowRequest * @instance * @returns {Object.} JSON object */ - TrainFlowRequest.prototype.toJSON = function toJSON() { + CreateFlowRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TrainFlowRequest + * Gets the default type url for CreateFlowRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateFlowRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TrainFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TrainFlowRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateFlowRequest"; }; - return TrainFlowRequest; + return CreateFlowRequest; })(); - v3.ValidateFlowRequest = (function() { + v3.DeleteFlowRequest = (function() { /** - * Properties of a ValidateFlowRequest. + * Properties of a DeleteFlowRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IValidateFlowRequest - * @property {string|null} [name] ValidateFlowRequest name - * @property {string|null} [languageCode] ValidateFlowRequest languageCode + * @interface IDeleteFlowRequest + * @property {string|null} [name] DeleteFlowRequest name + * @property {boolean|null} [force] DeleteFlowRequest force */ /** - * Constructs a new ValidateFlowRequest. + * Constructs a new DeleteFlowRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ValidateFlowRequest. - * @implements IValidateFlowRequest + * @classdesc Represents a DeleteFlowRequest. + * @implements IDeleteFlowRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IValidateFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IDeleteFlowRequest=} [properties] Properties to set */ - function ValidateFlowRequest(properties) { + function DeleteFlowRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7378,80 +8117,80 @@ } /** - * ValidateFlowRequest name. + * DeleteFlowRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteFlowRequest * @instance */ - ValidateFlowRequest.prototype.name = ""; + DeleteFlowRequest.prototype.name = ""; /** - * ValidateFlowRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.ValidateFlowRequest + * DeleteFlowRequest force. + * @member {boolean} force + * @memberof google.cloud.dialogflow.cx.v3.DeleteFlowRequest * @instance */ - ValidateFlowRequest.prototype.languageCode = ""; + DeleteFlowRequest.prototype.force = false; /** - * Creates a new ValidateFlowRequest instance using the specified properties. + * Creates a new DeleteFlowRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IValidateFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ValidateFlowRequest} ValidateFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DeleteFlowRequest} DeleteFlowRequest instance */ - ValidateFlowRequest.create = function create(properties) { - return new ValidateFlowRequest(properties); + DeleteFlowRequest.create = function create(properties) { + return new DeleteFlowRequest(properties); }; /** - * Encodes the specified ValidateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ValidateFlowRequest.verify|verify} messages. + * Encodes the specified DeleteFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteFlowRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IValidateFlowRequest} message ValidateFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeleteFlowRequest} message DeleteFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateFlowRequest.encode = function encode(message, writer) { + DeleteFlowRequest.encode = function encode(message, writer) { 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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); return writer; }; /** - * Encodes the specified ValidateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ValidateFlowRequest.verify|verify} messages. + * Encodes the specified DeleteFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteFlowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IValidateFlowRequest} message ValidateFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeleteFlowRequest} message DeleteFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ValidateFlowRequest message from the specified reader or buffer. + * Decodes a DeleteFlowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ValidateFlowRequest} ValidateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.DeleteFlowRequest} DeleteFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateFlowRequest.decode = function decode(reader, length) { + DeleteFlowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ValidateFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DeleteFlowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -7460,7 +8199,7 @@ break; } case 2: { - message.languageCode = reader.string(); + message.force = reader.bool(); break; } default: @@ -7472,132 +8211,134 @@ }; /** - * Decodes a ValidateFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteFlowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ValidateFlowRequest} ValidateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.DeleteFlowRequest} DeleteFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateFlowRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteFlowRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ValidateFlowRequest message. + * Verifies a DeleteFlowRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteFlowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ValidateFlowRequest.verify = function verify(message) { + DeleteFlowRequest.verify = function verify(message) { if (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.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; /** - * Creates a ValidateFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteFlowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteFlowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ValidateFlowRequest} ValidateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.DeleteFlowRequest} DeleteFlowRequest */ - ValidateFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ValidateFlowRequest) + DeleteFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteFlowRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ValidateFlowRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.DeleteFlowRequest(); if (object.name != null) message.name = String(object.name); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + if (object.force != null) + message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from a ValidateFlowRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteFlowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ValidateFlowRequest} message ValidateFlowRequest + * @param {google.cloud.dialogflow.cx.v3.DeleteFlowRequest} message DeleteFlowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValidateFlowRequest.toObject = function toObject(message, options) { + DeleteFlowRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; - object.languageCode = ""; + object.force = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; /** - * Converts this ValidateFlowRequest to JSON. + * Converts this DeleteFlowRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteFlowRequest * @instance * @returns {Object.} JSON object */ - ValidateFlowRequest.prototype.toJSON = function toJSON() { + DeleteFlowRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ValidateFlowRequest + * Gets the default type url for DeleteFlowRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteFlowRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ValidateFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ValidateFlowRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeleteFlowRequest"; }; - return ValidateFlowRequest; + return DeleteFlowRequest; })(); - v3.GetFlowValidationResultRequest = (function() { + v3.ListFlowsRequest = (function() { /** - * Properties of a GetFlowValidationResultRequest. + * Properties of a ListFlowsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IGetFlowValidationResultRequest - * @property {string|null} [name] GetFlowValidationResultRequest name - * @property {string|null} [languageCode] GetFlowValidationResultRequest languageCode + * @interface IListFlowsRequest + * @property {string|null} [parent] ListFlowsRequest parent + * @property {number|null} [pageSize] ListFlowsRequest pageSize + * @property {string|null} [pageToken] ListFlowsRequest pageToken + * @property {string|null} [languageCode] ListFlowsRequest languageCode */ /** - * Constructs a new GetFlowValidationResultRequest. + * Constructs a new ListFlowsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a GetFlowValidationResultRequest. - * @implements IGetFlowValidationResultRequest + * @classdesc Represents a ListFlowsRequest. + * @implements IListFlowsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IGetFlowValidationResultRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListFlowsRequest=} [properties] Properties to set */ - function GetFlowValidationResultRequest(properties) { + function ListFlowsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7605,88 +8346,116 @@ } /** - * GetFlowValidationResultRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest + * ListFlowsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ListFlowsRequest * @instance */ - GetFlowValidationResultRequest.prototype.name = ""; + ListFlowsRequest.prototype.parent = ""; /** - * GetFlowValidationResultRequest languageCode. + * ListFlowsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3.ListFlowsRequest + * @instance + */ + ListFlowsRequest.prototype.pageSize = 0; + + /** + * ListFlowsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3.ListFlowsRequest + * @instance + */ + ListFlowsRequest.prototype.pageToken = ""; + + /** + * ListFlowsRequest languageCode. * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3.ListFlowsRequest * @instance */ - GetFlowValidationResultRequest.prototype.languageCode = ""; + ListFlowsRequest.prototype.languageCode = ""; /** - * Creates a new GetFlowValidationResultRequest instance using the specified properties. + * Creates a new ListFlowsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3.ListFlowsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetFlowValidationResultRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest} GetFlowValidationResultRequest instance + * @param {google.cloud.dialogflow.cx.v3.IListFlowsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListFlowsRequest} ListFlowsRequest instance */ - GetFlowValidationResultRequest.create = function create(properties) { - return new GetFlowValidationResultRequest(properties); + ListFlowsRequest.create = function create(properties) { + return new ListFlowsRequest(properties); }; /** - * Encodes the specified GetFlowValidationResultRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest.verify|verify} messages. + * Encodes the specified ListFlowsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListFlowsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3.ListFlowsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetFlowValidationResultRequest} message GetFlowValidationResultRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListFlowsRequest} message ListFlowsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFlowValidationResultRequest.encode = function encode(message, writer) { + ListFlowsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); return writer; }; /** - * Encodes the specified GetFlowValidationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest.verify|verify} messages. + * Encodes the specified ListFlowsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListFlowsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3.ListFlowsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetFlowValidationResultRequest} message GetFlowValidationResultRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListFlowsRequest} message ListFlowsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFlowValidationResultRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListFlowsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetFlowValidationResultRequest message from the specified reader or buffer. + * Decodes a ListFlowsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3.ListFlowsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest} GetFlowValidationResultRequest + * @returns {google.cloud.dialogflow.cx.v3.ListFlowsRequest} ListFlowsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetFlowValidationResultRequest.decode = function decode(reader, length) { + ListFlowsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListFlowsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { message.languageCode = reader.string(); break; } @@ -7699,35 +8468,41 @@ }; /** - * Decodes a GetFlowValidationResultRequest message from the specified reader or buffer, length delimited. + * Decodes a ListFlowsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3.ListFlowsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest} GetFlowValidationResultRequest + * @returns {google.cloud.dialogflow.cx.v3.ListFlowsRequest} ListFlowsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetFlowValidationResultRequest.decodeDelimited = function decodeDelimited(reader) { + ListFlowsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetFlowValidationResultRequest message. + * Verifies a ListFlowsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3.ListFlowsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetFlowValidationResultRequest.verify = function verify(message) { + ListFlowsRequest.verify = function verify(message) { if (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.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.languageCode != null && message.hasOwnProperty("languageCode")) if (!$util.isString(message.languageCode)) return "languageCode: string expected"; @@ -7735,98 +8510,107 @@ }; /** - * Creates a GetFlowValidationResultRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListFlowsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3.ListFlowsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest} GetFlowValidationResultRequest + * @returns {google.cloud.dialogflow.cx.v3.ListFlowsRequest} ListFlowsRequest */ - GetFlowValidationResultRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest) + ListFlowsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListFlowsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.cx.v3.ListFlowsRequest(); + 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.languageCode != null) message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a GetFlowValidationResultRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListFlowsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3.ListFlowsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest} message GetFlowValidationResultRequest + * @param {google.cloud.dialogflow.cx.v3.ListFlowsRequest} message ListFlowsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetFlowValidationResultRequest.toObject = function toObject(message, options) { + ListFlowsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; object.languageCode = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + 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.languageCode != null && message.hasOwnProperty("languageCode")) object.languageCode = message.languageCode; return object; }; /** - * Converts this GetFlowValidationResultRequest to JSON. + * Converts this ListFlowsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3.ListFlowsRequest * @instance * @returns {Object.} JSON object */ - GetFlowValidationResultRequest.prototype.toJSON = function toJSON() { + ListFlowsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetFlowValidationResultRequest + * Gets the default type url for ListFlowsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3.ListFlowsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetFlowValidationResultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListFlowsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListFlowsRequest"; }; - return GetFlowValidationResultRequest; + return ListFlowsRequest; })(); - v3.FlowValidationResult = (function() { + v3.ListFlowsResponse = (function() { /** - * Properties of a FlowValidationResult. + * Properties of a ListFlowsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IFlowValidationResult - * @property {string|null} [name] FlowValidationResult name - * @property {Array.|null} [validationMessages] FlowValidationResult validationMessages - * @property {google.protobuf.ITimestamp|null} [updateTime] FlowValidationResult updateTime + * @interface IListFlowsResponse + * @property {Array.|null} [flows] ListFlowsResponse flows + * @property {string|null} [nextPageToken] ListFlowsResponse nextPageToken */ /** - * Constructs a new FlowValidationResult. + * Constructs a new ListFlowsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a FlowValidationResult. - * @implements IFlowValidationResult + * @classdesc Represents a ListFlowsResponse. + * @implements IListFlowsResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IFlowValidationResult=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListFlowsResponse=} [properties] Properties to set */ - function FlowValidationResult(properties) { - this.validationMessages = []; + function ListFlowsResponse(properties) { + this.flows = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7834,106 +8618,92 @@ } /** - * FlowValidationResult name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.FlowValidationResult - * @instance - */ - FlowValidationResult.prototype.name = ""; - - /** - * FlowValidationResult validationMessages. - * @member {Array.} validationMessages - * @memberof google.cloud.dialogflow.cx.v3.FlowValidationResult + * ListFlowsResponse flows. + * @member {Array.} flows + * @memberof google.cloud.dialogflow.cx.v3.ListFlowsResponse * @instance */ - FlowValidationResult.prototype.validationMessages = $util.emptyArray; + ListFlowsResponse.prototype.flows = $util.emptyArray; /** - * FlowValidationResult updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dialogflow.cx.v3.FlowValidationResult + * ListFlowsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3.ListFlowsResponse * @instance */ - FlowValidationResult.prototype.updateTime = null; + ListFlowsResponse.prototype.nextPageToken = ""; /** - * Creates a new FlowValidationResult instance using the specified properties. + * Creates a new ListFlowsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3.ListFlowsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IFlowValidationResult=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.FlowValidationResult} FlowValidationResult instance + * @param {google.cloud.dialogflow.cx.v3.IListFlowsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListFlowsResponse} ListFlowsResponse instance */ - FlowValidationResult.create = function create(properties) { - return new FlowValidationResult(properties); + ListFlowsResponse.create = function create(properties) { + return new ListFlowsResponse(properties); }; /** - * Encodes the specified FlowValidationResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FlowValidationResult.verify|verify} messages. + * Encodes the specified ListFlowsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListFlowsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3.ListFlowsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IFlowValidationResult} message FlowValidationResult message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListFlowsResponse} message ListFlowsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FlowValidationResult.encode = function encode(message, writer) { + ListFlowsResponse.encode = function encode(message, writer) { 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.validationMessages != null && message.validationMessages.length) - for (var i = 0; i < message.validationMessages.length; ++i) - $root.google.cloud.dialogflow.cx.v3.ValidationMessage.encode(message.validationMessages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.flows != null && message.flows.length) + for (var i = 0; i < message.flows.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Flow.encode(message.flows[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 FlowValidationResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FlowValidationResult.verify|verify} messages. + * Encodes the specified ListFlowsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListFlowsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3.ListFlowsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IFlowValidationResult} message FlowValidationResult message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListFlowsResponse} message ListFlowsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FlowValidationResult.encodeDelimited = function encodeDelimited(message, writer) { + ListFlowsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FlowValidationResult message from the specified reader or buffer. + * Decodes a ListFlowsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3.ListFlowsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.FlowValidationResult} FlowValidationResult + * @returns {google.cloud.dialogflow.cx.v3.ListFlowsResponse} ListFlowsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FlowValidationResult.decode = function decode(reader, length) { + ListFlowsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.FlowValidationResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListFlowsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.flows && message.flows.length)) + message.flows = []; + message.flows.push($root.google.cloud.dialogflow.cx.v3.Flow.decode(reader, reader.uint32())); break; } case 2: { - if (!(message.validationMessages && message.validationMessages.length)) - message.validationMessages = []; - message.validationMessages.push($root.google.cloud.dialogflow.cx.v3.ValidationMessage.decode(reader, reader.uint32())); - break; - } - case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } default: @@ -7945,165 +8715,149 @@ }; /** - * Decodes a FlowValidationResult message from the specified reader or buffer, length delimited. + * Decodes a ListFlowsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3.ListFlowsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.FlowValidationResult} FlowValidationResult + * @returns {google.cloud.dialogflow.cx.v3.ListFlowsResponse} ListFlowsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FlowValidationResult.decodeDelimited = function decodeDelimited(reader) { + ListFlowsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FlowValidationResult message. + * Verifies a ListFlowsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3.ListFlowsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FlowValidationResult.verify = function verify(message) { + ListFlowsResponse.verify = function verify(message) { if (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.validationMessages != null && message.hasOwnProperty("validationMessages")) { - if (!Array.isArray(message.validationMessages)) - return "validationMessages: array expected"; - for (var i = 0; i < message.validationMessages.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.ValidationMessage.verify(message.validationMessages[i]); + if (message.flows != null && message.hasOwnProperty("flows")) { + if (!Array.isArray(message.flows)) + return "flows: array expected"; + for (var i = 0; i < message.flows.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Flow.verify(message.flows[i]); if (error) - return "validationMessages." + error; + return "flows." + error; } } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a FlowValidationResult message from a plain object. Also converts values to their respective internal types. + * Creates a ListFlowsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3.ListFlowsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.FlowValidationResult} FlowValidationResult + * @returns {google.cloud.dialogflow.cx.v3.ListFlowsResponse} ListFlowsResponse */ - FlowValidationResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.FlowValidationResult) + ListFlowsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListFlowsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.FlowValidationResult(); - if (object.name != null) - message.name = String(object.name); - if (object.validationMessages) { - if (!Array.isArray(object.validationMessages)) - throw TypeError(".google.cloud.dialogflow.cx.v3.FlowValidationResult.validationMessages: array expected"); - message.validationMessages = []; - for (var i = 0; i < object.validationMessages.length; ++i) { - if (typeof object.validationMessages[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.FlowValidationResult.validationMessages: object expected"); - message.validationMessages[i] = $root.google.cloud.dialogflow.cx.v3.ValidationMessage.fromObject(object.validationMessages[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.ListFlowsResponse(); + if (object.flows) { + if (!Array.isArray(object.flows)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListFlowsResponse.flows: array expected"); + message.flows = []; + for (var i = 0; i < object.flows.length; ++i) { + if (typeof object.flows[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListFlowsResponse.flows: object expected"); + message.flows[i] = $root.google.cloud.dialogflow.cx.v3.Flow.fromObject(object.flows[i]); } } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.FlowValidationResult.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a FlowValidationResult message. Also converts values to other types if specified. + * Creates a plain object from a ListFlowsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3.ListFlowsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.FlowValidationResult} message FlowValidationResult + * @param {google.cloud.dialogflow.cx.v3.ListFlowsResponse} message ListFlowsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FlowValidationResult.toObject = function toObject(message, options) { + ListFlowsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.validationMessages = []; - if (options.defaults) { - object.name = ""; - object.updateTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.validationMessages && message.validationMessages.length) { - object.validationMessages = []; - for (var j = 0; j < message.validationMessages.length; ++j) - object.validationMessages[j] = $root.google.cloud.dialogflow.cx.v3.ValidationMessage.toObject(message.validationMessages[j], options); + object.flows = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.flows && message.flows.length) { + object.flows = []; + for (var j = 0; j < message.flows.length; ++j) + object.flows[j] = $root.google.cloud.dialogflow.cx.v3.Flow.toObject(message.flows[j], options); } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this FlowValidationResult to JSON. + * Converts this ListFlowsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3.ListFlowsResponse * @instance * @returns {Object.} JSON object */ - FlowValidationResult.prototype.toJSON = function toJSON() { + ListFlowsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FlowValidationResult + * Gets the default type url for ListFlowsResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3.ListFlowsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FlowValidationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListFlowsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.FlowValidationResult"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListFlowsResponse"; }; - return FlowValidationResult; + return ListFlowsResponse; })(); - v3.ImportFlowRequest = (function() { + v3.GetFlowRequest = (function() { /** - * Properties of an ImportFlowRequest. + * Properties of a GetFlowRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IImportFlowRequest - * @property {string|null} [parent] ImportFlowRequest parent - * @property {string|null} [flowUri] ImportFlowRequest flowUri - * @property {Uint8Array|null} [flowContent] ImportFlowRequest flowContent - * @property {google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption|null} [importOption] ImportFlowRequest importOption + * @interface IGetFlowRequest + * @property {string|null} [name] GetFlowRequest name + * @property {string|null} [languageCode] GetFlowRequest languageCode */ /** - * Constructs a new ImportFlowRequest. + * Constructs a new GetFlowRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an ImportFlowRequest. - * @implements IImportFlowRequest + * @classdesc Represents a GetFlowRequest. + * @implements IGetFlowRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IImportFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IGetFlowRequest=} [properties] Properties to set */ - function ImportFlowRequest(properties) { + function GetFlowRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8111,131 +8865,331 @@ } /** - * ImportFlowRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest + * GetFlowRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.GetFlowRequest * @instance */ - ImportFlowRequest.prototype.parent = ""; + GetFlowRequest.prototype.name = ""; /** - * ImportFlowRequest flowUri. - * @member {string|null|undefined} flowUri - * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest + * GetFlowRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.GetFlowRequest * @instance */ - ImportFlowRequest.prototype.flowUri = null; + GetFlowRequest.prototype.languageCode = ""; /** - * ImportFlowRequest flowContent. - * @member {Uint8Array|null|undefined} flowContent - * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest - * @instance + * Creates a new GetFlowRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.GetFlowRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetFlowRequest} GetFlowRequest instance */ - ImportFlowRequest.prototype.flowContent = null; + GetFlowRequest.create = function create(properties) { + return new GetFlowRequest(properties); + }; /** - * ImportFlowRequest importOption. - * @member {google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption} importOption - * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest + * Encodes the specified GetFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetFlowRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.GetFlowRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetFlowRequest} message GetFlowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetFlowRequest.encode = function encode(message, writer) { + 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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + return writer; + }; + + /** + * Encodes the specified GetFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetFlowRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GetFlowRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetFlowRequest} message GetFlowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetFlowRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.GetFlowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.GetFlowRequest} GetFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFlowRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetFlowRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.languageCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetFlowRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GetFlowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.GetFlowRequest} GetFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFlowRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetFlowRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.GetFlowRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetFlowRequest.verify = function verify(message) { + if (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.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + return null; + }; + + /** + * Creates a GetFlowRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.GetFlowRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.GetFlowRequest} GetFlowRequest + */ + GetFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetFlowRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.GetFlowRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + return message; + }; + + /** + * Creates a plain object from a GetFlowRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.GetFlowRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.GetFlowRequest} message GetFlowRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetFlowRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.languageCode = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + return object; + }; + + /** + * Converts this GetFlowRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.GetFlowRequest * @instance + * @returns {Object.} JSON object */ - ImportFlowRequest.prototype.importOption = 0; + GetFlowRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Gets the default type url for GetFlowRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.GetFlowRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetFlowRequest"; + }; + + return GetFlowRequest; + })(); + + v3.UpdateFlowRequest = (function() { /** - * ImportFlowRequest flow. - * @member {"flowUri"|"flowContent"|undefined} flow - * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest + * Properties of an UpdateFlowRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IUpdateFlowRequest + * @property {google.cloud.dialogflow.cx.v3.IFlow|null} [flow] UpdateFlowRequest flow + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFlowRequest updateMask + * @property {string|null} [languageCode] UpdateFlowRequest languageCode + */ + + /** + * Constructs a new UpdateFlowRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an UpdateFlowRequest. + * @implements IUpdateFlowRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IUpdateFlowRequest=} [properties] Properties to set + */ + function UpdateFlowRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateFlowRequest flow. + * @member {google.cloud.dialogflow.cx.v3.IFlow|null|undefined} flow + * @memberof google.cloud.dialogflow.cx.v3.UpdateFlowRequest * @instance */ - Object.defineProperty(ImportFlowRequest.prototype, "flow", { - get: $util.oneOfGetter($oneOfFields = ["flowUri", "flowContent"]), - set: $util.oneOfSetter($oneOfFields) - }); + UpdateFlowRequest.prototype.flow = null; /** - * Creates a new ImportFlowRequest instance using the specified properties. + * UpdateFlowRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3.UpdateFlowRequest + * @instance + */ + UpdateFlowRequest.prototype.updateMask = null; + + /** + * UpdateFlowRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.UpdateFlowRequest + * @instance + */ + UpdateFlowRequest.prototype.languageCode = ""; + + /** + * Creates a new UpdateFlowRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IImportFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ImportFlowRequest} ImportFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.UpdateFlowRequest} UpdateFlowRequest instance */ - ImportFlowRequest.create = function create(properties) { - return new ImportFlowRequest(properties); + UpdateFlowRequest.create = function create(properties) { + return new UpdateFlowRequest(properties); }; /** - * Encodes the specified ImportFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportFlowRequest.verify|verify} messages. + * Encodes the specified UpdateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateFlowRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IImportFlowRequest} message ImportFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IUpdateFlowRequest} message UpdateFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportFlowRequest.encode = function encode(message, writer) { + UpdateFlowRequest.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.flowUri != null && Object.hasOwnProperty.call(message, "flowUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.flowUri); - if (message.flowContent != null && Object.hasOwnProperty.call(message, "flowContent")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.flowContent); - if (message.importOption != null && Object.hasOwnProperty.call(message, "importOption")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.importOption); + if (message.flow != null && Object.hasOwnProperty.call(message, "flow")) + $root.google.cloud.dialogflow.cx.v3.Flow.encode(message.flow, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); return writer; }; /** - * Encodes the specified ImportFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportFlowRequest.verify|verify} messages. + * Encodes the specified UpdateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateFlowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IImportFlowRequest} message ImportFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IUpdateFlowRequest} message UpdateFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportFlowRequest message from the specified reader or buffer. + * Decodes an UpdateFlowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ImportFlowRequest} ImportFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.UpdateFlowRequest} UpdateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportFlowRequest.decode = function decode(reader, length) { + UpdateFlowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ImportFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.UpdateFlowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.flow = $root.google.cloud.dialogflow.cx.v3.Flow.decode(reader, reader.uint32()); break; } case 2: { - message.flowUri = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } case 3: { - message.flowContent = reader.bytes(); - break; - } - case 4: { - message.importOption = reader.int32(); + message.languageCode = reader.string(); break; } default: @@ -8247,201 +9201,149 @@ }; /** - * Decodes an ImportFlowRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateFlowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ImportFlowRequest} ImportFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.UpdateFlowRequest} UpdateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportFlowRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateFlowRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportFlowRequest message. + * Verifies an UpdateFlowRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateFlowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportFlowRequest.verify = function verify(message) { + UpdateFlowRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.flowUri != null && message.hasOwnProperty("flowUri")) { - properties.flow = 1; - if (!$util.isString(message.flowUri)) - return "flowUri: string expected"; + if (message.flow != null && message.hasOwnProperty("flow")) { + var error = $root.google.cloud.dialogflow.cx.v3.Flow.verify(message.flow); + if (error) + return "flow." + error; } - if (message.flowContent != null && message.hasOwnProperty("flowContent")) { - if (properties.flow === 1) - return "flow: multiple values"; - properties.flow = 1; - if (!(message.flowContent && typeof message.flowContent.length === "number" || $util.isString(message.flowContent))) - return "flowContent: buffer expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } - if (message.importOption != null && message.hasOwnProperty("importOption")) - switch (message.importOption) { - default: - return "importOption: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates an ImportFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateFlowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateFlowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ImportFlowRequest} ImportFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.UpdateFlowRequest} UpdateFlowRequest */ - ImportFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ImportFlowRequest) + UpdateFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateFlowRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ImportFlowRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.flowUri != null) - message.flowUri = String(object.flowUri); - if (object.flowContent != null) - if (typeof object.flowContent === "string") - $util.base64.decode(object.flowContent, message.flowContent = $util.newBuffer($util.base64.length(object.flowContent)), 0); - else if (object.flowContent.length >= 0) - message.flowContent = object.flowContent; - switch (object.importOption) { - default: - if (typeof object.importOption === "number") { - message.importOption = object.importOption; - break; - } - break; - case "IMPORT_OPTION_UNSPECIFIED": - case 0: - message.importOption = 0; - break; - case "KEEP": - case 1: - message.importOption = 1; - break; - case "FALLBACK": - case 2: - message.importOption = 2; - break; + var message = new $root.google.cloud.dialogflow.cx.v3.UpdateFlowRequest(); + if (object.flow != null) { + if (typeof object.flow !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateFlowRequest.flow: object expected"); + message.flow = $root.google.cloud.dialogflow.cx.v3.Flow.fromObject(object.flow); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateFlowRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from an ImportFlowRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateFlowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ImportFlowRequest} message ImportFlowRequest + * @param {google.cloud.dialogflow.cx.v3.UpdateFlowRequest} message UpdateFlowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportFlowRequest.toObject = function toObject(message, options) { + UpdateFlowRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.importOption = options.enums === String ? "IMPORT_OPTION_UNSPECIFIED" : 0; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.flowUri != null && message.hasOwnProperty("flowUri")) { - object.flowUri = message.flowUri; - if (options.oneofs) - object.flow = "flowUri"; - } - if (message.flowContent != null && message.hasOwnProperty("flowContent")) { - object.flowContent = options.bytes === String ? $util.base64.encode(message.flowContent, 0, message.flowContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.flowContent) : message.flowContent; - if (options.oneofs) - object.flow = "flowContent"; + object.flow = null; + object.updateMask = null; + object.languageCode = ""; } - if (message.importOption != null && message.hasOwnProperty("importOption")) - object.importOption = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption[message.importOption] === undefined ? message.importOption : $root.google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption[message.importOption] : message.importOption; + if (message.flow != null && message.hasOwnProperty("flow")) + object.flow = $root.google.cloud.dialogflow.cx.v3.Flow.toObject(message.flow, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this ImportFlowRequest to JSON. + * Converts this UpdateFlowRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateFlowRequest * @instance * @returns {Object.} JSON object */ - ImportFlowRequest.prototype.toJSON = function toJSON() { + UpdateFlowRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportFlowRequest + * Gets the default type url for UpdateFlowRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateFlowRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ImportFlowRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateFlowRequest"; }; - /** - * ImportOption enum. - * @name google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption - * @enum {number} - * @property {number} IMPORT_OPTION_UNSPECIFIED=0 IMPORT_OPTION_UNSPECIFIED value - * @property {number} KEEP=1 KEEP value - * @property {number} FALLBACK=2 FALLBACK value - */ - ImportFlowRequest.ImportOption = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IMPORT_OPTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "KEEP"] = 1; - values[valuesById[2] = "FALLBACK"] = 2; - return values; - })(); - - return ImportFlowRequest; + return UpdateFlowRequest; })(); - v3.ImportFlowResponse = (function() { + v3.TrainFlowRequest = (function() { /** - * Properties of an ImportFlowResponse. + * Properties of a TrainFlowRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IImportFlowResponse - * @property {string|null} [flow] ImportFlowResponse flow + * @interface ITrainFlowRequest + * @property {string|null} [name] TrainFlowRequest name */ /** - * Constructs a new ImportFlowResponse. + * Constructs a new TrainFlowRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an ImportFlowResponse. - * @implements IImportFlowResponse + * @classdesc Represents a TrainFlowRequest. + * @implements ITrainFlowRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IImportFlowResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ITrainFlowRequest=} [properties] Properties to set */ - function ImportFlowResponse(properties) { + function TrainFlowRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8449,75 +9351,75 @@ } /** - * ImportFlowResponse flow. - * @member {string} flow - * @memberof google.cloud.dialogflow.cx.v3.ImportFlowResponse + * TrainFlowRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.TrainFlowRequest * @instance */ - ImportFlowResponse.prototype.flow = ""; + TrainFlowRequest.prototype.name = ""; /** - * Creates a new ImportFlowResponse instance using the specified properties. + * Creates a new TrainFlowRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.TrainFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IImportFlowResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ImportFlowResponse} ImportFlowResponse instance + * @param {google.cloud.dialogflow.cx.v3.ITrainFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.TrainFlowRequest} TrainFlowRequest instance */ - ImportFlowResponse.create = function create(properties) { - return new ImportFlowResponse(properties); + TrainFlowRequest.create = function create(properties) { + return new TrainFlowRequest(properties); }; /** - * Encodes the specified ImportFlowResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportFlowResponse.verify|verify} messages. + * Encodes the specified TrainFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TrainFlowRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.TrainFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IImportFlowResponse} message ImportFlowResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ITrainFlowRequest} message TrainFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportFlowResponse.encode = function encode(message, writer) { + TrainFlowRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.flow != null && Object.hasOwnProperty.call(message, "flow")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.flow); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ImportFlowResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportFlowResponse.verify|verify} messages. + * Encodes the specified TrainFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TrainFlowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.TrainFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IImportFlowResponse} message ImportFlowResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ITrainFlowRequest} message TrainFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportFlowResponse.encodeDelimited = function encodeDelimited(message, writer) { + TrainFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportFlowResponse message from the specified reader or buffer. + * Decodes a TrainFlowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.TrainFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ImportFlowResponse} ImportFlowResponse + * @returns {google.cloud.dialogflow.cx.v3.TrainFlowRequest} TrainFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportFlowResponse.decode = function decode(reader, length) { + TrainFlowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ImportFlowResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.TrainFlowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.flow = reader.string(); + message.name = reader.string(); break; } default: @@ -8529,124 +9431,123 @@ }; /** - * Decodes an ImportFlowResponse message from the specified reader or buffer, length delimited. + * Decodes a TrainFlowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.TrainFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ImportFlowResponse} ImportFlowResponse + * @returns {google.cloud.dialogflow.cx.v3.TrainFlowRequest} TrainFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportFlowResponse.decodeDelimited = function decodeDelimited(reader) { + TrainFlowRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportFlowResponse message. + * Verifies a TrainFlowRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.TrainFlowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportFlowResponse.verify = function verify(message) { + TrainFlowRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.flow != null && message.hasOwnProperty("flow")) - if (!$util.isString(message.flow)) - return "flow: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an ImportFlowResponse message from a plain object. Also converts values to their respective internal types. + * Creates a TrainFlowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.TrainFlowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ImportFlowResponse} ImportFlowResponse + * @returns {google.cloud.dialogflow.cx.v3.TrainFlowRequest} TrainFlowRequest */ - ImportFlowResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ImportFlowResponse) + TrainFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.TrainFlowRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ImportFlowResponse(); - if (object.flow != null) - message.flow = String(object.flow); + var message = new $root.google.cloud.dialogflow.cx.v3.TrainFlowRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an ImportFlowResponse message. Also converts values to other types if specified. + * Creates a plain object from a TrainFlowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.TrainFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ImportFlowResponse} message ImportFlowResponse + * @param {google.cloud.dialogflow.cx.v3.TrainFlowRequest} message TrainFlowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportFlowResponse.toObject = function toObject(message, options) { + TrainFlowRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.flow = ""; - if (message.flow != null && message.hasOwnProperty("flow")) - object.flow = message.flow; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ImportFlowResponse to JSON. + * Converts this TrainFlowRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.TrainFlowRequest * @instance * @returns {Object.} JSON object */ - ImportFlowResponse.prototype.toJSON = function toJSON() { + TrainFlowRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportFlowResponse + * Gets the default type url for TrainFlowRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.TrainFlowRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportFlowResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TrainFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ImportFlowResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TrainFlowRequest"; }; - return ImportFlowResponse; + return TrainFlowRequest; })(); - v3.ExportFlowRequest = (function() { + v3.ValidateFlowRequest = (function() { /** - * Properties of an ExportFlowRequest. + * Properties of a ValidateFlowRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IExportFlowRequest - * @property {string|null} [name] ExportFlowRequest name - * @property {string|null} [flowUri] ExportFlowRequest flowUri - * @property {boolean|null} [includeReferencedFlows] ExportFlowRequest includeReferencedFlows + * @interface IValidateFlowRequest + * @property {string|null} [name] ValidateFlowRequest name + * @property {string|null} [languageCode] ValidateFlowRequest languageCode */ /** - * Constructs a new ExportFlowRequest. + * Constructs a new ValidateFlowRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an ExportFlowRequest. - * @implements IExportFlowRequest + * @classdesc Represents a ValidateFlowRequest. + * @implements IValidateFlowRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IExportFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IValidateFlowRequest=} [properties] Properties to set */ - function ExportFlowRequest(properties) { + function ValidateFlowRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8654,90 +9555,80 @@ } /** - * ExportFlowRequest name. + * ValidateFlowRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.ExportFlowRequest - * @instance - */ - ExportFlowRequest.prototype.name = ""; - - /** - * ExportFlowRequest flowUri. - * @member {string} flowUri - * @memberof google.cloud.dialogflow.cx.v3.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.ValidateFlowRequest * @instance */ - ExportFlowRequest.prototype.flowUri = ""; + ValidateFlowRequest.prototype.name = ""; /** - * ExportFlowRequest includeReferencedFlows. - * @member {boolean} includeReferencedFlows - * @memberof google.cloud.dialogflow.cx.v3.ExportFlowRequest + * ValidateFlowRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.ValidateFlowRequest * @instance */ - ExportFlowRequest.prototype.includeReferencedFlows = false; + ValidateFlowRequest.prototype.languageCode = ""; /** - * Creates a new ExportFlowRequest instance using the specified properties. + * Creates a new ValidateFlowRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.ValidateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IExportFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ExportFlowRequest} ExportFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3.IValidateFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ValidateFlowRequest} ValidateFlowRequest instance */ - ExportFlowRequest.create = function create(properties) { - return new ExportFlowRequest(properties); + ValidateFlowRequest.create = function create(properties) { + return new ValidateFlowRequest(properties); }; /** - * Encodes the specified ExportFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportFlowRequest.verify|verify} messages. + * Encodes the specified ValidateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ValidateFlowRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.ValidateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IExportFlowRequest} message ExportFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IValidateFlowRequest} message ValidateFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportFlowRequest.encode = function encode(message, writer) { + ValidateFlowRequest.encode = function encode(message, writer) { 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.flowUri != null && Object.hasOwnProperty.call(message, "flowUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.flowUri); - if (message.includeReferencedFlows != null && Object.hasOwnProperty.call(message, "includeReferencedFlows")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.includeReferencedFlows); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); return writer; }; /** - * Encodes the specified ExportFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportFlowRequest.verify|verify} messages. + * Encodes the specified ValidateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ValidateFlowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.ValidateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IExportFlowRequest} message ExportFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IValidateFlowRequest} message ValidateFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + ValidateFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportFlowRequest message from the specified reader or buffer. + * Decodes a ValidateFlowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.ValidateFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ExportFlowRequest} ExportFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.ValidateFlowRequest} ValidateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportFlowRequest.decode = function decode(reader, length) { + ValidateFlowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ExportFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ValidateFlowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -8746,11 +9637,7 @@ break; } case 2: { - message.flowUri = reader.string(); - break; - } - case 4: { - message.includeReferencedFlows = reader.bool(); + message.languageCode = reader.string(); break; } default: @@ -8762,140 +9649,132 @@ }; /** - * Decodes an ExportFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a ValidateFlowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.ValidateFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ExportFlowRequest} ExportFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.ValidateFlowRequest} ValidateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportFlowRequest.decodeDelimited = function decodeDelimited(reader) { + ValidateFlowRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportFlowRequest message. + * Verifies a ValidateFlowRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.ValidateFlowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportFlowRequest.verify = function verify(message) { + ValidateFlowRequest.verify = function verify(message) { if (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.flowUri != null && message.hasOwnProperty("flowUri")) - if (!$util.isString(message.flowUri)) - return "flowUri: string expected"; - if (message.includeReferencedFlows != null && message.hasOwnProperty("includeReferencedFlows")) - if (typeof message.includeReferencedFlows !== "boolean") - return "includeReferencedFlows: boolean expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates an ExportFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateFlowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.ValidateFlowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ExportFlowRequest} ExportFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.ValidateFlowRequest} ValidateFlowRequest */ - ExportFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ExportFlowRequest) + ValidateFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ValidateFlowRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ExportFlowRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.ValidateFlowRequest(); if (object.name != null) message.name = String(object.name); - if (object.flowUri != null) - message.flowUri = String(object.flowUri); - if (object.includeReferencedFlows != null) - message.includeReferencedFlows = Boolean(object.includeReferencedFlows); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from an ExportFlowRequest message. Also converts values to other types if specified. + * Creates a plain object from a ValidateFlowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.ValidateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ExportFlowRequest} message ExportFlowRequest + * @param {google.cloud.dialogflow.cx.v3.ValidateFlowRequest} message ValidateFlowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportFlowRequest.toObject = function toObject(message, options) { + ValidateFlowRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; - object.flowUri = ""; - object.includeReferencedFlows = false; + object.languageCode = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.flowUri != null && message.hasOwnProperty("flowUri")) - object.flowUri = message.flowUri; - if (message.includeReferencedFlows != null && message.hasOwnProperty("includeReferencedFlows")) - object.includeReferencedFlows = message.includeReferencedFlows; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this ExportFlowRequest to JSON. + * Converts this ValidateFlowRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.ValidateFlowRequest * @instance * @returns {Object.} JSON object */ - ExportFlowRequest.prototype.toJSON = function toJSON() { + ValidateFlowRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExportFlowRequest + * Gets the default type url for ValidateFlowRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.ValidateFlowRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExportFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ValidateFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ExportFlowRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ValidateFlowRequest"; }; - return ExportFlowRequest; + return ValidateFlowRequest; })(); - v3.ExportFlowResponse = (function() { + v3.GetFlowValidationResultRequest = (function() { /** - * Properties of an ExportFlowResponse. + * Properties of a GetFlowValidationResultRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IExportFlowResponse - * @property {string|null} [flowUri] ExportFlowResponse flowUri - * @property {Uint8Array|null} [flowContent] ExportFlowResponse flowContent + * @interface IGetFlowValidationResultRequest + * @property {string|null} [name] GetFlowValidationResultRequest name + * @property {string|null} [languageCode] GetFlowValidationResultRequest languageCode */ /** - * Constructs a new ExportFlowResponse. + * Constructs a new GetFlowValidationResultRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an ExportFlowResponse. - * @implements IExportFlowResponse + * @classdesc Represents a GetFlowValidationResultRequest. + * @implements IGetFlowValidationResultRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IExportFlowResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IGetFlowValidationResultRequest=} [properties] Properties to set */ - function ExportFlowResponse(properties) { + function GetFlowValidationResultRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8903,103 +9782,89 @@ } /** - * ExportFlowResponse flowUri. - * @member {string|null|undefined} flowUri - * @memberof google.cloud.dialogflow.cx.v3.ExportFlowResponse - * @instance - */ - ExportFlowResponse.prototype.flowUri = null; - - /** - * ExportFlowResponse flowContent. - * @member {Uint8Array|null|undefined} flowContent - * @memberof google.cloud.dialogflow.cx.v3.ExportFlowResponse + * GetFlowValidationResultRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest * @instance */ - ExportFlowResponse.prototype.flowContent = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + GetFlowValidationResultRequest.prototype.name = ""; /** - * ExportFlowResponse flow. - * @member {"flowUri"|"flowContent"|undefined} flow - * @memberof google.cloud.dialogflow.cx.v3.ExportFlowResponse + * GetFlowValidationResultRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest * @instance */ - Object.defineProperty(ExportFlowResponse.prototype, "flow", { - get: $util.oneOfGetter($oneOfFields = ["flowUri", "flowContent"]), - set: $util.oneOfSetter($oneOfFields) - }); + GetFlowValidationResultRequest.prototype.languageCode = ""; /** - * Creates a new ExportFlowResponse instance using the specified properties. + * Creates a new GetFlowValidationResultRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IExportFlowResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ExportFlowResponse} ExportFlowResponse instance + * @param {google.cloud.dialogflow.cx.v3.IGetFlowValidationResultRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest} GetFlowValidationResultRequest instance */ - ExportFlowResponse.create = function create(properties) { - return new ExportFlowResponse(properties); + GetFlowValidationResultRequest.create = function create(properties) { + return new GetFlowValidationResultRequest(properties); }; /** - * Encodes the specified ExportFlowResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportFlowResponse.verify|verify} messages. + * Encodes the specified GetFlowValidationResultRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IExportFlowResponse} message ExportFlowResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetFlowValidationResultRequest} message GetFlowValidationResultRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportFlowResponse.encode = function encode(message, writer) { + GetFlowValidationResultRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.flowUri != null && Object.hasOwnProperty.call(message, "flowUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.flowUri); - if (message.flowContent != null && Object.hasOwnProperty.call(message, "flowContent")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.flowContent); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); return writer; }; /** - * Encodes the specified ExportFlowResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportFlowResponse.verify|verify} messages. + * Encodes the specified GetFlowValidationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IExportFlowResponse} message ExportFlowResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetFlowValidationResultRequest} message GetFlowValidationResultRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportFlowResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetFlowValidationResultRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportFlowResponse message from the specified reader or buffer. + * Decodes a GetFlowValidationResultRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ExportFlowResponse} ExportFlowResponse + * @returns {google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest} GetFlowValidationResultRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportFlowResponse.decode = function decode(reader, length) { + GetFlowValidationResultRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ExportFlowResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.flowUri = reader.string(); + message.name = reader.string(); break; } case 2: { - message.flowContent = reader.bytes(); + message.languageCode = reader.string(); break; } default: @@ -9011,352 +9876,411 @@ }; /** - * Decodes an ExportFlowResponse message from the specified reader or buffer, length delimited. + * Decodes a GetFlowValidationResultRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ExportFlowResponse} ExportFlowResponse + * @returns {google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest} GetFlowValidationResultRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportFlowResponse.decodeDelimited = function decodeDelimited(reader) { + GetFlowValidationResultRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportFlowResponse message. + * Verifies a GetFlowValidationResultRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportFlowResponse.verify = function verify(message) { + GetFlowValidationResultRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.flowUri != null && message.hasOwnProperty("flowUri")) { - properties.flow = 1; - if (!$util.isString(message.flowUri)) - return "flowUri: string expected"; - } - if (message.flowContent != null && message.hasOwnProperty("flowContent")) { - if (properties.flow === 1) - return "flow: multiple values"; - properties.flow = 1; - if (!(message.flowContent && typeof message.flowContent.length === "number" || $util.isString(message.flowContent))) - return "flowContent: buffer expected"; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates an ExportFlowResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetFlowValidationResultRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ExportFlowResponse} ExportFlowResponse + * @returns {google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest} GetFlowValidationResultRequest */ - ExportFlowResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ExportFlowResponse) + GetFlowValidationResultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ExportFlowResponse(); - if (object.flowUri != null) - message.flowUri = String(object.flowUri); - if (object.flowContent != null) - if (typeof object.flowContent === "string") - $util.base64.decode(object.flowContent, message.flowContent = $util.newBuffer($util.base64.length(object.flowContent)), 0); - else if (object.flowContent.length >= 0) - message.flowContent = object.flowContent; + var message = new $root.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from an ExportFlowResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetFlowValidationResultRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ExportFlowResponse} message ExportFlowResponse + * @param {google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest} message GetFlowValidationResultRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportFlowResponse.toObject = function toObject(message, options) { + GetFlowValidationResultRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.flowUri != null && message.hasOwnProperty("flowUri")) { - object.flowUri = message.flowUri; - if (options.oneofs) - object.flow = "flowUri"; - } - if (message.flowContent != null && message.hasOwnProperty("flowContent")) { - object.flowContent = options.bytes === String ? $util.base64.encode(message.flowContent, 0, message.flowContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.flowContent) : message.flowContent; - if (options.oneofs) - object.flow = "flowContent"; + if (options.defaults) { + object.name = ""; + object.languageCode = ""; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this ExportFlowResponse to JSON. + * Converts this GetFlowValidationResultRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest * @instance * @returns {Object.} JSON object */ - ExportFlowResponse.prototype.toJSON = function toJSON() { + GetFlowValidationResultRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExportFlowResponse + * Gets the default type url for GetFlowValidationResultRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExportFlowResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetFlowValidationResultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ExportFlowResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest"; }; - return ExportFlowResponse; + return GetFlowValidationResultRequest; })(); - v3.Pages = (function() { + v3.FlowValidationResult = (function() { /** - * Constructs a new Pages service. + * Properties of a FlowValidationResult. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a Pages - * @extends $protobuf.rpc.Service + * @interface IFlowValidationResult + * @property {string|null} [name] FlowValidationResult name + * @property {Array.|null} [validationMessages] FlowValidationResult validationMessages + * @property {google.protobuf.ITimestamp|null} [updateTime] FlowValidationResult updateTime + */ + + /** + * Constructs a new FlowValidationResult. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a FlowValidationResult. + * @implements IFlowValidationResult * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @param {google.cloud.dialogflow.cx.v3.IFlowValidationResult=} [properties] Properties to set */ - function Pages(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + function FlowValidationResult(properties) { + this.validationMessages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - (Pages.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Pages; - /** - * Creates new Pages service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Pages - * @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 {Pages} RPC service. Useful where requests and/or responses are streamed. + * FlowValidationResult name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.FlowValidationResult + * @instance */ - Pages.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + FlowValidationResult.prototype.name = ""; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Pages|listPages}. - * @memberof google.cloud.dialogflow.cx.v3.Pages - * @typedef ListPagesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.ListPagesResponse} [response] ListPagesResponse + * FlowValidationResult validationMessages. + * @member {Array.} validationMessages + * @memberof google.cloud.dialogflow.cx.v3.FlowValidationResult + * @instance */ + FlowValidationResult.prototype.validationMessages = $util.emptyArray; /** - * Calls ListPages. - * @function listPages - * @memberof google.cloud.dialogflow.cx.v3.Pages + * FlowValidationResult updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dialogflow.cx.v3.FlowValidationResult * @instance - * @param {google.cloud.dialogflow.cx.v3.IListPagesRequest} request ListPagesRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Pages.ListPagesCallback} callback Node-style callback called with the error, if any, and ListPagesResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(Pages.prototype.listPages = function listPages(request, callback) { - return this.rpcCall(listPages, $root.google.cloud.dialogflow.cx.v3.ListPagesRequest, $root.google.cloud.dialogflow.cx.v3.ListPagesResponse, request, callback); - }, "name", { value: "ListPages" }); + FlowValidationResult.prototype.updateTime = null; /** - * Calls ListPages. - * @function listPages - * @memberof google.cloud.dialogflow.cx.v3.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListPagesRequest} request ListPagesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Pages|getPage}. - * @memberof google.cloud.dialogflow.cx.v3.Pages - * @typedef GetPageCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Page} [response] Page - */ - - /** - * Calls GetPage. - * @function getPage - * @memberof google.cloud.dialogflow.cx.v3.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetPageRequest} request GetPageRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Pages.GetPageCallback} callback Node-style callback called with the error, if any, and Page - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Pages.prototype.getPage = function getPage(request, callback) { - return this.rpcCall(getPage, $root.google.cloud.dialogflow.cx.v3.GetPageRequest, $root.google.cloud.dialogflow.cx.v3.Page, request, callback); - }, "name", { value: "GetPage" }); - - /** - * Calls GetPage. - * @function getPage - * @memberof google.cloud.dialogflow.cx.v3.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetPageRequest} request GetPageRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new FlowValidationResult instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.FlowValidationResult + * @static + * @param {google.cloud.dialogflow.cx.v3.IFlowValidationResult=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.FlowValidationResult} FlowValidationResult instance */ + FlowValidationResult.create = function create(properties) { + return new FlowValidationResult(properties); + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Pages|createPage}. - * @memberof google.cloud.dialogflow.cx.v3.Pages - * @typedef CreatePageCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Page} [response] Page + * Encodes the specified FlowValidationResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FlowValidationResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.FlowValidationResult + * @static + * @param {google.cloud.dialogflow.cx.v3.IFlowValidationResult} message FlowValidationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + FlowValidationResult.encode = function encode(message, writer) { + 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.validationMessages != null && message.validationMessages.length) + for (var i = 0; i < message.validationMessages.length; ++i) + $root.google.cloud.dialogflow.cx.v3.ValidationMessage.encode(message.validationMessages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; /** - * Calls CreatePage. - * @function createPage - * @memberof google.cloud.dialogflow.cx.v3.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreatePageRequest} request CreatePageRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Pages.CreatePageCallback} callback Node-style callback called with the error, if any, and Page - * @returns {undefined} - * @variation 1 + * Encodes the specified FlowValidationResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FlowValidationResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.FlowValidationResult + * @static + * @param {google.cloud.dialogflow.cx.v3.IFlowValidationResult} message FlowValidationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(Pages.prototype.createPage = function createPage(request, callback) { - return this.rpcCall(createPage, $root.google.cloud.dialogflow.cx.v3.CreatePageRequest, $root.google.cloud.dialogflow.cx.v3.Page, request, callback); - }, "name", { value: "CreatePage" }); + FlowValidationResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls CreatePage. - * @function createPage - * @memberof google.cloud.dialogflow.cx.v3.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreatePageRequest} request CreatePageRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a FlowValidationResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.FlowValidationResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.FlowValidationResult} FlowValidationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + FlowValidationResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.FlowValidationResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.validationMessages && message.validationMessages.length)) + message.validationMessages = []; + message.validationMessages.push($root.google.cloud.dialogflow.cx.v3.ValidationMessage.decode(reader, reader.uint32())); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Pages|updatePage}. - * @memberof google.cloud.dialogflow.cx.v3.Pages - * @typedef UpdatePageCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Page} [response] Page + * Decodes a FlowValidationResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.FlowValidationResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.FlowValidationResult} FlowValidationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + FlowValidationResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls UpdatePage. - * @function updatePage - * @memberof google.cloud.dialogflow.cx.v3.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdatePageRequest} request UpdatePageRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Pages.UpdatePageCallback} callback Node-style callback called with the error, if any, and Page - * @returns {undefined} - * @variation 1 + * Verifies a FlowValidationResult message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.FlowValidationResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(Pages.prototype.updatePage = function updatePage(request, callback) { - return this.rpcCall(updatePage, $root.google.cloud.dialogflow.cx.v3.UpdatePageRequest, $root.google.cloud.dialogflow.cx.v3.Page, request, callback); - }, "name", { value: "UpdatePage" }); + FlowValidationResult.verify = function verify(message) { + if (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.validationMessages != null && message.hasOwnProperty("validationMessages")) { + if (!Array.isArray(message.validationMessages)) + return "validationMessages: array expected"; + for (var i = 0; i < message.validationMessages.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.ValidationMessage.verify(message.validationMessages[i]); + if (error) + return "validationMessages." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; /** - * Calls UpdatePage. - * @function updatePage - * @memberof google.cloud.dialogflow.cx.v3.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdatePageRequest} request UpdatePageRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a FlowValidationResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.FlowValidationResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.FlowValidationResult} FlowValidationResult */ + FlowValidationResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.FlowValidationResult) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.FlowValidationResult(); + if (object.name != null) + message.name = String(object.name); + if (object.validationMessages) { + if (!Array.isArray(object.validationMessages)) + throw TypeError(".google.cloud.dialogflow.cx.v3.FlowValidationResult.validationMessages: array expected"); + message.validationMessages = []; + for (var i = 0; i < object.validationMessages.length; ++i) { + if (typeof object.validationMessages[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.FlowValidationResult.validationMessages: object expected"); + message.validationMessages[i] = $root.google.cloud.dialogflow.cx.v3.ValidationMessage.fromObject(object.validationMessages[i]); + } + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.FlowValidationResult.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Pages|deletePage}. - * @memberof google.cloud.dialogflow.cx.v3.Pages - * @typedef DeletePageCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates a plain object from a FlowValidationResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.FlowValidationResult + * @static + * @param {google.cloud.dialogflow.cx.v3.FlowValidationResult} message FlowValidationResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + FlowValidationResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.validationMessages = []; + if (options.defaults) { + object.name = ""; + object.updateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.validationMessages && message.validationMessages.length) { + object.validationMessages = []; + for (var j = 0; j < message.validationMessages.length; ++j) + object.validationMessages[j] = $root.google.cloud.dialogflow.cx.v3.ValidationMessage.toObject(message.validationMessages[j], options); + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; /** - * Calls DeletePage. - * @function deletePage - * @memberof google.cloud.dialogflow.cx.v3.Pages + * Converts this FlowValidationResult to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.FlowValidationResult * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeletePageRequest} request DeletePageRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Pages.DeletePageCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(Pages.prototype.deletePage = function deletePage(request, callback) { - return this.rpcCall(deletePage, $root.google.cloud.dialogflow.cx.v3.DeletePageRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeletePage" }); + FlowValidationResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls DeletePage. - * @function deletePage - * @memberof google.cloud.dialogflow.cx.v3.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeletePageRequest} request DeletePageRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for FlowValidationResult + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.FlowValidationResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + FlowValidationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.FlowValidationResult"; + }; - return Pages; + return FlowValidationResult; })(); - v3.Page = (function() { + v3.ImportFlowRequest = (function() { /** - * Properties of a Page. + * Properties of an ImportFlowRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IPage - * @property {string|null} [name] Page name - * @property {string|null} [displayName] Page displayName - * @property {google.cloud.dialogflow.cx.v3.IFulfillment|null} [entryFulfillment] Page entryFulfillment - * @property {google.cloud.dialogflow.cx.v3.IForm|null} [form] Page form - * @property {Array.|null} [transitionRouteGroups] Page transitionRouteGroups - * @property {Array.|null} [transitionRoutes] Page transitionRoutes - * @property {Array.|null} [eventHandlers] Page eventHandlers + * @interface IImportFlowRequest + * @property {string|null} [parent] ImportFlowRequest parent + * @property {string|null} [flowUri] ImportFlowRequest flowUri + * @property {Uint8Array|null} [flowContent] ImportFlowRequest flowContent + * @property {google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption|null} [importOption] ImportFlowRequest importOption */ /** - * Constructs a new Page. + * Constructs a new ImportFlowRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a Page. - * @implements IPage + * @classdesc Represents an ImportFlowRequest. + * @implements IImportFlowRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IPage=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IImportFlowRequest=} [properties] Properties to set */ - function Page(properties) { - this.transitionRouteGroups = []; - this.transitionRoutes = []; - this.eventHandlers = []; + function ImportFlowRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9364,168 +10288,131 @@ } /** - * Page name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.Page - * @instance - */ - Page.prototype.name = ""; - - /** - * Page displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3.Page + * ImportFlowRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest * @instance */ - Page.prototype.displayName = ""; + ImportFlowRequest.prototype.parent = ""; /** - * Page entryFulfillment. - * @member {google.cloud.dialogflow.cx.v3.IFulfillment|null|undefined} entryFulfillment - * @memberof google.cloud.dialogflow.cx.v3.Page + * ImportFlowRequest flowUri. + * @member {string|null|undefined} flowUri + * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest * @instance */ - Page.prototype.entryFulfillment = null; + ImportFlowRequest.prototype.flowUri = null; /** - * Page form. - * @member {google.cloud.dialogflow.cx.v3.IForm|null|undefined} form - * @memberof google.cloud.dialogflow.cx.v3.Page + * ImportFlowRequest flowContent. + * @member {Uint8Array|null|undefined} flowContent + * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest * @instance */ - Page.prototype.form = null; + ImportFlowRequest.prototype.flowContent = null; /** - * Page transitionRouteGroups. - * @member {Array.} transitionRouteGroups - * @memberof google.cloud.dialogflow.cx.v3.Page + * ImportFlowRequest importOption. + * @member {google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption} importOption + * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest * @instance */ - Page.prototype.transitionRouteGroups = $util.emptyArray; + ImportFlowRequest.prototype.importOption = 0; - /** - * Page transitionRoutes. - * @member {Array.} transitionRoutes - * @memberof google.cloud.dialogflow.cx.v3.Page - * @instance - */ - Page.prototype.transitionRoutes = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Page eventHandlers. - * @member {Array.} eventHandlers - * @memberof google.cloud.dialogflow.cx.v3.Page + * ImportFlowRequest flow. + * @member {"flowUri"|"flowContent"|undefined} flow + * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest * @instance */ - Page.prototype.eventHandlers = $util.emptyArray; + Object.defineProperty(ImportFlowRequest.prototype, "flow", { + get: $util.oneOfGetter($oneOfFields = ["flowUri", "flowContent"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new Page instance using the specified properties. + * Creates a new ImportFlowRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Page + * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IPage=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Page} Page instance + * @param {google.cloud.dialogflow.cx.v3.IImportFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ImportFlowRequest} ImportFlowRequest instance */ - Page.create = function create(properties) { - return new Page(properties); + ImportFlowRequest.create = function create(properties) { + return new ImportFlowRequest(properties); }; /** - * Encodes the specified Page message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Page.verify|verify} messages. + * Encodes the specified ImportFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportFlowRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Page + * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IPage} message Page message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IImportFlowRequest} message ImportFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Page.encode = function encode(message, writer) { + ImportFlowRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.form != null && Object.hasOwnProperty.call(message, "form")) - $root.google.cloud.dialogflow.cx.v3.Form.encode(message.form, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.entryFulfillment != null && Object.hasOwnProperty.call(message, "entryFulfillment")) - $root.google.cloud.dialogflow.cx.v3.Fulfillment.encode(message.entryFulfillment, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.transitionRoutes != null && message.transitionRoutes.length) - for (var i = 0; i < message.transitionRoutes.length; ++i) - $root.google.cloud.dialogflow.cx.v3.TransitionRoute.encode(message.transitionRoutes[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.eventHandlers != null && message.eventHandlers.length) - for (var i = 0; i < message.eventHandlers.length; ++i) - $root.google.cloud.dialogflow.cx.v3.EventHandler.encode(message.eventHandlers[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.transitionRouteGroups != null && message.transitionRouteGroups.length) - for (var i = 0; i < message.transitionRouteGroups.length; ++i) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.transitionRouteGroups[i]); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.flowUri != null && Object.hasOwnProperty.call(message, "flowUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.flowUri); + if (message.flowContent != null && Object.hasOwnProperty.call(message, "flowContent")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.flowContent); + if (message.importOption != null && Object.hasOwnProperty.call(message, "importOption")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.importOption); return writer; }; /** - * Encodes the specified Page message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Page.verify|verify} messages. + * Encodes the specified ImportFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportFlowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Page + * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IPage} message Page message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IImportFlowRequest} message ImportFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Page.encodeDelimited = function encodeDelimited(message, writer) { + ImportFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Page message from the specified reader or buffer. + * Decodes an ImportFlowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Page + * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.Page} Page + * @returns {google.cloud.dialogflow.cx.v3.ImportFlowRequest} ImportFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Page.decode = function decode(reader, length) { + ImportFlowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Page(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ImportFlowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.displayName = reader.string(); + message.flowUri = reader.string(); break; } - case 7: { - message.entryFulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.decode(reader, reader.uint32()); + case 3: { + message.flowContent = reader.bytes(); break; } case 4: { - message.form = $root.google.cloud.dialogflow.cx.v3.Form.decode(reader, reader.uint32()); - break; - } - case 11: { - if (!(message.transitionRouteGroups && message.transitionRouteGroups.length)) - message.transitionRouteGroups = []; - message.transitionRouteGroups.push(reader.string()); - break; - } - case 9: { - if (!(message.transitionRoutes && message.transitionRoutes.length)) - message.transitionRoutes = []; - message.transitionRoutes.push($root.google.cloud.dialogflow.cx.v3.TransitionRoute.decode(reader, reader.uint32())); - break; - } - case 10: { - if (!(message.eventHandlers && message.eventHandlers.length)) - message.eventHandlers = []; - message.eventHandlers.push($root.google.cloud.dialogflow.cx.v3.EventHandler.decode(reader, reader.uint32())); + message.importOption = reader.int32(); break; } default: @@ -9537,230 +10424,201 @@ }; /** - * Decodes a Page message from the specified reader or buffer, length delimited. + * Decodes an ImportFlowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Page + * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Page} Page + * @returns {google.cloud.dialogflow.cx.v3.ImportFlowRequest} ImportFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Page.decodeDelimited = function decodeDelimited(reader) { + ImportFlowRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Page message. + * Verifies an ImportFlowRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Page + * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Page.verify = function verify(message) { + ImportFlowRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.entryFulfillment != null && message.hasOwnProperty("entryFulfillment")) { - var error = $root.google.cloud.dialogflow.cx.v3.Fulfillment.verify(message.entryFulfillment); - if (error) - return "entryFulfillment." + error; - } - if (message.form != null && message.hasOwnProperty("form")) { - var error = $root.google.cloud.dialogflow.cx.v3.Form.verify(message.form); - if (error) - return "form." + error; - } - if (message.transitionRouteGroups != null && message.hasOwnProperty("transitionRouteGroups")) { - if (!Array.isArray(message.transitionRouteGroups)) - return "transitionRouteGroups: array expected"; - for (var i = 0; i < message.transitionRouteGroups.length; ++i) - if (!$util.isString(message.transitionRouteGroups[i])) - return "transitionRouteGroups: string[] expected"; + var properties = {}; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.flowUri != null && message.hasOwnProperty("flowUri")) { + properties.flow = 1; + if (!$util.isString(message.flowUri)) + return "flowUri: string expected"; } - if (message.transitionRoutes != null && message.hasOwnProperty("transitionRoutes")) { - if (!Array.isArray(message.transitionRoutes)) - return "transitionRoutes: array expected"; - for (var i = 0; i < message.transitionRoutes.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.verify(message.transitionRoutes[i]); - if (error) - return "transitionRoutes." + error; - } + if (message.flowContent != null && message.hasOwnProperty("flowContent")) { + if (properties.flow === 1) + return "flow: multiple values"; + properties.flow = 1; + if (!(message.flowContent && typeof message.flowContent.length === "number" || $util.isString(message.flowContent))) + return "flowContent: buffer expected"; } - if (message.eventHandlers != null && message.hasOwnProperty("eventHandlers")) { - if (!Array.isArray(message.eventHandlers)) - return "eventHandlers: array expected"; - for (var i = 0; i < message.eventHandlers.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.EventHandler.verify(message.eventHandlers[i]); - if (error) - return "eventHandlers." + error; + if (message.importOption != null && message.hasOwnProperty("importOption")) + switch (message.importOption) { + default: + return "importOption: enum value expected"; + case 0: + case 1: + case 2: + break; } - } return null; }; /** - * Creates a Page message from a plain object. Also converts values to their respective internal types. + * Creates an ImportFlowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Page + * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Page} Page + * @returns {google.cloud.dialogflow.cx.v3.ImportFlowRequest} ImportFlowRequest */ - Page.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Page) + ImportFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ImportFlowRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Page(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.entryFulfillment != null) { - if (typeof object.entryFulfillment !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Page.entryFulfillment: object expected"); - message.entryFulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.fromObject(object.entryFulfillment); - } - if (object.form != null) { - if (typeof object.form !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Page.form: object expected"); - message.form = $root.google.cloud.dialogflow.cx.v3.Form.fromObject(object.form); - } - if (object.transitionRouteGroups) { - if (!Array.isArray(object.transitionRouteGroups)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Page.transitionRouteGroups: array expected"); - message.transitionRouteGroups = []; - for (var i = 0; i < object.transitionRouteGroups.length; ++i) - message.transitionRouteGroups[i] = String(object.transitionRouteGroups[i]); - } - if (object.transitionRoutes) { - if (!Array.isArray(object.transitionRoutes)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Page.transitionRoutes: array expected"); - message.transitionRoutes = []; - for (var i = 0; i < object.transitionRoutes.length; ++i) { - if (typeof object.transitionRoutes[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Page.transitionRoutes: object expected"); - message.transitionRoutes[i] = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.fromObject(object.transitionRoutes[i]); - } - } - if (object.eventHandlers) { - if (!Array.isArray(object.eventHandlers)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Page.eventHandlers: array expected"); - message.eventHandlers = []; - for (var i = 0; i < object.eventHandlers.length; ++i) { - if (typeof object.eventHandlers[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Page.eventHandlers: object expected"); - message.eventHandlers[i] = $root.google.cloud.dialogflow.cx.v3.EventHandler.fromObject(object.eventHandlers[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.ImportFlowRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.flowUri != null) + message.flowUri = String(object.flowUri); + if (object.flowContent != null) + if (typeof object.flowContent === "string") + $util.base64.decode(object.flowContent, message.flowContent = $util.newBuffer($util.base64.length(object.flowContent)), 0); + else if (object.flowContent.length >= 0) + message.flowContent = object.flowContent; + switch (object.importOption) { + default: + if (typeof object.importOption === "number") { + message.importOption = object.importOption; + break; } + break; + case "IMPORT_OPTION_UNSPECIFIED": + case 0: + message.importOption = 0; + break; + case "KEEP": + case 1: + message.importOption = 1; + break; + case "FALLBACK": + case 2: + message.importOption = 2; + break; } return message; }; /** - * Creates a plain object from a Page message. Also converts values to other types if specified. + * Creates a plain object from an ImportFlowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Page + * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3.Page} message Page + * @param {google.cloud.dialogflow.cx.v3.ImportFlowRequest} message ImportFlowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Page.toObject = function toObject(message, options) { + ImportFlowRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.transitionRoutes = []; - object.eventHandlers = []; - object.transitionRouteGroups = []; - } if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.form = null; - object.entryFulfillment = 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.form != null && message.hasOwnProperty("form")) - object.form = $root.google.cloud.dialogflow.cx.v3.Form.toObject(message.form, options); - if (message.entryFulfillment != null && message.hasOwnProperty("entryFulfillment")) - object.entryFulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.toObject(message.entryFulfillment, options); - if (message.transitionRoutes && message.transitionRoutes.length) { - object.transitionRoutes = []; - for (var j = 0; j < message.transitionRoutes.length; ++j) - object.transitionRoutes[j] = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.toObject(message.transitionRoutes[j], options); + object.parent = ""; + object.importOption = options.enums === String ? "IMPORT_OPTION_UNSPECIFIED" : 0; } - if (message.eventHandlers && message.eventHandlers.length) { - object.eventHandlers = []; - for (var j = 0; j < message.eventHandlers.length; ++j) - object.eventHandlers[j] = $root.google.cloud.dialogflow.cx.v3.EventHandler.toObject(message.eventHandlers[j], options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.flowUri != null && message.hasOwnProperty("flowUri")) { + object.flowUri = message.flowUri; + if (options.oneofs) + object.flow = "flowUri"; } - if (message.transitionRouteGroups && message.transitionRouteGroups.length) { - object.transitionRouteGroups = []; - for (var j = 0; j < message.transitionRouteGroups.length; ++j) - object.transitionRouteGroups[j] = message.transitionRouteGroups[j]; + if (message.flowContent != null && message.hasOwnProperty("flowContent")) { + object.flowContent = options.bytes === String ? $util.base64.encode(message.flowContent, 0, message.flowContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.flowContent) : message.flowContent; + if (options.oneofs) + object.flow = "flowContent"; } + if (message.importOption != null && message.hasOwnProperty("importOption")) + object.importOption = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption[message.importOption] === undefined ? message.importOption : $root.google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption[message.importOption] : message.importOption; return object; }; /** - * Converts this Page to JSON. + * Converts this ImportFlowRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Page + * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest * @instance * @returns {Object.} JSON object */ - Page.prototype.toJSON = function toJSON() { + ImportFlowRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Page + * Gets the default type url for ImportFlowRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Page + * @memberof google.cloud.dialogflow.cx.v3.ImportFlowRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Page.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Page"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ImportFlowRequest"; }; - return Page; + /** + * ImportOption enum. + * @name google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption + * @enum {number} + * @property {number} IMPORT_OPTION_UNSPECIFIED=0 IMPORT_OPTION_UNSPECIFIED value + * @property {number} KEEP=1 KEEP value + * @property {number} FALLBACK=2 FALLBACK value + */ + ImportFlowRequest.ImportOption = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IMPORT_OPTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "KEEP"] = 1; + values[valuesById[2] = "FALLBACK"] = 2; + return values; + })(); + + return ImportFlowRequest; })(); - v3.Form = (function() { + v3.ImportFlowResponse = (function() { /** - * Properties of a Form. + * Properties of an ImportFlowResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IForm - * @property {Array.|null} [parameters] Form parameters + * @interface IImportFlowResponse + * @property {string|null} [flow] ImportFlowResponse flow */ /** - * Constructs a new Form. + * Constructs a new ImportFlowResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a Form. - * @implements IForm + * @classdesc Represents an ImportFlowResponse. + * @implements IImportFlowResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IForm=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IImportFlowResponse=} [properties] Properties to set */ - function Form(properties) { - this.parameters = []; + function ImportFlowResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9768,78 +10626,75 @@ } /** - * Form parameters. - * @member {Array.} parameters - * @memberof google.cloud.dialogflow.cx.v3.Form + * ImportFlowResponse flow. + * @member {string} flow + * @memberof google.cloud.dialogflow.cx.v3.ImportFlowResponse * @instance */ - Form.prototype.parameters = $util.emptyArray; + ImportFlowResponse.prototype.flow = ""; /** - * Creates a new Form instance using the specified properties. + * Creates a new ImportFlowResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Form + * @memberof google.cloud.dialogflow.cx.v3.ImportFlowResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IForm=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Form} Form instance + * @param {google.cloud.dialogflow.cx.v3.IImportFlowResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ImportFlowResponse} ImportFlowResponse instance */ - Form.create = function create(properties) { - return new Form(properties); + ImportFlowResponse.create = function create(properties) { + return new ImportFlowResponse(properties); }; /** - * Encodes the specified Form message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Form.verify|verify} messages. + * Encodes the specified ImportFlowResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportFlowResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Form + * @memberof google.cloud.dialogflow.cx.v3.ImportFlowResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IForm} message Form message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IImportFlowResponse} message ImportFlowResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Form.encode = function encode(message, writer) { + ImportFlowResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parameters != null && message.parameters.length) - for (var i = 0; i < message.parameters.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Form.Parameter.encode(message.parameters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.flow != null && Object.hasOwnProperty.call(message, "flow")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.flow); return writer; }; /** - * Encodes the specified Form message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Form.verify|verify} messages. + * Encodes the specified ImportFlowResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportFlowResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Form + * @memberof google.cloud.dialogflow.cx.v3.ImportFlowResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IForm} message Form message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IImportFlowResponse} message ImportFlowResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Form.encodeDelimited = function encodeDelimited(message, writer) { + ImportFlowResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Form message from the specified reader or buffer. + * Decodes an ImportFlowResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Form + * @memberof google.cloud.dialogflow.cx.v3.ImportFlowResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.Form} Form + * @returns {google.cloud.dialogflow.cx.v3.ImportFlowResponse} ImportFlowResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Form.decode = function decode(reader, length) { + ImportFlowResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Form(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ImportFlowResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.parameters && message.parameters.length)) - message.parameters = []; - message.parameters.push($root.google.cloud.dialogflow.cx.v3.Form.Parameter.decode(reader, reader.uint32())); + message.flow = reader.string(); break; } default: @@ -9851,894 +10706,228 @@ }; /** - * Decodes a Form message from the specified reader or buffer, length delimited. + * Decodes an ImportFlowResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Form + * @memberof google.cloud.dialogflow.cx.v3.ImportFlowResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Form} Form + * @returns {google.cloud.dialogflow.cx.v3.ImportFlowResponse} ImportFlowResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Form.decodeDelimited = function decodeDelimited(reader) { + ImportFlowResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Form message. + * Verifies an ImportFlowResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Form + * @memberof google.cloud.dialogflow.cx.v3.ImportFlowResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Form.verify = function verify(message) { + ImportFlowResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parameters != null && message.hasOwnProperty("parameters")) { - if (!Array.isArray(message.parameters)) - return "parameters: array expected"; - for (var i = 0; i < message.parameters.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Form.Parameter.verify(message.parameters[i]); - if (error) - return "parameters." + error; - } - } + if (message.flow != null && message.hasOwnProperty("flow")) + if (!$util.isString(message.flow)) + return "flow: string expected"; return null; }; /** - * Creates a Form message from a plain object. Also converts values to their respective internal types. + * Creates an ImportFlowResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Form + * @memberof google.cloud.dialogflow.cx.v3.ImportFlowResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Form} Form + * @returns {google.cloud.dialogflow.cx.v3.ImportFlowResponse} ImportFlowResponse */ - Form.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Form) + ImportFlowResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ImportFlowResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Form(); - if (object.parameters) { - if (!Array.isArray(object.parameters)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Form.parameters: array expected"); - message.parameters = []; - for (var i = 0; i < object.parameters.length; ++i) { - if (typeof object.parameters[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Form.parameters: object expected"); - message.parameters[i] = $root.google.cloud.dialogflow.cx.v3.Form.Parameter.fromObject(object.parameters[i]); - } - } + var message = new $root.google.cloud.dialogflow.cx.v3.ImportFlowResponse(); + if (object.flow != null) + message.flow = String(object.flow); return message; }; /** - * Creates a plain object from a Form message. Also converts values to other types if specified. + * Creates a plain object from an ImportFlowResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Form + * @memberof google.cloud.dialogflow.cx.v3.ImportFlowResponse * @static - * @param {google.cloud.dialogflow.cx.v3.Form} message Form + * @param {google.cloud.dialogflow.cx.v3.ImportFlowResponse} message ImportFlowResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Form.toObject = function toObject(message, options) { + ImportFlowResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.parameters = []; - if (message.parameters && message.parameters.length) { - object.parameters = []; - for (var j = 0; j < message.parameters.length; ++j) - object.parameters[j] = $root.google.cloud.dialogflow.cx.v3.Form.Parameter.toObject(message.parameters[j], options); - } + if (options.defaults) + object.flow = ""; + if (message.flow != null && message.hasOwnProperty("flow")) + object.flow = message.flow; return object; }; /** - * Converts this Form to JSON. + * Converts this ImportFlowResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Form + * @memberof google.cloud.dialogflow.cx.v3.ImportFlowResponse * @instance * @returns {Object.} JSON object */ - Form.prototype.toJSON = function toJSON() { + ImportFlowResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Form + * Gets the default type url for ImportFlowResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Form + * @memberof google.cloud.dialogflow.cx.v3.ImportFlowResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Form.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportFlowResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Form"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ImportFlowResponse"; }; - Form.Parameter = (function() { + return ImportFlowResponse; + })(); - /** - * Properties of a Parameter. - * @memberof google.cloud.dialogflow.cx.v3.Form - * @interface IParameter - * @property {string|null} [displayName] Parameter displayName - * @property {boolean|null} [required] Parameter required - * @property {string|null} [entityType] Parameter entityType - * @property {boolean|null} [isList] Parameter isList - * @property {google.cloud.dialogflow.cx.v3.Form.Parameter.IFillBehavior|null} [fillBehavior] Parameter fillBehavior - * @property {google.protobuf.IValue|null} [defaultValue] Parameter defaultValue - * @property {boolean|null} [redact] Parameter redact - */ + v3.ExportFlowRequest = (function() { - /** - * Constructs a new Parameter. - * @memberof google.cloud.dialogflow.cx.v3.Form - * @classdesc Represents a Parameter. - * @implements IParameter - * @constructor - * @param {google.cloud.dialogflow.cx.v3.Form.IParameter=} [properties] Properties to set - */ - function Parameter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of an ExportFlowRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IExportFlowRequest + * @property {string|null} [name] ExportFlowRequest name + * @property {string|null} [flowUri] ExportFlowRequest flowUri + * @property {boolean|null} [includeReferencedFlows] ExportFlowRequest includeReferencedFlows + */ - /** - * Parameter displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter - * @instance - */ - Parameter.prototype.displayName = ""; + /** + * Constructs a new ExportFlowRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an ExportFlowRequest. + * @implements IExportFlowRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IExportFlowRequest=} [properties] Properties to set + */ + function ExportFlowRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Parameter required. - * @member {boolean} required - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter - * @instance - */ - Parameter.prototype.required = false; + /** + * ExportFlowRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.ExportFlowRequest + * @instance + */ + ExportFlowRequest.prototype.name = ""; - /** - * Parameter entityType. - * @member {string} entityType - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter - * @instance - */ - Parameter.prototype.entityType = ""; + /** + * ExportFlowRequest flowUri. + * @member {string} flowUri + * @memberof google.cloud.dialogflow.cx.v3.ExportFlowRequest + * @instance + */ + ExportFlowRequest.prototype.flowUri = ""; - /** - * Parameter isList. - * @member {boolean} isList - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter - * @instance - */ - Parameter.prototype.isList = false; + /** + * ExportFlowRequest includeReferencedFlows. + * @member {boolean} includeReferencedFlows + * @memberof google.cloud.dialogflow.cx.v3.ExportFlowRequest + * @instance + */ + ExportFlowRequest.prototype.includeReferencedFlows = false; - /** - * Parameter fillBehavior. - * @member {google.cloud.dialogflow.cx.v3.Form.Parameter.IFillBehavior|null|undefined} fillBehavior - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter - * @instance - */ - Parameter.prototype.fillBehavior = null; + /** + * Creates a new ExportFlowRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ExportFlowRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IExportFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ExportFlowRequest} ExportFlowRequest instance + */ + ExportFlowRequest.create = function create(properties) { + return new ExportFlowRequest(properties); + }; - /** - * Parameter defaultValue. - * @member {google.protobuf.IValue|null|undefined} defaultValue - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter - * @instance - */ - Parameter.prototype.defaultValue = null; - - /** - * Parameter redact. - * @member {boolean} redact - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter - * @instance - */ - Parameter.prototype.redact = false; - - /** - * Creates a new Parameter instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter - * @static - * @param {google.cloud.dialogflow.cx.v3.Form.IParameter=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Form.Parameter} Parameter instance - */ - Parameter.create = function create(properties) { - return new Parameter(properties); - }; - - /** - * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Form.Parameter.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter - * @static - * @param {google.cloud.dialogflow.cx.v3.Form.IParameter} message Parameter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Parameter.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.required != null && Object.hasOwnProperty.call(message, "required")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.required); - if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.entityType); - if (message.isList != null && Object.hasOwnProperty.call(message, "isList")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isList); - if (message.fillBehavior != null && Object.hasOwnProperty.call(message, "fillBehavior")) - $root.google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior.encode(message.fillBehavior, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - $root.google.protobuf.Value.encode(message.defaultValue, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.redact != null && Object.hasOwnProperty.call(message, "redact")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.redact); - return writer; - }; - - /** - * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Form.Parameter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter - * @static - * @param {google.cloud.dialogflow.cx.v3.Form.IParameter} message Parameter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Parameter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Parameter message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.Form.Parameter} Parameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Parameter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Form.Parameter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.required = reader.bool(); - break; - } - case 3: { - message.entityType = reader.string(); - break; - } - case 4: { - message.isList = reader.bool(); - break; - } - case 7: { - message.fillBehavior = $root.google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior.decode(reader, reader.uint32()); - break; - } - case 9: { - message.defaultValue = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - } - case 11: { - message.redact = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Parameter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Form.Parameter} Parameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Parameter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Parameter message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Parameter.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.required != null && message.hasOwnProperty("required")) - if (typeof message.required !== "boolean") - return "required: boolean expected"; - if (message.entityType != null && message.hasOwnProperty("entityType")) - if (!$util.isString(message.entityType)) - return "entityType: string expected"; - if (message.isList != null && message.hasOwnProperty("isList")) - if (typeof message.isList !== "boolean") - return "isList: boolean expected"; - if (message.fillBehavior != null && message.hasOwnProperty("fillBehavior")) { - var error = $root.google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior.verify(message.fillBehavior); - if (error) - return "fillBehavior." + error; - } - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) { - var error = $root.google.protobuf.Value.verify(message.defaultValue); - if (error) - return "defaultValue." + error; - } - if (message.redact != null && message.hasOwnProperty("redact")) - if (typeof message.redact !== "boolean") - return "redact: boolean expected"; - return null; - }; - - /** - * Creates a Parameter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Form.Parameter} Parameter - */ - Parameter.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Form.Parameter) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Form.Parameter(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.required != null) - message.required = Boolean(object.required); - if (object.entityType != null) - message.entityType = String(object.entityType); - if (object.isList != null) - message.isList = Boolean(object.isList); - if (object.fillBehavior != null) { - if (typeof object.fillBehavior !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Form.Parameter.fillBehavior: object expected"); - message.fillBehavior = $root.google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior.fromObject(object.fillBehavior); - } - if (object.defaultValue != null) { - if (typeof object.defaultValue !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Form.Parameter.defaultValue: object expected"); - message.defaultValue = $root.google.protobuf.Value.fromObject(object.defaultValue); - } - if (object.redact != null) - message.redact = Boolean(object.redact); - return message; - }; - - /** - * Creates a plain object from a Parameter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter - * @static - * @param {google.cloud.dialogflow.cx.v3.Form.Parameter} message Parameter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Parameter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.required = false; - object.entityType = ""; - object.isList = false; - object.fillBehavior = null; - object.defaultValue = null; - object.redact = false; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.required != null && message.hasOwnProperty("required")) - object.required = message.required; - if (message.entityType != null && message.hasOwnProperty("entityType")) - object.entityType = message.entityType; - if (message.isList != null && message.hasOwnProperty("isList")) - object.isList = message.isList; - if (message.fillBehavior != null && message.hasOwnProperty("fillBehavior")) - object.fillBehavior = $root.google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior.toObject(message.fillBehavior, options); - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = $root.google.protobuf.Value.toObject(message.defaultValue, options); - if (message.redact != null && message.hasOwnProperty("redact")) - object.redact = message.redact; - return object; - }; - - /** - * Converts this Parameter to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter - * @instance - * @returns {Object.} JSON object - */ - Parameter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Parameter - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Parameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Form.Parameter"; - }; - - Parameter.FillBehavior = (function() { - - /** - * Properties of a FillBehavior. - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter - * @interface IFillBehavior - * @property {google.cloud.dialogflow.cx.v3.IFulfillment|null} [initialPromptFulfillment] FillBehavior initialPromptFulfillment - * @property {Array.|null} [repromptEventHandlers] FillBehavior repromptEventHandlers - */ - - /** - * Constructs a new FillBehavior. - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter - * @classdesc Represents a FillBehavior. - * @implements IFillBehavior - * @constructor - * @param {google.cloud.dialogflow.cx.v3.Form.Parameter.IFillBehavior=} [properties] Properties to set - */ - function FillBehavior(properties) { - this.repromptEventHandlers = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FillBehavior initialPromptFulfillment. - * @member {google.cloud.dialogflow.cx.v3.IFulfillment|null|undefined} initialPromptFulfillment - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior - * @instance - */ - FillBehavior.prototype.initialPromptFulfillment = null; - - /** - * FillBehavior repromptEventHandlers. - * @member {Array.} repromptEventHandlers - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior - * @instance - */ - FillBehavior.prototype.repromptEventHandlers = $util.emptyArray; - - /** - * Creates a new FillBehavior instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior - * @static - * @param {google.cloud.dialogflow.cx.v3.Form.Parameter.IFillBehavior=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior} FillBehavior instance - */ - FillBehavior.create = function create(properties) { - return new FillBehavior(properties); - }; - - /** - * Encodes the specified FillBehavior message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior - * @static - * @param {google.cloud.dialogflow.cx.v3.Form.Parameter.IFillBehavior} message FillBehavior message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FillBehavior.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.initialPromptFulfillment != null && Object.hasOwnProperty.call(message, "initialPromptFulfillment")) - $root.google.cloud.dialogflow.cx.v3.Fulfillment.encode(message.initialPromptFulfillment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.repromptEventHandlers != null && message.repromptEventHandlers.length) - for (var i = 0; i < message.repromptEventHandlers.length; ++i) - $root.google.cloud.dialogflow.cx.v3.EventHandler.encode(message.repromptEventHandlers[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FillBehavior message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior - * @static - * @param {google.cloud.dialogflow.cx.v3.Form.Parameter.IFillBehavior} message FillBehavior message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FillBehavior.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FillBehavior message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior} FillBehavior - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FillBehavior.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.initialPromptFulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.decode(reader, reader.uint32()); - break; - } - case 5: { - if (!(message.repromptEventHandlers && message.repromptEventHandlers.length)) - message.repromptEventHandlers = []; - message.repromptEventHandlers.push($root.google.cloud.dialogflow.cx.v3.EventHandler.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FillBehavior message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior} FillBehavior - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FillBehavior.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FillBehavior message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FillBehavior.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.initialPromptFulfillment != null && message.hasOwnProperty("initialPromptFulfillment")) { - var error = $root.google.cloud.dialogflow.cx.v3.Fulfillment.verify(message.initialPromptFulfillment); - if (error) - return "initialPromptFulfillment." + error; - } - if (message.repromptEventHandlers != null && message.hasOwnProperty("repromptEventHandlers")) { - if (!Array.isArray(message.repromptEventHandlers)) - return "repromptEventHandlers: array expected"; - for (var i = 0; i < message.repromptEventHandlers.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.EventHandler.verify(message.repromptEventHandlers[i]); - if (error) - return "repromptEventHandlers." + error; - } - } - return null; - }; - - /** - * Creates a FillBehavior message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior} FillBehavior - */ - FillBehavior.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior(); - if (object.initialPromptFulfillment != null) { - if (typeof object.initialPromptFulfillment !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior.initialPromptFulfillment: object expected"); - message.initialPromptFulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.fromObject(object.initialPromptFulfillment); - } - if (object.repromptEventHandlers) { - if (!Array.isArray(object.repromptEventHandlers)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior.repromptEventHandlers: array expected"); - message.repromptEventHandlers = []; - for (var i = 0; i < object.repromptEventHandlers.length; ++i) { - if (typeof object.repromptEventHandlers[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior.repromptEventHandlers: object expected"); - message.repromptEventHandlers[i] = $root.google.cloud.dialogflow.cx.v3.EventHandler.fromObject(object.repromptEventHandlers[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FillBehavior message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior - * @static - * @param {google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior} message FillBehavior - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FillBehavior.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.repromptEventHandlers = []; - if (options.defaults) - object.initialPromptFulfillment = null; - if (message.initialPromptFulfillment != null && message.hasOwnProperty("initialPromptFulfillment")) - object.initialPromptFulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.toObject(message.initialPromptFulfillment, options); - if (message.repromptEventHandlers && message.repromptEventHandlers.length) { - object.repromptEventHandlers = []; - for (var j = 0; j < message.repromptEventHandlers.length; ++j) - object.repromptEventHandlers[j] = $root.google.cloud.dialogflow.cx.v3.EventHandler.toObject(message.repromptEventHandlers[j], options); - } - return object; - }; - - /** - * Converts this FillBehavior to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior - * @instance - * @returns {Object.} JSON object - */ - FillBehavior.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FillBehavior - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FillBehavior.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior"; - }; - - return FillBehavior; - })(); - - return Parameter; - })(); - - return Form; - })(); - - v3.EventHandler = (function() { - - /** - * Properties of an EventHandler. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IEventHandler - * @property {string|null} [name] EventHandler name - * @property {string|null} [event] EventHandler event - * @property {google.cloud.dialogflow.cx.v3.IFulfillment|null} [triggerFulfillment] EventHandler triggerFulfillment - * @property {string|null} [targetPage] EventHandler targetPage - * @property {string|null} [targetFlow] EventHandler targetFlow - */ - - /** - * Constructs a new EventHandler. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an EventHandler. - * @implements IEventHandler - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IEventHandler=} [properties] Properties to set - */ - function EventHandler(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EventHandler name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.EventHandler - * @instance - */ - EventHandler.prototype.name = ""; - - /** - * EventHandler event. - * @member {string} event - * @memberof google.cloud.dialogflow.cx.v3.EventHandler - * @instance - */ - EventHandler.prototype.event = ""; - - /** - * EventHandler triggerFulfillment. - * @member {google.cloud.dialogflow.cx.v3.IFulfillment|null|undefined} triggerFulfillment - * @memberof google.cloud.dialogflow.cx.v3.EventHandler - * @instance - */ - EventHandler.prototype.triggerFulfillment = null; - - /** - * EventHandler targetPage. - * @member {string|null|undefined} targetPage - * @memberof google.cloud.dialogflow.cx.v3.EventHandler - * @instance - */ - EventHandler.prototype.targetPage = null; - - /** - * EventHandler targetFlow. - * @member {string|null|undefined} targetFlow - * @memberof google.cloud.dialogflow.cx.v3.EventHandler - * @instance - */ - EventHandler.prototype.targetFlow = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * EventHandler target. - * @member {"targetPage"|"targetFlow"|undefined} target - * @memberof google.cloud.dialogflow.cx.v3.EventHandler - * @instance - */ - Object.defineProperty(EventHandler.prototype, "target", { - get: $util.oneOfGetter($oneOfFields = ["targetPage", "targetFlow"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new EventHandler instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.EventHandler - * @static - * @param {google.cloud.dialogflow.cx.v3.IEventHandler=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.EventHandler} EventHandler instance - */ - EventHandler.create = function create(properties) { - return new EventHandler(properties); - }; - - /** - * Encodes the specified EventHandler message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EventHandler.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.EventHandler - * @static - * @param {google.cloud.dialogflow.cx.v3.IEventHandler} message EventHandler message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EventHandler.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.targetPage != null && Object.hasOwnProperty.call(message, "targetPage")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetPage); - if (message.targetFlow != null && Object.hasOwnProperty.call(message, "targetFlow")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.targetFlow); - if (message.event != null && Object.hasOwnProperty.call(message, "event")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.event); - if (message.triggerFulfillment != null && Object.hasOwnProperty.call(message, "triggerFulfillment")) - $root.google.cloud.dialogflow.cx.v3.Fulfillment.encode(message.triggerFulfillment, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - return writer; - }; + /** + * Encodes the specified ExportFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportFlowRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ExportFlowRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IExportFlowRequest} message ExportFlowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportFlowRequest.encode = function encode(message, writer) { + 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.flowUri != null && Object.hasOwnProperty.call(message, "flowUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.flowUri); + if (message.includeReferencedFlows != null && Object.hasOwnProperty.call(message, "includeReferencedFlows")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.includeReferencedFlows); + return writer; + }; /** - * Encodes the specified EventHandler message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EventHandler.verify|verify} messages. + * Encodes the specified ExportFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportFlowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.EventHandler + * @memberof google.cloud.dialogflow.cx.v3.ExportFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IEventHandler} message EventHandler message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IExportFlowRequest} message ExportFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EventHandler.encodeDelimited = function encodeDelimited(message, writer) { + ExportFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EventHandler message from the specified reader or buffer. + * Decodes an ExportFlowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.EventHandler + * @memberof google.cloud.dialogflow.cx.v3.ExportFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.EventHandler} EventHandler + * @returns {google.cloud.dialogflow.cx.v3.ExportFlowRequest} ExportFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EventHandler.decode = function decode(reader, length) { + ExportFlowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.EventHandler(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ExportFlowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 6: { + case 1: { message.name = reader.string(); break; } - case 4: { - message.event = reader.string(); - break; - } - case 5: { - message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.decode(reader, reader.uint32()); - break; - } case 2: { - message.targetPage = reader.string(); + message.flowUri = reader.string(); break; } - case 3: { - message.targetFlow = reader.string(); + case 4: { + message.includeReferencedFlows = reader.bool(); break; } default: @@ -10750,176 +10939,140 @@ }; /** - * Decodes an EventHandler message from the specified reader or buffer, length delimited. + * Decodes an ExportFlowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.EventHandler + * @memberof google.cloud.dialogflow.cx.v3.ExportFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.EventHandler} EventHandler + * @returns {google.cloud.dialogflow.cx.v3.ExportFlowRequest} ExportFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EventHandler.decodeDelimited = function decodeDelimited(reader) { + ExportFlowRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EventHandler message. + * Verifies an ExportFlowRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.EventHandler + * @memberof google.cloud.dialogflow.cx.v3.ExportFlowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EventHandler.verify = function verify(message) { + ExportFlowRequest.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.event != null && message.hasOwnProperty("event")) - if (!$util.isString(message.event)) - return "event: string expected"; - if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) { - var error = $root.google.cloud.dialogflow.cx.v3.Fulfillment.verify(message.triggerFulfillment); - if (error) - return "triggerFulfillment." + error; - } - if (message.targetPage != null && message.hasOwnProperty("targetPage")) { - properties.target = 1; - if (!$util.isString(message.targetPage)) - return "targetPage: string expected"; - } - if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { - if (properties.target === 1) - return "target: multiple values"; - properties.target = 1; - if (!$util.isString(message.targetFlow)) - return "targetFlow: string expected"; - } + if (message.flowUri != null && message.hasOwnProperty("flowUri")) + if (!$util.isString(message.flowUri)) + return "flowUri: string expected"; + if (message.includeReferencedFlows != null && message.hasOwnProperty("includeReferencedFlows")) + if (typeof message.includeReferencedFlows !== "boolean") + return "includeReferencedFlows: boolean expected"; return null; }; /** - * Creates an EventHandler message from a plain object. Also converts values to their respective internal types. + * Creates an ExportFlowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.EventHandler + * @memberof google.cloud.dialogflow.cx.v3.ExportFlowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.EventHandler} EventHandler + * @returns {google.cloud.dialogflow.cx.v3.ExportFlowRequest} ExportFlowRequest */ - EventHandler.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.EventHandler) + ExportFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ExportFlowRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.EventHandler(); + var message = new $root.google.cloud.dialogflow.cx.v3.ExportFlowRequest(); if (object.name != null) message.name = String(object.name); - if (object.event != null) - message.event = String(object.event); - if (object.triggerFulfillment != null) { - if (typeof object.triggerFulfillment !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.EventHandler.triggerFulfillment: object expected"); - message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.fromObject(object.triggerFulfillment); - } - if (object.targetPage != null) - message.targetPage = String(object.targetPage); - if (object.targetFlow != null) - message.targetFlow = String(object.targetFlow); + if (object.flowUri != null) + message.flowUri = String(object.flowUri); + if (object.includeReferencedFlows != null) + message.includeReferencedFlows = Boolean(object.includeReferencedFlows); return message; }; /** - * Creates a plain object from an EventHandler message. Also converts values to other types if specified. + * Creates a plain object from an ExportFlowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.EventHandler + * @memberof google.cloud.dialogflow.cx.v3.ExportFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3.EventHandler} message EventHandler + * @param {google.cloud.dialogflow.cx.v3.ExportFlowRequest} message ExportFlowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EventHandler.toObject = function toObject(message, options) { + ExportFlowRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.event = ""; - object.triggerFulfillment = null; object.name = ""; + object.flowUri = ""; + object.includeReferencedFlows = false; } - if (message.targetPage != null && message.hasOwnProperty("targetPage")) { - object.targetPage = message.targetPage; - if (options.oneofs) - object.target = "targetPage"; - } - if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { - object.targetFlow = message.targetFlow; - if (options.oneofs) - object.target = "targetFlow"; - } - if (message.event != null && message.hasOwnProperty("event")) - object.event = message.event; - if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) - object.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.toObject(message.triggerFulfillment, options); if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.flowUri != null && message.hasOwnProperty("flowUri")) + object.flowUri = message.flowUri; + if (message.includeReferencedFlows != null && message.hasOwnProperty("includeReferencedFlows")) + object.includeReferencedFlows = message.includeReferencedFlows; return object; }; /** - * Converts this EventHandler to JSON. + * Converts this ExportFlowRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.EventHandler + * @memberof google.cloud.dialogflow.cx.v3.ExportFlowRequest * @instance * @returns {Object.} JSON object */ - EventHandler.prototype.toJSON = function toJSON() { + ExportFlowRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EventHandler + * Gets the default type url for ExportFlowRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.EventHandler + * @memberof google.cloud.dialogflow.cx.v3.ExportFlowRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EventHandler.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExportFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.EventHandler"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ExportFlowRequest"; }; - return EventHandler; + return ExportFlowRequest; })(); - v3.TransitionRoute = (function() { + v3.ExportFlowResponse = (function() { /** - * Properties of a TransitionRoute. + * Properties of an ExportFlowResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ITransitionRoute - * @property {string|null} [name] TransitionRoute name - * @property {string|null} [intent] TransitionRoute intent - * @property {string|null} [condition] TransitionRoute condition - * @property {google.cloud.dialogflow.cx.v3.IFulfillment|null} [triggerFulfillment] TransitionRoute triggerFulfillment - * @property {string|null} [targetPage] TransitionRoute targetPage - * @property {string|null} [targetFlow] TransitionRoute targetFlow + * @interface IExportFlowResponse + * @property {string|null} [flowUri] ExportFlowResponse flowUri + * @property {Uint8Array|null} [flowContent] ExportFlowResponse flowContent */ /** - * Constructs a new TransitionRoute. + * Constructs a new ExportFlowResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a TransitionRoute. - * @implements ITransitionRoute + * @classdesc Represents an ExportFlowResponse. + * @implements IExportFlowResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.ITransitionRoute=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IExportFlowResponse=} [properties] Properties to set */ - function TransitionRoute(properties) { + function ExportFlowResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10927,159 +11080,103 @@ } /** - * TransitionRoute name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute - * @instance - */ - TransitionRoute.prototype.name = ""; - - /** - * TransitionRoute intent. - * @member {string} intent - * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute - * @instance - */ - TransitionRoute.prototype.intent = ""; - - /** - * TransitionRoute condition. - * @member {string} condition - * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute - * @instance - */ - TransitionRoute.prototype.condition = ""; - - /** - * TransitionRoute triggerFulfillment. - * @member {google.cloud.dialogflow.cx.v3.IFulfillment|null|undefined} triggerFulfillment - * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute - * @instance - */ - TransitionRoute.prototype.triggerFulfillment = null; - - /** - * TransitionRoute targetPage. - * @member {string|null|undefined} targetPage - * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute + * ExportFlowResponse flowUri. + * @member {string|null|undefined} flowUri + * @memberof google.cloud.dialogflow.cx.v3.ExportFlowResponse * @instance */ - TransitionRoute.prototype.targetPage = null; + ExportFlowResponse.prototype.flowUri = null; /** - * TransitionRoute targetFlow. - * @member {string|null|undefined} targetFlow - * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute + * ExportFlowResponse flowContent. + * @member {Uint8Array|null|undefined} flowContent + * @memberof google.cloud.dialogflow.cx.v3.ExportFlowResponse * @instance */ - TransitionRoute.prototype.targetFlow = null; + ExportFlowResponse.prototype.flowContent = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * TransitionRoute target. - * @member {"targetPage"|"targetFlow"|undefined} target - * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute + * ExportFlowResponse flow. + * @member {"flowUri"|"flowContent"|undefined} flow + * @memberof google.cloud.dialogflow.cx.v3.ExportFlowResponse * @instance */ - Object.defineProperty(TransitionRoute.prototype, "target", { - get: $util.oneOfGetter($oneOfFields = ["targetPage", "targetFlow"]), + Object.defineProperty(ExportFlowResponse.prototype, "flow", { + get: $util.oneOfGetter($oneOfFields = ["flowUri", "flowContent"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new TransitionRoute instance using the specified properties. + * Creates a new ExportFlowResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3.ExportFlowResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ITransitionRoute=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.TransitionRoute} TransitionRoute instance + * @param {google.cloud.dialogflow.cx.v3.IExportFlowResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ExportFlowResponse} ExportFlowResponse instance */ - TransitionRoute.create = function create(properties) { - return new TransitionRoute(properties); + ExportFlowResponse.create = function create(properties) { + return new ExportFlowResponse(properties); }; /** - * Encodes the specified TransitionRoute message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRoute.verify|verify} messages. + * Encodes the specified ExportFlowResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportFlowResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3.ExportFlowResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ITransitionRoute} message TransitionRoute message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IExportFlowResponse} message ExportFlowResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransitionRoute.encode = function encode(message, writer) { + ExportFlowResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.intent); - if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.condition); - if (message.triggerFulfillment != null && Object.hasOwnProperty.call(message, "triggerFulfillment")) - $root.google.cloud.dialogflow.cx.v3.Fulfillment.encode(message.triggerFulfillment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.targetPage != null && Object.hasOwnProperty.call(message, "targetPage")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.targetPage); - if (message.targetFlow != null && Object.hasOwnProperty.call(message, "targetFlow")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.targetFlow); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + if (message.flowUri != null && Object.hasOwnProperty.call(message, "flowUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.flowUri); + if (message.flowContent != null && Object.hasOwnProperty.call(message, "flowContent")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.flowContent); return writer; }; /** - * Encodes the specified TransitionRoute message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRoute.verify|verify} messages. + * Encodes the specified ExportFlowResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportFlowResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3.ExportFlowResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ITransitionRoute} message TransitionRoute message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IExportFlowResponse} message ExportFlowResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransitionRoute.encodeDelimited = function encodeDelimited(message, writer) { + ExportFlowResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TransitionRoute message from the specified reader or buffer. + * Decodes an ExportFlowResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3.ExportFlowResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.TransitionRoute} TransitionRoute + * @returns {google.cloud.dialogflow.cx.v3.ExportFlowResponse} ExportFlowResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TransitionRoute.decode = function decode(reader, length) { + ExportFlowResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.TransitionRoute(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ExportFlowResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 6: { - message.name = reader.string(); - break; - } case 1: { - message.intent = reader.string(); + message.flowUri = reader.string(); break; } case 2: { - message.condition = reader.string(); - break; - } - case 3: { - message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.decode(reader, reader.uint32()); - break; - } - case 4: { - message.targetPage = reader.string(); - break; - } - case 5: { - message.targetFlow = reader.string(); + message.flowContent = reader.bytes(); break; } default: @@ -11091,454 +11188,352 @@ }; /** - * Decodes a TransitionRoute message from the specified reader or buffer, length delimited. + * Decodes an ExportFlowResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3.ExportFlowResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.TransitionRoute} TransitionRoute + * @returns {google.cloud.dialogflow.cx.v3.ExportFlowResponse} ExportFlowResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TransitionRoute.decodeDelimited = function decodeDelimited(reader) { + ExportFlowResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TransitionRoute message. + * Verifies an ExportFlowResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3.ExportFlowResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TransitionRoute.verify = function verify(message) { + ExportFlowResponse.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.intent != null && message.hasOwnProperty("intent")) - if (!$util.isString(message.intent)) - return "intent: string expected"; - if (message.condition != null && message.hasOwnProperty("condition")) - if (!$util.isString(message.condition)) - return "condition: string expected"; - if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) { - var error = $root.google.cloud.dialogflow.cx.v3.Fulfillment.verify(message.triggerFulfillment); - if (error) - return "triggerFulfillment." + error; - } - if (message.targetPage != null && message.hasOwnProperty("targetPage")) { - properties.target = 1; - if (!$util.isString(message.targetPage)) - return "targetPage: string expected"; + if (message.flowUri != null && message.hasOwnProperty("flowUri")) { + properties.flow = 1; + if (!$util.isString(message.flowUri)) + return "flowUri: string expected"; } - if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { - if (properties.target === 1) - return "target: multiple values"; - properties.target = 1; - if (!$util.isString(message.targetFlow)) - return "targetFlow: string expected"; + if (message.flowContent != null && message.hasOwnProperty("flowContent")) { + if (properties.flow === 1) + return "flow: multiple values"; + properties.flow = 1; + if (!(message.flowContent && typeof message.flowContent.length === "number" || $util.isString(message.flowContent))) + return "flowContent: buffer expected"; } return null; }; /** - * Creates a TransitionRoute message from a plain object. Also converts values to their respective internal types. + * Creates an ExportFlowResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3.ExportFlowResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.TransitionRoute} TransitionRoute + * @returns {google.cloud.dialogflow.cx.v3.ExportFlowResponse} ExportFlowResponse */ - TransitionRoute.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.TransitionRoute) + ExportFlowResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ExportFlowResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.TransitionRoute(); - if (object.name != null) - message.name = String(object.name); - if (object.intent != null) - message.intent = String(object.intent); - if (object.condition != null) - message.condition = String(object.condition); - if (object.triggerFulfillment != null) { - if (typeof object.triggerFulfillment !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionRoute.triggerFulfillment: object expected"); - message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.fromObject(object.triggerFulfillment); - } - if (object.targetPage != null) - message.targetPage = String(object.targetPage); - if (object.targetFlow != null) - message.targetFlow = String(object.targetFlow); + var message = new $root.google.cloud.dialogflow.cx.v3.ExportFlowResponse(); + if (object.flowUri != null) + message.flowUri = String(object.flowUri); + if (object.flowContent != null) + if (typeof object.flowContent === "string") + $util.base64.decode(object.flowContent, message.flowContent = $util.newBuffer($util.base64.length(object.flowContent)), 0); + else if (object.flowContent.length >= 0) + message.flowContent = object.flowContent; return message; }; /** - * Creates a plain object from a TransitionRoute message. Also converts values to other types if specified. + * Creates a plain object from an ExportFlowResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3.ExportFlowResponse * @static - * @param {google.cloud.dialogflow.cx.v3.TransitionRoute} message TransitionRoute + * @param {google.cloud.dialogflow.cx.v3.ExportFlowResponse} message ExportFlowResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TransitionRoute.toObject = function toObject(message, options) { + ExportFlowResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.intent = ""; - object.condition = ""; - object.triggerFulfillment = null; - object.name = ""; - } - if (message.intent != null && message.hasOwnProperty("intent")) - object.intent = message.intent; - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = message.condition; - if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) - object.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.toObject(message.triggerFulfillment, options); - if (message.targetPage != null && message.hasOwnProperty("targetPage")) { - object.targetPage = message.targetPage; + if (message.flowUri != null && message.hasOwnProperty("flowUri")) { + object.flowUri = message.flowUri; if (options.oneofs) - object.target = "targetPage"; + object.flow = "flowUri"; } - if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { - object.targetFlow = message.targetFlow; + if (message.flowContent != null && message.hasOwnProperty("flowContent")) { + object.flowContent = options.bytes === String ? $util.base64.encode(message.flowContent, 0, message.flowContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.flowContent) : message.flowContent; if (options.oneofs) - object.target = "targetFlow"; + object.flow = "flowContent"; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; return object; }; /** - * Converts this TransitionRoute to JSON. + * Converts this ExportFlowResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3.ExportFlowResponse * @instance * @returns {Object.} JSON object */ - TransitionRoute.prototype.toJSON = function toJSON() { + ExportFlowResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TransitionRoute + * Gets the default type url for ExportFlowResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3.ExportFlowResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TransitionRoute.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExportFlowResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TransitionRoute"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ExportFlowResponse"; }; - return TransitionRoute; + return ExportFlowResponse; })(); - v3.ListPagesRequest = (function() { + v3.Pages = (function() { /** - * Properties of a ListPagesRequest. + * Constructs a new Pages service. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListPagesRequest - * @property {string|null} [parent] ListPagesRequest parent - * @property {string|null} [languageCode] ListPagesRequest languageCode - * @property {number|null} [pageSize] ListPagesRequest pageSize - * @property {string|null} [pageToken] ListPagesRequest pageToken + * @classdesc Represents a Pages + * @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 Pages(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Pages.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Pages; /** - * Constructs a new ListPagesRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListPagesRequest. - * @implements IListPagesRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListPagesRequest=} [properties] Properties to set + * Creates new Pages service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Pages + * @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 {Pages} RPC service. Useful where requests and/or responses are streamed. */ - function ListPagesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Pages.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * ListPagesRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ListPagesRequest - * @instance + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Pages|listPages}. + * @memberof google.cloud.dialogflow.cx.v3.Pages + * @typedef ListPagesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListPagesResponse} [response] ListPagesResponse */ - ListPagesRequest.prototype.parent = ""; /** - * ListPagesRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.ListPagesRequest + * Calls ListPages. + * @function listPages + * @memberof google.cloud.dialogflow.cx.v3.Pages * @instance + * @param {google.cloud.dialogflow.cx.v3.IListPagesRequest} request ListPagesRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Pages.ListPagesCallback} callback Node-style callback called with the error, if any, and ListPagesResponse + * @returns {undefined} + * @variation 1 */ - ListPagesRequest.prototype.languageCode = ""; + Object.defineProperty(Pages.prototype.listPages = function listPages(request, callback) { + return this.rpcCall(listPages, $root.google.cloud.dialogflow.cx.v3.ListPagesRequest, $root.google.cloud.dialogflow.cx.v3.ListPagesResponse, request, callback); + }, "name", { value: "ListPages" }); /** - * ListPagesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3.ListPagesRequest + * Calls ListPages. + * @function listPages + * @memberof google.cloud.dialogflow.cx.v3.Pages * @instance + * @param {google.cloud.dialogflow.cx.v3.IListPagesRequest} request ListPagesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListPagesRequest.prototype.pageSize = 0; /** - * ListPagesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3.ListPagesRequest + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Pages|getPage}. + * @memberof google.cloud.dialogflow.cx.v3.Pages + * @typedef GetPageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Page} [response] Page + */ + + /** + * Calls GetPage. + * @function getPage + * @memberof google.cloud.dialogflow.cx.v3.Pages * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetPageRequest} request GetPageRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Pages.GetPageCallback} callback Node-style callback called with the error, if any, and Page + * @returns {undefined} + * @variation 1 */ - ListPagesRequest.prototype.pageToken = ""; + Object.defineProperty(Pages.prototype.getPage = function getPage(request, callback) { + return this.rpcCall(getPage, $root.google.cloud.dialogflow.cx.v3.GetPageRequest, $root.google.cloud.dialogflow.cx.v3.Page, request, callback); + }, "name", { value: "GetPage" }); /** - * Creates a new ListPagesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListPagesRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IListPagesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListPagesRequest} ListPagesRequest instance + * Calls GetPage. + * @function getPage + * @memberof google.cloud.dialogflow.cx.v3.Pages + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetPageRequest} request GetPageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListPagesRequest.create = function create(properties) { - return new ListPagesRequest(properties); - }; /** - * Encodes the specified ListPagesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPagesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListPagesRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IListPagesRequest} message ListPagesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Pages|createPage}. + * @memberof google.cloud.dialogflow.cx.v3.Pages + * @typedef CreatePageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Page} [response] Page */ - ListPagesRequest.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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - 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); - return writer; - }; /** - * Encodes the specified ListPagesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPagesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListPagesRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IListPagesRequest} message ListPagesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls CreatePage. + * @function createPage + * @memberof google.cloud.dialogflow.cx.v3.Pages + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreatePageRequest} request CreatePageRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Pages.CreatePageCallback} callback Node-style callback called with the error, if any, and Page + * @returns {undefined} + * @variation 1 */ - ListPagesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(Pages.prototype.createPage = function createPage(request, callback) { + return this.rpcCall(createPage, $root.google.cloud.dialogflow.cx.v3.CreatePageRequest, $root.google.cloud.dialogflow.cx.v3.Page, request, callback); + }, "name", { value: "CreatePage" }); /** - * Decodes a ListPagesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListPagesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ListPagesRequest} ListPagesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreatePage. + * @function createPage + * @memberof google.cloud.dialogflow.cx.v3.Pages + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreatePageRequest} request CreatePageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListPagesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListPagesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.languageCode = reader.string(); - break; - } - case 3: { - message.pageSize = reader.int32(); - break; - } - case 4: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a ListPagesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListPagesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListPagesRequest} ListPagesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Pages|updatePage}. + * @memberof google.cloud.dialogflow.cx.v3.Pages + * @typedef UpdatePageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Page} [response] Page */ - ListPagesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a ListPagesRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListPagesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls UpdatePage. + * @function updatePage + * @memberof google.cloud.dialogflow.cx.v3.Pages + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdatePageRequest} request UpdatePageRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Pages.UpdatePageCallback} callback Node-style callback called with the error, if any, and Page + * @returns {undefined} + * @variation 1 */ - ListPagesRequest.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.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: 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; - }; + Object.defineProperty(Pages.prototype.updatePage = function updatePage(request, callback) { + return this.rpcCall(updatePage, $root.google.cloud.dialogflow.cx.v3.UpdatePageRequest, $root.google.cloud.dialogflow.cx.v3.Page, request, callback); + }, "name", { value: "UpdatePage" }); /** - * Creates a ListPagesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListPagesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListPagesRequest} ListPagesRequest + * Calls UpdatePage. + * @function updatePage + * @memberof google.cloud.dialogflow.cx.v3.Pages + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdatePageRequest} request UpdatePageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListPagesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListPagesRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListPagesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - 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 ListPagesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListPagesRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.ListPagesRequest} message ListPagesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Pages|deletePage}. + * @memberof google.cloud.dialogflow.cx.v3.Pages + * @typedef DeletePageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - ListPagesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.languageCode = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; /** - * Converts this ListPagesRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListPagesRequest + * Calls DeletePage. + * @function deletePage + * @memberof google.cloud.dialogflow.cx.v3.Pages * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dialogflow.cx.v3.IDeletePageRequest} request DeletePageRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Pages.DeletePageCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - ListPagesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(Pages.prototype.deletePage = function deletePage(request, callback) { + return this.rpcCall(deletePage, $root.google.cloud.dialogflow.cx.v3.DeletePageRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeletePage" }); /** - * Gets the default type url for ListPagesRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListPagesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls DeletePage. + * @function deletePage + * @memberof google.cloud.dialogflow.cx.v3.Pages + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeletePageRequest} request DeletePageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListPagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListPagesRequest"; - }; - return ListPagesRequest; + return Pages; })(); - v3.ListPagesResponse = (function() { + v3.Page = (function() { /** - * Properties of a ListPagesResponse. + * Properties of a Page. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListPagesResponse - * @property {Array.|null} [pages] ListPagesResponse pages - * @property {string|null} [nextPageToken] ListPagesResponse nextPageToken + * @interface IPage + * @property {string|null} [name] Page name + * @property {string|null} [displayName] Page displayName + * @property {google.cloud.dialogflow.cx.v3.IFulfillment|null} [entryFulfillment] Page entryFulfillment + * @property {google.cloud.dialogflow.cx.v3.IForm|null} [form] Page form + * @property {Array.|null} [transitionRouteGroups] Page transitionRouteGroups + * @property {Array.|null} [transitionRoutes] Page transitionRoutes + * @property {Array.|null} [eventHandlers] Page eventHandlers */ /** - * Constructs a new ListPagesResponse. + * Constructs a new Page. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListPagesResponse. - * @implements IListPagesResponse + * @classdesc Represents a Page. + * @implements IPage * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListPagesResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IPage=} [properties] Properties to set */ - function ListPagesResponse(properties) { - this.pages = []; + function Page(properties) { + this.transitionRouteGroups = []; + this.transitionRoutes = []; + this.eventHandlers = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11546,92 +11541,168 @@ } /** - * ListPagesResponse pages. - * @member {Array.} pages - * @memberof google.cloud.dialogflow.cx.v3.ListPagesResponse + * Page name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.Page * @instance */ - ListPagesResponse.prototype.pages = $util.emptyArray; + Page.prototype.name = ""; /** - * ListPagesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3.ListPagesResponse + * Page displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.Page * @instance */ - ListPagesResponse.prototype.nextPageToken = ""; + Page.prototype.displayName = ""; /** - * Creates a new ListPagesResponse instance using the specified properties. + * Page entryFulfillment. + * @member {google.cloud.dialogflow.cx.v3.IFulfillment|null|undefined} entryFulfillment + * @memberof google.cloud.dialogflow.cx.v3.Page + * @instance + */ + Page.prototype.entryFulfillment = null; + + /** + * Page form. + * @member {google.cloud.dialogflow.cx.v3.IForm|null|undefined} form + * @memberof google.cloud.dialogflow.cx.v3.Page + * @instance + */ + Page.prototype.form = null; + + /** + * Page transitionRouteGroups. + * @member {Array.} transitionRouteGroups + * @memberof google.cloud.dialogflow.cx.v3.Page + * @instance + */ + Page.prototype.transitionRouteGroups = $util.emptyArray; + + /** + * Page transitionRoutes. + * @member {Array.} transitionRoutes + * @memberof google.cloud.dialogflow.cx.v3.Page + * @instance + */ + Page.prototype.transitionRoutes = $util.emptyArray; + + /** + * Page eventHandlers. + * @member {Array.} eventHandlers + * @memberof google.cloud.dialogflow.cx.v3.Page + * @instance + */ + Page.prototype.eventHandlers = $util.emptyArray; + + /** + * Creates a new Page instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListPagesResponse + * @memberof google.cloud.dialogflow.cx.v3.Page * @static - * @param {google.cloud.dialogflow.cx.v3.IListPagesResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListPagesResponse} ListPagesResponse instance + * @param {google.cloud.dialogflow.cx.v3.IPage=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Page} Page instance */ - ListPagesResponse.create = function create(properties) { - return new ListPagesResponse(properties); + Page.create = function create(properties) { + return new Page(properties); }; /** - * Encodes the specified ListPagesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPagesResponse.verify|verify} messages. + * Encodes the specified Page message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Page.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListPagesResponse + * @memberof google.cloud.dialogflow.cx.v3.Page * @static - * @param {google.cloud.dialogflow.cx.v3.IListPagesResponse} message ListPagesResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IPage} message Page message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPagesResponse.encode = function encode(message, writer) { + Page.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.pages != null && message.pages.length) - for (var i = 0; i < message.pages.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Page.encode(message.pages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.form != null && Object.hasOwnProperty.call(message, "form")) + $root.google.cloud.dialogflow.cx.v3.Form.encode(message.form, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.entryFulfillment != null && Object.hasOwnProperty.call(message, "entryFulfillment")) + $root.google.cloud.dialogflow.cx.v3.Fulfillment.encode(message.entryFulfillment, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.transitionRoutes != null && message.transitionRoutes.length) + for (var i = 0; i < message.transitionRoutes.length; ++i) + $root.google.cloud.dialogflow.cx.v3.TransitionRoute.encode(message.transitionRoutes[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.eventHandlers != null && message.eventHandlers.length) + for (var i = 0; i < message.eventHandlers.length; ++i) + $root.google.cloud.dialogflow.cx.v3.EventHandler.encode(message.eventHandlers[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.transitionRouteGroups != null && message.transitionRouteGroups.length) + for (var i = 0; i < message.transitionRouteGroups.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.transitionRouteGroups[i]); return writer; }; /** - * Encodes the specified ListPagesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPagesResponse.verify|verify} messages. + * Encodes the specified Page message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Page.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListPagesResponse + * @memberof google.cloud.dialogflow.cx.v3.Page * @static - * @param {google.cloud.dialogflow.cx.v3.IListPagesResponse} message ListPagesResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IPage} message Page message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPagesResponse.encodeDelimited = function encodeDelimited(message, writer) { + Page.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListPagesResponse message from the specified reader or buffer. + * Decodes a Page message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListPagesResponse + * @memberof google.cloud.dialogflow.cx.v3.Page * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ListPagesResponse} ListPagesResponse + * @returns {google.cloud.dialogflow.cx.v3.Page} Page * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPagesResponse.decode = function decode(reader, length) { + Page.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListPagesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Page(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.pages && message.pages.length)) - message.pages = []; - message.pages.push($root.google.cloud.dialogflow.cx.v3.Page.decode(reader, reader.uint32())); + message.name = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.displayName = reader.string(); + break; + } + case 7: { + message.entryFulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.decode(reader, reader.uint32()); + break; + } + case 4: { + message.form = $root.google.cloud.dialogflow.cx.v3.Form.decode(reader, reader.uint32()); + break; + } + case 11: { + if (!(message.transitionRouteGroups && message.transitionRouteGroups.length)) + message.transitionRouteGroups = []; + message.transitionRouteGroups.push(reader.string()); + break; + } + case 9: { + if (!(message.transitionRoutes && message.transitionRoutes.length)) + message.transitionRoutes = []; + message.transitionRoutes.push($root.google.cloud.dialogflow.cx.v3.TransitionRoute.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.eventHandlers && message.eventHandlers.length)) + message.eventHandlers = []; + message.eventHandlers.push($root.google.cloud.dialogflow.cx.v3.EventHandler.decode(reader, reader.uint32())); break; } default: @@ -11643,149 +11714,230 @@ }; /** - * Decodes a ListPagesResponse message from the specified reader or buffer, length delimited. + * Decodes a Page message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListPagesResponse + * @memberof google.cloud.dialogflow.cx.v3.Page * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListPagesResponse} ListPagesResponse + * @returns {google.cloud.dialogflow.cx.v3.Page} Page * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPagesResponse.decodeDelimited = function decodeDelimited(reader) { + Page.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListPagesResponse message. + * Verifies a Page message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListPagesResponse + * @memberof google.cloud.dialogflow.cx.v3.Page * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListPagesResponse.verify = function verify(message) { + Page.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.pages != null && message.hasOwnProperty("pages")) { - if (!Array.isArray(message.pages)) - return "pages: array expected"; - for (var i = 0; i < message.pages.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Page.verify(message.pages[i]); + 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.entryFulfillment != null && message.hasOwnProperty("entryFulfillment")) { + var error = $root.google.cloud.dialogflow.cx.v3.Fulfillment.verify(message.entryFulfillment); + if (error) + return "entryFulfillment." + error; + } + if (message.form != null && message.hasOwnProperty("form")) { + var error = $root.google.cloud.dialogflow.cx.v3.Form.verify(message.form); + if (error) + return "form." + error; + } + if (message.transitionRouteGroups != null && message.hasOwnProperty("transitionRouteGroups")) { + if (!Array.isArray(message.transitionRouteGroups)) + return "transitionRouteGroups: array expected"; + for (var i = 0; i < message.transitionRouteGroups.length; ++i) + if (!$util.isString(message.transitionRouteGroups[i])) + return "transitionRouteGroups: string[] expected"; + } + if (message.transitionRoutes != null && message.hasOwnProperty("transitionRoutes")) { + if (!Array.isArray(message.transitionRoutes)) + return "transitionRoutes: array expected"; + for (var i = 0; i < message.transitionRoutes.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.verify(message.transitionRoutes[i]); if (error) - return "pages." + error; + return "transitionRoutes." + error; + } + } + if (message.eventHandlers != null && message.hasOwnProperty("eventHandlers")) { + if (!Array.isArray(message.eventHandlers)) + return "eventHandlers: array expected"; + for (var i = 0; i < message.eventHandlers.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.EventHandler.verify(message.eventHandlers[i]); + if (error) + return "eventHandlers." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListPagesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Page message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListPagesResponse + * @memberof google.cloud.dialogflow.cx.v3.Page * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListPagesResponse} ListPagesResponse + * @returns {google.cloud.dialogflow.cx.v3.Page} Page */ - ListPagesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListPagesResponse) + Page.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Page) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListPagesResponse(); - if (object.pages) { - if (!Array.isArray(object.pages)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ListPagesResponse.pages: array expected"); - message.pages = []; - for (var i = 0; i < object.pages.length; ++i) { - if (typeof object.pages[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ListPagesResponse.pages: object expected"); - message.pages[i] = $root.google.cloud.dialogflow.cx.v3.Page.fromObject(object.pages[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.Page(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.entryFulfillment != null) { + if (typeof object.entryFulfillment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Page.entryFulfillment: object expected"); + message.entryFulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.fromObject(object.entryFulfillment); + } + if (object.form != null) { + if (typeof object.form !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Page.form: object expected"); + message.form = $root.google.cloud.dialogflow.cx.v3.Form.fromObject(object.form); + } + if (object.transitionRouteGroups) { + if (!Array.isArray(object.transitionRouteGroups)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Page.transitionRouteGroups: array expected"); + message.transitionRouteGroups = []; + for (var i = 0; i < object.transitionRouteGroups.length; ++i) + message.transitionRouteGroups[i] = String(object.transitionRouteGroups[i]); + } + if (object.transitionRoutes) { + if (!Array.isArray(object.transitionRoutes)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Page.transitionRoutes: array expected"); + message.transitionRoutes = []; + for (var i = 0; i < object.transitionRoutes.length; ++i) { + if (typeof object.transitionRoutes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Page.transitionRoutes: object expected"); + message.transitionRoutes[i] = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.fromObject(object.transitionRoutes[i]); + } + } + if (object.eventHandlers) { + if (!Array.isArray(object.eventHandlers)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Page.eventHandlers: array expected"); + message.eventHandlers = []; + for (var i = 0; i < object.eventHandlers.length; ++i) { + if (typeof object.eventHandlers[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Page.eventHandlers: object expected"); + message.eventHandlers[i] = $root.google.cloud.dialogflow.cx.v3.EventHandler.fromObject(object.eventHandlers[i]); } } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListPagesResponse message. Also converts values to other types if specified. + * Creates a plain object from a Page message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListPagesResponse + * @memberof google.cloud.dialogflow.cx.v3.Page * @static - * @param {google.cloud.dialogflow.cx.v3.ListPagesResponse} message ListPagesResponse + * @param {google.cloud.dialogflow.cx.v3.Page} message Page * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPagesResponse.toObject = function toObject(message, options) { + Page.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.pages = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.pages && message.pages.length) { - object.pages = []; - for (var j = 0; j < message.pages.length; ++j) - object.pages[j] = $root.google.cloud.dialogflow.cx.v3.Page.toObject(message.pages[j], options); + if (options.arrays || options.defaults) { + object.transitionRoutes = []; + object.eventHandlers = []; + object.transitionRouteGroups = []; + } + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.form = null; + object.entryFulfillment = 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.form != null && message.hasOwnProperty("form")) + object.form = $root.google.cloud.dialogflow.cx.v3.Form.toObject(message.form, options); + if (message.entryFulfillment != null && message.hasOwnProperty("entryFulfillment")) + object.entryFulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.toObject(message.entryFulfillment, options); + if (message.transitionRoutes && message.transitionRoutes.length) { + object.transitionRoutes = []; + for (var j = 0; j < message.transitionRoutes.length; ++j) + object.transitionRoutes[j] = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.toObject(message.transitionRoutes[j], options); + } + if (message.eventHandlers && message.eventHandlers.length) { + object.eventHandlers = []; + for (var j = 0; j < message.eventHandlers.length; ++j) + object.eventHandlers[j] = $root.google.cloud.dialogflow.cx.v3.EventHandler.toObject(message.eventHandlers[j], options); + } + if (message.transitionRouteGroups && message.transitionRouteGroups.length) { + object.transitionRouteGroups = []; + for (var j = 0; j < message.transitionRouteGroups.length; ++j) + object.transitionRouteGroups[j] = message.transitionRouteGroups[j]; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListPagesResponse to JSON. + * Converts this Page to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListPagesResponse + * @memberof google.cloud.dialogflow.cx.v3.Page * @instance * @returns {Object.} JSON object */ - ListPagesResponse.prototype.toJSON = function toJSON() { + Page.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListPagesResponse + * Gets the default type url for Page * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListPagesResponse + * @memberof google.cloud.dialogflow.cx.v3.Page * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListPagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Page.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListPagesResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Page"; }; - return ListPagesResponse; + return Page; })(); - v3.GetPageRequest = (function() { + v3.Form = (function() { /** - * Properties of a GetPageRequest. + * Properties of a Form. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IGetPageRequest - * @property {string|null} [name] GetPageRequest name - * @property {string|null} [languageCode] GetPageRequest languageCode + * @interface IForm + * @property {Array.|null} [parameters] Form parameters */ /** - * Constructs a new GetPageRequest. + * Constructs a new Form. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a GetPageRequest. - * @implements IGetPageRequest + * @classdesc Represents a Form. + * @implements IForm * @constructor - * @param {google.cloud.dialogflow.cx.v3.IGetPageRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IForm=} [properties] Properties to set */ - function GetPageRequest(properties) { + function Form(properties) { + this.parameters = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11793,89 +11945,78 @@ } /** - * GetPageRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.GetPageRequest - * @instance - */ - GetPageRequest.prototype.name = ""; - - /** - * GetPageRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.GetPageRequest + * Form parameters. + * @member {Array.} parameters + * @memberof google.cloud.dialogflow.cx.v3.Form * @instance */ - GetPageRequest.prototype.languageCode = ""; + Form.prototype.parameters = $util.emptyArray; /** - * Creates a new GetPageRequest instance using the specified properties. + * Creates a new Form instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3.Form * @static - * @param {google.cloud.dialogflow.cx.v3.IGetPageRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GetPageRequest} GetPageRequest instance + * @param {google.cloud.dialogflow.cx.v3.IForm=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Form} Form instance */ - GetPageRequest.create = function create(properties) { - return new GetPageRequest(properties); + Form.create = function create(properties) { + return new Form(properties); }; /** - * Encodes the specified GetPageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetPageRequest.verify|verify} messages. + * Encodes the specified Form message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Form.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3.Form * @static - * @param {google.cloud.dialogflow.cx.v3.IGetPageRequest} message GetPageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IForm} message Form message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPageRequest.encode = function encode(message, writer) { + Form.encode = function encode(message, writer) { 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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.parameters != null && message.parameters.length) + for (var i = 0; i < message.parameters.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Form.Parameter.encode(message.parameters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetPageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetPageRequest.verify|verify} messages. + * Encodes the specified Form message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Form.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3.Form * @static - * @param {google.cloud.dialogflow.cx.v3.IGetPageRequest} message GetPageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IForm} message Form message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPageRequest.encodeDelimited = function encodeDelimited(message, writer) { + Form.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetPageRequest message from the specified reader or buffer. + * Decodes a Form message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3.Form * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.GetPageRequest} GetPageRequest + * @returns {google.cloud.dialogflow.cx.v3.Form} Form * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPageRequest.decode = function decode(reader, length) { + Form.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetPageRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Form(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.languageCode = reader.string(); + if (!(message.parameters && message.parameters.length)) + message.parameters = []; + message.parameters.push($root.google.cloud.dialogflow.cx.v3.Form.Parameter.decode(reader, reader.uint32())); break; } default: @@ -11887,237 +12028,894 @@ }; /** - * Decodes a GetPageRequest message from the specified reader or buffer, length delimited. + * Decodes a Form message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3.Form * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.GetPageRequest} GetPageRequest + * @returns {google.cloud.dialogflow.cx.v3.Form} Form * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPageRequest.decodeDelimited = function decodeDelimited(reader) { + Form.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetPageRequest message. + * Verifies a Form message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3.Form * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetPageRequest.verify = function verify(message) { + Form.verify = function verify(message) { if (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.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; + if (message.parameters != null && message.hasOwnProperty("parameters")) { + if (!Array.isArray(message.parameters)) + return "parameters: array expected"; + for (var i = 0; i < message.parameters.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Form.Parameter.verify(message.parameters[i]); + if (error) + return "parameters." + error; + } + } return null; }; /** - * Creates a GetPageRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Form message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3.Form * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GetPageRequest} GetPageRequest + * @returns {google.cloud.dialogflow.cx.v3.Form} Form */ - GetPageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetPageRequest) + Form.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Form) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.GetPageRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + var message = new $root.google.cloud.dialogflow.cx.v3.Form(); + if (object.parameters) { + if (!Array.isArray(object.parameters)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Form.parameters: array expected"); + message.parameters = []; + for (var i = 0; i < object.parameters.length; ++i) { + if (typeof object.parameters[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Form.parameters: object expected"); + message.parameters[i] = $root.google.cloud.dialogflow.cx.v3.Form.Parameter.fromObject(object.parameters[i]); + } + } return message; }; /** - * Creates a plain object from a GetPageRequest message. Also converts values to other types if specified. + * Creates a plain object from a Form message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3.Form * @static - * @param {google.cloud.dialogflow.cx.v3.GetPageRequest} message GetPageRequest + * @param {google.cloud.dialogflow.cx.v3.Form} message Form * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetPageRequest.toObject = function toObject(message, options) { + Form.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.languageCode = ""; + if (options.arrays || options.defaults) + object.parameters = []; + if (message.parameters && message.parameters.length) { + object.parameters = []; + for (var j = 0; j < message.parameters.length; ++j) + object.parameters[j] = $root.google.cloud.dialogflow.cx.v3.Form.Parameter.toObject(message.parameters[j], options); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; return object; }; /** - * Converts this GetPageRequest to JSON. + * Converts this Form to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3.Form * @instance * @returns {Object.} JSON object */ - GetPageRequest.prototype.toJSON = function toJSON() { + Form.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetPageRequest + * Gets the default type url for Form * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3.Form * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetPageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Form.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetPageRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Form"; }; - return GetPageRequest; - })(); - - v3.CreatePageRequest = (function() { + Form.Parameter = (function() { - /** - * Properties of a CreatePageRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface ICreatePageRequest - * @property {string|null} [parent] CreatePageRequest parent - * @property {google.cloud.dialogflow.cx.v3.IPage|null} [page] CreatePageRequest page - * @property {string|null} [languageCode] CreatePageRequest languageCode - */ + /** + * Properties of a Parameter. + * @memberof google.cloud.dialogflow.cx.v3.Form + * @interface IParameter + * @property {string|null} [displayName] Parameter displayName + * @property {boolean|null} [required] Parameter required + * @property {string|null} [entityType] Parameter entityType + * @property {boolean|null} [isList] Parameter isList + * @property {google.cloud.dialogflow.cx.v3.Form.Parameter.IFillBehavior|null} [fillBehavior] Parameter fillBehavior + * @property {google.protobuf.IValue|null} [defaultValue] Parameter defaultValue + * @property {boolean|null} [redact] Parameter redact + */ - /** - * Constructs a new CreatePageRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a CreatePageRequest. - * @implements ICreatePageRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.ICreatePageRequest=} [properties] Properties to set - */ - function CreatePageRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new Parameter. + * @memberof google.cloud.dialogflow.cx.v3.Form + * @classdesc Represents a Parameter. + * @implements IParameter + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Form.IParameter=} [properties] Properties to set + */ + function Parameter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * CreatePageRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.CreatePageRequest - * @instance + /** + * Parameter displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter + * @instance + */ + Parameter.prototype.displayName = ""; + + /** + * Parameter required. + * @member {boolean} required + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter + * @instance + */ + Parameter.prototype.required = false; + + /** + * Parameter entityType. + * @member {string} entityType + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter + * @instance + */ + Parameter.prototype.entityType = ""; + + /** + * Parameter isList. + * @member {boolean} isList + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter + * @instance + */ + Parameter.prototype.isList = false; + + /** + * Parameter fillBehavior. + * @member {google.cloud.dialogflow.cx.v3.Form.Parameter.IFillBehavior|null|undefined} fillBehavior + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter + * @instance + */ + Parameter.prototype.fillBehavior = null; + + /** + * Parameter defaultValue. + * @member {google.protobuf.IValue|null|undefined} defaultValue + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter + * @instance + */ + Parameter.prototype.defaultValue = null; + + /** + * Parameter redact. + * @member {boolean} redact + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter + * @instance + */ + Parameter.prototype.redact = false; + + /** + * Creates a new Parameter instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter + * @static + * @param {google.cloud.dialogflow.cx.v3.Form.IParameter=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Form.Parameter} Parameter instance + */ + Parameter.create = function create(properties) { + return new Parameter(properties); + }; + + /** + * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Form.Parameter.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter + * @static + * @param {google.cloud.dialogflow.cx.v3.Form.IParameter} message Parameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Parameter.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.required != null && Object.hasOwnProperty.call(message, "required")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.required); + if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.entityType); + if (message.isList != null && Object.hasOwnProperty.call(message, "isList")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isList); + if (message.fillBehavior != null && Object.hasOwnProperty.call(message, "fillBehavior")) + $root.google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior.encode(message.fillBehavior, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + $root.google.protobuf.Value.encode(message.defaultValue, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.redact != null && Object.hasOwnProperty.call(message, "redact")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.redact); + return writer; + }; + + /** + * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Form.Parameter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter + * @static + * @param {google.cloud.dialogflow.cx.v3.Form.IParameter} message Parameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Parameter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Parameter message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.Form.Parameter} Parameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Parameter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Form.Parameter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.required = reader.bool(); + break; + } + case 3: { + message.entityType = reader.string(); + break; + } + case 4: { + message.isList = reader.bool(); + break; + } + case 7: { + message.fillBehavior = $root.google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior.decode(reader, reader.uint32()); + break; + } + case 9: { + message.defaultValue = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + } + case 11: { + message.redact = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Parameter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Form.Parameter} Parameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Parameter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Parameter message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Parameter.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.required != null && message.hasOwnProperty("required")) + if (typeof message.required !== "boolean") + return "required: boolean expected"; + if (message.entityType != null && message.hasOwnProperty("entityType")) + if (!$util.isString(message.entityType)) + return "entityType: string expected"; + if (message.isList != null && message.hasOwnProperty("isList")) + if (typeof message.isList !== "boolean") + return "isList: boolean expected"; + if (message.fillBehavior != null && message.hasOwnProperty("fillBehavior")) { + var error = $root.google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior.verify(message.fillBehavior); + if (error) + return "fillBehavior." + error; + } + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) { + var error = $root.google.protobuf.Value.verify(message.defaultValue); + if (error) + return "defaultValue." + error; + } + if (message.redact != null && message.hasOwnProperty("redact")) + if (typeof message.redact !== "boolean") + return "redact: boolean expected"; + return null; + }; + + /** + * Creates a Parameter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Form.Parameter} Parameter + */ + Parameter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Form.Parameter) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Form.Parameter(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.required != null) + message.required = Boolean(object.required); + if (object.entityType != null) + message.entityType = String(object.entityType); + if (object.isList != null) + message.isList = Boolean(object.isList); + if (object.fillBehavior != null) { + if (typeof object.fillBehavior !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Form.Parameter.fillBehavior: object expected"); + message.fillBehavior = $root.google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior.fromObject(object.fillBehavior); + } + if (object.defaultValue != null) { + if (typeof object.defaultValue !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Form.Parameter.defaultValue: object expected"); + message.defaultValue = $root.google.protobuf.Value.fromObject(object.defaultValue); + } + if (object.redact != null) + message.redact = Boolean(object.redact); + return message; + }; + + /** + * Creates a plain object from a Parameter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter + * @static + * @param {google.cloud.dialogflow.cx.v3.Form.Parameter} message Parameter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Parameter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.required = false; + object.entityType = ""; + object.isList = false; + object.fillBehavior = null; + object.defaultValue = null; + object.redact = false; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.required != null && message.hasOwnProperty("required")) + object.required = message.required; + if (message.entityType != null && message.hasOwnProperty("entityType")) + object.entityType = message.entityType; + if (message.isList != null && message.hasOwnProperty("isList")) + object.isList = message.isList; + if (message.fillBehavior != null && message.hasOwnProperty("fillBehavior")) + object.fillBehavior = $root.google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior.toObject(message.fillBehavior, options); + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = $root.google.protobuf.Value.toObject(message.defaultValue, options); + if (message.redact != null && message.hasOwnProperty("redact")) + object.redact = message.redact; + return object; + }; + + /** + * Converts this Parameter to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter + * @instance + * @returns {Object.} JSON object + */ + Parameter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Parameter + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Parameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Form.Parameter"; + }; + + Parameter.FillBehavior = (function() { + + /** + * Properties of a FillBehavior. + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter + * @interface IFillBehavior + * @property {google.cloud.dialogflow.cx.v3.IFulfillment|null} [initialPromptFulfillment] FillBehavior initialPromptFulfillment + * @property {Array.|null} [repromptEventHandlers] FillBehavior repromptEventHandlers + */ + + /** + * Constructs a new FillBehavior. + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter + * @classdesc Represents a FillBehavior. + * @implements IFillBehavior + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Form.Parameter.IFillBehavior=} [properties] Properties to set + */ + function FillBehavior(properties) { + this.repromptEventHandlers = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FillBehavior initialPromptFulfillment. + * @member {google.cloud.dialogflow.cx.v3.IFulfillment|null|undefined} initialPromptFulfillment + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior + * @instance + */ + FillBehavior.prototype.initialPromptFulfillment = null; + + /** + * FillBehavior repromptEventHandlers. + * @member {Array.} repromptEventHandlers + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior + * @instance + */ + FillBehavior.prototype.repromptEventHandlers = $util.emptyArray; + + /** + * Creates a new FillBehavior instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior + * @static + * @param {google.cloud.dialogflow.cx.v3.Form.Parameter.IFillBehavior=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior} FillBehavior instance + */ + FillBehavior.create = function create(properties) { + return new FillBehavior(properties); + }; + + /** + * Encodes the specified FillBehavior message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior + * @static + * @param {google.cloud.dialogflow.cx.v3.Form.Parameter.IFillBehavior} message FillBehavior message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FillBehavior.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPromptFulfillment != null && Object.hasOwnProperty.call(message, "initialPromptFulfillment")) + $root.google.cloud.dialogflow.cx.v3.Fulfillment.encode(message.initialPromptFulfillment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.repromptEventHandlers != null && message.repromptEventHandlers.length) + for (var i = 0; i < message.repromptEventHandlers.length; ++i) + $root.google.cloud.dialogflow.cx.v3.EventHandler.encode(message.repromptEventHandlers[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FillBehavior message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior + * @static + * @param {google.cloud.dialogflow.cx.v3.Form.Parameter.IFillBehavior} message FillBehavior message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FillBehavior.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FillBehavior message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior} FillBehavior + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FillBehavior.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.initialPromptFulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.repromptEventHandlers && message.repromptEventHandlers.length)) + message.repromptEventHandlers = []; + message.repromptEventHandlers.push($root.google.cloud.dialogflow.cx.v3.EventHandler.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FillBehavior message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior} FillBehavior + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FillBehavior.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FillBehavior message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FillBehavior.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPromptFulfillment != null && message.hasOwnProperty("initialPromptFulfillment")) { + var error = $root.google.cloud.dialogflow.cx.v3.Fulfillment.verify(message.initialPromptFulfillment); + if (error) + return "initialPromptFulfillment." + error; + } + if (message.repromptEventHandlers != null && message.hasOwnProperty("repromptEventHandlers")) { + if (!Array.isArray(message.repromptEventHandlers)) + return "repromptEventHandlers: array expected"; + for (var i = 0; i < message.repromptEventHandlers.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.EventHandler.verify(message.repromptEventHandlers[i]); + if (error) + return "repromptEventHandlers." + error; + } + } + return null; + }; + + /** + * Creates a FillBehavior message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior} FillBehavior + */ + FillBehavior.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior(); + if (object.initialPromptFulfillment != null) { + if (typeof object.initialPromptFulfillment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior.initialPromptFulfillment: object expected"); + message.initialPromptFulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.fromObject(object.initialPromptFulfillment); + } + if (object.repromptEventHandlers) { + if (!Array.isArray(object.repromptEventHandlers)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior.repromptEventHandlers: array expected"); + message.repromptEventHandlers = []; + for (var i = 0; i < object.repromptEventHandlers.length; ++i) { + if (typeof object.repromptEventHandlers[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior.repromptEventHandlers: object expected"); + message.repromptEventHandlers[i] = $root.google.cloud.dialogflow.cx.v3.EventHandler.fromObject(object.repromptEventHandlers[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FillBehavior message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior + * @static + * @param {google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior} message FillBehavior + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FillBehavior.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.repromptEventHandlers = []; + if (options.defaults) + object.initialPromptFulfillment = null; + if (message.initialPromptFulfillment != null && message.hasOwnProperty("initialPromptFulfillment")) + object.initialPromptFulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.toObject(message.initialPromptFulfillment, options); + if (message.repromptEventHandlers && message.repromptEventHandlers.length) { + object.repromptEventHandlers = []; + for (var j = 0; j < message.repromptEventHandlers.length; ++j) + object.repromptEventHandlers[j] = $root.google.cloud.dialogflow.cx.v3.EventHandler.toObject(message.repromptEventHandlers[j], options); + } + return object; + }; + + /** + * Converts this FillBehavior to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior + * @instance + * @returns {Object.} JSON object + */ + FillBehavior.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FillBehavior + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FillBehavior.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Form.Parameter.FillBehavior"; + }; + + return FillBehavior; + })(); + + return Parameter; + })(); + + return Form; + })(); + + v3.EventHandler = (function() { + + /** + * Properties of an EventHandler. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IEventHandler + * @property {string|null} [name] EventHandler name + * @property {string|null} [event] EventHandler event + * @property {google.cloud.dialogflow.cx.v3.IFulfillment|null} [triggerFulfillment] EventHandler triggerFulfillment + * @property {string|null} [targetPage] EventHandler targetPage + * @property {string|null} [targetFlow] EventHandler targetFlow */ - CreatePageRequest.prototype.parent = ""; /** - * CreatePageRequest page. - * @member {google.cloud.dialogflow.cx.v3.IPage|null|undefined} page - * @memberof google.cloud.dialogflow.cx.v3.CreatePageRequest + * Constructs a new EventHandler. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an EventHandler. + * @implements IEventHandler + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IEventHandler=} [properties] Properties to set + */ + function EventHandler(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EventHandler name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.EventHandler * @instance */ - CreatePageRequest.prototype.page = null; + EventHandler.prototype.name = ""; /** - * CreatePageRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.CreatePageRequest + * EventHandler event. + * @member {string} event + * @memberof google.cloud.dialogflow.cx.v3.EventHandler * @instance */ - CreatePageRequest.prototype.languageCode = ""; + EventHandler.prototype.event = ""; /** - * Creates a new CreatePageRequest instance using the specified properties. + * EventHandler triggerFulfillment. + * @member {google.cloud.dialogflow.cx.v3.IFulfillment|null|undefined} triggerFulfillment + * @memberof google.cloud.dialogflow.cx.v3.EventHandler + * @instance + */ + EventHandler.prototype.triggerFulfillment = null; + + /** + * EventHandler targetPage. + * @member {string|null|undefined} targetPage + * @memberof google.cloud.dialogflow.cx.v3.EventHandler + * @instance + */ + EventHandler.prototype.targetPage = null; + + /** + * EventHandler targetFlow. + * @member {string|null|undefined} targetFlow + * @memberof google.cloud.dialogflow.cx.v3.EventHandler + * @instance + */ + EventHandler.prototype.targetFlow = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * EventHandler target. + * @member {"targetPage"|"targetFlow"|undefined} target + * @memberof google.cloud.dialogflow.cx.v3.EventHandler + * @instance + */ + Object.defineProperty(EventHandler.prototype, "target", { + get: $util.oneOfGetter($oneOfFields = ["targetPage", "targetFlow"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new EventHandler instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3.EventHandler * @static - * @param {google.cloud.dialogflow.cx.v3.ICreatePageRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.CreatePageRequest} CreatePageRequest instance + * @param {google.cloud.dialogflow.cx.v3.IEventHandler=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.EventHandler} EventHandler instance */ - CreatePageRequest.create = function create(properties) { - return new CreatePageRequest(properties); + EventHandler.create = function create(properties) { + return new EventHandler(properties); }; /** - * Encodes the specified CreatePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreatePageRequest.verify|verify} messages. + * Encodes the specified EventHandler message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EventHandler.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3.EventHandler * @static - * @param {google.cloud.dialogflow.cx.v3.ICreatePageRequest} message CreatePageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IEventHandler} message EventHandler message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreatePageRequest.encode = function encode(message, writer) { + EventHandler.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.page != null && Object.hasOwnProperty.call(message, "page")) - $root.google.cloud.dialogflow.cx.v3.Page.encode(message.page, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); + if (message.targetPage != null && Object.hasOwnProperty.call(message, "targetPage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetPage); + if (message.targetFlow != null && Object.hasOwnProperty.call(message, "targetFlow")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.targetFlow); + if (message.event != null && Object.hasOwnProperty.call(message, "event")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.event); + if (message.triggerFulfillment != null && Object.hasOwnProperty.call(message, "triggerFulfillment")) + $root.google.cloud.dialogflow.cx.v3.Fulfillment.encode(message.triggerFulfillment, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); return writer; }; /** - * Encodes the specified CreatePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreatePageRequest.verify|verify} messages. + * Encodes the specified EventHandler message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EventHandler.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3.EventHandler * @static - * @param {google.cloud.dialogflow.cx.v3.ICreatePageRequest} message CreatePageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IEventHandler} message EventHandler message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreatePageRequest.encodeDelimited = function encodeDelimited(message, writer) { + EventHandler.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreatePageRequest message from the specified reader or buffer. + * Decodes an EventHandler message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3.EventHandler * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.CreatePageRequest} CreatePageRequest + * @returns {google.cloud.dialogflow.cx.v3.EventHandler} EventHandler * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreatePageRequest.decode = function decode(reader, length) { + EventHandler.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreatePageRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.EventHandler(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); + case 6: { + message.name = reader.string(); + break; + } + case 4: { + message.event = reader.string(); + break; + } + case 5: { + message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.decode(reader, reader.uint32()); break; } case 2: { - message.page = $root.google.cloud.dialogflow.cx.v3.Page.decode(reader, reader.uint32()); + message.targetPage = reader.string(); break; } case 3: { - message.languageCode = reader.string(); + message.targetFlow = reader.string(); break; } default: @@ -12129,146 +12927,176 @@ }; /** - * Decodes a CreatePageRequest message from the specified reader or buffer, length delimited. + * Decodes an EventHandler message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3.EventHandler * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.CreatePageRequest} CreatePageRequest + * @returns {google.cloud.dialogflow.cx.v3.EventHandler} EventHandler * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreatePageRequest.decodeDelimited = function decodeDelimited(reader) { + EventHandler.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreatePageRequest message. + * Verifies an EventHandler message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3.EventHandler * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreatePageRequest.verify = function verify(message) { + EventHandler.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.page != null && message.hasOwnProperty("page")) { - var error = $root.google.cloud.dialogflow.cx.v3.Page.verify(message.page); + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.event != null && message.hasOwnProperty("event")) + if (!$util.isString(message.event)) + return "event: string expected"; + if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) { + var error = $root.google.cloud.dialogflow.cx.v3.Fulfillment.verify(message.triggerFulfillment); if (error) - return "page." + error; + return "triggerFulfillment." + error; + } + if (message.targetPage != null && message.hasOwnProperty("targetPage")) { + properties.target = 1; + if (!$util.isString(message.targetPage)) + return "targetPage: string expected"; + } + if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { + if (properties.target === 1) + return "target: multiple values"; + properties.target = 1; + if (!$util.isString(message.targetFlow)) + return "targetFlow: string expected"; } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; return null; }; /** - * Creates a CreatePageRequest message from a plain object. Also converts values to their respective internal types. + * Creates an EventHandler message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3.EventHandler * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.CreatePageRequest} CreatePageRequest + * @returns {google.cloud.dialogflow.cx.v3.EventHandler} EventHandler */ - CreatePageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreatePageRequest) + EventHandler.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.EventHandler) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.CreatePageRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.page != null) { - if (typeof object.page !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CreatePageRequest.page: object expected"); - message.page = $root.google.cloud.dialogflow.cx.v3.Page.fromObject(object.page); + var message = new $root.google.cloud.dialogflow.cx.v3.EventHandler(); + if (object.name != null) + message.name = String(object.name); + if (object.event != null) + message.event = String(object.event); + if (object.triggerFulfillment != null) { + if (typeof object.triggerFulfillment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.EventHandler.triggerFulfillment: object expected"); + message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.fromObject(object.triggerFulfillment); } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + if (object.targetPage != null) + message.targetPage = String(object.targetPage); + if (object.targetFlow != null) + message.targetFlow = String(object.targetFlow); return message; }; /** - * Creates a plain object from a CreatePageRequest message. Also converts values to other types if specified. + * Creates a plain object from an EventHandler message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3.EventHandler * @static - * @param {google.cloud.dialogflow.cx.v3.CreatePageRequest} message CreatePageRequest + * @param {google.cloud.dialogflow.cx.v3.EventHandler} message EventHandler * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreatePageRequest.toObject = function toObject(message, options) { + EventHandler.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.page = null; - object.languageCode = ""; + object.event = ""; + object.triggerFulfillment = null; + object.name = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.page != null && message.hasOwnProperty("page")) - object.page = $root.google.cloud.dialogflow.cx.v3.Page.toObject(message.page, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (message.targetPage != null && message.hasOwnProperty("targetPage")) { + object.targetPage = message.targetPage; + if (options.oneofs) + object.target = "targetPage"; + } + if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { + object.targetFlow = message.targetFlow; + if (options.oneofs) + object.target = "targetFlow"; + } + if (message.event != null && message.hasOwnProperty("event")) + object.event = message.event; + if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) + object.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.toObject(message.triggerFulfillment, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CreatePageRequest to JSON. + * Converts this EventHandler to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3.EventHandler * @instance * @returns {Object.} JSON object */ - CreatePageRequest.prototype.toJSON = function toJSON() { + EventHandler.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreatePageRequest + * Gets the default type url for EventHandler * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3.EventHandler * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreatePageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EventHandler.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreatePageRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.EventHandler"; }; - return CreatePageRequest; + return EventHandler; })(); - v3.UpdatePageRequest = (function() { + v3.TransitionRoute = (function() { /** - * Properties of an UpdatePageRequest. + * Properties of a TransitionRoute. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IUpdatePageRequest - * @property {google.cloud.dialogflow.cx.v3.IPage|null} [page] UpdatePageRequest page - * @property {string|null} [languageCode] UpdatePageRequest languageCode - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdatePageRequest updateMask + * @interface ITransitionRoute + * @property {string|null} [name] TransitionRoute name + * @property {string|null} [intent] TransitionRoute intent + * @property {string|null} [condition] TransitionRoute condition + * @property {google.cloud.dialogflow.cx.v3.IFulfillment|null} [triggerFulfillment] TransitionRoute triggerFulfillment + * @property {string|null} [targetPage] TransitionRoute targetPage + * @property {string|null} [targetFlow] TransitionRoute targetFlow */ /** - * Constructs a new UpdatePageRequest. + * Constructs a new TransitionRoute. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an UpdatePageRequest. - * @implements IUpdatePageRequest + * @classdesc Represents a TransitionRoute. + * @implements ITransitionRoute * @constructor - * @param {google.cloud.dialogflow.cx.v3.IUpdatePageRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ITransitionRoute=} [properties] Properties to set */ - function UpdatePageRequest(properties) { + function TransitionRoute(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12276,103 +13104,159 @@ } /** - * UpdatePageRequest page. - * @member {google.cloud.dialogflow.cx.v3.IPage|null|undefined} page - * @memberof google.cloud.dialogflow.cx.v3.UpdatePageRequest + * TransitionRoute name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute * @instance */ - UpdatePageRequest.prototype.page = null; + TransitionRoute.prototype.name = ""; /** - * UpdatePageRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.UpdatePageRequest + * TransitionRoute intent. + * @member {string} intent + * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute * @instance */ - UpdatePageRequest.prototype.languageCode = ""; + TransitionRoute.prototype.intent = ""; /** - * UpdatePageRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3.UpdatePageRequest + * TransitionRoute condition. + * @member {string} condition + * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute * @instance */ - UpdatePageRequest.prototype.updateMask = null; + TransitionRoute.prototype.condition = ""; /** - * Creates a new UpdatePageRequest instance using the specified properties. + * TransitionRoute triggerFulfillment. + * @member {google.cloud.dialogflow.cx.v3.IFulfillment|null|undefined} triggerFulfillment + * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute + * @instance + */ + TransitionRoute.prototype.triggerFulfillment = null; + + /** + * TransitionRoute targetPage. + * @member {string|null|undefined} targetPage + * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute + * @instance + */ + TransitionRoute.prototype.targetPage = null; + + /** + * TransitionRoute targetFlow. + * @member {string|null|undefined} targetFlow + * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute + * @instance + */ + TransitionRoute.prototype.targetFlow = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TransitionRoute target. + * @member {"targetPage"|"targetFlow"|undefined} target + * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute + * @instance + */ + Object.defineProperty(TransitionRoute.prototype, "target", { + get: $util.oneOfGetter($oneOfFields = ["targetPage", "targetFlow"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TransitionRoute instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdatePageRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.UpdatePageRequest} UpdatePageRequest instance + * @param {google.cloud.dialogflow.cx.v3.ITransitionRoute=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.TransitionRoute} TransitionRoute instance */ - UpdatePageRequest.create = function create(properties) { - return new UpdatePageRequest(properties); + TransitionRoute.create = function create(properties) { + return new TransitionRoute(properties); }; /** - * Encodes the specified UpdatePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdatePageRequest.verify|verify} messages. + * Encodes the specified TransitionRoute message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRoute.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdatePageRequest} message UpdatePageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ITransitionRoute} message TransitionRoute message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdatePageRequest.encode = function encode(message, writer) { + TransitionRoute.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.page != null && Object.hasOwnProperty.call(message, "page")) - $root.google.cloud.dialogflow.cx.v3.Page.encode(message.page, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - 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(); + if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.intent); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.condition); + if (message.triggerFulfillment != null && Object.hasOwnProperty.call(message, "triggerFulfillment")) + $root.google.cloud.dialogflow.cx.v3.Fulfillment.encode(message.triggerFulfillment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.targetPage != null && Object.hasOwnProperty.call(message, "targetPage")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.targetPage); + if (message.targetFlow != null && Object.hasOwnProperty.call(message, "targetFlow")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.targetFlow); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); return writer; }; /** - * Encodes the specified UpdatePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdatePageRequest.verify|verify} messages. + * Encodes the specified TransitionRoute message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRoute.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdatePageRequest} message UpdatePageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ITransitionRoute} message TransitionRoute message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdatePageRequest.encodeDelimited = function encodeDelimited(message, writer) { + TransitionRoute.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdatePageRequest message from the specified reader or buffer. + * Decodes a TransitionRoute message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.UpdatePageRequest} UpdatePageRequest + * @returns {google.cloud.dialogflow.cx.v3.TransitionRoute} TransitionRoute * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdatePageRequest.decode = function decode(reader, length) { + TransitionRoute.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.UpdatePageRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.TransitionRoute(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 6: { + message.name = reader.string(); + break; + } case 1: { - message.page = $root.google.cloud.dialogflow.cx.v3.Page.decode(reader, reader.uint32()); + message.intent = reader.string(); break; } case 2: { - message.languageCode = reader.string(); + message.condition = reader.string(); break; } case 3: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.decode(reader, reader.uint32()); + break; + } + case 4: { + message.targetPage = reader.string(); + break; + } + case 5: { + message.targetFlow = reader.string(); break; } default: @@ -12384,150 +13268,182 @@ }; /** - * Decodes an UpdatePageRequest message from the specified reader or buffer, length delimited. + * Decodes a TransitionRoute message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.UpdatePageRequest} UpdatePageRequest + * @returns {google.cloud.dialogflow.cx.v3.TransitionRoute} TransitionRoute * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdatePageRequest.decodeDelimited = function decodeDelimited(reader) { + TransitionRoute.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdatePageRequest message. + * Verifies a TransitionRoute message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdatePageRequest.verify = function verify(message) { + TransitionRoute.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.page != null && message.hasOwnProperty("page")) { - var error = $root.google.cloud.dialogflow.cx.v3.Page.verify(message.page); + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.intent != null && message.hasOwnProperty("intent")) + if (!$util.isString(message.intent)) + return "intent: string expected"; + if (message.condition != null && message.hasOwnProperty("condition")) + if (!$util.isString(message.condition)) + return "condition: string expected"; + if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) { + var error = $root.google.cloud.dialogflow.cx.v3.Fulfillment.verify(message.triggerFulfillment); if (error) - return "page." + error; + return "triggerFulfillment." + error; } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.targetPage != null && message.hasOwnProperty("targetPage")) { + properties.target = 1; + if (!$util.isString(message.targetPage)) + return "targetPage: string expected"; + } + if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { + if (properties.target === 1) + return "target: multiple values"; + properties.target = 1; + if (!$util.isString(message.targetFlow)) + return "targetFlow: string expected"; } return null; }; /** - * Creates an UpdatePageRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TransitionRoute message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.UpdatePageRequest} UpdatePageRequest + * @returns {google.cloud.dialogflow.cx.v3.TransitionRoute} TransitionRoute */ - UpdatePageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdatePageRequest) + TransitionRoute.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.TransitionRoute) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.UpdatePageRequest(); - if (object.page != null) { - if (typeof object.page !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdatePageRequest.page: object expected"); - message.page = $root.google.cloud.dialogflow.cx.v3.Page.fromObject(object.page); - } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdatePageRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.dialogflow.cx.v3.TransitionRoute(); + if (object.name != null) + message.name = String(object.name); + if (object.intent != null) + message.intent = String(object.intent); + if (object.condition != null) + message.condition = String(object.condition); + if (object.triggerFulfillment != null) { + if (typeof object.triggerFulfillment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionRoute.triggerFulfillment: object expected"); + message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.fromObject(object.triggerFulfillment); } + if (object.targetPage != null) + message.targetPage = String(object.targetPage); + if (object.targetFlow != null) + message.targetFlow = String(object.targetFlow); return message; }; /** - * Creates a plain object from an UpdatePageRequest message. Also converts values to other types if specified. + * Creates a plain object from a TransitionRoute message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute * @static - * @param {google.cloud.dialogflow.cx.v3.UpdatePageRequest} message UpdatePageRequest + * @param {google.cloud.dialogflow.cx.v3.TransitionRoute} message TransitionRoute * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdatePageRequest.toObject = function toObject(message, options) { + TransitionRoute.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.page = null; - object.languageCode = ""; - object.updateMask = null; + object.intent = ""; + object.condition = ""; + object.triggerFulfillment = null; + object.name = ""; } - if (message.page != null && message.hasOwnProperty("page")) - object.page = $root.google.cloud.dialogflow.cx.v3.Page.toObject(message.page, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.intent != null && message.hasOwnProperty("intent")) + object.intent = message.intent; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = message.condition; + if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) + object.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.toObject(message.triggerFulfillment, options); + if (message.targetPage != null && message.hasOwnProperty("targetPage")) { + object.targetPage = message.targetPage; + if (options.oneofs) + object.target = "targetPage"; + } + if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { + object.targetFlow = message.targetFlow; + if (options.oneofs) + object.target = "targetFlow"; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this UpdatePageRequest to JSON. + * Converts this TransitionRoute to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute * @instance * @returns {Object.} JSON object */ - UpdatePageRequest.prototype.toJSON = function toJSON() { + TransitionRoute.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdatePageRequest + * Gets the default type url for TransitionRoute * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3.TransitionRoute * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdatePageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TransitionRoute.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdatePageRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TransitionRoute"; }; - return UpdatePageRequest; + return TransitionRoute; })(); - v3.DeletePageRequest = (function() { + v3.ListPagesRequest = (function() { /** - * Properties of a DeletePageRequest. + * Properties of a ListPagesRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDeletePageRequest - * @property {string|null} [name] DeletePageRequest name - * @property {boolean|null} [force] DeletePageRequest force + * @interface IListPagesRequest + * @property {string|null} [parent] ListPagesRequest parent + * @property {string|null} [languageCode] ListPagesRequest languageCode + * @property {number|null} [pageSize] ListPagesRequest pageSize + * @property {string|null} [pageToken] ListPagesRequest pageToken */ /** - * Constructs a new DeletePageRequest. + * Constructs a new ListPagesRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a DeletePageRequest. - * @implements IDeletePageRequest + * @classdesc Represents a ListPagesRequest. + * @implements IListPagesRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDeletePageRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListPagesRequest=} [properties] Properties to set */ - function DeletePageRequest(properties) { + function ListPagesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12535,89 +13451,117 @@ } /** - * DeletePageRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.DeletePageRequest + * ListPagesRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ListPagesRequest * @instance */ - DeletePageRequest.prototype.name = ""; + ListPagesRequest.prototype.parent = ""; /** - * DeletePageRequest force. - * @member {boolean} force - * @memberof google.cloud.dialogflow.cx.v3.DeletePageRequest + * ListPagesRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.ListPagesRequest * @instance */ - DeletePageRequest.prototype.force = false; + ListPagesRequest.prototype.languageCode = ""; /** - * Creates a new DeletePageRequest instance using the specified properties. + * ListPagesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3.ListPagesRequest + * @instance + */ + ListPagesRequest.prototype.pageSize = 0; + + /** + * ListPagesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3.ListPagesRequest + * @instance + */ + ListPagesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListPagesRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3.ListPagesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeletePageRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.DeletePageRequest} DeletePageRequest instance + * @param {google.cloud.dialogflow.cx.v3.IListPagesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListPagesRequest} ListPagesRequest instance */ - DeletePageRequest.create = function create(properties) { - return new DeletePageRequest(properties); + ListPagesRequest.create = function create(properties) { + return new ListPagesRequest(properties); }; /** - * Encodes the specified DeletePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeletePageRequest.verify|verify} messages. + * Encodes the specified ListPagesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPagesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3.ListPagesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeletePageRequest} message DeletePageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListPagesRequest} message ListPagesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeletePageRequest.encode = function encode(message, writer) { + ListPagesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + 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); return writer; }; /** - * Encodes the specified DeletePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeletePageRequest.verify|verify} messages. + * Encodes the specified ListPagesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPagesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3.ListPagesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeletePageRequest} message DeletePageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListPagesRequest} message ListPagesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeletePageRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListPagesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeletePageRequest message from the specified reader or buffer. + * Decodes a ListPagesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3.ListPagesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.DeletePageRequest} DeletePageRequest + * @returns {google.cloud.dialogflow.cx.v3.ListPagesRequest} ListPagesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeletePageRequest.decode = function decode(reader, length) { + ListPagesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DeletePageRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListPagesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.force = reader.bool(); + message.languageCode = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); break; } default: @@ -12629,139 +13573,149 @@ }; /** - * Decodes a DeletePageRequest message from the specified reader or buffer, length delimited. + * Decodes a ListPagesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3.ListPagesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.DeletePageRequest} DeletePageRequest + * @returns {google.cloud.dialogflow.cx.v3.ListPagesRequest} ListPagesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeletePageRequest.decodeDelimited = function decodeDelimited(reader) { + ListPagesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeletePageRequest message. + * Verifies a ListPagesRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3.ListPagesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeletePageRequest.verify = function verify(message) { + ListPagesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: 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 DeletePageRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListPagesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3.ListPagesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.DeletePageRequest} DeletePageRequest + * @returns {google.cloud.dialogflow.cx.v3.ListPagesRequest} ListPagesRequest */ - DeletePageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeletePageRequest) + ListPagesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListPagesRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.DeletePageRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); + var message = new $root.google.cloud.dialogflow.cx.v3.ListPagesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + 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 DeletePageRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListPagesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3.ListPagesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.DeletePageRequest} message DeletePageRequest + * @param {google.cloud.dialogflow.cx.v3.ListPagesRequest} message ListPagesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeletePageRequest.toObject = function toObject(message, options) { + ListPagesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.force = false; + object.parent = ""; + object.languageCode = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this DeletePageRequest to JSON. + * Converts this ListPagesRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3.ListPagesRequest * @instance * @returns {Object.} JSON object */ - DeletePageRequest.prototype.toJSON = function toJSON() { + ListPagesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeletePageRequest + * Gets the default type url for ListPagesRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3.ListPagesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeletePageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListPagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeletePageRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListPagesRequest"; }; - return DeletePageRequest; + return ListPagesRequest; })(); - v3.Fulfillment = (function() { + v3.ListPagesResponse = (function() { /** - * Properties of a Fulfillment. + * Properties of a ListPagesResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IFulfillment - * @property {Array.|null} [messages] Fulfillment messages - * @property {string|null} [webhook] Fulfillment webhook - * @property {boolean|null} [returnPartialResponses] Fulfillment returnPartialResponses - * @property {string|null} [tag] Fulfillment tag - * @property {Array.|null} [setParameterActions] Fulfillment setParameterActions - * @property {Array.|null} [conditionalCases] Fulfillment conditionalCases + * @interface IListPagesResponse + * @property {Array.|null} [pages] ListPagesResponse pages + * @property {string|null} [nextPageToken] ListPagesResponse nextPageToken */ /** - * Constructs a new Fulfillment. + * Constructs a new ListPagesResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a Fulfillment. - * @implements IFulfillment + * @classdesc Represents a ListPagesResponse. + * @implements IListPagesResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IFulfillment=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListPagesResponse=} [properties] Properties to set */ - function Fulfillment(properties) { - this.messages = []; - this.setParameterActions = []; - this.conditionalCases = []; + function ListPagesResponse(properties) { + this.pages = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12769,154 +13723,336 @@ } /** - * Fulfillment messages. - * @member {Array.} messages - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment + * ListPagesResponse pages. + * @member {Array.} pages + * @memberof google.cloud.dialogflow.cx.v3.ListPagesResponse * @instance */ - Fulfillment.prototype.messages = $util.emptyArray; + ListPagesResponse.prototype.pages = $util.emptyArray; /** - * Fulfillment webhook. - * @member {string} webhook - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment + * ListPagesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3.ListPagesResponse * @instance */ - Fulfillment.prototype.webhook = ""; + ListPagesResponse.prototype.nextPageToken = ""; /** - * Fulfillment returnPartialResponses. - * @member {boolean} returnPartialResponses - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment - * @instance + * Creates a new ListPagesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ListPagesResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListPagesResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListPagesResponse} ListPagesResponse instance */ - Fulfillment.prototype.returnPartialResponses = false; + ListPagesResponse.create = function create(properties) { + return new ListPagesResponse(properties); + }; /** - * Fulfillment tag. - * @member {string} tag - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment + * Encodes the specified ListPagesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPagesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ListPagesResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListPagesResponse} message ListPagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPagesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pages != null && message.pages.length) + for (var i = 0; i < message.pages.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Page.encode(message.pages[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 ListPagesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPagesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListPagesResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListPagesResponse} message ListPagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPagesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPagesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ListPagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.ListPagesResponse} ListPagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPagesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListPagesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.pages && message.pages.length)) + message.pages = []; + message.pages.push($root.google.cloud.dialogflow.cx.v3.Page.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPagesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListPagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ListPagesResponse} ListPagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPagesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPagesResponse message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ListPagesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPagesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pages != null && message.hasOwnProperty("pages")) { + if (!Array.isArray(message.pages)) + return "pages: array expected"; + for (var i = 0; i < message.pages.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Page.verify(message.pages[i]); + if (error) + return "pages." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListPagesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ListPagesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ListPagesResponse} ListPagesResponse + */ + ListPagesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListPagesResponse) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ListPagesResponse(); + if (object.pages) { + if (!Array.isArray(object.pages)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListPagesResponse.pages: array expected"); + message.pages = []; + for (var i = 0; i < object.pages.length; ++i) { + if (typeof object.pages[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListPagesResponse.pages: object expected"); + message.pages[i] = $root.google.cloud.dialogflow.cx.v3.Page.fromObject(object.pages[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListPagesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ListPagesResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.ListPagesResponse} message ListPagesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPagesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pages = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.pages && message.pages.length) { + object.pages = []; + for (var j = 0; j < message.pages.length; ++j) + object.pages[j] = $root.google.cloud.dialogflow.cx.v3.Page.toObject(message.pages[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListPagesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ListPagesResponse * @instance + * @returns {Object.} JSON object */ - Fulfillment.prototype.tag = ""; + ListPagesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Fulfillment setParameterActions. - * @member {Array.} setParameterActions - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment + * Gets the default type url for ListPagesResponse + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ListPagesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListPagesResponse"; + }; + + return ListPagesResponse; + })(); + + v3.GetPageRequest = (function() { + + /** + * Properties of a GetPageRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IGetPageRequest + * @property {string|null} [name] GetPageRequest name + * @property {string|null} [languageCode] GetPageRequest languageCode + */ + + /** + * Constructs a new GetPageRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a GetPageRequest. + * @implements IGetPageRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IGetPageRequest=} [properties] Properties to set + */ + function GetPageRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetPageRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.GetPageRequest * @instance */ - Fulfillment.prototype.setParameterActions = $util.emptyArray; + GetPageRequest.prototype.name = ""; /** - * Fulfillment conditionalCases. - * @member {Array.} conditionalCases - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment + * GetPageRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.GetPageRequest * @instance */ - Fulfillment.prototype.conditionalCases = $util.emptyArray; + GetPageRequest.prototype.languageCode = ""; /** - * Creates a new Fulfillment instance using the specified properties. + * Creates a new GetPageRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3.GetPageRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IFulfillment=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Fulfillment} Fulfillment instance + * @param {google.cloud.dialogflow.cx.v3.IGetPageRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetPageRequest} GetPageRequest instance */ - Fulfillment.create = function create(properties) { - return new Fulfillment(properties); + GetPageRequest.create = function create(properties) { + return new GetPageRequest(properties); }; /** - * Encodes the specified Fulfillment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Fulfillment.verify|verify} messages. + * Encodes the specified GetPageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetPageRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3.GetPageRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IFulfillment} message Fulfillment message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetPageRequest} message GetPageRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Fulfillment.encode = function encode(message, writer) { + GetPageRequest.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.dialogflow.cx.v3.ResponseMessage.encode(message.messages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.webhook != null && Object.hasOwnProperty.call(message, "webhook")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.webhook); - if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.tag); - if (message.setParameterActions != null && message.setParameterActions.length) - for (var i = 0; i < message.setParameterActions.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction.encode(message.setParameterActions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.conditionalCases != null && message.conditionalCases.length) - for (var i = 0; i < message.conditionalCases.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.encode(message.conditionalCases[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.returnPartialResponses != null && Object.hasOwnProperty.call(message, "returnPartialResponses")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.returnPartialResponses); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); return writer; }; /** - * Encodes the specified Fulfillment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Fulfillment.verify|verify} messages. + * Encodes the specified GetPageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetPageRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3.GetPageRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IFulfillment} message Fulfillment message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetPageRequest} message GetPageRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Fulfillment.encodeDelimited = function encodeDelimited(message, writer) { + GetPageRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Fulfillment message from the specified reader or buffer. + * Decodes a GetPageRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3.GetPageRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.Fulfillment} Fulfillment + * @returns {google.cloud.dialogflow.cx.v3.GetPageRequest} GetPageRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Fulfillment.decode = function decode(reader, length) { + GetPageRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Fulfillment(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetPageRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.messages && message.messages.length)) - message.messages = []; - message.messages.push($root.google.cloud.dialogflow.cx.v3.ResponseMessage.decode(reader, reader.uint32())); + message.name = reader.string(); break; } case 2: { - message.webhook = reader.string(); - break; - } - case 8: { - message.returnPartialResponses = reader.bool(); - break; - } - case 3: { - message.tag = reader.string(); - break; - } - case 4: { - if (!(message.setParameterActions && message.setParameterActions.length)) - message.setParameterActions = []; - message.setParameterActions.push($root.google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.conditionalCases && message.conditionalCases.length)) - message.conditionalCases = []; - message.conditionalCases.push($root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.decode(reader, reader.uint32())); + message.languageCode = reader.string(); break; } default: @@ -12928,1407 +14064,1036 @@ }; /** - * Decodes a Fulfillment message from the specified reader or buffer, length delimited. + * Decodes a GetPageRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3.GetPageRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Fulfillment} Fulfillment + * @returns {google.cloud.dialogflow.cx.v3.GetPageRequest} GetPageRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Fulfillment.decodeDelimited = function decodeDelimited(reader) { + GetPageRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Fulfillment message. + * Verifies a GetPageRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3.GetPageRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Fulfillment.verify = function verify(message) { + GetPageRequest.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.dialogflow.cx.v3.ResponseMessage.verify(message.messages[i]); - if (error) - return "messages." + error; - } - } - if (message.webhook != null && message.hasOwnProperty("webhook")) - if (!$util.isString(message.webhook)) - return "webhook: string expected"; - if (message.returnPartialResponses != null && message.hasOwnProperty("returnPartialResponses")) - if (typeof message.returnPartialResponses !== "boolean") - return "returnPartialResponses: boolean expected"; - if (message.tag != null && message.hasOwnProperty("tag")) - if (!$util.isString(message.tag)) - return "tag: string expected"; - if (message.setParameterActions != null && message.hasOwnProperty("setParameterActions")) { - if (!Array.isArray(message.setParameterActions)) - return "setParameterActions: array expected"; - for (var i = 0; i < message.setParameterActions.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction.verify(message.setParameterActions[i]); - if (error) - return "setParameterActions." + error; - } - } - if (message.conditionalCases != null && message.hasOwnProperty("conditionalCases")) { - if (!Array.isArray(message.conditionalCases)) - return "conditionalCases: array expected"; - for (var i = 0; i < message.conditionalCases.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.verify(message.conditionalCases[i]); - if (error) - return "conditionalCases." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a Fulfillment message from a plain object. Also converts values to their respective internal types. + * Creates a GetPageRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3.GetPageRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Fulfillment} Fulfillment + * @returns {google.cloud.dialogflow.cx.v3.GetPageRequest} GetPageRequest */ - Fulfillment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Fulfillment) + GetPageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetPageRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Fulfillment(); - if (object.messages) { - if (!Array.isArray(object.messages)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Fulfillment.messages: array expected"); - message.messages = []; - for (var i = 0; i < object.messages.length; ++i) { - if (typeof object.messages[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Fulfillment.messages: object expected"); - message.messages[i] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.fromObject(object.messages[i]); - } - } - if (object.webhook != null) - message.webhook = String(object.webhook); - if (object.returnPartialResponses != null) - message.returnPartialResponses = Boolean(object.returnPartialResponses); - if (object.tag != null) - message.tag = String(object.tag); - if (object.setParameterActions) { - if (!Array.isArray(object.setParameterActions)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Fulfillment.setParameterActions: array expected"); - message.setParameterActions = []; - for (var i = 0; i < object.setParameterActions.length; ++i) { - if (typeof object.setParameterActions[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Fulfillment.setParameterActions: object expected"); - message.setParameterActions[i] = $root.google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction.fromObject(object.setParameterActions[i]); - } - } - if (object.conditionalCases) { - if (!Array.isArray(object.conditionalCases)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Fulfillment.conditionalCases: array expected"); - message.conditionalCases = []; - for (var i = 0; i < object.conditionalCases.length; ++i) { - if (typeof object.conditionalCases[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Fulfillment.conditionalCases: object expected"); - message.conditionalCases[i] = $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.fromObject(object.conditionalCases[i]); - } - } + var message = new $root.google.cloud.dialogflow.cx.v3.GetPageRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a Fulfillment message. Also converts values to other types if specified. + * Creates a plain object from a GetPageRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3.GetPageRequest * @static - * @param {google.cloud.dialogflow.cx.v3.Fulfillment} message Fulfillment + * @param {google.cloud.dialogflow.cx.v3.GetPageRequest} message GetPageRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Fulfillment.toObject = function toObject(message, options) { + GetPageRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.messages = []; - object.setParameterActions = []; - object.conditionalCases = []; - } if (options.defaults) { - object.webhook = ""; - object.tag = ""; - object.returnPartialResponses = false; - } - if (message.messages && message.messages.length) { - object.messages = []; - for (var j = 0; j < message.messages.length; ++j) - object.messages[j] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.toObject(message.messages[j], options); - } - if (message.webhook != null && message.hasOwnProperty("webhook")) - object.webhook = message.webhook; - if (message.tag != null && message.hasOwnProperty("tag")) - object.tag = message.tag; - if (message.setParameterActions && message.setParameterActions.length) { - object.setParameterActions = []; - for (var j = 0; j < message.setParameterActions.length; ++j) - object.setParameterActions[j] = $root.google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction.toObject(message.setParameterActions[j], options); - } - if (message.conditionalCases && message.conditionalCases.length) { - object.conditionalCases = []; - for (var j = 0; j < message.conditionalCases.length; ++j) - object.conditionalCases[j] = $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.toObject(message.conditionalCases[j], options); + object.name = ""; + object.languageCode = ""; } - if (message.returnPartialResponses != null && message.hasOwnProperty("returnPartialResponses")) - object.returnPartialResponses = message.returnPartialResponses; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this Fulfillment to JSON. + * Converts this GetPageRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3.GetPageRequest * @instance * @returns {Object.} JSON object */ - Fulfillment.prototype.toJSON = function toJSON() { + GetPageRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Fulfillment + * Gets the default type url for GetPageRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3.GetPageRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Fulfillment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetPageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Fulfillment"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetPageRequest"; }; - Fulfillment.SetParameterAction = (function() { + return GetPageRequest; + })(); - /** - * Properties of a SetParameterAction. - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment - * @interface ISetParameterAction - * @property {string|null} [parameter] SetParameterAction parameter - * @property {google.protobuf.IValue|null} [value] SetParameterAction value - */ + v3.CreatePageRequest = (function() { - /** - * Constructs a new SetParameterAction. - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment - * @classdesc Represents a SetParameterAction. - * @implements ISetParameterAction - * @constructor - * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ISetParameterAction=} [properties] Properties to set - */ - function SetParameterAction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a CreatePageRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface ICreatePageRequest + * @property {string|null} [parent] CreatePageRequest parent + * @property {google.cloud.dialogflow.cx.v3.IPage|null} [page] CreatePageRequest page + * @property {string|null} [languageCode] CreatePageRequest languageCode + */ - /** - * SetParameterAction parameter. - * @member {string} parameter - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction - * @instance - */ - SetParameterAction.prototype.parameter = ""; + /** + * Constructs a new CreatePageRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a CreatePageRequest. + * @implements ICreatePageRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ICreatePageRequest=} [properties] Properties to set + */ + function CreatePageRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * SetParameterAction value. - * @member {google.protobuf.IValue|null|undefined} value - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction - * @instance - */ - SetParameterAction.prototype.value = null; + /** + * CreatePageRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.CreatePageRequest + * @instance + */ + CreatePageRequest.prototype.parent = ""; - /** - * Creates a new SetParameterAction instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction - * @static - * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ISetParameterAction=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction} SetParameterAction instance - */ - SetParameterAction.create = function create(properties) { - return new SetParameterAction(properties); - }; + /** + * CreatePageRequest page. + * @member {google.cloud.dialogflow.cx.v3.IPage|null|undefined} page + * @memberof google.cloud.dialogflow.cx.v3.CreatePageRequest + * @instance + */ + CreatePageRequest.prototype.page = null; - /** - * Encodes the specified SetParameterAction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction - * @static - * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ISetParameterAction} message SetParameterAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetParameterAction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parameter != null && Object.hasOwnProperty.call(message, "parameter")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parameter); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - $root.google.protobuf.Value.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * CreatePageRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.CreatePageRequest + * @instance + */ + CreatePageRequest.prototype.languageCode = ""; - /** - * Encodes the specified SetParameterAction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction - * @static - * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ISetParameterAction} message SetParameterAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetParameterAction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new CreatePageRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.CreatePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreatePageRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreatePageRequest} CreatePageRequest instance + */ + CreatePageRequest.create = function create(properties) { + return new CreatePageRequest(properties); + }; - /** - * Decodes a SetParameterAction message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction} SetParameterAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetParameterAction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parameter = reader.string(); - break; - } - case 2: { - message.value = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified CreatePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreatePageRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.CreatePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreatePageRequest} message CreatePageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePageRequest.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.page != null && Object.hasOwnProperty.call(message, "page")) + $root.google.cloud.dialogflow.cx.v3.Page.encode(message.page, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); + return writer; + }; + + /** + * Encodes the specified CreatePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreatePageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.CreatePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreatePageRequest} message CreatePageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreatePageRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.CreatePageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.CreatePageRequest} CreatePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePageRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreatePageRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.page = $root.google.cloud.dialogflow.cx.v3.Page.decode(reader, reader.uint32()); + break; + } + case 3: { + message.languageCode = reader.string(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a SetParameterAction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction} SetParameterAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetParameterAction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a SetParameterAction message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetParameterAction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parameter != null && message.hasOwnProperty("parameter")) - if (!$util.isString(message.parameter)) - return "parameter: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - var error = $root.google.protobuf.Value.verify(message.value); - if (error) - return "value." + error; - } - return null; - }; + /** + * Decodes a CreatePageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.CreatePageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.CreatePageRequest} CreatePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a SetParameterAction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction} SetParameterAction - */ - SetParameterAction.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction(); - if (object.parameter != null) - message.parameter = String(object.parameter); - if (object.value != null) { - if (typeof object.value !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction.value: object expected"); - message.value = $root.google.protobuf.Value.fromObject(object.value); - } - return message; - }; + /** + * Verifies a CreatePageRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.CreatePageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreatePageRequest.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.page != null && message.hasOwnProperty("page")) { + var error = $root.google.cloud.dialogflow.cx.v3.Page.verify(message.page); + if (error) + return "page." + error; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + return null; + }; - /** - * Creates a plain object from a SetParameterAction message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction - * @static - * @param {google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction} message SetParameterAction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetParameterAction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parameter = ""; - object.value = null; - } - if (message.parameter != null && message.hasOwnProperty("parameter")) - object.parameter = message.parameter; - if (message.value != null && message.hasOwnProperty("value")) - object.value = $root.google.protobuf.Value.toObject(message.value, options); + /** + * Creates a CreatePageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.CreatePageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.CreatePageRequest} CreatePageRequest + */ + CreatePageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreatePageRequest) return object; - }; + var message = new $root.google.cloud.dialogflow.cx.v3.CreatePageRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.page != null) { + if (typeof object.page !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CreatePageRequest.page: object expected"); + message.page = $root.google.cloud.dialogflow.cx.v3.Page.fromObject(object.page); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + return message; + }; - /** - * Converts this SetParameterAction to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction - * @instance - * @returns {Object.} JSON object - */ - SetParameterAction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a CreatePageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.CreatePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.CreatePageRequest} message CreatePageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreatePageRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.page = null; + object.languageCode = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.page != null && message.hasOwnProperty("page")) + object.page = $root.google.cloud.dialogflow.cx.v3.Page.toObject(message.page, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + return object; + }; - /** - * Gets the default type url for SetParameterAction - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetParameterAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction"; - }; + /** + * Converts this CreatePageRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.CreatePageRequest + * @instance + * @returns {Object.} JSON object + */ + CreatePageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return SetParameterAction; - })(); + /** + * Gets the default type url for CreatePageRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.CreatePageRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreatePageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreatePageRequest"; + }; - Fulfillment.ConditionalCases = (function() { + return CreatePageRequest; + })(); - /** - * Properties of a ConditionalCases. - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment - * @interface IConditionalCases - * @property {Array.|null} [cases] ConditionalCases cases - */ + v3.UpdatePageRequest = (function() { - /** - * Constructs a new ConditionalCases. - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment - * @classdesc Represents a ConditionalCases. - * @implements IConditionalCases - * @constructor - * @param {google.cloud.dialogflow.cx.v3.Fulfillment.IConditionalCases=} [properties] Properties to set - */ - function ConditionalCases(properties) { - this.cases = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of an UpdatePageRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IUpdatePageRequest + * @property {google.cloud.dialogflow.cx.v3.IPage|null} [page] UpdatePageRequest page + * @property {string|null} [languageCode] UpdatePageRequest languageCode + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdatePageRequest updateMask + */ - /** - * ConditionalCases cases. - * @member {Array.} cases - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases - * @instance - */ - ConditionalCases.prototype.cases = $util.emptyArray; + /** + * Constructs a new UpdatePageRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an UpdatePageRequest. + * @implements IUpdatePageRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IUpdatePageRequest=} [properties] Properties to set + */ + function UpdatePageRequest(properties) { + if (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 ConditionalCases instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases - * @static - * @param {google.cloud.dialogflow.cx.v3.Fulfillment.IConditionalCases=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases} ConditionalCases instance - */ - ConditionalCases.create = function create(properties) { - return new ConditionalCases(properties); - }; + /** + * UpdatePageRequest page. + * @member {google.cloud.dialogflow.cx.v3.IPage|null|undefined} page + * @memberof google.cloud.dialogflow.cx.v3.UpdatePageRequest + * @instance + */ + UpdatePageRequest.prototype.page = null; - /** - * Encodes the specified ConditionalCases message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases - * @static - * @param {google.cloud.dialogflow.cx.v3.Fulfillment.IConditionalCases} message ConditionalCases message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConditionalCases.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cases != null && message.cases.length) - for (var i = 0; i < message.cases.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.encode(message.cases[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * UpdatePageRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.UpdatePageRequest + * @instance + */ + UpdatePageRequest.prototype.languageCode = ""; - /** - * Encodes the specified ConditionalCases message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases - * @static - * @param {google.cloud.dialogflow.cx.v3.Fulfillment.IConditionalCases} message ConditionalCases message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConditionalCases.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * UpdatePageRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3.UpdatePageRequest + * @instance + */ + UpdatePageRequest.prototype.updateMask = null; - /** - * Decodes a ConditionalCases message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases} ConditionalCases - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConditionalCases.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.cases && message.cases.length)) - message.cases = []; - message.cases.push($root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new UpdatePageRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.UpdatePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdatePageRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.UpdatePageRequest} UpdatePageRequest instance + */ + UpdatePageRequest.create = function create(properties) { + return new UpdatePageRequest(properties); + }; - /** - * Decodes a ConditionalCases message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases} ConditionalCases - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConditionalCases.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified UpdatePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdatePageRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.UpdatePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdatePageRequest} message UpdatePageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePageRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.page != null && Object.hasOwnProperty.call(message, "page")) + $root.google.cloud.dialogflow.cx.v3.Page.encode(message.page, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + 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; + }; - /** - * Verifies a ConditionalCases message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConditionalCases.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cases != null && message.hasOwnProperty("cases")) { - if (!Array.isArray(message.cases)) - return "cases: array expected"; - for (var i = 0; i < message.cases.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.verify(message.cases[i]); - if (error) - return "cases." + error; - } - } - return null; - }; + /** + * Encodes the specified UpdatePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdatePageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.UpdatePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdatePageRequest} message UpdatePageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a ConditionalCases message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases} ConditionalCases - */ - ConditionalCases.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases(); - if (object.cases) { - if (!Array.isArray(object.cases)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.cases: array expected"); - message.cases = []; - for (var i = 0; i < object.cases.length; ++i) { - if (typeof object.cases[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.cases: object expected"); - message.cases[i] = $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.fromObject(object.cases[i]); + /** + * Decodes an UpdatePageRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.UpdatePageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.UpdatePageRequest} UpdatePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePageRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.UpdatePageRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.page = $root.google.cloud.dialogflow.cx.v3.Page.decode(reader, reader.uint32()); + break; + } + case 2: { + message.languageCode = reader.string(); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a ConditionalCases message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases - * @static - * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases} message ConditionalCases - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConditionalCases.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.cases = []; - if (message.cases && message.cases.length) { - object.cases = []; - for (var j = 0; j < message.cases.length; ++j) - object.cases[j] = $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.toObject(message.cases[j], options); - } - return object; - }; + /** + * Decodes an UpdatePageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.UpdatePageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.UpdatePageRequest} UpdatePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this ConditionalCases to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases - * @instance - * @returns {Object.} JSON object - */ - ConditionalCases.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies an UpdatePageRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.UpdatePageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdatePageRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.page != null && message.hasOwnProperty("page")) { + var error = $root.google.cloud.dialogflow.cx.v3.Page.verify(message.page); + if (error) + return "page." + error; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; - /** - * Gets the default type url for ConditionalCases - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConditionalCases.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases"; - }; + /** + * Creates an UpdatePageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.UpdatePageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.UpdatePageRequest} UpdatePageRequest + */ + UpdatePageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdatePageRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.UpdatePageRequest(); + if (object.page != null) { + if (typeof object.page !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdatePageRequest.page: object expected"); + message.page = $root.google.cloud.dialogflow.cx.v3.Page.fromObject(object.page); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdatePageRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; - ConditionalCases.Case = (function() { + /** + * Creates a plain object from an UpdatePageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.UpdatePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.UpdatePageRequest} message UpdatePageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdatePageRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.page = null; + object.languageCode = ""; + object.updateMask = null; + } + if (message.page != null && message.hasOwnProperty("page")) + object.page = $root.google.cloud.dialogflow.cx.v3.Page.toObject(message.page, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; - /** - * Properties of a Case. - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases - * @interface ICase - * @property {string|null} [condition] Case condition - * @property {Array.|null} [caseContent] Case caseContent - */ + /** + * Converts this UpdatePageRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.UpdatePageRequest + * @instance + * @returns {Object.} JSON object + */ + UpdatePageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new Case. - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases - * @classdesc Represents a Case. - * @implements ICase - * @constructor - * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.ICase=} [properties] Properties to set - */ - function Case(properties) { - this.caseContent = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Gets the default type url for UpdatePageRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.UpdatePageRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdatePageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdatePageRequest"; + }; - /** - * Case condition. - * @member {string} condition - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case - * @instance - */ - Case.prototype.condition = ""; + return UpdatePageRequest; + })(); - /** - * Case caseContent. - * @member {Array.} caseContent - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case - * @instance - */ - Case.prototype.caseContent = $util.emptyArray; + v3.DeletePageRequest = (function() { - /** - * Creates a new Case instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case - * @static - * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.ICase=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case} Case instance - */ - Case.create = function create(properties) { - return new Case(properties); - }; + /** + * Properties of a DeletePageRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IDeletePageRequest + * @property {string|null} [name] DeletePageRequest name + * @property {boolean|null} [force] DeletePageRequest force + */ - /** - * Encodes the specified Case message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case - * @static - * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.ICase} message Case message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Case.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.condition); - if (message.caseContent != null && message.caseContent.length) - for (var i = 0; i < message.caseContent.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent.encode(message.caseContent[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Constructs a new DeletePageRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a DeletePageRequest. + * @implements IDeletePageRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IDeletePageRequest=} [properties] Properties to set + */ + function DeletePageRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified Case message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case - * @static - * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.ICase} message Case message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Case.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * DeletePageRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.DeletePageRequest + * @instance + */ + DeletePageRequest.prototype.name = ""; - /** - * Decodes a Case message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case} Case - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Case.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.condition = reader.string(); - break; - } - case 2: { - if (!(message.caseContent && message.caseContent.length)) - message.caseContent = []; - message.caseContent.push($root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * DeletePageRequest force. + * @member {boolean} force + * @memberof google.cloud.dialogflow.cx.v3.DeletePageRequest + * @instance + */ + DeletePageRequest.prototype.force = false; - /** - * Decodes a Case message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case} Case - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Case.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new DeletePageRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.DeletePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeletePageRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DeletePageRequest} DeletePageRequest instance + */ + DeletePageRequest.create = function create(properties) { + return new DeletePageRequest(properties); + }; - /** - * Verifies a Case message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Case.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.condition != null && message.hasOwnProperty("condition")) - if (!$util.isString(message.condition)) - return "condition: string expected"; - if (message.caseContent != null && message.hasOwnProperty("caseContent")) { - if (!Array.isArray(message.caseContent)) - return "caseContent: array expected"; - for (var i = 0; i < message.caseContent.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent.verify(message.caseContent[i]); - if (error) - return "caseContent." + error; - } - } - return null; - }; + /** + * Encodes the specified DeletePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeletePageRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.DeletePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeletePageRequest} message DeletePageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePageRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + return writer; + }; - /** - * Creates a Case message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case} Case - */ - Case.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case(); - if (object.condition != null) - message.condition = String(object.condition); - if (object.caseContent) { - if (!Array.isArray(object.caseContent)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.caseContent: array expected"); - message.caseContent = []; - for (var i = 0; i < object.caseContent.length; ++i) { - if (typeof object.caseContent[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.caseContent: object expected"); - message.caseContent[i] = $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent.fromObject(object.caseContent[i]); - } - } - return message; - }; + /** + * Encodes the specified DeletePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeletePageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.DeletePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeletePageRequest} message DeletePageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from a Case message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case - * @static - * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case} message Case - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Case.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.caseContent = []; - if (options.defaults) - object.condition = ""; - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = message.condition; - if (message.caseContent && message.caseContent.length) { - object.caseContent = []; - for (var j = 0; j < message.caseContent.length; ++j) - object.caseContent[j] = $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent.toObject(message.caseContent[j], options); - } - return object; - }; - - /** - * Converts this Case to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case - * @instance - * @returns {Object.} JSON object - */ - Case.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Case - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Case.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Decodes a DeletePageRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.DeletePageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.DeletePageRequest} DeletePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePageRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DeletePageRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case"; - }; - - Case.CaseContent = (function() { - - /** - * Properties of a CaseContent. - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case - * @interface ICaseContent - * @property {google.cloud.dialogflow.cx.v3.IResponseMessage|null} [message] CaseContent message - * @property {google.cloud.dialogflow.cx.v3.Fulfillment.IConditionalCases|null} [additionalCases] CaseContent additionalCases - */ - - /** - * Constructs a new CaseContent. - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case - * @classdesc Represents a CaseContent. - * @implements ICaseContent - * @constructor - * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.ICaseContent=} [properties] Properties to set - */ - function CaseContent(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + case 2: { + message.force = reader.bool(); + break; } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * CaseContent message. - * @member {google.cloud.dialogflow.cx.v3.IResponseMessage|null|undefined} message - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent - * @instance - */ - CaseContent.prototype.message = null; - - /** - * CaseContent additionalCases. - * @member {google.cloud.dialogflow.cx.v3.Fulfillment.IConditionalCases|null|undefined} additionalCases - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent - * @instance - */ - CaseContent.prototype.additionalCases = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * CaseContent casesOrMessage. - * @member {"message"|"additionalCases"|undefined} casesOrMessage - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent - * @instance - */ - Object.defineProperty(CaseContent.prototype, "casesOrMessage", { - get: $util.oneOfGetter($oneOfFields = ["message", "additionalCases"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CaseContent instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.ICaseContent=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent instance - */ - CaseContent.create = function create(properties) { - return new CaseContent(properties); - }; - - /** - * Encodes the specified CaseContent message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.ICaseContent} message CaseContent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CaseContent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - $root.google.cloud.dialogflow.cx.v3.ResponseMessage.encode(message.message, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.additionalCases != null && Object.hasOwnProperty.call(message, "additionalCases")) - $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.encode(message.additionalCases, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CaseContent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.ICaseContent} message CaseContent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CaseContent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CaseContent message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CaseContent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.message = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.decode(reader, reader.uint32()); - break; - } - case 2: { - message.additionalCases = $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CaseContent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CaseContent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CaseContent message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CaseContent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.message != null && message.hasOwnProperty("message")) { - properties.casesOrMessage = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.verify(message.message); - if (error) - return "message." + error; - } - } - if (message.additionalCases != null && message.hasOwnProperty("additionalCases")) { - if (properties.casesOrMessage === 1) - return "casesOrMessage: multiple values"; - properties.casesOrMessage = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.verify(message.additionalCases); - if (error) - return "additionalCases." + error; - } - } - return null; - }; - - /** - * Creates a CaseContent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent - */ - CaseContent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent(); - if (object.message != null) { - if (typeof object.message !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent.message: object expected"); - message.message = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.fromObject(object.message); - } - if (object.additionalCases != null) { - if (typeof object.additionalCases !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent.additionalCases: object expected"); - message.additionalCases = $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.fromObject(object.additionalCases); - } - return message; - }; - - /** - * Creates a plain object from a CaseContent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent} message CaseContent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CaseContent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.message != null && message.hasOwnProperty("message")) { - object.message = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.toObject(message.message, options); - if (options.oneofs) - object.casesOrMessage = "message"; - } - if (message.additionalCases != null && message.hasOwnProperty("additionalCases")) { - object.additionalCases = $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.toObject(message.additionalCases, options); - if (options.oneofs) - object.casesOrMessage = "additionalCases"; - } - return object; - }; - - /** - * Converts this CaseContent to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent - * @instance - * @returns {Object.} JSON object - */ - CaseContent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CaseContent - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CaseContent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent"; - }; - - return CaseContent; - })(); - - return Case; - })(); - - return ConditionalCases; - })(); - - return Fulfillment; - })(); - - v3.ResponseMessage = (function() { + /** + * Decodes a DeletePageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.DeletePageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.DeletePageRequest} DeletePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Properties of a ResponseMessage. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IResponseMessage - * @property {google.cloud.dialogflow.cx.v3.ResponseMessage.IText|null} [text] ResponseMessage text - * @property {google.protobuf.IStruct|null} [payload] ResponseMessage payload - * @property {google.cloud.dialogflow.cx.v3.ResponseMessage.IConversationSuccess|null} [conversationSuccess] ResponseMessage conversationSuccess - * @property {google.cloud.dialogflow.cx.v3.ResponseMessage.IOutputAudioText|null} [outputAudioText] ResponseMessage outputAudioText - * @property {google.cloud.dialogflow.cx.v3.ResponseMessage.ILiveAgentHandoff|null} [liveAgentHandoff] ResponseMessage liveAgentHandoff - * @property {google.cloud.dialogflow.cx.v3.ResponseMessage.IEndInteraction|null} [endInteraction] ResponseMessage endInteraction - * @property {google.cloud.dialogflow.cx.v3.ResponseMessage.IPlayAudio|null} [playAudio] ResponseMessage playAudio - * @property {google.cloud.dialogflow.cx.v3.ResponseMessage.IMixedAudio|null} [mixedAudio] ResponseMessage mixedAudio - * @property {google.cloud.dialogflow.cx.v3.ResponseMessage.ITelephonyTransferCall|null} [telephonyTransferCall] ResponseMessage telephonyTransferCall - * @property {string|null} [channel] ResponseMessage channel + * Verifies a DeletePageRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.DeletePageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + DeletePageRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + return null; + }; /** - * Constructs a new ResponseMessage. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ResponseMessage. - * @implements IResponseMessage - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IResponseMessage=} [properties] Properties to set + * Creates a DeletePageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.DeletePageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.DeletePageRequest} DeletePageRequest */ - function ResponseMessage(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + DeletePageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeletePageRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.DeletePageRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); + return message; + }; /** - * ResponseMessage text. - * @member {google.cloud.dialogflow.cx.v3.ResponseMessage.IText|null|undefined} text - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage - * @instance + * Creates a plain object from a DeletePageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.DeletePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.DeletePageRequest} message DeletePageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - ResponseMessage.prototype.text = null; + DeletePageRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; /** - * ResponseMessage payload. - * @member {google.protobuf.IStruct|null|undefined} payload - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * Converts this DeletePageRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.DeletePageRequest * @instance + * @returns {Object.} JSON object */ - ResponseMessage.prototype.payload = null; + DeletePageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * ResponseMessage conversationSuccess. - * @member {google.cloud.dialogflow.cx.v3.ResponseMessage.IConversationSuccess|null|undefined} conversationSuccess - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage - * @instance + * Gets the default type url for DeletePageRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.DeletePageRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - ResponseMessage.prototype.conversationSuccess = null; + DeletePageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeletePageRequest"; + }; + + return DeletePageRequest; + })(); + + v3.Fulfillment = (function() { /** - * ResponseMessage outputAudioText. - * @member {google.cloud.dialogflow.cx.v3.ResponseMessage.IOutputAudioText|null|undefined} outputAudioText - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage - * @instance + * Properties of a Fulfillment. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IFulfillment + * @property {Array.|null} [messages] Fulfillment messages + * @property {string|null} [webhook] Fulfillment webhook + * @property {boolean|null} [returnPartialResponses] Fulfillment returnPartialResponses + * @property {string|null} [tag] Fulfillment tag + * @property {Array.|null} [setParameterActions] Fulfillment setParameterActions + * @property {Array.|null} [conditionalCases] Fulfillment conditionalCases */ - ResponseMessage.prototype.outputAudioText = null; /** - * ResponseMessage liveAgentHandoff. - * @member {google.cloud.dialogflow.cx.v3.ResponseMessage.ILiveAgentHandoff|null|undefined} liveAgentHandoff - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage - * @instance + * Constructs a new Fulfillment. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a Fulfillment. + * @implements IFulfillment + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IFulfillment=} [properties] Properties to set */ - ResponseMessage.prototype.liveAgentHandoff = null; + function Fulfillment(properties) { + this.messages = []; + this.setParameterActions = []; + this.conditionalCases = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * ResponseMessage endInteraction. - * @member {google.cloud.dialogflow.cx.v3.ResponseMessage.IEndInteraction|null|undefined} endInteraction - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * Fulfillment messages. + * @member {Array.} messages + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment * @instance */ - ResponseMessage.prototype.endInteraction = null; + Fulfillment.prototype.messages = $util.emptyArray; /** - * ResponseMessage playAudio. - * @member {google.cloud.dialogflow.cx.v3.ResponseMessage.IPlayAudio|null|undefined} playAudio - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * Fulfillment webhook. + * @member {string} webhook + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment * @instance */ - ResponseMessage.prototype.playAudio = null; + Fulfillment.prototype.webhook = ""; /** - * ResponseMessage mixedAudio. - * @member {google.cloud.dialogflow.cx.v3.ResponseMessage.IMixedAudio|null|undefined} mixedAudio - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * Fulfillment returnPartialResponses. + * @member {boolean} returnPartialResponses + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment * @instance */ - ResponseMessage.prototype.mixedAudio = null; + Fulfillment.prototype.returnPartialResponses = false; /** - * ResponseMessage telephonyTransferCall. - * @member {google.cloud.dialogflow.cx.v3.ResponseMessage.ITelephonyTransferCall|null|undefined} telephonyTransferCall - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * Fulfillment tag. + * @member {string} tag + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment * @instance */ - ResponseMessage.prototype.telephonyTransferCall = null; + Fulfillment.prototype.tag = ""; /** - * ResponseMessage channel. - * @member {string} channel - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * Fulfillment setParameterActions. + * @member {Array.} setParameterActions + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment * @instance */ - ResponseMessage.prototype.channel = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + Fulfillment.prototype.setParameterActions = $util.emptyArray; /** - * ResponseMessage message. - * @member {"text"|"payload"|"conversationSuccess"|"outputAudioText"|"liveAgentHandoff"|"endInteraction"|"playAudio"|"mixedAudio"|"telephonyTransferCall"|undefined} message - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * Fulfillment conditionalCases. + * @member {Array.} conditionalCases + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment * @instance */ - Object.defineProperty(ResponseMessage.prototype, "message", { - get: $util.oneOfGetter($oneOfFields = ["text", "payload", "conversationSuccess", "outputAudioText", "liveAgentHandoff", "endInteraction", "playAudio", "mixedAudio", "telephonyTransferCall"]), - set: $util.oneOfSetter($oneOfFields) - }); + Fulfillment.prototype.conditionalCases = $util.emptyArray; /** - * Creates a new ResponseMessage instance using the specified properties. + * Creates a new Fulfillment instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment * @static - * @param {google.cloud.dialogflow.cx.v3.IResponseMessage=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage} ResponseMessage instance + * @param {google.cloud.dialogflow.cx.v3.IFulfillment=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Fulfillment} Fulfillment instance */ - ResponseMessage.create = function create(properties) { - return new ResponseMessage(properties); + Fulfillment.create = function create(properties) { + return new Fulfillment(properties); }; /** - * Encodes the specified ResponseMessage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.verify|verify} messages. + * Encodes the specified Fulfillment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Fulfillment.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment * @static - * @param {google.cloud.dialogflow.cx.v3.IResponseMessage} message ResponseMessage message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IFulfillment} message Fulfillment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseMessage.encode = function encode(message, writer) { + Fulfillment.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - $root.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) - $root.google.protobuf.Struct.encode(message.payload, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.outputAudioText != null && Object.hasOwnProperty.call(message, "outputAudioText")) - $root.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.encode(message.outputAudioText, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.conversationSuccess != null && Object.hasOwnProperty.call(message, "conversationSuccess")) - $root.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess.encode(message.conversationSuccess, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.liveAgentHandoff != null && Object.hasOwnProperty.call(message, "liveAgentHandoff")) - $root.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.encode(message.liveAgentHandoff, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.endInteraction != null && Object.hasOwnProperty.call(message, "endInteraction")) - $root.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.encode(message.endInteraction, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.playAudio != null && Object.hasOwnProperty.call(message, "playAudio")) - $root.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.encode(message.playAudio, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.mixedAudio != null && Object.hasOwnProperty.call(message, "mixedAudio")) - $root.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.encode(message.mixedAudio, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.telephonyTransferCall != null && Object.hasOwnProperty.call(message, "telephonyTransferCall")) - $root.google.cloud.dialogflow.cx.v3.ResponseMessage.TelephonyTransferCall.encode(message.telephonyTransferCall, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) - writer.uint32(/* id 19, wireType 2 =*/154).string(message.channel); + if (message.messages != null && message.messages.length) + for (var i = 0; i < message.messages.length; ++i) + $root.google.cloud.dialogflow.cx.v3.ResponseMessage.encode(message.messages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.webhook != null && Object.hasOwnProperty.call(message, "webhook")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.webhook); + if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tag); + if (message.setParameterActions != null && message.setParameterActions.length) + for (var i = 0; i < message.setParameterActions.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction.encode(message.setParameterActions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.conditionalCases != null && message.conditionalCases.length) + for (var i = 0; i < message.conditionalCases.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.encode(message.conditionalCases[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.returnPartialResponses != null && Object.hasOwnProperty.call(message, "returnPartialResponses")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.returnPartialResponses); return writer; }; /** - * Encodes the specified ResponseMessage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.verify|verify} messages. + * Encodes the specified Fulfillment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Fulfillment.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment * @static - * @param {google.cloud.dialogflow.cx.v3.IResponseMessage} message ResponseMessage message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IFulfillment} message Fulfillment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { + Fulfillment.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResponseMessage message from the specified reader or buffer. + * Decodes a Fulfillment message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage} ResponseMessage + * @returns {google.cloud.dialogflow.cx.v3.Fulfillment} Fulfillment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseMessage.decode = function decode(reader, length) { + Fulfillment.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Fulfillment(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.text = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.decode(reader, reader.uint32()); + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.google.cloud.dialogflow.cx.v3.ResponseMessage.decode(reader, reader.uint32())); break; } case 2: { - message.payload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - case 9: { - message.conversationSuccess = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess.decode(reader, reader.uint32()); + message.webhook = reader.string(); break; } case 8: { - message.outputAudioText = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.decode(reader, reader.uint32()); - break; - } - case 10: { - message.liveAgentHandoff = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.decode(reader, reader.uint32()); - break; - } - case 11: { - message.endInteraction = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.decode(reader, reader.uint32()); - break; - } - case 12: { - message.playAudio = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.decode(reader, reader.uint32()); + message.returnPartialResponses = reader.bool(); break; } - case 13: { - message.mixedAudio = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.decode(reader, reader.uint32()); + case 3: { + message.tag = reader.string(); break; } - case 18: { - message.telephonyTransferCall = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.TelephonyTransferCall.decode(reader, reader.uint32()); + case 4: { + if (!(message.setParameterActions && message.setParameterActions.length)) + message.setParameterActions = []; + message.setParameterActions.push($root.google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction.decode(reader, reader.uint32())); break; } - case 19: { - message.channel = reader.string(); + case 5: { + if (!(message.conditionalCases && message.conditionalCases.length)) + message.conditionalCases = []; + message.conditionalCases.push($root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.decode(reader, reader.uint32())); break; } default: @@ -14340,300 +15105,214 @@ }; /** - * Decodes a ResponseMessage message from the specified reader or buffer, length delimited. + * Decodes a Fulfillment message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage} ResponseMessage + * @returns {google.cloud.dialogflow.cx.v3.Fulfillment} Fulfillment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseMessage.decodeDelimited = function decodeDelimited(reader) { + Fulfillment.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResponseMessage message. + * Verifies a Fulfillment message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResponseMessage.verify = function verify(message) { + Fulfillment.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.text != null && message.hasOwnProperty("text")) { - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.verify(message.text); - if (error) - return "text." + error; - } - } - if (message.payload != null && message.hasOwnProperty("payload")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.protobuf.Struct.verify(message.payload); - if (error) - return "payload." + error; - } - } - if (message.conversationSuccess != null && message.hasOwnProperty("conversationSuccess")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess.verify(message.conversationSuccess); - if (error) - return "conversationSuccess." + error; - } - } - if (message.outputAudioText != null && message.hasOwnProperty("outputAudioText")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.verify(message.outputAudioText); - if (error) - return "outputAudioText." + error; - } - } - if (message.liveAgentHandoff != null && message.hasOwnProperty("liveAgentHandoff")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.verify(message.liveAgentHandoff); - if (error) - return "liveAgentHandoff." + error; - } - } - if (message.endInteraction != null && message.hasOwnProperty("endInteraction")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.verify(message.endInteraction); - if (error) - return "endInteraction." + error; - } - } - if (message.playAudio != null && message.hasOwnProperty("playAudio")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.verify(message.playAudio); + 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.dialogflow.cx.v3.ResponseMessage.verify(message.messages[i]); if (error) - return "playAudio." + error; + return "messages." + error; } } - if (message.mixedAudio != null && message.hasOwnProperty("mixedAudio")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.verify(message.mixedAudio); + if (message.webhook != null && message.hasOwnProperty("webhook")) + if (!$util.isString(message.webhook)) + return "webhook: string expected"; + if (message.returnPartialResponses != null && message.hasOwnProperty("returnPartialResponses")) + if (typeof message.returnPartialResponses !== "boolean") + return "returnPartialResponses: boolean expected"; + if (message.tag != null && message.hasOwnProperty("tag")) + if (!$util.isString(message.tag)) + return "tag: string expected"; + if (message.setParameterActions != null && message.hasOwnProperty("setParameterActions")) { + if (!Array.isArray(message.setParameterActions)) + return "setParameterActions: array expected"; + for (var i = 0; i < message.setParameterActions.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction.verify(message.setParameterActions[i]); if (error) - return "mixedAudio." + error; + return "setParameterActions." + error; } } - if (message.telephonyTransferCall != null && message.hasOwnProperty("telephonyTransferCall")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.TelephonyTransferCall.verify(message.telephonyTransferCall); + if (message.conditionalCases != null && message.hasOwnProperty("conditionalCases")) { + if (!Array.isArray(message.conditionalCases)) + return "conditionalCases: array expected"; + for (var i = 0; i < message.conditionalCases.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.verify(message.conditionalCases[i]); if (error) - return "telephonyTransferCall." + error; + return "conditionalCases." + error; } } - if (message.channel != null && message.hasOwnProperty("channel")) - if (!$util.isString(message.channel)) - return "channel: string expected"; return null; }; /** - * Creates a ResponseMessage message from a plain object. Also converts values to their respective internal types. + * Creates a Fulfillment message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage} ResponseMessage + * @returns {google.cloud.dialogflow.cx.v3.Fulfillment} Fulfillment */ - ResponseMessage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ResponseMessage) + Fulfillment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Fulfillment) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage(); - if (object.text != null) { - if (typeof object.text !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ResponseMessage.text: object expected"); - message.text = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.fromObject(object.text); - } - if (object.payload != null) { - if (typeof object.payload !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ResponseMessage.payload: object expected"); - message.payload = $root.google.protobuf.Struct.fromObject(object.payload); - } - if (object.conversationSuccess != null) { - if (typeof object.conversationSuccess !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ResponseMessage.conversationSuccess: object expected"); - message.conversationSuccess = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess.fromObject(object.conversationSuccess); - } - if (object.outputAudioText != null) { - if (typeof object.outputAudioText !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ResponseMessage.outputAudioText: object expected"); - message.outputAudioText = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.fromObject(object.outputAudioText); - } - if (object.liveAgentHandoff != null) { - if (typeof object.liveAgentHandoff !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ResponseMessage.liveAgentHandoff: object expected"); - message.liveAgentHandoff = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.fromObject(object.liveAgentHandoff); - } - if (object.endInteraction != null) { - if (typeof object.endInteraction !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ResponseMessage.endInteraction: object expected"); - message.endInteraction = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.fromObject(object.endInteraction); - } - if (object.playAudio != null) { - if (typeof object.playAudio !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ResponseMessage.playAudio: object expected"); - message.playAudio = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.fromObject(object.playAudio); + var message = new $root.google.cloud.dialogflow.cx.v3.Fulfillment(); + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Fulfillment.messages: array expected"); + message.messages = []; + for (var i = 0; i < object.messages.length; ++i) { + if (typeof object.messages[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Fulfillment.messages: object expected"); + message.messages[i] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.fromObject(object.messages[i]); + } } - if (object.mixedAudio != null) { - if (typeof object.mixedAudio !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ResponseMessage.mixedAudio: object expected"); - message.mixedAudio = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.fromObject(object.mixedAudio); + if (object.webhook != null) + message.webhook = String(object.webhook); + if (object.returnPartialResponses != null) + message.returnPartialResponses = Boolean(object.returnPartialResponses); + if (object.tag != null) + message.tag = String(object.tag); + if (object.setParameterActions) { + if (!Array.isArray(object.setParameterActions)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Fulfillment.setParameterActions: array expected"); + message.setParameterActions = []; + for (var i = 0; i < object.setParameterActions.length; ++i) { + if (typeof object.setParameterActions[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Fulfillment.setParameterActions: object expected"); + message.setParameterActions[i] = $root.google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction.fromObject(object.setParameterActions[i]); + } } - if (object.telephonyTransferCall != null) { - if (typeof object.telephonyTransferCall !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ResponseMessage.telephonyTransferCall: object expected"); - message.telephonyTransferCall = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.TelephonyTransferCall.fromObject(object.telephonyTransferCall); + if (object.conditionalCases) { + if (!Array.isArray(object.conditionalCases)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Fulfillment.conditionalCases: array expected"); + message.conditionalCases = []; + for (var i = 0; i < object.conditionalCases.length; ++i) { + if (typeof object.conditionalCases[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Fulfillment.conditionalCases: object expected"); + message.conditionalCases[i] = $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.fromObject(object.conditionalCases[i]); + } } - if (object.channel != null) - message.channel = String(object.channel); return message; }; /** - * Creates a plain object from a ResponseMessage message. Also converts values to other types if specified. + * Creates a plain object from a Fulfillment message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage} message ResponseMessage + * @param {google.cloud.dialogflow.cx.v3.Fulfillment} message Fulfillment * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResponseMessage.toObject = function toObject(message, options) { + Fulfillment.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.channel = ""; - if (message.text != null && message.hasOwnProperty("text")) { - object.text = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.toObject(message.text, options); - if (options.oneofs) - object.message = "text"; - } - if (message.payload != null && message.hasOwnProperty("payload")) { - object.payload = $root.google.protobuf.Struct.toObject(message.payload, options); - if (options.oneofs) - object.message = "payload"; - } - if (message.outputAudioText != null && message.hasOwnProperty("outputAudioText")) { - object.outputAudioText = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.toObject(message.outputAudioText, options); - if (options.oneofs) - object.message = "outputAudioText"; - } - if (message.conversationSuccess != null && message.hasOwnProperty("conversationSuccess")) { - object.conversationSuccess = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess.toObject(message.conversationSuccess, options); - if (options.oneofs) - object.message = "conversationSuccess"; - } - if (message.liveAgentHandoff != null && message.hasOwnProperty("liveAgentHandoff")) { - object.liveAgentHandoff = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.toObject(message.liveAgentHandoff, options); - if (options.oneofs) - object.message = "liveAgentHandoff"; + if (options.arrays || options.defaults) { + object.messages = []; + object.setParameterActions = []; + object.conditionalCases = []; } - if (message.endInteraction != null && message.hasOwnProperty("endInteraction")) { - object.endInteraction = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.toObject(message.endInteraction, options); - if (options.oneofs) - object.message = "endInteraction"; + if (options.defaults) { + object.webhook = ""; + object.tag = ""; + object.returnPartialResponses = false; } - if (message.playAudio != null && message.hasOwnProperty("playAudio")) { - object.playAudio = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.toObject(message.playAudio, options); - if (options.oneofs) - object.message = "playAudio"; + if (message.messages && message.messages.length) { + object.messages = []; + for (var j = 0; j < message.messages.length; ++j) + object.messages[j] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.toObject(message.messages[j], options); } - if (message.mixedAudio != null && message.hasOwnProperty("mixedAudio")) { - object.mixedAudio = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.toObject(message.mixedAudio, options); - if (options.oneofs) - object.message = "mixedAudio"; + if (message.webhook != null && message.hasOwnProperty("webhook")) + object.webhook = message.webhook; + if (message.tag != null && message.hasOwnProperty("tag")) + object.tag = message.tag; + if (message.setParameterActions && message.setParameterActions.length) { + object.setParameterActions = []; + for (var j = 0; j < message.setParameterActions.length; ++j) + object.setParameterActions[j] = $root.google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction.toObject(message.setParameterActions[j], options); } - if (message.telephonyTransferCall != null && message.hasOwnProperty("telephonyTransferCall")) { - object.telephonyTransferCall = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.TelephonyTransferCall.toObject(message.telephonyTransferCall, options); - if (options.oneofs) - object.message = "telephonyTransferCall"; + if (message.conditionalCases && message.conditionalCases.length) { + object.conditionalCases = []; + for (var j = 0; j < message.conditionalCases.length; ++j) + object.conditionalCases[j] = $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.toObject(message.conditionalCases[j], options); } - if (message.channel != null && message.hasOwnProperty("channel")) - object.channel = message.channel; + if (message.returnPartialResponses != null && message.hasOwnProperty("returnPartialResponses")) + object.returnPartialResponses = message.returnPartialResponses; return object; }; /** - * Converts this ResponseMessage to JSON. + * Converts this Fulfillment to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment * @instance * @returns {Object.} JSON object */ - ResponseMessage.prototype.toJSON = function toJSON() { + Fulfillment.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResponseMessage + * Gets the default type url for Fulfillment * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResponseMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Fulfillment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ResponseMessage"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Fulfillment"; }; - ResponseMessage.Text = (function() { + Fulfillment.SetParameterAction = (function() { /** - * Properties of a Text. - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage - * @interface IText - * @property {Array.|null} [text] Text text - * @property {boolean|null} [allowPlaybackInterruption] Text allowPlaybackInterruption + * Properties of a SetParameterAction. + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment + * @interface ISetParameterAction + * @property {string|null} [parameter] SetParameterAction parameter + * @property {google.protobuf.IValue|null} [value] SetParameterAction value */ /** - * Constructs a new Text. - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage - * @classdesc Represents a Text. - * @implements IText + * Constructs a new SetParameterAction. + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment + * @classdesc Represents a SetParameterAction. + * @implements ISetParameterAction * @constructor - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IText=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ISetParameterAction=} [properties] Properties to set */ - function Text(properties) { - this.text = []; + function SetParameterAction(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14641,92 +15320,89 @@ } /** - * Text text. - * @member {Array.} text - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.Text + * SetParameterAction parameter. + * @member {string} parameter + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction * @instance */ - Text.prototype.text = $util.emptyArray; + SetParameterAction.prototype.parameter = ""; /** - * Text allowPlaybackInterruption. - * @member {boolean} allowPlaybackInterruption - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.Text - * @instance + * SetParameterAction value. + * @member {google.protobuf.IValue|null|undefined} value + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction + * @instance */ - Text.prototype.allowPlaybackInterruption = false; + SetParameterAction.prototype.value = null; /** - * Creates a new Text instance using the specified properties. + * Creates a new SetParameterAction instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.Text + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IText=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.Text} Text instance + * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ISetParameterAction=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction} SetParameterAction instance */ - Text.create = function create(properties) { - return new Text(properties); + SetParameterAction.create = function create(properties) { + return new SetParameterAction(properties); }; /** - * Encodes the specified Text message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.Text.verify|verify} messages. + * Encodes the specified SetParameterAction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.Text + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IText} message Text message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ISetParameterAction} message SetParameterAction message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Text.encode = function encode(message, writer) { + SetParameterAction.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.text != null && message.text.length) - for (var i = 0; i < message.text.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text[i]); - if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowPlaybackInterruption); + if (message.parameter != null && Object.hasOwnProperty.call(message, "parameter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parameter); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.google.protobuf.Value.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Text message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.Text.verify|verify} messages. + * Encodes the specified SetParameterAction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.Text + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IText} message Text message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ISetParameterAction} message SetParameterAction message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Text.encodeDelimited = function encodeDelimited(message, writer) { + SetParameterAction.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Text message from the specified reader or buffer. + * Decodes a SetParameterAction message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.Text + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.Text} Text + * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction} SetParameterAction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Text.decode = function decode(reader, length) { + SetParameterAction.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.Text(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.text && message.text.length)) - message.text = []; - message.text.push(reader.string()); + message.parameter = reader.string(); break; } case 2: { - message.allowPlaybackInterruption = reader.bool(); + message.value = $root.google.protobuf.Value.decode(reader, reader.uint32()); break; } default: @@ -14738,143 +15414,137 @@ }; /** - * Decodes a Text message from the specified reader or buffer, length delimited. + * Decodes a SetParameterAction message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.Text + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.Text} Text + * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction} SetParameterAction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Text.decodeDelimited = function decodeDelimited(reader) { + SetParameterAction.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Text message. + * Verifies a SetParameterAction message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.Text + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Text.verify = function verify(message) { + SetParameterAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) { - if (!Array.isArray(message.text)) - return "text: array expected"; - for (var i = 0; i < message.text.length; ++i) - if (!$util.isString(message.text[i])) - return "text: string[] expected"; + if (message.parameter != null && message.hasOwnProperty("parameter")) + if (!$util.isString(message.parameter)) + return "parameter: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.google.protobuf.Value.verify(message.value); + if (error) + return "value." + error; } - if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) - if (typeof message.allowPlaybackInterruption !== "boolean") - return "allowPlaybackInterruption: boolean expected"; return null; }; /** - * Creates a Text message from a plain object. Also converts values to their respective internal types. + * Creates a SetParameterAction message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.Text + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.Text} Text + * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction} SetParameterAction */ - Text.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ResponseMessage.Text) + SetParameterAction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.Text(); - if (object.text) { - if (!Array.isArray(object.text)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ResponseMessage.Text.text: array expected"); - message.text = []; - for (var i = 0; i < object.text.length; ++i) - message.text[i] = String(object.text[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction(); + if (object.parameter != null) + message.parameter = String(object.parameter); + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction.value: object expected"); + message.value = $root.google.protobuf.Value.fromObject(object.value); } - if (object.allowPlaybackInterruption != null) - message.allowPlaybackInterruption = Boolean(object.allowPlaybackInterruption); return message; }; /** - * Creates a plain object from a Text message. Also converts values to other types if specified. + * Creates a plain object from a SetParameterAction message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.Text + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.Text} message Text + * @param {google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction} message SetParameterAction * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Text.toObject = function toObject(message, options) { + SetParameterAction.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.text = []; - if (options.defaults) - object.allowPlaybackInterruption = false; - if (message.text && message.text.length) { - object.text = []; - for (var j = 0; j < message.text.length; ++j) - object.text[j] = message.text[j]; + if (options.defaults) { + object.parameter = ""; + object.value = null; } - if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) - object.allowPlaybackInterruption = message.allowPlaybackInterruption; + if (message.parameter != null && message.hasOwnProperty("parameter")) + object.parameter = message.parameter; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.google.protobuf.Value.toObject(message.value, options); return object; }; /** - * Converts this Text to JSON. + * Converts this SetParameterAction to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.Text + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction * @instance * @returns {Object.} JSON object */ - Text.prototype.toJSON = function toJSON() { + SetParameterAction.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Text + * Gets the default type url for SetParameterAction * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.Text + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Text.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SetParameterAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ResponseMessage.Text"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Fulfillment.SetParameterAction"; }; - return Text; + return SetParameterAction; })(); - ResponseMessage.LiveAgentHandoff = (function() { + Fulfillment.ConditionalCases = (function() { /** - * Properties of a LiveAgentHandoff. - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage - * @interface ILiveAgentHandoff - * @property {google.protobuf.IStruct|null} [metadata] LiveAgentHandoff metadata + * Properties of a ConditionalCases. + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment + * @interface IConditionalCases + * @property {Array.|null} [cases] ConditionalCases cases */ /** - * Constructs a new LiveAgentHandoff. - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage - * @classdesc Represents a LiveAgentHandoff. - * @implements ILiveAgentHandoff + * Constructs a new ConditionalCases. + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment + * @classdesc Represents a ConditionalCases. + * @implements IConditionalCases * @constructor - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.ILiveAgentHandoff=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.Fulfillment.IConditionalCases=} [properties] Properties to set */ - function LiveAgentHandoff(properties) { + function ConditionalCases(properties) { + this.cases = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14882,75 +15552,78 @@ } /** - * LiveAgentHandoff metadata. - * @member {google.protobuf.IStruct|null|undefined} metadata - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff + * ConditionalCases cases. + * @member {Array.} cases + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases * @instance */ - LiveAgentHandoff.prototype.metadata = null; + ConditionalCases.prototype.cases = $util.emptyArray; /** - * Creates a new LiveAgentHandoff instance using the specified properties. + * Creates a new ConditionalCases instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.ILiveAgentHandoff=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff instance + * @param {google.cloud.dialogflow.cx.v3.Fulfillment.IConditionalCases=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases} ConditionalCases instance */ - LiveAgentHandoff.create = function create(properties) { - return new LiveAgentHandoff(properties); + ConditionalCases.create = function create(properties) { + return new ConditionalCases(properties); }; /** - * Encodes the specified LiveAgentHandoff message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.verify|verify} messages. + * Encodes the specified ConditionalCases message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.ILiveAgentHandoff} message LiveAgentHandoff message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.Fulfillment.IConditionalCases} message ConditionalCases message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LiveAgentHandoff.encode = function encode(message, writer) { + ConditionalCases.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.protobuf.Struct.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.cases != null && message.cases.length) + for (var i = 0; i < message.cases.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.encode(message.cases[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified LiveAgentHandoff message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.verify|verify} messages. + * Encodes the specified ConditionalCases message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.ILiveAgentHandoff} message LiveAgentHandoff message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.Fulfillment.IConditionalCases} message ConditionalCases message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LiveAgentHandoff.encodeDelimited = function encodeDelimited(message, writer) { + ConditionalCases.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LiveAgentHandoff message from the specified reader or buffer. + * Decodes a ConditionalCases message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff + * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases} ConditionalCases * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LiveAgentHandoff.decode = function decode(reader, length) { + ConditionalCases.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.metadata = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + if (!(message.cases && message.cases.length)) + message.cases = []; + message.cases.push($root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.decode(reader, reader.uint32())); break; } default: @@ -14962,608 +15635,1182 @@ }; /** - * Decodes a LiveAgentHandoff message from the specified reader or buffer, length delimited. + * Decodes a ConditionalCases message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff + * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases} ConditionalCases * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LiveAgentHandoff.decodeDelimited = function decodeDelimited(reader) { + ConditionalCases.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LiveAgentHandoff message. + * Verifies a ConditionalCases message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LiveAgentHandoff.verify = function verify(message) { + ConditionalCases.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.protobuf.Struct.verify(message.metadata); - if (error) - return "metadata." + error; + if (message.cases != null && message.hasOwnProperty("cases")) { + if (!Array.isArray(message.cases)) + return "cases: array expected"; + for (var i = 0; i < message.cases.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.verify(message.cases[i]); + if (error) + return "cases." + error; + } } return null; }; /** - * Creates a LiveAgentHandoff message from a plain object. Also converts values to their respective internal types. + * Creates a ConditionalCases message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff + * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases} ConditionalCases */ - LiveAgentHandoff.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff) + ConditionalCases.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff(); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.metadata: object expected"); - message.metadata = $root.google.protobuf.Struct.fromObject(object.metadata); + var message = new $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases(); + if (object.cases) { + if (!Array.isArray(object.cases)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.cases: array expected"); + message.cases = []; + for (var i = 0; i < object.cases.length; ++i) { + if (typeof object.cases[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.cases: object expected"); + message.cases[i] = $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.fromObject(object.cases[i]); + } } return message; }; /** - * Creates a plain object from a LiveAgentHandoff message. Also converts values to other types if specified. + * Creates a plain object from a ConditionalCases message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff} message LiveAgentHandoff + * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases} message ConditionalCases * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LiveAgentHandoff.toObject = function toObject(message, options) { + ConditionalCases.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.metadata = null; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.protobuf.Struct.toObject(message.metadata, options); + if (options.arrays || options.defaults) + object.cases = []; + if (message.cases && message.cases.length) { + object.cases = []; + for (var j = 0; j < message.cases.length; ++j) + object.cases[j] = $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.toObject(message.cases[j], options); + } return object; }; /** - * Converts this LiveAgentHandoff to JSON. + * Converts this ConditionalCases to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases * @instance * @returns {Object.} JSON object */ - LiveAgentHandoff.prototype.toJSON = function toJSON() { + ConditionalCases.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for LiveAgentHandoff + * Gets the default type url for ConditionalCases * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - LiveAgentHandoff.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ConditionalCases.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases"; }; - return LiveAgentHandoff; - })(); + ConditionalCases.Case = (function() { - ResponseMessage.ConversationSuccess = (function() { + /** + * Properties of a Case. + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases + * @interface ICase + * @property {string|null} [condition] Case condition + * @property {Array.|null} [caseContent] Case caseContent + */ - /** - * Properties of a ConversationSuccess. - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage - * @interface IConversationSuccess - * @property {google.protobuf.IStruct|null} [metadata] ConversationSuccess metadata - */ + /** + * Constructs a new Case. + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases + * @classdesc Represents a Case. + * @implements ICase + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.ICase=} [properties] Properties to set + */ + function Case(properties) { + this.caseContent = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new ConversationSuccess. - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage - * @classdesc Represents a ConversationSuccess. - * @implements IConversationSuccess - * @constructor - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IConversationSuccess=} [properties] Properties to set - */ - function ConversationSuccess(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Case condition. + * @member {string} condition + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case + * @instance + */ + Case.prototype.condition = ""; - /** - * ConversationSuccess metadata. - * @member {google.protobuf.IStruct|null|undefined} metadata - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess - * @instance - */ - ConversationSuccess.prototype.metadata = null; + /** + * Case caseContent. + * @member {Array.} caseContent + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case + * @instance + */ + Case.prototype.caseContent = $util.emptyArray; - /** - * Creates a new ConversationSuccess instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess - * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IConversationSuccess=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess} ConversationSuccess instance - */ - ConversationSuccess.create = function create(properties) { - return new ConversationSuccess(properties); - }; + /** + * Creates a new Case instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case + * @static + * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.ICase=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case} Case instance + */ + Case.create = function create(properties) { + return new Case(properties); + }; - /** - * Encodes the specified ConversationSuccess message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess - * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IConversationSuccess} message ConversationSuccess message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConversationSuccess.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.protobuf.Struct.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified Case message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case + * @static + * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.ICase} message Case message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Case.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.condition); + if (message.caseContent != null && message.caseContent.length) + for (var i = 0; i < message.caseContent.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent.encode(message.caseContent[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified ConversationSuccess message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess - * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IConversationSuccess} message ConversationSuccess message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConversationSuccess.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Case message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case + * @static + * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.ICase} message Case message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Case.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ConversationSuccess message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess} ConversationSuccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConversationSuccess.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.metadata = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + /** + * Decodes a Case message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case} Case + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Case.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.condition = reader.string(); + break; + } + case 2: { + if (!(message.caseContent && message.caseContent.length)) + message.caseContent = []; + message.caseContent.push($root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a ConversationSuccess message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess} ConversationSuccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConversationSuccess.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Case message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case} Case + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Case.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a ConversationSuccess message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConversationSuccess.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.protobuf.Struct.verify(message.metadata); - if (error) - return "metadata." + error; - } - return null; - }; + /** + * Verifies a Case message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Case.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.condition != null && message.hasOwnProperty("condition")) + if (!$util.isString(message.condition)) + return "condition: string expected"; + if (message.caseContent != null && message.hasOwnProperty("caseContent")) { + if (!Array.isArray(message.caseContent)) + return "caseContent: array expected"; + for (var i = 0; i < message.caseContent.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent.verify(message.caseContent[i]); + if (error) + return "caseContent." + error; + } + } + return null; + }; - /** - * Creates a ConversationSuccess message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess} ConversationSuccess - */ - ConversationSuccess.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess(); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess.metadata: object expected"); - message.metadata = $root.google.protobuf.Struct.fromObject(object.metadata); - } - return message; - }; + /** + * Creates a Case message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case} Case + */ + Case.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case(); + if (object.condition != null) + message.condition = String(object.condition); + if (object.caseContent) { + if (!Array.isArray(object.caseContent)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.caseContent: array expected"); + message.caseContent = []; + for (var i = 0; i < object.caseContent.length; ++i) { + if (typeof object.caseContent[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.caseContent: object expected"); + message.caseContent[i] = $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent.fromObject(object.caseContent[i]); + } + } + return message; + }; - /** - * Creates a plain object from a ConversationSuccess message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess - * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess} message ConversationSuccess - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConversationSuccess.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.metadata = null; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.protobuf.Struct.toObject(message.metadata, options); - return object; - }; + /** + * Creates a plain object from a Case message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case + * @static + * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case} message Case + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Case.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.caseContent = []; + if (options.defaults) + object.condition = ""; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = message.condition; + if (message.caseContent && message.caseContent.length) { + object.caseContent = []; + for (var j = 0; j < message.caseContent.length; ++j) + object.caseContent[j] = $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent.toObject(message.caseContent[j], options); + } + return object; + }; - /** - * Converts this ConversationSuccess to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess - * @instance - * @returns {Object.} JSON object - */ - ConversationSuccess.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this Case to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case + * @instance + * @returns {Object.} JSON object + */ + Case.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for ConversationSuccess - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConversationSuccess.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess"; - }; + /** + * Gets the default type url for Case + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Case.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case"; + }; - return ConversationSuccess; - })(); + Case.CaseContent = (function() { - ResponseMessage.OutputAudioText = (function() { + /** + * Properties of a CaseContent. + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case + * @interface ICaseContent + * @property {google.cloud.dialogflow.cx.v3.IResponseMessage|null} [message] CaseContent message + * @property {google.cloud.dialogflow.cx.v3.Fulfillment.IConditionalCases|null} [additionalCases] CaseContent additionalCases + */ - /** - * Properties of an OutputAudioText. - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage - * @interface IOutputAudioText - * @property {string|null} [text] OutputAudioText text - * @property {string|null} [ssml] OutputAudioText ssml - * @property {boolean|null} [allowPlaybackInterruption] OutputAudioText allowPlaybackInterruption - */ + /** + * Constructs a new CaseContent. + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case + * @classdesc Represents a CaseContent. + * @implements ICaseContent + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.ICaseContent=} [properties] Properties to set + */ + function CaseContent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new OutputAudioText. - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage - * @classdesc Represents an OutputAudioText. - * @implements IOutputAudioText - * @constructor - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IOutputAudioText=} [properties] Properties to set - */ - function OutputAudioText(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * CaseContent message. + * @member {google.cloud.dialogflow.cx.v3.IResponseMessage|null|undefined} message + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent + * @instance + */ + CaseContent.prototype.message = null; - /** - * OutputAudioText text. - * @member {string|null|undefined} text - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText - * @instance - */ - OutputAudioText.prototype.text = null; + /** + * CaseContent additionalCases. + * @member {google.cloud.dialogflow.cx.v3.Fulfillment.IConditionalCases|null|undefined} additionalCases + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent + * @instance + */ + CaseContent.prototype.additionalCases = null; - /** - * OutputAudioText ssml. - * @member {string|null|undefined} ssml - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText - * @instance - */ - OutputAudioText.prototype.ssml = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * OutputAudioText allowPlaybackInterruption. - * @member {boolean} allowPlaybackInterruption - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText - * @instance - */ - OutputAudioText.prototype.allowPlaybackInterruption = false; + /** + * CaseContent casesOrMessage. + * @member {"message"|"additionalCases"|undefined} casesOrMessage + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent + * @instance + */ + Object.defineProperty(CaseContent.prototype, "casesOrMessage", { + get: $util.oneOfGetter($oneOfFields = ["message", "additionalCases"]), + set: $util.oneOfSetter($oneOfFields) + }); - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Creates a new CaseContent instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.ICaseContent=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent instance + */ + CaseContent.create = function create(properties) { + return new CaseContent(properties); + }; - /** - * OutputAudioText source. - * @member {"text"|"ssml"|undefined} source - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText - * @instance - */ - Object.defineProperty(OutputAudioText.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["text", "ssml"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Encodes the specified CaseContent message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.ICaseContent} message CaseContent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CaseContent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + $root.google.cloud.dialogflow.cx.v3.ResponseMessage.encode(message.message, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.additionalCases != null && Object.hasOwnProperty.call(message, "additionalCases")) + $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.encode(message.additionalCases, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Creates a new OutputAudioText instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText - * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IOutputAudioText=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText} OutputAudioText instance - */ - OutputAudioText.create = function create(properties) { - return new OutputAudioText(properties); - }; + /** + * Encodes the specified CaseContent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.ICaseContent} message CaseContent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CaseContent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified OutputAudioText message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText - * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IOutputAudioText} message OutputAudioText message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OutputAudioText.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); - if (message.ssml != null && Object.hasOwnProperty.call(message, "ssml")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.ssml); - if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowPlaybackInterruption); - return writer; - }; + /** + * Decodes a CaseContent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CaseContent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.message = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.decode(reader, reader.uint32()); + break; + } + case 2: { + message.additionalCases = $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified OutputAudioText message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText - * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IOutputAudioText} message OutputAudioText message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OutputAudioText.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a CaseContent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CaseContent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes an OutputAudioText message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText} OutputAudioText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OutputAudioText.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.text = reader.string(); - break; - } - case 2: { - message.ssml = reader.string(); - break; - } - case 3: { - message.allowPlaybackInterruption = reader.bool(); - break; + /** + * Verifies a CaseContent message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CaseContent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.message != null && message.hasOwnProperty("message")) { + properties.casesOrMessage = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.verify(message.message); + if (error) + return "message." + error; + } } - default: - reader.skipType(tag & 7); - break; + if (message.additionalCases != null && message.hasOwnProperty("additionalCases")) { + if (properties.casesOrMessage === 1) + return "casesOrMessage: multiple values"; + properties.casesOrMessage = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.verify(message.additionalCases); + if (error) + return "additionalCases." + error; + } + } + return null; + }; + + /** + * Creates a CaseContent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent + */ + CaseContent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent(); + if (object.message != null) { + if (typeof object.message !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent.message: object expected"); + message.message = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.fromObject(object.message); + } + if (object.additionalCases != null) { + if (typeof object.additionalCases !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent.additionalCases: object expected"); + message.additionalCases = $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.fromObject(object.additionalCases); + } + return message; + }; + + /** + * Creates a plain object from a CaseContent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent} message CaseContent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CaseContent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.message != null && message.hasOwnProperty("message")) { + object.message = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.toObject(message.message, options); + if (options.oneofs) + object.casesOrMessage = "message"; + } + if (message.additionalCases != null && message.hasOwnProperty("additionalCases")) { + object.additionalCases = $root.google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.toObject(message.additionalCases, options); + if (options.oneofs) + object.casesOrMessage = "additionalCases"; + } + return object; + }; + + /** + * Converts this CaseContent to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent + * @instance + * @returns {Object.} JSON object + */ + CaseContent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CaseContent + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CaseContent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Fulfillment.ConditionalCases.Case.CaseContent"; + }; + + return CaseContent; + })(); + + return Case; + })(); + + return ConditionalCases; + })(); + + return Fulfillment; + })(); + + v3.ResponseMessage = (function() { + + /** + * Properties of a ResponseMessage. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IResponseMessage + * @property {google.cloud.dialogflow.cx.v3.ResponseMessage.IText|null} [text] ResponseMessage text + * @property {google.protobuf.IStruct|null} [payload] ResponseMessage payload + * @property {google.cloud.dialogflow.cx.v3.ResponseMessage.IConversationSuccess|null} [conversationSuccess] ResponseMessage conversationSuccess + * @property {google.cloud.dialogflow.cx.v3.ResponseMessage.IOutputAudioText|null} [outputAudioText] ResponseMessage outputAudioText + * @property {google.cloud.dialogflow.cx.v3.ResponseMessage.ILiveAgentHandoff|null} [liveAgentHandoff] ResponseMessage liveAgentHandoff + * @property {google.cloud.dialogflow.cx.v3.ResponseMessage.IEndInteraction|null} [endInteraction] ResponseMessage endInteraction + * @property {google.cloud.dialogflow.cx.v3.ResponseMessage.IPlayAudio|null} [playAudio] ResponseMessage playAudio + * @property {google.cloud.dialogflow.cx.v3.ResponseMessage.IMixedAudio|null} [mixedAudio] ResponseMessage mixedAudio + * @property {google.cloud.dialogflow.cx.v3.ResponseMessage.ITelephonyTransferCall|null} [telephonyTransferCall] ResponseMessage telephonyTransferCall + * @property {string|null} [channel] ResponseMessage channel + */ + + /** + * Constructs a new ResponseMessage. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ResponseMessage. + * @implements IResponseMessage + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IResponseMessage=} [properties] Properties to set + */ + function ResponseMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseMessage text. + * @member {google.cloud.dialogflow.cx.v3.ResponseMessage.IText|null|undefined} text + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @instance + */ + ResponseMessage.prototype.text = null; + + /** + * ResponseMessage payload. + * @member {google.protobuf.IStruct|null|undefined} payload + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @instance + */ + ResponseMessage.prototype.payload = null; + + /** + * ResponseMessage conversationSuccess. + * @member {google.cloud.dialogflow.cx.v3.ResponseMessage.IConversationSuccess|null|undefined} conversationSuccess + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @instance + */ + ResponseMessage.prototype.conversationSuccess = null; + + /** + * ResponseMessage outputAudioText. + * @member {google.cloud.dialogflow.cx.v3.ResponseMessage.IOutputAudioText|null|undefined} outputAudioText + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @instance + */ + ResponseMessage.prototype.outputAudioText = null; + + /** + * ResponseMessage liveAgentHandoff. + * @member {google.cloud.dialogflow.cx.v3.ResponseMessage.ILiveAgentHandoff|null|undefined} liveAgentHandoff + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @instance + */ + ResponseMessage.prototype.liveAgentHandoff = null; + + /** + * ResponseMessage endInteraction. + * @member {google.cloud.dialogflow.cx.v3.ResponseMessage.IEndInteraction|null|undefined} endInteraction + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @instance + */ + ResponseMessage.prototype.endInteraction = null; + + /** + * ResponseMessage playAudio. + * @member {google.cloud.dialogflow.cx.v3.ResponseMessage.IPlayAudio|null|undefined} playAudio + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @instance + */ + ResponseMessage.prototype.playAudio = null; + + /** + * ResponseMessage mixedAudio. + * @member {google.cloud.dialogflow.cx.v3.ResponseMessage.IMixedAudio|null|undefined} mixedAudio + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @instance + */ + ResponseMessage.prototype.mixedAudio = null; + + /** + * ResponseMessage telephonyTransferCall. + * @member {google.cloud.dialogflow.cx.v3.ResponseMessage.ITelephonyTransferCall|null|undefined} telephonyTransferCall + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @instance + */ + ResponseMessage.prototype.telephonyTransferCall = null; + + /** + * ResponseMessage channel. + * @member {string} channel + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @instance + */ + ResponseMessage.prototype.channel = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ResponseMessage message. + * @member {"text"|"payload"|"conversationSuccess"|"outputAudioText"|"liveAgentHandoff"|"endInteraction"|"playAudio"|"mixedAudio"|"telephonyTransferCall"|undefined} message + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @instance + */ + Object.defineProperty(ResponseMessage.prototype, "message", { + get: $util.oneOfGetter($oneOfFields = ["text", "payload", "conversationSuccess", "outputAudioText", "liveAgentHandoff", "endInteraction", "playAudio", "mixedAudio", "telephonyTransferCall"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ResponseMessage instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @static + * @param {google.cloud.dialogflow.cx.v3.IResponseMessage=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage} ResponseMessage instance + */ + ResponseMessage.create = function create(properties) { + return new ResponseMessage(properties); + }; + + /** + * Encodes the specified ResponseMessage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @static + * @param {google.cloud.dialogflow.cx.v3.IResponseMessage} message ResponseMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + $root.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + $root.google.protobuf.Struct.encode(message.payload, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.outputAudioText != null && Object.hasOwnProperty.call(message, "outputAudioText")) + $root.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.encode(message.outputAudioText, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.conversationSuccess != null && Object.hasOwnProperty.call(message, "conversationSuccess")) + $root.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess.encode(message.conversationSuccess, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.liveAgentHandoff != null && Object.hasOwnProperty.call(message, "liveAgentHandoff")) + $root.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.encode(message.liveAgentHandoff, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.endInteraction != null && Object.hasOwnProperty.call(message, "endInteraction")) + $root.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.encode(message.endInteraction, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.playAudio != null && Object.hasOwnProperty.call(message, "playAudio")) + $root.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.encode(message.playAudio, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.mixedAudio != null && Object.hasOwnProperty.call(message, "mixedAudio")) + $root.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.encode(message.mixedAudio, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.telephonyTransferCall != null && Object.hasOwnProperty.call(message, "telephonyTransferCall")) + $root.google.cloud.dialogflow.cx.v3.ResponseMessage.TelephonyTransferCall.encode(message.telephonyTransferCall, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.channel); + return writer; + }; + + /** + * Encodes the specified ResponseMessage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @static + * @param {google.cloud.dialogflow.cx.v3.IResponseMessage} message ResponseMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseMessage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage} ResponseMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseMessage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.text = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.decode(reader, reader.uint32()); + break; + } + case 2: { + message.payload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 9: { + message.conversationSuccess = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess.decode(reader, reader.uint32()); + break; + } + case 8: { + message.outputAudioText = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.decode(reader, reader.uint32()); + break; + } + case 10: { + message.liveAgentHandoff = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.decode(reader, reader.uint32()); + break; + } + case 11: { + message.endInteraction = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.decode(reader, reader.uint32()); + break; + } + case 12: { + message.playAudio = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.decode(reader, reader.uint32()); + break; + } + case 13: { + message.mixedAudio = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.decode(reader, reader.uint32()); + break; + } + case 18: { + message.telephonyTransferCall = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.TelephonyTransferCall.decode(reader, reader.uint32()); + break; + } + case 19: { + message.channel = reader.string(); + break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes an OutputAudioText message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText} OutputAudioText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OutputAudioText.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a ResponseMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage} ResponseMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an OutputAudioText message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OutputAudioText.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.text != null && message.hasOwnProperty("text")) { - properties.source = 1; - if (!$util.isString(message.text)) - return "text: string expected"; + /** + * Verifies a ResponseMessage message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.text != null && message.hasOwnProperty("text")) { + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.verify(message.text); + if (error) + return "text." + error; } - if (message.ssml != null && message.hasOwnProperty("ssml")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - if (!$util.isString(message.ssml)) - return "ssml: string expected"; + } + if (message.payload != null && message.hasOwnProperty("payload")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.protobuf.Struct.verify(message.payload); + if (error) + return "payload." + error; } - if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) - if (typeof message.allowPlaybackInterruption !== "boolean") - return "allowPlaybackInterruption: boolean expected"; - return null; - }; - - /** - * Creates an OutputAudioText message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText} OutputAudioText - */ - OutputAudioText.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText(); - if (object.text != null) - message.text = String(object.text); - if (object.ssml != null) - message.ssml = String(object.ssml); - if (object.allowPlaybackInterruption != null) - message.allowPlaybackInterruption = Boolean(object.allowPlaybackInterruption); - return message; - }; - - /** - * Creates a plain object from an OutputAudioText message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText - * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText} message OutputAudioText - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OutputAudioText.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.allowPlaybackInterruption = false; - if (message.text != null && message.hasOwnProperty("text")) { - object.text = message.text; - if (options.oneofs) - object.source = "text"; + } + if (message.conversationSuccess != null && message.hasOwnProperty("conversationSuccess")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess.verify(message.conversationSuccess); + if (error) + return "conversationSuccess." + error; } - if (message.ssml != null && message.hasOwnProperty("ssml")) { - object.ssml = message.ssml; - if (options.oneofs) - object.source = "ssml"; + } + if (message.outputAudioText != null && message.hasOwnProperty("outputAudioText")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.verify(message.outputAudioText); + if (error) + return "outputAudioText." + error; } - if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) - object.allowPlaybackInterruption = message.allowPlaybackInterruption; + } + if (message.liveAgentHandoff != null && message.hasOwnProperty("liveAgentHandoff")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.verify(message.liveAgentHandoff); + if (error) + return "liveAgentHandoff." + error; + } + } + if (message.endInteraction != null && message.hasOwnProperty("endInteraction")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.verify(message.endInteraction); + if (error) + return "endInteraction." + error; + } + } + if (message.playAudio != null && message.hasOwnProperty("playAudio")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.verify(message.playAudio); + if (error) + return "playAudio." + error; + } + } + if (message.mixedAudio != null && message.hasOwnProperty("mixedAudio")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.verify(message.mixedAudio); + if (error) + return "mixedAudio." + error; + } + } + if (message.telephonyTransferCall != null && message.hasOwnProperty("telephonyTransferCall")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.TelephonyTransferCall.verify(message.telephonyTransferCall); + if (error) + return "telephonyTransferCall." + error; + } + } + if (message.channel != null && message.hasOwnProperty("channel")) + if (!$util.isString(message.channel)) + return "channel: string expected"; + return null; + }; + + /** + * Creates a ResponseMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage} ResponseMessage + */ + ResponseMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ResponseMessage) return object; - }; + var message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage(); + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ResponseMessage.text: object expected"); + message.text = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.fromObject(object.text); + } + if (object.payload != null) { + if (typeof object.payload !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ResponseMessage.payload: object expected"); + message.payload = $root.google.protobuf.Struct.fromObject(object.payload); + } + if (object.conversationSuccess != null) { + if (typeof object.conversationSuccess !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ResponseMessage.conversationSuccess: object expected"); + message.conversationSuccess = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess.fromObject(object.conversationSuccess); + } + if (object.outputAudioText != null) { + if (typeof object.outputAudioText !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ResponseMessage.outputAudioText: object expected"); + message.outputAudioText = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.fromObject(object.outputAudioText); + } + if (object.liveAgentHandoff != null) { + if (typeof object.liveAgentHandoff !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ResponseMessage.liveAgentHandoff: object expected"); + message.liveAgentHandoff = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.fromObject(object.liveAgentHandoff); + } + if (object.endInteraction != null) { + if (typeof object.endInteraction !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ResponseMessage.endInteraction: object expected"); + message.endInteraction = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.fromObject(object.endInteraction); + } + if (object.playAudio != null) { + if (typeof object.playAudio !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ResponseMessage.playAudio: object expected"); + message.playAudio = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.fromObject(object.playAudio); + } + if (object.mixedAudio != null) { + if (typeof object.mixedAudio !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ResponseMessage.mixedAudio: object expected"); + message.mixedAudio = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.fromObject(object.mixedAudio); + } + if (object.telephonyTransferCall != null) { + if (typeof object.telephonyTransferCall !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ResponseMessage.telephonyTransferCall: object expected"); + message.telephonyTransferCall = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.TelephonyTransferCall.fromObject(object.telephonyTransferCall); + } + if (object.channel != null) + message.channel = String(object.channel); + return message; + }; - /** - * Converts this OutputAudioText to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText - * @instance - * @returns {Object.} JSON object - */ - OutputAudioText.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a ResponseMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @static + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage} message ResponseMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.channel = ""; + if (message.text != null && message.hasOwnProperty("text")) { + object.text = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.toObject(message.text, options); + if (options.oneofs) + object.message = "text"; + } + if (message.payload != null && message.hasOwnProperty("payload")) { + object.payload = $root.google.protobuf.Struct.toObject(message.payload, options); + if (options.oneofs) + object.message = "payload"; + } + if (message.outputAudioText != null && message.hasOwnProperty("outputAudioText")) { + object.outputAudioText = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.toObject(message.outputAudioText, options); + if (options.oneofs) + object.message = "outputAudioText"; + } + if (message.conversationSuccess != null && message.hasOwnProperty("conversationSuccess")) { + object.conversationSuccess = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess.toObject(message.conversationSuccess, options); + if (options.oneofs) + object.message = "conversationSuccess"; + } + if (message.liveAgentHandoff != null && message.hasOwnProperty("liveAgentHandoff")) { + object.liveAgentHandoff = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.toObject(message.liveAgentHandoff, options); + if (options.oneofs) + object.message = "liveAgentHandoff"; + } + if (message.endInteraction != null && message.hasOwnProperty("endInteraction")) { + object.endInteraction = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.toObject(message.endInteraction, options); + if (options.oneofs) + object.message = "endInteraction"; + } + if (message.playAudio != null && message.hasOwnProperty("playAudio")) { + object.playAudio = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.toObject(message.playAudio, options); + if (options.oneofs) + object.message = "playAudio"; + } + if (message.mixedAudio != null && message.hasOwnProperty("mixedAudio")) { + object.mixedAudio = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.toObject(message.mixedAudio, options); + if (options.oneofs) + object.message = "mixedAudio"; + } + if (message.telephonyTransferCall != null && message.hasOwnProperty("telephonyTransferCall")) { + object.telephonyTransferCall = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.TelephonyTransferCall.toObject(message.telephonyTransferCall, options); + if (options.oneofs) + object.message = "telephonyTransferCall"; + } + if (message.channel != null && message.hasOwnProperty("channel")) + object.channel = message.channel; + return object; + }; - /** - * Gets the default type url for OutputAudioText - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OutputAudioText.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText"; - }; + /** + * Converts this ResponseMessage to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @instance + * @returns {Object.} JSON object + */ + ResponseMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return OutputAudioText; - })(); + /** + * Gets the default type url for ResponseMessage + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResponseMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ResponseMessage"; + }; - ResponseMessage.EndInteraction = (function() { + ResponseMessage.Text = (function() { /** - * Properties of an EndInteraction. + * Properties of a Text. * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage - * @interface IEndInteraction + * @interface IText + * @property {Array.|null} [text] Text text + * @property {boolean|null} [allowPlaybackInterruption] Text allowPlaybackInterruption */ /** - * Constructs a new EndInteraction. + * Constructs a new Text. * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage - * @classdesc Represents an EndInteraction. - * @implements IEndInteraction + * @classdesc Represents a Text. + * @implements IText * @constructor - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IEndInteraction=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IText=} [properties] Properties to set */ - function EndInteraction(properties) { + function Text(properties) { + this.text = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15571,63 +16818,94 @@ } /** - * Creates a new EndInteraction instance using the specified properties. + * Text text. + * @member {Array.} text + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.Text + * @instance + */ + Text.prototype.text = $util.emptyArray; + + /** + * Text allowPlaybackInterruption. + * @member {boolean} allowPlaybackInterruption + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.Text + * @instance + */ + Text.prototype.allowPlaybackInterruption = false; + + /** + * Creates a new Text instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.Text * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IEndInteraction=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction} EndInteraction instance + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IText=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.Text} Text instance */ - EndInteraction.create = function create(properties) { - return new EndInteraction(properties); + Text.create = function create(properties) { + return new Text(properties); }; /** - * Encodes the specified EndInteraction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.verify|verify} messages. + * Encodes the specified Text message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.Text.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.Text * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IEndInteraction} message EndInteraction message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IText} message Text message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EndInteraction.encode = function encode(message, writer) { + Text.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.text != null && message.text.length) + for (var i = 0; i < message.text.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text[i]); + if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowPlaybackInterruption); return writer; }; /** - * Encodes the specified EndInteraction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.verify|verify} messages. + * Encodes the specified Text message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.Text.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.Text * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IEndInteraction} message EndInteraction message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IText} message Text message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EndInteraction.encodeDelimited = function encodeDelimited(message, writer) { + Text.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EndInteraction message from the specified reader or buffer. + * Decodes a Text message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.Text * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction} EndInteraction + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.Text} Text * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EndInteraction.decode = function decode(reader, length) { + Text.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.Text(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + if (!(message.text && message.text.length)) + message.text = []; + message.text.push(reader.string()); + break; + } + case 2: { + message.allowPlaybackInterruption = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -15637,110 +16915,143 @@ }; /** - * Decodes an EndInteraction message from the specified reader or buffer, length delimited. + * Decodes a Text message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.Text * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction} EndInteraction + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.Text} Text * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EndInteraction.decodeDelimited = function decodeDelimited(reader) { + Text.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EndInteraction message. + * Verifies a Text message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.Text * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EndInteraction.verify = function verify(message) { + Text.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) { + if (!Array.isArray(message.text)) + return "text: array expected"; + for (var i = 0; i < message.text.length; ++i) + if (!$util.isString(message.text[i])) + return "text: string[] expected"; + } + if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) + if (typeof message.allowPlaybackInterruption !== "boolean") + return "allowPlaybackInterruption: boolean expected"; return null; }; /** - * Creates an EndInteraction message from a plain object. Also converts values to their respective internal types. + * Creates a Text message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.Text * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction} EndInteraction + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.Text} Text */ - EndInteraction.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) + Text.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ResponseMessage.Text) return object; - return new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction(); + var message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.Text(); + if (object.text) { + if (!Array.isArray(object.text)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ResponseMessage.Text.text: array expected"); + message.text = []; + for (var i = 0; i < object.text.length; ++i) + message.text[i] = String(object.text[i]); + } + if (object.allowPlaybackInterruption != null) + message.allowPlaybackInterruption = Boolean(object.allowPlaybackInterruption); + return message; }; /** - * Creates a plain object from an EndInteraction message. Also converts values to other types if specified. + * Creates a plain object from a Text message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.Text * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction} message EndInteraction + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.Text} message Text * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EndInteraction.toObject = function toObject() { - return {}; + Text.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.text = []; + if (options.defaults) + object.allowPlaybackInterruption = false; + if (message.text && message.text.length) { + object.text = []; + for (var j = 0; j < message.text.length; ++j) + object.text[j] = message.text[j]; + } + if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) + object.allowPlaybackInterruption = message.allowPlaybackInterruption; + return object; }; /** - * Converts this EndInteraction to JSON. + * Converts this Text to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.Text * @instance * @returns {Object.} JSON object */ - EndInteraction.prototype.toJSON = function toJSON() { + Text.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EndInteraction + * Gets the default type url for Text * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.Text * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EndInteraction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Text.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ResponseMessage.Text"; }; - return EndInteraction; + return Text; })(); - ResponseMessage.PlayAudio = (function() { + ResponseMessage.LiveAgentHandoff = (function() { /** - * Properties of a PlayAudio. + * Properties of a LiveAgentHandoff. * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage - * @interface IPlayAudio - * @property {string|null} [audioUri] PlayAudio audioUri - * @property {boolean|null} [allowPlaybackInterruption] PlayAudio allowPlaybackInterruption + * @interface ILiveAgentHandoff + * @property {google.protobuf.IStruct|null} [metadata] LiveAgentHandoff metadata */ /** - * Constructs a new PlayAudio. + * Constructs a new LiveAgentHandoff. * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage - * @classdesc Represents a PlayAudio. - * @implements IPlayAudio + * @classdesc Represents a LiveAgentHandoff. + * @implements ILiveAgentHandoff * @constructor - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IPlayAudio=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.ILiveAgentHandoff=} [properties] Properties to set */ - function PlayAudio(properties) { + function LiveAgentHandoff(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15748,89 +17059,75 @@ } /** - * PlayAudio audioUri. - * @member {string} audioUri - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio - * @instance - */ - PlayAudio.prototype.audioUri = ""; - - /** - * PlayAudio allowPlaybackInterruption. - * @member {boolean} allowPlaybackInterruption - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + * LiveAgentHandoff metadata. + * @member {google.protobuf.IStruct|null|undefined} metadata + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff * @instance */ - PlayAudio.prototype.allowPlaybackInterruption = false; + LiveAgentHandoff.prototype.metadata = null; /** - * Creates a new PlayAudio instance using the specified properties. + * Creates a new LiveAgentHandoff instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IPlayAudio=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} PlayAudio instance + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.ILiveAgentHandoff=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff instance */ - PlayAudio.create = function create(properties) { - return new PlayAudio(properties); + LiveAgentHandoff.create = function create(properties) { + return new LiveAgentHandoff(properties); }; /** - * Encodes the specified PlayAudio message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.verify|verify} messages. + * Encodes the specified LiveAgentHandoff message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IPlayAudio} message PlayAudio message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.ILiveAgentHandoff} message LiveAgentHandoff message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PlayAudio.encode = function encode(message, writer) { + LiveAgentHandoff.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.audioUri != null && Object.hasOwnProperty.call(message, "audioUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.audioUri); - if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowPlaybackInterruption); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Struct.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified PlayAudio message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.verify|verify} messages. + * Encodes the specified LiveAgentHandoff message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IPlayAudio} message PlayAudio message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.ILiveAgentHandoff} message LiveAgentHandoff message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PlayAudio.encodeDelimited = function encodeDelimited(message, writer) { + LiveAgentHandoff.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PlayAudio message from the specified reader or buffer. + * Decodes a LiveAgentHandoff message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} PlayAudio + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PlayAudio.decode = function decode(reader, length) { + LiveAgentHandoff.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.audioUri = reader.string(); - break; - } - case 2: { - message.allowPlaybackInterruption = reader.bool(); + message.metadata = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; } default: @@ -15842,48 +17139,928 @@ }; /** - * Decodes a PlayAudio message from the specified reader or buffer, length delimited. + * Decodes a LiveAgentHandoff message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} PlayAudio + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PlayAudio.decodeDelimited = function decodeDelimited(reader) { + LiveAgentHandoff.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PlayAudio message. + * Verifies a LiveAgentHandoff message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PlayAudio.verify = function verify(message) { + LiveAgentHandoff.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.audioUri != null && message.hasOwnProperty("audioUri")) - if (!$util.isString(message.audioUri)) - return "audioUri: string expected"; - if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) - if (typeof message.allowPlaybackInterruption !== "boolean") - return "allowPlaybackInterruption: boolean expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Struct.verify(message.metadata); + if (error) + return "metadata." + error; + } return null; }; /** - * Creates a PlayAudio message from a plain object. Also converts values to their respective internal types. + * Creates a LiveAgentHandoff message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} PlayAudio + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff + */ + LiveAgentHandoff.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff(); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.metadata: object expected"); + message.metadata = $root.google.protobuf.Struct.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a LiveAgentHandoff message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff + * @static + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff} message LiveAgentHandoff + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LiveAgentHandoff.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadata = null; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Struct.toObject(message.metadata, options); + return object; + }; + + /** + * Converts this LiveAgentHandoff to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff + * @instance + * @returns {Object.} JSON object + */ + LiveAgentHandoff.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LiveAgentHandoff + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LiveAgentHandoff.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff"; + }; + + return LiveAgentHandoff; + })(); + + ResponseMessage.ConversationSuccess = (function() { + + /** + * Properties of a ConversationSuccess. + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @interface IConversationSuccess + * @property {google.protobuf.IStruct|null} [metadata] ConversationSuccess metadata + */ + + /** + * Constructs a new ConversationSuccess. + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @classdesc Represents a ConversationSuccess. + * @implements IConversationSuccess + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IConversationSuccess=} [properties] Properties to set + */ + function ConversationSuccess(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConversationSuccess metadata. + * @member {google.protobuf.IStruct|null|undefined} metadata + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess + * @instance + */ + ConversationSuccess.prototype.metadata = null; + + /** + * Creates a new ConversationSuccess instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess + * @static + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IConversationSuccess=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess} ConversationSuccess instance + */ + ConversationSuccess.create = function create(properties) { + return new ConversationSuccess(properties); + }; + + /** + * Encodes the specified ConversationSuccess message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess + * @static + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IConversationSuccess} message ConversationSuccess message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationSuccess.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Struct.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConversationSuccess message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess + * @static + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IConversationSuccess} message ConversationSuccess message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationSuccess.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConversationSuccess message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess} ConversationSuccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationSuccess.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metadata = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConversationSuccess message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess} ConversationSuccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationSuccess.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConversationSuccess message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversationSuccess.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Struct.verify(message.metadata); + if (error) + return "metadata." + error; + } + return null; + }; + + /** + * Creates a ConversationSuccess message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess} ConversationSuccess + */ + ConversationSuccess.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess(); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess.metadata: object expected"); + message.metadata = $root.google.protobuf.Struct.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a ConversationSuccess message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess + * @static + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess} message ConversationSuccess + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversationSuccess.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadata = null; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Struct.toObject(message.metadata, options); + return object; + }; + + /** + * Converts this ConversationSuccess to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess + * @instance + * @returns {Object.} JSON object + */ + ConversationSuccess.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConversationSuccess + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConversationSuccess.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess"; + }; + + return ConversationSuccess; + })(); + + ResponseMessage.OutputAudioText = (function() { + + /** + * Properties of an OutputAudioText. + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @interface IOutputAudioText + * @property {string|null} [text] OutputAudioText text + * @property {string|null} [ssml] OutputAudioText ssml + * @property {boolean|null} [allowPlaybackInterruption] OutputAudioText allowPlaybackInterruption + */ + + /** + * Constructs a new OutputAudioText. + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @classdesc Represents an OutputAudioText. + * @implements IOutputAudioText + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IOutputAudioText=} [properties] Properties to set + */ + function OutputAudioText(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OutputAudioText text. + * @member {string|null|undefined} text + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText + * @instance + */ + OutputAudioText.prototype.text = null; + + /** + * OutputAudioText ssml. + * @member {string|null|undefined} ssml + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText + * @instance + */ + OutputAudioText.prototype.ssml = null; + + /** + * OutputAudioText allowPlaybackInterruption. + * @member {boolean} allowPlaybackInterruption + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText + * @instance + */ + OutputAudioText.prototype.allowPlaybackInterruption = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OutputAudioText source. + * @member {"text"|"ssml"|undefined} source + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText + * @instance + */ + Object.defineProperty(OutputAudioText.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["text", "ssml"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OutputAudioText instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText + * @static + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IOutputAudioText=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText} OutputAudioText instance + */ + OutputAudioText.create = function create(properties) { + return new OutputAudioText(properties); + }; + + /** + * Encodes the specified OutputAudioText message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText + * @static + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IOutputAudioText} message OutputAudioText message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OutputAudioText.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); + if (message.ssml != null && Object.hasOwnProperty.call(message, "ssml")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ssml); + if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowPlaybackInterruption); + return writer; + }; + + /** + * Encodes the specified OutputAudioText message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText + * @static + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IOutputAudioText} message OutputAudioText message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OutputAudioText.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OutputAudioText message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText} OutputAudioText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OutputAudioText.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.text = reader.string(); + break; + } + case 2: { + message.ssml = reader.string(); + break; + } + case 3: { + message.allowPlaybackInterruption = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OutputAudioText message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText} OutputAudioText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OutputAudioText.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OutputAudioText message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OutputAudioText.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.text != null && message.hasOwnProperty("text")) { + properties.source = 1; + if (!$util.isString(message.text)) + return "text: string expected"; + } + if (message.ssml != null && message.hasOwnProperty("ssml")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.ssml)) + return "ssml: string expected"; + } + if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) + if (typeof message.allowPlaybackInterruption !== "boolean") + return "allowPlaybackInterruption: boolean expected"; + return null; + }; + + /** + * Creates an OutputAudioText message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText} OutputAudioText + */ + OutputAudioText.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText(); + if (object.text != null) + message.text = String(object.text); + if (object.ssml != null) + message.ssml = String(object.ssml); + if (object.allowPlaybackInterruption != null) + message.allowPlaybackInterruption = Boolean(object.allowPlaybackInterruption); + return message; + }; + + /** + * Creates a plain object from an OutputAudioText message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText + * @static + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText} message OutputAudioText + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OutputAudioText.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.allowPlaybackInterruption = false; + if (message.text != null && message.hasOwnProperty("text")) { + object.text = message.text; + if (options.oneofs) + object.source = "text"; + } + if (message.ssml != null && message.hasOwnProperty("ssml")) { + object.ssml = message.ssml; + if (options.oneofs) + object.source = "ssml"; + } + if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) + object.allowPlaybackInterruption = message.allowPlaybackInterruption; + return object; + }; + + /** + * Converts this OutputAudioText to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText + * @instance + * @returns {Object.} JSON object + */ + OutputAudioText.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OutputAudioText + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OutputAudioText.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText"; + }; + + return OutputAudioText; + })(); + + ResponseMessage.EndInteraction = (function() { + + /** + * Properties of an EndInteraction. + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @interface IEndInteraction + */ + + /** + * Constructs a new EndInteraction. + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @classdesc Represents an EndInteraction. + * @implements IEndInteraction + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IEndInteraction=} [properties] Properties to set + */ + function EndInteraction(properties) { + if (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 EndInteraction instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + * @static + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IEndInteraction=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction} EndInteraction instance + */ + EndInteraction.create = function create(properties) { + return new EndInteraction(properties); + }; + + /** + * Encodes the specified EndInteraction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + * @static + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IEndInteraction} message EndInteraction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EndInteraction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified EndInteraction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + * @static + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IEndInteraction} message EndInteraction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EndInteraction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EndInteraction message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction} EndInteraction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EndInteraction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EndInteraction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction} EndInteraction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EndInteraction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EndInteraction message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EndInteraction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an EndInteraction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction} EndInteraction + */ + EndInteraction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) + return object; + return new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction(); + }; + + /** + * Creates a plain object from an EndInteraction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + * @static + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction} message EndInteraction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EndInteraction.toObject = function toObject() { + return {}; + }; + + /** + * Converts this EndInteraction to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + * @instance + * @returns {Object.} JSON object + */ + EndInteraction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EndInteraction + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EndInteraction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction"; + }; + + return EndInteraction; + })(); + + ResponseMessage.PlayAudio = (function() { + + /** + * Properties of a PlayAudio. + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @interface IPlayAudio + * @property {string|null} [audioUri] PlayAudio audioUri + * @property {boolean|null} [allowPlaybackInterruption] PlayAudio allowPlaybackInterruption + */ + + /** + * Constructs a new PlayAudio. + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @classdesc Represents a PlayAudio. + * @implements IPlayAudio + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IPlayAudio=} [properties] Properties to set + */ + function PlayAudio(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PlayAudio audioUri. + * @member {string} audioUri + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + * @instance + */ + PlayAudio.prototype.audioUri = ""; + + /** + * PlayAudio allowPlaybackInterruption. + * @member {boolean} allowPlaybackInterruption + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + * @instance + */ + PlayAudio.prototype.allowPlaybackInterruption = false; + + /** + * Creates a new PlayAudio instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + * @static + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IPlayAudio=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} PlayAudio instance + */ + PlayAudio.create = function create(properties) { + return new PlayAudio(properties); + }; + + /** + * Encodes the specified PlayAudio message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + * @static + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IPlayAudio} message PlayAudio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlayAudio.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.audioUri != null && Object.hasOwnProperty.call(message, "audioUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.audioUri); + if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowPlaybackInterruption); + return writer; + }; + + /** + * Encodes the specified PlayAudio message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + * @static + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IPlayAudio} message PlayAudio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlayAudio.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PlayAudio message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} PlayAudio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlayAudio.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.audioUri = reader.string(); + break; + } + case 2: { + message.allowPlaybackInterruption = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PlayAudio message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} PlayAudio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlayAudio.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PlayAudio message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PlayAudio.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.audioUri != null && message.hasOwnProperty("audioUri")) + if (!$util.isString(message.audioUri)) + return "audioUri: string expected"; + if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) + if (typeof message.allowPlaybackInterruption !== "boolean") + return "allowPlaybackInterruption: boolean expected"; + return null; + }; + + /** + * Creates a PlayAudio message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} PlayAudio */ PlayAudio.fromObject = function fromObject(object) { if (object instanceof $root.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) @@ -17400,189 +19577,246 @@ return ResourceName; })(); - /** - * AudioEncoding enum. - * @name google.cloud.dialogflow.cx.v3.AudioEncoding - * @enum {number} - * @property {number} AUDIO_ENCODING_UNSPECIFIED=0 AUDIO_ENCODING_UNSPECIFIED value - * @property {number} AUDIO_ENCODING_LINEAR_16=1 AUDIO_ENCODING_LINEAR_16 value - * @property {number} AUDIO_ENCODING_FLAC=2 AUDIO_ENCODING_FLAC value - * @property {number} AUDIO_ENCODING_MULAW=3 AUDIO_ENCODING_MULAW value - * @property {number} AUDIO_ENCODING_AMR=4 AUDIO_ENCODING_AMR value - * @property {number} AUDIO_ENCODING_AMR_WB=5 AUDIO_ENCODING_AMR_WB value - * @property {number} AUDIO_ENCODING_OGG_OPUS=6 AUDIO_ENCODING_OGG_OPUS value - * @property {number} AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE=7 AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE value - */ - v3.AudioEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "AUDIO_ENCODING_UNSPECIFIED"] = 0; - values[valuesById[1] = "AUDIO_ENCODING_LINEAR_16"] = 1; - values[valuesById[2] = "AUDIO_ENCODING_FLAC"] = 2; - values[valuesById[3] = "AUDIO_ENCODING_MULAW"] = 3; - values[valuesById[4] = "AUDIO_ENCODING_AMR"] = 4; - values[valuesById[5] = "AUDIO_ENCODING_AMR_WB"] = 5; - values[valuesById[6] = "AUDIO_ENCODING_OGG_OPUS"] = 6; - values[valuesById[7] = "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE"] = 7; - return values; - })(); - - /** - * SpeechModelVariant enum. - * @name google.cloud.dialogflow.cx.v3.SpeechModelVariant - * @enum {number} - * @property {number} SPEECH_MODEL_VARIANT_UNSPECIFIED=0 SPEECH_MODEL_VARIANT_UNSPECIFIED value - * @property {number} USE_BEST_AVAILABLE=1 USE_BEST_AVAILABLE value - * @property {number} USE_STANDARD=2 USE_STANDARD value - * @property {number} USE_ENHANCED=3 USE_ENHANCED value - */ - v3.SpeechModelVariant = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SPEECH_MODEL_VARIANT_UNSPECIFIED"] = 0; - values[valuesById[1] = "USE_BEST_AVAILABLE"] = 1; - values[valuesById[2] = "USE_STANDARD"] = 2; - values[valuesById[3] = "USE_ENHANCED"] = 3; - return values; - })(); - - v3.SpeechWordInfo = (function() { - - /** - * Properties of a SpeechWordInfo. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface ISpeechWordInfo - * @property {string|null} [word] SpeechWordInfo word - * @property {google.protobuf.IDuration|null} [startOffset] SpeechWordInfo startOffset - * @property {google.protobuf.IDuration|null} [endOffset] SpeechWordInfo endOffset - * @property {number|null} [confidence] SpeechWordInfo confidence - */ + v3.Changelogs = (function() { /** - * Constructs a new SpeechWordInfo. + * Constructs a new Changelogs service. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a SpeechWordInfo. - * @implements ISpeechWordInfo + * @classdesc Represents a Changelogs + * @extends $protobuf.rpc.Service * @constructor - * @param {google.cloud.dialogflow.cx.v3.ISpeechWordInfo=} [properties] Properties to set + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ - function SpeechWordInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function Changelogs(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } + (Changelogs.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Changelogs; + /** - * SpeechWordInfo word. - * @member {string} word - * @memberof google.cloud.dialogflow.cx.v3.SpeechWordInfo - * @instance + * Creates new Changelogs service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Changelogs + * @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 {Changelogs} RPC service. Useful where requests and/or responses are streamed. */ - SpeechWordInfo.prototype.word = ""; + Changelogs.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * SpeechWordInfo startOffset. - * @member {google.protobuf.IDuration|null|undefined} startOffset - * @memberof google.cloud.dialogflow.cx.v3.SpeechWordInfo - * @instance + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Changelogs|listChangelogs}. + * @memberof google.cloud.dialogflow.cx.v3.Changelogs + * @typedef ListChangelogsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListChangelogsResponse} [response] ListChangelogsResponse */ - SpeechWordInfo.prototype.startOffset = null; /** - * SpeechWordInfo endOffset. - * @member {google.protobuf.IDuration|null|undefined} endOffset - * @memberof google.cloud.dialogflow.cx.v3.SpeechWordInfo + * Calls ListChangelogs. + * @function listChangelogs + * @memberof google.cloud.dialogflow.cx.v3.Changelogs * @instance + * @param {google.cloud.dialogflow.cx.v3.IListChangelogsRequest} request ListChangelogsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Changelogs.ListChangelogsCallback} callback Node-style callback called with the error, if any, and ListChangelogsResponse + * @returns {undefined} + * @variation 1 */ - SpeechWordInfo.prototype.endOffset = null; + Object.defineProperty(Changelogs.prototype.listChangelogs = function listChangelogs(request, callback) { + return this.rpcCall(listChangelogs, $root.google.cloud.dialogflow.cx.v3.ListChangelogsRequest, $root.google.cloud.dialogflow.cx.v3.ListChangelogsResponse, request, callback); + }, "name", { value: "ListChangelogs" }); /** - * SpeechWordInfo confidence. - * @member {number} confidence - * @memberof google.cloud.dialogflow.cx.v3.SpeechWordInfo + * Calls ListChangelogs. + * @function listChangelogs + * @memberof google.cloud.dialogflow.cx.v3.Changelogs * @instance + * @param {google.cloud.dialogflow.cx.v3.IListChangelogsRequest} request ListChangelogsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - SpeechWordInfo.prototype.confidence = 0; /** - * Creates a new SpeechWordInfo instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.SpeechWordInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.ISpeechWordInfo=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.SpeechWordInfo} SpeechWordInfo instance + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Changelogs|getChangelog}. + * @memberof google.cloud.dialogflow.cx.v3.Changelogs + * @typedef GetChangelogCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Changelog} [response] Changelog */ - SpeechWordInfo.create = function create(properties) { - return new SpeechWordInfo(properties); - }; /** - * Encodes the specified SpeechWordInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SpeechWordInfo.verify|verify} messages. + * Calls GetChangelog. + * @function getChangelog + * @memberof google.cloud.dialogflow.cx.v3.Changelogs + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetChangelogRequest} request GetChangelogRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Changelogs.GetChangelogCallback} callback Node-style callback called with the error, if any, and Changelog + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Changelogs.prototype.getChangelog = function getChangelog(request, callback) { + return this.rpcCall(getChangelog, $root.google.cloud.dialogflow.cx.v3.GetChangelogRequest, $root.google.cloud.dialogflow.cx.v3.Changelog, request, callback); + }, "name", { value: "GetChangelog" }); + + /** + * Calls GetChangelog. + * @function getChangelog + * @memberof google.cloud.dialogflow.cx.v3.Changelogs + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetChangelogRequest} request GetChangelogRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Changelogs; + })(); + + v3.ListChangelogsRequest = (function() { + + /** + * Properties of a ListChangelogsRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IListChangelogsRequest + * @property {string|null} [parent] ListChangelogsRequest parent + * @property {string|null} [filter] ListChangelogsRequest filter + * @property {number|null} [pageSize] ListChangelogsRequest pageSize + * @property {string|null} [pageToken] ListChangelogsRequest pageToken + */ + + /** + * Constructs a new ListChangelogsRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ListChangelogsRequest. + * @implements IListChangelogsRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IListChangelogsRequest=} [properties] Properties to set + */ + function ListChangelogsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListChangelogsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest + * @instance + */ + ListChangelogsRequest.prototype.parent = ""; + + /** + * ListChangelogsRequest filter. + * @member {string} filter + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest + * @instance + */ + ListChangelogsRequest.prototype.filter = ""; + + /** + * ListChangelogsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest + * @instance + */ + ListChangelogsRequest.prototype.pageSize = 0; + + /** + * ListChangelogsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest + * @instance + */ + ListChangelogsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListChangelogsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IListChangelogsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsRequest} ListChangelogsRequest instance + */ + ListChangelogsRequest.create = function create(properties) { + return new ListChangelogsRequest(properties); + }; + + /** + * Encodes the specified ListChangelogsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.SpeechWordInfo + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ISpeechWordInfo} message SpeechWordInfo message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListChangelogsRequest} message ListChangelogsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechWordInfo.encode = function encode(message, writer) { + ListChangelogsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.startOffset != null && Object.hasOwnProperty.call(message, "startOffset")) - $root.google.protobuf.Duration.encode(message.startOffset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset")) - $root.google.protobuf.Duration.encode(message.endOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.word != null && Object.hasOwnProperty.call(message, "word")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.word); - if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + 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); return writer; }; /** - * Encodes the specified SpeechWordInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SpeechWordInfo.verify|verify} messages. + * Encodes the specified ListChangelogsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SpeechWordInfo + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ISpeechWordInfo} message SpeechWordInfo message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListChangelogsRequest} message ListChangelogsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechWordInfo.encodeDelimited = function encodeDelimited(message, writer) { + ListChangelogsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SpeechWordInfo message from the specified reader or buffer. + * Decodes a ListChangelogsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.SpeechWordInfo + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.SpeechWordInfo} SpeechWordInfo + * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsRequest} ListChangelogsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SpeechWordInfo.decode = function decode(reader, length) { + ListChangelogsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.SpeechWordInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListChangelogsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: { - message.word = reader.string(); - break; - } case 1: { - message.startOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.parent = reader.string(); break; } case 2: { - message.endOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.filter = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); break; } case 4: { - message.confidence = reader.float(); + message.pageToken = reader.string(); break; } default: @@ -17594,164 +19828,149 @@ }; /** - * Decodes a SpeechWordInfo message from the specified reader or buffer, length delimited. + * Decodes a ListChangelogsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SpeechWordInfo + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.SpeechWordInfo} SpeechWordInfo + * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsRequest} ListChangelogsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SpeechWordInfo.decodeDelimited = function decodeDelimited(reader) { + ListChangelogsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SpeechWordInfo message. + * Verifies a ListChangelogsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.SpeechWordInfo + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SpeechWordInfo.verify = function verify(message) { + ListChangelogsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.word != null && message.hasOwnProperty("word")) - if (!$util.isString(message.word)) - return "word: string expected"; - if (message.startOffset != null && message.hasOwnProperty("startOffset")) { - var error = $root.google.protobuf.Duration.verify(message.startOffset); - if (error) - return "startOffset." + error; - } - if (message.endOffset != null && message.hasOwnProperty("endOffset")) { - var error = $root.google.protobuf.Duration.verify(message.endOffset); - if (error) - return "endOffset." + error; - } - if (message.confidence != null && message.hasOwnProperty("confidence")) - if (typeof message.confidence !== "number") - return "confidence: number expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: 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 SpeechWordInfo message from a plain object. Also converts values to their respective internal types. + * Creates a ListChangelogsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.SpeechWordInfo + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.SpeechWordInfo} SpeechWordInfo + * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsRequest} ListChangelogsRequest */ - SpeechWordInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.SpeechWordInfo) + ListChangelogsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListChangelogsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.SpeechWordInfo(); - if (object.word != null) - message.word = String(object.word); - if (object.startOffset != null) { - if (typeof object.startOffset !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.SpeechWordInfo.startOffset: object expected"); - message.startOffset = $root.google.protobuf.Duration.fromObject(object.startOffset); - } - if (object.endOffset != null) { - if (typeof object.endOffset !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.SpeechWordInfo.endOffset: object expected"); - message.endOffset = $root.google.protobuf.Duration.fromObject(object.endOffset); - } - if (object.confidence != null) - message.confidence = Number(object.confidence); + var message = new $root.google.cloud.dialogflow.cx.v3.ListChangelogsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + 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 SpeechWordInfo message. Also converts values to other types if specified. + * Creates a plain object from a ListChangelogsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.SpeechWordInfo + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.SpeechWordInfo} message SpeechWordInfo + * @param {google.cloud.dialogflow.cx.v3.ListChangelogsRequest} message ListChangelogsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechWordInfo.toObject = function toObject(message, options) { + ListChangelogsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.startOffset = null; - object.endOffset = null; - object.word = ""; - object.confidence = 0; + object.parent = ""; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.startOffset != null && message.hasOwnProperty("startOffset")) - object.startOffset = $root.google.protobuf.Duration.toObject(message.startOffset, options); - if (message.endOffset != null && message.hasOwnProperty("endOffset")) - object.endOffset = $root.google.protobuf.Duration.toObject(message.endOffset, options); - if (message.word != null && message.hasOwnProperty("word")) - object.word = message.word; - if (message.confidence != null && message.hasOwnProperty("confidence")) - object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + 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; return object; }; /** - * Converts this SpeechWordInfo to JSON. + * Converts this ListChangelogsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.SpeechWordInfo + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest * @instance * @returns {Object.} JSON object */ - SpeechWordInfo.prototype.toJSON = function toJSON() { + ListChangelogsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SpeechWordInfo + * Gets the default type url for ListChangelogsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.SpeechWordInfo + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SpeechWordInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListChangelogsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SpeechWordInfo"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListChangelogsRequest"; }; - return SpeechWordInfo; + return ListChangelogsRequest; })(); - v3.InputAudioConfig = (function() { + v3.ListChangelogsResponse = (function() { /** - * Properties of an InputAudioConfig. + * Properties of a ListChangelogsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IInputAudioConfig - * @property {google.cloud.dialogflow.cx.v3.AudioEncoding|null} [audioEncoding] InputAudioConfig audioEncoding - * @property {number|null} [sampleRateHertz] InputAudioConfig sampleRateHertz - * @property {boolean|null} [enableWordInfo] InputAudioConfig enableWordInfo - * @property {Array.|null} [phraseHints] InputAudioConfig phraseHints - * @property {string|null} [model] InputAudioConfig model - * @property {google.cloud.dialogflow.cx.v3.SpeechModelVariant|null} [modelVariant] InputAudioConfig modelVariant - * @property {boolean|null} [singleUtterance] InputAudioConfig singleUtterance + * @interface IListChangelogsResponse + * @property {Array.|null} [changelogs] ListChangelogsResponse changelogs + * @property {string|null} [nextPageToken] ListChangelogsResponse nextPageToken */ /** - * Constructs a new InputAudioConfig. + * Constructs a new ListChangelogsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an InputAudioConfig. - * @implements IInputAudioConfig + * @classdesc Represents a ListChangelogsResponse. + * @implements IListChangelogsResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IInputAudioConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListChangelogsResponse=} [properties] Properties to set */ - function InputAudioConfig(properties) { - this.phraseHints = []; + function ListChangelogsResponse(properties) { + this.changelogs = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17759,162 +19978,92 @@ } /** - * InputAudioConfig audioEncoding. - * @member {google.cloud.dialogflow.cx.v3.AudioEncoding} audioEncoding - * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig - * @instance - */ - InputAudioConfig.prototype.audioEncoding = 0; - - /** - * InputAudioConfig sampleRateHertz. - * @member {number} sampleRateHertz - * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig - * @instance - */ - InputAudioConfig.prototype.sampleRateHertz = 0; - - /** - * InputAudioConfig enableWordInfo. - * @member {boolean} enableWordInfo - * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig - * @instance - */ - InputAudioConfig.prototype.enableWordInfo = false; - - /** - * InputAudioConfig phraseHints. - * @member {Array.} phraseHints - * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig - * @instance - */ - InputAudioConfig.prototype.phraseHints = $util.emptyArray; - - /** - * InputAudioConfig model. - * @member {string} model - * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig - * @instance - */ - InputAudioConfig.prototype.model = ""; - - /** - * InputAudioConfig modelVariant. - * @member {google.cloud.dialogflow.cx.v3.SpeechModelVariant} modelVariant - * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig + * ListChangelogsResponse changelogs. + * @member {Array.} changelogs + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse * @instance */ - InputAudioConfig.prototype.modelVariant = 0; + ListChangelogsResponse.prototype.changelogs = $util.emptyArray; /** - * InputAudioConfig singleUtterance. - * @member {boolean} singleUtterance - * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig + * ListChangelogsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse * @instance */ - InputAudioConfig.prototype.singleUtterance = false; + ListChangelogsResponse.prototype.nextPageToken = ""; /** - * Creates a new InputAudioConfig instance using the specified properties. + * Creates a new ListChangelogsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IInputAudioConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.InputAudioConfig} InputAudioConfig instance + * @param {google.cloud.dialogflow.cx.v3.IListChangelogsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsResponse} ListChangelogsResponse instance */ - InputAudioConfig.create = function create(properties) { - return new InputAudioConfig(properties); + ListChangelogsResponse.create = function create(properties) { + return new ListChangelogsResponse(properties); }; /** - * Encodes the specified InputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.InputAudioConfig.verify|verify} messages. + * Encodes the specified ListChangelogsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IInputAudioConfig} message InputAudioConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListChangelogsResponse} message ListChangelogsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InputAudioConfig.encode = function encode(message, writer) { + ListChangelogsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.audioEncoding != null && Object.hasOwnProperty.call(message, "audioEncoding")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.audioEncoding); - if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sampleRateHertz); - if (message.phraseHints != null && message.phraseHints.length) - for (var i = 0; i < message.phraseHints.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.phraseHints[i]); - if (message.model != null && Object.hasOwnProperty.call(message, "model")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.model); - if (message.singleUtterance != null && Object.hasOwnProperty.call(message, "singleUtterance")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.singleUtterance); - if (message.modelVariant != null && Object.hasOwnProperty.call(message, "modelVariant")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.modelVariant); - if (message.enableWordInfo != null && Object.hasOwnProperty.call(message, "enableWordInfo")) - writer.uint32(/* id 13, wireType 0 =*/104).bool(message.enableWordInfo); + if (message.changelogs != null && message.changelogs.length) + for (var i = 0; i < message.changelogs.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Changelog.encode(message.changelogs[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 InputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.InputAudioConfig.verify|verify} messages. + * Encodes the specified ListChangelogsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IInputAudioConfig} message InputAudioConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListChangelogsResponse} message ListChangelogsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InputAudioConfig.encodeDelimited = function encodeDelimited(message, writer) { + ListChangelogsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an InputAudioConfig message from the specified reader or buffer. + * Decodes a ListChangelogsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.InputAudioConfig} InputAudioConfig + * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsResponse} ListChangelogsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InputAudioConfig.decode = function decode(reader, length) { + ListChangelogsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.InputAudioConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListChangelogsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.audioEncoding = reader.int32(); + if (!(message.changelogs && message.changelogs.length)) + message.changelogs = []; + message.changelogs.push($root.google.cloud.dialogflow.cx.v3.Changelog.decode(reader, reader.uint32())); break; } case 2: { - message.sampleRateHertz = reader.int32(); - break; - } - case 13: { - message.enableWordInfo = reader.bool(); - break; - } - case 4: { - if (!(message.phraseHints && message.phraseHints.length)) - message.phraseHints = []; - message.phraseHints.push(reader.string()); - break; - } - case 7: { - message.model = reader.string(); - break; - } - case 10: { - message.modelVariant = reader.int32(); - break; - } - case 8: { - message.singleUtterance = reader.bool(); + message.nextPageToken = reader.string(); break; } default: @@ -17926,281 +20075,148 @@ }; /** - * Decodes an InputAudioConfig message from the specified reader or buffer, length delimited. + * Decodes a ListChangelogsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.InputAudioConfig} InputAudioConfig + * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsResponse} ListChangelogsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InputAudioConfig.decodeDelimited = function decodeDelimited(reader) { + ListChangelogsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an InputAudioConfig message. + * Verifies a ListChangelogsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - InputAudioConfig.verify = function verify(message) { + ListChangelogsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) - switch (message.audioEncoding) { - default: - return "audioEncoding: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; + if (message.changelogs != null && message.hasOwnProperty("changelogs")) { + if (!Array.isArray(message.changelogs)) + return "changelogs: array expected"; + for (var i = 0; i < message.changelogs.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Changelog.verify(message.changelogs[i]); + if (error) + return "changelogs." + error; } - if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) - if (!$util.isInteger(message.sampleRateHertz)) - return "sampleRateHertz: integer expected"; - if (message.enableWordInfo != null && message.hasOwnProperty("enableWordInfo")) - if (typeof message.enableWordInfo !== "boolean") - return "enableWordInfo: boolean expected"; - if (message.phraseHints != null && message.hasOwnProperty("phraseHints")) { - if (!Array.isArray(message.phraseHints)) - return "phraseHints: array expected"; - for (var i = 0; i < message.phraseHints.length; ++i) - if (!$util.isString(message.phraseHints[i])) - return "phraseHints: string[] expected"; } - if (message.model != null && message.hasOwnProperty("model")) - if (!$util.isString(message.model)) - return "model: string expected"; - if (message.modelVariant != null && message.hasOwnProperty("modelVariant")) - switch (message.modelVariant) { - default: - return "modelVariant: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) - if (typeof message.singleUtterance !== "boolean") - return "singleUtterance: boolean expected"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an InputAudioConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListChangelogsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.InputAudioConfig} InputAudioConfig + * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsResponse} ListChangelogsResponse */ - InputAudioConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.InputAudioConfig) + ListChangelogsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListChangelogsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.InputAudioConfig(); - switch (object.audioEncoding) { - default: - if (typeof object.audioEncoding === "number") { - message.audioEncoding = object.audioEncoding; - break; - } - break; - case "AUDIO_ENCODING_UNSPECIFIED": - case 0: - message.audioEncoding = 0; - break; - case "AUDIO_ENCODING_LINEAR_16": - case 1: - message.audioEncoding = 1; - break; - case "AUDIO_ENCODING_FLAC": - case 2: - message.audioEncoding = 2; - break; - case "AUDIO_ENCODING_MULAW": - case 3: - message.audioEncoding = 3; - break; - case "AUDIO_ENCODING_AMR": - case 4: - message.audioEncoding = 4; - break; - case "AUDIO_ENCODING_AMR_WB": - case 5: - message.audioEncoding = 5; - break; - case "AUDIO_ENCODING_OGG_OPUS": - case 6: - message.audioEncoding = 6; - break; - case "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE": - case 7: - message.audioEncoding = 7; - break; - } - if (object.sampleRateHertz != null) - message.sampleRateHertz = object.sampleRateHertz | 0; - if (object.enableWordInfo != null) - message.enableWordInfo = Boolean(object.enableWordInfo); - if (object.phraseHints) { - if (!Array.isArray(object.phraseHints)) - throw TypeError(".google.cloud.dialogflow.cx.v3.InputAudioConfig.phraseHints: array expected"); - message.phraseHints = []; - for (var i = 0; i < object.phraseHints.length; ++i) - message.phraseHints[i] = String(object.phraseHints[i]); - } - if (object.model != null) - message.model = String(object.model); - switch (object.modelVariant) { - default: - if (typeof object.modelVariant === "number") { - message.modelVariant = object.modelVariant; - break; + var message = new $root.google.cloud.dialogflow.cx.v3.ListChangelogsResponse(); + if (object.changelogs) { + if (!Array.isArray(object.changelogs)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListChangelogsResponse.changelogs: array expected"); + message.changelogs = []; + for (var i = 0; i < object.changelogs.length; ++i) { + if (typeof object.changelogs[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListChangelogsResponse.changelogs: object expected"); + message.changelogs[i] = $root.google.cloud.dialogflow.cx.v3.Changelog.fromObject(object.changelogs[i]); } - break; - case "SPEECH_MODEL_VARIANT_UNSPECIFIED": - case 0: - message.modelVariant = 0; - break; - case "USE_BEST_AVAILABLE": - case 1: - message.modelVariant = 1; - break; - case "USE_STANDARD": - case 2: - message.modelVariant = 2; - break; - case "USE_ENHANCED": - case 3: - message.modelVariant = 3; - break; } - if (object.singleUtterance != null) - message.singleUtterance = Boolean(object.singleUtterance); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an InputAudioConfig message. Also converts values to other types if specified. + * Creates a plain object from a ListChangelogsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.InputAudioConfig} message InputAudioConfig + * @param {google.cloud.dialogflow.cx.v3.ListChangelogsResponse} message ListChangelogsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - InputAudioConfig.toObject = function toObject(message, options) { + ListChangelogsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.phraseHints = []; - if (options.defaults) { - object.audioEncoding = options.enums === String ? "AUDIO_ENCODING_UNSPECIFIED" : 0; - object.sampleRateHertz = 0; - object.model = ""; - object.singleUtterance = false; - object.modelVariant = options.enums === String ? "SPEECH_MODEL_VARIANT_UNSPECIFIED" : 0; - object.enableWordInfo = false; - } - if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) - object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.AudioEncoding[message.audioEncoding] === undefined ? message.audioEncoding : $root.google.cloud.dialogflow.cx.v3.AudioEncoding[message.audioEncoding] : message.audioEncoding; - if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) - object.sampleRateHertz = message.sampleRateHertz; - if (message.phraseHints && message.phraseHints.length) { - object.phraseHints = []; - for (var j = 0; j < message.phraseHints.length; ++j) - object.phraseHints[j] = message.phraseHints[j]; + object.changelogs = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.changelogs && message.changelogs.length) { + object.changelogs = []; + for (var j = 0; j < message.changelogs.length; ++j) + object.changelogs[j] = $root.google.cloud.dialogflow.cx.v3.Changelog.toObject(message.changelogs[j], options); } - if (message.model != null && message.hasOwnProperty("model")) - object.model = message.model; - if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) - object.singleUtterance = message.singleUtterance; - if (message.modelVariant != null && message.hasOwnProperty("modelVariant")) - object.modelVariant = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SpeechModelVariant[message.modelVariant] === undefined ? message.modelVariant : $root.google.cloud.dialogflow.cx.v3.SpeechModelVariant[message.modelVariant] : message.modelVariant; - if (message.enableWordInfo != null && message.hasOwnProperty("enableWordInfo")) - object.enableWordInfo = message.enableWordInfo; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this InputAudioConfig to JSON. + * Converts this ListChangelogsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse * @instance * @returns {Object.} JSON object */ - InputAudioConfig.prototype.toJSON = function toJSON() { + ListChangelogsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for InputAudioConfig + * Gets the default type url for ListChangelogsResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - InputAudioConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListChangelogsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.InputAudioConfig"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListChangelogsResponse"; }; - return InputAudioConfig; - })(); - - /** - * SsmlVoiceGender enum. - * @name google.cloud.dialogflow.cx.v3.SsmlVoiceGender - * @enum {number} - * @property {number} SSML_VOICE_GENDER_UNSPECIFIED=0 SSML_VOICE_GENDER_UNSPECIFIED value - * @property {number} SSML_VOICE_GENDER_MALE=1 SSML_VOICE_GENDER_MALE value - * @property {number} SSML_VOICE_GENDER_FEMALE=2 SSML_VOICE_GENDER_FEMALE value - * @property {number} SSML_VOICE_GENDER_NEUTRAL=3 SSML_VOICE_GENDER_NEUTRAL value - */ - v3.SsmlVoiceGender = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SSML_VOICE_GENDER_UNSPECIFIED"] = 0; - values[valuesById[1] = "SSML_VOICE_GENDER_MALE"] = 1; - values[valuesById[2] = "SSML_VOICE_GENDER_FEMALE"] = 2; - values[valuesById[3] = "SSML_VOICE_GENDER_NEUTRAL"] = 3; - return values; + return ListChangelogsResponse; })(); - v3.VoiceSelectionParams = (function() { + v3.GetChangelogRequest = (function() { /** - * Properties of a VoiceSelectionParams. + * Properties of a GetChangelogRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IVoiceSelectionParams - * @property {string|null} [name] VoiceSelectionParams name - * @property {google.cloud.dialogflow.cx.v3.SsmlVoiceGender|null} [ssmlGender] VoiceSelectionParams ssmlGender + * @interface IGetChangelogRequest + * @property {string|null} [name] GetChangelogRequest name */ /** - * Constructs a new VoiceSelectionParams. + * Constructs a new GetChangelogRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a VoiceSelectionParams. - * @implements IVoiceSelectionParams + * @classdesc Represents a GetChangelogRequest. + * @implements IGetChangelogRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IVoiceSelectionParams=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IGetChangelogRequest=} [properties] Properties to set */ - function VoiceSelectionParams(properties) { + function GetChangelogRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18208,80 +20224,70 @@ } /** - * VoiceSelectionParams name. + * GetChangelogRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.VoiceSelectionParams - * @instance - */ - VoiceSelectionParams.prototype.name = ""; - - /** - * VoiceSelectionParams ssmlGender. - * @member {google.cloud.dialogflow.cx.v3.SsmlVoiceGender} ssmlGender - * @memberof google.cloud.dialogflow.cx.v3.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest * @instance */ - VoiceSelectionParams.prototype.ssmlGender = 0; + GetChangelogRequest.prototype.name = ""; /** - * Creates a new VoiceSelectionParams instance using the specified properties. + * Creates a new GetChangelogRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IVoiceSelectionParams=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.VoiceSelectionParams} VoiceSelectionParams instance + * @param {google.cloud.dialogflow.cx.v3.IGetChangelogRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetChangelogRequest} GetChangelogRequest instance */ - VoiceSelectionParams.create = function create(properties) { - return new VoiceSelectionParams(properties); + GetChangelogRequest.create = function create(properties) { + return new GetChangelogRequest(properties); }; /** - * Encodes the specified VoiceSelectionParams message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VoiceSelectionParams.verify|verify} messages. + * Encodes the specified GetChangelogRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetChangelogRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IVoiceSelectionParams} message VoiceSelectionParams message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetChangelogRequest} message GetChangelogRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VoiceSelectionParams.encode = function encode(message, writer) { + GetChangelogRequest.encode = function encode(message, writer) { 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.ssmlGender != null && Object.hasOwnProperty.call(message, "ssmlGender")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.ssmlGender); return writer; }; /** - * Encodes the specified VoiceSelectionParams message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VoiceSelectionParams.verify|verify} messages. + * Encodes the specified GetChangelogRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetChangelogRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IVoiceSelectionParams} message VoiceSelectionParams message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetChangelogRequest} message GetChangelogRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VoiceSelectionParams.encodeDelimited = function encodeDelimited(message, writer) { + GetChangelogRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VoiceSelectionParams message from the specified reader or buffer. + * Decodes a GetChangelogRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.VoiceSelectionParams} VoiceSelectionParams + * @returns {google.cloud.dialogflow.cx.v3.GetChangelogRequest} GetChangelogRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VoiceSelectionParams.decode = function decode(reader, length) { + GetChangelogRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.VoiceSelectionParams(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetChangelogRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -18289,10 +20295,6 @@ message.name = reader.string(); break; } - case 2: { - message.ssmlGender = reader.int32(); - break; - } default: reader.skipType(tag & 7); break; @@ -18302,165 +20304,128 @@ }; /** - * Decodes a VoiceSelectionParams message from the specified reader or buffer, length delimited. + * Decodes a GetChangelogRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.VoiceSelectionParams} VoiceSelectionParams + * @returns {google.cloud.dialogflow.cx.v3.GetChangelogRequest} GetChangelogRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VoiceSelectionParams.decodeDelimited = function decodeDelimited(reader) { + GetChangelogRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VoiceSelectionParams message. + * Verifies a GetChangelogRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VoiceSelectionParams.verify = function verify(message) { + GetChangelogRequest.verify = function verify(message) { if (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.ssmlGender != null && message.hasOwnProperty("ssmlGender")) - switch (message.ssmlGender) { - default: - return "ssmlGender: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } return null; }; /** - * Creates a VoiceSelectionParams message from a plain object. Also converts values to their respective internal types. + * Creates a GetChangelogRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.VoiceSelectionParams} VoiceSelectionParams + * @returns {google.cloud.dialogflow.cx.v3.GetChangelogRequest} GetChangelogRequest */ - VoiceSelectionParams.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.VoiceSelectionParams) + GetChangelogRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetChangelogRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.VoiceSelectionParams(); + var message = new $root.google.cloud.dialogflow.cx.v3.GetChangelogRequest(); if (object.name != null) message.name = String(object.name); - switch (object.ssmlGender) { - default: - if (typeof object.ssmlGender === "number") { - message.ssmlGender = object.ssmlGender; - break; - } - break; - case "SSML_VOICE_GENDER_UNSPECIFIED": - case 0: - message.ssmlGender = 0; - break; - case "SSML_VOICE_GENDER_MALE": - case 1: - message.ssmlGender = 1; - break; - case "SSML_VOICE_GENDER_FEMALE": - case 2: - message.ssmlGender = 2; - break; - case "SSML_VOICE_GENDER_NEUTRAL": - case 3: - message.ssmlGender = 3; - break; - } return message; }; /** - * Creates a plain object from a VoiceSelectionParams message. Also converts values to other types if specified. + * Creates a plain object from a GetChangelogRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest * @static - * @param {google.cloud.dialogflow.cx.v3.VoiceSelectionParams} message VoiceSelectionParams + * @param {google.cloud.dialogflow.cx.v3.GetChangelogRequest} message GetChangelogRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VoiceSelectionParams.toObject = function toObject(message, options) { + GetChangelogRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.ssmlGender = options.enums === String ? "SSML_VOICE_GENDER_UNSPECIFIED" : 0; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.ssmlGender != null && message.hasOwnProperty("ssmlGender")) - object.ssmlGender = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SsmlVoiceGender[message.ssmlGender] === undefined ? message.ssmlGender : $root.google.cloud.dialogflow.cx.v3.SsmlVoiceGender[message.ssmlGender] : message.ssmlGender; return object; }; /** - * Converts this VoiceSelectionParams to JSON. + * Converts this GetChangelogRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest * @instance * @returns {Object.} JSON object */ - VoiceSelectionParams.prototype.toJSON = function toJSON() { + GetChangelogRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for VoiceSelectionParams + * Gets the default type url for GetChangelogRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - VoiceSelectionParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetChangelogRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.VoiceSelectionParams"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetChangelogRequest"; }; - return VoiceSelectionParams; + return GetChangelogRequest; })(); - v3.SynthesizeSpeechConfig = (function() { + v3.Changelog = (function() { /** - * Properties of a SynthesizeSpeechConfig. + * Properties of a Changelog. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ISynthesizeSpeechConfig - * @property {number|null} [speakingRate] SynthesizeSpeechConfig speakingRate - * @property {number|null} [pitch] SynthesizeSpeechConfig pitch - * @property {number|null} [volumeGainDb] SynthesizeSpeechConfig volumeGainDb - * @property {Array.|null} [effectsProfileId] SynthesizeSpeechConfig effectsProfileId - * @property {google.cloud.dialogflow.cx.v3.IVoiceSelectionParams|null} [voice] SynthesizeSpeechConfig voice + * @interface IChangelog + * @property {string|null} [name] Changelog name + * @property {string|null} [userEmail] Changelog userEmail + * @property {string|null} [displayName] Changelog displayName + * @property {string|null} [action] Changelog action + * @property {string|null} [type] Changelog type + * @property {string|null} [resource] Changelog resource + * @property {google.protobuf.ITimestamp|null} [createTime] Changelog createTime */ /** - * Constructs a new SynthesizeSpeechConfig. + * Constructs a new Changelog. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a SynthesizeSpeechConfig. - * @implements ISynthesizeSpeechConfig + * @classdesc Represents a Changelog. + * @implements IChangelog * @constructor - * @param {google.cloud.dialogflow.cx.v3.ISynthesizeSpeechConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IChangelog=} [properties] Properties to set */ - function SynthesizeSpeechConfig(properties) { - this.effectsProfileId = []; + function Changelog(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18468,336 +20433,446 @@ } /** - * SynthesizeSpeechConfig speakingRate. - * @member {number} speakingRate - * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig + * Changelog name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.Changelog * @instance */ - SynthesizeSpeechConfig.prototype.speakingRate = 0; + Changelog.prototype.name = ""; /** - * SynthesizeSpeechConfig pitch. - * @member {number} pitch - * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig + * Changelog userEmail. + * @member {string} userEmail + * @memberof google.cloud.dialogflow.cx.v3.Changelog * @instance */ - SynthesizeSpeechConfig.prototype.pitch = 0; + Changelog.prototype.userEmail = ""; /** - * SynthesizeSpeechConfig volumeGainDb. - * @member {number} volumeGainDb - * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig + * Changelog displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.Changelog * @instance */ - SynthesizeSpeechConfig.prototype.volumeGainDb = 0; + Changelog.prototype.displayName = ""; /** - * SynthesizeSpeechConfig effectsProfileId. - * @member {Array.} effectsProfileId - * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig + * Changelog action. + * @member {string} action + * @memberof google.cloud.dialogflow.cx.v3.Changelog * @instance */ - SynthesizeSpeechConfig.prototype.effectsProfileId = $util.emptyArray; + Changelog.prototype.action = ""; /** - * SynthesizeSpeechConfig voice. - * @member {google.cloud.dialogflow.cx.v3.IVoiceSelectionParams|null|undefined} voice - * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig + * Changelog type. + * @member {string} type + * @memberof google.cloud.dialogflow.cx.v3.Changelog * @instance */ - SynthesizeSpeechConfig.prototype.voice = null; + Changelog.prototype.type = ""; /** - * Creates a new SynthesizeSpeechConfig instance using the specified properties. + * Changelog resource. + * @member {string} resource + * @memberof google.cloud.dialogflow.cx.v3.Changelog + * @instance + */ + Changelog.prototype.resource = ""; + + /** + * Changelog createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dialogflow.cx.v3.Changelog + * @instance + */ + Changelog.prototype.createTime = null; + + /** + * Creates a new Changelog instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3.Changelog * @static - * @param {google.cloud.dialogflow.cx.v3.ISynthesizeSpeechConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig} SynthesizeSpeechConfig instance + * @param {google.cloud.dialogflow.cx.v3.IChangelog=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Changelog} Changelog instance */ - SynthesizeSpeechConfig.create = function create(properties) { - return new SynthesizeSpeechConfig(properties); + Changelog.create = function create(properties) { + return new Changelog(properties); }; /** - * Encodes the specified SynthesizeSpeechConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig.verify|verify} messages. + * Encodes the specified Changelog message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Changelog.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3.Changelog * @static - * @param {google.cloud.dialogflow.cx.v3.ISynthesizeSpeechConfig} message SynthesizeSpeechConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IChangelog} message Changelog message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SynthesizeSpeechConfig.encode = function encode(message, writer) { + Changelog.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.speakingRate != null && Object.hasOwnProperty.call(message, "speakingRate")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.speakingRate); - if (message.pitch != null && Object.hasOwnProperty.call(message, "pitch")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.pitch); - if (message.volumeGainDb != null && Object.hasOwnProperty.call(message, "volumeGainDb")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.volumeGainDb); - if (message.voice != null && Object.hasOwnProperty.call(message, "voice")) - $root.google.cloud.dialogflow.cx.v3.VoiceSelectionParams.encode(message.voice, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.effectsProfileId != null && message.effectsProfileId.length) - for (var i = 0; i < message.effectsProfileId.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.effectsProfileId[i]); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.userEmail != null && Object.hasOwnProperty.call(message, "userEmail")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.userEmail); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.resource); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.type); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.action); return writer; }; /** - * Encodes the specified SynthesizeSpeechConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig.verify|verify} messages. + * Encodes the specified Changelog message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Changelog.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3.Changelog * @static - * @param {google.cloud.dialogflow.cx.v3.ISynthesizeSpeechConfig} message SynthesizeSpeechConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IChangelog} message Changelog message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SynthesizeSpeechConfig.encodeDelimited = function encodeDelimited(message, writer) { + Changelog.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer. + * Decodes a Changelog message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3.Changelog * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig} SynthesizeSpeechConfig + * @returns {google.cloud.dialogflow.cx.v3.Changelog} Changelog * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SynthesizeSpeechConfig.decode = function decode(reader, length) { + Changelog.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Changelog(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.speakingRate = reader.double(); + message.name = reader.string(); break; } case 2: { - message.pitch = reader.double(); + message.userEmail = reader.string(); break; } - case 3: { - message.volumeGainDb = reader.double(); + case 7: { + message.displayName = reader.string(); break; } - case 5: { - if (!(message.effectsProfileId && message.effectsProfileId.length)) - message.effectsProfileId = []; - message.effectsProfileId.push(reader.string()); + case 11: { + message.action = reader.string(); break; } - case 4: { - message.voice = $root.google.cloud.dialogflow.cx.v3.VoiceSelectionParams.decode(reader, reader.uint32()); + case 8: { + message.type = reader.string(); break; } - default: - reader.skipType(tag & 7); - break; - } - } + case 3: { + message.resource = reader.string(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } return message; }; /** - * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer, length delimited. + * Decodes a Changelog message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3.Changelog * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig} SynthesizeSpeechConfig + * @returns {google.cloud.dialogflow.cx.v3.Changelog} Changelog * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SynthesizeSpeechConfig.decodeDelimited = function decodeDelimited(reader) { + Changelog.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SynthesizeSpeechConfig message. + * Verifies a Changelog message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3.Changelog * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SynthesizeSpeechConfig.verify = function verify(message) { + Changelog.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.speakingRate != null && message.hasOwnProperty("speakingRate")) - if (typeof message.speakingRate !== "number") - return "speakingRate: number expected"; - if (message.pitch != null && message.hasOwnProperty("pitch")) - if (typeof message.pitch !== "number") - return "pitch: number expected"; - if (message.volumeGainDb != null && message.hasOwnProperty("volumeGainDb")) - if (typeof message.volumeGainDb !== "number") - return "volumeGainDb: number expected"; - if (message.effectsProfileId != null && message.hasOwnProperty("effectsProfileId")) { - if (!Array.isArray(message.effectsProfileId)) - return "effectsProfileId: array expected"; - for (var i = 0; i < message.effectsProfileId.length; ++i) - if (!$util.isString(message.effectsProfileId[i])) - return "effectsProfileId: string[] expected"; - } - if (message.voice != null && message.hasOwnProperty("voice")) { - var error = $root.google.cloud.dialogflow.cx.v3.VoiceSelectionParams.verify(message.voice); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.userEmail != null && message.hasOwnProperty("userEmail")) + if (!$util.isString(message.userEmail)) + return "userEmail: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.action != null && message.hasOwnProperty("action")) + if (!$util.isString(message.action)) + return "action: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return "voice." + error; + return "createTime." + error; } return null; }; /** - * Creates a SynthesizeSpeechConfig message from a plain object. Also converts values to their respective internal types. + * Creates a Changelog message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3.Changelog * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig} SynthesizeSpeechConfig + * @returns {google.cloud.dialogflow.cx.v3.Changelog} Changelog */ - SynthesizeSpeechConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig) + Changelog.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Changelog) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig(); - if (object.speakingRate != null) - message.speakingRate = Number(object.speakingRate); - if (object.pitch != null) - message.pitch = Number(object.pitch); - if (object.volumeGainDb != null) - message.volumeGainDb = Number(object.volumeGainDb); - if (object.effectsProfileId) { - if (!Array.isArray(object.effectsProfileId)) - throw TypeError(".google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig.effectsProfileId: array expected"); - message.effectsProfileId = []; - for (var i = 0; i < object.effectsProfileId.length; ++i) - message.effectsProfileId[i] = String(object.effectsProfileId[i]); - } - if (object.voice != null) { - if (typeof object.voice !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig.voice: object expected"); - message.voice = $root.google.cloud.dialogflow.cx.v3.VoiceSelectionParams.fromObject(object.voice); + var message = new $root.google.cloud.dialogflow.cx.v3.Changelog(); + if (object.name != null) + message.name = String(object.name); + if (object.userEmail != null) + message.userEmail = String(object.userEmail); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.action != null) + message.action = String(object.action); + if (object.type != null) + message.type = String(object.type); + if (object.resource != null) + message.resource = String(object.resource); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Changelog.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } return message; }; /** - * Creates a plain object from a SynthesizeSpeechConfig message. Also converts values to other types if specified. + * Creates a plain object from a Changelog message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3.Changelog * @static - * @param {google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig} message SynthesizeSpeechConfig + * @param {google.cloud.dialogflow.cx.v3.Changelog} message Changelog * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SynthesizeSpeechConfig.toObject = function toObject(message, options) { + Changelog.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.effectsProfileId = []; if (options.defaults) { - object.speakingRate = 0; - object.pitch = 0; - object.volumeGainDb = 0; - object.voice = null; - } - if (message.speakingRate != null && message.hasOwnProperty("speakingRate")) - object.speakingRate = options.json && !isFinite(message.speakingRate) ? String(message.speakingRate) : message.speakingRate; - if (message.pitch != null && message.hasOwnProperty("pitch")) - object.pitch = options.json && !isFinite(message.pitch) ? String(message.pitch) : message.pitch; - if (message.volumeGainDb != null && message.hasOwnProperty("volumeGainDb")) - object.volumeGainDb = options.json && !isFinite(message.volumeGainDb) ? String(message.volumeGainDb) : message.volumeGainDb; - if (message.voice != null && message.hasOwnProperty("voice")) - object.voice = $root.google.cloud.dialogflow.cx.v3.VoiceSelectionParams.toObject(message.voice, options); - if (message.effectsProfileId && message.effectsProfileId.length) { - object.effectsProfileId = []; - for (var j = 0; j < message.effectsProfileId.length; ++j) - object.effectsProfileId[j] = message.effectsProfileId[j]; + object.name = ""; + object.userEmail = ""; + object.resource = ""; + object.createTime = null; + object.displayName = ""; + object.type = ""; + object.action = ""; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.userEmail != null && message.hasOwnProperty("userEmail")) + object.userEmail = message.userEmail; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.action != null && message.hasOwnProperty("action")) + object.action = message.action; return object; }; /** - * Converts this SynthesizeSpeechConfig to JSON. + * Converts this Changelog to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3.Changelog * @instance * @returns {Object.} JSON object */ - SynthesizeSpeechConfig.prototype.toJSON = function toJSON() { + Changelog.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SynthesizeSpeechConfig + * Gets the default type url for Changelog * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3.Changelog * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SynthesizeSpeechConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Changelog.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Changelog"; }; - return SynthesizeSpeechConfig; + return Changelog; })(); - /** - * OutputAudioEncoding enum. - * @name google.cloud.dialogflow.cx.v3.OutputAudioEncoding - * @enum {number} - * @property {number} OUTPUT_AUDIO_ENCODING_UNSPECIFIED=0 OUTPUT_AUDIO_ENCODING_UNSPECIFIED value - * @property {number} OUTPUT_AUDIO_ENCODING_LINEAR_16=1 OUTPUT_AUDIO_ENCODING_LINEAR_16 value - * @property {number} OUTPUT_AUDIO_ENCODING_MP3=2 OUTPUT_AUDIO_ENCODING_MP3 value - * @property {number} OUTPUT_AUDIO_ENCODING_MP3_64_KBPS=4 OUTPUT_AUDIO_ENCODING_MP3_64_KBPS value - * @property {number} OUTPUT_AUDIO_ENCODING_OGG_OPUS=3 OUTPUT_AUDIO_ENCODING_OGG_OPUS value - * @property {number} OUTPUT_AUDIO_ENCODING_MULAW=5 OUTPUT_AUDIO_ENCODING_MULAW value - */ - v3.OutputAudioEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OUTPUT_AUDIO_ENCODING_UNSPECIFIED"] = 0; - values[valuesById[1] = "OUTPUT_AUDIO_ENCODING_LINEAR_16"] = 1; - values[valuesById[2] = "OUTPUT_AUDIO_ENCODING_MP3"] = 2; - values[valuesById[4] = "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS"] = 4; - values[valuesById[3] = "OUTPUT_AUDIO_ENCODING_OGG_OPUS"] = 3; - values[valuesById[5] = "OUTPUT_AUDIO_ENCODING_MULAW"] = 5; - return values; + v3.Deployments = (function() { + + /** + * Constructs a new Deployments service. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a Deployments + * @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 Deployments(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Deployments.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Deployments; + + /** + * Creates new Deployments service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Deployments + * @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 {Deployments} RPC service. Useful where requests and/or responses are streamed. + */ + Deployments.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Deployments|listDeployments}. + * @memberof google.cloud.dialogflow.cx.v3.Deployments + * @typedef ListDeploymentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListDeploymentsResponse} [response] ListDeploymentsResponse + */ + + /** + * Calls ListDeployments. + * @function listDeployments + * @memberof google.cloud.dialogflow.cx.v3.Deployments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsRequest} request ListDeploymentsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Deployments.ListDeploymentsCallback} callback Node-style callback called with the error, if any, and ListDeploymentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Deployments.prototype.listDeployments = function listDeployments(request, callback) { + return this.rpcCall(listDeployments, $root.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest, $root.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse, request, callback); + }, "name", { value: "ListDeployments" }); + + /** + * Calls ListDeployments. + * @function listDeployments + * @memberof google.cloud.dialogflow.cx.v3.Deployments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsRequest} request ListDeploymentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Deployments|getDeployment}. + * @memberof google.cloud.dialogflow.cx.v3.Deployments + * @typedef GetDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Deployment} [response] Deployment + */ + + /** + * Calls GetDeployment. + * @function getDeployment + * @memberof google.cloud.dialogflow.cx.v3.Deployments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetDeploymentRequest} request GetDeploymentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Deployments.GetDeploymentCallback} callback Node-style callback called with the error, if any, and Deployment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Deployments.prototype.getDeployment = function getDeployment(request, callback) { + return this.rpcCall(getDeployment, $root.google.cloud.dialogflow.cx.v3.GetDeploymentRequest, $root.google.cloud.dialogflow.cx.v3.Deployment, request, callback); + }, "name", { value: "GetDeployment" }); + + /** + * Calls GetDeployment. + * @function getDeployment + * @memberof google.cloud.dialogflow.cx.v3.Deployments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetDeploymentRequest} request GetDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Deployments; })(); - v3.OutputAudioConfig = (function() { + v3.Deployment = (function() { /** - * Properties of an OutputAudioConfig. + * Properties of a Deployment. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IOutputAudioConfig - * @property {google.cloud.dialogflow.cx.v3.OutputAudioEncoding|null} [audioEncoding] OutputAudioConfig audioEncoding - * @property {number|null} [sampleRateHertz] OutputAudioConfig sampleRateHertz - * @property {google.cloud.dialogflow.cx.v3.ISynthesizeSpeechConfig|null} [synthesizeSpeechConfig] OutputAudioConfig synthesizeSpeechConfig + * @interface IDeployment + * @property {string|null} [name] Deployment name + * @property {string|null} [flowVersion] Deployment flowVersion + * @property {google.cloud.dialogflow.cx.v3.Deployment.State|null} [state] Deployment state + * @property {google.cloud.dialogflow.cx.v3.Deployment.IResult|null} [result] Deployment result + * @property {google.protobuf.ITimestamp|null} [startTime] Deployment startTime + * @property {google.protobuf.ITimestamp|null} [endTime] Deployment endTime */ /** - * Constructs a new OutputAudioConfig. + * Constructs a new Deployment. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an OutputAudioConfig. - * @implements IOutputAudioConfig + * @classdesc Represents a Deployment. + * @implements IDeployment * @constructor - * @param {google.cloud.dialogflow.cx.v3.IOutputAudioConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IDeployment=} [properties] Properties to set */ - function OutputAudioConfig(properties) { + function Deployment(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18805,103 +20880,145 @@ } /** - * OutputAudioConfig audioEncoding. - * @member {google.cloud.dialogflow.cx.v3.OutputAudioEncoding} audioEncoding - * @memberof google.cloud.dialogflow.cx.v3.OutputAudioConfig + * Deployment name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.Deployment * @instance */ - OutputAudioConfig.prototype.audioEncoding = 0; + Deployment.prototype.name = ""; /** - * OutputAudioConfig sampleRateHertz. - * @member {number} sampleRateHertz - * @memberof google.cloud.dialogflow.cx.v3.OutputAudioConfig + * Deployment flowVersion. + * @member {string} flowVersion + * @memberof google.cloud.dialogflow.cx.v3.Deployment * @instance */ - OutputAudioConfig.prototype.sampleRateHertz = 0; + Deployment.prototype.flowVersion = ""; /** - * OutputAudioConfig synthesizeSpeechConfig. - * @member {google.cloud.dialogflow.cx.v3.ISynthesizeSpeechConfig|null|undefined} synthesizeSpeechConfig - * @memberof google.cloud.dialogflow.cx.v3.OutputAudioConfig + * Deployment state. + * @member {google.cloud.dialogflow.cx.v3.Deployment.State} state + * @memberof google.cloud.dialogflow.cx.v3.Deployment * @instance */ - OutputAudioConfig.prototype.synthesizeSpeechConfig = null; + Deployment.prototype.state = 0; /** - * Creates a new OutputAudioConfig instance using the specified properties. + * Deployment result. + * @member {google.cloud.dialogflow.cx.v3.Deployment.IResult|null|undefined} result + * @memberof google.cloud.dialogflow.cx.v3.Deployment + * @instance + */ + Deployment.prototype.result = null; + + /** + * Deployment startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dialogflow.cx.v3.Deployment + * @instance + */ + Deployment.prototype.startTime = null; + + /** + * Deployment endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.dialogflow.cx.v3.Deployment + * @instance + */ + Deployment.prototype.endTime = null; + + /** + * Creates a new Deployment instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.Deployment * @static - * @param {google.cloud.dialogflow.cx.v3.IOutputAudioConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.OutputAudioConfig} OutputAudioConfig instance + * @param {google.cloud.dialogflow.cx.v3.IDeployment=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Deployment} Deployment instance */ - OutputAudioConfig.create = function create(properties) { - return new OutputAudioConfig(properties); + Deployment.create = function create(properties) { + return new Deployment(properties); }; /** - * Encodes the specified OutputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.OutputAudioConfig.verify|verify} messages. + * Encodes the specified Deployment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.Deployment * @static - * @param {google.cloud.dialogflow.cx.v3.IOutputAudioConfig} message OutputAudioConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeployment} message Deployment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OutputAudioConfig.encode = function encode(message, writer) { + Deployment.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.audioEncoding != null && Object.hasOwnProperty.call(message, "audioEncoding")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.audioEncoding); - if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sampleRateHertz); - if (message.synthesizeSpeechConfig != null && Object.hasOwnProperty.call(message, "synthesizeSpeechConfig")) - $root.google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig.encode(message.synthesizeSpeechConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.flowVersion != null && Object.hasOwnProperty.call(message, "flowVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.flowVersion); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.google.cloud.dialogflow.cx.v3.Deployment.Result.encode(message.result, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified OutputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.OutputAudioConfig.verify|verify} messages. + * Encodes the specified Deployment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.Deployment * @static - * @param {google.cloud.dialogflow.cx.v3.IOutputAudioConfig} message OutputAudioConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeployment} message Deployment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OutputAudioConfig.encodeDelimited = function encodeDelimited(message, writer) { + Deployment.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OutputAudioConfig message from the specified reader or buffer. + * Decodes a Deployment message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.Deployment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.OutputAudioConfig} OutputAudioConfig + * @returns {google.cloud.dialogflow.cx.v3.Deployment} Deployment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OutputAudioConfig.decode = function decode(reader, length) { + Deployment.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Deployment(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.audioEncoding = reader.int32(); + message.name = reader.string(); break; } case 2: { - message.sampleRateHertz = reader.int32(); + message.flowVersion = reader.string(); break; } case 3: { - message.synthesizeSpeechConfig = $root.google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig.decode(reader, reader.uint32()); + message.state = reader.int32(); + break; + } + case 4: { + message.result = $root.google.cloud.dialogflow.cx.v3.Deployment.Result.decode(reader, reader.uint32()); + break; + } + case 5: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -18913,287 +21030,470 @@ }; /** - * Decodes an OutputAudioConfig message from the specified reader or buffer, length delimited. + * Decodes a Deployment message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.Deployment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.OutputAudioConfig} OutputAudioConfig + * @returns {google.cloud.dialogflow.cx.v3.Deployment} Deployment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OutputAudioConfig.decodeDelimited = function decodeDelimited(reader) { + Deployment.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OutputAudioConfig message. + * Verifies a Deployment message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.Deployment * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OutputAudioConfig.verify = function verify(message) { + Deployment.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) - switch (message.audioEncoding) { + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.flowVersion != null && message.hasOwnProperty("flowVersion")) + if (!$util.isString(message.flowVersion)) + return "flowVersion: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { default: - return "audioEncoding: enum value expected"; + return "state: enum value expected"; case 0: case 1: case 2: - case 4: case 3: - case 5: break; } - if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) - if (!$util.isInteger(message.sampleRateHertz)) - return "sampleRateHertz: integer expected"; - if (message.synthesizeSpeechConfig != null && message.hasOwnProperty("synthesizeSpeechConfig")) { - var error = $root.google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig.verify(message.synthesizeSpeechConfig); + if (message.result != null && message.hasOwnProperty("result")) { + var error = $root.google.cloud.dialogflow.cx.v3.Deployment.Result.verify(message.result); if (error) - return "synthesizeSpeechConfig." + error; + return "result." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; } return null; }; /** - * Creates an OutputAudioConfig message from a plain object. Also converts values to their respective internal types. + * Creates a Deployment message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.Deployment * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.OutputAudioConfig} OutputAudioConfig + * @returns {google.cloud.dialogflow.cx.v3.Deployment} Deployment */ - OutputAudioConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig) + Deployment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Deployment) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig(); - switch (object.audioEncoding) { + var message = new $root.google.cloud.dialogflow.cx.v3.Deployment(); + if (object.name != null) + message.name = String(object.name); + if (object.flowVersion != null) + message.flowVersion = String(object.flowVersion); + switch (object.state) { default: - if (typeof object.audioEncoding === "number") { - message.audioEncoding = object.audioEncoding; + if (typeof object.state === "number") { + message.state = object.state; break; } break; - case "OUTPUT_AUDIO_ENCODING_UNSPECIFIED": + case "STATE_UNSPECIFIED": case 0: - message.audioEncoding = 0; + message.state = 0; break; - case "OUTPUT_AUDIO_ENCODING_LINEAR_16": + case "RUNNING": case 1: - message.audioEncoding = 1; + message.state = 1; break; - case "OUTPUT_AUDIO_ENCODING_MP3": + case "SUCCEEDED": case 2: - message.audioEncoding = 2; - break; - case "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS": - case 4: - message.audioEncoding = 4; + message.state = 2; break; - case "OUTPUT_AUDIO_ENCODING_OGG_OPUS": + case "FAILED": case 3: - message.audioEncoding = 3; - break; - case "OUTPUT_AUDIO_ENCODING_MULAW": - case 5: - message.audioEncoding = 5; + message.state = 3; break; } - if (object.sampleRateHertz != null) - message.sampleRateHertz = object.sampleRateHertz | 0; - if (object.synthesizeSpeechConfig != null) { - if (typeof object.synthesizeSpeechConfig !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.OutputAudioConfig.synthesizeSpeechConfig: object expected"); - message.synthesizeSpeechConfig = $root.google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig.fromObject(object.synthesizeSpeechConfig); + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Deployment.result: object expected"); + message.result = $root.google.cloud.dialogflow.cx.v3.Deployment.Result.fromObject(object.result); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Deployment.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Deployment.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); } return message; }; /** - * Creates a plain object from an OutputAudioConfig message. Also converts values to other types if specified. + * Creates a plain object from a Deployment message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.Deployment * @static - * @param {google.cloud.dialogflow.cx.v3.OutputAudioConfig} message OutputAudioConfig + * @param {google.cloud.dialogflow.cx.v3.Deployment} message Deployment * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OutputAudioConfig.toObject = function toObject(message, options) { + Deployment.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.audioEncoding = options.enums === String ? "OUTPUT_AUDIO_ENCODING_UNSPECIFIED" : 0; - object.sampleRateHertz = 0; - object.synthesizeSpeechConfig = null; + object.name = ""; + object.flowVersion = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.result = null; + object.startTime = null; + object.endTime = null; } - if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) - object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.OutputAudioEncoding[message.audioEncoding] === undefined ? message.audioEncoding : $root.google.cloud.dialogflow.cx.v3.OutputAudioEncoding[message.audioEncoding] : message.audioEncoding; - if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) - object.sampleRateHertz = message.sampleRateHertz; - if (message.synthesizeSpeechConfig != null && message.hasOwnProperty("synthesizeSpeechConfig")) - object.synthesizeSpeechConfig = $root.google.cloud.dialogflow.cx.v3.SynthesizeSpeechConfig.toObject(message.synthesizeSpeechConfig, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.flowVersion != null && message.hasOwnProperty("flowVersion")) + object.flowVersion = message.flowVersion; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Deployment.State[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.cx.v3.Deployment.State[message.state] : message.state; + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.google.cloud.dialogflow.cx.v3.Deployment.Result.toObject(message.result, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); return object; }; /** - * Converts this OutputAudioConfig to JSON. + * Converts this Deployment to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.Deployment * @instance * @returns {Object.} JSON object */ - OutputAudioConfig.prototype.toJSON = function toJSON() { + Deployment.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OutputAudioConfig + * Gets the default type url for Deployment * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.Deployment * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OutputAudioConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Deployment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.OutputAudioConfig"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Deployment"; }; - return OutputAudioConfig; - })(); - - v3.Changelogs = (function() { - /** - * Constructs a new Changelogs service. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a Changelogs - * @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 + * State enum. + * @name google.cloud.dialogflow.cx.v3.Deployment.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} FAILED=3 FAILED value */ - function Changelogs(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } + Deployment.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "FAILED"] = 3; + return values; + })(); - (Changelogs.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Changelogs; + Deployment.Result = (function() { - /** - * Creates new Changelogs service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Changelogs - * @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 {Changelogs} RPC service. Useful where requests and/or responses are streamed. - */ - Changelogs.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + /** + * Properties of a Result. + * @memberof google.cloud.dialogflow.cx.v3.Deployment + * @interface IResult + * @property {Array.|null} [deploymentTestResults] Result deploymentTestResults + * @property {string|null} [experiment] Result experiment + */ - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Changelogs|listChangelogs}. - * @memberof google.cloud.dialogflow.cx.v3.Changelogs - * @typedef ListChangelogsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.ListChangelogsResponse} [response] ListChangelogsResponse - */ + /** + * Constructs a new Result. + * @memberof google.cloud.dialogflow.cx.v3.Deployment + * @classdesc Represents a Result. + * @implements IResult + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Deployment.IResult=} [properties] Properties to set + */ + function Result(properties) { + this.deploymentTestResults = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Calls ListChangelogs. - * @function listChangelogs - * @memberof google.cloud.dialogflow.cx.v3.Changelogs - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListChangelogsRequest} request ListChangelogsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Changelogs.ListChangelogsCallback} callback Node-style callback called with the error, if any, and ListChangelogsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Changelogs.prototype.listChangelogs = function listChangelogs(request, callback) { - return this.rpcCall(listChangelogs, $root.google.cloud.dialogflow.cx.v3.ListChangelogsRequest, $root.google.cloud.dialogflow.cx.v3.ListChangelogsResponse, request, callback); - }, "name", { value: "ListChangelogs" }); + /** + * Result deploymentTestResults. + * @member {Array.} deploymentTestResults + * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @instance + */ + Result.prototype.deploymentTestResults = $util.emptyArray; - /** - * Calls ListChangelogs. - * @function listChangelogs - * @memberof google.cloud.dialogflow.cx.v3.Changelogs - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListChangelogsRequest} request ListChangelogsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Result experiment. + * @member {string} experiment + * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @instance + */ + Result.prototype.experiment = ""; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Changelogs|getChangelog}. - * @memberof google.cloud.dialogflow.cx.v3.Changelogs - * @typedef GetChangelogCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Changelog} [response] Changelog - */ + /** + * Creates a new Result instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @static + * @param {google.cloud.dialogflow.cx.v3.Deployment.IResult=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Deployment.Result} Result instance + */ + Result.create = function create(properties) { + return new Result(properties); + }; - /** - * Calls GetChangelog. - * @function getChangelog - * @memberof google.cloud.dialogflow.cx.v3.Changelogs - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetChangelogRequest} request GetChangelogRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Changelogs.GetChangelogCallback} callback Node-style callback called with the error, if any, and Changelog - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Changelogs.prototype.getChangelog = function getChangelog(request, callback) { - return this.rpcCall(getChangelog, $root.google.cloud.dialogflow.cx.v3.GetChangelogRequest, $root.google.cloud.dialogflow.cx.v3.Changelog, request, callback); - }, "name", { value: "GetChangelog" }); + /** + * Encodes the specified Result message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.Result.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @static + * @param {google.cloud.dialogflow.cx.v3.Deployment.IResult} message Result message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Result.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deploymentTestResults != null && message.deploymentTestResults.length) + for (var i = 0; i < message.deploymentTestResults.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.deploymentTestResults[i]); + if (message.experiment != null && Object.hasOwnProperty.call(message, "experiment")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.experiment); + return writer; + }; - /** - * Calls GetChangelog. - * @function getChangelog - * @memberof google.cloud.dialogflow.cx.v3.Changelogs - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetChangelogRequest} request GetChangelogRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Encodes the specified Result message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.Result.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @static + * @param {google.cloud.dialogflow.cx.v3.Deployment.IResult} message Result message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Result.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return Changelogs; + /** + * Decodes a Result message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.Deployment.Result} Result + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Result.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Deployment.Result(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.deploymentTestResults && message.deploymentTestResults.length)) + message.deploymentTestResults = []; + message.deploymentTestResults.push(reader.string()); + break; + } + case 2: { + message.experiment = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Result message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Deployment.Result} Result + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Result.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Result message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Result.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deploymentTestResults != null && message.hasOwnProperty("deploymentTestResults")) { + if (!Array.isArray(message.deploymentTestResults)) + return "deploymentTestResults: array expected"; + for (var i = 0; i < message.deploymentTestResults.length; ++i) + if (!$util.isString(message.deploymentTestResults[i])) + return "deploymentTestResults: string[] expected"; + } + if (message.experiment != null && message.hasOwnProperty("experiment")) + if (!$util.isString(message.experiment)) + return "experiment: string expected"; + return null; + }; + + /** + * Creates a Result message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Deployment.Result} Result + */ + Result.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Deployment.Result) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Deployment.Result(); + if (object.deploymentTestResults) { + if (!Array.isArray(object.deploymentTestResults)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Deployment.Result.deploymentTestResults: array expected"); + message.deploymentTestResults = []; + for (var i = 0; i < object.deploymentTestResults.length; ++i) + message.deploymentTestResults[i] = String(object.deploymentTestResults[i]); + } + if (object.experiment != null) + message.experiment = String(object.experiment); + return message; + }; + + /** + * Creates a plain object from a Result message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @static + * @param {google.cloud.dialogflow.cx.v3.Deployment.Result} message Result + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Result.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.deploymentTestResults = []; + if (options.defaults) + object.experiment = ""; + if (message.deploymentTestResults && message.deploymentTestResults.length) { + object.deploymentTestResults = []; + for (var j = 0; j < message.deploymentTestResults.length; ++j) + object.deploymentTestResults[j] = message.deploymentTestResults[j]; + } + if (message.experiment != null && message.hasOwnProperty("experiment")) + object.experiment = message.experiment; + return object; + }; + + /** + * Converts this Result to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @instance + * @returns {Object.} JSON object + */ + Result.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Result + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Result.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Deployment.Result"; + }; + + return Result; + })(); + + return Deployment; })(); - v3.ListChangelogsRequest = (function() { + v3.ListDeploymentsRequest = (function() { /** - * Properties of a ListChangelogsRequest. + * Properties of a ListDeploymentsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListChangelogsRequest - * @property {string|null} [parent] ListChangelogsRequest parent - * @property {string|null} [filter] ListChangelogsRequest filter - * @property {number|null} [pageSize] ListChangelogsRequest pageSize - * @property {string|null} [pageToken] ListChangelogsRequest pageToken + * @interface IListDeploymentsRequest + * @property {string|null} [parent] ListDeploymentsRequest parent + * @property {number|null} [pageSize] ListDeploymentsRequest pageSize + * @property {string|null} [pageToken] ListDeploymentsRequest pageToken */ /** - * Constructs a new ListChangelogsRequest. + * Constructs a new ListDeploymentsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListChangelogsRequest. - * @implements IListChangelogsRequest + * @classdesc Represents a ListDeploymentsRequest. + * @implements IListDeploymentsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListChangelogsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsRequest=} [properties] Properties to set */ - function ListChangelogsRequest(properties) { + function ListDeploymentsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19201,100 +21501,90 @@ } /** - * ListChangelogsRequest parent. + * ListDeploymentsRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest - * @instance - */ - ListChangelogsRequest.prototype.parent = ""; - - /** - * ListChangelogsRequest filter. - * @member {string} filter - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest * @instance */ - ListChangelogsRequest.prototype.filter = ""; + ListDeploymentsRequest.prototype.parent = ""; /** - * ListChangelogsRequest pageSize. + * ListDeploymentsRequest pageSize. * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest * @instance */ - ListChangelogsRequest.prototype.pageSize = 0; + ListDeploymentsRequest.prototype.pageSize = 0; /** - * ListChangelogsRequest pageToken. + * ListDeploymentsRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest * @instance */ - ListChangelogsRequest.prototype.pageToken = ""; + ListDeploymentsRequest.prototype.pageToken = ""; /** - * Creates a new ListChangelogsRequest instance using the specified properties. + * Creates a new ListDeploymentsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListChangelogsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsRequest} ListChangelogsRequest instance + * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsRequest} ListDeploymentsRequest instance */ - ListChangelogsRequest.create = function create(properties) { - return new ListChangelogsRequest(properties); + ListDeploymentsRequest.create = function create(properties) { + return new ListDeploymentsRequest(properties); }; /** - * Encodes the specified ListChangelogsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsRequest.verify|verify} messages. + * Encodes the specified ListDeploymentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListChangelogsRequest} message ListChangelogsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsRequest} message ListDeploymentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListChangelogsRequest.encode = function encode(message, writer) { + ListDeploymentsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified ListChangelogsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsRequest.verify|verify} messages. + * Encodes the specified ListDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListChangelogsRequest} message ListChangelogsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsRequest} message ListDeploymentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListChangelogsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListDeploymentsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListChangelogsRequest message from the specified reader or buffer. + * Decodes a ListDeploymentsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsRequest} ListChangelogsRequest + * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsRequest} ListDeploymentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListChangelogsRequest.decode = function decode(reader, length) { + ListDeploymentsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListChangelogsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -19303,14 +21593,10 @@ break; } case 2: { - message.filter = reader.string(); - break; - } - case 3: { message.pageSize = reader.int32(); break; } - case 4: { + case 3: { message.pageToken = reader.string(); break; } @@ -19323,38 +21609,35 @@ }; /** - * Decodes a ListChangelogsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDeploymentsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsRequest} ListChangelogsRequest + * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsRequest} ListDeploymentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListChangelogsRequest.decodeDelimited = function decodeDelimited(reader) { + ListDeploymentsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListChangelogsRequest message. + * Verifies a ListDeploymentsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListChangelogsRequest.verify = function verify(message) { + ListDeploymentsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.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"; @@ -19365,21 +21648,19 @@ }; /** - * Creates a ListChangelogsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeploymentsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsRequest} ListChangelogsRequest + * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsRequest} ListDeploymentsRequest */ - ListChangelogsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListChangelogsRequest) + ListDeploymentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListChangelogsRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.filter != null) - message.filter = String(object.filter); if (object.pageSize != null) message.pageSize = object.pageSize | 0; if (object.pageToken != null) @@ -19388,28 +21669,25 @@ }; /** - * Creates a plain object from a ListChangelogsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListDeploymentsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ListChangelogsRequest} message ListChangelogsRequest + * @param {google.cloud.dialogflow.cx.v3.ListDeploymentsRequest} message ListDeploymentsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListChangelogsRequest.toObject = function toObject(message, options) { + ListDeploymentsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.filter = ""; object.pageSize = 0; object.pageToken = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - 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")) @@ -19418,54 +21696,54 @@ }; /** - * Converts this ListChangelogsRequest to JSON. + * Converts this ListDeploymentsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest * @instance * @returns {Object.} JSON object */ - ListChangelogsRequest.prototype.toJSON = function toJSON() { + ListDeploymentsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListChangelogsRequest + * Gets the default type url for ListDeploymentsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListChangelogsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListDeploymentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListChangelogsRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListDeploymentsRequest"; }; - return ListChangelogsRequest; + return ListDeploymentsRequest; })(); - v3.ListChangelogsResponse = (function() { + v3.ListDeploymentsResponse = (function() { /** - * Properties of a ListChangelogsResponse. + * Properties of a ListDeploymentsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListChangelogsResponse - * @property {Array.|null} [changelogs] ListChangelogsResponse changelogs - * @property {string|null} [nextPageToken] ListChangelogsResponse nextPageToken + * @interface IListDeploymentsResponse + * @property {Array.|null} [deployments] ListDeploymentsResponse deployments + * @property {string|null} [nextPageToken] ListDeploymentsResponse nextPageToken */ /** - * Constructs a new ListChangelogsResponse. + * Constructs a new ListDeploymentsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListChangelogsResponse. - * @implements IListChangelogsResponse + * @classdesc Represents a ListDeploymentsResponse. + * @implements IListDeploymentsResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListChangelogsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsResponse=} [properties] Properties to set */ - function ListChangelogsResponse(properties) { - this.changelogs = []; + function ListDeploymentsResponse(properties) { + this.deployments = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19473,88 +21751,88 @@ } /** - * ListChangelogsResponse changelogs. - * @member {Array.} changelogs - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse + * ListDeploymentsResponse deployments. + * @member {Array.} deployments + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse * @instance */ - ListChangelogsResponse.prototype.changelogs = $util.emptyArray; + ListDeploymentsResponse.prototype.deployments = $util.emptyArray; /** - * ListChangelogsResponse nextPageToken. + * ListDeploymentsResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse * @instance */ - ListChangelogsResponse.prototype.nextPageToken = ""; + ListDeploymentsResponse.prototype.nextPageToken = ""; /** - * Creates a new ListChangelogsResponse instance using the specified properties. + * Creates a new ListDeploymentsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListChangelogsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsResponse} ListChangelogsResponse instance + * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsResponse} ListDeploymentsResponse instance */ - ListChangelogsResponse.create = function create(properties) { - return new ListChangelogsResponse(properties); + ListDeploymentsResponse.create = function create(properties) { + return new ListDeploymentsResponse(properties); }; /** - * Encodes the specified ListChangelogsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsResponse.verify|verify} messages. + * Encodes the specified ListDeploymentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListChangelogsResponse} message ListChangelogsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsResponse} message ListDeploymentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListChangelogsResponse.encode = function encode(message, writer) { + ListDeploymentsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.changelogs != null && message.changelogs.length) - for (var i = 0; i < message.changelogs.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Changelog.encode(message.changelogs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.deployments != null && message.deployments.length) + for (var i = 0; i < message.deployments.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Deployment.encode(message.deployments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified ListChangelogsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsResponse.verify|verify} messages. + * Encodes the specified ListDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListChangelogsResponse} message ListChangelogsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsResponse} message ListDeploymentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListChangelogsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListDeploymentsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListChangelogsResponse message from the specified reader or buffer. + * Decodes a ListDeploymentsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsResponse} ListChangelogsResponse + * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsResponse} ListDeploymentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListChangelogsResponse.decode = function decode(reader, length) { + ListDeploymentsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListChangelogsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.changelogs && message.changelogs.length)) - message.changelogs = []; - message.changelogs.push($root.google.cloud.dialogflow.cx.v3.Changelog.decode(reader, reader.uint32())); + if (!(message.deployments && message.deployments.length)) + message.deployments = []; + message.deployments.push($root.google.cloud.dialogflow.cx.v3.Deployment.decode(reader, reader.uint32())); break; } case 2: { @@ -19570,39 +21848,39 @@ }; /** - * Decodes a ListChangelogsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListDeploymentsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsResponse} ListChangelogsResponse + * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsResponse} ListDeploymentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListChangelogsResponse.decodeDelimited = function decodeDelimited(reader) { + ListDeploymentsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListChangelogsResponse message. + * Verifies a ListDeploymentsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListChangelogsResponse.verify = function verify(message) { + ListDeploymentsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.changelogs != null && message.hasOwnProperty("changelogs")) { - if (!Array.isArray(message.changelogs)) - return "changelogs: array expected"; - for (var i = 0; i < message.changelogs.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Changelog.verify(message.changelogs[i]); + if (message.deployments != null && message.hasOwnProperty("deployments")) { + if (!Array.isArray(message.deployments)) + return "deployments: array expected"; + for (var i = 0; i < message.deployments.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Deployment.verify(message.deployments[i]); if (error) - return "changelogs." + error; + return "deployments." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -19612,25 +21890,25 @@ }; /** - * Creates a ListChangelogsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeploymentsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsResponse} ListChangelogsResponse + * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsResponse} ListDeploymentsResponse */ - ListChangelogsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListChangelogsResponse) + ListDeploymentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListChangelogsResponse(); - if (object.changelogs) { - if (!Array.isArray(object.changelogs)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ListChangelogsResponse.changelogs: array expected"); - message.changelogs = []; - for (var i = 0; i < object.changelogs.length; ++i) { - if (typeof object.changelogs[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ListChangelogsResponse.changelogs: object expected"); - message.changelogs[i] = $root.google.cloud.dialogflow.cx.v3.Changelog.fromObject(object.changelogs[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse(); + if (object.deployments) { + if (!Array.isArray(object.deployments)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListDeploymentsResponse.deployments: array expected"); + message.deployments = []; + for (var i = 0; i < object.deployments.length; ++i) { + if (typeof object.deployments[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListDeploymentsResponse.deployments: object expected"); + message.deployments[i] = $root.google.cloud.dialogflow.cx.v3.Deployment.fromObject(object.deployments[i]); } } if (object.nextPageToken != null) @@ -19639,26 +21917,26 @@ }; /** - * Creates a plain object from a ListChangelogsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListDeploymentsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ListChangelogsResponse} message ListChangelogsResponse + * @param {google.cloud.dialogflow.cx.v3.ListDeploymentsResponse} message ListDeploymentsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListChangelogsResponse.toObject = function toObject(message, options) { + ListDeploymentsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.changelogs = []; + object.deployments = []; if (options.defaults) object.nextPageToken = ""; - if (message.changelogs && message.changelogs.length) { - object.changelogs = []; - for (var j = 0; j < message.changelogs.length; ++j) - object.changelogs[j] = $root.google.cloud.dialogflow.cx.v3.Changelog.toObject(message.changelogs[j], options); + if (message.deployments && message.deployments.length) { + object.deployments = []; + for (var j = 0; j < message.deployments.length; ++j) + object.deployments[j] = $root.google.cloud.dialogflow.cx.v3.Deployment.toObject(message.deployments[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -19666,52 +21944,52 @@ }; /** - * Converts this ListChangelogsResponse to JSON. + * Converts this ListDeploymentsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse * @instance * @returns {Object.} JSON object */ - ListChangelogsResponse.prototype.toJSON = function toJSON() { + ListDeploymentsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListChangelogsResponse + * Gets the default type url for ListDeploymentsResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListChangelogsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListDeploymentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListChangelogsResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListDeploymentsResponse"; }; - return ListChangelogsResponse; + return ListDeploymentsResponse; })(); - v3.GetChangelogRequest = (function() { + v3.GetDeploymentRequest = (function() { /** - * Properties of a GetChangelogRequest. + * Properties of a GetDeploymentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IGetChangelogRequest - * @property {string|null} [name] GetChangelogRequest name + * @interface IGetDeploymentRequest + * @property {string|null} [name] GetDeploymentRequest name */ /** - * Constructs a new GetChangelogRequest. + * Constructs a new GetDeploymentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a GetChangelogRequest. - * @implements IGetChangelogRequest + * @classdesc Represents a GetDeploymentRequest. + * @implements IGetDeploymentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IGetChangelogRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IGetDeploymentRequest=} [properties] Properties to set */ - function GetChangelogRequest(properties) { + function GetDeploymentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19719,35 +21997,35 @@ } /** - * GetChangelogRequest name. + * GetDeploymentRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest + * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest * @instance */ - GetChangelogRequest.prototype.name = ""; + GetDeploymentRequest.prototype.name = ""; /** - * Creates a new GetChangelogRequest instance using the specified properties. + * Creates a new GetDeploymentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest + * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetChangelogRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GetChangelogRequest} GetChangelogRequest instance + * @param {google.cloud.dialogflow.cx.v3.IGetDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetDeploymentRequest} GetDeploymentRequest instance */ - GetChangelogRequest.create = function create(properties) { - return new GetChangelogRequest(properties); + GetDeploymentRequest.create = function create(properties) { + return new GetDeploymentRequest(properties); }; /** - * Encodes the specified GetChangelogRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetChangelogRequest.verify|verify} messages. + * Encodes the specified GetDeploymentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetDeploymentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest + * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetChangelogRequest} message GetChangelogRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetDeploymentRequest} message GetDeploymentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetChangelogRequest.encode = function encode(message, writer) { + GetDeploymentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -19756,33 +22034,33 @@ }; /** - * Encodes the specified GetChangelogRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetChangelogRequest.verify|verify} messages. + * Encodes the specified GetDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetDeploymentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest + * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetChangelogRequest} message GetChangelogRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetDeploymentRequest} message GetDeploymentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetChangelogRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetChangelogRequest message from the specified reader or buffer. + * Decodes a GetDeploymentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest + * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.GetChangelogRequest} GetChangelogRequest + * @returns {google.cloud.dialogflow.cx.v3.GetDeploymentRequest} GetDeploymentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetChangelogRequest.decode = function decode(reader, length) { + GetDeploymentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetChangelogRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetDeploymentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -19799,30 +22077,30 @@ }; /** - * Decodes a GetChangelogRequest message from the specified reader or buffer, length delimited. + * Decodes a GetDeploymentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest + * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.GetChangelogRequest} GetChangelogRequest + * @returns {google.cloud.dialogflow.cx.v3.GetDeploymentRequest} GetDeploymentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetChangelogRequest.decodeDelimited = function decodeDelimited(reader) { + GetDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetChangelogRequest message. + * Verifies a GetDeploymentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest + * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetChangelogRequest.verify = function verify(message) { + GetDeploymentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -19832,32 +22110,32 @@ }; /** - * Creates a GetChangelogRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetDeploymentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest + * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GetChangelogRequest} GetChangelogRequest + * @returns {google.cloud.dialogflow.cx.v3.GetDeploymentRequest} GetDeploymentRequest */ - GetChangelogRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetChangelogRequest) + GetDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetDeploymentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.GetChangelogRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.GetDeploymentRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetChangelogRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetDeploymentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest + * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.GetChangelogRequest} message GetChangelogRequest + * @param {google.cloud.dialogflow.cx.v3.GetDeploymentRequest} message GetDeploymentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetChangelogRequest.toObject = function toObject(message, options) { + GetDeploymentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -19869,58 +22147,261 @@ }; /** - * Converts this GetChangelogRequest to JSON. + * Converts this GetDeploymentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest + * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest * @instance * @returns {Object.} JSON object */ - GetChangelogRequest.prototype.toJSON = function toJSON() { + GetDeploymentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetChangelogRequest + * Gets the default type url for GetDeploymentRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest + * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetChangelogRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetChangelogRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetDeploymentRequest"; }; - return GetChangelogRequest; + return GetDeploymentRequest; })(); - v3.Changelog = (function() { + v3.EntityTypes = (function() { /** - * Properties of a Changelog. + * Constructs a new EntityTypes service. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IChangelog - * @property {string|null} [name] Changelog name - * @property {string|null} [userEmail] Changelog userEmail - * @property {string|null} [displayName] Changelog displayName - * @property {string|null} [action] Changelog action - * @property {string|null} [type] Changelog type - * @property {string|null} [resource] Changelog resource - * @property {google.protobuf.ITimestamp|null} [createTime] Changelog createTime + * @classdesc Represents an EntityTypes + * @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 EntityTypes(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (EntityTypes.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = EntityTypes; + + /** + * Creates new EntityTypes service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @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 {EntityTypes} RPC service. Useful where requests and/or responses are streamed. + */ + EntityTypes.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|listEntityTypes}. + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @typedef ListEntityTypesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListEntityTypesResponse} [response] ListEntityTypesResponse */ /** - * Constructs a new Changelog. + * Calls ListEntityTypes. + * @function listEntityTypes + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesRequest} request ListEntityTypesRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.EntityTypes.ListEntityTypesCallback} callback Node-style callback called with the error, if any, and ListEntityTypesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EntityTypes.prototype.listEntityTypes = function listEntityTypes(request, callback) { + return this.rpcCall(listEntityTypes, $root.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest, $root.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse, request, callback); + }, "name", { value: "ListEntityTypes" }); + + /** + * Calls ListEntityTypes. + * @function listEntityTypes + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesRequest} request ListEntityTypesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|getEntityType}. + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @typedef GetEntityTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.EntityType} [response] EntityType + */ + + /** + * Calls GetEntityType. + * @function getEntityType + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest} request GetEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.EntityTypes.GetEntityTypeCallback} callback Node-style callback called with the error, if any, and EntityType + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EntityTypes.prototype.getEntityType = function getEntityType(request, callback) { + return this.rpcCall(getEntityType, $root.google.cloud.dialogflow.cx.v3.GetEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3.EntityType, request, callback); + }, "name", { value: "GetEntityType" }); + + /** + * Calls GetEntityType. + * @function getEntityType + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest} request GetEntityTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|createEntityType}. + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @typedef CreateEntityTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.EntityType} [response] EntityType + */ + + /** + * Calls CreateEntityType. + * @function createEntityType + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest} request CreateEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.EntityTypes.CreateEntityTypeCallback} callback Node-style callback called with the error, if any, and EntityType + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EntityTypes.prototype.createEntityType = function createEntityType(request, callback) { + return this.rpcCall(createEntityType, $root.google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3.EntityType, request, callback); + }, "name", { value: "CreateEntityType" }); + + /** + * Calls CreateEntityType. + * @function createEntityType + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest} request CreateEntityTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|updateEntityType}. + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @typedef UpdateEntityTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.EntityType} [response] EntityType + */ + + /** + * Calls UpdateEntityType. + * @function updateEntityType + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest} request UpdateEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.EntityTypes.UpdateEntityTypeCallback} callback Node-style callback called with the error, if any, and EntityType + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EntityTypes.prototype.updateEntityType = function updateEntityType(request, callback) { + return this.rpcCall(updateEntityType, $root.google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3.EntityType, request, callback); + }, "name", { value: "UpdateEntityType" }); + + /** + * Calls UpdateEntityType. + * @function updateEntityType + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest} request UpdateEntityTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|deleteEntityType}. + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @typedef DeleteEntityTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteEntityType. + * @function deleteEntityType + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest} request DeleteEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.EntityTypes.DeleteEntityTypeCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EntityTypes.prototype.deleteEntityType = function deleteEntityType(request, callback) { + return this.rpcCall(deleteEntityType, $root.google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteEntityType" }); + + /** + * Calls DeleteEntityType. + * @function deleteEntityType + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest} request DeleteEntityTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return EntityTypes; + })(); + + v3.EntityType = (function() { + + /** + * Properties of an EntityType. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a Changelog. - * @implements IChangelog + * @interface IEntityType + * @property {string|null} [name] EntityType name + * @property {string|null} [displayName] EntityType displayName + * @property {google.cloud.dialogflow.cx.v3.EntityType.Kind|null} [kind] EntityType kind + * @property {google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode|null} [autoExpansionMode] EntityType autoExpansionMode + * @property {Array.|null} [entities] EntityType entities + * @property {Array.|null} [excludedPhrases] EntityType excludedPhrases + * @property {boolean|null} [enableFuzzyExtraction] EntityType enableFuzzyExtraction + * @property {boolean|null} [redact] EntityType redact + */ + + /** + * Constructs a new EntityType. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an EntityType. + * @implements IEntityType * @constructor - * @param {google.cloud.dialogflow.cx.v3.IChangelog=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IEntityType=} [properties] Properties to set */ - function Changelog(properties) { + function EntityType(properties) { + this.entities = []; + this.excludedPhrases = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19928,130 +22409,142 @@ } /** - * Changelog name. + * EntityType name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.Changelog + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @instance */ - Changelog.prototype.name = ""; + EntityType.prototype.name = ""; /** - * Changelog userEmail. - * @member {string} userEmail - * @memberof google.cloud.dialogflow.cx.v3.Changelog + * EntityType displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @instance */ - Changelog.prototype.userEmail = ""; + EntityType.prototype.displayName = ""; /** - * Changelog displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3.Changelog + * EntityType kind. + * @member {google.cloud.dialogflow.cx.v3.EntityType.Kind} kind + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @instance */ - Changelog.prototype.displayName = ""; + EntityType.prototype.kind = 0; /** - * Changelog action. - * @member {string} action - * @memberof google.cloud.dialogflow.cx.v3.Changelog + * EntityType autoExpansionMode. + * @member {google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode} autoExpansionMode + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @instance */ - Changelog.prototype.action = ""; + EntityType.prototype.autoExpansionMode = 0; /** - * Changelog type. - * @member {string} type - * @memberof google.cloud.dialogflow.cx.v3.Changelog + * EntityType entities. + * @member {Array.} entities + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @instance */ - Changelog.prototype.type = ""; + EntityType.prototype.entities = $util.emptyArray; /** - * Changelog resource. - * @member {string} resource - * @memberof google.cloud.dialogflow.cx.v3.Changelog + * EntityType excludedPhrases. + * @member {Array.} excludedPhrases + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @instance */ - Changelog.prototype.resource = ""; + EntityType.prototype.excludedPhrases = $util.emptyArray; /** - * Changelog createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dialogflow.cx.v3.Changelog + * EntityType enableFuzzyExtraction. + * @member {boolean} enableFuzzyExtraction + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @instance */ - Changelog.prototype.createTime = null; + EntityType.prototype.enableFuzzyExtraction = false; /** - * Creates a new Changelog instance using the specified properties. + * EntityType redact. + * @member {boolean} redact + * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @instance + */ + EntityType.prototype.redact = false; + + /** + * Creates a new EntityType instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Changelog + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @static - * @param {google.cloud.dialogflow.cx.v3.IChangelog=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Changelog} Changelog instance + * @param {google.cloud.dialogflow.cx.v3.IEntityType=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.EntityType} EntityType instance */ - Changelog.create = function create(properties) { - return new Changelog(properties); + EntityType.create = function create(properties) { + return new EntityType(properties); }; /** - * Encodes the specified Changelog message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Changelog.verify|verify} messages. + * Encodes the specified EntityType message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Changelog + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @static - * @param {google.cloud.dialogflow.cx.v3.IChangelog} message Changelog message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IEntityType} message EntityType message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Changelog.encode = function encode(message, writer) { + EntityType.encode = function encode(message, writer) { 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.userEmail != null && Object.hasOwnProperty.call(message, "userEmail")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.userEmail); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.resource); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.type); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.action); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.kind); + if (message.autoExpansionMode != null && Object.hasOwnProperty.call(message, "autoExpansionMode")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.autoExpansionMode); + if (message.entities != null && message.entities.length) + for (var i = 0; i < message.entities.length; ++i) + $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.encode(message.entities[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.excludedPhrases != null && message.excludedPhrases.length) + for (var i = 0; i < message.excludedPhrases.length; ++i) + $root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.encode(message.excludedPhrases[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.enableFuzzyExtraction != null && Object.hasOwnProperty.call(message, "enableFuzzyExtraction")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.enableFuzzyExtraction); + if (message.redact != null && Object.hasOwnProperty.call(message, "redact")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.redact); return writer; }; /** - * Encodes the specified Changelog message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Changelog.verify|verify} messages. + * Encodes the specified EntityType message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Changelog + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @static - * @param {google.cloud.dialogflow.cx.v3.IChangelog} message Changelog message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IEntityType} message EntityType message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Changelog.encodeDelimited = function encodeDelimited(message, writer) { + EntityType.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Changelog message from the specified reader or buffer. + * Decodes an EntityType message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Changelog + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.Changelog} Changelog + * @returns {google.cloud.dialogflow.cx.v3.EntityType} EntityType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Changelog.decode = function decode(reader, length) { + EntityType.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Changelog(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.EntityType(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -20060,27 +22553,35 @@ break; } case 2: { - message.userEmail = reader.string(); + message.displayName = reader.string(); break; } - case 7: { - message.displayName = reader.string(); + case 3: { + message.kind = reader.int32(); break; } - case 11: { - message.action = reader.string(); + case 4: { + message.autoExpansionMode = reader.int32(); break; } - case 8: { - message.type = reader.string(); + case 5: { + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.dialogflow.cx.v3.EntityType.Entity.decode(reader, reader.uint32())); break; } - case 3: { - message.resource = reader.string(); + case 6: { + if (!(message.excludedPhrases && message.excludedPhrases.length)) + message.excludedPhrases = []; + message.excludedPhrases.push($root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.decode(reader, reader.uint32())); break; } - case 4: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 7: { + message.enableFuzzyExtraction = reader.bool(); + break; + } + case 9: { + message.redact = reader.bool(); break; } default: @@ -20092,657 +22593,535 @@ }; /** - * Decodes a Changelog message from the specified reader or buffer, length delimited. + * Decodes an EntityType message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Changelog + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Changelog} Changelog + * @returns {google.cloud.dialogflow.cx.v3.EntityType} EntityType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Changelog.decodeDelimited = function decodeDelimited(reader) { + EntityType.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Changelog message. + * Verifies an EntityType message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Changelog + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Changelog.verify = function verify(message) { + EntityType.verify = function verify(message) { if (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.userEmail != null && message.hasOwnProperty("userEmail")) - if (!$util.isString(message.userEmail)) - return "userEmail: string expected"; if (message.displayName != null && message.hasOwnProperty("displayName")) if (!$util.isString(message.displayName)) return "displayName: string expected"; - if (message.action != null && message.hasOwnProperty("action")) - if (!$util.isString(message.action)) - return "action: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: 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.kind != null && message.hasOwnProperty("kind")) + switch (message.kind) { + default: + return "kind: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.autoExpansionMode != null && message.hasOwnProperty("autoExpansionMode")) + switch (message.autoExpansionMode) { + default: + return "autoExpansionMode: enum value expected"; + case 0: + case 1: + break; + } + if (message.entities != null && message.hasOwnProperty("entities")) { + if (!Array.isArray(message.entities)) + return "entities: array expected"; + for (var i = 0; i < message.entities.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.verify(message.entities[i]); + if (error) + return "entities." + error; + } + } + if (message.excludedPhrases != null && message.hasOwnProperty("excludedPhrases")) { + if (!Array.isArray(message.excludedPhrases)) + return "excludedPhrases: array expected"; + for (var i = 0; i < message.excludedPhrases.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.verify(message.excludedPhrases[i]); + if (error) + return "excludedPhrases." + error; + } } + if (message.enableFuzzyExtraction != null && message.hasOwnProperty("enableFuzzyExtraction")) + if (typeof message.enableFuzzyExtraction !== "boolean") + return "enableFuzzyExtraction: boolean expected"; + if (message.redact != null && message.hasOwnProperty("redact")) + if (typeof message.redact !== "boolean") + return "redact: boolean expected"; return null; }; /** - * Creates a Changelog message from a plain object. Also converts values to their respective internal types. + * Creates an EntityType message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Changelog + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Changelog} Changelog + * @returns {google.cloud.dialogflow.cx.v3.EntityType} EntityType */ - Changelog.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Changelog) + EntityType.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.EntityType) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Changelog(); + var message = new $root.google.cloud.dialogflow.cx.v3.EntityType(); if (object.name != null) message.name = String(object.name); - if (object.userEmail != null) - message.userEmail = String(object.userEmail); if (object.displayName != null) message.displayName = String(object.displayName); - if (object.action != null) - message.action = String(object.action); - if (object.type != null) - message.type = String(object.type); - if (object.resource != null) - message.resource = String(object.resource); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Changelog.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + switch (object.kind) { + default: + if (typeof object.kind === "number") { + message.kind = object.kind; + break; + } + break; + case "KIND_UNSPECIFIED": + case 0: + message.kind = 0; + break; + case "KIND_MAP": + case 1: + message.kind = 1; + break; + case "KIND_LIST": + case 2: + message.kind = 2; + break; + case "KIND_REGEXP": + case 3: + message.kind = 3; + break; + } + switch (object.autoExpansionMode) { + default: + if (typeof object.autoExpansionMode === "number") { + message.autoExpansionMode = object.autoExpansionMode; + break; + } + break; + case "AUTO_EXPANSION_MODE_UNSPECIFIED": + case 0: + message.autoExpansionMode = 0; + break; + case "AUTO_EXPANSION_MODE_DEFAULT": + case 1: + message.autoExpansionMode = 1; + break; + } + if (object.entities) { + if (!Array.isArray(object.entities)) + throw TypeError(".google.cloud.dialogflow.cx.v3.EntityType.entities: array expected"); + message.entities = []; + for (var i = 0; i < object.entities.length; ++i) { + if (typeof object.entities[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.EntityType.entities: object expected"); + message.entities[i] = $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.fromObject(object.entities[i]); + } + } + if (object.excludedPhrases) { + if (!Array.isArray(object.excludedPhrases)) + throw TypeError(".google.cloud.dialogflow.cx.v3.EntityType.excludedPhrases: array expected"); + message.excludedPhrases = []; + for (var i = 0; i < object.excludedPhrases.length; ++i) { + if (typeof object.excludedPhrases[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.EntityType.excludedPhrases: object expected"); + message.excludedPhrases[i] = $root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.fromObject(object.excludedPhrases[i]); + } } + if (object.enableFuzzyExtraction != null) + message.enableFuzzyExtraction = Boolean(object.enableFuzzyExtraction); + if (object.redact != null) + message.redact = Boolean(object.redact); return message; }; /** - * Creates a plain object from a Changelog message. Also converts values to other types if specified. + * Creates a plain object from an EntityType message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Changelog + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @static - * @param {google.cloud.dialogflow.cx.v3.Changelog} message Changelog + * @param {google.cloud.dialogflow.cx.v3.EntityType} message EntityType * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Changelog.toObject = function toObject(message, options) { + EntityType.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.entities = []; + object.excludedPhrases = []; + } if (options.defaults) { object.name = ""; - object.userEmail = ""; - object.resource = ""; - object.createTime = null; object.displayName = ""; - object.type = ""; - object.action = ""; + object.kind = options.enums === String ? "KIND_UNSPECIFIED" : 0; + object.autoExpansionMode = options.enums === String ? "AUTO_EXPANSION_MODE_UNSPECIFIED" : 0; + object.enableFuzzyExtraction = false; + object.redact = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.userEmail != null && message.hasOwnProperty("userEmail")) - object.userEmail = message.userEmail; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.displayName != null && message.hasOwnProperty("displayName")) object.displayName = message.displayName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.action != null && message.hasOwnProperty("action")) - object.action = message.action; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.EntityType.Kind[message.kind] === undefined ? message.kind : $root.google.cloud.dialogflow.cx.v3.EntityType.Kind[message.kind] : message.kind; + if (message.autoExpansionMode != null && message.hasOwnProperty("autoExpansionMode")) + object.autoExpansionMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode[message.autoExpansionMode] === undefined ? message.autoExpansionMode : $root.google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode[message.autoExpansionMode] : message.autoExpansionMode; + if (message.entities && message.entities.length) { + object.entities = []; + for (var j = 0; j < message.entities.length; ++j) + object.entities[j] = $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.toObject(message.entities[j], options); + } + if (message.excludedPhrases && message.excludedPhrases.length) { + object.excludedPhrases = []; + for (var j = 0; j < message.excludedPhrases.length; ++j) + object.excludedPhrases[j] = $root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.toObject(message.excludedPhrases[j], options); + } + if (message.enableFuzzyExtraction != null && message.hasOwnProperty("enableFuzzyExtraction")) + object.enableFuzzyExtraction = message.enableFuzzyExtraction; + if (message.redact != null && message.hasOwnProperty("redact")) + object.redact = message.redact; return object; }; /** - * Converts this Changelog to JSON. + * Converts this EntityType to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Changelog + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @instance * @returns {Object.} JSON object */ - Changelog.prototype.toJSON = function toJSON() { + EntityType.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Changelog + * Gets the default type url for EntityType * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Changelog + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Changelog.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EntityType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Changelog"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.EntityType"; }; - return Changelog; - })(); - - v3.Deployments = (function() { - /** - * Constructs a new Deployments service. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a Deployments - * @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 + * Kind enum. + * @name google.cloud.dialogflow.cx.v3.EntityType.Kind + * @enum {number} + * @property {number} KIND_UNSPECIFIED=0 KIND_UNSPECIFIED value + * @property {number} KIND_MAP=1 KIND_MAP value + * @property {number} KIND_LIST=2 KIND_LIST value + * @property {number} KIND_REGEXP=3 KIND_REGEXP value */ - function Deployments(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Deployments.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Deployments; + EntityType.Kind = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "KIND_UNSPECIFIED"] = 0; + values[valuesById[1] = "KIND_MAP"] = 1; + values[valuesById[2] = "KIND_LIST"] = 2; + values[valuesById[3] = "KIND_REGEXP"] = 3; + return values; + })(); /** - * Creates new Deployments service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Deployments - * @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 {Deployments} RPC service. Useful where requests and/or responses are streamed. + * AutoExpansionMode enum. + * @name google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode + * @enum {number} + * @property {number} AUTO_EXPANSION_MODE_UNSPECIFIED=0 AUTO_EXPANSION_MODE_UNSPECIFIED value + * @property {number} AUTO_EXPANSION_MODE_DEFAULT=1 AUTO_EXPANSION_MODE_DEFAULT value */ - Deployments.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Deployments|listDeployments}. - * @memberof google.cloud.dialogflow.cx.v3.Deployments - * @typedef ListDeploymentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.ListDeploymentsResponse} [response] ListDeploymentsResponse - */ - - /** - * Calls ListDeployments. - * @function listDeployments - * @memberof google.cloud.dialogflow.cx.v3.Deployments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsRequest} request ListDeploymentsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Deployments.ListDeploymentsCallback} callback Node-style callback called with the error, if any, and ListDeploymentsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Deployments.prototype.listDeployments = function listDeployments(request, callback) { - return this.rpcCall(listDeployments, $root.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest, $root.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse, request, callback); - }, "name", { value: "ListDeployments" }); - - /** - * Calls ListDeployments. - * @function listDeployments - * @memberof google.cloud.dialogflow.cx.v3.Deployments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsRequest} request ListDeploymentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Deployments|getDeployment}. - * @memberof google.cloud.dialogflow.cx.v3.Deployments - * @typedef GetDeploymentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Deployment} [response] Deployment - */ - - /** - * Calls GetDeployment. - * @function getDeployment - * @memberof google.cloud.dialogflow.cx.v3.Deployments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetDeploymentRequest} request GetDeploymentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Deployments.GetDeploymentCallback} callback Node-style callback called with the error, if any, and Deployment - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Deployments.prototype.getDeployment = function getDeployment(request, callback) { - return this.rpcCall(getDeployment, $root.google.cloud.dialogflow.cx.v3.GetDeploymentRequest, $root.google.cloud.dialogflow.cx.v3.Deployment, request, callback); - }, "name", { value: "GetDeployment" }); - - /** - * Calls GetDeployment. - * @function getDeployment - * @memberof google.cloud.dialogflow.cx.v3.Deployments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetDeploymentRequest} request GetDeploymentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Deployments; - })(); - - v3.Deployment = (function() { - - /** - * Properties of a Deployment. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDeployment - * @property {string|null} [name] Deployment name - * @property {string|null} [flowVersion] Deployment flowVersion - * @property {google.cloud.dialogflow.cx.v3.Deployment.State|null} [state] Deployment state - * @property {google.cloud.dialogflow.cx.v3.Deployment.IResult|null} [result] Deployment result - * @property {google.protobuf.ITimestamp|null} [startTime] Deployment startTime - * @property {google.protobuf.ITimestamp|null} [endTime] Deployment endTime - */ - - /** - * Constructs a new Deployment. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a Deployment. - * @implements IDeployment - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDeployment=} [properties] Properties to set - */ - function Deployment(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Deployment name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.Deployment - * @instance - */ - Deployment.prototype.name = ""; + EntityType.AutoExpansionMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AUTO_EXPANSION_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "AUTO_EXPANSION_MODE_DEFAULT"] = 1; + return values; + })(); - /** - * Deployment flowVersion. - * @member {string} flowVersion - * @memberof google.cloud.dialogflow.cx.v3.Deployment - * @instance - */ - Deployment.prototype.flowVersion = ""; + EntityType.Entity = (function() { - /** - * Deployment state. - * @member {google.cloud.dialogflow.cx.v3.Deployment.State} state - * @memberof google.cloud.dialogflow.cx.v3.Deployment - * @instance - */ - Deployment.prototype.state = 0; + /** + * Properties of an Entity. + * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @interface IEntity + * @property {string|null} [value] Entity value + * @property {Array.|null} [synonyms] Entity synonyms + */ - /** - * Deployment result. - * @member {google.cloud.dialogflow.cx.v3.Deployment.IResult|null|undefined} result - * @memberof google.cloud.dialogflow.cx.v3.Deployment - * @instance - */ - Deployment.prototype.result = null; + /** + * Constructs a new Entity. + * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @classdesc Represents an Entity. + * @implements IEntity + * @constructor + * @param {google.cloud.dialogflow.cx.v3.EntityType.IEntity=} [properties] Properties to set + */ + function Entity(properties) { + this.synonyms = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Deployment startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.dialogflow.cx.v3.Deployment - * @instance - */ - Deployment.prototype.startTime = null; + /** + * Entity value. + * @member {string} value + * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity + * @instance + */ + Entity.prototype.value = ""; - /** - * Deployment endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.dialogflow.cx.v3.Deployment - * @instance - */ - Deployment.prototype.endTime = null; + /** + * Entity synonyms. + * @member {Array.} synonyms + * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity + * @instance + */ + Entity.prototype.synonyms = $util.emptyArray; - /** - * Creates a new Deployment instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Deployment - * @static - * @param {google.cloud.dialogflow.cx.v3.IDeployment=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Deployment} Deployment instance - */ - Deployment.create = function create(properties) { - return new Deployment(properties); - }; + /** + * Creates a new Entity instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity + * @static + * @param {google.cloud.dialogflow.cx.v3.EntityType.IEntity=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.EntityType.Entity} Entity instance + */ + Entity.create = function create(properties) { + return new Entity(properties); + }; - /** - * Encodes the specified Deployment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Deployment - * @static - * @param {google.cloud.dialogflow.cx.v3.IDeployment} message Deployment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Deployment.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.flowVersion != null && Object.hasOwnProperty.call(message, "flowVersion")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.flowVersion); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.google.cloud.dialogflow.cx.v3.Deployment.Result.encode(message.result, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.Entity.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity + * @static + * @param {google.cloud.dialogflow.cx.v3.EntityType.IEntity} message Entity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + if (message.synonyms != null && message.synonyms.length) + for (var i = 0; i < message.synonyms.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.synonyms[i]); + return writer; + }; - /** - * Encodes the specified Deployment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Deployment - * @static - * @param {google.cloud.dialogflow.cx.v3.IDeployment} message Deployment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Deployment.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.Entity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity + * @static + * @param {google.cloud.dialogflow.cx.v3.EntityType.IEntity} message Entity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a Deployment message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Deployment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.Deployment} Deployment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Deployment.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Deployment(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.flowVersion = reader.string(); - break; - } - case 3: { - message.state = reader.int32(); - break; - } - case 4: { - message.result = $root.google.cloud.dialogflow.cx.v3.Deployment.Result.decode(reader, reader.uint32()); - break; - } - case 5: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + /** + * Decodes an Entity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.EntityType.Entity} Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.EntityType.Entity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + case 2: { + if (!(message.synonyms && message.synonyms.length)) + message.synonyms = []; + message.synonyms.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a Deployment message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Deployment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Deployment} Deployment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Deployment.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an Entity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.EntityType.Entity} Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a Deployment message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Deployment - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Deployment.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.flowVersion != null && message.hasOwnProperty("flowVersion")) - if (!$util.isString(message.flowVersion)) - return "flowVersion: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; + /** + * Verifies an Entity message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Entity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: 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.result != null && message.hasOwnProperty("result")) { - var error = $root.google.cloud.dialogflow.cx.v3.Deployment.Result.verify(message.result); - if (error) - return "result." + error; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - return null; - }; + return null; + }; - /** - * Creates a Deployment message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Deployment - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Deployment} Deployment - */ - Deployment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Deployment) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Deployment(); - if (object.name != null) - message.name = String(object.name); - if (object.flowVersion != null) - message.flowVersion = String(object.flowVersion); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; + /** + * Creates an Entity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.EntityType.Entity} Entity + */ + Entity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.EntityType.Entity) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.EntityType.Entity(); + if (object.value != null) + message.value = String(object.value); + if (object.synonyms) { + if (!Array.isArray(object.synonyms)) + throw TypeError(".google.cloud.dialogflow.cx.v3.EntityType.Entity.synonyms: array expected"); + message.synonyms = []; + for (var i = 0; i < object.synonyms.length; ++i) + message.synonyms[i] = String(object.synonyms[i]); } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "RUNNING": - case 1: - message.state = 1; - break; - case "SUCCEEDED": - case 2: - message.state = 2; - break; - case "FAILED": - case 3: - message.state = 3; - break; - } - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Deployment.result: object expected"); - message.result = $root.google.cloud.dialogflow.cx.v3.Deployment.Result.fromObject(object.result); - } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Deployment.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Deployment.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - return message; - }; + return message; + }; - /** - * Creates a plain object from a Deployment message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Deployment - * @static - * @param {google.cloud.dialogflow.cx.v3.Deployment} message Deployment - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Deployment.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.flowVersion = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.result = null; - object.startTime = null; - object.endTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.flowVersion != null && message.hasOwnProperty("flowVersion")) - object.flowVersion = message.flowVersion; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Deployment.State[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.cx.v3.Deployment.State[message.state] : message.state; - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.google.cloud.dialogflow.cx.v3.Deployment.Result.toObject(message.result, options); - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - return object; - }; + /** + * Creates a plain object from an Entity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity + * @static + * @param {google.cloud.dialogflow.cx.v3.EntityType.Entity} message Entity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Entity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.synonyms = []; + if (options.defaults) + object.value = ""; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.synonyms && message.synonyms.length) { + object.synonyms = []; + for (var j = 0; j < message.synonyms.length; ++j) + object.synonyms[j] = message.synonyms[j]; + } + return object; + }; - /** - * Converts this Deployment to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Deployment - * @instance - * @returns {Object.} JSON object - */ - Deployment.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this Entity to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity + * @instance + * @returns {Object.} JSON object + */ + Entity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for Deployment - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Deployment - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Deployment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Deployment"; - }; + /** + * Gets the default type url for Entity + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Entity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.EntityType.Entity"; + }; - /** - * State enum. - * @name google.cloud.dialogflow.cx.v3.Deployment.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} RUNNING=1 RUNNING value - * @property {number} SUCCEEDED=2 SUCCEEDED value - * @property {number} FAILED=3 FAILED value - */ - Deployment.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RUNNING"] = 1; - values[valuesById[2] = "SUCCEEDED"] = 2; - values[valuesById[3] = "FAILED"] = 3; - return values; + return Entity; })(); - Deployment.Result = (function() { + EntityType.ExcludedPhrase = (function() { /** - * Properties of a Result. - * @memberof google.cloud.dialogflow.cx.v3.Deployment - * @interface IResult - * @property {Array.|null} [deploymentTestResults] Result deploymentTestResults - * @property {string|null} [experiment] Result experiment + * Properties of an ExcludedPhrase. + * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @interface IExcludedPhrase + * @property {string|null} [value] ExcludedPhrase value */ /** - * Constructs a new Result. - * @memberof google.cloud.dialogflow.cx.v3.Deployment - * @classdesc Represents a Result. - * @implements IResult + * Constructs a new ExcludedPhrase. + * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @classdesc Represents an ExcludedPhrase. + * @implements IExcludedPhrase * @constructor - * @param {google.cloud.dialogflow.cx.v3.Deployment.IResult=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase=} [properties] Properties to set */ - function Result(properties) { - this.deploymentTestResults = []; + function ExcludedPhrase(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20750,92 +23129,75 @@ } /** - * Result deploymentTestResults. - * @member {Array.} deploymentTestResults - * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result - * @instance - */ - Result.prototype.deploymentTestResults = $util.emptyArray; - - /** - * Result experiment. - * @member {string} experiment - * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * ExcludedPhrase value. + * @member {string} value + * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase * @instance */ - Result.prototype.experiment = ""; + ExcludedPhrase.prototype.value = ""; /** - * Creates a new Result instance using the specified properties. + * Creates a new ExcludedPhrase instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase * @static - * @param {google.cloud.dialogflow.cx.v3.Deployment.IResult=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Deployment.Result} Result instance + * @param {google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase} ExcludedPhrase instance */ - Result.create = function create(properties) { - return new Result(properties); + ExcludedPhrase.create = function create(properties) { + return new ExcludedPhrase(properties); }; /** - * Encodes the specified Result message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.Result.verify|verify} messages. + * Encodes the specified ExcludedPhrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase * @static - * @param {google.cloud.dialogflow.cx.v3.Deployment.IResult} message Result message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase} message ExcludedPhrase message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Result.encode = function encode(message, writer) { + ExcludedPhrase.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deploymentTestResults != null && message.deploymentTestResults.length) - for (var i = 0; i < message.deploymentTestResults.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.deploymentTestResults[i]); - if (message.experiment != null && Object.hasOwnProperty.call(message, "experiment")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.experiment); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); return writer; }; /** - * Encodes the specified Result message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.Result.verify|verify} messages. + * Encodes the specified ExcludedPhrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase * @static - * @param {google.cloud.dialogflow.cx.v3.Deployment.IResult} message Result message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase} message ExcludedPhrase message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Result.encodeDelimited = function encodeDelimited(message, writer) { + ExcludedPhrase.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Result message from the specified reader or buffer. + * Decodes an ExcludedPhrase message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.Deployment.Result} Result + * @returns {google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase} ExcludedPhrase * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Result.decode = function decode(reader, length) { + ExcludedPhrase.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Deployment.Result(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.deploymentTestResults && message.deploymentTestResults.length)) - message.deploymentTestResults = []; - message.deploymentTestResults.push(reader.string()); - break; - } - case 2: { - message.experiment = reader.string(); + message.value = reader.string(); break; } default: @@ -20847,148 +23209,128 @@ }; /** - * Decodes a Result message from the specified reader or buffer, length delimited. + * Decodes an ExcludedPhrase message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Deployment.Result} Result + * @returns {google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase} ExcludedPhrase * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Result.decodeDelimited = function decodeDelimited(reader) { + ExcludedPhrase.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Result message. + * Verifies an ExcludedPhrase message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Result.verify = function verify(message) { + ExcludedPhrase.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.deploymentTestResults != null && message.hasOwnProperty("deploymentTestResults")) { - if (!Array.isArray(message.deploymentTestResults)) - return "deploymentTestResults: array expected"; - for (var i = 0; i < message.deploymentTestResults.length; ++i) - if (!$util.isString(message.deploymentTestResults[i])) - return "deploymentTestResults: string[] expected"; - } - if (message.experiment != null && message.hasOwnProperty("experiment")) - if (!$util.isString(message.experiment)) - return "experiment: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; return null; }; /** - * Creates a Result message from a plain object. Also converts values to their respective internal types. + * Creates an ExcludedPhrase message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Deployment.Result} Result + * @returns {google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase} ExcludedPhrase */ - Result.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Deployment.Result) + ExcludedPhrase.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Deployment.Result(); - if (object.deploymentTestResults) { - if (!Array.isArray(object.deploymentTestResults)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Deployment.Result.deploymentTestResults: array expected"); - message.deploymentTestResults = []; - for (var i = 0; i < object.deploymentTestResults.length; ++i) - message.deploymentTestResults[i] = String(object.deploymentTestResults[i]); - } - if (object.experiment != null) - message.experiment = String(object.experiment); + var message = new $root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase(); + if (object.value != null) + message.value = String(object.value); return message; }; /** - * Creates a plain object from a Result message. Also converts values to other types if specified. + * Creates a plain object from an ExcludedPhrase message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase * @static - * @param {google.cloud.dialogflow.cx.v3.Deployment.Result} message Result + * @param {google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase} message ExcludedPhrase * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Result.toObject = function toObject(message, options) { + ExcludedPhrase.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.deploymentTestResults = []; if (options.defaults) - object.experiment = ""; - if (message.deploymentTestResults && message.deploymentTestResults.length) { - object.deploymentTestResults = []; - for (var j = 0; j < message.deploymentTestResults.length; ++j) - object.deploymentTestResults[j] = message.deploymentTestResults[j]; - } - if (message.experiment != null && message.hasOwnProperty("experiment")) - object.experiment = message.experiment; + object.value = ""; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; return object; }; /** - * Converts this Result to JSON. + * Converts this ExcludedPhrase to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase * @instance * @returns {Object.} JSON object */ - Result.prototype.toJSON = function toJSON() { + ExcludedPhrase.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Result + * Gets the default type url for ExcludedPhrase * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Result.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExcludedPhrase.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Deployment.Result"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase"; }; - return Result; + return ExcludedPhrase; })(); - return Deployment; + return EntityType; })(); - v3.ListDeploymentsRequest = (function() { + v3.ListEntityTypesRequest = (function() { /** - * Properties of a ListDeploymentsRequest. + * Properties of a ListEntityTypesRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListDeploymentsRequest - * @property {string|null} [parent] ListDeploymentsRequest parent - * @property {number|null} [pageSize] ListDeploymentsRequest pageSize - * @property {string|null} [pageToken] ListDeploymentsRequest pageToken + * @interface IListEntityTypesRequest + * @property {string|null} [parent] ListEntityTypesRequest parent + * @property {string|null} [languageCode] ListEntityTypesRequest languageCode + * @property {number|null} [pageSize] ListEntityTypesRequest pageSize + * @property {string|null} [pageToken] ListEntityTypesRequest pageToken */ /** - * Constructs a new ListDeploymentsRequest. + * Constructs a new ListEntityTypesRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListDeploymentsRequest. - * @implements IListDeploymentsRequest + * @classdesc Represents a ListEntityTypesRequest. + * @implements IListEntityTypesRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesRequest=} [properties] Properties to set */ - function ListDeploymentsRequest(properties) { + function ListEntityTypesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20996,90 +23338,100 @@ } /** - * ListDeploymentsRequest parent. + * ListEntityTypesRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest * @instance */ - ListDeploymentsRequest.prototype.parent = ""; + ListEntityTypesRequest.prototype.parent = ""; /** - * ListDeploymentsRequest pageSize. + * ListEntityTypesRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest + * @instance + */ + ListEntityTypesRequest.prototype.languageCode = ""; + + /** + * ListEntityTypesRequest pageSize. * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest * @instance */ - ListDeploymentsRequest.prototype.pageSize = 0; + ListEntityTypesRequest.prototype.pageSize = 0; /** - * ListDeploymentsRequest pageToken. + * ListEntityTypesRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest * @instance */ - ListDeploymentsRequest.prototype.pageToken = ""; + ListEntityTypesRequest.prototype.pageToken = ""; /** - * Creates a new ListDeploymentsRequest instance using the specified properties. + * Creates a new ListEntityTypesRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsRequest} ListDeploymentsRequest instance + * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesRequest} ListEntityTypesRequest instance */ - ListDeploymentsRequest.create = function create(properties) { - return new ListDeploymentsRequest(properties); + ListEntityTypesRequest.create = function create(properties) { + return new ListEntityTypesRequest(properties); }; /** - * Encodes the specified ListDeploymentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsRequest.verify|verify} messages. + * Encodes the specified ListEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsRequest} message ListDeploymentsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesRequest} message ListEntityTypesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeploymentsRequest.encode = function encode(message, writer) { + ListEntityTypesRequest.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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); return writer; }; /** - * Encodes the specified ListDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsRequest.verify|verify} messages. + * Encodes the specified ListEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsRequest} message ListDeploymentsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesRequest} message ListEntityTypesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeploymentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListEntityTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDeploymentsRequest message from the specified reader or buffer. + * Decodes a ListEntityTypesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsRequest} ListDeploymentsRequest + * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesRequest} ListEntityTypesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeploymentsRequest.decode = function decode(reader, length) { + ListEntityTypesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -21088,10 +23440,14 @@ break; } case 2: { - message.pageSize = reader.int32(); + message.languageCode = reader.string(); break; } case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { message.pageToken = reader.string(); break; } @@ -21104,35 +23460,38 @@ }; /** - * Decodes a ListDeploymentsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEntityTypesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsRequest} ListDeploymentsRequest + * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesRequest} ListEntityTypesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeploymentsRequest.decodeDelimited = function decodeDelimited(reader) { + ListEntityTypesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDeploymentsRequest message. + * Verifies a ListEntityTypesRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDeploymentsRequest.verify = function verify(message) { + ListEntityTypesRequest.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.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; if (message.pageSize != null && message.hasOwnProperty("pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; @@ -21143,19 +23502,21 @@ }; /** - * Creates a ListDeploymentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEntityTypesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsRequest} ListDeploymentsRequest + * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesRequest} ListEntityTypesRequest */ - ListDeploymentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest) + ListEntityTypesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest(); if (object.parent != null) message.parent = String(object.parent); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); if (object.pageSize != null) message.pageSize = object.pageSize | 0; if (object.pageToken != null) @@ -21164,25 +23525,28 @@ }; /** - * Creates a plain object from a ListDeploymentsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListEntityTypesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ListDeploymentsRequest} message ListDeploymentsRequest + * @param {google.cloud.dialogflow.cx.v3.ListEntityTypesRequest} message ListEntityTypesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDeploymentsRequest.toObject = function toObject(message, options) { + ListEntityTypesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; + object.languageCode = ""; object.pageSize = 0; object.pageToken = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; if (message.pageSize != null && message.hasOwnProperty("pageSize")) object.pageSize = message.pageSize; if (message.pageToken != null && message.hasOwnProperty("pageToken")) @@ -21191,54 +23555,54 @@ }; /** - * Converts this ListDeploymentsRequest to JSON. + * Converts this ListEntityTypesRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest * @instance * @returns {Object.} JSON object */ - ListDeploymentsRequest.prototype.toJSON = function toJSON() { + ListEntityTypesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListDeploymentsRequest + * Gets the default type url for ListEntityTypesRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListDeploymentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListEntityTypesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListDeploymentsRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListEntityTypesRequest"; }; - return ListDeploymentsRequest; + return ListEntityTypesRequest; })(); - v3.ListDeploymentsResponse = (function() { + v3.ListEntityTypesResponse = (function() { /** - * Properties of a ListDeploymentsResponse. + * Properties of a ListEntityTypesResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListDeploymentsResponse - * @property {Array.|null} [deployments] ListDeploymentsResponse deployments - * @property {string|null} [nextPageToken] ListDeploymentsResponse nextPageToken + * @interface IListEntityTypesResponse + * @property {Array.|null} [entityTypes] ListEntityTypesResponse entityTypes + * @property {string|null} [nextPageToken] ListEntityTypesResponse nextPageToken */ /** - * Constructs a new ListDeploymentsResponse. + * Constructs a new ListEntityTypesResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListDeploymentsResponse. - * @implements IListDeploymentsResponse + * @classdesc Represents a ListEntityTypesResponse. + * @implements IListEntityTypesResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesResponse=} [properties] Properties to set */ - function ListDeploymentsResponse(properties) { - this.deployments = []; + function ListEntityTypesResponse(properties) { + this.entityTypes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21246,88 +23610,88 @@ } /** - * ListDeploymentsResponse deployments. - * @member {Array.} deployments - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse + * ListEntityTypesResponse entityTypes. + * @member {Array.} entityTypes + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse * @instance */ - ListDeploymentsResponse.prototype.deployments = $util.emptyArray; + ListEntityTypesResponse.prototype.entityTypes = $util.emptyArray; /** - * ListDeploymentsResponse nextPageToken. + * ListEntityTypesResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse * @instance */ - ListDeploymentsResponse.prototype.nextPageToken = ""; + ListEntityTypesResponse.prototype.nextPageToken = ""; /** - * Creates a new ListDeploymentsResponse instance using the specified properties. + * Creates a new ListEntityTypesResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsResponse} ListDeploymentsResponse instance + * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesResponse} ListEntityTypesResponse instance */ - ListDeploymentsResponse.create = function create(properties) { - return new ListDeploymentsResponse(properties); + ListEntityTypesResponse.create = function create(properties) { + return new ListEntityTypesResponse(properties); }; /** - * Encodes the specified ListDeploymentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsResponse.verify|verify} messages. + * Encodes the specified ListEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsResponse} message ListDeploymentsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesResponse} message ListEntityTypesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeploymentsResponse.encode = function encode(message, writer) { + ListEntityTypesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deployments != null && message.deployments.length) - for (var i = 0; i < message.deployments.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Deployment.encode(message.deployments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.entityTypes != null && message.entityTypes.length) + for (var i = 0; i < message.entityTypes.length; ++i) + $root.google.cloud.dialogflow.cx.v3.EntityType.encode(message.entityTypes[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 ListDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsResponse.verify|verify} messages. + * Encodes the specified ListEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsResponse} message ListDeploymentsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesResponse} message ListEntityTypesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeploymentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListEntityTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDeploymentsResponse message from the specified reader or buffer. + * Decodes a ListEntityTypesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsResponse} ListDeploymentsResponse + * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesResponse} ListEntityTypesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeploymentsResponse.decode = function decode(reader, length) { + ListEntityTypesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.deployments && message.deployments.length)) - message.deployments = []; - message.deployments.push($root.google.cloud.dialogflow.cx.v3.Deployment.decode(reader, reader.uint32())); + if (!(message.entityTypes && message.entityTypes.length)) + message.entityTypes = []; + message.entityTypes.push($root.google.cloud.dialogflow.cx.v3.EntityType.decode(reader, reader.uint32())); break; } case 2: { @@ -21343,39 +23707,39 @@ }; /** - * Decodes a ListDeploymentsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListEntityTypesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsResponse} ListDeploymentsResponse + * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesResponse} ListEntityTypesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeploymentsResponse.decodeDelimited = function decodeDelimited(reader) { + ListEntityTypesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDeploymentsResponse message. + * Verifies a ListEntityTypesResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDeploymentsResponse.verify = function verify(message) { + ListEntityTypesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.deployments != null && message.hasOwnProperty("deployments")) { - if (!Array.isArray(message.deployments)) - return "deployments: array expected"; - for (var i = 0; i < message.deployments.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Deployment.verify(message.deployments[i]); + if (message.entityTypes != null && message.hasOwnProperty("entityTypes")) { + if (!Array.isArray(message.entityTypes)) + return "entityTypes: array expected"; + for (var i = 0; i < message.entityTypes.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.EntityType.verify(message.entityTypes[i]); if (error) - return "deployments." + error; + return "entityTypes." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -21385,25 +23749,25 @@ }; /** - * Creates a ListDeploymentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListEntityTypesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsResponse} ListDeploymentsResponse + * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesResponse} ListEntityTypesResponse */ - ListDeploymentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse) + ListEntityTypesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse(); - if (object.deployments) { - if (!Array.isArray(object.deployments)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ListDeploymentsResponse.deployments: array expected"); - message.deployments = []; - for (var i = 0; i < object.deployments.length; ++i) { - if (typeof object.deployments[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ListDeploymentsResponse.deployments: object expected"); - message.deployments[i] = $root.google.cloud.dialogflow.cx.v3.Deployment.fromObject(object.deployments[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse(); + if (object.entityTypes) { + if (!Array.isArray(object.entityTypes)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListEntityTypesResponse.entityTypes: array expected"); + message.entityTypes = []; + for (var i = 0; i < object.entityTypes.length; ++i) { + if (typeof object.entityTypes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListEntityTypesResponse.entityTypes: object expected"); + message.entityTypes[i] = $root.google.cloud.dialogflow.cx.v3.EntityType.fromObject(object.entityTypes[i]); } } if (object.nextPageToken != null) @@ -21412,26 +23776,26 @@ }; /** - * Creates a plain object from a ListDeploymentsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListEntityTypesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ListDeploymentsResponse} message ListDeploymentsResponse + * @param {google.cloud.dialogflow.cx.v3.ListEntityTypesResponse} message ListEntityTypesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDeploymentsResponse.toObject = function toObject(message, options) { + ListEntityTypesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.deployments = []; + object.entityTypes = []; if (options.defaults) object.nextPageToken = ""; - if (message.deployments && message.deployments.length) { - object.deployments = []; - for (var j = 0; j < message.deployments.length; ++j) - object.deployments[j] = $root.google.cloud.dialogflow.cx.v3.Deployment.toObject(message.deployments[j], options); + if (message.entityTypes && message.entityTypes.length) { + object.entityTypes = []; + for (var j = 0; j < message.entityTypes.length; ++j) + object.entityTypes[j] = $root.google.cloud.dialogflow.cx.v3.EntityType.toObject(message.entityTypes[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -21439,52 +23803,53 @@ }; /** - * Converts this ListDeploymentsResponse to JSON. + * Converts this ListEntityTypesResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse * @instance * @returns {Object.} JSON object */ - ListDeploymentsResponse.prototype.toJSON = function toJSON() { + ListEntityTypesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListDeploymentsResponse + * Gets the default type url for ListEntityTypesResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListDeploymentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListEntityTypesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListDeploymentsResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListEntityTypesResponse"; }; - return ListDeploymentsResponse; + return ListEntityTypesResponse; })(); - v3.GetDeploymentRequest = (function() { + v3.GetEntityTypeRequest = (function() { /** - * Properties of a GetDeploymentRequest. + * Properties of a GetEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IGetDeploymentRequest - * @property {string|null} [name] GetDeploymentRequest name + * @interface IGetEntityTypeRequest + * @property {string|null} [name] GetEntityTypeRequest name + * @property {string|null} [languageCode] GetEntityTypeRequest languageCode */ /** - * Constructs a new GetDeploymentRequest. + * Constructs a new GetEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a GetDeploymentRequest. - * @implements IGetDeploymentRequest + * @classdesc Represents a GetEntityTypeRequest. + * @implements IGetEntityTypeRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IGetDeploymentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest=} [properties] Properties to set */ - function GetDeploymentRequest(properties) { + function GetEntityTypeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21492,70 +23857,80 @@ } /** - * GetDeploymentRequest name. + * GetEntityTypeRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest * @instance */ - GetDeploymentRequest.prototype.name = ""; + GetEntityTypeRequest.prototype.name = ""; /** - * Creates a new GetDeploymentRequest instance using the specified properties. + * GetEntityTypeRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest + * @instance + */ + GetEntityTypeRequest.prototype.languageCode = ""; + + /** + * Creates a new GetEntityTypeRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetDeploymentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GetDeploymentRequest} GetDeploymentRequest instance + * @param {google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetEntityTypeRequest} GetEntityTypeRequest instance */ - GetDeploymentRequest.create = function create(properties) { - return new GetDeploymentRequest(properties); + GetEntityTypeRequest.create = function create(properties) { + return new GetEntityTypeRequest(properties); }; /** - * Encodes the specified GetDeploymentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetDeploymentRequest.verify|verify} messages. + * Encodes the specified GetEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetEntityTypeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetDeploymentRequest} message GetDeploymentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest} message GetEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetDeploymentRequest.encode = function encode(message, writer) { + GetEntityTypeRequest.encode = function encode(message, writer) { 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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); return writer; }; /** - * Encodes the specified GetDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetDeploymentRequest.verify|verify} messages. + * Encodes the specified GetEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetEntityTypeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetDeploymentRequest} message GetDeploymentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest} message GetEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetDeploymentRequest message from the specified reader or buffer. + * Decodes a GetEntityTypeRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.GetDeploymentRequest} GetDeploymentRequest + * @returns {google.cloud.dialogflow.cx.v3.GetEntityTypeRequest} GetEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetDeploymentRequest.decode = function decode(reader, length) { + GetEntityTypeRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetDeploymentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetEntityTypeRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -21563,6 +23938,10 @@ message.name = reader.string(); break; } + case 2: { + message.languageCode = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -21572,331 +23951,388 @@ }; /** - * Decodes a GetDeploymentRequest message from the specified reader or buffer, length delimited. + * Decodes a GetEntityTypeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.GetDeploymentRequest} GetDeploymentRequest + * @returns {google.cloud.dialogflow.cx.v3.GetEntityTypeRequest} GetEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + GetEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetDeploymentRequest message. + * Verifies a GetEntityTypeRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetDeploymentRequest.verify = function verify(message) { + GetEntityTypeRequest.verify = function verify(message) { if (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.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a GetDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetEntityTypeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GetDeploymentRequest} GetDeploymentRequest + * @returns {google.cloud.dialogflow.cx.v3.GetEntityTypeRequest} GetEntityTypeRequest */ - GetDeploymentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetDeploymentRequest) + GetEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetEntityTypeRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.GetDeploymentRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.GetEntityTypeRequest(); if (object.name != null) message.name = String(object.name); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a GetDeploymentRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetEntityTypeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.GetDeploymentRequest} message GetDeploymentRequest + * @param {google.cloud.dialogflow.cx.v3.GetEntityTypeRequest} message GetEntityTypeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetDeploymentRequest.toObject = function toObject(message, options) { + GetEntityTypeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.languageCode = ""; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this GetDeploymentRequest to JSON. + * Converts this GetEntityTypeRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest * @instance * @returns {Object.} JSON object */ - GetDeploymentRequest.prototype.toJSON = function toJSON() { + GetEntityTypeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetDeploymentRequest + * Gets the default type url for GetEntityTypeRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetEntityTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetDeploymentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetEntityTypeRequest"; }; - return GetDeploymentRequest; + return GetEntityTypeRequest; })(); - v3.EntityTypes = (function() { + v3.CreateEntityTypeRequest = (function() { /** - * Constructs a new EntityTypes service. + * Properties of a CreateEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an EntityTypes - * @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 EntityTypes(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (EntityTypes.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = EntityTypes; - - /** - * Creates new EntityTypes service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @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 {EntityTypes} RPC service. Useful where requests and/or responses are streamed. + * @interface ICreateEntityTypeRequest + * @property {string|null} [parent] CreateEntityTypeRequest parent + * @property {google.cloud.dialogflow.cx.v3.IEntityType|null} [entityType] CreateEntityTypeRequest entityType + * @property {string|null} [languageCode] CreateEntityTypeRequest languageCode */ - EntityTypes.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|listEntityTypes}. - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @typedef ListEntityTypesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.ListEntityTypesResponse} [response] ListEntityTypesResponse + * Constructs a new CreateEntityTypeRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a CreateEntityTypeRequest. + * @implements ICreateEntityTypeRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest=} [properties] Properties to set */ + function CreateEntityTypeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls ListEntityTypes. - * @function listEntityTypes - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * CreateEntityTypeRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest * @instance - * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesRequest} request ListEntityTypesRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.EntityTypes.ListEntityTypesCallback} callback Node-style callback called with the error, if any, and ListEntityTypesResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(EntityTypes.prototype.listEntityTypes = function listEntityTypes(request, callback) { - return this.rpcCall(listEntityTypes, $root.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest, $root.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse, request, callback); - }, "name", { value: "ListEntityTypes" }); + CreateEntityTypeRequest.prototype.parent = ""; /** - * Calls ListEntityTypes. - * @function listEntityTypes - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * CreateEntityTypeRequest entityType. + * @member {google.cloud.dialogflow.cx.v3.IEntityType|null|undefined} entityType + * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest * @instance - * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesRequest} request ListEntityTypesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|getEntityType}. - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @typedef GetEntityTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.EntityType} [response] EntityType */ + CreateEntityTypeRequest.prototype.entityType = null; /** - * Calls GetEntityType. - * @function getEntityType - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * CreateEntityTypeRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest} request GetEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.EntityTypes.GetEntityTypeCallback} callback Node-style callback called with the error, if any, and EntityType - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(EntityTypes.prototype.getEntityType = function getEntityType(request, callback) { - return this.rpcCall(getEntityType, $root.google.cloud.dialogflow.cx.v3.GetEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3.EntityType, request, callback); - }, "name", { value: "GetEntityType" }); + CreateEntityTypeRequest.prototype.languageCode = ""; /** - * Calls GetEntityType. - * @function getEntityType - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest} request GetEntityTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new CreateEntityTypeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest} CreateEntityTypeRequest instance */ + CreateEntityTypeRequest.create = function create(properties) { + return new CreateEntityTypeRequest(properties); + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|createEntityType}. - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @typedef CreateEntityTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.EntityType} [response] EntityType + * Encodes the specified CreateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest} message CreateEntityTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + CreateEntityTypeRequest.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.entityType != null && Object.hasOwnProperty.call(message, "entityType")) + $root.google.cloud.dialogflow.cx.v3.EntityType.encode(message.entityType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); + return writer; + }; /** - * Calls CreateEntityType. - * @function createEntityType - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest} request CreateEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.EntityTypes.CreateEntityTypeCallback} callback Node-style callback called with the error, if any, and EntityType - * @returns {undefined} - * @variation 1 + * Encodes the specified CreateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest} message CreateEntityTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(EntityTypes.prototype.createEntityType = function createEntityType(request, callback) { - return this.rpcCall(createEntityType, $root.google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3.EntityType, request, callback); - }, "name", { value: "CreateEntityType" }); + CreateEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls CreateEntityType. - * @function createEntityType - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest} request CreateEntityTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a CreateEntityTypeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest} CreateEntityTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + CreateEntityTypeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.entityType = $root.google.cloud.dialogflow.cx.v3.EntityType.decode(reader, reader.uint32()); + break; + } + case 3: { + message.languageCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|updateEntityType}. - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @typedef UpdateEntityTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.EntityType} [response] EntityType + * Decodes a CreateEntityTypeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest} CreateEntityTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + CreateEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls UpdateEntityType. - * @function updateEntityType - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest} request UpdateEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.EntityTypes.UpdateEntityTypeCallback} callback Node-style callback called with the error, if any, and EntityType - * @returns {undefined} - * @variation 1 + * Verifies a CreateEntityTypeRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(EntityTypes.prototype.updateEntityType = function updateEntityType(request, callback) { - return this.rpcCall(updateEntityType, $root.google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3.EntityType, request, callback); - }, "name", { value: "UpdateEntityType" }); + CreateEntityTypeRequest.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.entityType != null && message.hasOwnProperty("entityType")) { + var error = $root.google.cloud.dialogflow.cx.v3.EntityType.verify(message.entityType); + if (error) + return "entityType." + error; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + return null; + }; /** - * Calls UpdateEntityType. - * @function updateEntityType - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest} request UpdateEntityTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a CreateEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest} CreateEntityTypeRequest */ + CreateEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.entityType != null) { + if (typeof object.entityType !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest.entityType: object expected"); + message.entityType = $root.google.cloud.dialogflow.cx.v3.EntityType.fromObject(object.entityType); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + return message; + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|deleteEntityType}. - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @typedef DeleteEntityTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates a plain object from a CreateEntityTypeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest} message CreateEntityTypeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + CreateEntityTypeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.entityType = null; + object.languageCode = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.entityType != null && message.hasOwnProperty("entityType")) + object.entityType = $root.google.cloud.dialogflow.cx.v3.EntityType.toObject(message.entityType, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + return object; + }; /** - * Calls DeleteEntityType. - * @function deleteEntityType - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * Converts this CreateEntityTypeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest} request DeleteEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.EntityTypes.DeleteEntityTypeCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(EntityTypes.prototype.deleteEntityType = function deleteEntityType(request, callback) { - return this.rpcCall(deleteEntityType, $root.google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteEntityType" }); + CreateEntityTypeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls DeleteEntityType. - * @function deleteEntityType - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest} request DeleteEntityTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for CreateEntityTypeRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + CreateEntityTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest"; + }; - return EntityTypes; + return CreateEntityTypeRequest; })(); - v3.EntityType = (function() { + v3.UpdateEntityTypeRequest = (function() { /** - * Properties of an EntityType. + * Properties of an UpdateEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IEntityType - * @property {string|null} [name] EntityType name - * @property {string|null} [displayName] EntityType displayName - * @property {google.cloud.dialogflow.cx.v3.EntityType.Kind|null} [kind] EntityType kind - * @property {google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode|null} [autoExpansionMode] EntityType autoExpansionMode - * @property {Array.|null} [entities] EntityType entities - * @property {Array.|null} [excludedPhrases] EntityType excludedPhrases - * @property {boolean|null} [enableFuzzyExtraction] EntityType enableFuzzyExtraction - * @property {boolean|null} [redact] EntityType redact + * @interface IUpdateEntityTypeRequest + * @property {google.cloud.dialogflow.cx.v3.IEntityType|null} [entityType] UpdateEntityTypeRequest entityType + * @property {string|null} [languageCode] UpdateEntityTypeRequest languageCode + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEntityTypeRequest updateMask */ /** - * Constructs a new EntityType. + * Constructs a new UpdateEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an EntityType. - * @implements IEntityType + * @classdesc Represents an UpdateEntityTypeRequest. + * @implements IUpdateEntityTypeRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IEntityType=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest=} [properties] Properties to set */ - function EntityType(properties) { - this.entities = []; - this.excludedPhrases = []; + function UpdateEntityTypeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21904,179 +24340,103 @@ } /** - * EntityType name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.EntityType - * @instance - */ - EntityType.prototype.name = ""; - - /** - * EntityType displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3.EntityType - * @instance - */ - EntityType.prototype.displayName = ""; - - /** - * EntityType kind. - * @member {google.cloud.dialogflow.cx.v3.EntityType.Kind} kind - * @memberof google.cloud.dialogflow.cx.v3.EntityType - * @instance - */ - EntityType.prototype.kind = 0; - - /** - * EntityType autoExpansionMode. - * @member {google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode} autoExpansionMode - * @memberof google.cloud.dialogflow.cx.v3.EntityType - * @instance - */ - EntityType.prototype.autoExpansionMode = 0; - - /** - * EntityType entities. - * @member {Array.} entities - * @memberof google.cloud.dialogflow.cx.v3.EntityType - * @instance - */ - EntityType.prototype.entities = $util.emptyArray; - - /** - * EntityType excludedPhrases. - * @member {Array.} excludedPhrases - * @memberof google.cloud.dialogflow.cx.v3.EntityType + * UpdateEntityTypeRequest entityType. + * @member {google.cloud.dialogflow.cx.v3.IEntityType|null|undefined} entityType + * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest * @instance */ - EntityType.prototype.excludedPhrases = $util.emptyArray; + UpdateEntityTypeRequest.prototype.entityType = null; /** - * EntityType enableFuzzyExtraction. - * @member {boolean} enableFuzzyExtraction - * @memberof google.cloud.dialogflow.cx.v3.EntityType + * UpdateEntityTypeRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest * @instance */ - EntityType.prototype.enableFuzzyExtraction = false; + UpdateEntityTypeRequest.prototype.languageCode = ""; /** - * EntityType redact. - * @member {boolean} redact - * @memberof google.cloud.dialogflow.cx.v3.EntityType + * UpdateEntityTypeRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest * @instance */ - EntityType.prototype.redact = false; + UpdateEntityTypeRequest.prototype.updateMask = null; /** - * Creates a new EntityType instance using the specified properties. + * Creates a new UpdateEntityTypeRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IEntityType=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.EntityType} EntityType instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest} UpdateEntityTypeRequest instance */ - EntityType.create = function create(properties) { - return new EntityType(properties); + UpdateEntityTypeRequest.create = function create(properties) { + return new UpdateEntityTypeRequest(properties); }; /** - * Encodes the specified EntityType message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.verify|verify} messages. + * Encodes the specified UpdateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IEntityType} message EntityType message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest} message UpdateEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EntityType.encode = function encode(message, writer) { + UpdateEntityTypeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.kind); - if (message.autoExpansionMode != null && Object.hasOwnProperty.call(message, "autoExpansionMode")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.autoExpansionMode); - if (message.entities != null && message.entities.length) - for (var i = 0; i < message.entities.length; ++i) - $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.encode(message.entities[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.excludedPhrases != null && message.excludedPhrases.length) - for (var i = 0; i < message.excludedPhrases.length; ++i) - $root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.encode(message.excludedPhrases[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.enableFuzzyExtraction != null && Object.hasOwnProperty.call(message, "enableFuzzyExtraction")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.enableFuzzyExtraction); - if (message.redact != null && Object.hasOwnProperty.call(message, "redact")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.redact); + if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) + $root.google.cloud.dialogflow.cx.v3.EntityType.encode(message.entityType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + 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 EntityType message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.verify|verify} messages. + * Encodes the specified UpdateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IEntityType} message EntityType message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest} message UpdateEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EntityType.encodeDelimited = function encodeDelimited(message, writer) { + UpdateEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EntityType message from the specified reader or buffer. + * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.EntityType} EntityType + * @returns {google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest} UpdateEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EntityType.decode = function decode(reader, length) { + UpdateEntityTypeRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.EntityType(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.entityType = $root.google.cloud.dialogflow.cx.v3.EntityType.decode(reader, reader.uint32()); break; } case 2: { - message.displayName = reader.string(); + message.languageCode = reader.string(); break; } case 3: { - message.kind = reader.int32(); - break; - } - case 4: { - message.autoExpansionMode = reader.int32(); - break; - } - case 5: { - if (!(message.entities && message.entities.length)) - message.entities = []; - message.entities.push($root.google.cloud.dialogflow.cx.v3.EntityType.Entity.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.excludedPhrases && message.excludedPhrases.length)) - message.excludedPhrases = []; - message.excludedPhrases.push($root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.decode(reader, reader.uint32())); - break; - } - case 7: { - message.enableFuzzyExtraction = reader.bool(); - break; - } - case 9: { - message.redact = reader.bool(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -22088,744 +24448,150 @@ }; /** - * Decodes an EntityType message from the specified reader or buffer, length delimited. + * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.EntityType} EntityType + * @returns {google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest} UpdateEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EntityType.decodeDelimited = function decodeDelimited(reader) { + UpdateEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EntityType message. + * Verifies an UpdateEntityTypeRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EntityType.verify = function verify(message) { + UpdateEntityTypeRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - switch (message.kind) { - default: - return "kind: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.autoExpansionMode != null && message.hasOwnProperty("autoExpansionMode")) - switch (message.autoExpansionMode) { - default: - return "autoExpansionMode: enum value expected"; - case 0: - case 1: - break; - } - if (message.entities != null && message.hasOwnProperty("entities")) { - if (!Array.isArray(message.entities)) - return "entities: array expected"; - for (var i = 0; i < message.entities.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.verify(message.entities[i]); - if (error) - return "entities." + error; - } + if (message.entityType != null && message.hasOwnProperty("entityType")) { + var error = $root.google.cloud.dialogflow.cx.v3.EntityType.verify(message.entityType); + if (error) + return "entityType." + error; } - if (message.excludedPhrases != null && message.hasOwnProperty("excludedPhrases")) { - if (!Array.isArray(message.excludedPhrases)) - return "excludedPhrases: array expected"; - for (var i = 0; i < message.excludedPhrases.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.verify(message.excludedPhrases[i]); - if (error) - return "excludedPhrases." + error; - } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } - if (message.enableFuzzyExtraction != null && message.hasOwnProperty("enableFuzzyExtraction")) - if (typeof message.enableFuzzyExtraction !== "boolean") - return "enableFuzzyExtraction: boolean expected"; - if (message.redact != null && message.hasOwnProperty("redact")) - if (typeof message.redact !== "boolean") - return "redact: boolean expected"; return null; }; /** - * Creates an EntityType message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateEntityTypeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.EntityType} EntityType + * @returns {google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest} UpdateEntityTypeRequest */ - EntityType.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.EntityType) + UpdateEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.EntityType(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - switch (object.kind) { - default: - if (typeof object.kind === "number") { - message.kind = object.kind; - break; - } - break; - case "KIND_UNSPECIFIED": - case 0: - message.kind = 0; - break; - case "KIND_MAP": - case 1: - message.kind = 1; - break; - case "KIND_LIST": - case 2: - message.kind = 2; - break; - case "KIND_REGEXP": - case 3: - message.kind = 3; - break; - } - switch (object.autoExpansionMode) { - default: - if (typeof object.autoExpansionMode === "number") { - message.autoExpansionMode = object.autoExpansionMode; - break; - } - break; - case "AUTO_EXPANSION_MODE_UNSPECIFIED": - case 0: - message.autoExpansionMode = 0; - break; - case "AUTO_EXPANSION_MODE_DEFAULT": - case 1: - message.autoExpansionMode = 1; - break; - } - if (object.entities) { - if (!Array.isArray(object.entities)) - throw TypeError(".google.cloud.dialogflow.cx.v3.EntityType.entities: array expected"); - message.entities = []; - for (var i = 0; i < object.entities.length; ++i) { - if (typeof object.entities[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.EntityType.entities: object expected"); - message.entities[i] = $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.fromObject(object.entities[i]); - } + var message = new $root.google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest(); + if (object.entityType != null) { + if (typeof object.entityType !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest.entityType: object expected"); + message.entityType = $root.google.cloud.dialogflow.cx.v3.EntityType.fromObject(object.entityType); } - if (object.excludedPhrases) { - if (!Array.isArray(object.excludedPhrases)) - throw TypeError(".google.cloud.dialogflow.cx.v3.EntityType.excludedPhrases: array expected"); - message.excludedPhrases = []; - for (var i = 0; i < object.excludedPhrases.length; ++i) { - if (typeof object.excludedPhrases[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.EntityType.excludedPhrases: object expected"); - message.excludedPhrases[i] = $root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.fromObject(object.excludedPhrases[i]); - } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.enableFuzzyExtraction != null) - message.enableFuzzyExtraction = Boolean(object.enableFuzzyExtraction); - if (object.redact != null) - message.redact = Boolean(object.redact); return message; }; /** - * Creates a plain object from an EntityType message. Also converts values to other types if specified. + * Creates a plain object from an UpdateEntityTypeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.EntityType} message EntityType + * @param {google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest} message UpdateEntityTypeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EntityType.toObject = function toObject(message, options) { + UpdateEntityTypeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.entities = []; - object.excludedPhrases = []; - } if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.kind = options.enums === String ? "KIND_UNSPECIFIED" : 0; - object.autoExpansionMode = options.enums === String ? "AUTO_EXPANSION_MODE_UNSPECIFIED" : 0; - object.enableFuzzyExtraction = false; - object.redact = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.EntityType.Kind[message.kind] === undefined ? message.kind : $root.google.cloud.dialogflow.cx.v3.EntityType.Kind[message.kind] : message.kind; - if (message.autoExpansionMode != null && message.hasOwnProperty("autoExpansionMode")) - object.autoExpansionMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode[message.autoExpansionMode] === undefined ? message.autoExpansionMode : $root.google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode[message.autoExpansionMode] : message.autoExpansionMode; - if (message.entities && message.entities.length) { - object.entities = []; - for (var j = 0; j < message.entities.length; ++j) - object.entities[j] = $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.toObject(message.entities[j], options); - } - if (message.excludedPhrases && message.excludedPhrases.length) { - object.excludedPhrases = []; - for (var j = 0; j < message.excludedPhrases.length; ++j) - object.excludedPhrases[j] = $root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.toObject(message.excludedPhrases[j], options); + object.entityType = null; + object.languageCode = ""; + object.updateMask = null; } - if (message.enableFuzzyExtraction != null && message.hasOwnProperty("enableFuzzyExtraction")) - object.enableFuzzyExtraction = message.enableFuzzyExtraction; - if (message.redact != null && message.hasOwnProperty("redact")) - object.redact = message.redact; + if (message.entityType != null && message.hasOwnProperty("entityType")) + object.entityType = $root.google.cloud.dialogflow.cx.v3.EntityType.toObject(message.entityType, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this EntityType to JSON. + * Converts this UpdateEntityTypeRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest * @instance * @returns {Object.} JSON object */ - EntityType.prototype.toJSON = function toJSON() { + UpdateEntityTypeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EntityType + * Gets the default type url for UpdateEntityTypeRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EntityType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateEntityTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.EntityType"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest"; }; - /** - * Kind enum. - * @name google.cloud.dialogflow.cx.v3.EntityType.Kind - * @enum {number} - * @property {number} KIND_UNSPECIFIED=0 KIND_UNSPECIFIED value - * @property {number} KIND_MAP=1 KIND_MAP value - * @property {number} KIND_LIST=2 KIND_LIST value - * @property {number} KIND_REGEXP=3 KIND_REGEXP value - */ - EntityType.Kind = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "KIND_UNSPECIFIED"] = 0; - values[valuesById[1] = "KIND_MAP"] = 1; - values[valuesById[2] = "KIND_LIST"] = 2; - values[valuesById[3] = "KIND_REGEXP"] = 3; - return values; - })(); - - /** - * AutoExpansionMode enum. - * @name google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode - * @enum {number} - * @property {number} AUTO_EXPANSION_MODE_UNSPECIFIED=0 AUTO_EXPANSION_MODE_UNSPECIFIED value - * @property {number} AUTO_EXPANSION_MODE_DEFAULT=1 AUTO_EXPANSION_MODE_DEFAULT value - */ - EntityType.AutoExpansionMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "AUTO_EXPANSION_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "AUTO_EXPANSION_MODE_DEFAULT"] = 1; - return values; - })(); - - EntityType.Entity = (function() { - - /** - * Properties of an Entity. - * @memberof google.cloud.dialogflow.cx.v3.EntityType - * @interface IEntity - * @property {string|null} [value] Entity value - * @property {Array.|null} [synonyms] Entity synonyms - */ - - /** - * Constructs a new Entity. - * @memberof google.cloud.dialogflow.cx.v3.EntityType - * @classdesc Represents an Entity. - * @implements IEntity - * @constructor - * @param {google.cloud.dialogflow.cx.v3.EntityType.IEntity=} [properties] Properties to set - */ - function Entity(properties) { - this.synonyms = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Entity value. - * @member {string} value - * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity - * @instance - */ - Entity.prototype.value = ""; - - /** - * Entity synonyms. - * @member {Array.} synonyms - * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity - * @instance - */ - Entity.prototype.synonyms = $util.emptyArray; - - /** - * Creates a new Entity instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity - * @static - * @param {google.cloud.dialogflow.cx.v3.EntityType.IEntity=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.EntityType.Entity} Entity instance - */ - Entity.create = function create(properties) { - return new Entity(properties); - }; - - /** - * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.Entity.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity - * @static - * @param {google.cloud.dialogflow.cx.v3.EntityType.IEntity} message Entity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Entity.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); - if (message.synonyms != null && message.synonyms.length) - for (var i = 0; i < message.synonyms.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.synonyms[i]); - return writer; - }; - - /** - * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.Entity.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity - * @static - * @param {google.cloud.dialogflow.cx.v3.EntityType.IEntity} message Entity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Entity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Entity message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.EntityType.Entity} Entity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Entity.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.EntityType.Entity(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.string(); - break; - } - case 2: { - if (!(message.synonyms && message.synonyms.length)) - message.synonyms = []; - message.synonyms.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Entity message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.EntityType.Entity} Entity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Entity.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Entity message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Entity.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: 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"; - } - return null; - }; - - /** - * Creates an Entity message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.EntityType.Entity} Entity - */ - Entity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.EntityType.Entity) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.EntityType.Entity(); - if (object.value != null) - message.value = String(object.value); - if (object.synonyms) { - if (!Array.isArray(object.synonyms)) - throw TypeError(".google.cloud.dialogflow.cx.v3.EntityType.Entity.synonyms: array expected"); - message.synonyms = []; - for (var i = 0; i < object.synonyms.length; ++i) - message.synonyms[i] = String(object.synonyms[i]); - } - return message; - }; - - /** - * Creates a plain object from an Entity message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity - * @static - * @param {google.cloud.dialogflow.cx.v3.EntityType.Entity} message Entity - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Entity.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.synonyms = []; - if (options.defaults) - object.value = ""; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.synonyms && message.synonyms.length) { - object.synonyms = []; - for (var j = 0; j < message.synonyms.length; ++j) - object.synonyms[j] = message.synonyms[j]; - } - return object; - }; - - /** - * Converts this Entity to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity - * @instance - * @returns {Object.} JSON object - */ - Entity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Entity - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Entity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.EntityType.Entity"; - }; - - return Entity; - })(); - - EntityType.ExcludedPhrase = (function() { - - /** - * Properties of an ExcludedPhrase. - * @memberof google.cloud.dialogflow.cx.v3.EntityType - * @interface IExcludedPhrase - * @property {string|null} [value] ExcludedPhrase value - */ - - /** - * Constructs a new ExcludedPhrase. - * @memberof google.cloud.dialogflow.cx.v3.EntityType - * @classdesc Represents an ExcludedPhrase. - * @implements IExcludedPhrase - * @constructor - * @param {google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase=} [properties] Properties to set - */ - function ExcludedPhrase(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExcludedPhrase value. - * @member {string} value - * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase - * @instance - */ - ExcludedPhrase.prototype.value = ""; - - /** - * Creates a new ExcludedPhrase instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase - * @static - * @param {google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase} ExcludedPhrase instance - */ - ExcludedPhrase.create = function create(properties) { - return new ExcludedPhrase(properties); - }; - - /** - * Encodes the specified ExcludedPhrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase - * @static - * @param {google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase} message ExcludedPhrase message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExcludedPhrase.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); - return writer; - }; - - /** - * Encodes the specified ExcludedPhrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase - * @static - * @param {google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase} message ExcludedPhrase message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExcludedPhrase.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExcludedPhrase message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase} ExcludedPhrase - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExcludedPhrase.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExcludedPhrase message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase} ExcludedPhrase - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExcludedPhrase.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExcludedPhrase message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExcludedPhrase.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates an ExcludedPhrase message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase} ExcludedPhrase - */ - ExcludedPhrase.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase(); - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from an ExcludedPhrase message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase - * @static - * @param {google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase} message ExcludedPhrase - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExcludedPhrase.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = ""; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this ExcludedPhrase to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase - * @instance - * @returns {Object.} JSON object - */ - ExcludedPhrase.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExcludedPhrase - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExcludedPhrase.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase"; - }; - - return ExcludedPhrase; - })(); - - return EntityType; + return UpdateEntityTypeRequest; })(); - v3.ListEntityTypesRequest = (function() { + v3.DeleteEntityTypeRequest = (function() { /** - * Properties of a ListEntityTypesRequest. + * Properties of a DeleteEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListEntityTypesRequest - * @property {string|null} [parent] ListEntityTypesRequest parent - * @property {string|null} [languageCode] ListEntityTypesRequest languageCode - * @property {number|null} [pageSize] ListEntityTypesRequest pageSize - * @property {string|null} [pageToken] ListEntityTypesRequest pageToken + * @interface IDeleteEntityTypeRequest + * @property {string|null} [name] DeleteEntityTypeRequest name + * @property {boolean|null} [force] DeleteEntityTypeRequest force */ /** - * Constructs a new ListEntityTypesRequest. + * Constructs a new DeleteEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListEntityTypesRequest. - * @implements IListEntityTypesRequest + * @classdesc Represents a DeleteEntityTypeRequest. + * @implements IDeleteEntityTypeRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest=} [properties] Properties to set */ - function ListEntityTypesRequest(properties) { + function DeleteEntityTypeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22833,117 +24599,89 @@ } /** - * ListEntityTypesRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest - * @instance - */ - ListEntityTypesRequest.prototype.parent = ""; - - /** - * ListEntityTypesRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest - * @instance - */ - ListEntityTypesRequest.prototype.languageCode = ""; - - /** - * ListEntityTypesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest + * DeleteEntityTypeRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest * @instance */ - ListEntityTypesRequest.prototype.pageSize = 0; + DeleteEntityTypeRequest.prototype.name = ""; /** - * ListEntityTypesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest + * DeleteEntityTypeRequest force. + * @member {boolean} force + * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest * @instance */ - ListEntityTypesRequest.prototype.pageToken = ""; + DeleteEntityTypeRequest.prototype.force = false; /** - * Creates a new ListEntityTypesRequest instance using the specified properties. + * Creates a new DeleteEntityTypeRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesRequest} ListEntityTypesRequest instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest} DeleteEntityTypeRequest instance */ - ListEntityTypesRequest.create = function create(properties) { - return new ListEntityTypesRequest(properties); + DeleteEntityTypeRequest.create = function create(properties) { + return new DeleteEntityTypeRequest(properties); }; /** - * Encodes the specified ListEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesRequest.verify|verify} messages. + * Encodes the specified DeleteEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesRequest} message ListEntityTypesRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest} message DeleteEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEntityTypesRequest.encode = function encode(message, writer) { + DeleteEntityTypeRequest.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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - 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.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); return writer; }; /** - * Encodes the specified ListEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesRequest.verify|verify} messages. + * Encodes the specified DeleteEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesRequest} message ListEntityTypesRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest} message DeleteEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEntityTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListEntityTypesRequest message from the specified reader or buffer. + * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesRequest} ListEntityTypesRequest + * @returns {google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest} DeleteEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEntityTypesRequest.decode = function decode(reader, length) { + DeleteEntityTypeRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.name = reader.string(); break; } case 2: { - message.languageCode = reader.string(); - break; - } - case 3: { - message.pageSize = reader.int32(); - break; - } - case 4: { - message.pageToken = reader.string(); + message.force = reader.bool(); break; } default: @@ -22955,983 +24693,633 @@ }; /** - * Decodes a ListEntityTypesRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesRequest} ListEntityTypesRequest + * @returns {google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest} DeleteEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEntityTypesRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListEntityTypesRequest message. + * Verifies a DeleteEntityTypeRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListEntityTypesRequest.verify = function verify(message) { + DeleteEntityTypeRequest.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.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: 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.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; /** - * Creates a ListEntityTypesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteEntityTypeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesRequest} ListEntityTypesRequest + * @returns {google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest} DeleteEntityTypeRequest */ - ListEntityTypesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest) + DeleteEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from a ListEntityTypesRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteEntityTypeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ListEntityTypesRequest} message ListEntityTypesRequest + * @param {google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest} message DeleteEntityTypeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListEntityTypesRequest.toObject = function toObject(message, options) { + DeleteEntityTypeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.languageCode = ""; - object.pageSize = 0; - object.pageToken = ""; + object.name = ""; + object.force = false; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - 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; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; /** - * Converts this ListEntityTypesRequest to JSON. + * Converts this DeleteEntityTypeRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest * @instance * @returns {Object.} JSON object */ - ListEntityTypesRequest.prototype.toJSON = function toJSON() { + DeleteEntityTypeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListEntityTypesRequest + * Gets the default type url for DeleteEntityTypeRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListEntityTypesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteEntityTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListEntityTypesRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest"; }; - return ListEntityTypesRequest; + return DeleteEntityTypeRequest; })(); - v3.ListEntityTypesResponse = (function() { - - /** - * Properties of a ListEntityTypesResponse. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListEntityTypesResponse - * @property {Array.|null} [entityTypes] ListEntityTypesResponse entityTypes - * @property {string|null} [nextPageToken] ListEntityTypesResponse nextPageToken - */ + v3.Environments = (function() { /** - * Constructs a new ListEntityTypesResponse. + * Constructs a new Environments service. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListEntityTypesResponse. - * @implements IListEntityTypesResponse + * @classdesc Represents an Environments + * @extends $protobuf.rpc.Service * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesResponse=} [properties] Properties to set + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ - function ListEntityTypesResponse(properties) { - this.entityTypes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function Environments(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - /** - * ListEntityTypesResponse entityTypes. - * @member {Array.} entityTypes - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse - * @instance - */ - ListEntityTypesResponse.prototype.entityTypes = $util.emptyArray; - - /** - * ListEntityTypesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse - * @instance - */ - ListEntityTypesResponse.prototype.nextPageToken = ""; + (Environments.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Environments; /** - * Creates a new ListEntityTypesResponse instance using the specified properties. + * Creates new Environments service using the specified rpc implementation. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.Environments * @static - * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesResponse} ListEntityTypesResponse instance + * @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 {Environments} RPC service. Useful where requests and/or responses are streamed. */ - ListEntityTypesResponse.create = function create(properties) { - return new ListEntityTypesResponse(properties); + Environments.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Encodes the specified ListEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesResponse} message ListEntityTypesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|listEnvironments}. + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @typedef ListEnvironmentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse} [response] ListEnvironmentsResponse */ - ListEntityTypesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.entityTypes != null && message.entityTypes.length) - for (var i = 0; i < message.entityTypes.length; ++i) - $root.google.cloud.dialogflow.cx.v3.EntityType.encode(message.entityTypes[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 ListEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesResponse} message ListEntityTypesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListEnvironments. + * @function listEnvironments + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Environments.ListEnvironmentsCallback} callback Node-style callback called with the error, if any, and ListEnvironmentsResponse + * @returns {undefined} + * @variation 1 */ - ListEntityTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(Environments.prototype.listEnvironments = function listEnvironments(request, callback) { + return this.rpcCall(listEnvironments, $root.google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest, $root.google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse, request, callback); + }, "name", { value: "ListEnvironments" }); /** - * Decodes a ListEntityTypesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesResponse} ListEntityTypesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListEnvironments. + * @function listEnvironments + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListEntityTypesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.entityTypes && message.entityTypes.length)) - message.entityTypes = []; - message.entityTypes.push($root.google.cloud.dialogflow.cx.v3.EntityType.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a ListEntityTypesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesResponse} ListEntityTypesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|getEnvironment}. + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @typedef GetEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Environment} [response] Environment */ - ListEntityTypesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a ListEntityTypesResponse message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls GetEnvironment. + * @function getEnvironment + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Environments.GetEnvironmentCallback} callback Node-style callback called with the error, if any, and Environment + * @returns {undefined} + * @variation 1 */ - ListEntityTypesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.entityTypes != null && message.hasOwnProperty("entityTypes")) { - if (!Array.isArray(message.entityTypes)) - return "entityTypes: array expected"; - for (var i = 0; i < message.entityTypes.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.EntityType.verify(message.entityTypes[i]); - if (error) - return "entityTypes." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + Object.defineProperty(Environments.prototype.getEnvironment = function getEnvironment(request, callback) { + return this.rpcCall(getEnvironment, $root.google.cloud.dialogflow.cx.v3.GetEnvironmentRequest, $root.google.cloud.dialogflow.cx.v3.Environment, request, callback); + }, "name", { value: "GetEnvironment" }); /** - * Creates a ListEntityTypesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesResponse} ListEntityTypesResponse + * Calls GetEnvironment. + * @function getEnvironment + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListEntityTypesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse(); - if (object.entityTypes) { - if (!Array.isArray(object.entityTypes)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ListEntityTypesResponse.entityTypes: array expected"); - message.entityTypes = []; - for (var i = 0; i < object.entityTypes.length; ++i) { - if (typeof object.entityTypes[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ListEntityTypesResponse.entityTypes: object expected"); - message.entityTypes[i] = $root.google.cloud.dialogflow.cx.v3.EntityType.fromObject(object.entityTypes[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; /** - * Creates a plain object from a ListEntityTypesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.ListEntityTypesResponse} message ListEntityTypesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|createEnvironment}. + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @typedef CreateEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ListEntityTypesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.entityTypes = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.entityTypes && message.entityTypes.length) { - object.entityTypes = []; - for (var j = 0; j < message.entityTypes.length; ++j) - object.entityTypes[j] = $root.google.cloud.dialogflow.cx.v3.EntityType.toObject(message.entityTypes[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; /** - * Converts this ListEntityTypesResponse to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse + * Calls CreateEnvironment. + * @function createEnvironment + * @memberof google.cloud.dialogflow.cx.v3.Environments * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dialogflow.cx.v3.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Environments.CreateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - ListEntityTypesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(Environments.prototype.createEnvironment = function createEnvironment(request, callback) { + return this.rpcCall(createEnvironment, $root.google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateEnvironment" }); /** - * Gets the default type url for ListEntityTypesResponse - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls CreateEnvironment. + * @function createEnvironment + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListEntityTypesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListEntityTypesResponse"; - }; - - return ListEntityTypesResponse; - })(); - - v3.GetEntityTypeRequest = (function() { /** - * Properties of a GetEntityTypeRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IGetEntityTypeRequest - * @property {string|null} [name] GetEntityTypeRequest name - * @property {string|null} [languageCode] GetEntityTypeRequest languageCode + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|updateEnvironment}. + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @typedef UpdateEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ /** - * Constructs a new GetEntityTypeRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a GetEntityTypeRequest. - * @implements IGetEntityTypeRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest=} [properties] Properties to set - */ - function GetEntityTypeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetEntityTypeRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest + * Calls UpdateEnvironment. + * @function updateEnvironment + * @memberof google.cloud.dialogflow.cx.v3.Environments * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Environments.UpdateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - GetEntityTypeRequest.prototype.name = ""; + Object.defineProperty(Environments.prototype.updateEnvironment = function updateEnvironment(request, callback) { + return this.rpcCall(updateEnvironment, $root.google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateEnvironment" }); /** - * GetEntityTypeRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest + * Calls UpdateEnvironment. + * @function updateEnvironment + * @memberof google.cloud.dialogflow.cx.v3.Environments * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetEntityTypeRequest.prototype.languageCode = ""; - - /** - * Creates a new GetEntityTypeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GetEntityTypeRequest} GetEntityTypeRequest instance - */ - GetEntityTypeRequest.create = function create(properties) { - return new GetEntityTypeRequest(properties); - }; - - /** - * Encodes the specified GetEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetEntityTypeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest} message GetEntityTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEntityTypeRequest.encode = function encode(message, writer) { - 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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - return writer; - }; - - /** - * Encodes the specified GetEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetEntityTypeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest} message GetEntityTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetEntityTypeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.GetEntityTypeRequest} GetEntityTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEntityTypeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetEntityTypeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.languageCode = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a GetEntityTypeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.GetEntityTypeRequest} GetEntityTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|deleteEnvironment}. + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @typedef DeleteEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - GetEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a GetEntityTypeRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls DeleteEnvironment. + * @function deleteEnvironment + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Environments.DeleteEnvironmentCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - GetEntityTypeRequest.verify = function verify(message) { - if (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.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - return null; - }; + Object.defineProperty(Environments.prototype.deleteEnvironment = function deleteEnvironment(request, callback) { + return this.rpcCall(deleteEnvironment, $root.google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteEnvironment" }); /** - * Creates a GetEntityTypeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GetEntityTypeRequest} GetEntityTypeRequest + * Calls DeleteEnvironment. + * @function deleteEnvironment + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetEntityTypeRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.GetEntityTypeRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - return message; - }; /** - * Creates a plain object from a GetEntityTypeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.GetEntityTypeRequest} message GetEntityTypeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|lookupEnvironmentHistory}. + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @typedef LookupEnvironmentHistoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse} [response] LookupEnvironmentHistoryResponse */ - GetEntityTypeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.languageCode = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - return object; - }; /** - * Converts this GetEntityTypeRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest + * Calls LookupEnvironmentHistory. + * @function lookupEnvironmentHistory + * @memberof google.cloud.dialogflow.cx.v3.Environments * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryRequest} request LookupEnvironmentHistoryRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Environments.LookupEnvironmentHistoryCallback} callback Node-style callback called with the error, if any, and LookupEnvironmentHistoryResponse + * @returns {undefined} + * @variation 1 */ - GetEntityTypeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(Environments.prototype.lookupEnvironmentHistory = function lookupEnvironmentHistory(request, callback) { + return this.rpcCall(lookupEnvironmentHistory, $root.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest, $root.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse, request, callback); + }, "name", { value: "LookupEnvironmentHistory" }); /** - * Gets the default type url for GetEntityTypeRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls LookupEnvironmentHistory. + * @function lookupEnvironmentHistory + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryRequest} request LookupEnvironmentHistoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetEntityTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetEntityTypeRequest"; - }; - - return GetEntityTypeRequest; - })(); - - v3.CreateEntityTypeRequest = (function() { /** - * Properties of a CreateEntityTypeRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface ICreateEntityTypeRequest - * @property {string|null} [parent] CreateEntityTypeRequest parent - * @property {google.cloud.dialogflow.cx.v3.IEntityType|null} [entityType] CreateEntityTypeRequest entityType - * @property {string|null} [languageCode] CreateEntityTypeRequest languageCode + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|runContinuousTest}. + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @typedef RunContinuousTestCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ /** - * Constructs a new CreateEntityTypeRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a CreateEntityTypeRequest. - * @implements ICreateEntityTypeRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest=} [properties] Properties to set + * Calls RunContinuousTest. + * @function runContinuousTest + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestRequest} request RunContinuousTestRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Environments.RunContinuousTestCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - function CreateEntityTypeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Object.defineProperty(Environments.prototype.runContinuousTest = function runContinuousTest(request, callback) { + return this.rpcCall(runContinuousTest, $root.google.cloud.dialogflow.cx.v3.RunContinuousTestRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RunContinuousTest" }); /** - * CreateEntityTypeRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest + * Calls RunContinuousTest. + * @function runContinuousTest + * @memberof google.cloud.dialogflow.cx.v3.Environments * @instance + * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestRequest} request RunContinuousTestRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateEntityTypeRequest.prototype.parent = ""; /** - * CreateEntityTypeRequest entityType. - * @member {google.cloud.dialogflow.cx.v3.IEntityType|null|undefined} entityType - * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest - * @instance + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|listContinuousTestResults}. + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @typedef ListContinuousTestResultsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse} [response] ListContinuousTestResultsResponse */ - CreateEntityTypeRequest.prototype.entityType = null; /** - * CreateEntityTypeRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest + * Calls ListContinuousTestResults. + * @function listContinuousTestResults + * @memberof google.cloud.dialogflow.cx.v3.Environments * @instance + * @param {google.cloud.dialogflow.cx.v3.IListContinuousTestResultsRequest} request ListContinuousTestResultsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Environments.ListContinuousTestResultsCallback} callback Node-style callback called with the error, if any, and ListContinuousTestResultsResponse + * @returns {undefined} + * @variation 1 */ - CreateEntityTypeRequest.prototype.languageCode = ""; + Object.defineProperty(Environments.prototype.listContinuousTestResults = function listContinuousTestResults(request, callback) { + return this.rpcCall(listContinuousTestResults, $root.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest, $root.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse, request, callback); + }, "name", { value: "ListContinuousTestResults" }); /** - * Creates a new CreateEntityTypeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest} CreateEntityTypeRequest instance + * Calls ListContinuousTestResults. + * @function listContinuousTestResults + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListContinuousTestResultsRequest} request ListContinuousTestResultsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateEntityTypeRequest.create = function create(properties) { - return new CreateEntityTypeRequest(properties); - }; /** - * Encodes the specified CreateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest} message CreateEntityTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|deployFlow}. + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @typedef DeployFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - CreateEntityTypeRequest.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.entityType != null && Object.hasOwnProperty.call(message, "entityType")) - $root.google.cloud.dialogflow.cx.v3.EntityType.encode(message.entityType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); - return writer; - }; /** - * Encodes the specified CreateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest} message CreateEntityTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls DeployFlow. + * @function deployFlow + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeployFlowRequest} request DeployFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Environments.DeployFlowCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - CreateEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(Environments.prototype.deployFlow = function deployFlow(request, callback) { + return this.rpcCall(deployFlow, $root.google.cloud.dialogflow.cx.v3.DeployFlowRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeployFlow" }); /** - * Decodes a CreateEntityTypeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest} CreateEntityTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeployFlow. + * @function deployFlow + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeployFlowRequest} request DeployFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateEntityTypeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.entityType = $root.google.cloud.dialogflow.cx.v3.EntityType.decode(reader, reader.uint32()); - break; - } - case 3: { - message.languageCode = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes a CreateEntityTypeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest} CreateEntityTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return Environments; + })(); - /** - * Verifies a CreateEntityTypeRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateEntityTypeRequest.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.entityType != null && message.hasOwnProperty("entityType")) { - var error = $root.google.cloud.dialogflow.cx.v3.EntityType.verify(message.entityType); - if (error) - return "entityType." + error; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - return null; - }; + v3.Environment = (function() { /** - * Creates a CreateEntityTypeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest} CreateEntityTypeRequest + * Properties of an Environment. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IEnvironment + * @property {string|null} [name] Environment name + * @property {string|null} [displayName] Environment displayName + * @property {string|null} [description] Environment description + * @property {Array.|null} [versionConfigs] Environment versionConfigs + * @property {google.protobuf.ITimestamp|null} [updateTime] Environment updateTime + * @property {google.cloud.dialogflow.cx.v3.Environment.ITestCasesConfig|null} [testCasesConfig] Environment testCasesConfig + * @property {google.cloud.dialogflow.cx.v3.Environment.IWebhookConfig|null} [webhookConfig] Environment webhookConfig */ - CreateEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.entityType != null) { - if (typeof object.entityType !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest.entityType: object expected"); - message.entityType = $root.google.cloud.dialogflow.cx.v3.EntityType.fromObject(object.entityType); - } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - return message; - }; /** - * Creates a plain object from a CreateEntityTypeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest} message CreateEntityTypeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Constructs a new Environment. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an Environment. + * @implements IEnvironment + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IEnvironment=} [properties] Properties to set */ - CreateEntityTypeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.entityType = null; - object.languageCode = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.entityType != null && message.hasOwnProperty("entityType")) - object.entityType = $root.google.cloud.dialogflow.cx.v3.EntityType.toObject(message.entityType, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - return object; - }; + function Environment(properties) { + this.versionConfigs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Converts this CreateEntityTypeRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest + * Environment name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.Environment * @instance - * @returns {Object.} JSON object */ - CreateEntityTypeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Environment.prototype.name = ""; /** - * Gets the default type url for CreateEntityTypeRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Environment displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.Environment + * @instance */ - CreateEntityTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest"; - }; - - return CreateEntityTypeRequest; - })(); - - v3.UpdateEntityTypeRequest = (function() { + Environment.prototype.displayName = ""; /** - * Properties of an UpdateEntityTypeRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IUpdateEntityTypeRequest - * @property {google.cloud.dialogflow.cx.v3.IEntityType|null} [entityType] UpdateEntityTypeRequest entityType - * @property {string|null} [languageCode] UpdateEntityTypeRequest languageCode - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEntityTypeRequest updateMask + * Environment description. + * @member {string} description + * @memberof google.cloud.dialogflow.cx.v3.Environment + * @instance */ + Environment.prototype.description = ""; /** - * Constructs a new UpdateEntityTypeRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an UpdateEntityTypeRequest. - * @implements IUpdateEntityTypeRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest=} [properties] Properties to set + * Environment versionConfigs. + * @member {Array.} versionConfigs + * @memberof google.cloud.dialogflow.cx.v3.Environment + * @instance */ - function UpdateEntityTypeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Environment.prototype.versionConfigs = $util.emptyArray; /** - * UpdateEntityTypeRequest entityType. - * @member {google.cloud.dialogflow.cx.v3.IEntityType|null|undefined} entityType - * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest + * Environment updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dialogflow.cx.v3.Environment * @instance */ - UpdateEntityTypeRequest.prototype.entityType = null; + Environment.prototype.updateTime = null; /** - * UpdateEntityTypeRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest + * Environment testCasesConfig. + * @member {google.cloud.dialogflow.cx.v3.Environment.ITestCasesConfig|null|undefined} testCasesConfig + * @memberof google.cloud.dialogflow.cx.v3.Environment * @instance */ - UpdateEntityTypeRequest.prototype.languageCode = ""; + Environment.prototype.testCasesConfig = null; /** - * UpdateEntityTypeRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest + * Environment webhookConfig. + * @member {google.cloud.dialogflow.cx.v3.Environment.IWebhookConfig|null|undefined} webhookConfig + * @memberof google.cloud.dialogflow.cx.v3.Environment * @instance */ - UpdateEntityTypeRequest.prototype.updateMask = null; + Environment.prototype.webhookConfig = null; /** - * Creates a new UpdateEntityTypeRequest instance using the specified properties. + * Creates a new Environment instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.Environment * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest} UpdateEntityTypeRequest instance + * @param {google.cloud.dialogflow.cx.v3.IEnvironment=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Environment} Environment instance */ - UpdateEntityTypeRequest.create = function create(properties) { - return new UpdateEntityTypeRequest(properties); + Environment.create = function create(properties) { + return new Environment(properties); }; /** - * Encodes the specified UpdateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest.verify|verify} messages. + * Encodes the specified Environment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Environment.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.Environment * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest} message UpdateEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IEnvironment} message Environment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateEntityTypeRequest.encode = function encode(message, writer) { + Environment.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) - $root.google.cloud.dialogflow.cx.v3.EntityType.encode(message.entityType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - 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(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.versionConfigs != null && message.versionConfigs.length) + for (var i = 0; i < message.versionConfigs.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Environment.VersionConfig.encode(message.versionConfigs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.testCasesConfig != null && Object.hasOwnProperty.call(message, "testCasesConfig")) + $root.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.encode(message.testCasesConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.webhookConfig != null && Object.hasOwnProperty.call(message, "webhookConfig")) + $root.google.cloud.dialogflow.cx.v3.Environment.WebhookConfig.encode(message.webhookConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest.verify|verify} messages. + * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Environment.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.Environment * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest} message UpdateEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IEnvironment} message Environment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + Environment.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer. + * Decodes an Environment message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.Environment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest} UpdateEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.Environment} Environment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateEntityTypeRequest.decode = function decode(reader, length) { + Environment.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Environment(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.entityType = $root.google.cloud.dialogflow.cx.v3.EntityType.decode(reader, reader.uint32()); + message.name = reader.string(); break; } case 2: { - message.languageCode = reader.string(); + message.displayName = reader.string(); break; } case 3: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.description = reader.string(); + break; + } + case 6: { + if (!(message.versionConfigs && message.versionConfigs.length)) + message.versionConfigs = []; + message.versionConfigs.push($root.google.cloud.dialogflow.cx.v3.Environment.VersionConfig.decode(reader, reader.uint32())); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.testCasesConfig = $root.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.decode(reader, reader.uint32()); + break; + } + case 10: { + message.webhookConfig = $root.google.cloud.dialogflow.cx.v3.Environment.WebhookConfig.decode(reader, reader.uint32()); break; } default: @@ -23943,1169 +25331,286 @@ }; /** - * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes an Environment message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.Environment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest} UpdateEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.Environment} Environment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { + Environment.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateEntityTypeRequest message. + * Verifies an Environment message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.Environment * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateEntityTypeRequest.verify = function verify(message) { + Environment.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entityType != null && message.hasOwnProperty("entityType")) { - var error = $root.google.cloud.dialogflow.cx.v3.EntityType.verify(message.entityType); + 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.versionConfigs != null && message.hasOwnProperty("versionConfigs")) { + if (!Array.isArray(message.versionConfigs)) + return "versionConfigs: array expected"; + for (var i = 0; i < message.versionConfigs.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Environment.VersionConfig.verify(message.versionConfigs[i]); + if (error) + return "versionConfigs." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); if (error) - return "entityType." + error; + return "updateTime." + error; } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (message.testCasesConfig != null && message.hasOwnProperty("testCasesConfig")) { + var error = $root.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.verify(message.testCasesConfig); if (error) - return "updateMask." + error; + return "testCasesConfig." + error; + } + if (message.webhookConfig != null && message.hasOwnProperty("webhookConfig")) { + var error = $root.google.cloud.dialogflow.cx.v3.Environment.WebhookConfig.verify(message.webhookConfig); + if (error) + return "webhookConfig." + error; } return null; }; /** - * Creates an UpdateEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates an Environment message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.Environment * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest} UpdateEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.Environment} Environment */ - UpdateEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest) + Environment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Environment) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest(); - if (object.entityType != null) { - if (typeof object.entityType !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest.entityType: object expected"); - message.entityType = $root.google.cloud.dialogflow.cx.v3.EntityType.fromObject(object.entityType); + var message = new $root.google.cloud.dialogflow.cx.v3.Environment(); + 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.versionConfigs) { + if (!Array.isArray(object.versionConfigs)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Environment.versionConfigs: array expected"); + message.versionConfigs = []; + for (var i = 0; i < object.versionConfigs.length; ++i) { + if (typeof object.versionConfigs[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Environment.versionConfigs: object expected"); + message.versionConfigs[i] = $root.google.cloud.dialogflow.cx.v3.Environment.VersionConfig.fromObject(object.versionConfigs[i]); + } } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Environment.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.testCasesConfig != null) { + if (typeof object.testCasesConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Environment.testCasesConfig: object expected"); + message.testCasesConfig = $root.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.fromObject(object.testCasesConfig); + } + if (object.webhookConfig != null) { + if (typeof object.webhookConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Environment.webhookConfig: object expected"); + message.webhookConfig = $root.google.cloud.dialogflow.cx.v3.Environment.WebhookConfig.fromObject(object.webhookConfig); } return message; }; /** - * Creates a plain object from an UpdateEntityTypeRequest message. Also converts values to other types if specified. + * Creates a plain object from an Environment message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.Environment * @static - * @param {google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest} message UpdateEntityTypeRequest + * @param {google.cloud.dialogflow.cx.v3.Environment} message Environment * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateEntityTypeRequest.toObject = function toObject(message, options) { + Environment.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.versionConfigs = []; if (options.defaults) { - object.entityType = null; - object.languageCode = ""; - object.updateMask = null; + object.name = ""; + object.displayName = ""; + object.description = ""; + object.updateTime = null; + object.testCasesConfig = null; + object.webhookConfig = null; } - if (message.entityType != null && message.hasOwnProperty("entityType")) - object.entityType = $root.google.cloud.dialogflow.cx.v3.EntityType.toObject(message.entityType, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.versionConfigs && message.versionConfigs.length) { + object.versionConfigs = []; + for (var j = 0; j < message.versionConfigs.length; ++j) + object.versionConfigs[j] = $root.google.cloud.dialogflow.cx.v3.Environment.VersionConfig.toObject(message.versionConfigs[j], options); + } + if (message.testCasesConfig != null && message.hasOwnProperty("testCasesConfig")) + object.testCasesConfig = $root.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.toObject(message.testCasesConfig, options); + if (message.webhookConfig != null && message.hasOwnProperty("webhookConfig")) + object.webhookConfig = $root.google.cloud.dialogflow.cx.v3.Environment.WebhookConfig.toObject(message.webhookConfig, options); return object; }; /** - * Converts this UpdateEntityTypeRequest to JSON. + * Converts this Environment to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.Environment * @instance * @returns {Object.} JSON object */ - UpdateEntityTypeRequest.prototype.toJSON = function toJSON() { + Environment.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateEntityTypeRequest + * Gets the default type url for Environment * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.Environment * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateEntityTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Environment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Environment"; }; - return UpdateEntityTypeRequest; - })(); + Environment.VersionConfig = (function() { - v3.DeleteEntityTypeRequest = (function() { + /** + * Properties of a VersionConfig. + * @memberof google.cloud.dialogflow.cx.v3.Environment + * @interface IVersionConfig + * @property {string|null} [version] VersionConfig version + */ - /** - * Properties of a DeleteEntityTypeRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDeleteEntityTypeRequest - * @property {string|null} [name] DeleteEntityTypeRequest name - * @property {boolean|null} [force] DeleteEntityTypeRequest force - */ + /** + * Constructs a new VersionConfig. + * @memberof google.cloud.dialogflow.cx.v3.Environment + * @classdesc Represents a VersionConfig. + * @implements IVersionConfig + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Environment.IVersionConfig=} [properties] Properties to set + */ + function VersionConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new DeleteEntityTypeRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a DeleteEntityTypeRequest. - * @implements IDeleteEntityTypeRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest=} [properties] Properties to set - */ - function DeleteEntityTypeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * VersionConfig version. + * @member {string} version + * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig + * @instance + */ + VersionConfig.prototype.version = ""; - /** - * DeleteEntityTypeRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest - * @instance - */ - DeleteEntityTypeRequest.prototype.name = ""; + /** + * Creates a new VersionConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Environment.IVersionConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Environment.VersionConfig} VersionConfig instance + */ + VersionConfig.create = function create(properties) { + return new VersionConfig(properties); + }; - /** - * DeleteEntityTypeRequest force. - * @member {boolean} force - * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest - * @instance - */ - DeleteEntityTypeRequest.prototype.force = false; + /** + * Encodes the specified VersionConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Environment.VersionConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Environment.IVersionConfig} message VersionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionConfig.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); + return writer; + }; - /** - * Creates a new DeleteEntityTypeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest} DeleteEntityTypeRequest instance - */ - DeleteEntityTypeRequest.create = function create(properties) { - return new DeleteEntityTypeRequest(properties); - }; + /** + * Encodes the specified VersionConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Environment.VersionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Environment.IVersionConfig} message VersionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified DeleteEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest} message DeleteEntityTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteEntityTypeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); - return writer; - }; - - /** - * Encodes the specified DeleteEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest} message DeleteEntityTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest} DeleteEntityTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteEntityTypeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.force = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest} DeleteEntityTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteEntityTypeRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteEntityTypeRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - return null; - }; - - /** - * Creates a DeleteEntityTypeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest} DeleteEntityTypeRequest - */ - DeleteEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); - return message; - }; - - /** - * Creates a plain object from a DeleteEntityTypeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest} message DeleteEntityTypeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteEntityTypeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.force = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - return object; - }; - - /** - * Converts this DeleteEntityTypeRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteEntityTypeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteEntityTypeRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteEntityTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest"; - }; - - return DeleteEntityTypeRequest; - })(); - - v3.Environments = (function() { - - /** - * Constructs a new Environments service. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an Environments - * @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 Environments(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Environments.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Environments; - - /** - * Creates new Environments service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @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 {Environments} RPC service. Useful where requests and/or responses are streamed. - */ - Environments.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|listEnvironments}. - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @typedef ListEnvironmentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse} [response] ListEnvironmentsResponse - */ - - /** - * Calls ListEnvironments. - * @function listEnvironments - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Environments.ListEnvironmentsCallback} callback Node-style callback called with the error, if any, and ListEnvironmentsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.listEnvironments = function listEnvironments(request, callback) { - return this.rpcCall(listEnvironments, $root.google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest, $root.google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse, request, callback); - }, "name", { value: "ListEnvironments" }); - - /** - * Calls ListEnvironments. - * @function listEnvironments - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|getEnvironment}. - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @typedef GetEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Environment} [response] Environment - */ - - /** - * Calls GetEnvironment. - * @function getEnvironment - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Environments.GetEnvironmentCallback} callback Node-style callback called with the error, if any, and Environment - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.getEnvironment = function getEnvironment(request, callback) { - return this.rpcCall(getEnvironment, $root.google.cloud.dialogflow.cx.v3.GetEnvironmentRequest, $root.google.cloud.dialogflow.cx.v3.Environment, request, callback); - }, "name", { value: "GetEnvironment" }); - - /** - * Calls GetEnvironment. - * @function getEnvironment - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|createEnvironment}. - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @typedef CreateEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateEnvironment. - * @function createEnvironment - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Environments.CreateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.createEnvironment = function createEnvironment(request, callback) { - return this.rpcCall(createEnvironment, $root.google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateEnvironment" }); - - /** - * Calls CreateEnvironment. - * @function createEnvironment - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|updateEnvironment}. - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @typedef UpdateEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateEnvironment. - * @function updateEnvironment - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Environments.UpdateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.updateEnvironment = function updateEnvironment(request, callback) { - return this.rpcCall(updateEnvironment, $root.google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateEnvironment" }); - - /** - * Calls UpdateEnvironment. - * @function updateEnvironment - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|deleteEnvironment}. - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @typedef DeleteEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteEnvironment. - * @function deleteEnvironment - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Environments.DeleteEnvironmentCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.deleteEnvironment = function deleteEnvironment(request, callback) { - return this.rpcCall(deleteEnvironment, $root.google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteEnvironment" }); - - /** - * Calls DeleteEnvironment. - * @function deleteEnvironment - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|lookupEnvironmentHistory}. - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @typedef LookupEnvironmentHistoryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse} [response] LookupEnvironmentHistoryResponse - */ - - /** - * Calls LookupEnvironmentHistory. - * @function lookupEnvironmentHistory - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryRequest} request LookupEnvironmentHistoryRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Environments.LookupEnvironmentHistoryCallback} callback Node-style callback called with the error, if any, and LookupEnvironmentHistoryResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.lookupEnvironmentHistory = function lookupEnvironmentHistory(request, callback) { - return this.rpcCall(lookupEnvironmentHistory, $root.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest, $root.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse, request, callback); - }, "name", { value: "LookupEnvironmentHistory" }); - - /** - * Calls LookupEnvironmentHistory. - * @function lookupEnvironmentHistory - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryRequest} request LookupEnvironmentHistoryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|runContinuousTest}. - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @typedef RunContinuousTestCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls RunContinuousTest. - * @function runContinuousTest - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestRequest} request RunContinuousTestRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Environments.RunContinuousTestCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.runContinuousTest = function runContinuousTest(request, callback) { - return this.rpcCall(runContinuousTest, $root.google.cloud.dialogflow.cx.v3.RunContinuousTestRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "RunContinuousTest" }); - - /** - * Calls RunContinuousTest. - * @function runContinuousTest - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestRequest} request RunContinuousTestRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|listContinuousTestResults}. - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @typedef ListContinuousTestResultsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse} [response] ListContinuousTestResultsResponse - */ - - /** - * Calls ListContinuousTestResults. - * @function listContinuousTestResults - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListContinuousTestResultsRequest} request ListContinuousTestResultsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Environments.ListContinuousTestResultsCallback} callback Node-style callback called with the error, if any, and ListContinuousTestResultsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.listContinuousTestResults = function listContinuousTestResults(request, callback) { - return this.rpcCall(listContinuousTestResults, $root.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest, $root.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse, request, callback); - }, "name", { value: "ListContinuousTestResults" }); - - /** - * Calls ListContinuousTestResults. - * @function listContinuousTestResults - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListContinuousTestResultsRequest} request ListContinuousTestResultsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|deployFlow}. - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @typedef DeployFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeployFlow. - * @function deployFlow - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeployFlowRequest} request DeployFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Environments.DeployFlowCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.deployFlow = function deployFlow(request, callback) { - return this.rpcCall(deployFlow, $root.google.cloud.dialogflow.cx.v3.DeployFlowRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeployFlow" }); - - /** - * Calls DeployFlow. - * @function deployFlow - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeployFlowRequest} request DeployFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Environments; - })(); - - v3.Environment = (function() { - - /** - * Properties of an Environment. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IEnvironment - * @property {string|null} [name] Environment name - * @property {string|null} [displayName] Environment displayName - * @property {string|null} [description] Environment description - * @property {Array.|null} [versionConfigs] Environment versionConfigs - * @property {google.protobuf.ITimestamp|null} [updateTime] Environment updateTime - * @property {google.cloud.dialogflow.cx.v3.Environment.ITestCasesConfig|null} [testCasesConfig] Environment testCasesConfig - * @property {google.cloud.dialogflow.cx.v3.Environment.IWebhookConfig|null} [webhookConfig] Environment webhookConfig - */ - - /** - * Constructs a new Environment. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an Environment. - * @implements IEnvironment - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IEnvironment=} [properties] Properties to set - */ - function Environment(properties) { - this.versionConfigs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Environment name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @instance - */ - Environment.prototype.name = ""; - - /** - * Environment displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @instance - */ - Environment.prototype.displayName = ""; - - /** - * Environment description. - * @member {string} description - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @instance - */ - Environment.prototype.description = ""; - - /** - * Environment versionConfigs. - * @member {Array.} versionConfigs - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @instance - */ - Environment.prototype.versionConfigs = $util.emptyArray; - - /** - * Environment updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @instance - */ - Environment.prototype.updateTime = null; - - /** - * Environment testCasesConfig. - * @member {google.cloud.dialogflow.cx.v3.Environment.ITestCasesConfig|null|undefined} testCasesConfig - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @instance - */ - Environment.prototype.testCasesConfig = null; - - /** - * Environment webhookConfig. - * @member {google.cloud.dialogflow.cx.v3.Environment.IWebhookConfig|null|undefined} webhookConfig - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @instance - */ - Environment.prototype.webhookConfig = null; - - /** - * Creates a new Environment instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @static - * @param {google.cloud.dialogflow.cx.v3.IEnvironment=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Environment} Environment instance - */ - Environment.create = function create(properties) { - return new Environment(properties); - }; - - /** - * Encodes the specified Environment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Environment.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @static - * @param {google.cloud.dialogflow.cx.v3.IEnvironment} message Environment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Environment.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.versionConfigs != null && message.versionConfigs.length) - for (var i = 0; i < message.versionConfigs.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Environment.VersionConfig.encode(message.versionConfigs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.testCasesConfig != null && Object.hasOwnProperty.call(message, "testCasesConfig")) - $root.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.encode(message.testCasesConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.webhookConfig != null && Object.hasOwnProperty.call(message, "webhookConfig")) - $root.google.cloud.dialogflow.cx.v3.Environment.WebhookConfig.encode(message.webhookConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Environment.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @static - * @param {google.cloud.dialogflow.cx.v3.IEnvironment} message Environment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Environment.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Environment message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.Environment} Environment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Environment.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Environment(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 6: { - if (!(message.versionConfigs && message.versionConfigs.length)) - message.versionConfigs = []; - message.versionConfigs.push($root.google.cloud.dialogflow.cx.v3.Environment.VersionConfig.decode(reader, reader.uint32())); - break; - } - case 5: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.testCasesConfig = $root.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.decode(reader, reader.uint32()); - break; - } - case 10: { - message.webhookConfig = $root.google.cloud.dialogflow.cx.v3.Environment.WebhookConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Environment message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Environment} Environment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Environment.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Environment message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Environment.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.versionConfigs != null && message.hasOwnProperty("versionConfigs")) { - if (!Array.isArray(message.versionConfigs)) - return "versionConfigs: array expected"; - for (var i = 0; i < message.versionConfigs.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Environment.VersionConfig.verify(message.versionConfigs[i]); - if (error) - return "versionConfigs." + error; - } - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.testCasesConfig != null && message.hasOwnProperty("testCasesConfig")) { - var error = $root.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.verify(message.testCasesConfig); - if (error) - return "testCasesConfig." + error; - } - if (message.webhookConfig != null && message.hasOwnProperty("webhookConfig")) { - var error = $root.google.cloud.dialogflow.cx.v3.Environment.WebhookConfig.verify(message.webhookConfig); - if (error) - return "webhookConfig." + error; - } - return null; - }; - - /** - * Creates an Environment message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Environment} Environment - */ - Environment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Environment) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Environment(); - 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.versionConfigs) { - if (!Array.isArray(object.versionConfigs)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Environment.versionConfigs: array expected"); - message.versionConfigs = []; - for (var i = 0; i < object.versionConfigs.length; ++i) { - if (typeof object.versionConfigs[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Environment.versionConfigs: object expected"); - message.versionConfigs[i] = $root.google.cloud.dialogflow.cx.v3.Environment.VersionConfig.fromObject(object.versionConfigs[i]); - } - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Environment.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.testCasesConfig != null) { - if (typeof object.testCasesConfig !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Environment.testCasesConfig: object expected"); - message.testCasesConfig = $root.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.fromObject(object.testCasesConfig); - } - if (object.webhookConfig != null) { - if (typeof object.webhookConfig !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Environment.webhookConfig: object expected"); - message.webhookConfig = $root.google.cloud.dialogflow.cx.v3.Environment.WebhookConfig.fromObject(object.webhookConfig); - } - return message; - }; - - /** - * Creates a plain object from an Environment message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @static - * @param {google.cloud.dialogflow.cx.v3.Environment} message Environment - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Environment.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.versionConfigs = []; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - object.updateTime = null; - object.testCasesConfig = null; - object.webhookConfig = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.versionConfigs && message.versionConfigs.length) { - object.versionConfigs = []; - for (var j = 0; j < message.versionConfigs.length; ++j) - object.versionConfigs[j] = $root.google.cloud.dialogflow.cx.v3.Environment.VersionConfig.toObject(message.versionConfigs[j], options); - } - if (message.testCasesConfig != null && message.hasOwnProperty("testCasesConfig")) - object.testCasesConfig = $root.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.toObject(message.testCasesConfig, options); - if (message.webhookConfig != null && message.hasOwnProperty("webhookConfig")) - object.webhookConfig = $root.google.cloud.dialogflow.cx.v3.Environment.WebhookConfig.toObject(message.webhookConfig, options); - return object; - }; - - /** - * Converts this Environment to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @instance - * @returns {Object.} JSON object - */ - Environment.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Environment - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Environment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Environment"; - }; - - Environment.VersionConfig = (function() { - - /** - * Properties of a VersionConfig. - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @interface IVersionConfig - * @property {string|null} [version] VersionConfig version - */ - - /** - * Constructs a new VersionConfig. - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @classdesc Represents a VersionConfig. - * @implements IVersionConfig - * @constructor - * @param {google.cloud.dialogflow.cx.v3.Environment.IVersionConfig=} [properties] Properties to set - */ - function VersionConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VersionConfig version. - * @member {string} version - * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig - * @instance - */ - VersionConfig.prototype.version = ""; - - /** - * Creates a new VersionConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig - * @static - * @param {google.cloud.dialogflow.cx.v3.Environment.IVersionConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Environment.VersionConfig} VersionConfig instance - */ - VersionConfig.create = function create(properties) { - return new VersionConfig(properties); - }; - - /** - * Encodes the specified VersionConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Environment.VersionConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig - * @static - * @param {google.cloud.dialogflow.cx.v3.Environment.IVersionConfig} message VersionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VersionConfig.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); - return writer; - }; - - /** - * Encodes the specified VersionConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Environment.VersionConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig - * @static - * @param {google.cloud.dialogflow.cx.v3.Environment.IVersionConfig} message VersionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VersionConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VersionConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.Environment.VersionConfig} VersionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VersionConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Environment.VersionConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.version = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Decodes a VersionConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.Environment.VersionConfig} VersionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Environment.VersionConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** * Decodes a VersionConfig message from the specified reader or buffer, length delimited. @@ -70910,6 +71415,7 @@ * Properties of an AdvancedSettings. * @memberof google.cloud.dialogflow.cx.v3beta1 * @interface IAdvancedSettings + * @property {google.cloud.dialogflow.cx.v3beta1.IGcsDestination|null} [audioExportGcsDestination] AdvancedSettings audioExportGcsDestination * @property {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.ILoggingSettings|null} [loggingSettings] AdvancedSettings loggingSettings */ @@ -70928,6 +71434,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * AdvancedSettings audioExportGcsDestination. + * @member {google.cloud.dialogflow.cx.v3beta1.IGcsDestination|null|undefined} audioExportGcsDestination + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings + * @instance + */ + AdvancedSettings.prototype.audioExportGcsDestination = null; + /** * AdvancedSettings loggingSettings. * @member {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.ILoggingSettings|null|undefined} loggingSettings @@ -70960,6 +71474,8 @@ AdvancedSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.audioExportGcsDestination != null && Object.hasOwnProperty.call(message, "audioExportGcsDestination")) + $root.google.cloud.dialogflow.cx.v3beta1.GcsDestination.encode(message.audioExportGcsDestination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.loggingSettings != null && Object.hasOwnProperty.call(message, "loggingSettings")) $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings.encode(message.loggingSettings, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; @@ -70996,6 +71512,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 2: { + message.audioExportGcsDestination = $root.google.cloud.dialogflow.cx.v3beta1.GcsDestination.decode(reader, reader.uint32()); + break; + } case 6: { message.loggingSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings.decode(reader, reader.uint32()); break; @@ -71035,6 +71555,11 @@ AdvancedSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.audioExportGcsDestination != null && message.hasOwnProperty("audioExportGcsDestination")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.GcsDestination.verify(message.audioExportGcsDestination); + if (error) + return "audioExportGcsDestination." + error; + } if (message.loggingSettings != null && message.hasOwnProperty("loggingSettings")) { var error = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings.verify(message.loggingSettings); if (error) @@ -71055,6 +71580,11 @@ if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings) return object; var message = new $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings(); + if (object.audioExportGcsDestination != null) { + if (typeof object.audioExportGcsDestination !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.audioExportGcsDestination: object expected"); + message.audioExportGcsDestination = $root.google.cloud.dialogflow.cx.v3beta1.GcsDestination.fromObject(object.audioExportGcsDestination); + } if (object.loggingSettings != null) { if (typeof object.loggingSettings !== "object") throw TypeError(".google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.loggingSettings: object expected"); @@ -71076,8 +71606,12 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { + object.audioExportGcsDestination = null; object.loggingSettings = null; + } + if (message.audioExportGcsDestination != null && message.hasOwnProperty("audioExportGcsDestination")) + object.audioExportGcsDestination = $root.google.cloud.dialogflow.cx.v3beta1.GcsDestination.toObject(message.audioExportGcsDestination, options); if (message.loggingSettings != null && message.hasOwnProperty("loggingSettings")) object.loggingSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings.toObject(message.loggingSettings, options); return object; @@ -71339,6 +71873,209 @@ return AdvancedSettings; })(); + v3beta1.GcsDestination = (function() { + + /** + * Properties of a GcsDestination. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IGcsDestination + * @property {string|null} [uri] GcsDestination uri + */ + + /** + * Constructs a new GcsDestination. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a GcsDestination. + * @implements IGcsDestination + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IGcsDestination=} [properties] Properties to set + */ + function GcsDestination(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcsDestination uri. + * @member {string} uri + * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination + * @instance + */ + GcsDestination.prototype.uri = ""; + + /** + * Creates a new GcsDestination instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IGcsDestination=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.GcsDestination} GcsDestination instance + */ + GcsDestination.create = function create(properties) { + return new GcsDestination(properties); + }; + + /** + * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GcsDestination.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IGcsDestination} message GcsDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsDestination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + return writer; + }; + + /** + * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GcsDestination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IGcsDestination} message GcsDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsDestination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcsDestination message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.GcsDestination} GcsDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsDestination.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GcsDestination(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcsDestination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.GcsDestination} GcsDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsDestination.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcsDestination message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcsDestination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + return null; + }; + + /** + * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.GcsDestination} GcsDestination + */ + GcsDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GcsDestination) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.GcsDestination(); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.GcsDestination} message GcsDestination + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcsDestination.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; + }; + + /** + * Converts this GcsDestination to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination + * @instance + * @returns {Object.} JSON object + */ + GcsDestination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcsDestination + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcsDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GcsDestination"; + }; + + return GcsDestination; + })(); + v3beta1.Agents = (function() { /** @@ -71894,6 +72631,7 @@ * @property {boolean|null} [enableSpellCorrection] Agent enableSpellCorrection * @property {boolean|null} [locked] Agent locked * @property {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null} [advancedSettings] Agent advancedSettings + * @property {google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings|null} [textToSpeechSettings] Agent textToSpeechSettings */ /** @@ -72024,6 +72762,14 @@ */ Agent.prototype.advancedSettings = null; + /** + * Agent textToSpeechSettings. + * @member {google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings|null|undefined} textToSpeechSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @instance + */ + Agent.prototype.textToSpeechSettings = null; + /** * Creates a new Agent instance using the specified properties. * @function create @@ -72077,6 +72823,8 @@ $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.encode(message.advancedSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); if (message.locked != null && Object.hasOwnProperty.call(message, "locked")) writer.uint32(/* id 27, wireType 0 =*/216).bool(message.locked); + if (message.textToSpeechSettings != null && Object.hasOwnProperty.call(message, "textToSpeechSettings")) + $root.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.encode(message.textToSpeechSettings, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); return writer; }; @@ -72169,6 +72917,10 @@ message.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.decode(reader, reader.uint32()); break; } + case 31: { + message.textToSpeechSettings = $root.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -72254,6 +73006,11 @@ if (error) return "advancedSettings." + error; } + if (message.textToSpeechSettings != null && message.hasOwnProperty("textToSpeechSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.verify(message.textToSpeechSettings); + if (error) + return "textToSpeechSettings." + error; + } return null; }; @@ -72308,6 +73065,11 @@ throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Agent.advancedSettings: object expected"); message.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.fromObject(object.advancedSettings); } + if (object.textToSpeechSettings != null) { + if (typeof object.textToSpeechSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Agent.textToSpeechSettings: object expected"); + message.textToSpeechSettings = $root.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.fromObject(object.textToSpeechSettings); + } return message; }; @@ -72340,6 +73102,7 @@ object.enableSpellCorrection = false; object.advancedSettings = null; object.locked = false; + object.textToSpeechSettings = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -72372,6 +73135,8 @@ object.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.toObject(message.advancedSettings, options); if (message.locked != null && message.hasOwnProperty("locked")) object.locked = message.locked; + if (message.textToSpeechSettings != null && message.hasOwnProperty("textToSpeechSettings")) + object.textToSpeechSettings = $root.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.toObject(message.textToSpeechSettings, options); return object; }; @@ -75386,391 +76151,71 @@ return AgentValidationResult; })(); - v3beta1.Flows = (function() { - - /** - * Constructs a new Flows service. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a Flows - * @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 Flows(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Flows.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Flows; - - /** - * Creates new Flows service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @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 {Flows} RPC service. Useful where requests and/or responses are streamed. - */ - Flows.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|createFlow}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @typedef CreateFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.Flow} [response] Flow - */ - - /** - * Calls CreateFlow. - * @function createFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest} request CreateFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Flows.CreateFlowCallback} callback Node-style callback called with the error, if any, and Flow - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Flows.prototype.createFlow = function createFlow(request, callback) { - return this.rpcCall(createFlow, $root.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest, $root.google.cloud.dialogflow.cx.v3beta1.Flow, request, callback); - }, "name", { value: "CreateFlow" }); - - /** - * Calls CreateFlow. - * @function createFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest} request CreateFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|deleteFlow}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @typedef DeleteFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteFlow. - * @function deleteFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest} request DeleteFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Flows.DeleteFlowCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Flows.prototype.deleteFlow = function deleteFlow(request, callback) { - return this.rpcCall(deleteFlow, $root.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteFlow" }); - - /** - * Calls DeleteFlow. - * @function deleteFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest} request DeleteFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|listFlows}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @typedef ListFlowsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} [response] ListFlowsResponse - */ - - /** - * Calls ListFlows. - * @function listFlows - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest} request ListFlowsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Flows.ListFlowsCallback} callback Node-style callback called with the error, if any, and ListFlowsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Flows.prototype.listFlows = function listFlows(request, callback) { - return this.rpcCall(listFlows, $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse, request, callback); - }, "name", { value: "ListFlows" }); - - /** - * Calls ListFlows. - * @function listFlows - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest} request ListFlowsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|getFlow}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @typedef GetFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.Flow} [response] Flow - */ - - /** - * Calls GetFlow. - * @function getFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest} request GetFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowCallback} callback Node-style callback called with the error, if any, and Flow - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Flows.prototype.getFlow = function getFlow(request, callback) { - return this.rpcCall(getFlow, $root.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest, $root.google.cloud.dialogflow.cx.v3beta1.Flow, request, callback); - }, "name", { value: "GetFlow" }); - - /** - * Calls GetFlow. - * @function getFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest} request GetFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|updateFlow}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @typedef UpdateFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.Flow} [response] Flow - */ - - /** - * Calls UpdateFlow. - * @function updateFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest} request UpdateFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Flows.UpdateFlowCallback} callback Node-style callback called with the error, if any, and Flow - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Flows.prototype.updateFlow = function updateFlow(request, callback) { - return this.rpcCall(updateFlow, $root.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest, $root.google.cloud.dialogflow.cx.v3beta1.Flow, request, callback); - }, "name", { value: "UpdateFlow" }); - - /** - * Calls UpdateFlow. - * @function updateFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest} request UpdateFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|trainFlow}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @typedef TrainFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls TrainFlow. - * @function trainFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest} request TrainFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Flows.TrainFlowCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Flows.prototype.trainFlow = function trainFlow(request, callback) { - return this.rpcCall(trainFlow, $root.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "TrainFlow" }); - - /** - * Calls TrainFlow. - * @function trainFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest} request TrainFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|validateFlow}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @typedef ValidateFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} [response] FlowValidationResult - */ - - /** - * Calls ValidateFlow. - * @function validateFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest} request ValidateFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Flows.ValidateFlowCallback} callback Node-style callback called with the error, if any, and FlowValidationResult - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Flows.prototype.validateFlow = function validateFlow(request, callback) { - return this.rpcCall(validateFlow, $root.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest, $root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult, request, callback); - }, "name", { value: "ValidateFlow" }); - - /** - * Calls ValidateFlow. - * @function validateFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest} request ValidateFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|getFlowValidationResult}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @typedef GetFlowValidationResultCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} [response] FlowValidationResult - */ - - /** - * Calls GetFlowValidationResult. - * @function getFlowValidationResult - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest} request GetFlowValidationResultRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowValidationResultCallback} callback Node-style callback called with the error, if any, and FlowValidationResult - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Flows.prototype.getFlowValidationResult = function getFlowValidationResult(request, callback) { - return this.rpcCall(getFlowValidationResult, $root.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest, $root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult, request, callback); - }, "name", { value: "GetFlowValidationResult" }); - - /** - * Calls GetFlowValidationResult. - * @function getFlowValidationResult - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest} request GetFlowValidationResultRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|importFlow}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @typedef ImportFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls ImportFlow. - * @function importFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest} request ImportFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Flows.ImportFlowCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Flows.prototype.importFlow = function importFlow(request, callback) { - return this.rpcCall(importFlow, $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ImportFlow" }); - - /** - * Calls ImportFlow. - * @function importFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest} request ImportFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|exportFlow}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @typedef ExportFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls ExportFlow. - * @function exportFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest} request ExportFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Flows.ExportFlowCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Flows.prototype.exportFlow = function exportFlow(request, callback) { - return this.rpcCall(exportFlow, $root.google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ExportFlow" }); - - /** - * Calls ExportFlow. - * @function exportFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest} request ExportFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * AudioEncoding enum. + * @name google.cloud.dialogflow.cx.v3beta1.AudioEncoding + * @enum {number} + * @property {number} AUDIO_ENCODING_UNSPECIFIED=0 AUDIO_ENCODING_UNSPECIFIED value + * @property {number} AUDIO_ENCODING_LINEAR_16=1 AUDIO_ENCODING_LINEAR_16 value + * @property {number} AUDIO_ENCODING_FLAC=2 AUDIO_ENCODING_FLAC value + * @property {number} AUDIO_ENCODING_MULAW=3 AUDIO_ENCODING_MULAW value + * @property {number} AUDIO_ENCODING_AMR=4 AUDIO_ENCODING_AMR value + * @property {number} AUDIO_ENCODING_AMR_WB=5 AUDIO_ENCODING_AMR_WB value + * @property {number} AUDIO_ENCODING_OGG_OPUS=6 AUDIO_ENCODING_OGG_OPUS value + * @property {number} AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE=7 AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE value + */ + v3beta1.AudioEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AUDIO_ENCODING_UNSPECIFIED"] = 0; + values[valuesById[1] = "AUDIO_ENCODING_LINEAR_16"] = 1; + values[valuesById[2] = "AUDIO_ENCODING_FLAC"] = 2; + values[valuesById[3] = "AUDIO_ENCODING_MULAW"] = 3; + values[valuesById[4] = "AUDIO_ENCODING_AMR"] = 4; + values[valuesById[5] = "AUDIO_ENCODING_AMR_WB"] = 5; + values[valuesById[6] = "AUDIO_ENCODING_OGG_OPUS"] = 6; + values[valuesById[7] = "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE"] = 7; + return values; + })(); - return Flows; + /** + * SpeechModelVariant enum. + * @name google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant + * @enum {number} + * @property {number} SPEECH_MODEL_VARIANT_UNSPECIFIED=0 SPEECH_MODEL_VARIANT_UNSPECIFIED value + * @property {number} USE_BEST_AVAILABLE=1 USE_BEST_AVAILABLE value + * @property {number} USE_STANDARD=2 USE_STANDARD value + * @property {number} USE_ENHANCED=3 USE_ENHANCED value + */ + v3beta1.SpeechModelVariant = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SPEECH_MODEL_VARIANT_UNSPECIFIED"] = 0; + values[valuesById[1] = "USE_BEST_AVAILABLE"] = 1; + values[valuesById[2] = "USE_STANDARD"] = 2; + values[valuesById[3] = "USE_ENHANCED"] = 3; + return values; })(); - v3beta1.NluSettings = (function() { + v3beta1.SpeechWordInfo = (function() { /** - * Properties of a NluSettings. + * Properties of a SpeechWordInfo. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface INluSettings - * @property {google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType|null} [modelType] NluSettings modelType - * @property {number|null} [classificationThreshold] NluSettings classificationThreshold - * @property {google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode|null} [modelTrainingMode] NluSettings modelTrainingMode + * @interface ISpeechWordInfo + * @property {string|null} [word] SpeechWordInfo word + * @property {google.protobuf.IDuration|null} [startOffset] SpeechWordInfo startOffset + * @property {google.protobuf.IDuration|null} [endOffset] SpeechWordInfo endOffset + * @property {number|null} [confidence] SpeechWordInfo confidence */ /** - * Constructs a new NluSettings. + * Constructs a new SpeechWordInfo. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a NluSettings. - * @implements INluSettings + * @classdesc Represents a SpeechWordInfo. + * @implements ISpeechWordInfo * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.INluSettings=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo=} [properties] Properties to set */ - function NluSettings(properties) { + function SpeechWordInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -75778,103 +76223,117 @@ } /** - * NluSettings modelType. - * @member {google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType} modelType - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * SpeechWordInfo word. + * @member {string} word + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo * @instance */ - NluSettings.prototype.modelType = 0; + SpeechWordInfo.prototype.word = ""; /** - * NluSettings classificationThreshold. - * @member {number} classificationThreshold - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * SpeechWordInfo startOffset. + * @member {google.protobuf.IDuration|null|undefined} startOffset + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo * @instance */ - NluSettings.prototype.classificationThreshold = 0; + SpeechWordInfo.prototype.startOffset = null; /** - * NluSettings modelTrainingMode. - * @member {google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode} modelTrainingMode - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * SpeechWordInfo endOffset. + * @member {google.protobuf.IDuration|null|undefined} endOffset + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo * @instance */ - NluSettings.prototype.modelTrainingMode = 0; + SpeechWordInfo.prototype.endOffset = null; /** - * Creates a new NluSettings instance using the specified properties. + * SpeechWordInfo confidence. + * @member {number} confidence + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @instance + */ + SpeechWordInfo.prototype.confidence = 0; + + /** + * Creates a new SpeechWordInfo instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo * @static - * @param {google.cloud.dialogflow.cx.v3beta1.INluSettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.NluSettings} NluSettings instance + * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} SpeechWordInfo instance */ - NluSettings.create = function create(properties) { - return new NluSettings(properties); + SpeechWordInfo.create = function create(properties) { + return new SpeechWordInfo(properties); }; /** - * Encodes the specified NluSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.NluSettings.verify|verify} messages. + * Encodes the specified SpeechWordInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo * @static - * @param {google.cloud.dialogflow.cx.v3beta1.INluSettings} message NluSettings message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo} message SpeechWordInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NluSettings.encode = function encode(message, writer) { + SpeechWordInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.modelType != null && Object.hasOwnProperty.call(message, "modelType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.modelType); - if (message.classificationThreshold != null && Object.hasOwnProperty.call(message, "classificationThreshold")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.classificationThreshold); - if (message.modelTrainingMode != null && Object.hasOwnProperty.call(message, "modelTrainingMode")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.modelTrainingMode); + if (message.startOffset != null && Object.hasOwnProperty.call(message, "startOffset")) + $root.google.protobuf.Duration.encode(message.startOffset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset")) + $root.google.protobuf.Duration.encode(message.endOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.word != null && Object.hasOwnProperty.call(message, "word")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.word); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence); return writer; }; /** - * Encodes the specified NluSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.NluSettings.verify|verify} messages. + * Encodes the specified SpeechWordInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo * @static - * @param {google.cloud.dialogflow.cx.v3beta1.INluSettings} message NluSettings message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo} message SpeechWordInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NluSettings.encodeDelimited = function encodeDelimited(message, writer) { + SpeechWordInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NluSettings message from the specified reader or buffer. + * Decodes a SpeechWordInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.NluSettings} NluSettings + * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} SpeechWordInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NluSettings.decode = function decode(reader, length) { + SpeechWordInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.NluSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 3: { + message.word = reader.string(); + break; + } case 1: { - message.modelType = reader.int32(); + message.startOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } - case 3: { - message.classificationThreshold = reader.float(); + case 2: { + message.endOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } case 4: { - message.modelTrainingMode = reader.int32(); + message.confidence = reader.float(); break; } default: @@ -75886,228 +76345,164 @@ }; /** - * Decodes a NluSettings message from the specified reader or buffer, length delimited. + * Decodes a SpeechWordInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.NluSettings} NluSettings + * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} SpeechWordInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NluSettings.decodeDelimited = function decodeDelimited(reader) { + SpeechWordInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NluSettings message. + * Verifies a SpeechWordInfo message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NluSettings.verify = function verify(message) { + SpeechWordInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.modelType != null && message.hasOwnProperty("modelType")) - switch (message.modelType) { - default: - return "modelType: enum value expected"; - case 0: - case 1: - case 3: - break; - } - if (message.classificationThreshold != null && message.hasOwnProperty("classificationThreshold")) - if (typeof message.classificationThreshold !== "number") - return "classificationThreshold: number expected"; - if (message.modelTrainingMode != null && message.hasOwnProperty("modelTrainingMode")) - switch (message.modelTrainingMode) { - default: - return "modelTrainingMode: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.word != null && message.hasOwnProperty("word")) + if (!$util.isString(message.word)) + return "word: string expected"; + if (message.startOffset != null && message.hasOwnProperty("startOffset")) { + var error = $root.google.protobuf.Duration.verify(message.startOffset); + if (error) + return "startOffset." + error; + } + if (message.endOffset != null && message.hasOwnProperty("endOffset")) { + var error = $root.google.protobuf.Duration.verify(message.endOffset); + if (error) + return "endOffset." + error; + } + if (message.confidence != null && message.hasOwnProperty("confidence")) + if (typeof message.confidence !== "number") + return "confidence: number expected"; return null; }; /** - * Creates a NluSettings message from a plain object. Also converts values to their respective internal types. + * Creates a SpeechWordInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.NluSettings} NluSettings + * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} SpeechWordInfo */ - NluSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.NluSettings) + SpeechWordInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.NluSettings(); - switch (object.modelType) { - default: - if (typeof object.modelType === "number") { - message.modelType = object.modelType; - break; - } - break; - case "MODEL_TYPE_UNSPECIFIED": - case 0: - message.modelType = 0; - break; - case "MODEL_TYPE_STANDARD": - case 1: - message.modelType = 1; - break; - case "MODEL_TYPE_ADVANCED": - case 3: - message.modelType = 3; - break; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo(); + if (object.word != null) + message.word = String(object.word); + if (object.startOffset != null) { + if (typeof object.startOffset !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.startOffset: object expected"); + message.startOffset = $root.google.protobuf.Duration.fromObject(object.startOffset); } - if (object.classificationThreshold != null) - message.classificationThreshold = Number(object.classificationThreshold); - switch (object.modelTrainingMode) { - default: - if (typeof object.modelTrainingMode === "number") { - message.modelTrainingMode = object.modelTrainingMode; - break; - } - break; - case "MODEL_TRAINING_MODE_UNSPECIFIED": - case 0: - message.modelTrainingMode = 0; - break; - case "MODEL_TRAINING_MODE_AUTOMATIC": - case 1: - message.modelTrainingMode = 1; - break; - case "MODEL_TRAINING_MODE_MANUAL": - case 2: - message.modelTrainingMode = 2; - break; + if (object.endOffset != null) { + if (typeof object.endOffset !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.endOffset: object expected"); + message.endOffset = $root.google.protobuf.Duration.fromObject(object.endOffset); } + if (object.confidence != null) + message.confidence = Number(object.confidence); return message; }; /** - * Creates a plain object from a NluSettings message. Also converts values to other types if specified. + * Creates a plain object from a SpeechWordInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo * @static - * @param {google.cloud.dialogflow.cx.v3beta1.NluSettings} message NluSettings + * @param {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} message SpeechWordInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NluSettings.toObject = function toObject(message, options) { + SpeechWordInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.modelType = options.enums === String ? "MODEL_TYPE_UNSPECIFIED" : 0; - object.classificationThreshold = 0; - object.modelTrainingMode = options.enums === String ? "MODEL_TRAINING_MODE_UNSPECIFIED" : 0; + object.startOffset = null; + object.endOffset = null; + object.word = ""; + object.confidence = 0; } - if (message.modelType != null && message.hasOwnProperty("modelType")) - object.modelType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType[message.modelType] === undefined ? message.modelType : $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType[message.modelType] : message.modelType; - if (message.classificationThreshold != null && message.hasOwnProperty("classificationThreshold")) - object.classificationThreshold = options.json && !isFinite(message.classificationThreshold) ? String(message.classificationThreshold) : message.classificationThreshold; - if (message.modelTrainingMode != null && message.hasOwnProperty("modelTrainingMode")) - object.modelTrainingMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode[message.modelTrainingMode] === undefined ? message.modelTrainingMode : $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode[message.modelTrainingMode] : message.modelTrainingMode; + if (message.startOffset != null && message.hasOwnProperty("startOffset")) + object.startOffset = $root.google.protobuf.Duration.toObject(message.startOffset, options); + if (message.endOffset != null && message.hasOwnProperty("endOffset")) + object.endOffset = $root.google.protobuf.Duration.toObject(message.endOffset, options); + if (message.word != null && message.hasOwnProperty("word")) + object.word = message.word; + if (message.confidence != null && message.hasOwnProperty("confidence")) + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; return object; }; /** - * Converts this NluSettings to JSON. + * Converts this SpeechWordInfo to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo * @instance * @returns {Object.} JSON object */ - NluSettings.prototype.toJSON = function toJSON() { + SpeechWordInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for NluSettings + * Gets the default type url for SpeechWordInfo * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - NluSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SpeechWordInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.NluSettings"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo"; }; - /** - * ModelType enum. - * @name google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType - * @enum {number} - * @property {number} MODEL_TYPE_UNSPECIFIED=0 MODEL_TYPE_UNSPECIFIED value - * @property {number} MODEL_TYPE_STANDARD=1 MODEL_TYPE_STANDARD value - * @property {number} MODEL_TYPE_ADVANCED=3 MODEL_TYPE_ADVANCED value - */ - NluSettings.ModelType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODEL_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MODEL_TYPE_STANDARD"] = 1; - values[valuesById[3] = "MODEL_TYPE_ADVANCED"] = 3; - return values; - })(); - - /** - * ModelTrainingMode enum. - * @name google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode - * @enum {number} - * @property {number} MODEL_TRAINING_MODE_UNSPECIFIED=0 MODEL_TRAINING_MODE_UNSPECIFIED value - * @property {number} MODEL_TRAINING_MODE_AUTOMATIC=1 MODEL_TRAINING_MODE_AUTOMATIC value - * @property {number} MODEL_TRAINING_MODE_MANUAL=2 MODEL_TRAINING_MODE_MANUAL value - */ - NluSettings.ModelTrainingMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODEL_TRAINING_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MODEL_TRAINING_MODE_AUTOMATIC"] = 1; - values[valuesById[2] = "MODEL_TRAINING_MODE_MANUAL"] = 2; - return values; - })(); - - return NluSettings; + return SpeechWordInfo; })(); - v3beta1.Flow = (function() { + v3beta1.InputAudioConfig = (function() { /** - * Properties of a Flow. + * Properties of an InputAudioConfig. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IFlow - * @property {string|null} [name] Flow name - * @property {string|null} [displayName] Flow displayName - * @property {string|null} [description] Flow description - * @property {Array.|null} [transitionRoutes] Flow transitionRoutes - * @property {Array.|null} [eventHandlers] Flow eventHandlers - * @property {Array.|null} [transitionRouteGroups] Flow transitionRouteGroups - * @property {google.cloud.dialogflow.cx.v3beta1.INluSettings|null} [nluSettings] Flow nluSettings + * @interface IInputAudioConfig + * @property {google.cloud.dialogflow.cx.v3beta1.AudioEncoding|null} [audioEncoding] InputAudioConfig audioEncoding + * @property {number|null} [sampleRateHertz] InputAudioConfig sampleRateHertz + * @property {boolean|null} [enableWordInfo] InputAudioConfig enableWordInfo + * @property {Array.|null} [phraseHints] InputAudioConfig phraseHints + * @property {string|null} [model] InputAudioConfig model + * @property {google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant|null} [modelVariant] InputAudioConfig modelVariant + * @property {boolean|null} [singleUtterance] InputAudioConfig singleUtterance */ /** - * Constructs a new Flow. + * Constructs a new InputAudioConfig. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a Flow. - * @implements IFlow + * @classdesc Represents an InputAudioConfig. + * @implements IInputAudioConfig * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IFlow=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig=} [properties] Properties to set */ - function Flow(properties) { - this.transitionRoutes = []; - this.eventHandlers = []; - this.transitionRouteGroups = []; + function InputAudioConfig(properties) { + this.phraseHints = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -76115,168 +76510,162 @@ } /** - * Flow name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * InputAudioConfig audioEncoding. + * @member {google.cloud.dialogflow.cx.v3beta1.AudioEncoding} audioEncoding + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @instance */ - Flow.prototype.name = ""; + InputAudioConfig.prototype.audioEncoding = 0; /** - * Flow displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * InputAudioConfig sampleRateHertz. + * @member {number} sampleRateHertz + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @instance */ - Flow.prototype.displayName = ""; + InputAudioConfig.prototype.sampleRateHertz = 0; /** - * Flow description. - * @member {string} description - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * InputAudioConfig enableWordInfo. + * @member {boolean} enableWordInfo + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @instance */ - Flow.prototype.description = ""; + InputAudioConfig.prototype.enableWordInfo = false; /** - * Flow transitionRoutes. - * @member {Array.} transitionRoutes - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * InputAudioConfig phraseHints. + * @member {Array.} phraseHints + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @instance */ - Flow.prototype.transitionRoutes = $util.emptyArray; + InputAudioConfig.prototype.phraseHints = $util.emptyArray; /** - * Flow eventHandlers. - * @member {Array.} eventHandlers - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * InputAudioConfig model. + * @member {string} model + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @instance */ - Flow.prototype.eventHandlers = $util.emptyArray; + InputAudioConfig.prototype.model = ""; /** - * Flow transitionRouteGroups. - * @member {Array.} transitionRouteGroups - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * InputAudioConfig modelVariant. + * @member {google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant} modelVariant + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @instance */ - Flow.prototype.transitionRouteGroups = $util.emptyArray; + InputAudioConfig.prototype.modelVariant = 0; /** - * Flow nluSettings. - * @member {google.cloud.dialogflow.cx.v3beta1.INluSettings|null|undefined} nluSettings - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * InputAudioConfig singleUtterance. + * @member {boolean} singleUtterance + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @instance */ - Flow.prototype.nluSettings = null; + InputAudioConfig.prototype.singleUtterance = false; /** - * Creates a new Flow instance using the specified properties. + * Creates a new InputAudioConfig instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IFlow=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Flow} Flow instance + * @param {google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} InputAudioConfig instance */ - Flow.create = function create(properties) { - return new Flow(properties); + InputAudioConfig.create = function create(properties) { + return new InputAudioConfig(properties); }; /** - * Encodes the specified Flow message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Flow.verify|verify} messages. + * Encodes the specified InputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IFlow} message Flow message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig} message InputAudioConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Flow.encode = function encode(message, writer) { + InputAudioConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.transitionRoutes != null && message.transitionRoutes.length) - for (var i = 0; i < message.transitionRoutes.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.encode(message.transitionRoutes[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.eventHandlers != null && message.eventHandlers.length) - for (var i = 0; i < message.eventHandlers.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.encode(message.eventHandlers[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.nluSettings != null && Object.hasOwnProperty.call(message, "nluSettings")) - $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.encode(message.nluSettings, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.transitionRouteGroups != null && message.transitionRouteGroups.length) - for (var i = 0; i < message.transitionRouteGroups.length; ++i) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.transitionRouteGroups[i]); + if (message.audioEncoding != null && Object.hasOwnProperty.call(message, "audioEncoding")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.audioEncoding); + if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sampleRateHertz); + if (message.phraseHints != null && message.phraseHints.length) + for (var i = 0; i < message.phraseHints.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.phraseHints[i]); + if (message.model != null && Object.hasOwnProperty.call(message, "model")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.model); + if (message.singleUtterance != null && Object.hasOwnProperty.call(message, "singleUtterance")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.singleUtterance); + if (message.modelVariant != null && Object.hasOwnProperty.call(message, "modelVariant")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.modelVariant); + if (message.enableWordInfo != null && Object.hasOwnProperty.call(message, "enableWordInfo")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.enableWordInfo); return writer; }; /** - * Encodes the specified Flow message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Flow.verify|verify} messages. + * Encodes the specified InputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IFlow} message Flow message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig} message InputAudioConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Flow.encodeDelimited = function encodeDelimited(message, writer) { + InputAudioConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Flow message from the specified reader or buffer. + * Decodes an InputAudioConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Flow} Flow + * @returns {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} InputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Flow.decode = function decode(reader, length) { + InputAudioConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Flow(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.InputAudioConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.audioEncoding = reader.int32(); break; } case 2: { - message.displayName = reader.string(); + message.sampleRateHertz = reader.int32(); break; } - case 3: { - message.description = reader.string(); + case 13: { + message.enableWordInfo = reader.bool(); break; } case 4: { - if (!(message.transitionRoutes && message.transitionRoutes.length)) - message.transitionRoutes = []; - message.transitionRoutes.push($root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.decode(reader, reader.uint32())); + if (!(message.phraseHints && message.phraseHints.length)) + message.phraseHints = []; + message.phraseHints.push(reader.string()); break; } - case 10: { - if (!(message.eventHandlers && message.eventHandlers.length)) - message.eventHandlers = []; - message.eventHandlers.push($root.google.cloud.dialogflow.cx.v3beta1.EventHandler.decode(reader, reader.uint32())); + case 7: { + message.model = reader.string(); break; } - case 15: { - if (!(message.transitionRouteGroups && message.transitionRouteGroups.length)) - message.transitionRouteGroups = []; - message.transitionRouteGroups.push(reader.string()); + case 10: { + message.modelVariant = reader.int32(); break; } - case 11: { - message.nluSettings = $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.decode(reader, reader.uint32()); + case 8: { + message.singleUtterance = reader.bool(); break; } default: @@ -76288,226 +76677,281 @@ }; /** - * Decodes a Flow message from the specified reader or buffer, length delimited. + * Decodes an InputAudioConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Flow} Flow + * @returns {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} InputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Flow.decodeDelimited = function decodeDelimited(reader) { + InputAudioConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Flow message. + * Verifies an InputAudioConfig message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Flow.verify = function verify(message) { + InputAudioConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.transitionRoutes != null && message.hasOwnProperty("transitionRoutes")) { - if (!Array.isArray(message.transitionRoutes)) - return "transitionRoutes: array expected"; - for (var i = 0; i < message.transitionRoutes.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify(message.transitionRoutes[i]); - if (error) - return "transitionRoutes." + error; + if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) + switch (message.audioEncoding) { + default: + return "audioEncoding: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; } + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + if (!$util.isInteger(message.sampleRateHertz)) + return "sampleRateHertz: integer expected"; + if (message.enableWordInfo != null && message.hasOwnProperty("enableWordInfo")) + if (typeof message.enableWordInfo !== "boolean") + return "enableWordInfo: boolean expected"; + if (message.phraseHints != null && message.hasOwnProperty("phraseHints")) { + if (!Array.isArray(message.phraseHints)) + return "phraseHints: array expected"; + for (var i = 0; i < message.phraseHints.length; ++i) + if (!$util.isString(message.phraseHints[i])) + return "phraseHints: string[] expected"; } - if (message.eventHandlers != null && message.hasOwnProperty("eventHandlers")) { - if (!Array.isArray(message.eventHandlers)) - return "eventHandlers: array expected"; - for (var i = 0; i < message.eventHandlers.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.verify(message.eventHandlers[i]); - if (error) - return "eventHandlers." + error; + if (message.model != null && message.hasOwnProperty("model")) + if (!$util.isString(message.model)) + return "model: string expected"; + if (message.modelVariant != null && message.hasOwnProperty("modelVariant")) + switch (message.modelVariant) { + default: + return "modelVariant: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } - } - if (message.transitionRouteGroups != null && message.hasOwnProperty("transitionRouteGroups")) { - if (!Array.isArray(message.transitionRouteGroups)) - return "transitionRouteGroups: array expected"; - for (var i = 0; i < message.transitionRouteGroups.length; ++i) - if (!$util.isString(message.transitionRouteGroups[i])) - return "transitionRouteGroups: string[] expected"; - } - if (message.nluSettings != null && message.hasOwnProperty("nluSettings")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.verify(message.nluSettings); - if (error) - return "nluSettings." + error; - } + if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) + if (typeof message.singleUtterance !== "boolean") + return "singleUtterance: boolean expected"; return null; }; /** - * Creates a Flow message from a plain object. Also converts values to their respective internal types. + * Creates an InputAudioConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Flow} Flow + * @returns {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} InputAudioConfig */ - Flow.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Flow) + InputAudioConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.InputAudioConfig) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Flow(); - 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.transitionRoutes) { - if (!Array.isArray(object.transitionRoutes)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.transitionRoutes: array expected"); - message.transitionRoutes = []; - for (var i = 0; i < object.transitionRoutes.length; ++i) { - if (typeof object.transitionRoutes[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.transitionRoutes: object expected"); - message.transitionRoutes[i] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.fromObject(object.transitionRoutes[i]); - } - } - if (object.eventHandlers) { - if (!Array.isArray(object.eventHandlers)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.eventHandlers: array expected"); - message.eventHandlers = []; - for (var i = 0; i < object.eventHandlers.length; ++i) { - if (typeof object.eventHandlers[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.eventHandlers: object expected"); - message.eventHandlers[i] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.fromObject(object.eventHandlers[i]); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.InputAudioConfig(); + switch (object.audioEncoding) { + default: + if (typeof object.audioEncoding === "number") { + message.audioEncoding = object.audioEncoding; + break; } + break; + case "AUDIO_ENCODING_UNSPECIFIED": + case 0: + message.audioEncoding = 0; + break; + case "AUDIO_ENCODING_LINEAR_16": + case 1: + message.audioEncoding = 1; + break; + case "AUDIO_ENCODING_FLAC": + case 2: + message.audioEncoding = 2; + break; + case "AUDIO_ENCODING_MULAW": + case 3: + message.audioEncoding = 3; + break; + case "AUDIO_ENCODING_AMR": + case 4: + message.audioEncoding = 4; + break; + case "AUDIO_ENCODING_AMR_WB": + case 5: + message.audioEncoding = 5; + break; + case "AUDIO_ENCODING_OGG_OPUS": + case 6: + message.audioEncoding = 6; + break; + case "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE": + case 7: + message.audioEncoding = 7; + break; } - if (object.transitionRouteGroups) { - if (!Array.isArray(object.transitionRouteGroups)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.transitionRouteGroups: array expected"); - message.transitionRouteGroups = []; - for (var i = 0; i < object.transitionRouteGroups.length; ++i) - message.transitionRouteGroups[i] = String(object.transitionRouteGroups[i]); + if (object.sampleRateHertz != null) + message.sampleRateHertz = object.sampleRateHertz | 0; + if (object.enableWordInfo != null) + message.enableWordInfo = Boolean(object.enableWordInfo); + if (object.phraseHints) { + if (!Array.isArray(object.phraseHints)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.phraseHints: array expected"); + message.phraseHints = []; + for (var i = 0; i < object.phraseHints.length; ++i) + message.phraseHints[i] = String(object.phraseHints[i]); } - if (object.nluSettings != null) { - if (typeof object.nluSettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.nluSettings: object expected"); - message.nluSettings = $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.fromObject(object.nluSettings); + if (object.model != null) + message.model = String(object.model); + switch (object.modelVariant) { + default: + if (typeof object.modelVariant === "number") { + message.modelVariant = object.modelVariant; + break; + } + break; + case "SPEECH_MODEL_VARIANT_UNSPECIFIED": + case 0: + message.modelVariant = 0; + break; + case "USE_BEST_AVAILABLE": + case 1: + message.modelVariant = 1; + break; + case "USE_STANDARD": + case 2: + message.modelVariant = 2; + break; + case "USE_ENHANCED": + case 3: + message.modelVariant = 3; + break; } + if (object.singleUtterance != null) + message.singleUtterance = Boolean(object.singleUtterance); return message; }; /** - * Creates a plain object from a Flow message. Also converts values to other types if specified. + * Creates a plain object from an InputAudioConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Flow} message Flow + * @param {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} message InputAudioConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Flow.toObject = function toObject(message, options) { + InputAudioConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.transitionRoutes = []; - object.eventHandlers = []; - object.transitionRouteGroups = []; - } + if (options.arrays || options.defaults) + object.phraseHints = []; if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - object.nluSettings = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.transitionRoutes && message.transitionRoutes.length) { - object.transitionRoutes = []; - for (var j = 0; j < message.transitionRoutes.length; ++j) - object.transitionRoutes[j] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.toObject(message.transitionRoutes[j], options); - } - if (message.eventHandlers && message.eventHandlers.length) { - object.eventHandlers = []; - for (var j = 0; j < message.eventHandlers.length; ++j) - object.eventHandlers[j] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.toObject(message.eventHandlers[j], options); + object.audioEncoding = options.enums === String ? "AUDIO_ENCODING_UNSPECIFIED" : 0; + object.sampleRateHertz = 0; + object.model = ""; + object.singleUtterance = false; + object.modelVariant = options.enums === String ? "SPEECH_MODEL_VARIANT_UNSPECIFIED" : 0; + object.enableWordInfo = false; } - if (message.nluSettings != null && message.hasOwnProperty("nluSettings")) - object.nluSettings = $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.toObject(message.nluSettings, options); - if (message.transitionRouteGroups && message.transitionRouteGroups.length) { - object.transitionRouteGroups = []; - for (var j = 0; j < message.transitionRouteGroups.length; ++j) - object.transitionRouteGroups[j] = message.transitionRouteGroups[j]; + if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) + object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.AudioEncoding[message.audioEncoding] === undefined ? message.audioEncoding : $root.google.cloud.dialogflow.cx.v3beta1.AudioEncoding[message.audioEncoding] : message.audioEncoding; + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + object.sampleRateHertz = message.sampleRateHertz; + if (message.phraseHints && message.phraseHints.length) { + object.phraseHints = []; + for (var j = 0; j < message.phraseHints.length; ++j) + object.phraseHints[j] = message.phraseHints[j]; } + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) + object.singleUtterance = message.singleUtterance; + if (message.modelVariant != null && message.hasOwnProperty("modelVariant")) + object.modelVariant = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant[message.modelVariant] === undefined ? message.modelVariant : $root.google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant[message.modelVariant] : message.modelVariant; + if (message.enableWordInfo != null && message.hasOwnProperty("enableWordInfo")) + object.enableWordInfo = message.enableWordInfo; return object; }; /** - * Converts this Flow to JSON. + * Converts this InputAudioConfig to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @instance * @returns {Object.} JSON object */ - Flow.prototype.toJSON = function toJSON() { + InputAudioConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Flow + * Gets the default type url for InputAudioConfig * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Flow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + InputAudioConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Flow"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.InputAudioConfig"; }; - return Flow; + return InputAudioConfig; })(); - v3beta1.CreateFlowRequest = (function() { + /** + * SsmlVoiceGender enum. + * @name google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender + * @enum {number} + * @property {number} SSML_VOICE_GENDER_UNSPECIFIED=0 SSML_VOICE_GENDER_UNSPECIFIED value + * @property {number} SSML_VOICE_GENDER_MALE=1 SSML_VOICE_GENDER_MALE value + * @property {number} SSML_VOICE_GENDER_FEMALE=2 SSML_VOICE_GENDER_FEMALE value + * @property {number} SSML_VOICE_GENDER_NEUTRAL=3 SSML_VOICE_GENDER_NEUTRAL value + */ + v3beta1.SsmlVoiceGender = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SSML_VOICE_GENDER_UNSPECIFIED"] = 0; + values[valuesById[1] = "SSML_VOICE_GENDER_MALE"] = 1; + values[valuesById[2] = "SSML_VOICE_GENDER_FEMALE"] = 2; + values[valuesById[3] = "SSML_VOICE_GENDER_NEUTRAL"] = 3; + return values; + })(); + + v3beta1.VoiceSelectionParams = (function() { /** - * Properties of a CreateFlowRequest. + * Properties of a VoiceSelectionParams. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ICreateFlowRequest - * @property {string|null} [parent] CreateFlowRequest parent - * @property {google.cloud.dialogflow.cx.v3beta1.IFlow|null} [flow] CreateFlowRequest flow - * @property {string|null} [languageCode] CreateFlowRequest languageCode + * @interface IVoiceSelectionParams + * @property {string|null} [name] VoiceSelectionParams name + * @property {google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender|null} [ssmlGender] VoiceSelectionParams ssmlGender */ /** - * Constructs a new CreateFlowRequest. + * Constructs a new VoiceSelectionParams. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a CreateFlowRequest. - * @implements ICreateFlowRequest + * @classdesc Represents a VoiceSelectionParams. + * @implements IVoiceSelectionParams * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams=} [properties] Properties to set */ - function CreateFlowRequest(properties) { + function VoiceSelectionParams(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -76515,103 +76959,89 @@ } /** - * CreateFlowRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest - * @instance - */ - CreateFlowRequest.prototype.parent = ""; - - /** - * CreateFlowRequest flow. - * @member {google.cloud.dialogflow.cx.v3beta1.IFlow|null|undefined} flow - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * VoiceSelectionParams name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams * @instance */ - CreateFlowRequest.prototype.flow = null; + VoiceSelectionParams.prototype.name = ""; /** - * CreateFlowRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * VoiceSelectionParams ssmlGender. + * @member {google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender} ssmlGender + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams * @instance */ - CreateFlowRequest.prototype.languageCode = ""; + VoiceSelectionParams.prototype.ssmlGender = 0; /** - * Creates a new CreateFlowRequest instance using the specified properties. + * Creates a new VoiceSelectionParams instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} CreateFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} VoiceSelectionParams instance */ - CreateFlowRequest.create = function create(properties) { - return new CreateFlowRequest(properties); + VoiceSelectionParams.create = function create(properties) { + return new VoiceSelectionParams(properties); }; /** - * Encodes the specified CreateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.verify|verify} messages. + * Encodes the specified VoiceSelectionParams message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest} message CreateFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams} message VoiceSelectionParams message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateFlowRequest.encode = function encode(message, writer) { + VoiceSelectionParams.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.flow != null && Object.hasOwnProperty.call(message, "flow")) - $root.google.cloud.dialogflow.cx.v3beta1.Flow.encode(message.flow, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.ssmlGender != null && Object.hasOwnProperty.call(message, "ssmlGender")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.ssmlGender); return writer; }; /** - * Encodes the specified CreateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.verify|verify} messages. + * Encodes the specified VoiceSelectionParams message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest} message CreateFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams} message VoiceSelectionParams message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + VoiceSelectionParams.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateFlowRequest message from the specified reader or buffer. + * Decodes a VoiceSelectionParams message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} CreateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} VoiceSelectionParams * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateFlowRequest.decode = function decode(reader, length) { + VoiceSelectionParams.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.name = reader.string(); break; } case 2: { - message.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.decode(reader, reader.uint32()); - break; - } - case 3: { - message.languageCode = reader.string(); + message.ssmlGender = reader.int32(); break; } default: @@ -76623,145 +77053,165 @@ }; /** - * Decodes a CreateFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a VoiceSelectionParams message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} CreateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} VoiceSelectionParams * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateFlowRequest.decodeDelimited = function decodeDelimited(reader) { + VoiceSelectionParams.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateFlowRequest message. + * Verifies a VoiceSelectionParams message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateFlowRequest.verify = function verify(message) { + VoiceSelectionParams.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.flow != null && message.hasOwnProperty("flow")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Flow.verify(message.flow); - if (error) - return "flow." + error; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.ssmlGender != null && message.hasOwnProperty("ssmlGender")) + switch (message.ssmlGender) { + default: + return "ssmlGender: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } return null; }; /** - * Creates a CreateFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VoiceSelectionParams message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} CreateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} VoiceSelectionParams */ - CreateFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest) + VoiceSelectionParams.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.flow != null) { - if (typeof object.flow !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.flow: object expected"); - message.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.fromObject(object.flow); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams(); + if (object.name != null) + message.name = String(object.name); + switch (object.ssmlGender) { + default: + if (typeof object.ssmlGender === "number") { + message.ssmlGender = object.ssmlGender; + break; + } + break; + case "SSML_VOICE_GENDER_UNSPECIFIED": + case 0: + message.ssmlGender = 0; + break; + case "SSML_VOICE_GENDER_MALE": + case 1: + message.ssmlGender = 1; + break; + case "SSML_VOICE_GENDER_FEMALE": + case 2: + message.ssmlGender = 2; + break; + case "SSML_VOICE_GENDER_NEUTRAL": + case 3: + message.ssmlGender = 3; + break; } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a CreateFlowRequest message. Also converts values to other types if specified. + * Creates a plain object from a VoiceSelectionParams message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams * @static - * @param {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} message CreateFlowRequest + * @param {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} message VoiceSelectionParams * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateFlowRequest.toObject = function toObject(message, options) { + VoiceSelectionParams.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.flow = null; - object.languageCode = ""; + object.name = ""; + object.ssmlGender = options.enums === String ? "SSML_VOICE_GENDER_UNSPECIFIED" : 0; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.flow != null && message.hasOwnProperty("flow")) - object.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.toObject(message.flow, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.ssmlGender != null && message.hasOwnProperty("ssmlGender")) + object.ssmlGender = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender[message.ssmlGender] === undefined ? message.ssmlGender : $root.google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender[message.ssmlGender] : message.ssmlGender; return object; }; /** - * Converts this CreateFlowRequest to JSON. + * Converts this VoiceSelectionParams to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams * @instance * @returns {Object.} JSON object */ - CreateFlowRequest.prototype.toJSON = function toJSON() { + VoiceSelectionParams.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateFlowRequest + * Gets the default type url for VoiceSelectionParams * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + VoiceSelectionParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams"; }; - return CreateFlowRequest; + return VoiceSelectionParams; })(); - v3beta1.DeleteFlowRequest = (function() { + v3beta1.SynthesizeSpeechConfig = (function() { /** - * Properties of a DeleteFlowRequest. + * Properties of a SynthesizeSpeechConfig. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IDeleteFlowRequest - * @property {string|null} [name] DeleteFlowRequest name - * @property {boolean|null} [force] DeleteFlowRequest force + * @interface ISynthesizeSpeechConfig + * @property {number|null} [speakingRate] SynthesizeSpeechConfig speakingRate + * @property {number|null} [pitch] SynthesizeSpeechConfig pitch + * @property {number|null} [volumeGainDb] SynthesizeSpeechConfig volumeGainDb + * @property {Array.|null} [effectsProfileId] SynthesizeSpeechConfig effectsProfileId + * @property {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams|null} [voice] SynthesizeSpeechConfig voice */ /** - * Constructs a new DeleteFlowRequest. + * Constructs a new SynthesizeSpeechConfig. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a DeleteFlowRequest. - * @implements IDeleteFlowRequest + * @classdesc Represents a SynthesizeSpeechConfig. + * @implements ISynthesizeSpeechConfig * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig=} [properties] Properties to set */ - function DeleteFlowRequest(properties) { + function SynthesizeSpeechConfig(properties) { + this.effectsProfileId = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -76769,89 +77219,134 @@ } /** - * DeleteFlowRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * SynthesizeSpeechConfig speakingRate. + * @member {number} speakingRate + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @instance */ - DeleteFlowRequest.prototype.name = ""; + SynthesizeSpeechConfig.prototype.speakingRate = 0; /** - * DeleteFlowRequest force. - * @member {boolean} force - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * SynthesizeSpeechConfig pitch. + * @member {number} pitch + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @instance */ - DeleteFlowRequest.prototype.force = false; + SynthesizeSpeechConfig.prototype.pitch = 0; /** - * Creates a new DeleteFlowRequest instance using the specified properties. + * SynthesizeSpeechConfig volumeGainDb. + * @member {number} volumeGainDb + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @instance + */ + SynthesizeSpeechConfig.prototype.volumeGainDb = 0; + + /** + * SynthesizeSpeechConfig effectsProfileId. + * @member {Array.} effectsProfileId + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @instance + */ + SynthesizeSpeechConfig.prototype.effectsProfileId = $util.emptyArray; + + /** + * SynthesizeSpeechConfig voice. + * @member {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams|null|undefined} voice + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @instance + */ + SynthesizeSpeechConfig.prototype.voice = null; + + /** + * Creates a new SynthesizeSpeechConfig instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} DeleteFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig instance */ - DeleteFlowRequest.create = function create(properties) { - return new DeleteFlowRequest(properties); + SynthesizeSpeechConfig.create = function create(properties) { + return new SynthesizeSpeechConfig(properties); }; /** - * Encodes the specified DeleteFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest.verify|verify} messages. + * Encodes the specified SynthesizeSpeechConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest} message DeleteFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig} message SynthesizeSpeechConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteFlowRequest.encode = function encode(message, writer) { + SynthesizeSpeechConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + if (message.speakingRate != null && Object.hasOwnProperty.call(message, "speakingRate")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.speakingRate); + if (message.pitch != null && Object.hasOwnProperty.call(message, "pitch")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.pitch); + if (message.volumeGainDb != null && Object.hasOwnProperty.call(message, "volumeGainDb")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.volumeGainDb); + if (message.voice != null && Object.hasOwnProperty.call(message, "voice")) + $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.encode(message.voice, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.effectsProfileId != null && message.effectsProfileId.length) + for (var i = 0; i < message.effectsProfileId.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.effectsProfileId[i]); return writer; }; /** - * Encodes the specified DeleteFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest.verify|verify} messages. + * Encodes the specified SynthesizeSpeechConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest} message DeleteFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig} message SynthesizeSpeechConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + SynthesizeSpeechConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteFlowRequest message from the specified reader or buffer. + * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} DeleteFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteFlowRequest.decode = function decode(reader, length) { + SynthesizeSpeechConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.speakingRate = reader.double(); break; } case 2: { - message.force = reader.bool(); + message.pitch = reader.double(); + break; + } + case 3: { + message.volumeGainDb = reader.double(); + break; + } + case 5: { + if (!(message.effectsProfileId && message.effectsProfileId.length)) + message.effectsProfileId = []; + message.effectsProfileId.push(reader.string()); + break; + } + case 4: { + message.voice = $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.decode(reader, reader.uint32()); break; } default: @@ -76863,134 +77358,197 @@ }; /** - * Decodes a DeleteFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} DeleteFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteFlowRequest.decodeDelimited = function decodeDelimited(reader) { + SynthesizeSpeechConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteFlowRequest message. + * Verifies a SynthesizeSpeechConfig message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteFlowRequest.verify = function verify(message) { + SynthesizeSpeechConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; + if (message.speakingRate != null && message.hasOwnProperty("speakingRate")) + if (typeof message.speakingRate !== "number") + return "speakingRate: number expected"; + if (message.pitch != null && message.hasOwnProperty("pitch")) + if (typeof message.pitch !== "number") + return "pitch: number expected"; + if (message.volumeGainDb != null && message.hasOwnProperty("volumeGainDb")) + if (typeof message.volumeGainDb !== "number") + return "volumeGainDb: number expected"; + if (message.effectsProfileId != null && message.hasOwnProperty("effectsProfileId")) { + if (!Array.isArray(message.effectsProfileId)) + return "effectsProfileId: array expected"; + for (var i = 0; i < message.effectsProfileId.length; ++i) + if (!$util.isString(message.effectsProfileId[i])) + return "effectsProfileId: string[] expected"; + } + if (message.voice != null && message.hasOwnProperty("voice")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify(message.voice); + if (error) + return "voice." + error; + } return null; }; /** - * Creates a DeleteFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SynthesizeSpeechConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} DeleteFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig */ - DeleteFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest) + SynthesizeSpeechConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig(); + if (object.speakingRate != null) + message.speakingRate = Number(object.speakingRate); + if (object.pitch != null) + message.pitch = Number(object.pitch); + if (object.volumeGainDb != null) + message.volumeGainDb = Number(object.volumeGainDb); + if (object.effectsProfileId) { + if (!Array.isArray(object.effectsProfileId)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.effectsProfileId: array expected"); + message.effectsProfileId = []; + for (var i = 0; i < object.effectsProfileId.length; ++i) + message.effectsProfileId[i] = String(object.effectsProfileId[i]); + } + if (object.voice != null) { + if (typeof object.voice !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.voice: object expected"); + message.voice = $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.fromObject(object.voice); + } return message; }; /** - * Creates a plain object from a DeleteFlowRequest message. Also converts values to other types if specified. + * Creates a plain object from a SynthesizeSpeechConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} message DeleteFlowRequest + * @param {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} message SynthesizeSpeechConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteFlowRequest.toObject = function toObject(message, options) { + SynthesizeSpeechConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.effectsProfileId = []; if (options.defaults) { - object.name = ""; - object.force = false; + object.speakingRate = 0; + object.pitch = 0; + object.volumeGainDb = 0; + object.voice = null; + } + if (message.speakingRate != null && message.hasOwnProperty("speakingRate")) + object.speakingRate = options.json && !isFinite(message.speakingRate) ? String(message.speakingRate) : message.speakingRate; + if (message.pitch != null && message.hasOwnProperty("pitch")) + object.pitch = options.json && !isFinite(message.pitch) ? String(message.pitch) : message.pitch; + if (message.volumeGainDb != null && message.hasOwnProperty("volumeGainDb")) + object.volumeGainDb = options.json && !isFinite(message.volumeGainDb) ? String(message.volumeGainDb) : message.volumeGainDb; + if (message.voice != null && message.hasOwnProperty("voice")) + object.voice = $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.toObject(message.voice, options); + if (message.effectsProfileId && message.effectsProfileId.length) { + object.effectsProfileId = []; + for (var j = 0; j < message.effectsProfileId.length; ++j) + object.effectsProfileId[j] = message.effectsProfileId[j]; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; return object; }; /** - * Converts this DeleteFlowRequest to JSON. + * Converts this SynthesizeSpeechConfig to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @instance * @returns {Object.} JSON object */ - DeleteFlowRequest.prototype.toJSON = function toJSON() { + SynthesizeSpeechConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteFlowRequest + * Gets the default type url for SynthesizeSpeechConfig * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SynthesizeSpeechConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig"; }; - return DeleteFlowRequest; + return SynthesizeSpeechConfig; })(); - v3beta1.ListFlowsRequest = (function() { + /** + * OutputAudioEncoding enum. + * @name google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding + * @enum {number} + * @property {number} OUTPUT_AUDIO_ENCODING_UNSPECIFIED=0 OUTPUT_AUDIO_ENCODING_UNSPECIFIED value + * @property {number} OUTPUT_AUDIO_ENCODING_LINEAR_16=1 OUTPUT_AUDIO_ENCODING_LINEAR_16 value + * @property {number} OUTPUT_AUDIO_ENCODING_MP3=2 OUTPUT_AUDIO_ENCODING_MP3 value + * @property {number} OUTPUT_AUDIO_ENCODING_MP3_64_KBPS=4 OUTPUT_AUDIO_ENCODING_MP3_64_KBPS value + * @property {number} OUTPUT_AUDIO_ENCODING_OGG_OPUS=3 OUTPUT_AUDIO_ENCODING_OGG_OPUS value + * @property {number} OUTPUT_AUDIO_ENCODING_MULAW=5 OUTPUT_AUDIO_ENCODING_MULAW value + */ + v3beta1.OutputAudioEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OUTPUT_AUDIO_ENCODING_UNSPECIFIED"] = 0; + values[valuesById[1] = "OUTPUT_AUDIO_ENCODING_LINEAR_16"] = 1; + values[valuesById[2] = "OUTPUT_AUDIO_ENCODING_MP3"] = 2; + values[valuesById[4] = "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS"] = 4; + values[valuesById[3] = "OUTPUT_AUDIO_ENCODING_OGG_OPUS"] = 3; + values[valuesById[5] = "OUTPUT_AUDIO_ENCODING_MULAW"] = 5; + return values; + })(); + + v3beta1.OutputAudioConfig = (function() { /** - * Properties of a ListFlowsRequest. + * Properties of an OutputAudioConfig. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListFlowsRequest - * @property {string|null} [parent] ListFlowsRequest parent - * @property {number|null} [pageSize] ListFlowsRequest pageSize - * @property {string|null} [pageToken] ListFlowsRequest pageToken - * @property {string|null} [languageCode] ListFlowsRequest languageCode + * @interface IOutputAudioConfig + * @property {google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding|null} [audioEncoding] OutputAudioConfig audioEncoding + * @property {number|null} [sampleRateHertz] OutputAudioConfig sampleRateHertz + * @property {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig|null} [synthesizeSpeechConfig] OutputAudioConfig synthesizeSpeechConfig */ /** - * Constructs a new ListFlowsRequest. + * Constructs a new OutputAudioConfig. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListFlowsRequest. - * @implements IListFlowsRequest + * @classdesc Represents an OutputAudioConfig. + * @implements IOutputAudioConfig * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig=} [properties] Properties to set */ - function ListFlowsRequest(properties) { + function OutputAudioConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -76998,117 +77556,103 @@ } /** - * ListFlowsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest - * @instance - */ - ListFlowsRequest.prototype.parent = ""; - - /** - * ListFlowsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * OutputAudioConfig audioEncoding. + * @member {google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding} audioEncoding + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @instance */ - ListFlowsRequest.prototype.pageSize = 0; + OutputAudioConfig.prototype.audioEncoding = 0; /** - * ListFlowsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * OutputAudioConfig sampleRateHertz. + * @member {number} sampleRateHertz + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @instance */ - ListFlowsRequest.prototype.pageToken = ""; + OutputAudioConfig.prototype.sampleRateHertz = 0; /** - * ListFlowsRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * OutputAudioConfig synthesizeSpeechConfig. + * @member {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig|null|undefined} synthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @instance */ - ListFlowsRequest.prototype.languageCode = ""; + OutputAudioConfig.prototype.synthesizeSpeechConfig = null; /** - * Creates a new ListFlowsRequest instance using the specified properties. + * Creates a new OutputAudioConfig instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} ListFlowsRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} OutputAudioConfig instance */ - ListFlowsRequest.create = function create(properties) { - return new ListFlowsRequest(properties); + OutputAudioConfig.create = function create(properties) { + return new OutputAudioConfig(properties); }; /** - * Encodes the specified ListFlowsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest.verify|verify} messages. + * Encodes the specified OutputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest} message ListFlowsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig} message OutputAudioConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFlowsRequest.encode = function encode(message, writer) { + OutputAudioConfig.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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); + if (message.audioEncoding != null && Object.hasOwnProperty.call(message, "audioEncoding")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.audioEncoding); + if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sampleRateHertz); + if (message.synthesizeSpeechConfig != null && Object.hasOwnProperty.call(message, "synthesizeSpeechConfig")) + $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.encode(message.synthesizeSpeechConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListFlowsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest.verify|verify} messages. + * Encodes the specified OutputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest} message ListFlowsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig} message OutputAudioConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFlowsRequest.encodeDelimited = function encodeDelimited(message, writer) { + OutputAudioConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListFlowsRequest message from the specified reader or buffer. + * Decodes an OutputAudioConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} ListFlowsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} OutputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFlowsRequest.decode = function decode(reader, length) { + OutputAudioConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.audioEncoding = reader.int32(); break; } case 2: { - message.pageSize = reader.int32(); + message.sampleRateHertz = reader.int32(); break; } case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.languageCode = reader.string(); + message.synthesizeSpeechConfig = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.decode(reader, reader.uint32()); break; } default: @@ -77120,149 +77664,184 @@ }; /** - * Decodes a ListFlowsRequest message from the specified reader or buffer, length delimited. + * Decodes an OutputAudioConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} ListFlowsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} OutputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFlowsRequest.decodeDelimited = function decodeDelimited(reader) { + OutputAudioConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListFlowsRequest message. + * Verifies an OutputAudioConfig message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListFlowsRequest.verify = function verify(message) { + OutputAudioConfig.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.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; + if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) + switch (message.audioEncoding) { + default: + return "audioEncoding: enum value expected"; + case 0: + case 1: + case 2: + case 4: + case 3: + case 5: + break; + } + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + if (!$util.isInteger(message.sampleRateHertz)) + return "sampleRateHertz: integer expected"; + if (message.synthesizeSpeechConfig != null && message.hasOwnProperty("synthesizeSpeechConfig")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify(message.synthesizeSpeechConfig); + if (error) + return "synthesizeSpeechConfig." + error; + } return null; }; /** - * Creates a ListFlowsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an OutputAudioConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} ListFlowsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} OutputAudioConfig */ - ListFlowsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest) + OutputAudioConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest(); - 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.languageCode != null) - message.languageCode = String(object.languageCode); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig(); + switch (object.audioEncoding) { + default: + if (typeof object.audioEncoding === "number") { + message.audioEncoding = object.audioEncoding; + break; + } + break; + case "OUTPUT_AUDIO_ENCODING_UNSPECIFIED": + case 0: + message.audioEncoding = 0; + break; + case "OUTPUT_AUDIO_ENCODING_LINEAR_16": + case 1: + message.audioEncoding = 1; + break; + case "OUTPUT_AUDIO_ENCODING_MP3": + case 2: + message.audioEncoding = 2; + break; + case "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS": + case 4: + message.audioEncoding = 4; + break; + case "OUTPUT_AUDIO_ENCODING_OGG_OPUS": + case 3: + message.audioEncoding = 3; + break; + case "OUTPUT_AUDIO_ENCODING_MULAW": + case 5: + message.audioEncoding = 5; + break; + } + if (object.sampleRateHertz != null) + message.sampleRateHertz = object.sampleRateHertz | 0; + if (object.synthesizeSpeechConfig != null) { + if (typeof object.synthesizeSpeechConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.synthesizeSpeechConfig: object expected"); + message.synthesizeSpeechConfig = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.fromObject(object.synthesizeSpeechConfig); + } return message; }; /** - * Creates a plain object from a ListFlowsRequest message. Also converts values to other types if specified. + * Creates a plain object from an OutputAudioConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} message ListFlowsRequest + * @param {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} message OutputAudioConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListFlowsRequest.toObject = function toObject(message, options) { + OutputAudioConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.languageCode = ""; + object.audioEncoding = options.enums === String ? "OUTPUT_AUDIO_ENCODING_UNSPECIFIED" : 0; + object.sampleRateHertz = 0; + object.synthesizeSpeechConfig = null; } - 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.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) + object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding[message.audioEncoding] === undefined ? message.audioEncoding : $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding[message.audioEncoding] : message.audioEncoding; + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + object.sampleRateHertz = message.sampleRateHertz; + if (message.synthesizeSpeechConfig != null && message.hasOwnProperty("synthesizeSpeechConfig")) + object.synthesizeSpeechConfig = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.toObject(message.synthesizeSpeechConfig, options); return object; }; /** - * Converts this ListFlowsRequest to JSON. + * Converts this OutputAudioConfig to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @instance * @returns {Object.} JSON object */ - ListFlowsRequest.prototype.toJSON = function toJSON() { + OutputAudioConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListFlowsRequest + * Gets the default type url for OutputAudioConfig * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListFlowsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OutputAudioConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig"; }; - return ListFlowsRequest; + return OutputAudioConfig; })(); - v3beta1.ListFlowsResponse = (function() { + v3beta1.TextToSpeechSettings = (function() { /** - * Properties of a ListFlowsResponse. + * Properties of a TextToSpeechSettings. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListFlowsResponse - * @property {Array.|null} [flows] ListFlowsResponse flows - * @property {string|null} [nextPageToken] ListFlowsResponse nextPageToken + * @interface ITextToSpeechSettings + * @property {Object.|null} [synthesizeSpeechConfigs] TextToSpeechSettings synthesizeSpeechConfigs */ /** - * Constructs a new ListFlowsResponse. + * Constructs a new TextToSpeechSettings. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListFlowsResponse. - * @implements IListFlowsResponse + * @classdesc Represents a TextToSpeechSettings. + * @implements ITextToSpeechSettings * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings=} [properties] Properties to set */ - function ListFlowsResponse(properties) { - this.flows = []; + function TextToSpeechSettings(properties) { + this.synthesizeSpeechConfigs = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -77270,92 +77849,97 @@ } /** - * ListFlowsResponse flows. - * @member {Array.} flows - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse - * @instance - */ - ListFlowsResponse.prototype.flows = $util.emptyArray; - - /** - * ListFlowsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * TextToSpeechSettings synthesizeSpeechConfigs. + * @member {Object.} synthesizeSpeechConfigs + * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings * @instance */ - ListFlowsResponse.prototype.nextPageToken = ""; + TextToSpeechSettings.prototype.synthesizeSpeechConfigs = $util.emptyObject; /** - * Creates a new ListFlowsResponse instance using the specified properties. + * Creates a new TextToSpeechSettings instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} ListFlowsResponse instance + * @param {google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings} TextToSpeechSettings instance */ - ListFlowsResponse.create = function create(properties) { - return new ListFlowsResponse(properties); + TextToSpeechSettings.create = function create(properties) { + return new TextToSpeechSettings(properties); }; /** - * Encodes the specified ListFlowsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.verify|verify} messages. + * Encodes the specified TextToSpeechSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse} message ListFlowsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings} message TextToSpeechSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFlowsResponse.encode = function encode(message, writer) { + TextToSpeechSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.flows != null && message.flows.length) - for (var i = 0; i < message.flows.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.Flow.encode(message.flows[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.synthesizeSpeechConfigs != null && Object.hasOwnProperty.call(message, "synthesizeSpeechConfigs")) + for (var keys = Object.keys(message.synthesizeSpeechConfigs), 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.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.encode(message.synthesizeSpeechConfigs[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified ListFlowsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.verify|verify} messages. + * Encodes the specified TextToSpeechSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse} message ListFlowsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings} message TextToSpeechSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFlowsResponse.encodeDelimited = function encodeDelimited(message, writer) { + TextToSpeechSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListFlowsResponse message from the specified reader or buffer. + * Decodes a TextToSpeechSettings message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} ListFlowsResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings} TextToSpeechSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFlowsResponse.decode = function decode(reader, length) { + TextToSpeechSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.flows && message.flows.length)) - message.flows = []; - message.flows.push($root.google.cloud.dialogflow.cx.v3beta1.Flow.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); + if (message.synthesizeSpeechConfigs === $util.emptyObject) + message.synthesizeSpeechConfigs = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.synthesizeSpeechConfigs[key] = value; break; } default: @@ -77367,149 +77951,508 @@ }; /** - * Decodes a ListFlowsResponse message from the specified reader or buffer, length delimited. + * Decodes a TextToSpeechSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} ListFlowsResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings} TextToSpeechSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFlowsResponse.decodeDelimited = function decodeDelimited(reader) { + TextToSpeechSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListFlowsResponse message. + * Verifies a TextToSpeechSettings message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListFlowsResponse.verify = function verify(message) { + TextToSpeechSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.flows != null && message.hasOwnProperty("flows")) { - if (!Array.isArray(message.flows)) - return "flows: array expected"; - for (var i = 0; i < message.flows.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Flow.verify(message.flows[i]); + if (message.synthesizeSpeechConfigs != null && message.hasOwnProperty("synthesizeSpeechConfigs")) { + if (!$util.isObject(message.synthesizeSpeechConfigs)) + return "synthesizeSpeechConfigs: object expected"; + var key = Object.keys(message.synthesizeSpeechConfigs); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify(message.synthesizeSpeechConfigs[key[i]]); if (error) - return "flows." + error; + return "synthesizeSpeechConfigs." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListFlowsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a TextToSpeechSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} ListFlowsResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings} TextToSpeechSettings */ - ListFlowsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse) + TextToSpeechSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse(); - if (object.flows) { - if (!Array.isArray(object.flows)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.flows: array expected"); - message.flows = []; - for (var i = 0; i < object.flows.length; ++i) { - if (typeof object.flows[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.flows: object expected"); - message.flows[i] = $root.google.cloud.dialogflow.cx.v3beta1.Flow.fromObject(object.flows[i]); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings(); + if (object.synthesizeSpeechConfigs) { + if (typeof object.synthesizeSpeechConfigs !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.synthesizeSpeechConfigs: object expected"); + message.synthesizeSpeechConfigs = {}; + for (var keys = Object.keys(object.synthesizeSpeechConfigs), i = 0; i < keys.length; ++i) { + if (typeof object.synthesizeSpeechConfigs[keys[i]] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.synthesizeSpeechConfigs: object expected"); + message.synthesizeSpeechConfigs[keys[i]] = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.fromObject(object.synthesizeSpeechConfigs[keys[i]]); } } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListFlowsResponse message. Also converts values to other types if specified. + * Creates a plain object from a TextToSpeechSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} message ListFlowsResponse + * @param {google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings} message TextToSpeechSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListFlowsResponse.toObject = function toObject(message, options) { + TextToSpeechSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.flows = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.flows && message.flows.length) { - object.flows = []; - for (var j = 0; j < message.flows.length; ++j) - object.flows[j] = $root.google.cloud.dialogflow.cx.v3beta1.Flow.toObject(message.flows[j], options); + if (options.objects || options.defaults) + object.synthesizeSpeechConfigs = {}; + var keys2; + if (message.synthesizeSpeechConfigs && (keys2 = Object.keys(message.synthesizeSpeechConfigs)).length) { + object.synthesizeSpeechConfigs = {}; + for (var j = 0; j < keys2.length; ++j) + object.synthesizeSpeechConfigs[keys2[j]] = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.toObject(message.synthesizeSpeechConfigs[keys2[j]], options); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListFlowsResponse to JSON. + * Converts this TextToSpeechSettings to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings * @instance * @returns {Object.} JSON object */ - ListFlowsResponse.prototype.toJSON = function toJSON() { + TextToSpeechSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListFlowsResponse + * Gets the default type url for TextToSpeechSettings * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListFlowsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TextToSpeechSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings"; }; - return ListFlowsResponse; + return TextToSpeechSettings; })(); - v3beta1.GetFlowRequest = (function() { + v3beta1.Flows = (function() { /** - * Properties of a GetFlowRequest. + * Constructs a new Flows service. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IGetFlowRequest - * @property {string|null} [name] GetFlowRequest name - * @property {string|null} [languageCode] GetFlowRequest languageCode + * @classdesc Represents a Flows + * @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 Flows(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Flows.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Flows; + + /** + * Creates new Flows service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @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 {Flows} RPC service. Useful where requests and/or responses are streamed. */ + Flows.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * Constructs a new GetFlowRequest. + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|createFlow}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @typedef CreateFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Flow} [response] Flow + */ + + /** + * Calls CreateFlow. + * @function createFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest} request CreateFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Flows.CreateFlowCallback} callback Node-style callback called with the error, if any, and Flow + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.createFlow = function createFlow(request, callback) { + return this.rpcCall(createFlow, $root.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest, $root.google.cloud.dialogflow.cx.v3beta1.Flow, request, callback); + }, "name", { value: "CreateFlow" }); + + /** + * Calls CreateFlow. + * @function createFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest} request CreateFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|deleteFlow}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @typedef DeleteFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteFlow. + * @function deleteFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest} request DeleteFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Flows.DeleteFlowCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.deleteFlow = function deleteFlow(request, callback) { + return this.rpcCall(deleteFlow, $root.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteFlow" }); + + /** + * Calls DeleteFlow. + * @function deleteFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest} request DeleteFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|listFlows}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @typedef ListFlowsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} [response] ListFlowsResponse + */ + + /** + * Calls ListFlows. + * @function listFlows + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest} request ListFlowsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Flows.ListFlowsCallback} callback Node-style callback called with the error, if any, and ListFlowsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.listFlows = function listFlows(request, callback) { + return this.rpcCall(listFlows, $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse, request, callback); + }, "name", { value: "ListFlows" }); + + /** + * Calls ListFlows. + * @function listFlows + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest} request ListFlowsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|getFlow}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @typedef GetFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Flow} [response] Flow + */ + + /** + * Calls GetFlow. + * @function getFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest} request GetFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowCallback} callback Node-style callback called with the error, if any, and Flow + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.getFlow = function getFlow(request, callback) { + return this.rpcCall(getFlow, $root.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest, $root.google.cloud.dialogflow.cx.v3beta1.Flow, request, callback); + }, "name", { value: "GetFlow" }); + + /** + * Calls GetFlow. + * @function getFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest} request GetFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|updateFlow}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @typedef UpdateFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Flow} [response] Flow + */ + + /** + * Calls UpdateFlow. + * @function updateFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest} request UpdateFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Flows.UpdateFlowCallback} callback Node-style callback called with the error, if any, and Flow + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.updateFlow = function updateFlow(request, callback) { + return this.rpcCall(updateFlow, $root.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest, $root.google.cloud.dialogflow.cx.v3beta1.Flow, request, callback); + }, "name", { value: "UpdateFlow" }); + + /** + * Calls UpdateFlow. + * @function updateFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest} request UpdateFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|trainFlow}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @typedef TrainFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls TrainFlow. + * @function trainFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest} request TrainFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Flows.TrainFlowCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.trainFlow = function trainFlow(request, callback) { + return this.rpcCall(trainFlow, $root.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "TrainFlow" }); + + /** + * Calls TrainFlow. + * @function trainFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest} request TrainFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|validateFlow}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @typedef ValidateFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} [response] FlowValidationResult + */ + + /** + * Calls ValidateFlow. + * @function validateFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest} request ValidateFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Flows.ValidateFlowCallback} callback Node-style callback called with the error, if any, and FlowValidationResult + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.validateFlow = function validateFlow(request, callback) { + return this.rpcCall(validateFlow, $root.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest, $root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult, request, callback); + }, "name", { value: "ValidateFlow" }); + + /** + * Calls ValidateFlow. + * @function validateFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest} request ValidateFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|getFlowValidationResult}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @typedef GetFlowValidationResultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} [response] FlowValidationResult + */ + + /** + * Calls GetFlowValidationResult. + * @function getFlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest} request GetFlowValidationResultRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowValidationResultCallback} callback Node-style callback called with the error, if any, and FlowValidationResult + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.getFlowValidationResult = function getFlowValidationResult(request, callback) { + return this.rpcCall(getFlowValidationResult, $root.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest, $root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult, request, callback); + }, "name", { value: "GetFlowValidationResult" }); + + /** + * Calls GetFlowValidationResult. + * @function getFlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest} request GetFlowValidationResultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|importFlow}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @typedef ImportFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ImportFlow. + * @function importFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest} request ImportFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Flows.ImportFlowCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.importFlow = function importFlow(request, callback) { + return this.rpcCall(importFlow, $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ImportFlow" }); + + /** + * Calls ImportFlow. + * @function importFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest} request ImportFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|exportFlow}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @typedef ExportFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ExportFlow. + * @function exportFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest} request ExportFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Flows.ExportFlowCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.exportFlow = function exportFlow(request, callback) { + return this.rpcCall(exportFlow, $root.google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ExportFlow" }); + + /** + * Calls ExportFlow. + * @function exportFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest} request ExportFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Flows; + })(); + + v3beta1.NluSettings = (function() { + + /** + * Properties of a NluSettings. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a GetFlowRequest. - * @implements IGetFlowRequest + * @interface INluSettings + * @property {google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType|null} [modelType] NluSettings modelType + * @property {number|null} [classificationThreshold] NluSettings classificationThreshold + * @property {google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode|null} [modelTrainingMode] NluSettings modelTrainingMode + */ + + /** + * Constructs a new NluSettings. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a NluSettings. + * @implements INluSettings * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.INluSettings=} [properties] Properties to set */ - function GetFlowRequest(properties) { + function NluSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -77517,89 +78460,103 @@ } /** - * GetFlowRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * NluSettings modelType. + * @member {google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType} modelType + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @instance */ - GetFlowRequest.prototype.name = ""; + NluSettings.prototype.modelType = 0; /** - * GetFlowRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * NluSettings classificationThreshold. + * @member {number} classificationThreshold + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @instance */ - GetFlowRequest.prototype.languageCode = ""; + NluSettings.prototype.classificationThreshold = 0; /** - * Creates a new GetFlowRequest instance using the specified properties. + * NluSettings modelTrainingMode. + * @member {google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode} modelTrainingMode + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * @instance + */ + NluSettings.prototype.modelTrainingMode = 0; + + /** + * Creates a new NluSettings instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} GetFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.INluSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.NluSettings} NluSettings instance */ - GetFlowRequest.create = function create(properties) { - return new GetFlowRequest(properties); + NluSettings.create = function create(properties) { + return new NluSettings(properties); }; /** - * Encodes the specified GetFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowRequest.verify|verify} messages. + * Encodes the specified NluSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.NluSettings.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest} message GetFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.INluSettings} message NluSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFlowRequest.encode = function encode(message, writer) { + NluSettings.encode = function encode(message, writer) { 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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.modelType != null && Object.hasOwnProperty.call(message, "modelType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.modelType); + if (message.classificationThreshold != null && Object.hasOwnProperty.call(message, "classificationThreshold")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.classificationThreshold); + if (message.modelTrainingMode != null && Object.hasOwnProperty.call(message, "modelTrainingMode")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.modelTrainingMode); return writer; }; /** - * Encodes the specified GetFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowRequest.verify|verify} messages. + * Encodes the specified NluSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.NluSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest} message GetFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.INluSettings} message NluSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + NluSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetFlowRequest message from the specified reader or buffer. + * Decodes a NluSettings message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} GetFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.NluSettings} NluSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetFlowRequest.decode = function decode(reader, length) { + NluSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.NluSettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.modelType = reader.int32(); break; } - case 2: { - message.languageCode = reader.string(); + case 3: { + message.classificationThreshold = reader.float(); + break; + } + case 4: { + message.modelTrainingMode = reader.int32(); break; } default: @@ -77611,133 +78568,228 @@ }; /** - * Decodes a GetFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a NluSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} GetFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.NluSettings} NluSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetFlowRequest.decodeDelimited = function decodeDelimited(reader) { + NluSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetFlowRequest message. + * Verifies a NluSettings message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetFlowRequest.verify = function verify(message) { + NluSettings.verify = function verify(message) { if (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.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; + if (message.modelType != null && message.hasOwnProperty("modelType")) + switch (message.modelType) { + default: + return "modelType: enum value expected"; + case 0: + case 1: + case 3: + break; + } + if (message.classificationThreshold != null && message.hasOwnProperty("classificationThreshold")) + if (typeof message.classificationThreshold !== "number") + return "classificationThreshold: number expected"; + if (message.modelTrainingMode != null && message.hasOwnProperty("modelTrainingMode")) + switch (message.modelTrainingMode) { + default: + return "modelTrainingMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a GetFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a NluSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} GetFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.NluSettings} NluSettings */ - GetFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest) + NluSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.NluSettings) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.NluSettings(); + switch (object.modelType) { + default: + if (typeof object.modelType === "number") { + message.modelType = object.modelType; + break; + } + break; + case "MODEL_TYPE_UNSPECIFIED": + case 0: + message.modelType = 0; + break; + case "MODEL_TYPE_STANDARD": + case 1: + message.modelType = 1; + break; + case "MODEL_TYPE_ADVANCED": + case 3: + message.modelType = 3; + break; + } + if (object.classificationThreshold != null) + message.classificationThreshold = Number(object.classificationThreshold); + switch (object.modelTrainingMode) { + default: + if (typeof object.modelTrainingMode === "number") { + message.modelTrainingMode = object.modelTrainingMode; + break; + } + break; + case "MODEL_TRAINING_MODE_UNSPECIFIED": + case 0: + message.modelTrainingMode = 0; + break; + case "MODEL_TRAINING_MODE_AUTOMATIC": + case 1: + message.modelTrainingMode = 1; + break; + case "MODEL_TRAINING_MODE_MANUAL": + case 2: + message.modelTrainingMode = 2; + break; + } return message; }; /** - * Creates a plain object from a GetFlowRequest message. Also converts values to other types if specified. + * Creates a plain object from a NluSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} message GetFlowRequest + * @param {google.cloud.dialogflow.cx.v3beta1.NluSettings} message NluSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetFlowRequest.toObject = function toObject(message, options) { + NluSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.languageCode = ""; + object.modelType = options.enums === String ? "MODEL_TYPE_UNSPECIFIED" : 0; + object.classificationThreshold = 0; + object.modelTrainingMode = options.enums === String ? "MODEL_TRAINING_MODE_UNSPECIFIED" : 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (message.modelType != null && message.hasOwnProperty("modelType")) + object.modelType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType[message.modelType] === undefined ? message.modelType : $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType[message.modelType] : message.modelType; + if (message.classificationThreshold != null && message.hasOwnProperty("classificationThreshold")) + object.classificationThreshold = options.json && !isFinite(message.classificationThreshold) ? String(message.classificationThreshold) : message.classificationThreshold; + if (message.modelTrainingMode != null && message.hasOwnProperty("modelTrainingMode")) + object.modelTrainingMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode[message.modelTrainingMode] === undefined ? message.modelTrainingMode : $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode[message.modelTrainingMode] : message.modelTrainingMode; return object; }; /** - * Converts this GetFlowRequest to JSON. + * Converts this NluSettings to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @instance * @returns {Object.} JSON object */ - GetFlowRequest.prototype.toJSON = function toJSON() { + NluSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetFlowRequest + * Gets the default type url for NluSettings * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + NluSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GetFlowRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.NluSettings"; }; - return GetFlowRequest; + /** + * ModelType enum. + * @name google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType + * @enum {number} + * @property {number} MODEL_TYPE_UNSPECIFIED=0 MODEL_TYPE_UNSPECIFIED value + * @property {number} MODEL_TYPE_STANDARD=1 MODEL_TYPE_STANDARD value + * @property {number} MODEL_TYPE_ADVANCED=3 MODEL_TYPE_ADVANCED value + */ + NluSettings.ModelType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODEL_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MODEL_TYPE_STANDARD"] = 1; + values[valuesById[3] = "MODEL_TYPE_ADVANCED"] = 3; + return values; + })(); + + /** + * ModelTrainingMode enum. + * @name google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode + * @enum {number} + * @property {number} MODEL_TRAINING_MODE_UNSPECIFIED=0 MODEL_TRAINING_MODE_UNSPECIFIED value + * @property {number} MODEL_TRAINING_MODE_AUTOMATIC=1 MODEL_TRAINING_MODE_AUTOMATIC value + * @property {number} MODEL_TRAINING_MODE_MANUAL=2 MODEL_TRAINING_MODE_MANUAL value + */ + NluSettings.ModelTrainingMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODEL_TRAINING_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MODEL_TRAINING_MODE_AUTOMATIC"] = 1; + values[valuesById[2] = "MODEL_TRAINING_MODE_MANUAL"] = 2; + return values; + })(); + + return NluSettings; })(); - v3beta1.UpdateFlowRequest = (function() { + v3beta1.Flow = (function() { /** - * Properties of an UpdateFlowRequest. + * Properties of a Flow. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IUpdateFlowRequest - * @property {google.cloud.dialogflow.cx.v3beta1.IFlow|null} [flow] UpdateFlowRequest flow - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFlowRequest updateMask - * @property {string|null} [languageCode] UpdateFlowRequest languageCode + * @interface IFlow + * @property {string|null} [name] Flow name + * @property {string|null} [displayName] Flow displayName + * @property {string|null} [description] Flow description + * @property {Array.|null} [transitionRoutes] Flow transitionRoutes + * @property {Array.|null} [eventHandlers] Flow eventHandlers + * @property {Array.|null} [transitionRouteGroups] Flow transitionRouteGroups + * @property {google.cloud.dialogflow.cx.v3beta1.INluSettings|null} [nluSettings] Flow nluSettings */ /** - * Constructs a new UpdateFlowRequest. + * Constructs a new Flow. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an UpdateFlowRequest. - * @implements IUpdateFlowRequest + * @classdesc Represents a Flow. + * @implements IFlow * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IFlow=} [properties] Properties to set */ - function UpdateFlowRequest(properties) { + function Flow(properties) { + this.transitionRoutes = []; + this.eventHandlers = []; + this.transitionRouteGroups = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -77745,257 +78797,399 @@ } /** - * UpdateFlowRequest flow. - * @member {google.cloud.dialogflow.cx.v3beta1.IFlow|null|undefined} flow - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * Flow name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @instance */ - UpdateFlowRequest.prototype.flow = null; + Flow.prototype.name = ""; /** - * UpdateFlowRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * Flow displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @instance */ - UpdateFlowRequest.prototype.updateMask = null; + Flow.prototype.displayName = ""; /** - * UpdateFlowRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * Flow description. + * @member {string} description + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @instance */ - UpdateFlowRequest.prototype.languageCode = ""; + Flow.prototype.description = ""; /** - * Creates a new UpdateFlowRequest instance using the specified properties. + * Flow transitionRoutes. + * @member {Array.} transitionRoutes + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @instance + */ + Flow.prototype.transitionRoutes = $util.emptyArray; + + /** + * Flow eventHandlers. + * @member {Array.} eventHandlers + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @instance + */ + Flow.prototype.eventHandlers = $util.emptyArray; + + /** + * Flow transitionRouteGroups. + * @member {Array.} transitionRouteGroups + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @instance + */ + Flow.prototype.transitionRouteGroups = $util.emptyArray; + + /** + * Flow nluSettings. + * @member {google.cloud.dialogflow.cx.v3beta1.INluSettings|null|undefined} nluSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @instance + */ + Flow.prototype.nluSettings = null; + + /** + * Creates a new Flow instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} UpdateFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IFlow=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Flow} Flow instance */ - UpdateFlowRequest.create = function create(properties) { - return new UpdateFlowRequest(properties); + Flow.create = function create(properties) { + return new Flow(properties); }; /** - * Encodes the specified UpdateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.verify|verify} messages. + * Encodes the specified Flow message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Flow.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest} message UpdateFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IFlow} message Flow message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateFlowRequest.encode = function encode(message, writer) { + Flow.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.flow != null && Object.hasOwnProperty.call(message, "flow")) - $root.google.cloud.dialogflow.cx.v3beta1.Flow.encode(message.flow, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.transitionRoutes != null && message.transitionRoutes.length) + for (var i = 0; i < message.transitionRoutes.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.encode(message.transitionRoutes[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.eventHandlers != null && message.eventHandlers.length) + for (var i = 0; i < message.eventHandlers.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.encode(message.eventHandlers[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.nluSettings != null && Object.hasOwnProperty.call(message, "nluSettings")) + $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.encode(message.nluSettings, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.transitionRouteGroups != null && message.transitionRouteGroups.length) + for (var i = 0; i < message.transitionRouteGroups.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.transitionRouteGroups[i]); return writer; }; /** - * Encodes the specified UpdateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.verify|verify} messages. + * Encodes the specified Flow message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Flow.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest} message UpdateFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IFlow} message Flow message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + Flow.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateFlowRequest message from the specified reader or buffer. + * Decodes a Flow message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} UpdateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Flow} Flow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateFlowRequest.decode = function decode(reader, length) { + Flow.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Flow(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.decode(reader, reader.uint32()); + message.name = reader.string(); break; } case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.displayName = reader.string(); break; } case 3: { - message.languageCode = reader.string(); + message.description = reader.string(); break; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateFlowRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + case 4: { + if (!(message.transitionRoutes && message.transitionRoutes.length)) + message.transitionRoutes = []; + message.transitionRoutes.push($root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.eventHandlers && message.eventHandlers.length)) + message.eventHandlers = []; + message.eventHandlers.push($root.google.cloud.dialogflow.cx.v3beta1.EventHandler.decode(reader, reader.uint32())); + break; + } + case 15: { + if (!(message.transitionRouteGroups && message.transitionRouteGroups.length)) + message.transitionRouteGroups = []; + message.transitionRouteGroups.push(reader.string()); + break; + } + case 11: { + message.nluSettings = $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Flow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} UpdateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Flow} Flow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateFlowRequest.decodeDelimited = function decodeDelimited(reader) { + Flow.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateFlowRequest message. + * Verifies a Flow message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateFlowRequest.verify = function verify(message) { + Flow.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.flow != null && message.hasOwnProperty("flow")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Flow.verify(message.flow); - if (error) - return "flow." + 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.transitionRoutes != null && message.hasOwnProperty("transitionRoutes")) { + if (!Array.isArray(message.transitionRoutes)) + return "transitionRoutes: array expected"; + for (var i = 0; i < message.transitionRoutes.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify(message.transitionRoutes[i]); + if (error) + return "transitionRoutes." + error; + } } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (message.eventHandlers != null && message.hasOwnProperty("eventHandlers")) { + if (!Array.isArray(message.eventHandlers)) + return "eventHandlers: array expected"; + for (var i = 0; i < message.eventHandlers.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.verify(message.eventHandlers[i]); + if (error) + return "eventHandlers." + error; + } + } + if (message.transitionRouteGroups != null && message.hasOwnProperty("transitionRouteGroups")) { + if (!Array.isArray(message.transitionRouteGroups)) + return "transitionRouteGroups: array expected"; + for (var i = 0; i < message.transitionRouteGroups.length; ++i) + if (!$util.isString(message.transitionRouteGroups[i])) + return "transitionRouteGroups: string[] expected"; + } + if (message.nluSettings != null && message.hasOwnProperty("nluSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.verify(message.nluSettings); if (error) - return "updateMask." + error; + return "nluSettings." + error; } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; return null; }; /** - * Creates an UpdateFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Flow message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} UpdateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Flow} Flow */ - UpdateFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest) + Flow.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Flow) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest(); - if (object.flow != null) { - if (typeof object.flow !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.flow: object expected"); - message.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.fromObject(object.flow); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Flow(); + 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.transitionRoutes) { + if (!Array.isArray(object.transitionRoutes)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.transitionRoutes: array expected"); + message.transitionRoutes = []; + for (var i = 0; i < object.transitionRoutes.length; ++i) { + if (typeof object.transitionRoutes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.transitionRoutes: object expected"); + message.transitionRoutes[i] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.fromObject(object.transitionRoutes[i]); + } } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + if (object.eventHandlers) { + if (!Array.isArray(object.eventHandlers)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.eventHandlers: array expected"); + message.eventHandlers = []; + for (var i = 0; i < object.eventHandlers.length; ++i) { + if (typeof object.eventHandlers[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.eventHandlers: object expected"); + message.eventHandlers[i] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.fromObject(object.eventHandlers[i]); + } + } + if (object.transitionRouteGroups) { + if (!Array.isArray(object.transitionRouteGroups)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.transitionRouteGroups: array expected"); + message.transitionRouteGroups = []; + for (var i = 0; i < object.transitionRouteGroups.length; ++i) + message.transitionRouteGroups[i] = String(object.transitionRouteGroups[i]); + } + if (object.nluSettings != null) { + if (typeof object.nluSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.nluSettings: object expected"); + message.nluSettings = $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.fromObject(object.nluSettings); } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from an UpdateFlowRequest message. Also converts values to other types if specified. + * Creates a plain object from a Flow message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @static - * @param {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} message UpdateFlowRequest + * @param {google.cloud.dialogflow.cx.v3beta1.Flow} message Flow * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateFlowRequest.toObject = function toObject(message, options) { + Flow.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.transitionRoutes = []; + object.eventHandlers = []; + object.transitionRouteGroups = []; + } if (options.defaults) { - object.flow = null; - object.updateMask = null; - object.languageCode = ""; + object.name = ""; + object.displayName = ""; + object.description = ""; + object.nluSettings = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.transitionRoutes && message.transitionRoutes.length) { + object.transitionRoutes = []; + for (var j = 0; j < message.transitionRoutes.length; ++j) + object.transitionRoutes[j] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.toObject(message.transitionRoutes[j], options); + } + if (message.eventHandlers && message.eventHandlers.length) { + object.eventHandlers = []; + for (var j = 0; j < message.eventHandlers.length; ++j) + object.eventHandlers[j] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.toObject(message.eventHandlers[j], options); + } + if (message.nluSettings != null && message.hasOwnProperty("nluSettings")) + object.nluSettings = $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.toObject(message.nluSettings, options); + if (message.transitionRouteGroups && message.transitionRouteGroups.length) { + object.transitionRouteGroups = []; + for (var j = 0; j < message.transitionRouteGroups.length; ++j) + object.transitionRouteGroups[j] = message.transitionRouteGroups[j]; } - if (message.flow != null && message.hasOwnProperty("flow")) - object.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.toObject(message.flow, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; return object; }; /** - * Converts this UpdateFlowRequest to JSON. + * Converts this Flow to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @instance * @returns {Object.} JSON object */ - UpdateFlowRequest.prototype.toJSON = function toJSON() { + Flow.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateFlowRequest + * Gets the default type url for Flow * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Flow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Flow"; }; - return UpdateFlowRequest; + return Flow; })(); - v3beta1.TrainFlowRequest = (function() { + v3beta1.CreateFlowRequest = (function() { /** - * Properties of a TrainFlowRequest. + * Properties of a CreateFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ITrainFlowRequest - * @property {string|null} [name] TrainFlowRequest name + * @interface ICreateFlowRequest + * @property {string|null} [parent] CreateFlowRequest parent + * @property {google.cloud.dialogflow.cx.v3beta1.IFlow|null} [flow] CreateFlowRequest flow + * @property {string|null} [languageCode] CreateFlowRequest languageCode */ /** - * Constructs a new TrainFlowRequest. + * Constructs a new CreateFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a TrainFlowRequest. - * @implements ITrainFlowRequest + * @classdesc Represents a CreateFlowRequest. + * @implements ICreateFlowRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest=} [properties] Properties to set */ - function TrainFlowRequest(properties) { + function CreateFlowRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -78003,75 +79197,103 @@ } /** - * TrainFlowRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * CreateFlowRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @instance */ - TrainFlowRequest.prototype.name = ""; + CreateFlowRequest.prototype.parent = ""; /** - * Creates a new TrainFlowRequest instance using the specified properties. + * CreateFlowRequest flow. + * @member {google.cloud.dialogflow.cx.v3beta1.IFlow|null|undefined} flow + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @instance + */ + CreateFlowRequest.prototype.flow = null; + + /** + * CreateFlowRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @instance + */ + CreateFlowRequest.prototype.languageCode = ""; + + /** + * Creates a new CreateFlowRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} TrainFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} CreateFlowRequest instance */ - TrainFlowRequest.create = function create(properties) { - return new TrainFlowRequest(properties); + CreateFlowRequest.create = function create(properties) { + return new CreateFlowRequest(properties); }; /** - * Encodes the specified TrainFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest.verify|verify} messages. + * Encodes the specified CreateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest} message TrainFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest} message CreateFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TrainFlowRequest.encode = function encode(message, writer) { + CreateFlowRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.flow != null && Object.hasOwnProperty.call(message, "flow")) + $root.google.cloud.dialogflow.cx.v3beta1.Flow.encode(message.flow, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); return writer; }; /** - * Encodes the specified TrainFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest.verify|verify} messages. + * Encodes the specified CreateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest} message TrainFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest} message CreateFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TrainFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TrainFlowRequest message from the specified reader or buffer. + * Decodes a CreateFlowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} TrainFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} CreateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TrainFlowRequest.decode = function decode(reader, length) { + CreateFlowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.decode(reader, reader.uint32()); + break; + } + case 3: { + message.languageCode = reader.string(); break; } default: @@ -78083,123 +79305,145 @@ }; /** - * Decodes a TrainFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateFlowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} TrainFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} CreateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TrainFlowRequest.decodeDelimited = function decodeDelimited(reader) { + CreateFlowRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TrainFlowRequest message. + * Verifies a CreateFlowRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TrainFlowRequest.verify = function verify(message) { + CreateFlowRequest.verify = function verify(message) { if (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.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.flow != null && message.hasOwnProperty("flow")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Flow.verify(message.flow); + if (error) + return "flow." + error; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a TrainFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateFlowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} TrainFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} CreateFlowRequest */ - TrainFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest) + CreateFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.flow != null) { + if (typeof object.flow !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.flow: object expected"); + message.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.fromObject(object.flow); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a TrainFlowRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateFlowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} message TrainFlowRequest + * @param {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} message CreateFlowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TrainFlowRequest.toObject = function toObject(message, options) { + CreateFlowRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.flow = null; + object.languageCode = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.flow != null && message.hasOwnProperty("flow")) + object.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.toObject(message.flow, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this TrainFlowRequest to JSON. + * Converts this CreateFlowRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @instance * @returns {Object.} JSON object */ - TrainFlowRequest.prototype.toJSON = function toJSON() { + CreateFlowRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TrainFlowRequest + * Gets the default type url for CreateFlowRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TrainFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest"; }; - return TrainFlowRequest; + return CreateFlowRequest; })(); - v3beta1.ValidateFlowRequest = (function() { + v3beta1.DeleteFlowRequest = (function() { /** - * Properties of a ValidateFlowRequest. + * Properties of a DeleteFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IValidateFlowRequest - * @property {string|null} [name] ValidateFlowRequest name - * @property {string|null} [languageCode] ValidateFlowRequest languageCode + * @interface IDeleteFlowRequest + * @property {string|null} [name] DeleteFlowRequest name + * @property {boolean|null} [force] DeleteFlowRequest force */ /** - * Constructs a new ValidateFlowRequest. + * Constructs a new DeleteFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ValidateFlowRequest. - * @implements IValidateFlowRequest + * @classdesc Represents a DeleteFlowRequest. + * @implements IDeleteFlowRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest=} [properties] Properties to set */ - function ValidateFlowRequest(properties) { + function DeleteFlowRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -78207,80 +79451,80 @@ } /** - * ValidateFlowRequest name. + * DeleteFlowRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @instance */ - ValidateFlowRequest.prototype.name = ""; + DeleteFlowRequest.prototype.name = ""; /** - * ValidateFlowRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest + * DeleteFlowRequest force. + * @member {boolean} force + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @instance */ - ValidateFlowRequest.prototype.languageCode = ""; + DeleteFlowRequest.prototype.force = false; /** - * Creates a new ValidateFlowRequest instance using the specified properties. + * Creates a new DeleteFlowRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest} ValidateFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} DeleteFlowRequest instance */ - ValidateFlowRequest.create = function create(properties) { - return new ValidateFlowRequest(properties); + DeleteFlowRequest.create = function create(properties) { + return new DeleteFlowRequest(properties); }; /** - * Encodes the specified ValidateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest.verify|verify} messages. + * Encodes the specified DeleteFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest} message ValidateFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest} message DeleteFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateFlowRequest.encode = function encode(message, writer) { + DeleteFlowRequest.encode = function encode(message, writer) { 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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); return writer; }; /** - * Encodes the specified ValidateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest.verify|verify} messages. + * Encodes the specified DeleteFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest} message ValidateFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest} message DeleteFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ValidateFlowRequest message from the specified reader or buffer. + * Decodes a DeleteFlowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest} ValidateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} DeleteFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateFlowRequest.decode = function decode(reader, length) { + DeleteFlowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -78289,7 +79533,7 @@ break; } case 2: { - message.languageCode = reader.string(); + message.force = reader.bool(); break; } default: @@ -78301,132 +79545,134 @@ }; /** - * Decodes a ValidateFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteFlowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest} ValidateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} DeleteFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateFlowRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteFlowRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ValidateFlowRequest message. + * Verifies a DeleteFlowRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ValidateFlowRequest.verify = function verify(message) { + DeleteFlowRequest.verify = function verify(message) { if (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.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; /** - * Creates a ValidateFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteFlowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest} ValidateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} DeleteFlowRequest */ - ValidateFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest) + DeleteFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest(); if (object.name != null) message.name = String(object.name); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + if (object.force != null) + message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from a ValidateFlowRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteFlowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest} message ValidateFlowRequest + * @param {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} message DeleteFlowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValidateFlowRequest.toObject = function toObject(message, options) { + DeleteFlowRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; - object.languageCode = ""; + object.force = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; /** - * Converts this ValidateFlowRequest to JSON. + * Converts this DeleteFlowRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @instance * @returns {Object.} JSON object */ - ValidateFlowRequest.prototype.toJSON = function toJSON() { + DeleteFlowRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ValidateFlowRequest + * Gets the default type url for DeleteFlowRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ValidateFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest"; }; - return ValidateFlowRequest; + return DeleteFlowRequest; })(); - v3beta1.GetFlowValidationResultRequest = (function() { + v3beta1.ListFlowsRequest = (function() { /** - * Properties of a GetFlowValidationResultRequest. + * Properties of a ListFlowsRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IGetFlowValidationResultRequest - * @property {string|null} [name] GetFlowValidationResultRequest name - * @property {string|null} [languageCode] GetFlowValidationResultRequest languageCode + * @interface IListFlowsRequest + * @property {string|null} [parent] ListFlowsRequest parent + * @property {number|null} [pageSize] ListFlowsRequest pageSize + * @property {string|null} [pageToken] ListFlowsRequest pageToken + * @property {string|null} [languageCode] ListFlowsRequest languageCode */ /** - * Constructs a new GetFlowValidationResultRequest. + * Constructs a new ListFlowsRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a GetFlowValidationResultRequest. - * @implements IGetFlowValidationResultRequest + * @classdesc Represents a ListFlowsRequest. + * @implements IListFlowsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest=} [properties] Properties to set */ - function GetFlowValidationResultRequest(properties) { + function ListFlowsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -78434,88 +79680,116 @@ } /** - * GetFlowValidationResultRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * ListFlowsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @instance */ - GetFlowValidationResultRequest.prototype.name = ""; + ListFlowsRequest.prototype.parent = ""; /** - * GetFlowValidationResultRequest languageCode. + * ListFlowsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * @instance + */ + ListFlowsRequest.prototype.pageSize = 0; + + /** + * ListFlowsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * @instance + */ + ListFlowsRequest.prototype.pageToken = ""; + + /** + * ListFlowsRequest languageCode. * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @instance */ - GetFlowValidationResultRequest.prototype.languageCode = ""; + ListFlowsRequest.prototype.languageCode = ""; /** - * Creates a new GetFlowValidationResultRequest instance using the specified properties. + * Creates a new ListFlowsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest} GetFlowValidationResultRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} ListFlowsRequest instance */ - GetFlowValidationResultRequest.create = function create(properties) { - return new GetFlowValidationResultRequest(properties); + ListFlowsRequest.create = function create(properties) { + return new ListFlowsRequest(properties); }; /** - * Encodes the specified GetFlowValidationResultRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest.verify|verify} messages. + * Encodes the specified ListFlowsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest} message GetFlowValidationResultRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest} message ListFlowsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFlowValidationResultRequest.encode = function encode(message, writer) { + ListFlowsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); return writer; }; /** - * Encodes the specified GetFlowValidationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest.verify|verify} messages. + * Encodes the specified ListFlowsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest} message GetFlowValidationResultRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest} message ListFlowsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFlowValidationResultRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListFlowsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetFlowValidationResultRequest message from the specified reader or buffer. + * Decodes a ListFlowsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest} GetFlowValidationResultRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} ListFlowsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetFlowValidationResultRequest.decode = function decode(reader, length) { + ListFlowsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { message.languageCode = reader.string(); break; } @@ -78528,35 +79802,41 @@ }; /** - * Decodes a GetFlowValidationResultRequest message from the specified reader or buffer, length delimited. + * Decodes a ListFlowsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest} GetFlowValidationResultRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} ListFlowsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetFlowValidationResultRequest.decodeDelimited = function decodeDelimited(reader) { + ListFlowsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetFlowValidationResultRequest message. + * Verifies a ListFlowsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetFlowValidationResultRequest.verify = function verify(message) { + ListFlowsRequest.verify = function verify(message) { if (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.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.languageCode != null && message.hasOwnProperty("languageCode")) if (!$util.isString(message.languageCode)) return "languageCode: string expected"; @@ -78564,98 +79844,107 @@ }; /** - * Creates a GetFlowValidationResultRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListFlowsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest} GetFlowValidationResultRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} ListFlowsRequest */ - GetFlowValidationResultRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest) + ListFlowsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest(); + 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.languageCode != null) message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a GetFlowValidationResultRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListFlowsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest} message GetFlowValidationResultRequest + * @param {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} message ListFlowsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetFlowValidationResultRequest.toObject = function toObject(message, options) { + ListFlowsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; object.languageCode = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + 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.languageCode != null && message.hasOwnProperty("languageCode")) object.languageCode = message.languageCode; return object; }; /** - * Converts this GetFlowValidationResultRequest to JSON. + * Converts this ListFlowsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @instance * @returns {Object.} JSON object */ - GetFlowValidationResultRequest.prototype.toJSON = function toJSON() { + ListFlowsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetFlowValidationResultRequest + * Gets the default type url for ListFlowsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetFlowValidationResultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListFlowsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest"; }; - return GetFlowValidationResultRequest; + return ListFlowsRequest; })(); - v3beta1.FlowValidationResult = (function() { + v3beta1.ListFlowsResponse = (function() { /** - * Properties of a FlowValidationResult. + * Properties of a ListFlowsResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IFlowValidationResult - * @property {string|null} [name] FlowValidationResult name - * @property {Array.|null} [validationMessages] FlowValidationResult validationMessages - * @property {google.protobuf.ITimestamp|null} [updateTime] FlowValidationResult updateTime + * @interface IListFlowsResponse + * @property {Array.|null} [flows] ListFlowsResponse flows + * @property {string|null} [nextPageToken] ListFlowsResponse nextPageToken */ /** - * Constructs a new FlowValidationResult. + * Constructs a new ListFlowsResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a FlowValidationResult. - * @implements IFlowValidationResult + * @classdesc Represents a ListFlowsResponse. + * @implements IListFlowsResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse=} [properties] Properties to set */ - function FlowValidationResult(properties) { - this.validationMessages = []; + function ListFlowsResponse(properties) { + this.flows = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -78663,106 +79952,92 @@ } /** - * FlowValidationResult name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult - * @instance - */ - FlowValidationResult.prototype.name = ""; - - /** - * FlowValidationResult validationMessages. - * @member {Array.} validationMessages - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * ListFlowsResponse flows. + * @member {Array.} flows + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse * @instance */ - FlowValidationResult.prototype.validationMessages = $util.emptyArray; + ListFlowsResponse.prototype.flows = $util.emptyArray; /** - * FlowValidationResult updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * ListFlowsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse * @instance */ - FlowValidationResult.prototype.updateTime = null; + ListFlowsResponse.prototype.nextPageToken = ""; /** - * Creates a new FlowValidationResult instance using the specified properties. + * Creates a new ListFlowsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} FlowValidationResult instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} ListFlowsResponse instance */ - FlowValidationResult.create = function create(properties) { - return new FlowValidationResult(properties); + ListFlowsResponse.create = function create(properties) { + return new ListFlowsResponse(properties); }; /** - * Encodes the specified FlowValidationResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.verify|verify} messages. + * Encodes the specified ListFlowsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult} message FlowValidationResult message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse} message ListFlowsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FlowValidationResult.encode = function encode(message, writer) { + ListFlowsResponse.encode = function encode(message, writer) { 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.validationMessages != null && message.validationMessages.length) - for (var i = 0; i < message.validationMessages.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.encode(message.validationMessages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.flows != null && message.flows.length) + for (var i = 0; i < message.flows.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.Flow.encode(message.flows[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 FlowValidationResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.verify|verify} messages. + * Encodes the specified ListFlowsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult} message FlowValidationResult message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse} message ListFlowsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FlowValidationResult.encodeDelimited = function encodeDelimited(message, writer) { + ListFlowsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FlowValidationResult message from the specified reader or buffer. + * Decodes a ListFlowsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} FlowValidationResult + * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} ListFlowsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FlowValidationResult.decode = function decode(reader, length) { + ListFlowsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.flows && message.flows.length)) + message.flows = []; + message.flows.push($root.google.cloud.dialogflow.cx.v3beta1.Flow.decode(reader, reader.uint32())); break; } case 2: { - if (!(message.validationMessages && message.validationMessages.length)) - message.validationMessages = []; - message.validationMessages.push($root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.decode(reader, reader.uint32())); - break; - } - case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } default: @@ -78774,165 +80049,149 @@ }; /** - * Decodes a FlowValidationResult message from the specified reader or buffer, length delimited. + * Decodes a ListFlowsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} FlowValidationResult + * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} ListFlowsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FlowValidationResult.decodeDelimited = function decodeDelimited(reader) { + ListFlowsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FlowValidationResult message. + * Verifies a ListFlowsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FlowValidationResult.verify = function verify(message) { + ListFlowsResponse.verify = function verify(message) { if (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.validationMessages != null && message.hasOwnProperty("validationMessages")) { - if (!Array.isArray(message.validationMessages)) - return "validationMessages: array expected"; - for (var i = 0; i < message.validationMessages.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.verify(message.validationMessages[i]); + if (message.flows != null && message.hasOwnProperty("flows")) { + if (!Array.isArray(message.flows)) + return "flows: array expected"; + for (var i = 0; i < message.flows.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Flow.verify(message.flows[i]); if (error) - return "validationMessages." + error; + return "flows." + error; } } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a FlowValidationResult message from a plain object. Also converts values to their respective internal types. + * Creates a ListFlowsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} FlowValidationResult + * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} ListFlowsResponse */ - FlowValidationResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult) + ListFlowsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult(); - if (object.name != null) - message.name = String(object.name); - if (object.validationMessages) { - if (!Array.isArray(object.validationMessages)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.validationMessages: array expected"); - message.validationMessages = []; - for (var i = 0; i < object.validationMessages.length; ++i) { - if (typeof object.validationMessages[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.validationMessages: object expected"); - message.validationMessages[i] = $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.fromObject(object.validationMessages[i]); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse(); + if (object.flows) { + if (!Array.isArray(object.flows)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.flows: array expected"); + message.flows = []; + for (var i = 0; i < object.flows.length; ++i) { + if (typeof object.flows[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.flows: object expected"); + message.flows[i] = $root.google.cloud.dialogflow.cx.v3beta1.Flow.fromObject(object.flows[i]); } } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a FlowValidationResult message. Also converts values to other types if specified. + * Creates a plain object from a ListFlowsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} message FlowValidationResult + * @param {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} message ListFlowsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FlowValidationResult.toObject = function toObject(message, options) { + ListFlowsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.validationMessages = []; - if (options.defaults) { - object.name = ""; - object.updateTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.validationMessages && message.validationMessages.length) { - object.validationMessages = []; - for (var j = 0; j < message.validationMessages.length; ++j) - object.validationMessages[j] = $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.toObject(message.validationMessages[j], options); + object.flows = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.flows && message.flows.length) { + object.flows = []; + for (var j = 0; j < message.flows.length; ++j) + object.flows[j] = $root.google.cloud.dialogflow.cx.v3beta1.Flow.toObject(message.flows[j], options); } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this FlowValidationResult to JSON. + * Converts this ListFlowsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse * @instance * @returns {Object.} JSON object */ - FlowValidationResult.prototype.toJSON = function toJSON() { + ListFlowsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FlowValidationResult + * Gets the default type url for ListFlowsResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FlowValidationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListFlowsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.FlowValidationResult"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse"; }; - return FlowValidationResult; + return ListFlowsResponse; })(); - v3beta1.ImportFlowRequest = (function() { + v3beta1.GetFlowRequest = (function() { /** - * Properties of an ImportFlowRequest. + * Properties of a GetFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IImportFlowRequest - * @property {string|null} [parent] ImportFlowRequest parent - * @property {string|null} [flowUri] ImportFlowRequest flowUri - * @property {Uint8Array|null} [flowContent] ImportFlowRequest flowContent - * @property {google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption|null} [importOption] ImportFlowRequest importOption + * @interface IGetFlowRequest + * @property {string|null} [name] GetFlowRequest name + * @property {string|null} [languageCode] GetFlowRequest languageCode */ /** - * Constructs a new ImportFlowRequest. + * Constructs a new GetFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an ImportFlowRequest. - * @implements IImportFlowRequest + * @classdesc Represents a GetFlowRequest. + * @implements IGetFlowRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest=} [properties] Properties to set */ - function ImportFlowRequest(properties) { + function GetFlowRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -78940,131 +80199,331 @@ } /** - * ImportFlowRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * GetFlowRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest * @instance */ - ImportFlowRequest.prototype.parent = ""; + GetFlowRequest.prototype.name = ""; /** - * ImportFlowRequest flowUri. - * @member {string|null|undefined} flowUri - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * GetFlowRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest * @instance */ - ImportFlowRequest.prototype.flowUri = null; + GetFlowRequest.prototype.languageCode = ""; /** - * ImportFlowRequest flowContent. - * @member {Uint8Array|null|undefined} flowContent - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest - * @instance + * Creates a new GetFlowRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} GetFlowRequest instance */ - ImportFlowRequest.prototype.flowContent = null; + GetFlowRequest.create = function create(properties) { + return new GetFlowRequest(properties); + }; /** - * ImportFlowRequest importOption. - * @member {google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption} importOption - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * Encodes the specified GetFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest} message GetFlowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetFlowRequest.encode = function encode(message, writer) { + 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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + return writer; + }; + + /** + * Encodes the specified GetFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest} message GetFlowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetFlowRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} GetFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFlowRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.languageCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetFlowRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} GetFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFlowRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetFlowRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetFlowRequest.verify = function verify(message) { + if (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.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + return null; + }; + + /** + * Creates a GetFlowRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} GetFlowRequest + */ + GetFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + return message; + }; + + /** + * Creates a plain object from a GetFlowRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} message GetFlowRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetFlowRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.languageCode = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + return object; + }; + + /** + * Converts this GetFlowRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest * @instance + * @returns {Object.} JSON object */ - ImportFlowRequest.prototype.importOption = 0; + GetFlowRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Gets the default type url for GetFlowRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GetFlowRequest"; + }; + + return GetFlowRequest; + })(); + + v3beta1.UpdateFlowRequest = (function() { /** - * ImportFlowRequest flow. - * @member {"flowUri"|"flowContent"|undefined} flow - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * Properties of an UpdateFlowRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IUpdateFlowRequest + * @property {google.cloud.dialogflow.cx.v3beta1.IFlow|null} [flow] UpdateFlowRequest flow + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFlowRequest updateMask + * @property {string|null} [languageCode] UpdateFlowRequest languageCode + */ + + /** + * Constructs a new UpdateFlowRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents an UpdateFlowRequest. + * @implements IUpdateFlowRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest=} [properties] Properties to set + */ + function UpdateFlowRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateFlowRequest flow. + * @member {google.cloud.dialogflow.cx.v3beta1.IFlow|null|undefined} flow + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest * @instance */ - Object.defineProperty(ImportFlowRequest.prototype, "flow", { - get: $util.oneOfGetter($oneOfFields = ["flowUri", "flowContent"]), - set: $util.oneOfSetter($oneOfFields) - }); + UpdateFlowRequest.prototype.flow = null; /** - * Creates a new ImportFlowRequest instance using the specified properties. + * UpdateFlowRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @instance + */ + UpdateFlowRequest.prototype.updateMask = null; + + /** + * UpdateFlowRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @instance + */ + UpdateFlowRequest.prototype.languageCode = ""; + + /** + * Creates a new UpdateFlowRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest} ImportFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} UpdateFlowRequest instance */ - ImportFlowRequest.create = function create(properties) { - return new ImportFlowRequest(properties); + UpdateFlowRequest.create = function create(properties) { + return new UpdateFlowRequest(properties); }; /** - * Encodes the specified ImportFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.verify|verify} messages. + * Encodes the specified UpdateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest} message ImportFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest} message UpdateFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportFlowRequest.encode = function encode(message, writer) { + UpdateFlowRequest.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.flowUri != null && Object.hasOwnProperty.call(message, "flowUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.flowUri); - if (message.flowContent != null && Object.hasOwnProperty.call(message, "flowContent")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.flowContent); - if (message.importOption != null && Object.hasOwnProperty.call(message, "importOption")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.importOption); + if (message.flow != null && Object.hasOwnProperty.call(message, "flow")) + $root.google.cloud.dialogflow.cx.v3beta1.Flow.encode(message.flow, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); return writer; }; /** - * Encodes the specified ImportFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.verify|verify} messages. + * Encodes the specified UpdateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest} message ImportFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest} message UpdateFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportFlowRequest message from the specified reader or buffer. + * Decodes an UpdateFlowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest} ImportFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} UpdateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportFlowRequest.decode = function decode(reader, length) { + UpdateFlowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.decode(reader, reader.uint32()); break; } case 2: { - message.flowUri = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } case 3: { - message.flowContent = reader.bytes(); - break; - } - case 4: { - message.importOption = reader.int32(); + message.languageCode = reader.string(); break; } default: @@ -79076,201 +80535,149 @@ }; /** - * Decodes an ImportFlowRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateFlowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest} ImportFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} UpdateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportFlowRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateFlowRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportFlowRequest message. + * Verifies an UpdateFlowRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportFlowRequest.verify = function verify(message) { + UpdateFlowRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.flowUri != null && message.hasOwnProperty("flowUri")) { - properties.flow = 1; - if (!$util.isString(message.flowUri)) - return "flowUri: string expected"; + if (message.flow != null && message.hasOwnProperty("flow")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Flow.verify(message.flow); + if (error) + return "flow." + error; } - if (message.flowContent != null && message.hasOwnProperty("flowContent")) { - if (properties.flow === 1) - return "flow: multiple values"; - properties.flow = 1; - if (!(message.flowContent && typeof message.flowContent.length === "number" || $util.isString(message.flowContent))) - return "flowContent: buffer expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } - if (message.importOption != null && message.hasOwnProperty("importOption")) - switch (message.importOption) { - default: - return "importOption: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates an ImportFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateFlowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest} ImportFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} UpdateFlowRequest */ - ImportFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest) + UpdateFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.flowUri != null) - message.flowUri = String(object.flowUri); - if (object.flowContent != null) - if (typeof object.flowContent === "string") - $util.base64.decode(object.flowContent, message.flowContent = $util.newBuffer($util.base64.length(object.flowContent)), 0); - else if (object.flowContent.length >= 0) - message.flowContent = object.flowContent; - switch (object.importOption) { - default: - if (typeof object.importOption === "number") { - message.importOption = object.importOption; - break; - } - break; - case "IMPORT_OPTION_UNSPECIFIED": - case 0: - message.importOption = 0; - break; - case "KEEP": - case 1: - message.importOption = 1; - break; - case "FALLBACK": - case 2: - message.importOption = 2; - break; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest(); + if (object.flow != null) { + if (typeof object.flow !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.flow: object expected"); + message.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.fromObject(object.flow); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from an ImportFlowRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateFlowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest} message ImportFlowRequest + * @param {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} message UpdateFlowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportFlowRequest.toObject = function toObject(message, options) { + UpdateFlowRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.importOption = options.enums === String ? "IMPORT_OPTION_UNSPECIFIED" : 0; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.flowUri != null && message.hasOwnProperty("flowUri")) { - object.flowUri = message.flowUri; - if (options.oneofs) - object.flow = "flowUri"; - } - if (message.flowContent != null && message.hasOwnProperty("flowContent")) { - object.flowContent = options.bytes === String ? $util.base64.encode(message.flowContent, 0, message.flowContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.flowContent) : message.flowContent; - if (options.oneofs) - object.flow = "flowContent"; + object.flow = null; + object.updateMask = null; + object.languageCode = ""; } - if (message.importOption != null && message.hasOwnProperty("importOption")) - object.importOption = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption[message.importOption] === undefined ? message.importOption : $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption[message.importOption] : message.importOption; + if (message.flow != null && message.hasOwnProperty("flow")) + object.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.toObject(message.flow, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this ImportFlowRequest to JSON. + * Converts this UpdateFlowRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest * @instance * @returns {Object.} JSON object */ - ImportFlowRequest.prototype.toJSON = function toJSON() { + UpdateFlowRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportFlowRequest + * Gets the default type url for UpdateFlowRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest"; }; - /** - * ImportOption enum. - * @name google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption - * @enum {number} - * @property {number} IMPORT_OPTION_UNSPECIFIED=0 IMPORT_OPTION_UNSPECIFIED value - * @property {number} KEEP=1 KEEP value - * @property {number} FALLBACK=2 FALLBACK value - */ - ImportFlowRequest.ImportOption = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IMPORT_OPTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "KEEP"] = 1; - values[valuesById[2] = "FALLBACK"] = 2; - return values; - })(); - - return ImportFlowRequest; + return UpdateFlowRequest; })(); - v3beta1.ImportFlowResponse = (function() { + v3beta1.TrainFlowRequest = (function() { /** - * Properties of an ImportFlowResponse. + * Properties of a TrainFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IImportFlowResponse - * @property {string|null} [flow] ImportFlowResponse flow + * @interface ITrainFlowRequest + * @property {string|null} [name] TrainFlowRequest name */ /** - * Constructs a new ImportFlowResponse. + * Constructs a new TrainFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an ImportFlowResponse. - * @implements IImportFlowResponse + * @classdesc Represents a TrainFlowRequest. + * @implements ITrainFlowRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest=} [properties] Properties to set */ - function ImportFlowResponse(properties) { + function TrainFlowRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -79278,75 +80685,75 @@ } /** - * ImportFlowResponse flow. - * @member {string} flow - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse + * TrainFlowRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @instance */ - ImportFlowResponse.prototype.flow = ""; + TrainFlowRequest.prototype.name = ""; /** - * Creates a new ImportFlowResponse instance using the specified properties. + * Creates a new TrainFlowRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse} ImportFlowResponse instance + * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} TrainFlowRequest instance */ - ImportFlowResponse.create = function create(properties) { - return new ImportFlowResponse(properties); + TrainFlowRequest.create = function create(properties) { + return new TrainFlowRequest(properties); }; /** - * Encodes the specified ImportFlowResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse.verify|verify} messages. + * Encodes the specified TrainFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse} message ImportFlowResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest} message TrainFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportFlowResponse.encode = function encode(message, writer) { + TrainFlowRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.flow != null && Object.hasOwnProperty.call(message, "flow")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.flow); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ImportFlowResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse.verify|verify} messages. + * Encodes the specified TrainFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse} message ImportFlowResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest} message TrainFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportFlowResponse.encodeDelimited = function encodeDelimited(message, writer) { + TrainFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportFlowResponse message from the specified reader or buffer. + * Decodes a TrainFlowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse} ImportFlowResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} TrainFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportFlowResponse.decode = function decode(reader, length) { + TrainFlowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.flow = reader.string(); + message.name = reader.string(); break; } default: @@ -79358,124 +80765,123 @@ }; /** - * Decodes an ImportFlowResponse message from the specified reader or buffer, length delimited. + * Decodes a TrainFlowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse} ImportFlowResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} TrainFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportFlowResponse.decodeDelimited = function decodeDelimited(reader) { + TrainFlowRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportFlowResponse message. + * Verifies a TrainFlowRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportFlowResponse.verify = function verify(message) { + TrainFlowRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.flow != null && message.hasOwnProperty("flow")) - if (!$util.isString(message.flow)) - return "flow: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an ImportFlowResponse message from a plain object. Also converts values to their respective internal types. + * Creates a TrainFlowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse} ImportFlowResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} TrainFlowRequest */ - ImportFlowResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse) + TrainFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse(); - if (object.flow != null) - message.flow = String(object.flow); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an ImportFlowResponse message. Also converts values to other types if specified. + * Creates a plain object from a TrainFlowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse} message ImportFlowResponse + * @param {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} message TrainFlowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportFlowResponse.toObject = function toObject(message, options) { + TrainFlowRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.flow = ""; - if (message.flow != null && message.hasOwnProperty("flow")) - object.flow = message.flow; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ImportFlowResponse to JSON. + * Converts this TrainFlowRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @instance * @returns {Object.} JSON object */ - ImportFlowResponse.prototype.toJSON = function toJSON() { + TrainFlowRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportFlowResponse + * Gets the default type url for TrainFlowRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportFlowResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TrainFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest"; }; - return ImportFlowResponse; + return TrainFlowRequest; })(); - v3beta1.ExportFlowRequest = (function() { + v3beta1.ValidateFlowRequest = (function() { /** - * Properties of an ExportFlowRequest. + * Properties of a ValidateFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IExportFlowRequest - * @property {string|null} [name] ExportFlowRequest name - * @property {string|null} [flowUri] ExportFlowRequest flowUri - * @property {boolean|null} [includeReferencedFlows] ExportFlowRequest includeReferencedFlows + * @interface IValidateFlowRequest + * @property {string|null} [name] ValidateFlowRequest name + * @property {string|null} [languageCode] ValidateFlowRequest languageCode */ /** - * Constructs a new ExportFlowRequest. + * Constructs a new ValidateFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an ExportFlowRequest. - * @implements IExportFlowRequest + * @classdesc Represents a ValidateFlowRequest. + * @implements IValidateFlowRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest=} [properties] Properties to set */ - function ExportFlowRequest(properties) { + function ValidateFlowRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -79483,90 +80889,80 @@ } /** - * ExportFlowRequest name. + * ValidateFlowRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest - * @instance - */ - ExportFlowRequest.prototype.name = ""; - - /** - * ExportFlowRequest flowUri. - * @member {string} flowUri - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest * @instance */ - ExportFlowRequest.prototype.flowUri = ""; + ValidateFlowRequest.prototype.name = ""; /** - * ExportFlowRequest includeReferencedFlows. - * @member {boolean} includeReferencedFlows - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * ValidateFlowRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest * @instance */ - ExportFlowRequest.prototype.includeReferencedFlows = false; + ValidateFlowRequest.prototype.languageCode = ""; /** - * Creates a new ExportFlowRequest instance using the specified properties. + * Creates a new ValidateFlowRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest} ExportFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest} ValidateFlowRequest instance */ - ExportFlowRequest.create = function create(properties) { - return new ExportFlowRequest(properties); + ValidateFlowRequest.create = function create(properties) { + return new ValidateFlowRequest(properties); }; /** - * Encodes the specified ExportFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest.verify|verify} messages. + * Encodes the specified ValidateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest} message ExportFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest} message ValidateFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportFlowRequest.encode = function encode(message, writer) { + ValidateFlowRequest.encode = function encode(message, writer) { 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.flowUri != null && Object.hasOwnProperty.call(message, "flowUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.flowUri); - if (message.includeReferencedFlows != null && Object.hasOwnProperty.call(message, "includeReferencedFlows")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.includeReferencedFlows); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); return writer; }; /** - * Encodes the specified ExportFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest.verify|verify} messages. + * Encodes the specified ValidateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest} message ExportFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest} message ValidateFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + ValidateFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportFlowRequest message from the specified reader or buffer. + * Decodes a ValidateFlowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest} ExportFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest} ValidateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportFlowRequest.decode = function decode(reader, length) { + ValidateFlowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -79575,11 +80971,7 @@ break; } case 2: { - message.flowUri = reader.string(); - break; - } - case 4: { - message.includeReferencedFlows = reader.bool(); + message.languageCode = reader.string(); break; } default: @@ -79591,140 +80983,132 @@ }; /** - * Decodes an ExportFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a ValidateFlowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest} ExportFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest} ValidateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportFlowRequest.decodeDelimited = function decodeDelimited(reader) { + ValidateFlowRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportFlowRequest message. + * Verifies a ValidateFlowRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportFlowRequest.verify = function verify(message) { + ValidateFlowRequest.verify = function verify(message) { if (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.flowUri != null && message.hasOwnProperty("flowUri")) - if (!$util.isString(message.flowUri)) - return "flowUri: string expected"; - if (message.includeReferencedFlows != null && message.hasOwnProperty("includeReferencedFlows")) - if (typeof message.includeReferencedFlows !== "boolean") - return "includeReferencedFlows: boolean expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates an ExportFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateFlowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest} ExportFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest} ValidateFlowRequest */ - ExportFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest) + ValidateFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest(); if (object.name != null) message.name = String(object.name); - if (object.flowUri != null) - message.flowUri = String(object.flowUri); - if (object.includeReferencedFlows != null) - message.includeReferencedFlows = Boolean(object.includeReferencedFlows); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from an ExportFlowRequest message. Also converts values to other types if specified. + * Creates a plain object from a ValidateFlowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest} message ExportFlowRequest + * @param {google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest} message ValidateFlowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportFlowRequest.toObject = function toObject(message, options) { + ValidateFlowRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; - object.flowUri = ""; - object.includeReferencedFlows = false; + object.languageCode = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.flowUri != null && message.hasOwnProperty("flowUri")) - object.flowUri = message.flowUri; - if (message.includeReferencedFlows != null && message.hasOwnProperty("includeReferencedFlows")) - object.includeReferencedFlows = message.includeReferencedFlows; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this ExportFlowRequest to JSON. + * Converts this ValidateFlowRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest * @instance * @returns {Object.} JSON object */ - ExportFlowRequest.prototype.toJSON = function toJSON() { + ValidateFlowRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExportFlowRequest + * Gets the default type url for ValidateFlowRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExportFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ValidateFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest"; }; - return ExportFlowRequest; + return ValidateFlowRequest; })(); - v3beta1.ExportFlowResponse = (function() { + v3beta1.GetFlowValidationResultRequest = (function() { /** - * Properties of an ExportFlowResponse. + * Properties of a GetFlowValidationResultRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IExportFlowResponse - * @property {string|null} [flowUri] ExportFlowResponse flowUri - * @property {Uint8Array|null} [flowContent] ExportFlowResponse flowContent + * @interface IGetFlowValidationResultRequest + * @property {string|null} [name] GetFlowValidationResultRequest name + * @property {string|null} [languageCode] GetFlowValidationResultRequest languageCode */ /** - * Constructs a new ExportFlowResponse. + * Constructs a new GetFlowValidationResultRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an ExportFlowResponse. - * @implements IExportFlowResponse + * @classdesc Represents a GetFlowValidationResultRequest. + * @implements IGetFlowValidationResultRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest=} [properties] Properties to set */ - function ExportFlowResponse(properties) { + function GetFlowValidationResultRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -79732,103 +81116,89 @@ } /** - * ExportFlowResponse flowUri. - * @member {string|null|undefined} flowUri - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse - * @instance - */ - ExportFlowResponse.prototype.flowUri = null; - - /** - * ExportFlowResponse flowContent. - * @member {Uint8Array|null|undefined} flowContent - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse + * GetFlowValidationResultRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest * @instance */ - ExportFlowResponse.prototype.flowContent = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + GetFlowValidationResultRequest.prototype.name = ""; /** - * ExportFlowResponse flow. - * @member {"flowUri"|"flowContent"|undefined} flow - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse + * GetFlowValidationResultRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest * @instance */ - Object.defineProperty(ExportFlowResponse.prototype, "flow", { - get: $util.oneOfGetter($oneOfFields = ["flowUri", "flowContent"]), - set: $util.oneOfSetter($oneOfFields) - }); + GetFlowValidationResultRequest.prototype.languageCode = ""; /** - * Creates a new ExportFlowResponse instance using the specified properties. + * Creates a new GetFlowValidationResultRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse} ExportFlowResponse instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest} GetFlowValidationResultRequest instance */ - ExportFlowResponse.create = function create(properties) { - return new ExportFlowResponse(properties); + GetFlowValidationResultRequest.create = function create(properties) { + return new GetFlowValidationResultRequest(properties); }; /** - * Encodes the specified ExportFlowResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse.verify|verify} messages. + * Encodes the specified GetFlowValidationResultRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse} message ExportFlowResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest} message GetFlowValidationResultRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportFlowResponse.encode = function encode(message, writer) { + GetFlowValidationResultRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.flowUri != null && Object.hasOwnProperty.call(message, "flowUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.flowUri); - if (message.flowContent != null && Object.hasOwnProperty.call(message, "flowContent")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.flowContent); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); return writer; }; /** - * Encodes the specified ExportFlowResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse.verify|verify} messages. + * Encodes the specified GetFlowValidationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse} message ExportFlowResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest} message GetFlowValidationResultRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportFlowResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetFlowValidationResultRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportFlowResponse message from the specified reader or buffer. + * Decodes a GetFlowValidationResultRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse} ExportFlowResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest} GetFlowValidationResultRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportFlowResponse.decode = function decode(reader, length) { + GetFlowValidationResultRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.flowUri = reader.string(); + message.name = reader.string(); break; } case 2: { - message.flowContent = reader.bytes(); + message.languageCode = reader.string(); break; } default: @@ -79840,352 +81210,411 @@ }; /** - * Decodes an ExportFlowResponse message from the specified reader or buffer, length delimited. + * Decodes a GetFlowValidationResultRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse} ExportFlowResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest} GetFlowValidationResultRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportFlowResponse.decodeDelimited = function decodeDelimited(reader) { + GetFlowValidationResultRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportFlowResponse message. + * Verifies a GetFlowValidationResultRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportFlowResponse.verify = function verify(message) { + GetFlowValidationResultRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.flowUri != null && message.hasOwnProperty("flowUri")) { - properties.flow = 1; - if (!$util.isString(message.flowUri)) - return "flowUri: string expected"; - } - if (message.flowContent != null && message.hasOwnProperty("flowContent")) { - if (properties.flow === 1) - return "flow: multiple values"; - properties.flow = 1; - if (!(message.flowContent && typeof message.flowContent.length === "number" || $util.isString(message.flowContent))) - return "flowContent: buffer expected"; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates an ExportFlowResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetFlowValidationResultRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse} ExportFlowResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest} GetFlowValidationResultRequest */ - ExportFlowResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse) + GetFlowValidationResultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse(); - if (object.flowUri != null) - message.flowUri = String(object.flowUri); - if (object.flowContent != null) - if (typeof object.flowContent === "string") - $util.base64.decode(object.flowContent, message.flowContent = $util.newBuffer($util.base64.length(object.flowContent)), 0); - else if (object.flowContent.length >= 0) - message.flowContent = object.flowContent; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from an ExportFlowResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetFlowValidationResultRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse} message ExportFlowResponse + * @param {google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest} message GetFlowValidationResultRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportFlowResponse.toObject = function toObject(message, options) { + GetFlowValidationResultRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.flowUri != null && message.hasOwnProperty("flowUri")) { - object.flowUri = message.flowUri; - if (options.oneofs) - object.flow = "flowUri"; - } - if (message.flowContent != null && message.hasOwnProperty("flowContent")) { - object.flowContent = options.bytes === String ? $util.base64.encode(message.flowContent, 0, message.flowContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.flowContent) : message.flowContent; - if (options.oneofs) - object.flow = "flowContent"; + if (options.defaults) { + object.name = ""; + object.languageCode = ""; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this ExportFlowResponse to JSON. + * Converts this GetFlowValidationResultRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest * @instance * @returns {Object.} JSON object */ - ExportFlowResponse.prototype.toJSON = function toJSON() { + GetFlowValidationResultRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExportFlowResponse + * Gets the default type url for GetFlowValidationResultRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExportFlowResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetFlowValidationResultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest"; }; - return ExportFlowResponse; + return GetFlowValidationResultRequest; })(); - v3beta1.Pages = (function() { + v3beta1.FlowValidationResult = (function() { /** - * Constructs a new Pages service. + * Properties of a FlowValidationResult. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a Pages - * @extends $protobuf.rpc.Service + * @interface IFlowValidationResult + * @property {string|null} [name] FlowValidationResult name + * @property {Array.|null} [validationMessages] FlowValidationResult validationMessages + * @property {google.protobuf.ITimestamp|null} [updateTime] FlowValidationResult updateTime + */ + + /** + * Constructs a new FlowValidationResult. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a FlowValidationResult. + * @implements IFlowValidationResult * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @param {google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult=} [properties] Properties to set */ - function Pages(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + function FlowValidationResult(properties) { + this.validationMessages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - (Pages.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Pages; - /** - * Creates new Pages service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @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 {Pages} RPC service. Useful where requests and/or responses are streamed. + * FlowValidationResult name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @instance */ - Pages.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + FlowValidationResult.prototype.name = ""; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|listPages}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @typedef ListPagesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} [response] ListPagesResponse + * FlowValidationResult validationMessages. + * @member {Array.} validationMessages + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @instance */ + FlowValidationResult.prototype.validationMessages = $util.emptyArray; /** - * Calls ListPages. - * @function listPages - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * FlowValidationResult updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest} request ListPagesRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Pages.ListPagesCallback} callback Node-style callback called with the error, if any, and ListPagesResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(Pages.prototype.listPages = function listPages(request, callback) { - return this.rpcCall(listPages, $root.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListPagesResponse, request, callback); - }, "name", { value: "ListPages" }); + FlowValidationResult.prototype.updateTime = null; /** - * Calls ListPages. - * @function listPages - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest} request ListPagesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|getPage}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @typedef GetPageCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.Page} [response] Page - */ - - /** - * Calls GetPage. - * @function getPage - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest} request GetPageRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Pages.GetPageCallback} callback Node-style callback called with the error, if any, and Page - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Pages.prototype.getPage = function getPage(request, callback) { - return this.rpcCall(getPage, $root.google.cloud.dialogflow.cx.v3beta1.GetPageRequest, $root.google.cloud.dialogflow.cx.v3beta1.Page, request, callback); - }, "name", { value: "GetPage" }); - - /** - * Calls GetPage. - * @function getPage - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest} request GetPageRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new FlowValidationResult instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} FlowValidationResult instance */ + FlowValidationResult.create = function create(properties) { + return new FlowValidationResult(properties); + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|createPage}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @typedef CreatePageCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.Page} [response] Page + * Encodes the specified FlowValidationResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult} message FlowValidationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + FlowValidationResult.encode = function encode(message, writer) { + 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.validationMessages != null && message.validationMessages.length) + for (var i = 0; i < message.validationMessages.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.encode(message.validationMessages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; /** - * Calls CreatePage. - * @function createPage - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest} request CreatePageRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Pages.CreatePageCallback} callback Node-style callback called with the error, if any, and Page - * @returns {undefined} - * @variation 1 + * Encodes the specified FlowValidationResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult} message FlowValidationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(Pages.prototype.createPage = function createPage(request, callback) { - return this.rpcCall(createPage, $root.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest, $root.google.cloud.dialogflow.cx.v3beta1.Page, request, callback); - }, "name", { value: "CreatePage" }); + FlowValidationResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls CreatePage. - * @function createPage - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest} request CreatePageRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a FlowValidationResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} FlowValidationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + FlowValidationResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.validationMessages && message.validationMessages.length)) + message.validationMessages = []; + message.validationMessages.push($root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.decode(reader, reader.uint32())); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|updatePage}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @typedef UpdatePageCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.Page} [response] Page + * Decodes a FlowValidationResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} FlowValidationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + FlowValidationResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls UpdatePage. - * @function updatePage - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest} request UpdatePageRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Pages.UpdatePageCallback} callback Node-style callback called with the error, if any, and Page - * @returns {undefined} - * @variation 1 + * Verifies a FlowValidationResult message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(Pages.prototype.updatePage = function updatePage(request, callback) { - return this.rpcCall(updatePage, $root.google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest, $root.google.cloud.dialogflow.cx.v3beta1.Page, request, callback); - }, "name", { value: "UpdatePage" }); + FlowValidationResult.verify = function verify(message) { + if (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.validationMessages != null && message.hasOwnProperty("validationMessages")) { + if (!Array.isArray(message.validationMessages)) + return "validationMessages: array expected"; + for (var i = 0; i < message.validationMessages.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.verify(message.validationMessages[i]); + if (error) + return "validationMessages." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; /** - * Calls UpdatePage. - * @function updatePage - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest} request UpdatePageRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a FlowValidationResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} FlowValidationResult */ + FlowValidationResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult(); + if (object.name != null) + message.name = String(object.name); + if (object.validationMessages) { + if (!Array.isArray(object.validationMessages)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.validationMessages: array expected"); + message.validationMessages = []; + for (var i = 0; i < object.validationMessages.length; ++i) { + if (typeof object.validationMessages[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.validationMessages: object expected"); + message.validationMessages[i] = $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.fromObject(object.validationMessages[i]); + } + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|deletePage}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @typedef DeletePageCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates a plain object from a FlowValidationResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} message FlowValidationResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + FlowValidationResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.validationMessages = []; + if (options.defaults) { + object.name = ""; + object.updateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.validationMessages && message.validationMessages.length) { + object.validationMessages = []; + for (var j = 0; j < message.validationMessages.length; ++j) + object.validationMessages[j] = $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.toObject(message.validationMessages[j], options); + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; /** - * Calls DeletePage. - * @function deletePage - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * Converts this FlowValidationResult to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest} request DeletePageRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Pages.DeletePageCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(Pages.prototype.deletePage = function deletePage(request, callback) { - return this.rpcCall(deletePage, $root.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeletePage" }); + FlowValidationResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls DeletePage. - * @function deletePage - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest} request DeletePageRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for FlowValidationResult + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + FlowValidationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.FlowValidationResult"; + }; - return Pages; + return FlowValidationResult; })(); - v3beta1.Page = (function() { + v3beta1.ImportFlowRequest = (function() { /** - * Properties of a Page. + * Properties of an ImportFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IPage - * @property {string|null} [name] Page name - * @property {string|null} [displayName] Page displayName - * @property {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null} [entryFulfillment] Page entryFulfillment - * @property {google.cloud.dialogflow.cx.v3beta1.IForm|null} [form] Page form - * @property {Array.|null} [transitionRouteGroups] Page transitionRouteGroups - * @property {Array.|null} [transitionRoutes] Page transitionRoutes - * @property {Array.|null} [eventHandlers] Page eventHandlers + * @interface IImportFlowRequest + * @property {string|null} [parent] ImportFlowRequest parent + * @property {string|null} [flowUri] ImportFlowRequest flowUri + * @property {Uint8Array|null} [flowContent] ImportFlowRequest flowContent + * @property {google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption|null} [importOption] ImportFlowRequest importOption */ /** - * Constructs a new Page. + * Constructs a new ImportFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a Page. - * @implements IPage + * @classdesc Represents an ImportFlowRequest. + * @implements IImportFlowRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IPage=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest=} [properties] Properties to set */ - function Page(properties) { - this.transitionRouteGroups = []; - this.transitionRoutes = []; - this.eventHandlers = []; + function ImportFlowRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -80193,168 +81622,131 @@ } /** - * Page name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.Page - * @instance - */ - Page.prototype.name = ""; - - /** - * Page displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * ImportFlowRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest * @instance */ - Page.prototype.displayName = ""; + ImportFlowRequest.prototype.parent = ""; /** - * Page entryFulfillment. - * @member {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null|undefined} entryFulfillment - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * ImportFlowRequest flowUri. + * @member {string|null|undefined} flowUri + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest * @instance */ - Page.prototype.entryFulfillment = null; + ImportFlowRequest.prototype.flowUri = null; /** - * Page form. - * @member {google.cloud.dialogflow.cx.v3beta1.IForm|null|undefined} form - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * ImportFlowRequest flowContent. + * @member {Uint8Array|null|undefined} flowContent + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest * @instance */ - Page.prototype.form = null; + ImportFlowRequest.prototype.flowContent = null; /** - * Page transitionRouteGroups. - * @member {Array.} transitionRouteGroups - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * ImportFlowRequest importOption. + * @member {google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption} importOption + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest * @instance */ - Page.prototype.transitionRouteGroups = $util.emptyArray; + ImportFlowRequest.prototype.importOption = 0; - /** - * Page transitionRoutes. - * @member {Array.} transitionRoutes - * @memberof google.cloud.dialogflow.cx.v3beta1.Page - * @instance - */ - Page.prototype.transitionRoutes = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Page eventHandlers. - * @member {Array.} eventHandlers - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * ImportFlowRequest flow. + * @member {"flowUri"|"flowContent"|undefined} flow + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest * @instance */ - Page.prototype.eventHandlers = $util.emptyArray; + Object.defineProperty(ImportFlowRequest.prototype, "flow", { + get: $util.oneOfGetter($oneOfFields = ["flowUri", "flowContent"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new Page instance using the specified properties. + * Creates a new ImportFlowRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IPage=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Page} Page instance + * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest} ImportFlowRequest instance */ - Page.create = function create(properties) { - return new Page(properties); + ImportFlowRequest.create = function create(properties) { + return new ImportFlowRequest(properties); }; /** - * Encodes the specified Page message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Page.verify|verify} messages. + * Encodes the specified ImportFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IPage} message Page message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest} message ImportFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Page.encode = function encode(message, writer) { + ImportFlowRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.form != null && Object.hasOwnProperty.call(message, "form")) - $root.google.cloud.dialogflow.cx.v3beta1.Form.encode(message.form, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.entryFulfillment != null && Object.hasOwnProperty.call(message, "entryFulfillment")) - $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.encode(message.entryFulfillment, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.transitionRoutes != null && message.transitionRoutes.length) - for (var i = 0; i < message.transitionRoutes.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.encode(message.transitionRoutes[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.eventHandlers != null && message.eventHandlers.length) - for (var i = 0; i < message.eventHandlers.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.encode(message.eventHandlers[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.transitionRouteGroups != null && message.transitionRouteGroups.length) - for (var i = 0; i < message.transitionRouteGroups.length; ++i) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.transitionRouteGroups[i]); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.flowUri != null && Object.hasOwnProperty.call(message, "flowUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.flowUri); + if (message.flowContent != null && Object.hasOwnProperty.call(message, "flowContent")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.flowContent); + if (message.importOption != null && Object.hasOwnProperty.call(message, "importOption")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.importOption); return writer; }; /** - * Encodes the specified Page message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Page.verify|verify} messages. + * Encodes the specified ImportFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IPage} message Page message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest} message ImportFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Page.encodeDelimited = function encodeDelimited(message, writer) { + ImportFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Page message from the specified reader or buffer. + * Decodes an ImportFlowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Page} Page + * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest} ImportFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Page.decode = function decode(reader, length) { + ImportFlowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Page(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.displayName = reader.string(); + message.flowUri = reader.string(); break; } - case 7: { - message.entryFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.decode(reader, reader.uint32()); + case 3: { + message.flowContent = reader.bytes(); break; } case 4: { - message.form = $root.google.cloud.dialogflow.cx.v3beta1.Form.decode(reader, reader.uint32()); - break; - } - case 11: { - if (!(message.transitionRouteGroups && message.transitionRouteGroups.length)) - message.transitionRouteGroups = []; - message.transitionRouteGroups.push(reader.string()); - break; - } - case 9: { - if (!(message.transitionRoutes && message.transitionRoutes.length)) - message.transitionRoutes = []; - message.transitionRoutes.push($root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.decode(reader, reader.uint32())); - break; - } - case 10: { - if (!(message.eventHandlers && message.eventHandlers.length)) - message.eventHandlers = []; - message.eventHandlers.push($root.google.cloud.dialogflow.cx.v3beta1.EventHandler.decode(reader, reader.uint32())); + message.importOption = reader.int32(); break; } default: @@ -80366,230 +81758,201 @@ }; /** - * Decodes a Page message from the specified reader or buffer, length delimited. + * Decodes an ImportFlowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Page} Page + * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest} ImportFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Page.decodeDelimited = function decodeDelimited(reader) { + ImportFlowRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Page message. + * Verifies an ImportFlowRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Page.verify = function verify(message) { + ImportFlowRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.entryFulfillment != null && message.hasOwnProperty("entryFulfillment")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify(message.entryFulfillment); - if (error) - return "entryFulfillment." + error; - } - if (message.form != null && message.hasOwnProperty("form")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Form.verify(message.form); - if (error) - return "form." + error; - } - if (message.transitionRouteGroups != null && message.hasOwnProperty("transitionRouteGroups")) { - if (!Array.isArray(message.transitionRouteGroups)) - return "transitionRouteGroups: array expected"; - for (var i = 0; i < message.transitionRouteGroups.length; ++i) - if (!$util.isString(message.transitionRouteGroups[i])) - return "transitionRouteGroups: string[] expected"; + var properties = {}; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.flowUri != null && message.hasOwnProperty("flowUri")) { + properties.flow = 1; + if (!$util.isString(message.flowUri)) + return "flowUri: string expected"; } - if (message.transitionRoutes != null && message.hasOwnProperty("transitionRoutes")) { - if (!Array.isArray(message.transitionRoutes)) - return "transitionRoutes: array expected"; - for (var i = 0; i < message.transitionRoutes.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify(message.transitionRoutes[i]); - if (error) - return "transitionRoutes." + error; - } + if (message.flowContent != null && message.hasOwnProperty("flowContent")) { + if (properties.flow === 1) + return "flow: multiple values"; + properties.flow = 1; + if (!(message.flowContent && typeof message.flowContent.length === "number" || $util.isString(message.flowContent))) + return "flowContent: buffer expected"; } - if (message.eventHandlers != null && message.hasOwnProperty("eventHandlers")) { - if (!Array.isArray(message.eventHandlers)) - return "eventHandlers: array expected"; - for (var i = 0; i < message.eventHandlers.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.verify(message.eventHandlers[i]); - if (error) - return "eventHandlers." + error; + if (message.importOption != null && message.hasOwnProperty("importOption")) + switch (message.importOption) { + default: + return "importOption: enum value expected"; + case 0: + case 1: + case 2: + break; } - } return null; }; /** - * Creates a Page message from a plain object. Also converts values to their respective internal types. + * Creates an ImportFlowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Page} Page + * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest} ImportFlowRequest */ - Page.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Page) + ImportFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Page(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.entryFulfillment != null) { - if (typeof object.entryFulfillment !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.entryFulfillment: object expected"); - message.entryFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.fromObject(object.entryFulfillment); - } - if (object.form != null) { - if (typeof object.form !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.form: object expected"); - message.form = $root.google.cloud.dialogflow.cx.v3beta1.Form.fromObject(object.form); - } - if (object.transitionRouteGroups) { - if (!Array.isArray(object.transitionRouteGroups)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.transitionRouteGroups: array expected"); - message.transitionRouteGroups = []; - for (var i = 0; i < object.transitionRouteGroups.length; ++i) - message.transitionRouteGroups[i] = String(object.transitionRouteGroups[i]); - } - if (object.transitionRoutes) { - if (!Array.isArray(object.transitionRoutes)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.transitionRoutes: array expected"); - message.transitionRoutes = []; - for (var i = 0; i < object.transitionRoutes.length; ++i) { - if (typeof object.transitionRoutes[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.transitionRoutes: object expected"); - message.transitionRoutes[i] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.fromObject(object.transitionRoutes[i]); - } - } - if (object.eventHandlers) { - if (!Array.isArray(object.eventHandlers)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.eventHandlers: array expected"); - message.eventHandlers = []; - for (var i = 0; i < object.eventHandlers.length; ++i) { - if (typeof object.eventHandlers[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.eventHandlers: object expected"); - message.eventHandlers[i] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.fromObject(object.eventHandlers[i]); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.flowUri != null) + message.flowUri = String(object.flowUri); + if (object.flowContent != null) + if (typeof object.flowContent === "string") + $util.base64.decode(object.flowContent, message.flowContent = $util.newBuffer($util.base64.length(object.flowContent)), 0); + else if (object.flowContent.length >= 0) + message.flowContent = object.flowContent; + switch (object.importOption) { + default: + if (typeof object.importOption === "number") { + message.importOption = object.importOption; + break; } + break; + case "IMPORT_OPTION_UNSPECIFIED": + case 0: + message.importOption = 0; + break; + case "KEEP": + case 1: + message.importOption = 1; + break; + case "FALLBACK": + case 2: + message.importOption = 2; + break; } return message; }; /** - * Creates a plain object from a Page message. Also converts values to other types if specified. + * Creates a plain object from an ImportFlowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Page} message Page + * @param {google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest} message ImportFlowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Page.toObject = function toObject(message, options) { + ImportFlowRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.transitionRoutes = []; - object.eventHandlers = []; - object.transitionRouteGroups = []; - } if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.form = null; - object.entryFulfillment = 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.form != null && message.hasOwnProperty("form")) - object.form = $root.google.cloud.dialogflow.cx.v3beta1.Form.toObject(message.form, options); - if (message.entryFulfillment != null && message.hasOwnProperty("entryFulfillment")) - object.entryFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.toObject(message.entryFulfillment, options); - if (message.transitionRoutes && message.transitionRoutes.length) { - object.transitionRoutes = []; - for (var j = 0; j < message.transitionRoutes.length; ++j) - object.transitionRoutes[j] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.toObject(message.transitionRoutes[j], options); + object.parent = ""; + object.importOption = options.enums === String ? "IMPORT_OPTION_UNSPECIFIED" : 0; } - if (message.eventHandlers && message.eventHandlers.length) { - object.eventHandlers = []; - for (var j = 0; j < message.eventHandlers.length; ++j) - object.eventHandlers[j] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.toObject(message.eventHandlers[j], options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.flowUri != null && message.hasOwnProperty("flowUri")) { + object.flowUri = message.flowUri; + if (options.oneofs) + object.flow = "flowUri"; } - if (message.transitionRouteGroups && message.transitionRouteGroups.length) { - object.transitionRouteGroups = []; - for (var j = 0; j < message.transitionRouteGroups.length; ++j) - object.transitionRouteGroups[j] = message.transitionRouteGroups[j]; + if (message.flowContent != null && message.hasOwnProperty("flowContent")) { + object.flowContent = options.bytes === String ? $util.base64.encode(message.flowContent, 0, message.flowContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.flowContent) : message.flowContent; + if (options.oneofs) + object.flow = "flowContent"; } + if (message.importOption != null && message.hasOwnProperty("importOption")) + object.importOption = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption[message.importOption] === undefined ? message.importOption : $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption[message.importOption] : message.importOption; return object; }; /** - * Converts this Page to JSON. + * Converts this ImportFlowRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest * @instance * @returns {Object.} JSON object */ - Page.prototype.toJSON = function toJSON() { + ImportFlowRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Page + * Gets the default type url for ImportFlowRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Page.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Page"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest"; }; - return Page; + /** + * ImportOption enum. + * @name google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption + * @enum {number} + * @property {number} IMPORT_OPTION_UNSPECIFIED=0 IMPORT_OPTION_UNSPECIFIED value + * @property {number} KEEP=1 KEEP value + * @property {number} FALLBACK=2 FALLBACK value + */ + ImportFlowRequest.ImportOption = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IMPORT_OPTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "KEEP"] = 1; + values[valuesById[2] = "FALLBACK"] = 2; + return values; + })(); + + return ImportFlowRequest; })(); - v3beta1.Form = (function() { + v3beta1.ImportFlowResponse = (function() { /** - * Properties of a Form. + * Properties of an ImportFlowResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IForm - * @property {Array.|null} [parameters] Form parameters + * @interface IImportFlowResponse + * @property {string|null} [flow] ImportFlowResponse flow */ /** - * Constructs a new Form. + * Constructs a new ImportFlowResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a Form. - * @implements IForm + * @classdesc Represents an ImportFlowResponse. + * @implements IImportFlowResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IForm=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse=} [properties] Properties to set */ - function Form(properties) { - this.parameters = []; + function ImportFlowResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -80597,78 +81960,75 @@ } /** - * Form parameters. - * @member {Array.} parameters - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * ImportFlowResponse flow. + * @member {string} flow + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse * @instance */ - Form.prototype.parameters = $util.emptyArray; + ImportFlowResponse.prototype.flow = ""; /** - * Creates a new Form instance using the specified properties. + * Creates a new ImportFlowResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IForm=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Form} Form instance + * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse} ImportFlowResponse instance */ - Form.create = function create(properties) { - return new Form(properties); + ImportFlowResponse.create = function create(properties) { + return new ImportFlowResponse(properties); }; /** - * Encodes the specified Form message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.verify|verify} messages. + * Encodes the specified ImportFlowResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IForm} message Form message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse} message ImportFlowResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Form.encode = function encode(message, writer) { + ImportFlowResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parameters != null && message.parameters.length) - for (var i = 0; i < message.parameters.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.encode(message.parameters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.flow != null && Object.hasOwnProperty.call(message, "flow")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.flow); return writer; }; /** - * Encodes the specified Form message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.verify|verify} messages. + * Encodes the specified ImportFlowResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IForm} message Form message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse} message ImportFlowResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Form.encodeDelimited = function encodeDelimited(message, writer) { + ImportFlowResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Form message from the specified reader or buffer. + * Decodes an ImportFlowResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Form} Form + * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse} ImportFlowResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Form.decode = function decode(reader, length) { + ImportFlowResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Form(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.parameters && message.parameters.length)) - message.parameters = []; - message.parameters.push($root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.decode(reader, reader.uint32())); + message.flow = reader.string(); break; } default: @@ -80680,894 +82040,228 @@ }; /** - * Decodes a Form message from the specified reader or buffer, length delimited. + * Decodes an ImportFlowResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Form} Form + * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse} ImportFlowResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Form.decodeDelimited = function decodeDelimited(reader) { + ImportFlowResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Form message. + * Verifies an ImportFlowResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Form.verify = function verify(message) { + ImportFlowResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parameters != null && message.hasOwnProperty("parameters")) { - if (!Array.isArray(message.parameters)) - return "parameters: array expected"; - for (var i = 0; i < message.parameters.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.verify(message.parameters[i]); - if (error) - return "parameters." + error; - } - } + if (message.flow != null && message.hasOwnProperty("flow")) + if (!$util.isString(message.flow)) + return "flow: string expected"; return null; }; /** - * Creates a Form message from a plain object. Also converts values to their respective internal types. + * Creates an ImportFlowResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Form} Form + * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse} ImportFlowResponse */ - Form.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Form) + ImportFlowResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Form(); - if (object.parameters) { - if (!Array.isArray(object.parameters)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.parameters: array expected"); - message.parameters = []; - for (var i = 0; i < object.parameters.length; ++i) { - if (typeof object.parameters[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.parameters: object expected"); - message.parameters[i] = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.fromObject(object.parameters[i]); - } - } + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse(); + if (object.flow != null) + message.flow = String(object.flow); return message; }; /** - * Creates a plain object from a Form message. Also converts values to other types if specified. + * Creates a plain object from an ImportFlowResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Form} message Form + * @param {google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse} message ImportFlowResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Form.toObject = function toObject(message, options) { + ImportFlowResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.parameters = []; - if (message.parameters && message.parameters.length) { - object.parameters = []; - for (var j = 0; j < message.parameters.length; ++j) - object.parameters[j] = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.toObject(message.parameters[j], options); - } + if (options.defaults) + object.flow = ""; + if (message.flow != null && message.hasOwnProperty("flow")) + object.flow = message.flow; return object; }; /** - * Converts this Form to JSON. + * Converts this ImportFlowResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse * @instance * @returns {Object.} JSON object */ - Form.prototype.toJSON = function toJSON() { + ImportFlowResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Form + * Gets the default type url for ImportFlowResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Form.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportFlowResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Form"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse"; }; - Form.Parameter = (function() { + return ImportFlowResponse; + })(); - /** - * Properties of a Parameter. - * @memberof google.cloud.dialogflow.cx.v3beta1.Form - * @interface IParameter - * @property {string|null} [displayName] Parameter displayName - * @property {boolean|null} [required] Parameter required - * @property {string|null} [entityType] Parameter entityType - * @property {boolean|null} [isList] Parameter isList - * @property {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior|null} [fillBehavior] Parameter fillBehavior - * @property {google.protobuf.IValue|null} [defaultValue] Parameter defaultValue - * @property {boolean|null} [redact] Parameter redact - */ + v3beta1.ExportFlowRequest = (function() { - /** - * Constructs a new Parameter. - * @memberof google.cloud.dialogflow.cx.v3beta1.Form - * @classdesc Represents a Parameter. - * @implements IParameter - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.Form.IParameter=} [properties] Properties to set - */ - function Parameter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of an ExportFlowRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IExportFlowRequest + * @property {string|null} [name] ExportFlowRequest name + * @property {string|null} [flowUri] ExportFlowRequest flowUri + * @property {boolean|null} [includeReferencedFlows] ExportFlowRequest includeReferencedFlows + */ - /** - * Parameter displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @instance - */ - Parameter.prototype.displayName = ""; + /** + * Constructs a new ExportFlowRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents an ExportFlowRequest. + * @implements IExportFlowRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest=} [properties] Properties to set + */ + function ExportFlowRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Parameter required. - * @member {boolean} required - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @instance - */ - Parameter.prototype.required = false; + /** + * ExportFlowRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @instance + */ + ExportFlowRequest.prototype.name = ""; - /** - * Parameter entityType. - * @member {string} entityType - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @instance - */ - Parameter.prototype.entityType = ""; + /** + * ExportFlowRequest flowUri. + * @member {string} flowUri + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @instance + */ + ExportFlowRequest.prototype.flowUri = ""; - /** - * Parameter isList. - * @member {boolean} isList - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @instance - */ - Parameter.prototype.isList = false; + /** + * ExportFlowRequest includeReferencedFlows. + * @member {boolean} includeReferencedFlows + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @instance + */ + ExportFlowRequest.prototype.includeReferencedFlows = false; - /** - * Parameter fillBehavior. - * @member {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior|null|undefined} fillBehavior - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @instance - */ - Parameter.prototype.fillBehavior = null; + /** + * Creates a new ExportFlowRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest} ExportFlowRequest instance + */ + ExportFlowRequest.create = function create(properties) { + return new ExportFlowRequest(properties); + }; - /** - * Parameter defaultValue. - * @member {google.protobuf.IValue|null|undefined} defaultValue - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @instance - */ - Parameter.prototype.defaultValue = null; - - /** - * Parameter redact. - * @member {boolean} redact - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @instance - */ - Parameter.prototype.redact = false; - - /** - * Creates a new Parameter instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Form.IParameter=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter} Parameter instance - */ - Parameter.create = function create(properties) { - return new Parameter(properties); - }; - - /** - * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Form.IParameter} message Parameter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Parameter.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.required != null && Object.hasOwnProperty.call(message, "required")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.required); - if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.entityType); - if (message.isList != null && Object.hasOwnProperty.call(message, "isList")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isList); - if (message.fillBehavior != null && Object.hasOwnProperty.call(message, "fillBehavior")) - $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.encode(message.fillBehavior, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - $root.google.protobuf.Value.encode(message.defaultValue, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.redact != null && Object.hasOwnProperty.call(message, "redact")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.redact); - return writer; - }; - - /** - * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Form.IParameter} message Parameter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Parameter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Parameter message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter} Parameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Parameter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.required = reader.bool(); - break; - } - case 3: { - message.entityType = reader.string(); - break; - } - case 4: { - message.isList = reader.bool(); - break; - } - case 7: { - message.fillBehavior = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.decode(reader, reader.uint32()); - break; - } - case 9: { - message.defaultValue = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - } - case 11: { - message.redact = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Parameter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter} Parameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Parameter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Parameter message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Parameter.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.required != null && message.hasOwnProperty("required")) - if (typeof message.required !== "boolean") - return "required: boolean expected"; - if (message.entityType != null && message.hasOwnProperty("entityType")) - if (!$util.isString(message.entityType)) - return "entityType: string expected"; - if (message.isList != null && message.hasOwnProperty("isList")) - if (typeof message.isList !== "boolean") - return "isList: boolean expected"; - if (message.fillBehavior != null && message.hasOwnProperty("fillBehavior")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify(message.fillBehavior); - if (error) - return "fillBehavior." + error; - } - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) { - var error = $root.google.protobuf.Value.verify(message.defaultValue); - if (error) - return "defaultValue." + error; - } - if (message.redact != null && message.hasOwnProperty("redact")) - if (typeof message.redact !== "boolean") - return "redact: boolean expected"; - return null; - }; - - /** - * Creates a Parameter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter} Parameter - */ - Parameter.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.required != null) - message.required = Boolean(object.required); - if (object.entityType != null) - message.entityType = String(object.entityType); - if (object.isList != null) - message.isList = Boolean(object.isList); - if (object.fillBehavior != null) { - if (typeof object.fillBehavior !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.fillBehavior: object expected"); - message.fillBehavior = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.fromObject(object.fillBehavior); - } - if (object.defaultValue != null) { - if (typeof object.defaultValue !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.defaultValue: object expected"); - message.defaultValue = $root.google.protobuf.Value.fromObject(object.defaultValue); - } - if (object.redact != null) - message.redact = Boolean(object.redact); - return message; - }; - - /** - * Creates a plain object from a Parameter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter} message Parameter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Parameter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.required = false; - object.entityType = ""; - object.isList = false; - object.fillBehavior = null; - object.defaultValue = null; - object.redact = false; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.required != null && message.hasOwnProperty("required")) - object.required = message.required; - if (message.entityType != null && message.hasOwnProperty("entityType")) - object.entityType = message.entityType; - if (message.isList != null && message.hasOwnProperty("isList")) - object.isList = message.isList; - if (message.fillBehavior != null && message.hasOwnProperty("fillBehavior")) - object.fillBehavior = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.toObject(message.fillBehavior, options); - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = $root.google.protobuf.Value.toObject(message.defaultValue, options); - if (message.redact != null && message.hasOwnProperty("redact")) - object.redact = message.redact; - return object; - }; - - /** - * Converts this Parameter to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @instance - * @returns {Object.} JSON object - */ - Parameter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Parameter - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Parameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Form.Parameter"; - }; - - Parameter.FillBehavior = (function() { - - /** - * Properties of a FillBehavior. - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @interface IFillBehavior - * @property {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null} [initialPromptFulfillment] FillBehavior initialPromptFulfillment - * @property {Array.|null} [repromptEventHandlers] FillBehavior repromptEventHandlers - */ - - /** - * Constructs a new FillBehavior. - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @classdesc Represents a FillBehavior. - * @implements IFillBehavior - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior=} [properties] Properties to set - */ - function FillBehavior(properties) { - this.repromptEventHandlers = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FillBehavior initialPromptFulfillment. - * @member {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null|undefined} initialPromptFulfillment - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @instance - */ - FillBehavior.prototype.initialPromptFulfillment = null; - - /** - * FillBehavior repromptEventHandlers. - * @member {Array.} repromptEventHandlers - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @instance - */ - FillBehavior.prototype.repromptEventHandlers = $util.emptyArray; - - /** - * Creates a new FillBehavior instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} FillBehavior instance - */ - FillBehavior.create = function create(properties) { - return new FillBehavior(properties); - }; - - /** - * Encodes the specified FillBehavior message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior} message FillBehavior message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FillBehavior.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.initialPromptFulfillment != null && Object.hasOwnProperty.call(message, "initialPromptFulfillment")) - $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.encode(message.initialPromptFulfillment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.repromptEventHandlers != null && message.repromptEventHandlers.length) - for (var i = 0; i < message.repromptEventHandlers.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.encode(message.repromptEventHandlers[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FillBehavior message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior} message FillBehavior message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FillBehavior.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FillBehavior message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} FillBehavior - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FillBehavior.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.initialPromptFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.decode(reader, reader.uint32()); - break; - } - case 5: { - if (!(message.repromptEventHandlers && message.repromptEventHandlers.length)) - message.repromptEventHandlers = []; - message.repromptEventHandlers.push($root.google.cloud.dialogflow.cx.v3beta1.EventHandler.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FillBehavior message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} FillBehavior - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FillBehavior.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FillBehavior message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FillBehavior.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.initialPromptFulfillment != null && message.hasOwnProperty("initialPromptFulfillment")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify(message.initialPromptFulfillment); - if (error) - return "initialPromptFulfillment." + error; - } - if (message.repromptEventHandlers != null && message.hasOwnProperty("repromptEventHandlers")) { - if (!Array.isArray(message.repromptEventHandlers)) - return "repromptEventHandlers: array expected"; - for (var i = 0; i < message.repromptEventHandlers.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.verify(message.repromptEventHandlers[i]); - if (error) - return "repromptEventHandlers." + error; - } - } - return null; - }; - - /** - * Creates a FillBehavior message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} FillBehavior - */ - FillBehavior.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior(); - if (object.initialPromptFulfillment != null) { - if (typeof object.initialPromptFulfillment !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.initialPromptFulfillment: object expected"); - message.initialPromptFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.fromObject(object.initialPromptFulfillment); - } - if (object.repromptEventHandlers) { - if (!Array.isArray(object.repromptEventHandlers)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.repromptEventHandlers: array expected"); - message.repromptEventHandlers = []; - for (var i = 0; i < object.repromptEventHandlers.length; ++i) { - if (typeof object.repromptEventHandlers[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.repromptEventHandlers: object expected"); - message.repromptEventHandlers[i] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.fromObject(object.repromptEventHandlers[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FillBehavior message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} message FillBehavior - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FillBehavior.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.repromptEventHandlers = []; - if (options.defaults) - object.initialPromptFulfillment = null; - if (message.initialPromptFulfillment != null && message.hasOwnProperty("initialPromptFulfillment")) - object.initialPromptFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.toObject(message.initialPromptFulfillment, options); - if (message.repromptEventHandlers && message.repromptEventHandlers.length) { - object.repromptEventHandlers = []; - for (var j = 0; j < message.repromptEventHandlers.length; ++j) - object.repromptEventHandlers[j] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.toObject(message.repromptEventHandlers[j], options); - } - return object; - }; - - /** - * Converts this FillBehavior to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @instance - * @returns {Object.} JSON object - */ - FillBehavior.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FillBehavior - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FillBehavior.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior"; - }; - - return FillBehavior; - })(); - - return Parameter; - })(); - - return Form; - })(); - - v3beta1.EventHandler = (function() { - - /** - * Properties of an EventHandler. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IEventHandler - * @property {string|null} [name] EventHandler name - * @property {string|null} [event] EventHandler event - * @property {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null} [triggerFulfillment] EventHandler triggerFulfillment - * @property {string|null} [targetPage] EventHandler targetPage - * @property {string|null} [targetFlow] EventHandler targetFlow - */ - - /** - * Constructs a new EventHandler. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an EventHandler. - * @implements IEventHandler - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IEventHandler=} [properties] Properties to set - */ - function EventHandler(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EventHandler name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler - * @instance - */ - EventHandler.prototype.name = ""; - - /** - * EventHandler event. - * @member {string} event - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler - * @instance - */ - EventHandler.prototype.event = ""; - - /** - * EventHandler triggerFulfillment. - * @member {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null|undefined} triggerFulfillment - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler - * @instance - */ - EventHandler.prototype.triggerFulfillment = null; - - /** - * EventHandler targetPage. - * @member {string|null|undefined} targetPage - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler - * @instance - */ - EventHandler.prototype.targetPage = null; - - /** - * EventHandler targetFlow. - * @member {string|null|undefined} targetFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler - * @instance - */ - EventHandler.prototype.targetFlow = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * EventHandler target. - * @member {"targetPage"|"targetFlow"|undefined} target - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler - * @instance - */ - Object.defineProperty(EventHandler.prototype, "target", { - get: $util.oneOfGetter($oneOfFields = ["targetPage", "targetFlow"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new EventHandler instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IEventHandler=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.EventHandler} EventHandler instance - */ - EventHandler.create = function create(properties) { - return new EventHandler(properties); - }; - - /** - * Encodes the specified EventHandler message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EventHandler.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IEventHandler} message EventHandler message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EventHandler.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.targetPage != null && Object.hasOwnProperty.call(message, "targetPage")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetPage); - if (message.targetFlow != null && Object.hasOwnProperty.call(message, "targetFlow")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.targetFlow); - if (message.event != null && Object.hasOwnProperty.call(message, "event")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.event); - if (message.triggerFulfillment != null && Object.hasOwnProperty.call(message, "triggerFulfillment")) - $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.encode(message.triggerFulfillment, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - return writer; - }; + /** + * Encodes the specified ExportFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest} message ExportFlowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportFlowRequest.encode = function encode(message, writer) { + 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.flowUri != null && Object.hasOwnProperty.call(message, "flowUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.flowUri); + if (message.includeReferencedFlows != null && Object.hasOwnProperty.call(message, "includeReferencedFlows")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.includeReferencedFlows); + return writer; + }; /** - * Encodes the specified EventHandler message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EventHandler.verify|verify} messages. + * Encodes the specified ExportFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IEventHandler} message EventHandler message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest} message ExportFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EventHandler.encodeDelimited = function encodeDelimited(message, writer) { + ExportFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EventHandler message from the specified reader or buffer. + * Decodes an ExportFlowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.EventHandler} EventHandler + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest} ExportFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EventHandler.decode = function decode(reader, length) { + ExportFlowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.EventHandler(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 6: { + case 1: { message.name = reader.string(); break; } - case 4: { - message.event = reader.string(); - break; - } - case 5: { - message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.decode(reader, reader.uint32()); - break; - } case 2: { - message.targetPage = reader.string(); + message.flowUri = reader.string(); break; } - case 3: { - message.targetFlow = reader.string(); + case 4: { + message.includeReferencedFlows = reader.bool(); break; } default: @@ -81579,176 +82273,140 @@ }; /** - * Decodes an EventHandler message from the specified reader or buffer, length delimited. + * Decodes an ExportFlowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.EventHandler} EventHandler + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest} ExportFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EventHandler.decodeDelimited = function decodeDelimited(reader) { + ExportFlowRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EventHandler message. + * Verifies an ExportFlowRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EventHandler.verify = function verify(message) { + ExportFlowRequest.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.event != null && message.hasOwnProperty("event")) - if (!$util.isString(message.event)) - return "event: string expected"; - if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify(message.triggerFulfillment); - if (error) - return "triggerFulfillment." + error; - } - if (message.targetPage != null && message.hasOwnProperty("targetPage")) { - properties.target = 1; - if (!$util.isString(message.targetPage)) - return "targetPage: string expected"; - } - if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { - if (properties.target === 1) - return "target: multiple values"; - properties.target = 1; - if (!$util.isString(message.targetFlow)) - return "targetFlow: string expected"; - } + if (message.flowUri != null && message.hasOwnProperty("flowUri")) + if (!$util.isString(message.flowUri)) + return "flowUri: string expected"; + if (message.includeReferencedFlows != null && message.hasOwnProperty("includeReferencedFlows")) + if (typeof message.includeReferencedFlows !== "boolean") + return "includeReferencedFlows: boolean expected"; return null; }; /** - * Creates an EventHandler message from a plain object. Also converts values to their respective internal types. + * Creates an ExportFlowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.EventHandler} EventHandler + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest} ExportFlowRequest */ - EventHandler.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.EventHandler) + ExportFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.EventHandler(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest(); if (object.name != null) message.name = String(object.name); - if (object.event != null) - message.event = String(object.event); - if (object.triggerFulfillment != null) { - if (typeof object.triggerFulfillment !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.EventHandler.triggerFulfillment: object expected"); - message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.fromObject(object.triggerFulfillment); - } - if (object.targetPage != null) - message.targetPage = String(object.targetPage); - if (object.targetFlow != null) - message.targetFlow = String(object.targetFlow); + if (object.flowUri != null) + message.flowUri = String(object.flowUri); + if (object.includeReferencedFlows != null) + message.includeReferencedFlows = Boolean(object.includeReferencedFlows); return message; }; /** - * Creates a plain object from an EventHandler message. Also converts values to other types if specified. + * Creates a plain object from an ExportFlowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.EventHandler} message EventHandler + * @param {google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest} message ExportFlowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EventHandler.toObject = function toObject(message, options) { + ExportFlowRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.event = ""; - object.triggerFulfillment = null; object.name = ""; + object.flowUri = ""; + object.includeReferencedFlows = false; } - if (message.targetPage != null && message.hasOwnProperty("targetPage")) { - object.targetPage = message.targetPage; - if (options.oneofs) - object.target = "targetPage"; - } - if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { - object.targetFlow = message.targetFlow; - if (options.oneofs) - object.target = "targetFlow"; - } - if (message.event != null && message.hasOwnProperty("event")) - object.event = message.event; - if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) - object.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.toObject(message.triggerFulfillment, options); if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.flowUri != null && message.hasOwnProperty("flowUri")) + object.flowUri = message.flowUri; + if (message.includeReferencedFlows != null && message.hasOwnProperty("includeReferencedFlows")) + object.includeReferencedFlows = message.includeReferencedFlows; return object; }; /** - * Converts this EventHandler to JSON. + * Converts this ExportFlowRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest * @instance * @returns {Object.} JSON object */ - EventHandler.prototype.toJSON = function toJSON() { + ExportFlowRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EventHandler + * Gets the default type url for ExportFlowRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EventHandler.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExportFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.EventHandler"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest"; }; - return EventHandler; + return ExportFlowRequest; })(); - v3beta1.TransitionRoute = (function() { + v3beta1.ExportFlowResponse = (function() { /** - * Properties of a TransitionRoute. + * Properties of an ExportFlowResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ITransitionRoute - * @property {string|null} [name] TransitionRoute name - * @property {string|null} [intent] TransitionRoute intent - * @property {string|null} [condition] TransitionRoute condition - * @property {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null} [triggerFulfillment] TransitionRoute triggerFulfillment - * @property {string|null} [targetPage] TransitionRoute targetPage - * @property {string|null} [targetFlow] TransitionRoute targetFlow + * @interface IExportFlowResponse + * @property {string|null} [flowUri] ExportFlowResponse flowUri + * @property {Uint8Array|null} [flowContent] ExportFlowResponse flowContent */ /** - * Constructs a new TransitionRoute. + * Constructs a new ExportFlowResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a TransitionRoute. - * @implements ITransitionRoute + * @classdesc Represents an ExportFlowResponse. + * @implements IExportFlowResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse=} [properties] Properties to set */ - function TransitionRoute(properties) { + function ExportFlowResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -81756,159 +82414,103 @@ } /** - * TransitionRoute name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute - * @instance - */ - TransitionRoute.prototype.name = ""; - - /** - * TransitionRoute intent. - * @member {string} intent - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute - * @instance - */ - TransitionRoute.prototype.intent = ""; - - /** - * TransitionRoute condition. - * @member {string} condition - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute - * @instance - */ - TransitionRoute.prototype.condition = ""; - - /** - * TransitionRoute triggerFulfillment. - * @member {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null|undefined} triggerFulfillment - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute - * @instance - */ - TransitionRoute.prototype.triggerFulfillment = null; - - /** - * TransitionRoute targetPage. - * @member {string|null|undefined} targetPage - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * ExportFlowResponse flowUri. + * @member {string|null|undefined} flowUri + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse * @instance */ - TransitionRoute.prototype.targetPage = null; + ExportFlowResponse.prototype.flowUri = null; /** - * TransitionRoute targetFlow. - * @member {string|null|undefined} targetFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * ExportFlowResponse flowContent. + * @member {Uint8Array|null|undefined} flowContent + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse * @instance */ - TransitionRoute.prototype.targetFlow = null; + ExportFlowResponse.prototype.flowContent = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * TransitionRoute target. - * @member {"targetPage"|"targetFlow"|undefined} target - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * ExportFlowResponse flow. + * @member {"flowUri"|"flowContent"|undefined} flow + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse * @instance */ - Object.defineProperty(TransitionRoute.prototype, "target", { - get: $util.oneOfGetter($oneOfFields = ["targetPage", "targetFlow"]), + Object.defineProperty(ExportFlowResponse.prototype, "flow", { + get: $util.oneOfGetter($oneOfFields = ["flowUri", "flowContent"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new TransitionRoute instance using the specified properties. + * Creates a new ExportFlowResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} TransitionRoute instance + * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse} ExportFlowResponse instance */ - TransitionRoute.create = function create(properties) { - return new TransitionRoute(properties); + ExportFlowResponse.create = function create(properties) { + return new ExportFlowResponse(properties); }; /** - * Encodes the specified TransitionRoute message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify|verify} messages. + * Encodes the specified ExportFlowResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute} message TransitionRoute message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse} message ExportFlowResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransitionRoute.encode = function encode(message, writer) { + ExportFlowResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.intent); - if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.condition); - if (message.triggerFulfillment != null && Object.hasOwnProperty.call(message, "triggerFulfillment")) - $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.encode(message.triggerFulfillment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.targetPage != null && Object.hasOwnProperty.call(message, "targetPage")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.targetPage); - if (message.targetFlow != null && Object.hasOwnProperty.call(message, "targetFlow")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.targetFlow); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + if (message.flowUri != null && Object.hasOwnProperty.call(message, "flowUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.flowUri); + if (message.flowContent != null && Object.hasOwnProperty.call(message, "flowContent")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.flowContent); return writer; }; /** - * Encodes the specified TransitionRoute message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify|verify} messages. + * Encodes the specified ExportFlowResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute} message TransitionRoute message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse} message ExportFlowResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransitionRoute.encodeDelimited = function encodeDelimited(message, writer) { + ExportFlowResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TransitionRoute message from the specified reader or buffer. + * Decodes an ExportFlowResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} TransitionRoute + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse} ExportFlowResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TransitionRoute.decode = function decode(reader, length) { + ExportFlowResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 6: { - message.name = reader.string(); - break; - } case 1: { - message.intent = reader.string(); + message.flowUri = reader.string(); break; } case 2: { - message.condition = reader.string(); - break; - } - case 3: { - message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.decode(reader, reader.uint32()); - break; - } - case 4: { - message.targetPage = reader.string(); - break; - } - case 5: { - message.targetFlow = reader.string(); + message.flowContent = reader.bytes(); break; } default: @@ -81920,454 +82522,352 @@ }; /** - * Decodes a TransitionRoute message from the specified reader or buffer, length delimited. + * Decodes an ExportFlowResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} TransitionRoute + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse} ExportFlowResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TransitionRoute.decodeDelimited = function decodeDelimited(reader) { + ExportFlowResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TransitionRoute message. + * Verifies an ExportFlowResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TransitionRoute.verify = function verify(message) { + ExportFlowResponse.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.intent != null && message.hasOwnProperty("intent")) - if (!$util.isString(message.intent)) - return "intent: string expected"; - if (message.condition != null && message.hasOwnProperty("condition")) - if (!$util.isString(message.condition)) - return "condition: string expected"; - if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify(message.triggerFulfillment); - if (error) - return "triggerFulfillment." + error; - } - if (message.targetPage != null && message.hasOwnProperty("targetPage")) { - properties.target = 1; - if (!$util.isString(message.targetPage)) - return "targetPage: string expected"; + if (message.flowUri != null && message.hasOwnProperty("flowUri")) { + properties.flow = 1; + if (!$util.isString(message.flowUri)) + return "flowUri: string expected"; } - if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { - if (properties.target === 1) - return "target: multiple values"; - properties.target = 1; - if (!$util.isString(message.targetFlow)) - return "targetFlow: string expected"; + if (message.flowContent != null && message.hasOwnProperty("flowContent")) { + if (properties.flow === 1) + return "flow: multiple values"; + properties.flow = 1; + if (!(message.flowContent && typeof message.flowContent.length === "number" || $util.isString(message.flowContent))) + return "flowContent: buffer expected"; } return null; }; /** - * Creates a TransitionRoute message from a plain object. Also converts values to their respective internal types. + * Creates an ExportFlowResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} TransitionRoute + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse} ExportFlowResponse */ - TransitionRoute.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute) + ExportFlowResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute(); - if (object.name != null) - message.name = String(object.name); - if (object.intent != null) - message.intent = String(object.intent); - if (object.condition != null) - message.condition = String(object.condition); - if (object.triggerFulfillment != null) { - if (typeof object.triggerFulfillment !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionRoute.triggerFulfillment: object expected"); - message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.fromObject(object.triggerFulfillment); - } - if (object.targetPage != null) - message.targetPage = String(object.targetPage); - if (object.targetFlow != null) - message.targetFlow = String(object.targetFlow); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse(); + if (object.flowUri != null) + message.flowUri = String(object.flowUri); + if (object.flowContent != null) + if (typeof object.flowContent === "string") + $util.base64.decode(object.flowContent, message.flowContent = $util.newBuffer($util.base64.length(object.flowContent)), 0); + else if (object.flowContent.length >= 0) + message.flowContent = object.flowContent; return message; }; /** - * Creates a plain object from a TransitionRoute message. Also converts values to other types if specified. + * Creates a plain object from an ExportFlowResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} message TransitionRoute + * @param {google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse} message ExportFlowResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TransitionRoute.toObject = function toObject(message, options) { + ExportFlowResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.intent = ""; - object.condition = ""; - object.triggerFulfillment = null; - object.name = ""; - } - if (message.intent != null && message.hasOwnProperty("intent")) - object.intent = message.intent; - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = message.condition; - if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) - object.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.toObject(message.triggerFulfillment, options); - if (message.targetPage != null && message.hasOwnProperty("targetPage")) { - object.targetPage = message.targetPage; + if (message.flowUri != null && message.hasOwnProperty("flowUri")) { + object.flowUri = message.flowUri; if (options.oneofs) - object.target = "targetPage"; + object.flow = "flowUri"; } - if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { - object.targetFlow = message.targetFlow; + if (message.flowContent != null && message.hasOwnProperty("flowContent")) { + object.flowContent = options.bytes === String ? $util.base64.encode(message.flowContent, 0, message.flowContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.flowContent) : message.flowContent; if (options.oneofs) - object.target = "targetFlow"; + object.flow = "flowContent"; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; return object; }; /** - * Converts this TransitionRoute to JSON. + * Converts this ExportFlowResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse * @instance * @returns {Object.} JSON object */ - TransitionRoute.prototype.toJSON = function toJSON() { + ExportFlowResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TransitionRoute + * Gets the default type url for ExportFlowResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TransitionRoute.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExportFlowResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.TransitionRoute"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse"; }; - return TransitionRoute; + return ExportFlowResponse; })(); - v3beta1.ListPagesRequest = (function() { + v3beta1.Pages = (function() { /** - * Properties of a ListPagesRequest. + * Constructs a new Pages service. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListPagesRequest - * @property {string|null} [parent] ListPagesRequest parent - * @property {string|null} [languageCode] ListPagesRequest languageCode - * @property {number|null} [pageSize] ListPagesRequest pageSize - * @property {string|null} [pageToken] ListPagesRequest pageToken + * @classdesc Represents a Pages + * @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 Pages(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Pages.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Pages; /** - * Constructs a new ListPagesRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListPagesRequest. - * @implements IListPagesRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest=} [properties] Properties to set + * Creates new Pages service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @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 {Pages} RPC service. Useful where requests and/or responses are streamed. */ - function ListPagesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Pages.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * ListPagesRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest - * @instance + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|listPages}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @typedef ListPagesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} [response] ListPagesResponse */ - ListPagesRequest.prototype.parent = ""; /** - * ListPagesRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * Calls ListPages. + * @function listPages + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest} request ListPagesRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Pages.ListPagesCallback} callback Node-style callback called with the error, if any, and ListPagesResponse + * @returns {undefined} + * @variation 1 */ - ListPagesRequest.prototype.languageCode = ""; + Object.defineProperty(Pages.prototype.listPages = function listPages(request, callback) { + return this.rpcCall(listPages, $root.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListPagesResponse, request, callback); + }, "name", { value: "ListPages" }); /** - * ListPagesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * Calls ListPages. + * @function listPages + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest} request ListPagesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListPagesRequest.prototype.pageSize = 0; /** - * ListPagesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|getPage}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @typedef GetPageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Page} [response] Page + */ + + /** + * Calls GetPage. + * @function getPage + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest} request GetPageRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Pages.GetPageCallback} callback Node-style callback called with the error, if any, and Page + * @returns {undefined} + * @variation 1 */ - ListPagesRequest.prototype.pageToken = ""; + Object.defineProperty(Pages.prototype.getPage = function getPage(request, callback) { + return this.rpcCall(getPage, $root.google.cloud.dialogflow.cx.v3beta1.GetPageRequest, $root.google.cloud.dialogflow.cx.v3beta1.Page, request, callback); + }, "name", { value: "GetPage" }); /** - * Creates a new ListPagesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} ListPagesRequest instance + * Calls GetPage. + * @function getPage + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest} request GetPageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListPagesRequest.create = function create(properties) { - return new ListPagesRequest(properties); - }; /** - * Encodes the specified ListPagesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest} message ListPagesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|createPage}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @typedef CreatePageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Page} [response] Page */ - ListPagesRequest.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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - 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); - return writer; - }; /** - * Encodes the specified ListPagesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest} message ListPagesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls CreatePage. + * @function createPage + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest} request CreatePageRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Pages.CreatePageCallback} callback Node-style callback called with the error, if any, and Page + * @returns {undefined} + * @variation 1 */ - ListPagesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(Pages.prototype.createPage = function createPage(request, callback) { + return this.rpcCall(createPage, $root.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest, $root.google.cloud.dialogflow.cx.v3beta1.Page, request, callback); + }, "name", { value: "CreatePage" }); /** - * Decodes a ListPagesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} ListPagesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreatePage. + * @function createPage + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest} request CreatePageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListPagesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.languageCode = reader.string(); - break; - } - case 3: { - message.pageSize = reader.int32(); - break; - } - case 4: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a ListPagesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} ListPagesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|updatePage}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @typedef UpdatePageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Page} [response] Page */ - ListPagesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a ListPagesRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls UpdatePage. + * @function updatePage + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest} request UpdatePageRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Pages.UpdatePageCallback} callback Node-style callback called with the error, if any, and Page + * @returns {undefined} + * @variation 1 */ - ListPagesRequest.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.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: 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; - }; + Object.defineProperty(Pages.prototype.updatePage = function updatePage(request, callback) { + return this.rpcCall(updatePage, $root.google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest, $root.google.cloud.dialogflow.cx.v3beta1.Page, request, callback); + }, "name", { value: "UpdatePage" }); /** - * Creates a ListPagesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} ListPagesRequest + * Calls UpdatePage. + * @function updatePage + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest} request UpdatePageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListPagesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - 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 ListPagesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} message ListPagesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|deletePage}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @typedef DeletePageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - ListPagesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.languageCode = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; /** - * Converts this ListPagesRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * Calls DeletePage. + * @function deletePage + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest} request DeletePageRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Pages.DeletePageCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - ListPagesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(Pages.prototype.deletePage = function deletePage(request, callback) { + return this.rpcCall(deletePage, $root.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeletePage" }); /** - * Gets the default type url for ListPagesRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls DeletePage. + * @function deletePage + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest} request DeletePageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListPagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListPagesRequest"; - }; - return ListPagesRequest; + return Pages; })(); - v3beta1.ListPagesResponse = (function() { + v3beta1.Page = (function() { /** - * Properties of a ListPagesResponse. + * Properties of a Page. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListPagesResponse - * @property {Array.|null} [pages] ListPagesResponse pages - * @property {string|null} [nextPageToken] ListPagesResponse nextPageToken + * @interface IPage + * @property {string|null} [name] Page name + * @property {string|null} [displayName] Page displayName + * @property {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null} [entryFulfillment] Page entryFulfillment + * @property {google.cloud.dialogflow.cx.v3beta1.IForm|null} [form] Page form + * @property {Array.|null} [transitionRouteGroups] Page transitionRouteGroups + * @property {Array.|null} [transitionRoutes] Page transitionRoutes + * @property {Array.|null} [eventHandlers] Page eventHandlers */ /** - * Constructs a new ListPagesResponse. + * Constructs a new Page. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListPagesResponse. - * @implements IListPagesResponse + * @classdesc Represents a Page. + * @implements IPage * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IPage=} [properties] Properties to set */ - function ListPagesResponse(properties) { - this.pages = []; + function Page(properties) { + this.transitionRouteGroups = []; + this.transitionRoutes = []; + this.eventHandlers = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -82375,92 +82875,168 @@ } /** - * ListPagesResponse pages. - * @member {Array.} pages - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * Page name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.Page * @instance */ - ListPagesResponse.prototype.pages = $util.emptyArray; + Page.prototype.name = ""; /** - * ListPagesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * Page displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3beta1.Page * @instance */ - ListPagesResponse.prototype.nextPageToken = ""; + Page.prototype.displayName = ""; /** - * Creates a new ListPagesResponse instance using the specified properties. + * Page entryFulfillment. + * @member {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null|undefined} entryFulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @instance + */ + Page.prototype.entryFulfillment = null; + + /** + * Page form. + * @member {google.cloud.dialogflow.cx.v3beta1.IForm|null|undefined} form + * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @instance + */ + Page.prototype.form = null; + + /** + * Page transitionRouteGroups. + * @member {Array.} transitionRouteGroups + * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @instance + */ + Page.prototype.transitionRouteGroups = $util.emptyArray; + + /** + * Page transitionRoutes. + * @member {Array.} transitionRoutes + * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @instance + */ + Page.prototype.transitionRoutes = $util.emptyArray; + + /** + * Page eventHandlers. + * @member {Array.} eventHandlers + * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @instance + */ + Page.prototype.eventHandlers = $util.emptyArray; + + /** + * Creates a new Page instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.Page * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} ListPagesResponse instance + * @param {google.cloud.dialogflow.cx.v3beta1.IPage=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Page} Page instance */ - ListPagesResponse.create = function create(properties) { - return new ListPagesResponse(properties); + Page.create = function create(properties) { + return new Page(properties); }; /** - * Encodes the specified ListPagesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.verify|verify} messages. + * Encodes the specified Page message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Page.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.Page * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesResponse} message ListPagesResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IPage} message Page message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPagesResponse.encode = function encode(message, writer) { + Page.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.pages != null && message.pages.length) - for (var i = 0; i < message.pages.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.Page.encode(message.pages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.form != null && Object.hasOwnProperty.call(message, "form")) + $root.google.cloud.dialogflow.cx.v3beta1.Form.encode(message.form, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.entryFulfillment != null && Object.hasOwnProperty.call(message, "entryFulfillment")) + $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.encode(message.entryFulfillment, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.transitionRoutes != null && message.transitionRoutes.length) + for (var i = 0; i < message.transitionRoutes.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.encode(message.transitionRoutes[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.eventHandlers != null && message.eventHandlers.length) + for (var i = 0; i < message.eventHandlers.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.encode(message.eventHandlers[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.transitionRouteGroups != null && message.transitionRouteGroups.length) + for (var i = 0; i < message.transitionRouteGroups.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.transitionRouteGroups[i]); return writer; }; /** - * Encodes the specified ListPagesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.verify|verify} messages. + * Encodes the specified Page message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Page.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.Page * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesResponse} message ListPagesResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IPage} message Page message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPagesResponse.encodeDelimited = function encodeDelimited(message, writer) { + Page.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListPagesResponse message from the specified reader or buffer. + * Decodes a Page message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.Page * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} ListPagesResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.Page} Page * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPagesResponse.decode = function decode(reader, length) { + Page.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListPagesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Page(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.pages && message.pages.length)) - message.pages = []; - message.pages.push($root.google.cloud.dialogflow.cx.v3beta1.Page.decode(reader, reader.uint32())); + message.name = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.displayName = reader.string(); + break; + } + case 7: { + message.entryFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.decode(reader, reader.uint32()); + break; + } + case 4: { + message.form = $root.google.cloud.dialogflow.cx.v3beta1.Form.decode(reader, reader.uint32()); + break; + } + case 11: { + if (!(message.transitionRouteGroups && message.transitionRouteGroups.length)) + message.transitionRouteGroups = []; + message.transitionRouteGroups.push(reader.string()); + break; + } + case 9: { + if (!(message.transitionRoutes && message.transitionRoutes.length)) + message.transitionRoutes = []; + message.transitionRoutes.push($root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.eventHandlers && message.eventHandlers.length)) + message.eventHandlers = []; + message.eventHandlers.push($root.google.cloud.dialogflow.cx.v3beta1.EventHandler.decode(reader, reader.uint32())); break; } default: @@ -82472,149 +83048,230 @@ }; /** - * Decodes a ListPagesResponse message from the specified reader or buffer, length delimited. + * Decodes a Page message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.Page * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} ListPagesResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.Page} Page * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPagesResponse.decodeDelimited = function decodeDelimited(reader) { + Page.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListPagesResponse message. + * Verifies a Page message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.Page * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListPagesResponse.verify = function verify(message) { + Page.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.pages != null && message.hasOwnProperty("pages")) { - if (!Array.isArray(message.pages)) - return "pages: array expected"; - for (var i = 0; i < message.pages.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Page.verify(message.pages[i]); + 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.entryFulfillment != null && message.hasOwnProperty("entryFulfillment")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify(message.entryFulfillment); + if (error) + return "entryFulfillment." + error; + } + if (message.form != null && message.hasOwnProperty("form")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Form.verify(message.form); + if (error) + return "form." + error; + } + if (message.transitionRouteGroups != null && message.hasOwnProperty("transitionRouteGroups")) { + if (!Array.isArray(message.transitionRouteGroups)) + return "transitionRouteGroups: array expected"; + for (var i = 0; i < message.transitionRouteGroups.length; ++i) + if (!$util.isString(message.transitionRouteGroups[i])) + return "transitionRouteGroups: string[] expected"; + } + if (message.transitionRoutes != null && message.hasOwnProperty("transitionRoutes")) { + if (!Array.isArray(message.transitionRoutes)) + return "transitionRoutes: array expected"; + for (var i = 0; i < message.transitionRoutes.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify(message.transitionRoutes[i]); if (error) - return "pages." + error; + return "transitionRoutes." + error; + } + } + if (message.eventHandlers != null && message.hasOwnProperty("eventHandlers")) { + if (!Array.isArray(message.eventHandlers)) + return "eventHandlers: array expected"; + for (var i = 0; i < message.eventHandlers.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.verify(message.eventHandlers[i]); + if (error) + return "eventHandlers." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListPagesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Page message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.Page * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} ListPagesResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.Page} Page */ - ListPagesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListPagesResponse) + Page.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Page) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListPagesResponse(); - if (object.pages) { - if (!Array.isArray(object.pages)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.pages: array expected"); - message.pages = []; - for (var i = 0; i < object.pages.length; ++i) { - if (typeof object.pages[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.pages: object expected"); - message.pages[i] = $root.google.cloud.dialogflow.cx.v3beta1.Page.fromObject(object.pages[i]); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Page(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.entryFulfillment != null) { + if (typeof object.entryFulfillment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.entryFulfillment: object expected"); + message.entryFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.fromObject(object.entryFulfillment); + } + if (object.form != null) { + if (typeof object.form !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.form: object expected"); + message.form = $root.google.cloud.dialogflow.cx.v3beta1.Form.fromObject(object.form); + } + if (object.transitionRouteGroups) { + if (!Array.isArray(object.transitionRouteGroups)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.transitionRouteGroups: array expected"); + message.transitionRouteGroups = []; + for (var i = 0; i < object.transitionRouteGroups.length; ++i) + message.transitionRouteGroups[i] = String(object.transitionRouteGroups[i]); + } + if (object.transitionRoutes) { + if (!Array.isArray(object.transitionRoutes)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.transitionRoutes: array expected"); + message.transitionRoutes = []; + for (var i = 0; i < object.transitionRoutes.length; ++i) { + if (typeof object.transitionRoutes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.transitionRoutes: object expected"); + message.transitionRoutes[i] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.fromObject(object.transitionRoutes[i]); + } + } + if (object.eventHandlers) { + if (!Array.isArray(object.eventHandlers)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.eventHandlers: array expected"); + message.eventHandlers = []; + for (var i = 0; i < object.eventHandlers.length; ++i) { + if (typeof object.eventHandlers[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.eventHandlers: object expected"); + message.eventHandlers[i] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.fromObject(object.eventHandlers[i]); } } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListPagesResponse message. Also converts values to other types if specified. + * Creates a plain object from a Page message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.Page * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} message ListPagesResponse + * @param {google.cloud.dialogflow.cx.v3beta1.Page} message Page * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPagesResponse.toObject = function toObject(message, options) { + Page.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.pages = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.pages && message.pages.length) { - object.pages = []; - for (var j = 0; j < message.pages.length; ++j) - object.pages[j] = $root.google.cloud.dialogflow.cx.v3beta1.Page.toObject(message.pages[j], options); + if (options.arrays || options.defaults) { + object.transitionRoutes = []; + object.eventHandlers = []; + object.transitionRouteGroups = []; + } + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.form = null; + object.entryFulfillment = 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.form != null && message.hasOwnProperty("form")) + object.form = $root.google.cloud.dialogflow.cx.v3beta1.Form.toObject(message.form, options); + if (message.entryFulfillment != null && message.hasOwnProperty("entryFulfillment")) + object.entryFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.toObject(message.entryFulfillment, options); + if (message.transitionRoutes && message.transitionRoutes.length) { + object.transitionRoutes = []; + for (var j = 0; j < message.transitionRoutes.length; ++j) + object.transitionRoutes[j] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.toObject(message.transitionRoutes[j], options); + } + if (message.eventHandlers && message.eventHandlers.length) { + object.eventHandlers = []; + for (var j = 0; j < message.eventHandlers.length; ++j) + object.eventHandlers[j] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.toObject(message.eventHandlers[j], options); + } + if (message.transitionRouteGroups && message.transitionRouteGroups.length) { + object.transitionRouteGroups = []; + for (var j = 0; j < message.transitionRouteGroups.length; ++j) + object.transitionRouteGroups[j] = message.transitionRouteGroups[j]; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListPagesResponse to JSON. + * Converts this Page to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.Page * @instance * @returns {Object.} JSON object */ - ListPagesResponse.prototype.toJSON = function toJSON() { + Page.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListPagesResponse + * Gets the default type url for Page * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.Page * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListPagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Page.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListPagesResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Page"; }; - return ListPagesResponse; + return Page; })(); - v3beta1.GetPageRequest = (function() { + v3beta1.Form = (function() { /** - * Properties of a GetPageRequest. + * Properties of a Form. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IGetPageRequest - * @property {string|null} [name] GetPageRequest name - * @property {string|null} [languageCode] GetPageRequest languageCode + * @interface IForm + * @property {Array.|null} [parameters] Form parameters */ /** - * Constructs a new GetPageRequest. + * Constructs a new Form. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a GetPageRequest. - * @implements IGetPageRequest + * @classdesc Represents a Form. + * @implements IForm * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IForm=} [properties] Properties to set */ - function GetPageRequest(properties) { + function Form(properties) { + this.parameters = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -82622,89 +83279,78 @@ } /** - * GetPageRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest - * @instance - */ - GetPageRequest.prototype.name = ""; - - /** - * GetPageRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * Form parameters. + * @member {Array.} parameters + * @memberof google.cloud.dialogflow.cx.v3beta1.Form * @instance */ - GetPageRequest.prototype.languageCode = ""; + Form.prototype.parameters = $util.emptyArray; /** - * Creates a new GetPageRequest instance using the specified properties. + * Creates a new Form instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Form * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} GetPageRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IForm=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Form} Form instance */ - GetPageRequest.create = function create(properties) { - return new GetPageRequest(properties); + Form.create = function create(properties) { + return new Form(properties); }; /** - * Encodes the specified GetPageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetPageRequest.verify|verify} messages. + * Encodes the specified Form message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Form * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest} message GetPageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IForm} message Form message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPageRequest.encode = function encode(message, writer) { + Form.encode = function encode(message, writer) { 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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.parameters != null && message.parameters.length) + for (var i = 0; i < message.parameters.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.encode(message.parameters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetPageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetPageRequest.verify|verify} messages. + * Encodes the specified Form message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Form * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest} message GetPageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IForm} message Form message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPageRequest.encodeDelimited = function encodeDelimited(message, writer) { + Form.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetPageRequest message from the specified reader or buffer. + * Decodes a Form message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Form * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} GetPageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Form} Form * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPageRequest.decode = function decode(reader, length) { + Form.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetPageRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Form(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.languageCode = reader.string(); + if (!(message.parameters && message.parameters.length)) + message.parameters = []; + message.parameters.push($root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.decode(reader, reader.uint32())); break; } default: @@ -82716,237 +83362,894 @@ }; /** - * Decodes a GetPageRequest message from the specified reader or buffer, length delimited. + * Decodes a Form message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Form * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} GetPageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Form} Form * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPageRequest.decodeDelimited = function decodeDelimited(reader) { + Form.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetPageRequest message. + * Verifies a Form message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Form * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetPageRequest.verify = function verify(message) { + Form.verify = function verify(message) { if (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.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; + if (message.parameters != null && message.hasOwnProperty("parameters")) { + if (!Array.isArray(message.parameters)) + return "parameters: array expected"; + for (var i = 0; i < message.parameters.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.verify(message.parameters[i]); + if (error) + return "parameters." + error; + } + } return null; }; /** - * Creates a GetPageRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Form message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Form * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} GetPageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Form} Form */ - GetPageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetPageRequest) + Form.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Form) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetPageRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Form(); + if (object.parameters) { + if (!Array.isArray(object.parameters)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.parameters: array expected"); + message.parameters = []; + for (var i = 0; i < object.parameters.length; ++i) { + if (typeof object.parameters[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.parameters: object expected"); + message.parameters[i] = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.fromObject(object.parameters[i]); + } + } return message; }; /** - * Creates a plain object from a GetPageRequest message. Also converts values to other types if specified. + * Creates a plain object from a Form message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Form * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} message GetPageRequest + * @param {google.cloud.dialogflow.cx.v3beta1.Form} message Form * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetPageRequest.toObject = function toObject(message, options) { + Form.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.languageCode = ""; + if (options.arrays || options.defaults) + object.parameters = []; + if (message.parameters && message.parameters.length) { + object.parameters = []; + for (var j = 0; j < message.parameters.length; ++j) + object.parameters[j] = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.toObject(message.parameters[j], options); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; return object; }; /** - * Converts this GetPageRequest to JSON. + * Converts this Form to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Form * @instance * @returns {Object.} JSON object */ - GetPageRequest.prototype.toJSON = function toJSON() { + Form.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetPageRequest + * Gets the default type url for Form * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Form * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetPageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Form.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GetPageRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Form"; }; - return GetPageRequest; - })(); - - v3beta1.CreatePageRequest = (function() { + Form.Parameter = (function() { - /** - * Properties of a CreatePageRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ICreatePageRequest - * @property {string|null} [parent] CreatePageRequest parent - * @property {google.cloud.dialogflow.cx.v3beta1.IPage|null} [page] CreatePageRequest page - * @property {string|null} [languageCode] CreatePageRequest languageCode - */ + /** + * Properties of a Parameter. + * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @interface IParameter + * @property {string|null} [displayName] Parameter displayName + * @property {boolean|null} [required] Parameter required + * @property {string|null} [entityType] Parameter entityType + * @property {boolean|null} [isList] Parameter isList + * @property {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior|null} [fillBehavior] Parameter fillBehavior + * @property {google.protobuf.IValue|null} [defaultValue] Parameter defaultValue + * @property {boolean|null} [redact] Parameter redact + */ - /** - * Constructs a new CreatePageRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a CreatePageRequest. - * @implements ICreatePageRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest=} [properties] Properties to set - */ - function CreatePageRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new Parameter. + * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @classdesc Represents a Parameter. + * @implements IParameter + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.Form.IParameter=} [properties] Properties to set + */ + function Parameter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * CreatePageRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest - * @instance + /** + * Parameter displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @instance + */ + Parameter.prototype.displayName = ""; + + /** + * Parameter required. + * @member {boolean} required + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @instance + */ + Parameter.prototype.required = false; + + /** + * Parameter entityType. + * @member {string} entityType + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @instance + */ + Parameter.prototype.entityType = ""; + + /** + * Parameter isList. + * @member {boolean} isList + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @instance + */ + Parameter.prototype.isList = false; + + /** + * Parameter fillBehavior. + * @member {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior|null|undefined} fillBehavior + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @instance + */ + Parameter.prototype.fillBehavior = null; + + /** + * Parameter defaultValue. + * @member {google.protobuf.IValue|null|undefined} defaultValue + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @instance + */ + Parameter.prototype.defaultValue = null; + + /** + * Parameter redact. + * @member {boolean} redact + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @instance + */ + Parameter.prototype.redact = false; + + /** + * Creates a new Parameter instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Form.IParameter=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter} Parameter instance + */ + Parameter.create = function create(properties) { + return new Parameter(properties); + }; + + /** + * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Form.IParameter} message Parameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Parameter.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.required != null && Object.hasOwnProperty.call(message, "required")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.required); + if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.entityType); + if (message.isList != null && Object.hasOwnProperty.call(message, "isList")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isList); + if (message.fillBehavior != null && Object.hasOwnProperty.call(message, "fillBehavior")) + $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.encode(message.fillBehavior, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + $root.google.protobuf.Value.encode(message.defaultValue, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.redact != null && Object.hasOwnProperty.call(message, "redact")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.redact); + return writer; + }; + + /** + * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Form.IParameter} message Parameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Parameter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Parameter message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter} Parameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Parameter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.required = reader.bool(); + break; + } + case 3: { + message.entityType = reader.string(); + break; + } + case 4: { + message.isList = reader.bool(); + break; + } + case 7: { + message.fillBehavior = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.decode(reader, reader.uint32()); + break; + } + case 9: { + message.defaultValue = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + } + case 11: { + message.redact = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Parameter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter} Parameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Parameter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Parameter message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Parameter.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.required != null && message.hasOwnProperty("required")) + if (typeof message.required !== "boolean") + return "required: boolean expected"; + if (message.entityType != null && message.hasOwnProperty("entityType")) + if (!$util.isString(message.entityType)) + return "entityType: string expected"; + if (message.isList != null && message.hasOwnProperty("isList")) + if (typeof message.isList !== "boolean") + return "isList: boolean expected"; + if (message.fillBehavior != null && message.hasOwnProperty("fillBehavior")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify(message.fillBehavior); + if (error) + return "fillBehavior." + error; + } + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) { + var error = $root.google.protobuf.Value.verify(message.defaultValue); + if (error) + return "defaultValue." + error; + } + if (message.redact != null && message.hasOwnProperty("redact")) + if (typeof message.redact !== "boolean") + return "redact: boolean expected"; + return null; + }; + + /** + * Creates a Parameter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter} Parameter + */ + Parameter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.required != null) + message.required = Boolean(object.required); + if (object.entityType != null) + message.entityType = String(object.entityType); + if (object.isList != null) + message.isList = Boolean(object.isList); + if (object.fillBehavior != null) { + if (typeof object.fillBehavior !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.fillBehavior: object expected"); + message.fillBehavior = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.fromObject(object.fillBehavior); + } + if (object.defaultValue != null) { + if (typeof object.defaultValue !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.defaultValue: object expected"); + message.defaultValue = $root.google.protobuf.Value.fromObject(object.defaultValue); + } + if (object.redact != null) + message.redact = Boolean(object.redact); + return message; + }; + + /** + * Creates a plain object from a Parameter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter} message Parameter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Parameter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.required = false; + object.entityType = ""; + object.isList = false; + object.fillBehavior = null; + object.defaultValue = null; + object.redact = false; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.required != null && message.hasOwnProperty("required")) + object.required = message.required; + if (message.entityType != null && message.hasOwnProperty("entityType")) + object.entityType = message.entityType; + if (message.isList != null && message.hasOwnProperty("isList")) + object.isList = message.isList; + if (message.fillBehavior != null && message.hasOwnProperty("fillBehavior")) + object.fillBehavior = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.toObject(message.fillBehavior, options); + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = $root.google.protobuf.Value.toObject(message.defaultValue, options); + if (message.redact != null && message.hasOwnProperty("redact")) + object.redact = message.redact; + return object; + }; + + /** + * Converts this Parameter to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @instance + * @returns {Object.} JSON object + */ + Parameter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Parameter + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Parameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Form.Parameter"; + }; + + Parameter.FillBehavior = (function() { + + /** + * Properties of a FillBehavior. + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @interface IFillBehavior + * @property {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null} [initialPromptFulfillment] FillBehavior initialPromptFulfillment + * @property {Array.|null} [repromptEventHandlers] FillBehavior repromptEventHandlers + */ + + /** + * Constructs a new FillBehavior. + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @classdesc Represents a FillBehavior. + * @implements IFillBehavior + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior=} [properties] Properties to set + */ + function FillBehavior(properties) { + this.repromptEventHandlers = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FillBehavior initialPromptFulfillment. + * @member {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null|undefined} initialPromptFulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior + * @instance + */ + FillBehavior.prototype.initialPromptFulfillment = null; + + /** + * FillBehavior repromptEventHandlers. + * @member {Array.} repromptEventHandlers + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior + * @instance + */ + FillBehavior.prototype.repromptEventHandlers = $util.emptyArray; + + /** + * Creates a new FillBehavior instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} FillBehavior instance + */ + FillBehavior.create = function create(properties) { + return new FillBehavior(properties); + }; + + /** + * Encodes the specified FillBehavior message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior} message FillBehavior message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FillBehavior.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPromptFulfillment != null && Object.hasOwnProperty.call(message, "initialPromptFulfillment")) + $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.encode(message.initialPromptFulfillment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.repromptEventHandlers != null && message.repromptEventHandlers.length) + for (var i = 0; i < message.repromptEventHandlers.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.encode(message.repromptEventHandlers[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FillBehavior message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior} message FillBehavior message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FillBehavior.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FillBehavior message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} FillBehavior + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FillBehavior.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.initialPromptFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.repromptEventHandlers && message.repromptEventHandlers.length)) + message.repromptEventHandlers = []; + message.repromptEventHandlers.push($root.google.cloud.dialogflow.cx.v3beta1.EventHandler.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FillBehavior message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} FillBehavior + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FillBehavior.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FillBehavior message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FillBehavior.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPromptFulfillment != null && message.hasOwnProperty("initialPromptFulfillment")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify(message.initialPromptFulfillment); + if (error) + return "initialPromptFulfillment." + error; + } + if (message.repromptEventHandlers != null && message.hasOwnProperty("repromptEventHandlers")) { + if (!Array.isArray(message.repromptEventHandlers)) + return "repromptEventHandlers: array expected"; + for (var i = 0; i < message.repromptEventHandlers.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.verify(message.repromptEventHandlers[i]); + if (error) + return "repromptEventHandlers." + error; + } + } + return null; + }; + + /** + * Creates a FillBehavior message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} FillBehavior + */ + FillBehavior.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior(); + if (object.initialPromptFulfillment != null) { + if (typeof object.initialPromptFulfillment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.initialPromptFulfillment: object expected"); + message.initialPromptFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.fromObject(object.initialPromptFulfillment); + } + if (object.repromptEventHandlers) { + if (!Array.isArray(object.repromptEventHandlers)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.repromptEventHandlers: array expected"); + message.repromptEventHandlers = []; + for (var i = 0; i < object.repromptEventHandlers.length; ++i) { + if (typeof object.repromptEventHandlers[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.repromptEventHandlers: object expected"); + message.repromptEventHandlers[i] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.fromObject(object.repromptEventHandlers[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FillBehavior message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} message FillBehavior + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FillBehavior.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.repromptEventHandlers = []; + if (options.defaults) + object.initialPromptFulfillment = null; + if (message.initialPromptFulfillment != null && message.hasOwnProperty("initialPromptFulfillment")) + object.initialPromptFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.toObject(message.initialPromptFulfillment, options); + if (message.repromptEventHandlers && message.repromptEventHandlers.length) { + object.repromptEventHandlers = []; + for (var j = 0; j < message.repromptEventHandlers.length; ++j) + object.repromptEventHandlers[j] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.toObject(message.repromptEventHandlers[j], options); + } + return object; + }; + + /** + * Converts this FillBehavior to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior + * @instance + * @returns {Object.} JSON object + */ + FillBehavior.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FillBehavior + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FillBehavior.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior"; + }; + + return FillBehavior; + })(); + + return Parameter; + })(); + + return Form; + })(); + + v3beta1.EventHandler = (function() { + + /** + * Properties of an EventHandler. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IEventHandler + * @property {string|null} [name] EventHandler name + * @property {string|null} [event] EventHandler event + * @property {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null} [triggerFulfillment] EventHandler triggerFulfillment + * @property {string|null} [targetPage] EventHandler targetPage + * @property {string|null} [targetFlow] EventHandler targetFlow */ - CreatePageRequest.prototype.parent = ""; /** - * CreatePageRequest page. - * @member {google.cloud.dialogflow.cx.v3beta1.IPage|null|undefined} page - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * Constructs a new EventHandler. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents an EventHandler. + * @implements IEventHandler + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IEventHandler=} [properties] Properties to set + */ + function EventHandler(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EventHandler name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler * @instance */ - CreatePageRequest.prototype.page = null; + EventHandler.prototype.name = ""; /** - * CreatePageRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * EventHandler event. + * @member {string} event + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler * @instance */ - CreatePageRequest.prototype.languageCode = ""; + EventHandler.prototype.event = ""; /** - * Creates a new CreatePageRequest instance using the specified properties. + * EventHandler triggerFulfillment. + * @member {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null|undefined} triggerFulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @instance + */ + EventHandler.prototype.triggerFulfillment = null; + + /** + * EventHandler targetPage. + * @member {string|null|undefined} targetPage + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @instance + */ + EventHandler.prototype.targetPage = null; + + /** + * EventHandler targetFlow. + * @member {string|null|undefined} targetFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @instance + */ + EventHandler.prototype.targetFlow = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * EventHandler target. + * @member {"targetPage"|"targetFlow"|undefined} target + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @instance + */ + Object.defineProperty(EventHandler.prototype, "target", { + get: $util.oneOfGetter($oneOfFields = ["targetPage", "targetFlow"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new EventHandler instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} CreatePageRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IEventHandler=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.EventHandler} EventHandler instance */ - CreatePageRequest.create = function create(properties) { - return new CreatePageRequest(properties); + EventHandler.create = function create(properties) { + return new EventHandler(properties); }; /** - * Encodes the specified CreatePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.verify|verify} messages. + * Encodes the specified EventHandler message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EventHandler.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest} message CreatePageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IEventHandler} message EventHandler message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreatePageRequest.encode = function encode(message, writer) { + EventHandler.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.page != null && Object.hasOwnProperty.call(message, "page")) - $root.google.cloud.dialogflow.cx.v3beta1.Page.encode(message.page, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); + if (message.targetPage != null && Object.hasOwnProperty.call(message, "targetPage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetPage); + if (message.targetFlow != null && Object.hasOwnProperty.call(message, "targetFlow")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.targetFlow); + if (message.event != null && Object.hasOwnProperty.call(message, "event")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.event); + if (message.triggerFulfillment != null && Object.hasOwnProperty.call(message, "triggerFulfillment")) + $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.encode(message.triggerFulfillment, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); return writer; }; /** - * Encodes the specified CreatePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.verify|verify} messages. + * Encodes the specified EventHandler message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EventHandler.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest} message CreatePageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IEventHandler} message EventHandler message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreatePageRequest.encodeDelimited = function encodeDelimited(message, writer) { + EventHandler.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreatePageRequest message from the specified reader or buffer. + * Decodes an EventHandler message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} CreatePageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.EventHandler} EventHandler * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreatePageRequest.decode = function decode(reader, length) { + EventHandler.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.EventHandler(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); + case 6: { + message.name = reader.string(); + break; + } + case 4: { + message.event = reader.string(); + break; + } + case 5: { + message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.decode(reader, reader.uint32()); break; } case 2: { - message.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.decode(reader, reader.uint32()); + message.targetPage = reader.string(); break; } case 3: { - message.languageCode = reader.string(); + message.targetFlow = reader.string(); break; } default: @@ -82958,146 +84261,176 @@ }; /** - * Decodes a CreatePageRequest message from the specified reader or buffer, length delimited. + * Decodes an EventHandler message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} CreatePageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.EventHandler} EventHandler * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreatePageRequest.decodeDelimited = function decodeDelimited(reader) { + EventHandler.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreatePageRequest message. + * Verifies an EventHandler message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreatePageRequest.verify = function verify(message) { + EventHandler.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.page != null && message.hasOwnProperty("page")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Page.verify(message.page); + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.event != null && message.hasOwnProperty("event")) + if (!$util.isString(message.event)) + return "event: string expected"; + if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify(message.triggerFulfillment); if (error) - return "page." + error; + return "triggerFulfillment." + error; + } + if (message.targetPage != null && message.hasOwnProperty("targetPage")) { + properties.target = 1; + if (!$util.isString(message.targetPage)) + return "targetPage: string expected"; + } + if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { + if (properties.target === 1) + return "target: multiple values"; + properties.target = 1; + if (!$util.isString(message.targetFlow)) + return "targetFlow: string expected"; } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; return null; }; /** - * Creates a CreatePageRequest message from a plain object. Also converts values to their respective internal types. + * Creates an EventHandler message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} CreatePageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.EventHandler} EventHandler */ - CreatePageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest) + EventHandler.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.EventHandler) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.page != null) { - if (typeof object.page !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.page: object expected"); - message.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.fromObject(object.page); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.EventHandler(); + if (object.name != null) + message.name = String(object.name); + if (object.event != null) + message.event = String(object.event); + if (object.triggerFulfillment != null) { + if (typeof object.triggerFulfillment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.EventHandler.triggerFulfillment: object expected"); + message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.fromObject(object.triggerFulfillment); } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + if (object.targetPage != null) + message.targetPage = String(object.targetPage); + if (object.targetFlow != null) + message.targetFlow = String(object.targetFlow); return message; }; /** - * Creates a plain object from a CreatePageRequest message. Also converts values to other types if specified. + * Creates a plain object from an EventHandler message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler * @static - * @param {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} message CreatePageRequest + * @param {google.cloud.dialogflow.cx.v3beta1.EventHandler} message EventHandler * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreatePageRequest.toObject = function toObject(message, options) { + EventHandler.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.page = null; - object.languageCode = ""; + object.event = ""; + object.triggerFulfillment = null; + object.name = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.page != null && message.hasOwnProperty("page")) - object.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.toObject(message.page, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (message.targetPage != null && message.hasOwnProperty("targetPage")) { + object.targetPage = message.targetPage; + if (options.oneofs) + object.target = "targetPage"; + } + if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { + object.targetFlow = message.targetFlow; + if (options.oneofs) + object.target = "targetFlow"; + } + if (message.event != null && message.hasOwnProperty("event")) + object.event = message.event; + if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) + object.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.toObject(message.triggerFulfillment, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CreatePageRequest to JSON. + * Converts this EventHandler to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler * @instance * @returns {Object.} JSON object */ - CreatePageRequest.prototype.toJSON = function toJSON() { + EventHandler.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreatePageRequest + * Gets the default type url for EventHandler * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreatePageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EventHandler.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.CreatePageRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.EventHandler"; }; - return CreatePageRequest; + return EventHandler; })(); - v3beta1.UpdatePageRequest = (function() { + v3beta1.TransitionRoute = (function() { /** - * Properties of an UpdatePageRequest. + * Properties of a TransitionRoute. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IUpdatePageRequest - * @property {google.cloud.dialogflow.cx.v3beta1.IPage|null} [page] UpdatePageRequest page - * @property {string|null} [languageCode] UpdatePageRequest languageCode - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdatePageRequest updateMask + * @interface ITransitionRoute + * @property {string|null} [name] TransitionRoute name + * @property {string|null} [intent] TransitionRoute intent + * @property {string|null} [condition] TransitionRoute condition + * @property {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null} [triggerFulfillment] TransitionRoute triggerFulfillment + * @property {string|null} [targetPage] TransitionRoute targetPage + * @property {string|null} [targetFlow] TransitionRoute targetFlow */ /** - * Constructs a new UpdatePageRequest. + * Constructs a new TransitionRoute. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an UpdatePageRequest. - * @implements IUpdatePageRequest + * @classdesc Represents a TransitionRoute. + * @implements ITransitionRoute * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute=} [properties] Properties to set */ - function UpdatePageRequest(properties) { + function TransitionRoute(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -83105,103 +84438,159 @@ } /** - * UpdatePageRequest page. - * @member {google.cloud.dialogflow.cx.v3beta1.IPage|null|undefined} page - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * TransitionRoute name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute * @instance */ - UpdatePageRequest.prototype.page = null; + TransitionRoute.prototype.name = ""; /** - * UpdatePageRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * TransitionRoute intent. + * @member {string} intent + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute * @instance */ - UpdatePageRequest.prototype.languageCode = ""; + TransitionRoute.prototype.intent = ""; /** - * UpdatePageRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * TransitionRoute condition. + * @member {string} condition + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute * @instance */ - UpdatePageRequest.prototype.updateMask = null; + TransitionRoute.prototype.condition = ""; /** - * Creates a new UpdatePageRequest instance using the specified properties. + * TransitionRoute triggerFulfillment. + * @member {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null|undefined} triggerFulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @instance + */ + TransitionRoute.prototype.triggerFulfillment = null; + + /** + * TransitionRoute targetPage. + * @member {string|null|undefined} targetPage + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @instance + */ + TransitionRoute.prototype.targetPage = null; + + /** + * TransitionRoute targetFlow. + * @member {string|null|undefined} targetFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @instance + */ + TransitionRoute.prototype.targetFlow = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TransitionRoute target. + * @member {"targetPage"|"targetFlow"|undefined} target + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @instance + */ + Object.defineProperty(TransitionRoute.prototype, "target", { + get: $util.oneOfGetter($oneOfFields = ["targetPage", "targetFlow"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TransitionRoute instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} UpdatePageRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} TransitionRoute instance */ - UpdatePageRequest.create = function create(properties) { - return new UpdatePageRequest(properties); + TransitionRoute.create = function create(properties) { + return new TransitionRoute(properties); }; /** - * Encodes the specified UpdatePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.verify|verify} messages. + * Encodes the specified TransitionRoute message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest} message UpdatePageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute} message TransitionRoute message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdatePageRequest.encode = function encode(message, writer) { + TransitionRoute.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.page != null && Object.hasOwnProperty.call(message, "page")) - $root.google.cloud.dialogflow.cx.v3beta1.Page.encode(message.page, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - 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(); + if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.intent); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.condition); + if (message.triggerFulfillment != null && Object.hasOwnProperty.call(message, "triggerFulfillment")) + $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.encode(message.triggerFulfillment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.targetPage != null && Object.hasOwnProperty.call(message, "targetPage")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.targetPage); + if (message.targetFlow != null && Object.hasOwnProperty.call(message, "targetFlow")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.targetFlow); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); return writer; }; /** - * Encodes the specified UpdatePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.verify|verify} messages. + * Encodes the specified TransitionRoute message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest} message UpdatePageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute} message TransitionRoute message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdatePageRequest.encodeDelimited = function encodeDelimited(message, writer) { + TransitionRoute.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdatePageRequest message from the specified reader or buffer. + * Decodes a TransitionRoute message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} UpdatePageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} TransitionRoute * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdatePageRequest.decode = function decode(reader, length) { + TransitionRoute.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 6: { + message.name = reader.string(); + break; + } case 1: { - message.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.decode(reader, reader.uint32()); + message.intent = reader.string(); break; } case 2: { - message.languageCode = reader.string(); + message.condition = reader.string(); break; } case 3: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.decode(reader, reader.uint32()); + break; + } + case 4: { + message.targetPage = reader.string(); + break; + } + case 5: { + message.targetFlow = reader.string(); break; } default: @@ -83213,150 +84602,182 @@ }; /** - * Decodes an UpdatePageRequest message from the specified reader or buffer, length delimited. + * Decodes a TransitionRoute message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} UpdatePageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} TransitionRoute * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdatePageRequest.decodeDelimited = function decodeDelimited(reader) { + TransitionRoute.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdatePageRequest message. + * Verifies a TransitionRoute message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdatePageRequest.verify = function verify(message) { + TransitionRoute.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.page != null && message.hasOwnProperty("page")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Page.verify(message.page); + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.intent != null && message.hasOwnProperty("intent")) + if (!$util.isString(message.intent)) + return "intent: string expected"; + if (message.condition != null && message.hasOwnProperty("condition")) + if (!$util.isString(message.condition)) + return "condition: string expected"; + if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify(message.triggerFulfillment); if (error) - return "page." + error; + return "triggerFulfillment." + error; } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.targetPage != null && message.hasOwnProperty("targetPage")) { + properties.target = 1; + if (!$util.isString(message.targetPage)) + return "targetPage: string expected"; + } + if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { + if (properties.target === 1) + return "target: multiple values"; + properties.target = 1; + if (!$util.isString(message.targetFlow)) + return "targetFlow: string expected"; } return null; }; /** - * Creates an UpdatePageRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TransitionRoute message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} UpdatePageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} TransitionRoute */ - UpdatePageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest) + TransitionRoute.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest(); - if (object.page != null) { - if (typeof object.page !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.page: object expected"); - message.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.fromObject(object.page); - } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute(); + if (object.name != null) + message.name = String(object.name); + if (object.intent != null) + message.intent = String(object.intent); + if (object.condition != null) + message.condition = String(object.condition); + if (object.triggerFulfillment != null) { + if (typeof object.triggerFulfillment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionRoute.triggerFulfillment: object expected"); + message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.fromObject(object.triggerFulfillment); } + if (object.targetPage != null) + message.targetPage = String(object.targetPage); + if (object.targetFlow != null) + message.targetFlow = String(object.targetFlow); return message; }; /** - * Creates a plain object from an UpdatePageRequest message. Also converts values to other types if specified. + * Creates a plain object from a TransitionRoute message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute * @static - * @param {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} message UpdatePageRequest + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} message TransitionRoute * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdatePageRequest.toObject = function toObject(message, options) { + TransitionRoute.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.page = null; - object.languageCode = ""; - object.updateMask = null; + object.intent = ""; + object.condition = ""; + object.triggerFulfillment = null; + object.name = ""; } - if (message.page != null && message.hasOwnProperty("page")) - object.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.toObject(message.page, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.intent != null && message.hasOwnProperty("intent")) + object.intent = message.intent; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = message.condition; + if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) + object.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.toObject(message.triggerFulfillment, options); + if (message.targetPage != null && message.hasOwnProperty("targetPage")) { + object.targetPage = message.targetPage; + if (options.oneofs) + object.target = "targetPage"; + } + if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { + object.targetFlow = message.targetFlow; + if (options.oneofs) + object.target = "targetFlow"; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this UpdatePageRequest to JSON. + * Converts this TransitionRoute to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute * @instance * @returns {Object.} JSON object */ - UpdatePageRequest.prototype.toJSON = function toJSON() { + TransitionRoute.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdatePageRequest + * Gets the default type url for TransitionRoute * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdatePageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TransitionRoute.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.TransitionRoute"; }; - return UpdatePageRequest; + return TransitionRoute; })(); - v3beta1.DeletePageRequest = (function() { + v3beta1.ListPagesRequest = (function() { /** - * Properties of a DeletePageRequest. + * Properties of a ListPagesRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IDeletePageRequest - * @property {string|null} [name] DeletePageRequest name - * @property {boolean|null} [force] DeletePageRequest force + * @interface IListPagesRequest + * @property {string|null} [parent] ListPagesRequest parent + * @property {string|null} [languageCode] ListPagesRequest languageCode + * @property {number|null} [pageSize] ListPagesRequest pageSize + * @property {string|null} [pageToken] ListPagesRequest pageToken */ /** - * Constructs a new DeletePageRequest. + * Constructs a new ListPagesRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a DeletePageRequest. - * @implements IDeletePageRequest + * @classdesc Represents a ListPagesRequest. + * @implements IListPagesRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest=} [properties] Properties to set */ - function DeletePageRequest(properties) { + function ListPagesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -83364,89 +84785,117 @@ } /** - * DeletePageRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * ListPagesRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest * @instance */ - DeletePageRequest.prototype.name = ""; + ListPagesRequest.prototype.parent = ""; /** - * DeletePageRequest force. - * @member {boolean} force - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * ListPagesRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest * @instance */ - DeletePageRequest.prototype.force = false; + ListPagesRequest.prototype.languageCode = ""; /** - * Creates a new DeletePageRequest instance using the specified properties. + * ListPagesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @instance + */ + ListPagesRequest.prototype.pageSize = 0; + + /** + * ListPagesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @instance + */ + ListPagesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListPagesRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} DeletePageRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} ListPagesRequest instance */ - DeletePageRequest.create = function create(properties) { - return new DeletePageRequest(properties); + ListPagesRequest.create = function create(properties) { + return new ListPagesRequest(properties); }; /** - * Encodes the specified DeletePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeletePageRequest.verify|verify} messages. + * Encodes the specified ListPagesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest} message DeletePageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest} message ListPagesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeletePageRequest.encode = function encode(message, writer) { + ListPagesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + 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); return writer; }; /** - * Encodes the specified DeletePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeletePageRequest.verify|verify} messages. + * Encodes the specified ListPagesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest} message DeletePageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest} message ListPagesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeletePageRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListPagesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeletePageRequest message from the specified reader or buffer. + * Decodes a ListPagesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} DeletePageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} ListPagesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeletePageRequest.decode = function decode(reader, length) { + ListPagesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.force = reader.bool(); + message.languageCode = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); break; } default: @@ -83458,139 +84907,149 @@ }; /** - * Decodes a DeletePageRequest message from the specified reader or buffer, length delimited. + * Decodes a ListPagesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} DeletePageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} ListPagesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeletePageRequest.decodeDelimited = function decodeDelimited(reader) { + ListPagesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeletePageRequest message. + * Verifies a ListPagesRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeletePageRequest.verify = function verify(message) { + ListPagesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: 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 DeletePageRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListPagesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} DeletePageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} ListPagesRequest */ - DeletePageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest) + ListPagesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + 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 DeletePageRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListPagesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} message DeletePageRequest + * @param {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} message ListPagesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeletePageRequest.toObject = function toObject(message, options) { + ListPagesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.force = false; + object.parent = ""; + object.languageCode = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this DeletePageRequest to JSON. + * Converts this ListPagesRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest * @instance * @returns {Object.} JSON object */ - DeletePageRequest.prototype.toJSON = function toJSON() { + ListPagesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeletePageRequest + * Gets the default type url for ListPagesRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeletePageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListPagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.DeletePageRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListPagesRequest"; }; - return DeletePageRequest; + return ListPagesRequest; })(); - v3beta1.Fulfillment = (function() { + v3beta1.ListPagesResponse = (function() { /** - * Properties of a Fulfillment. + * Properties of a ListPagesResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IFulfillment - * @property {Array.|null} [messages] Fulfillment messages - * @property {string|null} [webhook] Fulfillment webhook - * @property {boolean|null} [returnPartialResponses] Fulfillment returnPartialResponses - * @property {string|null} [tag] Fulfillment tag - * @property {Array.|null} [setParameterActions] Fulfillment setParameterActions - * @property {Array.|null} [conditionalCases] Fulfillment conditionalCases + * @interface IListPagesResponse + * @property {Array.|null} [pages] ListPagesResponse pages + * @property {string|null} [nextPageToken] ListPagesResponse nextPageToken */ /** - * Constructs a new Fulfillment. + * Constructs a new ListPagesResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a Fulfillment. - * @implements IFulfillment + * @classdesc Represents a ListPagesResponse. + * @implements IListPagesResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IFulfillment=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesResponse=} [properties] Properties to set */ - function Fulfillment(properties) { - this.messages = []; - this.setParameterActions = []; - this.conditionalCases = []; + function ListPagesResponse(properties) { + this.pages = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -83598,154 +85057,336 @@ } /** - * Fulfillment messages. - * @member {Array.} messages - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * ListPagesResponse pages. + * @member {Array.} pages + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse * @instance */ - Fulfillment.prototype.messages = $util.emptyArray; + ListPagesResponse.prototype.pages = $util.emptyArray; /** - * Fulfillment webhook. - * @member {string} webhook - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * ListPagesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse * @instance */ - Fulfillment.prototype.webhook = ""; + ListPagesResponse.prototype.nextPageToken = ""; /** - * Fulfillment returnPartialResponses. - * @member {boolean} returnPartialResponses - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment - * @instance + * Creates a new ListPagesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} ListPagesResponse instance */ - Fulfillment.prototype.returnPartialResponses = false; + ListPagesResponse.create = function create(properties) { + return new ListPagesResponse(properties); + }; /** - * Fulfillment tag. - * @member {string} tag - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * Encodes the specified ListPagesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesResponse} message ListPagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPagesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pages != null && message.pages.length) + for (var i = 0; i < message.pages.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.Page.encode(message.pages[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 ListPagesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesResponse} message ListPagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPagesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPagesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} ListPagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPagesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListPagesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.pages && message.pages.length)) + message.pages = []; + message.pages.push($root.google.cloud.dialogflow.cx.v3beta1.Page.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPagesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} ListPagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPagesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPagesResponse message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPagesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pages != null && message.hasOwnProperty("pages")) { + if (!Array.isArray(message.pages)) + return "pages: array expected"; + for (var i = 0; i < message.pages.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Page.verify(message.pages[i]); + if (error) + return "pages." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListPagesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} ListPagesResponse + */ + ListPagesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListPagesResponse) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListPagesResponse(); + if (object.pages) { + if (!Array.isArray(object.pages)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.pages: array expected"); + message.pages = []; + for (var i = 0; i < object.pages.length; ++i) { + if (typeof object.pages[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.pages: object expected"); + message.pages[i] = $root.google.cloud.dialogflow.cx.v3beta1.Page.fromObject(object.pages[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListPagesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} message ListPagesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPagesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pages = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.pages && message.pages.length) { + object.pages = []; + for (var j = 0; j < message.pages.length; ++j) + object.pages[j] = $root.google.cloud.dialogflow.cx.v3beta1.Page.toObject(message.pages[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListPagesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse * @instance + * @returns {Object.} JSON object */ - Fulfillment.prototype.tag = ""; + ListPagesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Fulfillment setParameterActions. - * @member {Array.} setParameterActions - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * Gets the default type url for ListPagesResponse + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListPagesResponse"; + }; + + return ListPagesResponse; + })(); + + v3beta1.GetPageRequest = (function() { + + /** + * Properties of a GetPageRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IGetPageRequest + * @property {string|null} [name] GetPageRequest name + * @property {string|null} [languageCode] GetPageRequest languageCode + */ + + /** + * Constructs a new GetPageRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a GetPageRequest. + * @implements IGetPageRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest=} [properties] Properties to set + */ + function GetPageRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetPageRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest * @instance */ - Fulfillment.prototype.setParameterActions = $util.emptyArray; + GetPageRequest.prototype.name = ""; /** - * Fulfillment conditionalCases. - * @member {Array.} conditionalCases - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * GetPageRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest * @instance */ - Fulfillment.prototype.conditionalCases = $util.emptyArray; + GetPageRequest.prototype.languageCode = ""; /** - * Creates a new Fulfillment instance using the specified properties. + * Creates a new GetPageRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IFulfillment=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment} Fulfillment instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} GetPageRequest instance */ - Fulfillment.create = function create(properties) { - return new Fulfillment(properties); + GetPageRequest.create = function create(properties) { + return new GetPageRequest(properties); }; /** - * Encodes the specified Fulfillment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify|verify} messages. + * Encodes the specified GetPageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetPageRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IFulfillment} message Fulfillment message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest} message GetPageRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Fulfillment.encode = function encode(message, writer) { + GetPageRequest.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.dialogflow.cx.v3beta1.ResponseMessage.encode(message.messages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.webhook != null && Object.hasOwnProperty.call(message, "webhook")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.webhook); - if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.tag); - if (message.setParameterActions != null && message.setParameterActions.length) - for (var i = 0; i < message.setParameterActions.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.encode(message.setParameterActions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.conditionalCases != null && message.conditionalCases.length) - for (var i = 0; i < message.conditionalCases.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.encode(message.conditionalCases[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.returnPartialResponses != null && Object.hasOwnProperty.call(message, "returnPartialResponses")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.returnPartialResponses); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); return writer; }; /** - * Encodes the specified Fulfillment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify|verify} messages. + * Encodes the specified GetPageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetPageRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IFulfillment} message Fulfillment message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest} message GetPageRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Fulfillment.encodeDelimited = function encodeDelimited(message, writer) { + GetPageRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Fulfillment message from the specified reader or buffer. + * Decodes a GetPageRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment} Fulfillment + * @returns {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} GetPageRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Fulfillment.decode = function decode(reader, length) { + GetPageRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetPageRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.messages && message.messages.length)) - message.messages = []; - message.messages.push($root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.decode(reader, reader.uint32())); + message.name = reader.string(); break; } case 2: { - message.webhook = reader.string(); - break; - } - case 8: { - message.returnPartialResponses = reader.bool(); - break; - } - case 3: { - message.tag = reader.string(); - break; - } - case 4: { - if (!(message.setParameterActions && message.setParameterActions.length)) - message.setParameterActions = []; - message.setParameterActions.push($root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.conditionalCases && message.conditionalCases.length)) - message.conditionalCases = []; - message.conditionalCases.push($root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.decode(reader, reader.uint32())); + message.languageCode = reader.string(); break; } default: @@ -83757,1407 +85398,1036 @@ }; /** - * Decodes a Fulfillment message from the specified reader or buffer, length delimited. + * Decodes a GetPageRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment} Fulfillment + * @returns {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} GetPageRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Fulfillment.decodeDelimited = function decodeDelimited(reader) { + GetPageRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Fulfillment message. + * Verifies a GetPageRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Fulfillment.verify = function verify(message) { + GetPageRequest.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.dialogflow.cx.v3beta1.ResponseMessage.verify(message.messages[i]); - if (error) - return "messages." + error; - } - } - if (message.webhook != null && message.hasOwnProperty("webhook")) - if (!$util.isString(message.webhook)) - return "webhook: string expected"; - if (message.returnPartialResponses != null && message.hasOwnProperty("returnPartialResponses")) - if (typeof message.returnPartialResponses !== "boolean") - return "returnPartialResponses: boolean expected"; - if (message.tag != null && message.hasOwnProperty("tag")) - if (!$util.isString(message.tag)) - return "tag: string expected"; - if (message.setParameterActions != null && message.hasOwnProperty("setParameterActions")) { - if (!Array.isArray(message.setParameterActions)) - return "setParameterActions: array expected"; - for (var i = 0; i < message.setParameterActions.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.verify(message.setParameterActions[i]); - if (error) - return "setParameterActions." + error; - } - } - if (message.conditionalCases != null && message.hasOwnProperty("conditionalCases")) { - if (!Array.isArray(message.conditionalCases)) - return "conditionalCases: array expected"; - for (var i = 0; i < message.conditionalCases.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify(message.conditionalCases[i]); - if (error) - return "conditionalCases." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a Fulfillment message from a plain object. Also converts values to their respective internal types. + * Creates a GetPageRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment} Fulfillment + * @returns {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} GetPageRequest */ - Fulfillment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment) + GetPageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetPageRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment(); - if (object.messages) { - if (!Array.isArray(object.messages)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.messages: array expected"); - message.messages = []; - for (var i = 0; i < object.messages.length; ++i) { - if (typeof object.messages[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.messages: object expected"); - message.messages[i] = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.fromObject(object.messages[i]); - } - } - if (object.webhook != null) - message.webhook = String(object.webhook); - if (object.returnPartialResponses != null) - message.returnPartialResponses = Boolean(object.returnPartialResponses); - if (object.tag != null) - message.tag = String(object.tag); - if (object.setParameterActions) { - if (!Array.isArray(object.setParameterActions)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.setParameterActions: array expected"); - message.setParameterActions = []; - for (var i = 0; i < object.setParameterActions.length; ++i) { - if (typeof object.setParameterActions[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.setParameterActions: object expected"); - message.setParameterActions[i] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.fromObject(object.setParameterActions[i]); - } - } - if (object.conditionalCases) { - if (!Array.isArray(object.conditionalCases)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.conditionalCases: array expected"); - message.conditionalCases = []; - for (var i = 0; i < object.conditionalCases.length; ++i) { - if (typeof object.conditionalCases[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.conditionalCases: object expected"); - message.conditionalCases[i] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.fromObject(object.conditionalCases[i]); - } - } + var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetPageRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a Fulfillment message. Also converts values to other types if specified. + * Creates a plain object from a GetPageRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment} message Fulfillment + * @param {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} message GetPageRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Fulfillment.toObject = function toObject(message, options) { + GetPageRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.messages = []; - object.setParameterActions = []; - object.conditionalCases = []; - } if (options.defaults) { - object.webhook = ""; - object.tag = ""; - object.returnPartialResponses = false; - } - if (message.messages && message.messages.length) { - object.messages = []; - for (var j = 0; j < message.messages.length; ++j) - object.messages[j] = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.toObject(message.messages[j], options); - } - if (message.webhook != null && message.hasOwnProperty("webhook")) - object.webhook = message.webhook; - if (message.tag != null && message.hasOwnProperty("tag")) - object.tag = message.tag; - if (message.setParameterActions && message.setParameterActions.length) { - object.setParameterActions = []; - for (var j = 0; j < message.setParameterActions.length; ++j) - object.setParameterActions[j] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.toObject(message.setParameterActions[j], options); - } - if (message.conditionalCases && message.conditionalCases.length) { - object.conditionalCases = []; - for (var j = 0; j < message.conditionalCases.length; ++j) - object.conditionalCases[j] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.toObject(message.conditionalCases[j], options); + object.name = ""; + object.languageCode = ""; } - if (message.returnPartialResponses != null && message.hasOwnProperty("returnPartialResponses")) - object.returnPartialResponses = message.returnPartialResponses; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this Fulfillment to JSON. + * Converts this GetPageRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest * @instance * @returns {Object.} JSON object */ - Fulfillment.prototype.toJSON = function toJSON() { + GetPageRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Fulfillment + * Gets the default type url for GetPageRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Fulfillment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetPageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Fulfillment"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GetPageRequest"; }; - Fulfillment.SetParameterAction = (function() { + return GetPageRequest; + })(); - /** - * Properties of a SetParameterAction. - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment - * @interface ISetParameterAction - * @property {string|null} [parameter] SetParameterAction parameter - * @property {google.protobuf.IValue|null} [value] SetParameterAction value - */ + v3beta1.CreatePageRequest = (function() { - /** - * Constructs a new SetParameterAction. - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment - * @classdesc Represents a SetParameterAction. - * @implements ISetParameterAction - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction=} [properties] Properties to set - */ - function SetParameterAction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a CreatePageRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface ICreatePageRequest + * @property {string|null} [parent] CreatePageRequest parent + * @property {google.cloud.dialogflow.cx.v3beta1.IPage|null} [page] CreatePageRequest page + * @property {string|null} [languageCode] CreatePageRequest languageCode + */ - /** - * SetParameterAction parameter. - * @member {string} parameter - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @instance - */ - SetParameterAction.prototype.parameter = ""; + /** + * Constructs a new CreatePageRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a CreatePageRequest. + * @implements ICreatePageRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest=} [properties] Properties to set + */ + function CreatePageRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * SetParameterAction value. - * @member {google.protobuf.IValue|null|undefined} value - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @instance - */ - SetParameterAction.prototype.value = null; + /** + * CreatePageRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @instance + */ + CreatePageRequest.prototype.parent = ""; - /** - * Creates a new SetParameterAction instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} SetParameterAction instance - */ - SetParameterAction.create = function create(properties) { - return new SetParameterAction(properties); - }; + /** + * CreatePageRequest page. + * @member {google.cloud.dialogflow.cx.v3beta1.IPage|null|undefined} page + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @instance + */ + CreatePageRequest.prototype.page = null; - /** - * Encodes the specified SetParameterAction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction} message SetParameterAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetParameterAction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parameter != null && Object.hasOwnProperty.call(message, "parameter")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parameter); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - $root.google.protobuf.Value.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * CreatePageRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @instance + */ + CreatePageRequest.prototype.languageCode = ""; - /** - * Encodes the specified SetParameterAction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction} message SetParameterAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetParameterAction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new CreatePageRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} CreatePageRequest instance + */ + CreatePageRequest.create = function create(properties) { + return new CreatePageRequest(properties); + }; - /** - * Decodes a SetParameterAction message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} SetParameterAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetParameterAction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parameter = reader.string(); - break; - } - case 2: { - message.value = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified CreatePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest} message CreatePageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePageRequest.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.page != null && Object.hasOwnProperty.call(message, "page")) + $root.google.cloud.dialogflow.cx.v3beta1.Page.encode(message.page, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); + return writer; + }; + + /** + * Encodes the specified CreatePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest} message CreatePageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreatePageRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} CreatePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePageRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.decode(reader, reader.uint32()); + break; + } + case 3: { + message.languageCode = reader.string(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a SetParameterAction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} SetParameterAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetParameterAction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a SetParameterAction message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetParameterAction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parameter != null && message.hasOwnProperty("parameter")) - if (!$util.isString(message.parameter)) - return "parameter: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - var error = $root.google.protobuf.Value.verify(message.value); - if (error) - return "value." + error; - } - return null; - }; + /** + * Decodes a CreatePageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} CreatePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a SetParameterAction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} SetParameterAction - */ - SetParameterAction.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction(); - if (object.parameter != null) - message.parameter = String(object.parameter); - if (object.value != null) { - if (typeof object.value !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.value: object expected"); - message.value = $root.google.protobuf.Value.fromObject(object.value); - } - return message; - }; + /** + * Verifies a CreatePageRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreatePageRequest.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.page != null && message.hasOwnProperty("page")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Page.verify(message.page); + if (error) + return "page." + error; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + return null; + }; - /** - * Creates a plain object from a SetParameterAction message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} message SetParameterAction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetParameterAction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parameter = ""; - object.value = null; - } - if (message.parameter != null && message.hasOwnProperty("parameter")) - object.parameter = message.parameter; - if (message.value != null && message.hasOwnProperty("value")) - object.value = $root.google.protobuf.Value.toObject(message.value, options); + /** + * Creates a CreatePageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} CreatePageRequest + */ + CreatePageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest) return object; - }; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.page != null) { + if (typeof object.page !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.page: object expected"); + message.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.fromObject(object.page); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + return message; + }; - /** - * Converts this SetParameterAction to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @instance - * @returns {Object.} JSON object - */ - SetParameterAction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a CreatePageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} message CreatePageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreatePageRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.page = null; + object.languageCode = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.page != null && message.hasOwnProperty("page")) + object.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.toObject(message.page, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + return object; + }; - /** - * Gets the default type url for SetParameterAction - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetParameterAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction"; - }; + /** + * Converts this CreatePageRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @instance + * @returns {Object.} JSON object + */ + CreatePageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return SetParameterAction; - })(); + /** + * Gets the default type url for CreatePageRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreatePageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.CreatePageRequest"; + }; - Fulfillment.ConditionalCases = (function() { + return CreatePageRequest; + })(); - /** - * Properties of a ConditionalCases. - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment - * @interface IConditionalCases - * @property {Array.|null} [cases] ConditionalCases cases - */ + v3beta1.UpdatePageRequest = (function() { - /** - * Constructs a new ConditionalCases. - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment - * @classdesc Represents a ConditionalCases. - * @implements IConditionalCases - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases=} [properties] Properties to set - */ - function ConditionalCases(properties) { - this.cases = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of an UpdatePageRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IUpdatePageRequest + * @property {google.cloud.dialogflow.cx.v3beta1.IPage|null} [page] UpdatePageRequest page + * @property {string|null} [languageCode] UpdatePageRequest languageCode + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdatePageRequest updateMask + */ - /** - * ConditionalCases cases. - * @member {Array.} cases - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @instance - */ - ConditionalCases.prototype.cases = $util.emptyArray; + /** + * Constructs a new UpdatePageRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents an UpdatePageRequest. + * @implements IUpdatePageRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest=} [properties] Properties to set + */ + function UpdatePageRequest(properties) { + if (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 ConditionalCases instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} ConditionalCases instance - */ - ConditionalCases.create = function create(properties) { - return new ConditionalCases(properties); - }; + /** + * UpdatePageRequest page. + * @member {google.cloud.dialogflow.cx.v3beta1.IPage|null|undefined} page + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @instance + */ + UpdatePageRequest.prototype.page = null; - /** - * Encodes the specified ConditionalCases message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases} message ConditionalCases message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConditionalCases.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cases != null && message.cases.length) - for (var i = 0; i < message.cases.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.encode(message.cases[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * UpdatePageRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @instance + */ + UpdatePageRequest.prototype.languageCode = ""; - /** - * Encodes the specified ConditionalCases message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases} message ConditionalCases message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConditionalCases.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * UpdatePageRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @instance + */ + UpdatePageRequest.prototype.updateMask = null; - /** - * Decodes a ConditionalCases message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} ConditionalCases - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConditionalCases.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.cases && message.cases.length)) - message.cases = []; - message.cases.push($root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new UpdatePageRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} UpdatePageRequest instance + */ + UpdatePageRequest.create = function create(properties) { + return new UpdatePageRequest(properties); + }; - /** - * Decodes a ConditionalCases message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} ConditionalCases - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConditionalCases.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified UpdatePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest} message UpdatePageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePageRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.page != null && Object.hasOwnProperty.call(message, "page")) + $root.google.cloud.dialogflow.cx.v3beta1.Page.encode(message.page, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + 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; + }; - /** - * Verifies a ConditionalCases message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConditionalCases.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cases != null && message.hasOwnProperty("cases")) { - if (!Array.isArray(message.cases)) - return "cases: array expected"; - for (var i = 0; i < message.cases.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.verify(message.cases[i]); - if (error) - return "cases." + error; - } - } - return null; - }; + /** + * Encodes the specified UpdatePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest} message UpdatePageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a ConditionalCases message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} ConditionalCases - */ - ConditionalCases.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases(); - if (object.cases) { - if (!Array.isArray(object.cases)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.cases: array expected"); - message.cases = []; - for (var i = 0; i < object.cases.length; ++i) { - if (typeof object.cases[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.cases: object expected"); - message.cases[i] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.fromObject(object.cases[i]); + /** + * Decodes an UpdatePageRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} UpdatePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePageRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.decode(reader, reader.uint32()); + break; + } + case 2: { + message.languageCode = reader.string(); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a ConditionalCases message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} message ConditionalCases - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConditionalCases.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.cases = []; - if (message.cases && message.cases.length) { - object.cases = []; - for (var j = 0; j < message.cases.length; ++j) - object.cases[j] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.toObject(message.cases[j], options); - } - return object; - }; + /** + * Decodes an UpdatePageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} UpdatePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this ConditionalCases to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @instance - * @returns {Object.} JSON object - */ - ConditionalCases.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies an UpdatePageRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdatePageRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.page != null && message.hasOwnProperty("page")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Page.verify(message.page); + if (error) + return "page." + error; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; - /** - * Gets the default type url for ConditionalCases - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConditionalCases.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases"; - }; + /** + * Creates an UpdatePageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} UpdatePageRequest + */ + UpdatePageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest(); + if (object.page != null) { + if (typeof object.page !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.page: object expected"); + message.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.fromObject(object.page); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; - ConditionalCases.Case = (function() { + /** + * Creates a plain object from an UpdatePageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} message UpdatePageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdatePageRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.page = null; + object.languageCode = ""; + object.updateMask = null; + } + if (message.page != null && message.hasOwnProperty("page")) + object.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.toObject(message.page, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; - /** - * Properties of a Case. - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @interface ICase - * @property {string|null} [condition] Case condition - * @property {Array.|null} [caseContent] Case caseContent - */ + /** + * Converts this UpdatePageRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @instance + * @returns {Object.} JSON object + */ + UpdatePageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new Case. - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @classdesc Represents a Case. - * @implements ICase - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase=} [properties] Properties to set - */ - function Case(properties) { - this.caseContent = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Gets the default type url for UpdatePageRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdatePageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest"; + }; - /** - * Case condition. - * @member {string} condition - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @instance - */ - Case.prototype.condition = ""; + return UpdatePageRequest; + })(); - /** - * Case caseContent. - * @member {Array.} caseContent - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @instance - */ - Case.prototype.caseContent = $util.emptyArray; + v3beta1.DeletePageRequest = (function() { - /** - * Creates a new Case instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} Case instance - */ - Case.create = function create(properties) { - return new Case(properties); - }; + /** + * Properties of a DeletePageRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IDeletePageRequest + * @property {string|null} [name] DeletePageRequest name + * @property {boolean|null} [force] DeletePageRequest force + */ - /** - * Encodes the specified Case message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase} message Case message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Case.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.condition); - if (message.caseContent != null && message.caseContent.length) - for (var i = 0; i < message.caseContent.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.encode(message.caseContent[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Constructs a new DeletePageRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a DeletePageRequest. + * @implements IDeletePageRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest=} [properties] Properties to set + */ + function DeletePageRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified Case message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase} message Case message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Case.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * DeletePageRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @instance + */ + DeletePageRequest.prototype.name = ""; - /** - * Decodes a Case message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} Case - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Case.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.condition = reader.string(); - break; - } - case 2: { - if (!(message.caseContent && message.caseContent.length)) - message.caseContent = []; - message.caseContent.push($root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * DeletePageRequest force. + * @member {boolean} force + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @instance + */ + DeletePageRequest.prototype.force = false; - /** - * Decodes a Case message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} Case - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Case.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new DeletePageRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} DeletePageRequest instance + */ + DeletePageRequest.create = function create(properties) { + return new DeletePageRequest(properties); + }; - /** - * Verifies a Case message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Case.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.condition != null && message.hasOwnProperty("condition")) - if (!$util.isString(message.condition)) - return "condition: string expected"; - if (message.caseContent != null && message.hasOwnProperty("caseContent")) { - if (!Array.isArray(message.caseContent)) - return "caseContent: array expected"; - for (var i = 0; i < message.caseContent.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.verify(message.caseContent[i]); - if (error) - return "caseContent." + error; - } - } - return null; - }; + /** + * Encodes the specified DeletePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeletePageRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest} message DeletePageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePageRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + return writer; + }; - /** - * Creates a Case message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} Case - */ - Case.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case(); - if (object.condition != null) - message.condition = String(object.condition); - if (object.caseContent) { - if (!Array.isArray(object.caseContent)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.caseContent: array expected"); - message.caseContent = []; - for (var i = 0; i < object.caseContent.length; ++i) { - if (typeof object.caseContent[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.caseContent: object expected"); - message.caseContent[i] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.fromObject(object.caseContent[i]); - } - } - return message; - }; + /** + * Encodes the specified DeletePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeletePageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest} message DeletePageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from a Case message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} message Case - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Case.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.caseContent = []; - if (options.defaults) - object.condition = ""; - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = message.condition; - if (message.caseContent && message.caseContent.length) { - object.caseContent = []; - for (var j = 0; j < message.caseContent.length; ++j) - object.caseContent[j] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.toObject(message.caseContent[j], options); - } - return object; - }; - - /** - * Converts this Case to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @instance - * @returns {Object.} JSON object - */ - Case.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Case - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Case.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Decodes a DeletePageRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} DeletePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePageRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case"; - }; - - Case.CaseContent = (function() { - - /** - * Properties of a CaseContent. - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @interface ICaseContent - * @property {google.cloud.dialogflow.cx.v3beta1.IResponseMessage|null} [message] CaseContent message - * @property {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases|null} [additionalCases] CaseContent additionalCases - */ - - /** - * Constructs a new CaseContent. - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @classdesc Represents a CaseContent. - * @implements ICaseContent - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent=} [properties] Properties to set - */ - function CaseContent(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + case 2: { + message.force = reader.bool(); + break; } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * CaseContent message. - * @member {google.cloud.dialogflow.cx.v3beta1.IResponseMessage|null|undefined} message - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @instance - */ - CaseContent.prototype.message = null; - - /** - * CaseContent additionalCases. - * @member {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases|null|undefined} additionalCases - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @instance - */ - CaseContent.prototype.additionalCases = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * CaseContent casesOrMessage. - * @member {"message"|"additionalCases"|undefined} casesOrMessage - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @instance - */ - Object.defineProperty(CaseContent.prototype, "casesOrMessage", { - get: $util.oneOfGetter($oneOfFields = ["message", "additionalCases"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CaseContent instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent instance - */ - CaseContent.create = function create(properties) { - return new CaseContent(properties); - }; - - /** - * Encodes the specified CaseContent message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent} message CaseContent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CaseContent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.encode(message.message, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.additionalCases != null && Object.hasOwnProperty.call(message, "additionalCases")) - $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.encode(message.additionalCases, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CaseContent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent} message CaseContent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CaseContent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CaseContent message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CaseContent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.message = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.decode(reader, reader.uint32()); - break; - } - case 2: { - message.additionalCases = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CaseContent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CaseContent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CaseContent message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CaseContent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.message != null && message.hasOwnProperty("message")) { - properties.casesOrMessage = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.verify(message.message); - if (error) - return "message." + error; - } - } - if (message.additionalCases != null && message.hasOwnProperty("additionalCases")) { - if (properties.casesOrMessage === 1) - return "casesOrMessage: multiple values"; - properties.casesOrMessage = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify(message.additionalCases); - if (error) - return "additionalCases." + error; - } - } - return null; - }; - - /** - * Creates a CaseContent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent - */ - CaseContent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent(); - if (object.message != null) { - if (typeof object.message !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.message: object expected"); - message.message = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.fromObject(object.message); - } - if (object.additionalCases != null) { - if (typeof object.additionalCases !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.additionalCases: object expected"); - message.additionalCases = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.fromObject(object.additionalCases); - } - return message; - }; - - /** - * Creates a plain object from a CaseContent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} message CaseContent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CaseContent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.message != null && message.hasOwnProperty("message")) { - object.message = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.toObject(message.message, options); - if (options.oneofs) - object.casesOrMessage = "message"; - } - if (message.additionalCases != null && message.hasOwnProperty("additionalCases")) { - object.additionalCases = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.toObject(message.additionalCases, options); - if (options.oneofs) - object.casesOrMessage = "additionalCases"; - } - return object; - }; - - /** - * Converts this CaseContent to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @instance - * @returns {Object.} JSON object - */ - CaseContent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CaseContent - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CaseContent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent"; - }; - - return CaseContent; - })(); - - return Case; - })(); - - return ConditionalCases; - })(); - - return Fulfillment; - })(); - - v3beta1.ResponseMessage = (function() { + /** + * Decodes a DeletePageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} DeletePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Properties of a ResponseMessage. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IResponseMessage - * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText|null} [text] ResponseMessage text - * @property {google.protobuf.IStruct|null} [payload] ResponseMessage payload - * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess|null} [conversationSuccess] ResponseMessage conversationSuccess - * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText|null} [outputAudioText] ResponseMessage outputAudioText - * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff|null} [liveAgentHandoff] ResponseMessage liveAgentHandoff - * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction|null} [endInteraction] ResponseMessage endInteraction - * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio|null} [playAudio] ResponseMessage playAudio - * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio|null} [mixedAudio] ResponseMessage mixedAudio - * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ITelephonyTransferCall|null} [telephonyTransferCall] ResponseMessage telephonyTransferCall - * @property {string|null} [channel] ResponseMessage channel + * Verifies a DeletePageRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + DeletePageRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + return null; + }; /** - * Constructs a new ResponseMessage. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ResponseMessage. - * @implements IResponseMessage - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IResponseMessage=} [properties] Properties to set + * Creates a DeletePageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} DeletePageRequest */ - function ResponseMessage(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + DeletePageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); + return message; + }; /** - * ResponseMessage text. - * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText|null|undefined} text - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @instance + * Creates a plain object from a DeletePageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} message DeletePageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - ResponseMessage.prototype.text = null; + DeletePageRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; /** - * ResponseMessage payload. - * @member {google.protobuf.IStruct|null|undefined} payload - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * Converts this DeletePageRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest * @instance + * @returns {Object.} JSON object */ - ResponseMessage.prototype.payload = null; + DeletePageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * ResponseMessage conversationSuccess. - * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess|null|undefined} conversationSuccess - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @instance + * Gets the default type url for DeletePageRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - ResponseMessage.prototype.conversationSuccess = null; + DeletePageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.DeletePageRequest"; + }; + + return DeletePageRequest; + })(); + + v3beta1.Fulfillment = (function() { /** - * ResponseMessage outputAudioText. - * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText|null|undefined} outputAudioText - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @instance + * Properties of a Fulfillment. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IFulfillment + * @property {Array.|null} [messages] Fulfillment messages + * @property {string|null} [webhook] Fulfillment webhook + * @property {boolean|null} [returnPartialResponses] Fulfillment returnPartialResponses + * @property {string|null} [tag] Fulfillment tag + * @property {Array.|null} [setParameterActions] Fulfillment setParameterActions + * @property {Array.|null} [conditionalCases] Fulfillment conditionalCases */ - ResponseMessage.prototype.outputAudioText = null; /** - * ResponseMessage liveAgentHandoff. - * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff|null|undefined} liveAgentHandoff - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @instance + * Constructs a new Fulfillment. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a Fulfillment. + * @implements IFulfillment + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IFulfillment=} [properties] Properties to set */ - ResponseMessage.prototype.liveAgentHandoff = null; + function Fulfillment(properties) { + this.messages = []; + this.setParameterActions = []; + this.conditionalCases = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * ResponseMessage endInteraction. - * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction|null|undefined} endInteraction - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * Fulfillment messages. + * @member {Array.} messages + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment * @instance */ - ResponseMessage.prototype.endInteraction = null; + Fulfillment.prototype.messages = $util.emptyArray; /** - * ResponseMessage playAudio. - * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio|null|undefined} playAudio - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * Fulfillment webhook. + * @member {string} webhook + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment * @instance */ - ResponseMessage.prototype.playAudio = null; + Fulfillment.prototype.webhook = ""; /** - * ResponseMessage mixedAudio. - * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio|null|undefined} mixedAudio - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * Fulfillment returnPartialResponses. + * @member {boolean} returnPartialResponses + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment * @instance */ - ResponseMessage.prototype.mixedAudio = null; + Fulfillment.prototype.returnPartialResponses = false; /** - * ResponseMessage telephonyTransferCall. - * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ITelephonyTransferCall|null|undefined} telephonyTransferCall - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * Fulfillment tag. + * @member {string} tag + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment * @instance */ - ResponseMessage.prototype.telephonyTransferCall = null; + Fulfillment.prototype.tag = ""; /** - * ResponseMessage channel. - * @member {string} channel - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * Fulfillment setParameterActions. + * @member {Array.} setParameterActions + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment * @instance */ - ResponseMessage.prototype.channel = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + Fulfillment.prototype.setParameterActions = $util.emptyArray; /** - * ResponseMessage message. - * @member {"text"|"payload"|"conversationSuccess"|"outputAudioText"|"liveAgentHandoff"|"endInteraction"|"playAudio"|"mixedAudio"|"telephonyTransferCall"|undefined} message - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * Fulfillment conditionalCases. + * @member {Array.} conditionalCases + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment * @instance */ - Object.defineProperty(ResponseMessage.prototype, "message", { - get: $util.oneOfGetter($oneOfFields = ["text", "payload", "conversationSuccess", "outputAudioText", "liveAgentHandoff", "endInteraction", "playAudio", "mixedAudio", "telephonyTransferCall"]), - set: $util.oneOfSetter($oneOfFields) - }); + Fulfillment.prototype.conditionalCases = $util.emptyArray; /** - * Creates a new ResponseMessage instance using the specified properties. + * Creates a new Fulfillment instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IResponseMessage=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} ResponseMessage instance + * @param {google.cloud.dialogflow.cx.v3beta1.IFulfillment=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment} Fulfillment instance */ - ResponseMessage.create = function create(properties) { - return new ResponseMessage(properties); + Fulfillment.create = function create(properties) { + return new Fulfillment(properties); }; /** - * Encodes the specified ResponseMessage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.verify|verify} messages. + * Encodes the specified Fulfillment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IResponseMessage} message ResponseMessage message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IFulfillment} message Fulfillment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseMessage.encode = function encode(message, writer) { + Fulfillment.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) - $root.google.protobuf.Struct.encode(message.payload, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.outputAudioText != null && Object.hasOwnProperty.call(message, "outputAudioText")) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.encode(message.outputAudioText, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.conversationSuccess != null && Object.hasOwnProperty.call(message, "conversationSuccess")) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.encode(message.conversationSuccess, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.liveAgentHandoff != null && Object.hasOwnProperty.call(message, "liveAgentHandoff")) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.encode(message.liveAgentHandoff, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.endInteraction != null && Object.hasOwnProperty.call(message, "endInteraction")) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.encode(message.endInteraction, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.playAudio != null && Object.hasOwnProperty.call(message, "playAudio")) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.encode(message.playAudio, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.mixedAudio != null && Object.hasOwnProperty.call(message, "mixedAudio")) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.encode(message.mixedAudio, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.telephonyTransferCall != null && Object.hasOwnProperty.call(message, "telephonyTransferCall")) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall.encode(message.telephonyTransferCall, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) - writer.uint32(/* id 19, wireType 2 =*/154).string(message.channel); + if (message.messages != null && message.messages.length) + for (var i = 0; i < message.messages.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.encode(message.messages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.webhook != null && Object.hasOwnProperty.call(message, "webhook")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.webhook); + if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tag); + if (message.setParameterActions != null && message.setParameterActions.length) + for (var i = 0; i < message.setParameterActions.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.encode(message.setParameterActions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.conditionalCases != null && message.conditionalCases.length) + for (var i = 0; i < message.conditionalCases.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.encode(message.conditionalCases[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.returnPartialResponses != null && Object.hasOwnProperty.call(message, "returnPartialResponses")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.returnPartialResponses); return writer; }; /** - * Encodes the specified ResponseMessage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.verify|verify} messages. + * Encodes the specified Fulfillment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IResponseMessage} message ResponseMessage message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IFulfillment} message Fulfillment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { + Fulfillment.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResponseMessage message from the specified reader or buffer. + * Decodes a Fulfillment message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} ResponseMessage + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment} Fulfillment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseMessage.decode = function decode(reader, length) { + Fulfillment.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.text = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.decode(reader, reader.uint32()); + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.decode(reader, reader.uint32())); break; } case 2: { - message.payload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - case 9: { - message.conversationSuccess = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.decode(reader, reader.uint32()); + message.webhook = reader.string(); break; } case 8: { - message.outputAudioText = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.decode(reader, reader.uint32()); - break; - } - case 10: { - message.liveAgentHandoff = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.decode(reader, reader.uint32()); - break; - } - case 11: { - message.endInteraction = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.decode(reader, reader.uint32()); - break; - } - case 12: { - message.playAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.decode(reader, reader.uint32()); + message.returnPartialResponses = reader.bool(); break; } - case 13: { - message.mixedAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.decode(reader, reader.uint32()); + case 3: { + message.tag = reader.string(); break; } - case 18: { - message.telephonyTransferCall = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall.decode(reader, reader.uint32()); + case 4: { + if (!(message.setParameterActions && message.setParameterActions.length)) + message.setParameterActions = []; + message.setParameterActions.push($root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.decode(reader, reader.uint32())); break; } - case 19: { - message.channel = reader.string(); + case 5: { + if (!(message.conditionalCases && message.conditionalCases.length)) + message.conditionalCases = []; + message.conditionalCases.push($root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.decode(reader, reader.uint32())); break; } default: @@ -85169,300 +86439,214 @@ }; /** - * Decodes a ResponseMessage message from the specified reader or buffer, length delimited. + * Decodes a Fulfillment message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} ResponseMessage + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment} Fulfillment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseMessage.decodeDelimited = function decodeDelimited(reader) { + Fulfillment.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResponseMessage message. + * Verifies a Fulfillment message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResponseMessage.verify = function verify(message) { + Fulfillment.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.text != null && message.hasOwnProperty("text")) { - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.verify(message.text); - if (error) - return "text." + error; - } - } - if (message.payload != null && message.hasOwnProperty("payload")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.protobuf.Struct.verify(message.payload); - if (error) - return "payload." + error; - } - } - if (message.conversationSuccess != null && message.hasOwnProperty("conversationSuccess")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.verify(message.conversationSuccess); - if (error) - return "conversationSuccess." + error; - } - } - if (message.outputAudioText != null && message.hasOwnProperty("outputAudioText")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.verify(message.outputAudioText); - if (error) - return "outputAudioText." + error; - } - } - if (message.liveAgentHandoff != null && message.hasOwnProperty("liveAgentHandoff")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.verify(message.liveAgentHandoff); - if (error) - return "liveAgentHandoff." + error; - } - } - if (message.endInteraction != null && message.hasOwnProperty("endInteraction")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.verify(message.endInteraction); - if (error) - return "endInteraction." + error; - } - } - if (message.playAudio != null && message.hasOwnProperty("playAudio")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.verify(message.playAudio); + 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.dialogflow.cx.v3beta1.ResponseMessage.verify(message.messages[i]); if (error) - return "playAudio." + error; + return "messages." + error; } } - if (message.mixedAudio != null && message.hasOwnProperty("mixedAudio")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.verify(message.mixedAudio); + if (message.webhook != null && message.hasOwnProperty("webhook")) + if (!$util.isString(message.webhook)) + return "webhook: string expected"; + if (message.returnPartialResponses != null && message.hasOwnProperty("returnPartialResponses")) + if (typeof message.returnPartialResponses !== "boolean") + return "returnPartialResponses: boolean expected"; + if (message.tag != null && message.hasOwnProperty("tag")) + if (!$util.isString(message.tag)) + return "tag: string expected"; + if (message.setParameterActions != null && message.hasOwnProperty("setParameterActions")) { + if (!Array.isArray(message.setParameterActions)) + return "setParameterActions: array expected"; + for (var i = 0; i < message.setParameterActions.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.verify(message.setParameterActions[i]); if (error) - return "mixedAudio." + error; + return "setParameterActions." + error; } } - if (message.telephonyTransferCall != null && message.hasOwnProperty("telephonyTransferCall")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall.verify(message.telephonyTransferCall); + if (message.conditionalCases != null && message.hasOwnProperty("conditionalCases")) { + if (!Array.isArray(message.conditionalCases)) + return "conditionalCases: array expected"; + for (var i = 0; i < message.conditionalCases.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify(message.conditionalCases[i]); if (error) - return "telephonyTransferCall." + error; + return "conditionalCases." + error; } } - if (message.channel != null && message.hasOwnProperty("channel")) - if (!$util.isString(message.channel)) - return "channel: string expected"; return null; }; /** - * Creates a ResponseMessage message from a plain object. Also converts values to their respective internal types. + * Creates a Fulfillment message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} ResponseMessage + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment} Fulfillment */ - ResponseMessage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage) + Fulfillment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage(); - if (object.text != null) { - if (typeof object.text !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.text: object expected"); - message.text = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.fromObject(object.text); - } - if (object.payload != null) { - if (typeof object.payload !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.payload: object expected"); - message.payload = $root.google.protobuf.Struct.fromObject(object.payload); - } - if (object.conversationSuccess != null) { - if (typeof object.conversationSuccess !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.conversationSuccess: object expected"); - message.conversationSuccess = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.fromObject(object.conversationSuccess); - } - if (object.outputAudioText != null) { - if (typeof object.outputAudioText !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.outputAudioText: object expected"); - message.outputAudioText = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.fromObject(object.outputAudioText); - } - if (object.liveAgentHandoff != null) { - if (typeof object.liveAgentHandoff !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.liveAgentHandoff: object expected"); - message.liveAgentHandoff = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.fromObject(object.liveAgentHandoff); - } - if (object.endInteraction != null) { - if (typeof object.endInteraction !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.endInteraction: object expected"); - message.endInteraction = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.fromObject(object.endInteraction); - } - if (object.playAudio != null) { - if (typeof object.playAudio !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.playAudio: object expected"); - message.playAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.fromObject(object.playAudio); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment(); + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.messages: array expected"); + message.messages = []; + for (var i = 0; i < object.messages.length; ++i) { + if (typeof object.messages[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.messages: object expected"); + message.messages[i] = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.fromObject(object.messages[i]); + } } - if (object.mixedAudio != null) { - if (typeof object.mixedAudio !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.mixedAudio: object expected"); - message.mixedAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.fromObject(object.mixedAudio); + if (object.webhook != null) + message.webhook = String(object.webhook); + if (object.returnPartialResponses != null) + message.returnPartialResponses = Boolean(object.returnPartialResponses); + if (object.tag != null) + message.tag = String(object.tag); + if (object.setParameterActions) { + if (!Array.isArray(object.setParameterActions)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.setParameterActions: array expected"); + message.setParameterActions = []; + for (var i = 0; i < object.setParameterActions.length; ++i) { + if (typeof object.setParameterActions[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.setParameterActions: object expected"); + message.setParameterActions[i] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.fromObject(object.setParameterActions[i]); + } } - if (object.telephonyTransferCall != null) { - if (typeof object.telephonyTransferCall !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.telephonyTransferCall: object expected"); - message.telephonyTransferCall = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall.fromObject(object.telephonyTransferCall); + if (object.conditionalCases) { + if (!Array.isArray(object.conditionalCases)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.conditionalCases: array expected"); + message.conditionalCases = []; + for (var i = 0; i < object.conditionalCases.length; ++i) { + if (typeof object.conditionalCases[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.conditionalCases: object expected"); + message.conditionalCases[i] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.fromObject(object.conditionalCases[i]); + } } - if (object.channel != null) - message.channel = String(object.channel); return message; }; /** - * Creates a plain object from a ResponseMessage message. Also converts values to other types if specified. + * Creates a plain object from a Fulfillment message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} message ResponseMessage + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment} message Fulfillment * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResponseMessage.toObject = function toObject(message, options) { + Fulfillment.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.channel = ""; - if (message.text != null && message.hasOwnProperty("text")) { - object.text = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.toObject(message.text, options); - if (options.oneofs) - object.message = "text"; - } - if (message.payload != null && message.hasOwnProperty("payload")) { - object.payload = $root.google.protobuf.Struct.toObject(message.payload, options); - if (options.oneofs) - object.message = "payload"; - } - if (message.outputAudioText != null && message.hasOwnProperty("outputAudioText")) { - object.outputAudioText = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.toObject(message.outputAudioText, options); - if (options.oneofs) - object.message = "outputAudioText"; - } - if (message.conversationSuccess != null && message.hasOwnProperty("conversationSuccess")) { - object.conversationSuccess = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.toObject(message.conversationSuccess, options); - if (options.oneofs) - object.message = "conversationSuccess"; - } - if (message.liveAgentHandoff != null && message.hasOwnProperty("liveAgentHandoff")) { - object.liveAgentHandoff = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.toObject(message.liveAgentHandoff, options); - if (options.oneofs) - object.message = "liveAgentHandoff"; + if (options.arrays || options.defaults) { + object.messages = []; + object.setParameterActions = []; + object.conditionalCases = []; } - if (message.endInteraction != null && message.hasOwnProperty("endInteraction")) { - object.endInteraction = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.toObject(message.endInteraction, options); - if (options.oneofs) - object.message = "endInteraction"; + if (options.defaults) { + object.webhook = ""; + object.tag = ""; + object.returnPartialResponses = false; } - if (message.playAudio != null && message.hasOwnProperty("playAudio")) { - object.playAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.toObject(message.playAudio, options); - if (options.oneofs) - object.message = "playAudio"; + if (message.messages && message.messages.length) { + object.messages = []; + for (var j = 0; j < message.messages.length; ++j) + object.messages[j] = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.toObject(message.messages[j], options); } - if (message.mixedAudio != null && message.hasOwnProperty("mixedAudio")) { - object.mixedAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.toObject(message.mixedAudio, options); - if (options.oneofs) - object.message = "mixedAudio"; + if (message.webhook != null && message.hasOwnProperty("webhook")) + object.webhook = message.webhook; + if (message.tag != null && message.hasOwnProperty("tag")) + object.tag = message.tag; + if (message.setParameterActions && message.setParameterActions.length) { + object.setParameterActions = []; + for (var j = 0; j < message.setParameterActions.length; ++j) + object.setParameterActions[j] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.toObject(message.setParameterActions[j], options); } - if (message.telephonyTransferCall != null && message.hasOwnProperty("telephonyTransferCall")) { - object.telephonyTransferCall = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall.toObject(message.telephonyTransferCall, options); - if (options.oneofs) - object.message = "telephonyTransferCall"; + if (message.conditionalCases && message.conditionalCases.length) { + object.conditionalCases = []; + for (var j = 0; j < message.conditionalCases.length; ++j) + object.conditionalCases[j] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.toObject(message.conditionalCases[j], options); } - if (message.channel != null && message.hasOwnProperty("channel")) - object.channel = message.channel; + if (message.returnPartialResponses != null && message.hasOwnProperty("returnPartialResponses")) + object.returnPartialResponses = message.returnPartialResponses; return object; }; /** - * Converts this ResponseMessage to JSON. + * Converts this Fulfillment to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment * @instance * @returns {Object.} JSON object */ - ResponseMessage.prototype.toJSON = function toJSON() { + Fulfillment.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResponseMessage + * Gets the default type url for Fulfillment * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResponseMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Fulfillment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Fulfillment"; }; - ResponseMessage.Text = (function() { + Fulfillment.SetParameterAction = (function() { /** - * Properties of a Text. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @interface IText - * @property {Array.|null} [text] Text text - * @property {boolean|null} [allowPlaybackInterruption] Text allowPlaybackInterruption + * Properties of a SetParameterAction. + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @interface ISetParameterAction + * @property {string|null} [parameter] SetParameterAction parameter + * @property {google.protobuf.IValue|null} [value] SetParameterAction value */ /** - * Constructs a new Text. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @classdesc Represents a Text. - * @implements IText + * Constructs a new SetParameterAction. + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @classdesc Represents a SetParameterAction. + * @implements ISetParameterAction * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction=} [properties] Properties to set */ - function Text(properties) { - this.text = []; + function SetParameterAction(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -85470,92 +86654,89 @@ } /** - * Text text. - * @member {Array.} text - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * SetParameterAction parameter. + * @member {string} parameter + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction * @instance */ - Text.prototype.text = $util.emptyArray; + SetParameterAction.prototype.parameter = ""; /** - * Text allowPlaybackInterruption. - * @member {boolean} allowPlaybackInterruption - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text - * @instance + * SetParameterAction value. + * @member {google.protobuf.IValue|null|undefined} value + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction + * @instance */ - Text.prototype.allowPlaybackInterruption = false; + SetParameterAction.prototype.value = null; /** - * Creates a new Text instance using the specified properties. + * Creates a new SetParameterAction instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} Text instance + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} SetParameterAction instance */ - Text.create = function create(properties) { - return new Text(properties); + SetParameterAction.create = function create(properties) { + return new SetParameterAction(properties); }; /** - * Encodes the specified Text message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.verify|verify} messages. + * Encodes the specified SetParameterAction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText} message Text message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction} message SetParameterAction message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Text.encode = function encode(message, writer) { + SetParameterAction.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.text != null && message.text.length) - for (var i = 0; i < message.text.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text[i]); - if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowPlaybackInterruption); + if (message.parameter != null && Object.hasOwnProperty.call(message, "parameter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parameter); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.google.protobuf.Value.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Text message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.verify|verify} messages. + * Encodes the specified SetParameterAction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText} message Text message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction} message SetParameterAction message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Text.encodeDelimited = function encodeDelimited(message, writer) { + SetParameterAction.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Text message from the specified reader or buffer. + * Decodes a SetParameterAction message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} Text + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} SetParameterAction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Text.decode = function decode(reader, length) { + SetParameterAction.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.text && message.text.length)) - message.text = []; - message.text.push(reader.string()); + message.parameter = reader.string(); break; } case 2: { - message.allowPlaybackInterruption = reader.bool(); + message.value = $root.google.protobuf.Value.decode(reader, reader.uint32()); break; } default: @@ -85567,143 +86748,137 @@ }; /** - * Decodes a Text message from the specified reader or buffer, length delimited. + * Decodes a SetParameterAction message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} Text + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} SetParameterAction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Text.decodeDelimited = function decodeDelimited(reader) { + SetParameterAction.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Text message. + * Verifies a SetParameterAction message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Text.verify = function verify(message) { + SetParameterAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) { - if (!Array.isArray(message.text)) - return "text: array expected"; - for (var i = 0; i < message.text.length; ++i) - if (!$util.isString(message.text[i])) - return "text: string[] expected"; + if (message.parameter != null && message.hasOwnProperty("parameter")) + if (!$util.isString(message.parameter)) + return "parameter: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.google.protobuf.Value.verify(message.value); + if (error) + return "value." + error; } - if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) - if (typeof message.allowPlaybackInterruption !== "boolean") - return "allowPlaybackInterruption: boolean expected"; return null; }; /** - * Creates a Text message from a plain object. Also converts values to their respective internal types. + * Creates a SetParameterAction message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} Text + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} SetParameterAction */ - Text.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text) + SetParameterAction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text(); - if (object.text) { - if (!Array.isArray(object.text)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.text: array expected"); - message.text = []; - for (var i = 0; i < object.text.length; ++i) - message.text[i] = String(object.text[i]); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction(); + if (object.parameter != null) + message.parameter = String(object.parameter); + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.value: object expected"); + message.value = $root.google.protobuf.Value.fromObject(object.value); } - if (object.allowPlaybackInterruption != null) - message.allowPlaybackInterruption = Boolean(object.allowPlaybackInterruption); return message; }; /** - * Creates a plain object from a Text message. Also converts values to other types if specified. + * Creates a plain object from a SetParameterAction message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} message Text + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} message SetParameterAction * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Text.toObject = function toObject(message, options) { + SetParameterAction.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.text = []; - if (options.defaults) - object.allowPlaybackInterruption = false; - if (message.text && message.text.length) { - object.text = []; - for (var j = 0; j < message.text.length; ++j) - object.text[j] = message.text[j]; + if (options.defaults) { + object.parameter = ""; + object.value = null; } - if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) - object.allowPlaybackInterruption = message.allowPlaybackInterruption; + if (message.parameter != null && message.hasOwnProperty("parameter")) + object.parameter = message.parameter; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.google.protobuf.Value.toObject(message.value, options); return object; }; /** - * Converts this Text to JSON. + * Converts this SetParameterAction to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction * @instance * @returns {Object.} JSON object */ - Text.prototype.toJSON = function toJSON() { + SetParameterAction.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Text + * Gets the default type url for SetParameterAction * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Text.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SetParameterAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction"; }; - return Text; + return SetParameterAction; })(); - ResponseMessage.LiveAgentHandoff = (function() { + Fulfillment.ConditionalCases = (function() { /** - * Properties of a LiveAgentHandoff. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @interface ILiveAgentHandoff - * @property {google.protobuf.IStruct|null} [metadata] LiveAgentHandoff metadata + * Properties of a ConditionalCases. + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @interface IConditionalCases + * @property {Array.|null} [cases] ConditionalCases cases */ /** - * Constructs a new LiveAgentHandoff. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @classdesc Represents a LiveAgentHandoff. - * @implements ILiveAgentHandoff + * Constructs a new ConditionalCases. + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @classdesc Represents a ConditionalCases. + * @implements IConditionalCases * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases=} [properties] Properties to set */ - function LiveAgentHandoff(properties) { + function ConditionalCases(properties) { + this.cases = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -85711,75 +86886,78 @@ } /** - * LiveAgentHandoff metadata. - * @member {google.protobuf.IStruct|null|undefined} metadata - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff + * ConditionalCases cases. + * @member {Array.} cases + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases * @instance */ - LiveAgentHandoff.prototype.metadata = null; + ConditionalCases.prototype.cases = $util.emptyArray; /** - * Creates a new LiveAgentHandoff instance using the specified properties. + * Creates a new ConditionalCases instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff instance + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} ConditionalCases instance */ - LiveAgentHandoff.create = function create(properties) { - return new LiveAgentHandoff(properties); + ConditionalCases.create = function create(properties) { + return new ConditionalCases(properties); }; /** - * Encodes the specified LiveAgentHandoff message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.verify|verify} messages. + * Encodes the specified ConditionalCases message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff} message LiveAgentHandoff message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases} message ConditionalCases message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LiveAgentHandoff.encode = function encode(message, writer) { + ConditionalCases.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.protobuf.Struct.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.cases != null && message.cases.length) + for (var i = 0; i < message.cases.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.encode(message.cases[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified LiveAgentHandoff message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.verify|verify} messages. + * Encodes the specified ConditionalCases message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff} message LiveAgentHandoff message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases} message ConditionalCases message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LiveAgentHandoff.encodeDelimited = function encodeDelimited(message, writer) { + ConditionalCases.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LiveAgentHandoff message from the specified reader or buffer. + * Decodes a ConditionalCases message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} ConditionalCases * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LiveAgentHandoff.decode = function decode(reader, length) { + ConditionalCases.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.metadata = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + if (!(message.cases && message.cases.length)) + message.cases = []; + message.cases.push($root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.decode(reader, reader.uint32())); break; } default: @@ -85791,608 +86969,1182 @@ }; /** - * Decodes a LiveAgentHandoff message from the specified reader or buffer, length delimited. + * Decodes a ConditionalCases message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} ConditionalCases * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LiveAgentHandoff.decodeDelimited = function decodeDelimited(reader) { + ConditionalCases.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LiveAgentHandoff message. + * Verifies a ConditionalCases message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LiveAgentHandoff.verify = function verify(message) { + ConditionalCases.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.protobuf.Struct.verify(message.metadata); - if (error) - return "metadata." + error; + if (message.cases != null && message.hasOwnProperty("cases")) { + if (!Array.isArray(message.cases)) + return "cases: array expected"; + for (var i = 0; i < message.cases.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.verify(message.cases[i]); + if (error) + return "cases." + error; + } } return null; }; /** - * Creates a LiveAgentHandoff message from a plain object. Also converts values to their respective internal types. + * Creates a ConditionalCases message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} ConditionalCases */ - LiveAgentHandoff.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff) + ConditionalCases.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff(); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.metadata: object expected"); - message.metadata = $root.google.protobuf.Struct.fromObject(object.metadata); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases(); + if (object.cases) { + if (!Array.isArray(object.cases)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.cases: array expected"); + message.cases = []; + for (var i = 0; i < object.cases.length; ++i) { + if (typeof object.cases[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.cases: object expected"); + message.cases[i] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.fromObject(object.cases[i]); + } } return message; }; /** - * Creates a plain object from a LiveAgentHandoff message. Also converts values to other types if specified. + * Creates a plain object from a ConditionalCases message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} message LiveAgentHandoff + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} message ConditionalCases * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LiveAgentHandoff.toObject = function toObject(message, options) { + ConditionalCases.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.metadata = null; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.protobuf.Struct.toObject(message.metadata, options); + if (options.arrays || options.defaults) + object.cases = []; + if (message.cases && message.cases.length) { + object.cases = []; + for (var j = 0; j < message.cases.length; ++j) + object.cases[j] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.toObject(message.cases[j], options); + } return object; }; /** - * Converts this LiveAgentHandoff to JSON. + * Converts this ConditionalCases to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases * @instance * @returns {Object.} JSON object */ - LiveAgentHandoff.prototype.toJSON = function toJSON() { + ConditionalCases.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for LiveAgentHandoff + * Gets the default type url for ConditionalCases * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - LiveAgentHandoff.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ConditionalCases.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases"; }; - return LiveAgentHandoff; - })(); + ConditionalCases.Case = (function() { - ResponseMessage.ConversationSuccess = (function() { + /** + * Properties of a Case. + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases + * @interface ICase + * @property {string|null} [condition] Case condition + * @property {Array.|null} [caseContent] Case caseContent + */ - /** - * Properties of a ConversationSuccess. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @interface IConversationSuccess - * @property {google.protobuf.IStruct|null} [metadata] ConversationSuccess metadata - */ + /** + * Constructs a new Case. + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases + * @classdesc Represents a Case. + * @implements ICase + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase=} [properties] Properties to set + */ + function Case(properties) { + this.caseContent = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new ConversationSuccess. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @classdesc Represents a ConversationSuccess. - * @implements IConversationSuccess - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess=} [properties] Properties to set - */ - function ConversationSuccess(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Case condition. + * @member {string} condition + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @instance + */ + Case.prototype.condition = ""; - /** - * ConversationSuccess metadata. - * @member {google.protobuf.IStruct|null|undefined} metadata - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @instance - */ - ConversationSuccess.prototype.metadata = null; + /** + * Case caseContent. + * @member {Array.} caseContent + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @instance + */ + Case.prototype.caseContent = $util.emptyArray; - /** - * Creates a new ConversationSuccess instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} ConversationSuccess instance - */ - ConversationSuccess.create = function create(properties) { - return new ConversationSuccess(properties); - }; + /** + * Creates a new Case instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} Case instance + */ + Case.create = function create(properties) { + return new Case(properties); + }; - /** - * Encodes the specified ConversationSuccess message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess} message ConversationSuccess message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConversationSuccess.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.protobuf.Struct.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified Case message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase} message Case message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Case.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.condition); + if (message.caseContent != null && message.caseContent.length) + for (var i = 0; i < message.caseContent.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.encode(message.caseContent[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified ConversationSuccess message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess} message ConversationSuccess message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConversationSuccess.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Case message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase} message Case message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Case.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ConversationSuccess message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} ConversationSuccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConversationSuccess.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.metadata = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + /** + * Decodes a Case message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} Case + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Case.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.condition = reader.string(); + break; + } + case 2: { + if (!(message.caseContent && message.caseContent.length)) + message.caseContent = []; + message.caseContent.push($root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a ConversationSuccess message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} ConversationSuccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConversationSuccess.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Case message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} Case + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Case.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a ConversationSuccess message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConversationSuccess.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.protobuf.Struct.verify(message.metadata); - if (error) - return "metadata." + error; - } - return null; - }; + /** + * Verifies a Case message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Case.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.condition != null && message.hasOwnProperty("condition")) + if (!$util.isString(message.condition)) + return "condition: string expected"; + if (message.caseContent != null && message.hasOwnProperty("caseContent")) { + if (!Array.isArray(message.caseContent)) + return "caseContent: array expected"; + for (var i = 0; i < message.caseContent.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.verify(message.caseContent[i]); + if (error) + return "caseContent." + error; + } + } + return null; + }; - /** - * Creates a ConversationSuccess message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} ConversationSuccess - */ - ConversationSuccess.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess(); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.metadata: object expected"); - message.metadata = $root.google.protobuf.Struct.fromObject(object.metadata); - } - return message; - }; + /** + * Creates a Case message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} Case + */ + Case.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case(); + if (object.condition != null) + message.condition = String(object.condition); + if (object.caseContent) { + if (!Array.isArray(object.caseContent)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.caseContent: array expected"); + message.caseContent = []; + for (var i = 0; i < object.caseContent.length; ++i) { + if (typeof object.caseContent[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.caseContent: object expected"); + message.caseContent[i] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.fromObject(object.caseContent[i]); + } + } + return message; + }; - /** - * Creates a plain object from a ConversationSuccess message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} message ConversationSuccess - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConversationSuccess.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.metadata = null; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.protobuf.Struct.toObject(message.metadata, options); - return object; - }; + /** + * Creates a plain object from a Case message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} message Case + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Case.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.caseContent = []; + if (options.defaults) + object.condition = ""; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = message.condition; + if (message.caseContent && message.caseContent.length) { + object.caseContent = []; + for (var j = 0; j < message.caseContent.length; ++j) + object.caseContent[j] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.toObject(message.caseContent[j], options); + } + return object; + }; - /** - * Converts this ConversationSuccess to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @instance - * @returns {Object.} JSON object - */ - ConversationSuccess.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this Case to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @instance + * @returns {Object.} JSON object + */ + Case.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for ConversationSuccess - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConversationSuccess.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess"; - }; + /** + * Gets the default type url for Case + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Case.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case"; + }; - return ConversationSuccess; - })(); + Case.CaseContent = (function() { - ResponseMessage.OutputAudioText = (function() { + /** + * Properties of a CaseContent. + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @interface ICaseContent + * @property {google.cloud.dialogflow.cx.v3beta1.IResponseMessage|null} [message] CaseContent message + * @property {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases|null} [additionalCases] CaseContent additionalCases + */ - /** - * Properties of an OutputAudioText. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @interface IOutputAudioText - * @property {string|null} [text] OutputAudioText text - * @property {string|null} [ssml] OutputAudioText ssml - * @property {boolean|null} [allowPlaybackInterruption] OutputAudioText allowPlaybackInterruption - */ + /** + * Constructs a new CaseContent. + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @classdesc Represents a CaseContent. + * @implements ICaseContent + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent=} [properties] Properties to set + */ + function CaseContent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new OutputAudioText. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @classdesc Represents an OutputAudioText. - * @implements IOutputAudioText - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText=} [properties] Properties to set - */ - function OutputAudioText(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * CaseContent message. + * @member {google.cloud.dialogflow.cx.v3beta1.IResponseMessage|null|undefined} message + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @instance + */ + CaseContent.prototype.message = null; - /** - * OutputAudioText text. - * @member {string|null|undefined} text - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @instance - */ - OutputAudioText.prototype.text = null; + /** + * CaseContent additionalCases. + * @member {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases|null|undefined} additionalCases + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @instance + */ + CaseContent.prototype.additionalCases = null; - /** - * OutputAudioText ssml. - * @member {string|null|undefined} ssml - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @instance - */ - OutputAudioText.prototype.ssml = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * OutputAudioText allowPlaybackInterruption. - * @member {boolean} allowPlaybackInterruption - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @instance - */ - OutputAudioText.prototype.allowPlaybackInterruption = false; + /** + * CaseContent casesOrMessage. + * @member {"message"|"additionalCases"|undefined} casesOrMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @instance + */ + Object.defineProperty(CaseContent.prototype, "casesOrMessage", { + get: $util.oneOfGetter($oneOfFields = ["message", "additionalCases"]), + set: $util.oneOfSetter($oneOfFields) + }); - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Creates a new CaseContent instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent instance + */ + CaseContent.create = function create(properties) { + return new CaseContent(properties); + }; - /** - * OutputAudioText source. - * @member {"text"|"ssml"|undefined} source - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @instance - */ - Object.defineProperty(OutputAudioText.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["text", "ssml"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Encodes the specified CaseContent message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent} message CaseContent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CaseContent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.encode(message.message, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.additionalCases != null && Object.hasOwnProperty.call(message, "additionalCases")) + $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.encode(message.additionalCases, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Creates a new OutputAudioText instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} OutputAudioText instance - */ - OutputAudioText.create = function create(properties) { - return new OutputAudioText(properties); - }; + /** + * Encodes the specified CaseContent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent} message CaseContent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CaseContent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified OutputAudioText message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText} message OutputAudioText message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OutputAudioText.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); - if (message.ssml != null && Object.hasOwnProperty.call(message, "ssml")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.ssml); - if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowPlaybackInterruption); - return writer; - }; + /** + * Decodes a CaseContent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CaseContent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.message = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.decode(reader, reader.uint32()); + break; + } + case 2: { + message.additionalCases = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified OutputAudioText message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText} message OutputAudioText message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OutputAudioText.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a CaseContent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CaseContent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes an OutputAudioText message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} OutputAudioText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OutputAudioText.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.text = reader.string(); - break; - } - case 2: { - message.ssml = reader.string(); - break; - } - case 3: { - message.allowPlaybackInterruption = reader.bool(); - break; + /** + * Verifies a CaseContent message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CaseContent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.message != null && message.hasOwnProperty("message")) { + properties.casesOrMessage = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.verify(message.message); + if (error) + return "message." + error; + } } - default: - reader.skipType(tag & 7); - break; + if (message.additionalCases != null && message.hasOwnProperty("additionalCases")) { + if (properties.casesOrMessage === 1) + return "casesOrMessage: multiple values"; + properties.casesOrMessage = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify(message.additionalCases); + if (error) + return "additionalCases." + error; + } + } + return null; + }; + + /** + * Creates a CaseContent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent + */ + CaseContent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent(); + if (object.message != null) { + if (typeof object.message !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.message: object expected"); + message.message = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.fromObject(object.message); + } + if (object.additionalCases != null) { + if (typeof object.additionalCases !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.additionalCases: object expected"); + message.additionalCases = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.fromObject(object.additionalCases); + } + return message; + }; + + /** + * Creates a plain object from a CaseContent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} message CaseContent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CaseContent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.message != null && message.hasOwnProperty("message")) { + object.message = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.toObject(message.message, options); + if (options.oneofs) + object.casesOrMessage = "message"; + } + if (message.additionalCases != null && message.hasOwnProperty("additionalCases")) { + object.additionalCases = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.toObject(message.additionalCases, options); + if (options.oneofs) + object.casesOrMessage = "additionalCases"; + } + return object; + }; + + /** + * Converts this CaseContent to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @instance + * @returns {Object.} JSON object + */ + CaseContent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CaseContent + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CaseContent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent"; + }; + + return CaseContent; + })(); + + return Case; + })(); + + return ConditionalCases; + })(); + + return Fulfillment; + })(); + + v3beta1.ResponseMessage = (function() { + + /** + * Properties of a ResponseMessage. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IResponseMessage + * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText|null} [text] ResponseMessage text + * @property {google.protobuf.IStruct|null} [payload] ResponseMessage payload + * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess|null} [conversationSuccess] ResponseMessage conversationSuccess + * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText|null} [outputAudioText] ResponseMessage outputAudioText + * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff|null} [liveAgentHandoff] ResponseMessage liveAgentHandoff + * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction|null} [endInteraction] ResponseMessage endInteraction + * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio|null} [playAudio] ResponseMessage playAudio + * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio|null} [mixedAudio] ResponseMessage mixedAudio + * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ITelephonyTransferCall|null} [telephonyTransferCall] ResponseMessage telephonyTransferCall + * @property {string|null} [channel] ResponseMessage channel + */ + + /** + * Constructs a new ResponseMessage. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a ResponseMessage. + * @implements IResponseMessage + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IResponseMessage=} [properties] Properties to set + */ + function ResponseMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseMessage text. + * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText|null|undefined} text + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @instance + */ + ResponseMessage.prototype.text = null; + + /** + * ResponseMessage payload. + * @member {google.protobuf.IStruct|null|undefined} payload + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @instance + */ + ResponseMessage.prototype.payload = null; + + /** + * ResponseMessage conversationSuccess. + * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess|null|undefined} conversationSuccess + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @instance + */ + ResponseMessage.prototype.conversationSuccess = null; + + /** + * ResponseMessage outputAudioText. + * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText|null|undefined} outputAudioText + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @instance + */ + ResponseMessage.prototype.outputAudioText = null; + + /** + * ResponseMessage liveAgentHandoff. + * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff|null|undefined} liveAgentHandoff + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @instance + */ + ResponseMessage.prototype.liveAgentHandoff = null; + + /** + * ResponseMessage endInteraction. + * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction|null|undefined} endInteraction + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @instance + */ + ResponseMessage.prototype.endInteraction = null; + + /** + * ResponseMessage playAudio. + * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio|null|undefined} playAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @instance + */ + ResponseMessage.prototype.playAudio = null; + + /** + * ResponseMessage mixedAudio. + * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio|null|undefined} mixedAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @instance + */ + ResponseMessage.prototype.mixedAudio = null; + + /** + * ResponseMessage telephonyTransferCall. + * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ITelephonyTransferCall|null|undefined} telephonyTransferCall + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @instance + */ + ResponseMessage.prototype.telephonyTransferCall = null; + + /** + * ResponseMessage channel. + * @member {string} channel + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @instance + */ + ResponseMessage.prototype.channel = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ResponseMessage message. + * @member {"text"|"payload"|"conversationSuccess"|"outputAudioText"|"liveAgentHandoff"|"endInteraction"|"playAudio"|"mixedAudio"|"telephonyTransferCall"|undefined} message + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @instance + */ + Object.defineProperty(ResponseMessage.prototype, "message", { + get: $util.oneOfGetter($oneOfFields = ["text", "payload", "conversationSuccess", "outputAudioText", "liveAgentHandoff", "endInteraction", "playAudio", "mixedAudio", "telephonyTransferCall"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ResponseMessage instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IResponseMessage=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} ResponseMessage instance + */ + ResponseMessage.create = function create(properties) { + return new ResponseMessage(properties); + }; + + /** + * Encodes the specified ResponseMessage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IResponseMessage} message ResponseMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + $root.google.protobuf.Struct.encode(message.payload, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.outputAudioText != null && Object.hasOwnProperty.call(message, "outputAudioText")) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.encode(message.outputAudioText, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.conversationSuccess != null && Object.hasOwnProperty.call(message, "conversationSuccess")) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.encode(message.conversationSuccess, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.liveAgentHandoff != null && Object.hasOwnProperty.call(message, "liveAgentHandoff")) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.encode(message.liveAgentHandoff, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.endInteraction != null && Object.hasOwnProperty.call(message, "endInteraction")) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.encode(message.endInteraction, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.playAudio != null && Object.hasOwnProperty.call(message, "playAudio")) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.encode(message.playAudio, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.mixedAudio != null && Object.hasOwnProperty.call(message, "mixedAudio")) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.encode(message.mixedAudio, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.telephonyTransferCall != null && Object.hasOwnProperty.call(message, "telephonyTransferCall")) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall.encode(message.telephonyTransferCall, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.channel); + return writer; + }; + + /** + * Encodes the specified ResponseMessage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IResponseMessage} message ResponseMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseMessage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} ResponseMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseMessage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.text = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.decode(reader, reader.uint32()); + break; + } + case 2: { + message.payload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 9: { + message.conversationSuccess = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.decode(reader, reader.uint32()); + break; + } + case 8: { + message.outputAudioText = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.decode(reader, reader.uint32()); + break; + } + case 10: { + message.liveAgentHandoff = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.decode(reader, reader.uint32()); + break; + } + case 11: { + message.endInteraction = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.decode(reader, reader.uint32()); + break; + } + case 12: { + message.playAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.decode(reader, reader.uint32()); + break; + } + case 13: { + message.mixedAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.decode(reader, reader.uint32()); + break; + } + case 18: { + message.telephonyTransferCall = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall.decode(reader, reader.uint32()); + break; + } + case 19: { + message.channel = reader.string(); + break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes an OutputAudioText message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} OutputAudioText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OutputAudioText.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a ResponseMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} ResponseMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an OutputAudioText message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OutputAudioText.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.text != null && message.hasOwnProperty("text")) { - properties.source = 1; - if (!$util.isString(message.text)) - return "text: string expected"; + /** + * Verifies a ResponseMessage message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.text != null && message.hasOwnProperty("text")) { + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.verify(message.text); + if (error) + return "text." + error; } - if (message.ssml != null && message.hasOwnProperty("ssml")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - if (!$util.isString(message.ssml)) - return "ssml: string expected"; + } + if (message.payload != null && message.hasOwnProperty("payload")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.protobuf.Struct.verify(message.payload); + if (error) + return "payload." + error; } - if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) - if (typeof message.allowPlaybackInterruption !== "boolean") - return "allowPlaybackInterruption: boolean expected"; - return null; - }; - - /** - * Creates an OutputAudioText message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} OutputAudioText - */ - OutputAudioText.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText(); - if (object.text != null) - message.text = String(object.text); - if (object.ssml != null) - message.ssml = String(object.ssml); - if (object.allowPlaybackInterruption != null) - message.allowPlaybackInterruption = Boolean(object.allowPlaybackInterruption); - return message; - }; - - /** - * Creates a plain object from an OutputAudioText message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} message OutputAudioText - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OutputAudioText.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.allowPlaybackInterruption = false; - if (message.text != null && message.hasOwnProperty("text")) { - object.text = message.text; - if (options.oneofs) - object.source = "text"; + } + if (message.conversationSuccess != null && message.hasOwnProperty("conversationSuccess")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.verify(message.conversationSuccess); + if (error) + return "conversationSuccess." + error; } - if (message.ssml != null && message.hasOwnProperty("ssml")) { - object.ssml = message.ssml; - if (options.oneofs) - object.source = "ssml"; + } + if (message.outputAudioText != null && message.hasOwnProperty("outputAudioText")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.verify(message.outputAudioText); + if (error) + return "outputAudioText." + error; } - if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) - object.allowPlaybackInterruption = message.allowPlaybackInterruption; + } + if (message.liveAgentHandoff != null && message.hasOwnProperty("liveAgentHandoff")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.verify(message.liveAgentHandoff); + if (error) + return "liveAgentHandoff." + error; + } + } + if (message.endInteraction != null && message.hasOwnProperty("endInteraction")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.verify(message.endInteraction); + if (error) + return "endInteraction." + error; + } + } + if (message.playAudio != null && message.hasOwnProperty("playAudio")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.verify(message.playAudio); + if (error) + return "playAudio." + error; + } + } + if (message.mixedAudio != null && message.hasOwnProperty("mixedAudio")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.verify(message.mixedAudio); + if (error) + return "mixedAudio." + error; + } + } + if (message.telephonyTransferCall != null && message.hasOwnProperty("telephonyTransferCall")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall.verify(message.telephonyTransferCall); + if (error) + return "telephonyTransferCall." + error; + } + } + if (message.channel != null && message.hasOwnProperty("channel")) + if (!$util.isString(message.channel)) + return "channel: string expected"; + return null; + }; + + /** + * Creates a ResponseMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} ResponseMessage + */ + ResponseMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage) return object; - }; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage(); + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.text: object expected"); + message.text = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.fromObject(object.text); + } + if (object.payload != null) { + if (typeof object.payload !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.payload: object expected"); + message.payload = $root.google.protobuf.Struct.fromObject(object.payload); + } + if (object.conversationSuccess != null) { + if (typeof object.conversationSuccess !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.conversationSuccess: object expected"); + message.conversationSuccess = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.fromObject(object.conversationSuccess); + } + if (object.outputAudioText != null) { + if (typeof object.outputAudioText !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.outputAudioText: object expected"); + message.outputAudioText = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.fromObject(object.outputAudioText); + } + if (object.liveAgentHandoff != null) { + if (typeof object.liveAgentHandoff !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.liveAgentHandoff: object expected"); + message.liveAgentHandoff = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.fromObject(object.liveAgentHandoff); + } + if (object.endInteraction != null) { + if (typeof object.endInteraction !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.endInteraction: object expected"); + message.endInteraction = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.fromObject(object.endInteraction); + } + if (object.playAudio != null) { + if (typeof object.playAudio !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.playAudio: object expected"); + message.playAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.fromObject(object.playAudio); + } + if (object.mixedAudio != null) { + if (typeof object.mixedAudio !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.mixedAudio: object expected"); + message.mixedAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.fromObject(object.mixedAudio); + } + if (object.telephonyTransferCall != null) { + if (typeof object.telephonyTransferCall !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.telephonyTransferCall: object expected"); + message.telephonyTransferCall = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall.fromObject(object.telephonyTransferCall); + } + if (object.channel != null) + message.channel = String(object.channel); + return message; + }; - /** - * Converts this OutputAudioText to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @instance - * @returns {Object.} JSON object - */ - OutputAudioText.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a ResponseMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} message ResponseMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.channel = ""; + if (message.text != null && message.hasOwnProperty("text")) { + object.text = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.toObject(message.text, options); + if (options.oneofs) + object.message = "text"; + } + if (message.payload != null && message.hasOwnProperty("payload")) { + object.payload = $root.google.protobuf.Struct.toObject(message.payload, options); + if (options.oneofs) + object.message = "payload"; + } + if (message.outputAudioText != null && message.hasOwnProperty("outputAudioText")) { + object.outputAudioText = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.toObject(message.outputAudioText, options); + if (options.oneofs) + object.message = "outputAudioText"; + } + if (message.conversationSuccess != null && message.hasOwnProperty("conversationSuccess")) { + object.conversationSuccess = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.toObject(message.conversationSuccess, options); + if (options.oneofs) + object.message = "conversationSuccess"; + } + if (message.liveAgentHandoff != null && message.hasOwnProperty("liveAgentHandoff")) { + object.liveAgentHandoff = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.toObject(message.liveAgentHandoff, options); + if (options.oneofs) + object.message = "liveAgentHandoff"; + } + if (message.endInteraction != null && message.hasOwnProperty("endInteraction")) { + object.endInteraction = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.toObject(message.endInteraction, options); + if (options.oneofs) + object.message = "endInteraction"; + } + if (message.playAudio != null && message.hasOwnProperty("playAudio")) { + object.playAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.toObject(message.playAudio, options); + if (options.oneofs) + object.message = "playAudio"; + } + if (message.mixedAudio != null && message.hasOwnProperty("mixedAudio")) { + object.mixedAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.toObject(message.mixedAudio, options); + if (options.oneofs) + object.message = "mixedAudio"; + } + if (message.telephonyTransferCall != null && message.hasOwnProperty("telephonyTransferCall")) { + object.telephonyTransferCall = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall.toObject(message.telephonyTransferCall, options); + if (options.oneofs) + object.message = "telephonyTransferCall"; + } + if (message.channel != null && message.hasOwnProperty("channel")) + object.channel = message.channel; + return object; + }; - /** - * Gets the default type url for OutputAudioText - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OutputAudioText.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText"; - }; + /** + * Converts this ResponseMessage to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @instance + * @returns {Object.} JSON object + */ + ResponseMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return OutputAudioText; - })(); + /** + * Gets the default type url for ResponseMessage + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResponseMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage"; + }; - ResponseMessage.EndInteraction = (function() { + ResponseMessage.Text = (function() { /** - * Properties of an EndInteraction. + * Properties of a Text. * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @interface IEndInteraction + * @interface IText + * @property {Array.|null} [text] Text text + * @property {boolean|null} [allowPlaybackInterruption] Text allowPlaybackInterruption */ /** - * Constructs a new EndInteraction. + * Constructs a new Text. * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @classdesc Represents an EndInteraction. - * @implements IEndInteraction + * @classdesc Represents a Text. + * @implements IText * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText=} [properties] Properties to set */ - function EndInteraction(properties) { + function Text(properties) { + this.text = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -86400,63 +88152,94 @@ } /** - * Creates a new EndInteraction instance using the specified properties. + * Text text. + * @member {Array.} text + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @instance + */ + Text.prototype.text = $util.emptyArray; + + /** + * Text allowPlaybackInterruption. + * @member {boolean} allowPlaybackInterruption + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @instance + */ + Text.prototype.allowPlaybackInterruption = false; + + /** + * Creates a new Text instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} EndInteraction instance + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} Text instance */ - EndInteraction.create = function create(properties) { - return new EndInteraction(properties); + Text.create = function create(properties) { + return new Text(properties); }; /** - * Encodes the specified EndInteraction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.verify|verify} messages. + * Encodes the specified Text message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction} message EndInteraction message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText} message Text message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EndInteraction.encode = function encode(message, writer) { + Text.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.text != null && message.text.length) + for (var i = 0; i < message.text.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text[i]); + if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowPlaybackInterruption); return writer; }; /** - * Encodes the specified EndInteraction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.verify|verify} messages. + * Encodes the specified Text message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction} message EndInteraction message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText} message Text message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EndInteraction.encodeDelimited = function encodeDelimited(message, writer) { + Text.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EndInteraction message from the specified reader or buffer. + * Decodes a Text message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} EndInteraction + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} Text * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EndInteraction.decode = function decode(reader, length) { + Text.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + if (!(message.text && message.text.length)) + message.text = []; + message.text.push(reader.string()); + break; + } + case 2: { + message.allowPlaybackInterruption = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -86466,110 +88249,143 @@ }; /** - * Decodes an EndInteraction message from the specified reader or buffer, length delimited. + * Decodes a Text message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} EndInteraction + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} Text * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EndInteraction.decodeDelimited = function decodeDelimited(reader) { + Text.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EndInteraction message. + * Verifies a Text message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EndInteraction.verify = function verify(message) { + Text.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) { + if (!Array.isArray(message.text)) + return "text: array expected"; + for (var i = 0; i < message.text.length; ++i) + if (!$util.isString(message.text[i])) + return "text: string[] expected"; + } + if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) + if (typeof message.allowPlaybackInterruption !== "boolean") + return "allowPlaybackInterruption: boolean expected"; return null; }; /** - * Creates an EndInteraction message from a plain object. Also converts values to their respective internal types. + * Creates a Text message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} EndInteraction + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} Text */ - EndInteraction.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction) + Text.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text) return object; - return new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text(); + if (object.text) { + if (!Array.isArray(object.text)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.text: array expected"); + message.text = []; + for (var i = 0; i < object.text.length; ++i) + message.text[i] = String(object.text[i]); + } + if (object.allowPlaybackInterruption != null) + message.allowPlaybackInterruption = Boolean(object.allowPlaybackInterruption); + return message; }; /** - * Creates a plain object from an EndInteraction message. Also converts values to other types if specified. + * Creates a plain object from a Text message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} message EndInteraction + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} message Text * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EndInteraction.toObject = function toObject() { - return {}; + Text.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.text = []; + if (options.defaults) + object.allowPlaybackInterruption = false; + if (message.text && message.text.length) { + object.text = []; + for (var j = 0; j < message.text.length; ++j) + object.text[j] = message.text[j]; + } + if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) + object.allowPlaybackInterruption = message.allowPlaybackInterruption; + return object; }; /** - * Converts this EndInteraction to JSON. + * Converts this Text to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text * @instance * @returns {Object.} JSON object */ - EndInteraction.prototype.toJSON = function toJSON() { + Text.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EndInteraction + * Gets the default type url for Text * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EndInteraction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Text.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text"; }; - return EndInteraction; + return Text; })(); - ResponseMessage.PlayAudio = (function() { + ResponseMessage.LiveAgentHandoff = (function() { /** - * Properties of a PlayAudio. + * Properties of a LiveAgentHandoff. * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @interface IPlayAudio - * @property {string|null} [audioUri] PlayAudio audioUri - * @property {boolean|null} [allowPlaybackInterruption] PlayAudio allowPlaybackInterruption + * @interface ILiveAgentHandoff + * @property {google.protobuf.IStruct|null} [metadata] LiveAgentHandoff metadata */ /** - * Constructs a new PlayAudio. + * Constructs a new LiveAgentHandoff. * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @classdesc Represents a PlayAudio. - * @implements IPlayAudio + * @classdesc Represents a LiveAgentHandoff. + * @implements ILiveAgentHandoff * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff=} [properties] Properties to set */ - function PlayAudio(properties) { + function LiveAgentHandoff(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -86577,89 +88393,75 @@ } /** - * PlayAudio audioUri. - * @member {string} audioUri - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio - * @instance - */ - PlayAudio.prototype.audioUri = ""; - - /** - * PlayAudio allowPlaybackInterruption. - * @member {boolean} allowPlaybackInterruption - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * LiveAgentHandoff metadata. + * @member {google.protobuf.IStruct|null|undefined} metadata + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff * @instance */ - PlayAudio.prototype.allowPlaybackInterruption = false; + LiveAgentHandoff.prototype.metadata = null; /** - * Creates a new PlayAudio instance using the specified properties. + * Creates a new LiveAgentHandoff instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} PlayAudio instance + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff instance */ - PlayAudio.create = function create(properties) { - return new PlayAudio(properties); + LiveAgentHandoff.create = function create(properties) { + return new LiveAgentHandoff(properties); }; /** - * Encodes the specified PlayAudio message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.verify|verify} messages. + * Encodes the specified LiveAgentHandoff message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio} message PlayAudio message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff} message LiveAgentHandoff message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PlayAudio.encode = function encode(message, writer) { + LiveAgentHandoff.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.audioUri != null && Object.hasOwnProperty.call(message, "audioUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.audioUri); - if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowPlaybackInterruption); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Struct.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified PlayAudio message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.verify|verify} messages. + * Encodes the specified LiveAgentHandoff message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio} message PlayAudio message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff} message LiveAgentHandoff message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PlayAudio.encodeDelimited = function encodeDelimited(message, writer) { + LiveAgentHandoff.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PlayAudio message from the specified reader or buffer. + * Decodes a LiveAgentHandoff message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} PlayAudio + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PlayAudio.decode = function decode(reader, length) { + LiveAgentHandoff.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.audioUri = reader.string(); - break; - } - case 2: { - message.allowPlaybackInterruption = reader.bool(); + message.metadata = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; } default: @@ -86671,48 +88473,928 @@ }; /** - * Decodes a PlayAudio message from the specified reader or buffer, length delimited. + * Decodes a LiveAgentHandoff message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} PlayAudio + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PlayAudio.decodeDelimited = function decodeDelimited(reader) { + LiveAgentHandoff.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PlayAudio message. + * Verifies a LiveAgentHandoff message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PlayAudio.verify = function verify(message) { + LiveAgentHandoff.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.audioUri != null && message.hasOwnProperty("audioUri")) - if (!$util.isString(message.audioUri)) - return "audioUri: string expected"; - if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) - if (typeof message.allowPlaybackInterruption !== "boolean") - return "allowPlaybackInterruption: boolean expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Struct.verify(message.metadata); + if (error) + return "metadata." + error; + } return null; }; /** - * Creates a PlayAudio message from a plain object. Also converts values to their respective internal types. + * Creates a LiveAgentHandoff message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} PlayAudio + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff + */ + LiveAgentHandoff.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff(); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.metadata: object expected"); + message.metadata = $root.google.protobuf.Struct.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a LiveAgentHandoff message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} message LiveAgentHandoff + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LiveAgentHandoff.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadata = null; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Struct.toObject(message.metadata, options); + return object; + }; + + /** + * Converts this LiveAgentHandoff to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff + * @instance + * @returns {Object.} JSON object + */ + LiveAgentHandoff.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LiveAgentHandoff + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LiveAgentHandoff.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff"; + }; + + return LiveAgentHandoff; + })(); + + ResponseMessage.ConversationSuccess = (function() { + + /** + * Properties of a ConversationSuccess. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @interface IConversationSuccess + * @property {google.protobuf.IStruct|null} [metadata] ConversationSuccess metadata + */ + + /** + * Constructs a new ConversationSuccess. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @classdesc Represents a ConversationSuccess. + * @implements IConversationSuccess + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess=} [properties] Properties to set + */ + function ConversationSuccess(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConversationSuccess metadata. + * @member {google.protobuf.IStruct|null|undefined} metadata + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess + * @instance + */ + ConversationSuccess.prototype.metadata = null; + + /** + * Creates a new ConversationSuccess instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} ConversationSuccess instance + */ + ConversationSuccess.create = function create(properties) { + return new ConversationSuccess(properties); + }; + + /** + * Encodes the specified ConversationSuccess message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess} message ConversationSuccess message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationSuccess.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Struct.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConversationSuccess message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess} message ConversationSuccess message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationSuccess.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConversationSuccess message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} ConversationSuccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationSuccess.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metadata = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConversationSuccess message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} ConversationSuccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationSuccess.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConversationSuccess message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversationSuccess.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Struct.verify(message.metadata); + if (error) + return "metadata." + error; + } + return null; + }; + + /** + * Creates a ConversationSuccess message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} ConversationSuccess + */ + ConversationSuccess.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess(); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.metadata: object expected"); + message.metadata = $root.google.protobuf.Struct.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a ConversationSuccess message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} message ConversationSuccess + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversationSuccess.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadata = null; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Struct.toObject(message.metadata, options); + return object; + }; + + /** + * Converts this ConversationSuccess to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess + * @instance + * @returns {Object.} JSON object + */ + ConversationSuccess.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConversationSuccess + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConversationSuccess.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess"; + }; + + return ConversationSuccess; + })(); + + ResponseMessage.OutputAudioText = (function() { + + /** + * Properties of an OutputAudioText. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @interface IOutputAudioText + * @property {string|null} [text] OutputAudioText text + * @property {string|null} [ssml] OutputAudioText ssml + * @property {boolean|null} [allowPlaybackInterruption] OutputAudioText allowPlaybackInterruption + */ + + /** + * Constructs a new OutputAudioText. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @classdesc Represents an OutputAudioText. + * @implements IOutputAudioText + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText=} [properties] Properties to set + */ + function OutputAudioText(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OutputAudioText text. + * @member {string|null|undefined} text + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * @instance + */ + OutputAudioText.prototype.text = null; + + /** + * OutputAudioText ssml. + * @member {string|null|undefined} ssml + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * @instance + */ + OutputAudioText.prototype.ssml = null; + + /** + * OutputAudioText allowPlaybackInterruption. + * @member {boolean} allowPlaybackInterruption + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * @instance + */ + OutputAudioText.prototype.allowPlaybackInterruption = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OutputAudioText source. + * @member {"text"|"ssml"|undefined} source + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * @instance + */ + Object.defineProperty(OutputAudioText.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["text", "ssml"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OutputAudioText instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} OutputAudioText instance + */ + OutputAudioText.create = function create(properties) { + return new OutputAudioText(properties); + }; + + /** + * Encodes the specified OutputAudioText message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText} message OutputAudioText message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OutputAudioText.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); + if (message.ssml != null && Object.hasOwnProperty.call(message, "ssml")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ssml); + if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowPlaybackInterruption); + return writer; + }; + + /** + * Encodes the specified OutputAudioText message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText} message OutputAudioText message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OutputAudioText.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OutputAudioText message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} OutputAudioText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OutputAudioText.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.text = reader.string(); + break; + } + case 2: { + message.ssml = reader.string(); + break; + } + case 3: { + message.allowPlaybackInterruption = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OutputAudioText message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} OutputAudioText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OutputAudioText.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OutputAudioText message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OutputAudioText.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.text != null && message.hasOwnProperty("text")) { + properties.source = 1; + if (!$util.isString(message.text)) + return "text: string expected"; + } + if (message.ssml != null && message.hasOwnProperty("ssml")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.ssml)) + return "ssml: string expected"; + } + if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) + if (typeof message.allowPlaybackInterruption !== "boolean") + return "allowPlaybackInterruption: boolean expected"; + return null; + }; + + /** + * Creates an OutputAudioText message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} OutputAudioText + */ + OutputAudioText.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText(); + if (object.text != null) + message.text = String(object.text); + if (object.ssml != null) + message.ssml = String(object.ssml); + if (object.allowPlaybackInterruption != null) + message.allowPlaybackInterruption = Boolean(object.allowPlaybackInterruption); + return message; + }; + + /** + * Creates a plain object from an OutputAudioText message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} message OutputAudioText + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OutputAudioText.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.allowPlaybackInterruption = false; + if (message.text != null && message.hasOwnProperty("text")) { + object.text = message.text; + if (options.oneofs) + object.source = "text"; + } + if (message.ssml != null && message.hasOwnProperty("ssml")) { + object.ssml = message.ssml; + if (options.oneofs) + object.source = "ssml"; + } + if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) + object.allowPlaybackInterruption = message.allowPlaybackInterruption; + return object; + }; + + /** + * Converts this OutputAudioText to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * @instance + * @returns {Object.} JSON object + */ + OutputAudioText.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OutputAudioText + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OutputAudioText.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText"; + }; + + return OutputAudioText; + })(); + + ResponseMessage.EndInteraction = (function() { + + /** + * Properties of an EndInteraction. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @interface IEndInteraction + */ + + /** + * Constructs a new EndInteraction. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @classdesc Represents an EndInteraction. + * @implements IEndInteraction + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction=} [properties] Properties to set + */ + function EndInteraction(properties) { + if (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 EndInteraction instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} EndInteraction instance + */ + EndInteraction.create = function create(properties) { + return new EndInteraction(properties); + }; + + /** + * Encodes the specified EndInteraction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction} message EndInteraction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EndInteraction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified EndInteraction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction} message EndInteraction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EndInteraction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EndInteraction message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} EndInteraction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EndInteraction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EndInteraction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} EndInteraction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EndInteraction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EndInteraction message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EndInteraction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an EndInteraction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} EndInteraction + */ + EndInteraction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction) + return object; + return new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction(); + }; + + /** + * Creates a plain object from an EndInteraction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} message EndInteraction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EndInteraction.toObject = function toObject() { + return {}; + }; + + /** + * Converts this EndInteraction to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @instance + * @returns {Object.} JSON object + */ + EndInteraction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EndInteraction + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EndInteraction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction"; + }; + + return EndInteraction; + })(); + + ResponseMessage.PlayAudio = (function() { + + /** + * Properties of a PlayAudio. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @interface IPlayAudio + * @property {string|null} [audioUri] PlayAudio audioUri + * @property {boolean|null} [allowPlaybackInterruption] PlayAudio allowPlaybackInterruption + */ + + /** + * Constructs a new PlayAudio. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @classdesc Represents a PlayAudio. + * @implements IPlayAudio + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio=} [properties] Properties to set + */ + function PlayAudio(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PlayAudio audioUri. + * @member {string} audioUri + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @instance + */ + PlayAudio.prototype.audioUri = ""; + + /** + * PlayAudio allowPlaybackInterruption. + * @member {boolean} allowPlaybackInterruption + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @instance + */ + PlayAudio.prototype.allowPlaybackInterruption = false; + + /** + * Creates a new PlayAudio instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} PlayAudio instance + */ + PlayAudio.create = function create(properties) { + return new PlayAudio(properties); + }; + + /** + * Encodes the specified PlayAudio message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio} message PlayAudio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlayAudio.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.audioUri != null && Object.hasOwnProperty.call(message, "audioUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.audioUri); + if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowPlaybackInterruption); + return writer; + }; + + /** + * Encodes the specified PlayAudio message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio} message PlayAudio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlayAudio.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PlayAudio message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} PlayAudio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlayAudio.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.audioUri = reader.string(); + break; + } + case 2: { + message.allowPlaybackInterruption = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PlayAudio message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} PlayAudio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlayAudio.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PlayAudio message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PlayAudio.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.audioUri != null && message.hasOwnProperty("audioUri")) + if (!$util.isString(message.audioUri)) + return "audioUri: string expected"; + if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) + if (typeof message.allowPlaybackInterruption !== "boolean") + return "allowPlaybackInterruption: boolean expected"; + return null; + }; + + /** + * Creates a PlayAudio message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} PlayAudio */ PlayAudio.fromObject = function fromObject(object) { if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio) @@ -87359,1937 +90041,174 @@ * @function encodeDelimited * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ITelephonyTransferCall} message TelephonyTransferCall message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TelephonyTransferCall.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TelephonyTransferCall message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall} TelephonyTransferCall - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TelephonyTransferCall.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.phoneNumber = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TelephonyTransferCall message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall} TelephonyTransferCall - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TelephonyTransferCall.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TelephonyTransferCall message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TelephonyTransferCall.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) { - properties.endpoint = 1; - if (!$util.isString(message.phoneNumber)) - return "phoneNumber: string expected"; - } - return null; - }; - - /** - * Creates a TelephonyTransferCall message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall} TelephonyTransferCall - */ - TelephonyTransferCall.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall(); - if (object.phoneNumber != null) - message.phoneNumber = String(object.phoneNumber); - return message; - }; - - /** - * Creates a plain object from a TelephonyTransferCall message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall} message TelephonyTransferCall - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TelephonyTransferCall.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) { - object.phoneNumber = message.phoneNumber; - if (options.oneofs) - object.endpoint = "phoneNumber"; - } - return object; - }; - - /** - * Converts this TelephonyTransferCall to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall - * @instance - * @returns {Object.} JSON object - */ - TelephonyTransferCall.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TelephonyTransferCall - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TelephonyTransferCall.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall"; - }; - - return TelephonyTransferCall; - })(); - - return ResponseMessage; - })(); - - v3beta1.ValidationMessage = (function() { - - /** - * Properties of a ValidationMessage. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IValidationMessage - * @property {google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType|null} [resourceType] ValidationMessage resourceType - * @property {Array.|null} [resources] ValidationMessage resources - * @property {Array.|null} [resourceNames] ValidationMessage resourceNames - * @property {google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity|null} [severity] ValidationMessage severity - * @property {string|null} [detail] ValidationMessage detail - */ - - /** - * Constructs a new ValidationMessage. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ValidationMessage. - * @implements IValidationMessage - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IValidationMessage=} [properties] Properties to set - */ - function ValidationMessage(properties) { - this.resources = []; - this.resourceNames = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ValidationMessage resourceType. - * @member {google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType} resourceType - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage - * @instance - */ - ValidationMessage.prototype.resourceType = 0; - - /** - * ValidationMessage resources. - * @member {Array.} resources - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage - * @instance - */ - ValidationMessage.prototype.resources = $util.emptyArray; - - /** - * ValidationMessage resourceNames. - * @member {Array.} resourceNames - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage - * @instance - */ - ValidationMessage.prototype.resourceNames = $util.emptyArray; - - /** - * ValidationMessage severity. - * @member {google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity} severity - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage - * @instance - */ - ValidationMessage.prototype.severity = 0; - - /** - * ValidationMessage detail. - * @member {string} detail - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage - * @instance - */ - ValidationMessage.prototype.detail = ""; - - /** - * Creates a new ValidationMessage instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IValidationMessage=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ValidationMessage} ValidationMessage instance - */ - ValidationMessage.create = function create(properties) { - return new ValidationMessage(properties); - }; - - /** - * Encodes the specified ValidationMessage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidationMessage.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IValidationMessage} message ValidationMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidationMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.resourceType); - if (message.resources != null && message.resources.length) - for (var i = 0; i < message.resources.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.resources[i]); - if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.severity); - if (message.detail != null && Object.hasOwnProperty.call(message, "detail")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.detail); - if (message.resourceNames != null && message.resourceNames.length) - for (var i = 0; i < message.resourceNames.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.ResourceName.encode(message.resourceNames[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ValidationMessage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidationMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IValidationMessage} message ValidationMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidationMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ValidationMessage message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ValidationMessage} ValidationMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidationMessage.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resourceType = reader.int32(); - break; - } - case 2: { - if (!(message.resources && message.resources.length)) - message.resources = []; - message.resources.push(reader.string()); - break; - } - case 6: { - if (!(message.resourceNames && message.resourceNames.length)) - message.resourceNames = []; - message.resourceNames.push($root.google.cloud.dialogflow.cx.v3beta1.ResourceName.decode(reader, reader.uint32())); - break; - } - case 3: { - message.severity = reader.int32(); - break; - } - case 4: { - message.detail = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ValidationMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ValidationMessage} ValidationMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidationMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ValidationMessage message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValidationMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - switch (message.resourceType) { - default: - return "resourceType: enum value expected"; - case 0: - case 1: - case 2: - case 8: - case 9: - case 10: - case 11: - case 3: - case 12: - case 4: - case 5: - case 6: - case 13: - case 7: - break; - } - if (message.resources != null && message.hasOwnProperty("resources")) { - if (!Array.isArray(message.resources)) - return "resources: array expected"; - for (var i = 0; i < message.resources.length; ++i) - if (!$util.isString(message.resources[i])) - return "resources: string[] expected"; - } - if (message.resourceNames != null && message.hasOwnProperty("resourceNames")) { - if (!Array.isArray(message.resourceNames)) - return "resourceNames: array expected"; - for (var i = 0; i < message.resourceNames.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResourceName.verify(message.resourceNames[i]); - if (error) - return "resourceNames." + error; - } - } - if (message.severity != null && message.hasOwnProperty("severity")) - switch (message.severity) { - default: - return "severity: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.detail != null && message.hasOwnProperty("detail")) - if (!$util.isString(message.detail)) - return "detail: string expected"; - return null; - }; - - /** - * Creates a ValidationMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ValidationMessage} ValidationMessage - */ - ValidationMessage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage(); - switch (object.resourceType) { - default: - if (typeof object.resourceType === "number") { - message.resourceType = object.resourceType; - break; - } - break; - case "RESOURCE_TYPE_UNSPECIFIED": - case 0: - message.resourceType = 0; - break; - case "AGENT": - case 1: - message.resourceType = 1; - break; - case "INTENT": - case 2: - message.resourceType = 2; - break; - case "INTENT_TRAINING_PHRASE": - case 8: - message.resourceType = 8; - break; - case "INTENT_PARAMETER": - case 9: - message.resourceType = 9; - break; - case "INTENTS": - case 10: - message.resourceType = 10; - break; - case "INTENT_TRAINING_PHRASES": - case 11: - message.resourceType = 11; - break; - case "ENTITY_TYPE": - case 3: - message.resourceType = 3; - break; - case "ENTITY_TYPES": - case 12: - message.resourceType = 12; - break; - case "WEBHOOK": - case 4: - message.resourceType = 4; - break; - case "FLOW": - case 5: - message.resourceType = 5; - break; - case "PAGE": - case 6: - message.resourceType = 6; - break; - case "PAGES": - case 13: - message.resourceType = 13; - break; - case "TRANSITION_ROUTE_GROUP": - case 7: - message.resourceType = 7; - break; - } - if (object.resources) { - if (!Array.isArray(object.resources)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ValidationMessage.resources: array expected"); - message.resources = []; - for (var i = 0; i < object.resources.length; ++i) - message.resources[i] = String(object.resources[i]); - } - if (object.resourceNames) { - if (!Array.isArray(object.resourceNames)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ValidationMessage.resourceNames: array expected"); - message.resourceNames = []; - for (var i = 0; i < object.resourceNames.length; ++i) { - if (typeof object.resourceNames[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ValidationMessage.resourceNames: object expected"); - message.resourceNames[i] = $root.google.cloud.dialogflow.cx.v3beta1.ResourceName.fromObject(object.resourceNames[i]); - } - } - switch (object.severity) { - default: - if (typeof object.severity === "number") { - message.severity = object.severity; - break; - } - break; - case "SEVERITY_UNSPECIFIED": - case 0: - message.severity = 0; - break; - case "INFO": - case 1: - message.severity = 1; - break; - case "WARNING": - case 2: - message.severity = 2; - break; - case "ERROR": - case 3: - message.severity = 3; - break; - } - if (object.detail != null) - message.detail = String(object.detail); - return message; - }; - - /** - * Creates a plain object from a ValidationMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ValidationMessage} message ValidationMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValidationMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.resources = []; - object.resourceNames = []; - } - if (options.defaults) { - object.resourceType = options.enums === String ? "RESOURCE_TYPE_UNSPECIFIED" : 0; - object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; - object.detail = ""; - } - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - object.resourceType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType[message.resourceType] === undefined ? message.resourceType : $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType[message.resourceType] : message.resourceType; - if (message.resources && message.resources.length) { - object.resources = []; - for (var j = 0; j < message.resources.length; ++j) - object.resources[j] = message.resources[j]; - } - if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity[message.severity] === undefined ? message.severity : $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity[message.severity] : message.severity; - if (message.detail != null && message.hasOwnProperty("detail")) - object.detail = message.detail; - if (message.resourceNames && message.resourceNames.length) { - object.resourceNames = []; - for (var j = 0; j < message.resourceNames.length; ++j) - object.resourceNames[j] = $root.google.cloud.dialogflow.cx.v3beta1.ResourceName.toObject(message.resourceNames[j], options); - } - return object; - }; - - /** - * Converts this ValidationMessage to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage - * @instance - * @returns {Object.} JSON object - */ - ValidationMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ValidationMessage - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ValidationMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ValidationMessage"; - }; - - /** - * ResourceType enum. - * @name google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType - * @enum {number} - * @property {number} RESOURCE_TYPE_UNSPECIFIED=0 RESOURCE_TYPE_UNSPECIFIED value - * @property {number} AGENT=1 AGENT value - * @property {number} INTENT=2 INTENT value - * @property {number} INTENT_TRAINING_PHRASE=8 INTENT_TRAINING_PHRASE value - * @property {number} INTENT_PARAMETER=9 INTENT_PARAMETER value - * @property {number} INTENTS=10 INTENTS value - * @property {number} INTENT_TRAINING_PHRASES=11 INTENT_TRAINING_PHRASES value - * @property {number} ENTITY_TYPE=3 ENTITY_TYPE value - * @property {number} ENTITY_TYPES=12 ENTITY_TYPES value - * @property {number} WEBHOOK=4 WEBHOOK value - * @property {number} FLOW=5 FLOW value - * @property {number} PAGE=6 PAGE value - * @property {number} PAGES=13 PAGES value - * @property {number} TRANSITION_ROUTE_GROUP=7 TRANSITION_ROUTE_GROUP value - */ - ValidationMessage.ResourceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RESOURCE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "AGENT"] = 1; - values[valuesById[2] = "INTENT"] = 2; - values[valuesById[8] = "INTENT_TRAINING_PHRASE"] = 8; - values[valuesById[9] = "INTENT_PARAMETER"] = 9; - values[valuesById[10] = "INTENTS"] = 10; - values[valuesById[11] = "INTENT_TRAINING_PHRASES"] = 11; - values[valuesById[3] = "ENTITY_TYPE"] = 3; - values[valuesById[12] = "ENTITY_TYPES"] = 12; - values[valuesById[4] = "WEBHOOK"] = 4; - values[valuesById[5] = "FLOW"] = 5; - values[valuesById[6] = "PAGE"] = 6; - values[valuesById[13] = "PAGES"] = 13; - values[valuesById[7] = "TRANSITION_ROUTE_GROUP"] = 7; - return values; - })(); - - /** - * Severity enum. - * @name google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity - * @enum {number} - * @property {number} SEVERITY_UNSPECIFIED=0 SEVERITY_UNSPECIFIED value - * @property {number} INFO=1 INFO value - * @property {number} WARNING=2 WARNING value - * @property {number} ERROR=3 ERROR value - */ - ValidationMessage.Severity = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SEVERITY_UNSPECIFIED"] = 0; - values[valuesById[1] = "INFO"] = 1; - values[valuesById[2] = "WARNING"] = 2; - values[valuesById[3] = "ERROR"] = 3; - return values; - })(); - - return ValidationMessage; - })(); - - v3beta1.ResourceName = (function() { - - /** - * Properties of a ResourceName. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IResourceName - * @property {string|null} [name] ResourceName name - * @property {string|null} [displayName] ResourceName displayName - */ - - /** - * Constructs a new ResourceName. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ResourceName. - * @implements IResourceName - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IResourceName=} [properties] Properties to set - */ - function ResourceName(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceName name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName - * @instance - */ - ResourceName.prototype.name = ""; - - /** - * ResourceName displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName - * @instance - */ - ResourceName.prototype.displayName = ""; - - /** - * Creates a new ResourceName instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IResourceName=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ResourceName} ResourceName instance - */ - ResourceName.create = function create(properties) { - return new ResourceName(properties); - }; - - /** - * Encodes the specified ResourceName message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResourceName.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IResourceName} message ResourceName message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceName.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - return writer; - }; - - /** - * Encodes the specified ResourceName message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResourceName.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IResourceName} message ResourceName message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceName.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceName message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ResourceName} ResourceName - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceName.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResourceName(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceName message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResourceName} ResourceName - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceName.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceName message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceName.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - return null; - }; - - /** - * Creates a ResourceName message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResourceName} ResourceName - */ - ResourceName.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResourceName) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResourceName(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - return message; - }; - - /** - * Creates a plain object from a ResourceName message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResourceName} message ResourceName - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceName.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - return object; - }; - - /** - * Converts this ResourceName to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName - * @instance - * @returns {Object.} JSON object - */ - ResourceName.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceName - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceName.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResourceName"; - }; - - return ResourceName; - })(); - - /** - * AudioEncoding enum. - * @name google.cloud.dialogflow.cx.v3beta1.AudioEncoding - * @enum {number} - * @property {number} AUDIO_ENCODING_UNSPECIFIED=0 AUDIO_ENCODING_UNSPECIFIED value - * @property {number} AUDIO_ENCODING_LINEAR_16=1 AUDIO_ENCODING_LINEAR_16 value - * @property {number} AUDIO_ENCODING_FLAC=2 AUDIO_ENCODING_FLAC value - * @property {number} AUDIO_ENCODING_MULAW=3 AUDIO_ENCODING_MULAW value - * @property {number} AUDIO_ENCODING_AMR=4 AUDIO_ENCODING_AMR value - * @property {number} AUDIO_ENCODING_AMR_WB=5 AUDIO_ENCODING_AMR_WB value - * @property {number} AUDIO_ENCODING_OGG_OPUS=6 AUDIO_ENCODING_OGG_OPUS value - * @property {number} AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE=7 AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE value - */ - v3beta1.AudioEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "AUDIO_ENCODING_UNSPECIFIED"] = 0; - values[valuesById[1] = "AUDIO_ENCODING_LINEAR_16"] = 1; - values[valuesById[2] = "AUDIO_ENCODING_FLAC"] = 2; - values[valuesById[3] = "AUDIO_ENCODING_MULAW"] = 3; - values[valuesById[4] = "AUDIO_ENCODING_AMR"] = 4; - values[valuesById[5] = "AUDIO_ENCODING_AMR_WB"] = 5; - values[valuesById[6] = "AUDIO_ENCODING_OGG_OPUS"] = 6; - values[valuesById[7] = "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE"] = 7; - return values; - })(); - - /** - * SpeechModelVariant enum. - * @name google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant - * @enum {number} - * @property {number} SPEECH_MODEL_VARIANT_UNSPECIFIED=0 SPEECH_MODEL_VARIANT_UNSPECIFIED value - * @property {number} USE_BEST_AVAILABLE=1 USE_BEST_AVAILABLE value - * @property {number} USE_STANDARD=2 USE_STANDARD value - * @property {number} USE_ENHANCED=3 USE_ENHANCED value - */ - v3beta1.SpeechModelVariant = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SPEECH_MODEL_VARIANT_UNSPECIFIED"] = 0; - values[valuesById[1] = "USE_BEST_AVAILABLE"] = 1; - values[valuesById[2] = "USE_STANDARD"] = 2; - values[valuesById[3] = "USE_ENHANCED"] = 3; - return values; - })(); - - v3beta1.SpeechWordInfo = (function() { - - /** - * Properties of a SpeechWordInfo. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ISpeechWordInfo - * @property {string|null} [word] SpeechWordInfo word - * @property {google.protobuf.IDuration|null} [startOffset] SpeechWordInfo startOffset - * @property {google.protobuf.IDuration|null} [endOffset] SpeechWordInfo endOffset - * @property {number|null} [confidence] SpeechWordInfo confidence - */ - - /** - * Constructs a new SpeechWordInfo. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a SpeechWordInfo. - * @implements ISpeechWordInfo - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo=} [properties] Properties to set - */ - function SpeechWordInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SpeechWordInfo word. - * @member {string} word - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo - * @instance - */ - SpeechWordInfo.prototype.word = ""; - - /** - * SpeechWordInfo startOffset. - * @member {google.protobuf.IDuration|null|undefined} startOffset - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo - * @instance - */ - SpeechWordInfo.prototype.startOffset = null; - - /** - * SpeechWordInfo endOffset. - * @member {google.protobuf.IDuration|null|undefined} endOffset - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo - * @instance - */ - SpeechWordInfo.prototype.endOffset = null; - - /** - * SpeechWordInfo confidence. - * @member {number} confidence - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo - * @instance - */ - SpeechWordInfo.prototype.confidence = 0; - - /** - * Creates a new SpeechWordInfo instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} SpeechWordInfo instance - */ - SpeechWordInfo.create = function create(properties) { - return new SpeechWordInfo(properties); - }; - - /** - * Encodes the specified SpeechWordInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo} message SpeechWordInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SpeechWordInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.startOffset != null && Object.hasOwnProperty.call(message, "startOffset")) - $root.google.protobuf.Duration.encode(message.startOffset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset")) - $root.google.protobuf.Duration.encode(message.endOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.word != null && Object.hasOwnProperty.call(message, "word")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.word); - if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence); - return writer; - }; - - /** - * Encodes the specified SpeechWordInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo} message SpeechWordInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SpeechWordInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SpeechWordInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} SpeechWordInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SpeechWordInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.word = reader.string(); - break; - } - case 1: { - message.startOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 2: { - message.endOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 4: { - message.confidence = reader.float(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SpeechWordInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} SpeechWordInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SpeechWordInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SpeechWordInfo message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SpeechWordInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.word != null && message.hasOwnProperty("word")) - if (!$util.isString(message.word)) - return "word: string expected"; - if (message.startOffset != null && message.hasOwnProperty("startOffset")) { - var error = $root.google.protobuf.Duration.verify(message.startOffset); - if (error) - return "startOffset." + error; - } - if (message.endOffset != null && message.hasOwnProperty("endOffset")) { - var error = $root.google.protobuf.Duration.verify(message.endOffset); - if (error) - return "endOffset." + error; - } - if (message.confidence != null && message.hasOwnProperty("confidence")) - if (typeof message.confidence !== "number") - return "confidence: number expected"; - return null; - }; - - /** - * Creates a SpeechWordInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} SpeechWordInfo - */ - SpeechWordInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo(); - if (object.word != null) - message.word = String(object.word); - if (object.startOffset != null) { - if (typeof object.startOffset !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.startOffset: object expected"); - message.startOffset = $root.google.protobuf.Duration.fromObject(object.startOffset); - } - if (object.endOffset != null) { - if (typeof object.endOffset !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.endOffset: object expected"); - message.endOffset = $root.google.protobuf.Duration.fromObject(object.endOffset); - } - if (object.confidence != null) - message.confidence = Number(object.confidence); - return message; - }; - - /** - * Creates a plain object from a SpeechWordInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} message SpeechWordInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SpeechWordInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.startOffset = null; - object.endOffset = null; - object.word = ""; - object.confidence = 0; - } - if (message.startOffset != null && message.hasOwnProperty("startOffset")) - object.startOffset = $root.google.protobuf.Duration.toObject(message.startOffset, options); - if (message.endOffset != null && message.hasOwnProperty("endOffset")) - object.endOffset = $root.google.protobuf.Duration.toObject(message.endOffset, options); - if (message.word != null && message.hasOwnProperty("word")) - object.word = message.word; - if (message.confidence != null && message.hasOwnProperty("confidence")) - object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; - return object; - }; - - /** - * Converts this SpeechWordInfo to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo - * @instance - * @returns {Object.} JSON object - */ - SpeechWordInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SpeechWordInfo - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SpeechWordInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo"; - }; - - return SpeechWordInfo; - })(); - - v3beta1.InputAudioConfig = (function() { - - /** - * Properties of an InputAudioConfig. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IInputAudioConfig - * @property {google.cloud.dialogflow.cx.v3beta1.AudioEncoding|null} [audioEncoding] InputAudioConfig audioEncoding - * @property {number|null} [sampleRateHertz] InputAudioConfig sampleRateHertz - * @property {boolean|null} [enableWordInfo] InputAudioConfig enableWordInfo - * @property {Array.|null} [phraseHints] InputAudioConfig phraseHints - * @property {string|null} [model] InputAudioConfig model - * @property {google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant|null} [modelVariant] InputAudioConfig modelVariant - * @property {boolean|null} [singleUtterance] InputAudioConfig singleUtterance - */ - - /** - * Constructs a new InputAudioConfig. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an InputAudioConfig. - * @implements IInputAudioConfig - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig=} [properties] Properties to set - */ - function InputAudioConfig(properties) { - this.phraseHints = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InputAudioConfig audioEncoding. - * @member {google.cloud.dialogflow.cx.v3beta1.AudioEncoding} audioEncoding - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig - * @instance - */ - InputAudioConfig.prototype.audioEncoding = 0; - - /** - * InputAudioConfig sampleRateHertz. - * @member {number} sampleRateHertz - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig - * @instance - */ - InputAudioConfig.prototype.sampleRateHertz = 0; - - /** - * InputAudioConfig enableWordInfo. - * @member {boolean} enableWordInfo - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig - * @instance - */ - InputAudioConfig.prototype.enableWordInfo = false; - - /** - * InputAudioConfig phraseHints. - * @member {Array.} phraseHints - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig - * @instance - */ - InputAudioConfig.prototype.phraseHints = $util.emptyArray; - - /** - * InputAudioConfig model. - * @member {string} model - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig - * @instance - */ - InputAudioConfig.prototype.model = ""; - - /** - * InputAudioConfig modelVariant. - * @member {google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant} modelVariant - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig - * @instance - */ - InputAudioConfig.prototype.modelVariant = 0; - - /** - * InputAudioConfig singleUtterance. - * @member {boolean} singleUtterance - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig - * @instance - */ - InputAudioConfig.prototype.singleUtterance = false; - - /** - * Creates a new InputAudioConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} InputAudioConfig instance - */ - InputAudioConfig.create = function create(properties) { - return new InputAudioConfig(properties); - }; - - /** - * Encodes the specified InputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig} message InputAudioConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InputAudioConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.audioEncoding != null && Object.hasOwnProperty.call(message, "audioEncoding")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.audioEncoding); - if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sampleRateHertz); - if (message.phraseHints != null && message.phraseHints.length) - for (var i = 0; i < message.phraseHints.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.phraseHints[i]); - if (message.model != null && Object.hasOwnProperty.call(message, "model")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.model); - if (message.singleUtterance != null && Object.hasOwnProperty.call(message, "singleUtterance")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.singleUtterance); - if (message.modelVariant != null && Object.hasOwnProperty.call(message, "modelVariant")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.modelVariant); - if (message.enableWordInfo != null && Object.hasOwnProperty.call(message, "enableWordInfo")) - writer.uint32(/* id 13, wireType 0 =*/104).bool(message.enableWordInfo); - return writer; - }; - - /** - * Encodes the specified InputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig} message InputAudioConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InputAudioConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InputAudioConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} InputAudioConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InputAudioConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.InputAudioConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.audioEncoding = reader.int32(); - break; - } - case 2: { - message.sampleRateHertz = reader.int32(); - break; - } - case 13: { - message.enableWordInfo = reader.bool(); - break; - } - case 4: { - if (!(message.phraseHints && message.phraseHints.length)) - message.phraseHints = []; - message.phraseHints.push(reader.string()); - break; - } - case 7: { - message.model = reader.string(); - break; - } - case 10: { - message.modelVariant = reader.int32(); - break; - } - case 8: { - message.singleUtterance = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InputAudioConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} InputAudioConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InputAudioConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InputAudioConfig message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InputAudioConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) - switch (message.audioEncoding) { - default: - return "audioEncoding: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) - if (!$util.isInteger(message.sampleRateHertz)) - return "sampleRateHertz: integer expected"; - if (message.enableWordInfo != null && message.hasOwnProperty("enableWordInfo")) - if (typeof message.enableWordInfo !== "boolean") - return "enableWordInfo: boolean expected"; - if (message.phraseHints != null && message.hasOwnProperty("phraseHints")) { - if (!Array.isArray(message.phraseHints)) - return "phraseHints: array expected"; - for (var i = 0; i < message.phraseHints.length; ++i) - if (!$util.isString(message.phraseHints[i])) - return "phraseHints: string[] expected"; - } - if (message.model != null && message.hasOwnProperty("model")) - if (!$util.isString(message.model)) - return "model: string expected"; - if (message.modelVariant != null && message.hasOwnProperty("modelVariant")) - switch (message.modelVariant) { - default: - return "modelVariant: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) - if (typeof message.singleUtterance !== "boolean") - return "singleUtterance: boolean expected"; - return null; - }; - - /** - * Creates an InputAudioConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} InputAudioConfig - */ - InputAudioConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.InputAudioConfig) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.InputAudioConfig(); - switch (object.audioEncoding) { - default: - if (typeof object.audioEncoding === "number") { - message.audioEncoding = object.audioEncoding; - break; - } - break; - case "AUDIO_ENCODING_UNSPECIFIED": - case 0: - message.audioEncoding = 0; - break; - case "AUDIO_ENCODING_LINEAR_16": - case 1: - message.audioEncoding = 1; - break; - case "AUDIO_ENCODING_FLAC": - case 2: - message.audioEncoding = 2; - break; - case "AUDIO_ENCODING_MULAW": - case 3: - message.audioEncoding = 3; - break; - case "AUDIO_ENCODING_AMR": - case 4: - message.audioEncoding = 4; - break; - case "AUDIO_ENCODING_AMR_WB": - case 5: - message.audioEncoding = 5; - break; - case "AUDIO_ENCODING_OGG_OPUS": - case 6: - message.audioEncoding = 6; - break; - case "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE": - case 7: - message.audioEncoding = 7; - break; - } - if (object.sampleRateHertz != null) - message.sampleRateHertz = object.sampleRateHertz | 0; - if (object.enableWordInfo != null) - message.enableWordInfo = Boolean(object.enableWordInfo); - if (object.phraseHints) { - if (!Array.isArray(object.phraseHints)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.phraseHints: array expected"); - message.phraseHints = []; - for (var i = 0; i < object.phraseHints.length; ++i) - message.phraseHints[i] = String(object.phraseHints[i]); - } - if (object.model != null) - message.model = String(object.model); - switch (object.modelVariant) { - default: - if (typeof object.modelVariant === "number") { - message.modelVariant = object.modelVariant; - break; - } - break; - case "SPEECH_MODEL_VARIANT_UNSPECIFIED": - case 0: - message.modelVariant = 0; - break; - case "USE_BEST_AVAILABLE": - case 1: - message.modelVariant = 1; - break; - case "USE_STANDARD": - case 2: - message.modelVariant = 2; - break; - case "USE_ENHANCED": - case 3: - message.modelVariant = 3; - break; - } - if (object.singleUtterance != null) - message.singleUtterance = Boolean(object.singleUtterance); - return message; - }; - - /** - * Creates a plain object from an InputAudioConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} message InputAudioConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InputAudioConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.phraseHints = []; - if (options.defaults) { - object.audioEncoding = options.enums === String ? "AUDIO_ENCODING_UNSPECIFIED" : 0; - object.sampleRateHertz = 0; - object.model = ""; - object.singleUtterance = false; - object.modelVariant = options.enums === String ? "SPEECH_MODEL_VARIANT_UNSPECIFIED" : 0; - object.enableWordInfo = false; - } - if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) - object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.AudioEncoding[message.audioEncoding] === undefined ? message.audioEncoding : $root.google.cloud.dialogflow.cx.v3beta1.AudioEncoding[message.audioEncoding] : message.audioEncoding; - if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) - object.sampleRateHertz = message.sampleRateHertz; - if (message.phraseHints && message.phraseHints.length) { - object.phraseHints = []; - for (var j = 0; j < message.phraseHints.length; ++j) - object.phraseHints[j] = message.phraseHints[j]; - } - if (message.model != null && message.hasOwnProperty("model")) - object.model = message.model; - if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) - object.singleUtterance = message.singleUtterance; - if (message.modelVariant != null && message.hasOwnProperty("modelVariant")) - object.modelVariant = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant[message.modelVariant] === undefined ? message.modelVariant : $root.google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant[message.modelVariant] : message.modelVariant; - if (message.enableWordInfo != null && message.hasOwnProperty("enableWordInfo")) - object.enableWordInfo = message.enableWordInfo; - return object; - }; - - /** - * Converts this InputAudioConfig to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig - * @instance - * @returns {Object.} JSON object - */ - InputAudioConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InputAudioConfig - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InputAudioConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.InputAudioConfig"; - }; - - return InputAudioConfig; - })(); - - /** - * SsmlVoiceGender enum. - * @name google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender - * @enum {number} - * @property {number} SSML_VOICE_GENDER_UNSPECIFIED=0 SSML_VOICE_GENDER_UNSPECIFIED value - * @property {number} SSML_VOICE_GENDER_MALE=1 SSML_VOICE_GENDER_MALE value - * @property {number} SSML_VOICE_GENDER_FEMALE=2 SSML_VOICE_GENDER_FEMALE value - * @property {number} SSML_VOICE_GENDER_NEUTRAL=3 SSML_VOICE_GENDER_NEUTRAL value - */ - v3beta1.SsmlVoiceGender = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SSML_VOICE_GENDER_UNSPECIFIED"] = 0; - values[valuesById[1] = "SSML_VOICE_GENDER_MALE"] = 1; - values[valuesById[2] = "SSML_VOICE_GENDER_FEMALE"] = 2; - values[valuesById[3] = "SSML_VOICE_GENDER_NEUTRAL"] = 3; - return values; - })(); - - v3beta1.VoiceSelectionParams = (function() { - - /** - * Properties of a VoiceSelectionParams. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IVoiceSelectionParams - * @property {string|null} [name] VoiceSelectionParams name - * @property {google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender|null} [ssmlGender] VoiceSelectionParams ssmlGender - */ - - /** - * Constructs a new VoiceSelectionParams. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a VoiceSelectionParams. - * @implements IVoiceSelectionParams - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams=} [properties] Properties to set - */ - function VoiceSelectionParams(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VoiceSelectionParams name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams - * @instance - */ - VoiceSelectionParams.prototype.name = ""; - - /** - * VoiceSelectionParams ssmlGender. - * @member {google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender} ssmlGender - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams - * @instance - */ - VoiceSelectionParams.prototype.ssmlGender = 0; - - /** - * Creates a new VoiceSelectionParams instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} VoiceSelectionParams instance - */ - VoiceSelectionParams.create = function create(properties) { - return new VoiceSelectionParams(properties); - }; - - /** - * Encodes the specified VoiceSelectionParams message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams} message VoiceSelectionParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VoiceSelectionParams.encode = function encode(message, writer) { - 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.ssmlGender != null && Object.hasOwnProperty.call(message, "ssmlGender")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.ssmlGender); - return writer; - }; - - /** - * Encodes the specified VoiceSelectionParams message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams} message VoiceSelectionParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VoiceSelectionParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ITelephonyTransferCall} message TelephonyTransferCall message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TelephonyTransferCall.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a VoiceSelectionParams message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} VoiceSelectionParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VoiceSelectionParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.ssmlGender = reader.int32(); + /** + * Decodes a TelephonyTransferCall message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall} TelephonyTransferCall + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TelephonyTransferCall.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.phoneNumber = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a VoiceSelectionParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} VoiceSelectionParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VoiceSelectionParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a TelephonyTransferCall message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall} TelephonyTransferCall + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TelephonyTransferCall.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a VoiceSelectionParams message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VoiceSelectionParams.verify = function verify(message) { - if (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.ssmlGender != null && message.hasOwnProperty("ssmlGender")) - switch (message.ssmlGender) { - default: - return "ssmlGender: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; + /** + * Verifies a TelephonyTransferCall message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TelephonyTransferCall.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) { + properties.endpoint = 1; + if (!$util.isString(message.phoneNumber)) + return "phoneNumber: string expected"; } - return null; - }; + return null; + }; - /** - * Creates a VoiceSelectionParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} VoiceSelectionParams - */ - VoiceSelectionParams.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams(); - if (object.name != null) - message.name = String(object.name); - switch (object.ssmlGender) { - default: - if (typeof object.ssmlGender === "number") { - message.ssmlGender = object.ssmlGender; - break; + /** + * Creates a TelephonyTransferCall message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall} TelephonyTransferCall + */ + TelephonyTransferCall.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall(); + if (object.phoneNumber != null) + message.phoneNumber = String(object.phoneNumber); + return message; + }; + + /** + * Creates a plain object from a TelephonyTransferCall message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall} message TelephonyTransferCall + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TelephonyTransferCall.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) { + object.phoneNumber = message.phoneNumber; + if (options.oneofs) + object.endpoint = "phoneNumber"; } - break; - case "SSML_VOICE_GENDER_UNSPECIFIED": - case 0: - message.ssmlGender = 0; - break; - case "SSML_VOICE_GENDER_MALE": - case 1: - message.ssmlGender = 1; - break; - case "SSML_VOICE_GENDER_FEMALE": - case 2: - message.ssmlGender = 2; - break; - case "SSML_VOICE_GENDER_NEUTRAL": - case 3: - message.ssmlGender = 3; - break; - } - return message; - }; + return object; + }; - /** - * Creates a plain object from a VoiceSelectionParams message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} message VoiceSelectionParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VoiceSelectionParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.ssmlGender = options.enums === String ? "SSML_VOICE_GENDER_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.ssmlGender != null && message.hasOwnProperty("ssmlGender")) - object.ssmlGender = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender[message.ssmlGender] === undefined ? message.ssmlGender : $root.google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender[message.ssmlGender] : message.ssmlGender; - return object; - }; + /** + * Converts this TelephonyTransferCall to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall + * @instance + * @returns {Object.} JSON object + */ + TelephonyTransferCall.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this VoiceSelectionParams to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams - * @instance - * @returns {Object.} JSON object - */ - VoiceSelectionParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for TelephonyTransferCall + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TelephonyTransferCall.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall"; + }; - /** - * Gets the default type url for VoiceSelectionParams - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VoiceSelectionParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams"; - }; + return TelephonyTransferCall; + })(); - return VoiceSelectionParams; + return ResponseMessage; })(); - v3beta1.SynthesizeSpeechConfig = (function() { + v3beta1.ValidationMessage = (function() { /** - * Properties of a SynthesizeSpeechConfig. + * Properties of a ValidationMessage. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ISynthesizeSpeechConfig - * @property {number|null} [speakingRate] SynthesizeSpeechConfig speakingRate - * @property {number|null} [pitch] SynthesizeSpeechConfig pitch - * @property {number|null} [volumeGainDb] SynthesizeSpeechConfig volumeGainDb - * @property {Array.|null} [effectsProfileId] SynthesizeSpeechConfig effectsProfileId - * @property {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams|null} [voice] SynthesizeSpeechConfig voice + * @interface IValidationMessage + * @property {google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType|null} [resourceType] ValidationMessage resourceType + * @property {Array.|null} [resources] ValidationMessage resources + * @property {Array.|null} [resourceNames] ValidationMessage resourceNames + * @property {google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity|null} [severity] ValidationMessage severity + * @property {string|null} [detail] ValidationMessage detail */ /** - * Constructs a new SynthesizeSpeechConfig. + * Constructs a new ValidationMessage. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a SynthesizeSpeechConfig. - * @implements ISynthesizeSpeechConfig + * @classdesc Represents a ValidationMessage. + * @implements IValidationMessage * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IValidationMessage=} [properties] Properties to set */ - function SynthesizeSpeechConfig(properties) { - this.effectsProfileId = []; + function ValidationMessage(properties) { + this.resources = []; + this.resourceNames = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -89297,134 +90216,137 @@ } /** - * SynthesizeSpeechConfig speakingRate. - * @member {number} speakingRate - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * ValidationMessage resourceType. + * @member {google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType} resourceType + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage * @instance */ - SynthesizeSpeechConfig.prototype.speakingRate = 0; + ValidationMessage.prototype.resourceType = 0; /** - * SynthesizeSpeechConfig pitch. - * @member {number} pitch - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * ValidationMessage resources. + * @member {Array.} resources + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage * @instance */ - SynthesizeSpeechConfig.prototype.pitch = 0; + ValidationMessage.prototype.resources = $util.emptyArray; /** - * SynthesizeSpeechConfig volumeGainDb. - * @member {number} volumeGainDb - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * ValidationMessage resourceNames. + * @member {Array.} resourceNames + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage * @instance */ - SynthesizeSpeechConfig.prototype.volumeGainDb = 0; + ValidationMessage.prototype.resourceNames = $util.emptyArray; /** - * SynthesizeSpeechConfig effectsProfileId. - * @member {Array.} effectsProfileId - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * ValidationMessage severity. + * @member {google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity} severity + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage * @instance */ - SynthesizeSpeechConfig.prototype.effectsProfileId = $util.emptyArray; + ValidationMessage.prototype.severity = 0; /** - * SynthesizeSpeechConfig voice. - * @member {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams|null|undefined} voice - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * ValidationMessage detail. + * @member {string} detail + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage * @instance */ - SynthesizeSpeechConfig.prototype.voice = null; + ValidationMessage.prototype.detail = ""; /** - * Creates a new SynthesizeSpeechConfig instance using the specified properties. + * Creates a new ValidationMessage instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig instance + * @param {google.cloud.dialogflow.cx.v3beta1.IValidationMessage=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ValidationMessage} ValidationMessage instance */ - SynthesizeSpeechConfig.create = function create(properties) { - return new SynthesizeSpeechConfig(properties); + ValidationMessage.create = function create(properties) { + return new ValidationMessage(properties); }; /** - * Encodes the specified SynthesizeSpeechConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify|verify} messages. + * Encodes the specified ValidationMessage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidationMessage.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig} message SynthesizeSpeechConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IValidationMessage} message ValidationMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SynthesizeSpeechConfig.encode = function encode(message, writer) { + ValidationMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.speakingRate != null && Object.hasOwnProperty.call(message, "speakingRate")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.speakingRate); - if (message.pitch != null && Object.hasOwnProperty.call(message, "pitch")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.pitch); - if (message.volumeGainDb != null && Object.hasOwnProperty.call(message, "volumeGainDb")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.volumeGainDb); - if (message.voice != null && Object.hasOwnProperty.call(message, "voice")) - $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.encode(message.voice, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.effectsProfileId != null && message.effectsProfileId.length) - for (var i = 0; i < message.effectsProfileId.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.effectsProfileId[i]); + if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.resourceType); + if (message.resources != null && message.resources.length) + for (var i = 0; i < message.resources.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resources[i]); + if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.severity); + if (message.detail != null && Object.hasOwnProperty.call(message, "detail")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.detail); + if (message.resourceNames != null && message.resourceNames.length) + for (var i = 0; i < message.resourceNames.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.ResourceName.encode(message.resourceNames[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified SynthesizeSpeechConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify|verify} messages. + * Encodes the specified ValidationMessage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidationMessage.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig} message SynthesizeSpeechConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IValidationMessage} message ValidationMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SynthesizeSpeechConfig.encodeDelimited = function encodeDelimited(message, writer) { + ValidationMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer. + * Decodes a ValidationMessage message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.ValidationMessage} ValidationMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SynthesizeSpeechConfig.decode = function decode(reader, length) { + ValidationMessage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.speakingRate = reader.double(); + message.resourceType = reader.int32(); break; } case 2: { - message.pitch = reader.double(); + if (!(message.resources && message.resources.length)) + message.resources = []; + message.resources.push(reader.string()); break; } - case 3: { - message.volumeGainDb = reader.double(); + case 6: { + if (!(message.resourceNames && message.resourceNames.length)) + message.resourceNames = []; + message.resourceNames.push($root.google.cloud.dialogflow.cx.v3beta1.ResourceName.decode(reader, reader.uint32())); break; } - case 5: { - if (!(message.effectsProfileId && message.effectsProfileId.length)) - message.effectsProfileId = []; - message.effectsProfileId.push(reader.string()); + case 3: { + message.severity = reader.int32(); break; } case 4: { - message.voice = $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.decode(reader, reader.uint32()); + message.detail = reader.string(); break; } default: @@ -89436,197 +90358,351 @@ }; /** - * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer, length delimited. + * Decodes a ValidationMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.ValidationMessage} ValidationMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SynthesizeSpeechConfig.decodeDelimited = function decodeDelimited(reader) { + ValidationMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SynthesizeSpeechConfig message. + * Verifies a ValidationMessage message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SynthesizeSpeechConfig.verify = function verify(message) { + ValidationMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.speakingRate != null && message.hasOwnProperty("speakingRate")) - if (typeof message.speakingRate !== "number") - return "speakingRate: number expected"; - if (message.pitch != null && message.hasOwnProperty("pitch")) - if (typeof message.pitch !== "number") - return "pitch: number expected"; - if (message.volumeGainDb != null && message.hasOwnProperty("volumeGainDb")) - if (typeof message.volumeGainDb !== "number") - return "volumeGainDb: number expected"; - if (message.effectsProfileId != null && message.hasOwnProperty("effectsProfileId")) { - if (!Array.isArray(message.effectsProfileId)) - return "effectsProfileId: array expected"; - for (var i = 0; i < message.effectsProfileId.length; ++i) - if (!$util.isString(message.effectsProfileId[i])) - return "effectsProfileId: string[] expected"; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + switch (message.resourceType) { + default: + return "resourceType: enum value expected"; + case 0: + case 1: + case 2: + case 8: + case 9: + case 10: + case 11: + case 3: + case 12: + case 4: + case 5: + case 6: + case 13: + case 7: + break; + } + if (message.resources != null && message.hasOwnProperty("resources")) { + if (!Array.isArray(message.resources)) + return "resources: array expected"; + for (var i = 0; i < message.resources.length; ++i) + if (!$util.isString(message.resources[i])) + return "resources: string[] expected"; } - if (message.voice != null && message.hasOwnProperty("voice")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify(message.voice); - if (error) - return "voice." + error; + if (message.resourceNames != null && message.hasOwnProperty("resourceNames")) { + if (!Array.isArray(message.resourceNames)) + return "resourceNames: array expected"; + for (var i = 0; i < message.resourceNames.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResourceName.verify(message.resourceNames[i]); + if (error) + return "resourceNames." + error; + } } + if (message.severity != null && message.hasOwnProperty("severity")) + switch (message.severity) { + default: + return "severity: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.detail != null && message.hasOwnProperty("detail")) + if (!$util.isString(message.detail)) + return "detail: string expected"; return null; }; /** - * Creates a SynthesizeSpeechConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ValidationMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.ValidationMessage} ValidationMessage */ - SynthesizeSpeechConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig) + ValidationMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig(); - if (object.speakingRate != null) - message.speakingRate = Number(object.speakingRate); - if (object.pitch != null) - message.pitch = Number(object.pitch); - if (object.volumeGainDb != null) - message.volumeGainDb = Number(object.volumeGainDb); - if (object.effectsProfileId) { - if (!Array.isArray(object.effectsProfileId)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.effectsProfileId: array expected"); - message.effectsProfileId = []; - for (var i = 0; i < object.effectsProfileId.length; ++i) - message.effectsProfileId[i] = String(object.effectsProfileId[i]); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage(); + switch (object.resourceType) { + default: + if (typeof object.resourceType === "number") { + message.resourceType = object.resourceType; + break; + } + break; + case "RESOURCE_TYPE_UNSPECIFIED": + case 0: + message.resourceType = 0; + break; + case "AGENT": + case 1: + message.resourceType = 1; + break; + case "INTENT": + case 2: + message.resourceType = 2; + break; + case "INTENT_TRAINING_PHRASE": + case 8: + message.resourceType = 8; + break; + case "INTENT_PARAMETER": + case 9: + message.resourceType = 9; + break; + case "INTENTS": + case 10: + message.resourceType = 10; + break; + case "INTENT_TRAINING_PHRASES": + case 11: + message.resourceType = 11; + break; + case "ENTITY_TYPE": + case 3: + message.resourceType = 3; + break; + case "ENTITY_TYPES": + case 12: + message.resourceType = 12; + break; + case "WEBHOOK": + case 4: + message.resourceType = 4; + break; + case "FLOW": + case 5: + message.resourceType = 5; + break; + case "PAGE": + case 6: + message.resourceType = 6; + break; + case "PAGES": + case 13: + message.resourceType = 13; + break; + case "TRANSITION_ROUTE_GROUP": + case 7: + message.resourceType = 7; + break; } - if (object.voice != null) { - if (typeof object.voice !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.voice: object expected"); - message.voice = $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.fromObject(object.voice); + if (object.resources) { + if (!Array.isArray(object.resources)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ValidationMessage.resources: array expected"); + message.resources = []; + for (var i = 0; i < object.resources.length; ++i) + message.resources[i] = String(object.resources[i]); + } + if (object.resourceNames) { + if (!Array.isArray(object.resourceNames)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ValidationMessage.resourceNames: array expected"); + message.resourceNames = []; + for (var i = 0; i < object.resourceNames.length; ++i) { + if (typeof object.resourceNames[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ValidationMessage.resourceNames: object expected"); + message.resourceNames[i] = $root.google.cloud.dialogflow.cx.v3beta1.ResourceName.fromObject(object.resourceNames[i]); + } + } + switch (object.severity) { + default: + if (typeof object.severity === "number") { + message.severity = object.severity; + break; + } + break; + case "SEVERITY_UNSPECIFIED": + case 0: + message.severity = 0; + break; + case "INFO": + case 1: + message.severity = 1; + break; + case "WARNING": + case 2: + message.severity = 2; + break; + case "ERROR": + case 3: + message.severity = 3; + break; } + if (object.detail != null) + message.detail = String(object.detail); return message; }; /** - * Creates a plain object from a SynthesizeSpeechConfig message. Also converts values to other types if specified. + * Creates a plain object from a ValidationMessage message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage * @static - * @param {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} message SynthesizeSpeechConfig + * @param {google.cloud.dialogflow.cx.v3beta1.ValidationMessage} message ValidationMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SynthesizeSpeechConfig.toObject = function toObject(message, options) { + ValidationMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.effectsProfileId = []; + if (options.arrays || options.defaults) { + object.resources = []; + object.resourceNames = []; + } if (options.defaults) { - object.speakingRate = 0; - object.pitch = 0; - object.volumeGainDb = 0; - object.voice = null; + object.resourceType = options.enums === String ? "RESOURCE_TYPE_UNSPECIFIED" : 0; + object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; + object.detail = ""; } - if (message.speakingRate != null && message.hasOwnProperty("speakingRate")) - object.speakingRate = options.json && !isFinite(message.speakingRate) ? String(message.speakingRate) : message.speakingRate; - if (message.pitch != null && message.hasOwnProperty("pitch")) - object.pitch = options.json && !isFinite(message.pitch) ? String(message.pitch) : message.pitch; - if (message.volumeGainDb != null && message.hasOwnProperty("volumeGainDb")) - object.volumeGainDb = options.json && !isFinite(message.volumeGainDb) ? String(message.volumeGainDb) : message.volumeGainDb; - if (message.voice != null && message.hasOwnProperty("voice")) - object.voice = $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.toObject(message.voice, options); - if (message.effectsProfileId && message.effectsProfileId.length) { - object.effectsProfileId = []; - for (var j = 0; j < message.effectsProfileId.length; ++j) - object.effectsProfileId[j] = message.effectsProfileId[j]; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType[message.resourceType] === undefined ? message.resourceType : $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType[message.resourceType] : message.resourceType; + if (message.resources && message.resources.length) { + object.resources = []; + for (var j = 0; j < message.resources.length; ++j) + object.resources[j] = message.resources[j]; + } + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity[message.severity] === undefined ? message.severity : $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity[message.severity] : message.severity; + if (message.detail != null && message.hasOwnProperty("detail")) + object.detail = message.detail; + if (message.resourceNames && message.resourceNames.length) { + object.resourceNames = []; + for (var j = 0; j < message.resourceNames.length; ++j) + object.resourceNames[j] = $root.google.cloud.dialogflow.cx.v3beta1.ResourceName.toObject(message.resourceNames[j], options); } return object; }; /** - * Converts this SynthesizeSpeechConfig to JSON. + * Converts this ValidationMessage to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage * @instance * @returns {Object.} JSON object */ - SynthesizeSpeechConfig.prototype.toJSON = function toJSON() { + ValidationMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SynthesizeSpeechConfig + * Gets the default type url for ValidationMessage * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SynthesizeSpeechConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ValidationMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ValidationMessage"; }; - return SynthesizeSpeechConfig; - })(); + /** + * ResourceType enum. + * @name google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType + * @enum {number} + * @property {number} RESOURCE_TYPE_UNSPECIFIED=0 RESOURCE_TYPE_UNSPECIFIED value + * @property {number} AGENT=1 AGENT value + * @property {number} INTENT=2 INTENT value + * @property {number} INTENT_TRAINING_PHRASE=8 INTENT_TRAINING_PHRASE value + * @property {number} INTENT_PARAMETER=9 INTENT_PARAMETER value + * @property {number} INTENTS=10 INTENTS value + * @property {number} INTENT_TRAINING_PHRASES=11 INTENT_TRAINING_PHRASES value + * @property {number} ENTITY_TYPE=3 ENTITY_TYPE value + * @property {number} ENTITY_TYPES=12 ENTITY_TYPES value + * @property {number} WEBHOOK=4 WEBHOOK value + * @property {number} FLOW=5 FLOW value + * @property {number} PAGE=6 PAGE value + * @property {number} PAGES=13 PAGES value + * @property {number} TRANSITION_ROUTE_GROUP=7 TRANSITION_ROUTE_GROUP value + */ + ValidationMessage.ResourceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESOURCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "AGENT"] = 1; + values[valuesById[2] = "INTENT"] = 2; + values[valuesById[8] = "INTENT_TRAINING_PHRASE"] = 8; + values[valuesById[9] = "INTENT_PARAMETER"] = 9; + values[valuesById[10] = "INTENTS"] = 10; + values[valuesById[11] = "INTENT_TRAINING_PHRASES"] = 11; + values[valuesById[3] = "ENTITY_TYPE"] = 3; + values[valuesById[12] = "ENTITY_TYPES"] = 12; + values[valuesById[4] = "WEBHOOK"] = 4; + values[valuesById[5] = "FLOW"] = 5; + values[valuesById[6] = "PAGE"] = 6; + values[valuesById[13] = "PAGES"] = 13; + values[valuesById[7] = "TRANSITION_ROUTE_GROUP"] = 7; + return values; + })(); - /** - * OutputAudioEncoding enum. - * @name google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding - * @enum {number} - * @property {number} OUTPUT_AUDIO_ENCODING_UNSPECIFIED=0 OUTPUT_AUDIO_ENCODING_UNSPECIFIED value - * @property {number} OUTPUT_AUDIO_ENCODING_LINEAR_16=1 OUTPUT_AUDIO_ENCODING_LINEAR_16 value - * @property {number} OUTPUT_AUDIO_ENCODING_MP3=2 OUTPUT_AUDIO_ENCODING_MP3 value - * @property {number} OUTPUT_AUDIO_ENCODING_MP3_64_KBPS=4 OUTPUT_AUDIO_ENCODING_MP3_64_KBPS value - * @property {number} OUTPUT_AUDIO_ENCODING_OGG_OPUS=3 OUTPUT_AUDIO_ENCODING_OGG_OPUS value - * @property {number} OUTPUT_AUDIO_ENCODING_MULAW=5 OUTPUT_AUDIO_ENCODING_MULAW value - */ - v3beta1.OutputAudioEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OUTPUT_AUDIO_ENCODING_UNSPECIFIED"] = 0; - values[valuesById[1] = "OUTPUT_AUDIO_ENCODING_LINEAR_16"] = 1; - values[valuesById[2] = "OUTPUT_AUDIO_ENCODING_MP3"] = 2; - values[valuesById[4] = "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS"] = 4; - values[valuesById[3] = "OUTPUT_AUDIO_ENCODING_OGG_OPUS"] = 3; - values[valuesById[5] = "OUTPUT_AUDIO_ENCODING_MULAW"] = 5; - return values; + /** + * Severity enum. + * @name google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity + * @enum {number} + * @property {number} SEVERITY_UNSPECIFIED=0 SEVERITY_UNSPECIFIED value + * @property {number} INFO=1 INFO value + * @property {number} WARNING=2 WARNING value + * @property {number} ERROR=3 ERROR value + */ + ValidationMessage.Severity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SEVERITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "INFO"] = 1; + values[valuesById[2] = "WARNING"] = 2; + values[valuesById[3] = "ERROR"] = 3; + return values; + })(); + + return ValidationMessage; })(); - v3beta1.OutputAudioConfig = (function() { + v3beta1.ResourceName = (function() { /** - * Properties of an OutputAudioConfig. + * Properties of a ResourceName. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IOutputAudioConfig - * @property {google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding|null} [audioEncoding] OutputAudioConfig audioEncoding - * @property {number|null} [sampleRateHertz] OutputAudioConfig sampleRateHertz - * @property {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig|null} [synthesizeSpeechConfig] OutputAudioConfig synthesizeSpeechConfig + * @interface IResourceName + * @property {string|null} [name] ResourceName name + * @property {string|null} [displayName] ResourceName displayName */ /** - * Constructs a new OutputAudioConfig. + * Constructs a new ResourceName. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an OutputAudioConfig. - * @implements IOutputAudioConfig + * @classdesc Represents a ResourceName. + * @implements IResourceName * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IResourceName=} [properties] Properties to set */ - function OutputAudioConfig(properties) { + function ResourceName(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -89634,103 +90710,89 @@ } /** - * OutputAudioConfig audioEncoding. - * @member {google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding} audioEncoding - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig - * @instance - */ - OutputAudioConfig.prototype.audioEncoding = 0; - - /** - * OutputAudioConfig sampleRateHertz. - * @member {number} sampleRateHertz - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * ResourceName name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName * @instance */ - OutputAudioConfig.prototype.sampleRateHertz = 0; + ResourceName.prototype.name = ""; /** - * OutputAudioConfig synthesizeSpeechConfig. - * @member {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig|null|undefined} synthesizeSpeechConfig - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * ResourceName displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName * @instance */ - OutputAudioConfig.prototype.synthesizeSpeechConfig = null; + ResourceName.prototype.displayName = ""; /** - * Creates a new OutputAudioConfig instance using the specified properties. + * Creates a new ResourceName instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} OutputAudioConfig instance + * @param {google.cloud.dialogflow.cx.v3beta1.IResourceName=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ResourceName} ResourceName instance */ - OutputAudioConfig.create = function create(properties) { - return new OutputAudioConfig(properties); + ResourceName.create = function create(properties) { + return new ResourceName(properties); }; /** - * Encodes the specified OutputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.verify|verify} messages. + * Encodes the specified ResourceName message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResourceName.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig} message OutputAudioConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IResourceName} message ResourceName message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OutputAudioConfig.encode = function encode(message, writer) { + ResourceName.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.audioEncoding != null && Object.hasOwnProperty.call(message, "audioEncoding")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.audioEncoding); - if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sampleRateHertz); - if (message.synthesizeSpeechConfig != null && Object.hasOwnProperty.call(message, "synthesizeSpeechConfig")) - $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.encode(message.synthesizeSpeechConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); return writer; }; /** - * Encodes the specified OutputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.verify|verify} messages. + * Encodes the specified ResourceName message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResourceName.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig} message OutputAudioConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IResourceName} message ResourceName message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OutputAudioConfig.encodeDelimited = function encodeDelimited(message, writer) { + ResourceName.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OutputAudioConfig message from the specified reader or buffer. + * Decodes a ResourceName message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} OutputAudioConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.ResourceName} ResourceName * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OutputAudioConfig.decode = function decode(reader, length) { + ResourceName.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResourceName(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.audioEncoding = reader.int32(); + message.name = reader.string(); break; } case 2: { - message.sampleRateHertz = reader.int32(); - break; - } - case 3: { - message.synthesizeSpeechConfig = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.decode(reader, reader.uint32()); + message.displayName = reader.string(); break; } default: @@ -89742,163 +90804,111 @@ }; /** - * Decodes an OutputAudioConfig message from the specified reader or buffer, length delimited. + * Decodes a ResourceName message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} OutputAudioConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.ResourceName} ResourceName * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OutputAudioConfig.decodeDelimited = function decodeDelimited(reader) { + ResourceName.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OutputAudioConfig message. + * Verifies a ResourceName message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OutputAudioConfig.verify = function verify(message) { + ResourceName.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) - switch (message.audioEncoding) { - default: - return "audioEncoding: enum value expected"; - case 0: - case 1: - case 2: - case 4: - case 3: - case 5: - break; - } - if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) - if (!$util.isInteger(message.sampleRateHertz)) - return "sampleRateHertz: integer expected"; - if (message.synthesizeSpeechConfig != null && message.hasOwnProperty("synthesizeSpeechConfig")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify(message.synthesizeSpeechConfig); - if (error) - return "synthesizeSpeechConfig." + 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"; return null; }; /** - * Creates an OutputAudioConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceName message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} OutputAudioConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.ResourceName} ResourceName */ - OutputAudioConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig) + ResourceName.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResourceName) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig(); - switch (object.audioEncoding) { - default: - if (typeof object.audioEncoding === "number") { - message.audioEncoding = object.audioEncoding; - break; - } - break; - case "OUTPUT_AUDIO_ENCODING_UNSPECIFIED": - case 0: - message.audioEncoding = 0; - break; - case "OUTPUT_AUDIO_ENCODING_LINEAR_16": - case 1: - message.audioEncoding = 1; - break; - case "OUTPUT_AUDIO_ENCODING_MP3": - case 2: - message.audioEncoding = 2; - break; - case "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS": - case 4: - message.audioEncoding = 4; - break; - case "OUTPUT_AUDIO_ENCODING_OGG_OPUS": - case 3: - message.audioEncoding = 3; - break; - case "OUTPUT_AUDIO_ENCODING_MULAW": - case 5: - message.audioEncoding = 5; - break; - } - if (object.sampleRateHertz != null) - message.sampleRateHertz = object.sampleRateHertz | 0; - if (object.synthesizeSpeechConfig != null) { - if (typeof object.synthesizeSpeechConfig !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.synthesizeSpeechConfig: object expected"); - message.synthesizeSpeechConfig = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.fromObject(object.synthesizeSpeechConfig); - } + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResourceName(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); return message; }; /** - * Creates a plain object from an OutputAudioConfig message. Also converts values to other types if specified. + * Creates a plain object from a ResourceName message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName * @static - * @param {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} message OutputAudioConfig + * @param {google.cloud.dialogflow.cx.v3beta1.ResourceName} message ResourceName * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OutputAudioConfig.toObject = function toObject(message, options) { + ResourceName.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.audioEncoding = options.enums === String ? "OUTPUT_AUDIO_ENCODING_UNSPECIFIED" : 0; - object.sampleRateHertz = 0; - object.synthesizeSpeechConfig = null; + object.name = ""; + object.displayName = ""; } - if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) - object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding[message.audioEncoding] === undefined ? message.audioEncoding : $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding[message.audioEncoding] : message.audioEncoding; - if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) - object.sampleRateHertz = message.sampleRateHertz; - if (message.synthesizeSpeechConfig != null && message.hasOwnProperty("synthesizeSpeechConfig")) - object.synthesizeSpeechConfig = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.toObject(message.synthesizeSpeechConfig, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; return object; }; /** - * Converts this OutputAudioConfig to JSON. + * Converts this ResourceName to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName * @instance * @returns {Object.} JSON object */ - OutputAudioConfig.prototype.toJSON = function toJSON() { + ResourceName.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OutputAudioConfig + * Gets the default type url for ResourceName * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OutputAudioConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ResourceName.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResourceName"; }; - return OutputAudioConfig; + return ResourceName; })(); v3beta1.Changelogs = (function() { @@ -152827,6 +153837,247 @@ return GeneratedCodeInfo; })(); + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * 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.Struct = (function() { /** @@ -154330,247 +155581,6 @@ return Any; })(); - protobuf.Duration = (function() { - - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ - - /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration - * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set - */ - function Duration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; - - /** - * Creates a new Duration instance using the specified properties. - * @function create - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Duration message. - * @function verify - * @memberof google.protobuf.Duration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Duration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Duration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration - */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) - return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.Duration} message Duration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Duration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Duration to JSON. - * @function toJSON - * @memberof google.protobuf.Duration - * @instance - * @returns {Object.} JSON object - */ - Duration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Duration - * @function getTypeUrl - * @memberof google.protobuf.Duration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Duration"; - }; - - return Duration; - })(); - protobuf.Timestamp = (function() { /** diff --git a/packages/google-cloud-dialogflow-cx/protos/protos.json b/packages/google-cloud-dialogflow-cx/protos/protos.json index efba7ef5fc8..5d1544ce2a2 100644 --- a/packages/google-cloud-dialogflow-cx/protos/protos.json +++ b/packages/google-cloud-dialogflow-cx/protos/protos.json @@ -24,6 +24,10 @@ "nested": { "AdvancedSettings": { "fields": { + "audioExportGcsDestination": { + "type": "GcsDestination", + "id": 2 + }, "loggingSettings": { "type": "LoggingSettings", "id": 6 @@ -44,6 +48,17 @@ } } }, + "GcsDestination": { + "fields": { + "uri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, "Agents": { "options": { "(google.api.default_host)": "dialogflow.googleapis.com", @@ -317,6 +332,10 @@ "advancedSettings": { "type": "AdvancedSettings", "id": 22 + }, + "textToSpeechSettings": { + "type": "TextToSpeechSettings", + "id": 31 } } }, @@ -564,6 +583,165 @@ } } }, + "AudioEncoding": { + "values": { + "AUDIO_ENCODING_UNSPECIFIED": 0, + "AUDIO_ENCODING_LINEAR_16": 1, + "AUDIO_ENCODING_FLAC": 2, + "AUDIO_ENCODING_MULAW": 3, + "AUDIO_ENCODING_AMR": 4, + "AUDIO_ENCODING_AMR_WB": 5, + "AUDIO_ENCODING_OGG_OPUS": 6, + "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE": 7 + } + }, + "SpeechModelVariant": { + "values": { + "SPEECH_MODEL_VARIANT_UNSPECIFIED": 0, + "USE_BEST_AVAILABLE": 1, + "USE_STANDARD": 2, + "USE_ENHANCED": 3 + } + }, + "SpeechWordInfo": { + "fields": { + "word": { + "type": "string", + "id": 3 + }, + "startOffset": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "endOffset": { + "type": "google.protobuf.Duration", + "id": 2 + }, + "confidence": { + "type": "float", + "id": 4 + } + } + }, + "InputAudioConfig": { + "fields": { + "audioEncoding": { + "type": "AudioEncoding", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "sampleRateHertz": { + "type": "int32", + "id": 2 + }, + "enableWordInfo": { + "type": "bool", + "id": 13 + }, + "phraseHints": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "model": { + "type": "string", + "id": 7 + }, + "modelVariant": { + "type": "SpeechModelVariant", + "id": 10 + }, + "singleUtterance": { + "type": "bool", + "id": 8 + } + } + }, + "SsmlVoiceGender": { + "values": { + "SSML_VOICE_GENDER_UNSPECIFIED": 0, + "SSML_VOICE_GENDER_MALE": 1, + "SSML_VOICE_GENDER_FEMALE": 2, + "SSML_VOICE_GENDER_NEUTRAL": 3 + } + }, + "VoiceSelectionParams": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "ssmlGender": { + "type": "SsmlVoiceGender", + "id": 2 + } + } + }, + "SynthesizeSpeechConfig": { + "fields": { + "speakingRate": { + "type": "double", + "id": 1 + }, + "pitch": { + "type": "double", + "id": 2 + }, + "volumeGainDb": { + "type": "double", + "id": 3 + }, + "effectsProfileId": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "voice": { + "type": "VoiceSelectionParams", + "id": 4 + } + } + }, + "OutputAudioEncoding": { + "values": { + "OUTPUT_AUDIO_ENCODING_UNSPECIFIED": 0, + "OUTPUT_AUDIO_ENCODING_LINEAR_16": 1, + "OUTPUT_AUDIO_ENCODING_MP3": 2, + "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS": 4, + "OUTPUT_AUDIO_ENCODING_OGG_OPUS": 3, + "OUTPUT_AUDIO_ENCODING_MULAW": 5 + } + }, + "OutputAudioConfig": { + "fields": { + "audioEncoding": { + "type": "OutputAudioEncoding", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "sampleRateHertz": { + "type": "int32", + "id": 2 + }, + "synthesizeSpeechConfig": { + "type": "SynthesizeSpeechConfig", + "id": 3 + } + } + }, + "TextToSpeechSettings": { + "fields": { + "synthesizeSpeechConfigs": { + "keyType": "string", + "type": "SynthesizeSpeechConfig", + "id": 1 + } + } + }, "Flows": { "options": { "(google.api.default_host)": "dialogflow.googleapis.com", @@ -1914,156 +2092,6 @@ } } }, - "AudioEncoding": { - "values": { - "AUDIO_ENCODING_UNSPECIFIED": 0, - "AUDIO_ENCODING_LINEAR_16": 1, - "AUDIO_ENCODING_FLAC": 2, - "AUDIO_ENCODING_MULAW": 3, - "AUDIO_ENCODING_AMR": 4, - "AUDIO_ENCODING_AMR_WB": 5, - "AUDIO_ENCODING_OGG_OPUS": 6, - "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE": 7 - } - }, - "SpeechModelVariant": { - "values": { - "SPEECH_MODEL_VARIANT_UNSPECIFIED": 0, - "USE_BEST_AVAILABLE": 1, - "USE_STANDARD": 2, - "USE_ENHANCED": 3 - } - }, - "SpeechWordInfo": { - "fields": { - "word": { - "type": "string", - "id": 3 - }, - "startOffset": { - "type": "google.protobuf.Duration", - "id": 1 - }, - "endOffset": { - "type": "google.protobuf.Duration", - "id": 2 - }, - "confidence": { - "type": "float", - "id": 4 - } - } - }, - "InputAudioConfig": { - "fields": { - "audioEncoding": { - "type": "AudioEncoding", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "sampleRateHertz": { - "type": "int32", - "id": 2 - }, - "enableWordInfo": { - "type": "bool", - "id": 13 - }, - "phraseHints": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "model": { - "type": "string", - "id": 7 - }, - "modelVariant": { - "type": "SpeechModelVariant", - "id": 10 - }, - "singleUtterance": { - "type": "bool", - "id": 8 - } - } - }, - "SsmlVoiceGender": { - "values": { - "SSML_VOICE_GENDER_UNSPECIFIED": 0, - "SSML_VOICE_GENDER_MALE": 1, - "SSML_VOICE_GENDER_FEMALE": 2, - "SSML_VOICE_GENDER_NEUTRAL": 3 - } - }, - "VoiceSelectionParams": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "ssmlGender": { - "type": "SsmlVoiceGender", - "id": 2 - } - } - }, - "SynthesizeSpeechConfig": { - "fields": { - "speakingRate": { - "type": "double", - "id": 1 - }, - "pitch": { - "type": "double", - "id": 2 - }, - "volumeGainDb": { - "type": "double", - "id": 3 - }, - "effectsProfileId": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "voice": { - "type": "VoiceSelectionParams", - "id": 4 - } - } - }, - "OutputAudioEncoding": { - "values": { - "OUTPUT_AUDIO_ENCODING_UNSPECIFIED": 0, - "OUTPUT_AUDIO_ENCODING_LINEAR_16": 1, - "OUTPUT_AUDIO_ENCODING_MP3": 2, - "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS": 4, - "OUTPUT_AUDIO_ENCODING_OGG_OPUS": 3, - "OUTPUT_AUDIO_ENCODING_MULAW": 5 - } - }, - "OutputAudioConfig": { - "fields": { - "audioEncoding": { - "type": "OutputAudioEncoding", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "sampleRateHertz": { - "type": "int32", - "id": 2 - }, - "synthesizeSpeechConfig": { - "type": "SynthesizeSpeechConfig", - "id": 3 - } - } - }, "Changelogs": { "options": { "(google.api.default_host)": "dialogflow.googleapis.com", @@ -2879,10 +2907,7 @@ "versionConfigs": { "rule": "repeated", "type": "VersionConfig", - "id": 6, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "id": 6 }, "updateTime": { "type": "google.protobuf.Timestamp", @@ -7577,6 +7602,10 @@ "nested": { "AdvancedSettings": { "fields": { + "audioExportGcsDestination": { + "type": "GcsDestination", + "id": 2 + }, "loggingSettings": { "type": "LoggingSettings", "id": 6 @@ -7597,6 +7626,17 @@ } } }, + "GcsDestination": { + "fields": { + "uri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, "Agents": { "options": { "(google.api.default_host)": "dialogflow.googleapis.com", @@ -7870,6 +7910,10 @@ "advancedSettings": { "type": "AdvancedSettings", "id": 22 + }, + "textToSpeechSettings": { + "type": "TextToSpeechSettings", + "id": 31 } } }, @@ -8068,52 +8112,211 @@ } } }, - "ValidateAgentRequest": { + "ValidateAgentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Agent" + } + }, + "languageCode": { + "type": "string", + "id": 2 + } + } + }, + "GetAgentValidationResultRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/AgentValidationResult" + } + }, + "languageCode": { + "type": "string", + "id": 2 + } + } + }, + "AgentValidationResult": { + "options": { + "(google.api.resource).type": "dialogflow.googleapis.com/AgentValidationResult", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/agents/{agent}/validationResult" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "flowValidationResults": { + "rule": "repeated", + "type": "FlowValidationResult", + "id": 2 + } + } + }, + "AudioEncoding": { + "values": { + "AUDIO_ENCODING_UNSPECIFIED": 0, + "AUDIO_ENCODING_LINEAR_16": 1, + "AUDIO_ENCODING_FLAC": 2, + "AUDIO_ENCODING_MULAW": 3, + "AUDIO_ENCODING_AMR": 4, + "AUDIO_ENCODING_AMR_WB": 5, + "AUDIO_ENCODING_OGG_OPUS": 6, + "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE": 7 + } + }, + "SpeechModelVariant": { + "values": { + "SPEECH_MODEL_VARIANT_UNSPECIFIED": 0, + "USE_BEST_AVAILABLE": 1, + "USE_STANDARD": 2, + "USE_ENHANCED": 3 + } + }, + "SpeechWordInfo": { + "fields": { + "word": { + "type": "string", + "id": 3 + }, + "startOffset": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "endOffset": { + "type": "google.protobuf.Duration", + "id": 2 + }, + "confidence": { + "type": "float", + "id": 4 + } + } + }, + "InputAudioConfig": { + "fields": { + "audioEncoding": { + "type": "AudioEncoding", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "sampleRateHertz": { + "type": "int32", + "id": 2 + }, + "enableWordInfo": { + "type": "bool", + "id": 13 + }, + "phraseHints": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "model": { + "type": "string", + "id": 7 + }, + "modelVariant": { + "type": "SpeechModelVariant", + "id": 10 + }, + "singleUtterance": { + "type": "bool", + "id": 8 + } + } + }, + "SsmlVoiceGender": { + "values": { + "SSML_VOICE_GENDER_UNSPECIFIED": 0, + "SSML_VOICE_GENDER_MALE": 1, + "SSML_VOICE_GENDER_FEMALE": 2, + "SSML_VOICE_GENDER_NEUTRAL": 3 + } + }, + "VoiceSelectionParams": { "fields": { "name": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Agent" - } + "id": 1 }, - "languageCode": { - "type": "string", + "ssmlGender": { + "type": "SsmlVoiceGender", "id": 2 } } }, - "GetAgentValidationResultRequest": { + "SynthesizeSpeechConfig": { "fields": { - "name": { + "speakingRate": { + "type": "double", + "id": 1 + }, + "pitch": { + "type": "double", + "id": 2 + }, + "volumeGainDb": { + "type": "double", + "id": 3 + }, + "effectsProfileId": { + "rule": "repeated", "type": "string", + "id": 5 + }, + "voice": { + "type": "VoiceSelectionParams", + "id": 4 + } + } + }, + "OutputAudioEncoding": { + "values": { + "OUTPUT_AUDIO_ENCODING_UNSPECIFIED": 0, + "OUTPUT_AUDIO_ENCODING_LINEAR_16": 1, + "OUTPUT_AUDIO_ENCODING_MP3": 2, + "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS": 4, + "OUTPUT_AUDIO_ENCODING_OGG_OPUS": 3, + "OUTPUT_AUDIO_ENCODING_MULAW": 5 + } + }, + "OutputAudioConfig": { + "fields": { + "audioEncoding": { + "type": "OutputAudioEncoding", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/AgentValidationResult" + "(google.api.field_behavior)": "REQUIRED" } }, - "languageCode": { - "type": "string", + "sampleRateHertz": { + "type": "int32", "id": 2 + }, + "synthesizeSpeechConfig": { + "type": "SynthesizeSpeechConfig", + "id": 3 } } }, - "AgentValidationResult": { - "options": { - "(google.api.resource).type": "dialogflow.googleapis.com/AgentValidationResult", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/agents/{agent}/validationResult" - }, + "TextToSpeechSettings": { "fields": { - "name": { - "type": "string", + "synthesizeSpeechConfigs": { + "keyType": "string", + "type": "SynthesizeSpeechConfig", "id": 1 - }, - "flowValidationResults": { - "rule": "repeated", - "type": "FlowValidationResult", - "id": 2 } } }, @@ -9467,156 +9670,6 @@ } } }, - "AudioEncoding": { - "values": { - "AUDIO_ENCODING_UNSPECIFIED": 0, - "AUDIO_ENCODING_LINEAR_16": 1, - "AUDIO_ENCODING_FLAC": 2, - "AUDIO_ENCODING_MULAW": 3, - "AUDIO_ENCODING_AMR": 4, - "AUDIO_ENCODING_AMR_WB": 5, - "AUDIO_ENCODING_OGG_OPUS": 6, - "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE": 7 - } - }, - "SpeechModelVariant": { - "values": { - "SPEECH_MODEL_VARIANT_UNSPECIFIED": 0, - "USE_BEST_AVAILABLE": 1, - "USE_STANDARD": 2, - "USE_ENHANCED": 3 - } - }, - "SpeechWordInfo": { - "fields": { - "word": { - "type": "string", - "id": 3 - }, - "startOffset": { - "type": "google.protobuf.Duration", - "id": 1 - }, - "endOffset": { - "type": "google.protobuf.Duration", - "id": 2 - }, - "confidence": { - "type": "float", - "id": 4 - } - } - }, - "InputAudioConfig": { - "fields": { - "audioEncoding": { - "type": "AudioEncoding", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "sampleRateHertz": { - "type": "int32", - "id": 2 - }, - "enableWordInfo": { - "type": "bool", - "id": 13 - }, - "phraseHints": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "model": { - "type": "string", - "id": 7 - }, - "modelVariant": { - "type": "SpeechModelVariant", - "id": 10 - }, - "singleUtterance": { - "type": "bool", - "id": 8 - } - } - }, - "SsmlVoiceGender": { - "values": { - "SSML_VOICE_GENDER_UNSPECIFIED": 0, - "SSML_VOICE_GENDER_MALE": 1, - "SSML_VOICE_GENDER_FEMALE": 2, - "SSML_VOICE_GENDER_NEUTRAL": 3 - } - }, - "VoiceSelectionParams": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "ssmlGender": { - "type": "SsmlVoiceGender", - "id": 2 - } - } - }, - "SynthesizeSpeechConfig": { - "fields": { - "speakingRate": { - "type": "double", - "id": 1 - }, - "pitch": { - "type": "double", - "id": 2 - }, - "volumeGainDb": { - "type": "double", - "id": 3 - }, - "effectsProfileId": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "voice": { - "type": "VoiceSelectionParams", - "id": 4 - } - } - }, - "OutputAudioEncoding": { - "values": { - "OUTPUT_AUDIO_ENCODING_UNSPECIFIED": 0, - "OUTPUT_AUDIO_ENCODING_LINEAR_16": 1, - "OUTPUT_AUDIO_ENCODING_MP3": 2, - "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS": 4, - "OUTPUT_AUDIO_ENCODING_OGG_OPUS": 3, - "OUTPUT_AUDIO_ENCODING_MULAW": 5 - } - }, - "OutputAudioConfig": { - "fields": { - "audioEncoding": { - "type": "OutputAudioEncoding", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "sampleRateHertz": { - "type": "int32", - "id": 2 - }, - "synthesizeSpeechConfig": { - "type": "SynthesizeSpeechConfig", - "id": 3 - } - } - }, "Changelogs": { "options": { "(google.api.default_host)": "dialogflow.googleapis.com", @@ -10432,10 +10485,7 @@ "versionConfigs": { "rule": "repeated", "type": "VersionConfig", - "id": 6, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "id": 6 }, "updateTime": { "type": "google.protobuf.Timestamp", @@ -16261,6 +16311,18 @@ } } }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, "Struct": { "fields": { "fields": { @@ -16348,18 +16410,6 @@ } } }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, "Timestamp": { "fields": { "seconds": { diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json b/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json index 0ec49796db6..2ffdb69fa46 100644 --- a/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cx", - "version": "3.2.0", + "version": "3.2.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json index b76b7bda1a3..958f848c7c3 100644 --- a/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cx", - "version": "3.2.0", + "version": "3.2.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dialogflow-cx/src/v3/agents_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/agents_proto_list.json index a5646b3747f..2302ab0993c 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/agents_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/agents_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3/changelogs_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/changelogs_proto_list.json index a5646b3747f..2302ab0993c 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/changelogs_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/changelogs_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3/deployments_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/deployments_proto_list.json index a5646b3747f..2302ab0993c 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/deployments_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/deployments_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3/entity_types_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/entity_types_proto_list.json index a5646b3747f..2302ab0993c 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/entity_types_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/entity_types_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3/environments_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/environments_proto_list.json index a5646b3747f..2302ab0993c 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/environments_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/environments_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3/experiments_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/experiments_proto_list.json index a5646b3747f..2302ab0993c 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/experiments_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/experiments_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3/flows_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/flows_proto_list.json index a5646b3747f..2302ab0993c 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/flows_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/flows_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3/intents_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/intents_proto_list.json index a5646b3747f..2302ab0993c 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/intents_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/intents_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3/pages_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/pages_proto_list.json index a5646b3747f..2302ab0993c 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/pages_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/pages_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3/security_settings_service_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/security_settings_service_proto_list.json index a5646b3747f..2302ab0993c 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/security_settings_service_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/security_settings_service_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3/session_entity_types_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/session_entity_types_proto_list.json index a5646b3747f..2302ab0993c 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/session_entity_types_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/session_entity_types_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3/sessions_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/sessions_proto_list.json index a5646b3747f..2302ab0993c 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/sessions_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/sessions_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3/test_cases_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/test_cases_proto_list.json index a5646b3747f..2302ab0993c 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/test_cases_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/test_cases_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3/transition_route_groups_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/transition_route_groups_proto_list.json index a5646b3747f..2302ab0993c 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/transition_route_groups_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/transition_route_groups_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3/versions_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/versions_proto_list.json index a5646b3747f..2302ab0993c 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/versions_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/versions_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3/webhooks_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/webhooks_proto_list.json index a5646b3747f..2302ab0993c 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/webhooks_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/webhooks_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/agents_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/agents_proto_list.json index 941c0603443..04157986b2a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/agents_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/agents_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/page.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/changelogs_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/changelogs_proto_list.json index 941c0603443..04157986b2a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/changelogs_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/changelogs_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/page.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/deployments_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/deployments_proto_list.json index 941c0603443..04157986b2a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/deployments_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/deployments_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/page.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/entity_types_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/entity_types_proto_list.json index 941c0603443..04157986b2a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/entity_types_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/entity_types_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/page.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/environments_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/environments_proto_list.json index 941c0603443..04157986b2a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/environments_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/environments_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/page.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/experiments_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/experiments_proto_list.json index 941c0603443..04157986b2a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/experiments_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/experiments_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/page.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/flows_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/flows_proto_list.json index 941c0603443..04157986b2a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/flows_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/flows_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/page.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/intents_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/intents_proto_list.json index 941c0603443..04157986b2a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/intents_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/intents_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/page.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/pages_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/pages_proto_list.json index 941c0603443..04157986b2a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/pages_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/pages_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/page.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/security_settings_service_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/security_settings_service_proto_list.json index 941c0603443..04157986b2a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/security_settings_service_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/security_settings_service_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/page.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/session_entity_types_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/session_entity_types_proto_list.json index 941c0603443..04157986b2a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/session_entity_types_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/session_entity_types_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/page.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/sessions_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/sessions_proto_list.json index 941c0603443..04157986b2a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/sessions_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/sessions_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/page.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/test_cases_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/test_cases_proto_list.json index 941c0603443..04157986b2a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/test_cases_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/test_cases_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/page.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/transition_route_groups_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/transition_route_groups_proto_list.json index 941c0603443..04157986b2a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/transition_route_groups_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/transition_route_groups_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/page.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/versions_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/versions_proto_list.json index 941c0603443..04157986b2a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/versions_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/versions_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/page.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/webhooks_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/webhooks_proto_list.json index 941c0603443..04157986b2a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/webhooks_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/webhooks_proto_list.json @@ -9,6 +9,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/page.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto", From 1cf6d18d0d56afcc6d4f4425107aaf8d27c45709 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 23 Feb 2023 19:50:42 +0000 Subject: [PATCH 44/80] feat: expose v2 RepositoryManager for cloudbuild (#4018) See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../google-devtools-cloudbuild/.gitignore | 12 +- packages/google-devtools-cloudbuild/README.md | 13 + .../devtools/cloudbuild/v1/cloudbuild.proto | 1 + .../devtools/cloudbuild/v2/cloudbuild.proto | 112 + .../devtools/cloudbuild/v2/repositories.proto | 676 ++ .../protos/protos.d.ts | 3410 +++++++ .../protos/protos.js | 8026 +++++++++++++++++ .../protos/protos.json | 1000 ++ .../samples/README.md | 234 + ...itory_manager.batch_create_repositories.js | 70 + .../repository_manager.create_connection.js | 76 + .../repository_manager.create_repository.js | 77 + .../repository_manager.delete_connection.js | 73 + .../repository_manager.delete_repository.js | 73 + ...ory_manager.fetch_linkable_repositories.js | 72 + .../v2/repository_manager.fetch_read_token.js | 62 + ...pository_manager.fetch_read_write_token.js | 62 + .../v2/repository_manager.get_connection.js | 62 + .../v2/repository_manager.get_repository.js | 62 + .../v2/repository_manager.list_connections.js | 72 + .../repository_manager.list_repositories.js | 79 + .../repository_manager.update_connection.js | 80 + ...etadata.google.devtools.cloudbuild.v2.json | 611 ++ .../google-devtools-cloudbuild/src/index.ts | 5 +- .../src/v1/cloud_build_client.ts | 34 +- .../src/v2/gapic_metadata.json | 165 + .../src/v2/index.ts | 19 + .../src/v2/repository_manager_client.ts | 3068 +++++++ .../v2/repository_manager_client_config.json | 102 + .../src/v2/repository_manager_proto_list.json | 4 + .../test/gapic_repository_manager_v2.ts | 4158 +++++++++ 31 files changed, 22545 insertions(+), 25 deletions(-) create mode 100644 packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v2/cloudbuild.proto create mode 100644 packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v2/repositories.proto create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.batch_create_repositories.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.create_connection.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.create_repository.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.delete_connection.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.delete_repository.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.fetch_linkable_repositories.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.fetch_read_token.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.fetch_read_write_token.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.get_connection.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.get_repository.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.list_connections.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.list_repositories.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.update_connection.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata.google.devtools.cloudbuild.v2.json create mode 100644 packages/google-devtools-cloudbuild/src/v2/gapic_metadata.json create mode 100644 packages/google-devtools-cloudbuild/src/v2/index.ts create mode 100644 packages/google-devtools-cloudbuild/src/v2/repository_manager_client.ts create mode 100644 packages/google-devtools-cloudbuild/src/v2/repository_manager_client_config.json create mode 100644 packages/google-devtools-cloudbuild/src/v2/repository_manager_proto_list.json create mode 100644 packages/google-devtools-cloudbuild/test/gapic_repository_manager_v2.ts diff --git a/packages/google-devtools-cloudbuild/.gitignore b/packages/google-devtools-cloudbuild/.gitignore index 5d32b23782f..d4f03a0df2e 100644 --- a/packages/google-devtools-cloudbuild/.gitignore +++ b/packages/google-devtools-cloudbuild/.gitignore @@ -1,11 +1,11 @@ **/*.log **/node_modules -.coverage -coverage -.nyc_output -docs/ -out/ -build/ +/.coverage +/coverage +/.nyc_output +/docs/ +/out/ +/build/ system-test/secrets.js system-test/*key.json *.lock diff --git a/packages/google-devtools-cloudbuild/README.md b/packages/google-devtools-cloudbuild/README.md index 4c1b45a5874..459d86984d8 100644 --- a/packages/google-devtools-cloudbuild/README.md +++ b/packages/google-devtools-cloudbuild/README.md @@ -130,6 +130,19 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Cloud_build.run_build_trigger | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.run_build_trigger.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.run_build_trigger.js,samples/README.md) | | Cloud_build.update_build_trigger | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_build_trigger.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_build_trigger.js,samples/README.md) | | Cloud_build.update_worker_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_worker_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_worker_pool.js,samples/README.md) | +| Repository_manager.batch_create_repositories | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.batch_create_repositories.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.batch_create_repositories.js,samples/README.md) | +| Repository_manager.create_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.create_connection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.create_connection.js,samples/README.md) | +| Repository_manager.create_repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.create_repository.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.create_repository.js,samples/README.md) | +| Repository_manager.delete_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.delete_connection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.delete_connection.js,samples/README.md) | +| Repository_manager.delete_repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.delete_repository.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.delete_repository.js,samples/README.md) | +| Repository_manager.fetch_linkable_repositories | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.fetch_linkable_repositories.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.fetch_linkable_repositories.js,samples/README.md) | +| Repository_manager.fetch_read_token | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.fetch_read_token.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.fetch_read_token.js,samples/README.md) | +| Repository_manager.fetch_read_write_token | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.fetch_read_write_token.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.fetch_read_write_token.js,samples/README.md) | +| Repository_manager.get_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.get_connection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.get_connection.js,samples/README.md) | +| Repository_manager.get_repository | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.get_repository.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.get_repository.js,samples/README.md) | +| Repository_manager.list_connections | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.list_connections.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.list_connections.js,samples/README.md) | +| Repository_manager.list_repositories | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.list_repositories.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.list_repositories.js,samples/README.md) | +| Repository_manager.update_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.update_connection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.update_connection.js,samples/README.md) | | Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/quickstart.js,samples/README.md) | | Quickstart.test | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/test/quickstart.test.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/test/quickstart.test.js,samples/README.md) | diff --git a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto index c007e65b441..fdf0bdf7fb2 100644 --- a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto +++ b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto @@ -33,6 +33,7 @@ option java_multiple_files = true; option java_package = "com.google.cloudbuild.v1"; option objc_class_prefix = "GCB"; option ruby_package = "Google::Cloud::Build::V1"; +option php_namespace = "Google\\Cloud\\Build\\V1"; option (google.api.resource_definition) = { type: "compute.googleapis.com/Network" pattern: "projects/{project}/global/networks/{network}" diff --git a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v2/cloudbuild.proto b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v2/cloudbuild.proto new file mode 100644 index 00000000000..a6ea258771d --- /dev/null +++ b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v2/cloudbuild.proto @@ -0,0 +1,112 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.devtools.cloudbuild.v2; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.CloudBuild.V2"; +option go_package = "google.golang.org/genproto/googleapis/devtools/cloudbuild/v2;cloudbuild"; +option java_multiple_files = true; +option java_outer_classname = "CloudBuildProto"; +option java_package = "google.devtools.cloudbuild.v2"; +option objc_class_prefix = "GCB"; +option php_namespace = "Google\\Cloud\\Build\\V2"; +option ruby_package = "Google::Cloud::Build::V2"; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/Network" + pattern: "projects/{project}/global/networks/{network}" +}; +option (google.api.resource_definition) = { + type: "iam.googleapis.com/ServiceAccount" + pattern: "projects/{project}/serviceAccounts/{service_account}" +}; +option (google.api.resource_definition) = { + type: "secretmanager.googleapis.com/Secret" + pattern: "projects/{project}/secrets/{secret}" +}; +option (google.api.resource_definition) = { + type: "secretmanager.googleapis.com/SecretVersion" + pattern: "projects/{project}/secrets/{secret}/versions/{version}" +}; +option (google.api.resource_definition) = { + type: "cloudbuild.googleapis.com/githubEnterpriseConfig" + pattern: "projects/{project}/locations/{location}/githubEnterpriseConfigs/{config}" +}; + +// 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 successfully been cancelled + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Represents the custom metadata of the RunWorkflow long-running operation. +message RunWorkflowCustomOperationMetadata { + // 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. Name of the verb executed by the operation. + string verb = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. + bool requested_cancellation = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. ID of the pipeline run created by RunWorkflow. + string pipeline_run_id = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v2/repositories.proto b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v2/repositories.proto new file mode 100644 index 00000000000..5cfa6d94167 --- /dev/null +++ b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v2/repositories.proto @@ -0,0 +1,676 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.devtools.cloudbuild.v2; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/httpbody.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.CloudBuild.V2"; +option go_package = "google.golang.org/genproto/googleapis/devtools/cloudbuild/v2;cloudbuild"; +option java_multiple_files = true; +option java_outer_classname = "RepositoryManagerProto"; +option java_package = "google.devtools.cloudbuild.v2"; +option objc_class_prefix = "GCB"; +option php_namespace = "Google\\Cloud\\Build\\V2"; +option ruby_package = "Google::Cloud::Build::V2"; +option (google.api.resource_definition) = { + type: "servicedirectory.googleapis.com/Service" + pattern: "projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}" +}; + +// Manages connections to source code repostiories. +service RepositoryManager { + option (google.api.default_host) = "cloudbuild.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a Connection. + rpc CreateConnection(CreateConnectionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/locations/*}/connections" + body: "connection" + }; + option (google.api.method_signature) = "parent,connection,connection_id"; + option (google.longrunning.operation_info) = { + response_type: "Connection" + metadata_type: "google.devtools.cloudbuild.v2.OperationMetadata" + }; + } + + // Gets details of a single connection. + rpc GetConnection(GetConnectionRequest) returns (Connection) { + option (google.api.http) = { + get: "/v2/{name=projects/*/locations/*/connections/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Connections in a given project and location. + rpc ListConnections(ListConnectionsRequest) + returns (ListConnectionsResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/locations/*}/connections" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates a single connection. + rpc UpdateConnection(UpdateConnectionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v2/{connection.name=projects/*/locations/*/connections/*}" + body: "connection" + }; + option (google.api.method_signature) = "connection,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Connection" + metadata_type: "google.devtools.cloudbuild.v2.OperationMetadata" + }; + } + + // Deletes a single connection. + rpc DeleteConnection(DeleteConnectionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/locations/*/connections/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.devtools.cloudbuild.v2.OperationMetadata" + }; + } + + // Creates a Repository. + rpc CreateRepository(CreateRepositoryRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/locations/*/connections/*}/repositories" + body: "repository" + }; + option (google.api.method_signature) = "parent,repository,repository_id"; + option (google.longrunning.operation_info) = { + response_type: "Repository" + metadata_type: "google.devtools.cloudbuild.v2.OperationMetadata" + }; + } + + // Creates multiple repositories inside a connection. + rpc BatchCreateRepositories(BatchCreateRepositoriesRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/locations/*/connections/*}/repositories:batchCreate" + body: "*" + }; + option (google.api.method_signature) = "parent,requests"; + option (google.longrunning.operation_info) = { + response_type: "BatchCreateRepositoriesResponse" + metadata_type: "google.devtools.cloudbuild.v2.OperationMetadata" + }; + } + + // Gets details of a single repository. + rpc GetRepository(GetRepositoryRequest) returns (Repository) { + option (google.api.http) = { + get: "/v2/{name=projects/*/locations/*/connections/*/repositories/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Repositories in a given connection. + rpc ListRepositories(ListRepositoriesRequest) + returns (ListRepositoriesResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/locations/*/connections/*}/repositories" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a single repository. + rpc DeleteRepository(DeleteRepositoryRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/locations/*/connections/*/repositories/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.devtools.cloudbuild.v2.OperationMetadata" + }; + } + + // Fetches read/write token of a given repository. + rpc FetchReadWriteToken(FetchReadWriteTokenRequest) + returns (FetchReadWriteTokenResponse) { + option (google.api.http) = { + post: "/v2/{repository=projects/*/locations/*/connections/*/repositories/*}:accessReadWriteToken" + body: "*" + }; + option (google.api.method_signature) = "repository"; + } + + // Fetches read token of a given repository. + rpc FetchReadToken(FetchReadTokenRequest) returns (FetchReadTokenResponse) { + option (google.api.http) = { + post: "/v2/{repository=projects/*/locations/*/connections/*/repositories/*}:accessReadToken" + body: "*" + }; + option (google.api.method_signature) = "repository"; + } + + // FetchLinkableRepositories get repositories from SCM that are + // accessible and could be added to the connection. + rpc FetchLinkableRepositories(FetchLinkableRepositoriesRequest) + returns (FetchLinkableRepositoriesResponse) { + option (google.api.http) = { + get: "/v2/{connection=projects/*/locations/*/connections/*}:fetchLinkableRepositories" + }; + } +} + +// A connection to a SCM like GitHub, GitHub Enterprise, Bitbucket Server or +// GitLab. +message Connection { + option (google.api.resource) = { + type: "cloudbuild.googleapis.com/Connection" + pattern: "projects/{project}/locations/{location}/connections/{connection}" + plural: "connections" + singular: "connection" + style: DECLARATIVE_FRIENDLY + }; + + // Immutable. The resource name of the connection, in the format + // `projects/{project}/locations/{location}/connections/{connection_id}`. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. Server assigned timestamp for when the connection was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server assigned timestamp for when the connection was updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Configuration for the connection depending on the type of provider. + oneof connection_config { + // Configuration for connections to github.com. + GitHubConfig github_config = 5; + + // Configuration for connections to an instance of GitHub Enterprise. + GitHubEnterpriseConfig github_enterprise_config = 6; + } + + // Output only. Installation state of the Connection. + InstallationState installation_state = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // If disabled is set to true, functionality is disabled for this connection. + // Repository based API methods and webhooks processing for repositories in + // this connection will be disabled. + bool disabled = 13; + + // Output only. Set to true when the connection is being set up or updated in + // the background. + bool reconciling = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Allows clients to store small amounts of arbitrary data. + map annotations = 15; + + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 16; +} + +// Describes stage and necessary actions to be taken by the +// user to complete the installation. Used for GitHub and GitHub Enterprise +// based connections. +message InstallationState { + // Stage of the installation process. + enum Stage { + // No stage specified. + STAGE_UNSPECIFIED = 0; + + // Only for GitHub Enterprise. An App creation has been requested. + // The user needs to confirm the creation in their GitHub enterprise host. + PENDING_CREATE_APP = 1; + + // User needs to authorize the GitHub (or Enterprise) App via OAuth. + PENDING_USER_OAUTH = 2; + + // User needs to follow the link to install the GitHub (or Enterprise) App. + PENDING_INSTALL_APP = 3; + + // Installation process has been completed. + COMPLETE = 10; + } + + // Output only. Current step of the installation process. + Stage stage = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Message of what the user should do next to continue the + // installation. Empty string if the installation is already complete. + string message = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Link to follow for next action. Empty string if the + // installation is already complete. + string action_uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for FetchLinkableRepositories. +message FetchLinkableRepositoriesRequest { + // Required. The name of the Connection. + // Format: `projects/*/locations/*/connections/*`. + string connection = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/Connection" + } + ]; + + // Number of results to return in the list. Default to 20. + int32 page_size = 2; + + // Page start. + string page_token = 3; +} + +// Response message for FetchLinkableRepositories. +message FetchLinkableRepositoriesResponse { + // repositories ready to be created. + repeated Repository repositories = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; +} + +// Configuration for connections to github.com. +message GitHubConfig { + // OAuth credential of the account that authorized the Cloud Build GitHub App. + // It is recommended to use a robot account instead of a human user account. + // The OAuth token must be tied to the Cloud Build GitHub App. + OAuthCredential authorizer_credential = 1; + + // GitHub App installation id. + int64 app_installation_id = 2; +} + +// Configuration for connections to an instance of GitHub Enterprise. +message GitHubEnterpriseConfig { + // Required. The URI of the GitHub Enterprise host this connection is for. + string host_uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. API Key used for authentication of webhook events. + string api_key = 12 [(google.api.field_behavior) = REQUIRED]; + + // Id of the GitHub App created from the manifest. + int64 app_id = 2; + + // The URL-friendly name of the GitHub App. + string app_slug = 13; + + // SecretManager resource containing the private key of the GitHub App, + // formatted as `projects/*/secrets/*/versions/*`. + string private_key_secret_version = 4 [(google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + }]; + + // SecretManager resource containing the webhook secret of the GitHub App, + // formatted as `projects/*/secrets/*/versions/*`. + string webhook_secret_secret_version = 5 [(google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + }]; + + // ID of the installation of the GitHub App. + int64 app_installation_id = 9; + + // Configuration for using Service Directory to privately connect to a GitHub + // Enterprise server. This should only be set if the GitHub Enterprise server + // is hosted on-premises and not reachable by public internet. If this field + // is left empty, calls to the GitHub Enterprise server will be made over the + // public internet. + ServiceDirectoryConfig service_directory_config = 10; + + // SSL certificate to use for requests to GitHub Enterprise. + string ssl_ca = 11; + + // Output only. GitHub Enterprise version installed at the host_uri. + string server_version = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// ServiceDirectoryConfig represents Service Directory configuration for a +// connection. +message ServiceDirectoryConfig { + // Required. The Service Directory service name. + // Format: + // projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}. + string service = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "servicedirectory.googleapis.com/Service" + } + ]; +} + +// A repository associated to a parent connection. +message Repository { + option (google.api.resource) = { + type: "cloudbuild.googleapis.com/Repository" + pattern: "projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}" + plural: "repositories" + singular: "repository" + style: DECLARATIVE_FRIENDLY + }; + + // Immutable. Resource name of the repository, in the format + // `projects/*/locations/*/connections/*/repositories/*`. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Required. Git Clone HTTPS URI. + string remote_uri = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Server assigned timestamp for when the connection was created. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server assigned timestamp for when the connection was updated. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Allows clients to store small amounts of arbitrary data. + map annotations = 6; + + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 7; +} + +// Represents an OAuth token of the account that authorized the Connection, +// and associated metadata. +message OAuthCredential { + // A SecretManager resource containing the OAuth token that authorizes + // the Cloud Build connection. Format: `projects/*/secrets/*/versions/*`. + string oauth_token_secret_version = 1 [(google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + }]; + + // Output only. The username associated to this token. + string username = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Message for creating a Connection +message CreateConnectionRequest { + // Required. Project and location where the connection will be created. + // Format: `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudbuild.googleapis.com/Connection" + } + ]; + + // Required. The Connection to create. + Connection connection = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the Connection, which will become the final + // component of the Connection's resource name. Names must be unique + // per-project per-location. Allows alphanumeric characters and any of + // -._~%!$&'()*+,;=@. + string connection_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Message for getting the details of a Connection. +message GetConnectionRequest { + // Required. The name of the Connection to retrieve. + // Format: `projects/*/locations/*/connections/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/Connection" + } + ]; +} + +// Message for requesting list of Connections. +message ListConnectionsRequest { + // Required. The parent, which owns this collection of Connections. + // Format: `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudbuild.googleapis.com/Connection" + } + ]; + + // Number of results to return in the list. + int32 page_size = 2; + + // Page start. + string page_token = 3; +} + +// Message for response to listing Connections. +message ListConnectionsResponse { + // The list of Connections. + repeated Connection connections = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; +} + +// Message for updating a Connection. +message UpdateConnectionRequest { + // Required. The Connection to update. + Connection connection = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated. + google.protobuf.FieldMask update_mask = 2; + + // If set to true, and the connection is not found a new connection + // will be created. In this situation `update_mask` is ignored. + // The creation will succeed only if the input connection has all the + // necessary information (e.g a github_config with both user_oauth_token and + // installation_id properties). + bool allow_missing = 3; + + // The current etag of the connection. + // If an etag is provided and does not match the current etag of the + // connection, update will be blocked and an ABORTED error will be returned. + string etag = 4; +} + +// Message for deleting a Connection. +message DeleteConnectionRequest { + // Required. The name of the Connection to delete. + // Format: `projects/*/locations/*/connections/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/Connection" + } + ]; + + // The current etag of the connection. + // If an etag is provided and does not match the current etag of the + // connection, deletion will be blocked and an ABORTED error will be returned. + string etag = 2; + + // If set, validate the request, but do not actually post it. + bool validate_only = 3; +} + +// Message for creating a Repository. +message CreateRepositoryRequest { + // Required. The connection to contain the repository. If the request is part + // of a BatchCreateRepositoriesRequest, this field should be empty or match + // the parent specified there. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/Connection" + } + ]; + + // Required. The repository to create. + Repository repository = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the repository, which will become the final + // component of the repository's resource name. This ID should be unique in + // the connection. Allows alphanumeric characters and any of + // -._~%!$&'()*+,;=@. + string repository_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Message for creating repositoritories in batch. +message BatchCreateRepositoriesRequest { + // Required. The connection to contain all the repositories being created. + // Format: projects/*/locations/*/connections/* + // The parent field in the CreateRepositoryRequest messages + // must either be empty or match this field. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/Connection" + } + ]; + + // Required. The request messages specifying the repositories to create. + repeated CreateRepositoryRequest requests = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Message for response of creating repositories in batch. +message BatchCreateRepositoriesResponse { + // Repository resources created. + repeated Repository repositories = 1; +} + +// Message for getting the details of a Repository. +message GetRepositoryRequest { + // Required. The name of the Repository to retrieve. + // Format: `projects/*/locations/*/connections/*/repositories/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/Repository" + } + ]; +} + +// Message for requesting list of Repositories. +message ListRepositoriesRequest { + // Required. The parent, which owns this collection of Repositories. + // Format: `projects/*/locations/*/connections/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudbuild.googleapis.com/Repository" + } + ]; + + // Number of results to return in the list. + int32 page_size = 2; + + // Page start. + string page_token = 3; + + // A filter expression that filters resources listed in the response. + // Expressions must follow API improvement proposal + // [AIP-160](https://google.aip.dev/160). e.g. + // `remote_uri:"https://github.com*"`. + string filter = 4; +} + +// Message for response to listing Repositories. +message ListRepositoriesResponse { + // The list of Repositories. + repeated Repository repositories = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; +} + +// Message for deleting a Repository. +message DeleteRepositoryRequest { + // Required. The name of the Repository to delete. + // Format: `projects/*/locations/*/connections/*/repositories/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/Repository" + } + ]; + + // The current etag of the repository. + // If an etag is provided and does not match the current etag of the + // repository, deletion will be blocked and an ABORTED error will be returned. + string etag = 2; + + // If set, validate the request, but do not actually post it. + bool validate_only = 3; +} + +// Message for fetching SCM read/write token. +message FetchReadWriteTokenRequest { + // Required. The resource name of the repository in the format + // `projects/*/locations/*/connections/*/repositories/*`. + string repository = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/Repository" + } + ]; +} + +// Message for fetching SCM read token. +message FetchReadTokenRequest { + // Required. The resource name of the repository in the format + // `projects/*/locations/*/connections/*/repositories/*`. + string repository = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/Repository" + } + ]; +} + +// Message for responding to get read token. +message FetchReadTokenResponse { + // The token content. + string token = 1; + + // Expiration timestamp. Can be empty if unknown or non-expiring. + google.protobuf.Timestamp expiration_time = 2; +} + +// Message for responding to get read/write token. +message FetchReadWriteTokenResponse { + // The token content. + string token = 1; + + // Expiration timestamp. Can be empty if unknown or non-expiring. + google.protobuf.Timestamp expiration_time = 2; +} diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts index 89352934897..7d93210bdcf 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.d.ts +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -8338,6 +8338,3416 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } } + + /** Namespace v2. */ + namespace v2 { + + /** 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.devtools.cloudbuild.v2.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.devtools.cloudbuild.v2.IOperationMetadata): google.devtools.cloudbuild.v2.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.devtools.cloudbuild.v2.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.devtools.cloudbuild.v2.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.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.devtools.cloudbuild.v2.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.devtools.cloudbuild.v2.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.devtools.cloudbuild.v2.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.devtools.cloudbuild.v2.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.devtools.cloudbuild.v2.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunWorkflowCustomOperationMetadata. */ + interface IRunWorkflowCustomOperationMetadata { + + /** RunWorkflowCustomOperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** RunWorkflowCustomOperationMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** RunWorkflowCustomOperationMetadata verb */ + verb?: (string|null); + + /** RunWorkflowCustomOperationMetadata requestedCancellation */ + requestedCancellation?: (boolean|null); + + /** RunWorkflowCustomOperationMetadata apiVersion */ + apiVersion?: (string|null); + + /** RunWorkflowCustomOperationMetadata target */ + target?: (string|null); + + /** RunWorkflowCustomOperationMetadata pipelineRunId */ + pipelineRunId?: (string|null); + } + + /** Represents a RunWorkflowCustomOperationMetadata. */ + class RunWorkflowCustomOperationMetadata implements IRunWorkflowCustomOperationMetadata { + + /** + * Constructs a new RunWorkflowCustomOperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v2.IRunWorkflowCustomOperationMetadata); + + /** RunWorkflowCustomOperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** RunWorkflowCustomOperationMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** RunWorkflowCustomOperationMetadata verb. */ + public verb: string; + + /** RunWorkflowCustomOperationMetadata requestedCancellation. */ + public requestedCancellation: boolean; + + /** RunWorkflowCustomOperationMetadata apiVersion. */ + public apiVersion: string; + + /** RunWorkflowCustomOperationMetadata target. */ + public target: string; + + /** RunWorkflowCustomOperationMetadata pipelineRunId. */ + public pipelineRunId: string; + + /** + * Creates a new RunWorkflowCustomOperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns RunWorkflowCustomOperationMetadata instance + */ + public static create(properties?: google.devtools.cloudbuild.v2.IRunWorkflowCustomOperationMetadata): google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata; + + /** + * Encodes the specified RunWorkflowCustomOperationMetadata message. Does not implicitly {@link google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata.verify|verify} messages. + * @param message RunWorkflowCustomOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v2.IRunWorkflowCustomOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunWorkflowCustomOperationMetadata message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata.verify|verify} messages. + * @param message RunWorkflowCustomOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v2.IRunWorkflowCustomOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunWorkflowCustomOperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunWorkflowCustomOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata; + + /** + * Decodes a RunWorkflowCustomOperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunWorkflowCustomOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata; + + /** + * Verifies a RunWorkflowCustomOperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RunWorkflowCustomOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunWorkflowCustomOperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata; + + /** + * Creates a plain object from a RunWorkflowCustomOperationMetadata message. Also converts values to other types if specified. + * @param message RunWorkflowCustomOperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunWorkflowCustomOperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunWorkflowCustomOperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a RepositoryManager */ + class RepositoryManager extends $protobuf.rpc.Service { + + /** + * Constructs a new RepositoryManager 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 RepositoryManager 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): RepositoryManager; + + /** + * Calls CreateConnection. + * @param request CreateConnectionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createConnection(request: google.devtools.cloudbuild.v2.ICreateConnectionRequest, callback: google.devtools.cloudbuild.v2.RepositoryManager.CreateConnectionCallback): void; + + /** + * Calls CreateConnection. + * @param request CreateConnectionRequest message or plain object + * @returns Promise + */ + public createConnection(request: google.devtools.cloudbuild.v2.ICreateConnectionRequest): Promise; + + /** + * Calls GetConnection. + * @param request GetConnectionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Connection + */ + public getConnection(request: google.devtools.cloudbuild.v2.IGetConnectionRequest, callback: google.devtools.cloudbuild.v2.RepositoryManager.GetConnectionCallback): void; + + /** + * Calls GetConnection. + * @param request GetConnectionRequest message or plain object + * @returns Promise + */ + public getConnection(request: google.devtools.cloudbuild.v2.IGetConnectionRequest): Promise; + + /** + * Calls ListConnections. + * @param request ListConnectionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListConnectionsResponse + */ + public listConnections(request: google.devtools.cloudbuild.v2.IListConnectionsRequest, callback: google.devtools.cloudbuild.v2.RepositoryManager.ListConnectionsCallback): void; + + /** + * Calls ListConnections. + * @param request ListConnectionsRequest message or plain object + * @returns Promise + */ + public listConnections(request: google.devtools.cloudbuild.v2.IListConnectionsRequest): Promise; + + /** + * Calls UpdateConnection. + * @param request UpdateConnectionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateConnection(request: google.devtools.cloudbuild.v2.IUpdateConnectionRequest, callback: google.devtools.cloudbuild.v2.RepositoryManager.UpdateConnectionCallback): void; + + /** + * Calls UpdateConnection. + * @param request UpdateConnectionRequest message or plain object + * @returns Promise + */ + public updateConnection(request: google.devtools.cloudbuild.v2.IUpdateConnectionRequest): Promise; + + /** + * Calls DeleteConnection. + * @param request DeleteConnectionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteConnection(request: google.devtools.cloudbuild.v2.IDeleteConnectionRequest, callback: google.devtools.cloudbuild.v2.RepositoryManager.DeleteConnectionCallback): void; + + /** + * Calls DeleteConnection. + * @param request DeleteConnectionRequest message or plain object + * @returns Promise + */ + public deleteConnection(request: google.devtools.cloudbuild.v2.IDeleteConnectionRequest): Promise; + + /** + * Calls CreateRepository. + * @param request CreateRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createRepository(request: google.devtools.cloudbuild.v2.ICreateRepositoryRequest, callback: google.devtools.cloudbuild.v2.RepositoryManager.CreateRepositoryCallback): void; + + /** + * Calls CreateRepository. + * @param request CreateRepositoryRequest message or plain object + * @returns Promise + */ + public createRepository(request: google.devtools.cloudbuild.v2.ICreateRepositoryRequest): Promise; + + /** + * Calls BatchCreateRepositories. + * @param request BatchCreateRepositoriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public batchCreateRepositories(request: google.devtools.cloudbuild.v2.IBatchCreateRepositoriesRequest, callback: google.devtools.cloudbuild.v2.RepositoryManager.BatchCreateRepositoriesCallback): void; + + /** + * Calls BatchCreateRepositories. + * @param request BatchCreateRepositoriesRequest message or plain object + * @returns Promise + */ + public batchCreateRepositories(request: google.devtools.cloudbuild.v2.IBatchCreateRepositoriesRequest): Promise; + + /** + * Calls GetRepository. + * @param request GetRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Repository + */ + public getRepository(request: google.devtools.cloudbuild.v2.IGetRepositoryRequest, callback: google.devtools.cloudbuild.v2.RepositoryManager.GetRepositoryCallback): void; + + /** + * Calls GetRepository. + * @param request GetRepositoryRequest message or plain object + * @returns Promise + */ + public getRepository(request: google.devtools.cloudbuild.v2.IGetRepositoryRequest): Promise; + + /** + * Calls ListRepositories. + * @param request ListRepositoriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListRepositoriesResponse + */ + public listRepositories(request: google.devtools.cloudbuild.v2.IListRepositoriesRequest, callback: google.devtools.cloudbuild.v2.RepositoryManager.ListRepositoriesCallback): void; + + /** + * Calls ListRepositories. + * @param request ListRepositoriesRequest message or plain object + * @returns Promise + */ + public listRepositories(request: google.devtools.cloudbuild.v2.IListRepositoriesRequest): Promise; + + /** + * Calls DeleteRepository. + * @param request DeleteRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteRepository(request: google.devtools.cloudbuild.v2.IDeleteRepositoryRequest, callback: google.devtools.cloudbuild.v2.RepositoryManager.DeleteRepositoryCallback): void; + + /** + * Calls DeleteRepository. + * @param request DeleteRepositoryRequest message or plain object + * @returns Promise + */ + public deleteRepository(request: google.devtools.cloudbuild.v2.IDeleteRepositoryRequest): Promise; + + /** + * Calls FetchReadWriteToken. + * @param request FetchReadWriteTokenRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchReadWriteTokenResponse + */ + public fetchReadWriteToken(request: google.devtools.cloudbuild.v2.IFetchReadWriteTokenRequest, callback: google.devtools.cloudbuild.v2.RepositoryManager.FetchReadWriteTokenCallback): void; + + /** + * Calls FetchReadWriteToken. + * @param request FetchReadWriteTokenRequest message or plain object + * @returns Promise + */ + public fetchReadWriteToken(request: google.devtools.cloudbuild.v2.IFetchReadWriteTokenRequest): Promise; + + /** + * Calls FetchReadToken. + * @param request FetchReadTokenRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchReadTokenResponse + */ + public fetchReadToken(request: google.devtools.cloudbuild.v2.IFetchReadTokenRequest, callback: google.devtools.cloudbuild.v2.RepositoryManager.FetchReadTokenCallback): void; + + /** + * Calls FetchReadToken. + * @param request FetchReadTokenRequest message or plain object + * @returns Promise + */ + public fetchReadToken(request: google.devtools.cloudbuild.v2.IFetchReadTokenRequest): Promise; + + /** + * Calls FetchLinkableRepositories. + * @param request FetchLinkableRepositoriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchLinkableRepositoriesResponse + */ + public fetchLinkableRepositories(request: google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesRequest, callback: google.devtools.cloudbuild.v2.RepositoryManager.FetchLinkableRepositoriesCallback): void; + + /** + * Calls FetchLinkableRepositories. + * @param request FetchLinkableRepositoriesRequest message or plain object + * @returns Promise + */ + public fetchLinkableRepositories(request: google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesRequest): Promise; + } + + namespace RepositoryManager { + + /** + * Callback as used by {@link google.devtools.cloudbuild.v2.RepositoryManager|createConnection}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateConnectionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.devtools.cloudbuild.v2.RepositoryManager|getConnection}. + * @param error Error, if any + * @param [response] Connection + */ + type GetConnectionCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v2.Connection) => void; + + /** + * Callback as used by {@link google.devtools.cloudbuild.v2.RepositoryManager|listConnections}. + * @param error Error, if any + * @param [response] ListConnectionsResponse + */ + type ListConnectionsCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v2.ListConnectionsResponse) => void; + + /** + * Callback as used by {@link google.devtools.cloudbuild.v2.RepositoryManager|updateConnection}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateConnectionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.devtools.cloudbuild.v2.RepositoryManager|deleteConnection}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteConnectionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.devtools.cloudbuild.v2.RepositoryManager|createRepository}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateRepositoryCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.devtools.cloudbuild.v2.RepositoryManager|batchCreateRepositories}. + * @param error Error, if any + * @param [response] Operation + */ + type BatchCreateRepositoriesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.devtools.cloudbuild.v2.RepositoryManager|getRepository}. + * @param error Error, if any + * @param [response] Repository + */ + type GetRepositoryCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v2.Repository) => void; + + /** + * Callback as used by {@link google.devtools.cloudbuild.v2.RepositoryManager|listRepositories}. + * @param error Error, if any + * @param [response] ListRepositoriesResponse + */ + type ListRepositoriesCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v2.ListRepositoriesResponse) => void; + + /** + * Callback as used by {@link google.devtools.cloudbuild.v2.RepositoryManager|deleteRepository}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteRepositoryCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.devtools.cloudbuild.v2.RepositoryManager|fetchReadWriteToken}. + * @param error Error, if any + * @param [response] FetchReadWriteTokenResponse + */ + type FetchReadWriteTokenCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse) => void; + + /** + * Callback as used by {@link google.devtools.cloudbuild.v2.RepositoryManager|fetchReadToken}. + * @param error Error, if any + * @param [response] FetchReadTokenResponse + */ + type FetchReadTokenCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v2.FetchReadTokenResponse) => void; + + /** + * Callback as used by {@link google.devtools.cloudbuild.v2.RepositoryManager|fetchLinkableRepositories}. + * @param error Error, if any + * @param [response] FetchLinkableRepositoriesResponse + */ + type FetchLinkableRepositoriesCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse) => void; + } + + /** Properties of a Connection. */ + interface IConnection { + + /** Connection name */ + name?: (string|null); + + /** Connection createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Connection updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Connection githubConfig */ + githubConfig?: (google.devtools.cloudbuild.v2.IGitHubConfig|null); + + /** Connection githubEnterpriseConfig */ + githubEnterpriseConfig?: (google.devtools.cloudbuild.v2.IGitHubEnterpriseConfig|null); + + /** Connection installationState */ + installationState?: (google.devtools.cloudbuild.v2.IInstallationState|null); + + /** Connection disabled */ + disabled?: (boolean|null); + + /** Connection reconciling */ + reconciling?: (boolean|null); + + /** Connection annotations */ + annotations?: ({ [k: string]: string }|null); + + /** Connection etag */ + etag?: (string|null); + } + + /** Represents a Connection. */ + class Connection implements IConnection { + + /** + * Constructs a new Connection. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v2.IConnection); + + /** Connection name. */ + public name: string; + + /** Connection createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Connection updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Connection githubConfig. */ + public githubConfig?: (google.devtools.cloudbuild.v2.IGitHubConfig|null); + + /** Connection githubEnterpriseConfig. */ + public githubEnterpriseConfig?: (google.devtools.cloudbuild.v2.IGitHubEnterpriseConfig|null); + + /** Connection installationState. */ + public installationState?: (google.devtools.cloudbuild.v2.IInstallationState|null); + + /** Connection disabled. */ + public disabled: boolean; + + /** Connection reconciling. */ + public reconciling: boolean; + + /** Connection annotations. */ + public annotations: { [k: string]: string }; + + /** Connection etag. */ + public etag: string; + + /** Connection connectionConfig. */ + public connectionConfig?: ("githubConfig"|"githubEnterpriseConfig"); + + /** + * Creates a new Connection instance using the specified properties. + * @param [properties] Properties to set + * @returns Connection instance + */ + public static create(properties?: google.devtools.cloudbuild.v2.IConnection): google.devtools.cloudbuild.v2.Connection; + + /** + * Encodes the specified Connection message. Does not implicitly {@link google.devtools.cloudbuild.v2.Connection.verify|verify} messages. + * @param message Connection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v2.IConnection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Connection message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.Connection.verify|verify} messages. + * @param message Connection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v2.IConnection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Connection message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Connection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v2.Connection; + + /** + * Decodes a Connection message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Connection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v2.Connection; + + /** + * Verifies a Connection message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Connection message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Connection + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v2.Connection; + + /** + * Creates a plain object from a Connection message. Also converts values to other types if specified. + * @param message Connection + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v2.Connection, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Connection to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Connection + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InstallationState. */ + interface IInstallationState { + + /** InstallationState stage */ + stage?: (google.devtools.cloudbuild.v2.InstallationState.Stage|keyof typeof google.devtools.cloudbuild.v2.InstallationState.Stage|null); + + /** InstallationState message */ + message?: (string|null); + + /** InstallationState actionUri */ + actionUri?: (string|null); + } + + /** Represents an InstallationState. */ + class InstallationState implements IInstallationState { + + /** + * Constructs a new InstallationState. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v2.IInstallationState); + + /** InstallationState stage. */ + public stage: (google.devtools.cloudbuild.v2.InstallationState.Stage|keyof typeof google.devtools.cloudbuild.v2.InstallationState.Stage); + + /** InstallationState message. */ + public message: string; + + /** InstallationState actionUri. */ + public actionUri: string; + + /** + * Creates a new InstallationState instance using the specified properties. + * @param [properties] Properties to set + * @returns InstallationState instance + */ + public static create(properties?: google.devtools.cloudbuild.v2.IInstallationState): google.devtools.cloudbuild.v2.InstallationState; + + /** + * Encodes the specified InstallationState message. Does not implicitly {@link google.devtools.cloudbuild.v2.InstallationState.verify|verify} messages. + * @param message InstallationState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v2.IInstallationState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InstallationState message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.InstallationState.verify|verify} messages. + * @param message InstallationState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v2.IInstallationState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InstallationState message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InstallationState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v2.InstallationState; + + /** + * Decodes an InstallationState message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InstallationState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v2.InstallationState; + + /** + * Verifies an InstallationState message. + * @param message Plain 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 InstallationState message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InstallationState + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v2.InstallationState; + + /** + * Creates a plain object from an InstallationState message. Also converts values to other types if specified. + * @param message InstallationState + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v2.InstallationState, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InstallationState to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InstallationState + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace InstallationState { + + /** Stage enum. */ + enum Stage { + STAGE_UNSPECIFIED = 0, + PENDING_CREATE_APP = 1, + PENDING_USER_OAUTH = 2, + PENDING_INSTALL_APP = 3, + COMPLETE = 10 + } + } + + /** Properties of a FetchLinkableRepositoriesRequest. */ + interface IFetchLinkableRepositoriesRequest { + + /** FetchLinkableRepositoriesRequest connection */ + connection?: (string|null); + + /** FetchLinkableRepositoriesRequest pageSize */ + pageSize?: (number|null); + + /** FetchLinkableRepositoriesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a FetchLinkableRepositoriesRequest. */ + class FetchLinkableRepositoriesRequest implements IFetchLinkableRepositoriesRequest { + + /** + * Constructs a new FetchLinkableRepositoriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesRequest); + + /** FetchLinkableRepositoriesRequest connection. */ + public connection: string; + + /** FetchLinkableRepositoriesRequest pageSize. */ + public pageSize: number; + + /** FetchLinkableRepositoriesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new FetchLinkableRepositoriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchLinkableRepositoriesRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesRequest): google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest; + + /** + * Encodes the specified FetchLinkableRepositoriesRequest message. Does not implicitly {@link google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest.verify|verify} messages. + * @param message FetchLinkableRepositoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchLinkableRepositoriesRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest.verify|verify} messages. + * @param message FetchLinkableRepositoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchLinkableRepositoriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchLinkableRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest; + + /** + * Decodes a FetchLinkableRepositoriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchLinkableRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest; + + /** + * Verifies a FetchLinkableRepositoriesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchLinkableRepositoriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchLinkableRepositoriesRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest; + + /** + * Creates a plain object from a FetchLinkableRepositoriesRequest message. Also converts values to other types if specified. + * @param message FetchLinkableRepositoriesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchLinkableRepositoriesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchLinkableRepositoriesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchLinkableRepositoriesResponse. */ + interface IFetchLinkableRepositoriesResponse { + + /** FetchLinkableRepositoriesResponse repositories */ + repositories?: (google.devtools.cloudbuild.v2.IRepository[]|null); + + /** FetchLinkableRepositoriesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a FetchLinkableRepositoriesResponse. */ + class FetchLinkableRepositoriesResponse implements IFetchLinkableRepositoriesResponse { + + /** + * Constructs a new FetchLinkableRepositoriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesResponse); + + /** FetchLinkableRepositoriesResponse repositories. */ + public repositories: google.devtools.cloudbuild.v2.IRepository[]; + + /** FetchLinkableRepositoriesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new FetchLinkableRepositoriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchLinkableRepositoriesResponse instance + */ + public static create(properties?: google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesResponse): google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse; + + /** + * Encodes the specified FetchLinkableRepositoriesResponse message. Does not implicitly {@link google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse.verify|verify} messages. + * @param message FetchLinkableRepositoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchLinkableRepositoriesResponse message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse.verify|verify} messages. + * @param message FetchLinkableRepositoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchLinkableRepositoriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchLinkableRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse; + + /** + * Decodes a FetchLinkableRepositoriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchLinkableRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse; + + /** + * Verifies a FetchLinkableRepositoriesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchLinkableRepositoriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchLinkableRepositoriesResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse; + + /** + * Creates a plain object from a FetchLinkableRepositoriesResponse message. Also converts values to other types if specified. + * @param message FetchLinkableRepositoriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchLinkableRepositoriesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchLinkableRepositoriesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GitHubConfig. */ + interface IGitHubConfig { + + /** GitHubConfig authorizerCredential */ + authorizerCredential?: (google.devtools.cloudbuild.v2.IOAuthCredential|null); + + /** GitHubConfig appInstallationId */ + appInstallationId?: (number|Long|string|null); + } + + /** Represents a GitHubConfig. */ + class GitHubConfig implements IGitHubConfig { + + /** + * Constructs a new GitHubConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v2.IGitHubConfig); + + /** GitHubConfig authorizerCredential. */ + public authorizerCredential?: (google.devtools.cloudbuild.v2.IOAuthCredential|null); + + /** GitHubConfig appInstallationId. */ + public appInstallationId: (number|Long|string); + + /** + * Creates a new GitHubConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GitHubConfig instance + */ + public static create(properties?: google.devtools.cloudbuild.v2.IGitHubConfig): google.devtools.cloudbuild.v2.GitHubConfig; + + /** + * Encodes the specified GitHubConfig message. Does not implicitly {@link google.devtools.cloudbuild.v2.GitHubConfig.verify|verify} messages. + * @param message GitHubConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v2.IGitHubConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GitHubConfig message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.GitHubConfig.verify|verify} messages. + * @param message GitHubConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v2.IGitHubConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GitHubConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GitHubConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v2.GitHubConfig; + + /** + * Decodes a GitHubConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GitHubConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v2.GitHubConfig; + + /** + * Verifies a GitHubConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GitHubConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GitHubConfig + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v2.GitHubConfig; + + /** + * Creates a plain object from a GitHubConfig message. Also converts values to other types if specified. + * @param message GitHubConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v2.GitHubConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GitHubConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GitHubConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GitHubEnterpriseConfig. */ + interface IGitHubEnterpriseConfig { + + /** GitHubEnterpriseConfig hostUri */ + hostUri?: (string|null); + + /** GitHubEnterpriseConfig apiKey */ + apiKey?: (string|null); + + /** GitHubEnterpriseConfig appId */ + appId?: (number|Long|string|null); + + /** GitHubEnterpriseConfig appSlug */ + appSlug?: (string|null); + + /** GitHubEnterpriseConfig privateKeySecretVersion */ + privateKeySecretVersion?: (string|null); + + /** GitHubEnterpriseConfig webhookSecretSecretVersion */ + webhookSecretSecretVersion?: (string|null); + + /** GitHubEnterpriseConfig appInstallationId */ + appInstallationId?: (number|Long|string|null); + + /** GitHubEnterpriseConfig serviceDirectoryConfig */ + serviceDirectoryConfig?: (google.devtools.cloudbuild.v2.IServiceDirectoryConfig|null); + + /** GitHubEnterpriseConfig sslCa */ + sslCa?: (string|null); + + /** GitHubEnterpriseConfig serverVersion */ + serverVersion?: (string|null); + } + + /** Represents a GitHubEnterpriseConfig. */ + class GitHubEnterpriseConfig implements IGitHubEnterpriseConfig { + + /** + * Constructs a new GitHubEnterpriseConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v2.IGitHubEnterpriseConfig); + + /** GitHubEnterpriseConfig hostUri. */ + public hostUri: string; + + /** GitHubEnterpriseConfig apiKey. */ + public apiKey: string; + + /** GitHubEnterpriseConfig appId. */ + public appId: (number|Long|string); + + /** GitHubEnterpriseConfig appSlug. */ + public appSlug: string; + + /** GitHubEnterpriseConfig privateKeySecretVersion. */ + public privateKeySecretVersion: string; + + /** GitHubEnterpriseConfig webhookSecretSecretVersion. */ + public webhookSecretSecretVersion: string; + + /** GitHubEnterpriseConfig appInstallationId. */ + public appInstallationId: (number|Long|string); + + /** GitHubEnterpriseConfig serviceDirectoryConfig. */ + public serviceDirectoryConfig?: (google.devtools.cloudbuild.v2.IServiceDirectoryConfig|null); + + /** GitHubEnterpriseConfig sslCa. */ + public sslCa: string; + + /** GitHubEnterpriseConfig serverVersion. */ + public serverVersion: string; + + /** + * Creates a new GitHubEnterpriseConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GitHubEnterpriseConfig instance + */ + public static create(properties?: google.devtools.cloudbuild.v2.IGitHubEnterpriseConfig): google.devtools.cloudbuild.v2.GitHubEnterpriseConfig; + + /** + * Encodes the specified GitHubEnterpriseConfig message. Does not implicitly {@link google.devtools.cloudbuild.v2.GitHubEnterpriseConfig.verify|verify} messages. + * @param message GitHubEnterpriseConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v2.IGitHubEnterpriseConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GitHubEnterpriseConfig message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.GitHubEnterpriseConfig.verify|verify} messages. + * @param message GitHubEnterpriseConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v2.IGitHubEnterpriseConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GitHubEnterpriseConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GitHubEnterpriseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v2.GitHubEnterpriseConfig; + + /** + * Decodes a GitHubEnterpriseConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GitHubEnterpriseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v2.GitHubEnterpriseConfig; + + /** + * Verifies a GitHubEnterpriseConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GitHubEnterpriseConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GitHubEnterpriseConfig + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v2.GitHubEnterpriseConfig; + + /** + * Creates a plain object from a GitHubEnterpriseConfig message. Also converts values to other types if specified. + * @param message GitHubEnterpriseConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v2.GitHubEnterpriseConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GitHubEnterpriseConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GitHubEnterpriseConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDirectoryConfig. */ + interface IServiceDirectoryConfig { + + /** ServiceDirectoryConfig service */ + service?: (string|null); + } + + /** Represents a ServiceDirectoryConfig. */ + class ServiceDirectoryConfig implements IServiceDirectoryConfig { + + /** + * Constructs a new ServiceDirectoryConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v2.IServiceDirectoryConfig); + + /** ServiceDirectoryConfig service. */ + public service: string; + + /** + * Creates a new ServiceDirectoryConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDirectoryConfig instance + */ + public static create(properties?: google.devtools.cloudbuild.v2.IServiceDirectoryConfig): google.devtools.cloudbuild.v2.ServiceDirectoryConfig; + + /** + * Encodes the specified ServiceDirectoryConfig message. Does not implicitly {@link google.devtools.cloudbuild.v2.ServiceDirectoryConfig.verify|verify} messages. + * @param message ServiceDirectoryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v2.IServiceDirectoryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDirectoryConfig message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.ServiceDirectoryConfig.verify|verify} messages. + * @param message ServiceDirectoryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v2.IServiceDirectoryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDirectoryConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDirectoryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v2.ServiceDirectoryConfig; + + /** + * Decodes a ServiceDirectoryConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDirectoryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v2.ServiceDirectoryConfig; + + /** + * Verifies a ServiceDirectoryConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDirectoryConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDirectoryConfig + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v2.ServiceDirectoryConfig; + + /** + * Creates a plain object from a ServiceDirectoryConfig message. Also converts values to other types if specified. + * @param message ServiceDirectoryConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v2.ServiceDirectoryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDirectoryConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDirectoryConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Repository. */ + interface IRepository { + + /** Repository name */ + name?: (string|null); + + /** Repository remoteUri */ + remoteUri?: (string|null); + + /** Repository createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Repository updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Repository annotations */ + annotations?: ({ [k: string]: string }|null); + + /** Repository etag */ + etag?: (string|null); + } + + /** Represents a Repository. */ + class Repository implements IRepository { + + /** + * Constructs a new Repository. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v2.IRepository); + + /** Repository name. */ + public name: string; + + /** Repository remoteUri. */ + public remoteUri: string; + + /** Repository createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Repository updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Repository annotations. */ + public annotations: { [k: string]: string }; + + /** Repository etag. */ + public etag: string; + + /** + * Creates a new Repository instance using the specified properties. + * @param [properties] Properties to set + * @returns Repository instance + */ + public static create(properties?: google.devtools.cloudbuild.v2.IRepository): google.devtools.cloudbuild.v2.Repository; + + /** + * Encodes the specified Repository message. Does not implicitly {@link google.devtools.cloudbuild.v2.Repository.verify|verify} messages. + * @param message Repository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v2.IRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Repository message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.Repository.verify|verify} messages. + * @param message Repository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v2.IRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Repository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v2.Repository; + + /** + * Decodes a Repository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v2.Repository; + + /** + * Verifies a Repository message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Repository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Repository + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v2.Repository; + + /** + * Creates a plain object from a Repository message. Also converts values to other types if specified. + * @param message Repository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v2.Repository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Repository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Repository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a OAuthCredential. */ + interface IOAuthCredential { + + /** OAuthCredential oauthTokenSecretVersion */ + oauthTokenSecretVersion?: (string|null); + + /** OAuthCredential username */ + username?: (string|null); + } + + /** Represents a OAuthCredential. */ + class OAuthCredential implements IOAuthCredential { + + /** + * Constructs a new OAuthCredential. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v2.IOAuthCredential); + + /** OAuthCredential oauthTokenSecretVersion. */ + public oauthTokenSecretVersion: string; + + /** OAuthCredential username. */ + public username: string; + + /** + * Creates a new OAuthCredential instance using the specified properties. + * @param [properties] Properties to set + * @returns OAuthCredential instance + */ + public static create(properties?: google.devtools.cloudbuild.v2.IOAuthCredential): google.devtools.cloudbuild.v2.OAuthCredential; + + /** + * Encodes the specified OAuthCredential message. Does not implicitly {@link google.devtools.cloudbuild.v2.OAuthCredential.verify|verify} messages. + * @param message OAuthCredential message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v2.IOAuthCredential, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OAuthCredential message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.OAuthCredential.verify|verify} messages. + * @param message OAuthCredential message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v2.IOAuthCredential, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a OAuthCredential message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OAuthCredential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v2.OAuthCredential; + + /** + * Decodes a OAuthCredential message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OAuthCredential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v2.OAuthCredential; + + /** + * Verifies a OAuthCredential message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a OAuthCredential message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OAuthCredential + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v2.OAuthCredential; + + /** + * Creates a plain object from a OAuthCredential message. Also converts values to other types if specified. + * @param message OAuthCredential + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v2.OAuthCredential, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OAuthCredential to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OAuthCredential + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateConnectionRequest. */ + interface ICreateConnectionRequest { + + /** CreateConnectionRequest parent */ + parent?: (string|null); + + /** CreateConnectionRequest connection */ + connection?: (google.devtools.cloudbuild.v2.IConnection|null); + + /** CreateConnectionRequest connectionId */ + connectionId?: (string|null); + } + + /** Represents a CreateConnectionRequest. */ + class CreateConnectionRequest implements ICreateConnectionRequest { + + /** + * Constructs a new CreateConnectionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v2.ICreateConnectionRequest); + + /** CreateConnectionRequest parent. */ + public parent: string; + + /** CreateConnectionRequest connection. */ + public connection?: (google.devtools.cloudbuild.v2.IConnection|null); + + /** CreateConnectionRequest connectionId. */ + public connectionId: string; + + /** + * Creates a new CreateConnectionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateConnectionRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v2.ICreateConnectionRequest): google.devtools.cloudbuild.v2.CreateConnectionRequest; + + /** + * Encodes the specified CreateConnectionRequest message. Does not implicitly {@link google.devtools.cloudbuild.v2.CreateConnectionRequest.verify|verify} messages. + * @param message CreateConnectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v2.ICreateConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateConnectionRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.CreateConnectionRequest.verify|verify} messages. + * @param message CreateConnectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v2.ICreateConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateConnectionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v2.CreateConnectionRequest; + + /** + * Decodes a CreateConnectionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v2.CreateConnectionRequest; + + /** + * Verifies a CreateConnectionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateConnectionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateConnectionRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v2.CreateConnectionRequest; + + /** + * Creates a plain object from a CreateConnectionRequest message. Also converts values to other types if specified. + * @param message CreateConnectionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v2.CreateConnectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateConnectionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateConnectionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetConnectionRequest. */ + interface IGetConnectionRequest { + + /** GetConnectionRequest name */ + name?: (string|null); + } + + /** Represents a GetConnectionRequest. */ + class GetConnectionRequest implements IGetConnectionRequest { + + /** + * Constructs a new GetConnectionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v2.IGetConnectionRequest); + + /** GetConnectionRequest name. */ + public name: string; + + /** + * Creates a new GetConnectionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetConnectionRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v2.IGetConnectionRequest): google.devtools.cloudbuild.v2.GetConnectionRequest; + + /** + * Encodes the specified GetConnectionRequest message. Does not implicitly {@link google.devtools.cloudbuild.v2.GetConnectionRequest.verify|verify} messages. + * @param message GetConnectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v2.IGetConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetConnectionRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.GetConnectionRequest.verify|verify} messages. + * @param message GetConnectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v2.IGetConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetConnectionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v2.GetConnectionRequest; + + /** + * Decodes a GetConnectionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v2.GetConnectionRequest; + + /** + * Verifies a GetConnectionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetConnectionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetConnectionRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v2.GetConnectionRequest; + + /** + * Creates a plain object from a GetConnectionRequest message. Also converts values to other types if specified. + * @param message GetConnectionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v2.GetConnectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetConnectionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetConnectionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListConnectionsRequest. */ + interface IListConnectionsRequest { + + /** ListConnectionsRequest parent */ + parent?: (string|null); + + /** ListConnectionsRequest pageSize */ + pageSize?: (number|null); + + /** ListConnectionsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListConnectionsRequest. */ + class ListConnectionsRequest implements IListConnectionsRequest { + + /** + * Constructs a new ListConnectionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v2.IListConnectionsRequest); + + /** ListConnectionsRequest parent. */ + public parent: string; + + /** ListConnectionsRequest pageSize. */ + public pageSize: number; + + /** ListConnectionsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListConnectionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConnectionsRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v2.IListConnectionsRequest): google.devtools.cloudbuild.v2.ListConnectionsRequest; + + /** + * Encodes the specified ListConnectionsRequest message. Does not implicitly {@link google.devtools.cloudbuild.v2.ListConnectionsRequest.verify|verify} messages. + * @param message ListConnectionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v2.IListConnectionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConnectionsRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.ListConnectionsRequest.verify|verify} messages. + * @param message ListConnectionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v2.IListConnectionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConnectionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConnectionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v2.ListConnectionsRequest; + + /** + * Decodes a ListConnectionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConnectionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v2.ListConnectionsRequest; + + /** + * Verifies a ListConnectionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListConnectionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConnectionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v2.ListConnectionsRequest; + + /** + * Creates a plain object from a ListConnectionsRequest message. Also converts values to other types if specified. + * @param message ListConnectionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v2.ListConnectionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConnectionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConnectionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListConnectionsResponse. */ + interface IListConnectionsResponse { + + /** ListConnectionsResponse connections */ + connections?: (google.devtools.cloudbuild.v2.IConnection[]|null); + + /** ListConnectionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListConnectionsResponse. */ + class ListConnectionsResponse implements IListConnectionsResponse { + + /** + * Constructs a new ListConnectionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v2.IListConnectionsResponse); + + /** ListConnectionsResponse connections. */ + public connections: google.devtools.cloudbuild.v2.IConnection[]; + + /** ListConnectionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListConnectionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConnectionsResponse instance + */ + public static create(properties?: google.devtools.cloudbuild.v2.IListConnectionsResponse): google.devtools.cloudbuild.v2.ListConnectionsResponse; + + /** + * Encodes the specified ListConnectionsResponse message. Does not implicitly {@link google.devtools.cloudbuild.v2.ListConnectionsResponse.verify|verify} messages. + * @param message ListConnectionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v2.IListConnectionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConnectionsResponse message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.ListConnectionsResponse.verify|verify} messages. + * @param message ListConnectionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v2.IListConnectionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConnectionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConnectionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v2.ListConnectionsResponse; + + /** + * Decodes a ListConnectionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConnectionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v2.ListConnectionsResponse; + + /** + * Verifies a ListConnectionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListConnectionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConnectionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v2.ListConnectionsResponse; + + /** + * Creates a plain object from a ListConnectionsResponse message. Also converts values to other types if specified. + * @param message ListConnectionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v2.ListConnectionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConnectionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConnectionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateConnectionRequest. */ + interface IUpdateConnectionRequest { + + /** UpdateConnectionRequest connection */ + connection?: (google.devtools.cloudbuild.v2.IConnection|null); + + /** UpdateConnectionRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateConnectionRequest allowMissing */ + allowMissing?: (boolean|null); + + /** UpdateConnectionRequest etag */ + etag?: (string|null); + } + + /** Represents an UpdateConnectionRequest. */ + class UpdateConnectionRequest implements IUpdateConnectionRequest { + + /** + * Constructs a new UpdateConnectionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v2.IUpdateConnectionRequest); + + /** UpdateConnectionRequest connection. */ + public connection?: (google.devtools.cloudbuild.v2.IConnection|null); + + /** UpdateConnectionRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateConnectionRequest allowMissing. */ + public allowMissing: boolean; + + /** UpdateConnectionRequest etag. */ + public etag: string; + + /** + * Creates a new UpdateConnectionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateConnectionRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v2.IUpdateConnectionRequest): google.devtools.cloudbuild.v2.UpdateConnectionRequest; + + /** + * Encodes the specified UpdateConnectionRequest message. Does not implicitly {@link google.devtools.cloudbuild.v2.UpdateConnectionRequest.verify|verify} messages. + * @param message UpdateConnectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v2.IUpdateConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateConnectionRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.UpdateConnectionRequest.verify|verify} messages. + * @param message UpdateConnectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v2.IUpdateConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateConnectionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v2.UpdateConnectionRequest; + + /** + * Decodes an UpdateConnectionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v2.UpdateConnectionRequest; + + /** + * Verifies an UpdateConnectionRequest message. + * @param message Plain 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 UpdateConnectionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateConnectionRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v2.UpdateConnectionRequest; + + /** + * Creates a plain object from an UpdateConnectionRequest message. Also converts values to other types if specified. + * @param message UpdateConnectionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v2.UpdateConnectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateConnectionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateConnectionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteConnectionRequest. */ + interface IDeleteConnectionRequest { + + /** DeleteConnectionRequest name */ + name?: (string|null); + + /** DeleteConnectionRequest etag */ + etag?: (string|null); + + /** DeleteConnectionRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a DeleteConnectionRequest. */ + class DeleteConnectionRequest implements IDeleteConnectionRequest { + + /** + * Constructs a new DeleteConnectionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v2.IDeleteConnectionRequest); + + /** DeleteConnectionRequest name. */ + public name: string; + + /** DeleteConnectionRequest etag. */ + public etag: string; + + /** DeleteConnectionRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new DeleteConnectionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteConnectionRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v2.IDeleteConnectionRequest): google.devtools.cloudbuild.v2.DeleteConnectionRequest; + + /** + * Encodes the specified DeleteConnectionRequest message. Does not implicitly {@link google.devtools.cloudbuild.v2.DeleteConnectionRequest.verify|verify} messages. + * @param message DeleteConnectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v2.IDeleteConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteConnectionRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.DeleteConnectionRequest.verify|verify} messages. + * @param message DeleteConnectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v2.IDeleteConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteConnectionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v2.DeleteConnectionRequest; + + /** + * Decodes a DeleteConnectionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v2.DeleteConnectionRequest; + + /** + * Verifies a DeleteConnectionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteConnectionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteConnectionRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v2.DeleteConnectionRequest; + + /** + * Creates a plain object from a DeleteConnectionRequest message. Also converts values to other types if specified. + * @param message DeleteConnectionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v2.DeleteConnectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteConnectionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteConnectionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateRepositoryRequest. */ + interface ICreateRepositoryRequest { + + /** CreateRepositoryRequest parent */ + parent?: (string|null); + + /** CreateRepositoryRequest repository */ + repository?: (google.devtools.cloudbuild.v2.IRepository|null); + + /** CreateRepositoryRequest repositoryId */ + repositoryId?: (string|null); + } + + /** Represents a CreateRepositoryRequest. */ + class CreateRepositoryRequest implements ICreateRepositoryRequest { + + /** + * Constructs a new CreateRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v2.ICreateRepositoryRequest); + + /** CreateRepositoryRequest parent. */ + public parent: string; + + /** CreateRepositoryRequest repository. */ + public repository?: (google.devtools.cloudbuild.v2.IRepository|null); + + /** CreateRepositoryRequest repositoryId. */ + public repositoryId: string; + + /** + * Creates a new CreateRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateRepositoryRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v2.ICreateRepositoryRequest): google.devtools.cloudbuild.v2.CreateRepositoryRequest; + + /** + * Encodes the specified CreateRepositoryRequest message. Does not implicitly {@link google.devtools.cloudbuild.v2.CreateRepositoryRequest.verify|verify} messages. + * @param message CreateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v2.ICreateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.CreateRepositoryRequest.verify|verify} messages. + * @param message CreateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v2.ICreateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v2.CreateRepositoryRequest; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v2.CreateRepositoryRequest; + + /** + * Verifies a CreateRepositoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v2.CreateRepositoryRequest; + + /** + * Creates a plain object from a CreateRepositoryRequest message. Also converts values to other types if specified. + * @param message CreateRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v2.CreateRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateRepositoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchCreateRepositoriesRequest. */ + interface IBatchCreateRepositoriesRequest { + + /** BatchCreateRepositoriesRequest parent */ + parent?: (string|null); + + /** BatchCreateRepositoriesRequest requests */ + requests?: (google.devtools.cloudbuild.v2.ICreateRepositoryRequest[]|null); + } + + /** Represents a BatchCreateRepositoriesRequest. */ + class BatchCreateRepositoriesRequest implements IBatchCreateRepositoriesRequest { + + /** + * Constructs a new BatchCreateRepositoriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v2.IBatchCreateRepositoriesRequest); + + /** BatchCreateRepositoriesRequest parent. */ + public parent: string; + + /** BatchCreateRepositoriesRequest requests. */ + public requests: google.devtools.cloudbuild.v2.ICreateRepositoryRequest[]; + + /** + * Creates a new BatchCreateRepositoriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchCreateRepositoriesRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v2.IBatchCreateRepositoriesRequest): google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest; + + /** + * Encodes the specified BatchCreateRepositoriesRequest message. Does not implicitly {@link google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest.verify|verify} messages. + * @param message BatchCreateRepositoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v2.IBatchCreateRepositoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchCreateRepositoriesRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest.verify|verify} messages. + * @param message BatchCreateRepositoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v2.IBatchCreateRepositoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchCreateRepositoriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchCreateRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest; + + /** + * Decodes a BatchCreateRepositoriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchCreateRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest; + + /** + * Verifies a BatchCreateRepositoriesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BatchCreateRepositoriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchCreateRepositoriesRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest; + + /** + * Creates a plain object from a BatchCreateRepositoriesRequest message. Also converts values to other types if specified. + * @param message BatchCreateRepositoriesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchCreateRepositoriesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchCreateRepositoriesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchCreateRepositoriesResponse. */ + interface IBatchCreateRepositoriesResponse { + + /** BatchCreateRepositoriesResponse repositories */ + repositories?: (google.devtools.cloudbuild.v2.IRepository[]|null); + } + + /** Represents a BatchCreateRepositoriesResponse. */ + class BatchCreateRepositoriesResponse implements IBatchCreateRepositoriesResponse { + + /** + * Constructs a new BatchCreateRepositoriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v2.IBatchCreateRepositoriesResponse); + + /** BatchCreateRepositoriesResponse repositories. */ + public repositories: google.devtools.cloudbuild.v2.IRepository[]; + + /** + * Creates a new BatchCreateRepositoriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchCreateRepositoriesResponse instance + */ + public static create(properties?: google.devtools.cloudbuild.v2.IBatchCreateRepositoriesResponse): google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse; + + /** + * Encodes the specified BatchCreateRepositoriesResponse message. Does not implicitly {@link google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse.verify|verify} messages. + * @param message BatchCreateRepositoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v2.IBatchCreateRepositoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchCreateRepositoriesResponse message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse.verify|verify} messages. + * @param message BatchCreateRepositoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v2.IBatchCreateRepositoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchCreateRepositoriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchCreateRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse; + + /** + * Decodes a BatchCreateRepositoriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchCreateRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse; + + /** + * Verifies a BatchCreateRepositoriesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BatchCreateRepositoriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchCreateRepositoriesResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse; + + /** + * Creates a plain object from a BatchCreateRepositoriesResponse message. Also converts values to other types if specified. + * @param message BatchCreateRepositoriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchCreateRepositoriesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchCreateRepositoriesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetRepositoryRequest. */ + interface IGetRepositoryRequest { + + /** GetRepositoryRequest name */ + name?: (string|null); + } + + /** Represents a GetRepositoryRequest. */ + class GetRepositoryRequest implements IGetRepositoryRequest { + + /** + * Constructs a new GetRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v2.IGetRepositoryRequest); + + /** GetRepositoryRequest name. */ + public name: string; + + /** + * Creates a new GetRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetRepositoryRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v2.IGetRepositoryRequest): google.devtools.cloudbuild.v2.GetRepositoryRequest; + + /** + * Encodes the specified GetRepositoryRequest message. Does not implicitly {@link google.devtools.cloudbuild.v2.GetRepositoryRequest.verify|verify} messages. + * @param message GetRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v2.IGetRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.GetRepositoryRequest.verify|verify} messages. + * @param message GetRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v2.IGetRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v2.GetRepositoryRequest; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v2.GetRepositoryRequest; + + /** + * Verifies a GetRepositoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v2.GetRepositoryRequest; + + /** + * Creates a plain object from a GetRepositoryRequest message. Also converts values to other types if specified. + * @param message GetRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v2.GetRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetRepositoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListRepositoriesRequest. */ + interface IListRepositoriesRequest { + + /** ListRepositoriesRequest parent */ + parent?: (string|null); + + /** ListRepositoriesRequest pageSize */ + pageSize?: (number|null); + + /** ListRepositoriesRequest pageToken */ + pageToken?: (string|null); + + /** ListRepositoriesRequest filter */ + filter?: (string|null); + } + + /** Represents a ListRepositoriesRequest. */ + class ListRepositoriesRequest implements IListRepositoriesRequest { + + /** + * Constructs a new ListRepositoriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v2.IListRepositoriesRequest); + + /** ListRepositoriesRequest parent. */ + public parent: string; + + /** ListRepositoriesRequest pageSize. */ + public pageSize: number; + + /** ListRepositoriesRequest pageToken. */ + public pageToken: string; + + /** ListRepositoriesRequest filter. */ + public filter: string; + + /** + * Creates a new ListRepositoriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRepositoriesRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v2.IListRepositoriesRequest): google.devtools.cloudbuild.v2.ListRepositoriesRequest; + + /** + * Encodes the specified ListRepositoriesRequest message. Does not implicitly {@link google.devtools.cloudbuild.v2.ListRepositoriesRequest.verify|verify} messages. + * @param message ListRepositoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v2.IListRepositoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRepositoriesRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.ListRepositoriesRequest.verify|verify} messages. + * @param message ListRepositoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v2.IListRepositoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v2.ListRepositoriesRequest; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v2.ListRepositoriesRequest; + + /** + * Verifies a ListRepositoriesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListRepositoriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRepositoriesRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v2.ListRepositoriesRequest; + + /** + * Creates a plain object from a ListRepositoriesRequest message. Also converts values to other types if specified. + * @param message ListRepositoriesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v2.ListRepositoriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRepositoriesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListRepositoriesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListRepositoriesResponse. */ + interface IListRepositoriesResponse { + + /** ListRepositoriesResponse repositories */ + repositories?: (google.devtools.cloudbuild.v2.IRepository[]|null); + + /** ListRepositoriesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListRepositoriesResponse. */ + class ListRepositoriesResponse implements IListRepositoriesResponse { + + /** + * Constructs a new ListRepositoriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v2.IListRepositoriesResponse); + + /** ListRepositoriesResponse repositories. */ + public repositories: google.devtools.cloudbuild.v2.IRepository[]; + + /** ListRepositoriesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListRepositoriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRepositoriesResponse instance + */ + public static create(properties?: google.devtools.cloudbuild.v2.IListRepositoriesResponse): google.devtools.cloudbuild.v2.ListRepositoriesResponse; + + /** + * Encodes the specified ListRepositoriesResponse message. Does not implicitly {@link google.devtools.cloudbuild.v2.ListRepositoriesResponse.verify|verify} messages. + * @param message ListRepositoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v2.IListRepositoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRepositoriesResponse message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.ListRepositoriesResponse.verify|verify} messages. + * @param message ListRepositoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v2.IListRepositoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v2.ListRepositoriesResponse; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v2.ListRepositoriesResponse; + + /** + * Verifies a ListRepositoriesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListRepositoriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRepositoriesResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v2.ListRepositoriesResponse; + + /** + * Creates a plain object from a ListRepositoriesResponse message. Also converts values to other types if specified. + * @param message ListRepositoriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v2.ListRepositoriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRepositoriesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListRepositoriesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteRepositoryRequest. */ + interface IDeleteRepositoryRequest { + + /** DeleteRepositoryRequest name */ + name?: (string|null); + + /** DeleteRepositoryRequest etag */ + etag?: (string|null); + + /** DeleteRepositoryRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a DeleteRepositoryRequest. */ + class DeleteRepositoryRequest implements IDeleteRepositoryRequest { + + /** + * Constructs a new DeleteRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v2.IDeleteRepositoryRequest); + + /** DeleteRepositoryRequest name. */ + public name: string; + + /** DeleteRepositoryRequest etag. */ + public etag: string; + + /** DeleteRepositoryRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new DeleteRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteRepositoryRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v2.IDeleteRepositoryRequest): google.devtools.cloudbuild.v2.DeleteRepositoryRequest; + + /** + * Encodes the specified DeleteRepositoryRequest message. Does not implicitly {@link google.devtools.cloudbuild.v2.DeleteRepositoryRequest.verify|verify} messages. + * @param message DeleteRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v2.IDeleteRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.DeleteRepositoryRequest.verify|verify} messages. + * @param message DeleteRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v2.IDeleteRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v2.DeleteRepositoryRequest; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v2.DeleteRepositoryRequest; + + /** + * Verifies a DeleteRepositoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v2.DeleteRepositoryRequest; + + /** + * Creates a plain object from a DeleteRepositoryRequest message. Also converts values to other types if specified. + * @param message DeleteRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v2.DeleteRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteRepositoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchReadWriteTokenRequest. */ + interface IFetchReadWriteTokenRequest { + + /** FetchReadWriteTokenRequest repository */ + repository?: (string|null); + } + + /** Represents a FetchReadWriteTokenRequest. */ + class FetchReadWriteTokenRequest implements IFetchReadWriteTokenRequest { + + /** + * Constructs a new FetchReadWriteTokenRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v2.IFetchReadWriteTokenRequest); + + /** FetchReadWriteTokenRequest repository. */ + public repository: string; + + /** + * Creates a new FetchReadWriteTokenRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchReadWriteTokenRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v2.IFetchReadWriteTokenRequest): google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest; + + /** + * Encodes the specified FetchReadWriteTokenRequest message. Does not implicitly {@link google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest.verify|verify} messages. + * @param message FetchReadWriteTokenRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v2.IFetchReadWriteTokenRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchReadWriteTokenRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest.verify|verify} messages. + * @param message FetchReadWriteTokenRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v2.IFetchReadWriteTokenRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchReadWriteTokenRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchReadWriteTokenRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest; + + /** + * Decodes a FetchReadWriteTokenRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchReadWriteTokenRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest; + + /** + * Verifies a FetchReadWriteTokenRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchReadWriteTokenRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchReadWriteTokenRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest; + + /** + * Creates a plain object from a FetchReadWriteTokenRequest message. Also converts values to other types if specified. + * @param message FetchReadWriteTokenRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchReadWriteTokenRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchReadWriteTokenRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchReadTokenRequest. */ + interface IFetchReadTokenRequest { + + /** FetchReadTokenRequest repository */ + repository?: (string|null); + } + + /** Represents a FetchReadTokenRequest. */ + class FetchReadTokenRequest implements IFetchReadTokenRequest { + + /** + * Constructs a new FetchReadTokenRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v2.IFetchReadTokenRequest); + + /** FetchReadTokenRequest repository. */ + public repository: string; + + /** + * Creates a new FetchReadTokenRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchReadTokenRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v2.IFetchReadTokenRequest): google.devtools.cloudbuild.v2.FetchReadTokenRequest; + + /** + * Encodes the specified FetchReadTokenRequest message. Does not implicitly {@link google.devtools.cloudbuild.v2.FetchReadTokenRequest.verify|verify} messages. + * @param message FetchReadTokenRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v2.IFetchReadTokenRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchReadTokenRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.FetchReadTokenRequest.verify|verify} messages. + * @param message FetchReadTokenRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v2.IFetchReadTokenRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchReadTokenRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchReadTokenRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v2.FetchReadTokenRequest; + + /** + * Decodes a FetchReadTokenRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchReadTokenRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v2.FetchReadTokenRequest; + + /** + * Verifies a FetchReadTokenRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchReadTokenRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchReadTokenRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v2.FetchReadTokenRequest; + + /** + * Creates a plain object from a FetchReadTokenRequest message. Also converts values to other types if specified. + * @param message FetchReadTokenRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v2.FetchReadTokenRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchReadTokenRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchReadTokenRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchReadTokenResponse. */ + interface IFetchReadTokenResponse { + + /** FetchReadTokenResponse token */ + token?: (string|null); + + /** FetchReadTokenResponse expirationTime */ + expirationTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a FetchReadTokenResponse. */ + class FetchReadTokenResponse implements IFetchReadTokenResponse { + + /** + * Constructs a new FetchReadTokenResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v2.IFetchReadTokenResponse); + + /** FetchReadTokenResponse token. */ + public token: string; + + /** FetchReadTokenResponse expirationTime. */ + public expirationTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new FetchReadTokenResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchReadTokenResponse instance + */ + public static create(properties?: google.devtools.cloudbuild.v2.IFetchReadTokenResponse): google.devtools.cloudbuild.v2.FetchReadTokenResponse; + + /** + * Encodes the specified FetchReadTokenResponse message. Does not implicitly {@link google.devtools.cloudbuild.v2.FetchReadTokenResponse.verify|verify} messages. + * @param message FetchReadTokenResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v2.IFetchReadTokenResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchReadTokenResponse message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.FetchReadTokenResponse.verify|verify} messages. + * @param message FetchReadTokenResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v2.IFetchReadTokenResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchReadTokenResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchReadTokenResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v2.FetchReadTokenResponse; + + /** + * Decodes a FetchReadTokenResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchReadTokenResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v2.FetchReadTokenResponse; + + /** + * Verifies a FetchReadTokenResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchReadTokenResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchReadTokenResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v2.FetchReadTokenResponse; + + /** + * Creates a plain object from a FetchReadTokenResponse message. Also converts values to other types if specified. + * @param message FetchReadTokenResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v2.FetchReadTokenResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchReadTokenResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchReadTokenResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchReadWriteTokenResponse. */ + interface IFetchReadWriteTokenResponse { + + /** FetchReadWriteTokenResponse token */ + token?: (string|null); + + /** FetchReadWriteTokenResponse expirationTime */ + expirationTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a FetchReadWriteTokenResponse. */ + class FetchReadWriteTokenResponse implements IFetchReadWriteTokenResponse { + + /** + * Constructs a new FetchReadWriteTokenResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v2.IFetchReadWriteTokenResponse); + + /** FetchReadWriteTokenResponse token. */ + public token: string; + + /** FetchReadWriteTokenResponse expirationTime. */ + public expirationTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new FetchReadWriteTokenResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchReadWriteTokenResponse instance + */ + public static create(properties?: google.devtools.cloudbuild.v2.IFetchReadWriteTokenResponse): google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse; + + /** + * Encodes the specified FetchReadWriteTokenResponse message. Does not implicitly {@link google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse.verify|verify} messages. + * @param message FetchReadWriteTokenResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v2.IFetchReadWriteTokenResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchReadWriteTokenResponse message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse.verify|verify} messages. + * @param message FetchReadWriteTokenResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v2.IFetchReadWriteTokenResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchReadWriteTokenResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchReadWriteTokenResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse; + + /** + * Decodes a FetchReadWriteTokenResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchReadWriteTokenResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse; + + /** + * Verifies a FetchReadWriteTokenResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchReadWriteTokenResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchReadWriteTokenResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse; + + /** + * Creates a plain object from a FetchReadWriteTokenResponse message. Also converts values to other types if specified. + * @param message FetchReadWriteTokenResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchReadWriteTokenResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchReadWriteTokenResponse + * @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-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index 2054a772ac7..6344e71b3fe 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -21478,6 +21478,8032 @@ return v1; })(); + cloudbuild.v2 = (function() { + + /** + * Namespace v2. + * @memberof google.devtools.cloudbuild + * @namespace + */ + var v2 = {}; + + v2.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.devtools.cloudbuild.v2 + * @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.devtools.cloudbuild.v2 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.devtools.cloudbuild.v2.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.devtools.cloudbuild.v2.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.devtools.cloudbuild.v2.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * OperationMetadata target. + * @member {string} target + * @memberof google.devtools.cloudbuild.v2.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.devtools.cloudbuild.v2.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.devtools.cloudbuild.v2.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusMessage = ""; + + /** + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.devtools.cloudbuild.v2.OperationMetadata + * @instance + */ + OperationMetadata.prototype.requestedCancellation = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.devtools.cloudbuild.v2.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v2.OperationMetadata + * @static + * @param {google.devtools.cloudbuild.v2.IOperationMetadata=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v2.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.devtools.cloudbuild.v2.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v2.OperationMetadata + * @static + * @param {google.devtools.cloudbuild.v2.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.devtools.cloudbuild.v2.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v2.OperationMetadata + * @static + * @param {google.devtools.cloudbuild.v2.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.devtools.cloudbuild.v2.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v2.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v2.OperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.target = reader.string(); + break; + } + case 4: { + message.verb = reader.string(); + break; + } + case 5: { + message.statusMessage = reader.string(); + break; + } + case 6: { + message.requestedCancellation = reader.bool(); + break; + } + case 7: { + message.apiVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v2.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v2.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.devtools.cloudbuild.v2.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.devtools.cloudbuild.v2.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v2.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v2.OperationMetadata) + return object; + var message = new $root.google.devtools.cloudbuild.v2.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.devtools.cloudbuild.v2.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.devtools.cloudbuild.v2.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.devtools.cloudbuild.v2.OperationMetadata + * @static + * @param {google.devtools.cloudbuild.v2.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.devtools.cloudbuild.v2.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.devtools.cloudbuild.v2.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.devtools.cloudbuild.v2.OperationMetadata"; + }; + + return OperationMetadata; + })(); + + v2.RunWorkflowCustomOperationMetadata = (function() { + + /** + * Properties of a RunWorkflowCustomOperationMetadata. + * @memberof google.devtools.cloudbuild.v2 + * @interface IRunWorkflowCustomOperationMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] RunWorkflowCustomOperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] RunWorkflowCustomOperationMetadata endTime + * @property {string|null} [verb] RunWorkflowCustomOperationMetadata verb + * @property {boolean|null} [requestedCancellation] RunWorkflowCustomOperationMetadata requestedCancellation + * @property {string|null} [apiVersion] RunWorkflowCustomOperationMetadata apiVersion + * @property {string|null} [target] RunWorkflowCustomOperationMetadata target + * @property {string|null} [pipelineRunId] RunWorkflowCustomOperationMetadata pipelineRunId + */ + + /** + * Constructs a new RunWorkflowCustomOperationMetadata. + * @memberof google.devtools.cloudbuild.v2 + * @classdesc Represents a RunWorkflowCustomOperationMetadata. + * @implements IRunWorkflowCustomOperationMetadata + * @constructor + * @param {google.devtools.cloudbuild.v2.IRunWorkflowCustomOperationMetadata=} [properties] Properties to set + */ + function RunWorkflowCustomOperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RunWorkflowCustomOperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata + * @instance + */ + RunWorkflowCustomOperationMetadata.prototype.createTime = null; + + /** + * RunWorkflowCustomOperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata + * @instance + */ + RunWorkflowCustomOperationMetadata.prototype.endTime = null; + + /** + * RunWorkflowCustomOperationMetadata verb. + * @member {string} verb + * @memberof google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata + * @instance + */ + RunWorkflowCustomOperationMetadata.prototype.verb = ""; + + /** + * RunWorkflowCustomOperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata + * @instance + */ + RunWorkflowCustomOperationMetadata.prototype.requestedCancellation = false; + + /** + * RunWorkflowCustomOperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata + * @instance + */ + RunWorkflowCustomOperationMetadata.prototype.apiVersion = ""; + + /** + * RunWorkflowCustomOperationMetadata target. + * @member {string} target + * @memberof google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata + * @instance + */ + RunWorkflowCustomOperationMetadata.prototype.target = ""; + + /** + * RunWorkflowCustomOperationMetadata pipelineRunId. + * @member {string} pipelineRunId + * @memberof google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata + * @instance + */ + RunWorkflowCustomOperationMetadata.prototype.pipelineRunId = ""; + + /** + * Creates a new RunWorkflowCustomOperationMetadata instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata + * @static + * @param {google.devtools.cloudbuild.v2.IRunWorkflowCustomOperationMetadata=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata} RunWorkflowCustomOperationMetadata instance + */ + RunWorkflowCustomOperationMetadata.create = function create(properties) { + return new RunWorkflowCustomOperationMetadata(properties); + }; + + /** + * Encodes the specified RunWorkflowCustomOperationMetadata message. Does not implicitly {@link google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata + * @static + * @param {google.devtools.cloudbuild.v2.IRunWorkflowCustomOperationMetadata} message RunWorkflowCustomOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunWorkflowCustomOperationMetadata.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.verb != null && Object.hasOwnProperty.call(message, "verb")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.verb); + if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.requestedCancellation); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.apiVersion); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.target); + if (message.pipelineRunId != null && Object.hasOwnProperty.call(message, "pipelineRunId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.pipelineRunId); + return writer; + }; + + /** + * Encodes the specified RunWorkflowCustomOperationMetadata message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata + * @static + * @param {google.devtools.cloudbuild.v2.IRunWorkflowCustomOperationMetadata} message RunWorkflowCustomOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunWorkflowCustomOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunWorkflowCustomOperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata} RunWorkflowCustomOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunWorkflowCustomOperationMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.verb = reader.string(); + break; + } + case 4: { + message.requestedCancellation = reader.bool(); + break; + } + case 5: { + message.apiVersion = reader.string(); + break; + } + case 6: { + message.target = reader.string(); + break; + } + case 7: { + message.pipelineRunId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunWorkflowCustomOperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata} RunWorkflowCustomOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunWorkflowCustomOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunWorkflowCustomOperationMetadata message. + * @function verify + * @memberof google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunWorkflowCustomOperationMetadata.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.verb != null && message.hasOwnProperty("verb")) + if (!$util.isString(message.verb)) + return "verb: 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"; + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.pipelineRunId != null && message.hasOwnProperty("pipelineRunId")) + if (!$util.isString(message.pipelineRunId)) + return "pipelineRunId: string expected"; + return null; + }; + + /** + * Creates a RunWorkflowCustomOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata} RunWorkflowCustomOperationMetadata + */ + RunWorkflowCustomOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata) + return object; + var message = new $root.google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.verb != null) + message.verb = String(object.verb); + if (object.requestedCancellation != null) + message.requestedCancellation = Boolean(object.requestedCancellation); + if (object.apiVersion != null) + message.apiVersion = String(object.apiVersion); + if (object.target != null) + message.target = String(object.target); + if (object.pipelineRunId != null) + message.pipelineRunId = String(object.pipelineRunId); + return message; + }; + + /** + * Creates a plain object from a RunWorkflowCustomOperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata + * @static + * @param {google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata} message RunWorkflowCustomOperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunWorkflowCustomOperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.verb = ""; + object.requestedCancellation = false; + object.apiVersion = ""; + object.target = ""; + object.pipelineRunId = ""; + } + 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.verb != null && message.hasOwnProperty("verb")) + object.verb = message.verb; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + object.requestedCancellation = message.requestedCancellation; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.pipelineRunId != null && message.hasOwnProperty("pipelineRunId")) + object.pipelineRunId = message.pipelineRunId; + return object; + }; + + /** + * Converts this RunWorkflowCustomOperationMetadata to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata + * @instance + * @returns {Object.} JSON object + */ + RunWorkflowCustomOperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunWorkflowCustomOperationMetadata + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunWorkflowCustomOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata"; + }; + + return RunWorkflowCustomOperationMetadata; + })(); + + v2.RepositoryManager = (function() { + + /** + * Constructs a new RepositoryManager service. + * @memberof google.devtools.cloudbuild.v2 + * @classdesc Represents a RepositoryManager + * @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 RepositoryManager(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (RepositoryManager.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = RepositoryManager; + + /** + * Creates new RepositoryManager service using the specified rpc implementation. + * @function create + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @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 {RepositoryManager} RPC service. Useful where requests and/or responses are streamed. + */ + RepositoryManager.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.devtools.cloudbuild.v2.RepositoryManager|createConnection}. + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @typedef CreateConnectionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateConnection. + * @function createConnection + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @instance + * @param {google.devtools.cloudbuild.v2.ICreateConnectionRequest} request CreateConnectionRequest message or plain object + * @param {google.devtools.cloudbuild.v2.RepositoryManager.CreateConnectionCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(RepositoryManager.prototype.createConnection = function createConnection(request, callback) { + return this.rpcCall(createConnection, $root.google.devtools.cloudbuild.v2.CreateConnectionRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateConnection" }); + + /** + * Calls CreateConnection. + * @function createConnection + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @instance + * @param {google.devtools.cloudbuild.v2.ICreateConnectionRequest} request CreateConnectionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.cloudbuild.v2.RepositoryManager|getConnection}. + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @typedef GetConnectionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.cloudbuild.v2.Connection} [response] Connection + */ + + /** + * Calls GetConnection. + * @function getConnection + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @instance + * @param {google.devtools.cloudbuild.v2.IGetConnectionRequest} request GetConnectionRequest message or plain object + * @param {google.devtools.cloudbuild.v2.RepositoryManager.GetConnectionCallback} callback Node-style callback called with the error, if any, and Connection + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(RepositoryManager.prototype.getConnection = function getConnection(request, callback) { + return this.rpcCall(getConnection, $root.google.devtools.cloudbuild.v2.GetConnectionRequest, $root.google.devtools.cloudbuild.v2.Connection, request, callback); + }, "name", { value: "GetConnection" }); + + /** + * Calls GetConnection. + * @function getConnection + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @instance + * @param {google.devtools.cloudbuild.v2.IGetConnectionRequest} request GetConnectionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.cloudbuild.v2.RepositoryManager|listConnections}. + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @typedef ListConnectionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.cloudbuild.v2.ListConnectionsResponse} [response] ListConnectionsResponse + */ + + /** + * Calls ListConnections. + * @function listConnections + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @instance + * @param {google.devtools.cloudbuild.v2.IListConnectionsRequest} request ListConnectionsRequest message or plain object + * @param {google.devtools.cloudbuild.v2.RepositoryManager.ListConnectionsCallback} callback Node-style callback called with the error, if any, and ListConnectionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(RepositoryManager.prototype.listConnections = function listConnections(request, callback) { + return this.rpcCall(listConnections, $root.google.devtools.cloudbuild.v2.ListConnectionsRequest, $root.google.devtools.cloudbuild.v2.ListConnectionsResponse, request, callback); + }, "name", { value: "ListConnections" }); + + /** + * Calls ListConnections. + * @function listConnections + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @instance + * @param {google.devtools.cloudbuild.v2.IListConnectionsRequest} request ListConnectionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.cloudbuild.v2.RepositoryManager|updateConnection}. + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @typedef UpdateConnectionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateConnection. + * @function updateConnection + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @instance + * @param {google.devtools.cloudbuild.v2.IUpdateConnectionRequest} request UpdateConnectionRequest message or plain object + * @param {google.devtools.cloudbuild.v2.RepositoryManager.UpdateConnectionCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(RepositoryManager.prototype.updateConnection = function updateConnection(request, callback) { + return this.rpcCall(updateConnection, $root.google.devtools.cloudbuild.v2.UpdateConnectionRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateConnection" }); + + /** + * Calls UpdateConnection. + * @function updateConnection + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @instance + * @param {google.devtools.cloudbuild.v2.IUpdateConnectionRequest} request UpdateConnectionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.cloudbuild.v2.RepositoryManager|deleteConnection}. + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @typedef DeleteConnectionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteConnection. + * @function deleteConnection + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @instance + * @param {google.devtools.cloudbuild.v2.IDeleteConnectionRequest} request DeleteConnectionRequest message or plain object + * @param {google.devtools.cloudbuild.v2.RepositoryManager.DeleteConnectionCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(RepositoryManager.prototype.deleteConnection = function deleteConnection(request, callback) { + return this.rpcCall(deleteConnection, $root.google.devtools.cloudbuild.v2.DeleteConnectionRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteConnection" }); + + /** + * Calls DeleteConnection. + * @function deleteConnection + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @instance + * @param {google.devtools.cloudbuild.v2.IDeleteConnectionRequest} request DeleteConnectionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.cloudbuild.v2.RepositoryManager|createRepository}. + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @typedef CreateRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateRepository. + * @function createRepository + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @instance + * @param {google.devtools.cloudbuild.v2.ICreateRepositoryRequest} request CreateRepositoryRequest message or plain object + * @param {google.devtools.cloudbuild.v2.RepositoryManager.CreateRepositoryCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(RepositoryManager.prototype.createRepository = function createRepository(request, callback) { + return this.rpcCall(createRepository, $root.google.devtools.cloudbuild.v2.CreateRepositoryRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateRepository" }); + + /** + * Calls CreateRepository. + * @function createRepository + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @instance + * @param {google.devtools.cloudbuild.v2.ICreateRepositoryRequest} request CreateRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.cloudbuild.v2.RepositoryManager|batchCreateRepositories}. + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @typedef BatchCreateRepositoriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls BatchCreateRepositories. + * @function batchCreateRepositories + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @instance + * @param {google.devtools.cloudbuild.v2.IBatchCreateRepositoriesRequest} request BatchCreateRepositoriesRequest message or plain object + * @param {google.devtools.cloudbuild.v2.RepositoryManager.BatchCreateRepositoriesCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(RepositoryManager.prototype.batchCreateRepositories = function batchCreateRepositories(request, callback) { + return this.rpcCall(batchCreateRepositories, $root.google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "BatchCreateRepositories" }); + + /** + * Calls BatchCreateRepositories. + * @function batchCreateRepositories + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @instance + * @param {google.devtools.cloudbuild.v2.IBatchCreateRepositoriesRequest} request BatchCreateRepositoriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.cloudbuild.v2.RepositoryManager|getRepository}. + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @typedef GetRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.cloudbuild.v2.Repository} [response] Repository + */ + + /** + * Calls GetRepository. + * @function getRepository + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @instance + * @param {google.devtools.cloudbuild.v2.IGetRepositoryRequest} request GetRepositoryRequest message or plain object + * @param {google.devtools.cloudbuild.v2.RepositoryManager.GetRepositoryCallback} callback Node-style callback called with the error, if any, and Repository + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(RepositoryManager.prototype.getRepository = function getRepository(request, callback) { + return this.rpcCall(getRepository, $root.google.devtools.cloudbuild.v2.GetRepositoryRequest, $root.google.devtools.cloudbuild.v2.Repository, request, callback); + }, "name", { value: "GetRepository" }); + + /** + * Calls GetRepository. + * @function getRepository + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @instance + * @param {google.devtools.cloudbuild.v2.IGetRepositoryRequest} request GetRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.cloudbuild.v2.RepositoryManager|listRepositories}. + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @typedef ListRepositoriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.cloudbuild.v2.ListRepositoriesResponse} [response] ListRepositoriesResponse + */ + + /** + * Calls ListRepositories. + * @function listRepositories + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @instance + * @param {google.devtools.cloudbuild.v2.IListRepositoriesRequest} request ListRepositoriesRequest message or plain object + * @param {google.devtools.cloudbuild.v2.RepositoryManager.ListRepositoriesCallback} callback Node-style callback called with the error, if any, and ListRepositoriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(RepositoryManager.prototype.listRepositories = function listRepositories(request, callback) { + return this.rpcCall(listRepositories, $root.google.devtools.cloudbuild.v2.ListRepositoriesRequest, $root.google.devtools.cloudbuild.v2.ListRepositoriesResponse, request, callback); + }, "name", { value: "ListRepositories" }); + + /** + * Calls ListRepositories. + * @function listRepositories + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @instance + * @param {google.devtools.cloudbuild.v2.IListRepositoriesRequest} request ListRepositoriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.cloudbuild.v2.RepositoryManager|deleteRepository}. + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @typedef DeleteRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteRepository. + * @function deleteRepository + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @instance + * @param {google.devtools.cloudbuild.v2.IDeleteRepositoryRequest} request DeleteRepositoryRequest message or plain object + * @param {google.devtools.cloudbuild.v2.RepositoryManager.DeleteRepositoryCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(RepositoryManager.prototype.deleteRepository = function deleteRepository(request, callback) { + return this.rpcCall(deleteRepository, $root.google.devtools.cloudbuild.v2.DeleteRepositoryRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteRepository" }); + + /** + * Calls DeleteRepository. + * @function deleteRepository + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @instance + * @param {google.devtools.cloudbuild.v2.IDeleteRepositoryRequest} request DeleteRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.cloudbuild.v2.RepositoryManager|fetchReadWriteToken}. + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @typedef FetchReadWriteTokenCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse} [response] FetchReadWriteTokenResponse + */ + + /** + * Calls FetchReadWriteToken. + * @function fetchReadWriteToken + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @instance + * @param {google.devtools.cloudbuild.v2.IFetchReadWriteTokenRequest} request FetchReadWriteTokenRequest message or plain object + * @param {google.devtools.cloudbuild.v2.RepositoryManager.FetchReadWriteTokenCallback} callback Node-style callback called with the error, if any, and FetchReadWriteTokenResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(RepositoryManager.prototype.fetchReadWriteToken = function fetchReadWriteToken(request, callback) { + return this.rpcCall(fetchReadWriteToken, $root.google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest, $root.google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse, request, callback); + }, "name", { value: "FetchReadWriteToken" }); + + /** + * Calls FetchReadWriteToken. + * @function fetchReadWriteToken + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @instance + * @param {google.devtools.cloudbuild.v2.IFetchReadWriteTokenRequest} request FetchReadWriteTokenRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.cloudbuild.v2.RepositoryManager|fetchReadToken}. + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @typedef FetchReadTokenCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.cloudbuild.v2.FetchReadTokenResponse} [response] FetchReadTokenResponse + */ + + /** + * Calls FetchReadToken. + * @function fetchReadToken + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @instance + * @param {google.devtools.cloudbuild.v2.IFetchReadTokenRequest} request FetchReadTokenRequest message or plain object + * @param {google.devtools.cloudbuild.v2.RepositoryManager.FetchReadTokenCallback} callback Node-style callback called with the error, if any, and FetchReadTokenResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(RepositoryManager.prototype.fetchReadToken = function fetchReadToken(request, callback) { + return this.rpcCall(fetchReadToken, $root.google.devtools.cloudbuild.v2.FetchReadTokenRequest, $root.google.devtools.cloudbuild.v2.FetchReadTokenResponse, request, callback); + }, "name", { value: "FetchReadToken" }); + + /** + * Calls FetchReadToken. + * @function fetchReadToken + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @instance + * @param {google.devtools.cloudbuild.v2.IFetchReadTokenRequest} request FetchReadTokenRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.cloudbuild.v2.RepositoryManager|fetchLinkableRepositories}. + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @typedef FetchLinkableRepositoriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse} [response] FetchLinkableRepositoriesResponse + */ + + /** + * Calls FetchLinkableRepositories. + * @function fetchLinkableRepositories + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @instance + * @param {google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesRequest} request FetchLinkableRepositoriesRequest message or plain object + * @param {google.devtools.cloudbuild.v2.RepositoryManager.FetchLinkableRepositoriesCallback} callback Node-style callback called with the error, if any, and FetchLinkableRepositoriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(RepositoryManager.prototype.fetchLinkableRepositories = function fetchLinkableRepositories(request, callback) { + return this.rpcCall(fetchLinkableRepositories, $root.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest, $root.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse, request, callback); + }, "name", { value: "FetchLinkableRepositories" }); + + /** + * Calls FetchLinkableRepositories. + * @function fetchLinkableRepositories + * @memberof google.devtools.cloudbuild.v2.RepositoryManager + * @instance + * @param {google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesRequest} request FetchLinkableRepositoriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return RepositoryManager; + })(); + + v2.Connection = (function() { + + /** + * Properties of a Connection. + * @memberof google.devtools.cloudbuild.v2 + * @interface IConnection + * @property {string|null} [name] Connection name + * @property {google.protobuf.ITimestamp|null} [createTime] Connection createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Connection updateTime + * @property {google.devtools.cloudbuild.v2.IGitHubConfig|null} [githubConfig] Connection githubConfig + * @property {google.devtools.cloudbuild.v2.IGitHubEnterpriseConfig|null} [githubEnterpriseConfig] Connection githubEnterpriseConfig + * @property {google.devtools.cloudbuild.v2.IInstallationState|null} [installationState] Connection installationState + * @property {boolean|null} [disabled] Connection disabled + * @property {boolean|null} [reconciling] Connection reconciling + * @property {Object.|null} [annotations] Connection annotations + * @property {string|null} [etag] Connection etag + */ + + /** + * Constructs a new Connection. + * @memberof google.devtools.cloudbuild.v2 + * @classdesc Represents a Connection. + * @implements IConnection + * @constructor + * @param {google.devtools.cloudbuild.v2.IConnection=} [properties] Properties to set + */ + function Connection(properties) { + this.annotations = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Connection name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v2.Connection + * @instance + */ + Connection.prototype.name = ""; + + /** + * Connection createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.devtools.cloudbuild.v2.Connection + * @instance + */ + Connection.prototype.createTime = null; + + /** + * Connection updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.devtools.cloudbuild.v2.Connection + * @instance + */ + Connection.prototype.updateTime = null; + + /** + * Connection githubConfig. + * @member {google.devtools.cloudbuild.v2.IGitHubConfig|null|undefined} githubConfig + * @memberof google.devtools.cloudbuild.v2.Connection + * @instance + */ + Connection.prototype.githubConfig = null; + + /** + * Connection githubEnterpriseConfig. + * @member {google.devtools.cloudbuild.v2.IGitHubEnterpriseConfig|null|undefined} githubEnterpriseConfig + * @memberof google.devtools.cloudbuild.v2.Connection + * @instance + */ + Connection.prototype.githubEnterpriseConfig = null; + + /** + * Connection installationState. + * @member {google.devtools.cloudbuild.v2.IInstallationState|null|undefined} installationState + * @memberof google.devtools.cloudbuild.v2.Connection + * @instance + */ + Connection.prototype.installationState = null; + + /** + * Connection disabled. + * @member {boolean} disabled + * @memberof google.devtools.cloudbuild.v2.Connection + * @instance + */ + Connection.prototype.disabled = false; + + /** + * Connection reconciling. + * @member {boolean} reconciling + * @memberof google.devtools.cloudbuild.v2.Connection + * @instance + */ + Connection.prototype.reconciling = false; + + /** + * Connection annotations. + * @member {Object.} annotations + * @memberof google.devtools.cloudbuild.v2.Connection + * @instance + */ + Connection.prototype.annotations = $util.emptyObject; + + /** + * Connection etag. + * @member {string} etag + * @memberof google.devtools.cloudbuild.v2.Connection + * @instance + */ + Connection.prototype.etag = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Connection connectionConfig. + * @member {"githubConfig"|"githubEnterpriseConfig"|undefined} connectionConfig + * @memberof google.devtools.cloudbuild.v2.Connection + * @instance + */ + Object.defineProperty(Connection.prototype, "connectionConfig", { + get: $util.oneOfGetter($oneOfFields = ["githubConfig", "githubEnterpriseConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Connection instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v2.Connection + * @static + * @param {google.devtools.cloudbuild.v2.IConnection=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v2.Connection} Connection instance + */ + Connection.create = function create(properties) { + return new Connection(properties); + }; + + /** + * Encodes the specified Connection message. Does not implicitly {@link google.devtools.cloudbuild.v2.Connection.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v2.Connection + * @static + * @param {google.devtools.cloudbuild.v2.IConnection} message Connection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Connection.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.githubConfig != null && Object.hasOwnProperty.call(message, "githubConfig")) + $root.google.devtools.cloudbuild.v2.GitHubConfig.encode(message.githubConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.githubEnterpriseConfig != null && Object.hasOwnProperty.call(message, "githubEnterpriseConfig")) + $root.google.devtools.cloudbuild.v2.GitHubEnterpriseConfig.encode(message.githubEnterpriseConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.installationState != null && Object.hasOwnProperty.call(message, "installationState")) + $root.google.devtools.cloudbuild.v2.InstallationState.encode(message.installationState, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.disabled); + if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) + writer.uint32(/* id 14, wireType 0 =*/112).bool(message.reconciling); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.etag); + return writer; + }; + + /** + * Encodes the specified Connection message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.Connection.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v2.Connection + * @static + * @param {google.devtools.cloudbuild.v2.IConnection} message Connection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Connection.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Connection message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v2.Connection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v2.Connection} Connection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Connection.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v2.Connection(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.githubConfig = $root.google.devtools.cloudbuild.v2.GitHubConfig.decode(reader, reader.uint32()); + break; + } + case 6: { + message.githubEnterpriseConfig = $root.google.devtools.cloudbuild.v2.GitHubEnterpriseConfig.decode(reader, reader.uint32()); + break; + } + case 12: { + message.installationState = $root.google.devtools.cloudbuild.v2.InstallationState.decode(reader, reader.uint32()); + break; + } + case 13: { + message.disabled = reader.bool(); + break; + } + case 14: { + message.reconciling = reader.bool(); + break; + } + case 15: { + if (message.annotations === $util.emptyObject) + message.annotations = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.annotations[key] = value; + break; + } + case 16: { + message.etag = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Connection message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v2.Connection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v2.Connection} Connection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Connection.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Connection message. + * @function verify + * @memberof google.devtools.cloudbuild.v2.Connection + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Connection.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.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.githubConfig != null && message.hasOwnProperty("githubConfig")) { + properties.connectionConfig = 1; + { + var error = $root.google.devtools.cloudbuild.v2.GitHubConfig.verify(message.githubConfig); + if (error) + return "githubConfig." + error; + } + } + if (message.githubEnterpriseConfig != null && message.hasOwnProperty("githubEnterpriseConfig")) { + if (properties.connectionConfig === 1) + return "connectionConfig: multiple values"; + properties.connectionConfig = 1; + { + var error = $root.google.devtools.cloudbuild.v2.GitHubEnterpriseConfig.verify(message.githubEnterpriseConfig); + if (error) + return "githubEnterpriseConfig." + error; + } + } + if (message.installationState != null && message.hasOwnProperty("installationState")) { + var error = $root.google.devtools.cloudbuild.v2.InstallationState.verify(message.installationState); + if (error) + return "installationState." + error; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.reconciling != null && message.hasOwnProperty("reconciling")) + if (typeof message.reconciling !== "boolean") + return "reconciling: boolean expected"; + if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (!$util.isObject(message.annotations)) + return "annotations: object expected"; + var key = Object.keys(message.annotations); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.annotations[key[i]])) + return "annotations: string{k:string} expected"; + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a Connection message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v2.Connection + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v2.Connection} Connection + */ + Connection.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v2.Connection) + return object; + var message = new $root.google.devtools.cloudbuild.v2.Connection(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.devtools.cloudbuild.v2.Connection.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.devtools.cloudbuild.v2.Connection.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.githubConfig != null) { + if (typeof object.githubConfig !== "object") + throw TypeError(".google.devtools.cloudbuild.v2.Connection.githubConfig: object expected"); + message.githubConfig = $root.google.devtools.cloudbuild.v2.GitHubConfig.fromObject(object.githubConfig); + } + if (object.githubEnterpriseConfig != null) { + if (typeof object.githubEnterpriseConfig !== "object") + throw TypeError(".google.devtools.cloudbuild.v2.Connection.githubEnterpriseConfig: object expected"); + message.githubEnterpriseConfig = $root.google.devtools.cloudbuild.v2.GitHubEnterpriseConfig.fromObject(object.githubEnterpriseConfig); + } + if (object.installationState != null) { + if (typeof object.installationState !== "object") + throw TypeError(".google.devtools.cloudbuild.v2.Connection.installationState: object expected"); + message.installationState = $root.google.devtools.cloudbuild.v2.InstallationState.fromObject(object.installationState); + } + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.reconciling != null) + message.reconciling = Boolean(object.reconciling); + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.devtools.cloudbuild.v2.Connection.annotations: object expected"); + message.annotations = {}; + for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) + message.annotations[keys[i]] = String(object.annotations[keys[i]]); + } + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a Connection message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v2.Connection + * @static + * @param {google.devtools.cloudbuild.v2.Connection} message Connection + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Connection.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.annotations = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.installationState = null; + object.disabled = false; + object.reconciling = false; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.githubConfig != null && message.hasOwnProperty("githubConfig")) { + object.githubConfig = $root.google.devtools.cloudbuild.v2.GitHubConfig.toObject(message.githubConfig, options); + if (options.oneofs) + object.connectionConfig = "githubConfig"; + } + if (message.githubEnterpriseConfig != null && message.hasOwnProperty("githubEnterpriseConfig")) { + object.githubEnterpriseConfig = $root.google.devtools.cloudbuild.v2.GitHubEnterpriseConfig.toObject(message.githubEnterpriseConfig, options); + if (options.oneofs) + object.connectionConfig = "githubEnterpriseConfig"; + } + if (message.installationState != null && message.hasOwnProperty("installationState")) + object.installationState = $root.google.devtools.cloudbuild.v2.InstallationState.toObject(message.installationState, options); + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.reconciling != null && message.hasOwnProperty("reconciling")) + object.reconciling = message.reconciling; + var keys2; + if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { + object.annotations = {}; + for (var j = 0; j < keys2.length; ++j) + object.annotations[keys2[j]] = message.annotations[keys2[j]]; + } + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this Connection to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v2.Connection + * @instance + * @returns {Object.} JSON object + */ + Connection.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Connection + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v2.Connection + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Connection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v2.Connection"; + }; + + return Connection; + })(); + + v2.InstallationState = (function() { + + /** + * Properties of an InstallationState. + * @memberof google.devtools.cloudbuild.v2 + * @interface IInstallationState + * @property {google.devtools.cloudbuild.v2.InstallationState.Stage|null} [stage] InstallationState stage + * @property {string|null} [message] InstallationState message + * @property {string|null} [actionUri] InstallationState actionUri + */ + + /** + * Constructs a new InstallationState. + * @memberof google.devtools.cloudbuild.v2 + * @classdesc Represents an InstallationState. + * @implements IInstallationState + * @constructor + * @param {google.devtools.cloudbuild.v2.IInstallationState=} [properties] Properties to set + */ + function InstallationState(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InstallationState stage. + * @member {google.devtools.cloudbuild.v2.InstallationState.Stage} stage + * @memberof google.devtools.cloudbuild.v2.InstallationState + * @instance + */ + InstallationState.prototype.stage = 0; + + /** + * InstallationState message. + * @member {string} message + * @memberof google.devtools.cloudbuild.v2.InstallationState + * @instance + */ + InstallationState.prototype.message = ""; + + /** + * InstallationState actionUri. + * @member {string} actionUri + * @memberof google.devtools.cloudbuild.v2.InstallationState + * @instance + */ + InstallationState.prototype.actionUri = ""; + + /** + * Creates a new InstallationState instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v2.InstallationState + * @static + * @param {google.devtools.cloudbuild.v2.IInstallationState=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v2.InstallationState} InstallationState instance + */ + InstallationState.create = function create(properties) { + return new InstallationState(properties); + }; + + /** + * Encodes the specified InstallationState message. Does not implicitly {@link google.devtools.cloudbuild.v2.InstallationState.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v2.InstallationState + * @static + * @param {google.devtools.cloudbuild.v2.IInstallationState} message InstallationState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstallationState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.stage != null && Object.hasOwnProperty.call(message, "stage")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.stage); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.actionUri != null && Object.hasOwnProperty.call(message, "actionUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.actionUri); + return writer; + }; + + /** + * Encodes the specified InstallationState message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.InstallationState.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v2.InstallationState + * @static + * @param {google.devtools.cloudbuild.v2.IInstallationState} message InstallationState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstallationState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InstallationState message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v2.InstallationState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v2.InstallationState} InstallationState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstallationState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v2.InstallationState(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.stage = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + message.actionUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InstallationState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v2.InstallationState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v2.InstallationState} InstallationState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstallationState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InstallationState message. + * @function verify + * @memberof google.devtools.cloudbuild.v2.InstallationState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstallationState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.stage != null && message.hasOwnProperty("stage")) + switch (message.stage) { + default: + return "stage: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 10: + break; + } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.actionUri != null && message.hasOwnProperty("actionUri")) + if (!$util.isString(message.actionUri)) + return "actionUri: string expected"; + return null; + }; + + /** + * Creates an InstallationState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v2.InstallationState + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v2.InstallationState} InstallationState + */ + InstallationState.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v2.InstallationState) + return object; + var message = new $root.google.devtools.cloudbuild.v2.InstallationState(); + switch (object.stage) { + default: + if (typeof object.stage === "number") { + message.stage = object.stage; + break; + } + break; + case "STAGE_UNSPECIFIED": + case 0: + message.stage = 0; + break; + case "PENDING_CREATE_APP": + case 1: + message.stage = 1; + break; + case "PENDING_USER_OAUTH": + case 2: + message.stage = 2; + break; + case "PENDING_INSTALL_APP": + case 3: + message.stage = 3; + break; + case "COMPLETE": + case 10: + message.stage = 10; + break; + } + if (object.message != null) + message.message = String(object.message); + if (object.actionUri != null) + message.actionUri = String(object.actionUri); + return message; + }; + + /** + * Creates a plain object from an InstallationState message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v2.InstallationState + * @static + * @param {google.devtools.cloudbuild.v2.InstallationState} message InstallationState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstallationState.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.stage = options.enums === String ? "STAGE_UNSPECIFIED" : 0; + object.message = ""; + object.actionUri = ""; + } + if (message.stage != null && message.hasOwnProperty("stage")) + object.stage = options.enums === String ? $root.google.devtools.cloudbuild.v2.InstallationState.Stage[message.stage] === undefined ? message.stage : $root.google.devtools.cloudbuild.v2.InstallationState.Stage[message.stage] : message.stage; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.actionUri != null && message.hasOwnProperty("actionUri")) + object.actionUri = message.actionUri; + return object; + }; + + /** + * Converts this InstallationState to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v2.InstallationState + * @instance + * @returns {Object.} JSON object + */ + InstallationState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InstallationState + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v2.InstallationState + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InstallationState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v2.InstallationState"; + }; + + /** + * Stage enum. + * @name google.devtools.cloudbuild.v2.InstallationState.Stage + * @enum {number} + * @property {number} STAGE_UNSPECIFIED=0 STAGE_UNSPECIFIED value + * @property {number} PENDING_CREATE_APP=1 PENDING_CREATE_APP value + * @property {number} PENDING_USER_OAUTH=2 PENDING_USER_OAUTH value + * @property {number} PENDING_INSTALL_APP=3 PENDING_INSTALL_APP value + * @property {number} COMPLETE=10 COMPLETE value + */ + InstallationState.Stage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STAGE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING_CREATE_APP"] = 1; + values[valuesById[2] = "PENDING_USER_OAUTH"] = 2; + values[valuesById[3] = "PENDING_INSTALL_APP"] = 3; + values[valuesById[10] = "COMPLETE"] = 10; + return values; + })(); + + return InstallationState; + })(); + + v2.FetchLinkableRepositoriesRequest = (function() { + + /** + * Properties of a FetchLinkableRepositoriesRequest. + * @memberof google.devtools.cloudbuild.v2 + * @interface IFetchLinkableRepositoriesRequest + * @property {string|null} [connection] FetchLinkableRepositoriesRequest connection + * @property {number|null} [pageSize] FetchLinkableRepositoriesRequest pageSize + * @property {string|null} [pageToken] FetchLinkableRepositoriesRequest pageToken + */ + + /** + * Constructs a new FetchLinkableRepositoriesRequest. + * @memberof google.devtools.cloudbuild.v2 + * @classdesc Represents a FetchLinkableRepositoriesRequest. + * @implements IFetchLinkableRepositoriesRequest + * @constructor + * @param {google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesRequest=} [properties] Properties to set + */ + function FetchLinkableRepositoriesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchLinkableRepositoriesRequest connection. + * @member {string} connection + * @memberof google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest + * @instance + */ + FetchLinkableRepositoriesRequest.prototype.connection = ""; + + /** + * FetchLinkableRepositoriesRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest + * @instance + */ + FetchLinkableRepositoriesRequest.prototype.pageSize = 0; + + /** + * FetchLinkableRepositoriesRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest + * @instance + */ + FetchLinkableRepositoriesRequest.prototype.pageToken = ""; + + /** + * Creates a new FetchLinkableRepositoriesRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest + * @static + * @param {google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest} FetchLinkableRepositoriesRequest instance + */ + FetchLinkableRepositoriesRequest.create = function create(properties) { + return new FetchLinkableRepositoriesRequest(properties); + }; + + /** + * Encodes the specified FetchLinkableRepositoriesRequest message. Does not implicitly {@link google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest + * @static + * @param {google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesRequest} message FetchLinkableRepositoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchLinkableRepositoriesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.connection != null && Object.hasOwnProperty.call(message, "connection")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.connection); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified FetchLinkableRepositoriesRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest + * @static + * @param {google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesRequest} message FetchLinkableRepositoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchLinkableRepositoriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchLinkableRepositoriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest} FetchLinkableRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchLinkableRepositoriesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.connection = 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 FetchLinkableRepositoriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest} FetchLinkableRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchLinkableRepositoriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchLinkableRepositoriesRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchLinkableRepositoriesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.connection != null && message.hasOwnProperty("connection")) + if (!$util.isString(message.connection)) + return "connection: 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 FetchLinkableRepositoriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest} FetchLinkableRepositoriesRequest + */ + FetchLinkableRepositoriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest(); + if (object.connection != null) + message.connection = String(object.connection); + 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 FetchLinkableRepositoriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest + * @static + * @param {google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest} message FetchLinkableRepositoriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchLinkableRepositoriesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.connection = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.connection != null && message.hasOwnProperty("connection")) + object.connection = message.connection; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this FetchLinkableRepositoriesRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest + * @instance + * @returns {Object.} JSON object + */ + FetchLinkableRepositoriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchLinkableRepositoriesRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchLinkableRepositoriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest"; + }; + + return FetchLinkableRepositoriesRequest; + })(); + + v2.FetchLinkableRepositoriesResponse = (function() { + + /** + * Properties of a FetchLinkableRepositoriesResponse. + * @memberof google.devtools.cloudbuild.v2 + * @interface IFetchLinkableRepositoriesResponse + * @property {Array.|null} [repositories] FetchLinkableRepositoriesResponse repositories + * @property {string|null} [nextPageToken] FetchLinkableRepositoriesResponse nextPageToken + */ + + /** + * Constructs a new FetchLinkableRepositoriesResponse. + * @memberof google.devtools.cloudbuild.v2 + * @classdesc Represents a FetchLinkableRepositoriesResponse. + * @implements IFetchLinkableRepositoriesResponse + * @constructor + * @param {google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesResponse=} [properties] Properties to set + */ + function FetchLinkableRepositoriesResponse(properties) { + this.repositories = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchLinkableRepositoriesResponse repositories. + * @member {Array.} repositories + * @memberof google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse + * @instance + */ + FetchLinkableRepositoriesResponse.prototype.repositories = $util.emptyArray; + + /** + * FetchLinkableRepositoriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse + * @instance + */ + FetchLinkableRepositoriesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new FetchLinkableRepositoriesResponse instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse + * @static + * @param {google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesResponse=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse} FetchLinkableRepositoriesResponse instance + */ + FetchLinkableRepositoriesResponse.create = function create(properties) { + return new FetchLinkableRepositoriesResponse(properties); + }; + + /** + * Encodes the specified FetchLinkableRepositoriesResponse message. Does not implicitly {@link google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse + * @static + * @param {google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesResponse} message FetchLinkableRepositoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchLinkableRepositoriesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.repositories != null && message.repositories.length) + for (var i = 0; i < message.repositories.length; ++i) + $root.google.devtools.cloudbuild.v2.Repository.encode(message.repositories[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 FetchLinkableRepositoriesResponse message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse + * @static + * @param {google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesResponse} message FetchLinkableRepositoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchLinkableRepositoriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchLinkableRepositoriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse} FetchLinkableRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchLinkableRepositoriesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.repositories && message.repositories.length)) + message.repositories = []; + message.repositories.push($root.google.devtools.cloudbuild.v2.Repository.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchLinkableRepositoriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse} FetchLinkableRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchLinkableRepositoriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchLinkableRepositoriesResponse message. + * @function verify + * @memberof google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchLinkableRepositoriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.repositories != null && message.hasOwnProperty("repositories")) { + if (!Array.isArray(message.repositories)) + return "repositories: array expected"; + for (var i = 0; i < message.repositories.length; ++i) { + var error = $root.google.devtools.cloudbuild.v2.Repository.verify(message.repositories[i]); + if (error) + return "repositories." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a FetchLinkableRepositoriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse} FetchLinkableRepositoriesResponse + */ + FetchLinkableRepositoriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse) + return object; + var message = new $root.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse(); + if (object.repositories) { + if (!Array.isArray(object.repositories)) + throw TypeError(".google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse.repositories: array expected"); + message.repositories = []; + for (var i = 0; i < object.repositories.length; ++i) { + if (typeof object.repositories[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse.repositories: object expected"); + message.repositories[i] = $root.google.devtools.cloudbuild.v2.Repository.fromObject(object.repositories[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a FetchLinkableRepositoriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse + * @static + * @param {google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse} message FetchLinkableRepositoriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchLinkableRepositoriesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.repositories = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.repositories && message.repositories.length) { + object.repositories = []; + for (var j = 0; j < message.repositories.length; ++j) + object.repositories[j] = $root.google.devtools.cloudbuild.v2.Repository.toObject(message.repositories[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this FetchLinkableRepositoriesResponse to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse + * @instance + * @returns {Object.} JSON object + */ + FetchLinkableRepositoriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchLinkableRepositoriesResponse + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchLinkableRepositoriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse"; + }; + + return FetchLinkableRepositoriesResponse; + })(); + + v2.GitHubConfig = (function() { + + /** + * Properties of a GitHubConfig. + * @memberof google.devtools.cloudbuild.v2 + * @interface IGitHubConfig + * @property {google.devtools.cloudbuild.v2.IOAuthCredential|null} [authorizerCredential] GitHubConfig authorizerCredential + * @property {number|Long|null} [appInstallationId] GitHubConfig appInstallationId + */ + + /** + * Constructs a new GitHubConfig. + * @memberof google.devtools.cloudbuild.v2 + * @classdesc Represents a GitHubConfig. + * @implements IGitHubConfig + * @constructor + * @param {google.devtools.cloudbuild.v2.IGitHubConfig=} [properties] Properties to set + */ + function GitHubConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GitHubConfig authorizerCredential. + * @member {google.devtools.cloudbuild.v2.IOAuthCredential|null|undefined} authorizerCredential + * @memberof google.devtools.cloudbuild.v2.GitHubConfig + * @instance + */ + GitHubConfig.prototype.authorizerCredential = null; + + /** + * GitHubConfig appInstallationId. + * @member {number|Long} appInstallationId + * @memberof google.devtools.cloudbuild.v2.GitHubConfig + * @instance + */ + GitHubConfig.prototype.appInstallationId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new GitHubConfig instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v2.GitHubConfig + * @static + * @param {google.devtools.cloudbuild.v2.IGitHubConfig=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v2.GitHubConfig} GitHubConfig instance + */ + GitHubConfig.create = function create(properties) { + return new GitHubConfig(properties); + }; + + /** + * Encodes the specified GitHubConfig message. Does not implicitly {@link google.devtools.cloudbuild.v2.GitHubConfig.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v2.GitHubConfig + * @static + * @param {google.devtools.cloudbuild.v2.IGitHubConfig} message GitHubConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GitHubConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.authorizerCredential != null && Object.hasOwnProperty.call(message, "authorizerCredential")) + $root.google.devtools.cloudbuild.v2.OAuthCredential.encode(message.authorizerCredential, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.appInstallationId != null && Object.hasOwnProperty.call(message, "appInstallationId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.appInstallationId); + return writer; + }; + + /** + * Encodes the specified GitHubConfig message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.GitHubConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v2.GitHubConfig + * @static + * @param {google.devtools.cloudbuild.v2.IGitHubConfig} message GitHubConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GitHubConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GitHubConfig message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v2.GitHubConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v2.GitHubConfig} GitHubConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GitHubConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v2.GitHubConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.authorizerCredential = $root.google.devtools.cloudbuild.v2.OAuthCredential.decode(reader, reader.uint32()); + break; + } + case 2: { + message.appInstallationId = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GitHubConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v2.GitHubConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v2.GitHubConfig} GitHubConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GitHubConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GitHubConfig message. + * @function verify + * @memberof google.devtools.cloudbuild.v2.GitHubConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GitHubConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.authorizerCredential != null && message.hasOwnProperty("authorizerCredential")) { + var error = $root.google.devtools.cloudbuild.v2.OAuthCredential.verify(message.authorizerCredential); + if (error) + return "authorizerCredential." + error; + } + if (message.appInstallationId != null && message.hasOwnProperty("appInstallationId")) + if (!$util.isInteger(message.appInstallationId) && !(message.appInstallationId && $util.isInteger(message.appInstallationId.low) && $util.isInteger(message.appInstallationId.high))) + return "appInstallationId: integer|Long expected"; + return null; + }; + + /** + * Creates a GitHubConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v2.GitHubConfig + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v2.GitHubConfig} GitHubConfig + */ + GitHubConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v2.GitHubConfig) + return object; + var message = new $root.google.devtools.cloudbuild.v2.GitHubConfig(); + if (object.authorizerCredential != null) { + if (typeof object.authorizerCredential !== "object") + throw TypeError(".google.devtools.cloudbuild.v2.GitHubConfig.authorizerCredential: object expected"); + message.authorizerCredential = $root.google.devtools.cloudbuild.v2.OAuthCredential.fromObject(object.authorizerCredential); + } + if (object.appInstallationId != null) + if ($util.Long) + (message.appInstallationId = $util.Long.fromValue(object.appInstallationId)).unsigned = false; + else if (typeof object.appInstallationId === "string") + message.appInstallationId = parseInt(object.appInstallationId, 10); + else if (typeof object.appInstallationId === "number") + message.appInstallationId = object.appInstallationId; + else if (typeof object.appInstallationId === "object") + message.appInstallationId = new $util.LongBits(object.appInstallationId.low >>> 0, object.appInstallationId.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a GitHubConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v2.GitHubConfig + * @static + * @param {google.devtools.cloudbuild.v2.GitHubConfig} message GitHubConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GitHubConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.authorizerCredential = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.appInstallationId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.appInstallationId = options.longs === String ? "0" : 0; + } + if (message.authorizerCredential != null && message.hasOwnProperty("authorizerCredential")) + object.authorizerCredential = $root.google.devtools.cloudbuild.v2.OAuthCredential.toObject(message.authorizerCredential, options); + if (message.appInstallationId != null && message.hasOwnProperty("appInstallationId")) + if (typeof message.appInstallationId === "number") + object.appInstallationId = options.longs === String ? String(message.appInstallationId) : message.appInstallationId; + else + object.appInstallationId = options.longs === String ? $util.Long.prototype.toString.call(message.appInstallationId) : options.longs === Number ? new $util.LongBits(message.appInstallationId.low >>> 0, message.appInstallationId.high >>> 0).toNumber() : message.appInstallationId; + return object; + }; + + /** + * Converts this GitHubConfig to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v2.GitHubConfig + * @instance + * @returns {Object.} JSON object + */ + GitHubConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GitHubConfig + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v2.GitHubConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GitHubConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v2.GitHubConfig"; + }; + + return GitHubConfig; + })(); + + v2.GitHubEnterpriseConfig = (function() { + + /** + * Properties of a GitHubEnterpriseConfig. + * @memberof google.devtools.cloudbuild.v2 + * @interface IGitHubEnterpriseConfig + * @property {string|null} [hostUri] GitHubEnterpriseConfig hostUri + * @property {string|null} [apiKey] GitHubEnterpriseConfig apiKey + * @property {number|Long|null} [appId] GitHubEnterpriseConfig appId + * @property {string|null} [appSlug] GitHubEnterpriseConfig appSlug + * @property {string|null} [privateKeySecretVersion] GitHubEnterpriseConfig privateKeySecretVersion + * @property {string|null} [webhookSecretSecretVersion] GitHubEnterpriseConfig webhookSecretSecretVersion + * @property {number|Long|null} [appInstallationId] GitHubEnterpriseConfig appInstallationId + * @property {google.devtools.cloudbuild.v2.IServiceDirectoryConfig|null} [serviceDirectoryConfig] GitHubEnterpriseConfig serviceDirectoryConfig + * @property {string|null} [sslCa] GitHubEnterpriseConfig sslCa + * @property {string|null} [serverVersion] GitHubEnterpriseConfig serverVersion + */ + + /** + * Constructs a new GitHubEnterpriseConfig. + * @memberof google.devtools.cloudbuild.v2 + * @classdesc Represents a GitHubEnterpriseConfig. + * @implements IGitHubEnterpriseConfig + * @constructor + * @param {google.devtools.cloudbuild.v2.IGitHubEnterpriseConfig=} [properties] Properties to set + */ + function GitHubEnterpriseConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GitHubEnterpriseConfig hostUri. + * @member {string} hostUri + * @memberof google.devtools.cloudbuild.v2.GitHubEnterpriseConfig + * @instance + */ + GitHubEnterpriseConfig.prototype.hostUri = ""; + + /** + * GitHubEnterpriseConfig apiKey. + * @member {string} apiKey + * @memberof google.devtools.cloudbuild.v2.GitHubEnterpriseConfig + * @instance + */ + GitHubEnterpriseConfig.prototype.apiKey = ""; + + /** + * GitHubEnterpriseConfig appId. + * @member {number|Long} appId + * @memberof google.devtools.cloudbuild.v2.GitHubEnterpriseConfig + * @instance + */ + GitHubEnterpriseConfig.prototype.appId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * GitHubEnterpriseConfig appSlug. + * @member {string} appSlug + * @memberof google.devtools.cloudbuild.v2.GitHubEnterpriseConfig + * @instance + */ + GitHubEnterpriseConfig.prototype.appSlug = ""; + + /** + * GitHubEnterpriseConfig privateKeySecretVersion. + * @member {string} privateKeySecretVersion + * @memberof google.devtools.cloudbuild.v2.GitHubEnterpriseConfig + * @instance + */ + GitHubEnterpriseConfig.prototype.privateKeySecretVersion = ""; + + /** + * GitHubEnterpriseConfig webhookSecretSecretVersion. + * @member {string} webhookSecretSecretVersion + * @memberof google.devtools.cloudbuild.v2.GitHubEnterpriseConfig + * @instance + */ + GitHubEnterpriseConfig.prototype.webhookSecretSecretVersion = ""; + + /** + * GitHubEnterpriseConfig appInstallationId. + * @member {number|Long} appInstallationId + * @memberof google.devtools.cloudbuild.v2.GitHubEnterpriseConfig + * @instance + */ + GitHubEnterpriseConfig.prototype.appInstallationId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * GitHubEnterpriseConfig serviceDirectoryConfig. + * @member {google.devtools.cloudbuild.v2.IServiceDirectoryConfig|null|undefined} serviceDirectoryConfig + * @memberof google.devtools.cloudbuild.v2.GitHubEnterpriseConfig + * @instance + */ + GitHubEnterpriseConfig.prototype.serviceDirectoryConfig = null; + + /** + * GitHubEnterpriseConfig sslCa. + * @member {string} sslCa + * @memberof google.devtools.cloudbuild.v2.GitHubEnterpriseConfig + * @instance + */ + GitHubEnterpriseConfig.prototype.sslCa = ""; + + /** + * GitHubEnterpriseConfig serverVersion. + * @member {string} serverVersion + * @memberof google.devtools.cloudbuild.v2.GitHubEnterpriseConfig + * @instance + */ + GitHubEnterpriseConfig.prototype.serverVersion = ""; + + /** + * Creates a new GitHubEnterpriseConfig instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v2.GitHubEnterpriseConfig + * @static + * @param {google.devtools.cloudbuild.v2.IGitHubEnterpriseConfig=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v2.GitHubEnterpriseConfig} GitHubEnterpriseConfig instance + */ + GitHubEnterpriseConfig.create = function create(properties) { + return new GitHubEnterpriseConfig(properties); + }; + + /** + * Encodes the specified GitHubEnterpriseConfig message. Does not implicitly {@link google.devtools.cloudbuild.v2.GitHubEnterpriseConfig.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v2.GitHubEnterpriseConfig + * @static + * @param {google.devtools.cloudbuild.v2.IGitHubEnterpriseConfig} message GitHubEnterpriseConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GitHubEnterpriseConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hostUri != null && Object.hasOwnProperty.call(message, "hostUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.hostUri); + if (message.appId != null && Object.hasOwnProperty.call(message, "appId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.appId); + if (message.privateKeySecretVersion != null && Object.hasOwnProperty.call(message, "privateKeySecretVersion")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.privateKeySecretVersion); + if (message.webhookSecretSecretVersion != null && Object.hasOwnProperty.call(message, "webhookSecretSecretVersion")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.webhookSecretSecretVersion); + if (message.appInstallationId != null && Object.hasOwnProperty.call(message, "appInstallationId")) + writer.uint32(/* id 9, wireType 0 =*/72).int64(message.appInstallationId); + if (message.serviceDirectoryConfig != null && Object.hasOwnProperty.call(message, "serviceDirectoryConfig")) + $root.google.devtools.cloudbuild.v2.ServiceDirectoryConfig.encode(message.serviceDirectoryConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.sslCa != null && Object.hasOwnProperty.call(message, "sslCa")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.sslCa); + if (message.apiKey != null && Object.hasOwnProperty.call(message, "apiKey")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.apiKey); + if (message.appSlug != null && Object.hasOwnProperty.call(message, "appSlug")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.appSlug); + if (message.serverVersion != null && Object.hasOwnProperty.call(message, "serverVersion")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.serverVersion); + return writer; + }; + + /** + * Encodes the specified GitHubEnterpriseConfig message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.GitHubEnterpriseConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v2.GitHubEnterpriseConfig + * @static + * @param {google.devtools.cloudbuild.v2.IGitHubEnterpriseConfig} message GitHubEnterpriseConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GitHubEnterpriseConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GitHubEnterpriseConfig message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v2.GitHubEnterpriseConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v2.GitHubEnterpriseConfig} GitHubEnterpriseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GitHubEnterpriseConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v2.GitHubEnterpriseConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.hostUri = reader.string(); + break; + } + case 12: { + message.apiKey = reader.string(); + break; + } + case 2: { + message.appId = reader.int64(); + break; + } + case 13: { + message.appSlug = reader.string(); + break; + } + case 4: { + message.privateKeySecretVersion = reader.string(); + break; + } + case 5: { + message.webhookSecretSecretVersion = reader.string(); + break; + } + case 9: { + message.appInstallationId = reader.int64(); + break; + } + case 10: { + message.serviceDirectoryConfig = $root.google.devtools.cloudbuild.v2.ServiceDirectoryConfig.decode(reader, reader.uint32()); + break; + } + case 11: { + message.sslCa = reader.string(); + break; + } + case 14: { + message.serverVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GitHubEnterpriseConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v2.GitHubEnterpriseConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v2.GitHubEnterpriseConfig} GitHubEnterpriseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GitHubEnterpriseConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GitHubEnterpriseConfig message. + * @function verify + * @memberof google.devtools.cloudbuild.v2.GitHubEnterpriseConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GitHubEnterpriseConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hostUri != null && message.hasOwnProperty("hostUri")) + if (!$util.isString(message.hostUri)) + return "hostUri: string expected"; + if (message.apiKey != null && message.hasOwnProperty("apiKey")) + if (!$util.isString(message.apiKey)) + return "apiKey: string expected"; + if (message.appId != null && message.hasOwnProperty("appId")) + if (!$util.isInteger(message.appId) && !(message.appId && $util.isInteger(message.appId.low) && $util.isInteger(message.appId.high))) + return "appId: integer|Long expected"; + if (message.appSlug != null && message.hasOwnProperty("appSlug")) + if (!$util.isString(message.appSlug)) + return "appSlug: string expected"; + if (message.privateKeySecretVersion != null && message.hasOwnProperty("privateKeySecretVersion")) + if (!$util.isString(message.privateKeySecretVersion)) + return "privateKeySecretVersion: string expected"; + if (message.webhookSecretSecretVersion != null && message.hasOwnProperty("webhookSecretSecretVersion")) + if (!$util.isString(message.webhookSecretSecretVersion)) + return "webhookSecretSecretVersion: string expected"; + if (message.appInstallationId != null && message.hasOwnProperty("appInstallationId")) + if (!$util.isInteger(message.appInstallationId) && !(message.appInstallationId && $util.isInteger(message.appInstallationId.low) && $util.isInteger(message.appInstallationId.high))) + return "appInstallationId: integer|Long expected"; + if (message.serviceDirectoryConfig != null && message.hasOwnProperty("serviceDirectoryConfig")) { + var error = $root.google.devtools.cloudbuild.v2.ServiceDirectoryConfig.verify(message.serviceDirectoryConfig); + if (error) + return "serviceDirectoryConfig." + error; + } + if (message.sslCa != null && message.hasOwnProperty("sslCa")) + if (!$util.isString(message.sslCa)) + return "sslCa: string expected"; + if (message.serverVersion != null && message.hasOwnProperty("serverVersion")) + if (!$util.isString(message.serverVersion)) + return "serverVersion: string expected"; + return null; + }; + + /** + * Creates a GitHubEnterpriseConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v2.GitHubEnterpriseConfig + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v2.GitHubEnterpriseConfig} GitHubEnterpriseConfig + */ + GitHubEnterpriseConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v2.GitHubEnterpriseConfig) + return object; + var message = new $root.google.devtools.cloudbuild.v2.GitHubEnterpriseConfig(); + if (object.hostUri != null) + message.hostUri = String(object.hostUri); + if (object.apiKey != null) + message.apiKey = String(object.apiKey); + if (object.appId != null) + if ($util.Long) + (message.appId = $util.Long.fromValue(object.appId)).unsigned = false; + else if (typeof object.appId === "string") + message.appId = parseInt(object.appId, 10); + else if (typeof object.appId === "number") + message.appId = object.appId; + else if (typeof object.appId === "object") + message.appId = new $util.LongBits(object.appId.low >>> 0, object.appId.high >>> 0).toNumber(); + if (object.appSlug != null) + message.appSlug = String(object.appSlug); + if (object.privateKeySecretVersion != null) + message.privateKeySecretVersion = String(object.privateKeySecretVersion); + if (object.webhookSecretSecretVersion != null) + message.webhookSecretSecretVersion = String(object.webhookSecretSecretVersion); + if (object.appInstallationId != null) + if ($util.Long) + (message.appInstallationId = $util.Long.fromValue(object.appInstallationId)).unsigned = false; + else if (typeof object.appInstallationId === "string") + message.appInstallationId = parseInt(object.appInstallationId, 10); + else if (typeof object.appInstallationId === "number") + message.appInstallationId = object.appInstallationId; + else if (typeof object.appInstallationId === "object") + message.appInstallationId = new $util.LongBits(object.appInstallationId.low >>> 0, object.appInstallationId.high >>> 0).toNumber(); + if (object.serviceDirectoryConfig != null) { + if (typeof object.serviceDirectoryConfig !== "object") + throw TypeError(".google.devtools.cloudbuild.v2.GitHubEnterpriseConfig.serviceDirectoryConfig: object expected"); + message.serviceDirectoryConfig = $root.google.devtools.cloudbuild.v2.ServiceDirectoryConfig.fromObject(object.serviceDirectoryConfig); + } + if (object.sslCa != null) + message.sslCa = String(object.sslCa); + if (object.serverVersion != null) + message.serverVersion = String(object.serverVersion); + return message; + }; + + /** + * Creates a plain object from a GitHubEnterpriseConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v2.GitHubEnterpriseConfig + * @static + * @param {google.devtools.cloudbuild.v2.GitHubEnterpriseConfig} message GitHubEnterpriseConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GitHubEnterpriseConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.hostUri = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.appId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.appId = options.longs === String ? "0" : 0; + object.privateKeySecretVersion = ""; + object.webhookSecretSecretVersion = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.appInstallationId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.appInstallationId = options.longs === String ? "0" : 0; + object.serviceDirectoryConfig = null; + object.sslCa = ""; + object.apiKey = ""; + object.appSlug = ""; + object.serverVersion = ""; + } + if (message.hostUri != null && message.hasOwnProperty("hostUri")) + object.hostUri = message.hostUri; + if (message.appId != null && message.hasOwnProperty("appId")) + if (typeof message.appId === "number") + object.appId = options.longs === String ? String(message.appId) : message.appId; + else + object.appId = options.longs === String ? $util.Long.prototype.toString.call(message.appId) : options.longs === Number ? new $util.LongBits(message.appId.low >>> 0, message.appId.high >>> 0).toNumber() : message.appId; + if (message.privateKeySecretVersion != null && message.hasOwnProperty("privateKeySecretVersion")) + object.privateKeySecretVersion = message.privateKeySecretVersion; + if (message.webhookSecretSecretVersion != null && message.hasOwnProperty("webhookSecretSecretVersion")) + object.webhookSecretSecretVersion = message.webhookSecretSecretVersion; + if (message.appInstallationId != null && message.hasOwnProperty("appInstallationId")) + if (typeof message.appInstallationId === "number") + object.appInstallationId = options.longs === String ? String(message.appInstallationId) : message.appInstallationId; + else + object.appInstallationId = options.longs === String ? $util.Long.prototype.toString.call(message.appInstallationId) : options.longs === Number ? new $util.LongBits(message.appInstallationId.low >>> 0, message.appInstallationId.high >>> 0).toNumber() : message.appInstallationId; + if (message.serviceDirectoryConfig != null && message.hasOwnProperty("serviceDirectoryConfig")) + object.serviceDirectoryConfig = $root.google.devtools.cloudbuild.v2.ServiceDirectoryConfig.toObject(message.serviceDirectoryConfig, options); + if (message.sslCa != null && message.hasOwnProperty("sslCa")) + object.sslCa = message.sslCa; + if (message.apiKey != null && message.hasOwnProperty("apiKey")) + object.apiKey = message.apiKey; + if (message.appSlug != null && message.hasOwnProperty("appSlug")) + object.appSlug = message.appSlug; + if (message.serverVersion != null && message.hasOwnProperty("serverVersion")) + object.serverVersion = message.serverVersion; + return object; + }; + + /** + * Converts this GitHubEnterpriseConfig to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v2.GitHubEnterpriseConfig + * @instance + * @returns {Object.} JSON object + */ + GitHubEnterpriseConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GitHubEnterpriseConfig + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v2.GitHubEnterpriseConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GitHubEnterpriseConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v2.GitHubEnterpriseConfig"; + }; + + return GitHubEnterpriseConfig; + })(); + + v2.ServiceDirectoryConfig = (function() { + + /** + * Properties of a ServiceDirectoryConfig. + * @memberof google.devtools.cloudbuild.v2 + * @interface IServiceDirectoryConfig + * @property {string|null} [service] ServiceDirectoryConfig service + */ + + /** + * Constructs a new ServiceDirectoryConfig. + * @memberof google.devtools.cloudbuild.v2 + * @classdesc Represents a ServiceDirectoryConfig. + * @implements IServiceDirectoryConfig + * @constructor + * @param {google.devtools.cloudbuild.v2.IServiceDirectoryConfig=} [properties] Properties to set + */ + function ServiceDirectoryConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDirectoryConfig service. + * @member {string} service + * @memberof google.devtools.cloudbuild.v2.ServiceDirectoryConfig + * @instance + */ + ServiceDirectoryConfig.prototype.service = ""; + + /** + * Creates a new ServiceDirectoryConfig instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v2.ServiceDirectoryConfig + * @static + * @param {google.devtools.cloudbuild.v2.IServiceDirectoryConfig=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v2.ServiceDirectoryConfig} ServiceDirectoryConfig instance + */ + ServiceDirectoryConfig.create = function create(properties) { + return new ServiceDirectoryConfig(properties); + }; + + /** + * Encodes the specified ServiceDirectoryConfig message. Does not implicitly {@link google.devtools.cloudbuild.v2.ServiceDirectoryConfig.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v2.ServiceDirectoryConfig + * @static + * @param {google.devtools.cloudbuild.v2.IServiceDirectoryConfig} message ServiceDirectoryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDirectoryConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); + return writer; + }; + + /** + * Encodes the specified ServiceDirectoryConfig message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.ServiceDirectoryConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v2.ServiceDirectoryConfig + * @static + * @param {google.devtools.cloudbuild.v2.IServiceDirectoryConfig} message ServiceDirectoryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDirectoryConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDirectoryConfig message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v2.ServiceDirectoryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v2.ServiceDirectoryConfig} ServiceDirectoryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDirectoryConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v2.ServiceDirectoryConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.service = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDirectoryConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v2.ServiceDirectoryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v2.ServiceDirectoryConfig} ServiceDirectoryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDirectoryConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDirectoryConfig message. + * @function verify + * @memberof google.devtools.cloudbuild.v2.ServiceDirectoryConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDirectoryConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + return null; + }; + + /** + * Creates a ServiceDirectoryConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v2.ServiceDirectoryConfig + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v2.ServiceDirectoryConfig} ServiceDirectoryConfig + */ + ServiceDirectoryConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v2.ServiceDirectoryConfig) + return object; + var message = new $root.google.devtools.cloudbuild.v2.ServiceDirectoryConfig(); + if (object.service != null) + message.service = String(object.service); + return message; + }; + + /** + * Creates a plain object from a ServiceDirectoryConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v2.ServiceDirectoryConfig + * @static + * @param {google.devtools.cloudbuild.v2.ServiceDirectoryConfig} message ServiceDirectoryConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDirectoryConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.service = ""; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + return object; + }; + + /** + * Converts this ServiceDirectoryConfig to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v2.ServiceDirectoryConfig + * @instance + * @returns {Object.} JSON object + */ + ServiceDirectoryConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDirectoryConfig + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v2.ServiceDirectoryConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDirectoryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v2.ServiceDirectoryConfig"; + }; + + return ServiceDirectoryConfig; + })(); + + v2.Repository = (function() { + + /** + * Properties of a Repository. + * @memberof google.devtools.cloudbuild.v2 + * @interface IRepository + * @property {string|null} [name] Repository name + * @property {string|null} [remoteUri] Repository remoteUri + * @property {google.protobuf.ITimestamp|null} [createTime] Repository createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Repository updateTime + * @property {Object.|null} [annotations] Repository annotations + * @property {string|null} [etag] Repository etag + */ + + /** + * Constructs a new Repository. + * @memberof google.devtools.cloudbuild.v2 + * @classdesc Represents a Repository. + * @implements IRepository + * @constructor + * @param {google.devtools.cloudbuild.v2.IRepository=} [properties] Properties to set + */ + function Repository(properties) { + this.annotations = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Repository name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v2.Repository + * @instance + */ + Repository.prototype.name = ""; + + /** + * Repository remoteUri. + * @member {string} remoteUri + * @memberof google.devtools.cloudbuild.v2.Repository + * @instance + */ + Repository.prototype.remoteUri = ""; + + /** + * Repository createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.devtools.cloudbuild.v2.Repository + * @instance + */ + Repository.prototype.createTime = null; + + /** + * Repository updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.devtools.cloudbuild.v2.Repository + * @instance + */ + Repository.prototype.updateTime = null; + + /** + * Repository annotations. + * @member {Object.} annotations + * @memberof google.devtools.cloudbuild.v2.Repository + * @instance + */ + Repository.prototype.annotations = $util.emptyObject; + + /** + * Repository etag. + * @member {string} etag + * @memberof google.devtools.cloudbuild.v2.Repository + * @instance + */ + Repository.prototype.etag = ""; + + /** + * Creates a new Repository instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v2.Repository + * @static + * @param {google.devtools.cloudbuild.v2.IRepository=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v2.Repository} Repository instance + */ + Repository.create = function create(properties) { + return new Repository(properties); + }; + + /** + * Encodes the specified Repository message. Does not implicitly {@link google.devtools.cloudbuild.v2.Repository.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v2.Repository + * @static + * @param {google.devtools.cloudbuild.v2.IRepository} message Repository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Repository.encode = function encode(message, writer) { + 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.remoteUri != null && Object.hasOwnProperty.call(message, "remoteUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.remoteUri); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.etag); + return writer; + }; + + /** + * Encodes the specified Repository message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.Repository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v2.Repository + * @static + * @param {google.devtools.cloudbuild.v2.IRepository} message Repository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Repository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Repository message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v2.Repository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v2.Repository} Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Repository.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v2.Repository(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.remoteUri = reader.string(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + if (message.annotations === $util.emptyObject) + message.annotations = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.annotations[key] = value; + break; + } + case 7: { + message.etag = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Repository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v2.Repository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v2.Repository} Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Repository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Repository message. + * @function verify + * @memberof google.devtools.cloudbuild.v2.Repository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Repository.verify = function verify(message) { + if (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.remoteUri != null && message.hasOwnProperty("remoteUri")) + if (!$util.isString(message.remoteUri)) + return "remoteUri: 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.annotations != null && message.hasOwnProperty("annotations")) { + if (!$util.isObject(message.annotations)) + return "annotations: object expected"; + var key = Object.keys(message.annotations); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.annotations[key[i]])) + return "annotations: string{k:string} expected"; + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a Repository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v2.Repository + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v2.Repository} Repository + */ + Repository.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v2.Repository) + return object; + var message = new $root.google.devtools.cloudbuild.v2.Repository(); + if (object.name != null) + message.name = String(object.name); + if (object.remoteUri != null) + message.remoteUri = String(object.remoteUri); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.devtools.cloudbuild.v2.Repository.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.devtools.cloudbuild.v2.Repository.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.devtools.cloudbuild.v2.Repository.annotations: object expected"); + message.annotations = {}; + for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) + message.annotations[keys[i]] = String(object.annotations[keys[i]]); + } + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a Repository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v2.Repository + * @static + * @param {google.devtools.cloudbuild.v2.Repository} message Repository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Repository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.annotations = {}; + if (options.defaults) { + object.name = ""; + object.remoteUri = ""; + object.createTime = null; + object.updateTime = null; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.remoteUri != null && message.hasOwnProperty("remoteUri")) + object.remoteUri = message.remoteUri; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { + object.annotations = {}; + for (var j = 0; j < keys2.length; ++j) + object.annotations[keys2[j]] = message.annotations[keys2[j]]; + } + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this Repository to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v2.Repository + * @instance + * @returns {Object.} JSON object + */ + Repository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Repository + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v2.Repository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Repository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v2.Repository"; + }; + + return Repository; + })(); + + v2.OAuthCredential = (function() { + + /** + * Properties of a OAuthCredential. + * @memberof google.devtools.cloudbuild.v2 + * @interface IOAuthCredential + * @property {string|null} [oauthTokenSecretVersion] OAuthCredential oauthTokenSecretVersion + * @property {string|null} [username] OAuthCredential username + */ + + /** + * Constructs a new OAuthCredential. + * @memberof google.devtools.cloudbuild.v2 + * @classdesc Represents a OAuthCredential. + * @implements IOAuthCredential + * @constructor + * @param {google.devtools.cloudbuild.v2.IOAuthCredential=} [properties] Properties to set + */ + function OAuthCredential(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OAuthCredential oauthTokenSecretVersion. + * @member {string} oauthTokenSecretVersion + * @memberof google.devtools.cloudbuild.v2.OAuthCredential + * @instance + */ + OAuthCredential.prototype.oauthTokenSecretVersion = ""; + + /** + * OAuthCredential username. + * @member {string} username + * @memberof google.devtools.cloudbuild.v2.OAuthCredential + * @instance + */ + OAuthCredential.prototype.username = ""; + + /** + * Creates a new OAuthCredential instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v2.OAuthCredential + * @static + * @param {google.devtools.cloudbuild.v2.IOAuthCredential=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v2.OAuthCredential} OAuthCredential instance + */ + OAuthCredential.create = function create(properties) { + return new OAuthCredential(properties); + }; + + /** + * Encodes the specified OAuthCredential message. Does not implicitly {@link google.devtools.cloudbuild.v2.OAuthCredential.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v2.OAuthCredential + * @static + * @param {google.devtools.cloudbuild.v2.IOAuthCredential} message OAuthCredential message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OAuthCredential.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.oauthTokenSecretVersion != null && Object.hasOwnProperty.call(message, "oauthTokenSecretVersion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.oauthTokenSecretVersion); + if (message.username != null && Object.hasOwnProperty.call(message, "username")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.username); + return writer; + }; + + /** + * Encodes the specified OAuthCredential message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.OAuthCredential.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v2.OAuthCredential + * @static + * @param {google.devtools.cloudbuild.v2.IOAuthCredential} message OAuthCredential message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OAuthCredential.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a OAuthCredential message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v2.OAuthCredential + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v2.OAuthCredential} OAuthCredential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OAuthCredential.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v2.OAuthCredential(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.oauthTokenSecretVersion = reader.string(); + break; + } + case 2: { + message.username = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a OAuthCredential message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v2.OAuthCredential + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v2.OAuthCredential} OAuthCredential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OAuthCredential.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a OAuthCredential message. + * @function verify + * @memberof google.devtools.cloudbuild.v2.OAuthCredential + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OAuthCredential.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.oauthTokenSecretVersion != null && message.hasOwnProperty("oauthTokenSecretVersion")) + if (!$util.isString(message.oauthTokenSecretVersion)) + return "oauthTokenSecretVersion: string expected"; + if (message.username != null && message.hasOwnProperty("username")) + if (!$util.isString(message.username)) + return "username: string expected"; + return null; + }; + + /** + * Creates a OAuthCredential message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v2.OAuthCredential + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v2.OAuthCredential} OAuthCredential + */ + OAuthCredential.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v2.OAuthCredential) + return object; + var message = new $root.google.devtools.cloudbuild.v2.OAuthCredential(); + if (object.oauthTokenSecretVersion != null) + message.oauthTokenSecretVersion = String(object.oauthTokenSecretVersion); + if (object.username != null) + message.username = String(object.username); + return message; + }; + + /** + * Creates a plain object from a OAuthCredential message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v2.OAuthCredential + * @static + * @param {google.devtools.cloudbuild.v2.OAuthCredential} message OAuthCredential + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OAuthCredential.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.oauthTokenSecretVersion = ""; + object.username = ""; + } + if (message.oauthTokenSecretVersion != null && message.hasOwnProperty("oauthTokenSecretVersion")) + object.oauthTokenSecretVersion = message.oauthTokenSecretVersion; + if (message.username != null && message.hasOwnProperty("username")) + object.username = message.username; + return object; + }; + + /** + * Converts this OAuthCredential to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v2.OAuthCredential + * @instance + * @returns {Object.} JSON object + */ + OAuthCredential.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OAuthCredential + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v2.OAuthCredential + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OAuthCredential.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v2.OAuthCredential"; + }; + + return OAuthCredential; + })(); + + v2.CreateConnectionRequest = (function() { + + /** + * Properties of a CreateConnectionRequest. + * @memberof google.devtools.cloudbuild.v2 + * @interface ICreateConnectionRequest + * @property {string|null} [parent] CreateConnectionRequest parent + * @property {google.devtools.cloudbuild.v2.IConnection|null} [connection] CreateConnectionRequest connection + * @property {string|null} [connectionId] CreateConnectionRequest connectionId + */ + + /** + * Constructs a new CreateConnectionRequest. + * @memberof google.devtools.cloudbuild.v2 + * @classdesc Represents a CreateConnectionRequest. + * @implements ICreateConnectionRequest + * @constructor + * @param {google.devtools.cloudbuild.v2.ICreateConnectionRequest=} [properties] Properties to set + */ + function CreateConnectionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateConnectionRequest parent. + * @member {string} parent + * @memberof google.devtools.cloudbuild.v2.CreateConnectionRequest + * @instance + */ + CreateConnectionRequest.prototype.parent = ""; + + /** + * CreateConnectionRequest connection. + * @member {google.devtools.cloudbuild.v2.IConnection|null|undefined} connection + * @memberof google.devtools.cloudbuild.v2.CreateConnectionRequest + * @instance + */ + CreateConnectionRequest.prototype.connection = null; + + /** + * CreateConnectionRequest connectionId. + * @member {string} connectionId + * @memberof google.devtools.cloudbuild.v2.CreateConnectionRequest + * @instance + */ + CreateConnectionRequest.prototype.connectionId = ""; + + /** + * Creates a new CreateConnectionRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v2.CreateConnectionRequest + * @static + * @param {google.devtools.cloudbuild.v2.ICreateConnectionRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v2.CreateConnectionRequest} CreateConnectionRequest instance + */ + CreateConnectionRequest.create = function create(properties) { + return new CreateConnectionRequest(properties); + }; + + /** + * Encodes the specified CreateConnectionRequest message. Does not implicitly {@link google.devtools.cloudbuild.v2.CreateConnectionRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v2.CreateConnectionRequest + * @static + * @param {google.devtools.cloudbuild.v2.ICreateConnectionRequest} message CreateConnectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConnectionRequest.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.connection != null && Object.hasOwnProperty.call(message, "connection")) + $root.google.devtools.cloudbuild.v2.Connection.encode(message.connection, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.connectionId != null && Object.hasOwnProperty.call(message, "connectionId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.connectionId); + return writer; + }; + + /** + * Encodes the specified CreateConnectionRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.CreateConnectionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v2.CreateConnectionRequest + * @static + * @param {google.devtools.cloudbuild.v2.ICreateConnectionRequest} message CreateConnectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateConnectionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v2.CreateConnectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v2.CreateConnectionRequest} CreateConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConnectionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v2.CreateConnectionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.connection = $root.google.devtools.cloudbuild.v2.Connection.decode(reader, reader.uint32()); + break; + } + case 3: { + message.connectionId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateConnectionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v2.CreateConnectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v2.CreateConnectionRequest} CreateConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConnectionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateConnectionRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v2.CreateConnectionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateConnectionRequest.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.connection != null && message.hasOwnProperty("connection")) { + var error = $root.google.devtools.cloudbuild.v2.Connection.verify(message.connection); + if (error) + return "connection." + error; + } + if (message.connectionId != null && message.hasOwnProperty("connectionId")) + if (!$util.isString(message.connectionId)) + return "connectionId: string expected"; + return null; + }; + + /** + * Creates a CreateConnectionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v2.CreateConnectionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v2.CreateConnectionRequest} CreateConnectionRequest + */ + CreateConnectionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v2.CreateConnectionRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v2.CreateConnectionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.connection != null) { + if (typeof object.connection !== "object") + throw TypeError(".google.devtools.cloudbuild.v2.CreateConnectionRequest.connection: object expected"); + message.connection = $root.google.devtools.cloudbuild.v2.Connection.fromObject(object.connection); + } + if (object.connectionId != null) + message.connectionId = String(object.connectionId); + return message; + }; + + /** + * Creates a plain object from a CreateConnectionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v2.CreateConnectionRequest + * @static + * @param {google.devtools.cloudbuild.v2.CreateConnectionRequest} message CreateConnectionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateConnectionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.connection = null; + object.connectionId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.connection != null && message.hasOwnProperty("connection")) + object.connection = $root.google.devtools.cloudbuild.v2.Connection.toObject(message.connection, options); + if (message.connectionId != null && message.hasOwnProperty("connectionId")) + object.connectionId = message.connectionId; + return object; + }; + + /** + * Converts this CreateConnectionRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v2.CreateConnectionRequest + * @instance + * @returns {Object.} JSON object + */ + CreateConnectionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateConnectionRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v2.CreateConnectionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateConnectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v2.CreateConnectionRequest"; + }; + + return CreateConnectionRequest; + })(); + + v2.GetConnectionRequest = (function() { + + /** + * Properties of a GetConnectionRequest. + * @memberof google.devtools.cloudbuild.v2 + * @interface IGetConnectionRequest + * @property {string|null} [name] GetConnectionRequest name + */ + + /** + * Constructs a new GetConnectionRequest. + * @memberof google.devtools.cloudbuild.v2 + * @classdesc Represents a GetConnectionRequest. + * @implements IGetConnectionRequest + * @constructor + * @param {google.devtools.cloudbuild.v2.IGetConnectionRequest=} [properties] Properties to set + */ + function GetConnectionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetConnectionRequest name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v2.GetConnectionRequest + * @instance + */ + GetConnectionRequest.prototype.name = ""; + + /** + * Creates a new GetConnectionRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v2.GetConnectionRequest + * @static + * @param {google.devtools.cloudbuild.v2.IGetConnectionRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v2.GetConnectionRequest} GetConnectionRequest instance + */ + GetConnectionRequest.create = function create(properties) { + return new GetConnectionRequest(properties); + }; + + /** + * Encodes the specified GetConnectionRequest message. Does not implicitly {@link google.devtools.cloudbuild.v2.GetConnectionRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v2.GetConnectionRequest + * @static + * @param {google.devtools.cloudbuild.v2.IGetConnectionRequest} message GetConnectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConnectionRequest.encode = function encode(message, writer) { + 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 GetConnectionRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.GetConnectionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v2.GetConnectionRequest + * @static + * @param {google.devtools.cloudbuild.v2.IGetConnectionRequest} message GetConnectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetConnectionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v2.GetConnectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v2.GetConnectionRequest} GetConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConnectionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v2.GetConnectionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetConnectionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v2.GetConnectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v2.GetConnectionRequest} GetConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConnectionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetConnectionRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v2.GetConnectionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetConnectionRequest.verify = function verify(message) { + if (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 GetConnectionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v2.GetConnectionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v2.GetConnectionRequest} GetConnectionRequest + */ + GetConnectionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v2.GetConnectionRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v2.GetConnectionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetConnectionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v2.GetConnectionRequest + * @static + * @param {google.devtools.cloudbuild.v2.GetConnectionRequest} message GetConnectionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetConnectionRequest.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 GetConnectionRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v2.GetConnectionRequest + * @instance + * @returns {Object.} JSON object + */ + GetConnectionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetConnectionRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v2.GetConnectionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetConnectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v2.GetConnectionRequest"; + }; + + return GetConnectionRequest; + })(); + + v2.ListConnectionsRequest = (function() { + + /** + * Properties of a ListConnectionsRequest. + * @memberof google.devtools.cloudbuild.v2 + * @interface IListConnectionsRequest + * @property {string|null} [parent] ListConnectionsRequest parent + * @property {number|null} [pageSize] ListConnectionsRequest pageSize + * @property {string|null} [pageToken] ListConnectionsRequest pageToken + */ + + /** + * Constructs a new ListConnectionsRequest. + * @memberof google.devtools.cloudbuild.v2 + * @classdesc Represents a ListConnectionsRequest. + * @implements IListConnectionsRequest + * @constructor + * @param {google.devtools.cloudbuild.v2.IListConnectionsRequest=} [properties] Properties to set + */ + function ListConnectionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListConnectionsRequest parent. + * @member {string} parent + * @memberof google.devtools.cloudbuild.v2.ListConnectionsRequest + * @instance + */ + ListConnectionsRequest.prototype.parent = ""; + + /** + * ListConnectionsRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.cloudbuild.v2.ListConnectionsRequest + * @instance + */ + ListConnectionsRequest.prototype.pageSize = 0; + + /** + * ListConnectionsRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.cloudbuild.v2.ListConnectionsRequest + * @instance + */ + ListConnectionsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListConnectionsRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v2.ListConnectionsRequest + * @static + * @param {google.devtools.cloudbuild.v2.IListConnectionsRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v2.ListConnectionsRequest} ListConnectionsRequest instance + */ + ListConnectionsRequest.create = function create(properties) { + return new ListConnectionsRequest(properties); + }; + + /** + * Encodes the specified ListConnectionsRequest message. Does not implicitly {@link google.devtools.cloudbuild.v2.ListConnectionsRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v2.ListConnectionsRequest + * @static + * @param {google.devtools.cloudbuild.v2.IListConnectionsRequest} message ListConnectionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListConnectionsRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.ListConnectionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v2.ListConnectionsRequest + * @static + * @param {google.devtools.cloudbuild.v2.IListConnectionsRequest} message ListConnectionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConnectionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v2.ListConnectionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v2.ListConnectionsRequest} ListConnectionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v2.ListConnectionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListConnectionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v2.ListConnectionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v2.ListConnectionsRequest} ListConnectionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConnectionsRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v2.ListConnectionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConnectionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListConnectionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v2.ListConnectionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v2.ListConnectionsRequest} ListConnectionsRequest + */ + ListConnectionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v2.ListConnectionsRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v2.ListConnectionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListConnectionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v2.ListConnectionsRequest + * @static + * @param {google.devtools.cloudbuild.v2.ListConnectionsRequest} message ListConnectionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConnectionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListConnectionsRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v2.ListConnectionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListConnectionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConnectionsRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v2.ListConnectionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConnectionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v2.ListConnectionsRequest"; + }; + + return ListConnectionsRequest; + })(); + + v2.ListConnectionsResponse = (function() { + + /** + * Properties of a ListConnectionsResponse. + * @memberof google.devtools.cloudbuild.v2 + * @interface IListConnectionsResponse + * @property {Array.|null} [connections] ListConnectionsResponse connections + * @property {string|null} [nextPageToken] ListConnectionsResponse nextPageToken + */ + + /** + * Constructs a new ListConnectionsResponse. + * @memberof google.devtools.cloudbuild.v2 + * @classdesc Represents a ListConnectionsResponse. + * @implements IListConnectionsResponse + * @constructor + * @param {google.devtools.cloudbuild.v2.IListConnectionsResponse=} [properties] Properties to set + */ + function ListConnectionsResponse(properties) { + this.connections = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListConnectionsResponse connections. + * @member {Array.} connections + * @memberof google.devtools.cloudbuild.v2.ListConnectionsResponse + * @instance + */ + ListConnectionsResponse.prototype.connections = $util.emptyArray; + + /** + * ListConnectionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.cloudbuild.v2.ListConnectionsResponse + * @instance + */ + ListConnectionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListConnectionsResponse instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v2.ListConnectionsResponse + * @static + * @param {google.devtools.cloudbuild.v2.IListConnectionsResponse=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v2.ListConnectionsResponse} ListConnectionsResponse instance + */ + ListConnectionsResponse.create = function create(properties) { + return new ListConnectionsResponse(properties); + }; + + /** + * Encodes the specified ListConnectionsResponse message. Does not implicitly {@link google.devtools.cloudbuild.v2.ListConnectionsResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v2.ListConnectionsResponse + * @static + * @param {google.devtools.cloudbuild.v2.IListConnectionsResponse} message ListConnectionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.connections != null && message.connections.length) + for (var i = 0; i < message.connections.length; ++i) + $root.google.devtools.cloudbuild.v2.Connection.encode(message.connections[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 ListConnectionsResponse message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.ListConnectionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v2.ListConnectionsResponse + * @static + * @param {google.devtools.cloudbuild.v2.IListConnectionsResponse} message ListConnectionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConnectionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v2.ListConnectionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v2.ListConnectionsResponse} ListConnectionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v2.ListConnectionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.connections && message.connections.length)) + message.connections = []; + message.connections.push($root.google.devtools.cloudbuild.v2.Connection.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListConnectionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v2.ListConnectionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v2.ListConnectionsResponse} ListConnectionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConnectionsResponse message. + * @function verify + * @memberof google.devtools.cloudbuild.v2.ListConnectionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConnectionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.connections != null && message.hasOwnProperty("connections")) { + if (!Array.isArray(message.connections)) + return "connections: array expected"; + for (var i = 0; i < message.connections.length; ++i) { + var error = $root.google.devtools.cloudbuild.v2.Connection.verify(message.connections[i]); + if (error) + return "connections." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListConnectionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v2.ListConnectionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v2.ListConnectionsResponse} ListConnectionsResponse + */ + ListConnectionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v2.ListConnectionsResponse) + return object; + var message = new $root.google.devtools.cloudbuild.v2.ListConnectionsResponse(); + if (object.connections) { + if (!Array.isArray(object.connections)) + throw TypeError(".google.devtools.cloudbuild.v2.ListConnectionsResponse.connections: array expected"); + message.connections = []; + for (var i = 0; i < object.connections.length; ++i) { + if (typeof object.connections[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v2.ListConnectionsResponse.connections: object expected"); + message.connections[i] = $root.google.devtools.cloudbuild.v2.Connection.fromObject(object.connections[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListConnectionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v2.ListConnectionsResponse + * @static + * @param {google.devtools.cloudbuild.v2.ListConnectionsResponse} message ListConnectionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConnectionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.connections = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.connections && message.connections.length) { + object.connections = []; + for (var j = 0; j < message.connections.length; ++j) + object.connections[j] = $root.google.devtools.cloudbuild.v2.Connection.toObject(message.connections[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListConnectionsResponse to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v2.ListConnectionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListConnectionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConnectionsResponse + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v2.ListConnectionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConnectionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v2.ListConnectionsResponse"; + }; + + return ListConnectionsResponse; + })(); + + v2.UpdateConnectionRequest = (function() { + + /** + * Properties of an UpdateConnectionRequest. + * @memberof google.devtools.cloudbuild.v2 + * @interface IUpdateConnectionRequest + * @property {google.devtools.cloudbuild.v2.IConnection|null} [connection] UpdateConnectionRequest connection + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateConnectionRequest updateMask + * @property {boolean|null} [allowMissing] UpdateConnectionRequest allowMissing + * @property {string|null} [etag] UpdateConnectionRequest etag + */ + + /** + * Constructs a new UpdateConnectionRequest. + * @memberof google.devtools.cloudbuild.v2 + * @classdesc Represents an UpdateConnectionRequest. + * @implements IUpdateConnectionRequest + * @constructor + * @param {google.devtools.cloudbuild.v2.IUpdateConnectionRequest=} [properties] Properties to set + */ + function UpdateConnectionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateConnectionRequest connection. + * @member {google.devtools.cloudbuild.v2.IConnection|null|undefined} connection + * @memberof google.devtools.cloudbuild.v2.UpdateConnectionRequest + * @instance + */ + UpdateConnectionRequest.prototype.connection = null; + + /** + * UpdateConnectionRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.devtools.cloudbuild.v2.UpdateConnectionRequest + * @instance + */ + UpdateConnectionRequest.prototype.updateMask = null; + + /** + * UpdateConnectionRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.devtools.cloudbuild.v2.UpdateConnectionRequest + * @instance + */ + UpdateConnectionRequest.prototype.allowMissing = false; + + /** + * UpdateConnectionRequest etag. + * @member {string} etag + * @memberof google.devtools.cloudbuild.v2.UpdateConnectionRequest + * @instance + */ + UpdateConnectionRequest.prototype.etag = ""; + + /** + * Creates a new UpdateConnectionRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v2.UpdateConnectionRequest + * @static + * @param {google.devtools.cloudbuild.v2.IUpdateConnectionRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v2.UpdateConnectionRequest} UpdateConnectionRequest instance + */ + UpdateConnectionRequest.create = function create(properties) { + return new UpdateConnectionRequest(properties); + }; + + /** + * Encodes the specified UpdateConnectionRequest message. Does not implicitly {@link google.devtools.cloudbuild.v2.UpdateConnectionRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v2.UpdateConnectionRequest + * @static + * @param {google.devtools.cloudbuild.v2.IUpdateConnectionRequest} message UpdateConnectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateConnectionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.connection != null && Object.hasOwnProperty.call(message, "connection")) + $root.google.devtools.cloudbuild.v2.Connection.encode(message.connection, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); + return writer; + }; + + /** + * Encodes the specified UpdateConnectionRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.UpdateConnectionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v2.UpdateConnectionRequest + * @static + * @param {google.devtools.cloudbuild.v2.IUpdateConnectionRequest} message UpdateConnectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateConnectionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v2.UpdateConnectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v2.UpdateConnectionRequest} UpdateConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateConnectionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v2.UpdateConnectionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.connection = $root.google.devtools.cloudbuild.v2.Connection.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.allowMissing = reader.bool(); + break; + } + case 4: { + message.etag = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateConnectionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v2.UpdateConnectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v2.UpdateConnectionRequest} UpdateConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateConnectionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateConnectionRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v2.UpdateConnectionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateConnectionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.connection != null && message.hasOwnProperty("connection")) { + var error = $root.google.devtools.cloudbuild.v2.Connection.verify(message.connection); + if (error) + return "connection." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates an UpdateConnectionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v2.UpdateConnectionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v2.UpdateConnectionRequest} UpdateConnectionRequest + */ + UpdateConnectionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v2.UpdateConnectionRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v2.UpdateConnectionRequest(); + if (object.connection != null) { + if (typeof object.connection !== "object") + throw TypeError(".google.devtools.cloudbuild.v2.UpdateConnectionRequest.connection: object expected"); + message.connection = $root.google.devtools.cloudbuild.v2.Connection.fromObject(object.connection); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.devtools.cloudbuild.v2.UpdateConnectionRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from an UpdateConnectionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v2.UpdateConnectionRequest + * @static + * @param {google.devtools.cloudbuild.v2.UpdateConnectionRequest} message UpdateConnectionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateConnectionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.connection = null; + object.updateMask = null; + object.allowMissing = false; + object.etag = ""; + } + if (message.connection != null && message.hasOwnProperty("connection")) + object.connection = $root.google.devtools.cloudbuild.v2.Connection.toObject(message.connection, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this UpdateConnectionRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v2.UpdateConnectionRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateConnectionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateConnectionRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v2.UpdateConnectionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateConnectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v2.UpdateConnectionRequest"; + }; + + return UpdateConnectionRequest; + })(); + + v2.DeleteConnectionRequest = (function() { + + /** + * Properties of a DeleteConnectionRequest. + * @memberof google.devtools.cloudbuild.v2 + * @interface IDeleteConnectionRequest + * @property {string|null} [name] DeleteConnectionRequest name + * @property {string|null} [etag] DeleteConnectionRequest etag + * @property {boolean|null} [validateOnly] DeleteConnectionRequest validateOnly + */ + + /** + * Constructs a new DeleteConnectionRequest. + * @memberof google.devtools.cloudbuild.v2 + * @classdesc Represents a DeleteConnectionRequest. + * @implements IDeleteConnectionRequest + * @constructor + * @param {google.devtools.cloudbuild.v2.IDeleteConnectionRequest=} [properties] Properties to set + */ + function DeleteConnectionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteConnectionRequest name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v2.DeleteConnectionRequest + * @instance + */ + DeleteConnectionRequest.prototype.name = ""; + + /** + * DeleteConnectionRequest etag. + * @member {string} etag + * @memberof google.devtools.cloudbuild.v2.DeleteConnectionRequest + * @instance + */ + DeleteConnectionRequest.prototype.etag = ""; + + /** + * DeleteConnectionRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.devtools.cloudbuild.v2.DeleteConnectionRequest + * @instance + */ + DeleteConnectionRequest.prototype.validateOnly = false; + + /** + * Creates a new DeleteConnectionRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v2.DeleteConnectionRequest + * @static + * @param {google.devtools.cloudbuild.v2.IDeleteConnectionRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v2.DeleteConnectionRequest} DeleteConnectionRequest instance + */ + DeleteConnectionRequest.create = function create(properties) { + return new DeleteConnectionRequest(properties); + }; + + /** + * Encodes the specified DeleteConnectionRequest message. Does not implicitly {@link google.devtools.cloudbuild.v2.DeleteConnectionRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v2.DeleteConnectionRequest + * @static + * @param {google.devtools.cloudbuild.v2.IDeleteConnectionRequest} message DeleteConnectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConnectionRequest.encode = function encode(message, writer) { + 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.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified DeleteConnectionRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.DeleteConnectionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v2.DeleteConnectionRequest + * @static + * @param {google.devtools.cloudbuild.v2.IDeleteConnectionRequest} message DeleteConnectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteConnectionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v2.DeleteConnectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v2.DeleteConnectionRequest} DeleteConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConnectionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v2.DeleteConnectionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.etag = reader.string(); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteConnectionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v2.DeleteConnectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v2.DeleteConnectionRequest} DeleteConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConnectionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteConnectionRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v2.DeleteConnectionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteConnectionRequest.verify = function verify(message) { + if (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.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a DeleteConnectionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v2.DeleteConnectionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v2.DeleteConnectionRequest} DeleteConnectionRequest + */ + DeleteConnectionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v2.DeleteConnectionRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v2.DeleteConnectionRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.etag != null) + message.etag = String(object.etag); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a DeleteConnectionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v2.DeleteConnectionRequest + * @static + * @param {google.devtools.cloudbuild.v2.DeleteConnectionRequest} message DeleteConnectionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteConnectionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.etag = ""; + object.validateOnly = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this DeleteConnectionRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v2.DeleteConnectionRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteConnectionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteConnectionRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v2.DeleteConnectionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteConnectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v2.DeleteConnectionRequest"; + }; + + return DeleteConnectionRequest; + })(); + + v2.CreateRepositoryRequest = (function() { + + /** + * Properties of a CreateRepositoryRequest. + * @memberof google.devtools.cloudbuild.v2 + * @interface ICreateRepositoryRequest + * @property {string|null} [parent] CreateRepositoryRequest parent + * @property {google.devtools.cloudbuild.v2.IRepository|null} [repository] CreateRepositoryRequest repository + * @property {string|null} [repositoryId] CreateRepositoryRequest repositoryId + */ + + /** + * Constructs a new CreateRepositoryRequest. + * @memberof google.devtools.cloudbuild.v2 + * @classdesc Represents a CreateRepositoryRequest. + * @implements ICreateRepositoryRequest + * @constructor + * @param {google.devtools.cloudbuild.v2.ICreateRepositoryRequest=} [properties] Properties to set + */ + function CreateRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateRepositoryRequest parent. + * @member {string} parent + * @memberof google.devtools.cloudbuild.v2.CreateRepositoryRequest + * @instance + */ + CreateRepositoryRequest.prototype.parent = ""; + + /** + * CreateRepositoryRequest repository. + * @member {google.devtools.cloudbuild.v2.IRepository|null|undefined} repository + * @memberof google.devtools.cloudbuild.v2.CreateRepositoryRequest + * @instance + */ + CreateRepositoryRequest.prototype.repository = null; + + /** + * CreateRepositoryRequest repositoryId. + * @member {string} repositoryId + * @memberof google.devtools.cloudbuild.v2.CreateRepositoryRequest + * @instance + */ + CreateRepositoryRequest.prototype.repositoryId = ""; + + /** + * Creates a new CreateRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v2.CreateRepositoryRequest + * @static + * @param {google.devtools.cloudbuild.v2.ICreateRepositoryRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v2.CreateRepositoryRequest} CreateRepositoryRequest instance + */ + CreateRepositoryRequest.create = function create(properties) { + return new CreateRepositoryRequest(properties); + }; + + /** + * Encodes the specified CreateRepositoryRequest message. Does not implicitly {@link google.devtools.cloudbuild.v2.CreateRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v2.CreateRepositoryRequest + * @static + * @param {google.devtools.cloudbuild.v2.ICreateRepositoryRequest} message CreateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateRepositoryRequest.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.repository != null && Object.hasOwnProperty.call(message, "repository")) + $root.google.devtools.cloudbuild.v2.Repository.encode(message.repository, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.repositoryId != null && Object.hasOwnProperty.call(message, "repositoryId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.repositoryId); + return writer; + }; + + /** + * Encodes the specified CreateRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.CreateRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v2.CreateRepositoryRequest + * @static + * @param {google.devtools.cloudbuild.v2.ICreateRepositoryRequest} message CreateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v2.CreateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v2.CreateRepositoryRequest} CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateRepositoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v2.CreateRepositoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.repository = $root.google.devtools.cloudbuild.v2.Repository.decode(reader, reader.uint32()); + break; + } + case 3: { + message.repositoryId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v2.CreateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v2.CreateRepositoryRequest} CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateRepositoryRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v2.CreateRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateRepositoryRequest.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.repository != null && message.hasOwnProperty("repository")) { + var error = $root.google.devtools.cloudbuild.v2.Repository.verify(message.repository); + if (error) + return "repository." + error; + } + if (message.repositoryId != null && message.hasOwnProperty("repositoryId")) + if (!$util.isString(message.repositoryId)) + return "repositoryId: string expected"; + return null; + }; + + /** + * Creates a CreateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v2.CreateRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v2.CreateRepositoryRequest} CreateRepositoryRequest + */ + CreateRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v2.CreateRepositoryRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v2.CreateRepositoryRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.repository != null) { + if (typeof object.repository !== "object") + throw TypeError(".google.devtools.cloudbuild.v2.CreateRepositoryRequest.repository: object expected"); + message.repository = $root.google.devtools.cloudbuild.v2.Repository.fromObject(object.repository); + } + if (object.repositoryId != null) + message.repositoryId = String(object.repositoryId); + return message; + }; + + /** + * Creates a plain object from a CreateRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v2.CreateRepositoryRequest + * @static + * @param {google.devtools.cloudbuild.v2.CreateRepositoryRequest} message CreateRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.repository = null; + object.repositoryId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.repository != null && message.hasOwnProperty("repository")) + object.repository = $root.google.devtools.cloudbuild.v2.Repository.toObject(message.repository, options); + if (message.repositoryId != null && message.hasOwnProperty("repositoryId")) + object.repositoryId = message.repositoryId; + return object; + }; + + /** + * Converts this CreateRepositoryRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v2.CreateRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + CreateRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateRepositoryRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v2.CreateRepositoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v2.CreateRepositoryRequest"; + }; + + return CreateRepositoryRequest; + })(); + + v2.BatchCreateRepositoriesRequest = (function() { + + /** + * Properties of a BatchCreateRepositoriesRequest. + * @memberof google.devtools.cloudbuild.v2 + * @interface IBatchCreateRepositoriesRequest + * @property {string|null} [parent] BatchCreateRepositoriesRequest parent + * @property {Array.|null} [requests] BatchCreateRepositoriesRequest requests + */ + + /** + * Constructs a new BatchCreateRepositoriesRequest. + * @memberof google.devtools.cloudbuild.v2 + * @classdesc Represents a BatchCreateRepositoriesRequest. + * @implements IBatchCreateRepositoriesRequest + * @constructor + * @param {google.devtools.cloudbuild.v2.IBatchCreateRepositoriesRequest=} [properties] Properties to set + */ + function BatchCreateRepositoriesRequest(properties) { + this.requests = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BatchCreateRepositoriesRequest parent. + * @member {string} parent + * @memberof google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest + * @instance + */ + BatchCreateRepositoriesRequest.prototype.parent = ""; + + /** + * BatchCreateRepositoriesRequest requests. + * @member {Array.} requests + * @memberof google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest + * @instance + */ + BatchCreateRepositoriesRequest.prototype.requests = $util.emptyArray; + + /** + * Creates a new BatchCreateRepositoriesRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest + * @static + * @param {google.devtools.cloudbuild.v2.IBatchCreateRepositoriesRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest} BatchCreateRepositoriesRequest instance + */ + BatchCreateRepositoriesRequest.create = function create(properties) { + return new BatchCreateRepositoriesRequest(properties); + }; + + /** + * Encodes the specified BatchCreateRepositoriesRequest message. Does not implicitly {@link google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest + * @static + * @param {google.devtools.cloudbuild.v2.IBatchCreateRepositoriesRequest} message BatchCreateRepositoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchCreateRepositoriesRequest.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.requests != null && message.requests.length) + for (var i = 0; i < message.requests.length; ++i) + $root.google.devtools.cloudbuild.v2.CreateRepositoryRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BatchCreateRepositoriesRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest + * @static + * @param {google.devtools.cloudbuild.v2.IBatchCreateRepositoriesRequest} message BatchCreateRepositoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchCreateRepositoriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchCreateRepositoriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest} BatchCreateRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchCreateRepositoriesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + if (!(message.requests && message.requests.length)) + message.requests = []; + message.requests.push($root.google.devtools.cloudbuild.v2.CreateRepositoryRequest.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchCreateRepositoriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest} BatchCreateRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchCreateRepositoriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchCreateRepositoriesRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchCreateRepositoriesRequest.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.requests != null && message.hasOwnProperty("requests")) { + if (!Array.isArray(message.requests)) + return "requests: array expected"; + for (var i = 0; i < message.requests.length; ++i) { + var error = $root.google.devtools.cloudbuild.v2.CreateRepositoryRequest.verify(message.requests[i]); + if (error) + return "requests." + error; + } + } + return null; + }; + + /** + * Creates a BatchCreateRepositoriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest} BatchCreateRepositoriesRequest + */ + BatchCreateRepositoriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.requests) { + if (!Array.isArray(object.requests)) + throw TypeError(".google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest.requests: array expected"); + message.requests = []; + for (var i = 0; i < object.requests.length; ++i) { + if (typeof object.requests[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest.requests: object expected"); + message.requests[i] = $root.google.devtools.cloudbuild.v2.CreateRepositoryRequest.fromObject(object.requests[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BatchCreateRepositoriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest + * @static + * @param {google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest} message BatchCreateRepositoriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchCreateRepositoriesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.requests = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.requests && message.requests.length) { + object.requests = []; + for (var j = 0; j < message.requests.length; ++j) + object.requests[j] = $root.google.devtools.cloudbuild.v2.CreateRepositoryRequest.toObject(message.requests[j], options); + } + return object; + }; + + /** + * Converts this BatchCreateRepositoriesRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest + * @instance + * @returns {Object.} JSON object + */ + BatchCreateRepositoriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchCreateRepositoriesRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchCreateRepositoriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest"; + }; + + return BatchCreateRepositoriesRequest; + })(); + + v2.BatchCreateRepositoriesResponse = (function() { + + /** + * Properties of a BatchCreateRepositoriesResponse. + * @memberof google.devtools.cloudbuild.v2 + * @interface IBatchCreateRepositoriesResponse + * @property {Array.|null} [repositories] BatchCreateRepositoriesResponse repositories + */ + + /** + * Constructs a new BatchCreateRepositoriesResponse. + * @memberof google.devtools.cloudbuild.v2 + * @classdesc Represents a BatchCreateRepositoriesResponse. + * @implements IBatchCreateRepositoriesResponse + * @constructor + * @param {google.devtools.cloudbuild.v2.IBatchCreateRepositoriesResponse=} [properties] Properties to set + */ + function BatchCreateRepositoriesResponse(properties) { + this.repositories = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BatchCreateRepositoriesResponse repositories. + * @member {Array.} repositories + * @memberof google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse + * @instance + */ + BatchCreateRepositoriesResponse.prototype.repositories = $util.emptyArray; + + /** + * Creates a new BatchCreateRepositoriesResponse instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse + * @static + * @param {google.devtools.cloudbuild.v2.IBatchCreateRepositoriesResponse=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse} BatchCreateRepositoriesResponse instance + */ + BatchCreateRepositoriesResponse.create = function create(properties) { + return new BatchCreateRepositoriesResponse(properties); + }; + + /** + * Encodes the specified BatchCreateRepositoriesResponse message. Does not implicitly {@link google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse + * @static + * @param {google.devtools.cloudbuild.v2.IBatchCreateRepositoriesResponse} message BatchCreateRepositoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchCreateRepositoriesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.repositories != null && message.repositories.length) + for (var i = 0; i < message.repositories.length; ++i) + $root.google.devtools.cloudbuild.v2.Repository.encode(message.repositories[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BatchCreateRepositoriesResponse message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse + * @static + * @param {google.devtools.cloudbuild.v2.IBatchCreateRepositoriesResponse} message BatchCreateRepositoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchCreateRepositoriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchCreateRepositoriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse} BatchCreateRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchCreateRepositoriesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.repositories && message.repositories.length)) + message.repositories = []; + message.repositories.push($root.google.devtools.cloudbuild.v2.Repository.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchCreateRepositoriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse} BatchCreateRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchCreateRepositoriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchCreateRepositoriesResponse message. + * @function verify + * @memberof google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchCreateRepositoriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.repositories != null && message.hasOwnProperty("repositories")) { + if (!Array.isArray(message.repositories)) + return "repositories: array expected"; + for (var i = 0; i < message.repositories.length; ++i) { + var error = $root.google.devtools.cloudbuild.v2.Repository.verify(message.repositories[i]); + if (error) + return "repositories." + error; + } + } + return null; + }; + + /** + * Creates a BatchCreateRepositoriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse} BatchCreateRepositoriesResponse + */ + BatchCreateRepositoriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse) + return object; + var message = new $root.google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse(); + if (object.repositories) { + if (!Array.isArray(object.repositories)) + throw TypeError(".google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse.repositories: array expected"); + message.repositories = []; + for (var i = 0; i < object.repositories.length; ++i) { + if (typeof object.repositories[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse.repositories: object expected"); + message.repositories[i] = $root.google.devtools.cloudbuild.v2.Repository.fromObject(object.repositories[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BatchCreateRepositoriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse + * @static + * @param {google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse} message BatchCreateRepositoriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchCreateRepositoriesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.repositories = []; + if (message.repositories && message.repositories.length) { + object.repositories = []; + for (var j = 0; j < message.repositories.length; ++j) + object.repositories[j] = $root.google.devtools.cloudbuild.v2.Repository.toObject(message.repositories[j], options); + } + return object; + }; + + /** + * Converts this BatchCreateRepositoriesResponse to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse + * @instance + * @returns {Object.} JSON object + */ + BatchCreateRepositoriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchCreateRepositoriesResponse + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchCreateRepositoriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse"; + }; + + return BatchCreateRepositoriesResponse; + })(); + + v2.GetRepositoryRequest = (function() { + + /** + * Properties of a GetRepositoryRequest. + * @memberof google.devtools.cloudbuild.v2 + * @interface IGetRepositoryRequest + * @property {string|null} [name] GetRepositoryRequest name + */ + + /** + * Constructs a new GetRepositoryRequest. + * @memberof google.devtools.cloudbuild.v2 + * @classdesc Represents a GetRepositoryRequest. + * @implements IGetRepositoryRequest + * @constructor + * @param {google.devtools.cloudbuild.v2.IGetRepositoryRequest=} [properties] Properties to set + */ + function GetRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetRepositoryRequest name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v2.GetRepositoryRequest + * @instance + */ + GetRepositoryRequest.prototype.name = ""; + + /** + * Creates a new GetRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v2.GetRepositoryRequest + * @static + * @param {google.devtools.cloudbuild.v2.IGetRepositoryRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v2.GetRepositoryRequest} GetRepositoryRequest instance + */ + GetRepositoryRequest.create = function create(properties) { + return new GetRepositoryRequest(properties); + }; + + /** + * Encodes the specified GetRepositoryRequest message. Does not implicitly {@link google.devtools.cloudbuild.v2.GetRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v2.GetRepositoryRequest + * @static + * @param {google.devtools.cloudbuild.v2.IGetRepositoryRequest} message GetRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRepositoryRequest.encode = function encode(message, writer) { + 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 GetRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.GetRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v2.GetRepositoryRequest + * @static + * @param {google.devtools.cloudbuild.v2.IGetRepositoryRequest} message GetRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v2.GetRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v2.GetRepositoryRequest} GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRepositoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v2.GetRepositoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v2.GetRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v2.GetRepositoryRequest} GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRepositoryRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v2.GetRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRepositoryRequest.verify = function verify(message) { + if (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 GetRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v2.GetRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v2.GetRepositoryRequest} GetRepositoryRequest + */ + GetRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v2.GetRepositoryRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v2.GetRepositoryRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v2.GetRepositoryRequest + * @static + * @param {google.devtools.cloudbuild.v2.GetRepositoryRequest} message GetRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRepositoryRequest.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 GetRepositoryRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v2.GetRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + GetRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetRepositoryRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v2.GetRepositoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v2.GetRepositoryRequest"; + }; + + return GetRepositoryRequest; + })(); + + v2.ListRepositoriesRequest = (function() { + + /** + * Properties of a ListRepositoriesRequest. + * @memberof google.devtools.cloudbuild.v2 + * @interface IListRepositoriesRequest + * @property {string|null} [parent] ListRepositoriesRequest parent + * @property {number|null} [pageSize] ListRepositoriesRequest pageSize + * @property {string|null} [pageToken] ListRepositoriesRequest pageToken + * @property {string|null} [filter] ListRepositoriesRequest filter + */ + + /** + * Constructs a new ListRepositoriesRequest. + * @memberof google.devtools.cloudbuild.v2 + * @classdesc Represents a ListRepositoriesRequest. + * @implements IListRepositoriesRequest + * @constructor + * @param {google.devtools.cloudbuild.v2.IListRepositoriesRequest=} [properties] Properties to set + */ + function ListRepositoriesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListRepositoriesRequest parent. + * @member {string} parent + * @memberof google.devtools.cloudbuild.v2.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.parent = ""; + + /** + * ListRepositoriesRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.cloudbuild.v2.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.pageSize = 0; + + /** + * ListRepositoriesRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.cloudbuild.v2.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.pageToken = ""; + + /** + * ListRepositoriesRequest filter. + * @member {string} filter + * @memberof google.devtools.cloudbuild.v2.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.filter = ""; + + /** + * Creates a new ListRepositoriesRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v2.ListRepositoriesRequest + * @static + * @param {google.devtools.cloudbuild.v2.IListRepositoriesRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v2.ListRepositoriesRequest} ListRepositoriesRequest instance + */ + ListRepositoriesRequest.create = function create(properties) { + return new ListRepositoriesRequest(properties); + }; + + /** + * Encodes the specified ListRepositoriesRequest message. Does not implicitly {@link google.devtools.cloudbuild.v2.ListRepositoriesRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v2.ListRepositoriesRequest + * @static + * @param {google.devtools.cloudbuild.v2.IListRepositoriesRequest} message ListRepositoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesRequest.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 ListRepositoriesRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.ListRepositoriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v2.ListRepositoriesRequest + * @static + * @param {google.devtools.cloudbuild.v2.IListRepositoriesRequest} message ListRepositoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v2.ListRepositoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v2.ListRepositoriesRequest} ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v2.ListRepositoriesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v2.ListRepositoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v2.ListRepositoriesRequest} ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRepositoriesRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v2.ListRepositoriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRepositoriesRequest.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 ListRepositoriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v2.ListRepositoriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v2.ListRepositoriesRequest} ListRepositoriesRequest + */ + ListRepositoriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v2.ListRepositoriesRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v2.ListRepositoriesRequest(); + 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 ListRepositoriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v2.ListRepositoriesRequest + * @static + * @param {google.devtools.cloudbuild.v2.ListRepositoriesRequest} message ListRepositoriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRepositoriesRequest.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 ListRepositoriesRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v2.ListRepositoriesRequest + * @instance + * @returns {Object.} JSON object + */ + ListRepositoriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListRepositoriesRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v2.ListRepositoriesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRepositoriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v2.ListRepositoriesRequest"; + }; + + return ListRepositoriesRequest; + })(); + + v2.ListRepositoriesResponse = (function() { + + /** + * Properties of a ListRepositoriesResponse. + * @memberof google.devtools.cloudbuild.v2 + * @interface IListRepositoriesResponse + * @property {Array.|null} [repositories] ListRepositoriesResponse repositories + * @property {string|null} [nextPageToken] ListRepositoriesResponse nextPageToken + */ + + /** + * Constructs a new ListRepositoriesResponse. + * @memberof google.devtools.cloudbuild.v2 + * @classdesc Represents a ListRepositoriesResponse. + * @implements IListRepositoriesResponse + * @constructor + * @param {google.devtools.cloudbuild.v2.IListRepositoriesResponse=} [properties] Properties to set + */ + function ListRepositoriesResponse(properties) { + this.repositories = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListRepositoriesResponse repositories. + * @member {Array.} repositories + * @memberof google.devtools.cloudbuild.v2.ListRepositoriesResponse + * @instance + */ + ListRepositoriesResponse.prototype.repositories = $util.emptyArray; + + /** + * ListRepositoriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.cloudbuild.v2.ListRepositoriesResponse + * @instance + */ + ListRepositoriesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListRepositoriesResponse instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v2.ListRepositoriesResponse + * @static + * @param {google.devtools.cloudbuild.v2.IListRepositoriesResponse=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v2.ListRepositoriesResponse} ListRepositoriesResponse instance + */ + ListRepositoriesResponse.create = function create(properties) { + return new ListRepositoriesResponse(properties); + }; + + /** + * Encodes the specified ListRepositoriesResponse message. Does not implicitly {@link google.devtools.cloudbuild.v2.ListRepositoriesResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v2.ListRepositoriesResponse + * @static + * @param {google.devtools.cloudbuild.v2.IListRepositoriesResponse} message ListRepositoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.repositories != null && message.repositories.length) + for (var i = 0; i < message.repositories.length; ++i) + $root.google.devtools.cloudbuild.v2.Repository.encode(message.repositories[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 ListRepositoriesResponse message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.ListRepositoriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v2.ListRepositoriesResponse + * @static + * @param {google.devtools.cloudbuild.v2.IListRepositoriesResponse} message ListRepositoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v2.ListRepositoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v2.ListRepositoriesResponse} ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v2.ListRepositoriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.repositories && message.repositories.length)) + message.repositories = []; + message.repositories.push($root.google.devtools.cloudbuild.v2.Repository.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v2.ListRepositoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v2.ListRepositoriesResponse} ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRepositoriesResponse message. + * @function verify + * @memberof google.devtools.cloudbuild.v2.ListRepositoriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRepositoriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.repositories != null && message.hasOwnProperty("repositories")) { + if (!Array.isArray(message.repositories)) + return "repositories: array expected"; + for (var i = 0; i < message.repositories.length; ++i) { + var error = $root.google.devtools.cloudbuild.v2.Repository.verify(message.repositories[i]); + if (error) + return "repositories." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListRepositoriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v2.ListRepositoriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v2.ListRepositoriesResponse} ListRepositoriesResponse + */ + ListRepositoriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v2.ListRepositoriesResponse) + return object; + var message = new $root.google.devtools.cloudbuild.v2.ListRepositoriesResponse(); + if (object.repositories) { + if (!Array.isArray(object.repositories)) + throw TypeError(".google.devtools.cloudbuild.v2.ListRepositoriesResponse.repositories: array expected"); + message.repositories = []; + for (var i = 0; i < object.repositories.length; ++i) { + if (typeof object.repositories[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v2.ListRepositoriesResponse.repositories: object expected"); + message.repositories[i] = $root.google.devtools.cloudbuild.v2.Repository.fromObject(object.repositories[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListRepositoriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v2.ListRepositoriesResponse + * @static + * @param {google.devtools.cloudbuild.v2.ListRepositoriesResponse} message ListRepositoriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRepositoriesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.repositories = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.repositories && message.repositories.length) { + object.repositories = []; + for (var j = 0; j < message.repositories.length; ++j) + object.repositories[j] = $root.google.devtools.cloudbuild.v2.Repository.toObject(message.repositories[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListRepositoriesResponse to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v2.ListRepositoriesResponse + * @instance + * @returns {Object.} JSON object + */ + ListRepositoriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListRepositoriesResponse + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v2.ListRepositoriesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRepositoriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v2.ListRepositoriesResponse"; + }; + + return ListRepositoriesResponse; + })(); + + v2.DeleteRepositoryRequest = (function() { + + /** + * Properties of a DeleteRepositoryRequest. + * @memberof google.devtools.cloudbuild.v2 + * @interface IDeleteRepositoryRequest + * @property {string|null} [name] DeleteRepositoryRequest name + * @property {string|null} [etag] DeleteRepositoryRequest etag + * @property {boolean|null} [validateOnly] DeleteRepositoryRequest validateOnly + */ + + /** + * Constructs a new DeleteRepositoryRequest. + * @memberof google.devtools.cloudbuild.v2 + * @classdesc Represents a DeleteRepositoryRequest. + * @implements IDeleteRepositoryRequest + * @constructor + * @param {google.devtools.cloudbuild.v2.IDeleteRepositoryRequest=} [properties] Properties to set + */ + function DeleteRepositoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteRepositoryRequest name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v2.DeleteRepositoryRequest + * @instance + */ + DeleteRepositoryRequest.prototype.name = ""; + + /** + * DeleteRepositoryRequest etag. + * @member {string} etag + * @memberof google.devtools.cloudbuild.v2.DeleteRepositoryRequest + * @instance + */ + DeleteRepositoryRequest.prototype.etag = ""; + + /** + * DeleteRepositoryRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.devtools.cloudbuild.v2.DeleteRepositoryRequest + * @instance + */ + DeleteRepositoryRequest.prototype.validateOnly = false; + + /** + * Creates a new DeleteRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v2.DeleteRepositoryRequest + * @static + * @param {google.devtools.cloudbuild.v2.IDeleteRepositoryRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v2.DeleteRepositoryRequest} DeleteRepositoryRequest instance + */ + DeleteRepositoryRequest.create = function create(properties) { + return new DeleteRepositoryRequest(properties); + }; + + /** + * Encodes the specified DeleteRepositoryRequest message. Does not implicitly {@link google.devtools.cloudbuild.v2.DeleteRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v2.DeleteRepositoryRequest + * @static + * @param {google.devtools.cloudbuild.v2.IDeleteRepositoryRequest} message DeleteRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteRepositoryRequest.encode = function encode(message, writer) { + 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.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified DeleteRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.DeleteRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v2.DeleteRepositoryRequest + * @static + * @param {google.devtools.cloudbuild.v2.IDeleteRepositoryRequest} message DeleteRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v2.DeleteRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v2.DeleteRepositoryRequest} DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteRepositoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v2.DeleteRepositoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.etag = reader.string(); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v2.DeleteRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v2.DeleteRepositoryRequest} DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteRepositoryRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v2.DeleteRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteRepositoryRequest.verify = function verify(message) { + if (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.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a DeleteRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v2.DeleteRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v2.DeleteRepositoryRequest} DeleteRepositoryRequest + */ + DeleteRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v2.DeleteRepositoryRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v2.DeleteRepositoryRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.etag != null) + message.etag = String(object.etag); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a DeleteRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v2.DeleteRepositoryRequest + * @static + * @param {google.devtools.cloudbuild.v2.DeleteRepositoryRequest} message DeleteRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.etag = ""; + object.validateOnly = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this DeleteRepositoryRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v2.DeleteRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteRepositoryRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v2.DeleteRepositoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteRepositoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v2.DeleteRepositoryRequest"; + }; + + return DeleteRepositoryRequest; + })(); + + v2.FetchReadWriteTokenRequest = (function() { + + /** + * Properties of a FetchReadWriteTokenRequest. + * @memberof google.devtools.cloudbuild.v2 + * @interface IFetchReadWriteTokenRequest + * @property {string|null} [repository] FetchReadWriteTokenRequest repository + */ + + /** + * Constructs a new FetchReadWriteTokenRequest. + * @memberof google.devtools.cloudbuild.v2 + * @classdesc Represents a FetchReadWriteTokenRequest. + * @implements IFetchReadWriteTokenRequest + * @constructor + * @param {google.devtools.cloudbuild.v2.IFetchReadWriteTokenRequest=} [properties] Properties to set + */ + function FetchReadWriteTokenRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchReadWriteTokenRequest repository. + * @member {string} repository + * @memberof google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest + * @instance + */ + FetchReadWriteTokenRequest.prototype.repository = ""; + + /** + * Creates a new FetchReadWriteTokenRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest + * @static + * @param {google.devtools.cloudbuild.v2.IFetchReadWriteTokenRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest} FetchReadWriteTokenRequest instance + */ + FetchReadWriteTokenRequest.create = function create(properties) { + return new FetchReadWriteTokenRequest(properties); + }; + + /** + * Encodes the specified FetchReadWriteTokenRequest message. Does not implicitly {@link google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest + * @static + * @param {google.devtools.cloudbuild.v2.IFetchReadWriteTokenRequest} message FetchReadWriteTokenRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchReadWriteTokenRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.repository != null && Object.hasOwnProperty.call(message, "repository")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.repository); + return writer; + }; + + /** + * Encodes the specified FetchReadWriteTokenRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest + * @static + * @param {google.devtools.cloudbuild.v2.IFetchReadWriteTokenRequest} message FetchReadWriteTokenRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchReadWriteTokenRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchReadWriteTokenRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest} FetchReadWriteTokenRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchReadWriteTokenRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.repository = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchReadWriteTokenRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest} FetchReadWriteTokenRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchReadWriteTokenRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchReadWriteTokenRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchReadWriteTokenRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.repository != null && message.hasOwnProperty("repository")) + if (!$util.isString(message.repository)) + return "repository: string expected"; + return null; + }; + + /** + * Creates a FetchReadWriteTokenRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest} FetchReadWriteTokenRequest + */ + FetchReadWriteTokenRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest(); + if (object.repository != null) + message.repository = String(object.repository); + return message; + }; + + /** + * Creates a plain object from a FetchReadWriteTokenRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest + * @static + * @param {google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest} message FetchReadWriteTokenRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchReadWriteTokenRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.repository = ""; + if (message.repository != null && message.hasOwnProperty("repository")) + object.repository = message.repository; + return object; + }; + + /** + * Converts this FetchReadWriteTokenRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest + * @instance + * @returns {Object.} JSON object + */ + FetchReadWriteTokenRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchReadWriteTokenRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchReadWriteTokenRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest"; + }; + + return FetchReadWriteTokenRequest; + })(); + + v2.FetchReadTokenRequest = (function() { + + /** + * Properties of a FetchReadTokenRequest. + * @memberof google.devtools.cloudbuild.v2 + * @interface IFetchReadTokenRequest + * @property {string|null} [repository] FetchReadTokenRequest repository + */ + + /** + * Constructs a new FetchReadTokenRequest. + * @memberof google.devtools.cloudbuild.v2 + * @classdesc Represents a FetchReadTokenRequest. + * @implements IFetchReadTokenRequest + * @constructor + * @param {google.devtools.cloudbuild.v2.IFetchReadTokenRequest=} [properties] Properties to set + */ + function FetchReadTokenRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchReadTokenRequest repository. + * @member {string} repository + * @memberof google.devtools.cloudbuild.v2.FetchReadTokenRequest + * @instance + */ + FetchReadTokenRequest.prototype.repository = ""; + + /** + * Creates a new FetchReadTokenRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v2.FetchReadTokenRequest + * @static + * @param {google.devtools.cloudbuild.v2.IFetchReadTokenRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v2.FetchReadTokenRequest} FetchReadTokenRequest instance + */ + FetchReadTokenRequest.create = function create(properties) { + return new FetchReadTokenRequest(properties); + }; + + /** + * Encodes the specified FetchReadTokenRequest message. Does not implicitly {@link google.devtools.cloudbuild.v2.FetchReadTokenRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v2.FetchReadTokenRequest + * @static + * @param {google.devtools.cloudbuild.v2.IFetchReadTokenRequest} message FetchReadTokenRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchReadTokenRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.repository != null && Object.hasOwnProperty.call(message, "repository")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.repository); + return writer; + }; + + /** + * Encodes the specified FetchReadTokenRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.FetchReadTokenRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v2.FetchReadTokenRequest + * @static + * @param {google.devtools.cloudbuild.v2.IFetchReadTokenRequest} message FetchReadTokenRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchReadTokenRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchReadTokenRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v2.FetchReadTokenRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v2.FetchReadTokenRequest} FetchReadTokenRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchReadTokenRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v2.FetchReadTokenRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.repository = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchReadTokenRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v2.FetchReadTokenRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v2.FetchReadTokenRequest} FetchReadTokenRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchReadTokenRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchReadTokenRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v2.FetchReadTokenRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchReadTokenRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.repository != null && message.hasOwnProperty("repository")) + if (!$util.isString(message.repository)) + return "repository: string expected"; + return null; + }; + + /** + * Creates a FetchReadTokenRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v2.FetchReadTokenRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v2.FetchReadTokenRequest} FetchReadTokenRequest + */ + FetchReadTokenRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v2.FetchReadTokenRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v2.FetchReadTokenRequest(); + if (object.repository != null) + message.repository = String(object.repository); + return message; + }; + + /** + * Creates a plain object from a FetchReadTokenRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v2.FetchReadTokenRequest + * @static + * @param {google.devtools.cloudbuild.v2.FetchReadTokenRequest} message FetchReadTokenRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchReadTokenRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.repository = ""; + if (message.repository != null && message.hasOwnProperty("repository")) + object.repository = message.repository; + return object; + }; + + /** + * Converts this FetchReadTokenRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v2.FetchReadTokenRequest + * @instance + * @returns {Object.} JSON object + */ + FetchReadTokenRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchReadTokenRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v2.FetchReadTokenRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchReadTokenRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v2.FetchReadTokenRequest"; + }; + + return FetchReadTokenRequest; + })(); + + v2.FetchReadTokenResponse = (function() { + + /** + * Properties of a FetchReadTokenResponse. + * @memberof google.devtools.cloudbuild.v2 + * @interface IFetchReadTokenResponse + * @property {string|null} [token] FetchReadTokenResponse token + * @property {google.protobuf.ITimestamp|null} [expirationTime] FetchReadTokenResponse expirationTime + */ + + /** + * Constructs a new FetchReadTokenResponse. + * @memberof google.devtools.cloudbuild.v2 + * @classdesc Represents a FetchReadTokenResponse. + * @implements IFetchReadTokenResponse + * @constructor + * @param {google.devtools.cloudbuild.v2.IFetchReadTokenResponse=} [properties] Properties to set + */ + function FetchReadTokenResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchReadTokenResponse token. + * @member {string} token + * @memberof google.devtools.cloudbuild.v2.FetchReadTokenResponse + * @instance + */ + FetchReadTokenResponse.prototype.token = ""; + + /** + * FetchReadTokenResponse expirationTime. + * @member {google.protobuf.ITimestamp|null|undefined} expirationTime + * @memberof google.devtools.cloudbuild.v2.FetchReadTokenResponse + * @instance + */ + FetchReadTokenResponse.prototype.expirationTime = null; + + /** + * Creates a new FetchReadTokenResponse instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v2.FetchReadTokenResponse + * @static + * @param {google.devtools.cloudbuild.v2.IFetchReadTokenResponse=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v2.FetchReadTokenResponse} FetchReadTokenResponse instance + */ + FetchReadTokenResponse.create = function create(properties) { + return new FetchReadTokenResponse(properties); + }; + + /** + * Encodes the specified FetchReadTokenResponse message. Does not implicitly {@link google.devtools.cloudbuild.v2.FetchReadTokenResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v2.FetchReadTokenResponse + * @static + * @param {google.devtools.cloudbuild.v2.IFetchReadTokenResponse} message FetchReadTokenResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchReadTokenResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.token != null && Object.hasOwnProperty.call(message, "token")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.token); + if (message.expirationTime != null && Object.hasOwnProperty.call(message, "expirationTime")) + $root.google.protobuf.Timestamp.encode(message.expirationTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FetchReadTokenResponse message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.FetchReadTokenResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v2.FetchReadTokenResponse + * @static + * @param {google.devtools.cloudbuild.v2.IFetchReadTokenResponse} message FetchReadTokenResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchReadTokenResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchReadTokenResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v2.FetchReadTokenResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v2.FetchReadTokenResponse} FetchReadTokenResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchReadTokenResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v2.FetchReadTokenResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.token = reader.string(); + break; + } + case 2: { + message.expirationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchReadTokenResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v2.FetchReadTokenResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v2.FetchReadTokenResponse} FetchReadTokenResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchReadTokenResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchReadTokenResponse message. + * @function verify + * @memberof google.devtools.cloudbuild.v2.FetchReadTokenResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchReadTokenResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.token != null && message.hasOwnProperty("token")) + if (!$util.isString(message.token)) + return "token: string expected"; + if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expirationTime); + if (error) + return "expirationTime." + error; + } + return null; + }; + + /** + * Creates a FetchReadTokenResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v2.FetchReadTokenResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v2.FetchReadTokenResponse} FetchReadTokenResponse + */ + FetchReadTokenResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v2.FetchReadTokenResponse) + return object; + var message = new $root.google.devtools.cloudbuild.v2.FetchReadTokenResponse(); + if (object.token != null) + message.token = String(object.token); + if (object.expirationTime != null) { + if (typeof object.expirationTime !== "object") + throw TypeError(".google.devtools.cloudbuild.v2.FetchReadTokenResponse.expirationTime: object expected"); + message.expirationTime = $root.google.protobuf.Timestamp.fromObject(object.expirationTime); + } + return message; + }; + + /** + * Creates a plain object from a FetchReadTokenResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v2.FetchReadTokenResponse + * @static + * @param {google.devtools.cloudbuild.v2.FetchReadTokenResponse} message FetchReadTokenResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchReadTokenResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.token = ""; + object.expirationTime = null; + } + if (message.token != null && message.hasOwnProperty("token")) + object.token = message.token; + if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) + object.expirationTime = $root.google.protobuf.Timestamp.toObject(message.expirationTime, options); + return object; + }; + + /** + * Converts this FetchReadTokenResponse to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v2.FetchReadTokenResponse + * @instance + * @returns {Object.} JSON object + */ + FetchReadTokenResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchReadTokenResponse + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v2.FetchReadTokenResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchReadTokenResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v2.FetchReadTokenResponse"; + }; + + return FetchReadTokenResponse; + })(); + + v2.FetchReadWriteTokenResponse = (function() { + + /** + * Properties of a FetchReadWriteTokenResponse. + * @memberof google.devtools.cloudbuild.v2 + * @interface IFetchReadWriteTokenResponse + * @property {string|null} [token] FetchReadWriteTokenResponse token + * @property {google.protobuf.ITimestamp|null} [expirationTime] FetchReadWriteTokenResponse expirationTime + */ + + /** + * Constructs a new FetchReadWriteTokenResponse. + * @memberof google.devtools.cloudbuild.v2 + * @classdesc Represents a FetchReadWriteTokenResponse. + * @implements IFetchReadWriteTokenResponse + * @constructor + * @param {google.devtools.cloudbuild.v2.IFetchReadWriteTokenResponse=} [properties] Properties to set + */ + function FetchReadWriteTokenResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchReadWriteTokenResponse token. + * @member {string} token + * @memberof google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse + * @instance + */ + FetchReadWriteTokenResponse.prototype.token = ""; + + /** + * FetchReadWriteTokenResponse expirationTime. + * @member {google.protobuf.ITimestamp|null|undefined} expirationTime + * @memberof google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse + * @instance + */ + FetchReadWriteTokenResponse.prototype.expirationTime = null; + + /** + * Creates a new FetchReadWriteTokenResponse instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse + * @static + * @param {google.devtools.cloudbuild.v2.IFetchReadWriteTokenResponse=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse} FetchReadWriteTokenResponse instance + */ + FetchReadWriteTokenResponse.create = function create(properties) { + return new FetchReadWriteTokenResponse(properties); + }; + + /** + * Encodes the specified FetchReadWriteTokenResponse message. Does not implicitly {@link google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse + * @static + * @param {google.devtools.cloudbuild.v2.IFetchReadWriteTokenResponse} message FetchReadWriteTokenResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchReadWriteTokenResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.token != null && Object.hasOwnProperty.call(message, "token")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.token); + if (message.expirationTime != null && Object.hasOwnProperty.call(message, "expirationTime")) + $root.google.protobuf.Timestamp.encode(message.expirationTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FetchReadWriteTokenResponse message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse + * @static + * @param {google.devtools.cloudbuild.v2.IFetchReadWriteTokenResponse} message FetchReadWriteTokenResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchReadWriteTokenResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchReadWriteTokenResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse} FetchReadWriteTokenResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchReadWriteTokenResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.token = reader.string(); + break; + } + case 2: { + message.expirationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchReadWriteTokenResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse} FetchReadWriteTokenResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchReadWriteTokenResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchReadWriteTokenResponse message. + * @function verify + * @memberof google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchReadWriteTokenResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.token != null && message.hasOwnProperty("token")) + if (!$util.isString(message.token)) + return "token: string expected"; + if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expirationTime); + if (error) + return "expirationTime." + error; + } + return null; + }; + + /** + * Creates a FetchReadWriteTokenResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse} FetchReadWriteTokenResponse + */ + FetchReadWriteTokenResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse) + return object; + var message = new $root.google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse(); + if (object.token != null) + message.token = String(object.token); + if (object.expirationTime != null) { + if (typeof object.expirationTime !== "object") + throw TypeError(".google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse.expirationTime: object expected"); + message.expirationTime = $root.google.protobuf.Timestamp.fromObject(object.expirationTime); + } + return message; + }; + + /** + * Creates a plain object from a FetchReadWriteTokenResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse + * @static + * @param {google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse} message FetchReadWriteTokenResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchReadWriteTokenResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.token = ""; + object.expirationTime = null; + } + if (message.token != null && message.hasOwnProperty("token")) + object.token = message.token; + if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) + object.expirationTime = $root.google.protobuf.Timestamp.toObject(message.expirationTime, options); + return object; + }; + + /** + * Converts this FetchReadWriteTokenResponse to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse + * @instance + * @returns {Object.} JSON object + */ + FetchReadWriteTokenResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchReadWriteTokenResponse + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchReadWriteTokenResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse"; + }; + + return FetchReadWriteTokenResponse; + })(); + + return v2; + })(); + return cloudbuild; })(); diff --git a/packages/google-devtools-cloudbuild/protos/protos.json b/packages/google-devtools-cloudbuild/protos/protos.json index eb38e36773e..9f43e2f1c72 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.json +++ b/packages/google-devtools-cloudbuild/protos/protos.json @@ -14,6 +14,7 @@ "java_package": "com.google.cloudbuild.v1", "objc_class_prefix": "GCB", "ruby_package": "Google::Cloud::Build::V1", + "php_namespace": "Google\\Cloud\\Build\\V1", "(google.api.resource_definition).type": "pubsub.googleapis.com/Topic", "(google.api.resource_definition).pattern": "projects/{project}/topics/{topic}" }, @@ -2425,6 +2426,1005 @@ } } } + }, + "v2": { + "options": { + "csharp_namespace": "Google.Cloud.CloudBuild.V2", + "go_package": "google.golang.org/genproto/googleapis/devtools/cloudbuild/v2;cloudbuild", + "java_multiple_files": true, + "java_outer_classname": "RepositoryManagerProto", + "java_package": "google.devtools.cloudbuild.v2", + "objc_class_prefix": "GCB", + "php_namespace": "Google\\Cloud\\Build\\V2", + "ruby_package": "Google::Cloud::Build::V2", + "(google.api.resource_definition).type": "servicedirectory.googleapis.com/Service", + "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}" + }, + "nested": { + "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" + } + } + } + }, + "RunWorkflowCustomOperationMetadata": { + "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" + } + }, + "verb": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "requestedCancellation": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "apiVersion": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "target": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "pipelineRunId": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "RepositoryManager": { + "options": { + "(google.api.default_host)": "cloudbuild.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateConnection": { + "requestType": "CreateConnectionRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*/locations/*}/connections", + "(google.api.http).body": "connection", + "(google.api.method_signature)": "parent,connection,connection_id", + "(google.longrunning.operation_info).response_type": "Connection", + "(google.longrunning.operation_info).metadata_type": "google.devtools.cloudbuild.v2.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*/locations/*}/connections", + "body": "connection" + } + }, + { + "(google.api.method_signature)": "parent,connection,connection_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Connection", + "metadata_type": "google.devtools.cloudbuild.v2.OperationMetadata" + } + } + ] + }, + "GetConnection": { + "requestType": "GetConnectionRequest", + "responseType": "Connection", + "options": { + "(google.api.http).get": "/v2/{name=projects/*/locations/*/connections/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=projects/*/locations/*/connections/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListConnections": { + "requestType": "ListConnectionsRequest", + "responseType": "ListConnectionsResponse", + "options": { + "(google.api.http).get": "/v2/{parent=projects/*/locations/*}/connections", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*/locations/*}/connections" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "UpdateConnection": { + "requestType": "UpdateConnectionRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v2/{connection.name=projects/*/locations/*/connections/*}", + "(google.api.http).body": "connection", + "(google.api.method_signature)": "connection,update_mask", + "(google.longrunning.operation_info).response_type": "Connection", + "(google.longrunning.operation_info).metadata_type": "google.devtools.cloudbuild.v2.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{connection.name=projects/*/locations/*/connections/*}", + "body": "connection" + } + }, + { + "(google.api.method_signature)": "connection,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Connection", + "metadata_type": "google.devtools.cloudbuild.v2.OperationMetadata" + } + } + ] + }, + "DeleteConnection": { + "requestType": "DeleteConnectionRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v2/{name=projects/*/locations/*/connections/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.devtools.cloudbuild.v2.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=projects/*/locations/*/connections/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.devtools.cloudbuild.v2.OperationMetadata" + } + } + ] + }, + "CreateRepository": { + "requestType": "CreateRepositoryRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*/locations/*/connections/*}/repositories", + "(google.api.http).body": "repository", + "(google.api.method_signature)": "parent,repository,repository_id", + "(google.longrunning.operation_info).response_type": "Repository", + "(google.longrunning.operation_info).metadata_type": "google.devtools.cloudbuild.v2.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*/locations/*/connections/*}/repositories", + "body": "repository" + } + }, + { + "(google.api.method_signature)": "parent,repository,repository_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Repository", + "metadata_type": "google.devtools.cloudbuild.v2.OperationMetadata" + } + } + ] + }, + "BatchCreateRepositories": { + "requestType": "BatchCreateRepositoriesRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*/locations/*/connections/*}/repositories:batchCreate", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,requests", + "(google.longrunning.operation_info).response_type": "BatchCreateRepositoriesResponse", + "(google.longrunning.operation_info).metadata_type": "google.devtools.cloudbuild.v2.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*/locations/*/connections/*}/repositories:batchCreate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,requests" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BatchCreateRepositoriesResponse", + "metadata_type": "google.devtools.cloudbuild.v2.OperationMetadata" + } + } + ] + }, + "GetRepository": { + "requestType": "GetRepositoryRequest", + "responseType": "Repository", + "options": { + "(google.api.http).get": "/v2/{name=projects/*/locations/*/connections/*/repositories/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=projects/*/locations/*/connections/*/repositories/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListRepositories": { + "requestType": "ListRepositoriesRequest", + "responseType": "ListRepositoriesResponse", + "options": { + "(google.api.http).get": "/v2/{parent=projects/*/locations/*/connections/*}/repositories", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*/locations/*/connections/*}/repositories" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteRepository": { + "requestType": "DeleteRepositoryRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v2/{name=projects/*/locations/*/connections/*/repositories/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.devtools.cloudbuild.v2.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=projects/*/locations/*/connections/*/repositories/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.devtools.cloudbuild.v2.OperationMetadata" + } + } + ] + }, + "FetchReadWriteToken": { + "requestType": "FetchReadWriteTokenRequest", + "responseType": "FetchReadWriteTokenResponse", + "options": { + "(google.api.http).post": "/v2/{repository=projects/*/locations/*/connections/*/repositories/*}:accessReadWriteToken", + "(google.api.http).body": "*", + "(google.api.method_signature)": "repository" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{repository=projects/*/locations/*/connections/*/repositories/*}:accessReadWriteToken", + "body": "*" + } + }, + { + "(google.api.method_signature)": "repository" + } + ] + }, + "FetchReadToken": { + "requestType": "FetchReadTokenRequest", + "responseType": "FetchReadTokenResponse", + "options": { + "(google.api.http).post": "/v2/{repository=projects/*/locations/*/connections/*/repositories/*}:accessReadToken", + "(google.api.http).body": "*", + "(google.api.method_signature)": "repository" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{repository=projects/*/locations/*/connections/*/repositories/*}:accessReadToken", + "body": "*" + } + }, + { + "(google.api.method_signature)": "repository" + } + ] + }, + "FetchLinkableRepositories": { + "requestType": "FetchLinkableRepositoriesRequest", + "responseType": "FetchLinkableRepositoriesResponse", + "options": { + "(google.api.http).get": "/v2/{connection=projects/*/locations/*/connections/*}:fetchLinkableRepositories" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{connection=projects/*/locations/*/connections/*}:fetchLinkableRepositories" + } + } + ] + } + } + }, + "Connection": { + "options": { + "(google.api.resource).type": "cloudbuild.googleapis.com/Connection", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/connections/{connection}", + "(google.api.resource).plural": "connections", + "(google.api.resource).singular": "connection", + "(google.api.resource).style": "DECLARATIVE_FRIENDLY" + }, + "oneofs": { + "connectionConfig": { + "oneof": [ + "githubConfig", + "githubEnterpriseConfig" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "githubConfig": { + "type": "GitHubConfig", + "id": 5 + }, + "githubEnterpriseConfig": { + "type": "GitHubEnterpriseConfig", + "id": 6 + }, + "installationState": { + "type": "InstallationState", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "disabled": { + "type": "bool", + "id": 13 + }, + "reconciling": { + "type": "bool", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "annotations": { + "keyType": "string", + "type": "string", + "id": 15 + }, + "etag": { + "type": "string", + "id": 16 + } + } + }, + "InstallationState": { + "fields": { + "stage": { + "type": "Stage", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "message": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "actionUri": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Stage": { + "values": { + "STAGE_UNSPECIFIED": 0, + "PENDING_CREATE_APP": 1, + "PENDING_USER_OAUTH": 2, + "PENDING_INSTALL_APP": 3, + "COMPLETE": 10 + } + } + } + }, + "FetchLinkableRepositoriesRequest": { + "fields": { + "connection": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/Connection" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "FetchLinkableRepositoriesResponse": { + "fields": { + "repositories": { + "rule": "repeated", + "type": "Repository", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GitHubConfig": { + "fields": { + "authorizerCredential": { + "type": "OAuthCredential", + "id": 1 + }, + "appInstallationId": { + "type": "int64", + "id": 2 + } + } + }, + "GitHubEnterpriseConfig": { + "fields": { + "hostUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "apiKey": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "appId": { + "type": "int64", + "id": 2 + }, + "appSlug": { + "type": "string", + "id": 13 + }, + "privateKeySecretVersion": { + "type": "string", + "id": 4, + "options": { + "(google.api.resource_reference).type": "secretmanager.googleapis.com/SecretVersion" + } + }, + "webhookSecretSecretVersion": { + "type": "string", + "id": 5, + "options": { + "(google.api.resource_reference).type": "secretmanager.googleapis.com/SecretVersion" + } + }, + "appInstallationId": { + "type": "int64", + "id": 9 + }, + "serviceDirectoryConfig": { + "type": "ServiceDirectoryConfig", + "id": 10 + }, + "sslCa": { + "type": "string", + "id": 11 + }, + "serverVersion": { + "type": "string", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ServiceDirectoryConfig": { + "fields": { + "service": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "servicedirectory.googleapis.com/Service" + } + } + } + }, + "Repository": { + "options": { + "(google.api.resource).type": "cloudbuild.googleapis.com/Repository", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}", + "(google.api.resource).plural": "repositories", + "(google.api.resource).singular": "repository", + "(google.api.resource).style": "DECLARATIVE_FRIENDLY" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "remoteUri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "annotations": { + "keyType": "string", + "type": "string", + "id": 6 + }, + "etag": { + "type": "string", + "id": 7 + } + } + }, + "OAuthCredential": { + "fields": { + "oauthTokenSecretVersion": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "secretmanager.googleapis.com/SecretVersion" + } + }, + "username": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "CreateConnectionRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "cloudbuild.googleapis.com/Connection" + } + }, + "connection": { + "type": "Connection", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "connectionId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetConnectionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/Connection" + } + } + } + }, + "ListConnectionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "cloudbuild.googleapis.com/Connection" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListConnectionsResponse": { + "fields": { + "connections": { + "rule": "repeated", + "type": "Connection", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "UpdateConnectionRequest": { + "fields": { + "connection": { + "type": "Connection", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + }, + "allowMissing": { + "type": "bool", + "id": 3 + }, + "etag": { + "type": "string", + "id": 4 + } + } + }, + "DeleteConnectionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/Connection" + } + }, + "etag": { + "type": "string", + "id": 2 + }, + "validateOnly": { + "type": "bool", + "id": 3 + } + } + }, + "CreateRepositoryRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/Connection" + } + }, + "repository": { + "type": "Repository", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "repositoryId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BatchCreateRepositoriesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/Connection" + } + }, + "requests": { + "rule": "repeated", + "type": "CreateRepositoryRequest", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BatchCreateRepositoriesResponse": { + "fields": { + "repositories": { + "rule": "repeated", + "type": "Repository", + "id": 1 + } + } + }, + "GetRepositoryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/Repository" + } + } + } + }, + "ListRepositoriesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "cloudbuild.googleapis.com/Repository" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + } + } + }, + "ListRepositoriesResponse": { + "fields": { + "repositories": { + "rule": "repeated", + "type": "Repository", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DeleteRepositoryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/Repository" + } + }, + "etag": { + "type": "string", + "id": 2 + }, + "validateOnly": { + "type": "bool", + "id": 3 + } + } + }, + "FetchReadWriteTokenRequest": { + "fields": { + "repository": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/Repository" + } + } + } + }, + "FetchReadTokenRequest": { + "fields": { + "repository": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/Repository" + } + } + } + }, + "FetchReadTokenResponse": { + "fields": { + "token": { + "type": "string", + "id": 1 + }, + "expirationTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + }, + "FetchReadWriteTokenResponse": { + "fields": { + "token": { + "type": "string", + "id": 1 + }, + "expirationTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + } + } } } } diff --git a/packages/google-devtools-cloudbuild/samples/README.md b/packages/google-devtools-cloudbuild/samples/README.md index 615b6a23688..b3cb328a804 100644 --- a/packages/google-devtools-cloudbuild/samples/README.md +++ b/packages/google-devtools-cloudbuild/samples/README.md @@ -30,6 +30,19 @@ * [Cloud_build.run_build_trigger](#cloud_build.run_build_trigger) * [Cloud_build.update_build_trigger](#cloud_build.update_build_trigger) * [Cloud_build.update_worker_pool](#cloud_build.update_worker_pool) + * [Repository_manager.batch_create_repositories](#repository_manager.batch_create_repositories) + * [Repository_manager.create_connection](#repository_manager.create_connection) + * [Repository_manager.create_repository](#repository_manager.create_repository) + * [Repository_manager.delete_connection](#repository_manager.delete_connection) + * [Repository_manager.delete_repository](#repository_manager.delete_repository) + * [Repository_manager.fetch_linkable_repositories](#repository_manager.fetch_linkable_repositories) + * [Repository_manager.fetch_read_token](#repository_manager.fetch_read_token) + * [Repository_manager.fetch_read_write_token](#repository_manager.fetch_read_write_token) + * [Repository_manager.get_connection](#repository_manager.get_connection) + * [Repository_manager.get_repository](#repository_manager.get_repository) + * [Repository_manager.list_connections](#repository_manager.list_connections) + * [Repository_manager.list_repositories](#repository_manager.list_repositories) + * [Repository_manager.update_connection](#repository_manager.update_connection) * [Quickstart](#quickstart) * [Quickstart.test](#quickstart.test) @@ -354,6 +367,227 @@ __Usage:__ +### Repository_manager.batch_create_repositories + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.batch_create_repositories.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.batch_create_repositories.js,samples/README.md) + +__Usage:__ + + +`node packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.batch_create_repositories.js` + + +----- + + + + +### Repository_manager.create_connection + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.create_connection.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.create_connection.js,samples/README.md) + +__Usage:__ + + +`node packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.create_connection.js` + + +----- + + + + +### Repository_manager.create_repository + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.create_repository.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.create_repository.js,samples/README.md) + +__Usage:__ + + +`node packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.create_repository.js` + + +----- + + + + +### Repository_manager.delete_connection + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.delete_connection.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.delete_connection.js,samples/README.md) + +__Usage:__ + + +`node packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.delete_connection.js` + + +----- + + + + +### Repository_manager.delete_repository + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.delete_repository.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.delete_repository.js,samples/README.md) + +__Usage:__ + + +`node packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.delete_repository.js` + + +----- + + + + +### Repository_manager.fetch_linkable_repositories + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.fetch_linkable_repositories.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.fetch_linkable_repositories.js,samples/README.md) + +__Usage:__ + + +`node packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.fetch_linkable_repositories.js` + + +----- + + + + +### Repository_manager.fetch_read_token + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.fetch_read_token.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.fetch_read_token.js,samples/README.md) + +__Usage:__ + + +`node packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.fetch_read_token.js` + + +----- + + + + +### Repository_manager.fetch_read_write_token + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.fetch_read_write_token.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.fetch_read_write_token.js,samples/README.md) + +__Usage:__ + + +`node packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.fetch_read_write_token.js` + + +----- + + + + +### Repository_manager.get_connection + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.get_connection.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.get_connection.js,samples/README.md) + +__Usage:__ + + +`node packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.get_connection.js` + + +----- + + + + +### Repository_manager.get_repository + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.get_repository.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.get_repository.js,samples/README.md) + +__Usage:__ + + +`node packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.get_repository.js` + + +----- + + + + +### Repository_manager.list_connections + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.list_connections.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.list_connections.js,samples/README.md) + +__Usage:__ + + +`node packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.list_connections.js` + + +----- + + + + +### Repository_manager.list_repositories + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.list_repositories.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.list_repositories.js,samples/README.md) + +__Usage:__ + + +`node packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.list_repositories.js` + + +----- + + + + +### Repository_manager.update_connection + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.update_connection.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.update_connection.js,samples/README.md) + +__Usage:__ + + +`node packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.update_connection.js` + + +----- + + + + ### Quickstart View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-cloudbuild/samples/quickstart.js). diff --git a/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.batch_create_repositories.js b/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.batch_create_repositories.js new file mode 100644 index 00000000000..7c9b6038278 --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.batch_create_repositories.js @@ -0,0 +1,70 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, requests) { + // [START cloudbuild_v2_generated_RepositoryManager_BatchCreateRepositories_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 connection to contain all the repositories being created. + * Format: projects/* /locations/* /connections/* + * The parent field in the CreateRepositoryRequest messages + * must either be empty or match this field. + */ + // const parent = 'abc123' + /** + * Required. The request messages specifying the repositories to create. + */ + // const requests = 1234 + + // Imports the Cloudbuild library + const {RepositoryManagerClient} = require('@google-cloud/cloudbuild').v2; + + // Instantiates a client + const cloudbuildClient = new RepositoryManagerClient(); + + async function callBatchCreateRepositories() { + // Construct request + const request = { + parent, + requests, + }; + + // Run request + const [operation] = await cloudbuildClient.batchCreateRepositories(request); + const [response] = await operation.promise(); + console.log(response); + } + + callBatchCreateRepositories(); + // [END cloudbuild_v2_generated_RepositoryManager_BatchCreateRepositories_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.create_connection.js b/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.create_connection.js new file mode 100644 index 00000000000..1ff4f1186b5 --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.create_connection.js @@ -0,0 +1,76 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, connection, connectionId) { + // [START cloudbuild_v2_generated_RepositoryManager_CreateConnection_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. Project and location where the connection will be created. + * Format: `projects/* /locations/*`. + */ + // const parent = 'abc123' + /** + * Required. The Connection to create. + */ + // const connection = {} + /** + * Required. The ID to use for the Connection, which will become the final + * component of the Connection's resource name. Names must be unique + * per-project per-location. Allows alphanumeric characters and any of + * -._~%!$&'()*+,;=@. + */ + // const connectionId = 'abc123' + + // Imports the Cloudbuild library + const {RepositoryManagerClient} = require('@google-cloud/cloudbuild').v2; + + // Instantiates a client + const cloudbuildClient = new RepositoryManagerClient(); + + async function callCreateConnection() { + // Construct request + const request = { + parent, + connection, + connectionId, + }; + + // Run request + const [operation] = await cloudbuildClient.createConnection(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateConnection(); + // [END cloudbuild_v2_generated_RepositoryManager_CreateConnection_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.create_repository.js b/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.create_repository.js new file mode 100644 index 00000000000..d4def936139 --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.create_repository.js @@ -0,0 +1,77 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, repository, repositoryId) { + // [START cloudbuild_v2_generated_RepositoryManager_CreateRepository_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 connection to contain the repository. If the request is part + * of a BatchCreateRepositoriesRequest, this field should be empty or match + * the parent specified there. + */ + // const parent = 'abc123' + /** + * Required. The repository to create. + */ + // const repository = {} + /** + * Required. The ID to use for the repository, which will become the final + * component of the repository's resource name. This ID should be unique in + * the connection. Allows alphanumeric characters and any of + * -._~%!$&'()*+,;=@. + */ + // const repositoryId = 'abc123' + + // Imports the Cloudbuild library + const {RepositoryManagerClient} = require('@google-cloud/cloudbuild').v2; + + // Instantiates a client + const cloudbuildClient = new RepositoryManagerClient(); + + async function callCreateRepository() { + // Construct request + const request = { + parent, + repository, + repositoryId, + }; + + // Run request + const [operation] = await cloudbuildClient.createRepository(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateRepository(); + // [END cloudbuild_v2_generated_RepositoryManager_CreateRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.delete_connection.js b/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.delete_connection.js new file mode 100644 index 00000000000..46a5ff3ce9a --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.delete_connection.js @@ -0,0 +1,73 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START cloudbuild_v2_generated_RepositoryManager_DeleteConnection_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the Connection to delete. + * Format: `projects/* /locations/* /connections/*`. + */ + // const name = 'abc123' + /** + * The current etag of the connection. + * If an etag is provided and does not match the current etag of the + * connection, deletion will be blocked and an ABORTED error will be returned. + */ + // const etag = 'abc123' + /** + * If set, validate the request, but do not actually post it. + */ + // const validateOnly = true + + // Imports the Cloudbuild library + const {RepositoryManagerClient} = require('@google-cloud/cloudbuild').v2; + + // Instantiates a client + const cloudbuildClient = new RepositoryManagerClient(); + + async function callDeleteConnection() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await cloudbuildClient.deleteConnection(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteConnection(); + // [END cloudbuild_v2_generated_RepositoryManager_DeleteConnection_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.delete_repository.js b/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.delete_repository.js new file mode 100644 index 00000000000..42194417a03 --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.delete_repository.js @@ -0,0 +1,73 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START cloudbuild_v2_generated_RepositoryManager_DeleteRepository_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the Repository to delete. + * Format: `projects/* /locations/* /connections/* /repositories/*`. + */ + // const name = 'abc123' + /** + * The current etag of the repository. + * If an etag is provided and does not match the current etag of the + * repository, deletion will be blocked and an ABORTED error will be returned. + */ + // const etag = 'abc123' + /** + * If set, validate the request, but do not actually post it. + */ + // const validateOnly = true + + // Imports the Cloudbuild library + const {RepositoryManagerClient} = require('@google-cloud/cloudbuild').v2; + + // Instantiates a client + const cloudbuildClient = new RepositoryManagerClient(); + + async function callDeleteRepository() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await cloudbuildClient.deleteRepository(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteRepository(); + // [END cloudbuild_v2_generated_RepositoryManager_DeleteRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.fetch_linkable_repositories.js b/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.fetch_linkable_repositories.js new file mode 100644 index 00000000000..3d722ecc9ac --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.fetch_linkable_repositories.js @@ -0,0 +1,72 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(connection) { + // [START cloudbuild_v2_generated_RepositoryManager_FetchLinkableRepositories_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the Connection. + * Format: `projects/* /locations/* /connections/*`. + */ + // const connection = 'abc123' + /** + * Number of results to return in the list. Default to 20. + */ + // const pageSize = 1234 + /** + * Page start. + */ + // const pageToken = 'abc123' + + // Imports the Cloudbuild library + const {RepositoryManagerClient} = require('@google-cloud/cloudbuild').v2; + + // Instantiates a client + const cloudbuildClient = new RepositoryManagerClient(); + + async function callFetchLinkableRepositories() { + // Construct request + const request = { + connection, + }; + + // Run request + const iterable = await cloudbuildClient.fetchLinkableRepositoriesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callFetchLinkableRepositories(); + // [END cloudbuild_v2_generated_RepositoryManager_FetchLinkableRepositories_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.fetch_read_token.js b/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.fetch_read_token.js new file mode 100644 index 00000000000..623c8b64bc2 --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.fetch_read_token.js @@ -0,0 +1,62 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(repository) { + // [START cloudbuild_v2_generated_RepositoryManager_FetchReadToken_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the repository in the format + * `projects/* /locations/* /connections/* /repositories/*`. + */ + // const repository = 'abc123' + + // Imports the Cloudbuild library + const {RepositoryManagerClient} = require('@google-cloud/cloudbuild').v2; + + // Instantiates a client + const cloudbuildClient = new RepositoryManagerClient(); + + async function callFetchReadToken() { + // Construct request + const request = { + repository, + }; + + // Run request + const response = await cloudbuildClient.fetchReadToken(request); + console.log(response); + } + + callFetchReadToken(); + // [END cloudbuild_v2_generated_RepositoryManager_FetchReadToken_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.fetch_read_write_token.js b/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.fetch_read_write_token.js new file mode 100644 index 00000000000..8aaabdabd84 --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.fetch_read_write_token.js @@ -0,0 +1,62 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(repository) { + // [START cloudbuild_v2_generated_RepositoryManager_FetchReadWriteToken_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the repository in the format + * `projects/* /locations/* /connections/* /repositories/*`. + */ + // const repository = 'abc123' + + // Imports the Cloudbuild library + const {RepositoryManagerClient} = require('@google-cloud/cloudbuild').v2; + + // Instantiates a client + const cloudbuildClient = new RepositoryManagerClient(); + + async function callFetchReadWriteToken() { + // Construct request + const request = { + repository, + }; + + // Run request + const response = await cloudbuildClient.fetchReadWriteToken(request); + console.log(response); + } + + callFetchReadWriteToken(); + // [END cloudbuild_v2_generated_RepositoryManager_FetchReadWriteToken_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.get_connection.js b/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.get_connection.js new file mode 100644 index 00000000000..f4146b898e5 --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.get_connection.js @@ -0,0 +1,62 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START cloudbuild_v2_generated_RepositoryManager_GetConnection_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the Connection to retrieve. + * Format: `projects/* /locations/* /connections/*`. + */ + // const name = 'abc123' + + // Imports the Cloudbuild library + const {RepositoryManagerClient} = require('@google-cloud/cloudbuild').v2; + + // Instantiates a client + const cloudbuildClient = new RepositoryManagerClient(); + + async function callGetConnection() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await cloudbuildClient.getConnection(request); + console.log(response); + } + + callGetConnection(); + // [END cloudbuild_v2_generated_RepositoryManager_GetConnection_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.get_repository.js b/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.get_repository.js new file mode 100644 index 00000000000..deca8de40e8 --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.get_repository.js @@ -0,0 +1,62 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START cloudbuild_v2_generated_RepositoryManager_GetRepository_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the Repository to retrieve. + * Format: `projects/* /locations/* /connections/* /repositories/*`. + */ + // const name = 'abc123' + + // Imports the Cloudbuild library + const {RepositoryManagerClient} = require('@google-cloud/cloudbuild').v2; + + // Instantiates a client + const cloudbuildClient = new RepositoryManagerClient(); + + async function callGetRepository() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await cloudbuildClient.getRepository(request); + console.log(response); + } + + callGetRepository(); + // [END cloudbuild_v2_generated_RepositoryManager_GetRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.list_connections.js b/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.list_connections.js new file mode 100644 index 00000000000..63a97011b65 --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.list_connections.js @@ -0,0 +1,72 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START cloudbuild_v2_generated_RepositoryManager_ListConnections_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of Connections. + * Format: `projects/* /locations/*`. + */ + // const parent = 'abc123' + /** + * Number of results to return in the list. + */ + // const pageSize = 1234 + /** + * Page start. + */ + // const pageToken = 'abc123' + + // Imports the Cloudbuild library + const {RepositoryManagerClient} = require('@google-cloud/cloudbuild').v2; + + // Instantiates a client + const cloudbuildClient = new RepositoryManagerClient(); + + async function callListConnections() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await cloudbuildClient.listConnectionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListConnections(); + // [END cloudbuild_v2_generated_RepositoryManager_ListConnections_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.list_repositories.js b/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.list_repositories.js new file mode 100644 index 00000000000..fc2a8e319b2 --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.list_repositories.js @@ -0,0 +1,79 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START cloudbuild_v2_generated_RepositoryManager_ListRepositories_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of Repositories. + * Format: `projects/* /locations/* /connections/*`. + */ + // const parent = 'abc123' + /** + * Number of results to return in the list. + */ + // const pageSize = 1234 + /** + * Page start. + */ + // const pageToken = 'abc123' + /** + * A filter expression that filters resources listed in the response. + * Expressions must follow API improvement proposal + * AIP-160 (https://google.aip.dev/160). e.g. + * `remote_uri:"https://github.com*"`. + */ + // const filter = 'abc123' + + // Imports the Cloudbuild library + const {RepositoryManagerClient} = require('@google-cloud/cloudbuild').v2; + + // Instantiates a client + const cloudbuildClient = new RepositoryManagerClient(); + + async function callListRepositories() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await cloudbuildClient.listRepositoriesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListRepositories(); + // [END cloudbuild_v2_generated_RepositoryManager_ListRepositories_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.update_connection.js b/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.update_connection.js new file mode 100644 index 00000000000..4525a347001 --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v2/repository_manager.update_connection.js @@ -0,0 +1,80 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(connection) { + // [START cloudbuild_v2_generated_RepositoryManager_UpdateConnection_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 Connection to update. + */ + // const connection = {} + /** + * The list of fields to be updated. + */ + // const updateMask = {} + /** + * If set to true, and the connection is not found a new connection + * will be created. In this situation `update_mask` is ignored. + * The creation will succeed only if the input connection has all the + * necessary information (e.g a github_config with both user_oauth_token and + * installation_id properties). + */ + // const allowMissing = true + /** + * The current etag of the connection. + * If an etag is provided and does not match the current etag of the + * connection, update will be blocked and an ABORTED error will be returned. + */ + // const etag = 'abc123' + + // Imports the Cloudbuild library + const {RepositoryManagerClient} = require('@google-cloud/cloudbuild').v2; + + // Instantiates a client + const cloudbuildClient = new RepositoryManagerClient(); + + async function callUpdateConnection() { + // Construct request + const request = { + connection, + }; + + // Run request + const [operation] = await cloudbuildClient.updateConnection(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateConnection(); + // [END cloudbuild_v2_generated_RepositoryManager_UpdateConnection_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata.google.devtools.cloudbuild.v2.json b/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata.google.devtools.cloudbuild.v2.json new file mode 100644 index 00000000000..b1ef504884c --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata.google.devtools.cloudbuild.v2.json @@ -0,0 +1,611 @@ +{ + "clientLibrary": { + "name": "nodejs-cloudbuild", + "version": "3.3.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.devtools.cloudbuild.v2", + "version": "v2" + } + ] + }, + "snippets": [ + { + "regionTag": "cloudbuild_v2_generated_RepositoryManager_CreateConnection_async", + "title": "RepositoryManager createConnection Sample", + "origin": "API_DEFINITION", + "description": " Creates a Connection.", + "canonical": true, + "file": "repository_manager.create_connection.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateConnection", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager.CreateConnection", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "connection", + "type": ".google.devtools.cloudbuild.v2.Connection" + }, + { + "name": "connection_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "RepositoryManagerClient", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManagerClient" + }, + "method": { + "shortName": "CreateConnection", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager.CreateConnection", + "service": { + "shortName": "RepositoryManager", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager" + } + } + } + }, + { + "regionTag": "cloudbuild_v2_generated_RepositoryManager_GetConnection_async", + "title": "RepositoryManager getConnection Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single connection.", + "canonical": true, + "file": "repository_manager.get_connection.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetConnection", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager.GetConnection", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.cloudbuild.v2.Connection", + "client": { + "shortName": "RepositoryManagerClient", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManagerClient" + }, + "method": { + "shortName": "GetConnection", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager.GetConnection", + "service": { + "shortName": "RepositoryManager", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager" + } + } + } + }, + { + "regionTag": "cloudbuild_v2_generated_RepositoryManager_ListConnections_async", + "title": "RepositoryManager listConnections Sample", + "origin": "API_DEFINITION", + "description": " Lists Connections in a given project and location.", + "canonical": true, + "file": "repository_manager.list_connections.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListConnections", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager.ListConnections", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.cloudbuild.v2.ListConnectionsResponse", + "client": { + "shortName": "RepositoryManagerClient", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManagerClient" + }, + "method": { + "shortName": "ListConnections", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager.ListConnections", + "service": { + "shortName": "RepositoryManager", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager" + } + } + } + }, + { + "regionTag": "cloudbuild_v2_generated_RepositoryManager_UpdateConnection_async", + "title": "RepositoryManager updateConnection Sample", + "origin": "API_DEFINITION", + "description": " Updates a single connection.", + "canonical": true, + "file": "repository_manager.update_connection.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateConnection", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager.UpdateConnection", + "async": true, + "parameters": [ + { + "name": "connection", + "type": ".google.devtools.cloudbuild.v2.Connection" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "RepositoryManagerClient", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManagerClient" + }, + "method": { + "shortName": "UpdateConnection", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager.UpdateConnection", + "service": { + "shortName": "RepositoryManager", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager" + } + } + } + }, + { + "regionTag": "cloudbuild_v2_generated_RepositoryManager_DeleteConnection_async", + "title": "RepositoryManager deleteConnection Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single connection.", + "canonical": true, + "file": "repository_manager.delete_connection.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteConnection", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager.DeleteConnection", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "etag", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "RepositoryManagerClient", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManagerClient" + }, + "method": { + "shortName": "DeleteConnection", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager.DeleteConnection", + "service": { + "shortName": "RepositoryManager", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager" + } + } + } + }, + { + "regionTag": "cloudbuild_v2_generated_RepositoryManager_CreateRepository_async", + "title": "RepositoryManager createRepository Sample", + "origin": "API_DEFINITION", + "description": " Creates a Repository.", + "canonical": true, + "file": "repository_manager.create_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateRepository", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager.CreateRepository", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "repository", + "type": ".google.devtools.cloudbuild.v2.Repository" + }, + { + "name": "repository_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "RepositoryManagerClient", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManagerClient" + }, + "method": { + "shortName": "CreateRepository", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager.CreateRepository", + "service": { + "shortName": "RepositoryManager", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager" + } + } + } + }, + { + "regionTag": "cloudbuild_v2_generated_RepositoryManager_BatchCreateRepositories_async", + "title": "RepositoryManager batchCreateRepositories Sample", + "origin": "API_DEFINITION", + "description": " Creates multiple repositories inside a connection.", + "canonical": true, + "file": "repository_manager.batch_create_repositories.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchCreateRepositories", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager.BatchCreateRepositories", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "RepositoryManagerClient", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManagerClient" + }, + "method": { + "shortName": "BatchCreateRepositories", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager.BatchCreateRepositories", + "service": { + "shortName": "RepositoryManager", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager" + } + } + } + }, + { + "regionTag": "cloudbuild_v2_generated_RepositoryManager_GetRepository_async", + "title": "RepositoryManager getRepository Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single repository.", + "canonical": true, + "file": "repository_manager.get_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetRepository", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager.GetRepository", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.cloudbuild.v2.Repository", + "client": { + "shortName": "RepositoryManagerClient", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManagerClient" + }, + "method": { + "shortName": "GetRepository", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager.GetRepository", + "service": { + "shortName": "RepositoryManager", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager" + } + } + } + }, + { + "regionTag": "cloudbuild_v2_generated_RepositoryManager_ListRepositories_async", + "title": "RepositoryManager listRepositories Sample", + "origin": "API_DEFINITION", + "description": " Lists Repositories in a given connection.", + "canonical": true, + "file": "repository_manager.list_repositories.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListRepositories", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager.ListRepositories", + "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.devtools.cloudbuild.v2.ListRepositoriesResponse", + "client": { + "shortName": "RepositoryManagerClient", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManagerClient" + }, + "method": { + "shortName": "ListRepositories", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager.ListRepositories", + "service": { + "shortName": "RepositoryManager", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager" + } + } + } + }, + { + "regionTag": "cloudbuild_v2_generated_RepositoryManager_DeleteRepository_async", + "title": "RepositoryManager deleteRepository Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single repository.", + "canonical": true, + "file": "repository_manager.delete_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteRepository", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager.DeleteRepository", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "etag", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "RepositoryManagerClient", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManagerClient" + }, + "method": { + "shortName": "DeleteRepository", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager.DeleteRepository", + "service": { + "shortName": "RepositoryManager", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager" + } + } + } + }, + { + "regionTag": "cloudbuild_v2_generated_RepositoryManager_FetchReadWriteToken_async", + "title": "RepositoryManager fetchReadWriteToken Sample", + "origin": "API_DEFINITION", + "description": " Fetches read/write token of a given repository.", + "canonical": true, + "file": "repository_manager.fetch_read_write_token.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchReadWriteToken", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager.FetchReadWriteToken", + "async": true, + "parameters": [ + { + "name": "repository", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse", + "client": { + "shortName": "RepositoryManagerClient", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManagerClient" + }, + "method": { + "shortName": "FetchReadWriteToken", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager.FetchReadWriteToken", + "service": { + "shortName": "RepositoryManager", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager" + } + } + } + }, + { + "regionTag": "cloudbuild_v2_generated_RepositoryManager_FetchReadToken_async", + "title": "RepositoryManager fetchReadToken Sample", + "origin": "API_DEFINITION", + "description": " Fetches read token of a given repository.", + "canonical": true, + "file": "repository_manager.fetch_read_token.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchReadToken", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager.FetchReadToken", + "async": true, + "parameters": [ + { + "name": "repository", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.cloudbuild.v2.FetchReadTokenResponse", + "client": { + "shortName": "RepositoryManagerClient", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManagerClient" + }, + "method": { + "shortName": "FetchReadToken", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager.FetchReadToken", + "service": { + "shortName": "RepositoryManager", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager" + } + } + } + }, + { + "regionTag": "cloudbuild_v2_generated_RepositoryManager_FetchLinkableRepositories_async", + "title": "RepositoryManager fetchLinkableRepositories Sample", + "origin": "API_DEFINITION", + "description": " FetchLinkableRepositories get repositories from SCM that are accessible and could be added to the connection.", + "canonical": true, + "file": "repository_manager.fetch_linkable_repositories.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchLinkableRepositories", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager.FetchLinkableRepositories", + "async": true, + "parameters": [ + { + "name": "connection", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse", + "client": { + "shortName": "RepositoryManagerClient", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManagerClient" + }, + "method": { + "shortName": "FetchLinkableRepositories", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager.FetchLinkableRepositories", + "service": { + "shortName": "RepositoryManager", + "fullName": "google.devtools.cloudbuild.v2.RepositoryManager" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/google-devtools-cloudbuild/src/index.ts b/packages/google-devtools-cloudbuild/src/index.ts index 4c6bc5fd2af..1f8837a6a66 100644 --- a/packages/google-devtools-cloudbuild/src/index.ts +++ b/packages/google-devtools-cloudbuild/src/index.ts @@ -17,11 +17,12 @@ // ** All changes to this file may be overwritten. ** import * as v1 from './v1'; +import * as v2 from './v2'; const CloudBuildClient = v1.CloudBuildClient; type CloudBuildClient = v1.CloudBuildClient; -export {v1, CloudBuildClient}; -export default {v1, CloudBuildClient}; +export {v1, v2, CloudBuildClient}; +export default {v1, v2, CloudBuildClient}; import * as protos from '../protos/protos'; export {protos}; diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index f4bff228e6e..73ff8b0a868 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -534,7 +534,7 @@ export class CloudBuildClient { * @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 [Build]{@link google.devtools.cloudbuild.v1.Build}. + * The first element of the array is an object representing {@link google.devtools.cloudbuild.v1.Build | Build}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -626,7 +626,7 @@ export class CloudBuildClient { * @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 [Build]{@link google.devtools.cloudbuild.v1.Build}. + * The first element of the array is an object representing {@link google.devtools.cloudbuild.v1.Build | Build}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -726,7 +726,7 @@ export class CloudBuildClient { * @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 [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. + * The first element of the array is an object representing {@link google.devtools.cloudbuild.v1.BuildTrigger | BuildTrigger}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -831,7 +831,7 @@ export class CloudBuildClient { * @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 [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. + * The first element of the array is an object representing {@link google.devtools.cloudbuild.v1.BuildTrigger | BuildTrigger}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -931,7 +931,7 @@ export class CloudBuildClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1036,7 +1036,7 @@ export class CloudBuildClient { * @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 [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. + * The first element of the array is an object representing {@link google.devtools.cloudbuild.v1.BuildTrigger | BuildTrigger}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1145,7 +1145,7 @@ export class CloudBuildClient { * @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 [ReceiveTriggerWebhookResponse]{@link google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse}. + * The first element of the array is an object representing {@link google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse | ReceiveTriggerWebhookResponse}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1245,7 +1245,7 @@ export class CloudBuildClient { * @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 [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. + * The first element of the array is an object representing {@link google.devtools.cloudbuild.v1.WorkerPool | WorkerPool}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2414,7 +2414,7 @@ export class CloudBuildClient { * @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 [Build]{@link google.devtools.cloudbuild.v1.Build}. + * The first element of the array is Array of {@link google.devtools.cloudbuild.v1.Build | Build}. * 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. @@ -2526,7 +2526,7 @@ export class CloudBuildClient { * @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 [Build]{@link google.devtools.cloudbuild.v1.Build} on 'data' event. + * An object stream which emits an object representing {@link google.devtools.cloudbuild.v1.Build | Build} 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 `listBuildsAsync()` @@ -2588,7 +2588,7 @@ export class CloudBuildClient { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [Build]{@link google.devtools.cloudbuild.v1.Build}. The API will be called under the hood as needed, once per the page, + * {@link google.devtools.cloudbuild.v1.Build | Build}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) @@ -2637,7 +2637,7 @@ export class CloudBuildClient { * @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 [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. + * The first element of the array is Array of {@link google.devtools.cloudbuild.v1.BuildTrigger | BuildTrigger}. * 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. @@ -2739,7 +2739,7 @@ export class CloudBuildClient { * @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 [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger} on 'data' event. + * An object stream which emits an object representing {@link google.devtools.cloudbuild.v1.BuildTrigger | BuildTrigger} 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 `listBuildTriggersAsync()` @@ -2791,7 +2791,7 @@ export class CloudBuildClient { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. The API will be called under the hood as needed, once per the page, + * {@link google.devtools.cloudbuild.v1.BuildTrigger | BuildTrigger}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) @@ -2838,7 +2838,7 @@ export class CloudBuildClient { * @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 [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. + * The first element of the array is Array of {@link google.devtools.cloudbuild.v1.WorkerPool | WorkerPool}. * 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. @@ -2939,7 +2939,7 @@ export class CloudBuildClient { * @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 [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool} on 'data' event. + * An object stream which emits an object representing {@link google.devtools.cloudbuild.v1.WorkerPool | WorkerPool} 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 `listWorkerPoolsAsync()` @@ -2990,7 +2990,7 @@ export class CloudBuildClient { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. The API will be called under the hood as needed, once per the page, + * {@link google.devtools.cloudbuild.v1.WorkerPool | WorkerPool}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) diff --git a/packages/google-devtools-cloudbuild/src/v2/gapic_metadata.json b/packages/google-devtools-cloudbuild/src/v2/gapic_metadata.json new file mode 100644 index 00000000000..e1b9e8003cc --- /dev/null +++ b/packages/google-devtools-cloudbuild/src/v2/gapic_metadata.json @@ -0,0 +1,165 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.devtools.cloudbuild.v2", + "libraryPackage": "@google-cloud/cloudbuild", + "services": { + "RepositoryManager": { + "clients": { + "grpc": { + "libraryClient": "RepositoryManagerClient", + "rpcs": { + "GetConnection": { + "methods": [ + "getConnection" + ] + }, + "GetRepository": { + "methods": [ + "getRepository" + ] + }, + "FetchReadWriteToken": { + "methods": [ + "fetchReadWriteToken" + ] + }, + "FetchReadToken": { + "methods": [ + "fetchReadToken" + ] + }, + "CreateConnection": { + "methods": [ + "createConnection" + ] + }, + "UpdateConnection": { + "methods": [ + "updateConnection" + ] + }, + "DeleteConnection": { + "methods": [ + "deleteConnection" + ] + }, + "CreateRepository": { + "methods": [ + "createRepository" + ] + }, + "BatchCreateRepositories": { + "methods": [ + "batchCreateRepositories" + ] + }, + "DeleteRepository": { + "methods": [ + "deleteRepository" + ] + }, + "ListConnections": { + "methods": [ + "listConnections", + "listConnectionsStream", + "listConnectionsAsync" + ] + }, + "ListRepositories": { + "methods": [ + "listRepositories", + "listRepositoriesStream", + "listRepositoriesAsync" + ] + }, + "FetchLinkableRepositories": { + "methods": [ + "fetchLinkableRepositories", + "fetchLinkableRepositoriesStream", + "fetchLinkableRepositoriesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "RepositoryManagerClient", + "rpcs": { + "GetConnection": { + "methods": [ + "getConnection" + ] + }, + "GetRepository": { + "methods": [ + "getRepository" + ] + }, + "FetchReadWriteToken": { + "methods": [ + "fetchReadWriteToken" + ] + }, + "FetchReadToken": { + "methods": [ + "fetchReadToken" + ] + }, + "CreateConnection": { + "methods": [ + "createConnection" + ] + }, + "UpdateConnection": { + "methods": [ + "updateConnection" + ] + }, + "DeleteConnection": { + "methods": [ + "deleteConnection" + ] + }, + "CreateRepository": { + "methods": [ + "createRepository" + ] + }, + "BatchCreateRepositories": { + "methods": [ + "batchCreateRepositories" + ] + }, + "DeleteRepository": { + "methods": [ + "deleteRepository" + ] + }, + "ListConnections": { + "methods": [ + "listConnections", + "listConnectionsStream", + "listConnectionsAsync" + ] + }, + "ListRepositories": { + "methods": [ + "listRepositories", + "listRepositoriesStream", + "listRepositoriesAsync" + ] + }, + "FetchLinkableRepositories": { + "methods": [ + "fetchLinkableRepositories", + "fetchLinkableRepositoriesStream", + "fetchLinkableRepositoriesAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-devtools-cloudbuild/src/v2/index.ts b/packages/google-devtools-cloudbuild/src/v2/index.ts new file mode 100644 index 00000000000..026d90530f0 --- /dev/null +++ b/packages/google-devtools-cloudbuild/src/v2/index.ts @@ -0,0 +1,19 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {RepositoryManagerClient} from './repository_manager_client'; diff --git a/packages/google-devtools-cloudbuild/src/v2/repository_manager_client.ts b/packages/google-devtools-cloudbuild/src/v2/repository_manager_client.ts new file mode 100644 index 00000000000..183a0d529e8 --- /dev/null +++ b/packages/google-devtools-cloudbuild/src/v2/repository_manager_client.ts @@ -0,0 +1,3068 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, + GrpcClientOptions, + LROperation, + PaginationCallback, + GaxCall, + IamClient, + IamProtos, + LocationsClient, + LocationProtos, +} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v2/repository_manager_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './repository_manager_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Manages connections to source code repostiories. + * @class + * @memberof v2 + */ +export class RepositoryManagerClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + repositoryManagerStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of RepositoryManagerClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @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 RepositoryManagerClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof RepositoryManagerClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); + + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + connectionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/connections/{connection}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + repositoryPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}' + ), + secretVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/secrets/{secret}/versions/{version}' + ), + servicePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}' + ), + }; + + // 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 = { + listConnections: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'connections' + ), + listRepositories: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'repositories' + ), + fetchLinkableRepositories: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'repositories' + ), + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }; + if (opts.fallback === 'rest') { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [ + { + selector: 'google.iam.v1.IAMPolicy.GetIamPolicy', + get: '/v2/{resource=projects/*/locations/*/connections/*}:getIamPolicy', + }, + { + selector: 'google.iam.v1.IAMPolicy.SetIamPolicy', + post: '/v2/{resource=projects/*/locations/*/connections/*}:setIamPolicy', + body: '*', + }, + { + selector: 'google.iam.v1.IAMPolicy.TestIamPermissions', + post: '/v2/{resource=projects/*/locations/*/connections/*}:testIamPermissions', + body: '*', + }, + { + selector: 'google.longrunning.Operations.CancelOperation', + post: '/v2/{name=projects/*/locations/*/operations/*}:cancel', + body: '*', + }, + { + selector: 'google.longrunning.Operations.GetOperation', + get: '/v2/{name=projects/*/locations/*/operations/*}', + }, + ]; + } + this.operationsClient = this._gaxModule + .lro(lroOptions) + .operationsClient(opts); + const createConnectionResponse = protoFilesRoot.lookup( + '.google.devtools.cloudbuild.v2.Connection' + ) as gax.protobuf.Type; + const createConnectionMetadata = protoFilesRoot.lookup( + '.google.devtools.cloudbuild.v2.OperationMetadata' + ) as gax.protobuf.Type; + const updateConnectionResponse = protoFilesRoot.lookup( + '.google.devtools.cloudbuild.v2.Connection' + ) as gax.protobuf.Type; + const updateConnectionMetadata = protoFilesRoot.lookup( + '.google.devtools.cloudbuild.v2.OperationMetadata' + ) as gax.protobuf.Type; + const deleteConnectionResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteConnectionMetadata = protoFilesRoot.lookup( + '.google.devtools.cloudbuild.v2.OperationMetadata' + ) as gax.protobuf.Type; + const createRepositoryResponse = protoFilesRoot.lookup( + '.google.devtools.cloudbuild.v2.Repository' + ) as gax.protobuf.Type; + const createRepositoryMetadata = protoFilesRoot.lookup( + '.google.devtools.cloudbuild.v2.OperationMetadata' + ) as gax.protobuf.Type; + const batchCreateRepositoriesResponse = protoFilesRoot.lookup( + '.google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse' + ) as gax.protobuf.Type; + const batchCreateRepositoriesMetadata = protoFilesRoot.lookup( + '.google.devtools.cloudbuild.v2.OperationMetadata' + ) as gax.protobuf.Type; + const deleteRepositoryResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteRepositoryMetadata = protoFilesRoot.lookup( + '.google.devtools.cloudbuild.v2.OperationMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + createConnection: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createConnectionResponse.decode.bind(createConnectionResponse), + createConnectionMetadata.decode.bind(createConnectionMetadata) + ), + updateConnection: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateConnectionResponse.decode.bind(updateConnectionResponse), + updateConnectionMetadata.decode.bind(updateConnectionMetadata) + ), + deleteConnection: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteConnectionResponse.decode.bind(deleteConnectionResponse), + deleteConnectionMetadata.decode.bind(deleteConnectionMetadata) + ), + createRepository: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createRepositoryResponse.decode.bind(createRepositoryResponse), + createRepositoryMetadata.decode.bind(createRepositoryMetadata) + ), + batchCreateRepositories: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + batchCreateRepositoriesResponse.decode.bind( + batchCreateRepositoriesResponse + ), + batchCreateRepositoriesMetadata.decode.bind( + batchCreateRepositoriesMetadata + ) + ), + deleteRepository: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteRepositoryResponse.decode.bind(deleteRepositoryResponse), + deleteRepositoryMetadata.decode.bind(deleteRepositoryMetadata) + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.devtools.cloudbuild.v2.RepositoryManager', + 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.repositoryManagerStub) { + return this.repositoryManagerStub; + } + + // Put together the "service stub" for + // google.devtools.cloudbuild.v2.RepositoryManager. + this.repositoryManagerStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.devtools.cloudbuild.v2.RepositoryManager' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.devtools.cloudbuild.v2.RepositoryManager, + 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 repositoryManagerStubMethods = [ + 'createConnection', + 'getConnection', + 'listConnections', + 'updateConnection', + 'deleteConnection', + 'createRepository', + 'batchCreateRepositories', + 'getRepository', + 'listRepositories', + 'deleteRepository', + 'fetchReadWriteToken', + 'fetchReadToken', + 'fetchLinkableRepositories', + ]; + for (const methodName of repositoryManagerStubMethods) { + const callPromise = this.repositoryManagerStub.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.repositoryManagerStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'cloudbuild.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'cloudbuild.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Gets details of a single connection. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the Connection to retrieve. + * Format: `projects/* /locations/* /connections/*`. + * @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.devtools.cloudbuild.v2.Connection | Connection}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/repository_manager.get_connection.js + * region_tag:cloudbuild_v2_generated_RepositoryManager_GetConnection_async + */ + getConnection( + request?: protos.google.devtools.cloudbuild.v2.IGetConnectionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.devtools.cloudbuild.v2.IConnection, + protos.google.devtools.cloudbuild.v2.IGetConnectionRequest | undefined, + {} | undefined + ] + >; + getConnection( + request: protos.google.devtools.cloudbuild.v2.IGetConnectionRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.cloudbuild.v2.IConnection, + | protos.google.devtools.cloudbuild.v2.IGetConnectionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getConnection( + request: protos.google.devtools.cloudbuild.v2.IGetConnectionRequest, + callback: Callback< + protos.google.devtools.cloudbuild.v2.IConnection, + | protos.google.devtools.cloudbuild.v2.IGetConnectionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getConnection( + request?: protos.google.devtools.cloudbuild.v2.IGetConnectionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.devtools.cloudbuild.v2.IConnection, + | protos.google.devtools.cloudbuild.v2.IGetConnectionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.devtools.cloudbuild.v2.IConnection, + | protos.google.devtools.cloudbuild.v2.IGetConnectionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.devtools.cloudbuild.v2.IConnection, + protos.google.devtools.cloudbuild.v2.IGetConnectionRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getConnection(request, options, callback); + } + /** + * Gets details of a single repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the Repository to retrieve. + * Format: `projects/* /locations/* /connections/* /repositories/*`. + * @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.devtools.cloudbuild.v2.Repository | Repository}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/repository_manager.get_repository.js + * region_tag:cloudbuild_v2_generated_RepositoryManager_GetRepository_async + */ + getRepository( + request?: protos.google.devtools.cloudbuild.v2.IGetRepositoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.devtools.cloudbuild.v2.IRepository, + protos.google.devtools.cloudbuild.v2.IGetRepositoryRequest | undefined, + {} | undefined + ] + >; + getRepository( + request: protos.google.devtools.cloudbuild.v2.IGetRepositoryRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.cloudbuild.v2.IRepository, + | protos.google.devtools.cloudbuild.v2.IGetRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getRepository( + request: protos.google.devtools.cloudbuild.v2.IGetRepositoryRequest, + callback: Callback< + protos.google.devtools.cloudbuild.v2.IRepository, + | protos.google.devtools.cloudbuild.v2.IGetRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getRepository( + request?: protos.google.devtools.cloudbuild.v2.IGetRepositoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.devtools.cloudbuild.v2.IRepository, + | protos.google.devtools.cloudbuild.v2.IGetRepositoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.devtools.cloudbuild.v2.IRepository, + | protos.google.devtools.cloudbuild.v2.IGetRepositoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.devtools.cloudbuild.v2.IRepository, + protos.google.devtools.cloudbuild.v2.IGetRepositoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getRepository(request, options, callback); + } + /** + * Fetches read/write token of a given repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.repository + * Required. The resource name of the repository in the format + * `projects/* /locations/* /connections/* /repositories/*`. + * @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.devtools.cloudbuild.v2.FetchReadWriteTokenResponse | FetchReadWriteTokenResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/repository_manager.fetch_read_write_token.js + * region_tag:cloudbuild_v2_generated_RepositoryManager_FetchReadWriteToken_async + */ + fetchReadWriteToken( + request?: protos.google.devtools.cloudbuild.v2.IFetchReadWriteTokenRequest, + options?: CallOptions + ): Promise< + [ + protos.google.devtools.cloudbuild.v2.IFetchReadWriteTokenResponse, + ( + | protos.google.devtools.cloudbuild.v2.IFetchReadWriteTokenRequest + | undefined + ), + {} | undefined + ] + >; + fetchReadWriteToken( + request: protos.google.devtools.cloudbuild.v2.IFetchReadWriteTokenRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.cloudbuild.v2.IFetchReadWriteTokenResponse, + | protos.google.devtools.cloudbuild.v2.IFetchReadWriteTokenRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchReadWriteToken( + request: protos.google.devtools.cloudbuild.v2.IFetchReadWriteTokenRequest, + callback: Callback< + protos.google.devtools.cloudbuild.v2.IFetchReadWriteTokenResponse, + | protos.google.devtools.cloudbuild.v2.IFetchReadWriteTokenRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchReadWriteToken( + request?: protos.google.devtools.cloudbuild.v2.IFetchReadWriteTokenRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.devtools.cloudbuild.v2.IFetchReadWriteTokenResponse, + | protos.google.devtools.cloudbuild.v2.IFetchReadWriteTokenRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.devtools.cloudbuild.v2.IFetchReadWriteTokenResponse, + | protos.google.devtools.cloudbuild.v2.IFetchReadWriteTokenRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.devtools.cloudbuild.v2.IFetchReadWriteTokenResponse, + ( + | protos.google.devtools.cloudbuild.v2.IFetchReadWriteTokenRequest + | 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({ + repository: request.repository ?? '', + }); + this.initialize(); + return this.innerApiCalls.fetchReadWriteToken(request, options, callback); + } + /** + * Fetches read token of a given repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.repository + * Required. The resource name of the repository in the format + * `projects/* /locations/* /connections/* /repositories/*`. + * @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.devtools.cloudbuild.v2.FetchReadTokenResponse | FetchReadTokenResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/repository_manager.fetch_read_token.js + * region_tag:cloudbuild_v2_generated_RepositoryManager_FetchReadToken_async + */ + fetchReadToken( + request?: protos.google.devtools.cloudbuild.v2.IFetchReadTokenRequest, + options?: CallOptions + ): Promise< + [ + protos.google.devtools.cloudbuild.v2.IFetchReadTokenResponse, + protos.google.devtools.cloudbuild.v2.IFetchReadTokenRequest | undefined, + {} | undefined + ] + >; + fetchReadToken( + request: protos.google.devtools.cloudbuild.v2.IFetchReadTokenRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.cloudbuild.v2.IFetchReadTokenResponse, + | protos.google.devtools.cloudbuild.v2.IFetchReadTokenRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchReadToken( + request: protos.google.devtools.cloudbuild.v2.IFetchReadTokenRequest, + callback: Callback< + protos.google.devtools.cloudbuild.v2.IFetchReadTokenResponse, + | protos.google.devtools.cloudbuild.v2.IFetchReadTokenRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchReadToken( + request?: protos.google.devtools.cloudbuild.v2.IFetchReadTokenRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.devtools.cloudbuild.v2.IFetchReadTokenResponse, + | protos.google.devtools.cloudbuild.v2.IFetchReadTokenRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.devtools.cloudbuild.v2.IFetchReadTokenResponse, + | protos.google.devtools.cloudbuild.v2.IFetchReadTokenRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.devtools.cloudbuild.v2.IFetchReadTokenResponse, + protos.google.devtools.cloudbuild.v2.IFetchReadTokenRequest | 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({ + repository: request.repository ?? '', + }); + this.initialize(); + return this.innerApiCalls.fetchReadToken(request, options, callback); + } + + /** + * Creates a Connection. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Project and location where the connection will be created. + * Format: `projects/* /locations/*`. + * @param {google.devtools.cloudbuild.v2.Connection} request.connection + * Required. The Connection to create. + * @param {string} request.connectionId + * Required. The ID to use for the Connection, which will become the final + * component of the Connection's resource name. Names must be unique + * per-project per-location. Allows alphanumeric characters and any of + * -._~%!$&'()*+,;=@. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v2/repository_manager.create_connection.js + * region_tag:cloudbuild_v2_generated_RepositoryManager_CreateConnection_async + */ + createConnection( + request?: protos.google.devtools.cloudbuild.v2.ICreateConnectionRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.devtools.cloudbuild.v2.IConnection, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createConnection( + request: protos.google.devtools.cloudbuild.v2.ICreateConnectionRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.devtools.cloudbuild.v2.IConnection, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createConnection( + request: protos.google.devtools.cloudbuild.v2.ICreateConnectionRequest, + callback: Callback< + LROperation< + protos.google.devtools.cloudbuild.v2.IConnection, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createConnection( + request?: protos.google.devtools.cloudbuild.v2.ICreateConnectionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.devtools.cloudbuild.v2.IConnection, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.devtools.cloudbuild.v2.IConnection, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.devtools.cloudbuild.v2.IConnection, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createConnection(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createConnection()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v2/repository_manager.create_connection.js + * region_tag:cloudbuild_v2_generated_RepositoryManager_CreateConnection_async + */ + async checkCreateConnectionProgress( + name: string + ): Promise< + LROperation< + protos.google.devtools.cloudbuild.v2.Connection, + protos.google.devtools.cloudbuild.v2.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createConnection, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.devtools.cloudbuild.v2.Connection, + protos.google.devtools.cloudbuild.v2.OperationMetadata + >; + } + /** + * Updates a single connection. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.devtools.cloudbuild.v2.Connection} request.connection + * Required. The Connection to update. + * @param {google.protobuf.FieldMask} request.updateMask + * The list of fields to be updated. + * @param {boolean} request.allowMissing + * If set to true, and the connection is not found a new connection + * will be created. In this situation `update_mask` is ignored. + * The creation will succeed only if the input connection has all the + * necessary information (e.g a github_config with both user_oauth_token and + * installation_id properties). + * @param {string} request.etag + * The current etag of the connection. + * If an etag is provided and does not match the current etag of the + * connection, update will be blocked and an ABORTED error will be returned. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v2/repository_manager.update_connection.js + * region_tag:cloudbuild_v2_generated_RepositoryManager_UpdateConnection_async + */ + updateConnection( + request?: protos.google.devtools.cloudbuild.v2.IUpdateConnectionRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.devtools.cloudbuild.v2.IConnection, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateConnection( + request: protos.google.devtools.cloudbuild.v2.IUpdateConnectionRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.devtools.cloudbuild.v2.IConnection, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateConnection( + request: protos.google.devtools.cloudbuild.v2.IUpdateConnectionRequest, + callback: Callback< + LROperation< + protos.google.devtools.cloudbuild.v2.IConnection, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateConnection( + request?: protos.google.devtools.cloudbuild.v2.IUpdateConnectionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.devtools.cloudbuild.v2.IConnection, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.devtools.cloudbuild.v2.IConnection, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.devtools.cloudbuild.v2.IConnection, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'connection.name': request.connection!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateConnection(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateConnection()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v2/repository_manager.update_connection.js + * region_tag:cloudbuild_v2_generated_RepositoryManager_UpdateConnection_async + */ + async checkUpdateConnectionProgress( + name: string + ): Promise< + LROperation< + protos.google.devtools.cloudbuild.v2.Connection, + protos.google.devtools.cloudbuild.v2.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateConnection, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.devtools.cloudbuild.v2.Connection, + protos.google.devtools.cloudbuild.v2.OperationMetadata + >; + } + /** + * Deletes a single connection. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the Connection to delete. + * Format: `projects/* /locations/* /connections/*`. + * @param {string} request.etag + * The current etag of the connection. + * If an etag is provided and does not match the current etag of the + * connection, deletion will be blocked and an ABORTED error will be returned. + * @param {boolean} request.validateOnly + * If set, validate the request, but do not actually post it. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v2/repository_manager.delete_connection.js + * region_tag:cloudbuild_v2_generated_RepositoryManager_DeleteConnection_async + */ + deleteConnection( + request?: protos.google.devtools.cloudbuild.v2.IDeleteConnectionRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteConnection( + request: protos.google.devtools.cloudbuild.v2.IDeleteConnectionRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteConnection( + request: protos.google.devtools.cloudbuild.v2.IDeleteConnectionRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteConnection( + request?: protos.google.devtools.cloudbuild.v2.IDeleteConnectionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteConnection(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteConnection()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v2/repository_manager.delete_connection.js + * region_tag:cloudbuild_v2_generated_RepositoryManager_DeleteConnection_async + */ + async checkDeleteConnectionProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.devtools.cloudbuild.v2.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deleteConnection, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.devtools.cloudbuild.v2.OperationMetadata + >; + } + /** + * Creates a Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The connection to contain the repository. If the request is part + * of a BatchCreateRepositoriesRequest, this field should be empty or match + * the parent specified there. + * @param {google.devtools.cloudbuild.v2.Repository} request.repository + * Required. The repository to create. + * @param {string} request.repositoryId + * Required. The ID to use for the repository, which will become the final + * component of the repository's resource name. This ID should be unique in + * the connection. Allows alphanumeric characters and any of + * -._~%!$&'()*+,;=@. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v2/repository_manager.create_repository.js + * region_tag:cloudbuild_v2_generated_RepositoryManager_CreateRepository_async + */ + createRepository( + request?: protos.google.devtools.cloudbuild.v2.ICreateRepositoryRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.devtools.cloudbuild.v2.IRepository, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createRepository( + request: protos.google.devtools.cloudbuild.v2.ICreateRepositoryRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.devtools.cloudbuild.v2.IRepository, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createRepository( + request: protos.google.devtools.cloudbuild.v2.ICreateRepositoryRequest, + callback: Callback< + LROperation< + protos.google.devtools.cloudbuild.v2.IRepository, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createRepository( + request?: protos.google.devtools.cloudbuild.v2.ICreateRepositoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.devtools.cloudbuild.v2.IRepository, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.devtools.cloudbuild.v2.IRepository, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.devtools.cloudbuild.v2.IRepository, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createRepository(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createRepository()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v2/repository_manager.create_repository.js + * region_tag:cloudbuild_v2_generated_RepositoryManager_CreateRepository_async + */ + async checkCreateRepositoryProgress( + name: string + ): Promise< + LROperation< + protos.google.devtools.cloudbuild.v2.Repository, + protos.google.devtools.cloudbuild.v2.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createRepository, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.devtools.cloudbuild.v2.Repository, + protos.google.devtools.cloudbuild.v2.OperationMetadata + >; + } + /** + * Creates multiple repositories inside a connection. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The connection to contain all the repositories being created. + * Format: projects/* /locations/* /connections/* + * The parent field in the CreateRepositoryRequest messages + * must either be empty or match this field. + * @param {number[]} request.requests + * Required. The request messages specifying the repositories to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v2/repository_manager.batch_create_repositories.js + * region_tag:cloudbuild_v2_generated_RepositoryManager_BatchCreateRepositories_async + */ + batchCreateRepositories( + request?: protos.google.devtools.cloudbuild.v2.IBatchCreateRepositoriesRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.devtools.cloudbuild.v2.IBatchCreateRepositoriesResponse, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + batchCreateRepositories( + request: protos.google.devtools.cloudbuild.v2.IBatchCreateRepositoriesRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.devtools.cloudbuild.v2.IBatchCreateRepositoriesResponse, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + batchCreateRepositories( + request: protos.google.devtools.cloudbuild.v2.IBatchCreateRepositoriesRequest, + callback: Callback< + LROperation< + protos.google.devtools.cloudbuild.v2.IBatchCreateRepositoriesResponse, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + batchCreateRepositories( + request?: protos.google.devtools.cloudbuild.v2.IBatchCreateRepositoriesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.devtools.cloudbuild.v2.IBatchCreateRepositoriesResponse, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.devtools.cloudbuild.v2.IBatchCreateRepositoriesResponse, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.devtools.cloudbuild.v2.IBatchCreateRepositoriesResponse, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.batchCreateRepositories( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `batchCreateRepositories()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v2/repository_manager.batch_create_repositories.js + * region_tag:cloudbuild_v2_generated_RepositoryManager_BatchCreateRepositories_async + */ + async checkBatchCreateRepositoriesProgress( + name: string + ): Promise< + LROperation< + protos.google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse, + protos.google.devtools.cloudbuild.v2.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.batchCreateRepositories, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse, + protos.google.devtools.cloudbuild.v2.OperationMetadata + >; + } + /** + * Deletes a single repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the Repository to delete. + * Format: `projects/* /locations/* /connections/* /repositories/*`. + * @param {string} request.etag + * The current etag of the repository. + * If an etag is provided and does not match the current etag of the + * repository, deletion will be blocked and an ABORTED error will be returned. + * @param {boolean} request.validateOnly + * If set, validate the request, but do not actually post it. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v2/repository_manager.delete_repository.js + * region_tag:cloudbuild_v2_generated_RepositoryManager_DeleteRepository_async + */ + deleteRepository( + request?: protos.google.devtools.cloudbuild.v2.IDeleteRepositoryRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteRepository( + request: protos.google.devtools.cloudbuild.v2.IDeleteRepositoryRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteRepository( + request: protos.google.devtools.cloudbuild.v2.IDeleteRepositoryRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteRepository( + request?: protos.google.devtools.cloudbuild.v2.IDeleteRepositoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteRepository(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteRepository()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v2/repository_manager.delete_repository.js + * region_tag:cloudbuild_v2_generated_RepositoryManager_DeleteRepository_async + */ + async checkDeleteRepositoryProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.devtools.cloudbuild.v2.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deleteRepository, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.devtools.cloudbuild.v2.OperationMetadata + >; + } + /** + * Lists Connections in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of Connections. + * Format: `projects/* /locations/*`. + * @param {number} request.pageSize + * Number of results to return in the list. + * @param {string} request.pageToken + * Page start. + * @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 google.devtools.cloudbuild.v2.Connection | Connection}. + * 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 `listConnectionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listConnections( + request?: protos.google.devtools.cloudbuild.v2.IListConnectionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.devtools.cloudbuild.v2.IConnection[], + protos.google.devtools.cloudbuild.v2.IListConnectionsRequest | null, + protos.google.devtools.cloudbuild.v2.IListConnectionsResponse + ] + >; + listConnections( + request: protos.google.devtools.cloudbuild.v2.IListConnectionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.devtools.cloudbuild.v2.IListConnectionsRequest, + | protos.google.devtools.cloudbuild.v2.IListConnectionsResponse + | null + | undefined, + protos.google.devtools.cloudbuild.v2.IConnection + > + ): void; + listConnections( + request: protos.google.devtools.cloudbuild.v2.IListConnectionsRequest, + callback: PaginationCallback< + protos.google.devtools.cloudbuild.v2.IListConnectionsRequest, + | protos.google.devtools.cloudbuild.v2.IListConnectionsResponse + | null + | undefined, + protos.google.devtools.cloudbuild.v2.IConnection + > + ): void; + listConnections( + request?: protos.google.devtools.cloudbuild.v2.IListConnectionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.devtools.cloudbuild.v2.IListConnectionsRequest, + | protos.google.devtools.cloudbuild.v2.IListConnectionsResponse + | null + | undefined, + protos.google.devtools.cloudbuild.v2.IConnection + >, + callback?: PaginationCallback< + protos.google.devtools.cloudbuild.v2.IListConnectionsRequest, + | protos.google.devtools.cloudbuild.v2.IListConnectionsResponse + | null + | undefined, + protos.google.devtools.cloudbuild.v2.IConnection + > + ): Promise< + [ + protos.google.devtools.cloudbuild.v2.IConnection[], + protos.google.devtools.cloudbuild.v2.IListConnectionsRequest | null, + protos.google.devtools.cloudbuild.v2.IListConnectionsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listConnections(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of Connections. + * Format: `projects/* /locations/*`. + * @param {number} request.pageSize + * Number of results to return in the list. + * @param {string} request.pageToken + * Page start. + * @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 google.devtools.cloudbuild.v2.Connection | Connection} 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 `listConnectionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listConnectionsStream( + request?: protos.google.devtools.cloudbuild.v2.IListConnectionsRequest, + 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['listConnections']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listConnections.createStream( + this.innerApiCalls.listConnections as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listConnections`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of Connections. + * Format: `projects/* /locations/*`. + * @param {number} request.pageSize + * Number of results to return in the list. + * @param {string} request.pageToken + * Page start. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.devtools.cloudbuild.v2.Connection | Connection}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v2/repository_manager.list_connections.js + * region_tag:cloudbuild_v2_generated_RepositoryManager_ListConnections_async + */ + listConnectionsAsync( + request?: protos.google.devtools.cloudbuild.v2.IListConnectionsRequest, + 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['listConnections']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listConnections.asyncIterate( + this.innerApiCalls['listConnections'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists Repositories in a given connection. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of Repositories. + * Format: `projects/* /locations/* /connections/*`. + * @param {number} request.pageSize + * Number of results to return in the list. + * @param {string} request.pageToken + * Page start. + * @param {string} request.filter + * A filter expression that filters resources listed in the response. + * Expressions must follow API improvement proposal + * [AIP-160](https://google.aip.dev/160). e.g. + * `remote_uri:"https://github.com*"`. + * @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 google.devtools.cloudbuild.v2.Repository | Repository}. + * 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 `listRepositoriesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listRepositories( + request?: protos.google.devtools.cloudbuild.v2.IListRepositoriesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.devtools.cloudbuild.v2.IRepository[], + protos.google.devtools.cloudbuild.v2.IListRepositoriesRequest | null, + protos.google.devtools.cloudbuild.v2.IListRepositoriesResponse + ] + >; + listRepositories( + request: protos.google.devtools.cloudbuild.v2.IListRepositoriesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.devtools.cloudbuild.v2.IListRepositoriesRequest, + | protos.google.devtools.cloudbuild.v2.IListRepositoriesResponse + | null + | undefined, + protos.google.devtools.cloudbuild.v2.IRepository + > + ): void; + listRepositories( + request: protos.google.devtools.cloudbuild.v2.IListRepositoriesRequest, + callback: PaginationCallback< + protos.google.devtools.cloudbuild.v2.IListRepositoriesRequest, + | protos.google.devtools.cloudbuild.v2.IListRepositoriesResponse + | null + | undefined, + protos.google.devtools.cloudbuild.v2.IRepository + > + ): void; + listRepositories( + request?: protos.google.devtools.cloudbuild.v2.IListRepositoriesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.devtools.cloudbuild.v2.IListRepositoriesRequest, + | protos.google.devtools.cloudbuild.v2.IListRepositoriesResponse + | null + | undefined, + protos.google.devtools.cloudbuild.v2.IRepository + >, + callback?: PaginationCallback< + protos.google.devtools.cloudbuild.v2.IListRepositoriesRequest, + | protos.google.devtools.cloudbuild.v2.IListRepositoriesResponse + | null + | undefined, + protos.google.devtools.cloudbuild.v2.IRepository + > + ): Promise< + [ + protos.google.devtools.cloudbuild.v2.IRepository[], + protos.google.devtools.cloudbuild.v2.IListRepositoriesRequest | null, + protos.google.devtools.cloudbuild.v2.IListRepositoriesResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listRepositories(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of Repositories. + * Format: `projects/* /locations/* /connections/*`. + * @param {number} request.pageSize + * Number of results to return in the list. + * @param {string} request.pageToken + * Page start. + * @param {string} request.filter + * A filter expression that filters resources listed in the response. + * Expressions must follow API improvement proposal + * [AIP-160](https://google.aip.dev/160). e.g. + * `remote_uri:"https://github.com*"`. + * @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 google.devtools.cloudbuild.v2.Repository | Repository} 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 `listRepositoriesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listRepositoriesStream( + request?: protos.google.devtools.cloudbuild.v2.IListRepositoriesRequest, + 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['listRepositories']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listRepositories.createStream( + this.innerApiCalls.listRepositories as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listRepositories`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of Repositories. + * Format: `projects/* /locations/* /connections/*`. + * @param {number} request.pageSize + * Number of results to return in the list. + * @param {string} request.pageToken + * Page start. + * @param {string} request.filter + * A filter expression that filters resources listed in the response. + * Expressions must follow API improvement proposal + * [AIP-160](https://google.aip.dev/160). e.g. + * `remote_uri:"https://github.com*"`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.devtools.cloudbuild.v2.Repository | Repository}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v2/repository_manager.list_repositories.js + * region_tag:cloudbuild_v2_generated_RepositoryManager_ListRepositories_async + */ + listRepositoriesAsync( + request?: protos.google.devtools.cloudbuild.v2.IListRepositoriesRequest, + 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['listRepositories']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listRepositories.asyncIterate( + this.innerApiCalls['listRepositories'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * FetchLinkableRepositories get repositories from SCM that are + * accessible and could be added to the connection. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.connection + * Required. The name of the Connection. + * Format: `projects/* /locations/* /connections/*`. + * @param {number} request.pageSize + * Number of results to return in the list. Default to 20. + * @param {string} request.pageToken + * Page start. + * @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 google.devtools.cloudbuild.v2.Repository | Repository}. + * 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 `fetchLinkableRepositoriesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + fetchLinkableRepositories( + request?: protos.google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.devtools.cloudbuild.v2.IRepository[], + protos.google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesRequest | null, + protos.google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesResponse + ] + >; + fetchLinkableRepositories( + request: protos.google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesRequest, + | protos.google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesResponse + | null + | undefined, + protos.google.devtools.cloudbuild.v2.IRepository + > + ): void; + fetchLinkableRepositories( + request: protos.google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesRequest, + callback: PaginationCallback< + protos.google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesRequest, + | protos.google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesResponse + | null + | undefined, + protos.google.devtools.cloudbuild.v2.IRepository + > + ): void; + fetchLinkableRepositories( + request?: protos.google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesRequest, + | protos.google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesResponse + | null + | undefined, + protos.google.devtools.cloudbuild.v2.IRepository + >, + callback?: PaginationCallback< + protos.google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesRequest, + | protos.google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesResponse + | null + | undefined, + protos.google.devtools.cloudbuild.v2.IRepository + > + ): Promise< + [ + protos.google.devtools.cloudbuild.v2.IRepository[], + protos.google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesRequest | null, + protos.google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesResponse + ] + > | 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({ + connection: request.connection ?? '', + }); + this.initialize(); + return this.innerApiCalls.fetchLinkableRepositories( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.connection + * Required. The name of the Connection. + * Format: `projects/* /locations/* /connections/*`. + * @param {number} request.pageSize + * Number of results to return in the list. Default to 20. + * @param {string} request.pageToken + * Page start. + * @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 google.devtools.cloudbuild.v2.Repository | Repository} 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 `fetchLinkableRepositoriesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + fetchLinkableRepositoriesStream( + request?: protos.google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesRequest, + 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({ + connection: request.connection ?? '', + }); + const defaultCallSettings = this._defaults['fetchLinkableRepositories']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.fetchLinkableRepositories.createStream( + this.innerApiCalls.fetchLinkableRepositories as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `fetchLinkableRepositories`, 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.connection + * Required. The name of the Connection. + * Format: `projects/* /locations/* /connections/*`. + * @param {number} request.pageSize + * Number of results to return in the list. Default to 20. + * @param {string} request.pageToken + * Page start. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.devtools.cloudbuild.v2.Repository | Repository}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v2/repository_manager.fetch_linkable_repositories.js + * region_tag:cloudbuild_v2_generated_RepositoryManager_FetchLinkableRepositories_async + */ + fetchLinkableRepositoriesAsync( + request?: protos.google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesRequest, + 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({ + connection: request.connection ?? '', + }); + const defaultCallSettings = this._defaults['fetchLinkableRepositories']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.fetchLinkableRepositories.asyncIterate( + this.innerApiCalls['fetchLinkableRepositories'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.getIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.setIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + */ + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.testIamPermissions(request, options, callback); + } + + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified connection resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} connection + * @returns {string} Resource name string. + */ + connectionPath(project: string, location: string, connection: string) { + return this.pathTemplates.connectionPathTemplate.render({ + project: project, + location: location, + connection: connection, + }); + } + + /** + * Parse the project from Connection resource. + * + * @param {string} connectionName + * A fully-qualified path representing Connection resource. + * @returns {string} A string representing the project. + */ + matchProjectFromConnectionName(connectionName: string) { + return this.pathTemplates.connectionPathTemplate.match(connectionName) + .project; + } + + /** + * Parse the location from Connection resource. + * + * @param {string} connectionName + * A fully-qualified path representing Connection resource. + * @returns {string} A string representing the location. + */ + matchLocationFromConnectionName(connectionName: string) { + return this.pathTemplates.connectionPathTemplate.match(connectionName) + .location; + } + + /** + * Parse the connection from Connection resource. + * + * @param {string} connectionName + * A fully-qualified path representing Connection resource. + * @returns {string} A string representing the connection. + */ + matchConnectionFromConnectionName(connectionName: string) { + return this.pathTemplates.connectionPathTemplate.match(connectionName) + .connection; + } + + /** + * 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; + } + + /** + * Return a fully-qualified repository resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} connection + * @param {string} repository + * @returns {string} Resource name string. + */ + repositoryPath( + project: string, + location: string, + connection: string, + repository: string + ) { + return this.pathTemplates.repositoryPathTemplate.render({ + project: project, + location: location, + connection: connection, + repository: repository, + }); + } + + /** + * Parse the project from Repository resource. + * + * @param {string} repositoryName + * A fully-qualified path representing Repository resource. + * @returns {string} A string representing the project. + */ + matchProjectFromRepositoryName(repositoryName: string) { + return this.pathTemplates.repositoryPathTemplate.match(repositoryName) + .project; + } + + /** + * Parse the location from Repository resource. + * + * @param {string} repositoryName + * A fully-qualified path representing Repository resource. + * @returns {string} A string representing the location. + */ + matchLocationFromRepositoryName(repositoryName: string) { + return this.pathTemplates.repositoryPathTemplate.match(repositoryName) + .location; + } + + /** + * Parse the connection from Repository resource. + * + * @param {string} repositoryName + * A fully-qualified path representing Repository resource. + * @returns {string} A string representing the connection. + */ + matchConnectionFromRepositoryName(repositoryName: string) { + return this.pathTemplates.repositoryPathTemplate.match(repositoryName) + .connection; + } + + /** + * Parse the repository from Repository resource. + * + * @param {string} repositoryName + * A fully-qualified path representing Repository resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromRepositoryName(repositoryName: string) { + return this.pathTemplates.repositoryPathTemplate.match(repositoryName) + .repository; + } + + /** + * Return a fully-qualified secretVersion resource name string. + * + * @param {string} project + * @param {string} secret + * @param {string} version + * @returns {string} Resource name string. + */ + secretVersionPath(project: string, secret: string, version: string) { + return this.pathTemplates.secretVersionPathTemplate.render({ + project: project, + secret: secret, + version: version, + }); + } + + /** + * Parse the project from SecretVersion resource. + * + * @param {string} secretVersionName + * A fully-qualified path representing SecretVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSecretVersionName(secretVersionName: string) { + return this.pathTemplates.secretVersionPathTemplate.match(secretVersionName) + .project; + } + + /** + * Parse the secret from SecretVersion resource. + * + * @param {string} secretVersionName + * A fully-qualified path representing SecretVersion resource. + * @returns {string} A string representing the secret. + */ + matchSecretFromSecretVersionName(secretVersionName: string) { + return this.pathTemplates.secretVersionPathTemplate.match(secretVersionName) + .secret; + } + + /** + * Parse the version from SecretVersion resource. + * + * @param {string} secretVersionName + * A fully-qualified path representing SecretVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromSecretVersionName(secretVersionName: string) { + return this.pathTemplates.secretVersionPathTemplate.match(secretVersionName) + .version; + } + + /** + * Return a fully-qualified service resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} namespace + * @param {string} service + * @returns {string} Resource name string. + */ + servicePath( + project: string, + location: string, + namespace: string, + service: string + ) { + return this.pathTemplates.servicePathTemplate.render({ + project: project, + location: location, + namespace: namespace, + service: service, + }); + } + + /** + * Parse the project from Service resource. + * + * @param {string} serviceName + * A fully-qualified path representing Service resource. + * @returns {string} A string representing the project. + */ + matchProjectFromServiceName(serviceName: string) { + return this.pathTemplates.servicePathTemplate.match(serviceName).project; + } + + /** + * Parse the location from Service resource. + * + * @param {string} serviceName + * A fully-qualified path representing Service resource. + * @returns {string} A string representing the location. + */ + matchLocationFromServiceName(serviceName: string) { + return this.pathTemplates.servicePathTemplate.match(serviceName).location; + } + + /** + * Parse the namespace from Service resource. + * + * @param {string} serviceName + * A fully-qualified path representing Service resource. + * @returns {string} A string representing the namespace. + */ + matchNamespaceFromServiceName(serviceName: string) { + return this.pathTemplates.servicePathTemplate.match(serviceName).namespace; + } + + /** + * Parse the service from Service resource. + * + * @param {string} serviceName + * A fully-qualified path representing Service resource. + * @returns {string} A string representing the service. + */ + matchServiceFromServiceName(serviceName: string) { + return this.pathTemplates.servicePathTemplate.match(serviceName).service; + } + + /** + * 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.repositoryManagerStub && !this._terminated) { + return this.repositoryManagerStub.then(stub => { + this._terminated = true; + stub.close(); + this.iamClient.close(); + this.locationsClient.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-devtools-cloudbuild/src/v2/repository_manager_client_config.json b/packages/google-devtools-cloudbuild/src/v2/repository_manager_client_config.json new file mode 100644 index 00000000000..9a588a7f8d9 --- /dev/null +++ b/packages/google-devtools-cloudbuild/src/v2/repository_manager_client_config.json @@ -0,0 +1,102 @@ +{ + "interfaces": { + "google.devtools.cloudbuild.v2.RepositoryManager": { + "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": { + "CreateConnection": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetConnection": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListConnections": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateConnection": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteConnection": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateRepository": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchCreateRepositories": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetRepository": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListRepositories": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteRepository": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FetchReadWriteToken": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "FetchReadToken": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "FetchLinkableRepositories": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + } + } + } + } +} diff --git a/packages/google-devtools-cloudbuild/src/v2/repository_manager_proto_list.json b/packages/google-devtools-cloudbuild/src/v2/repository_manager_proto_list.json new file mode 100644 index 00000000000..12097f770a6 --- /dev/null +++ b/packages/google-devtools-cloudbuild/src/v2/repository_manager_proto_list.json @@ -0,0 +1,4 @@ +[ + "../../protos/google/devtools/cloudbuild/v2/cloudbuild.proto", + "../../protos/google/devtools/cloudbuild/v2/repositories.proto" +] diff --git a/packages/google-devtools-cloudbuild/test/gapic_repository_manager_v2.ts b/packages/google-devtools-cloudbuild/test/gapic_repository_manager_v2.ts new file mode 100644 index 00000000000..a09be9369d2 --- /dev/null +++ b/packages/google-devtools-cloudbuild/test/gapic_repository_manager_v2.ts @@ -0,0 +1,4158 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as repositorymanagerModule from '../src'; + +import {PassThrough} from 'stream'; + +import { + protobuf, + LROperation, + operationsProtos, + IamProtos, + LocationProtos, +} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v2.RepositoryManagerClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + repositorymanagerModule.v2.RepositoryManagerClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + repositorymanagerModule.v2.RepositoryManagerClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = repositorymanagerModule.v2.RepositoryManagerClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.repositoryManagerStub, undefined); + await client.initialize(); + assert(client.repositoryManagerStub); + }); + + it('has close method for the initialized client', done => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.repositoryManagerStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.repositoryManagerStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + 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 repositorymanagerModule.v2.RepositoryManagerClient({ + 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('getConnection', () => { + it('invokes getConnection without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.GetConnectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.GetConnectionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Connection() + ); + client.innerApiCalls.getConnection = stubSimpleCall(expectedResponse); + const [response] = await client.getConnection(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConnection without error using callback', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.GetConnectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.GetConnectionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Connection() + ); + client.innerApiCalls.getConnection = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getConnection( + request, + ( + err?: Error | null, + result?: protos.google.devtools.cloudbuild.v2.IConnection | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConnection with error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.GetConnectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.GetConnectionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getConnection = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getConnection(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConnection with closed client', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.GetConnectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.GetConnectionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getConnection(request), expectedError); + }); + }); + + describe('getRepository', () => { + it('invokes getRepository without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.GetRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.GetRepositoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Repository() + ); + client.innerApiCalls.getRepository = stubSimpleCall(expectedResponse); + const [response] = await client.getRepository(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRepository without error using callback', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.GetRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.GetRepositoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Repository() + ); + client.innerApiCalls.getRepository = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getRepository( + request, + ( + err?: Error | null, + result?: protos.google.devtools.cloudbuild.v2.IRepository | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRepository with error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.GetRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.GetRepositoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getRepository = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getRepository(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRepository with closed client', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.GetRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.GetRepositoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getRepository(request), expectedError); + }); + }); + + describe('fetchReadWriteToken', () => { + it('invokes fetchReadWriteToken without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest', + ['repository'] + ); + request.repository = defaultValue1; + const expectedHeaderRequestParams = `repository=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse() + ); + client.innerApiCalls.fetchReadWriteToken = + stubSimpleCall(expectedResponse); + const [response] = await client.fetchReadWriteToken(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchReadWriteToken as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchReadWriteToken as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchReadWriteToken without error using callback', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest', + ['repository'] + ); + request.repository = defaultValue1; + const expectedHeaderRequestParams = `repository=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse() + ); + client.innerApiCalls.fetchReadWriteToken = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchReadWriteToken( + request, + ( + err?: Error | null, + result?: protos.google.devtools.cloudbuild.v2.IFetchReadWriteTokenResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchReadWriteToken as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchReadWriteToken as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchReadWriteToken with error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest', + ['repository'] + ); + request.repository = defaultValue1; + const expectedHeaderRequestParams = `repository=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchReadWriteToken = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.fetchReadWriteToken(request), expectedError); + const actualRequest = ( + client.innerApiCalls.fetchReadWriteToken as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchReadWriteToken as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchReadWriteToken with closed client', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest', + ['repository'] + ); + request.repository = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.fetchReadWriteToken(request), expectedError); + }); + }); + + describe('fetchReadToken', () => { + it('invokes fetchReadToken without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.FetchReadTokenRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.FetchReadTokenRequest', + ['repository'] + ); + request.repository = defaultValue1; + const expectedHeaderRequestParams = `repository=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.FetchReadTokenResponse() + ); + client.innerApiCalls.fetchReadToken = stubSimpleCall(expectedResponse); + const [response] = await client.fetchReadToken(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchReadToken as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchReadToken as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchReadToken without error using callback', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.FetchReadTokenRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.FetchReadTokenRequest', + ['repository'] + ); + request.repository = defaultValue1; + const expectedHeaderRequestParams = `repository=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.FetchReadTokenResponse() + ); + client.innerApiCalls.fetchReadToken = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchReadToken( + request, + ( + err?: Error | null, + result?: protos.google.devtools.cloudbuild.v2.IFetchReadTokenResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchReadToken as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchReadToken as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchReadToken with error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.FetchReadTokenRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.FetchReadTokenRequest', + ['repository'] + ); + request.repository = defaultValue1; + const expectedHeaderRequestParams = `repository=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchReadToken = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.fetchReadToken(request), expectedError); + const actualRequest = ( + client.innerApiCalls.fetchReadToken as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchReadToken as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchReadToken with closed client', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.FetchReadTokenRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.FetchReadTokenRequest', + ['repository'] + ); + request.repository = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.fetchReadToken(request), expectedError); + }); + }); + + describe('createConnection', () => { + it('invokes createConnection without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.CreateConnectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.CreateConnectionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createConnection = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createConnection(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConnection without error using callback', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.CreateConnectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.CreateConnectionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createConnection = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createConnection( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.devtools.cloudbuild.v2.IConnection, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.devtools.cloudbuild.v2.IConnection, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConnection with call error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.CreateConnectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.CreateConnectionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createConnection = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createConnection(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConnection with LRO error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.CreateConnectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.CreateConnectionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createConnection = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createConnection(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateConnectionProgress without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateConnectionProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateConnectionProgress with error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCreateConnectionProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateConnection', () => { + it('invokes updateConnection without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.UpdateConnectionRequest() + ); + request.connection ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.UpdateConnectionRequest', + ['connection', 'name'] + ); + request.connection.name = defaultValue1; + const expectedHeaderRequestParams = `connection.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateConnection = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateConnection(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConnection without error using callback', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.UpdateConnectionRequest() + ); + request.connection ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.UpdateConnectionRequest', + ['connection', 'name'] + ); + request.connection.name = defaultValue1; + const expectedHeaderRequestParams = `connection.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateConnection = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateConnection( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.devtools.cloudbuild.v2.IConnection, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.devtools.cloudbuild.v2.IConnection, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConnection with call error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.UpdateConnectionRequest() + ); + request.connection ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.UpdateConnectionRequest', + ['connection', 'name'] + ); + request.connection.name = defaultValue1; + const expectedHeaderRequestParams = `connection.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateConnection = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateConnection(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConnection with LRO error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.UpdateConnectionRequest() + ); + request.connection ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.UpdateConnectionRequest', + ['connection', 'name'] + ); + request.connection.name = defaultValue1; + const expectedHeaderRequestParams = `connection.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateConnection = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateConnection(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateConnectionProgress without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateConnectionProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateConnectionProgress with error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkUpdateConnectionProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteConnection', () => { + it('invokes deleteConnection without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.DeleteConnectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.DeleteConnectionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteConnection = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteConnection(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConnection without error using callback', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.DeleteConnectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.DeleteConnectionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteConnection = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteConnection( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConnection with call error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.DeleteConnectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.DeleteConnectionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteConnection = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteConnection(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConnection with LRO error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.DeleteConnectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.DeleteConnectionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteConnection = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteConnection(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteConnectionProgress without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteConnectionProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteConnectionProgress with error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeleteConnectionProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createRepository', () => { + it('invokes createRepository without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.CreateRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.CreateRepositoryRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createRepository = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createRepository(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRepository without error using callback', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.CreateRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.CreateRepositoryRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createRepository = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createRepository( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.devtools.cloudbuild.v2.IRepository, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.devtools.cloudbuild.v2.IRepository, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRepository with call error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.CreateRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.CreateRepositoryRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createRepository = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createRepository(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRepository with LRO error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.CreateRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.CreateRepositoryRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createRepository = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createRepository(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateRepositoryProgress without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateRepositoryProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateRepositoryProgress with error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCreateRepositoryProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('batchCreateRepositories', () => { + it('invokes batchCreateRepositories without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.batchCreateRepositories = + stubLongRunningCall(expectedResponse); + const [operation] = await client.batchCreateRepositories(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.batchCreateRepositories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchCreateRepositories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchCreateRepositories without error using callback', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.batchCreateRepositories = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchCreateRepositories( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.devtools.cloudbuild.v2.IBatchCreateRepositoriesResponse, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.devtools.cloudbuild.v2.IBatchCreateRepositoriesResponse, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.batchCreateRepositories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchCreateRepositories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchCreateRepositories with call error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchCreateRepositories = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.batchCreateRepositories(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.batchCreateRepositories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchCreateRepositories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchCreateRepositories with LRO error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchCreateRepositories = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.batchCreateRepositories(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.batchCreateRepositories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchCreateRepositories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkBatchCreateRepositoriesProgress without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkBatchCreateRepositoriesProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkBatchCreateRepositoriesProgress with error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkBatchCreateRepositoriesProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteRepository', () => { + it('invokes deleteRepository without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.DeleteRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.DeleteRepositoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteRepository = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteRepository(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteRepository without error using callback', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.DeleteRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.DeleteRepositoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteRepository = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteRepository( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.cloudbuild.v2.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteRepository with call error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.DeleteRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.DeleteRepositoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteRepository = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteRepository(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteRepository with LRO error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.DeleteRepositoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.DeleteRepositoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteRepository = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteRepository(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteRepository as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteRepositoryProgress without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteRepositoryProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteRepositoryProgress with error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeleteRepositoryProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listConnections', () => { + it('invokes listConnections without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.ListConnectionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.ListConnectionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Connection() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Connection() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Connection() + ), + ]; + client.innerApiCalls.listConnections = stubSimpleCall(expectedResponse); + const [response] = await client.listConnections(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listConnections as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConnections as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConnections without error using callback', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.ListConnectionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.ListConnectionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Connection() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Connection() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Connection() + ), + ]; + client.innerApiCalls.listConnections = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listConnections( + request, + ( + err?: Error | null, + result?: protos.google.devtools.cloudbuild.v2.IConnection[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listConnections as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConnections as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConnections with error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.ListConnectionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.ListConnectionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listConnections = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listConnections(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listConnections as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConnections as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConnectionsStream without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.ListConnectionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.ListConnectionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Connection() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Connection() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Connection() + ), + ]; + client.descriptors.page.listConnections.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listConnectionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.cloudbuild.v2.Connection[] = []; + stream.on( + 'data', + (response: protos.google.devtools.cloudbuild.v2.Connection) => { + 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.listConnections.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listConnections, request) + ); + assert( + (client.descriptors.page.listConnections.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listConnectionsStream with error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.ListConnectionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.ListConnectionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listConnections.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listConnectionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.cloudbuild.v2.Connection[] = []; + stream.on( + 'data', + (response: protos.google.devtools.cloudbuild.v2.Connection) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listConnections.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listConnections, request) + ); + assert( + (client.descriptors.page.listConnections.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listConnections without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.ListConnectionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.ListConnectionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Connection() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Connection() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Connection() + ), + ]; + client.descriptors.page.listConnections.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.devtools.cloudbuild.v2.IConnection[] = []; + const iterable = client.listConnectionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listConnections.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listConnections.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listConnections with error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.ListConnectionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.ListConnectionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listConnections.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listConnectionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.devtools.cloudbuild.v2.IConnection[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listConnections.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listConnections.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listRepositories', () => { + it('invokes listRepositories without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.ListRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.ListRepositoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Repository() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Repository() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Repository() + ), + ]; + client.innerApiCalls.listRepositories = stubSimpleCall(expectedResponse); + const [response] = await client.listRepositories(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRepositories without error using callback', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.ListRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.ListRepositoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Repository() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Repository() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Repository() + ), + ]; + client.innerApiCalls.listRepositories = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listRepositories( + request, + ( + err?: Error | null, + result?: protos.google.devtools.cloudbuild.v2.IRepository[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRepositories with error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.ListRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.ListRepositoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listRepositories = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listRepositories(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listRepositories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRepositoriesStream without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.ListRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.ListRepositoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Repository() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Repository() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Repository() + ), + ]; + client.descriptors.page.listRepositories.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listRepositoriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.cloudbuild.v2.Repository[] = []; + stream.on( + 'data', + (response: protos.google.devtools.cloudbuild.v2.Repository) => { + 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.listRepositories.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listRepositories, request) + ); + assert( + (client.descriptors.page.listRepositories.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listRepositoriesStream with error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.ListRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.ListRepositoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listRepositories.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listRepositoriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.cloudbuild.v2.Repository[] = []; + stream.on( + 'data', + (response: protos.google.devtools.cloudbuild.v2.Repository) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listRepositories.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listRepositories, request) + ); + assert( + (client.descriptors.page.listRepositories.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listRepositories without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.ListRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.ListRepositoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Repository() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Repository() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Repository() + ), + ]; + client.descriptors.page.listRepositories.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.devtools.cloudbuild.v2.IRepository[] = []; + const iterable = client.listRepositoriesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listRepositories.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listRepositories.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listRepositories with error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.ListRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.ListRepositoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listRepositories.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listRepositoriesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.devtools.cloudbuild.v2.IRepository[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listRepositories.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listRepositories.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('fetchLinkableRepositories', () => { + it('invokes fetchLinkableRepositories without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest', + ['connection'] + ); + request.connection = defaultValue1; + const expectedHeaderRequestParams = `connection=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Repository() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Repository() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Repository() + ), + ]; + client.innerApiCalls.fetchLinkableRepositories = + stubSimpleCall(expectedResponse); + const [response] = await client.fetchLinkableRepositories(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchLinkableRepositories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchLinkableRepositories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchLinkableRepositories without error using callback', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest', + ['connection'] + ); + request.connection = defaultValue1; + const expectedHeaderRequestParams = `connection=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Repository() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Repository() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Repository() + ), + ]; + client.innerApiCalls.fetchLinkableRepositories = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchLinkableRepositories( + request, + ( + err?: Error | null, + result?: protos.google.devtools.cloudbuild.v2.IRepository[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchLinkableRepositories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchLinkableRepositories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchLinkableRepositories with error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest', + ['connection'] + ); + request.connection = defaultValue1; + const expectedHeaderRequestParams = `connection=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchLinkableRepositories = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.fetchLinkableRepositories(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.fetchLinkableRepositories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchLinkableRepositories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchLinkableRepositoriesStream without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest', + ['connection'] + ); + request.connection = defaultValue1; + const expectedHeaderRequestParams = `connection=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Repository() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Repository() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Repository() + ), + ]; + client.descriptors.page.fetchLinkableRepositories.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.fetchLinkableRepositoriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.cloudbuild.v2.Repository[] = []; + stream.on( + 'data', + (response: protos.google.devtools.cloudbuild.v2.Repository) => { + 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.fetchLinkableRepositories + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.fetchLinkableRepositories, request) + ); + assert( + ( + client.descriptors.page.fetchLinkableRepositories + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes fetchLinkableRepositoriesStream with error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest', + ['connection'] + ); + request.connection = defaultValue1; + const expectedHeaderRequestParams = `connection=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.fetchLinkableRepositories.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.fetchLinkableRepositoriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.cloudbuild.v2.Repository[] = []; + stream.on( + 'data', + (response: protos.google.devtools.cloudbuild.v2.Repository) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.fetchLinkableRepositories + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.fetchLinkableRepositories, request) + ); + assert( + ( + client.descriptors.page.fetchLinkableRepositories + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with fetchLinkableRepositories without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest', + ['connection'] + ); + request.connection = defaultValue1; + const expectedHeaderRequestParams = `connection=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Repository() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Repository() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.Repository() + ), + ]; + client.descriptors.page.fetchLinkableRepositories.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.devtools.cloudbuild.v2.IRepository[] = []; + const iterable = client.fetchLinkableRepositoriesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.fetchLinkableRepositories + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.fetchLinkableRepositories + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with fetchLinkableRepositories with error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest', + ['connection'] + ); + request.connection = defaultValue1; + const expectedHeaderRequestParams = `connection=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.fetchLinkableRepositories.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.fetchLinkableRepositoriesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.devtools.cloudbuild.v2.IRepository[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.fetchLinkableRepositories + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.fetchLinkableRepositories + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub).getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.getIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub).getCall(0)); + }); + it('invokes setIamPolicy with error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.setIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions( + request, + expectedOptions + ); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes testIamPermissions without error using callback', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.TestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub).getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.testIamPermissions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.testIamPermissions(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + 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 repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + 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 repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + 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 repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); + + describe('Path templates', () => { + describe('connection', () => { + const fakePath = '/rendered/path/connection'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + connection: 'connectionValue', + }; + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.connectionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.connectionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('connectionPath', () => { + const result = client.connectionPath( + 'projectValue', + 'locationValue', + 'connectionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.connectionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromConnectionName', () => { + const result = client.matchProjectFromConnectionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.connectionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromConnectionName', () => { + const result = client.matchLocationFromConnectionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.connectionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConnectionFromConnectionName', () => { + const result = client.matchConnectionFromConnectionName(fakePath); + assert.strictEqual(result, 'connectionValue'); + assert( + (client.pathTemplates.connectionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('project', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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) + ); + }); + }); + + describe('repository', () => { + const fakePath = '/rendered/path/repository'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + connection: 'connectionValue', + repository: 'repositoryValue', + }; + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.repositoryPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.repositoryPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('repositoryPath', () => { + const result = client.repositoryPath( + 'projectValue', + 'locationValue', + 'connectionValue', + 'repositoryValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.repositoryPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromRepositoryName', () => { + const result = client.matchProjectFromRepositoryName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.repositoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromRepositoryName', () => { + const result = client.matchLocationFromRepositoryName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.repositoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConnectionFromRepositoryName', () => { + const result = client.matchConnectionFromRepositoryName(fakePath); + assert.strictEqual(result, 'connectionValue'); + assert( + (client.pathTemplates.repositoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRepositoryFromRepositoryName', () => { + const result = client.matchRepositoryFromRepositoryName(fakePath); + assert.strictEqual(result, 'repositoryValue'); + assert( + (client.pathTemplates.repositoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('secretVersion', () => { + const fakePath = '/rendered/path/secretVersion'; + const expectedParameters = { + project: 'projectValue', + secret: 'secretValue', + version: 'versionValue', + }; + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.secretVersionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.secretVersionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('secretVersionPath', () => { + const result = client.secretVersionPath( + 'projectValue', + 'secretValue', + 'versionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.secretVersionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromSecretVersionName', () => { + const result = client.matchProjectFromSecretVersionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.secretVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSecretFromSecretVersionName', () => { + const result = client.matchSecretFromSecretVersionName(fakePath); + assert.strictEqual(result, 'secretValue'); + assert( + (client.pathTemplates.secretVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchVersionFromSecretVersionName', () => { + const result = client.matchVersionFromSecretVersionName(fakePath); + assert.strictEqual(result, 'versionValue'); + assert( + (client.pathTemplates.secretVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('service', () => { + const fakePath = '/rendered/path/service'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + namespace: 'namespaceValue', + service: 'serviceValue', + }; + const client = new repositorymanagerModule.v2.RepositoryManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.servicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.servicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('servicePath', () => { + const result = client.servicePath( + 'projectValue', + 'locationValue', + 'namespaceValue', + 'serviceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.servicePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromServiceName', () => { + const result = client.matchProjectFromServiceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.servicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromServiceName', () => { + const result = client.matchLocationFromServiceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.servicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNamespaceFromServiceName', () => { + const result = client.matchNamespaceFromServiceName(fakePath); + assert.strictEqual(result, 'namespaceValue'); + assert( + (client.pathTemplates.servicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromServiceName', () => { + const result = client.matchServiceFromServiceName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.servicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); From c530beb09626986e4eaaec3066cb6b627dce6070 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 23 Feb 2023 12:21:57 -0800 Subject: [PATCH 45/80] feat: [dataproc] add support for new Dataproc features (#4000) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add support for new Dataproc features PiperOrigin-RevId: 510421528 Source-Link: https://github.com/googleapis/googleapis/commit/5a395e4addbe654afb5564367dffdce929ccd25a Source-Link: https://github.com/googleapis/googleapis-gen/commit/54e9de1f13dbe0c6bef5bc6e7a2a4edbd588bd1b Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFwcm9jLy5Pd2xCb3QueWFtbCIsImgiOiI1NGU5ZGUxZjEzZGJlMGM2YmVmNWJjNmU3YTJhNGVkYmQ1ODhiZDFiIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: ROLLBACK: add support for new Dataproc features PiperOrigin-RevId: 511238112 Source-Link: https://github.com/googleapis/googleapis/commit/d12657564ddaeec2671164670683f0b6f347843a Source-Link: https://github.com/googleapis/googleapis-gen/commit/a338d04315b79a899b4d2fa31469e4659ea322d0 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFwcm9jLy5Pd2xCb3QueWFtbCIsImgiOiJhMzM4ZDA0MzE1Yjc5YTg5OWI0ZDJmYTMxNDY5ZTQ2NTllYTMyMmQwIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add support for new Dataproc features 1. Allow to change shielded config defaults for 2.1+ images 2. Support batches filtering in list API 3. Support Trino jobs on 2.1+ image clusters 4. Support batch TTL 5. Support custom staging bucket for batches 6. Expose approximate and current batches resources usage 7. Support Hudi and Trino components PiperOrigin-RevId: 511550277 Source-Link: https://github.com/googleapis/googleapis/commit/9111603ba03bf5c919ab54aab0e5039f07cddd6d Source-Link: https://github.com/googleapis/googleapis-gen/commit/4a0877ffbede2d57c2f3776e2d8df6a2d6f9b99c Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFwcm9jLy5Pd2xCb3QueWFtbCIsImgiOiI0YTA4NzdmZmJlZGUyZDU3YzJmMzc3NmUyZDhkZjZhMmQ2ZjliOTljIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: Daniel Bankhead --- .../dataproc/v1/autoscaling_policies.proto | 65 +- .../google/cloud/dataproc/v1/batches.proto | 109 +- .../google/cloud/dataproc/v1/clusters.proto | 91 +- .../google/cloud/dataproc/v1/jobs.proto | 40 + .../cloud/dataproc/v1/node_groups.proto | 2 +- .../google/cloud/dataproc/v1/operations.proto | 4 + .../google/cloud/dataproc/v1/shared.proto | 279 +- .../dataproc/v1/workflow_templates.proto | 107 +- .../google-cloud-dataproc/protos/protos.d.ts | 851 ++++- .../google-cloud-dataproc/protos/protos.js | 3398 ++++++++++++----- .../google-cloud-dataproc/protos/protos.json | 309 +- .../v1/batch_controller.create_batch.js | 4 +- .../v1/batch_controller.delete_batch.js | 4 +- .../v1/batch_controller.get_batch.js | 4 +- .../v1/batch_controller.list_batches.js | 19 + .../v1/cluster_controller.update_cluster.js | 2 +- ...node_group_controller.resize_node_group.js | 2 +- ...pet_metadata.google.cloud.dataproc.v1.json | 16 +- .../v1/autoscaling_policy_service_client.ts | 145 + .../src/v1/batch_controller_client.ts | 404 +- .../src/v1/cluster_controller_client.ts | 334 +- .../src/v1/job_controller_client.ts | 332 ++ .../src/v1/node_group_controller_client.ts | 334 +- .../v1/workflow_template_service_client.ts | 335 +- .../gapic_autoscaling_policy_service_v1.ts | 335 +- .../test/gapic_batch_controller_v1.ts | 631 ++- .../test/gapic_cluster_controller_v1.ts | 631 ++- .../test/gapic_job_controller_v1.ts | 631 ++- .../test/gapic_node_group_controller_v1.ts | 694 +++- .../gapic_workflow_template_service_v1.ts | 651 +++- 30 files changed, 9234 insertions(+), 1529 deletions(-) diff --git a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/autoscaling_policies.proto b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/autoscaling_policies.proto index 1461b87fcf3..337ec6a6479 100644 --- a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/autoscaling_policies.proto +++ b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/autoscaling_policies.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -36,10 +36,12 @@ option (google.api.resource_definition) = { // Dataproc API. service AutoscalingPolicyService { option (google.api.default_host) = "dataproc.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Creates new autoscaling policy. - rpc CreateAutoscalingPolicy(CreateAutoscalingPolicyRequest) returns (AutoscalingPolicy) { + rpc CreateAutoscalingPolicy(CreateAutoscalingPolicyRequest) + returns (AutoscalingPolicy) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/autoscalingPolicies" body: "policy" @@ -55,7 +57,8 @@ service AutoscalingPolicyService { // // Disabled check for update_mask, because all updates will be full // replacements. - rpc UpdateAutoscalingPolicy(UpdateAutoscalingPolicyRequest) returns (AutoscalingPolicy) { + rpc UpdateAutoscalingPolicy(UpdateAutoscalingPolicyRequest) + returns (AutoscalingPolicy) { option (google.api.http) = { put: "/v1/{policy.name=projects/*/locations/*/autoscalingPolicies/*}" body: "policy" @@ -68,7 +71,8 @@ service AutoscalingPolicyService { } // Retrieves autoscaling policy. - rpc GetAutoscalingPolicy(GetAutoscalingPolicyRequest) returns (AutoscalingPolicy) { + rpc GetAutoscalingPolicy(GetAutoscalingPolicyRequest) + returns (AutoscalingPolicy) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/autoscalingPolicies/*}" additional_bindings { @@ -79,7 +83,8 @@ service AutoscalingPolicyService { } // Lists autoscaling policies in the project. - rpc ListAutoscalingPolicies(ListAutoscalingPoliciesRequest) returns (ListAutoscalingPoliciesResponse) { + rpc ListAutoscalingPolicies(ListAutoscalingPoliciesRequest) + returns (ListAutoscalingPoliciesResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/autoscalingPolicies" additional_bindings { @@ -91,7 +96,8 @@ service AutoscalingPolicyService { // Deletes an autoscaling policy. It is an error to delete an autoscaling // policy that is in use by one or more clusters. - rpc DeleteAutoscalingPolicy(DeleteAutoscalingPolicyRequest) returns (google.protobuf.Empty) { + rpc DeleteAutoscalingPolicy(DeleteAutoscalingPolicyRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/autoscalingPolicies/*}" additional_bindings { @@ -132,14 +138,17 @@ message AutoscalingPolicy { // Autoscaling algorithm for policy. oneof algorithm { - BasicAutoscalingAlgorithm basic_algorithm = 3 [(google.api.field_behavior) = REQUIRED]; + BasicAutoscalingAlgorithm basic_algorithm = 3 + [(google.api.field_behavior) = REQUIRED]; } // Required. Describes how the autoscaler will operate for primary workers. - InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(google.api.field_behavior) = REQUIRED]; + InstanceGroupAutoscalingPolicyConfig worker_config = 4 + [(google.api.field_behavior) = REQUIRED]; // Optional. Describes how the autoscaler will operate for secondary workers. - InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(google.api.field_behavior) = OPTIONAL]; + InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 + [(google.api.field_behavior) = OPTIONAL]; // Optional. The labels to associate with this autoscaling policy. // Label **keys** must contain 1 to 63 characters, and must conform to @@ -155,14 +164,16 @@ message AutoscalingPolicy { message BasicAutoscalingAlgorithm { oneof config { // Required. YARN autoscaling configuration. - BasicYarnAutoscalingConfig yarn_config = 1 [(google.api.field_behavior) = REQUIRED]; + BasicYarnAutoscalingConfig yarn_config = 1 + [(google.api.field_behavior) = REQUIRED]; } // Optional. Duration between scaling events. A scaling period starts after // the update operation from the previous event has completed. // // Bounds: [2m, 1d]. Default: 2m. - google.protobuf.Duration cooldown_period = 2 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.Duration cooldown_period = 2 + [(google.api.field_behavior) = OPTIONAL]; } // Basic autoscaling configurations for YARN. @@ -173,22 +184,23 @@ message BasicYarnAutoscalingConfig { // downscaling operations. // // Bounds: [0s, 1d]. - google.protobuf.Duration graceful_decommission_timeout = 5 [(google.api.field_behavior) = REQUIRED]; - - // Required. Fraction of average YARN pending memory in the last cooldown period - // for which to add workers. A scale-up factor of 1.0 will result in scaling - // up so that there is no pending memory remaining after the update (more - // aggressive scaling). A scale-up factor closer to 0 will result in a smaller - // magnitude of scaling up (less aggressive scaling). - // See [How autoscaling + google.protobuf.Duration graceful_decommission_timeout = 5 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Fraction of average YARN pending memory in the last cooldown + // period for which to add workers. A scale-up factor of 1.0 will result in + // scaling up so that there is no pending memory remaining after the update + // (more aggressive scaling). A scale-up factor closer to 0 will result in a + // smaller magnitude of scaling up (less aggressive scaling). See [How + // autoscaling // works](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/autoscaling#how_autoscaling_works) // for more information. // // Bounds: [0.0, 1.0]. double scale_up_factor = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. Fraction of average YARN pending memory in the last cooldown period - // for which to remove workers. A scale-down factor of 1 will result in + // Required. Fraction of average YARN pending memory in the last cooldown + // period for which to remove workers. A scale-down factor of 1 will result in // scaling down so that there is no available memory remaining after the // update (more aggressive scaling). A scale-down factor of 0 disables // removing workers, which can be beneficial for autoscaling a single job. @@ -206,7 +218,8 @@ message BasicYarnAutoscalingConfig { // on any recommended change. // // Bounds: [0.0, 1.0]. Default: 0.0. - double scale_up_min_worker_fraction = 3 [(google.api.field_behavior) = OPTIONAL]; + double scale_up_min_worker_fraction = 3 + [(google.api.field_behavior) = OPTIONAL]; // Optional. Minimum scale-down threshold as a fraction of total cluster size // before scaling occurs. For example, in a 20-worker cluster, a threshold of @@ -215,7 +228,8 @@ message BasicYarnAutoscalingConfig { // on any recommended change. // // Bounds: [0.0, 1.0]. Default: 0.0. - double scale_down_min_worker_fraction = 4 [(google.api.field_behavior) = OPTIONAL]; + double scale_down_min_worker_fraction = 4 + [(google.api.field_behavior) = OPTIONAL]; } // Configuration for the size bounds of an instance group, including its @@ -358,7 +372,8 @@ message ListAutoscalingPoliciesRequest { // A response to a request to list autoscaling policies in a project. message ListAutoscalingPoliciesResponse { // Output only. Autoscaling policies list. - repeated AutoscalingPolicy policies = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated AutoscalingPolicy policies = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. This token is included in the response if there are more // results to fetch. diff --git a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/batches.proto b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/batches.proto index 0aee7f2cae2..cde1351c83d 100644 --- a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/batches.proto +++ b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/batches.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -33,7 +33,8 @@ option java_package = "com.google.cloud.dataproc.v1"; // The BatchController provides methods to manage batch workloads. service BatchController { option (google.api.default_host) = "dataproc.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Creates a batch workload that executes asynchronously. rpc CreateBatch(CreateBatchRequest) returns (google.longrunning.Operation) { @@ -87,8 +88,8 @@ message CreateBatchRequest { // Required. The batch to create. Batch batch = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. The ID to use for the batch, which will become the final component of - // the batch's resource name. + // Optional. The ID to use for the batch, which will become the final + // component of the batch's resource name. // // This value must be 4-63 characters. Valid characters are `/[a-z][0-9]-/`. string batch_id = 3 [(google.api.field_behavior) = OPTIONAL]; @@ -110,12 +111,12 @@ message CreateBatchRequest { // A request to get the resource representation for a batch workload. message GetBatchRequest { - // Required. The name of the batch to retrieve. + // Required. The fully qualified name of the batch to retrieve + // in the format + // "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataproc.googleapis.com/Batch" - } + (google.api.resource_reference) = { type: "dataproc.googleapis.com/Batch" } ]; } @@ -137,6 +138,28 @@ message ListBatchesRequest { // Optional. A page token received from a previous `ListBatches` call. // Provide this token to retrieve the subsequent page. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A filter for the batches to return in the response. + // + // A filter is a logical expression constraining the values of various fields + // in each batch resource. Filters are case sensitive, and may contain + // multiple clauses combined with logical operators (AND/OR). + // Supported fields are `batch_id`, `batch_uuid`, `state`, and `create_time`. + // + // e.g. `state = RUNNING and create_time < "2023-01-01T00:00:00Z"` + // filters for batches in state RUNNING that were created before 2023-01-01 + // + // See https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed + // description of the filter syntax and a list of supported comparisons. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field(s) on which to sort the list of batches. + // + // Currently the only supported sort orders are unspecified (empty) and + // `create_time desc` to sort by most recently created batches first. + // + // See https://google.aip.dev/132#ordering for more details. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; } // A list of batch workloads. @@ -151,12 +174,12 @@ message ListBatchesResponse { // A request to delete a batch workload. message DeleteBatchRequest { - // Required. The name of the batch resource to delete. + // Required. The fully qualified name of the batch to retrieve + // in the format + // "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataproc.googleapis.com/Batch" - } + (google.api.resource_reference) = { type: "dataproc.googleapis.com/Batch" } ]; } @@ -167,18 +190,6 @@ message Batch { pattern: "projects/{project}/locations/{location}/batches/{batch}" }; - // Historical state information. - message StateHistory { - // Output only. The state of the batch at this point in history. - State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Details about the state at this point in history. - string state_message = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the batch entered the historical state. - google.protobuf.Timestamp state_start_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - } - // The batch state. enum State { // The batch state is unknown. @@ -203,6 +214,19 @@ message Batch { FAILED = 6; } + // Historical state information. + message StateHistory { + // Output only. The state of the batch at this point in history. + State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Details about the state at this point in history. + string state_message = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the batch entered the historical state. + google.protobuf.Timestamp state_start_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + // Output only. The resource name of the batch. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -211,7 +235,8 @@ message Batch { string uuid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time when the batch was created. - google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // The application/framework-specific portion of the batch configuration. oneof batch_config { @@ -239,7 +264,8 @@ message Batch { string state_message = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time when the batch entered a current state. - google.protobuf.Timestamp state_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp state_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The email address of the user who created the batch. string creator = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -257,13 +283,15 @@ message Batch { RuntimeConfig runtime_config = 14 [(google.api.field_behavior) = OPTIONAL]; // Optional. Environment configuration for the batch execution. - EnvironmentConfig environment_config = 15 [(google.api.field_behavior) = OPTIONAL]; + EnvironmentConfig environment_config = 15 + [(google.api.field_behavior) = OPTIONAL]; // Output only. The resource name of the operation associated with this batch. string operation = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Historical state information for the batch. - repeated StateHistory state_history = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated StateHistory state_history = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // A configuration for running an @@ -271,8 +299,8 @@ message Batch { // PySpark](https://spark.apache.org/docs/latest/api/python/getting_started/quickstart.html) // batch workload. message PySparkBatch { - // Required. The HCFS URI of the main Python file to use as the Spark driver. Must - // be a .py file. + // Required. The HCFS URI of the main Python file to use as the Spark driver. + // Must be a .py file. string main_python_file_uri = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. The arguments to pass to the driver. Do not include arguments @@ -298,7 +326,7 @@ message PySparkBatch { repeated string archive_uris = 6 [(google.api.field_behavior) = OPTIONAL]; } -// A configuration for running an [Apache Spark](http://spark.apache.org/) +// A configuration for running an [Apache Spark](https://spark.apache.org/) // batch workload. message SparkBatch { // The specification of the main method to call to drive the Spark @@ -310,8 +338,8 @@ message SparkBatch { // Optional. The HCFS URI of the jar file that contains the main class. string main_jar_file_uri = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The name of the driver main class. The jar file that contains the class - // must be in the classpath or specified in `jar_file_uris`. + // Optional. The name of the driver main class. The jar file that contains + // the class must be in the classpath or specified in `jar_file_uris`. string main_class = 2 [(google.api.field_behavior) = OPTIONAL]; } @@ -342,9 +370,9 @@ message SparkRBatch { // Must be a `.R` or `.r` file. string main_r_file_uri = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. The arguments to pass to the Spark driver. Do not include arguments - // that can be set as batch properties, such as `--conf`, since a collision - // can occur that causes an incorrect batch submission. + // Optional. The arguments to pass to the Spark driver. Do not include + // arguments that can be set as batch properties, such as `--conf`, since a + // collision can occur that causes an incorrect batch submission. repeated string args = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. HCFS URIs of files to be placed in the working directory of @@ -358,14 +386,17 @@ message SparkRBatch { } // A configuration for running -// [Apache Spark SQL](http://spark.apache.org/sql/) queries as a batch workload. +// [Apache Spark SQL](https://spark.apache.org/sql/) queries as a batch +// workload. message SparkSqlBatch { - // Required. The HCFS URI of the script that contains Spark SQL queries to execute. + // Required. The HCFS URI of the script that contains Spark SQL queries to + // execute. string query_file_uri = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. Mapping of query variable names to values (equivalent to the // Spark SQL command: `SET name="value";`). - map query_variables = 2 [(google.api.field_behavior) = OPTIONAL]; + map query_variables = 2 + [(google.api.field_behavior) = OPTIONAL]; // Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH. repeated string jar_file_uris = 3 [(google.api.field_behavior) = OPTIONAL]; diff --git a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/clusters.proto b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/clusters.proto index eff7cf25aad..d1e46bd3d56 100644 --- a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/clusters.proto +++ b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/clusters.proto @@ -30,14 +30,6 @@ option go_package = "cloud.google.com/go/dataproc/apiv1/dataprocpb;dataprocpb"; option java_multiple_files = true; option java_outer_classname = "ClustersProto"; option java_package = "com.google.cloud.dataproc.v1"; -option (google.api.resource_definition) = { - type: "container.googleapis.com/Cluster" - pattern: "projects/{project}/locations/{location}/clusters/{cluster}" -}; -option (google.api.resource_definition) = { - type: "metastore.googleapis.com/Service" - pattern: "projects/{project}/locations/{location}/services/{service}" -}; // The ClusterControllerService provides methods to manage clusters // of Compute Engine instances. @@ -174,12 +166,14 @@ message Cluster { // Optional. The cluster config for a cluster of Compute Engine Instances. // Note that Dataproc may set default values, and values may change // when clusters are updated. + // + // Exactly one of ClusterConfig or VirtualClusterConfig must be specified. ClusterConfig config = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The virtual cluster config is used when creating a Dataproc // cluster that does not directly control the underlying compute resources, // for example, when creating a [Dataproc-on-GKE - // cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke). + // cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke-overview). // Dataproc may set default values, and values may change when // clusters are updated. Exactly one of // [config][google.cloud.dataproc.v1.Cluster.config] or @@ -316,7 +310,7 @@ message ClusterConfig { // The Dataproc cluster config for a cluster that does not directly control the // underlying compute resources, such as a [Dataproc-on-GKE -// cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke). +// cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke-overview). message VirtualClusterConfig { // Optional. A Cloud Storage bucket used to stage job // dependencies, config files, and job driver console output. @@ -414,17 +408,15 @@ message GceClusterConfig { BIDIRECTIONAL = 3; } - // Optional. The zone where the Compute Engine cluster will be located. - // On a create request, it is required in the "global" region. If omitted - // in a non-global Dataproc region, the service will pick a zone in the - // corresponding Compute Engine region. On a get request, zone will - // always be present. + // Optional. The Compute Engine zone where the Dataproc cluster will be + // located. If omitted, the service will pick a zone in the cluster's Compute + // Engine region. On a get request, zone will always be present. // // A full URL, partial URI, or short name are valid. Examples: // // * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]` // * `projects/[project_id]/zones/[zone]` - // * `us-central1-f` + // * `[zone]` string zone_uri = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. The Compute Engine network to be used for machine @@ -436,8 +428,8 @@ message GceClusterConfig { // // A full URL, partial URI, or short name are valid. Examples: // - // * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default` - // * `projects/[project_id]/regions/global/default` + // * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default` + // * `projects/[project_id]/global/networks/default` // * `default` string network_uri = 2 [(google.api.field_behavior) = OPTIONAL]; @@ -446,8 +438,8 @@ message GceClusterConfig { // // A full URL, partial URI, or short name are valid. Examples: // - // * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0` - // * `projects/[project_id]/regions/us-east1/subnetworks/sub0` + // * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/[region]/subnetworks/sub0` + // * `projects/[project_id]/regions/[region]/subnetworks/sub0` // * `sub0` string subnetwork_uri = 6 [(google.api.field_behavior) = OPTIONAL]; @@ -457,7 +449,7 @@ message GceClusterConfig { // instance. This `internal_ip_only` restriction can only be enabled for // subnetwork enabled networks, and all off-cluster dependencies must be // configured to be accessible without external IP addresses. - bool internal_ip_only = 7 [(google.api.field_behavior) = OPTIONAL]; + optional bool internal_ip_only = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. The type of IPv6 access for a cluster. PrivateIpv6GoogleAccess private_ipv6_google_access = 12 @@ -533,8 +525,8 @@ message NodeGroupAffinity { // // A full URL, partial URI, or node group name are valid. Examples: // - // * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-central1-a/nodeGroups/node-group-1` - // * `projects/[project_id]/zones/us-central1-a/nodeGroups/node-group-1` + // * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/nodeGroups/node-group-1` + // * `projects/[project_id]/zones/[zone]/nodeGroups/node-group-1` // * `node-group-1` string node_group_uri = 1 [(google.api.field_behavior) = REQUIRED]; } @@ -543,13 +535,14 @@ message NodeGroupAffinity { // VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm). message ShieldedInstanceConfig { // Optional. Defines whether instances have Secure Boot enabled. - bool enable_secure_boot = 1 [(google.api.field_behavior) = OPTIONAL]; + optional bool enable_secure_boot = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. Defines whether instances have the vTPM enabled. - bool enable_vtpm = 2 [(google.api.field_behavior) = OPTIONAL]; + optional bool enable_vtpm = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Defines whether instances have integrity monitoring enabled. - bool enable_integrity_monitoring = 3 [(google.api.field_behavior) = OPTIONAL]; + optional bool enable_integrity_monitoring = 3 + [(google.api.field_behavior) = OPTIONAL]; } // Confidential Instance Config for clusters using [Confidential @@ -613,14 +606,14 @@ message InstanceGroupConfig { // // Image examples: // - // * `https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/[image-id]` + // * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/[image-id]` // * `projects/[project_id]/global/images/[image-id]` // * `image-id` // // Image family examples. Dataproc will use the most recent // image from the family: // - // * `https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/family/[custom-image-family-name]` + // * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/family/[custom-image-family-name]` // * `projects/[project_id]/global/images/family/[custom-image-family-name]` // // If the URI is unspecified, it will be inferred from @@ -631,8 +624,8 @@ message InstanceGroupConfig { // // A full URL, partial URI, or short name are valid. Examples: // - // * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2` - // * `projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2` + // * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2` + // * `projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2` // * `n1-standard-2` // // **Auto Zone Exception**: If you are using the Dataproc @@ -693,12 +686,12 @@ message AcceleratorConfig { // Full URL, partial URI, or short name of the accelerator type resource to // expose to this instance. See // [Compute Engine - // AcceleratorTypes](https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes). + // AcceleratorTypes](https://cloud.google.com/compute/docs/reference/v1/acceleratorTypes). // // Examples: // - // * `https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80` - // * `projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80` + // * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-k80` + // * `projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-k80` // * `nvidia-tesla-k80` // // **Auto Zone Exception**: If you are using the Dataproc @@ -730,6 +723,9 @@ message DiskConfig { // If one or more SSDs are attached, this runtime bulk // data is spread across them, and the boot disk contains only basic // config and installed binaries. + // + // Note: Local SSD options may vary by machine type and number of vCPUs + // selected. int32 num_local_ssds = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Interface type of local SSDs (default is "scsi"). @@ -1065,6 +1061,18 @@ message MetastoreConfig { ]; } +// Contains cluster daemon metrics, such as HDFS and YARN stats. +// +// **Beta Feature**: This report is available for testing purposes only. It may +// be changed before final release. +message ClusterMetrics { + // The HDFS metrics. + map hdfs_metrics = 1; + + // YARN metrics. + map yarn_metrics = 2; +} + // Dataproc metric config. message DataprocMetricConfig { // A source for the collection of Dataproc OSS metrics (see [available OSS @@ -1094,6 +1102,9 @@ message DataprocMetricConfig { // Hiveserver2 metric source. HIVESERVER2 = 6; + + // hivemetastore metric source + HIVEMETASTORE = 7; } // A Dataproc OSS metric. @@ -1141,18 +1152,6 @@ message DataprocMetricConfig { repeated Metric metrics = 1 [(google.api.field_behavior) = REQUIRED]; } -// Contains cluster daemon metrics, such as HDFS and YARN stats. -// -// **Beta Feature**: This report is available for testing purposes only. It may -// be changed before final release. -message ClusterMetrics { - // The HDFS metrics. - map hdfs_metrics = 1; - - // The YARN metrics. - map yarn_metrics = 2; -} - // A request to create a cluster. message CreateClusterRequest { // Required. The ID of the Google Cloud Platform project that the cluster @@ -1199,7 +1198,7 @@ message UpdateClusterRequest { // Required. The changes to the cluster. Cluster cluster = 3 [(google.api.field_behavior) = REQUIRED]; - // Optional. Timeout for graceful YARN decomissioning. Graceful + // Optional. Timeout for graceful YARN decommissioning. Graceful // decommissioning allows removing nodes from the cluster without // interrupting jobs in progress. Timeout specifies how long to wait for jobs // in progress to finish before forcefully removing nodes (and potentially diff --git a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/jobs.proto b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/jobs.proto index 25bd69d0a6e..1c19ce66bcd 100644 --- a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/jobs.proto +++ b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/jobs.proto @@ -476,6 +476,43 @@ message PrestoJob { LoggingConfig logging_config = 7 [(google.api.field_behavior) = OPTIONAL]; } +// A Dataproc job for running [Trino](https://trino.io/) queries. +// **IMPORTANT**: The [Dataproc Trino Optional +// Component](https://cloud.google.com/dataproc/docs/concepts/components/trino) +// must be enabled when the cluster is created to submit a Trino job to the +// cluster. +message TrinoJob { + // Required. The sequence of Trino queries to execute, specified as + // either an HCFS file URI or as a list of queries. + oneof queries { + // The HCFS URI of the script that contains SQL queries. + string query_file_uri = 1; + + // A list of queries. + QueryList query_list = 2; + } + + // Optional. Whether to continue executing queries if a query fails. + // The default value is `false`. Setting to `true` can be useful when + // executing independent parallel queries. + bool continue_on_failure = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The format in which query output will be displayed. See the + // Trino documentation for supported output formats + string output_format = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Trino client tags to attach to this query + repeated string client_tags = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A mapping of property names to values. Used to set Trino + // [session properties](https://trino.io/docs/current/sql/set-session.html) + // Equivalent to using the --session flag in the Trino CLI + map properties = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The runtime log config for job execution. + LoggingConfig logging_config = 7 [(google.api.field_behavior) = OPTIONAL]; +} + // Dataproc job config. message JobPlacement { // Required. The name of the cluster where the job will be submitted. @@ -680,6 +717,9 @@ message Job { // Optional. Job is a Presto job. PrestoJob presto_job = 23 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Job is a Trino job. + TrinoJob trino_job = 28 [(google.api.field_behavior) = OPTIONAL]; } // Output only. The job status. Additional application-specific diff --git a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/node_groups.proto b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/node_groups.proto index a42c927f65d..0bd3ef30fd2 100644 --- a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/node_groups.proto +++ b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/node_groups.proto @@ -144,7 +144,7 @@ message ResizeNodeGroupRequest { // underscores (_), and hyphens (-). The maximum length is 40 characters. string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Timeout for graceful YARN decommissioning. [Graceful + // Optional. Timeout for graceful YARN decomissioning. [Graceful // decommissioning] // (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning) // allows the removal of nodes from the Compute Engine node group diff --git a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/operations.proto b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/operations.proto index b0b2fc2c5cd..57c913f7a31 100644 --- a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/operations.proto +++ b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/operations.proto @@ -117,6 +117,10 @@ message ClusterOperationMetadata { // Output only. Errors encountered during operation execution. repeated string warnings = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Child operation ids + repeated string child_operation_ids = 15 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Metadata describing the node group operation. diff --git a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/shared.proto b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/shared.proto index 4f9642ea3b3..72192bd40ba 100644 --- a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/shared.proto +++ b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/shared.proto @@ -17,23 +17,34 @@ syntax = "proto3"; package google.cloud.dataproc.v1; import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; option go_package = "cloud.google.com/go/dataproc/apiv1/dataprocpb;dataprocpb"; option java_multiple_files = true; option java_outer_classname = "SharedProto"; option java_package = "com.google.cloud.dataproc.v1"; +option (google.api.resource_definition) = { + type: "container.googleapis.com/Cluster" + pattern: "projects/{project}/locations/{location}/clusters/{cluster}" +}; +option (google.api.resource_definition) = { + type: "metastore.googleapis.com/Service" + pattern: "projects/{project}/locations/{location}/services/{service}" +}; // Runtime configuration for a workload. message RuntimeConfig { // Optional. Version of the batch runtime. string version = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Optional custom container image for the job runtime environment. If - // not specified, a default container image will be used. + // Optional. Optional custom container image for the job runtime environment. + // If not specified, a default container image will be used. string container_image = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A mapping of property names to values, which are used to configure workload - // execution. + // Optional. A mapping of property names to values, which are used to + // configure workload execution. map properties = 3 [(google.api.field_behavior) = OPTIONAL]; } @@ -43,7 +54,8 @@ message EnvironmentConfig { ExecutionConfig execution_config = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. Peripherals configuration that workload has access to. - PeripheralsConfig peripherals_config = 2 [(google.api.field_behavior) = OPTIONAL]; + PeripheralsConfig peripherals_config = 2 + [(google.api.field_behavior) = OPTIONAL]; } // Execution configuration for a workload. @@ -65,19 +77,39 @@ message ExecutionConfig { // Optional. The Cloud KMS key to use for encryption. string kms_key = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The duration after which the workload will be terminated. + // When the workload passes this ttl, it will be unconditionally killed + // without waiting for ongoing work to finish. + // Minimum value is 10 minutes; maximum value is 14 days (see JSON + // representation of + // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). + // If both ttl and idle_ttl are specified, the conditions are treated as + // and OR: the workload will be terminated when it has been idle for idle_ttl + // or when the ttl has passed, whichever comes first. + // If ttl is not specified for a session, it defaults to 24h. + google.protobuf.Duration ttl = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A Cloud Storage bucket used to stage workload dependencies, + // config files, and store workload output and other ephemeral data, such as + // Spark history files. If you do not specify a staging bucket, Cloud Dataproc + // will determine a Cloud Storage location according to the region where your + // workload is running, and then create and manage project-level, per-location + // staging and temporary buckets. + // **This field requires a Cloud Storage bucket name, not a `gs://...` URI to + // a Cloud Storage bucket.** + string staging_bucket = 10 [(google.api.field_behavior) = OPTIONAL]; } // Spark History Server configuration for the workload. message SparkHistoryServerConfig { - // Optional. Resource name of an existing Dataproc Cluster to act as a Spark History - // Server for the workload. + // Optional. Resource name of an existing Dataproc Cluster to act as a Spark + // History Server for the workload. // // Example: // // * `projects/[project_id]/regions/[region]/clusters/[cluster_name]` - string dataproc_cluster = 1 [ - (google.api.field_behavior) = OPTIONAL - ]; + string dataproc_cluster = 1 [(google.api.field_behavior) = OPTIONAL]; } // Auxiliary services configuration for a workload. @@ -88,58 +120,111 @@ message PeripheralsConfig { // // * `projects/[project_id]/locations/[region]/services/[service_id]` string metastore_service = 1 [ - (google.api.field_behavior) = OPTIONAL + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Service" + } ]; // Optional. The Spark History Server configuration for the workload. - SparkHistoryServerConfig spark_history_server_config = 2 [(google.api.field_behavior) = OPTIONAL]; + SparkHistoryServerConfig spark_history_server_config = 2 + [(google.api.field_behavior) = OPTIONAL]; } // Runtime information about workload execution. message RuntimeInfo { - // Output only. Map of remote access endpoints (such as web interfaces and APIs) to their - // URIs. + // Output only. Map of remote access endpoints (such as web interfaces and + // APIs) to their URIs. map endpoints = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. A URI pointing to the location of the stdout and stderr of the workload. + // Output only. A URI pointing to the location of the stdout and stderr of the + // workload. string output_uri = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. A URI pointing to the location of the diagnostics tarball. string diagnostic_output_uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Approximate workload resource usage calculated after workload + // finishes (see [Dataproc Serverless pricing] + // (https://cloud.google.com/dataproc-serverless/pricing)). + UsageMetrics approximate_usage = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Snapshot of current workload resource usage. + UsageSnapshot current_usage = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Usage metrics represent approximate total resources consumed by a workload. +message UsageMetrics { + // Optional. DCU (Dataproc Compute Units) usage in (`milliDCU` x `seconds`) + // (see [Dataproc Serverless pricing] + // (https://cloud.google.com/dataproc-serverless/pricing)). + int64 milli_dcu_seconds = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Shuffle storage usage in (`GB` x `seconds`) (see + // [Dataproc Serverless pricing] + // (https://cloud.google.com/dataproc-serverless/pricing)). + int64 shuffle_storage_gb_seconds = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The usage snaphot represents the resources consumed by a workload at a +// specified time. +message UsageSnapshot { + // Optional. Milli (one-thousandth) Dataproc Compute Units (DCUs) (see + // [Dataproc Serverless pricing] + // (https://cloud.google.com/dataproc-serverless/pricing)). + int64 milli_dcu = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Shuffle Storage in gigabytes (GB). (see [Dataproc Serverless + // pricing] (https://cloud.google.com/dataproc-serverless/pricing)) + int64 shuffle_storage_gb = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The timestamp of the usage snapshot. + google.protobuf.Timestamp snapshot_time = 3 + [(google.api.field_behavior) = OPTIONAL]; } // The cluster's GKE config. message GkeClusterConfig { - // Optional. A target GKE cluster to deploy to. It must be in the same project and - // region as the Dataproc cluster (the GKE cluster can be zonal or regional). - // Format: 'projects/{project}/locations/{location}/clusters/{cluster_id}' + // Optional. A target GKE cluster to deploy to. It must be in the same project + // and region as the Dataproc cluster (the GKE cluster can be zonal or + // regional). Format: + // 'projects/{project}/locations/{location}/clusters/{cluster_id}' string gke_cluster_target = 2 [ - (google.api.field_behavior) = OPTIONAL + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "container.googleapis.com/Cluster" + } ]; - // Optional. GKE NodePools where workloads will be scheduled. At least one node pool - // must be assigned the 'default' role. Each role can be given to only a - // single NodePoolTarget. All NodePools must have the same location settings. - // If a nodePoolTarget is not specified, Dataproc constructs a default - // nodePoolTarget. - repeated GkeNodePoolTarget node_pool_target = 3 [(google.api.field_behavior) = OPTIONAL]; + // Optional. GKE node pools where workloads will be scheduled. At least one + // node pool must be assigned the `DEFAULT` + // [GkeNodePoolTarget.Role][google.cloud.dataproc.v1.GkeNodePoolTarget.Role]. + // If a `GkeNodePoolTarget` is not specified, Dataproc constructs a `DEFAULT` + // `GkeNodePoolTarget`. Each role can be given to only one + // `GkeNodePoolTarget`. All node pools must have the same location settings. + repeated GkeNodePoolTarget node_pool_target = 3 + [(google.api.field_behavior) = OPTIONAL]; } // The configuration for running the Dataproc cluster on Kubernetes. message KubernetesClusterConfig { - // Optional. A namespace within the Kubernetes cluster to deploy into. If this namespace - // does not exist, it is created. If it exists, Dataproc - // verifies that another Dataproc VirtualCluster is not installed - // into it. If not specified, the name of the Dataproc Cluster is used. + // Optional. A namespace within the Kubernetes cluster to deploy into. If this + // namespace does not exist, it is created. If it exists, Dataproc verifies + // that another Dataproc VirtualCluster is not installed into it. If not + // specified, the name of the Dataproc Cluster is used. string kubernetes_namespace = 1 [(google.api.field_behavior) = OPTIONAL]; oneof config { // Required. The configuration for running the Dataproc cluster on GKE. - GkeClusterConfig gke_cluster_config = 2 [(google.api.field_behavior) = REQUIRED]; + GkeClusterConfig gke_cluster_config = 2 + [(google.api.field_behavior) = REQUIRED]; } - // Optional. The software configuration for this Dataproc cluster running on Kubernetes. - KubernetesSoftwareConfig kubernetes_software_config = 3 [(google.api.field_behavior) = OPTIONAL]; + // Optional. The software configuration for this Dataproc cluster running on + // Kubernetes. + KubernetesSoftwareConfig kubernetes_software_config = 3 + [(google.api.field_behavior) = OPTIONAL]; } // The software configuration for this Dataproc cluster running on Kubernetes. @@ -163,54 +248,60 @@ message KubernetesSoftwareConfig { map properties = 2; } -// GKE NodePools that Dataproc workloads run on. +// GKE node pools that Dataproc workloads run on. message GkeNodePoolTarget { - // `Role` specifies whose tasks will run on the NodePool. The roles can be - // specific to workloads. Exactly one GkeNodePoolTarget within the - // VirtualCluster must have 'default' role, which is used to run all workloads - // that are not associated with a NodePool. + // `Role` specifies the tasks that will run on the node pool. Roles can be + // specific to workloads. Exactly one + // [GkeNodePoolTarget][google.cloud.dataproc.v1.GkeNodePoolTarget] within the + // virtual cluster must have the `DEFAULT` role, which is used to run all + // workloads that are not associated with a node pool. enum Role { // Role is unspecified. ROLE_UNSPECIFIED = 0; - // Any roles that are not directly assigned to a NodePool run on the - // `default` role's NodePool. + // At least one node pool must have the `DEFAULT` role. + // Work assigned to a role that is not associated with a node pool + // is assigned to the node pool with the `DEFAULT` role. For example, + // work assigned to the `CONTROLLER` role will be assigned to the node pool + // with the `DEFAULT` role if no node pool has the `CONTROLLER` role. DEFAULT = 1; - // Run controllers and webhooks. + // Run work associated with the Dataproc control plane (for example, + // controllers and webhooks). Very low resource requirements. CONTROLLER = 2; - // Run spark driver. + // Run work associated with a Spark driver of a job. SPARK_DRIVER = 3; - // Run spark executors. + // Run work associated with a Spark executor of a job. SPARK_EXECUTOR = 4; } - // Required. The target GKE NodePool. + // Required. The target GKE node pool. // Format: // 'projects/{project}/locations/{location}/clusters/{cluster}/nodePools/{node_pool}' - string node_pool = 1 [ - (google.api.field_behavior) = REQUIRED - ]; + string node_pool = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The types of role for a GKE NodePool + // Required. The roles associated with the GKE node pool. repeated Role roles = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. The configuration for the GKE NodePool. + // Input only. The configuration for the GKE node pool. // - // If specified, Dataproc attempts to create a NodePool with the + // If specified, Dataproc attempts to create a node pool with the // specified shape. If one with the same name already exists, it is // verified against all specified fields. If a field differs, the // virtual cluster creation will fail. // - // If omitted, any NodePool with the specified name is used. If a - // NodePool with the specified name does not exist, Dataproc create a NodePool - // with default values. - GkeNodePoolConfig node_pool_config = 3 [(google.api.field_behavior) = OPTIONAL]; + // If omitted, any node pool with the specified name is used. If a + // node pool with the specified name does not exist, Dataproc create a + // node pool with default values. + // + // This is an input only field. It will not be returned by the API. + GkeNodePoolConfig node_pool_config = 3 + [(google.api.field_behavior) = INPUT_ONLY]; } -// The configuration of a GKE NodePool used by a [Dataproc-on-GKE +// The configuration of a GKE node pool used by a [Dataproc-on-GKE // cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster). message GkeNodePoolConfig { // Parameters that describe cluster nodes. @@ -219,19 +310,28 @@ message GkeNodePoolConfig { // type](https://cloud.google.com/compute/docs/machine-types). string machine_type = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Whether the nodes are created as [preemptible VM - // instances](https://cloud.google.com/compute/docs/instances/preemptible). - bool preemptible = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The number of local SSD disks to attach to the node, which is limited by - // the maximum number of disks allowable per zone (see [Adding Local - // SSDs](https://cloud.google.com/compute/docs/disks/local-ssd)). + // Optional. The number of local SSD disks to attach to the node, which is + // limited by the maximum number of disks allowable per zone (see [Adding + // Local SSDs](https://cloud.google.com/compute/docs/disks/local-ssd)). int32 local_ssd_count = 7 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Whether the nodes are created as legacy [preemptible VM + // instances] (https://cloud.google.com/compute/docs/instances/preemptible). + // Also see + // [Spot][google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.spot] + // VMs, preemptible VM instances without a maximum lifetime. Legacy and Spot + // preemptible nodes cannot be used in a node pool with the `CONTROLLER` + // [role] + // (/dataproc/docs/reference/rest/v1/projects.regions.clusters#role) + // or in the DEFAULT node pool if the CONTROLLER role is not assigned (the + // DEFAULT node pool will assume the CONTROLLER role). + bool preemptible = 10 [(google.api.field_behavior) = OPTIONAL]; + // Optional. A list of [hardware // accelerators](https://cloud.google.com/compute/docs/gpus) to attach to // each node. - repeated GkeNodePoolAcceleratorConfig accelerators = 11 [(google.api.field_behavior) = OPTIONAL]; + repeated GkeNodePoolAcceleratorConfig accelerators = 11 + [(google.api.field_behavior) = OPTIONAL]; // Optional. [Minimum CPU // platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform) @@ -239,26 +339,51 @@ message GkeNodePoolConfig { // specified or a newer CPU platform. Specify the friendly names of CPU // platforms, such as "Intel Haswell"` or Intel Sandy Bridge". string min_cpu_platform = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The [Customer Managed Encryption Key (CMEK)] + // (https://cloud.google.com/kubernetes-engine/docs/how-to/using-cmek) + // used to encrypt the boot disk attached to each node in the node pool. + // Specify the key using the following format: + // projects/KEY_PROJECT_ID/locations/LOCATION/keyRings/RING_NAME/cryptoKeys/KEY_NAME. + string boot_disk_kms_key = 23 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether the nodes are created as [Spot VM instances] + // (https://cloud.google.com/compute/docs/instances/spot). + // Spot VMs are the latest update to legacy + // [preemptible + // VMs][google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.preemptible]. + // Spot VMs do not have a maximum lifetime. Legacy and Spot preemptible + // nodes cannot be used in a node pool with the `CONTROLLER` + // [role](/dataproc/docs/reference/rest/v1/projects.regions.clusters#role) + // or in the DEFAULT node pool if the CONTROLLER role is not assigned (the + // DEFAULT node pool will assume the CONTROLLER role). + bool spot = 32 [(google.api.field_behavior) = OPTIONAL]; } // A GkeNodeConfigAcceleratorConfig represents a Hardware Accelerator request - // for a NodePool. + // for a node pool. message GkeNodePoolAcceleratorConfig { // The number of accelerator cards exposed to an instance. int64 accelerator_count = 1; // The accelerator type resource namename (see GPUs on Compute Engine). string accelerator_type = 2; + + // Size of partitions to create on the GPU. Valid values are described in + // the NVIDIA [mig user + // guide](https://docs.nvidia.com/datacenter/tesla/mig-user-guide/#partitioning). + string gpu_partition_size = 3; } // GkeNodePoolAutoscaling contains information the cluster autoscaler needs to // adjust the size of the node pool to the current cluster usage. message GkeNodePoolAutoscalingConfig { - // The minimum number of nodes in the NodePool. Must be >= 0 and <= + // The minimum number of nodes in the node pool. Must be >= 0 and <= // max_node_count. int32 min_node_count = 2; - // The maximum number of nodes in the NodePool. Must be >= min_node_count. + // The maximum number of nodes in the node pool. Must be >= min_node_count, + // and must be > 0. // **Note:** Quota must be sufficient to scale up the cluster. int32 max_node_count = 3; } @@ -268,17 +393,21 @@ message GkeNodePoolConfig { // Optional. The list of Compute Engine // [zones](https://cloud.google.com/compute/docs/zones#available) where - // NodePool's nodes will be located. + // node pool nodes associated with a Dataproc on GKE virtual cluster + // will be located. // - // **Note:** Currently, only one zone may be specified. + // **Note:** All node pools associated with a virtual cluster + // must be located in the same region as the virtual cluster, and they must + // be located in the same zone within that region. // - // If a location is not specified during NodePool creation, Dataproc will - // choose a location. + // If a location is not specified during node pool creation, Dataproc on GKE + // will choose the zone. repeated string locations = 13 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The autoscaler configuration for this NodePool. The autoscaler is enabled - // only when a valid configuration is present. - GkeNodePoolAutoscalingConfig autoscaling = 4 [(google.api.field_behavior) = OPTIONAL]; + // Optional. The autoscaler configuration for this node pool. The autoscaler + // is enabled only when a valid configuration is present. + GkeNodePoolAutoscalingConfig autoscaling = 4 + [(google.api.field_behavior) = OPTIONAL]; } // Cluster components that can be activated. @@ -308,12 +437,18 @@ enum Component { // The Hive Web HCatalog (the REST service for accessing HCatalog). HIVE_WEBHCAT = 3; + // Hudi. + HUDI = 18; + // The Jupyter Notebook. JUPYTER = 1; // The Presto query engine. PRESTO = 6; + // The Trino query engine. + TRINO = 17; + // The Ranger service. RANGER = 12; diff --git a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/workflow_templates.proto b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/workflow_templates.proto index 4ddf0a2df10..0b81da02e3e 100644 --- a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/workflow_templates.proto +++ b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/workflow_templates.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -36,10 +36,12 @@ option java_package = "com.google.cloud.dataproc.v1"; // Dataproc API. service WorkflowTemplateService { option (google.api.default_host) = "dataproc.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Creates new workflow template. - rpc CreateWorkflowTemplate(CreateWorkflowTemplateRequest) returns (WorkflowTemplate) { + rpc CreateWorkflowTemplate(CreateWorkflowTemplateRequest) + returns (WorkflowTemplate) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/workflowTemplates" body: "template" @@ -55,7 +57,8 @@ service WorkflowTemplateService { // // Can retrieve previously instantiated template by specifying optional // version parameter. - rpc GetWorkflowTemplate(GetWorkflowTemplateRequest) returns (WorkflowTemplate) { + rpc GetWorkflowTemplate(GetWorkflowTemplateRequest) + returns (WorkflowTemplate) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/workflowTemplates/*}" additional_bindings { @@ -85,7 +88,8 @@ service WorkflowTemplateService { // On successful completion, // [Operation.response][google.longrunning.Operation.response] will be // [Empty][google.protobuf.Empty]. - rpc InstantiateWorkflowTemplate(InstantiateWorkflowTemplateRequest) returns (google.longrunning.Operation) { + rpc InstantiateWorkflowTemplate(InstantiateWorkflowTemplateRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/workflowTemplates/*}:instantiate" body: "*" @@ -105,7 +109,8 @@ service WorkflowTemplateService { // Instantiates a template and begins execution. // // This method is equivalent to executing the sequence - // [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate], + // [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], + // [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate], // [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate]. // // The returned Operation can be used to track execution of @@ -126,7 +131,9 @@ service WorkflowTemplateService { // On successful completion, // [Operation.response][google.longrunning.Operation.response] will be // [Empty][google.protobuf.Empty]. - rpc InstantiateInlineWorkflowTemplate(InstantiateInlineWorkflowTemplateRequest) returns (google.longrunning.Operation) { + rpc InstantiateInlineWorkflowTemplate( + InstantiateInlineWorkflowTemplateRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/workflowTemplates:instantiateInline" body: "template" @@ -144,7 +151,8 @@ service WorkflowTemplateService { // Updates (replaces) workflow template. The updated template // must contain version that matches the current server version. - rpc UpdateWorkflowTemplate(UpdateWorkflowTemplateRequest) returns (WorkflowTemplate) { + rpc UpdateWorkflowTemplate(UpdateWorkflowTemplateRequest) + returns (WorkflowTemplate) { option (google.api.http) = { put: "/v1/{template.name=projects/*/locations/*/workflowTemplates/*}" body: "template" @@ -157,7 +165,8 @@ service WorkflowTemplateService { } // Lists workflows that match the specified filter in the request. - rpc ListWorkflowTemplates(ListWorkflowTemplatesRequest) returns (ListWorkflowTemplatesResponse) { + rpc ListWorkflowTemplates(ListWorkflowTemplatesRequest) + returns (ListWorkflowTemplatesResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/workflowTemplates" additional_bindings { @@ -168,7 +177,8 @@ service WorkflowTemplateService { } // Deletes a workflow template. It does not cancel in-progress workflows. - rpc DeleteWorkflowTemplate(DeleteWorkflowTemplateRequest) returns (google.protobuf.Empty) { + rpc DeleteWorkflowTemplate(DeleteWorkflowTemplateRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/workflowTemplates/*}" additional_bindings { @@ -214,10 +224,12 @@ message WorkflowTemplate { int32 version = 3 [(google.api.field_behavior) = OPTIONAL]; // Output only. The time template was created. - google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time template was last updated. - google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. The labels to associate with this template. These labels // will be propagated to all jobs and clusters created by the workflow @@ -234,7 +246,8 @@ message WorkflowTemplate { map labels = 6 [(google.api.field_behavior) = OPTIONAL]; // Required. WorkflowTemplate scheduling information. - WorkflowTemplatePlacement placement = 7 [(google.api.field_behavior) = REQUIRED]; + WorkflowTemplatePlacement placement = 7 + [(google.api.field_behavior) = REQUIRED]; // Required. The Directed Acyclic Graph of Jobs to submit. repeated OrderedJob jobs = 8 [(google.api.field_behavior) = REQUIRED]; @@ -242,7 +255,8 @@ message WorkflowTemplate { // Optional. Template parameters whose values are substituted into the // template. Values for parameters must be provided when the template is // instantiated. - repeated TemplateParameter parameters = 9 [(google.api.field_behavior) = OPTIONAL]; + repeated TemplateParameter parameters = 9 + [(google.api.field_behavior) = OPTIONAL]; // Optional. Timeout duration for the DAG of jobs, expressed in seconds (see // [JSON representation of @@ -254,7 +268,8 @@ message WorkflowTemplate { // [managed // cluster](/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster), // the cluster is deleted. - google.protobuf.Duration dag_timeout = 10 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.Duration dag_timeout = 10 + [(google.api.field_behavior) = OPTIONAL]; } // Specifies workflow execution target. @@ -312,7 +327,8 @@ message ClusterSelector { // Required. The cluster labels. Cluster must have all labels // to match. - map cluster_labels = 2 [(google.api.field_behavior) = REQUIRED]; + map cluster_labels = 2 + [(google.api.field_behavior) = REQUIRED]; } // A job executed by the workflow. @@ -322,8 +338,8 @@ message OrderedJob { // // The step id is used as prefix for job id, as job // `goog-dataproc-workflow-step-id` label, and in - // [prerequisiteStepIds][google.cloud.dataproc.v1.OrderedJob.prerequisite_step_ids] field from other - // steps. + // [prerequisiteStepIds][google.cloud.dataproc.v1.OrderedJob.prerequisite_step_ids] + // field from other steps. // // The id must contain only letters (a-z, A-Z), numbers (0-9), // underscores (_), and hyphens (-). Cannot begin or end with underscore @@ -374,7 +390,8 @@ message OrderedJob { // Optional. The optional list of prerequisite job step_ids. // If not specified, the job will start at the beginning of workflow. - repeated string prerequisite_step_ids = 10 [(google.api.field_behavior) = OPTIONAL]; + repeated string prerequisite_step_ids = 10 + [(google.api.field_behavior) = OPTIONAL]; } // A configurable parameter that replaces one or more fields in the template. @@ -400,10 +417,10 @@ message TemplateParameter { // A field is allowed to appear in at most one parameter's list of field // paths. // - // A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask]. - // For example, a field path that references the zone field of a workflow - // template's cluster selector would be specified as - // `placement.clusterSelector.zone`. + // A field path is similar in syntax to a + // [google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a + // field path that references the zone field of a workflow template's cluster + // selector would be specified as `placement.clusterSelector.zone`. // // Also, field paths can reference fields using the following syntax: // @@ -510,13 +527,15 @@ message WorkflowMetadata { int32 version = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The create cluster operation metadata. - ClusterOperation create_cluster = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + ClusterOperation create_cluster = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The workflow graph. WorkflowGraph graph = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The delete cluster operation metadata. - ClusterOperation delete_cluster = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + ClusterOperation delete_cluster = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The workflow state. State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -528,25 +547,33 @@ message WorkflowMetadata { map parameters = 8; // Output only. Workflow start time. - google.protobuf.Timestamp start_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp start_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Workflow end time. - google.protobuf.Timestamp end_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp end_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The UUID of target cluster. string cluster_uuid = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The timeout duration for the DAG of jobs, expressed in seconds (see - // [JSON representation of + // Output only. The timeout duration for the DAG of jobs, expressed in seconds + // (see [JSON representation of // duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - google.protobuf.Duration dag_timeout = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. DAG start time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG - // begins. - google.protobuf.Timestamp dag_start_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. DAG end time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG ends. - google.protobuf.Timestamp dag_end_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Duration dag_timeout = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. DAG start time, only set for workflows with + // [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when + // DAG begins. + google.protobuf.Timestamp dag_start_time = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. DAG end time, only set for workflows with + // [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when + // DAG ends. + google.protobuf.Timestamp dag_end_time = 14 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // The cluster operation triggered by a workflow. @@ -595,7 +622,8 @@ message WorkflowNode { string step_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Node's prerequisite nodes. - repeated string prerequisite_step_ids = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated string prerequisite_step_ids = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The job id; populated after the node enters RUNNING state. string job_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -771,7 +799,8 @@ message ListWorkflowTemplatesRequest { // A response to a request to list workflow templates in a project. message ListWorkflowTemplatesResponse { // Output only. WorkflowTemplates list. - repeated WorkflowTemplate templates = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated WorkflowTemplate templates = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. This token is included in the response if there are more // results to fetch. To fetch additional results, provide this value as the diff --git a/packages/google-cloud-dataproc/protos/protos.d.ts b/packages/google-cloud-dataproc/protos/protos.d.ts index bf6d17f77d3..110af9c39b8 100644 --- a/packages/google-cloud-dataproc/protos/protos.d.ts +++ b/packages/google-cloud-dataproc/protos/protos.d.ts @@ -1558,6 +1558,12 @@ export namespace google { /** ListBatchesRequest pageToken */ pageToken?: (string|null); + + /** ListBatchesRequest filter */ + filter?: (string|null); + + /** ListBatchesRequest orderBy */ + orderBy?: (string|null); } /** Represents a ListBatchesRequest. */ @@ -1578,6 +1584,12 @@ export namespace google { /** ListBatchesRequest pageToken. */ public pageToken: string; + /** ListBatchesRequest filter. */ + public filter: string; + + /** ListBatchesRequest orderBy. */ + public orderBy: string; + /** * Creates a new ListBatchesRequest instance using the specified properties. * @param [properties] Properties to set @@ -2054,6 +2066,17 @@ export namespace google { namespace Batch { + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + PENDING = 1, + RUNNING = 2, + CANCELLING = 3, + CANCELLED = 4, + SUCCEEDED = 5, + FAILED = 6 + } + /** Properties of a StateHistory. */ interface IStateHistory { @@ -2162,17 +2185,6 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - PENDING = 1, - RUNNING = 2, - CANCELLING = 3, - CANCELLED = 4, - SUCCEEDED = 5, - FAILED = 6 - } } /** Properties of a PySparkBatch. */ @@ -2885,6 +2897,12 @@ export namespace google { /** ExecutionConfig kmsKey */ kmsKey?: (string|null); + + /** ExecutionConfig ttl */ + ttl?: (google.protobuf.IDuration|null); + + /** ExecutionConfig stagingBucket */ + stagingBucket?: (string|null); } /** Represents an ExecutionConfig. */ @@ -2911,6 +2929,12 @@ export namespace google { /** ExecutionConfig kmsKey. */ public kmsKey: string; + /** ExecutionConfig ttl. */ + public ttl?: (google.protobuf.IDuration|null); + + /** ExecutionConfig stagingBucket. */ + public stagingBucket: string; + /** ExecutionConfig network. */ public network?: ("networkUri"|"subnetworkUri"); @@ -3203,6 +3227,12 @@ export namespace google { /** RuntimeInfo diagnosticOutputUri */ diagnosticOutputUri?: (string|null); + + /** RuntimeInfo approximateUsage */ + approximateUsage?: (google.cloud.dataproc.v1.IUsageMetrics|null); + + /** RuntimeInfo currentUsage */ + currentUsage?: (google.cloud.dataproc.v1.IUsageSnapshot|null); } /** Represents a RuntimeInfo. */ @@ -3223,6 +3253,12 @@ export namespace google { /** RuntimeInfo diagnosticOutputUri. */ public diagnosticOutputUri: string; + /** RuntimeInfo approximateUsage. */ + public approximateUsage?: (google.cloud.dataproc.v1.IUsageMetrics|null); + + /** RuntimeInfo currentUsage. */ + public currentUsage?: (google.cloud.dataproc.v1.IUsageSnapshot|null); + /** * Creates a new RuntimeInfo instance using the specified properties. * @param [properties] Properties to set @@ -3301,6 +3337,218 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a UsageMetrics. */ + interface IUsageMetrics { + + /** UsageMetrics milliDcuSeconds */ + milliDcuSeconds?: (number|Long|string|null); + + /** UsageMetrics shuffleStorageGbSeconds */ + shuffleStorageGbSeconds?: (number|Long|string|null); + } + + /** Represents a UsageMetrics. */ + class UsageMetrics implements IUsageMetrics { + + /** + * Constructs a new UsageMetrics. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataproc.v1.IUsageMetrics); + + /** UsageMetrics milliDcuSeconds. */ + public milliDcuSeconds: (number|Long|string); + + /** UsageMetrics shuffleStorageGbSeconds. */ + public shuffleStorageGbSeconds: (number|Long|string); + + /** + * Creates a new UsageMetrics instance using the specified properties. + * @param [properties] Properties to set + * @returns UsageMetrics instance + */ + public static create(properties?: google.cloud.dataproc.v1.IUsageMetrics): google.cloud.dataproc.v1.UsageMetrics; + + /** + * Encodes the specified UsageMetrics message. Does not implicitly {@link google.cloud.dataproc.v1.UsageMetrics.verify|verify} messages. + * @param message UsageMetrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataproc.v1.IUsageMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UsageMetrics message, length delimited. Does not implicitly {@link google.cloud.dataproc.v1.UsageMetrics.verify|verify} messages. + * @param message UsageMetrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataproc.v1.IUsageMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UsageMetrics message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UsageMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataproc.v1.UsageMetrics; + + /** + * Decodes a UsageMetrics message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UsageMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataproc.v1.UsageMetrics; + + /** + * Verifies a UsageMetrics message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UsageMetrics message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UsageMetrics + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataproc.v1.UsageMetrics; + + /** + * Creates a plain object from a UsageMetrics message. Also converts values to other types if specified. + * @param message UsageMetrics + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataproc.v1.UsageMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UsageMetrics to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UsageMetrics + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UsageSnapshot. */ + interface IUsageSnapshot { + + /** UsageSnapshot milliDcu */ + milliDcu?: (number|Long|string|null); + + /** UsageSnapshot shuffleStorageGb */ + shuffleStorageGb?: (number|Long|string|null); + + /** UsageSnapshot snapshotTime */ + snapshotTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a UsageSnapshot. */ + class UsageSnapshot implements IUsageSnapshot { + + /** + * Constructs a new UsageSnapshot. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataproc.v1.IUsageSnapshot); + + /** UsageSnapshot milliDcu. */ + public milliDcu: (number|Long|string); + + /** UsageSnapshot shuffleStorageGb. */ + public shuffleStorageGb: (number|Long|string); + + /** UsageSnapshot snapshotTime. */ + public snapshotTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new UsageSnapshot instance using the specified properties. + * @param [properties] Properties to set + * @returns UsageSnapshot instance + */ + public static create(properties?: google.cloud.dataproc.v1.IUsageSnapshot): google.cloud.dataproc.v1.UsageSnapshot; + + /** + * Encodes the specified UsageSnapshot message. Does not implicitly {@link google.cloud.dataproc.v1.UsageSnapshot.verify|verify} messages. + * @param message UsageSnapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataproc.v1.IUsageSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UsageSnapshot message, length delimited. Does not implicitly {@link google.cloud.dataproc.v1.UsageSnapshot.verify|verify} messages. + * @param message UsageSnapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataproc.v1.IUsageSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UsageSnapshot message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UsageSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataproc.v1.UsageSnapshot; + + /** + * Decodes a UsageSnapshot message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UsageSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataproc.v1.UsageSnapshot; + + /** + * Verifies a UsageSnapshot message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UsageSnapshot message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UsageSnapshot + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataproc.v1.UsageSnapshot; + + /** + * Creates a plain object from a UsageSnapshot message. Also converts values to other types if specified. + * @param message UsageSnapshot + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataproc.v1.UsageSnapshot, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UsageSnapshot to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UsageSnapshot + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a GkeClusterConfig. */ interface IGkeClusterConfig { @@ -3857,17 +4105,23 @@ export namespace google { /** GkeNodeConfig machineType */ machineType?: (string|null); - /** GkeNodeConfig preemptible */ - preemptible?: (boolean|null); - /** GkeNodeConfig localSsdCount */ localSsdCount?: (number|null); + /** GkeNodeConfig preemptible */ + preemptible?: (boolean|null); + /** GkeNodeConfig accelerators */ accelerators?: (google.cloud.dataproc.v1.GkeNodePoolConfig.IGkeNodePoolAcceleratorConfig[]|null); /** GkeNodeConfig minCpuPlatform */ minCpuPlatform?: (string|null); + + /** GkeNodeConfig bootDiskKmsKey */ + bootDiskKmsKey?: (string|null); + + /** GkeNodeConfig spot */ + spot?: (boolean|null); } /** Represents a GkeNodeConfig. */ @@ -3882,18 +4136,24 @@ export namespace google { /** GkeNodeConfig machineType. */ public machineType: string; - /** GkeNodeConfig preemptible. */ - public preemptible: boolean; - /** GkeNodeConfig localSsdCount. */ public localSsdCount: number; + /** GkeNodeConfig preemptible. */ + public preemptible: boolean; + /** GkeNodeConfig accelerators. */ public accelerators: google.cloud.dataproc.v1.GkeNodePoolConfig.IGkeNodePoolAcceleratorConfig[]; /** GkeNodeConfig minCpuPlatform. */ public minCpuPlatform: string; + /** GkeNodeConfig bootDiskKmsKey. */ + public bootDiskKmsKey: string; + + /** GkeNodeConfig spot. */ + public spot: boolean; + /** * Creates a new GkeNodeConfig instance using the specified properties. * @param [properties] Properties to set @@ -3980,6 +4240,9 @@ export namespace google { /** GkeNodePoolAcceleratorConfig acceleratorType */ acceleratorType?: (string|null); + + /** GkeNodePoolAcceleratorConfig gpuPartitionSize */ + gpuPartitionSize?: (string|null); } /** Represents a GkeNodePoolAcceleratorConfig. */ @@ -3997,6 +4260,9 @@ export namespace google { /** GkeNodePoolAcceleratorConfig acceleratorType. */ public acceleratorType: string; + /** GkeNodePoolAcceleratorConfig gpuPartitionSize. */ + public gpuPartitionSize: string; + /** * Creates a new GkeNodePoolAcceleratorConfig instance using the specified properties. * @param [properties] Properties to set @@ -4188,8 +4454,10 @@ export namespace google { FLINK = 14, HBASE = 11, HIVE_WEBHCAT = 3, + HUDI = 18, JUPYTER = 1, PRESTO = 6, + TRINO = 17, RANGER = 12, SOLR = 10, ZEPPELIN = 4, @@ -5301,7 +5569,7 @@ export namespace google { public subnetworkUri: string; /** GceClusterConfig internalIpOnly. */ - public internalIpOnly: boolean; + public internalIpOnly?: (boolean|null); /** GceClusterConfig privateIpv6GoogleAccess. */ public privateIpv6GoogleAccess: (google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess|keyof typeof google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess); @@ -5330,6 +5598,9 @@ export namespace google { /** GceClusterConfig confidentialInstanceConfig. */ public confidentialInstanceConfig?: (google.cloud.dataproc.v1.IConfidentialInstanceConfig|null); + /** GceClusterConfig _internalIpOnly. */ + public _internalIpOnly?: "internalIpOnly"; + /** * Creates a new GceClusterConfig instance using the specified properties. * @param [properties] Properties to set @@ -5539,13 +5810,22 @@ export namespace google { constructor(properties?: google.cloud.dataproc.v1.IShieldedInstanceConfig); /** ShieldedInstanceConfig enableSecureBoot. */ - public enableSecureBoot: boolean; + public enableSecureBoot?: (boolean|null); /** ShieldedInstanceConfig enableVtpm. */ - public enableVtpm: boolean; + public enableVtpm?: (boolean|null); /** ShieldedInstanceConfig enableIntegrityMonitoring. */ - public enableIntegrityMonitoring: boolean; + public enableIntegrityMonitoring?: (boolean|null); + + /** ShieldedInstanceConfig _enableSecureBoot. */ + public _enableSecureBoot?: "enableSecureBoot"; + + /** ShieldedInstanceConfig _enableVtpm. */ + public _enableVtpm?: "enableVtpm"; + + /** ShieldedInstanceConfig _enableIntegrityMonitoring. */ + public _enableIntegrityMonitoring?: "enableIntegrityMonitoring"; /** * Creates a new ShieldedInstanceConfig instance using the specified properties. @@ -7379,6 +7659,109 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a ClusterMetrics. */ + interface IClusterMetrics { + + /** ClusterMetrics hdfsMetrics */ + hdfsMetrics?: ({ [k: string]: (number|Long|string) }|null); + + /** ClusterMetrics yarnMetrics */ + yarnMetrics?: ({ [k: string]: (number|Long|string) }|null); + } + + /** Represents a ClusterMetrics. */ + class ClusterMetrics implements IClusterMetrics { + + /** + * Constructs a new ClusterMetrics. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataproc.v1.IClusterMetrics); + + /** ClusterMetrics hdfsMetrics. */ + public hdfsMetrics: { [k: string]: (number|Long|string) }; + + /** ClusterMetrics yarnMetrics. */ + public yarnMetrics: { [k: string]: (number|Long|string) }; + + /** + * Creates a new ClusterMetrics instance using the specified properties. + * @param [properties] Properties to set + * @returns ClusterMetrics instance + */ + public static create(properties?: google.cloud.dataproc.v1.IClusterMetrics): google.cloud.dataproc.v1.ClusterMetrics; + + /** + * Encodes the specified ClusterMetrics message. Does not implicitly {@link google.cloud.dataproc.v1.ClusterMetrics.verify|verify} messages. + * @param message ClusterMetrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataproc.v1.IClusterMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClusterMetrics message, length delimited. Does not implicitly {@link google.cloud.dataproc.v1.ClusterMetrics.verify|verify} messages. + * @param message ClusterMetrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataproc.v1.IClusterMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClusterMetrics message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClusterMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataproc.v1.ClusterMetrics; + + /** + * Decodes a ClusterMetrics message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClusterMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataproc.v1.ClusterMetrics; + + /** + * Verifies a ClusterMetrics message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClusterMetrics message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClusterMetrics + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataproc.v1.ClusterMetrics; + + /** + * Creates a plain object from a ClusterMetrics message. Also converts values to other types if specified. + * @param message ClusterMetrics + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataproc.v1.ClusterMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClusterMetrics to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClusterMetrics + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a DataprocMetricConfig. */ interface IDataprocMetricConfig { @@ -7486,7 +7869,8 @@ export namespace google { SPARK = 3, YARN = 4, SPARK_HISTORY_SERVER = 5, - HIVESERVER2 = 6 + HIVESERVER2 = 6, + HIVEMETASTORE = 7 } /** Properties of a Metric. */ @@ -7582,118 +7966,15 @@ export namespace google { * Converts this Metric to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Metric - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a ClusterMetrics. */ - interface IClusterMetrics { - - /** ClusterMetrics hdfsMetrics */ - hdfsMetrics?: ({ [k: string]: (number|Long|string) }|null); - - /** ClusterMetrics yarnMetrics */ - yarnMetrics?: ({ [k: string]: (number|Long|string) }|null); - } - - /** Represents a ClusterMetrics. */ - class ClusterMetrics implements IClusterMetrics { - - /** - * Constructs a new ClusterMetrics. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataproc.v1.IClusterMetrics); - - /** ClusterMetrics hdfsMetrics. */ - public hdfsMetrics: { [k: string]: (number|Long|string) }; - - /** ClusterMetrics yarnMetrics. */ - public yarnMetrics: { [k: string]: (number|Long|string) }; - - /** - * Creates a new ClusterMetrics instance using the specified properties. - * @param [properties] Properties to set - * @returns ClusterMetrics instance - */ - public static create(properties?: google.cloud.dataproc.v1.IClusterMetrics): google.cloud.dataproc.v1.ClusterMetrics; - - /** - * Encodes the specified ClusterMetrics message. Does not implicitly {@link google.cloud.dataproc.v1.ClusterMetrics.verify|verify} messages. - * @param message ClusterMetrics message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataproc.v1.IClusterMetrics, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClusterMetrics message, length delimited. Does not implicitly {@link google.cloud.dataproc.v1.ClusterMetrics.verify|verify} messages. - * @param message ClusterMetrics message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataproc.v1.IClusterMetrics, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClusterMetrics message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClusterMetrics - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataproc.v1.ClusterMetrics; - - /** - * Decodes a ClusterMetrics message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClusterMetrics - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataproc.v1.ClusterMetrics; - - /** - * Verifies a ClusterMetrics message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClusterMetrics message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClusterMetrics - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataproc.v1.ClusterMetrics; - - /** - * Creates a plain object from a ClusterMetrics message. Also converts values to other types if specified. - * @param message ClusterMetrics - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataproc.v1.ClusterMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClusterMetrics to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ClusterMetrics - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Metric + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of a CreateClusterRequest. */ @@ -10435,6 +10716,142 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a TrinoJob. */ + interface ITrinoJob { + + /** TrinoJob queryFileUri */ + queryFileUri?: (string|null); + + /** TrinoJob queryList */ + queryList?: (google.cloud.dataproc.v1.IQueryList|null); + + /** TrinoJob continueOnFailure */ + continueOnFailure?: (boolean|null); + + /** TrinoJob outputFormat */ + outputFormat?: (string|null); + + /** TrinoJob clientTags */ + clientTags?: (string[]|null); + + /** TrinoJob properties */ + properties?: ({ [k: string]: string }|null); + + /** TrinoJob loggingConfig */ + loggingConfig?: (google.cloud.dataproc.v1.ILoggingConfig|null); + } + + /** Represents a TrinoJob. */ + class TrinoJob implements ITrinoJob { + + /** + * Constructs a new TrinoJob. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataproc.v1.ITrinoJob); + + /** TrinoJob queryFileUri. */ + public queryFileUri?: (string|null); + + /** TrinoJob queryList. */ + public queryList?: (google.cloud.dataproc.v1.IQueryList|null); + + /** TrinoJob continueOnFailure. */ + public continueOnFailure: boolean; + + /** TrinoJob outputFormat. */ + public outputFormat: string; + + /** TrinoJob clientTags. */ + public clientTags: string[]; + + /** TrinoJob properties. */ + public properties: { [k: string]: string }; + + /** TrinoJob loggingConfig. */ + public loggingConfig?: (google.cloud.dataproc.v1.ILoggingConfig|null); + + /** TrinoJob queries. */ + public queries?: ("queryFileUri"|"queryList"); + + /** + * Creates a new TrinoJob instance using the specified properties. + * @param [properties] Properties to set + * @returns TrinoJob instance + */ + public static create(properties?: google.cloud.dataproc.v1.ITrinoJob): google.cloud.dataproc.v1.TrinoJob; + + /** + * Encodes the specified TrinoJob message. Does not implicitly {@link google.cloud.dataproc.v1.TrinoJob.verify|verify} messages. + * @param message TrinoJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataproc.v1.ITrinoJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TrinoJob message, length delimited. Does not implicitly {@link google.cloud.dataproc.v1.TrinoJob.verify|verify} messages. + * @param message TrinoJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataproc.v1.ITrinoJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TrinoJob message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TrinoJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataproc.v1.TrinoJob; + + /** + * Decodes a TrinoJob message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TrinoJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataproc.v1.TrinoJob; + + /** + * Verifies a TrinoJob message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TrinoJob message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TrinoJob + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataproc.v1.TrinoJob; + + /** + * Creates a plain object from a TrinoJob message. Also converts values to other types if specified. + * @param message TrinoJob + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataproc.v1.TrinoJob, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TrinoJob to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TrinoJob + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a JobPlacement. */ interface IJobPlacement { @@ -10951,6 +11368,9 @@ export namespace google { /** Job prestoJob */ prestoJob?: (google.cloud.dataproc.v1.IPrestoJob|null); + /** Job trinoJob */ + trinoJob?: (google.cloud.dataproc.v1.ITrinoJob|null); + /** Job status */ status?: (google.cloud.dataproc.v1.IJobStatus|null); @@ -11021,6 +11441,9 @@ export namespace google { /** Job prestoJob. */ public prestoJob?: (google.cloud.dataproc.v1.IPrestoJob|null); + /** Job trinoJob. */ + public trinoJob?: (google.cloud.dataproc.v1.ITrinoJob|null); + /** Job status. */ public status?: (google.cloud.dataproc.v1.IJobStatus|null); @@ -11052,7 +11475,7 @@ export namespace google { public driverSchedulingConfig?: (google.cloud.dataproc.v1.IDriverSchedulingConfig|null); /** Job typeJob. */ - public typeJob?: ("hadoopJob"|"sparkJob"|"pysparkJob"|"hiveJob"|"pigJob"|"sparkRJob"|"sparkSqlJob"|"prestoJob"); + public typeJob?: ("hadoopJob"|"sparkJob"|"pysparkJob"|"hiveJob"|"pigJob"|"sparkRJob"|"sparkSqlJob"|"prestoJob"|"trinoJob"); /** * Creates a new Job instance using the specified properties. @@ -12976,6 +13399,9 @@ export namespace google { /** ClusterOperationMetadata warnings */ warnings?: (string[]|null); + + /** ClusterOperationMetadata childOperationIds */ + childOperationIds?: (string[]|null); } /** Represents a ClusterOperationMetadata. */ @@ -13011,6 +13437,9 @@ export namespace google { /** ClusterOperationMetadata warnings. */ public warnings: string[]; + /** ClusterOperationMetadata childOperationIds. */ + public childOperationIds: string[]; + /** * Creates a new ClusterOperationMetadata instance using the specified properties. * @param [properties] Properties to set @@ -20003,206 +20432,206 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an Any. */ - interface IAny { + /** Properties of a Timestamp. */ + interface ITimestamp { - /** Any type_url */ - type_url?: (string|null); + /** Timestamp seconds */ + seconds?: (number|Long|string|null); - /** Any value */ - value?: (Uint8Array|string|null); + /** Timestamp nanos */ + nanos?: (number|null); } - /** Represents an Any. */ - class Any implements IAny { + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { /** - * Constructs a new Any. + * Constructs a new Timestamp. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IAny); + constructor(properties?: google.protobuf.ITimestamp); - /** Any type_url. */ - public type_url: string; + /** Timestamp seconds. */ + public seconds: (number|Long|string); - /** Any value. */ - public value: (Uint8Array|string); + /** Timestamp nanos. */ + public nanos: number; /** - * Creates a new Any instance using the specified properties. + * Creates a new Timestamp instance using the specified properties. * @param [properties] Properties to set - * @returns Any instance + * @returns Timestamp instance */ - public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.ITimestamp, 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 + * 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.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Any message from the specified reader or buffer. + * Decodes a Timestamp message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Any + * @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.Any; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; /** - * Decodes an Any message from the specified reader or buffer, length delimited. + * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Any + * @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.Any; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; /** - * Verifies an Any message. + * Verifies a Timestamp message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Any + * @returns Timestamp */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any + * 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.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Any to JSON. + * Converts this Timestamp to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for 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 Timestamp. */ - interface ITimestamp { + /** Properties of an Any. */ + interface IAny { - /** Timestamp seconds */ - seconds?: (number|Long|string|null); + /** Any type_url */ + type_url?: (string|null); - /** Timestamp nanos */ - nanos?: (number|null); + /** Any value */ + value?: (Uint8Array|string|null); } - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { + /** Represents an Any. */ + class Any implements IAny { /** - * Constructs a new Timestamp. + * Constructs a new Any. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.ITimestamp); + constructor(properties?: google.protobuf.IAny); - /** Timestamp seconds. */ - public seconds: (number|Long|string); + /** Any type_url. */ + public type_url: string; - /** Timestamp nanos. */ - public nanos: number; + /** Any value. */ + public value: (Uint8Array|string); /** - * Creates a new Timestamp instance using the specified properties. + * Creates a new Any instance using the specified properties. * @param [properties] Properties to set - * @returns Timestamp instance + * @returns Any instance */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode + * Encodes the specified 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.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode + * Encodes the specified 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.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Timestamp message from the specified reader or buffer. + * Decodes an Any message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Timestamp + * @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.Timestamp; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * Decodes an Any message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Timestamp + * @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.Timestamp; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; /** - * Verifies a Timestamp message. + * Verifies an Any message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Timestamp + * @returns Any */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp + * 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.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Timestamp to JSON. + * Converts this Any to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Timestamp + * Gets the default type url for Any * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ diff --git a/packages/google-cloud-dataproc/protos/protos.js b/packages/google-cloud-dataproc/protos/protos.js index 67e3607a64a..7561ae41cdb 100644 --- a/packages/google-cloud-dataproc/protos/protos.js +++ b/packages/google-cloud-dataproc/protos/protos.js @@ -3464,6 +3464,8 @@ * @property {string|null} [parent] ListBatchesRequest parent * @property {number|null} [pageSize] ListBatchesRequest pageSize * @property {string|null} [pageToken] ListBatchesRequest pageToken + * @property {string|null} [filter] ListBatchesRequest filter + * @property {string|null} [orderBy] ListBatchesRequest orderBy */ /** @@ -3505,6 +3507,22 @@ */ ListBatchesRequest.prototype.pageToken = ""; + /** + * ListBatchesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataproc.v1.ListBatchesRequest + * @instance + */ + ListBatchesRequest.prototype.filter = ""; + + /** + * ListBatchesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataproc.v1.ListBatchesRequest + * @instance + */ + ListBatchesRequest.prototype.orderBy = ""; + /** * Creates a new ListBatchesRequest instance using the specified properties. * @function create @@ -3535,6 +3553,10 @@ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; @@ -3581,6 +3603,14 @@ message.pageToken = reader.string(); break; } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -3625,6 +3655,12 @@ if (message.pageToken != null && message.hasOwnProperty("pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; @@ -3646,6 +3682,10 @@ message.pageSize = object.pageSize | 0; if (object.pageToken != null) message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); return message; }; @@ -3666,6 +3706,8 @@ object.parent = ""; object.pageSize = 0; object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; @@ -3673,6 +3715,10 @@ object.pageSize = message.pageSize; if (message.pageToken != null && message.hasOwnProperty("pageToken")) object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; @@ -4913,305 +4959,6 @@ return typeUrlPrefix + "/google.cloud.dataproc.v1.Batch"; }; - Batch.StateHistory = (function() { - - /** - * Properties of a StateHistory. - * @memberof google.cloud.dataproc.v1.Batch - * @interface IStateHistory - * @property {google.cloud.dataproc.v1.Batch.State|null} [state] StateHistory state - * @property {string|null} [stateMessage] StateHistory stateMessage - * @property {google.protobuf.ITimestamp|null} [stateStartTime] StateHistory stateStartTime - */ - - /** - * Constructs a new StateHistory. - * @memberof google.cloud.dataproc.v1.Batch - * @classdesc Represents a StateHistory. - * @implements IStateHistory - * @constructor - * @param {google.cloud.dataproc.v1.Batch.IStateHistory=} [properties] Properties to set - */ - function StateHistory(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StateHistory state. - * @member {google.cloud.dataproc.v1.Batch.State} state - * @memberof google.cloud.dataproc.v1.Batch.StateHistory - * @instance - */ - StateHistory.prototype.state = 0; - - /** - * StateHistory stateMessage. - * @member {string} stateMessage - * @memberof google.cloud.dataproc.v1.Batch.StateHistory - * @instance - */ - StateHistory.prototype.stateMessage = ""; - - /** - * StateHistory stateStartTime. - * @member {google.protobuf.ITimestamp|null|undefined} stateStartTime - * @memberof google.cloud.dataproc.v1.Batch.StateHistory - * @instance - */ - StateHistory.prototype.stateStartTime = null; - - /** - * Creates a new StateHistory instance using the specified properties. - * @function create - * @memberof google.cloud.dataproc.v1.Batch.StateHistory - * @static - * @param {google.cloud.dataproc.v1.Batch.IStateHistory=} [properties] Properties to set - * @returns {google.cloud.dataproc.v1.Batch.StateHistory} StateHistory instance - */ - StateHistory.create = function create(properties) { - return new StateHistory(properties); - }; - - /** - * Encodes the specified StateHistory message. Does not implicitly {@link google.cloud.dataproc.v1.Batch.StateHistory.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataproc.v1.Batch.StateHistory - * @static - * @param {google.cloud.dataproc.v1.Batch.IStateHistory} message StateHistory message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StateHistory.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); - if (message.stateMessage != null && Object.hasOwnProperty.call(message, "stateMessage")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.stateMessage); - if (message.stateStartTime != null && Object.hasOwnProperty.call(message, "stateStartTime")) - $root.google.protobuf.Timestamp.encode(message.stateStartTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified StateHistory message, length delimited. Does not implicitly {@link google.cloud.dataproc.v1.Batch.StateHistory.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataproc.v1.Batch.StateHistory - * @static - * @param {google.cloud.dataproc.v1.Batch.IStateHistory} message StateHistory message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StateHistory.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StateHistory message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataproc.v1.Batch.StateHistory - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataproc.v1.Batch.StateHistory} StateHistory - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StateHistory.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataproc.v1.Batch.StateHistory(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.state = reader.int32(); - break; - } - case 2: { - message.stateMessage = reader.string(); - break; - } - case 3: { - message.stateStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StateHistory message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataproc.v1.Batch.StateHistory - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataproc.v1.Batch.StateHistory} StateHistory - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StateHistory.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StateHistory message. - * @function verify - * @memberof google.cloud.dataproc.v1.Batch.StateHistory - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StateHistory.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.stateMessage != null && message.hasOwnProperty("stateMessage")) - if (!$util.isString(message.stateMessage)) - return "stateMessage: string expected"; - if (message.stateStartTime != null && message.hasOwnProperty("stateStartTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.stateStartTime); - if (error) - return "stateStartTime." + error; - } - return null; - }; - - /** - * Creates a StateHistory message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataproc.v1.Batch.StateHistory - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataproc.v1.Batch.StateHistory} StateHistory - */ - StateHistory.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataproc.v1.Batch.StateHistory) - return object; - var message = new $root.google.cloud.dataproc.v1.Batch.StateHistory(); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "PENDING": - case 1: - message.state = 1; - break; - case "RUNNING": - case 2: - message.state = 2; - break; - case "CANCELLING": - case 3: - message.state = 3; - break; - case "CANCELLED": - case 4: - message.state = 4; - break; - case "SUCCEEDED": - case 5: - message.state = 5; - break; - case "FAILED": - case 6: - message.state = 6; - break; - } - if (object.stateMessage != null) - message.stateMessage = String(object.stateMessage); - if (object.stateStartTime != null) { - if (typeof object.stateStartTime !== "object") - throw TypeError(".google.cloud.dataproc.v1.Batch.StateHistory.stateStartTime: object expected"); - message.stateStartTime = $root.google.protobuf.Timestamp.fromObject(object.stateStartTime); - } - return message; - }; - - /** - * Creates a plain object from a StateHistory message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataproc.v1.Batch.StateHistory - * @static - * @param {google.cloud.dataproc.v1.Batch.StateHistory} message StateHistory - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StateHistory.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.stateMessage = ""; - object.stateStartTime = null; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataproc.v1.Batch.State[message.state] === undefined ? message.state : $root.google.cloud.dataproc.v1.Batch.State[message.state] : message.state; - if (message.stateMessage != null && message.hasOwnProperty("stateMessage")) - object.stateMessage = message.stateMessage; - if (message.stateStartTime != null && message.hasOwnProperty("stateStartTime")) - object.stateStartTime = $root.google.protobuf.Timestamp.toObject(message.stateStartTime, options); - return object; - }; - - /** - * Converts this StateHistory to JSON. - * @function toJSON - * @memberof google.cloud.dataproc.v1.Batch.StateHistory - * @instance - * @returns {Object.} JSON object - */ - StateHistory.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StateHistory - * @function getTypeUrl - * @memberof google.cloud.dataproc.v1.Batch.StateHistory - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StateHistory.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataproc.v1.Batch.StateHistory"; - }; - - return StateHistory; - })(); - /** * State enum. * @name google.cloud.dataproc.v1.Batch.State @@ -5236,6 +4983,305 @@ return values; })(); + Batch.StateHistory = (function() { + + /** + * Properties of a StateHistory. + * @memberof google.cloud.dataproc.v1.Batch + * @interface IStateHistory + * @property {google.cloud.dataproc.v1.Batch.State|null} [state] StateHistory state + * @property {string|null} [stateMessage] StateHistory stateMessage + * @property {google.protobuf.ITimestamp|null} [stateStartTime] StateHistory stateStartTime + */ + + /** + * Constructs a new StateHistory. + * @memberof google.cloud.dataproc.v1.Batch + * @classdesc Represents a StateHistory. + * @implements IStateHistory + * @constructor + * @param {google.cloud.dataproc.v1.Batch.IStateHistory=} [properties] Properties to set + */ + function StateHistory(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StateHistory state. + * @member {google.cloud.dataproc.v1.Batch.State} state + * @memberof google.cloud.dataproc.v1.Batch.StateHistory + * @instance + */ + StateHistory.prototype.state = 0; + + /** + * StateHistory stateMessage. + * @member {string} stateMessage + * @memberof google.cloud.dataproc.v1.Batch.StateHistory + * @instance + */ + StateHistory.prototype.stateMessage = ""; + + /** + * StateHistory stateStartTime. + * @member {google.protobuf.ITimestamp|null|undefined} stateStartTime + * @memberof google.cloud.dataproc.v1.Batch.StateHistory + * @instance + */ + StateHistory.prototype.stateStartTime = null; + + /** + * Creates a new StateHistory instance using the specified properties. + * @function create + * @memberof google.cloud.dataproc.v1.Batch.StateHistory + * @static + * @param {google.cloud.dataproc.v1.Batch.IStateHistory=} [properties] Properties to set + * @returns {google.cloud.dataproc.v1.Batch.StateHistory} StateHistory instance + */ + StateHistory.create = function create(properties) { + return new StateHistory(properties); + }; + + /** + * Encodes the specified StateHistory message. Does not implicitly {@link google.cloud.dataproc.v1.Batch.StateHistory.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataproc.v1.Batch.StateHistory + * @static + * @param {google.cloud.dataproc.v1.Batch.IStateHistory} message StateHistory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StateHistory.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.stateMessage != null && Object.hasOwnProperty.call(message, "stateMessage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.stateMessage); + if (message.stateStartTime != null && Object.hasOwnProperty.call(message, "stateStartTime")) + $root.google.protobuf.Timestamp.encode(message.stateStartTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StateHistory message, length delimited. Does not implicitly {@link google.cloud.dataproc.v1.Batch.StateHistory.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataproc.v1.Batch.StateHistory + * @static + * @param {google.cloud.dataproc.v1.Batch.IStateHistory} message StateHistory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StateHistory.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StateHistory message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataproc.v1.Batch.StateHistory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataproc.v1.Batch.StateHistory} StateHistory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StateHistory.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataproc.v1.Batch.StateHistory(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.stateMessage = reader.string(); + break; + } + case 3: { + message.stateStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StateHistory message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataproc.v1.Batch.StateHistory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataproc.v1.Batch.StateHistory} StateHistory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StateHistory.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StateHistory message. + * @function verify + * @memberof google.cloud.dataproc.v1.Batch.StateHistory + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StateHistory.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.stateMessage != null && message.hasOwnProperty("stateMessage")) + if (!$util.isString(message.stateMessage)) + return "stateMessage: string expected"; + if (message.stateStartTime != null && message.hasOwnProperty("stateStartTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.stateStartTime); + if (error) + return "stateStartTime." + error; + } + return null; + }; + + /** + * Creates a StateHistory message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataproc.v1.Batch.StateHistory + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataproc.v1.Batch.StateHistory} StateHistory + */ + StateHistory.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataproc.v1.Batch.StateHistory) + return object; + var message = new $root.google.cloud.dataproc.v1.Batch.StateHistory(); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PENDING": + case 1: + message.state = 1; + break; + case "RUNNING": + case 2: + message.state = 2; + break; + case "CANCELLING": + case 3: + message.state = 3; + break; + case "CANCELLED": + case 4: + message.state = 4; + break; + case "SUCCEEDED": + case 5: + message.state = 5; + break; + case "FAILED": + case 6: + message.state = 6; + break; + } + if (object.stateMessage != null) + message.stateMessage = String(object.stateMessage); + if (object.stateStartTime != null) { + if (typeof object.stateStartTime !== "object") + throw TypeError(".google.cloud.dataproc.v1.Batch.StateHistory.stateStartTime: object expected"); + message.stateStartTime = $root.google.protobuf.Timestamp.fromObject(object.stateStartTime); + } + return message; + }; + + /** + * Creates a plain object from a StateHistory message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataproc.v1.Batch.StateHistory + * @static + * @param {google.cloud.dataproc.v1.Batch.StateHistory} message StateHistory + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StateHistory.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.stateMessage = ""; + object.stateStartTime = null; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataproc.v1.Batch.State[message.state] === undefined ? message.state : $root.google.cloud.dataproc.v1.Batch.State[message.state] : message.state; + if (message.stateMessage != null && message.hasOwnProperty("stateMessage")) + object.stateMessage = message.stateMessage; + if (message.stateStartTime != null && message.hasOwnProperty("stateStartTime")) + object.stateStartTime = $root.google.protobuf.Timestamp.toObject(message.stateStartTime, options); + return object; + }; + + /** + * Converts this StateHistory to JSON. + * @function toJSON + * @memberof google.cloud.dataproc.v1.Batch.StateHistory + * @instance + * @returns {Object.} JSON object + */ + StateHistory.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StateHistory + * @function getTypeUrl + * @memberof google.cloud.dataproc.v1.Batch.StateHistory + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StateHistory.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataproc.v1.Batch.StateHistory"; + }; + + return StateHistory; + })(); + return Batch; })(); @@ -7205,6 +7251,8 @@ * @property {string|null} [subnetworkUri] ExecutionConfig subnetworkUri * @property {Array.|null} [networkTags] ExecutionConfig networkTags * @property {string|null} [kmsKey] ExecutionConfig kmsKey + * @property {google.protobuf.IDuration|null} [ttl] ExecutionConfig ttl + * @property {string|null} [stagingBucket] ExecutionConfig stagingBucket */ /** @@ -7263,6 +7311,22 @@ */ ExecutionConfig.prototype.kmsKey = ""; + /** + * ExecutionConfig ttl. + * @member {google.protobuf.IDuration|null|undefined} ttl + * @memberof google.cloud.dataproc.v1.ExecutionConfig + * @instance + */ + ExecutionConfig.prototype.ttl = null; + + /** + * ExecutionConfig stagingBucket. + * @member {string} stagingBucket + * @memberof google.cloud.dataproc.v1.ExecutionConfig + * @instance + */ + ExecutionConfig.prototype.stagingBucket = ""; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -7312,6 +7376,10 @@ writer.uint32(/* id 6, wireType 2 =*/50).string(message.networkTags[i]); if (message.kmsKey != null && Object.hasOwnProperty.call(message, "kmsKey")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.kmsKey); + if (message.ttl != null && Object.hasOwnProperty.call(message, "ttl")) + $root.google.protobuf.Duration.encode(message.ttl, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.stagingBucket != null && Object.hasOwnProperty.call(message, "stagingBucket")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.stagingBucket); return writer; }; @@ -7368,6 +7436,14 @@ message.kmsKey = reader.string(); break; } + case 9: { + message.ttl = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 10: { + message.stagingBucket = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -7429,6 +7505,14 @@ if (message.kmsKey != null && message.hasOwnProperty("kmsKey")) if (!$util.isString(message.kmsKey)) return "kmsKey: string expected"; + if (message.ttl != null && message.hasOwnProperty("ttl")) { + var error = $root.google.protobuf.Duration.verify(message.ttl); + if (error) + return "ttl." + error; + } + if (message.stagingBucket != null && message.hasOwnProperty("stagingBucket")) + if (!$util.isString(message.stagingBucket)) + return "stagingBucket: string expected"; return null; }; @@ -7459,6 +7543,13 @@ } if (object.kmsKey != null) message.kmsKey = String(object.kmsKey); + if (object.ttl != null) { + if (typeof object.ttl !== "object") + throw TypeError(".google.cloud.dataproc.v1.ExecutionConfig.ttl: object expected"); + message.ttl = $root.google.protobuf.Duration.fromObject(object.ttl); + } + if (object.stagingBucket != null) + message.stagingBucket = String(object.stagingBucket); return message; }; @@ -7480,6 +7571,8 @@ if (options.defaults) { object.serviceAccount = ""; object.kmsKey = ""; + object.ttl = null; + object.stagingBucket = ""; } if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) object.serviceAccount = message.serviceAccount; @@ -7500,6 +7593,10 @@ } if (message.kmsKey != null && message.hasOwnProperty("kmsKey")) object.kmsKey = message.kmsKey; + if (message.ttl != null && message.hasOwnProperty("ttl")) + object.ttl = $root.google.protobuf.Duration.toObject(message.ttl, options); + if (message.stagingBucket != null && message.hasOwnProperty("stagingBucket")) + object.stagingBucket = message.stagingBucket; return object; }; @@ -7976,6 +8073,8 @@ * @property {Object.|null} [endpoints] RuntimeInfo endpoints * @property {string|null} [outputUri] RuntimeInfo outputUri * @property {string|null} [diagnosticOutputUri] RuntimeInfo diagnosticOutputUri + * @property {google.cloud.dataproc.v1.IUsageMetrics|null} [approximateUsage] RuntimeInfo approximateUsage + * @property {google.cloud.dataproc.v1.IUsageSnapshot|null} [currentUsage] RuntimeInfo currentUsage */ /** @@ -8018,6 +8117,22 @@ */ RuntimeInfo.prototype.diagnosticOutputUri = ""; + /** + * RuntimeInfo approximateUsage. + * @member {google.cloud.dataproc.v1.IUsageMetrics|null|undefined} approximateUsage + * @memberof google.cloud.dataproc.v1.RuntimeInfo + * @instance + */ + RuntimeInfo.prototype.approximateUsage = null; + + /** + * RuntimeInfo currentUsage. + * @member {google.cloud.dataproc.v1.IUsageSnapshot|null|undefined} currentUsage + * @memberof google.cloud.dataproc.v1.RuntimeInfo + * @instance + */ + RuntimeInfo.prototype.currentUsage = null; + /** * Creates a new RuntimeInfo instance using the specified properties. * @function create @@ -8049,6 +8164,10 @@ writer.uint32(/* id 2, wireType 2 =*/18).string(message.outputUri); if (message.diagnosticOutputUri != null && Object.hasOwnProperty.call(message, "diagnosticOutputUri")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.diagnosticOutputUri); + if (message.approximateUsage != null && Object.hasOwnProperty.call(message, "approximateUsage")) + $root.google.cloud.dataproc.v1.UsageMetrics.encode(message.approximateUsage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.currentUsage != null && Object.hasOwnProperty.call(message, "currentUsage")) + $root.google.cloud.dataproc.v1.UsageSnapshot.encode(message.currentUsage, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -8114,6 +8233,14 @@ message.diagnosticOutputUri = reader.string(); break; } + case 6: { + message.approximateUsage = $root.google.cloud.dataproc.v1.UsageMetrics.decode(reader, reader.uint32()); + break; + } + case 7: { + message.currentUsage = $root.google.cloud.dataproc.v1.UsageSnapshot.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -8163,6 +8290,16 @@ if (message.diagnosticOutputUri != null && message.hasOwnProperty("diagnosticOutputUri")) if (!$util.isString(message.diagnosticOutputUri)) return "diagnosticOutputUri: string expected"; + if (message.approximateUsage != null && message.hasOwnProperty("approximateUsage")) { + var error = $root.google.cloud.dataproc.v1.UsageMetrics.verify(message.approximateUsage); + if (error) + return "approximateUsage." + error; + } + if (message.currentUsage != null && message.hasOwnProperty("currentUsage")) { + var error = $root.google.cloud.dataproc.v1.UsageSnapshot.verify(message.currentUsage); + if (error) + return "currentUsage." + error; + } return null; }; @@ -8189,6 +8326,16 @@ message.outputUri = String(object.outputUri); if (object.diagnosticOutputUri != null) message.diagnosticOutputUri = String(object.diagnosticOutputUri); + if (object.approximateUsage != null) { + if (typeof object.approximateUsage !== "object") + throw TypeError(".google.cloud.dataproc.v1.RuntimeInfo.approximateUsage: object expected"); + message.approximateUsage = $root.google.cloud.dataproc.v1.UsageMetrics.fromObject(object.approximateUsage); + } + if (object.currentUsage != null) { + if (typeof object.currentUsage !== "object") + throw TypeError(".google.cloud.dataproc.v1.RuntimeInfo.currentUsage: object expected"); + message.currentUsage = $root.google.cloud.dataproc.v1.UsageSnapshot.fromObject(object.currentUsage); + } return message; }; @@ -8210,6 +8357,8 @@ if (options.defaults) { object.outputUri = ""; object.diagnosticOutputUri = ""; + object.approximateUsage = null; + object.currentUsage = null; } var keys2; if (message.endpoints && (keys2 = Object.keys(message.endpoints)).length) { @@ -8221,6 +8370,10 @@ object.outputUri = message.outputUri; if (message.diagnosticOutputUri != null && message.hasOwnProperty("diagnosticOutputUri")) object.diagnosticOutputUri = message.diagnosticOutputUri; + if (message.approximateUsage != null && message.hasOwnProperty("approximateUsage")) + object.approximateUsage = $root.google.cloud.dataproc.v1.UsageMetrics.toObject(message.approximateUsage, options); + if (message.currentUsage != null && message.hasOwnProperty("currentUsage")) + object.currentUsage = $root.google.cloud.dataproc.v1.UsageSnapshot.toObject(message.currentUsage, options); return object; }; @@ -8253,6 +8406,544 @@ return RuntimeInfo; })(); + v1.UsageMetrics = (function() { + + /** + * Properties of a UsageMetrics. + * @memberof google.cloud.dataproc.v1 + * @interface IUsageMetrics + * @property {number|Long|null} [milliDcuSeconds] UsageMetrics milliDcuSeconds + * @property {number|Long|null} [shuffleStorageGbSeconds] UsageMetrics shuffleStorageGbSeconds + */ + + /** + * Constructs a new UsageMetrics. + * @memberof google.cloud.dataproc.v1 + * @classdesc Represents a UsageMetrics. + * @implements IUsageMetrics + * @constructor + * @param {google.cloud.dataproc.v1.IUsageMetrics=} [properties] Properties to set + */ + function UsageMetrics(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UsageMetrics milliDcuSeconds. + * @member {number|Long} milliDcuSeconds + * @memberof google.cloud.dataproc.v1.UsageMetrics + * @instance + */ + UsageMetrics.prototype.milliDcuSeconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UsageMetrics shuffleStorageGbSeconds. + * @member {number|Long} shuffleStorageGbSeconds + * @memberof google.cloud.dataproc.v1.UsageMetrics + * @instance + */ + UsageMetrics.prototype.shuffleStorageGbSeconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new UsageMetrics instance using the specified properties. + * @function create + * @memberof google.cloud.dataproc.v1.UsageMetrics + * @static + * @param {google.cloud.dataproc.v1.IUsageMetrics=} [properties] Properties to set + * @returns {google.cloud.dataproc.v1.UsageMetrics} UsageMetrics instance + */ + UsageMetrics.create = function create(properties) { + return new UsageMetrics(properties); + }; + + /** + * Encodes the specified UsageMetrics message. Does not implicitly {@link google.cloud.dataproc.v1.UsageMetrics.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataproc.v1.UsageMetrics + * @static + * @param {google.cloud.dataproc.v1.IUsageMetrics} message UsageMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UsageMetrics.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.milliDcuSeconds != null && Object.hasOwnProperty.call(message, "milliDcuSeconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.milliDcuSeconds); + if (message.shuffleStorageGbSeconds != null && Object.hasOwnProperty.call(message, "shuffleStorageGbSeconds")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.shuffleStorageGbSeconds); + return writer; + }; + + /** + * Encodes the specified UsageMetrics message, length delimited. Does not implicitly {@link google.cloud.dataproc.v1.UsageMetrics.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataproc.v1.UsageMetrics + * @static + * @param {google.cloud.dataproc.v1.IUsageMetrics} message UsageMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UsageMetrics.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UsageMetrics message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataproc.v1.UsageMetrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataproc.v1.UsageMetrics} UsageMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UsageMetrics.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataproc.v1.UsageMetrics(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.milliDcuSeconds = reader.int64(); + break; + } + case 2: { + message.shuffleStorageGbSeconds = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UsageMetrics message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataproc.v1.UsageMetrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataproc.v1.UsageMetrics} UsageMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UsageMetrics.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UsageMetrics message. + * @function verify + * @memberof google.cloud.dataproc.v1.UsageMetrics + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UsageMetrics.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.milliDcuSeconds != null && message.hasOwnProperty("milliDcuSeconds")) + if (!$util.isInteger(message.milliDcuSeconds) && !(message.milliDcuSeconds && $util.isInteger(message.milliDcuSeconds.low) && $util.isInteger(message.milliDcuSeconds.high))) + return "milliDcuSeconds: integer|Long expected"; + if (message.shuffleStorageGbSeconds != null && message.hasOwnProperty("shuffleStorageGbSeconds")) + if (!$util.isInteger(message.shuffleStorageGbSeconds) && !(message.shuffleStorageGbSeconds && $util.isInteger(message.shuffleStorageGbSeconds.low) && $util.isInteger(message.shuffleStorageGbSeconds.high))) + return "shuffleStorageGbSeconds: integer|Long expected"; + return null; + }; + + /** + * Creates a UsageMetrics message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataproc.v1.UsageMetrics + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataproc.v1.UsageMetrics} UsageMetrics + */ + UsageMetrics.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataproc.v1.UsageMetrics) + return object; + var message = new $root.google.cloud.dataproc.v1.UsageMetrics(); + if (object.milliDcuSeconds != null) + if ($util.Long) + (message.milliDcuSeconds = $util.Long.fromValue(object.milliDcuSeconds)).unsigned = false; + else if (typeof object.milliDcuSeconds === "string") + message.milliDcuSeconds = parseInt(object.milliDcuSeconds, 10); + else if (typeof object.milliDcuSeconds === "number") + message.milliDcuSeconds = object.milliDcuSeconds; + else if (typeof object.milliDcuSeconds === "object") + message.milliDcuSeconds = new $util.LongBits(object.milliDcuSeconds.low >>> 0, object.milliDcuSeconds.high >>> 0).toNumber(); + if (object.shuffleStorageGbSeconds != null) + if ($util.Long) + (message.shuffleStorageGbSeconds = $util.Long.fromValue(object.shuffleStorageGbSeconds)).unsigned = false; + else if (typeof object.shuffleStorageGbSeconds === "string") + message.shuffleStorageGbSeconds = parseInt(object.shuffleStorageGbSeconds, 10); + else if (typeof object.shuffleStorageGbSeconds === "number") + message.shuffleStorageGbSeconds = object.shuffleStorageGbSeconds; + else if (typeof object.shuffleStorageGbSeconds === "object") + message.shuffleStorageGbSeconds = new $util.LongBits(object.shuffleStorageGbSeconds.low >>> 0, object.shuffleStorageGbSeconds.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a UsageMetrics message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataproc.v1.UsageMetrics + * @static + * @param {google.cloud.dataproc.v1.UsageMetrics} message UsageMetrics + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UsageMetrics.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.milliDcuSeconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.milliDcuSeconds = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.shuffleStorageGbSeconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.shuffleStorageGbSeconds = options.longs === String ? "0" : 0; + } + if (message.milliDcuSeconds != null && message.hasOwnProperty("milliDcuSeconds")) + if (typeof message.milliDcuSeconds === "number") + object.milliDcuSeconds = options.longs === String ? String(message.milliDcuSeconds) : message.milliDcuSeconds; + else + object.milliDcuSeconds = options.longs === String ? $util.Long.prototype.toString.call(message.milliDcuSeconds) : options.longs === Number ? new $util.LongBits(message.milliDcuSeconds.low >>> 0, message.milliDcuSeconds.high >>> 0).toNumber() : message.milliDcuSeconds; + if (message.shuffleStorageGbSeconds != null && message.hasOwnProperty("shuffleStorageGbSeconds")) + if (typeof message.shuffleStorageGbSeconds === "number") + object.shuffleStorageGbSeconds = options.longs === String ? String(message.shuffleStorageGbSeconds) : message.shuffleStorageGbSeconds; + else + object.shuffleStorageGbSeconds = options.longs === String ? $util.Long.prototype.toString.call(message.shuffleStorageGbSeconds) : options.longs === Number ? new $util.LongBits(message.shuffleStorageGbSeconds.low >>> 0, message.shuffleStorageGbSeconds.high >>> 0).toNumber() : message.shuffleStorageGbSeconds; + return object; + }; + + /** + * Converts this UsageMetrics to JSON. + * @function toJSON + * @memberof google.cloud.dataproc.v1.UsageMetrics + * @instance + * @returns {Object.} JSON object + */ + UsageMetrics.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UsageMetrics + * @function getTypeUrl + * @memberof google.cloud.dataproc.v1.UsageMetrics + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UsageMetrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataproc.v1.UsageMetrics"; + }; + + return UsageMetrics; + })(); + + v1.UsageSnapshot = (function() { + + /** + * Properties of a UsageSnapshot. + * @memberof google.cloud.dataproc.v1 + * @interface IUsageSnapshot + * @property {number|Long|null} [milliDcu] UsageSnapshot milliDcu + * @property {number|Long|null} [shuffleStorageGb] UsageSnapshot shuffleStorageGb + * @property {google.protobuf.ITimestamp|null} [snapshotTime] UsageSnapshot snapshotTime + */ + + /** + * Constructs a new UsageSnapshot. + * @memberof google.cloud.dataproc.v1 + * @classdesc Represents a UsageSnapshot. + * @implements IUsageSnapshot + * @constructor + * @param {google.cloud.dataproc.v1.IUsageSnapshot=} [properties] Properties to set + */ + function UsageSnapshot(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UsageSnapshot milliDcu. + * @member {number|Long} milliDcu + * @memberof google.cloud.dataproc.v1.UsageSnapshot + * @instance + */ + UsageSnapshot.prototype.milliDcu = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UsageSnapshot shuffleStorageGb. + * @member {number|Long} shuffleStorageGb + * @memberof google.cloud.dataproc.v1.UsageSnapshot + * @instance + */ + UsageSnapshot.prototype.shuffleStorageGb = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UsageSnapshot snapshotTime. + * @member {google.protobuf.ITimestamp|null|undefined} snapshotTime + * @memberof google.cloud.dataproc.v1.UsageSnapshot + * @instance + */ + UsageSnapshot.prototype.snapshotTime = null; + + /** + * Creates a new UsageSnapshot instance using the specified properties. + * @function create + * @memberof google.cloud.dataproc.v1.UsageSnapshot + * @static + * @param {google.cloud.dataproc.v1.IUsageSnapshot=} [properties] Properties to set + * @returns {google.cloud.dataproc.v1.UsageSnapshot} UsageSnapshot instance + */ + UsageSnapshot.create = function create(properties) { + return new UsageSnapshot(properties); + }; + + /** + * Encodes the specified UsageSnapshot message. Does not implicitly {@link google.cloud.dataproc.v1.UsageSnapshot.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataproc.v1.UsageSnapshot + * @static + * @param {google.cloud.dataproc.v1.IUsageSnapshot} message UsageSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UsageSnapshot.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.milliDcu != null && Object.hasOwnProperty.call(message, "milliDcu")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.milliDcu); + if (message.shuffleStorageGb != null && Object.hasOwnProperty.call(message, "shuffleStorageGb")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.shuffleStorageGb); + if (message.snapshotTime != null && Object.hasOwnProperty.call(message, "snapshotTime")) + $root.google.protobuf.Timestamp.encode(message.snapshotTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UsageSnapshot message, length delimited. Does not implicitly {@link google.cloud.dataproc.v1.UsageSnapshot.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataproc.v1.UsageSnapshot + * @static + * @param {google.cloud.dataproc.v1.IUsageSnapshot} message UsageSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UsageSnapshot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UsageSnapshot message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataproc.v1.UsageSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataproc.v1.UsageSnapshot} UsageSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UsageSnapshot.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataproc.v1.UsageSnapshot(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.milliDcu = reader.int64(); + break; + } + case 2: { + message.shuffleStorageGb = reader.int64(); + break; + } + case 3: { + message.snapshotTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UsageSnapshot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataproc.v1.UsageSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataproc.v1.UsageSnapshot} UsageSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UsageSnapshot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UsageSnapshot message. + * @function verify + * @memberof google.cloud.dataproc.v1.UsageSnapshot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UsageSnapshot.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.milliDcu != null && message.hasOwnProperty("milliDcu")) + if (!$util.isInteger(message.milliDcu) && !(message.milliDcu && $util.isInteger(message.milliDcu.low) && $util.isInteger(message.milliDcu.high))) + return "milliDcu: integer|Long expected"; + if (message.shuffleStorageGb != null && message.hasOwnProperty("shuffleStorageGb")) + if (!$util.isInteger(message.shuffleStorageGb) && !(message.shuffleStorageGb && $util.isInteger(message.shuffleStorageGb.low) && $util.isInteger(message.shuffleStorageGb.high))) + return "shuffleStorageGb: integer|Long expected"; + if (message.snapshotTime != null && message.hasOwnProperty("snapshotTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.snapshotTime); + if (error) + return "snapshotTime." + error; + } + return null; + }; + + /** + * Creates a UsageSnapshot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataproc.v1.UsageSnapshot + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataproc.v1.UsageSnapshot} UsageSnapshot + */ + UsageSnapshot.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataproc.v1.UsageSnapshot) + return object; + var message = new $root.google.cloud.dataproc.v1.UsageSnapshot(); + if (object.milliDcu != null) + if ($util.Long) + (message.milliDcu = $util.Long.fromValue(object.milliDcu)).unsigned = false; + else if (typeof object.milliDcu === "string") + message.milliDcu = parseInt(object.milliDcu, 10); + else if (typeof object.milliDcu === "number") + message.milliDcu = object.milliDcu; + else if (typeof object.milliDcu === "object") + message.milliDcu = new $util.LongBits(object.milliDcu.low >>> 0, object.milliDcu.high >>> 0).toNumber(); + if (object.shuffleStorageGb != null) + if ($util.Long) + (message.shuffleStorageGb = $util.Long.fromValue(object.shuffleStorageGb)).unsigned = false; + else if (typeof object.shuffleStorageGb === "string") + message.shuffleStorageGb = parseInt(object.shuffleStorageGb, 10); + else if (typeof object.shuffleStorageGb === "number") + message.shuffleStorageGb = object.shuffleStorageGb; + else if (typeof object.shuffleStorageGb === "object") + message.shuffleStorageGb = new $util.LongBits(object.shuffleStorageGb.low >>> 0, object.shuffleStorageGb.high >>> 0).toNumber(); + if (object.snapshotTime != null) { + if (typeof object.snapshotTime !== "object") + throw TypeError(".google.cloud.dataproc.v1.UsageSnapshot.snapshotTime: object expected"); + message.snapshotTime = $root.google.protobuf.Timestamp.fromObject(object.snapshotTime); + } + return message; + }; + + /** + * Creates a plain object from a UsageSnapshot message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataproc.v1.UsageSnapshot + * @static + * @param {google.cloud.dataproc.v1.UsageSnapshot} message UsageSnapshot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UsageSnapshot.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.milliDcu = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.milliDcu = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.shuffleStorageGb = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.shuffleStorageGb = options.longs === String ? "0" : 0; + object.snapshotTime = null; + } + if (message.milliDcu != null && message.hasOwnProperty("milliDcu")) + if (typeof message.milliDcu === "number") + object.milliDcu = options.longs === String ? String(message.milliDcu) : message.milliDcu; + else + object.milliDcu = options.longs === String ? $util.Long.prototype.toString.call(message.milliDcu) : options.longs === Number ? new $util.LongBits(message.milliDcu.low >>> 0, message.milliDcu.high >>> 0).toNumber() : message.milliDcu; + if (message.shuffleStorageGb != null && message.hasOwnProperty("shuffleStorageGb")) + if (typeof message.shuffleStorageGb === "number") + object.shuffleStorageGb = options.longs === String ? String(message.shuffleStorageGb) : message.shuffleStorageGb; + else + object.shuffleStorageGb = options.longs === String ? $util.Long.prototype.toString.call(message.shuffleStorageGb) : options.longs === Number ? new $util.LongBits(message.shuffleStorageGb.low >>> 0, message.shuffleStorageGb.high >>> 0).toNumber() : message.shuffleStorageGb; + if (message.snapshotTime != null && message.hasOwnProperty("snapshotTime")) + object.snapshotTime = $root.google.protobuf.Timestamp.toObject(message.snapshotTime, options); + return object; + }; + + /** + * Converts this UsageSnapshot to JSON. + * @function toJSON + * @memberof google.cloud.dataproc.v1.UsageSnapshot + * @instance + * @returns {Object.} JSON object + */ + UsageSnapshot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UsageSnapshot + * @function getTypeUrl + * @memberof google.cloud.dataproc.v1.UsageSnapshot + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UsageSnapshot.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataproc.v1.UsageSnapshot"; + }; + + return UsageSnapshot; + })(); + v1.GkeClusterConfig = (function() { /** @@ -9692,10 +10383,12 @@ * @memberof google.cloud.dataproc.v1.GkeNodePoolConfig * @interface IGkeNodeConfig * @property {string|null} [machineType] GkeNodeConfig machineType - * @property {boolean|null} [preemptible] GkeNodeConfig preemptible * @property {number|null} [localSsdCount] GkeNodeConfig localSsdCount + * @property {boolean|null} [preemptible] GkeNodeConfig preemptible * @property {Array.|null} [accelerators] GkeNodeConfig accelerators * @property {string|null} [minCpuPlatform] GkeNodeConfig minCpuPlatform + * @property {string|null} [bootDiskKmsKey] GkeNodeConfig bootDiskKmsKey + * @property {boolean|null} [spot] GkeNodeConfig spot */ /** @@ -9723,20 +10416,20 @@ GkeNodeConfig.prototype.machineType = ""; /** - * GkeNodeConfig preemptible. - * @member {boolean} preemptible + * GkeNodeConfig localSsdCount. + * @member {number} localSsdCount * @memberof google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig * @instance */ - GkeNodeConfig.prototype.preemptible = false; + GkeNodeConfig.prototype.localSsdCount = 0; /** - * GkeNodeConfig localSsdCount. - * @member {number} localSsdCount + * GkeNodeConfig preemptible. + * @member {boolean} preemptible * @memberof google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig * @instance */ - GkeNodeConfig.prototype.localSsdCount = 0; + GkeNodeConfig.prototype.preemptible = false; /** * GkeNodeConfig accelerators. @@ -9754,6 +10447,22 @@ */ GkeNodeConfig.prototype.minCpuPlatform = ""; + /** + * GkeNodeConfig bootDiskKmsKey. + * @member {string} bootDiskKmsKey + * @memberof google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig + * @instance + */ + GkeNodeConfig.prototype.bootDiskKmsKey = ""; + + /** + * GkeNodeConfig spot. + * @member {boolean} spot + * @memberof google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig + * @instance + */ + GkeNodeConfig.prototype.spot = false; + /** * Creates a new GkeNodeConfig instance using the specified properties. * @function create @@ -9789,6 +10498,10 @@ $root.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig.encode(message.accelerators[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); if (message.minCpuPlatform != null && Object.hasOwnProperty.call(message, "minCpuPlatform")) writer.uint32(/* id 13, wireType 2 =*/106).string(message.minCpuPlatform); + if (message.bootDiskKmsKey != null && Object.hasOwnProperty.call(message, "bootDiskKmsKey")) + writer.uint32(/* id 23, wireType 2 =*/186).string(message.bootDiskKmsKey); + if (message.spot != null && Object.hasOwnProperty.call(message, "spot")) + writer.uint32(/* id 32, wireType 0 =*/256).bool(message.spot); return writer; }; @@ -9827,14 +10540,14 @@ message.machineType = reader.string(); break; } - case 10: { - message.preemptible = reader.bool(); - break; - } case 7: { message.localSsdCount = reader.int32(); break; } + case 10: { + message.preemptible = reader.bool(); + break; + } case 11: { if (!(message.accelerators && message.accelerators.length)) message.accelerators = []; @@ -9845,6 +10558,14 @@ message.minCpuPlatform = reader.string(); break; } + case 23: { + message.bootDiskKmsKey = reader.string(); + break; + } + case 32: { + message.spot = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -9883,12 +10604,12 @@ if (message.machineType != null && message.hasOwnProperty("machineType")) if (!$util.isString(message.machineType)) return "machineType: string expected"; - if (message.preemptible != null && message.hasOwnProperty("preemptible")) - if (typeof message.preemptible !== "boolean") - return "preemptible: boolean expected"; if (message.localSsdCount != null && message.hasOwnProperty("localSsdCount")) if (!$util.isInteger(message.localSsdCount)) return "localSsdCount: integer expected"; + if (message.preemptible != null && message.hasOwnProperty("preemptible")) + if (typeof message.preemptible !== "boolean") + return "preemptible: boolean expected"; if (message.accelerators != null && message.hasOwnProperty("accelerators")) { if (!Array.isArray(message.accelerators)) return "accelerators: array expected"; @@ -9901,6 +10622,12 @@ if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) if (!$util.isString(message.minCpuPlatform)) return "minCpuPlatform: string expected"; + if (message.bootDiskKmsKey != null && message.hasOwnProperty("bootDiskKmsKey")) + if (!$util.isString(message.bootDiskKmsKey)) + return "bootDiskKmsKey: string expected"; + if (message.spot != null && message.hasOwnProperty("spot")) + if (typeof message.spot !== "boolean") + return "spot: boolean expected"; return null; }; @@ -9918,10 +10645,10 @@ var message = new $root.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig(); if (object.machineType != null) message.machineType = String(object.machineType); - if (object.preemptible != null) - message.preemptible = Boolean(object.preemptible); if (object.localSsdCount != null) message.localSsdCount = object.localSsdCount | 0; + if (object.preemptible != null) + message.preemptible = Boolean(object.preemptible); if (object.accelerators) { if (!Array.isArray(object.accelerators)) throw TypeError(".google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.accelerators: array expected"); @@ -9934,6 +10661,10 @@ } if (object.minCpuPlatform != null) message.minCpuPlatform = String(object.minCpuPlatform); + if (object.bootDiskKmsKey != null) + message.bootDiskKmsKey = String(object.bootDiskKmsKey); + if (object.spot != null) + message.spot = Boolean(object.spot); return message; }; @@ -9957,6 +10688,8 @@ object.localSsdCount = 0; object.preemptible = false; object.minCpuPlatform = ""; + object.bootDiskKmsKey = ""; + object.spot = false; } if (message.machineType != null && message.hasOwnProperty("machineType")) object.machineType = message.machineType; @@ -9971,6 +10704,10 @@ } if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) object.minCpuPlatform = message.minCpuPlatform; + if (message.bootDiskKmsKey != null && message.hasOwnProperty("bootDiskKmsKey")) + object.bootDiskKmsKey = message.bootDiskKmsKey; + if (message.spot != null && message.hasOwnProperty("spot")) + object.spot = message.spot; return object; }; @@ -10011,6 +10748,7 @@ * @interface IGkeNodePoolAcceleratorConfig * @property {number|Long|null} [acceleratorCount] GkeNodePoolAcceleratorConfig acceleratorCount * @property {string|null} [acceleratorType] GkeNodePoolAcceleratorConfig acceleratorType + * @property {string|null} [gpuPartitionSize] GkeNodePoolAcceleratorConfig gpuPartitionSize */ /** @@ -10044,6 +10782,14 @@ */ GkeNodePoolAcceleratorConfig.prototype.acceleratorType = ""; + /** + * GkeNodePoolAcceleratorConfig gpuPartitionSize. + * @member {string} gpuPartitionSize + * @memberof google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig + * @instance + */ + GkeNodePoolAcceleratorConfig.prototype.gpuPartitionSize = ""; + /** * Creates a new GkeNodePoolAcceleratorConfig instance using the specified properties. * @function create @@ -10072,6 +10818,8 @@ writer.uint32(/* id 1, wireType 0 =*/8).int64(message.acceleratorCount); if (message.acceleratorType != null && Object.hasOwnProperty.call(message, "acceleratorType")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.acceleratorType); + if (message.gpuPartitionSize != null && Object.hasOwnProperty.call(message, "gpuPartitionSize")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.gpuPartitionSize); return writer; }; @@ -10114,6 +10862,10 @@ message.acceleratorType = reader.string(); break; } + case 3: { + message.gpuPartitionSize = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -10155,6 +10907,9 @@ if (message.acceleratorType != null && message.hasOwnProperty("acceleratorType")) if (!$util.isString(message.acceleratorType)) return "acceleratorType: string expected"; + if (message.gpuPartitionSize != null && message.hasOwnProperty("gpuPartitionSize")) + if (!$util.isString(message.gpuPartitionSize)) + return "gpuPartitionSize: string expected"; return null; }; @@ -10181,6 +10936,8 @@ message.acceleratorCount = new $util.LongBits(object.acceleratorCount.low >>> 0, object.acceleratorCount.high >>> 0).toNumber(); if (object.acceleratorType != null) message.acceleratorType = String(object.acceleratorType); + if (object.gpuPartitionSize != null) + message.gpuPartitionSize = String(object.gpuPartitionSize); return message; }; @@ -10204,6 +10961,7 @@ } else object.acceleratorCount = options.longs === String ? "0" : 0; object.acceleratorType = ""; + object.gpuPartitionSize = ""; } if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) if (typeof message.acceleratorCount === "number") @@ -10212,6 +10970,8 @@ object.acceleratorCount = options.longs === String ? $util.Long.prototype.toString.call(message.acceleratorCount) : options.longs === Number ? new $util.LongBits(message.acceleratorCount.low >>> 0, message.acceleratorCount.high >>> 0).toNumber() : message.acceleratorCount; if (message.acceleratorType != null && message.hasOwnProperty("acceleratorType")) object.acceleratorType = message.acceleratorType; + if (message.gpuPartitionSize != null && message.hasOwnProperty("gpuPartitionSize")) + object.gpuPartitionSize = message.gpuPartitionSize; return object; }; @@ -10485,8 +11245,10 @@ * @property {number} FLINK=14 FLINK value * @property {number} HBASE=11 HBASE value * @property {number} HIVE_WEBHCAT=3 HIVE_WEBHCAT value + * @property {number} HUDI=18 HUDI value * @property {number} JUPYTER=1 JUPYTER value * @property {number} PRESTO=6 PRESTO value + * @property {number} TRINO=17 TRINO value * @property {number} RANGER=12 RANGER value * @property {number} SOLR=10 SOLR value * @property {number} ZEPPELIN=4 ZEPPELIN value @@ -10501,8 +11263,10 @@ values[valuesById[14] = "FLINK"] = 14; values[valuesById[11] = "HBASE"] = 11; values[valuesById[3] = "HIVE_WEBHCAT"] = 3; + values[valuesById[18] = "HUDI"] = 18; values[valuesById[1] = "JUPYTER"] = 1; values[valuesById[6] = "PRESTO"] = 6; + values[valuesById[17] = "TRINO"] = 17; values[valuesById[12] = "RANGER"] = 12; values[valuesById[10] = "SOLR"] = 10; values[valuesById[4] = "ZEPPELIN"] = 4; @@ -13194,11 +13958,11 @@ /** * GceClusterConfig internalIpOnly. - * @member {boolean} internalIpOnly + * @member {boolean|null|undefined} internalIpOnly * @memberof google.cloud.dataproc.v1.GceClusterConfig * @instance */ - GceClusterConfig.prototype.internalIpOnly = false; + GceClusterConfig.prototype.internalIpOnly = null; /** * GceClusterConfig privateIpv6GoogleAccess. @@ -13272,6 +14036,20 @@ */ GceClusterConfig.prototype.confidentialInstanceConfig = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GceClusterConfig _internalIpOnly. + * @member {"internalIpOnly"|undefined} _internalIpOnly + * @memberof google.cloud.dataproc.v1.GceClusterConfig + * @instance + */ + Object.defineProperty(GceClusterConfig.prototype, "_internalIpOnly", { + get: $util.oneOfGetter($oneOfFields = ["internalIpOnly"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new GceClusterConfig instance using the specified properties. * @function create @@ -13469,6 +14247,7 @@ GceClusterConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.zoneUri != null && message.hasOwnProperty("zoneUri")) if (!$util.isString(message.zoneUri)) return "zoneUri: string expected"; @@ -13478,9 +14257,11 @@ if (message.subnetworkUri != null && message.hasOwnProperty("subnetworkUri")) if (!$util.isString(message.subnetworkUri)) return "subnetworkUri: string expected"; - if (message.internalIpOnly != null && message.hasOwnProperty("internalIpOnly")) + if (message.internalIpOnly != null && message.hasOwnProperty("internalIpOnly")) { + properties._internalIpOnly = 1; if (typeof message.internalIpOnly !== "boolean") return "internalIpOnly: boolean expected"; + } if (message.privateIpv6GoogleAccess != null && message.hasOwnProperty("privateIpv6GoogleAccess")) switch (message.privateIpv6GoogleAccess) { default: @@ -13652,7 +14433,6 @@ object.zoneUri = ""; object.networkUri = ""; object.subnetworkUri = ""; - object.internalIpOnly = false; object.serviceAccount = ""; object.reservationAffinity = null; object.privateIpv6GoogleAccess = options.enums === String ? "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED" : 0; @@ -13682,8 +14462,11 @@ } if (message.subnetworkUri != null && message.hasOwnProperty("subnetworkUri")) object.subnetworkUri = message.subnetworkUri; - if (message.internalIpOnly != null && message.hasOwnProperty("internalIpOnly")) + if (message.internalIpOnly != null && message.hasOwnProperty("internalIpOnly")) { object.internalIpOnly = message.internalIpOnly; + if (options.oneofs) + object._internalIpOnly = "internalIpOnly"; + } if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) object.serviceAccount = message.serviceAccount; if (message.reservationAffinity != null && message.hasOwnProperty("reservationAffinity")) @@ -13977,27 +14760,63 @@ /** * ShieldedInstanceConfig enableSecureBoot. - * @member {boolean} enableSecureBoot + * @member {boolean|null|undefined} enableSecureBoot * @memberof google.cloud.dataproc.v1.ShieldedInstanceConfig * @instance */ - ShieldedInstanceConfig.prototype.enableSecureBoot = false; + ShieldedInstanceConfig.prototype.enableSecureBoot = null; /** * ShieldedInstanceConfig enableVtpm. - * @member {boolean} enableVtpm + * @member {boolean|null|undefined} enableVtpm * @memberof google.cloud.dataproc.v1.ShieldedInstanceConfig * @instance */ - ShieldedInstanceConfig.prototype.enableVtpm = false; + ShieldedInstanceConfig.prototype.enableVtpm = null; /** * ShieldedInstanceConfig enableIntegrityMonitoring. - * @member {boolean} enableIntegrityMonitoring + * @member {boolean|null|undefined} enableIntegrityMonitoring * @memberof google.cloud.dataproc.v1.ShieldedInstanceConfig * @instance */ - ShieldedInstanceConfig.prototype.enableIntegrityMonitoring = false; + ShieldedInstanceConfig.prototype.enableIntegrityMonitoring = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ShieldedInstanceConfig _enableSecureBoot. + * @member {"enableSecureBoot"|undefined} _enableSecureBoot + * @memberof google.cloud.dataproc.v1.ShieldedInstanceConfig + * @instance + */ + Object.defineProperty(ShieldedInstanceConfig.prototype, "_enableSecureBoot", { + get: $util.oneOfGetter($oneOfFields = ["enableSecureBoot"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ShieldedInstanceConfig _enableVtpm. + * @member {"enableVtpm"|undefined} _enableVtpm + * @memberof google.cloud.dataproc.v1.ShieldedInstanceConfig + * @instance + */ + Object.defineProperty(ShieldedInstanceConfig.prototype, "_enableVtpm", { + get: $util.oneOfGetter($oneOfFields = ["enableVtpm"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ShieldedInstanceConfig _enableIntegrityMonitoring. + * @member {"enableIntegrityMonitoring"|undefined} _enableIntegrityMonitoring + * @memberof google.cloud.dataproc.v1.ShieldedInstanceConfig + * @instance + */ + Object.defineProperty(ShieldedInstanceConfig.prototype, "_enableIntegrityMonitoring", { + get: $util.oneOfGetter($oneOfFields = ["enableIntegrityMonitoring"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ShieldedInstanceConfig instance using the specified properties. @@ -14110,15 +14929,22 @@ ShieldedInstanceConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.enableSecureBoot != null && message.hasOwnProperty("enableSecureBoot")) + var properties = {}; + if (message.enableSecureBoot != null && message.hasOwnProperty("enableSecureBoot")) { + properties._enableSecureBoot = 1; if (typeof message.enableSecureBoot !== "boolean") return "enableSecureBoot: boolean expected"; - if (message.enableVtpm != null && message.hasOwnProperty("enableVtpm")) + } + if (message.enableVtpm != null && message.hasOwnProperty("enableVtpm")) { + properties._enableVtpm = 1; if (typeof message.enableVtpm !== "boolean") return "enableVtpm: boolean expected"; - if (message.enableIntegrityMonitoring != null && message.hasOwnProperty("enableIntegrityMonitoring")) + } + if (message.enableIntegrityMonitoring != null && message.hasOwnProperty("enableIntegrityMonitoring")) { + properties._enableIntegrityMonitoring = 1; if (typeof message.enableIntegrityMonitoring !== "boolean") return "enableIntegrityMonitoring: boolean expected"; + } return null; }; @@ -14156,17 +14982,21 @@ if (!options) options = {}; var object = {}; - if (options.defaults) { - object.enableSecureBoot = false; - object.enableVtpm = false; - object.enableIntegrityMonitoring = false; - } - if (message.enableSecureBoot != null && message.hasOwnProperty("enableSecureBoot")) + if (message.enableSecureBoot != null && message.hasOwnProperty("enableSecureBoot")) { object.enableSecureBoot = message.enableSecureBoot; - if (message.enableVtpm != null && message.hasOwnProperty("enableVtpm")) + if (options.oneofs) + object._enableSecureBoot = "enableSecureBoot"; + } + if (message.enableVtpm != null && message.hasOwnProperty("enableVtpm")) { object.enableVtpm = message.enableVtpm; - if (message.enableIntegrityMonitoring != null && message.hasOwnProperty("enableIntegrityMonitoring")) + if (options.oneofs) + object._enableVtpm = "enableVtpm"; + } + if (message.enableIntegrityMonitoring != null && message.hasOwnProperty("enableIntegrityMonitoring")) { object.enableIntegrityMonitoring = message.enableIntegrityMonitoring; + if (options.oneofs) + object._enableIntegrityMonitoring = "enableIntegrityMonitoring"; + } return object; }; @@ -18099,8 +18929,10 @@ case 14: case 11: case 3: + case 18: case 1: case 6: + case 17: case 12: case 10: case 4: @@ -18171,6 +19003,10 @@ case 3: message.optionalComponents[i] = 3; break; + case "HUDI": + case 18: + message.optionalComponents[i] = 18; + break; case "JUPYTER": case 1: message.optionalComponents[i] = 1; @@ -18179,6 +19015,10 @@ case 6: message.optionalComponents[i] = 6; break; + case "TRINO": + case 17: + message.optionalComponents[i] = 17; + break; case "RANGER": case 12: message.optionalComponents[i] = 12; @@ -18787,6 +19627,322 @@ return MetastoreConfig; })(); + v1.ClusterMetrics = (function() { + + /** + * Properties of a ClusterMetrics. + * @memberof google.cloud.dataproc.v1 + * @interface IClusterMetrics + * @property {Object.|null} [hdfsMetrics] ClusterMetrics hdfsMetrics + * @property {Object.|null} [yarnMetrics] ClusterMetrics yarnMetrics + */ + + /** + * Constructs a new ClusterMetrics. + * @memberof google.cloud.dataproc.v1 + * @classdesc Represents a ClusterMetrics. + * @implements IClusterMetrics + * @constructor + * @param {google.cloud.dataproc.v1.IClusterMetrics=} [properties] Properties to set + */ + function ClusterMetrics(properties) { + this.hdfsMetrics = {}; + this.yarnMetrics = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClusterMetrics hdfsMetrics. + * @member {Object.} hdfsMetrics + * @memberof google.cloud.dataproc.v1.ClusterMetrics + * @instance + */ + ClusterMetrics.prototype.hdfsMetrics = $util.emptyObject; + + /** + * ClusterMetrics yarnMetrics. + * @member {Object.} yarnMetrics + * @memberof google.cloud.dataproc.v1.ClusterMetrics + * @instance + */ + ClusterMetrics.prototype.yarnMetrics = $util.emptyObject; + + /** + * Creates a new ClusterMetrics instance using the specified properties. + * @function create + * @memberof google.cloud.dataproc.v1.ClusterMetrics + * @static + * @param {google.cloud.dataproc.v1.IClusterMetrics=} [properties] Properties to set + * @returns {google.cloud.dataproc.v1.ClusterMetrics} ClusterMetrics instance + */ + ClusterMetrics.create = function create(properties) { + return new ClusterMetrics(properties); + }; + + /** + * Encodes the specified ClusterMetrics message. Does not implicitly {@link google.cloud.dataproc.v1.ClusterMetrics.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataproc.v1.ClusterMetrics + * @static + * @param {google.cloud.dataproc.v1.IClusterMetrics} message ClusterMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterMetrics.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hdfsMetrics != null && Object.hasOwnProperty.call(message, "hdfsMetrics")) + for (var keys = Object.keys(message.hdfsMetrics), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).int64(message.hdfsMetrics[keys[i]]).ldelim(); + if (message.yarnMetrics != null && Object.hasOwnProperty.call(message, "yarnMetrics")) + for (var keys = Object.keys(message.yarnMetrics), 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 0 =*/16).int64(message.yarnMetrics[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClusterMetrics message, length delimited. Does not implicitly {@link google.cloud.dataproc.v1.ClusterMetrics.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataproc.v1.ClusterMetrics + * @static + * @param {google.cloud.dataproc.v1.IClusterMetrics} message ClusterMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterMetrics.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClusterMetrics message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataproc.v1.ClusterMetrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataproc.v1.ClusterMetrics} ClusterMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterMetrics.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataproc.v1.ClusterMetrics(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (message.hdfsMetrics === $util.emptyObject) + message.hdfsMetrics = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = 0; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.int64(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.hdfsMetrics[key] = value; + break; + } + case 2: { + if (message.yarnMetrics === $util.emptyObject) + message.yarnMetrics = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = 0; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.int64(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.yarnMetrics[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClusterMetrics message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataproc.v1.ClusterMetrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataproc.v1.ClusterMetrics} ClusterMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterMetrics.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClusterMetrics message. + * @function verify + * @memberof google.cloud.dataproc.v1.ClusterMetrics + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClusterMetrics.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hdfsMetrics != null && message.hasOwnProperty("hdfsMetrics")) { + if (!$util.isObject(message.hdfsMetrics)) + return "hdfsMetrics: object expected"; + var key = Object.keys(message.hdfsMetrics); + for (var i = 0; i < key.length; ++i) + if (!$util.isInteger(message.hdfsMetrics[key[i]]) && !(message.hdfsMetrics[key[i]] && $util.isInteger(message.hdfsMetrics[key[i]].low) && $util.isInteger(message.hdfsMetrics[key[i]].high))) + return "hdfsMetrics: integer|Long{k:string} expected"; + } + if (message.yarnMetrics != null && message.hasOwnProperty("yarnMetrics")) { + if (!$util.isObject(message.yarnMetrics)) + return "yarnMetrics: object expected"; + var key = Object.keys(message.yarnMetrics); + for (var i = 0; i < key.length; ++i) + if (!$util.isInteger(message.yarnMetrics[key[i]]) && !(message.yarnMetrics[key[i]] && $util.isInteger(message.yarnMetrics[key[i]].low) && $util.isInteger(message.yarnMetrics[key[i]].high))) + return "yarnMetrics: integer|Long{k:string} expected"; + } + return null; + }; + + /** + * Creates a ClusterMetrics message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataproc.v1.ClusterMetrics + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataproc.v1.ClusterMetrics} ClusterMetrics + */ + ClusterMetrics.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataproc.v1.ClusterMetrics) + return object; + var message = new $root.google.cloud.dataproc.v1.ClusterMetrics(); + if (object.hdfsMetrics) { + if (typeof object.hdfsMetrics !== "object") + throw TypeError(".google.cloud.dataproc.v1.ClusterMetrics.hdfsMetrics: object expected"); + message.hdfsMetrics = {}; + for (var keys = Object.keys(object.hdfsMetrics), i = 0; i < keys.length; ++i) + if ($util.Long) + (message.hdfsMetrics[keys[i]] = $util.Long.fromValue(object.hdfsMetrics[keys[i]])).unsigned = false; + else if (typeof object.hdfsMetrics[keys[i]] === "string") + message.hdfsMetrics[keys[i]] = parseInt(object.hdfsMetrics[keys[i]], 10); + else if (typeof object.hdfsMetrics[keys[i]] === "number") + message.hdfsMetrics[keys[i]] = object.hdfsMetrics[keys[i]]; + else if (typeof object.hdfsMetrics[keys[i]] === "object") + message.hdfsMetrics[keys[i]] = new $util.LongBits(object.hdfsMetrics[keys[i]].low >>> 0, object.hdfsMetrics[keys[i]].high >>> 0).toNumber(); + } + if (object.yarnMetrics) { + if (typeof object.yarnMetrics !== "object") + throw TypeError(".google.cloud.dataproc.v1.ClusterMetrics.yarnMetrics: object expected"); + message.yarnMetrics = {}; + for (var keys = Object.keys(object.yarnMetrics), i = 0; i < keys.length; ++i) + if ($util.Long) + (message.yarnMetrics[keys[i]] = $util.Long.fromValue(object.yarnMetrics[keys[i]])).unsigned = false; + else if (typeof object.yarnMetrics[keys[i]] === "string") + message.yarnMetrics[keys[i]] = parseInt(object.yarnMetrics[keys[i]], 10); + else if (typeof object.yarnMetrics[keys[i]] === "number") + message.yarnMetrics[keys[i]] = object.yarnMetrics[keys[i]]; + else if (typeof object.yarnMetrics[keys[i]] === "object") + message.yarnMetrics[keys[i]] = new $util.LongBits(object.yarnMetrics[keys[i]].low >>> 0, object.yarnMetrics[keys[i]].high >>> 0).toNumber(); + } + return message; + }; + + /** + * Creates a plain object from a ClusterMetrics message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataproc.v1.ClusterMetrics + * @static + * @param {google.cloud.dataproc.v1.ClusterMetrics} message ClusterMetrics + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClusterMetrics.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.hdfsMetrics = {}; + object.yarnMetrics = {}; + } + var keys2; + if (message.hdfsMetrics && (keys2 = Object.keys(message.hdfsMetrics)).length) { + object.hdfsMetrics = {}; + for (var j = 0; j < keys2.length; ++j) + if (typeof message.hdfsMetrics[keys2[j]] === "number") + object.hdfsMetrics[keys2[j]] = options.longs === String ? String(message.hdfsMetrics[keys2[j]]) : message.hdfsMetrics[keys2[j]]; + else + object.hdfsMetrics[keys2[j]] = options.longs === String ? $util.Long.prototype.toString.call(message.hdfsMetrics[keys2[j]]) : options.longs === Number ? new $util.LongBits(message.hdfsMetrics[keys2[j]].low >>> 0, message.hdfsMetrics[keys2[j]].high >>> 0).toNumber() : message.hdfsMetrics[keys2[j]]; + } + if (message.yarnMetrics && (keys2 = Object.keys(message.yarnMetrics)).length) { + object.yarnMetrics = {}; + for (var j = 0; j < keys2.length; ++j) + if (typeof message.yarnMetrics[keys2[j]] === "number") + object.yarnMetrics[keys2[j]] = options.longs === String ? String(message.yarnMetrics[keys2[j]]) : message.yarnMetrics[keys2[j]]; + else + object.yarnMetrics[keys2[j]] = options.longs === String ? $util.Long.prototype.toString.call(message.yarnMetrics[keys2[j]]) : options.longs === Number ? new $util.LongBits(message.yarnMetrics[keys2[j]].low >>> 0, message.yarnMetrics[keys2[j]].high >>> 0).toNumber() : message.yarnMetrics[keys2[j]]; + } + return object; + }; + + /** + * Converts this ClusterMetrics to JSON. + * @function toJSON + * @memberof google.cloud.dataproc.v1.ClusterMetrics + * @instance + * @returns {Object.} JSON object + */ + ClusterMetrics.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClusterMetrics + * @function getTypeUrl + * @memberof google.cloud.dataproc.v1.ClusterMetrics + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClusterMetrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataproc.v1.ClusterMetrics"; + }; + + return ClusterMetrics; + })(); + v1.DataprocMetricConfig = (function() { /** @@ -19019,6 +20175,7 @@ * @property {number} YARN=4 YARN value * @property {number} SPARK_HISTORY_SERVER=5 SPARK_HISTORY_SERVER value * @property {number} HIVESERVER2=6 HIVESERVER2 value + * @property {number} HIVEMETASTORE=7 HIVEMETASTORE value */ DataprocMetricConfig.MetricSource = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -19029,6 +20186,7 @@ values[valuesById[4] = "YARN"] = 4; values[valuesById[5] = "SPARK_HISTORY_SERVER"] = 5; values[valuesById[6] = "HIVESERVER2"] = 6; + values[valuesById[7] = "HIVEMETASTORE"] = 7; return values; })(); @@ -19193,6 +20351,7 @@ case 4: case 5: case 6: + case 7: break; } if (message.metricOverrides != null && message.hasOwnProperty("metricOverrides")) { @@ -19252,6 +20411,10 @@ case 6: message.metricSource = 6; break; + case "HIVEMETASTORE": + case 7: + message.metricSource = 7; + break; } if (object.metricOverrides) { if (!Array.isArray(object.metricOverrides)) @@ -19322,322 +20485,6 @@ return DataprocMetricConfig; })(); - v1.ClusterMetrics = (function() { - - /** - * Properties of a ClusterMetrics. - * @memberof google.cloud.dataproc.v1 - * @interface IClusterMetrics - * @property {Object.|null} [hdfsMetrics] ClusterMetrics hdfsMetrics - * @property {Object.|null} [yarnMetrics] ClusterMetrics yarnMetrics - */ - - /** - * Constructs a new ClusterMetrics. - * @memberof google.cloud.dataproc.v1 - * @classdesc Represents a ClusterMetrics. - * @implements IClusterMetrics - * @constructor - * @param {google.cloud.dataproc.v1.IClusterMetrics=} [properties] Properties to set - */ - function ClusterMetrics(properties) { - this.hdfsMetrics = {}; - this.yarnMetrics = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClusterMetrics hdfsMetrics. - * @member {Object.} hdfsMetrics - * @memberof google.cloud.dataproc.v1.ClusterMetrics - * @instance - */ - ClusterMetrics.prototype.hdfsMetrics = $util.emptyObject; - - /** - * ClusterMetrics yarnMetrics. - * @member {Object.} yarnMetrics - * @memberof google.cloud.dataproc.v1.ClusterMetrics - * @instance - */ - ClusterMetrics.prototype.yarnMetrics = $util.emptyObject; - - /** - * Creates a new ClusterMetrics instance using the specified properties. - * @function create - * @memberof google.cloud.dataproc.v1.ClusterMetrics - * @static - * @param {google.cloud.dataproc.v1.IClusterMetrics=} [properties] Properties to set - * @returns {google.cloud.dataproc.v1.ClusterMetrics} ClusterMetrics instance - */ - ClusterMetrics.create = function create(properties) { - return new ClusterMetrics(properties); - }; - - /** - * Encodes the specified ClusterMetrics message. Does not implicitly {@link google.cloud.dataproc.v1.ClusterMetrics.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataproc.v1.ClusterMetrics - * @static - * @param {google.cloud.dataproc.v1.IClusterMetrics} message ClusterMetrics message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClusterMetrics.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hdfsMetrics != null && Object.hasOwnProperty.call(message, "hdfsMetrics")) - for (var keys = Object.keys(message.hdfsMetrics), i = 0; i < keys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).int64(message.hdfsMetrics[keys[i]]).ldelim(); - if (message.yarnMetrics != null && Object.hasOwnProperty.call(message, "yarnMetrics")) - for (var keys = Object.keys(message.yarnMetrics), 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 0 =*/16).int64(message.yarnMetrics[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified ClusterMetrics message, length delimited. Does not implicitly {@link google.cloud.dataproc.v1.ClusterMetrics.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataproc.v1.ClusterMetrics - * @static - * @param {google.cloud.dataproc.v1.IClusterMetrics} message ClusterMetrics message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClusterMetrics.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClusterMetrics message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataproc.v1.ClusterMetrics - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataproc.v1.ClusterMetrics} ClusterMetrics - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClusterMetrics.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataproc.v1.ClusterMetrics(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (message.hdfsMetrics === $util.emptyObject) - message.hdfsMetrics = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = 0; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.int64(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.hdfsMetrics[key] = value; - break; - } - case 2: { - if (message.yarnMetrics === $util.emptyObject) - message.yarnMetrics = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = 0; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.int64(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.yarnMetrics[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClusterMetrics message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataproc.v1.ClusterMetrics - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataproc.v1.ClusterMetrics} ClusterMetrics - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClusterMetrics.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClusterMetrics message. - * @function verify - * @memberof google.cloud.dataproc.v1.ClusterMetrics - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClusterMetrics.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hdfsMetrics != null && message.hasOwnProperty("hdfsMetrics")) { - if (!$util.isObject(message.hdfsMetrics)) - return "hdfsMetrics: object expected"; - var key = Object.keys(message.hdfsMetrics); - for (var i = 0; i < key.length; ++i) - if (!$util.isInteger(message.hdfsMetrics[key[i]]) && !(message.hdfsMetrics[key[i]] && $util.isInteger(message.hdfsMetrics[key[i]].low) && $util.isInteger(message.hdfsMetrics[key[i]].high))) - return "hdfsMetrics: integer|Long{k:string} expected"; - } - if (message.yarnMetrics != null && message.hasOwnProperty("yarnMetrics")) { - if (!$util.isObject(message.yarnMetrics)) - return "yarnMetrics: object expected"; - var key = Object.keys(message.yarnMetrics); - for (var i = 0; i < key.length; ++i) - if (!$util.isInteger(message.yarnMetrics[key[i]]) && !(message.yarnMetrics[key[i]] && $util.isInteger(message.yarnMetrics[key[i]].low) && $util.isInteger(message.yarnMetrics[key[i]].high))) - return "yarnMetrics: integer|Long{k:string} expected"; - } - return null; - }; - - /** - * Creates a ClusterMetrics message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataproc.v1.ClusterMetrics - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataproc.v1.ClusterMetrics} ClusterMetrics - */ - ClusterMetrics.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataproc.v1.ClusterMetrics) - return object; - var message = new $root.google.cloud.dataproc.v1.ClusterMetrics(); - if (object.hdfsMetrics) { - if (typeof object.hdfsMetrics !== "object") - throw TypeError(".google.cloud.dataproc.v1.ClusterMetrics.hdfsMetrics: object expected"); - message.hdfsMetrics = {}; - for (var keys = Object.keys(object.hdfsMetrics), i = 0; i < keys.length; ++i) - if ($util.Long) - (message.hdfsMetrics[keys[i]] = $util.Long.fromValue(object.hdfsMetrics[keys[i]])).unsigned = false; - else if (typeof object.hdfsMetrics[keys[i]] === "string") - message.hdfsMetrics[keys[i]] = parseInt(object.hdfsMetrics[keys[i]], 10); - else if (typeof object.hdfsMetrics[keys[i]] === "number") - message.hdfsMetrics[keys[i]] = object.hdfsMetrics[keys[i]]; - else if (typeof object.hdfsMetrics[keys[i]] === "object") - message.hdfsMetrics[keys[i]] = new $util.LongBits(object.hdfsMetrics[keys[i]].low >>> 0, object.hdfsMetrics[keys[i]].high >>> 0).toNumber(); - } - if (object.yarnMetrics) { - if (typeof object.yarnMetrics !== "object") - throw TypeError(".google.cloud.dataproc.v1.ClusterMetrics.yarnMetrics: object expected"); - message.yarnMetrics = {}; - for (var keys = Object.keys(object.yarnMetrics), i = 0; i < keys.length; ++i) - if ($util.Long) - (message.yarnMetrics[keys[i]] = $util.Long.fromValue(object.yarnMetrics[keys[i]])).unsigned = false; - else if (typeof object.yarnMetrics[keys[i]] === "string") - message.yarnMetrics[keys[i]] = parseInt(object.yarnMetrics[keys[i]], 10); - else if (typeof object.yarnMetrics[keys[i]] === "number") - message.yarnMetrics[keys[i]] = object.yarnMetrics[keys[i]]; - else if (typeof object.yarnMetrics[keys[i]] === "object") - message.yarnMetrics[keys[i]] = new $util.LongBits(object.yarnMetrics[keys[i]].low >>> 0, object.yarnMetrics[keys[i]].high >>> 0).toNumber(); - } - return message; - }; - - /** - * Creates a plain object from a ClusterMetrics message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataproc.v1.ClusterMetrics - * @static - * @param {google.cloud.dataproc.v1.ClusterMetrics} message ClusterMetrics - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClusterMetrics.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) { - object.hdfsMetrics = {}; - object.yarnMetrics = {}; - } - var keys2; - if (message.hdfsMetrics && (keys2 = Object.keys(message.hdfsMetrics)).length) { - object.hdfsMetrics = {}; - for (var j = 0; j < keys2.length; ++j) - if (typeof message.hdfsMetrics[keys2[j]] === "number") - object.hdfsMetrics[keys2[j]] = options.longs === String ? String(message.hdfsMetrics[keys2[j]]) : message.hdfsMetrics[keys2[j]]; - else - object.hdfsMetrics[keys2[j]] = options.longs === String ? $util.Long.prototype.toString.call(message.hdfsMetrics[keys2[j]]) : options.longs === Number ? new $util.LongBits(message.hdfsMetrics[keys2[j]].low >>> 0, message.hdfsMetrics[keys2[j]].high >>> 0).toNumber() : message.hdfsMetrics[keys2[j]]; - } - if (message.yarnMetrics && (keys2 = Object.keys(message.yarnMetrics)).length) { - object.yarnMetrics = {}; - for (var j = 0; j < keys2.length; ++j) - if (typeof message.yarnMetrics[keys2[j]] === "number") - object.yarnMetrics[keys2[j]] = options.longs === String ? String(message.yarnMetrics[keys2[j]]) : message.yarnMetrics[keys2[j]]; - else - object.yarnMetrics[keys2[j]] = options.longs === String ? $util.Long.prototype.toString.call(message.yarnMetrics[keys2[j]]) : options.longs === Number ? new $util.LongBits(message.yarnMetrics[keys2[j]].low >>> 0, message.yarnMetrics[keys2[j]].high >>> 0).toNumber() : message.yarnMetrics[keys2[j]]; - } - return object; - }; - - /** - * Converts this ClusterMetrics to JSON. - * @function toJSON - * @memberof google.cloud.dataproc.v1.ClusterMetrics - * @instance - * @returns {Object.} JSON object - */ - ClusterMetrics.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ClusterMetrics - * @function getTypeUrl - * @memberof google.cloud.dataproc.v1.ClusterMetrics - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ClusterMetrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataproc.v1.ClusterMetrics"; - }; - - return ClusterMetrics; - })(); - v1.CreateClusterRequest = (function() { /** @@ -26600,7 +27447,438 @@ message.properties[key] = value; break; } - case 6: { + case 6: { + message.loggingConfig = $root.google.cloud.dataproc.v1.LoggingConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SparkRJob message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataproc.v1.SparkRJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataproc.v1.SparkRJob} SparkRJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SparkRJob.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SparkRJob message. + * @function verify + * @memberof google.cloud.dataproc.v1.SparkRJob + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SparkRJob.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mainRFileUri != null && message.hasOwnProperty("mainRFileUri")) + if (!$util.isString(message.mainRFileUri)) + return "mainRFileUri: string expected"; + if (message.args != null && message.hasOwnProperty("args")) { + if (!Array.isArray(message.args)) + return "args: array expected"; + for (var i = 0; i < message.args.length; ++i) + if (!$util.isString(message.args[i])) + return "args: string[] expected"; + } + if (message.fileUris != null && message.hasOwnProperty("fileUris")) { + if (!Array.isArray(message.fileUris)) + return "fileUris: array expected"; + for (var i = 0; i < message.fileUris.length; ++i) + if (!$util.isString(message.fileUris[i])) + return "fileUris: string[] expected"; + } + if (message.archiveUris != null && message.hasOwnProperty("archiveUris")) { + if (!Array.isArray(message.archiveUris)) + return "archiveUris: array expected"; + for (var i = 0; i < message.archiveUris.length; ++i) + if (!$util.isString(message.archiveUris[i])) + return "archiveUris: string[] expected"; + } + if (message.properties != null && message.hasOwnProperty("properties")) { + if (!$util.isObject(message.properties)) + return "properties: object expected"; + var key = Object.keys(message.properties); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.properties[key[i]])) + return "properties: string{k:string} expected"; + } + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) { + var error = $root.google.cloud.dataproc.v1.LoggingConfig.verify(message.loggingConfig); + if (error) + return "loggingConfig." + error; + } + return null; + }; + + /** + * Creates a SparkRJob message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataproc.v1.SparkRJob + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataproc.v1.SparkRJob} SparkRJob + */ + SparkRJob.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataproc.v1.SparkRJob) + return object; + var message = new $root.google.cloud.dataproc.v1.SparkRJob(); + if (object.mainRFileUri != null) + message.mainRFileUri = String(object.mainRFileUri); + if (object.args) { + if (!Array.isArray(object.args)) + throw TypeError(".google.cloud.dataproc.v1.SparkRJob.args: array expected"); + message.args = []; + for (var i = 0; i < object.args.length; ++i) + message.args[i] = String(object.args[i]); + } + if (object.fileUris) { + if (!Array.isArray(object.fileUris)) + throw TypeError(".google.cloud.dataproc.v1.SparkRJob.fileUris: array expected"); + message.fileUris = []; + for (var i = 0; i < object.fileUris.length; ++i) + message.fileUris[i] = String(object.fileUris[i]); + } + if (object.archiveUris) { + if (!Array.isArray(object.archiveUris)) + throw TypeError(".google.cloud.dataproc.v1.SparkRJob.archiveUris: array expected"); + message.archiveUris = []; + for (var i = 0; i < object.archiveUris.length; ++i) + message.archiveUris[i] = String(object.archiveUris[i]); + } + if (object.properties) { + if (typeof object.properties !== "object") + throw TypeError(".google.cloud.dataproc.v1.SparkRJob.properties: object expected"); + message.properties = {}; + for (var keys = Object.keys(object.properties), i = 0; i < keys.length; ++i) + message.properties[keys[i]] = String(object.properties[keys[i]]); + } + if (object.loggingConfig != null) { + if (typeof object.loggingConfig !== "object") + throw TypeError(".google.cloud.dataproc.v1.SparkRJob.loggingConfig: object expected"); + message.loggingConfig = $root.google.cloud.dataproc.v1.LoggingConfig.fromObject(object.loggingConfig); + } + return message; + }; + + /** + * Creates a plain object from a SparkRJob message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataproc.v1.SparkRJob + * @static + * @param {google.cloud.dataproc.v1.SparkRJob} message SparkRJob + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SparkRJob.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.args = []; + object.fileUris = []; + object.archiveUris = []; + } + if (options.objects || options.defaults) + object.properties = {}; + if (options.defaults) { + object.mainRFileUri = ""; + object.loggingConfig = null; + } + if (message.mainRFileUri != null && message.hasOwnProperty("mainRFileUri")) + object.mainRFileUri = message.mainRFileUri; + if (message.args && message.args.length) { + object.args = []; + for (var j = 0; j < message.args.length; ++j) + object.args[j] = message.args[j]; + } + if (message.fileUris && message.fileUris.length) { + object.fileUris = []; + for (var j = 0; j < message.fileUris.length; ++j) + object.fileUris[j] = message.fileUris[j]; + } + if (message.archiveUris && message.archiveUris.length) { + object.archiveUris = []; + for (var j = 0; j < message.archiveUris.length; ++j) + object.archiveUris[j] = message.archiveUris[j]; + } + var keys2; + if (message.properties && (keys2 = Object.keys(message.properties)).length) { + object.properties = {}; + for (var j = 0; j < keys2.length; ++j) + object.properties[keys2[j]] = message.properties[keys2[j]]; + } + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) + object.loggingConfig = $root.google.cloud.dataproc.v1.LoggingConfig.toObject(message.loggingConfig, options); + return object; + }; + + /** + * Converts this SparkRJob to JSON. + * @function toJSON + * @memberof google.cloud.dataproc.v1.SparkRJob + * @instance + * @returns {Object.} JSON object + */ + SparkRJob.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SparkRJob + * @function getTypeUrl + * @memberof google.cloud.dataproc.v1.SparkRJob + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SparkRJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataproc.v1.SparkRJob"; + }; + + return SparkRJob; + })(); + + v1.PrestoJob = (function() { + + /** + * Properties of a PrestoJob. + * @memberof google.cloud.dataproc.v1 + * @interface IPrestoJob + * @property {string|null} [queryFileUri] PrestoJob queryFileUri + * @property {google.cloud.dataproc.v1.IQueryList|null} [queryList] PrestoJob queryList + * @property {boolean|null} [continueOnFailure] PrestoJob continueOnFailure + * @property {string|null} [outputFormat] PrestoJob outputFormat + * @property {Array.|null} [clientTags] PrestoJob clientTags + * @property {Object.|null} [properties] PrestoJob properties + * @property {google.cloud.dataproc.v1.ILoggingConfig|null} [loggingConfig] PrestoJob loggingConfig + */ + + /** + * Constructs a new PrestoJob. + * @memberof google.cloud.dataproc.v1 + * @classdesc Represents a PrestoJob. + * @implements IPrestoJob + * @constructor + * @param {google.cloud.dataproc.v1.IPrestoJob=} [properties] Properties to set + */ + function PrestoJob(properties) { + this.clientTags = []; + this.properties = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PrestoJob queryFileUri. + * @member {string|null|undefined} queryFileUri + * @memberof google.cloud.dataproc.v1.PrestoJob + * @instance + */ + PrestoJob.prototype.queryFileUri = null; + + /** + * PrestoJob queryList. + * @member {google.cloud.dataproc.v1.IQueryList|null|undefined} queryList + * @memberof google.cloud.dataproc.v1.PrestoJob + * @instance + */ + PrestoJob.prototype.queryList = null; + + /** + * PrestoJob continueOnFailure. + * @member {boolean} continueOnFailure + * @memberof google.cloud.dataproc.v1.PrestoJob + * @instance + */ + PrestoJob.prototype.continueOnFailure = false; + + /** + * PrestoJob outputFormat. + * @member {string} outputFormat + * @memberof google.cloud.dataproc.v1.PrestoJob + * @instance + */ + PrestoJob.prototype.outputFormat = ""; + + /** + * PrestoJob clientTags. + * @member {Array.} clientTags + * @memberof google.cloud.dataproc.v1.PrestoJob + * @instance + */ + PrestoJob.prototype.clientTags = $util.emptyArray; + + /** + * PrestoJob properties. + * @member {Object.} properties + * @memberof google.cloud.dataproc.v1.PrestoJob + * @instance + */ + PrestoJob.prototype.properties = $util.emptyObject; + + /** + * PrestoJob loggingConfig. + * @member {google.cloud.dataproc.v1.ILoggingConfig|null|undefined} loggingConfig + * @memberof google.cloud.dataproc.v1.PrestoJob + * @instance + */ + PrestoJob.prototype.loggingConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PrestoJob queries. + * @member {"queryFileUri"|"queryList"|undefined} queries + * @memberof google.cloud.dataproc.v1.PrestoJob + * @instance + */ + Object.defineProperty(PrestoJob.prototype, "queries", { + get: $util.oneOfGetter($oneOfFields = ["queryFileUri", "queryList"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PrestoJob instance using the specified properties. + * @function create + * @memberof google.cloud.dataproc.v1.PrestoJob + * @static + * @param {google.cloud.dataproc.v1.IPrestoJob=} [properties] Properties to set + * @returns {google.cloud.dataproc.v1.PrestoJob} PrestoJob instance + */ + PrestoJob.create = function create(properties) { + return new PrestoJob(properties); + }; + + /** + * Encodes the specified PrestoJob message. Does not implicitly {@link google.cloud.dataproc.v1.PrestoJob.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataproc.v1.PrestoJob + * @static + * @param {google.cloud.dataproc.v1.IPrestoJob} message PrestoJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrestoJob.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.queryFileUri != null && Object.hasOwnProperty.call(message, "queryFileUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.queryFileUri); + if (message.queryList != null && Object.hasOwnProperty.call(message, "queryList")) + $root.google.cloud.dataproc.v1.QueryList.encode(message.queryList, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.continueOnFailure != null && Object.hasOwnProperty.call(message, "continueOnFailure")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.continueOnFailure); + if (message.outputFormat != null && Object.hasOwnProperty.call(message, "outputFormat")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.outputFormat); + if (message.clientTags != null && message.clientTags.length) + for (var i = 0; i < message.clientTags.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.clientTags[i]); + if (message.properties != null && Object.hasOwnProperty.call(message, "properties")) + for (var keys = Object.keys(message.properties), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.properties[keys[i]]).ldelim(); + if (message.loggingConfig != null && Object.hasOwnProperty.call(message, "loggingConfig")) + $root.google.cloud.dataproc.v1.LoggingConfig.encode(message.loggingConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PrestoJob message, length delimited. Does not implicitly {@link google.cloud.dataproc.v1.PrestoJob.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataproc.v1.PrestoJob + * @static + * @param {google.cloud.dataproc.v1.IPrestoJob} message PrestoJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrestoJob.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrestoJob message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataproc.v1.PrestoJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataproc.v1.PrestoJob} PrestoJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrestoJob.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataproc.v1.PrestoJob(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.queryFileUri = reader.string(); + break; + } + case 2: { + message.queryList = $root.google.cloud.dataproc.v1.QueryList.decode(reader, reader.uint32()); + break; + } + case 3: { + message.continueOnFailure = reader.bool(); + break; + } + case 4: { + message.outputFormat = reader.string(); + break; + } + case 5: { + if (!(message.clientTags && message.clientTags.length)) + message.clientTags = []; + message.clientTags.push(reader.string()); + break; + } + case 6: { + if (message.properties === $util.emptyObject) + message.properties = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.properties[key] = value; + break; + } + case 7: { message.loggingConfig = $root.google.cloud.dataproc.v1.LoggingConfig.decode(reader, reader.uint32()); break; } @@ -26613,55 +27891,60 @@ }; /** - * Decodes a SparkRJob message from the specified reader or buffer, length delimited. + * Decodes a PrestoJob message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataproc.v1.SparkRJob + * @memberof google.cloud.dataproc.v1.PrestoJob * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataproc.v1.SparkRJob} SparkRJob + * @returns {google.cloud.dataproc.v1.PrestoJob} PrestoJob * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SparkRJob.decodeDelimited = function decodeDelimited(reader) { + PrestoJob.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SparkRJob message. + * Verifies a PrestoJob message. * @function verify - * @memberof google.cloud.dataproc.v1.SparkRJob + * @memberof google.cloud.dataproc.v1.PrestoJob * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SparkRJob.verify = function verify(message) { + PrestoJob.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.mainRFileUri != null && message.hasOwnProperty("mainRFileUri")) - if (!$util.isString(message.mainRFileUri)) - return "mainRFileUri: string expected"; - if (message.args != null && message.hasOwnProperty("args")) { - if (!Array.isArray(message.args)) - return "args: array expected"; - for (var i = 0; i < message.args.length; ++i) - if (!$util.isString(message.args[i])) - return "args: string[] expected"; + var properties = {}; + if (message.queryFileUri != null && message.hasOwnProperty("queryFileUri")) { + properties.queries = 1; + if (!$util.isString(message.queryFileUri)) + return "queryFileUri: string expected"; } - if (message.fileUris != null && message.hasOwnProperty("fileUris")) { - if (!Array.isArray(message.fileUris)) - return "fileUris: array expected"; - for (var i = 0; i < message.fileUris.length; ++i) - if (!$util.isString(message.fileUris[i])) - return "fileUris: string[] expected"; + if (message.queryList != null && message.hasOwnProperty("queryList")) { + if (properties.queries === 1) + return "queries: multiple values"; + properties.queries = 1; + { + var error = $root.google.cloud.dataproc.v1.QueryList.verify(message.queryList); + if (error) + return "queryList." + error; + } } - if (message.archiveUris != null && message.hasOwnProperty("archiveUris")) { - if (!Array.isArray(message.archiveUris)) - return "archiveUris: array expected"; - for (var i = 0; i < message.archiveUris.length; ++i) - if (!$util.isString(message.archiveUris[i])) - return "archiveUris: string[] expected"; + if (message.continueOnFailure != null && message.hasOwnProperty("continueOnFailure")) + if (typeof message.continueOnFailure !== "boolean") + return "continueOnFailure: boolean expected"; + if (message.outputFormat != null && message.hasOwnProperty("outputFormat")) + if (!$util.isString(message.outputFormat)) + return "outputFormat: string expected"; + if (message.clientTags != null && message.hasOwnProperty("clientTags")) { + if (!Array.isArray(message.clientTags)) + return "clientTags: array expected"; + for (var i = 0; i < message.clientTags.length; ++i) + if (!$util.isString(message.clientTags[i])) + return "clientTags: string[] expected"; } if (message.properties != null && message.hasOwnProperty("properties")) { if (!$util.isObject(message.properties)) @@ -26680,95 +27963,90 @@ }; /** - * Creates a SparkRJob message from a plain object. Also converts values to their respective internal types. + * Creates a PrestoJob message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataproc.v1.SparkRJob + * @memberof google.cloud.dataproc.v1.PrestoJob * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataproc.v1.SparkRJob} SparkRJob + * @returns {google.cloud.dataproc.v1.PrestoJob} PrestoJob */ - SparkRJob.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataproc.v1.SparkRJob) + PrestoJob.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataproc.v1.PrestoJob) return object; - var message = new $root.google.cloud.dataproc.v1.SparkRJob(); - if (object.mainRFileUri != null) - message.mainRFileUri = String(object.mainRFileUri); - if (object.args) { - if (!Array.isArray(object.args)) - throw TypeError(".google.cloud.dataproc.v1.SparkRJob.args: array expected"); - message.args = []; - for (var i = 0; i < object.args.length; ++i) - message.args[i] = String(object.args[i]); - } - if (object.fileUris) { - if (!Array.isArray(object.fileUris)) - throw TypeError(".google.cloud.dataproc.v1.SparkRJob.fileUris: array expected"); - message.fileUris = []; - for (var i = 0; i < object.fileUris.length; ++i) - message.fileUris[i] = String(object.fileUris[i]); + var message = new $root.google.cloud.dataproc.v1.PrestoJob(); + if (object.queryFileUri != null) + message.queryFileUri = String(object.queryFileUri); + if (object.queryList != null) { + if (typeof object.queryList !== "object") + throw TypeError(".google.cloud.dataproc.v1.PrestoJob.queryList: object expected"); + message.queryList = $root.google.cloud.dataproc.v1.QueryList.fromObject(object.queryList); } - if (object.archiveUris) { - if (!Array.isArray(object.archiveUris)) - throw TypeError(".google.cloud.dataproc.v1.SparkRJob.archiveUris: array expected"); - message.archiveUris = []; - for (var i = 0; i < object.archiveUris.length; ++i) - message.archiveUris[i] = String(object.archiveUris[i]); + if (object.continueOnFailure != null) + message.continueOnFailure = Boolean(object.continueOnFailure); + if (object.outputFormat != null) + message.outputFormat = String(object.outputFormat); + if (object.clientTags) { + if (!Array.isArray(object.clientTags)) + throw TypeError(".google.cloud.dataproc.v1.PrestoJob.clientTags: array expected"); + message.clientTags = []; + for (var i = 0; i < object.clientTags.length; ++i) + message.clientTags[i] = String(object.clientTags[i]); } if (object.properties) { if (typeof object.properties !== "object") - throw TypeError(".google.cloud.dataproc.v1.SparkRJob.properties: object expected"); + throw TypeError(".google.cloud.dataproc.v1.PrestoJob.properties: object expected"); message.properties = {}; for (var keys = Object.keys(object.properties), i = 0; i < keys.length; ++i) message.properties[keys[i]] = String(object.properties[keys[i]]); } if (object.loggingConfig != null) { if (typeof object.loggingConfig !== "object") - throw TypeError(".google.cloud.dataproc.v1.SparkRJob.loggingConfig: object expected"); + throw TypeError(".google.cloud.dataproc.v1.PrestoJob.loggingConfig: object expected"); message.loggingConfig = $root.google.cloud.dataproc.v1.LoggingConfig.fromObject(object.loggingConfig); } return message; }; /** - * Creates a plain object from a SparkRJob message. Also converts values to other types if specified. + * Creates a plain object from a PrestoJob message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataproc.v1.SparkRJob + * @memberof google.cloud.dataproc.v1.PrestoJob * @static - * @param {google.cloud.dataproc.v1.SparkRJob} message SparkRJob + * @param {google.cloud.dataproc.v1.PrestoJob} message PrestoJob * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SparkRJob.toObject = function toObject(message, options) { + PrestoJob.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.args = []; - object.fileUris = []; - object.archiveUris = []; - } + if (options.arrays || options.defaults) + object.clientTags = []; if (options.objects || options.defaults) object.properties = {}; if (options.defaults) { - object.mainRFileUri = ""; + object.continueOnFailure = false; + object.outputFormat = ""; object.loggingConfig = null; } - if (message.mainRFileUri != null && message.hasOwnProperty("mainRFileUri")) - object.mainRFileUri = message.mainRFileUri; - if (message.args && message.args.length) { - object.args = []; - for (var j = 0; j < message.args.length; ++j) - object.args[j] = message.args[j]; + if (message.queryFileUri != null && message.hasOwnProperty("queryFileUri")) { + object.queryFileUri = message.queryFileUri; + if (options.oneofs) + object.queries = "queryFileUri"; } - if (message.fileUris && message.fileUris.length) { - object.fileUris = []; - for (var j = 0; j < message.fileUris.length; ++j) - object.fileUris[j] = message.fileUris[j]; + if (message.queryList != null && message.hasOwnProperty("queryList")) { + object.queryList = $root.google.cloud.dataproc.v1.QueryList.toObject(message.queryList, options); + if (options.oneofs) + object.queries = "queryList"; } - if (message.archiveUris && message.archiveUris.length) { - object.archiveUris = []; - for (var j = 0; j < message.archiveUris.length; ++j) - object.archiveUris[j] = message.archiveUris[j]; + if (message.continueOnFailure != null && message.hasOwnProperty("continueOnFailure")) + object.continueOnFailure = message.continueOnFailure; + if (message.outputFormat != null && message.hasOwnProperty("outputFormat")) + object.outputFormat = message.outputFormat; + if (message.clientTags && message.clientTags.length) { + object.clientTags = []; + for (var j = 0; j < message.clientTags.length; ++j) + object.clientTags[j] = message.clientTags[j]; } var keys2; if (message.properties && (keys2 = Object.keys(message.properties)).length) { @@ -26782,58 +28060,58 @@ }; /** - * Converts this SparkRJob to JSON. + * Converts this PrestoJob to JSON. * @function toJSON - * @memberof google.cloud.dataproc.v1.SparkRJob + * @memberof google.cloud.dataproc.v1.PrestoJob * @instance * @returns {Object.} JSON object */ - SparkRJob.prototype.toJSON = function toJSON() { + PrestoJob.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SparkRJob + * Gets the default type url for PrestoJob * @function getTypeUrl - * @memberof google.cloud.dataproc.v1.SparkRJob + * @memberof google.cloud.dataproc.v1.PrestoJob * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SparkRJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PrestoJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataproc.v1.SparkRJob"; + return typeUrlPrefix + "/google.cloud.dataproc.v1.PrestoJob"; }; - return SparkRJob; + return PrestoJob; })(); - v1.PrestoJob = (function() { + v1.TrinoJob = (function() { /** - * Properties of a PrestoJob. + * Properties of a TrinoJob. * @memberof google.cloud.dataproc.v1 - * @interface IPrestoJob - * @property {string|null} [queryFileUri] PrestoJob queryFileUri - * @property {google.cloud.dataproc.v1.IQueryList|null} [queryList] PrestoJob queryList - * @property {boolean|null} [continueOnFailure] PrestoJob continueOnFailure - * @property {string|null} [outputFormat] PrestoJob outputFormat - * @property {Array.|null} [clientTags] PrestoJob clientTags - * @property {Object.|null} [properties] PrestoJob properties - * @property {google.cloud.dataproc.v1.ILoggingConfig|null} [loggingConfig] PrestoJob loggingConfig + * @interface ITrinoJob + * @property {string|null} [queryFileUri] TrinoJob queryFileUri + * @property {google.cloud.dataproc.v1.IQueryList|null} [queryList] TrinoJob queryList + * @property {boolean|null} [continueOnFailure] TrinoJob continueOnFailure + * @property {string|null} [outputFormat] TrinoJob outputFormat + * @property {Array.|null} [clientTags] TrinoJob clientTags + * @property {Object.|null} [properties] TrinoJob properties + * @property {google.cloud.dataproc.v1.ILoggingConfig|null} [loggingConfig] TrinoJob loggingConfig */ /** - * Constructs a new PrestoJob. + * Constructs a new TrinoJob. * @memberof google.cloud.dataproc.v1 - * @classdesc Represents a PrestoJob. - * @implements IPrestoJob + * @classdesc Represents a TrinoJob. + * @implements ITrinoJob * @constructor - * @param {google.cloud.dataproc.v1.IPrestoJob=} [properties] Properties to set + * @param {google.cloud.dataproc.v1.ITrinoJob=} [properties] Properties to set */ - function PrestoJob(properties) { + function TrinoJob(properties) { this.clientTags = []; this.properties = {}; if (properties) @@ -26843,97 +28121,97 @@ } /** - * PrestoJob queryFileUri. + * TrinoJob queryFileUri. * @member {string|null|undefined} queryFileUri - * @memberof google.cloud.dataproc.v1.PrestoJob + * @memberof google.cloud.dataproc.v1.TrinoJob * @instance */ - PrestoJob.prototype.queryFileUri = null; + TrinoJob.prototype.queryFileUri = null; /** - * PrestoJob queryList. + * TrinoJob queryList. * @member {google.cloud.dataproc.v1.IQueryList|null|undefined} queryList - * @memberof google.cloud.dataproc.v1.PrestoJob + * @memberof google.cloud.dataproc.v1.TrinoJob * @instance */ - PrestoJob.prototype.queryList = null; + TrinoJob.prototype.queryList = null; /** - * PrestoJob continueOnFailure. + * TrinoJob continueOnFailure. * @member {boolean} continueOnFailure - * @memberof google.cloud.dataproc.v1.PrestoJob + * @memberof google.cloud.dataproc.v1.TrinoJob * @instance */ - PrestoJob.prototype.continueOnFailure = false; + TrinoJob.prototype.continueOnFailure = false; /** - * PrestoJob outputFormat. + * TrinoJob outputFormat. * @member {string} outputFormat - * @memberof google.cloud.dataproc.v1.PrestoJob + * @memberof google.cloud.dataproc.v1.TrinoJob * @instance */ - PrestoJob.prototype.outputFormat = ""; + TrinoJob.prototype.outputFormat = ""; /** - * PrestoJob clientTags. + * TrinoJob clientTags. * @member {Array.} clientTags - * @memberof google.cloud.dataproc.v1.PrestoJob + * @memberof google.cloud.dataproc.v1.TrinoJob * @instance */ - PrestoJob.prototype.clientTags = $util.emptyArray; + TrinoJob.prototype.clientTags = $util.emptyArray; /** - * PrestoJob properties. + * TrinoJob properties. * @member {Object.} properties - * @memberof google.cloud.dataproc.v1.PrestoJob + * @memberof google.cloud.dataproc.v1.TrinoJob * @instance */ - PrestoJob.prototype.properties = $util.emptyObject; + TrinoJob.prototype.properties = $util.emptyObject; /** - * PrestoJob loggingConfig. + * TrinoJob loggingConfig. * @member {google.cloud.dataproc.v1.ILoggingConfig|null|undefined} loggingConfig - * @memberof google.cloud.dataproc.v1.PrestoJob + * @memberof google.cloud.dataproc.v1.TrinoJob * @instance */ - PrestoJob.prototype.loggingConfig = null; + TrinoJob.prototype.loggingConfig = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * PrestoJob queries. + * TrinoJob queries. * @member {"queryFileUri"|"queryList"|undefined} queries - * @memberof google.cloud.dataproc.v1.PrestoJob + * @memberof google.cloud.dataproc.v1.TrinoJob * @instance */ - Object.defineProperty(PrestoJob.prototype, "queries", { + Object.defineProperty(TrinoJob.prototype, "queries", { get: $util.oneOfGetter($oneOfFields = ["queryFileUri", "queryList"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new PrestoJob instance using the specified properties. + * Creates a new TrinoJob instance using the specified properties. * @function create - * @memberof google.cloud.dataproc.v1.PrestoJob + * @memberof google.cloud.dataproc.v1.TrinoJob * @static - * @param {google.cloud.dataproc.v1.IPrestoJob=} [properties] Properties to set - * @returns {google.cloud.dataproc.v1.PrestoJob} PrestoJob instance + * @param {google.cloud.dataproc.v1.ITrinoJob=} [properties] Properties to set + * @returns {google.cloud.dataproc.v1.TrinoJob} TrinoJob instance */ - PrestoJob.create = function create(properties) { - return new PrestoJob(properties); + TrinoJob.create = function create(properties) { + return new TrinoJob(properties); }; /** - * Encodes the specified PrestoJob message. Does not implicitly {@link google.cloud.dataproc.v1.PrestoJob.verify|verify} messages. + * Encodes the specified TrinoJob message. Does not implicitly {@link google.cloud.dataproc.v1.TrinoJob.verify|verify} messages. * @function encode - * @memberof google.cloud.dataproc.v1.PrestoJob + * @memberof google.cloud.dataproc.v1.TrinoJob * @static - * @param {google.cloud.dataproc.v1.IPrestoJob} message PrestoJob message or plain object to encode + * @param {google.cloud.dataproc.v1.ITrinoJob} message TrinoJob message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PrestoJob.encode = function encode(message, writer) { + TrinoJob.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.queryFileUri != null && Object.hasOwnProperty.call(message, "queryFileUri")) @@ -26956,33 +28234,33 @@ }; /** - * Encodes the specified PrestoJob message, length delimited. Does not implicitly {@link google.cloud.dataproc.v1.PrestoJob.verify|verify} messages. + * Encodes the specified TrinoJob message, length delimited. Does not implicitly {@link google.cloud.dataproc.v1.TrinoJob.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataproc.v1.PrestoJob + * @memberof google.cloud.dataproc.v1.TrinoJob * @static - * @param {google.cloud.dataproc.v1.IPrestoJob} message PrestoJob message or plain object to encode + * @param {google.cloud.dataproc.v1.ITrinoJob} message TrinoJob message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PrestoJob.encodeDelimited = function encodeDelimited(message, writer) { + TrinoJob.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PrestoJob message from the specified reader or buffer. + * Decodes a TrinoJob message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataproc.v1.PrestoJob + * @memberof google.cloud.dataproc.v1.TrinoJob * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataproc.v1.PrestoJob} PrestoJob + * @returns {google.cloud.dataproc.v1.TrinoJob} TrinoJob * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PrestoJob.decode = function decode(reader, length) { + TrinoJob.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataproc.v1.PrestoJob(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataproc.v1.TrinoJob(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -27044,30 +28322,30 @@ }; /** - * Decodes a PrestoJob message from the specified reader or buffer, length delimited. + * Decodes a TrinoJob message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataproc.v1.PrestoJob + * @memberof google.cloud.dataproc.v1.TrinoJob * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataproc.v1.PrestoJob} PrestoJob + * @returns {google.cloud.dataproc.v1.TrinoJob} TrinoJob * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PrestoJob.decodeDelimited = function decodeDelimited(reader) { + TrinoJob.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PrestoJob message. + * Verifies a TrinoJob message. * @function verify - * @memberof google.cloud.dataproc.v1.PrestoJob + * @memberof google.cloud.dataproc.v1.TrinoJob * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PrestoJob.verify = function verify(message) { + TrinoJob.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; @@ -27116,22 +28394,22 @@ }; /** - * Creates a PrestoJob message from a plain object. Also converts values to their respective internal types. + * Creates a TrinoJob message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataproc.v1.PrestoJob + * @memberof google.cloud.dataproc.v1.TrinoJob * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataproc.v1.PrestoJob} PrestoJob + * @returns {google.cloud.dataproc.v1.TrinoJob} TrinoJob */ - PrestoJob.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataproc.v1.PrestoJob) + TrinoJob.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataproc.v1.TrinoJob) return object; - var message = new $root.google.cloud.dataproc.v1.PrestoJob(); + var message = new $root.google.cloud.dataproc.v1.TrinoJob(); if (object.queryFileUri != null) message.queryFileUri = String(object.queryFileUri); if (object.queryList != null) { if (typeof object.queryList !== "object") - throw TypeError(".google.cloud.dataproc.v1.PrestoJob.queryList: object expected"); + throw TypeError(".google.cloud.dataproc.v1.TrinoJob.queryList: object expected"); message.queryList = $root.google.cloud.dataproc.v1.QueryList.fromObject(object.queryList); } if (object.continueOnFailure != null) @@ -27140,36 +28418,36 @@ message.outputFormat = String(object.outputFormat); if (object.clientTags) { if (!Array.isArray(object.clientTags)) - throw TypeError(".google.cloud.dataproc.v1.PrestoJob.clientTags: array expected"); + throw TypeError(".google.cloud.dataproc.v1.TrinoJob.clientTags: array expected"); message.clientTags = []; for (var i = 0; i < object.clientTags.length; ++i) message.clientTags[i] = String(object.clientTags[i]); } if (object.properties) { if (typeof object.properties !== "object") - throw TypeError(".google.cloud.dataproc.v1.PrestoJob.properties: object expected"); + throw TypeError(".google.cloud.dataproc.v1.TrinoJob.properties: object expected"); message.properties = {}; for (var keys = Object.keys(object.properties), i = 0; i < keys.length; ++i) message.properties[keys[i]] = String(object.properties[keys[i]]); } if (object.loggingConfig != null) { if (typeof object.loggingConfig !== "object") - throw TypeError(".google.cloud.dataproc.v1.PrestoJob.loggingConfig: object expected"); + throw TypeError(".google.cloud.dataproc.v1.TrinoJob.loggingConfig: object expected"); message.loggingConfig = $root.google.cloud.dataproc.v1.LoggingConfig.fromObject(object.loggingConfig); } return message; }; /** - * Creates a plain object from a PrestoJob message. Also converts values to other types if specified. + * Creates a plain object from a TrinoJob message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataproc.v1.PrestoJob + * @memberof google.cloud.dataproc.v1.TrinoJob * @static - * @param {google.cloud.dataproc.v1.PrestoJob} message PrestoJob + * @param {google.cloud.dataproc.v1.TrinoJob} message TrinoJob * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PrestoJob.toObject = function toObject(message, options) { + TrinoJob.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -27213,32 +28491,32 @@ }; /** - * Converts this PrestoJob to JSON. + * Converts this TrinoJob to JSON. * @function toJSON - * @memberof google.cloud.dataproc.v1.PrestoJob + * @memberof google.cloud.dataproc.v1.TrinoJob * @instance * @returns {Object.} JSON object */ - PrestoJob.prototype.toJSON = function toJSON() { + TrinoJob.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PrestoJob + * Gets the default type url for TrinoJob * @function getTypeUrl - * @memberof google.cloud.dataproc.v1.PrestoJob + * @memberof google.cloud.dataproc.v1.TrinoJob * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PrestoJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TrinoJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataproc.v1.PrestoJob"; + return typeUrlPrefix + "/google.cloud.dataproc.v1.TrinoJob"; }; - return PrestoJob; + return TrinoJob; })(); v1.JobPlacement = (function() { @@ -28539,6 +29817,7 @@ * @property {google.cloud.dataproc.v1.ISparkRJob|null} [sparkRJob] Job sparkRJob * @property {google.cloud.dataproc.v1.ISparkSqlJob|null} [sparkSqlJob] Job sparkSqlJob * @property {google.cloud.dataproc.v1.IPrestoJob|null} [prestoJob] Job prestoJob + * @property {google.cloud.dataproc.v1.ITrinoJob|null} [trinoJob] Job trinoJob * @property {google.cloud.dataproc.v1.IJobStatus|null} [status] Job status * @property {Array.|null} [statusHistory] Job statusHistory * @property {Array.|null} [yarnApplications] Job yarnApplications @@ -28649,6 +29928,14 @@ */ Job.prototype.prestoJob = null; + /** + * Job trinoJob. + * @member {google.cloud.dataproc.v1.ITrinoJob|null|undefined} trinoJob + * @memberof google.cloud.dataproc.v1.Job + * @instance + */ + Job.prototype.trinoJob = null; + /** * Job status. * @member {google.cloud.dataproc.v1.IJobStatus|null|undefined} status @@ -28734,12 +30021,12 @@ /** * Job typeJob. - * @member {"hadoopJob"|"sparkJob"|"pysparkJob"|"hiveJob"|"pigJob"|"sparkRJob"|"sparkSqlJob"|"prestoJob"|undefined} typeJob + * @member {"hadoopJob"|"sparkJob"|"pysparkJob"|"hiveJob"|"pigJob"|"sparkRJob"|"sparkSqlJob"|"prestoJob"|"trinoJob"|undefined} typeJob * @memberof google.cloud.dataproc.v1.Job * @instance */ Object.defineProperty(Job.prototype, "typeJob", { - get: $util.oneOfGetter($oneOfFields = ["hadoopJob", "sparkJob", "pysparkJob", "hiveJob", "pigJob", "sparkRJob", "sparkSqlJob", "prestoJob"]), + get: $util.oneOfGetter($oneOfFields = ["hadoopJob", "sparkJob", "pysparkJob", "hiveJob", "pigJob", "sparkRJob", "sparkSqlJob", "prestoJob", "trinoJob"]), set: $util.oneOfSetter($oneOfFields) }); @@ -28810,6 +30097,8 @@ writer.uint32(/* id 24, wireType 0 =*/192).bool(message.done); if (message.driverSchedulingConfig != null && Object.hasOwnProperty.call(message, "driverSchedulingConfig")) $root.google.cloud.dataproc.v1.DriverSchedulingConfig.encode(message.driverSchedulingConfig, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.trinoJob != null && Object.hasOwnProperty.call(message, "trinoJob")) + $root.google.cloud.dataproc.v1.TrinoJob.encode(message.trinoJob, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); return writer; }; @@ -28884,6 +30173,10 @@ message.prestoJob = $root.google.cloud.dataproc.v1.PrestoJob.decode(reader, reader.uint32()); break; } + case 28: { + message.trinoJob = $root.google.cloud.dataproc.v1.TrinoJob.decode(reader, reader.uint32()); + break; + } case 8: { message.status = $root.google.cloud.dataproc.v1.JobStatus.decode(reader, reader.uint32()); break; @@ -29071,6 +30364,16 @@ return "prestoJob." + error; } } + if (message.trinoJob != null && message.hasOwnProperty("trinoJob")) { + if (properties.typeJob === 1) + return "typeJob: multiple values"; + properties.typeJob = 1; + { + var error = $root.google.cloud.dataproc.v1.TrinoJob.verify(message.trinoJob); + if (error) + return "trinoJob." + error; + } + } if (message.status != null && message.hasOwnProperty("status")) { var error = $root.google.cloud.dataproc.v1.JobStatus.verify(message.status); if (error) @@ -29189,6 +30492,11 @@ throw TypeError(".google.cloud.dataproc.v1.Job.prestoJob: object expected"); message.prestoJob = $root.google.cloud.dataproc.v1.PrestoJob.fromObject(object.prestoJob); } + if (object.trinoJob != null) { + if (typeof object.trinoJob !== "object") + throw TypeError(".google.cloud.dataproc.v1.Job.trinoJob: object expected"); + message.trinoJob = $root.google.cloud.dataproc.v1.TrinoJob.fromObject(object.trinoJob); + } if (object.status != null) { if (typeof object.status !== "object") throw TypeError(".google.cloud.dataproc.v1.Job.status: object expected"); @@ -29346,6 +30654,11 @@ object.done = message.done; if (message.driverSchedulingConfig != null && message.hasOwnProperty("driverSchedulingConfig")) object.driverSchedulingConfig = $root.google.cloud.dataproc.v1.DriverSchedulingConfig.toObject(message.driverSchedulingConfig, options); + if (message.trinoJob != null && message.hasOwnProperty("trinoJob")) { + object.trinoJob = $root.google.cloud.dataproc.v1.TrinoJob.toObject(message.trinoJob, options); + if (options.oneofs) + object.typeJob = "trinoJob"; + } return object; }; @@ -33772,6 +35085,7 @@ * @property {string|null} [description] ClusterOperationMetadata description * @property {Object.|null} [labels] ClusterOperationMetadata labels * @property {Array.|null} [warnings] ClusterOperationMetadata warnings + * @property {Array.|null} [childOperationIds] ClusterOperationMetadata childOperationIds */ /** @@ -33786,6 +35100,7 @@ this.statusHistory = []; this.labels = {}; this.warnings = []; + this.childOperationIds = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33856,6 +35171,14 @@ */ ClusterOperationMetadata.prototype.warnings = $util.emptyArray; + /** + * ClusterOperationMetadata childOperationIds. + * @member {Array.} childOperationIds + * @memberof google.cloud.dataproc.v1.ClusterOperationMetadata + * @instance + */ + ClusterOperationMetadata.prototype.childOperationIds = $util.emptyArray; + /** * Creates a new ClusterOperationMetadata instance using the specified properties. * @function create @@ -33899,6 +35222,9 @@ if (message.warnings != null && message.warnings.length) for (var i = 0; i < message.warnings.length; ++i) writer.uint32(/* id 14, wireType 2 =*/114).string(message.warnings[i]); + if (message.childOperationIds != null && message.childOperationIds.length) + for (var i = 0; i < message.childOperationIds.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.childOperationIds[i]); return writer; }; @@ -33988,6 +35314,12 @@ message.warnings.push(reader.string()); break; } + case 15: { + if (!(message.childOperationIds && message.childOperationIds.length)) + message.childOperationIds = []; + message.childOperationIds.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -34064,6 +35396,13 @@ if (!$util.isString(message.warnings[i])) return "warnings: string[] expected"; } + if (message.childOperationIds != null && message.hasOwnProperty("childOperationIds")) { + if (!Array.isArray(message.childOperationIds)) + return "childOperationIds: array expected"; + for (var i = 0; i < message.childOperationIds.length; ++i) + if (!$util.isString(message.childOperationIds[i])) + return "childOperationIds: string[] expected"; + } return null; }; @@ -34116,6 +35455,13 @@ for (var i = 0; i < object.warnings.length; ++i) message.warnings[i] = String(object.warnings[i]); } + if (object.childOperationIds) { + if (!Array.isArray(object.childOperationIds)) + throw TypeError(".google.cloud.dataproc.v1.ClusterOperationMetadata.childOperationIds: array expected"); + message.childOperationIds = []; + for (var i = 0; i < object.childOperationIds.length; ++i) + message.childOperationIds[i] = String(object.childOperationIds[i]); + } return message; }; @@ -34135,6 +35481,7 @@ if (options.arrays || options.defaults) { object.statusHistory = []; object.warnings = []; + object.childOperationIds = []; } if (options.objects || options.defaults) object.labels = {}; @@ -34171,6 +35518,11 @@ for (var j = 0; j < message.warnings.length; ++j) object.warnings[j] = message.warnings[j]; } + if (message.childOperationIds && message.childOperationIds.length) { + object.childOperationIds = []; + for (var j = 0; j < message.childOperationIds.length; ++j) + object.childOperationIds[j] = message.childOperationIds[j]; + } return object; }; @@ -52862,25 +54214,25 @@ return Empty; })(); - protobuf.Any = (function() { + protobuf.Timestamp = (function() { /** - * Properties of an Any. + * Properties of a Timestamp. * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos */ /** - * Constructs a new Any. + * Constructs a new Timestamp. * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny + * @classdesc Represents a Timestamp. + * @implements ITimestamp * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set + * @param {google.protobuf.ITimestamp=} [properties] Properties to set */ - function Any(properties) { + function Timestamp(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -52888,89 +54240,89 @@ } /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp * @instance */ - Any.prototype.type_url = ""; + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp * @instance */ - Any.prototype.value = $util.newBuffer([]); + Timestamp.prototype.nanos = 0; /** - * Creates a new Any instance using the specified properties. + * Creates a new Timestamp instance using the specified properties. * @function create - * @memberof google.protobuf.Any + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance */ - Any.create = function create(properties) { - return new Any(properties); + Timestamp.create = function create(properties) { + return new Timestamp(properties); }; /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encode - * @memberof google.protobuf.Any + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Any.encode = function encode(message, writer) { + Timestamp.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); + 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 Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Any + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Any.encodeDelimited = function encodeDelimited(message, writer) { + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Any message from the specified reader or buffer. + * Decodes a Timestamp message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Any + * @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.Any} Any + * @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 */ - Any.decode = function decode(reader, length) { + Timestamp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.type_url = reader.string(); + message.seconds = reader.int64(); break; } case 2: { - message.value = reader.bytes(); + message.nanos = reader.int32(); break; } default: @@ -52982,141 +54334,146 @@ }; /** - * Decodes an Any message from the specified reader or buffer, length delimited. + * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Any + * @memberof google.protobuf.Timestamp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any + * @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 */ - Any.decodeDelimited = function decodeDelimited(reader) { + Timestamp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Any message. + * Verifies a Timestamp message. * @function verify - * @memberof google.protobuf.Any + * @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 */ - Any.verify = function verify(message) { + Timestamp.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"; + 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 an Any message from a plain object. Also converts values to their respective internal types. + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Any + * @memberof google.protobuf.Timestamp * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any + * @returns {google.protobuf.Timestamp} Timestamp */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) 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; + 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 an Any message. Also converts values to other types if specified. + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Any + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.Any} message Any + * @param {google.protobuf.Timestamp} message Timestamp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Any.toObject = function toObject(message, options) { + Timestamp.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 ($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.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; + 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 Any to JSON. + * Converts this Timestamp to JSON. * @function toJSON - * @memberof google.protobuf.Any + * @memberof google.protobuf.Timestamp * @instance * @returns {Object.} JSON object */ - Any.prototype.toJSON = function toJSON() { + Timestamp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Any + * Gets the default type url for Timestamp * @function getTypeUrl - * @memberof google.protobuf.Any + * @memberof google.protobuf.Timestamp * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.Any"; + return typeUrlPrefix + "/google.protobuf.Timestamp"; }; - return Any; + return Timestamp; })(); - protobuf.Timestamp = (function() { + protobuf.Any = (function() { /** - * Properties of a Timestamp. + * Properties of an Any. * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value */ /** - * Constructs a new Timestamp. + * Constructs a new Any. * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp + * @classdesc Represents an Any. + * @implements IAny * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @param {google.protobuf.IAny=} [properties] Properties to set */ - function Timestamp(properties) { + function Any(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -53124,89 +54481,89 @@ } /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any * @instance */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Any.prototype.type_url = ""; /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any * @instance */ - Timestamp.prototype.nanos = 0; + Any.prototype.value = $util.newBuffer([]); /** - * Creates a new Timestamp instance using the specified properties. + * Creates a new Any instance using the specified properties. * @function create - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); + Any.create = function create(properties) { + return new Any(properties); }; /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encode - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encode = function encode(message, writer) { + Any.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + if (message.type_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 Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + Any.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Timestamp message from the specified reader or buffer. + * Decodes an Any message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Timestamp + * @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.Timestamp} Timestamp + * @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 */ - Timestamp.decode = function decode(reader, length) { + Any.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.seconds = reader.int64(); + message.type_url = reader.string(); break; } case 2: { - message.nanos = reader.int32(); + message.value = reader.bytes(); break; } default: @@ -53218,125 +54575,120 @@ }; /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * Decodes an Any message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Any * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp + * @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 */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { + Any.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Timestamp message. + * Verifies an Any message. * @function verify - * @memberof google.protobuf.Timestamp + * @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 */ - Timestamp.verify = function verify(message) { + Any.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; return null; }; /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Any * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.protobuf.Any} Any */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; + var message = new $root.google.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 a Timestamp message. Also converts values to other types if specified. + * Creates a plain object from an Any message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.Timestamp} message Timestamp + * @param {google.protobuf.Any} message Any * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Timestamp.toObject = function toObject(message, options) { + Any.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; + if (message.type_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 Timestamp to JSON. + * Converts this Any to JSON. * @function toJSON - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Any * @instance * @returns {Object.} JSON object */ - Timestamp.prototype.toJSON = function toJSON() { + Any.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Timestamp + * Gets the default type url for Any * @function getTypeUrl - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Any * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.Timestamp"; + return typeUrlPrefix + "/google.protobuf.Any"; }; - return Timestamp; + return Any; })(); protobuf.FieldMask = (function() { diff --git a/packages/google-cloud-dataproc/protos/protos.json b/packages/google-cloud-dataproc/protos/protos.json index d3edf4023da..644b70f6c05 100644 --- a/packages/google-cloud-dataproc/protos/protos.json +++ b/packages/google-cloud-dataproc/protos/protos.json @@ -543,6 +543,20 @@ "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" + } } } }, @@ -710,6 +724,17 @@ } }, "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "PENDING": 1, + "RUNNING": 2, + "CANCELLING": 3, + "CANCELLED": 4, + "SUCCEEDED": 5, + "FAILED": 6 + } + }, "StateHistory": { "fields": { "state": { @@ -734,17 +759,6 @@ } } } - }, - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "PENDING": 1, - "RUNNING": 2, - "CANCELLING": 3, - "CANCELLED": 4, - "SUCCEEDED": 5, - "FAILED": 6 - } } } }, @@ -1008,6 +1022,20 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "ttl": { + "type": "google.protobuf.Duration", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "stagingBucket": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -1028,7 +1056,8 @@ "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "metastore.googleapis.com/Service" } }, "sparkHistoryServerConfig": { @@ -1063,6 +1092,63 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "approximateUsage": { + "type": "UsageMetrics", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "currentUsage": { + "type": "UsageSnapshot", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "UsageMetrics": { + "fields": { + "milliDcuSeconds": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "shuffleStorageGbSeconds": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UsageSnapshot": { + "fields": { + "milliDcu": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "shuffleStorageGb": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "snapshotTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -1072,7 +1158,8 @@ "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "container.googleapis.com/Cluster" } }, "nodePoolTarget": { @@ -1152,7 +1239,7 @@ "type": "GkeNodePoolConfig", "id": 3, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "INPUT_ONLY" } } }, @@ -1203,16 +1290,16 @@ "(google.api.field_behavior)": "OPTIONAL" } }, - "preemptible": { - "type": "bool", - "id": 10, + "localSsdCount": { + "type": "int32", + "id": 7, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "localSsdCount": { - "type": "int32", - "id": 7, + "preemptible": { + "type": "bool", + "id": 10, "options": { "(google.api.field_behavior)": "OPTIONAL" } @@ -1231,6 +1318,20 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "bootDiskKmsKey": { + "type": "string", + "id": 23, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "spot": { + "type": "bool", + "id": 32, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -1243,6 +1344,10 @@ "acceleratorType": { "type": "string", "id": 2 + }, + "gpuPartitionSize": { + "type": "string", + "id": 3 } } }, @@ -1269,8 +1374,10 @@ "FLINK": 14, "HBASE": 11, "HIVE_WEBHCAT": 3, + "HUDI": 18, "JUPYTER": 1, "PRESTO": 6, + "TRINO": 17, "RANGER": 12, "SOLR": 10, "ZEPPELIN": 4, @@ -1768,6 +1875,13 @@ } }, "GceClusterConfig": { + "oneofs": { + "_internalIpOnly": { + "oneof": [ + "internalIpOnly" + ] + } + }, "fields": { "zoneUri": { "type": "string", @@ -1794,7 +1908,8 @@ "type": "bool", "id": 7, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, "privateIpv6GoogleAccess": { @@ -1881,26 +1996,46 @@ } }, "ShieldedInstanceConfig": { + "oneofs": { + "_enableSecureBoot": { + "oneof": [ + "enableSecureBoot" + ] + }, + "_enableVtpm": { + "oneof": [ + "enableVtpm" + ] + }, + "_enableIntegrityMonitoring": { + "oneof": [ + "enableIntegrityMonitoring" + ] + } + }, "fields": { "enableSecureBoot": { "type": "bool", "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, "enableVtpm": { "type": "bool", "id": 2, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, "enableIntegrityMonitoring": { "type": "bool", "id": 3, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } } } @@ -2416,6 +2551,20 @@ } } }, + "ClusterMetrics": { + "fields": { + "hdfsMetrics": { + "keyType": "string", + "type": "int64", + "id": 1 + }, + "yarnMetrics": { + "keyType": "string", + "type": "int64", + "id": 2 + } + } + }, "DataprocMetricConfig": { "fields": { "metrics": { @@ -2436,7 +2585,8 @@ "SPARK": 3, "YARN": 4, "SPARK_HISTORY_SERVER": 5, - "HIVESERVER2": 6 + "HIVESERVER2": 6, + "HIVEMETASTORE": 7 } }, "Metric": { @@ -2460,20 +2610,6 @@ } } }, - "ClusterMetrics": { - "fields": { - "hdfsMetrics": { - "keyType": "string", - "type": "int64", - "id": 1 - }, - "yarnMetrics": { - "keyType": "string", - "type": "int64", - "id": 2 - } - } - }, "CreateClusterRequest": { "fields": { "projectId": { @@ -3490,6 +3626,63 @@ } } }, + "TrinoJob": { + "oneofs": { + "queries": { + "oneof": [ + "queryFileUri", + "queryList" + ] + } + }, + "fields": { + "queryFileUri": { + "type": "string", + "id": 1 + }, + "queryList": { + "type": "QueryList", + "id": 2 + }, + "continueOnFailure": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "outputFormat": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "clientTags": { + "rule": "repeated", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "properties": { + "keyType": "string", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "loggingConfig": { + "type": "LoggingConfig", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, "JobPlacement": { "fields": { "clusterName": { @@ -3648,7 +3841,8 @@ "pigJob", "sparkRJob", "sparkSqlJob", - "prestoJob" + "prestoJob", + "trinoJob" ] } }, @@ -3723,6 +3917,13 @@ "(google.api.field_behavior)": "OPTIONAL" } }, + "trinoJob": { + "type": "TrinoJob", + "id": 28, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "status": { "type": "JobStatus", "id": 8, @@ -4400,6 +4601,14 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "childOperationIds": { + "rule": "repeated", + "type": "string", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -6533,26 +6742,26 @@ "Empty": { "fields": {} }, - "Any": { + "Timestamp": { "fields": { - "type_url": { - "type": "string", + "seconds": { + "type": "int64", "id": 1 }, - "value": { - "type": "bytes", + "nanos": { + "type": "int32", "id": 2 } } }, - "Timestamp": { + "Any": { "fields": { - "seconds": { - "type": "int64", + "type_url": { + "type": "string", "id": 1 }, - "nanos": { - "type": "int32", + "value": { + "type": "bytes", "id": 2 } } diff --git a/packages/google-cloud-dataproc/samples/generated/v1/batch_controller.create_batch.js b/packages/google-cloud-dataproc/samples/generated/v1/batch_controller.create_batch.js index 2bc68d8616c..e54566d6c15 100644 --- a/packages/google-cloud-dataproc/samples/generated/v1/batch_controller.create_batch.js +++ b/packages/google-cloud-dataproc/samples/generated/v1/batch_controller.create_batch.js @@ -37,8 +37,8 @@ function main(parent, batch) { */ // const batch = {} /** - * Optional. The ID to use for the batch, which will become the final component of - * the batch's resource name. + * Optional. The ID to use for the batch, which will become the final + * component of the batch's resource name. * This value must be 4-63 characters. Valid characters are `/[a-z][0-9]-/`. */ // const batchId = 'abc123' diff --git a/packages/google-cloud-dataproc/samples/generated/v1/batch_controller.delete_batch.js b/packages/google-cloud-dataproc/samples/generated/v1/batch_controller.delete_batch.js index 29249765623..7e59ec86a28 100644 --- a/packages/google-cloud-dataproc/samples/generated/v1/batch_controller.delete_batch.js +++ b/packages/google-cloud-dataproc/samples/generated/v1/batch_controller.delete_batch.js @@ -29,7 +29,9 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the batch resource to delete. + * Required. The fully qualified name of the batch to retrieve + * in the format + * "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" */ // const name = 'abc123' diff --git a/packages/google-cloud-dataproc/samples/generated/v1/batch_controller.get_batch.js b/packages/google-cloud-dataproc/samples/generated/v1/batch_controller.get_batch.js index c6625b1b333..c1fe0b00cd8 100644 --- a/packages/google-cloud-dataproc/samples/generated/v1/batch_controller.get_batch.js +++ b/packages/google-cloud-dataproc/samples/generated/v1/batch_controller.get_batch.js @@ -29,7 +29,9 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the batch to retrieve. + * Required. The fully qualified name of the batch to retrieve + * in the format + * "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" */ // const name = 'abc123' diff --git a/packages/google-cloud-dataproc/samples/generated/v1/batch_controller.list_batches.js b/packages/google-cloud-dataproc/samples/generated/v1/batch_controller.list_batches.js index f5226e08dcd..74ef83b17c9 100644 --- a/packages/google-cloud-dataproc/samples/generated/v1/batch_controller.list_batches.js +++ b/packages/google-cloud-dataproc/samples/generated/v1/batch_controller.list_batches.js @@ -43,6 +43,25 @@ function main(parent) { * Provide this token to retrieve the subsequent page. */ // const pageToken = 'abc123' + /** + * Optional. A filter for the batches to return in the response. + * A filter is a logical expression constraining the values of various fields + * in each batch resource. Filters are case sensitive, and may contain + * multiple clauses combined with logical operators (AND/OR). + * Supported fields are `batch_id`, `batch_uuid`, `state`, and `create_time`. + * e.g. `state = RUNNING and create_time < "2023-01-01T00:00:00Z"` + * filters for batches in state RUNNING that were created before 2023-01-01 + * See https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed + * description of the filter syntax and a list of supported comparisons. + */ + // const filter = 'abc123' + /** + * Optional. Field(s) on which to sort the list of batches. + * Currently the only supported sort orders are unspecified (empty) and + * `create_time desc` to sort by most recently created batches first. + * See https://google.aip.dev/132#ordering for more details. + */ + // const orderBy = 'abc123' // Imports the Dataproc library const {BatchControllerClient} = require('@google-cloud/dataproc').v1; diff --git a/packages/google-cloud-dataproc/samples/generated/v1/cluster_controller.update_cluster.js b/packages/google-cloud-dataproc/samples/generated/v1/cluster_controller.update_cluster.js index 811f6b896cb..8a82e0b600f 100644 --- a/packages/google-cloud-dataproc/samples/generated/v1/cluster_controller.update_cluster.js +++ b/packages/google-cloud-dataproc/samples/generated/v1/cluster_controller.update_cluster.js @@ -46,7 +46,7 @@ function main(projectId, region, clusterName, cluster, updateMask) { */ // const cluster = {} /** - * Optional. Timeout for graceful YARN decomissioning. Graceful + * Optional. Timeout for graceful YARN decommissioning. Graceful * decommissioning allows removing nodes from the cluster without * interrupting jobs in progress. Timeout specifies how long to wait for jobs * in progress to finish before forcefully removing nodes (and potentially diff --git a/packages/google-cloud-dataproc/samples/generated/v1/node_group_controller.resize_node_group.js b/packages/google-cloud-dataproc/samples/generated/v1/node_group_controller.resize_node_group.js index 954d333b3b1..eae18ff5421 100644 --- a/packages/google-cloud-dataproc/samples/generated/v1/node_group_controller.resize_node_group.js +++ b/packages/google-cloud-dataproc/samples/generated/v1/node_group_controller.resize_node_group.js @@ -54,7 +54,7 @@ function main(name, size) { */ // const requestId = 'abc123' /** - * Optional. Timeout for graceful YARN decommissioning. Graceful + * Optional. Timeout for graceful YARN decomissioning. Graceful * decommissioning * (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning) * allows the removal of nodes from the Compute Engine node group diff --git a/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata.google.cloud.dataproc.v1.json b/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata.google.cloud.dataproc.v1.json index df8be5f69a1..0046bade657 100644 --- a/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata.google.cloud.dataproc.v1.json +++ b/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata.google.cloud.dataproc.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataproc", - "version": "4.3.0", + "version": "4.3.1", "language": "TYPESCRIPT", "apis": [ { @@ -286,7 +286,7 @@ "segments": [ { "start": 25, - "end": 53, + "end": 55, "type": "FULL" } ], @@ -326,7 +326,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 85, "type": "FULL" } ], @@ -346,6 +346,14 @@ { "name": "page_token", "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" } ], "resultType": ".google.cloud.dataproc.v1.ListBatchesResponse", @@ -374,7 +382,7 @@ "segments": [ { "start": 25, - "end": 53, + "end": 55, "type": "FULL" } ], diff --git a/packages/google-cloud-dataproc/src/v1/autoscaling_policy_service_client.ts b/packages/google-cloud-dataproc/src/v1/autoscaling_policy_service_client.ts index e7d15b914c1..6bcb16c4ec3 100644 --- a/packages/google-cloud-dataproc/src/v1/autoscaling_policy_service_client.ts +++ b/packages/google-cloud-dataproc/src/v1/autoscaling_policy_service_client.ts @@ -25,6 +25,8 @@ import type { ClientOptions, PaginationCallback, GaxCall, + IamClient, + IamProtos, } from 'google-gax'; import {Transform} from 'stream'; import * as protos from '../../protos/protos'; @@ -60,6 +62,7 @@ export class AutoscalingPolicyServiceClient { }; warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; pathTemplates: {[name: string]: gax.PathTemplate}; autoscalingPolicyServiceStub?: Promise<{[name: string]: Function}>; @@ -157,6 +160,7 @@ export class AutoscalingPolicyServiceClient { if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; } + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; @@ -1014,6 +1018,146 @@ export class AutoscalingPolicyServiceClient { callSettings ) as AsyncIterable; } + /** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.getIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.setIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + */ + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.testIamPermissions(request, options, callback); + } + // -------------------- // -- Path templates -- // -------------------- @@ -1473,6 +1617,7 @@ export class AutoscalingPolicyServiceClient { return this.autoscalingPolicyServiceStub.then(stub => { this._terminated = true; stub.close(); + this.iamClient.close(); }); } return Promise.resolve(); diff --git a/packages/google-cloud-dataproc/src/v1/batch_controller_client.ts b/packages/google-cloud-dataproc/src/v1/batch_controller_client.ts index 847dac049e6..03c38b58f5f 100644 --- a/packages/google-cloud-dataproc/src/v1/batch_controller_client.ts +++ b/packages/google-cloud-dataproc/src/v1/batch_controller_client.ts @@ -27,6 +27,8 @@ import type { LROperation, PaginationCallback, GaxCall, + IamClient, + IamProtos, } from 'google-gax'; import {Transform} from 'stream'; import * as protos from '../../protos/protos'; @@ -61,6 +63,7 @@ export class BatchControllerClient { }; warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; pathTemplates: {[name: string]: gax.PathTemplate}; operationsClient: gax.OperationsClient; batchControllerStub?: Promise<{[name: string]: Function}>; @@ -158,6 +161,7 @@ export class BatchControllerClient { if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; } + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; @@ -329,18 +333,30 @@ export class BatchControllerClient { { selector: 'google.longrunning.Operations.CancelOperation', post: '/v1/{name=projects/*/regions/*/operations/*}:cancel', + additional_bindings: [ + {post: '/v1/{name=projects/*/locations/*/operations/*}:cancel'}, + ], }, { selector: 'google.longrunning.Operations.DeleteOperation', delete: '/v1/{name=projects/*/regions/*/operations/*}', + additional_bindings: [ + {delete: '/v1/{name=projects/*/locations/*/operations/*}'}, + ], }, { selector: 'google.longrunning.Operations.GetOperation', get: '/v1/{name=projects/*/regions/*/operations/*}', + additional_bindings: [ + {get: '/v1/{name=projects/*/locations/*/operations/*}'}, + ], }, { selector: 'google.longrunning.Operations.ListOperations', get: '/v1/{name=projects/*/regions/*/operations}', + additional_bindings: [ + {get: '/v1/{name=projects/*/locations/*/operations}'}, + ], }, ]; } @@ -508,7 +524,9 @@ export class BatchControllerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The name of the batch to retrieve. + * Required. The fully qualified name of the batch to retrieve + * in the format + * "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -592,7 +610,9 @@ export class BatchControllerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The name of the batch resource to delete. + * Required. The fully qualified name of the batch to retrieve + * in the format + * "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -682,8 +702,8 @@ export class BatchControllerClient { * @param {google.cloud.dataproc.v1.Batch} request.batch * Required. The batch to create. * @param {string} [request.batchId] - * Optional. The ID to use for the batch, which will become the final component of - * the batch's resource name. + * Optional. The ID to use for the batch, which will become the final + * component of the batch's resource name. * * This value must be 4-63 characters. Valid characters are `/{@link 0-9|a-z}-/`. * @param {string} [request.requestId] @@ -844,6 +864,26 @@ export class BatchControllerClient { * @param {string} [request.pageToken] * Optional. A page token received from a previous `ListBatches` call. * Provide this token to retrieve the subsequent page. + * @param {string} [request.filter] + * Optional. A filter for the batches to return in the response. + * + * A filter is a logical expression constraining the values of various fields + * in each batch resource. Filters are case sensitive, and may contain + * multiple clauses combined with logical operators (AND/OR). + * Supported fields are `batch_id`, `batch_uuid`, `state`, and `create_time`. + * + * e.g. `state = RUNNING and create_time < "2023-01-01T00:00:00Z"` + * filters for batches in state RUNNING that were created before 2023-01-01 + * + * See https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed + * description of the filter syntax and a list of supported comparisons. + * @param {string} [request.orderBy] + * Optional. Field(s) on which to sort the list of batches. + * + * Currently the only supported sort orders are unspecified (empty) and + * `create_time desc` to sort by most recently created batches first. + * + * See https://google.aip.dev/132#ordering for more details. * @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. @@ -939,6 +979,26 @@ export class BatchControllerClient { * @param {string} [request.pageToken] * Optional. A page token received from a previous `ListBatches` call. * Provide this token to retrieve the subsequent page. + * @param {string} [request.filter] + * Optional. A filter for the batches to return in the response. + * + * A filter is a logical expression constraining the values of various fields + * in each batch resource. Filters are case sensitive, and may contain + * multiple clauses combined with logical operators (AND/OR). + * Supported fields are `batch_id`, `batch_uuid`, `state`, and `create_time`. + * + * e.g. `state = RUNNING and create_time < "2023-01-01T00:00:00Z"` + * filters for batches in state RUNNING that were created before 2023-01-01 + * + * See https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed + * description of the filter syntax and a list of supported comparisons. + * @param {string} [request.orderBy] + * Optional. Field(s) on which to sort the list of batches. + * + * Currently the only supported sort orders are unspecified (empty) and + * `create_time desc` to sort by most recently created batches first. + * + * See https://google.aip.dev/132#ordering for more details. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -988,6 +1048,26 @@ export class BatchControllerClient { * @param {string} [request.pageToken] * Optional. A page token received from a previous `ListBatches` call. * Provide this token to retrieve the subsequent page. + * @param {string} [request.filter] + * Optional. A filter for the batches to return in the response. + * + * A filter is a logical expression constraining the values of various fields + * in each batch resource. Filters are case sensitive, and may contain + * multiple clauses combined with logical operators (AND/OR). + * Supported fields are `batch_id`, `batch_uuid`, `state`, and `create_time`. + * + * e.g. `state = RUNNING and create_time < "2023-01-01T00:00:00Z"` + * filters for batches in state RUNNING that were created before 2023-01-01 + * + * See https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed + * description of the filter syntax and a list of supported comparisons. + * @param {string} [request.orderBy] + * Optional. Field(s) on which to sort the list of batches. + * + * Currently the only supported sort orders are unspecified (empty) and + * `create_time desc` to sort by most recently created batches first. + * + * See https://google.aip.dev/132#ordering for more details. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -1022,6 +1102,321 @@ export class BatchControllerClient { callSettings ) as AsyncIterable; } + /** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.getIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.setIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + */ + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.testIamPermissions(request, options, callback); + } + + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + // -------------------- // -- Path templates -- // -------------------- @@ -1481,6 +1876,7 @@ export class BatchControllerClient { return this.batchControllerStub.then(stub => { this._terminated = true; stub.close(); + this.iamClient.close(); this.operationsClient.close(); }); } diff --git a/packages/google-cloud-dataproc/src/v1/cluster_controller_client.ts b/packages/google-cloud-dataproc/src/v1/cluster_controller_client.ts index 749b12f9827..bbeb679dd19 100644 --- a/packages/google-cloud-dataproc/src/v1/cluster_controller_client.ts +++ b/packages/google-cloud-dataproc/src/v1/cluster_controller_client.ts @@ -27,6 +27,8 @@ import type { LROperation, PaginationCallback, GaxCall, + IamClient, + IamProtos, } from 'google-gax'; import {Transform} from 'stream'; import * as protos from '../../protos/protos'; @@ -62,6 +64,7 @@ export class ClusterControllerClient { }; warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; pathTemplates: {[name: string]: gax.PathTemplate}; operationsClient: gax.OperationsClient; clusterControllerStub?: Promise<{[name: string]: Function}>; @@ -159,6 +162,7 @@ export class ClusterControllerClient { if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; } + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; @@ -327,18 +331,30 @@ export class ClusterControllerClient { { selector: 'google.longrunning.Operations.CancelOperation', post: '/v1/{name=projects/*/regions/*/operations/*}:cancel', + additional_bindings: [ + {post: '/v1/{name=projects/*/locations/*/operations/*}:cancel'}, + ], }, { selector: 'google.longrunning.Operations.DeleteOperation', delete: '/v1/{name=projects/*/regions/*/operations/*}', + additional_bindings: [ + {delete: '/v1/{name=projects/*/locations/*/operations/*}'}, + ], }, { selector: 'google.longrunning.Operations.GetOperation', get: '/v1/{name=projects/*/regions/*/operations/*}', + additional_bindings: [ + {get: '/v1/{name=projects/*/locations/*/operations/*}'}, + ], }, { selector: 'google.longrunning.Operations.ListOperations', get: '/v1/{name=projects/*/regions/*/operations}', + additional_bindings: [ + {get: '/v1/{name=projects/*/locations/*/operations}'}, + ], }, ]; } @@ -831,7 +847,7 @@ export class ClusterControllerClient { * @param {google.cloud.dataproc.v1.Cluster} request.cluster * Required. The changes to the cluster. * @param {google.protobuf.Duration} [request.gracefulDecommissionTimeout] - * Optional. Timeout for graceful YARN decomissioning. Graceful + * Optional. Timeout for graceful YARN decommissioning. Graceful * decommissioning allows removing nodes from the cluster without * interrupting jobs in progress. Timeout specifies how long to wait for jobs * in progress to finish before forcefully removing nodes (and potentially @@ -1929,6 +1945,321 @@ export class ClusterControllerClient { callSettings ) as AsyncIterable; } + /** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.getIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.setIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + */ + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.testIamPermissions(request, options, callback); + } + + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + // -------------------- // -- Path templates -- // -------------------- @@ -2378,6 +2709,7 @@ export class ClusterControllerClient { return this.clusterControllerStub.then(stub => { this._terminated = true; stub.close(); + this.iamClient.close(); this.operationsClient.close(); }); } diff --git a/packages/google-cloud-dataproc/src/v1/job_controller_client.ts b/packages/google-cloud-dataproc/src/v1/job_controller_client.ts index be2f1e38baa..e32a5714c0b 100644 --- a/packages/google-cloud-dataproc/src/v1/job_controller_client.ts +++ b/packages/google-cloud-dataproc/src/v1/job_controller_client.ts @@ -27,6 +27,8 @@ import type { LROperation, PaginationCallback, GaxCall, + IamClient, + IamProtos, } from 'google-gax'; import {Transform} from 'stream'; import * as protos from '../../protos/protos'; @@ -61,6 +63,7 @@ export class JobControllerClient { }; warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; pathTemplates: {[name: string]: gax.PathTemplate}; operationsClient: gax.OperationsClient; jobControllerStub?: Promise<{[name: string]: Function}>; @@ -158,6 +161,7 @@ export class JobControllerClient { if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; } + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; @@ -323,18 +327,30 @@ export class JobControllerClient { { selector: 'google.longrunning.Operations.CancelOperation', post: '/v1/{name=projects/*/regions/*/operations/*}:cancel', + additional_bindings: [ + {post: '/v1/{name=projects/*/locations/*/operations/*}:cancel'}, + ], }, { selector: 'google.longrunning.Operations.DeleteOperation', delete: '/v1/{name=projects/*/regions/*/operations/*}', + additional_bindings: [ + {delete: '/v1/{name=projects/*/locations/*/operations/*}'}, + ], }, { selector: 'google.longrunning.Operations.GetOperation', get: '/v1/{name=projects/*/regions/*/operations/*}', + additional_bindings: [ + {get: '/v1/{name=projects/*/locations/*/operations/*}'}, + ], }, { selector: 'google.longrunning.Operations.ListOperations', get: '/v1/{name=projects/*/regions/*/operations}', + additional_bindings: [ + {get: '/v1/{name=projects/*/locations/*/operations}'}, + ], }, ]; } @@ -1398,6 +1414,321 @@ export class JobControllerClient { callSettings ) as AsyncIterable; } + /** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.getIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.setIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + */ + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.testIamPermissions(request, options, callback); + } + + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + // -------------------- // -- Path templates -- // -------------------- @@ -1798,6 +2129,7 @@ export class JobControllerClient { return this.jobControllerStub.then(stub => { this._terminated = true; stub.close(); + this.iamClient.close(); this.operationsClient.close(); }); } diff --git a/packages/google-cloud-dataproc/src/v1/node_group_controller_client.ts b/packages/google-cloud-dataproc/src/v1/node_group_controller_client.ts index 57ed21494dd..a6640a24fa4 100644 --- a/packages/google-cloud-dataproc/src/v1/node_group_controller_client.ts +++ b/packages/google-cloud-dataproc/src/v1/node_group_controller_client.ts @@ -25,6 +25,8 @@ import type { ClientOptions, GrpcClientOptions, LROperation, + IamClient, + IamProtos, } from 'google-gax'; import * as protos from '../../protos/protos'; @@ -60,6 +62,7 @@ export class NodeGroupControllerClient { }; warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; pathTemplates: {[name: string]: gax.PathTemplate}; operationsClient: gax.OperationsClient; nodeGroupControllerStub?: Promise<{[name: string]: Function}>; @@ -157,6 +160,7 @@ export class NodeGroupControllerClient { if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; } + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; @@ -320,18 +324,30 @@ export class NodeGroupControllerClient { { selector: 'google.longrunning.Operations.CancelOperation', post: '/v1/{name=projects/*/regions/*/operations/*}:cancel', + additional_bindings: [ + {post: '/v1/{name=projects/*/locations/*/operations/*}:cancel'}, + ], }, { selector: 'google.longrunning.Operations.DeleteOperation', delete: '/v1/{name=projects/*/regions/*/operations/*}', + additional_bindings: [ + {delete: '/v1/{name=projects/*/locations/*/operations/*}'}, + ], }, { selector: 'google.longrunning.Operations.GetOperation', get: '/v1/{name=projects/*/regions/*/operations/*}', + additional_bindings: [ + {get: '/v1/{name=projects/*/locations/*/operations/*}'}, + ], }, { selector: 'google.longrunning.Operations.ListOperations', get: '/v1/{name=projects/*/regions/*/operations}', + additional_bindings: [ + {get: '/v1/{name=projects/*/locations/*/operations}'}, + ], }, ]; } @@ -780,7 +796,7 @@ export class NodeGroupControllerClient { * The ID must contain only letters (a-z, A-Z), numbers (0-9), * underscores (_), and hyphens (-). The maximum length is 40 characters. * @param {google.protobuf.Duration} [request.gracefulDecommissionTimeout] - * Optional. Timeout for graceful YARN decommissioning. [Graceful + * Optional. Timeout for graceful YARN decomissioning. [Graceful * decommissioning] * (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning) * allows the removal of nodes from the Compute Engine node group @@ -923,6 +939,321 @@ export class NodeGroupControllerClient { protos.google.cloud.dataproc.v1.NodeGroupOperationMetadata >; } + /** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.getIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.setIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + */ + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.testIamPermissions(request, options, callback); + } + + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + // -------------------- // -- Path templates -- // -------------------- @@ -1434,6 +1765,7 @@ export class NodeGroupControllerClient { return this.nodeGroupControllerStub.then(stub => { this._terminated = true; stub.close(); + this.iamClient.close(); this.operationsClient.close(); }); } diff --git a/packages/google-cloud-dataproc/src/v1/workflow_template_service_client.ts b/packages/google-cloud-dataproc/src/v1/workflow_template_service_client.ts index c77d35da9b3..64b534f5c08 100644 --- a/packages/google-cloud-dataproc/src/v1/workflow_template_service_client.ts +++ b/packages/google-cloud-dataproc/src/v1/workflow_template_service_client.ts @@ -27,6 +27,8 @@ import type { LROperation, PaginationCallback, GaxCall, + IamClient, + IamProtos, } from 'google-gax'; import {Transform} from 'stream'; import * as protos from '../../protos/protos'; @@ -62,6 +64,7 @@ export class WorkflowTemplateServiceClient { }; warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; pathTemplates: {[name: string]: gax.PathTemplate}; operationsClient: gax.OperationsClient; workflowTemplateServiceStub?: Promise<{[name: string]: Function}>; @@ -160,6 +163,7 @@ export class WorkflowTemplateServiceClient { if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; } + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; @@ -331,18 +335,30 @@ export class WorkflowTemplateServiceClient { { selector: 'google.longrunning.Operations.CancelOperation', post: '/v1/{name=projects/*/regions/*/operations/*}:cancel', + additional_bindings: [ + {post: '/v1/{name=projects/*/locations/*/operations/*}:cancel'}, + ], }, { selector: 'google.longrunning.Operations.DeleteOperation', delete: '/v1/{name=projects/*/regions/*/operations/*}', + additional_bindings: [ + {delete: '/v1/{name=projects/*/locations/*/operations/*}'}, + ], }, { selector: 'google.longrunning.Operations.GetOperation', get: '/v1/{name=projects/*/regions/*/operations/*}', + additional_bindings: [ + {get: '/v1/{name=projects/*/locations/*/operations/*}'}, + ], }, { selector: 'google.longrunning.Operations.ListOperations', get: '/v1/{name=projects/*/regions/*/operations}', + additional_bindings: [ + {get: '/v1/{name=projects/*/locations/*/operations}'}, + ], }, ]; } @@ -1161,7 +1177,8 @@ export class WorkflowTemplateServiceClient { * Instantiates a template and begins execution. * * This method is equivalent to executing the sequence - * {@link google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate|CreateWorkflowTemplate}, {@link google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate|InstantiateWorkflowTemplate}, + * {@link google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate|CreateWorkflowTemplate}, + * {@link google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate|InstantiateWorkflowTemplate}, * {@link google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate|DeleteWorkflowTemplate}. * * The returned Operation can be used to track execution of @@ -1562,6 +1579,321 @@ export class WorkflowTemplateServiceClient { callSettings ) as AsyncIterable; } + /** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.getIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.setIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + */ + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.testIamPermissions(request, options, callback); + } + + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + // -------------------- // -- Path templates -- // -------------------- @@ -2021,6 +2353,7 @@ export class WorkflowTemplateServiceClient { return this.workflowTemplateServiceStub.then(stub => { this._terminated = true; stub.close(); + this.iamClient.close(); this.operationsClient.close(); }); } diff --git a/packages/google-cloud-dataproc/test/gapic_autoscaling_policy_service_v1.ts b/packages/google-cloud-dataproc/test/gapic_autoscaling_policy_service_v1.ts index f368a485d62..ad5267f49bf 100644 --- a/packages/google-cloud-dataproc/test/gapic_autoscaling_policy_service_v1.ts +++ b/packages/google-cloud-dataproc/test/gapic_autoscaling_policy_service_v1.ts @@ -25,7 +25,7 @@ import * as autoscalingpolicyserviceModule from '../src'; import {PassThrough} from 'stream'; -import {protobuf} from 'google-gax'; +import {protobuf, IamProtos} from 'google-gax'; // Dynamically loaded proto JSON is needed to get the type information // to fill in default values for request objects @@ -1158,6 +1158,339 @@ describe('v1.AutoscalingPolicyServiceClient', () => { ); }); }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = + new autoscalingpolicyserviceModule.v1.AutoscalingPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = + new autoscalingpolicyserviceModule.v1.AutoscalingPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub).getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = + new autoscalingpolicyserviceModule.v1.AutoscalingPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.getIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = + new autoscalingpolicyserviceModule.v1.AutoscalingPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = + new autoscalingpolicyserviceModule.v1.AutoscalingPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub).getCall(0)); + }); + it('invokes setIamPolicy with error', async () => { + const client = + new autoscalingpolicyserviceModule.v1.AutoscalingPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.setIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = + new autoscalingpolicyserviceModule.v1.AutoscalingPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions( + request, + expectedOptions + ); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes testIamPermissions without error using callback', async () => { + const client = + new autoscalingpolicyserviceModule.v1.AutoscalingPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.TestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub).getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = + new autoscalingpolicyserviceModule.v1.AutoscalingPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.testIamPermissions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.testIamPermissions(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); describe('Path templates', () => { describe('batch', () => { diff --git a/packages/google-cloud-dataproc/test/gapic_batch_controller_v1.ts b/packages/google-cloud-dataproc/test/gapic_batch_controller_v1.ts index 3ce3b3479f3..35ea66bc3d6 100644 --- a/packages/google-cloud-dataproc/test/gapic_batch_controller_v1.ts +++ b/packages/google-cloud-dataproc/test/gapic_batch_controller_v1.ts @@ -25,7 +25,7 @@ import * as batchcontrollerModule from '../src'; import {PassThrough} from 'stream'; -import {protobuf, LROperation, operationsProtos} from 'google-gax'; +import {protobuf, LROperation, operationsProtos, IamProtos} from 'google-gax'; // Dynamically loaded proto JSON is needed to get the type information // to fill in default values for request objects @@ -1004,6 +1004,635 @@ describe('v1.BatchControllerClient', () => { ); }); }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new batchcontrollerModule.v1.BatchControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = new batchcontrollerModule.v1.BatchControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub).getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = new batchcontrollerModule.v1.BatchControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.getIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = new batchcontrollerModule.v1.BatchControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = new batchcontrollerModule.v1.BatchControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub).getCall(0)); + }); + it('invokes setIamPolicy with error', async () => { + const client = new batchcontrollerModule.v1.BatchControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.setIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new batchcontrollerModule.v1.BatchControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions( + request, + expectedOptions + ); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes testIamPermissions without error using callback', async () => { + const client = new batchcontrollerModule.v1.BatchControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.TestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub).getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = new batchcontrollerModule.v1.BatchControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.testIamPermissions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.testIamPermissions(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new batchcontrollerModule.v1.BatchControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new batchcontrollerModule.v1.BatchControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new batchcontrollerModule.v1.BatchControllerClient({ + 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 batchcontrollerModule.v1.BatchControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new batchcontrollerModule.v1.BatchControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new batchcontrollerModule.v1.BatchControllerClient({ + 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 batchcontrollerModule.v1.BatchControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new batchcontrollerModule.v1.BatchControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new batchcontrollerModule.v1.BatchControllerClient({ + 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 batchcontrollerModule.v1.BatchControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new batchcontrollerModule.v1.BatchControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); describe('Path templates', () => { describe('batch', () => { diff --git a/packages/google-cloud-dataproc/test/gapic_cluster_controller_v1.ts b/packages/google-cloud-dataproc/test/gapic_cluster_controller_v1.ts index 991a39c55de..d4b1db43925 100644 --- a/packages/google-cloud-dataproc/test/gapic_cluster_controller_v1.ts +++ b/packages/google-cloud-dataproc/test/gapic_cluster_controller_v1.ts @@ -25,7 +25,7 @@ import * as clustercontrollerModule from '../src'; import {PassThrough} from 'stream'; -import {protobuf, LROperation, operationsProtos} from 'google-gax'; +import {protobuf, LROperation, operationsProtos, IamProtos} from 'google-gax'; // Dynamically loaded proto JSON is needed to get the type information // to fill in default values for request objects @@ -2142,6 +2142,635 @@ describe('v1.ClusterControllerClient', () => { ); }); }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new clustercontrollerModule.v1.ClusterControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = new clustercontrollerModule.v1.ClusterControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub).getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = new clustercontrollerModule.v1.ClusterControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.getIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = new clustercontrollerModule.v1.ClusterControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = new clustercontrollerModule.v1.ClusterControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub).getCall(0)); + }); + it('invokes setIamPolicy with error', async () => { + const client = new clustercontrollerModule.v1.ClusterControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.setIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new clustercontrollerModule.v1.ClusterControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions( + request, + expectedOptions + ); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes testIamPermissions without error using callback', async () => { + const client = new clustercontrollerModule.v1.ClusterControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.TestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub).getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = new clustercontrollerModule.v1.ClusterControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.testIamPermissions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.testIamPermissions(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new clustercontrollerModule.v1.ClusterControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new clustercontrollerModule.v1.ClusterControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new clustercontrollerModule.v1.ClusterControllerClient({ + 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 clustercontrollerModule.v1.ClusterControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new clustercontrollerModule.v1.ClusterControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new clustercontrollerModule.v1.ClusterControllerClient({ + 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 clustercontrollerModule.v1.ClusterControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new clustercontrollerModule.v1.ClusterControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new clustercontrollerModule.v1.ClusterControllerClient({ + 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 clustercontrollerModule.v1.ClusterControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new clustercontrollerModule.v1.ClusterControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); describe('Path templates', () => { describe('batch', () => { diff --git a/packages/google-cloud-dataproc/test/gapic_job_controller_v1.ts b/packages/google-cloud-dataproc/test/gapic_job_controller_v1.ts index 44c07f1d902..c1295a93a4d 100644 --- a/packages/google-cloud-dataproc/test/gapic_job_controller_v1.ts +++ b/packages/google-cloud-dataproc/test/gapic_job_controller_v1.ts @@ -25,7 +25,7 @@ import * as jobcontrollerModule from '../src'; import {PassThrough} from 'stream'; -import {protobuf, LROperation, operationsProtos} from 'google-gax'; +import {protobuf, LROperation, operationsProtos, IamProtos} from 'google-gax'; // Dynamically loaded proto JSON is needed to get the type information // to fill in default values for request objects @@ -1616,6 +1616,635 @@ describe('v1.JobControllerClient', () => { ); }); }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new jobcontrollerModule.v1.JobControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = new jobcontrollerModule.v1.JobControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub).getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = new jobcontrollerModule.v1.JobControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.getIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = new jobcontrollerModule.v1.JobControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = new jobcontrollerModule.v1.JobControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub).getCall(0)); + }); + it('invokes setIamPolicy with error', async () => { + const client = new jobcontrollerModule.v1.JobControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.setIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new jobcontrollerModule.v1.JobControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions( + request, + expectedOptions + ); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes testIamPermissions without error using callback', async () => { + const client = new jobcontrollerModule.v1.JobControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.TestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub).getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = new jobcontrollerModule.v1.JobControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.testIamPermissions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.testIamPermissions(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new jobcontrollerModule.v1.JobControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new jobcontrollerModule.v1.JobControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new jobcontrollerModule.v1.JobControllerClient({ + 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 jobcontrollerModule.v1.JobControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new jobcontrollerModule.v1.JobControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new jobcontrollerModule.v1.JobControllerClient({ + 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 jobcontrollerModule.v1.JobControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new jobcontrollerModule.v1.JobControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new jobcontrollerModule.v1.JobControllerClient({ + 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 jobcontrollerModule.v1.JobControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new jobcontrollerModule.v1.JobControllerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); describe('Path templates', () => { describe('batch', () => { diff --git a/packages/google-cloud-dataproc/test/gapic_node_group_controller_v1.ts b/packages/google-cloud-dataproc/test/gapic_node_group_controller_v1.ts index 03a972765fd..490103942eb 100644 --- a/packages/google-cloud-dataproc/test/gapic_node_group_controller_v1.ts +++ b/packages/google-cloud-dataproc/test/gapic_node_group_controller_v1.ts @@ -23,7 +23,7 @@ import {SinonStub} from 'sinon'; import {describe, it} from 'mocha'; import * as nodegroupcontrollerModule from '../src'; -import {protobuf, LROperation, operationsProtos} from 'google-gax'; +import {protobuf, LROperation, operationsProtos, IamProtos} from 'google-gax'; // Dynamically loaded proto JSON is needed to get the type information // to fill in default values for request objects @@ -96,6 +96,29 @@ function stubLongRunningCallWithCallback( : sinon.stub().callsArgWith(2, null, mockOperation); } +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + describe('v1.NodeGroupControllerClient', () => { describe('Common methods', () => { it('has servicePath', () => { @@ -758,6 +781,675 @@ describe('v1.NodeGroupControllerClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new nodegroupcontrollerModule.v1.NodeGroupControllerClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = new nodegroupcontrollerModule.v1.NodeGroupControllerClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub).getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = new nodegroupcontrollerModule.v1.NodeGroupControllerClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.getIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = new nodegroupcontrollerModule.v1.NodeGroupControllerClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = new nodegroupcontrollerModule.v1.NodeGroupControllerClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub).getCall(0)); + }); + it('invokes setIamPolicy with error', async () => { + const client = new nodegroupcontrollerModule.v1.NodeGroupControllerClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.setIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new nodegroupcontrollerModule.v1.NodeGroupControllerClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions( + request, + expectedOptions + ); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes testIamPermissions without error using callback', async () => { + const client = new nodegroupcontrollerModule.v1.NodeGroupControllerClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.TestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub).getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = new nodegroupcontrollerModule.v1.NodeGroupControllerClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.testIamPermissions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.testIamPermissions(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new nodegroupcontrollerModule.v1.NodeGroupControllerClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new nodegroupcontrollerModule.v1.NodeGroupControllerClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new nodegroupcontrollerModule.v1.NodeGroupControllerClient( + { + 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 nodegroupcontrollerModule.v1.NodeGroupControllerClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new nodegroupcontrollerModule.v1.NodeGroupControllerClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new nodegroupcontrollerModule.v1.NodeGroupControllerClient( + { + 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 nodegroupcontrollerModule.v1.NodeGroupControllerClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new nodegroupcontrollerModule.v1.NodeGroupControllerClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new nodegroupcontrollerModule.v1.NodeGroupControllerClient( + { + 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 nodegroupcontrollerModule.v1.NodeGroupControllerClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new nodegroupcontrollerModule.v1.NodeGroupControllerClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); describe('Path templates', () => { describe('batch', () => { diff --git a/packages/google-cloud-dataproc/test/gapic_workflow_template_service_v1.ts b/packages/google-cloud-dataproc/test/gapic_workflow_template_service_v1.ts index bcfe72c4d09..ead4de997f3 100644 --- a/packages/google-cloud-dataproc/test/gapic_workflow_template_service_v1.ts +++ b/packages/google-cloud-dataproc/test/gapic_workflow_template_service_v1.ts @@ -25,7 +25,7 @@ import * as workflowtemplateserviceModule from '../src'; import {PassThrough} from 'stream'; -import {protobuf, LROperation, operationsProtos} from 'google-gax'; +import {protobuf, LROperation, operationsProtos, IamProtos} from 'google-gax'; // Dynamically loaded proto JSON is needed to get the type information // to fill in default values for request objects @@ -1596,6 +1596,655 @@ describe('v1.WorkflowTemplateServiceClient', () => { ); }); }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = + new workflowtemplateserviceModule.v1.WorkflowTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = + new workflowtemplateserviceModule.v1.WorkflowTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub).getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = + new workflowtemplateserviceModule.v1.WorkflowTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.getIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = + new workflowtemplateserviceModule.v1.WorkflowTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = + new workflowtemplateserviceModule.v1.WorkflowTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub).getCall(0)); + }); + it('invokes setIamPolicy with error', async () => { + const client = + new workflowtemplateserviceModule.v1.WorkflowTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.setIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = + new workflowtemplateserviceModule.v1.WorkflowTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions( + request, + expectedOptions + ); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes testIamPermissions without error using callback', async () => { + const client = + new workflowtemplateserviceModule.v1.WorkflowTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.TestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub).getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = + new workflowtemplateserviceModule.v1.WorkflowTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.testIamPermissions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.testIamPermissions(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = + new workflowtemplateserviceModule.v1.WorkflowTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = + new workflowtemplateserviceModule.v1.WorkflowTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = + new workflowtemplateserviceModule.v1.WorkflowTemplateServiceClient({ + 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 workflowtemplateserviceModule.v1.WorkflowTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = + new workflowtemplateserviceModule.v1.WorkflowTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = + new workflowtemplateserviceModule.v1.WorkflowTemplateServiceClient({ + 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 workflowtemplateserviceModule.v1.WorkflowTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = + new workflowtemplateserviceModule.v1.WorkflowTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = + new workflowtemplateserviceModule.v1.WorkflowTemplateServiceClient({ + 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 workflowtemplateserviceModule.v1.WorkflowTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = + new workflowtemplateserviceModule.v1.WorkflowTemplateServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); describe('Path templates', () => { describe('batch', () => { From 080253b1f7cec18d57b7f04cfb17fe9344a7bd90 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 23 Feb 2023 13:22:19 -0800 Subject: [PATCH 46/80] chore: release main (#4017) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: release main * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 8 +- changelog.json | 77 ++++++++++++++++++- packages/google-cloud-dataform/CHANGELOG.md | 12 +++ packages/google-cloud-dataform/package.json | 2 +- ...tadata.google.cloud.dataform.v1alpha2.json | 2 +- ...etadata.google.cloud.dataform.v1beta1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-dataproc/CHANGELOG.md | 7 ++ packages/google-cloud-dataproc/package.json | 2 +- ...pet_metadata.google.cloud.dataproc.v1.json | 2 +- .../samples/package.json | 2 +- .../google-cloud-dialogflow-cx/CHANGELOG.md | 7 ++ .../google-cloud-dialogflow-cx/package.json | 2 +- ...etadata.google.cloud.dialogflow.cx.v3.json | 2 +- ...ta.google.cloud.dialogflow.cx.v3beta1.json | 2 +- .../samples/package.json | 2 +- .../google-devtools-cloudbuild/CHANGELOG.md | 7 ++ .../google-devtools-cloudbuild/package.json | 2 +- ...etadata.google.devtools.cloudbuild.v1.json | 2 +- ...etadata.google.devtools.cloudbuild.v2.json | 2 +- .../samples/package.json | 2 +- 21 files changed, 128 insertions(+), 20 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 695332f5dda..dec7a811bbe 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -38,16 +38,16 @@ "packages/google-cloud-contentwarehouse": "0.4.0", "packages/google-cloud-datacatalog": "3.2.1", "packages/google-cloud-datacatalog-lineage": "0.1.1", - "packages/google-cloud-dataform": "0.4.0", + "packages/google-cloud-dataform": "1.0.0", "packages/google-cloud-datafusion": "2.2.1", "packages/google-cloud-datalabeling": "3.2.1", "packages/google-cloud-dataplex": "2.3.1", - "packages/google-cloud-dataproc": "4.3.1", + "packages/google-cloud-dataproc": "4.4.0", "packages/google-cloud-dataqna": "2.1.1", "packages/google-cloud-datastream": "2.2.1", "packages/google-cloud-deploy": "2.3.1", "packages/google-cloud-dialogflow": "5.6.0", - "packages/google-cloud-dialogflow-cx": "3.2.1", + "packages/google-cloud-dialogflow-cx": "3.3.0", "packages/google-cloud-discoveryengine": "0.3.1", "packages/google-cloud-documentai": "7.1.0", "packages/google-cloud-domains": "2.2.1", @@ -119,7 +119,7 @@ "packages/google-container": "4.7.1", "packages/google-dataflow": "2.1.1", "packages/google-devtools-artifactregistry": "2.2.1", - "packages/google-devtools-cloudbuild": "3.3.0", + "packages/google-devtools-cloudbuild": "3.4.0", "packages/google-devtools-containeranalysis": "4.4.2", "packages/google-iam": "0.3.1", "packages/google-iam-credentials": "2.0.3", diff --git a/changelog.json b/changelog.json index 4e8667c4804..6afc58d9688 100644 --- a/changelog.json +++ b/changelog.json @@ -1,6 +1,81 @@ { "repository": "googleapis/google-cloud-node", "entries": [ + { + "changes": [ + { + "type": "feat", + "sha": "1cf6d18d0d56afcc6d4f4425107aaf8d27c45709", + "message": "Expose v2 RepositoryManager for cloudbuild", + "issues": [ + "4018" + ] + } + ], + "version": "3.4.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/cloudbuild", + "id": "0d413b14-cb7d-4d30-a18a-4b37f6a9d34c", + "createTime": "2023-02-23T20:30:56.022Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "f98ece2ab73b44cdab04892f9b0e81ef18995390", + "message": "[dialogflow-cx] added gcs.proto. added support for GcsDestination and TextToSpeechSettings", + "issues": [ + "3998" + ] + } + ], + "version": "3.3.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dialogflow-cx", + "id": "528cf1b3-bd62-44a2-b39e-5746b3ea1769", + "createTime": "2023-02-23T20:30:56.020Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c530beb09626986e4eaaec3066cb6b627dce6070", + "message": "[dataproc] add support for new Dataproc features", + "issues": [ + "4000" + ] + } + ], + "version": "4.4.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dataproc", + "id": "03532a27-7e18-4a05-8afb-57ba958aac15", + "createTime": "2023-02-23T20:30:56.016Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "0bc0e904fa8890c60e61176f7e48fcbb58def595", + "message": "Change default version to v1beta1", + "issues": [ + "36" + ], + "breakingChangeNote": "change default version to v1beta1 ([#36](https://github.com/googleapis/google-cloud-node/issues/36))" + }, + { + "type": "feat", + "sha": "eaf6c343c401a132efc89fe21ec61664ae04fb8b", + "message": "Added Snooze API support", + "issues": [] + } + ], + "version": "1.0.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dataform", + "id": "f639ea51-ad62-4f59-91e6-fe45facdc576", + "createTime": "2023-02-23T20:30:56.014Z" + }, { "changes": [ { @@ -4156,5 +4231,5 @@ "createTime": "2023-01-28T04:18:24.718Z" } ], - "updateTime": "2023-02-22T06:11:36.250Z" + "updateTime": "2023-02-23T20:30:56.022Z" } \ No newline at end of file diff --git a/packages/google-cloud-dataform/CHANGELOG.md b/packages/google-cloud-dataform/CHANGELOG.md index 3736db89f3f..76a42a117bc 100644 --- a/packages/google-cloud-dataform/CHANGELOG.md +++ b/packages/google-cloud-dataform/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [1.0.0](https://github.com/googleapis/google-cloud-node/compare/dataform-v0.4.0...dataform-v1.0.0) (2023-02-23) + + +### ⚠ BREAKING CHANGES + +* change default version to v1beta1 ([#36](https://github.com/googleapis/google-cloud-node/issues/36)) + +### Features + +* Added Snooze API support ([eaf6c34](https://github.com/googleapis/google-cloud-node/commit/eaf6c343c401a132efc89fe21ec61664ae04fb8b)) +* Change default version to v1beta1 ([#36](https://github.com/googleapis/google-cloud-node/issues/36)) ([0bc0e90](https://github.com/googleapis/google-cloud-node/commit/0bc0e904fa8890c60e61176f7e48fcbb58def595)) + ## [0.4.0](https://github.com/googleapis/nodejs-dataform/compare/v0.3.0...v0.4.0) (2023-02-22) diff --git a/packages/google-cloud-dataform/package.json b/packages/google-cloud-dataform/package.json index b818983d26f..61363d7b61a 100644 --- a/packages/google-cloud-dataform/package.json +++ b/packages/google-cloud-dataform/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/dataform", - "version": "0.4.0", + "version": "1.0.0", "description": "dataform client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json b/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json index 33b4e90044a..b82f735fbd6 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataform", - "version": "0.4.0", + "version": "1.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json b/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json index db73c05ad4b..0c740085732 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataform", - "version": "0.4.0", + "version": "1.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataform/samples/package.json b/packages/google-cloud-dataform/samples/package.json index be75b9aaa75..a5a0042d896 100644 --- a/packages/google-cloud-dataform/samples/package.json +++ b/packages/google-cloud-dataform/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/dataform": "^0.4.0" + "@google-cloud/dataform": "^1.0.0" }, "devDependencies": { "c8": "^7.1.0", diff --git a/packages/google-cloud-dataproc/CHANGELOG.md b/packages/google-cloud-dataproc/CHANGELOG.md index 23b947d8a4c..7125218c54c 100644 --- a/packages/google-cloud-dataproc/CHANGELOG.md +++ b/packages/google-cloud-dataproc/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/dataproc?activeTab=versions +## [4.4.0](https://github.com/googleapis/google-cloud-node/compare/dataproc-v4.3.1...dataproc-v4.4.0) (2023-02-23) + + +### Features + +* [dataproc] add support for new Dataproc features ([#4000](https://github.com/googleapis/google-cloud-node/issues/4000)) ([c530beb](https://github.com/googleapis/google-cloud-node/commit/c530beb09626986e4eaaec3066cb6b627dce6070)) + ## [4.3.1](https://github.com/googleapis/google-cloud-node/compare/dataproc-v4.3.0...dataproc-v4.3.1) (2023-02-15) diff --git a/packages/google-cloud-dataproc/package.json b/packages/google-cloud-dataproc/package.json index 96bb50d6441..d329bb3ec5d 100644 --- a/packages/google-cloud-dataproc/package.json +++ b/packages/google-cloud-dataproc/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/dataproc", "description": "Google Cloud Dataproc API client for Node.js", - "version": "4.3.1", + "version": "4.4.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata.google.cloud.dataproc.v1.json b/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata.google.cloud.dataproc.v1.json index 0046bade657..00ac8b239b6 100644 --- a/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata.google.cloud.dataproc.v1.json +++ b/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata.google.cloud.dataproc.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataproc", - "version": "4.3.1", + "version": "4.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataproc/samples/package.json b/packages/google-cloud-dataproc/samples/package.json index ba019097022..7f89937722c 100644 --- a/packages/google-cloud-dataproc/samples/package.json +++ b/packages/google-cloud-dataproc/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha test --timeout 600000" }, "dependencies": { - "@google-cloud/dataproc": "^4.3.1", + "@google-cloud/dataproc": "^4.4.0", "@google-cloud/storage": "^6.0.0" }, "devDependencies": { diff --git a/packages/google-cloud-dialogflow-cx/CHANGELOG.md b/packages/google-cloud-dialogflow-cx/CHANGELOG.md index 968d4c8ff83..5c5e21469fa 100644 --- a/packages/google-cloud-dialogflow-cx/CHANGELOG.md +++ b/packages/google-cloud-dialogflow-cx/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [3.3.0](https://github.com/googleapis/google-cloud-node/compare/dialogflow-cx-v3.2.1...dialogflow-cx-v3.3.0) (2023-02-23) + + +### Features + +* [dialogflow-cx] added gcs.proto. added support for GcsDestination and TextToSpeechSettings ([#3998](https://github.com/googleapis/google-cloud-node/issues/3998)) ([f98ece2](https://github.com/googleapis/google-cloud-node/commit/f98ece2ab73b44cdab04892f9b0e81ef18995390)) + ## [3.2.1](https://github.com/googleapis/google-cloud-node/compare/dialogflow-cx-v3.2.0...dialogflow-cx-v3.2.1) (2023-02-15) diff --git a/packages/google-cloud-dialogflow-cx/package.json b/packages/google-cloud-dialogflow-cx/package.json index b7dac3254df..cee878147b6 100644 --- a/packages/google-cloud-dialogflow-cx/package.json +++ b/packages/google-cloud-dialogflow-cx/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/dialogflow-cx", - "version": "3.2.1", + "version": "3.3.0", "description": "Cx client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json b/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json index 2ffdb69fa46..9ff076b7a71 100644 --- a/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cx", - "version": "3.2.1", + "version": "3.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json index 958f848c7c3..17bb2af95ca 100644 --- a/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cx", - "version": "3.2.1", + "version": "3.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dialogflow-cx/samples/package.json b/packages/google-cloud-dialogflow-cx/samples/package.json index d3cb104e4cc..ea92e21bb71 100644 --- a/packages/google-cloud-dialogflow-cx/samples/package.json +++ b/packages/google-cloud-dialogflow-cx/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/dialogflow-cx": "^3.2.1", + "@google-cloud/dialogflow-cx": "^3.3.0", "uuid": "^9.0.0" }, "devDependencies": { diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index 8dbcf8c3d31..682ecbe9e38 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [3.4.0](https://github.com/googleapis/google-cloud-node/compare/cloudbuild-v3.3.0...cloudbuild-v3.4.0) (2023-02-23) + + +### Features + +* Expose v2 RepositoryManager for cloudbuild ([#4018](https://github.com/googleapis/google-cloud-node/issues/4018)) ([1cf6d18](https://github.com/googleapis/google-cloud-node/commit/1cf6d18d0d56afcc6d4f4425107aaf8d27c45709)) + ## [3.3.0](https://github.com/googleapis/google-cloud-node/compare/cloudbuild-v3.2.0...cloudbuild-v3.3.0) (2023-01-28) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 772c54f19c2..8515984e2f6 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -5,7 +5,7 @@ "url": "https://github.com/googleapis/google-cloud-node.git" }, "name": "@google-cloud/cloudbuild", - "version": "3.3.0", + "version": "3.4.0", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json index df7a6a9e151..cdad2a595fe 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudbuild", - "version": "3.3.0", + "version": "3.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata.google.devtools.cloudbuild.v2.json b/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata.google.devtools.cloudbuild.v2.json index b1ef504884c..c0971132ce9 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata.google.devtools.cloudbuild.v2.json +++ b/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata.google.devtools.cloudbuild.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudbuild", - "version": "3.3.0", + "version": "3.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 0f183a41c2b..07dbcf8797f 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^3.3.0" + "@google-cloud/cloudbuild": "^3.4.0" }, "devDependencies": { "c8": "^7.0.0", From 2b7bafd052e6a55fcc3a12a5b5f24ea0003bd42a Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Thu, 23 Feb 2023 14:38:55 -0800 Subject: [PATCH 47/80] docs: [vision] update documentation to use base64 (#4014) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: update text detection service * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- ...ippet_metadata.google.cloud.vision.v1.json | 2 +- ...etadata.google.cloud.vision.v1p1beta1.json | 2 +- ...etadata.google.cloud.vision.v1p2beta1.json | 2 +- ...etadata.google.cloud.vision.v1p3beta1.json | 2 +- ...etadata.google.cloud.vision.v1p4beta1.json | 2 +- packages/google-cloud-vision/src/helpers.ts | 39 ++++++++++++------- 6 files changed, 31 insertions(+), 18 deletions(-) diff --git a/packages/google-cloud-vision/samples/generated/v1/snippet_metadata.google.cloud.vision.v1.json b/packages/google-cloud-vision/samples/generated/v1/snippet_metadata.google.cloud.vision.v1.json index fe1da684e22..ffd4c9fe1a4 100644 --- a/packages/google-cloud-vision/samples/generated/v1/snippet_metadata.google.cloud.vision.v1.json +++ b/packages/google-cloud-vision/samples/generated/v1/snippet_metadata.google.cloud.vision.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "3.1.1", + "version": "3.1.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata.google.cloud.vision.v1p1beta1.json b/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata.google.cloud.vision.v1p1beta1.json index 49efb217800..93dffaf4b3b 100644 --- a/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata.google.cloud.vision.v1p1beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata.google.cloud.vision.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "3.1.1", + "version": "3.1.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata.google.cloud.vision.v1p2beta1.json b/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata.google.cloud.vision.v1p2beta1.json index 0dd0419744b..ac133c08237 100644 --- a/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata.google.cloud.vision.v1p2beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata.google.cloud.vision.v1p2beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "3.1.1", + "version": "3.1.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata.google.cloud.vision.v1p3beta1.json b/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata.google.cloud.vision.v1p3beta1.json index aa501bab1ea..cf029705bee 100644 --- a/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata.google.cloud.vision.v1p3beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata.google.cloud.vision.v1p3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "3.1.1", + "version": "3.1.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata.google.cloud.vision.v1p4beta1.json b/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata.google.cloud.vision.v1p4beta1.json index 84301a45851..68312f311cd 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata.google.cloud.vision.v1p4beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata.google.cloud.vision.v1p4beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "3.1.1", + "version": "3.1.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/src/helpers.ts b/packages/google-cloud-vision/src/helpers.ts index e363f3a005f..992ff6c0ad1 100644 --- a/packages/google-cloud-vision/src/helpers.ts +++ b/packages/google-cloud-vision/src/helpers.ts @@ -236,7 +236,8 @@ export function call(apiVersion: string) { * If the key is `source`, the value should be another object containing * `imageUri` or `filename` as a key and a string as a value. * - * If the key is `content`, the value should be a Buffer. + * If the key is `content`, the value should be base64 encoded text. + * See {@link https://cloud.google.com/vision/docs/base64} for the details. * @param {object[]} request.features An array of the specific annotation * features being requested. This should take a form such as: * @@ -393,7 +394,8 @@ export function call(apiVersion: string) { * If the key is `source`, the value should be another object containing * `imageUri` or `filename` as a key and a string as a value. * - * If the key is `content`, the value should be a Buffer. + * If the key is `content`, the value should be base64 encoded text. + * See {@link https://cloud.google.com/vision/docs/base64} for the details. * @param {object} [callOptions] 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} @@ -450,7 +452,8 @@ export function call(apiVersion: string) { * If the key is `source`, the value should be another object containing * `imageUri` or `filename` as a key and a string as a value. * - * If the key is `content`, the value should be a Buffer. + * If the key is `content`, the value should be base64 encoded text. + * See {@link https://cloud.google.com/vision/docs/base64} for the details. * @param {object} [callOptions] 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} @@ -507,7 +510,8 @@ export function call(apiVersion: string) { * If the key is `source`, the value should be another object containing * `imageUri` or `filename` as a key and a string as a value. * - * If the key is `content`, the value should be a Buffer. + * If the key is `content`, the value should be base64 encoded text. + * See {@link https://cloud.google.com/vision/docs/base64} for the details. * @param {object} [callOptions] 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} @@ -564,7 +568,8 @@ export function call(apiVersion: string) { * If the key is `source`, the value should be another object containing * `imageUri` or `filename` as a key and a string as a value. * - * If the key is `content`, the value should be a Buffer. + * If the key is `content`, the value should be base64 encoded text. + * See {@link https://cloud.google.com/vision/docs/base64} for the details. * @param {object} [callOptions] 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} @@ -621,7 +626,8 @@ export function call(apiVersion: string) { * If the key is `source`, the value should be another object containing * `imageUri` or `filename` as a key and a string as a value. * - * If the key is `content`, the value should be a Buffer. + * If the key is `content`, the value should be base64 encoded text. + * See {@link https://cloud.google.com/vision/docs/base64} for the details. * @param {object} [callOptions] 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} @@ -678,7 +684,8 @@ export function call(apiVersion: string) { * If the key is `source`, the value should be another object containing * `imageUri` or `filename` as a key and a string as a value. * - * If the key is `content`, the value should be a Buffer. + * If the key is `content`, the value should be base64 encoded text. + * See {@link https://cloud.google.com/vision/docs/base64} for the details. * @param {object} [callOptions] 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} @@ -735,7 +742,8 @@ export function call(apiVersion: string) { * If the key is `source`, the value should be another object containing * `imageUri` or `filename` as a key and a string as a value. * - * If the key is `content`, the value should be a Buffer. + * If the key is `content`, the value should be base64 encoded text. + * See {@link https://cloud.google.com/vision/docs/base64} for the details. * @param {object} [callOptions] 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} @@ -792,7 +800,8 @@ export function call(apiVersion: string) { * If the key is `source`, the value should be another object containing * `imageUri` or `filename` as a key and a string as a value. * - * If the key is `content`, the value should be a Buffer. + * If the key is `content`, the value should be base64 encoded text. + * See {@link https://cloud.google.com/vision/docs/base64} for the details. * @param {object} [callOptions] 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} @@ -849,7 +858,8 @@ export function call(apiVersion: string) { * If the key is `source`, the value should be another object containing * `imageUri` or `filename` as a key and a string as a value. * - * If the key is `content`, the value should be a Buffer. + * If the key is `content`, the value should be base64 encoded text. + * See {@link https://cloud.google.com/vision/docs/base64} for the details. * @param {object} [callOptions] 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} @@ -906,7 +916,8 @@ export function call(apiVersion: string) { * If the key is `source`, the value should be another object containing * `imageUri` or `filename` as a key and a string as a value. * - * If the key is `content`, the value should be a Buffer. + * If the key is `content`, the value should be base64 encoded text. + * See {@link https://cloud.google.com/vision/docs/base64} for the details. * @param {object} [callOptions] 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} @@ -963,7 +974,8 @@ export function call(apiVersion: string) { * If the key is `source`, the value should be another object containing * `imageUri` or `filename` as a key and a string as a value. * - * If the key is `content`, the value should be a Buffer. + * If the key is `content`, the value should be base64 encoded text. + * See {@link https://cloud.google.com/vision/docs/base64} for the details. * @param {object} [callOptions] Optional parameters. You can override the * default settings for this call, e.g, timeout, retries, paginations, * @param {function(?Error, ?object)} [callback] The function which will be @@ -1019,7 +1031,8 @@ export function call(apiVersion: string) { * If the key is `source`, the value should be another object containing * `imageUri` or `filename` as a key and a string as a value. * - * If the key is `content`, the value should be a Buffer. + * If the key is `content`, the value should be base64 encoded text. + * See {@link https://cloud.google.com/vision/docs/base64} for the details. * @param {object} [callOptions] 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} From 2dd56a77bc7bfcbfbbb5ba4beed27d918068fc79 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 23 Feb 2023 14:39:11 -0800 Subject: [PATCH 48/80] feat: [analytics-admin] add `CreateAccessBinding`, `GetAccessBinding`, `UpdateAccessBinding`, `DeleteAccessBinding`, `ListAccessBindings`, `BatchCreateAccessBindings`, `BatchGetAccessBindings`, `BatchUpdateAccessBindings`, `BatchDeleteAccessBindings` m... (#4001) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add `CreateAccessBinding`, `GetAccessBinding`, `UpdateAccessBinding`, `DeleteAccessBinding`, `ListAccessBindings`, `BatchCreateAccessBindings`, `BatchGetAccessBindings`, `BatchUpdateAccessBindings`, `BatchDeleteAccessBindings` methods to the Admin API v1alpha feat: add `GetExpandedDataSet`, `ListExpandedDataSets`, `CreateExpandedDataSet`, `UpdateExpandedDataSet`, `DeleteExpandedDataSet` methods to the Admin API v1alpha feat: add `AccessBinding`, `ExpandedDataSet`, `ExpandedDataSetFilter`, `ExpandedDataSetFilterExpression`, `ExpandedDataSetFilterExpressionList` resource types to the Admin API v1alpha PiperOrigin-RevId: 510499799 Source-Link: https://github.com/googleapis/googleapis/commit/82655adac34a3785eb7493c2ef91b715adce8d2f Source-Link: https://github.com/googleapis/googleapis-gen/commit/4a83c474c374dee59b1545e14a54f4d9603248fc Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFuYWx5dGljcy1hZG1pbi8uT3dsQm90LnlhbWwiLCJoIjoiNGE4M2M0NzRjMzc0ZGVlNTliMTU0NWUxNGE1NGY0ZDk2MDMyNDhmYyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- packages/google-analytics-admin/README.md | 14 + .../admin/v1alpha/analytics_admin.proto | 452 +- .../analytics/admin/v1alpha/resources.proto | 39 + .../google-analytics-admin/protos/protos.d.ts | 9511 +++-- .../google-analytics-admin/protos/protos.js | 28761 +++++++++------- .../google-analytics-admin/protos/protos.json | 1134 +- .../google-analytics-admin/samples/README.md | 252 + ...in_service.batch_create_access_bindings.js | 71 + ...in_service.batch_delete_access_bindings.js | 71 + ...admin_service.batch_get_access_bindings.js | 74 + ...in_service.batch_update_access_bindings.js | 71 + ...ics_admin_service.create_access_binding.js | 68 + ..._admin_service.create_expanded_data_set.js | 66 + ...ics_admin_service.delete_access_binding.js | 63 + ..._admin_service.delete_expanded_data_set.js | 61 + ...lytics_admin_service.get_access_binding.js | 64 + ...ics_admin_service.get_expanded_data_set.js | 62 + ...tics_admin_service.list_access_bindings.js | 79 + ...s_admin_service.list_expanded_data_sets.js | 76 + ..._admin_service.provision_account_ticket.js | 2 +- ...alytics_admin_service.run_access_report.js | 2 +- ...ics_admin_service.update_access_binding.js | 61 + .../analytics_admin_service.update_account.js | 4 +- ..._admin_service.update_expanded_data_set.js | 71 + ...tadata.google.analytics.admin.v1alpha.json | 608 +- ...etadata.google.analytics.admin.v1beta.json | 2 +- .../v1alpha/analytics_admin_service_client.ts | 4750 ++- ...analytics_admin_service_client_config.json | 70 + .../src/v1alpha/gapic_metadata.json | 148 + .../gapic_analytics_admin_service_v1alpha.ts | 5425 ++- 30 files changed, 33486 insertions(+), 18646 deletions(-) create mode 100644 packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_create_access_bindings.js create mode 100644 packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_delete_access_bindings.js create mode 100644 packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_get_access_bindings.js create mode 100644 packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_update_access_bindings.js create mode 100644 packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_access_binding.js create mode 100644 packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_expanded_data_set.js create mode 100644 packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_access_binding.js create mode 100644 packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_expanded_data_set.js create mode 100644 packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_access_binding.js create mode 100644 packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_expanded_data_set.js create mode 100644 packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_access_bindings.js create mode 100644 packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_expanded_data_sets.js create mode 100644 packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_access_binding.js create mode 100644 packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_expanded_data_set.js diff --git a/packages/google-analytics-admin/README.md b/packages/google-analytics-admin/README.md index b3cae2a9204..987b1da6b39 100644 --- a/packages/google-analytics-admin/README.md +++ b/packages/google-analytics-admin/README.md @@ -105,11 +105,16 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Analytics_admin_service.archive_custom_dimension | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_custom_dimension.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_custom_dimension.js,samples/README.md) | | Analytics_admin_service.archive_custom_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_custom_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_custom_metric.js,samples/README.md) | | Analytics_admin_service.audit_user_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.audit_user_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.audit_user_links.js,samples/README.md) | +| Analytics_admin_service.batch_create_access_bindings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_create_access_bindings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_create_access_bindings.js,samples/README.md) | | Analytics_admin_service.batch_create_user_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_create_user_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_create_user_links.js,samples/README.md) | +| Analytics_admin_service.batch_delete_access_bindings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_delete_access_bindings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_delete_access_bindings.js,samples/README.md) | | Analytics_admin_service.batch_delete_user_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_delete_user_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_delete_user_links.js,samples/README.md) | +| Analytics_admin_service.batch_get_access_bindings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_get_access_bindings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_get_access_bindings.js,samples/README.md) | | Analytics_admin_service.batch_get_user_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_get_user_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_get_user_links.js,samples/README.md) | +| Analytics_admin_service.batch_update_access_bindings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_update_access_bindings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_update_access_bindings.js,samples/README.md) | | Analytics_admin_service.batch_update_user_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_update_user_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_update_user_links.js,samples/README.md) | | Analytics_admin_service.cancel_display_video360_advertiser_link_proposal | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.cancel_display_video360_advertiser_link_proposal.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.cancel_display_video360_advertiser_link_proposal.js,samples/README.md) | +| Analytics_admin_service.create_access_binding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_access_binding.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_access_binding.js,samples/README.md) | | Analytics_admin_service.create_audience | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_audience.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_audience.js,samples/README.md) | | Analytics_admin_service.create_conversion_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_conversion_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_conversion_event.js,samples/README.md) | | Analytics_admin_service.create_custom_dimension | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_custom_dimension.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_custom_dimension.js,samples/README.md) | @@ -117,6 +122,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Analytics_admin_service.create_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_data_stream.js,samples/README.md) | | Analytics_admin_service.create_display_video360_advertiser_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link.js,samples/README.md) | | Analytics_admin_service.create_display_video360_advertiser_link_proposal | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link_proposal.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link_proposal.js,samples/README.md) | +| Analytics_admin_service.create_expanded_data_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_expanded_data_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_expanded_data_set.js,samples/README.md) | | Analytics_admin_service.create_firebase_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_firebase_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_firebase_link.js,samples/README.md) | | Analytics_admin_service.create_google_ads_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_google_ads_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_google_ads_link.js,samples/README.md) | | Analytics_admin_service.create_measurement_protocol_secret | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_measurement_protocol_secret.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_measurement_protocol_secret.js,samples/README.md) | @@ -124,12 +130,14 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Analytics_admin_service.create_search_ads360_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_search_ads360_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_search_ads360_link.js,samples/README.md) | | Analytics_admin_service.create_user_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_user_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_user_link.js,samples/README.md) | | Analytics_admin_service.create_web_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_web_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_web_data_stream.js,samples/README.md) | +| Analytics_admin_service.delete_access_binding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_access_binding.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_access_binding.js,samples/README.md) | | Analytics_admin_service.delete_account | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_account.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_account.js,samples/README.md) | | Analytics_admin_service.delete_android_app_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_android_app_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_android_app_data_stream.js,samples/README.md) | | Analytics_admin_service.delete_conversion_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_conversion_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_conversion_event.js,samples/README.md) | | Analytics_admin_service.delete_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_data_stream.js,samples/README.md) | | Analytics_admin_service.delete_display_video360_advertiser_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link.js,samples/README.md) | | Analytics_admin_service.delete_display_video360_advertiser_link_proposal | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link_proposal.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link_proposal.js,samples/README.md) | +| Analytics_admin_service.delete_expanded_data_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_expanded_data_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_expanded_data_set.js,samples/README.md) | | Analytics_admin_service.delete_firebase_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_firebase_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_firebase_link.js,samples/README.md) | | Analytics_admin_service.delete_google_ads_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_google_ads_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_google_ads_link.js,samples/README.md) | | Analytics_admin_service.delete_ios_app_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_ios_app_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_ios_app_data_stream.js,samples/README.md) | @@ -139,6 +147,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Analytics_admin_service.delete_user_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_user_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_user_link.js,samples/README.md) | | Analytics_admin_service.delete_web_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_web_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_web_data_stream.js,samples/README.md) | | Analytics_admin_service.fetch_automated_ga4_configuration_opt_out | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.fetch_automated_ga4_configuration_opt_out.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.fetch_automated_ga4_configuration_opt_out.js,samples/README.md) | +| Analytics_admin_service.get_access_binding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_access_binding.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_access_binding.js,samples/README.md) | | Analytics_admin_service.get_account | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_account.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_account.js,samples/README.md) | | Analytics_admin_service.get_android_app_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_android_app_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_android_app_data_stream.js,samples/README.md) | | Analytics_admin_service.get_attribution_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_attribution_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_attribution_settings.js,samples/README.md) | @@ -153,6 +162,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Analytics_admin_service.get_display_video360_advertiser_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link.js,samples/README.md) | | Analytics_admin_service.get_display_video360_advertiser_link_proposal | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link_proposal.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link_proposal.js,samples/README.md) | | Analytics_admin_service.get_enhanced_measurement_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_enhanced_measurement_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_enhanced_measurement_settings.js,samples/README.md) | +| Analytics_admin_service.get_expanded_data_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_expanded_data_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_expanded_data_set.js,samples/README.md) | | Analytics_admin_service.get_global_site_tag | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_global_site_tag.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_global_site_tag.js,samples/README.md) | | Analytics_admin_service.get_google_signals_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_google_signals_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_google_signals_settings.js,samples/README.md) | | Analytics_admin_service.get_ios_app_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_ios_app_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_ios_app_data_stream.js,samples/README.md) | @@ -161,6 +171,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Analytics_admin_service.get_search_ads360_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_search_ads360_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_search_ads360_link.js,samples/README.md) | | Analytics_admin_service.get_user_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_user_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_user_link.js,samples/README.md) | | Analytics_admin_service.get_web_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_web_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_web_data_stream.js,samples/README.md) | +| Analytics_admin_service.list_access_bindings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_access_bindings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_access_bindings.js,samples/README.md) | | Analytics_admin_service.list_account_summaries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_account_summaries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_account_summaries.js,samples/README.md) | | Analytics_admin_service.list_accounts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_accounts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_accounts.js,samples/README.md) | | Analytics_admin_service.list_android_app_data_streams | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_android_app_data_streams.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_android_app_data_streams.js,samples/README.md) | @@ -172,6 +183,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Analytics_admin_service.list_data_streams | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_data_streams.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_data_streams.js,samples/README.md) | | Analytics_admin_service.list_display_video360_advertiser_link_proposals | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_link_proposals.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_link_proposals.js,samples/README.md) | | Analytics_admin_service.list_display_video360_advertiser_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_links.js,samples/README.md) | +| Analytics_admin_service.list_expanded_data_sets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_expanded_data_sets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_expanded_data_sets.js,samples/README.md) | | Analytics_admin_service.list_firebase_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_firebase_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_firebase_links.js,samples/README.md) | | Analytics_admin_service.list_google_ads_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_google_ads_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_google_ads_links.js,samples/README.md) | | Analytics_admin_service.list_ios_app_data_streams | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_ios_app_data_streams.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_ios_app_data_streams.js,samples/README.md) | @@ -184,6 +196,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Analytics_admin_service.run_access_report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.run_access_report.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.run_access_report.js,samples/README.md) | | Analytics_admin_service.search_change_history_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.search_change_history_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.search_change_history_events.js,samples/README.md) | | Analytics_admin_service.set_automated_ga4_configuration_opt_out | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.set_automated_ga4_configuration_opt_out.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.set_automated_ga4_configuration_opt_out.js,samples/README.md) | +| Analytics_admin_service.update_access_binding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_access_binding.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_access_binding.js,samples/README.md) | | Analytics_admin_service.update_account | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_account.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_account.js,samples/README.md) | | Analytics_admin_service.update_android_app_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_android_app_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_android_app_data_stream.js,samples/README.md) | | Analytics_admin_service.update_attribution_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_attribution_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_attribution_settings.js,samples/README.md) | @@ -194,6 +207,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Analytics_admin_service.update_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_data_stream.js,samples/README.md) | | Analytics_admin_service.update_display_video360_advertiser_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_display_video360_advertiser_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_display_video360_advertiser_link.js,samples/README.md) | | Analytics_admin_service.update_enhanced_measurement_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_enhanced_measurement_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_enhanced_measurement_settings.js,samples/README.md) | +| Analytics_admin_service.update_expanded_data_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_expanded_data_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_expanded_data_set.js,samples/README.md) | | Analytics_admin_service.update_google_ads_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_google_ads_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_google_ads_link.js,samples/README.md) | | Analytics_admin_service.update_google_signals_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_google_signals_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_google_signals_settings.js,samples/README.md) | | Analytics_admin_service.update_ios_app_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_ios_app_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_ios_app_data_stream.js,samples/README.md) | diff --git a/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/analytics_admin.proto b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/analytics_admin.proto index dbba107286f..0e9d7a9615e 100644 --- a/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/analytics_admin.proto +++ b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/analytics_admin.proto @@ -18,6 +18,7 @@ package google.analytics.admin.v1alpha; import "google/analytics/admin/v1alpha/access_report.proto"; import "google/analytics/admin/v1alpha/audience.proto"; +import "google/analytics/admin/v1alpha/expanded_data_set.proto"; import "google/analytics/admin/v1alpha/resources.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; @@ -427,7 +428,8 @@ service AnalyticsAdminService { // Acknowledges the terms of user data collection for the specified property. // // This acknowledgement must be completed (either in the Google Analytics UI - // or via this API) before MeasurementProtocolSecret resources may be created. + // or through this API) before MeasurementProtocolSecret resources may be + // created. rpc AcknowledgeUserDataCollection(AcknowledgeUserDataCollectionRequest) returns (AcknowledgeUserDataCollectionResponse) { option (google.api.http) = { @@ -919,6 +921,168 @@ service AnalyticsAdminService { }; } + // Creates an access binding on an account or property. + rpc CreateAccessBinding(CreateAccessBindingRequest) returns (AccessBinding) { + option (google.api.http) = { + post: "/v1alpha/{parent=accounts/*}/accessBindings" + body: "access_binding" + additional_bindings { + post: "/v1alpha/{parent=properties/*}/accessBindings" + body: "access_binding" + } + }; + option (google.api.method_signature) = "parent,access_binding"; + } + + // Gets information about an access binding. + rpc GetAccessBinding(GetAccessBindingRequest) returns (AccessBinding) { + option (google.api.http) = { + get: "/v1alpha/{name=accounts/*/accessBindings/*}" + additional_bindings { + get: "/v1alpha/{name=properties/*/accessBindings/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Updates an access binding on an account or property. + rpc UpdateAccessBinding(UpdateAccessBindingRequest) returns (AccessBinding) { + option (google.api.http) = { + patch: "/v1alpha/{access_binding.name=accounts/*/accessBindings/*}" + body: "access_binding" + additional_bindings { + patch: "/v1alpha/{access_binding.name=properties/*/accessBindings/*}" + body: "access_binding" + } + }; + option (google.api.method_signature) = "access_binding"; + } + + // Deletes an access binding on an account or property. + rpc DeleteAccessBinding(DeleteAccessBindingRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=accounts/*/accessBindings/*}" + additional_bindings { + delete: "/v1alpha/{name=properties/*/accessBindings/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Lists all access bindings on an account or property. + rpc ListAccessBindings(ListAccessBindingsRequest) + returns (ListAccessBindingsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=accounts/*}/accessBindings" + additional_bindings { + get: "/v1alpha/{parent=properties/*}/accessBindings" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Creates information about multiple access bindings to an account or + // property. + // + // This method is transactional. If any AccessBinding cannot be created, none + // of the AccessBindings will be created. + rpc BatchCreateAccessBindings(BatchCreateAccessBindingsRequest) + returns (BatchCreateAccessBindingsResponse) { + option (google.api.http) = { + post: "/v1alpha/{parent=accounts/*}/accessBindings:batchCreate" + body: "*" + additional_bindings { + post: "/v1alpha/{parent=properties/*}/accessBindings:batchCreate" + body: "*" + } + }; + } + + // Gets information about multiple access bindings to an account or property. + rpc BatchGetAccessBindings(BatchGetAccessBindingsRequest) + returns (BatchGetAccessBindingsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=accounts/*}/accessBindings:batchGet" + additional_bindings { + get: "/v1alpha/{parent=properties/*}/accessBindings:batchGet" + } + }; + } + + // Updates information about multiple access bindings to an account or + // property. + rpc BatchUpdateAccessBindings(BatchUpdateAccessBindingsRequest) + returns (BatchUpdateAccessBindingsResponse) { + option (google.api.http) = { + post: "/v1alpha/{parent=accounts/*}/accessBindings:batchUpdate" + body: "*" + additional_bindings { + post: "/v1alpha/{parent=properties/*}/accessBindings:batchUpdate" + body: "*" + } + }; + } + + // Deletes information about multiple users' links to an account or property. + rpc BatchDeleteAccessBindings(BatchDeleteAccessBindingsRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1alpha/{parent=accounts/*}/accessBindings:batchDelete" + body: "*" + additional_bindings { + post: "/v1alpha/{parent=properties/*}/accessBindings:batchDelete" + body: "*" + } + }; + } + + // Lookup for a single ExpandedDataSet. + rpc GetExpandedDataSet(GetExpandedDataSetRequest) returns (ExpandedDataSet) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/expandedDataSets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists ExpandedDataSets on a property. + rpc ListExpandedDataSets(ListExpandedDataSetsRequest) + returns (ListExpandedDataSetsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*}/expandedDataSets" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a ExpandedDataSet. + rpc CreateExpandedDataSet(CreateExpandedDataSetRequest) + returns (ExpandedDataSet) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*}/expandedDataSets" + body: "expanded_data_set" + }; + option (google.api.method_signature) = "parent,expanded_data_set"; + } + + // Updates a ExpandedDataSet on a property. + rpc UpdateExpandedDataSet(UpdateExpandedDataSetRequest) + returns (ExpandedDataSet) { + option (google.api.http) = { + patch: "/v1alpha/{expanded_data_set.name=properties/*/expandedDataSets/*}" + body: "expanded_data_set" + }; + option (google.api.method_signature) = "expanded_data_set,update_mask"; + } + + // Deletes a ExpandedDataSet on a property. + rpc DeleteExpandedDataSet(DeleteExpandedDataSetRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=properties/*/expandedDataSets/*}" + }; + option (google.api.method_signature) = "name"; + } + // Sets the opt out status for the automated GA4 setup process for a UA // property. // Note: this has no effect on GA4 property. @@ -983,7 +1147,7 @@ message RunAccessReportRequest { // to 2 date ranges. repeated AccessDateRange date_ranges = 4; - // Dimension filters allow you to restrict report response to specific + // Dimension filters let you restrict report response to specific // dimension values which match the filter. For example, filtering on access // records of a single user. To learn more, see [Fundamentals of Dimension // Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) @@ -1127,8 +1291,8 @@ message UpdateAccountRequest { Account account = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The list of fields to be updated. Field names must be in snake - // case (e.g., "field_to_update"). Omitted fields will not be updated. To - // replace the entire entity, use one path with the string "*" to match all + // case (for example, "field_to_update"). Omitted fields will not be updated. + // To replace the entire entity, use one path with the string "*" to match all // fields. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; @@ -1140,7 +1304,7 @@ message ProvisionAccountTicketRequest { Account account = 1; // Redirect URI where the user will be sent after accepting Terms of Service. - // Must be configured in Developers Console as a Redirect URI + // Must be configured in Developers Console as a Redirect URI. string redirect_uri = 2; } @@ -2598,6 +2762,284 @@ message UpdateAttributionSettingsRequest { [(google.api.field_behavior) = REQUIRED]; } +// Request message for GetAccessBinding RPC. +message GetAccessBindingRequest { + // Required. The name of the access binding to retrieve. + // Formats: + // - accounts/{account}/accessBindings/{accessBinding} + // - properties/{property}/accessBindings/{accessBinding} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/AccessBinding" + } + ]; +} + +// Request message for BatchGetAccessBindings RPC. +message BatchGetAccessBindingsRequest { + // Required. The account or property that owns the access bindings. The parent + // of all provided values for the 'names' field must match this field. + // Formats: + // - accounts/{account} + // - properties/{property} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/AccessBinding" + } + ]; + + // Required. The names of the access bindings to retrieve. + // A maximum of 1000 access bindings can be retrieved in a batch. + // Formats: + // - accounts/{account}/accessBindings/{accessBinding} + // - properties/{property}/accessBindings/{accessBinding} + repeated string names = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/AccessBinding" + } + ]; +} + +// Response message for BatchGetAccessBindings RPC. +message BatchGetAccessBindingsResponse { + // The requested access bindings. + repeated AccessBinding access_bindings = 1; +} + +// Request message for ListAccessBindings RPC. +message ListAccessBindingsRequest { + // Required. Formats: + // - accounts/{account} + // - properties/{property} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/AccessBinding" + } + ]; + + // The maximum number of access bindings to return. + // The service may return fewer than this value. + // If unspecified, at most 200 access bindings will be returned. + // The maximum value is 500; values above 500 will be coerced to 500. + int32 page_size = 2; + + // A page token, received from a previous `ListAccessBindings` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListAccessBindings` must + // match the call that provided the page token. + string page_token = 3; +} + +// Response message for ListAccessBindings RPC. +message ListAccessBindingsResponse { + // List of AccessBindings. These will be ordered stably, but in an arbitrary + // order. + repeated AccessBinding access_bindings = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for CreateAccessBinding RPC. +message CreateAccessBindingRequest { + // Required. Formats: + // - accounts/{account} + // - properties/{property} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/AccessBinding" + } + ]; + + // Required. The access binding to create. + AccessBinding access_binding = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for BatchCreateAccessBindings RPC. +message BatchCreateAccessBindingsRequest { + // Required. The account or property that owns the access bindings. The parent + // field in the CreateAccessBindingRequest messages must either be empty or + // match this field. Formats: + // - accounts/{account} + // - properties/{property} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/AccessBinding" + } + ]; + + // Required. The requests specifying the access bindings to create. + // A maximum of 1000 access bindings can be created in a batch. + repeated CreateAccessBindingRequest requests = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for BatchCreateAccessBindings RPC. +message BatchCreateAccessBindingsResponse { + // The access bindings created. + repeated AccessBinding access_bindings = 1; +} + +// Request message for UpdateAccessBinding RPC. +message UpdateAccessBindingRequest { + // Required. The access binding to update. + AccessBinding access_binding = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for BatchUpdateAccessBindings RPC. +message BatchUpdateAccessBindingsRequest { + // Required. The account or property that owns the access bindings. The parent + // field in the UpdateAccessBindingRequest messages must either be empty or + // match this field. Formats: + // - accounts/{account} + // - properties/{property} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/AccessBinding" + } + ]; + + // Required. The requests specifying the access bindings to update. + // A maximum of 1000 access bindings can be updated in a batch. + repeated UpdateAccessBindingRequest requests = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for BatchUpdateAccessBindings RPC. +message BatchUpdateAccessBindingsResponse { + // The access bindings updated. + repeated AccessBinding access_bindings = 1; +} + +// Request message for DeleteAccessBinding RPC. +message DeleteAccessBindingRequest { + // Required. Formats: + // - accounts/{account}/accessBindings/{accessBinding} + // - properties/{property}/accessBindings/{accessBinding} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/AccessBinding" + } + ]; +} + +// Request message for BatchDeleteAccessBindings RPC. +message BatchDeleteAccessBindingsRequest { + // Required. The account or property that owns the access bindings. The parent + // field in the DeleteAccessBindingRequest messages must either be empty or + // match this field. Formats: + // - accounts/{account} + // - properties/{property} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/AccessBinding" + } + ]; + + // Required. The requests specifying the access bindings to delete. + // A maximum of 1000 access bindings can be deleted in a batch. + repeated DeleteAccessBindingRequest requests = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for CreateExpandedDataSet RPC. +message CreateExpandedDataSetRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/ExpandedDataSet" + } + ]; + + // Required. The ExpandedDataSet to create. + ExpandedDataSet expanded_data_set = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for UpdateExpandedDataSet RPC. +message UpdateExpandedDataSetRequest { + // Required. The ExpandedDataSet to update. + // The resource's `name` field is used to identify the ExpandedDataSet to be + // updated. + ExpandedDataSet expanded_data_set = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to be updated. Field names must be in snake + // case (e.g., "field_to_update"). Omitted fields will not be updated. To + // replace the entire entity, use one path with the string "*" to match all + // fields. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteExpandedDataSet RPC. +message DeleteExpandedDataSetRequest { + // Required. Example format: properties/1234/expandedDataSets/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/ExpandedDataSet" + } + ]; +} + +// Request message for GetExpandedDataSet RPC. +message GetExpandedDataSetRequest { + // Required. The name of the Audience to get. + // Example format: properties/1234/expandedDataSets/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/ExpandedDataSet" + } + ]; +} + +// Request message for ListExpandedDataSets RPC. +message ListExpandedDataSetsRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/ExpandedDataSet" + } + ]; + + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200 (higher values will be coerced to the maximum). + int32 page_size = 2; + + // A page token, received from a previous `ListExpandedDataSets` call. Provide + // this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListExpandedDataSet` + // must match the call that provided the page token. + string page_token = 3; +} + +// Response message for ListExpandedDataSets RPC. +message ListExpandedDataSetsResponse { + // List of ExpandedDataSet. These will be ordered stably, but in an arbitrary + // order. + repeated ExpandedDataSet expanded_data_sets = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + // Request for setting the opt out status for the automated GA4 setup process. message SetAutomatedGa4ConfigurationOptOutRequest { // Required. The UA property to set the opt out status. Note this request uses diff --git a/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/resources.proto b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/resources.proto index eb968d9c8a5..a035611d95a 100644 --- a/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/resources.proto +++ b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/resources.proto @@ -1394,6 +1394,45 @@ message AttributionSettings { [(google.api.field_behavior) = REQUIRED]; } +// A binding of a user to a set of roles. +message AccessBinding { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/AccessBinding" + pattern: "accounts/{account}/accessBindings/{access_binding}" + pattern: "properties/{property}/accessBindings/{access_binding}" + }; + + // The target for which to set roles for. + oneof access_target { + // If set, the email address of the user to set roles for. + // Format: "someuser@gmail.com" + string user = 2; + } + + // Output only. Resource name of this binding. + // + // Format: accounts/{account}/accessBindings/{access_binding} or + // properties/{property}/accessBindings/{access_binding} + // + // Example: + // "accounts/100/accessBindings/200" + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A list of roles for to grant to the parent resource. + // + // Valid values: + // predefinedRoles/viewer + // predefinedRoles/analyst + // predefinedRoles/editor + // predefinedRoles/admin + // predefinedRoles/no-cost-data + // predefinedRoles/no-revenue-data + // + // For users, if an empty list of roles is set, this AccessBinding will be + // deleted. + repeated string roles = 3; +} + // A link between a GA4 Property and BigQuery project. message BigQueryLink { option (google.api.resource) = { diff --git a/packages/google-analytics-admin/protos/protos.d.ts b/packages/google-analytics-admin/protos/protos.d.ts index de830cad46d..1fa8a6e962b 100644 --- a/packages/google-analytics-admin/protos/protos.d.ts +++ b/packages/google-analytics-admin/protos/protos.d.ts @@ -3450,6 +3450,202 @@ export namespace google { */ public runAccessReport(request: google.analytics.admin.v1alpha.IRunAccessReportRequest): Promise; + /** + * Calls CreateAccessBinding. + * @param request CreateAccessBindingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AccessBinding + */ + public createAccessBinding(request: google.analytics.admin.v1alpha.ICreateAccessBindingRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateAccessBindingCallback): void; + + /** + * Calls CreateAccessBinding. + * @param request CreateAccessBindingRequest message or plain object + * @returns Promise + */ + public createAccessBinding(request: google.analytics.admin.v1alpha.ICreateAccessBindingRequest): Promise; + + /** + * Calls GetAccessBinding. + * @param request GetAccessBindingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AccessBinding + */ + public getAccessBinding(request: google.analytics.admin.v1alpha.IGetAccessBindingRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.GetAccessBindingCallback): void; + + /** + * Calls GetAccessBinding. + * @param request GetAccessBindingRequest message or plain object + * @returns Promise + */ + public getAccessBinding(request: google.analytics.admin.v1alpha.IGetAccessBindingRequest): Promise; + + /** + * Calls UpdateAccessBinding. + * @param request UpdateAccessBindingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AccessBinding + */ + public updateAccessBinding(request: google.analytics.admin.v1alpha.IUpdateAccessBindingRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateAccessBindingCallback): void; + + /** + * Calls UpdateAccessBinding. + * @param request UpdateAccessBindingRequest message or plain object + * @returns Promise + */ + public updateAccessBinding(request: google.analytics.admin.v1alpha.IUpdateAccessBindingRequest): Promise; + + /** + * Calls DeleteAccessBinding. + * @param request DeleteAccessBindingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteAccessBinding(request: google.analytics.admin.v1alpha.IDeleteAccessBindingRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteAccessBindingCallback): void; + + /** + * Calls DeleteAccessBinding. + * @param request DeleteAccessBindingRequest message or plain object + * @returns Promise + */ + public deleteAccessBinding(request: google.analytics.admin.v1alpha.IDeleteAccessBindingRequest): Promise; + + /** + * Calls ListAccessBindings. + * @param request ListAccessBindingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAccessBindingsResponse + */ + public listAccessBindings(request: google.analytics.admin.v1alpha.IListAccessBindingsRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.ListAccessBindingsCallback): void; + + /** + * Calls ListAccessBindings. + * @param request ListAccessBindingsRequest message or plain object + * @returns Promise + */ + public listAccessBindings(request: google.analytics.admin.v1alpha.IListAccessBindingsRequest): Promise; + + /** + * Calls BatchCreateAccessBindings. + * @param request BatchCreateAccessBindingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchCreateAccessBindingsResponse + */ + public batchCreateAccessBindings(request: google.analytics.admin.v1alpha.IBatchCreateAccessBindingsRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.BatchCreateAccessBindingsCallback): void; + + /** + * Calls BatchCreateAccessBindings. + * @param request BatchCreateAccessBindingsRequest message or plain object + * @returns Promise + */ + public batchCreateAccessBindings(request: google.analytics.admin.v1alpha.IBatchCreateAccessBindingsRequest): Promise; + + /** + * Calls BatchGetAccessBindings. + * @param request BatchGetAccessBindingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchGetAccessBindingsResponse + */ + public batchGetAccessBindings(request: google.analytics.admin.v1alpha.IBatchGetAccessBindingsRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.BatchGetAccessBindingsCallback): void; + + /** + * Calls BatchGetAccessBindings. + * @param request BatchGetAccessBindingsRequest message or plain object + * @returns Promise + */ + public batchGetAccessBindings(request: google.analytics.admin.v1alpha.IBatchGetAccessBindingsRequest): Promise; + + /** + * Calls BatchUpdateAccessBindings. + * @param request BatchUpdateAccessBindingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchUpdateAccessBindingsResponse + */ + public batchUpdateAccessBindings(request: google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.BatchUpdateAccessBindingsCallback): void; + + /** + * Calls BatchUpdateAccessBindings. + * @param request BatchUpdateAccessBindingsRequest message or plain object + * @returns Promise + */ + public batchUpdateAccessBindings(request: google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsRequest): Promise; + + /** + * Calls BatchDeleteAccessBindings. + * @param request BatchDeleteAccessBindingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public batchDeleteAccessBindings(request: google.analytics.admin.v1alpha.IBatchDeleteAccessBindingsRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.BatchDeleteAccessBindingsCallback): void; + + /** + * Calls BatchDeleteAccessBindings. + * @param request BatchDeleteAccessBindingsRequest message or plain object + * @returns Promise + */ + public batchDeleteAccessBindings(request: google.analytics.admin.v1alpha.IBatchDeleteAccessBindingsRequest): Promise; + + /** + * Calls GetExpandedDataSet. + * @param request GetExpandedDataSetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ExpandedDataSet + */ + public getExpandedDataSet(request: google.analytics.admin.v1alpha.IGetExpandedDataSetRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.GetExpandedDataSetCallback): void; + + /** + * Calls GetExpandedDataSet. + * @param request GetExpandedDataSetRequest message or plain object + * @returns Promise + */ + public getExpandedDataSet(request: google.analytics.admin.v1alpha.IGetExpandedDataSetRequest): Promise; + + /** + * Calls ListExpandedDataSets. + * @param request ListExpandedDataSetsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListExpandedDataSetsResponse + */ + public listExpandedDataSets(request: google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.ListExpandedDataSetsCallback): void; + + /** + * Calls ListExpandedDataSets. + * @param request ListExpandedDataSetsRequest message or plain object + * @returns Promise + */ + public listExpandedDataSets(request: google.analytics.admin.v1alpha.IListExpandedDataSetsRequest): Promise; + + /** + * Calls CreateExpandedDataSet. + * @param request CreateExpandedDataSetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ExpandedDataSet + */ + public createExpandedDataSet(request: google.analytics.admin.v1alpha.ICreateExpandedDataSetRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateExpandedDataSetCallback): void; + + /** + * Calls CreateExpandedDataSet. + * @param request CreateExpandedDataSetRequest message or plain object + * @returns Promise + */ + public createExpandedDataSet(request: google.analytics.admin.v1alpha.ICreateExpandedDataSetRequest): Promise; + + /** + * Calls UpdateExpandedDataSet. + * @param request UpdateExpandedDataSetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ExpandedDataSet + */ + public updateExpandedDataSet(request: google.analytics.admin.v1alpha.IUpdateExpandedDataSetRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateExpandedDataSetCallback): void; + + /** + * Calls UpdateExpandedDataSet. + * @param request UpdateExpandedDataSetRequest message or plain object + * @returns Promise + */ + public updateExpandedDataSet(request: google.analytics.admin.v1alpha.IUpdateExpandedDataSetRequest): Promise; + + /** + * Calls DeleteExpandedDataSet. + * @param request DeleteExpandedDataSetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteExpandedDataSet(request: google.analytics.admin.v1alpha.IDeleteExpandedDataSetRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteExpandedDataSetCallback): void; + + /** + * Calls DeleteExpandedDataSet. + * @param request DeleteExpandedDataSetRequest message or plain object + * @returns Promise + */ + public deleteExpandedDataSet(request: google.analytics.admin.v1alpha.IDeleteExpandedDataSetRequest): Promise; + /** * Calls SetAutomatedGa4ConfigurationOptOut. * @param request SetAutomatedGa4ConfigurationOptOutRequest message or plain object @@ -4097,6 +4293,104 @@ export namespace google { */ type RunAccessReportCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.RunAccessReportResponse) => void; + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createAccessBinding}. + * @param error Error, if any + * @param [response] AccessBinding + */ + type CreateAccessBindingCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.AccessBinding) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getAccessBinding}. + * @param error Error, if any + * @param [response] AccessBinding + */ + type GetAccessBindingCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.AccessBinding) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateAccessBinding}. + * @param error Error, if any + * @param [response] AccessBinding + */ + type UpdateAccessBindingCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.AccessBinding) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteAccessBinding}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteAccessBindingCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listAccessBindings}. + * @param error Error, if any + * @param [response] ListAccessBindingsResponse + */ + type ListAccessBindingsCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ListAccessBindingsResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|batchCreateAccessBindings}. + * @param error Error, if any + * @param [response] BatchCreateAccessBindingsResponse + */ + type BatchCreateAccessBindingsCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|batchGetAccessBindings}. + * @param error Error, if any + * @param [response] BatchGetAccessBindingsResponse + */ + type BatchGetAccessBindingsCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|batchUpdateAccessBindings}. + * @param error Error, if any + * @param [response] BatchUpdateAccessBindingsResponse + */ + type BatchUpdateAccessBindingsCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|batchDeleteAccessBindings}. + * @param error Error, if any + * @param [response] Empty + */ + type BatchDeleteAccessBindingsCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getExpandedDataSet}. + * @param error Error, if any + * @param [response] ExpandedDataSet + */ + type GetExpandedDataSetCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ExpandedDataSet) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listExpandedDataSets}. + * @param error Error, if any + * @param [response] ListExpandedDataSetsResponse + */ + type ListExpandedDataSetsCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ListExpandedDataSetsResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createExpandedDataSet}. + * @param error Error, if any + * @param [response] ExpandedDataSet + */ + type CreateExpandedDataSetCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ExpandedDataSet) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateExpandedDataSet}. + * @param error Error, if any + * @param [response] ExpandedDataSet + */ + type UpdateExpandedDataSetCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ExpandedDataSet) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteExpandedDataSet}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteExpandedDataSetCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + /** * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|setAutomatedGa4ConfigurationOptOut}. * @param error Error, if any @@ -15220,6910 +15514,8943 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SetAutomatedGa4ConfigurationOptOutRequest. */ - interface ISetAutomatedGa4ConfigurationOptOutRequest { - - /** SetAutomatedGa4ConfigurationOptOutRequest property */ - property?: (string|null); + /** Properties of a GetAccessBindingRequest. */ + interface IGetAccessBindingRequest { - /** SetAutomatedGa4ConfigurationOptOutRequest optOut */ - optOut?: (boolean|null); + /** GetAccessBindingRequest name */ + name?: (string|null); } - /** Represents a SetAutomatedGa4ConfigurationOptOutRequest. */ - class SetAutomatedGa4ConfigurationOptOutRequest implements ISetAutomatedGa4ConfigurationOptOutRequest { + /** Represents a GetAccessBindingRequest. */ + class GetAccessBindingRequest implements IGetAccessBindingRequest { /** - * Constructs a new SetAutomatedGa4ConfigurationOptOutRequest. + * Constructs a new GetAccessBindingRequest. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest); + constructor(properties?: google.analytics.admin.v1alpha.IGetAccessBindingRequest); - /** SetAutomatedGa4ConfigurationOptOutRequest property. */ - public property: string; - - /** SetAutomatedGa4ConfigurationOptOutRequest optOut. */ - public optOut: boolean; + /** GetAccessBindingRequest name. */ + public name: string; /** - * Creates a new SetAutomatedGa4ConfigurationOptOutRequest instance using the specified properties. + * Creates a new GetAccessBindingRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SetAutomatedGa4ConfigurationOptOutRequest instance + * @returns GetAccessBindingRequest instance */ - public static create(properties?: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest): google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest; + public static create(properties?: google.analytics.admin.v1alpha.IGetAccessBindingRequest): google.analytics.admin.v1alpha.GetAccessBindingRequest; /** - * Encodes the specified SetAutomatedGa4ConfigurationOptOutRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. - * @param message SetAutomatedGa4ConfigurationOptOutRequest message or plain object to encode + * Encodes the specified GetAccessBindingRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetAccessBindingRequest.verify|verify} messages. + * @param message GetAccessBindingRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IGetAccessBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SetAutomatedGa4ConfigurationOptOutRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. - * @param message SetAutomatedGa4ConfigurationOptOutRequest message or plain object to encode + * Encodes the specified GetAccessBindingRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetAccessBindingRequest.verify|verify} messages. + * @param message GetAccessBindingRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGetAccessBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SetAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer. + * Decodes a GetAccessBindingRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SetAutomatedGa4ConfigurationOptOutRequest + * @returns GetAccessBindingRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GetAccessBindingRequest; /** - * Decodes a SetAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer, length delimited. + * Decodes a GetAccessBindingRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SetAutomatedGa4ConfigurationOptOutRequest + * @returns GetAccessBindingRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GetAccessBindingRequest; /** - * Verifies a SetAutomatedGa4ConfigurationOptOutRequest message. + * Verifies a GetAccessBindingRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SetAutomatedGa4ConfigurationOptOutRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetAccessBindingRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SetAutomatedGa4ConfigurationOptOutRequest + * @returns GetAccessBindingRequest */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GetAccessBindingRequest; /** - * Creates a plain object from a SetAutomatedGa4ConfigurationOptOutRequest message. Also converts values to other types if specified. - * @param message SetAutomatedGa4ConfigurationOptOutRequest + * Creates a plain object from a GetAccessBindingRequest message. Also converts values to other types if specified. + * @param message GetAccessBindingRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.GetAccessBindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SetAutomatedGa4ConfigurationOptOutRequest to JSON. + * Converts this GetAccessBindingRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SetAutomatedGa4ConfigurationOptOutRequest + * Gets the default type url for GetAccessBindingRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SetAutomatedGa4ConfigurationOptOutResponse. */ - interface ISetAutomatedGa4ConfigurationOptOutResponse { + /** Properties of a BatchGetAccessBindingsRequest. */ + interface IBatchGetAccessBindingsRequest { + + /** BatchGetAccessBindingsRequest parent */ + parent?: (string|null); + + /** BatchGetAccessBindingsRequest names */ + names?: (string[]|null); } - /** Represents a SetAutomatedGa4ConfigurationOptOutResponse. */ - class SetAutomatedGa4ConfigurationOptOutResponse implements ISetAutomatedGa4ConfigurationOptOutResponse { + /** Represents a BatchGetAccessBindingsRequest. */ + class BatchGetAccessBindingsRequest implements IBatchGetAccessBindingsRequest { /** - * Constructs a new SetAutomatedGa4ConfigurationOptOutResponse. + * Constructs a new BatchGetAccessBindingsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse); + constructor(properties?: google.analytics.admin.v1alpha.IBatchGetAccessBindingsRequest); + + /** BatchGetAccessBindingsRequest parent. */ + public parent: string; + + /** BatchGetAccessBindingsRequest names. */ + public names: string[]; /** - * Creates a new SetAutomatedGa4ConfigurationOptOutResponse instance using the specified properties. + * Creates a new BatchGetAccessBindingsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SetAutomatedGa4ConfigurationOptOutResponse instance + * @returns BatchGetAccessBindingsRequest instance */ - public static create(properties?: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse): google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse; + public static create(properties?: google.analytics.admin.v1alpha.IBatchGetAccessBindingsRequest): google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest; /** - * Encodes the specified SetAutomatedGa4ConfigurationOptOutResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. - * @param message SetAutomatedGa4ConfigurationOptOutResponse message or plain object to encode + * Encodes the specified BatchGetAccessBindingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest.verify|verify} messages. + * @param message BatchGetAccessBindingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IBatchGetAccessBindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SetAutomatedGa4ConfigurationOptOutResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. - * @param message SetAutomatedGa4ConfigurationOptOutResponse message or plain object to encode + * Encodes the specified BatchGetAccessBindingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest.verify|verify} messages. + * @param message BatchGetAccessBindingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IBatchGetAccessBindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SetAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer. + * Decodes a BatchGetAccessBindingsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SetAutomatedGa4ConfigurationOptOutResponse + * @returns BatchGetAccessBindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest; /** - * Decodes a SetAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer, length delimited. + * Decodes a BatchGetAccessBindingsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SetAutomatedGa4ConfigurationOptOutResponse + * @returns BatchGetAccessBindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest; /** - * Verifies a SetAutomatedGa4ConfigurationOptOutResponse message. + * Verifies a BatchGetAccessBindingsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SetAutomatedGa4ConfigurationOptOutResponse message from a plain object. Also converts values to their respective internal types. + * Creates a BatchGetAccessBindingsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SetAutomatedGa4ConfigurationOptOutResponse + * @returns BatchGetAccessBindingsRequest */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest; /** - * Creates a plain object from a SetAutomatedGa4ConfigurationOptOutResponse message. Also converts values to other types if specified. - * @param message SetAutomatedGa4ConfigurationOptOutResponse + * Creates a plain object from a BatchGetAccessBindingsRequest message. Also converts values to other types if specified. + * @param message BatchGetAccessBindingsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SetAutomatedGa4ConfigurationOptOutResponse to JSON. + * Converts this BatchGetAccessBindingsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SetAutomatedGa4ConfigurationOptOutResponse + * Gets the default type url for BatchGetAccessBindingsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FetchAutomatedGa4ConfigurationOptOutRequest. */ - interface IFetchAutomatedGa4ConfigurationOptOutRequest { + /** Properties of a BatchGetAccessBindingsResponse. */ + interface IBatchGetAccessBindingsResponse { - /** FetchAutomatedGa4ConfigurationOptOutRequest property */ - property?: (string|null); + /** BatchGetAccessBindingsResponse accessBindings */ + accessBindings?: (google.analytics.admin.v1alpha.IAccessBinding[]|null); } - /** Represents a FetchAutomatedGa4ConfigurationOptOutRequest. */ - class FetchAutomatedGa4ConfigurationOptOutRequest implements IFetchAutomatedGa4ConfigurationOptOutRequest { + /** Represents a BatchGetAccessBindingsResponse. */ + class BatchGetAccessBindingsResponse implements IBatchGetAccessBindingsResponse { /** - * Constructs a new FetchAutomatedGa4ConfigurationOptOutRequest. + * Constructs a new BatchGetAccessBindingsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest); + constructor(properties?: google.analytics.admin.v1alpha.IBatchGetAccessBindingsResponse); - /** FetchAutomatedGa4ConfigurationOptOutRequest property. */ - public property: string; + /** BatchGetAccessBindingsResponse accessBindings. */ + public accessBindings: google.analytics.admin.v1alpha.IAccessBinding[]; /** - * Creates a new FetchAutomatedGa4ConfigurationOptOutRequest instance using the specified properties. + * Creates a new BatchGetAccessBindingsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns FetchAutomatedGa4ConfigurationOptOutRequest instance + * @returns BatchGetAccessBindingsResponse instance */ - public static create(properties?: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest): google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest; + public static create(properties?: google.analytics.admin.v1alpha.IBatchGetAccessBindingsResponse): google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse; /** - * Encodes the specified FetchAutomatedGa4ConfigurationOptOutRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. - * @param message FetchAutomatedGa4ConfigurationOptOutRequest message or plain object to encode + * Encodes the specified BatchGetAccessBindingsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse.verify|verify} messages. + * @param message BatchGetAccessBindingsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IBatchGetAccessBindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FetchAutomatedGa4ConfigurationOptOutRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. - * @param message FetchAutomatedGa4ConfigurationOptOutRequest message or plain object to encode + * Encodes the specified BatchGetAccessBindingsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse.verify|verify} messages. + * @param message BatchGetAccessBindingsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IBatchGetAccessBindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FetchAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer. + * Decodes a BatchGetAccessBindingsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FetchAutomatedGa4ConfigurationOptOutRequest + * @returns BatchGetAccessBindingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse; /** - * Decodes a FetchAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchGetAccessBindingsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FetchAutomatedGa4ConfigurationOptOutRequest + * @returns BatchGetAccessBindingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse; /** - * Verifies a FetchAutomatedGa4ConfigurationOptOutRequest message. + * Verifies a BatchGetAccessBindingsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FetchAutomatedGa4ConfigurationOptOutRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchGetAccessBindingsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FetchAutomatedGa4ConfigurationOptOutRequest + * @returns BatchGetAccessBindingsResponse */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse; /** - * Creates a plain object from a FetchAutomatedGa4ConfigurationOptOutRequest message. Also converts values to other types if specified. - * @param message FetchAutomatedGa4ConfigurationOptOutRequest + * Creates a plain object from a BatchGetAccessBindingsResponse message. Also converts values to other types if specified. + * @param message BatchGetAccessBindingsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FetchAutomatedGa4ConfigurationOptOutRequest to JSON. + * Converts this BatchGetAccessBindingsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FetchAutomatedGa4ConfigurationOptOutRequest + * Gets the default type url for BatchGetAccessBindingsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FetchAutomatedGa4ConfigurationOptOutResponse. */ - interface IFetchAutomatedGa4ConfigurationOptOutResponse { + /** Properties of a ListAccessBindingsRequest. */ + interface IListAccessBindingsRequest { - /** FetchAutomatedGa4ConfigurationOptOutResponse optOut */ - optOut?: (boolean|null); + /** ListAccessBindingsRequest parent */ + parent?: (string|null); + + /** ListAccessBindingsRequest pageSize */ + pageSize?: (number|null); + + /** ListAccessBindingsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a FetchAutomatedGa4ConfigurationOptOutResponse. */ - class FetchAutomatedGa4ConfigurationOptOutResponse implements IFetchAutomatedGa4ConfigurationOptOutResponse { + /** Represents a ListAccessBindingsRequest. */ + class ListAccessBindingsRequest implements IListAccessBindingsRequest { /** - * Constructs a new FetchAutomatedGa4ConfigurationOptOutResponse. + * Constructs a new ListAccessBindingsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse); + constructor(properties?: google.analytics.admin.v1alpha.IListAccessBindingsRequest); - /** FetchAutomatedGa4ConfigurationOptOutResponse optOut. */ - public optOut: boolean; + /** ListAccessBindingsRequest parent. */ + public parent: string; + + /** ListAccessBindingsRequest pageSize. */ + public pageSize: number; + + /** ListAccessBindingsRequest pageToken. */ + public pageToken: string; /** - * Creates a new FetchAutomatedGa4ConfigurationOptOutResponse instance using the specified properties. + * Creates a new ListAccessBindingsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns FetchAutomatedGa4ConfigurationOptOutResponse instance + * @returns ListAccessBindingsRequest instance */ - public static create(properties?: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse): google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse; + public static create(properties?: google.analytics.admin.v1alpha.IListAccessBindingsRequest): google.analytics.admin.v1alpha.ListAccessBindingsRequest; /** - * Encodes the specified FetchAutomatedGa4ConfigurationOptOutResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. - * @param message FetchAutomatedGa4ConfigurationOptOutResponse message or plain object to encode + * Encodes the specified ListAccessBindingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListAccessBindingsRequest.verify|verify} messages. + * @param message ListAccessBindingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IListAccessBindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FetchAutomatedGa4ConfigurationOptOutResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. - * @param message FetchAutomatedGa4ConfigurationOptOutResponse message or plain object to encode + * Encodes the specified ListAccessBindingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListAccessBindingsRequest.verify|verify} messages. + * @param message ListAccessBindingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListAccessBindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FetchAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer. + * Decodes a ListAccessBindingsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FetchAutomatedGa4ConfigurationOptOutResponse + * @returns ListAccessBindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListAccessBindingsRequest; /** - * Decodes a FetchAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer, length delimited. + * Decodes a ListAccessBindingsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FetchAutomatedGa4ConfigurationOptOutResponse + * @returns ListAccessBindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListAccessBindingsRequest; /** - * Verifies a FetchAutomatedGa4ConfigurationOptOutResponse message. + * Verifies a ListAccessBindingsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FetchAutomatedGa4ConfigurationOptOutResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListAccessBindingsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FetchAutomatedGa4ConfigurationOptOutResponse + * @returns ListAccessBindingsRequest */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListAccessBindingsRequest; /** - * Creates a plain object from a FetchAutomatedGa4ConfigurationOptOutResponse message. Also converts values to other types if specified. - * @param message FetchAutomatedGa4ConfigurationOptOutResponse + * Creates a plain object from a ListAccessBindingsRequest message. Also converts values to other types if specified. + * @param message ListAccessBindingsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.ListAccessBindingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FetchAutomatedGa4ConfigurationOptOutResponse to JSON. + * Converts this ListAccessBindingsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FetchAutomatedGa4ConfigurationOptOutResponse + * Gets the default type url for ListAccessBindingsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetBigQueryLinkRequest. */ - interface IGetBigQueryLinkRequest { + /** Properties of a ListAccessBindingsResponse. */ + interface IListAccessBindingsResponse { - /** GetBigQueryLinkRequest name */ - name?: (string|null); + /** ListAccessBindingsResponse accessBindings */ + accessBindings?: (google.analytics.admin.v1alpha.IAccessBinding[]|null); + + /** ListAccessBindingsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a GetBigQueryLinkRequest. */ - class GetBigQueryLinkRequest implements IGetBigQueryLinkRequest { + /** Represents a ListAccessBindingsResponse. */ + class ListAccessBindingsResponse implements IListAccessBindingsResponse { /** - * Constructs a new GetBigQueryLinkRequest. + * Constructs a new ListAccessBindingsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IGetBigQueryLinkRequest); + constructor(properties?: google.analytics.admin.v1alpha.IListAccessBindingsResponse); - /** GetBigQueryLinkRequest name. */ - public name: string; + /** ListAccessBindingsResponse accessBindings. */ + public accessBindings: google.analytics.admin.v1alpha.IAccessBinding[]; + + /** ListAccessBindingsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new GetBigQueryLinkRequest instance using the specified properties. + * Creates a new ListAccessBindingsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetBigQueryLinkRequest instance + * @returns ListAccessBindingsResponse instance */ - public static create(properties?: google.analytics.admin.v1alpha.IGetBigQueryLinkRequest): google.analytics.admin.v1alpha.GetBigQueryLinkRequest; + public static create(properties?: google.analytics.admin.v1alpha.IListAccessBindingsResponse): google.analytics.admin.v1alpha.ListAccessBindingsResponse; /** - * Encodes the specified GetBigQueryLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetBigQueryLinkRequest.verify|verify} messages. - * @param message GetBigQueryLinkRequest message or plain object to encode + * Encodes the specified ListAccessBindingsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListAccessBindingsResponse.verify|verify} messages. + * @param message ListAccessBindingsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IGetBigQueryLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IListAccessBindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetBigQueryLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetBigQueryLinkRequest.verify|verify} messages. - * @param message GetBigQueryLinkRequest message or plain object to encode + * Encodes the specified ListAccessBindingsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListAccessBindingsResponse.verify|verify} messages. + * @param message ListAccessBindingsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IGetBigQueryLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListAccessBindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetBigQueryLinkRequest message from the specified reader or buffer. + * Decodes a ListAccessBindingsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetBigQueryLinkRequest + * @returns ListAccessBindingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GetBigQueryLinkRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListAccessBindingsResponse; /** - * Decodes a GetBigQueryLinkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAccessBindingsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetBigQueryLinkRequest + * @returns ListAccessBindingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GetBigQueryLinkRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListAccessBindingsResponse; /** - * Verifies a GetBigQueryLinkRequest message. + * Verifies a ListAccessBindingsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetBigQueryLinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAccessBindingsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetBigQueryLinkRequest + * @returns ListAccessBindingsResponse */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GetBigQueryLinkRequest; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListAccessBindingsResponse; /** - * Creates a plain object from a GetBigQueryLinkRequest message. Also converts values to other types if specified. - * @param message GetBigQueryLinkRequest + * Creates a plain object from a ListAccessBindingsResponse message. Also converts values to other types if specified. + * @param message ListAccessBindingsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.GetBigQueryLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.ListAccessBindingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetBigQueryLinkRequest to JSON. + * Converts this ListAccessBindingsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetBigQueryLinkRequest + * Gets the default type url for ListAccessBindingsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListBigQueryLinksRequest. */ - interface IListBigQueryLinksRequest { + /** Properties of a CreateAccessBindingRequest. */ + interface ICreateAccessBindingRequest { - /** ListBigQueryLinksRequest parent */ + /** CreateAccessBindingRequest parent */ parent?: (string|null); - /** ListBigQueryLinksRequest pageSize */ - pageSize?: (number|null); - - /** ListBigQueryLinksRequest pageToken */ - pageToken?: (string|null); + /** CreateAccessBindingRequest accessBinding */ + accessBinding?: (google.analytics.admin.v1alpha.IAccessBinding|null); } - /** Represents a ListBigQueryLinksRequest. */ - class ListBigQueryLinksRequest implements IListBigQueryLinksRequest { + /** Represents a CreateAccessBindingRequest. */ + class CreateAccessBindingRequest implements ICreateAccessBindingRequest { /** - * Constructs a new ListBigQueryLinksRequest. + * Constructs a new CreateAccessBindingRequest. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IListBigQueryLinksRequest); + constructor(properties?: google.analytics.admin.v1alpha.ICreateAccessBindingRequest); - /** ListBigQueryLinksRequest parent. */ + /** CreateAccessBindingRequest parent. */ public parent: string; - /** ListBigQueryLinksRequest pageSize. */ - public pageSize: number; - - /** ListBigQueryLinksRequest pageToken. */ - public pageToken: string; + /** CreateAccessBindingRequest accessBinding. */ + public accessBinding?: (google.analytics.admin.v1alpha.IAccessBinding|null); /** - * Creates a new ListBigQueryLinksRequest instance using the specified properties. + * Creates a new CreateAccessBindingRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListBigQueryLinksRequest instance + * @returns CreateAccessBindingRequest instance */ - public static create(properties?: google.analytics.admin.v1alpha.IListBigQueryLinksRequest): google.analytics.admin.v1alpha.ListBigQueryLinksRequest; + public static create(properties?: google.analytics.admin.v1alpha.ICreateAccessBindingRequest): google.analytics.admin.v1alpha.CreateAccessBindingRequest; /** - * Encodes the specified ListBigQueryLinksRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksRequest.verify|verify} messages. - * @param message ListBigQueryLinksRequest message or plain object to encode + * Encodes the specified CreateAccessBindingRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateAccessBindingRequest.verify|verify} messages. + * @param message CreateAccessBindingRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IListBigQueryLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.ICreateAccessBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListBigQueryLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksRequest.verify|verify} messages. - * @param message ListBigQueryLinksRequest message or plain object to encode + * Encodes the specified CreateAccessBindingRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateAccessBindingRequest.verify|verify} messages. + * @param message CreateAccessBindingRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IListBigQueryLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.ICreateAccessBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListBigQueryLinksRequest message from the specified reader or buffer. + * Decodes a CreateAccessBindingRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListBigQueryLinksRequest + * @returns CreateAccessBindingRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListBigQueryLinksRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.CreateAccessBindingRequest; /** - * Decodes a ListBigQueryLinksRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateAccessBindingRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListBigQueryLinksRequest + * @returns CreateAccessBindingRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListBigQueryLinksRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.CreateAccessBindingRequest; /** - * Verifies a ListBigQueryLinksRequest message. + * Verifies a CreateAccessBindingRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListBigQueryLinksRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateAccessBindingRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListBigQueryLinksRequest + * @returns CreateAccessBindingRequest */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListBigQueryLinksRequest; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.CreateAccessBindingRequest; /** - * Creates a plain object from a ListBigQueryLinksRequest message. Also converts values to other types if specified. - * @param message ListBigQueryLinksRequest + * Creates a plain object from a CreateAccessBindingRequest message. Also converts values to other types if specified. + * @param message CreateAccessBindingRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.ListBigQueryLinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.CreateAccessBindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListBigQueryLinksRequest to JSON. + * Converts this CreateAccessBindingRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListBigQueryLinksRequest + * Gets the default type url for CreateAccessBindingRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListBigQueryLinksResponse. */ - interface IListBigQueryLinksResponse { + /** Properties of a BatchCreateAccessBindingsRequest. */ + interface IBatchCreateAccessBindingsRequest { - /** ListBigQueryLinksResponse bigqueryLinks */ - bigqueryLinks?: (google.analytics.admin.v1alpha.IBigQueryLink[]|null); + /** BatchCreateAccessBindingsRequest parent */ + parent?: (string|null); - /** ListBigQueryLinksResponse nextPageToken */ - nextPageToken?: (string|null); + /** BatchCreateAccessBindingsRequest requests */ + requests?: (google.analytics.admin.v1alpha.ICreateAccessBindingRequest[]|null); } - /** Represents a ListBigQueryLinksResponse. */ - class ListBigQueryLinksResponse implements IListBigQueryLinksResponse { + /** Represents a BatchCreateAccessBindingsRequest. */ + class BatchCreateAccessBindingsRequest implements IBatchCreateAccessBindingsRequest { /** - * Constructs a new ListBigQueryLinksResponse. + * Constructs a new BatchCreateAccessBindingsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IListBigQueryLinksResponse); + constructor(properties?: google.analytics.admin.v1alpha.IBatchCreateAccessBindingsRequest); - /** ListBigQueryLinksResponse bigqueryLinks. */ - public bigqueryLinks: google.analytics.admin.v1alpha.IBigQueryLink[]; + /** BatchCreateAccessBindingsRequest parent. */ + public parent: string; - /** ListBigQueryLinksResponse nextPageToken. */ - public nextPageToken: string; + /** BatchCreateAccessBindingsRequest requests. */ + public requests: google.analytics.admin.v1alpha.ICreateAccessBindingRequest[]; /** - * Creates a new ListBigQueryLinksResponse instance using the specified properties. + * Creates a new BatchCreateAccessBindingsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListBigQueryLinksResponse instance + * @returns BatchCreateAccessBindingsRequest instance */ - public static create(properties?: google.analytics.admin.v1alpha.IListBigQueryLinksResponse): google.analytics.admin.v1alpha.ListBigQueryLinksResponse; + public static create(properties?: google.analytics.admin.v1alpha.IBatchCreateAccessBindingsRequest): google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest; /** - * Encodes the specified ListBigQueryLinksResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksResponse.verify|verify} messages. - * @param message ListBigQueryLinksResponse message or plain object to encode + * Encodes the specified BatchCreateAccessBindingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest.verify|verify} messages. + * @param message BatchCreateAccessBindingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IListBigQueryLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IBatchCreateAccessBindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListBigQueryLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksResponse.verify|verify} messages. - * @param message ListBigQueryLinksResponse message or plain object to encode + * Encodes the specified BatchCreateAccessBindingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest.verify|verify} messages. + * @param message BatchCreateAccessBindingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IListBigQueryLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IBatchCreateAccessBindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListBigQueryLinksResponse message from the specified reader or buffer. + * Decodes a BatchCreateAccessBindingsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListBigQueryLinksResponse + * @returns BatchCreateAccessBindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListBigQueryLinksResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest; /** - * Decodes a ListBigQueryLinksResponse message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateAccessBindingsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListBigQueryLinksResponse + * @returns BatchCreateAccessBindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListBigQueryLinksResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest; /** - * Verifies a ListBigQueryLinksResponse message. + * Verifies a BatchCreateAccessBindingsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListBigQueryLinksResponse message from a plain object. Also converts values to their respective internal types. + * Creates a BatchCreateAccessBindingsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListBigQueryLinksResponse + * @returns BatchCreateAccessBindingsRequest */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListBigQueryLinksResponse; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest; /** - * Creates a plain object from a ListBigQueryLinksResponse message. Also converts values to other types if specified. - * @param message ListBigQueryLinksResponse + * Creates a plain object from a BatchCreateAccessBindingsRequest message. Also converts values to other types if specified. + * @param message BatchCreateAccessBindingsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.ListBigQueryLinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListBigQueryLinksResponse to JSON. + * Converts this BatchCreateAccessBindingsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListBigQueryLinksResponse + * Gets the default type url for BatchCreateAccessBindingsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** AudienceFilterScope enum. */ - enum AudienceFilterScope { - AUDIENCE_FILTER_SCOPE_UNSPECIFIED = 0, - AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT = 1, - AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION = 2, - AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS = 3 - } - - /** Properties of an AudienceDimensionOrMetricFilter. */ - interface IAudienceDimensionOrMetricFilter { - - /** AudienceDimensionOrMetricFilter stringFilter */ - stringFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter|null); - - /** AudienceDimensionOrMetricFilter inListFilter */ - inListFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter|null); - - /** AudienceDimensionOrMetricFilter numericFilter */ - numericFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter|null); - - /** AudienceDimensionOrMetricFilter betweenFilter */ - betweenFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter|null); - - /** AudienceDimensionOrMetricFilter fieldName */ - fieldName?: (string|null); - - /** AudienceDimensionOrMetricFilter atAnyPointInTime */ - atAnyPointInTime?: (boolean|null); + /** Properties of a BatchCreateAccessBindingsResponse. */ + interface IBatchCreateAccessBindingsResponse { - /** AudienceDimensionOrMetricFilter inAnyNDayPeriod */ - inAnyNDayPeriod?: (number|null); + /** BatchCreateAccessBindingsResponse accessBindings */ + accessBindings?: (google.analytics.admin.v1alpha.IAccessBinding[]|null); } - /** Represents an AudienceDimensionOrMetricFilter. */ - class AudienceDimensionOrMetricFilter implements IAudienceDimensionOrMetricFilter { + /** Represents a BatchCreateAccessBindingsResponse. */ + class BatchCreateAccessBindingsResponse implements IBatchCreateAccessBindingsResponse { /** - * Constructs a new AudienceDimensionOrMetricFilter. + * Constructs a new BatchCreateAccessBindingsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter); - - /** AudienceDimensionOrMetricFilter stringFilter. */ - public stringFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter|null); - - /** AudienceDimensionOrMetricFilter inListFilter. */ - public inListFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter|null); - - /** AudienceDimensionOrMetricFilter numericFilter. */ - public numericFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter|null); - - /** AudienceDimensionOrMetricFilter betweenFilter. */ - public betweenFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter|null); - - /** AudienceDimensionOrMetricFilter fieldName. */ - public fieldName: string; - - /** AudienceDimensionOrMetricFilter atAnyPointInTime. */ - public atAnyPointInTime: boolean; - - /** AudienceDimensionOrMetricFilter inAnyNDayPeriod. */ - public inAnyNDayPeriod: number; + constructor(properties?: google.analytics.admin.v1alpha.IBatchCreateAccessBindingsResponse); - /** AudienceDimensionOrMetricFilter oneFilter. */ - public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); + /** BatchCreateAccessBindingsResponse accessBindings. */ + public accessBindings: google.analytics.admin.v1alpha.IAccessBinding[]; /** - * Creates a new AudienceDimensionOrMetricFilter instance using the specified properties. + * Creates a new BatchCreateAccessBindingsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns AudienceDimensionOrMetricFilter instance + * @returns BatchCreateAccessBindingsResponse instance */ - public static create(properties?: google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter; + public static create(properties?: google.analytics.admin.v1alpha.IBatchCreateAccessBindingsResponse): google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse; /** - * Encodes the specified AudienceDimensionOrMetricFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.verify|verify} messages. - * @param message AudienceDimensionOrMetricFilter message or plain object to encode + * Encodes the specified BatchCreateAccessBindingsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse.verify|verify} messages. + * @param message BatchCreateAccessBindingsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IBatchCreateAccessBindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AudienceDimensionOrMetricFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.verify|verify} messages. - * @param message AudienceDimensionOrMetricFilter message or plain object to encode + * Encodes the specified BatchCreateAccessBindingsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse.verify|verify} messages. + * @param message BatchCreateAccessBindingsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IBatchCreateAccessBindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AudienceDimensionOrMetricFilter message from the specified reader or buffer. + * Decodes a BatchCreateAccessBindingsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AudienceDimensionOrMetricFilter + * @returns BatchCreateAccessBindingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse; /** - * Decodes an AudienceDimensionOrMetricFilter message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateAccessBindingsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AudienceDimensionOrMetricFilter + * @returns BatchCreateAccessBindingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse; /** - * Verifies an AudienceDimensionOrMetricFilter message. + * Verifies a BatchCreateAccessBindingsResponse message. * @param message Plain 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 AudienceDimensionOrMetricFilter message from a plain object. Also converts values to their respective internal types. + * Creates a BatchCreateAccessBindingsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AudienceDimensionOrMetricFilter + * @returns BatchCreateAccessBindingsResponse */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse; /** - * Creates a plain object from an AudienceDimensionOrMetricFilter message. Also converts values to other types if specified. - * @param message AudienceDimensionOrMetricFilter + * Creates a plain object from a BatchCreateAccessBindingsResponse message. Also converts values to other types if specified. + * @param message BatchCreateAccessBindingsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AudienceDimensionOrMetricFilter to JSON. + * Converts this BatchCreateAccessBindingsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AudienceDimensionOrMetricFilter + * Gets the default type url for BatchCreateAccessBindingsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace AudienceDimensionOrMetricFilter { + /** Properties of an UpdateAccessBindingRequest. */ + interface IUpdateAccessBindingRequest { - /** Properties of a StringFilter. */ - interface IStringFilter { + /** UpdateAccessBindingRequest accessBinding */ + accessBinding?: (google.analytics.admin.v1alpha.IAccessBinding|null); + } - /** StringFilter matchType */ - matchType?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType|keyof typeof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType|null); + /** Represents an UpdateAccessBindingRequest. */ + class UpdateAccessBindingRequest implements IUpdateAccessBindingRequest { - /** StringFilter value */ - value?: (string|null); + /** + * Constructs a new UpdateAccessBindingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IUpdateAccessBindingRequest); - /** StringFilter caseSensitive */ - caseSensitive?: (boolean|null); - } + /** UpdateAccessBindingRequest accessBinding. */ + public accessBinding?: (google.analytics.admin.v1alpha.IAccessBinding|null); - /** Represents a StringFilter. */ - class StringFilter implements IStringFilter { + /** + * Creates a new UpdateAccessBindingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateAccessBindingRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IUpdateAccessBindingRequest): google.analytics.admin.v1alpha.UpdateAccessBindingRequest; - /** - * Constructs a new StringFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter); + /** + * Encodes the specified UpdateAccessBindingRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateAccessBindingRequest.verify|verify} messages. + * @param message UpdateAccessBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IUpdateAccessBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** StringFilter matchType. */ - public matchType: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType|keyof typeof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType); + /** + * Encodes the specified UpdateAccessBindingRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateAccessBindingRequest.verify|verify} messages. + * @param message UpdateAccessBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IUpdateAccessBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** StringFilter value. */ - public value: string; + /** + * Decodes an UpdateAccessBindingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateAccessBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.UpdateAccessBindingRequest; - /** StringFilter caseSensitive. */ - public caseSensitive: boolean; + /** + * Decodes an UpdateAccessBindingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateAccessBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.UpdateAccessBindingRequest; - /** - * Creates a new StringFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns StringFilter instance - */ - public static create(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter; + /** + * Verifies an UpdateAccessBindingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.verify|verify} messages. - * @param message StringFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates an UpdateAccessBindingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateAccessBindingRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.UpdateAccessBindingRequest; - /** - * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.verify|verify} messages. - * @param message StringFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from an UpdateAccessBindingRequest message. Also converts values to other types if specified. + * @param message UpdateAccessBindingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.UpdateAccessBindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a StringFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StringFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter; + /** + * Converts this UpdateAccessBindingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Decodes a StringFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StringFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter; + /** + * Gets the default type url for UpdateAccessBindingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Verifies a StringFilter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Properties of a BatchUpdateAccessBindingsRequest. */ + interface IBatchUpdateAccessBindingsRequest { - /** - * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StringFilter - */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter; + /** BatchUpdateAccessBindingsRequest parent */ + parent?: (string|null); - /** - * Creates a plain object from a StringFilter message. Also converts values to other types if specified. - * @param message StringFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** BatchUpdateAccessBindingsRequest requests */ + requests?: (google.analytics.admin.v1alpha.IUpdateAccessBindingRequest[]|null); + } - /** - * Converts this StringFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Represents a BatchUpdateAccessBindingsRequest. */ + class BatchUpdateAccessBindingsRequest implements IBatchUpdateAccessBindingsRequest { - /** - * Gets the default type url for StringFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Constructs a new BatchUpdateAccessBindingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsRequest); - namespace StringFilter { + /** BatchUpdateAccessBindingsRequest parent. */ + public parent: string; - /** MatchType enum. */ - enum MatchType { - MATCH_TYPE_UNSPECIFIED = 0, - EXACT = 1, - BEGINS_WITH = 2, - ENDS_WITH = 3, - CONTAINS = 4, - FULL_REGEXP = 5 - } - } + /** BatchUpdateAccessBindingsRequest requests. */ + public requests: google.analytics.admin.v1alpha.IUpdateAccessBindingRequest[]; - /** Properties of an InListFilter. */ - interface IInListFilter { + /** + * Creates a new BatchUpdateAccessBindingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchUpdateAccessBindingsRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsRequest): google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest; - /** InListFilter values */ - values?: (string[]|null); + /** + * Encodes the specified BatchUpdateAccessBindingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest.verify|verify} messages. + * @param message BatchUpdateAccessBindingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** InListFilter caseSensitive */ - caseSensitive?: (boolean|null); - } + /** + * Encodes the specified BatchUpdateAccessBindingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest.verify|verify} messages. + * @param message BatchUpdateAccessBindingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents an InListFilter. */ - class InListFilter implements IInListFilter { + /** + * Decodes a BatchUpdateAccessBindingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchUpdateAccessBindingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest; - /** - * Constructs a new InListFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter); + /** + * Decodes a BatchUpdateAccessBindingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchUpdateAccessBindingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest; - /** InListFilter values. */ - public values: string[]; + /** + * Verifies a BatchUpdateAccessBindingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** InListFilter caseSensitive. */ - public caseSensitive: boolean; + /** + * Creates a BatchUpdateAccessBindingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchUpdateAccessBindingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest; - /** - * Creates a new InListFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns InListFilter instance - */ - public static create(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter; + /** + * Creates a plain object from a BatchUpdateAccessBindingsRequest message. Also converts values to other types if specified. + * @param message BatchUpdateAccessBindingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.verify|verify} messages. - * @param message InListFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this BatchUpdateAccessBindingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.verify|verify} messages. - * @param message InListFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Gets the default type url for BatchUpdateAccessBindingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Decodes an InListFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InListFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter; + /** Properties of a BatchUpdateAccessBindingsResponse. */ + interface IBatchUpdateAccessBindingsResponse { - /** - * Decodes an InListFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InListFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter; + /** BatchUpdateAccessBindingsResponse accessBindings */ + accessBindings?: (google.analytics.admin.v1alpha.IAccessBinding[]|null); + } - /** - * Verifies an InListFilter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Represents a BatchUpdateAccessBindingsResponse. */ + class BatchUpdateAccessBindingsResponse implements IBatchUpdateAccessBindingsResponse { - /** - * Creates an InListFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InListFilter - */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter; + /** + * Constructs a new BatchUpdateAccessBindingsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsResponse); - /** - * Creates a plain object from an InListFilter message. Also converts values to other types if specified. - * @param message InListFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** BatchUpdateAccessBindingsResponse accessBindings. */ + public accessBindings: google.analytics.admin.v1alpha.IAccessBinding[]; - /** - * Converts this InListFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a new BatchUpdateAccessBindingsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchUpdateAccessBindingsResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsResponse): google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse; - /** - * Gets the default type url for InListFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Encodes the specified BatchUpdateAccessBindingsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse.verify|verify} messages. + * @param message BatchUpdateAccessBindingsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a NumericValue. */ - interface INumericValue { + /** + * Encodes the specified BatchUpdateAccessBindingsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse.verify|verify} messages. + * @param message BatchUpdateAccessBindingsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** NumericValue int64Value */ - int64Value?: (number|Long|string|null); + /** + * Decodes a BatchUpdateAccessBindingsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchUpdateAccessBindingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse; - /** NumericValue doubleValue */ - doubleValue?: (number|null); - } + /** + * Decodes a BatchUpdateAccessBindingsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchUpdateAccessBindingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse; - /** Represents a NumericValue. */ - class NumericValue implements INumericValue { + /** + * Verifies a BatchUpdateAccessBindingsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Constructs a new NumericValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue); + /** + * Creates a BatchUpdateAccessBindingsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchUpdateAccessBindingsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse; - /** NumericValue int64Value. */ - public int64Value?: (number|Long|string|null); + /** + * Creates a plain object from a BatchUpdateAccessBindingsResponse message. Also converts values to other types if specified. + * @param message BatchUpdateAccessBindingsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** NumericValue doubleValue. */ - public doubleValue?: (number|null); + /** + * Converts this BatchUpdateAccessBindingsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** NumericValue oneValue. */ - public oneValue?: ("int64Value"|"doubleValue"); + /** + * Gets the default type url for BatchUpdateAccessBindingsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a new NumericValue instance using the specified properties. - * @param [properties] Properties to set - * @returns NumericValue instance - */ - public static create(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue; + /** Properties of a DeleteAccessBindingRequest. */ + interface IDeleteAccessBindingRequest { - /** - * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify|verify} messages. - * @param message NumericValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** DeleteAccessBindingRequest name */ + name?: (string|null); + } - /** - * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify|verify} messages. - * @param message NumericValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a DeleteAccessBindingRequest. */ + class DeleteAccessBindingRequest implements IDeleteAccessBindingRequest { - /** - * Decodes a NumericValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NumericValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue; + /** + * Constructs a new DeleteAccessBindingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IDeleteAccessBindingRequest); - /** - * Decodes a NumericValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NumericValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue; + /** DeleteAccessBindingRequest name. */ + public name: string; - /** - * Verifies a NumericValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a new DeleteAccessBindingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteAccessBindingRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IDeleteAccessBindingRequest): google.analytics.admin.v1alpha.DeleteAccessBindingRequest; - /** - * Creates a NumericValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NumericValue - */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue; + /** + * Encodes the specified DeleteAccessBindingRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteAccessBindingRequest.verify|verify} messages. + * @param message DeleteAccessBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IDeleteAccessBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a NumericValue message. Also converts values to other types if specified. - * @param message NumericValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified DeleteAccessBindingRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteAccessBindingRequest.verify|verify} messages. + * @param message DeleteAccessBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IDeleteAccessBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this NumericValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Decodes a DeleteAccessBindingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteAccessBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DeleteAccessBindingRequest; - /** - * Gets the default type url for NumericValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Decodes a DeleteAccessBindingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteAccessBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DeleteAccessBindingRequest; - /** Properties of a NumericFilter. */ - interface INumericFilter { + /** + * Verifies a DeleteAccessBindingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** NumericFilter operation */ - operation?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation|keyof typeof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation|null); + /** + * Creates a DeleteAccessBindingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteAccessBindingRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DeleteAccessBindingRequest; - /** NumericFilter value */ - value?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); - } + /** + * Creates a plain object from a DeleteAccessBindingRequest message. Also converts values to other types if specified. + * @param message DeleteAccessBindingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.DeleteAccessBindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents a NumericFilter. */ - class NumericFilter implements INumericFilter { + /** + * Converts this DeleteAccessBindingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Constructs a new NumericFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter); + /** + * Gets the default type url for DeleteAccessBindingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** NumericFilter operation. */ - public operation: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation|keyof typeof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation); + /** Properties of a BatchDeleteAccessBindingsRequest. */ + interface IBatchDeleteAccessBindingsRequest { - /** NumericFilter value. */ - public value?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); + /** BatchDeleteAccessBindingsRequest parent */ + parent?: (string|null); - /** - * Creates a new NumericFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns NumericFilter instance - */ - public static create(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter; + /** BatchDeleteAccessBindingsRequest requests */ + requests?: (google.analytics.admin.v1alpha.IDeleteAccessBindingRequest[]|null); + } - /** - * Encodes the specified NumericFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.verify|verify} messages. - * @param message NumericFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a BatchDeleteAccessBindingsRequest. */ + class BatchDeleteAccessBindingsRequest implements IBatchDeleteAccessBindingsRequest { - /** - * Encodes the specified NumericFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.verify|verify} messages. - * @param message NumericFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NumericFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NumericFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter; - - /** - * Decodes a NumericFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NumericFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter; - - /** - * Verifies a NumericFilter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NumericFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NumericFilter - */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter; - - /** - * Creates a plain object from a NumericFilter message. Also converts values to other types if specified. - * @param message NumericFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NumericFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NumericFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NumericFilter { - - /** Operation enum. */ - enum Operation { - OPERATION_UNSPECIFIED = 0, - EQUAL = 1, - LESS_THAN = 2, - GREATER_THAN = 4 - } - } - - /** Properties of a BetweenFilter. */ - interface IBetweenFilter { - - /** BetweenFilter fromValue */ - fromValue?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); - - /** BetweenFilter toValue */ - toValue?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); - } - - /** Represents a BetweenFilter. */ - class BetweenFilter implements IBetweenFilter { - - /** - * Constructs a new BetweenFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter); + /** + * Constructs a new BatchDeleteAccessBindingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IBatchDeleteAccessBindingsRequest); - /** BetweenFilter fromValue. */ - public fromValue?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); + /** BatchDeleteAccessBindingsRequest parent. */ + public parent: string; - /** BetweenFilter toValue. */ - public toValue?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); + /** BatchDeleteAccessBindingsRequest requests. */ + public requests: google.analytics.admin.v1alpha.IDeleteAccessBindingRequest[]; - /** - * Creates a new BetweenFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns BetweenFilter instance - */ - public static create(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter; + /** + * Creates a new BatchDeleteAccessBindingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchDeleteAccessBindingsRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IBatchDeleteAccessBindingsRequest): google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest; - /** - * Encodes the specified BetweenFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.verify|verify} messages. - * @param message BetweenFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified BatchDeleteAccessBindingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest.verify|verify} messages. + * @param message BatchDeleteAccessBindingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IBatchDeleteAccessBindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified BetweenFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.verify|verify} messages. - * @param message BetweenFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified BatchDeleteAccessBindingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest.verify|verify} messages. + * @param message BatchDeleteAccessBindingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IBatchDeleteAccessBindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a BetweenFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BetweenFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter; + /** + * Decodes a BatchDeleteAccessBindingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchDeleteAccessBindingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest; - /** - * Decodes a BetweenFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BetweenFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter; + /** + * Decodes a BatchDeleteAccessBindingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchDeleteAccessBindingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest; - /** - * Verifies a BetweenFilter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies a BatchDeleteAccessBindingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a BetweenFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BetweenFilter - */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter; + /** + * Creates a BatchDeleteAccessBindingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchDeleteAccessBindingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest; - /** - * Creates a plain object from a BetweenFilter message. Also converts values to other types if specified. - * @param message BetweenFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a BatchDeleteAccessBindingsRequest message. Also converts values to other types if specified. + * @param message BatchDeleteAccessBindingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this BetweenFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this BatchDeleteAccessBindingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for BetweenFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for BatchDeleteAccessBindingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AudienceEventFilter. */ - interface IAudienceEventFilter { + /** Properties of a CreateExpandedDataSetRequest. */ + interface ICreateExpandedDataSetRequest { - /** AudienceEventFilter eventName */ - eventName?: (string|null); + /** CreateExpandedDataSetRequest parent */ + parent?: (string|null); - /** AudienceEventFilter eventParameterFilterExpression */ - eventParameterFilterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + /** CreateExpandedDataSetRequest expandedDataSet */ + expandedDataSet?: (google.analytics.admin.v1alpha.IExpandedDataSet|null); } - /** Represents an AudienceEventFilter. */ - class AudienceEventFilter implements IAudienceEventFilter { + /** Represents a CreateExpandedDataSetRequest. */ + class CreateExpandedDataSetRequest implements ICreateExpandedDataSetRequest { /** - * Constructs a new AudienceEventFilter. + * Constructs a new CreateExpandedDataSetRequest. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IAudienceEventFilter); + constructor(properties?: google.analytics.admin.v1alpha.ICreateExpandedDataSetRequest); - /** AudienceEventFilter eventName. */ - public eventName: string; + /** CreateExpandedDataSetRequest parent. */ + public parent: string; - /** AudienceEventFilter eventParameterFilterExpression. */ - public eventParameterFilterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + /** CreateExpandedDataSetRequest expandedDataSet. */ + public expandedDataSet?: (google.analytics.admin.v1alpha.IExpandedDataSet|null); /** - * Creates a new AudienceEventFilter instance using the specified properties. + * Creates a new CreateExpandedDataSetRequest instance using the specified properties. * @param [properties] Properties to set - * @returns AudienceEventFilter instance + * @returns CreateExpandedDataSetRequest instance */ - public static create(properties?: google.analytics.admin.v1alpha.IAudienceEventFilter): google.analytics.admin.v1alpha.AudienceEventFilter; + public static create(properties?: google.analytics.admin.v1alpha.ICreateExpandedDataSetRequest): google.analytics.admin.v1alpha.CreateExpandedDataSetRequest; /** - * Encodes the specified AudienceEventFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventFilter.verify|verify} messages. - * @param message AudienceEventFilter message or plain object to encode + * Encodes the specified CreateExpandedDataSetRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateExpandedDataSetRequest.verify|verify} messages. + * @param message CreateExpandedDataSetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IAudienceEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.ICreateExpandedDataSetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AudienceEventFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventFilter.verify|verify} messages. - * @param message AudienceEventFilter message or plain object to encode + * Encodes the specified CreateExpandedDataSetRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateExpandedDataSetRequest.verify|verify} messages. + * @param message CreateExpandedDataSetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.ICreateExpandedDataSetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AudienceEventFilter message from the specified reader or buffer. + * Decodes a CreateExpandedDataSetRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AudienceEventFilter + * @returns CreateExpandedDataSetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceEventFilter; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.CreateExpandedDataSetRequest; /** - * Decodes an AudienceEventFilter message from the specified reader or buffer, length delimited. + * Decodes a CreateExpandedDataSetRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AudienceEventFilter + * @returns CreateExpandedDataSetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceEventFilter; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.CreateExpandedDataSetRequest; /** - * Verifies an AudienceEventFilter message. + * Verifies a CreateExpandedDataSetRequest message. * @param message Plain 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 AudienceEventFilter message from a plain object. Also converts values to their respective internal types. + * Creates a CreateExpandedDataSetRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AudienceEventFilter + * @returns CreateExpandedDataSetRequest */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceEventFilter; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.CreateExpandedDataSetRequest; /** - * Creates a plain object from an AudienceEventFilter message. Also converts values to other types if specified. - * @param message AudienceEventFilter + * Creates a plain object from a CreateExpandedDataSetRequest message. Also converts values to other types if specified. + * @param message CreateExpandedDataSetRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.AudienceEventFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.CreateExpandedDataSetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AudienceEventFilter to JSON. + * Converts this CreateExpandedDataSetRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AudienceEventFilter + * Gets the default type url for CreateExpandedDataSetRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AudienceFilterExpression. */ - interface IAudienceFilterExpression { + /** Properties of an UpdateExpandedDataSetRequest. */ + interface IUpdateExpandedDataSetRequest { - /** AudienceFilterExpression andGroup */ - andGroup?: (google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null); + /** UpdateExpandedDataSetRequest expandedDataSet */ + expandedDataSet?: (google.analytics.admin.v1alpha.IExpandedDataSet|null); - /** AudienceFilterExpression orGroup */ - orGroup?: (google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null); - - /** AudienceFilterExpression notExpression */ - notExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); - - /** AudienceFilterExpression dimensionOrMetricFilter */ - dimensionOrMetricFilter?: (google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter|null); - - /** AudienceFilterExpression eventFilter */ - eventFilter?: (google.analytics.admin.v1alpha.IAudienceEventFilter|null); + /** UpdateExpandedDataSetRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents an AudienceFilterExpression. */ - class AudienceFilterExpression implements IAudienceFilterExpression { + /** Represents an UpdateExpandedDataSetRequest. */ + class UpdateExpandedDataSetRequest implements IUpdateExpandedDataSetRequest { /** - * Constructs a new AudienceFilterExpression. + * Constructs a new UpdateExpandedDataSetRequest. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IAudienceFilterExpression); - - /** AudienceFilterExpression andGroup. */ - public andGroup?: (google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null); - - /** AudienceFilterExpression orGroup. */ - public orGroup?: (google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null); - - /** AudienceFilterExpression notExpression. */ - public notExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + constructor(properties?: google.analytics.admin.v1alpha.IUpdateExpandedDataSetRequest); - /** AudienceFilterExpression dimensionOrMetricFilter. */ - public dimensionOrMetricFilter?: (google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter|null); - - /** AudienceFilterExpression eventFilter. */ - public eventFilter?: (google.analytics.admin.v1alpha.IAudienceEventFilter|null); + /** UpdateExpandedDataSetRequest expandedDataSet. */ + public expandedDataSet?: (google.analytics.admin.v1alpha.IExpandedDataSet|null); - /** AudienceFilterExpression expr. */ - public expr?: ("andGroup"|"orGroup"|"notExpression"|"dimensionOrMetricFilter"|"eventFilter"); + /** UpdateExpandedDataSetRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new AudienceFilterExpression instance using the specified properties. + * Creates a new UpdateExpandedDataSetRequest instance using the specified properties. * @param [properties] Properties to set - * @returns AudienceFilterExpression instance + * @returns UpdateExpandedDataSetRequest instance */ - public static create(properties?: google.analytics.admin.v1alpha.IAudienceFilterExpression): google.analytics.admin.v1alpha.AudienceFilterExpression; + public static create(properties?: google.analytics.admin.v1alpha.IUpdateExpandedDataSetRequest): google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest; /** - * Encodes the specified AudienceFilterExpression message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpression.verify|verify} messages. - * @param message AudienceFilterExpression message or plain object to encode + * Encodes the specified UpdateExpandedDataSetRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest.verify|verify} messages. + * @param message UpdateExpandedDataSetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IAudienceFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IUpdateExpandedDataSetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AudienceFilterExpression message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpression.verify|verify} messages. - * @param message AudienceFilterExpression message or plain object to encode + * Encodes the specified UpdateExpandedDataSetRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest.verify|verify} messages. + * @param message UpdateExpandedDataSetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IUpdateExpandedDataSetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AudienceFilterExpression message from the specified reader or buffer. + * Decodes an UpdateExpandedDataSetRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AudienceFilterExpression + * @returns UpdateExpandedDataSetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceFilterExpression; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest; /** - * Decodes an AudienceFilterExpression message from the specified reader or buffer, length delimited. + * Decodes an UpdateExpandedDataSetRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AudienceFilterExpression + * @returns UpdateExpandedDataSetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceFilterExpression; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest; /** - * Verifies an AudienceFilterExpression message. + * Verifies an UpdateExpandedDataSetRequest message. * @param message Plain 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 AudienceFilterExpression message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateExpandedDataSetRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AudienceFilterExpression + * @returns UpdateExpandedDataSetRequest */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceFilterExpression; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest; /** - * Creates a plain object from an AudienceFilterExpression message. Also converts values to other types if specified. - * @param message AudienceFilterExpression + * Creates a plain object from an UpdateExpandedDataSetRequest message. Also converts values to other types if specified. + * @param message UpdateExpandedDataSetRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.AudienceFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AudienceFilterExpression to JSON. + * Converts this UpdateExpandedDataSetRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AudienceFilterExpression + * Gets the default type url for UpdateExpandedDataSetRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AudienceFilterExpressionList. */ - interface IAudienceFilterExpressionList { + /** Properties of a DeleteExpandedDataSetRequest. */ + interface IDeleteExpandedDataSetRequest { - /** AudienceFilterExpressionList filterExpressions */ - filterExpressions?: (google.analytics.admin.v1alpha.IAudienceFilterExpression[]|null); + /** DeleteExpandedDataSetRequest name */ + name?: (string|null); } - /** Represents an AudienceFilterExpressionList. */ - class AudienceFilterExpressionList implements IAudienceFilterExpressionList { + /** Represents a DeleteExpandedDataSetRequest. */ + class DeleteExpandedDataSetRequest implements IDeleteExpandedDataSetRequest { /** - * Constructs a new AudienceFilterExpressionList. + * Constructs a new DeleteExpandedDataSetRequest. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IAudienceFilterExpressionList); + constructor(properties?: google.analytics.admin.v1alpha.IDeleteExpandedDataSetRequest); - /** AudienceFilterExpressionList filterExpressions. */ - public filterExpressions: google.analytics.admin.v1alpha.IAudienceFilterExpression[]; + /** DeleteExpandedDataSetRequest name. */ + public name: string; /** - * Creates a new AudienceFilterExpressionList instance using the specified properties. + * Creates a new DeleteExpandedDataSetRequest instance using the specified properties. * @param [properties] Properties to set - * @returns AudienceFilterExpressionList instance + * @returns DeleteExpandedDataSetRequest instance */ - public static create(properties?: google.analytics.admin.v1alpha.IAudienceFilterExpressionList): google.analytics.admin.v1alpha.AudienceFilterExpressionList; + public static create(properties?: google.analytics.admin.v1alpha.IDeleteExpandedDataSetRequest): google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest; /** - * Encodes the specified AudienceFilterExpressionList message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify|verify} messages. - * @param message AudienceFilterExpressionList message or plain object to encode + * Encodes the specified DeleteExpandedDataSetRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest.verify|verify} messages. + * @param message DeleteExpandedDataSetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IAudienceFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IDeleteExpandedDataSetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AudienceFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify|verify} messages. - * @param message AudienceFilterExpressionList message or plain object to encode + * Encodes the specified DeleteExpandedDataSetRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest.verify|verify} messages. + * @param message DeleteExpandedDataSetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IDeleteExpandedDataSetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AudienceFilterExpressionList message from the specified reader or buffer. + * Decodes a DeleteExpandedDataSetRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AudienceFilterExpressionList + * @returns DeleteExpandedDataSetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceFilterExpressionList; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest; /** - * Decodes an AudienceFilterExpressionList message from the specified reader or buffer, length delimited. + * Decodes a DeleteExpandedDataSetRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AudienceFilterExpressionList + * @returns DeleteExpandedDataSetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceFilterExpressionList; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest; /** - * Verifies an AudienceFilterExpressionList message. + * Verifies a DeleteExpandedDataSetRequest message. * @param message Plain 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 AudienceFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteExpandedDataSetRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AudienceFilterExpressionList + * @returns DeleteExpandedDataSetRequest */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceFilterExpressionList; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest; /** - * Creates a plain object from an AudienceFilterExpressionList message. Also converts values to other types if specified. - * @param message AudienceFilterExpressionList + * Creates a plain object from a DeleteExpandedDataSetRequest message. Also converts values to other types if specified. + * @param message DeleteExpandedDataSetRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.AudienceFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AudienceFilterExpressionList to JSON. + * Converts this DeleteExpandedDataSetRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AudienceFilterExpressionList + * Gets the default type url for DeleteExpandedDataSetRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AudienceSimpleFilter. */ - interface IAudienceSimpleFilter { - - /** AudienceSimpleFilter scope */ - scope?: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope|null); + /** Properties of a GetExpandedDataSetRequest. */ + interface IGetExpandedDataSetRequest { - /** AudienceSimpleFilter filterExpression */ - filterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + /** GetExpandedDataSetRequest name */ + name?: (string|null); } - /** Represents an AudienceSimpleFilter. */ - class AudienceSimpleFilter implements IAudienceSimpleFilter { + /** Represents a GetExpandedDataSetRequest. */ + class GetExpandedDataSetRequest implements IGetExpandedDataSetRequest { /** - * Constructs a new AudienceSimpleFilter. + * Constructs a new GetExpandedDataSetRequest. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IAudienceSimpleFilter); + constructor(properties?: google.analytics.admin.v1alpha.IGetExpandedDataSetRequest); - /** AudienceSimpleFilter scope. */ - public scope: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope); - - /** AudienceSimpleFilter filterExpression. */ - public filterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + /** GetExpandedDataSetRequest name. */ + public name: string; /** - * Creates a new AudienceSimpleFilter instance using the specified properties. + * Creates a new GetExpandedDataSetRequest instance using the specified properties. * @param [properties] Properties to set - * @returns AudienceSimpleFilter instance + * @returns GetExpandedDataSetRequest instance */ - public static create(properties?: google.analytics.admin.v1alpha.IAudienceSimpleFilter): google.analytics.admin.v1alpha.AudienceSimpleFilter; + public static create(properties?: google.analytics.admin.v1alpha.IGetExpandedDataSetRequest): google.analytics.admin.v1alpha.GetExpandedDataSetRequest; /** - * Encodes the specified AudienceSimpleFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSimpleFilter.verify|verify} messages. - * @param message AudienceSimpleFilter message or plain object to encode + * Encodes the specified GetExpandedDataSetRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetExpandedDataSetRequest.verify|verify} messages. + * @param message GetExpandedDataSetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IAudienceSimpleFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IGetExpandedDataSetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AudienceSimpleFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSimpleFilter.verify|verify} messages. - * @param message AudienceSimpleFilter message or plain object to encode + * Encodes the specified GetExpandedDataSetRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetExpandedDataSetRequest.verify|verify} messages. + * @param message GetExpandedDataSetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceSimpleFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGetExpandedDataSetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AudienceSimpleFilter message from the specified reader or buffer. + * Decodes a GetExpandedDataSetRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AudienceSimpleFilter + * @returns GetExpandedDataSetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceSimpleFilter; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GetExpandedDataSetRequest; /** - * Decodes an AudienceSimpleFilter message from the specified reader or buffer, length delimited. + * Decodes a GetExpandedDataSetRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AudienceSimpleFilter + * @returns GetExpandedDataSetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceSimpleFilter; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GetExpandedDataSetRequest; /** - * Verifies an AudienceSimpleFilter message. + * Verifies a GetExpandedDataSetRequest message. * @param message Plain 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 AudienceSimpleFilter message from a plain object. Also converts values to their respective internal types. + * Creates a GetExpandedDataSetRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AudienceSimpleFilter + * @returns GetExpandedDataSetRequest */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceSimpleFilter; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GetExpandedDataSetRequest; /** - * Creates a plain object from an AudienceSimpleFilter message. Also converts values to other types if specified. - * @param message AudienceSimpleFilter + * Creates a plain object from a GetExpandedDataSetRequest message. Also converts values to other types if specified. + * @param message GetExpandedDataSetRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.AudienceSimpleFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.GetExpandedDataSetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AudienceSimpleFilter to JSON. + * Converts this GetExpandedDataSetRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AudienceSimpleFilter + * Gets the default type url for GetExpandedDataSetRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AudienceSequenceFilter. */ - interface IAudienceSequenceFilter { + /** Properties of a ListExpandedDataSetsRequest. */ + interface IListExpandedDataSetsRequest { - /** AudienceSequenceFilter scope */ - scope?: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope|null); + /** ListExpandedDataSetsRequest parent */ + parent?: (string|null); - /** AudienceSequenceFilter sequenceMaximumDuration */ - sequenceMaximumDuration?: (google.protobuf.IDuration|null); + /** ListExpandedDataSetsRequest pageSize */ + pageSize?: (number|null); - /** AudienceSequenceFilter sequenceSteps */ - sequenceSteps?: (google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep[]|null); + /** ListExpandedDataSetsRequest pageToken */ + pageToken?: (string|null); } - /** Represents an AudienceSequenceFilter. */ - class AudienceSequenceFilter implements IAudienceSequenceFilter { + /** Represents a ListExpandedDataSetsRequest. */ + class ListExpandedDataSetsRequest implements IListExpandedDataSetsRequest { /** - * Constructs a new AudienceSequenceFilter. + * Constructs a new ListExpandedDataSetsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IAudienceSequenceFilter); + constructor(properties?: google.analytics.admin.v1alpha.IListExpandedDataSetsRequest); - /** AudienceSequenceFilter scope. */ - public scope: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope); + /** ListExpandedDataSetsRequest parent. */ + public parent: string; - /** AudienceSequenceFilter sequenceMaximumDuration. */ - public sequenceMaximumDuration?: (google.protobuf.IDuration|null); + /** ListExpandedDataSetsRequest pageSize. */ + public pageSize: number; - /** AudienceSequenceFilter sequenceSteps. */ - public sequenceSteps: google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep[]; + /** ListExpandedDataSetsRequest pageToken. */ + public pageToken: string; /** - * Creates a new AudienceSequenceFilter instance using the specified properties. + * Creates a new ListExpandedDataSetsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns AudienceSequenceFilter instance + * @returns ListExpandedDataSetsRequest instance */ - public static create(properties?: google.analytics.admin.v1alpha.IAudienceSequenceFilter): google.analytics.admin.v1alpha.AudienceSequenceFilter; + public static create(properties?: google.analytics.admin.v1alpha.IListExpandedDataSetsRequest): google.analytics.admin.v1alpha.ListExpandedDataSetsRequest; /** - * Encodes the specified AudienceSequenceFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.verify|verify} messages. - * @param message AudienceSequenceFilter message or plain object to encode + * Encodes the specified ListExpandedDataSetsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListExpandedDataSetsRequest.verify|verify} messages. + * @param message ListExpandedDataSetsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IAudienceSequenceFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AudienceSequenceFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.verify|verify} messages. - * @param message AudienceSequenceFilter message or plain object to encode + * Encodes the specified ListExpandedDataSetsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListExpandedDataSetsRequest.verify|verify} messages. + * @param message ListExpandedDataSetsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceSequenceFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AudienceSequenceFilter message from the specified reader or buffer. + * Decodes a ListExpandedDataSetsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AudienceSequenceFilter + * @returns ListExpandedDataSetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceSequenceFilter; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListExpandedDataSetsRequest; /** - * Decodes an AudienceSequenceFilter message from the specified reader or buffer, length delimited. + * Decodes a ListExpandedDataSetsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AudienceSequenceFilter + * @returns ListExpandedDataSetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceSequenceFilter; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListExpandedDataSetsRequest; /** - * Verifies an AudienceSequenceFilter message. + * Verifies a ListExpandedDataSetsRequest message. * @param message Plain 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 AudienceSequenceFilter message from a plain object. Also converts values to their respective internal types. + * Creates a ListExpandedDataSetsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AudienceSequenceFilter + * @returns ListExpandedDataSetsRequest */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceSequenceFilter; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListExpandedDataSetsRequest; /** - * Creates a plain object from an AudienceSequenceFilter message. Also converts values to other types if specified. - * @param message AudienceSequenceFilter + * Creates a plain object from a ListExpandedDataSetsRequest message. Also converts values to other types if specified. + * @param message ListExpandedDataSetsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.AudienceSequenceFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.ListExpandedDataSetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AudienceSequenceFilter to JSON. + * Converts this ListExpandedDataSetsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AudienceSequenceFilter + * Gets the default type url for ListExpandedDataSetsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace AudienceSequenceFilter { - - /** Properties of an AudienceSequenceStep. */ - interface IAudienceSequenceStep { + /** Properties of a ListExpandedDataSetsResponse. */ + interface IListExpandedDataSetsResponse { - /** AudienceSequenceStep scope */ - scope?: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope|null); + /** ListExpandedDataSetsResponse expandedDataSets */ + expandedDataSets?: (google.analytics.admin.v1alpha.IExpandedDataSet[]|null); - /** AudienceSequenceStep immediatelyFollows */ - immediatelyFollows?: (boolean|null); + /** ListExpandedDataSetsResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** AudienceSequenceStep constraintDuration */ - constraintDuration?: (google.protobuf.IDuration|null); + /** Represents a ListExpandedDataSetsResponse. */ + class ListExpandedDataSetsResponse implements IListExpandedDataSetsResponse { - /** AudienceSequenceStep filterExpression */ - filterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); - } + /** + * Constructs a new ListExpandedDataSetsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListExpandedDataSetsResponse); - /** Represents an AudienceSequenceStep. */ - class AudienceSequenceStep implements IAudienceSequenceStep { + /** ListExpandedDataSetsResponse expandedDataSets. */ + public expandedDataSets: google.analytics.admin.v1alpha.IExpandedDataSet[]; - /** - * Constructs a new AudienceSequenceStep. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep); + /** ListExpandedDataSetsResponse nextPageToken. */ + public nextPageToken: string; - /** AudienceSequenceStep scope. */ - public scope: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope); + /** + * Creates a new ListExpandedDataSetsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListExpandedDataSetsResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListExpandedDataSetsResponse): google.analytics.admin.v1alpha.ListExpandedDataSetsResponse; - /** AudienceSequenceStep immediatelyFollows. */ - public immediatelyFollows: boolean; + /** + * Encodes the specified ListExpandedDataSetsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListExpandedDataSetsResponse.verify|verify} messages. + * @param message ListExpandedDataSetsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListExpandedDataSetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** AudienceSequenceStep constraintDuration. */ - public constraintDuration?: (google.protobuf.IDuration|null); + /** + * Encodes the specified ListExpandedDataSetsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListExpandedDataSetsResponse.verify|verify} messages. + * @param message ListExpandedDataSetsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListExpandedDataSetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** AudienceSequenceStep filterExpression. */ - public filterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + /** + * Decodes a ListExpandedDataSetsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListExpandedDataSetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListExpandedDataSetsResponse; - /** - * Creates a new AudienceSequenceStep instance using the specified properties. - * @param [properties] Properties to set - * @returns AudienceSequenceStep instance - */ - public static create(properties?: google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep): google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep; + /** + * Decodes a ListExpandedDataSetsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListExpandedDataSetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListExpandedDataSetsResponse; - /** - * Encodes the specified AudienceSequenceStep message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.verify|verify} messages. - * @param message AudienceSequenceStep message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a ListExpandedDataSetsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified AudienceSequenceStep message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.verify|verify} messages. - * @param message AudienceSequenceStep message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AudienceSequenceStep message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AudienceSequenceStep - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep; - - /** - * Decodes an AudienceSequenceStep message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AudienceSequenceStep - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep; - - /** - * Verifies an AudienceSequenceStep message. - * @param message Plain 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 AudienceSequenceStep message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AudienceSequenceStep - */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep; + /** + * Creates a ListExpandedDataSetsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListExpandedDataSetsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListExpandedDataSetsResponse; - /** - * Creates a plain object from an AudienceSequenceStep message. Also converts values to other types if specified. - * @param message AudienceSequenceStep - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a ListExpandedDataSetsResponse message. Also converts values to other types if specified. + * @param message ListExpandedDataSetsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListExpandedDataSetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this AudienceSequenceStep to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this ListExpandedDataSetsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for AudienceSequenceStep - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for ListExpandedDataSetsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AudienceFilterClause. */ - interface IAudienceFilterClause { - - /** AudienceFilterClause simpleFilter */ - simpleFilter?: (google.analytics.admin.v1alpha.IAudienceSimpleFilter|null); + /** Properties of a SetAutomatedGa4ConfigurationOptOutRequest. */ + interface ISetAutomatedGa4ConfigurationOptOutRequest { - /** AudienceFilterClause sequenceFilter */ - sequenceFilter?: (google.analytics.admin.v1alpha.IAudienceSequenceFilter|null); + /** SetAutomatedGa4ConfigurationOptOutRequest property */ + property?: (string|null); - /** AudienceFilterClause clauseType */ - clauseType?: (google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType|keyof typeof google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType|null); + /** SetAutomatedGa4ConfigurationOptOutRequest optOut */ + optOut?: (boolean|null); } - /** Represents an AudienceFilterClause. */ - class AudienceFilterClause implements IAudienceFilterClause { + /** Represents a SetAutomatedGa4ConfigurationOptOutRequest. */ + class SetAutomatedGa4ConfigurationOptOutRequest implements ISetAutomatedGa4ConfigurationOptOutRequest { /** - * Constructs a new AudienceFilterClause. + * Constructs a new SetAutomatedGa4ConfigurationOptOutRequest. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IAudienceFilterClause); - - /** AudienceFilterClause simpleFilter. */ - public simpleFilter?: (google.analytics.admin.v1alpha.IAudienceSimpleFilter|null); - - /** AudienceFilterClause sequenceFilter. */ - public sequenceFilter?: (google.analytics.admin.v1alpha.IAudienceSequenceFilter|null); + constructor(properties?: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest); - /** AudienceFilterClause clauseType. */ - public clauseType: (google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType|keyof typeof google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType); + /** SetAutomatedGa4ConfigurationOptOutRequest property. */ + public property: string; - /** AudienceFilterClause filter. */ - public filter?: ("simpleFilter"|"sequenceFilter"); + /** SetAutomatedGa4ConfigurationOptOutRequest optOut. */ + public optOut: boolean; /** - * Creates a new AudienceFilterClause instance using the specified properties. + * Creates a new SetAutomatedGa4ConfigurationOptOutRequest instance using the specified properties. * @param [properties] Properties to set - * @returns AudienceFilterClause instance + * @returns SetAutomatedGa4ConfigurationOptOutRequest instance */ - public static create(properties?: google.analytics.admin.v1alpha.IAudienceFilterClause): google.analytics.admin.v1alpha.AudienceFilterClause; + public static create(properties?: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest): google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest; /** - * Encodes the specified AudienceFilterClause message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterClause.verify|verify} messages. - * @param message AudienceFilterClause message or plain object to encode + * Encodes the specified SetAutomatedGa4ConfigurationOptOutRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. + * @param message SetAutomatedGa4ConfigurationOptOutRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IAudienceFilterClause, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AudienceFilterClause message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterClause.verify|verify} messages. - * @param message AudienceFilterClause message or plain object to encode + * Encodes the specified SetAutomatedGa4ConfigurationOptOutRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. + * @param message SetAutomatedGa4ConfigurationOptOutRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceFilterClause, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AudienceFilterClause message from the specified reader or buffer. + * Decodes a SetAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AudienceFilterClause + * @returns SetAutomatedGa4ConfigurationOptOutRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceFilterClause; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest; /** - * Decodes an AudienceFilterClause message from the specified reader or buffer, length delimited. + * Decodes a SetAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AudienceFilterClause + * @returns SetAutomatedGa4ConfigurationOptOutRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceFilterClause; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest; /** - * Verifies an AudienceFilterClause message. + * Verifies a SetAutomatedGa4ConfigurationOptOutRequest message. * @param message Plain 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 AudienceFilterClause message from a plain object. Also converts values to their respective internal types. + * Creates a SetAutomatedGa4ConfigurationOptOutRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AudienceFilterClause + * @returns SetAutomatedGa4ConfigurationOptOutRequest */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceFilterClause; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest; /** - * Creates a plain object from an AudienceFilterClause message. Also converts values to other types if specified. - * @param message AudienceFilterClause + * Creates a plain object from a SetAutomatedGa4ConfigurationOptOutRequest message. Also converts values to other types if specified. + * @param message SetAutomatedGa4ConfigurationOptOutRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.AudienceFilterClause, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AudienceFilterClause to JSON. + * Converts this SetAutomatedGa4ConfigurationOptOutRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AudienceFilterClause + * Gets the default type url for SetAutomatedGa4ConfigurationOptOutRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace AudienceFilterClause { - - /** AudienceClauseType enum. */ - enum AudienceClauseType { - AUDIENCE_CLAUSE_TYPE_UNSPECIFIED = 0, - INCLUDE = 1, - EXCLUDE = 2 - } - } - - /** Properties of an AudienceEventTrigger. */ - interface IAudienceEventTrigger { - - /** AudienceEventTrigger eventName */ - eventName?: (string|null); - - /** AudienceEventTrigger logCondition */ - logCondition?: (google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition|keyof typeof google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition|null); + /** Properties of a SetAutomatedGa4ConfigurationOptOutResponse. */ + interface ISetAutomatedGa4ConfigurationOptOutResponse { } - /** Represents an AudienceEventTrigger. */ - class AudienceEventTrigger implements IAudienceEventTrigger { + /** Represents a SetAutomatedGa4ConfigurationOptOutResponse. */ + class SetAutomatedGa4ConfigurationOptOutResponse implements ISetAutomatedGa4ConfigurationOptOutResponse { /** - * Constructs a new AudienceEventTrigger. + * Constructs a new SetAutomatedGa4ConfigurationOptOutResponse. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IAudienceEventTrigger); - - /** AudienceEventTrigger eventName. */ - public eventName: string; - - /** AudienceEventTrigger logCondition. */ - public logCondition: (google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition|keyof typeof google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition); + constructor(properties?: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse); /** - * Creates a new AudienceEventTrigger instance using the specified properties. + * Creates a new SetAutomatedGa4ConfigurationOptOutResponse instance using the specified properties. * @param [properties] Properties to set - * @returns AudienceEventTrigger instance + * @returns SetAutomatedGa4ConfigurationOptOutResponse instance */ - public static create(properties?: google.analytics.admin.v1alpha.IAudienceEventTrigger): google.analytics.admin.v1alpha.AudienceEventTrigger; + public static create(properties?: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse): google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse; /** - * Encodes the specified AudienceEventTrigger message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventTrigger.verify|verify} messages. - * @param message AudienceEventTrigger message or plain object to encode + * Encodes the specified SetAutomatedGa4ConfigurationOptOutResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. + * @param message SetAutomatedGa4ConfigurationOptOutResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IAudienceEventTrigger, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AudienceEventTrigger message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventTrigger.verify|verify} messages. - * @param message AudienceEventTrigger message or plain object to encode + * Encodes the specified SetAutomatedGa4ConfigurationOptOutResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. + * @param message SetAutomatedGa4ConfigurationOptOutResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceEventTrigger, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AudienceEventTrigger message from the specified reader or buffer. + * Decodes a SetAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AudienceEventTrigger + * @returns SetAutomatedGa4ConfigurationOptOutResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceEventTrigger; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse; /** - * Decodes an AudienceEventTrigger message from the specified reader or buffer, length delimited. + * Decodes a SetAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AudienceEventTrigger + * @returns SetAutomatedGa4ConfigurationOptOutResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceEventTrigger; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse; /** - * Verifies an AudienceEventTrigger message. + * Verifies a SetAutomatedGa4ConfigurationOptOutResponse message. * @param message Plain 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 AudienceEventTrigger message from a plain object. Also converts values to their respective internal types. + * Creates a SetAutomatedGa4ConfigurationOptOutResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AudienceEventTrigger + * @returns SetAutomatedGa4ConfigurationOptOutResponse */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceEventTrigger; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse; /** - * Creates a plain object from an AudienceEventTrigger message. Also converts values to other types if specified. - * @param message AudienceEventTrigger + * Creates a plain object from a SetAutomatedGa4ConfigurationOptOutResponse message. Also converts values to other types if specified. + * @param message SetAutomatedGa4ConfigurationOptOutResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.AudienceEventTrigger, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AudienceEventTrigger to JSON. + * Converts this SetAutomatedGa4ConfigurationOptOutResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AudienceEventTrigger + * Gets the default type url for SetAutomatedGa4ConfigurationOptOutResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace AudienceEventTrigger { + /** Properties of a FetchAutomatedGa4ConfigurationOptOutRequest. */ + interface IFetchAutomatedGa4ConfigurationOptOutRequest { - /** LogCondition enum. */ - enum LogCondition { - LOG_CONDITION_UNSPECIFIED = 0, - AUDIENCE_JOINED = 1, - AUDIENCE_MEMBERSHIP_RENEWED = 2 - } + /** FetchAutomatedGa4ConfigurationOptOutRequest property */ + property?: (string|null); } - /** Properties of an Audience. */ - interface IAudience { - - /** Audience name */ - name?: (string|null); + /** Represents a FetchAutomatedGa4ConfigurationOptOutRequest. */ + class FetchAutomatedGa4ConfigurationOptOutRequest implements IFetchAutomatedGa4ConfigurationOptOutRequest { - /** Audience displayName */ - displayName?: (string|null); + /** + * Constructs a new FetchAutomatedGa4ConfigurationOptOutRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest); - /** Audience description */ - description?: (string|null); + /** FetchAutomatedGa4ConfigurationOptOutRequest property. */ + public property: string; - /** Audience membershipDurationDays */ - membershipDurationDays?: (number|null); + /** + * Creates a new FetchAutomatedGa4ConfigurationOptOutRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchAutomatedGa4ConfigurationOptOutRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest): google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest; - /** Audience adsPersonalizationEnabled */ - adsPersonalizationEnabled?: (boolean|null); + /** + * Encodes the specified FetchAutomatedGa4ConfigurationOptOutRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. + * @param message FetchAutomatedGa4ConfigurationOptOutRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Audience eventTrigger */ - eventTrigger?: (google.analytics.admin.v1alpha.IAudienceEventTrigger|null); + /** + * Encodes the specified FetchAutomatedGa4ConfigurationOptOutRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. + * @param message FetchAutomatedGa4ConfigurationOptOutRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Audience exclusionDurationMode */ - exclusionDurationMode?: (google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode|keyof typeof google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode|null); + /** + * Decodes a FetchAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchAutomatedGa4ConfigurationOptOutRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest; - /** Audience filterClauses */ - filterClauses?: (google.analytics.admin.v1alpha.IAudienceFilterClause[]|null); - } + /** + * Decodes a FetchAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchAutomatedGa4ConfigurationOptOutRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest; - /** Represents an Audience. */ - class Audience implements IAudience { + /** + * Verifies a FetchAutomatedGa4ConfigurationOptOutRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); /** - * Constructs a new Audience. - * @param [properties] Properties to set + * Creates a FetchAutomatedGa4ConfigurationOptOutRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchAutomatedGa4ConfigurationOptOutRequest */ - constructor(properties?: google.analytics.admin.v1alpha.IAudience); + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest; - /** Audience name. */ - public name: string; + /** + * Creates a plain object from a FetchAutomatedGa4ConfigurationOptOutRequest message. Also converts values to other types if specified. + * @param message FetchAutomatedGa4ConfigurationOptOutRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Audience displayName. */ - public displayName: string; + /** + * Converts this FetchAutomatedGa4ConfigurationOptOutRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Audience description. */ - public description: string; + /** + * Gets the default type url for FetchAutomatedGa4ConfigurationOptOutRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Audience membershipDurationDays. */ - public membershipDurationDays: number; + /** Properties of a FetchAutomatedGa4ConfigurationOptOutResponse. */ + interface IFetchAutomatedGa4ConfigurationOptOutResponse { - /** Audience adsPersonalizationEnabled. */ - public adsPersonalizationEnabled: boolean; + /** FetchAutomatedGa4ConfigurationOptOutResponse optOut */ + optOut?: (boolean|null); + } - /** Audience eventTrigger. */ - public eventTrigger?: (google.analytics.admin.v1alpha.IAudienceEventTrigger|null); + /** Represents a FetchAutomatedGa4ConfigurationOptOutResponse. */ + class FetchAutomatedGa4ConfigurationOptOutResponse implements IFetchAutomatedGa4ConfigurationOptOutResponse { - /** Audience exclusionDurationMode. */ - public exclusionDurationMode: (google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode|keyof typeof google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode); + /** + * Constructs a new FetchAutomatedGa4ConfigurationOptOutResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse); - /** Audience filterClauses. */ - public filterClauses: google.analytics.admin.v1alpha.IAudienceFilterClause[]; + /** FetchAutomatedGa4ConfigurationOptOutResponse optOut. */ + public optOut: boolean; /** - * Creates a new Audience instance using the specified properties. + * Creates a new FetchAutomatedGa4ConfigurationOptOutResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Audience instance + * @returns FetchAutomatedGa4ConfigurationOptOutResponse instance */ - public static create(properties?: google.analytics.admin.v1alpha.IAudience): google.analytics.admin.v1alpha.Audience; + public static create(properties?: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse): google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse; /** - * Encodes the specified Audience message. Does not implicitly {@link google.analytics.admin.v1alpha.Audience.verify|verify} messages. - * @param message Audience message or plain object to encode + * Encodes the specified FetchAutomatedGa4ConfigurationOptOutResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. + * @param message FetchAutomatedGa4ConfigurationOptOutResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IAudience, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Audience message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.Audience.verify|verify} messages. - * @param message Audience message or plain object to encode + * Encodes the specified FetchAutomatedGa4ConfigurationOptOutResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. + * @param message FetchAutomatedGa4ConfigurationOptOutResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudience, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Audience message from the specified reader or buffer. + * Decodes a FetchAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Audience + * @returns FetchAutomatedGa4ConfigurationOptOutResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.Audience; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse; /** - * Decodes an Audience message from the specified reader or buffer, length delimited. + * Decodes a FetchAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Audience + * @returns FetchAutomatedGa4ConfigurationOptOutResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.Audience; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse; /** - * Verifies an Audience message. + * Verifies a FetchAutomatedGa4ConfigurationOptOutResponse message. * @param message Plain 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 Audience message from a plain object. Also converts values to their respective internal types. + * Creates a FetchAutomatedGa4ConfigurationOptOutResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Audience + * @returns FetchAutomatedGa4ConfigurationOptOutResponse */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.Audience; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse; /** - * Creates a plain object from an Audience message. Also converts values to other types if specified. - * @param message Audience + * Creates a plain object from a FetchAutomatedGa4ConfigurationOptOutResponse message. Also converts values to other types if specified. + * @param message FetchAutomatedGa4ConfigurationOptOutResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.Audience, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Audience to JSON. + * Converts this FetchAutomatedGa4ConfigurationOptOutResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Audience + * Gets the default type url for FetchAutomatedGa4ConfigurationOptOutResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Audience { + /** Properties of a GetBigQueryLinkRequest. */ + interface IGetBigQueryLinkRequest { - /** AudienceExclusionDurationMode enum. */ - enum AudienceExclusionDurationMode { - AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED = 0, - EXCLUDE_TEMPORARILY = 1, - EXCLUDE_PERMANENTLY = 2 - } + /** GetBigQueryLinkRequest name */ + name?: (string|null); } - /** IndustryCategory enum. */ - enum IndustryCategory { - INDUSTRY_CATEGORY_UNSPECIFIED = 0, - AUTOMOTIVE = 1, - BUSINESS_AND_INDUSTRIAL_MARKETS = 2, - FINANCE = 3, - HEALTHCARE = 4, - TECHNOLOGY = 5, - TRAVEL = 6, - OTHER = 7, - ARTS_AND_ENTERTAINMENT = 8, - BEAUTY_AND_FITNESS = 9, - BOOKS_AND_LITERATURE = 10, - FOOD_AND_DRINK = 11, - GAMES = 12, - HOBBIES_AND_LEISURE = 13, - HOME_AND_GARDEN = 14, - INTERNET_AND_TELECOM = 15, - LAW_AND_GOVERNMENT = 16, - NEWS = 17, - ONLINE_COMMUNITIES = 18, - PEOPLE_AND_SOCIETY = 19, - PETS_AND_ANIMALS = 20, - REAL_ESTATE = 21, - REFERENCE = 22, - SCIENCE = 23, - SPORTS = 24, - JOBS_AND_EDUCATION = 25, - SHOPPING = 26 - } + /** Represents a GetBigQueryLinkRequest. */ + class GetBigQueryLinkRequest implements IGetBigQueryLinkRequest { - /** ServiceLevel enum. */ - enum ServiceLevel { - SERVICE_LEVEL_UNSPECIFIED = 0, - GOOGLE_ANALYTICS_STANDARD = 1, - GOOGLE_ANALYTICS_360 = 2 - } + /** + * Constructs a new GetBigQueryLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IGetBigQueryLinkRequest); - /** ActorType enum. */ - enum ActorType { - ACTOR_TYPE_UNSPECIFIED = 0, - USER = 1, - SYSTEM = 2, - SUPPORT = 3 - } + /** GetBigQueryLinkRequest name. */ + public name: string; - /** ActionType enum. */ - enum ActionType { - ACTION_TYPE_UNSPECIFIED = 0, - CREATED = 1, - UPDATED = 2, - DELETED = 3 - } + /** + * Creates a new GetBigQueryLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBigQueryLinkRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IGetBigQueryLinkRequest): google.analytics.admin.v1alpha.GetBigQueryLinkRequest; - /** ChangeHistoryResourceType enum. */ - enum ChangeHistoryResourceType { - CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED = 0, - ACCOUNT = 1, - PROPERTY = 2, - FIREBASE_LINK = 6, - GOOGLE_ADS_LINK = 7, - GOOGLE_SIGNALS_SETTINGS = 8, - CONVERSION_EVENT = 9, - MEASUREMENT_PROTOCOL_SECRET = 10, - CUSTOM_DIMENSION = 11, - CUSTOM_METRIC = 12, - DATA_RETENTION_SETTINGS = 13, - DISPLAY_VIDEO_360_ADVERTISER_LINK = 14, - DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL = 15, - SEARCH_ADS_360_LINK = 16, - DATA_STREAM = 18, - ATTRIBUTION_SETTINGS = 20, - EXPANDED_DATA_SET = 21, - CHANNEL_GROUP = 22 - } + /** + * Encodes the specified GetBigQueryLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetBigQueryLinkRequest.verify|verify} messages. + * @param message GetBigQueryLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IGetBigQueryLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** GoogleSignalsState enum. */ - enum GoogleSignalsState { - GOOGLE_SIGNALS_STATE_UNSPECIFIED = 0, - GOOGLE_SIGNALS_ENABLED = 1, - GOOGLE_SIGNALS_DISABLED = 2 - } + /** + * Encodes the specified GetBigQueryLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetBigQueryLinkRequest.verify|verify} messages. + * @param message GetBigQueryLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGetBigQueryLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** GoogleSignalsConsent enum. */ - enum GoogleSignalsConsent { - GOOGLE_SIGNALS_CONSENT_UNSPECIFIED = 0, - GOOGLE_SIGNALS_CONSENT_CONSENTED = 2, - GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED = 1 - } + /** + * Decodes a GetBigQueryLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetBigQueryLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GetBigQueryLinkRequest; - /** LinkProposalInitiatingProduct enum. */ - enum LinkProposalInitiatingProduct { - LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED = 0, - GOOGLE_ANALYTICS = 1, - LINKED_PRODUCT = 2 - } + /** + * Decodes a GetBigQueryLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetBigQueryLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GetBigQueryLinkRequest; - /** LinkProposalState enum. */ - enum LinkProposalState { - LINK_PROPOSAL_STATE_UNSPECIFIED = 0, - AWAITING_REVIEW_FROM_GOOGLE_ANALYTICS = 1, - AWAITING_REVIEW_FROM_LINKED_PRODUCT = 2, - WITHDRAWN = 3, - DECLINED = 4, - EXPIRED = 5, - OBSOLETE = 6 - } + /** + * Verifies a GetBigQueryLinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** PropertyType enum. */ - enum PropertyType { - PROPERTY_TYPE_UNSPECIFIED = 0, - PROPERTY_TYPE_ORDINARY = 1, - PROPERTY_TYPE_SUBPROPERTY = 2, - PROPERTY_TYPE_ROLLUP = 3 - } + /** + * Creates a GetBigQueryLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetBigQueryLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GetBigQueryLinkRequest; - /** Properties of an Account. */ - interface IAccount { + /** + * Creates a plain object from a GetBigQueryLinkRequest message. Also converts values to other types if specified. + * @param message GetBigQueryLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.GetBigQueryLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Account name */ - name?: (string|null); + /** + * Converts this GetBigQueryLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Account createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** + * Gets the default type url for GetBigQueryLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Account updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** Properties of a ListBigQueryLinksRequest. */ + interface IListBigQueryLinksRequest { - /** Account displayName */ - displayName?: (string|null); + /** ListBigQueryLinksRequest parent */ + parent?: (string|null); - /** Account regionCode */ - regionCode?: (string|null); + /** ListBigQueryLinksRequest pageSize */ + pageSize?: (number|null); - /** Account deleted */ - deleted?: (boolean|null); + /** ListBigQueryLinksRequest pageToken */ + pageToken?: (string|null); } - /** Represents an Account. */ - class Account implements IAccount { + /** Represents a ListBigQueryLinksRequest. */ + class ListBigQueryLinksRequest implements IListBigQueryLinksRequest { /** - * Constructs a new Account. + * Constructs a new ListBigQueryLinksRequest. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IAccount); - - /** Account name. */ - public name: string; - - /** Account createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Account updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + constructor(properties?: google.analytics.admin.v1alpha.IListBigQueryLinksRequest); - /** Account displayName. */ - public displayName: string; + /** ListBigQueryLinksRequest parent. */ + public parent: string; - /** Account regionCode. */ - public regionCode: string; + /** ListBigQueryLinksRequest pageSize. */ + public pageSize: number; - /** Account deleted. */ - public deleted: boolean; + /** ListBigQueryLinksRequest pageToken. */ + public pageToken: string; /** - * Creates a new Account instance using the specified properties. + * Creates a new ListBigQueryLinksRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Account instance + * @returns ListBigQueryLinksRequest instance */ - public static create(properties?: google.analytics.admin.v1alpha.IAccount): google.analytics.admin.v1alpha.Account; + public static create(properties?: google.analytics.admin.v1alpha.IListBigQueryLinksRequest): google.analytics.admin.v1alpha.ListBigQueryLinksRequest; /** - * Encodes the specified Account message. Does not implicitly {@link google.analytics.admin.v1alpha.Account.verify|verify} messages. - * @param message Account message or plain object to encode + * Encodes the specified ListBigQueryLinksRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksRequest.verify|verify} messages. + * @param message ListBigQueryLinksRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IAccount, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IListBigQueryLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Account message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.Account.verify|verify} messages. - * @param message Account message or plain object to encode + * Encodes the specified ListBigQueryLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksRequest.verify|verify} messages. + * @param message ListBigQueryLinksRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IAccount, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListBigQueryLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Account message from the specified reader or buffer. + * Decodes a ListBigQueryLinksRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Account + * @returns ListBigQueryLinksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.Account; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListBigQueryLinksRequest; /** - * Decodes an Account message from the specified reader or buffer, length delimited. + * Decodes a ListBigQueryLinksRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Account + * @returns ListBigQueryLinksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.Account; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListBigQueryLinksRequest; /** - * Verifies an Account message. + * Verifies a ListBigQueryLinksRequest message. * @param message Plain 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 Account message from a plain object. Also converts values to their respective internal types. + * Creates a ListBigQueryLinksRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Account + * @returns ListBigQueryLinksRequest */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.Account; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListBigQueryLinksRequest; /** - * Creates a plain object from an Account message. Also converts values to other types if specified. - * @param message Account + * Creates a plain object from a ListBigQueryLinksRequest message. Also converts values to other types if specified. + * @param message ListBigQueryLinksRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.Account, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.ListBigQueryLinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Account to JSON. + * Converts this ListBigQueryLinksRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Account + * Gets the default type url for ListBigQueryLinksRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Property. */ - interface IProperty { - - /** Property name */ - name?: (string|null); + /** Properties of a ListBigQueryLinksResponse. */ + interface IListBigQueryLinksResponse { - /** Property propertyType */ - propertyType?: (google.analytics.admin.v1alpha.PropertyType|keyof typeof google.analytics.admin.v1alpha.PropertyType|null); + /** ListBigQueryLinksResponse bigqueryLinks */ + bigqueryLinks?: (google.analytics.admin.v1alpha.IBigQueryLink[]|null); - /** Property createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** ListBigQueryLinksResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** Property updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** Represents a ListBigQueryLinksResponse. */ + class ListBigQueryLinksResponse implements IListBigQueryLinksResponse { - /** Property parent */ - parent?: (string|null); + /** + * Constructs a new ListBigQueryLinksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListBigQueryLinksResponse); - /** Property displayName */ - displayName?: (string|null); + /** ListBigQueryLinksResponse bigqueryLinks. */ + public bigqueryLinks: google.analytics.admin.v1alpha.IBigQueryLink[]; - /** Property industryCategory */ - industryCategory?: (google.analytics.admin.v1alpha.IndustryCategory|keyof typeof google.analytics.admin.v1alpha.IndustryCategory|null); + /** ListBigQueryLinksResponse nextPageToken. */ + public nextPageToken: string; - /** Property timeZone */ - timeZone?: (string|null); - - /** Property currencyCode */ - currencyCode?: (string|null); - - /** Property serviceLevel */ - serviceLevel?: (google.analytics.admin.v1alpha.ServiceLevel|keyof typeof google.analytics.admin.v1alpha.ServiceLevel|null); - - /** Property deleteTime */ - deleteTime?: (google.protobuf.ITimestamp|null); - - /** Property expireTime */ - expireTime?: (google.protobuf.ITimestamp|null); - - /** Property account */ - account?: (string|null); - } - - /** Represents a Property. */ - class Property implements IProperty { - - /** - * Constructs a new Property. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.admin.v1alpha.IProperty); - - /** Property name. */ - public name: string; - - /** Property propertyType. */ - public propertyType: (google.analytics.admin.v1alpha.PropertyType|keyof typeof google.analytics.admin.v1alpha.PropertyType); - - /** Property createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Property updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Property parent. */ - public parent: string; - - /** Property displayName. */ - public displayName: string; - - /** Property industryCategory. */ - public industryCategory: (google.analytics.admin.v1alpha.IndustryCategory|keyof typeof google.analytics.admin.v1alpha.IndustryCategory); - - /** Property timeZone. */ - public timeZone: string; - - /** Property currencyCode. */ - public currencyCode: string; - - /** Property serviceLevel. */ - public serviceLevel: (google.analytics.admin.v1alpha.ServiceLevel|keyof typeof google.analytics.admin.v1alpha.ServiceLevel); - - /** Property deleteTime. */ - public deleteTime?: (google.protobuf.ITimestamp|null); - - /** Property expireTime. */ - public expireTime?: (google.protobuf.ITimestamp|null); - - /** Property account. */ - public account: string; - - /** - * Creates a new Property instance using the specified properties. - * @param [properties] Properties to set - * @returns Property instance - */ - public static create(properties?: google.analytics.admin.v1alpha.IProperty): google.analytics.admin.v1alpha.Property; + /** + * Creates a new ListBigQueryLinksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBigQueryLinksResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListBigQueryLinksResponse): google.analytics.admin.v1alpha.ListBigQueryLinksResponse; /** - * Encodes the specified Property message. Does not implicitly {@link google.analytics.admin.v1alpha.Property.verify|verify} messages. - * @param message Property message or plain object to encode + * Encodes the specified ListBigQueryLinksResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksResponse.verify|verify} messages. + * @param message ListBigQueryLinksResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IProperty, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IListBigQueryLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Property message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.Property.verify|verify} messages. - * @param message Property message or plain object to encode + * Encodes the specified ListBigQueryLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksResponse.verify|verify} messages. + * @param message ListBigQueryLinksResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IProperty, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListBigQueryLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Property message from the specified reader or buffer. + * Decodes a ListBigQueryLinksResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Property + * @returns ListBigQueryLinksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.Property; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListBigQueryLinksResponse; /** - * Decodes a Property message from the specified reader or buffer, length delimited. + * Decodes a ListBigQueryLinksResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Property + * @returns ListBigQueryLinksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.Property; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListBigQueryLinksResponse; /** - * Verifies a Property message. + * Verifies a ListBigQueryLinksResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Property message from a plain object. Also converts values to their respective internal types. + * Creates a ListBigQueryLinksResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Property + * @returns ListBigQueryLinksResponse */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.Property; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListBigQueryLinksResponse; /** - * Creates a plain object from a Property message. Also converts values to other types if specified. - * @param message Property + * Creates a plain object from a ListBigQueryLinksResponse message. Also converts values to other types if specified. + * @param message ListBigQueryLinksResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.Property, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.ListBigQueryLinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Property to JSON. + * Converts this ListBigQueryLinksResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Property + * Gets the default type url for ListBigQueryLinksResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DataStream. */ - interface IDataStream { + /** AudienceFilterScope enum. */ + enum AudienceFilterScope { + AUDIENCE_FILTER_SCOPE_UNSPECIFIED = 0, + AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT = 1, + AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION = 2, + AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS = 3 + } - /** DataStream webStreamData */ - webStreamData?: (google.analytics.admin.v1alpha.DataStream.IWebStreamData|null); + /** Properties of an AudienceDimensionOrMetricFilter. */ + interface IAudienceDimensionOrMetricFilter { - /** DataStream androidAppStreamData */ - androidAppStreamData?: (google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData|null); + /** AudienceDimensionOrMetricFilter stringFilter */ + stringFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter|null); - /** DataStream iosAppStreamData */ - iosAppStreamData?: (google.analytics.admin.v1alpha.DataStream.IIosAppStreamData|null); + /** AudienceDimensionOrMetricFilter inListFilter */ + inListFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter|null); - /** DataStream name */ - name?: (string|null); + /** AudienceDimensionOrMetricFilter numericFilter */ + numericFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter|null); - /** DataStream type */ - type?: (google.analytics.admin.v1alpha.DataStream.DataStreamType|keyof typeof google.analytics.admin.v1alpha.DataStream.DataStreamType|null); + /** AudienceDimensionOrMetricFilter betweenFilter */ + betweenFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter|null); - /** DataStream displayName */ - displayName?: (string|null); + /** AudienceDimensionOrMetricFilter fieldName */ + fieldName?: (string|null); - /** DataStream createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** AudienceDimensionOrMetricFilter atAnyPointInTime */ + atAnyPointInTime?: (boolean|null); - /** DataStream updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** AudienceDimensionOrMetricFilter inAnyNDayPeriod */ + inAnyNDayPeriod?: (number|null); } - /** Represents a DataStream. */ - class DataStream implements IDataStream { + /** Represents an AudienceDimensionOrMetricFilter. */ + class AudienceDimensionOrMetricFilter implements IAudienceDimensionOrMetricFilter { /** - * Constructs a new DataStream. + * Constructs a new AudienceDimensionOrMetricFilter. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IDataStream); - - /** DataStream webStreamData. */ - public webStreamData?: (google.analytics.admin.v1alpha.DataStream.IWebStreamData|null); + constructor(properties?: google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter); - /** DataStream androidAppStreamData. */ - public androidAppStreamData?: (google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData|null); + /** AudienceDimensionOrMetricFilter stringFilter. */ + public stringFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter|null); - /** DataStream iosAppStreamData. */ - public iosAppStreamData?: (google.analytics.admin.v1alpha.DataStream.IIosAppStreamData|null); + /** AudienceDimensionOrMetricFilter inListFilter. */ + public inListFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter|null); - /** DataStream name. */ - public name: string; + /** AudienceDimensionOrMetricFilter numericFilter. */ + public numericFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter|null); - /** DataStream type. */ - public type: (google.analytics.admin.v1alpha.DataStream.DataStreamType|keyof typeof google.analytics.admin.v1alpha.DataStream.DataStreamType); + /** AudienceDimensionOrMetricFilter betweenFilter. */ + public betweenFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter|null); - /** DataStream displayName. */ - public displayName: string; + /** AudienceDimensionOrMetricFilter fieldName. */ + public fieldName: string; - /** DataStream createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** AudienceDimensionOrMetricFilter atAnyPointInTime. */ + public atAnyPointInTime: boolean; - /** DataStream updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** AudienceDimensionOrMetricFilter inAnyNDayPeriod. */ + public inAnyNDayPeriod: number; - /** DataStream streamData. */ - public streamData?: ("webStreamData"|"androidAppStreamData"|"iosAppStreamData"); + /** AudienceDimensionOrMetricFilter oneFilter. */ + public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); /** - * Creates a new DataStream instance using the specified properties. + * Creates a new AudienceDimensionOrMetricFilter instance using the specified properties. * @param [properties] Properties to set - * @returns DataStream instance + * @returns AudienceDimensionOrMetricFilter instance */ - public static create(properties?: google.analytics.admin.v1alpha.IDataStream): google.analytics.admin.v1alpha.DataStream; + public static create(properties?: google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter; /** - * Encodes the specified DataStream message. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.verify|verify} messages. - * @param message DataStream message or plain object to encode + * Encodes the specified AudienceDimensionOrMetricFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.verify|verify} messages. + * @param message AudienceDimensionOrMetricFilter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IDataStream, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DataStream message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.verify|verify} messages. - * @param message DataStream message or plain object to encode + * Encodes the specified AudienceDimensionOrMetricFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.verify|verify} messages. + * @param message AudienceDimensionOrMetricFilter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IDataStream, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DataStream message from the specified reader or buffer. + * Decodes an AudienceDimensionOrMetricFilter message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DataStream + * @returns AudienceDimensionOrMetricFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DataStream; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter; /** - * Decodes a DataStream message from the specified reader or buffer, length delimited. + * Decodes an AudienceDimensionOrMetricFilter message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DataStream + * @returns AudienceDimensionOrMetricFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DataStream; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter; /** - * Verifies a DataStream message. + * Verifies an AudienceDimensionOrMetricFilter message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DataStream message from a plain object. Also converts values to their respective internal types. + * Creates an AudienceDimensionOrMetricFilter message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DataStream + * @returns AudienceDimensionOrMetricFilter */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DataStream; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter; /** - * Creates a plain object from a DataStream message. Also converts values to other types if specified. - * @param message DataStream + * Creates a plain object from an AudienceDimensionOrMetricFilter message. Also converts values to other types if specified. + * @param message AudienceDimensionOrMetricFilter * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.DataStream, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DataStream to JSON. + * Converts this AudienceDimensionOrMetricFilter to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DataStream + * Gets the default type url for AudienceDimensionOrMetricFilter * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace DataStream { + namespace AudienceDimensionOrMetricFilter { - /** Properties of a WebStreamData. */ - interface IWebStreamData { + /** Properties of a StringFilter. */ + interface IStringFilter { - /** WebStreamData measurementId */ - measurementId?: (string|null); + /** StringFilter matchType */ + matchType?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType|keyof typeof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType|null); - /** WebStreamData firebaseAppId */ - firebaseAppId?: (string|null); + /** StringFilter value */ + value?: (string|null); - /** WebStreamData defaultUri */ - defaultUri?: (string|null); + /** StringFilter caseSensitive */ + caseSensitive?: (boolean|null); } - /** Represents a WebStreamData. */ - class WebStreamData implements IWebStreamData { + /** Represents a StringFilter. */ + class StringFilter implements IStringFilter { /** - * Constructs a new WebStreamData. + * Constructs a new StringFilter. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.DataStream.IWebStreamData); + constructor(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter); - /** WebStreamData measurementId. */ - public measurementId: string; + /** StringFilter matchType. */ + public matchType: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType|keyof typeof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType); - /** WebStreamData firebaseAppId. */ - public firebaseAppId: string; + /** StringFilter value. */ + public value: string; - /** WebStreamData defaultUri. */ - public defaultUri: string; + /** StringFilter caseSensitive. */ + public caseSensitive: boolean; /** - * Creates a new WebStreamData instance using the specified properties. + * Creates a new StringFilter instance using the specified properties. * @param [properties] Properties to set - * @returns WebStreamData instance + * @returns StringFilter instance */ - public static create(properties?: google.analytics.admin.v1alpha.DataStream.IWebStreamData): google.analytics.admin.v1alpha.DataStream.WebStreamData; + public static create(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter; /** - * Encodes the specified WebStreamData message. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.WebStreamData.verify|verify} messages. - * @param message WebStreamData message or plain object to encode + * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.verify|verify} messages. + * @param message StringFilter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.DataStream.IWebStreamData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified WebStreamData message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.WebStreamData.verify|verify} messages. - * @param message WebStreamData message or plain object to encode + * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.verify|verify} messages. + * @param message StringFilter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.DataStream.IWebStreamData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a WebStreamData message from the specified reader or buffer. + * Decodes a StringFilter message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns WebStreamData + * @returns StringFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DataStream.WebStreamData; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter; /** - * Decodes a WebStreamData message from the specified reader or buffer, length delimited. + * Decodes a StringFilter message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns WebStreamData + * @returns StringFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DataStream.WebStreamData; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter; /** - * Verifies a WebStreamData message. + * Verifies a StringFilter message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a WebStreamData message from a plain object. Also converts values to their respective internal types. + * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns WebStreamData + * @returns StringFilter */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DataStream.WebStreamData; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter; /** - * Creates a plain object from a WebStreamData message. Also converts values to other types if specified. - * @param message WebStreamData + * Creates a plain object from a StringFilter message. Also converts values to other types if specified. + * @param message StringFilter * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.DataStream.WebStreamData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this WebStreamData to JSON. + * Converts this StringFilter to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for WebStreamData + * Gets the default type url for StringFilter * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AndroidAppStreamData. */ - interface IAndroidAppStreamData { + namespace StringFilter { - /** AndroidAppStreamData firebaseAppId */ - firebaseAppId?: (string|null); + /** MatchType enum. */ + enum MatchType { + MATCH_TYPE_UNSPECIFIED = 0, + EXACT = 1, + BEGINS_WITH = 2, + ENDS_WITH = 3, + CONTAINS = 4, + FULL_REGEXP = 5 + } + } - /** AndroidAppStreamData packageName */ - packageName?: (string|null); + /** Properties of an InListFilter. */ + interface IInListFilter { + + /** InListFilter values */ + values?: (string[]|null); + + /** InListFilter caseSensitive */ + caseSensitive?: (boolean|null); } - /** Represents an AndroidAppStreamData. */ - class AndroidAppStreamData implements IAndroidAppStreamData { + /** Represents an InListFilter. */ + class InListFilter implements IInListFilter { /** - * Constructs a new AndroidAppStreamData. + * Constructs a new InListFilter. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData); + constructor(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter); - /** AndroidAppStreamData firebaseAppId. */ - public firebaseAppId: string; + /** InListFilter values. */ + public values: string[]; - /** AndroidAppStreamData packageName. */ - public packageName: string; + /** InListFilter caseSensitive. */ + public caseSensitive: boolean; /** - * Creates a new AndroidAppStreamData instance using the specified properties. + * Creates a new InListFilter instance using the specified properties. * @param [properties] Properties to set - * @returns AndroidAppStreamData instance + * @returns InListFilter instance */ - public static create(properties?: google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData): google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData; + public static create(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter; /** - * Encodes the specified AndroidAppStreamData message. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData.verify|verify} messages. - * @param message AndroidAppStreamData message or plain object to encode + * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.verify|verify} messages. + * @param message InListFilter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AndroidAppStreamData message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData.verify|verify} messages. - * @param message AndroidAppStreamData message or plain object to encode + * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.verify|verify} messages. + * @param message InListFilter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AndroidAppStreamData message from the specified reader or buffer. + * Decodes an InListFilter message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AndroidAppStreamData + * @returns InListFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter; /** - * Decodes an AndroidAppStreamData message from the specified reader or buffer, length delimited. + * Decodes an InListFilter message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AndroidAppStreamData + * @returns InListFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter; /** - * Verifies an AndroidAppStreamData message. + * Verifies an InListFilter message. * @param message Plain 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 AndroidAppStreamData message from a plain object. Also converts values to their respective internal types. + * Creates an InListFilter message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AndroidAppStreamData + * @returns InListFilter */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter; /** - * Creates a plain object from an AndroidAppStreamData message. Also converts values to other types if specified. - * @param message AndroidAppStreamData + * Creates a plain object from an InListFilter message. Also converts values to other types if specified. + * @param message InListFilter * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AndroidAppStreamData to JSON. + * Converts this InListFilter to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AndroidAppStreamData + * Gets the default type url for InListFilter * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an IosAppStreamData. */ - interface IIosAppStreamData { + /** Properties of a NumericValue. */ + interface INumericValue { - /** IosAppStreamData firebaseAppId */ - firebaseAppId?: (string|null); + /** NumericValue int64Value */ + int64Value?: (number|Long|string|null); - /** IosAppStreamData bundleId */ - bundleId?: (string|null); + /** NumericValue doubleValue */ + doubleValue?: (number|null); } - /** Represents an IosAppStreamData. */ - class IosAppStreamData implements IIosAppStreamData { + /** Represents a NumericValue. */ + class NumericValue implements INumericValue { /** - * Constructs a new IosAppStreamData. + * Constructs a new NumericValue. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.DataStream.IIosAppStreamData); + constructor(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue); - /** IosAppStreamData firebaseAppId. */ - public firebaseAppId: string; + /** NumericValue int64Value. */ + public int64Value?: (number|Long|string|null); - /** IosAppStreamData bundleId. */ - public bundleId: string; + /** NumericValue doubleValue. */ + public doubleValue?: (number|null); + + /** NumericValue oneValue. */ + public oneValue?: ("int64Value"|"doubleValue"); /** - * Creates a new IosAppStreamData instance using the specified properties. + * Creates a new NumericValue instance using the specified properties. * @param [properties] Properties to set - * @returns IosAppStreamData instance + * @returns NumericValue instance */ - public static create(properties?: google.analytics.admin.v1alpha.DataStream.IIosAppStreamData): google.analytics.admin.v1alpha.DataStream.IosAppStreamData; + public static create(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue; /** - * Encodes the specified IosAppStreamData message. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.IosAppStreamData.verify|verify} messages. - * @param message IosAppStreamData message or plain object to encode + * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify|verify} messages. + * @param message NumericValue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.DataStream.IIosAppStreamData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified IosAppStreamData message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.IosAppStreamData.verify|verify} messages. - * @param message IosAppStreamData message or plain object to encode + * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify|verify} messages. + * @param message NumericValue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.DataStream.IIosAppStreamData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an IosAppStreamData message from the specified reader or buffer. + * Decodes a NumericValue message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns IosAppStreamData + * @returns NumericValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DataStream.IosAppStreamData; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue; /** - * Decodes an IosAppStreamData message from the specified reader or buffer, length delimited. + * Decodes a NumericValue message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns IosAppStreamData + * @returns NumericValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DataStream.IosAppStreamData; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue; /** - * Verifies an IosAppStreamData message. + * Verifies a NumericValue message. * @param message Plain 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 IosAppStreamData message from a plain object. Also converts values to their respective internal types. + * Creates a NumericValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns IosAppStreamData + * @returns NumericValue */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DataStream.IosAppStreamData; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue; /** - * Creates a plain object from an IosAppStreamData message. Also converts values to other types if specified. - * @param message IosAppStreamData + * Creates a plain object from a NumericValue message. Also converts values to other types if specified. + * @param message NumericValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.DataStream.IosAppStreamData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this IosAppStreamData to JSON. + * Converts this NumericValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for IosAppStreamData + * Gets the default type url for NumericValue * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** DataStreamType enum. */ - enum DataStreamType { - DATA_STREAM_TYPE_UNSPECIFIED = 0, - WEB_DATA_STREAM = 1, - ANDROID_APP_DATA_STREAM = 2, - IOS_APP_DATA_STREAM = 3 - } - } + /** Properties of a NumericFilter. */ + interface INumericFilter { - /** Properties of a UserLink. */ - interface IUserLink { + /** NumericFilter operation */ + operation?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation|keyof typeof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation|null); - /** UserLink name */ + /** NumericFilter value */ + value?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); + } + + /** Represents a NumericFilter. */ + class NumericFilter implements INumericFilter { + + /** + * Constructs a new NumericFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter); + + /** NumericFilter operation. */ + public operation: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation|keyof typeof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation); + + /** NumericFilter value. */ + public value?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); + + /** + * Creates a new NumericFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns NumericFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter; + + /** + * Encodes the specified NumericFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.verify|verify} messages. + * @param message NumericFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NumericFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.verify|verify} messages. + * @param message NumericFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NumericFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter; + + /** + * Decodes a NumericFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter; + + /** + * Verifies a NumericFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NumericFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NumericFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter; + + /** + * Creates a plain object from a NumericFilter message. Also converts values to other types if specified. + * @param message NumericFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NumericFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NumericFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NumericFilter { + + /** Operation enum. */ + enum Operation { + OPERATION_UNSPECIFIED = 0, + EQUAL = 1, + LESS_THAN = 2, + GREATER_THAN = 4 + } + } + + /** Properties of a BetweenFilter. */ + interface IBetweenFilter { + + /** BetweenFilter fromValue */ + fromValue?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); + + /** BetweenFilter toValue */ + toValue?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); + } + + /** Represents a BetweenFilter. */ + class BetweenFilter implements IBetweenFilter { + + /** + * Constructs a new BetweenFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter); + + /** BetweenFilter fromValue. */ + public fromValue?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); + + /** BetweenFilter toValue. */ + public toValue?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); + + /** + * Creates a new BetweenFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns BetweenFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter; + + /** + * Encodes the specified BetweenFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.verify|verify} messages. + * @param message BetweenFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BetweenFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.verify|verify} messages. + * @param message BetweenFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter; + + /** + * Verifies a BetweenFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BetweenFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BetweenFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter; + + /** + * Creates a plain object from a BetweenFilter message. Also converts values to other types if specified. + * @param message BetweenFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BetweenFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BetweenFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an AudienceEventFilter. */ + interface IAudienceEventFilter { + + /** AudienceEventFilter eventName */ + eventName?: (string|null); + + /** AudienceEventFilter eventParameterFilterExpression */ + eventParameterFilterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + } + + /** Represents an AudienceEventFilter. */ + class AudienceEventFilter implements IAudienceEventFilter { + + /** + * Constructs a new AudienceEventFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAudienceEventFilter); + + /** AudienceEventFilter eventName. */ + public eventName: string; + + /** AudienceEventFilter eventParameterFilterExpression. */ + public eventParameterFilterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + + /** + * Creates a new AudienceEventFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceEventFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAudienceEventFilter): google.analytics.admin.v1alpha.AudienceEventFilter; + + /** + * Encodes the specified AudienceEventFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventFilter.verify|verify} messages. + * @param message AudienceEventFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAudienceEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceEventFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventFilter.verify|verify} messages. + * @param message AudienceEventFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceEventFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceEventFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceEventFilter; + + /** + * Decodes an AudienceEventFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceEventFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceEventFilter; + + /** + * Verifies an AudienceEventFilter message. + * @param message Plain 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 AudienceEventFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceEventFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceEventFilter; + + /** + * Creates a plain object from an AudienceEventFilter message. Also converts values to other types if specified. + * @param message AudienceEventFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceEventFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceEventFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceEventFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceFilterExpression. */ + interface IAudienceFilterExpression { + + /** AudienceFilterExpression andGroup */ + andGroup?: (google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null); + + /** AudienceFilterExpression orGroup */ + orGroup?: (google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null); + + /** AudienceFilterExpression notExpression */ + notExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + + /** AudienceFilterExpression dimensionOrMetricFilter */ + dimensionOrMetricFilter?: (google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter|null); + + /** AudienceFilterExpression eventFilter */ + eventFilter?: (google.analytics.admin.v1alpha.IAudienceEventFilter|null); + } + + /** Represents an AudienceFilterExpression. */ + class AudienceFilterExpression implements IAudienceFilterExpression { + + /** + * Constructs a new AudienceFilterExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAudienceFilterExpression); + + /** AudienceFilterExpression andGroup. */ + public andGroup?: (google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null); + + /** AudienceFilterExpression orGroup. */ + public orGroup?: (google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null); + + /** AudienceFilterExpression notExpression. */ + public notExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + + /** AudienceFilterExpression dimensionOrMetricFilter. */ + public dimensionOrMetricFilter?: (google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter|null); + + /** AudienceFilterExpression eventFilter. */ + public eventFilter?: (google.analytics.admin.v1alpha.IAudienceEventFilter|null); + + /** AudienceFilterExpression expr. */ + public expr?: ("andGroup"|"orGroup"|"notExpression"|"dimensionOrMetricFilter"|"eventFilter"); + + /** + * Creates a new AudienceFilterExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceFilterExpression instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAudienceFilterExpression): google.analytics.admin.v1alpha.AudienceFilterExpression; + + /** + * Encodes the specified AudienceFilterExpression message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpression.verify|verify} messages. + * @param message AudienceFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAudienceFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceFilterExpression message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpression.verify|verify} messages. + * @param message AudienceFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceFilterExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceFilterExpression; + + /** + * Decodes an AudienceFilterExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceFilterExpression; + + /** + * Verifies an AudienceFilterExpression message. + * @param message Plain 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 AudienceFilterExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceFilterExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceFilterExpression; + + /** + * Creates a plain object from an AudienceFilterExpression message. Also converts values to other types if specified. + * @param message AudienceFilterExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceFilterExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceFilterExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceFilterExpressionList. */ + interface IAudienceFilterExpressionList { + + /** AudienceFilterExpressionList filterExpressions */ + filterExpressions?: (google.analytics.admin.v1alpha.IAudienceFilterExpression[]|null); + } + + /** Represents an AudienceFilterExpressionList. */ + class AudienceFilterExpressionList implements IAudienceFilterExpressionList { + + /** + * Constructs a new AudienceFilterExpressionList. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAudienceFilterExpressionList); + + /** AudienceFilterExpressionList filterExpressions. */ + public filterExpressions: google.analytics.admin.v1alpha.IAudienceFilterExpression[]; + + /** + * Creates a new AudienceFilterExpressionList instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceFilterExpressionList instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAudienceFilterExpressionList): google.analytics.admin.v1alpha.AudienceFilterExpressionList; + + /** + * Encodes the specified AudienceFilterExpressionList message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify|verify} messages. + * @param message AudienceFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAudienceFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify|verify} messages. + * @param message AudienceFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceFilterExpressionList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceFilterExpressionList; + + /** + * Decodes an AudienceFilterExpressionList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceFilterExpressionList; + + /** + * Verifies an AudienceFilterExpressionList message. + * @param message Plain 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 AudienceFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceFilterExpressionList + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceFilterExpressionList; + + /** + * Creates a plain object from an AudienceFilterExpressionList message. Also converts values to other types if specified. + * @param message AudienceFilterExpressionList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceFilterExpressionList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceFilterExpressionList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceSimpleFilter. */ + interface IAudienceSimpleFilter { + + /** AudienceSimpleFilter scope */ + scope?: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope|null); + + /** AudienceSimpleFilter filterExpression */ + filterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + } + + /** Represents an AudienceSimpleFilter. */ + class AudienceSimpleFilter implements IAudienceSimpleFilter { + + /** + * Constructs a new AudienceSimpleFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAudienceSimpleFilter); + + /** AudienceSimpleFilter scope. */ + public scope: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope); + + /** AudienceSimpleFilter filterExpression. */ + public filterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + + /** + * Creates a new AudienceSimpleFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceSimpleFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAudienceSimpleFilter): google.analytics.admin.v1alpha.AudienceSimpleFilter; + + /** + * Encodes the specified AudienceSimpleFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSimpleFilter.verify|verify} messages. + * @param message AudienceSimpleFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAudienceSimpleFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceSimpleFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSimpleFilter.verify|verify} messages. + * @param message AudienceSimpleFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceSimpleFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceSimpleFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceSimpleFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceSimpleFilter; + + /** + * Decodes an AudienceSimpleFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceSimpleFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceSimpleFilter; + + /** + * Verifies an AudienceSimpleFilter message. + * @param message Plain 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 AudienceSimpleFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceSimpleFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceSimpleFilter; + + /** + * Creates a plain object from an AudienceSimpleFilter message. Also converts values to other types if specified. + * @param message AudienceSimpleFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceSimpleFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceSimpleFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceSimpleFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceSequenceFilter. */ + interface IAudienceSequenceFilter { + + /** AudienceSequenceFilter scope */ + scope?: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope|null); + + /** AudienceSequenceFilter sequenceMaximumDuration */ + sequenceMaximumDuration?: (google.protobuf.IDuration|null); + + /** AudienceSequenceFilter sequenceSteps */ + sequenceSteps?: (google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep[]|null); + } + + /** Represents an AudienceSequenceFilter. */ + class AudienceSequenceFilter implements IAudienceSequenceFilter { + + /** + * Constructs a new AudienceSequenceFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAudienceSequenceFilter); + + /** AudienceSequenceFilter scope. */ + public scope: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope); + + /** AudienceSequenceFilter sequenceMaximumDuration. */ + public sequenceMaximumDuration?: (google.protobuf.IDuration|null); + + /** AudienceSequenceFilter sequenceSteps. */ + public sequenceSteps: google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep[]; + + /** + * Creates a new AudienceSequenceFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceSequenceFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAudienceSequenceFilter): google.analytics.admin.v1alpha.AudienceSequenceFilter; + + /** + * Encodes the specified AudienceSequenceFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.verify|verify} messages. + * @param message AudienceSequenceFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAudienceSequenceFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceSequenceFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.verify|verify} messages. + * @param message AudienceSequenceFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceSequenceFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceSequenceFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceSequenceFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceSequenceFilter; + + /** + * Decodes an AudienceSequenceFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceSequenceFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceSequenceFilter; + + /** + * Verifies an AudienceSequenceFilter message. + * @param message Plain 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 AudienceSequenceFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceSequenceFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceSequenceFilter; + + /** + * Creates a plain object from an AudienceSequenceFilter message. Also converts values to other types if specified. + * @param message AudienceSequenceFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceSequenceFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceSequenceFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceSequenceFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AudienceSequenceFilter { + + /** Properties of an AudienceSequenceStep. */ + interface IAudienceSequenceStep { + + /** AudienceSequenceStep scope */ + scope?: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope|null); + + /** AudienceSequenceStep immediatelyFollows */ + immediatelyFollows?: (boolean|null); + + /** AudienceSequenceStep constraintDuration */ + constraintDuration?: (google.protobuf.IDuration|null); + + /** AudienceSequenceStep filterExpression */ + filterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + } + + /** Represents an AudienceSequenceStep. */ + class AudienceSequenceStep implements IAudienceSequenceStep { + + /** + * Constructs a new AudienceSequenceStep. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep); + + /** AudienceSequenceStep scope. */ + public scope: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope); + + /** AudienceSequenceStep immediatelyFollows. */ + public immediatelyFollows: boolean; + + /** AudienceSequenceStep constraintDuration. */ + public constraintDuration?: (google.protobuf.IDuration|null); + + /** AudienceSequenceStep filterExpression. */ + public filterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + + /** + * Creates a new AudienceSequenceStep instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceSequenceStep instance + */ + public static create(properties?: google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep): google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep; + + /** + * Encodes the specified AudienceSequenceStep message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.verify|verify} messages. + * @param message AudienceSequenceStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceSequenceStep message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.verify|verify} messages. + * @param message AudienceSequenceStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceSequenceStep message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceSequenceStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep; + + /** + * Decodes an AudienceSequenceStep message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceSequenceStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep; + + /** + * Verifies an AudienceSequenceStep message. + * @param message Plain 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 AudienceSequenceStep message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceSequenceStep + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep; + + /** + * Creates a plain object from an AudienceSequenceStep message. Also converts values to other types if specified. + * @param message AudienceSequenceStep + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceSequenceStep to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceSequenceStep + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an AudienceFilterClause. */ + interface IAudienceFilterClause { + + /** AudienceFilterClause simpleFilter */ + simpleFilter?: (google.analytics.admin.v1alpha.IAudienceSimpleFilter|null); + + /** AudienceFilterClause sequenceFilter */ + sequenceFilter?: (google.analytics.admin.v1alpha.IAudienceSequenceFilter|null); + + /** AudienceFilterClause clauseType */ + clauseType?: (google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType|keyof typeof google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType|null); + } + + /** Represents an AudienceFilterClause. */ + class AudienceFilterClause implements IAudienceFilterClause { + + /** + * Constructs a new AudienceFilterClause. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAudienceFilterClause); + + /** AudienceFilterClause simpleFilter. */ + public simpleFilter?: (google.analytics.admin.v1alpha.IAudienceSimpleFilter|null); + + /** AudienceFilterClause sequenceFilter. */ + public sequenceFilter?: (google.analytics.admin.v1alpha.IAudienceSequenceFilter|null); + + /** AudienceFilterClause clauseType. */ + public clauseType: (google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType|keyof typeof google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType); + + /** AudienceFilterClause filter. */ + public filter?: ("simpleFilter"|"sequenceFilter"); + + /** + * Creates a new AudienceFilterClause instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceFilterClause instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAudienceFilterClause): google.analytics.admin.v1alpha.AudienceFilterClause; + + /** + * Encodes the specified AudienceFilterClause message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterClause.verify|verify} messages. + * @param message AudienceFilterClause message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAudienceFilterClause, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceFilterClause message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterClause.verify|verify} messages. + * @param message AudienceFilterClause message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceFilterClause, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceFilterClause message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceFilterClause + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceFilterClause; + + /** + * Decodes an AudienceFilterClause message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceFilterClause + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceFilterClause; + + /** + * Verifies an AudienceFilterClause message. + * @param message Plain 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 AudienceFilterClause message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceFilterClause + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceFilterClause; + + /** + * Creates a plain object from an AudienceFilterClause message. Also converts values to other types if specified. + * @param message AudienceFilterClause + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceFilterClause, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceFilterClause to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceFilterClause + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AudienceFilterClause { + + /** AudienceClauseType enum. */ + enum AudienceClauseType { + AUDIENCE_CLAUSE_TYPE_UNSPECIFIED = 0, + INCLUDE = 1, + EXCLUDE = 2 + } + } + + /** Properties of an AudienceEventTrigger. */ + interface IAudienceEventTrigger { + + /** AudienceEventTrigger eventName */ + eventName?: (string|null); + + /** AudienceEventTrigger logCondition */ + logCondition?: (google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition|keyof typeof google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition|null); + } + + /** Represents an AudienceEventTrigger. */ + class AudienceEventTrigger implements IAudienceEventTrigger { + + /** + * Constructs a new AudienceEventTrigger. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAudienceEventTrigger); + + /** AudienceEventTrigger eventName. */ + public eventName: string; + + /** AudienceEventTrigger logCondition. */ + public logCondition: (google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition|keyof typeof google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition); + + /** + * Creates a new AudienceEventTrigger instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceEventTrigger instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAudienceEventTrigger): google.analytics.admin.v1alpha.AudienceEventTrigger; + + /** + * Encodes the specified AudienceEventTrigger message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventTrigger.verify|verify} messages. + * @param message AudienceEventTrigger message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAudienceEventTrigger, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceEventTrigger message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventTrigger.verify|verify} messages. + * @param message AudienceEventTrigger message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceEventTrigger, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceEventTrigger message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceEventTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceEventTrigger; + + /** + * Decodes an AudienceEventTrigger message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceEventTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceEventTrigger; + + /** + * Verifies an AudienceEventTrigger message. + * @param message Plain 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 AudienceEventTrigger message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceEventTrigger + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceEventTrigger; + + /** + * Creates a plain object from an AudienceEventTrigger message. Also converts values to other types if specified. + * @param message AudienceEventTrigger + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceEventTrigger, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceEventTrigger to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceEventTrigger + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AudienceEventTrigger { + + /** LogCondition enum. */ + enum LogCondition { + LOG_CONDITION_UNSPECIFIED = 0, + AUDIENCE_JOINED = 1, + AUDIENCE_MEMBERSHIP_RENEWED = 2 + } + } + + /** Properties of an Audience. */ + interface IAudience { + + /** Audience name */ + name?: (string|null); + + /** Audience displayName */ + displayName?: (string|null); + + /** Audience description */ + description?: (string|null); + + /** Audience membershipDurationDays */ + membershipDurationDays?: (number|null); + + /** Audience adsPersonalizationEnabled */ + adsPersonalizationEnabled?: (boolean|null); + + /** Audience eventTrigger */ + eventTrigger?: (google.analytics.admin.v1alpha.IAudienceEventTrigger|null); + + /** Audience exclusionDurationMode */ + exclusionDurationMode?: (google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode|keyof typeof google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode|null); + + /** Audience filterClauses */ + filterClauses?: (google.analytics.admin.v1alpha.IAudienceFilterClause[]|null); + } + + /** Represents an Audience. */ + class Audience implements IAudience { + + /** + * Constructs a new Audience. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAudience); + + /** Audience name. */ + public name: string; + + /** Audience displayName. */ + public displayName: string; + + /** Audience description. */ + public description: string; + + /** Audience membershipDurationDays. */ + public membershipDurationDays: number; + + /** Audience adsPersonalizationEnabled. */ + public adsPersonalizationEnabled: boolean; + + /** Audience eventTrigger. */ + public eventTrigger?: (google.analytics.admin.v1alpha.IAudienceEventTrigger|null); + + /** Audience exclusionDurationMode. */ + public exclusionDurationMode: (google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode|keyof typeof google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode); + + /** Audience filterClauses. */ + public filterClauses: google.analytics.admin.v1alpha.IAudienceFilterClause[]; + + /** + * Creates a new Audience instance using the specified properties. + * @param [properties] Properties to set + * @returns Audience instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAudience): google.analytics.admin.v1alpha.Audience; + + /** + * Encodes the specified Audience message. Does not implicitly {@link google.analytics.admin.v1alpha.Audience.verify|verify} messages. + * @param message Audience message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAudience, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Audience message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.Audience.verify|verify} messages. + * @param message Audience message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudience, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Audience message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Audience + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.Audience; + + /** + * Decodes an Audience message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Audience + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.Audience; + + /** + * Verifies an Audience message. + * @param message Plain 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 Audience message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Audience + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.Audience; + + /** + * Creates a plain object from an Audience message. Also converts values to other types if specified. + * @param message Audience + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.Audience, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Audience to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Audience + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Audience { + + /** AudienceExclusionDurationMode enum. */ + enum AudienceExclusionDurationMode { + AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED = 0, + EXCLUDE_TEMPORARILY = 1, + EXCLUDE_PERMANENTLY = 2 + } + } + + /** Properties of an ExpandedDataSetFilter. */ + interface IExpandedDataSetFilter { + + /** ExpandedDataSetFilter stringFilter */ + stringFilter?: (google.analytics.admin.v1alpha.ExpandedDataSetFilter.IStringFilter|null); + + /** ExpandedDataSetFilter inListFilter */ + inListFilter?: (google.analytics.admin.v1alpha.ExpandedDataSetFilter.IInListFilter|null); + + /** ExpandedDataSetFilter fieldName */ + fieldName?: (string|null); + } + + /** Represents an ExpandedDataSetFilter. */ + class ExpandedDataSetFilter implements IExpandedDataSetFilter { + + /** + * Constructs a new ExpandedDataSetFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IExpandedDataSetFilter); + + /** ExpandedDataSetFilter stringFilter. */ + public stringFilter?: (google.analytics.admin.v1alpha.ExpandedDataSetFilter.IStringFilter|null); + + /** ExpandedDataSetFilter inListFilter. */ + public inListFilter?: (google.analytics.admin.v1alpha.ExpandedDataSetFilter.IInListFilter|null); + + /** ExpandedDataSetFilter fieldName. */ + public fieldName: string; + + /** ExpandedDataSetFilter oneFilter. */ + public oneFilter?: ("stringFilter"|"inListFilter"); + + /** + * Creates a new ExpandedDataSetFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns ExpandedDataSetFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IExpandedDataSetFilter): google.analytics.admin.v1alpha.ExpandedDataSetFilter; + + /** + * Encodes the specified ExpandedDataSetFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilter.verify|verify} messages. + * @param message ExpandedDataSetFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IExpandedDataSetFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExpandedDataSetFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilter.verify|verify} messages. + * @param message ExpandedDataSetFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IExpandedDataSetFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExpandedDataSetFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExpandedDataSetFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ExpandedDataSetFilter; + + /** + * Decodes an ExpandedDataSetFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExpandedDataSetFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ExpandedDataSetFilter; + + /** + * Verifies an ExpandedDataSetFilter message. + * @param message Plain 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 ExpandedDataSetFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExpandedDataSetFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ExpandedDataSetFilter; + + /** + * Creates a plain object from an ExpandedDataSetFilter message. Also converts values to other types if specified. + * @param message ExpandedDataSetFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ExpandedDataSetFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExpandedDataSetFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExpandedDataSetFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ExpandedDataSetFilter { + + /** Properties of a StringFilter. */ + interface IStringFilter { + + /** StringFilter matchType */ + matchType?: (google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.MatchType|keyof typeof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.MatchType|null); + + /** StringFilter value */ + value?: (string|null); + + /** StringFilter caseSensitive */ + caseSensitive?: (boolean|null); + } + + /** Represents a StringFilter. */ + class StringFilter implements IStringFilter { + + /** + * Constructs a new StringFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.ExpandedDataSetFilter.IStringFilter); + + /** StringFilter matchType. */ + public matchType: (google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.MatchType|keyof typeof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.MatchType); + + /** StringFilter value. */ + public value: string; + + /** StringFilter caseSensitive. */ + public caseSensitive: boolean; + + /** + * Creates a new StringFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns StringFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.ExpandedDataSetFilter.IStringFilter): google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter; + + /** + * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.verify|verify} messages. + * @param message StringFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.ExpandedDataSetFilter.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.verify|verify} messages. + * @param message StringFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.ExpandedDataSetFilter.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter; + + /** + * Decodes a StringFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter; + + /** + * Verifies a StringFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter; + + /** + * Creates a plain object from a StringFilter message. Also converts values to other types if specified. + * @param message StringFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StringFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StringFilter { + + /** MatchType enum. */ + enum MatchType { + MATCH_TYPE_UNSPECIFIED = 0, + EXACT = 1, + CONTAINS = 2 + } + } + + /** Properties of an InListFilter. */ + interface IInListFilter { + + /** InListFilter values */ + values?: (string[]|null); + + /** InListFilter caseSensitive */ + caseSensitive?: (boolean|null); + } + + /** Represents an InListFilter. */ + class InListFilter implements IInListFilter { + + /** + * Constructs a new InListFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.ExpandedDataSetFilter.IInListFilter); + + /** InListFilter values. */ + public values: string[]; + + /** InListFilter caseSensitive. */ + public caseSensitive: boolean; + + /** + * Creates a new InListFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns InListFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.ExpandedDataSetFilter.IInListFilter): google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter; + + /** + * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter.verify|verify} messages. + * @param message InListFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.ExpandedDataSetFilter.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter.verify|verify} messages. + * @param message InListFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.ExpandedDataSetFilter.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InListFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter; + + /** + * Decodes an InListFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter; + + /** + * Verifies an InListFilter message. + * @param message Plain 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 InListFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InListFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter; + + /** + * Creates a plain object from an InListFilter message. Also converts values to other types if specified. + * @param message InListFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InListFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InListFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExpandedDataSetFilterExpression. */ + interface IExpandedDataSetFilterExpression { + + /** ExpandedDataSetFilterExpression andGroup */ + andGroup?: (google.analytics.admin.v1alpha.IExpandedDataSetFilterExpressionList|null); + + /** ExpandedDataSetFilterExpression notExpression */ + notExpression?: (google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression|null); + + /** ExpandedDataSetFilterExpression filter */ + filter?: (google.analytics.admin.v1alpha.IExpandedDataSetFilter|null); + } + + /** Represents an ExpandedDataSetFilterExpression. */ + class ExpandedDataSetFilterExpression implements IExpandedDataSetFilterExpression { + + /** + * Constructs a new ExpandedDataSetFilterExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression); + + /** ExpandedDataSetFilterExpression andGroup. */ + public andGroup?: (google.analytics.admin.v1alpha.IExpandedDataSetFilterExpressionList|null); + + /** ExpandedDataSetFilterExpression notExpression. */ + public notExpression?: (google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression|null); + + /** ExpandedDataSetFilterExpression filter. */ + public filter?: (google.analytics.admin.v1alpha.IExpandedDataSetFilter|null); + + /** ExpandedDataSetFilterExpression expr. */ + public expr?: ("andGroup"|"notExpression"|"filter"); + + /** + * Creates a new ExpandedDataSetFilterExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns ExpandedDataSetFilterExpression instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression): google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression; + + /** + * Encodes the specified ExpandedDataSetFilterExpression message. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.verify|verify} messages. + * @param message ExpandedDataSetFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExpandedDataSetFilterExpression message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.verify|verify} messages. + * @param message ExpandedDataSetFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExpandedDataSetFilterExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExpandedDataSetFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression; + + /** + * Decodes an ExpandedDataSetFilterExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExpandedDataSetFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression; + + /** + * Verifies an ExpandedDataSetFilterExpression message. + * @param message Plain 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 ExpandedDataSetFilterExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExpandedDataSetFilterExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression; + + /** + * Creates a plain object from an ExpandedDataSetFilterExpression message. Also converts values to other types if specified. + * @param message ExpandedDataSetFilterExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExpandedDataSetFilterExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExpandedDataSetFilterExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExpandedDataSetFilterExpressionList. */ + interface IExpandedDataSetFilterExpressionList { + + /** ExpandedDataSetFilterExpressionList filterExpressions */ + filterExpressions?: (google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression[]|null); + } + + /** Represents an ExpandedDataSetFilterExpressionList. */ + class ExpandedDataSetFilterExpressionList implements IExpandedDataSetFilterExpressionList { + + /** + * Constructs a new ExpandedDataSetFilterExpressionList. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IExpandedDataSetFilterExpressionList); + + /** ExpandedDataSetFilterExpressionList filterExpressions. */ + public filterExpressions: google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression[]; + + /** + * Creates a new ExpandedDataSetFilterExpressionList instance using the specified properties. + * @param [properties] Properties to set + * @returns ExpandedDataSetFilterExpressionList instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IExpandedDataSetFilterExpressionList): google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList; + + /** + * Encodes the specified ExpandedDataSetFilterExpressionList message. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList.verify|verify} messages. + * @param message ExpandedDataSetFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IExpandedDataSetFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExpandedDataSetFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList.verify|verify} messages. + * @param message ExpandedDataSetFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IExpandedDataSetFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExpandedDataSetFilterExpressionList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExpandedDataSetFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList; + + /** + * Decodes an ExpandedDataSetFilterExpressionList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExpandedDataSetFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList; + + /** + * Verifies an ExpandedDataSetFilterExpressionList message. + * @param message Plain 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 ExpandedDataSetFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExpandedDataSetFilterExpressionList + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList; + + /** + * Creates a plain object from an ExpandedDataSetFilterExpressionList message. Also converts values to other types if specified. + * @param message ExpandedDataSetFilterExpressionList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExpandedDataSetFilterExpressionList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExpandedDataSetFilterExpressionList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExpandedDataSet. */ + interface IExpandedDataSet { + + /** ExpandedDataSet name */ + name?: (string|null); + + /** ExpandedDataSet displayName */ + displayName?: (string|null); + + /** ExpandedDataSet description */ + description?: (string|null); + + /** ExpandedDataSet dimensionNames */ + dimensionNames?: (string[]|null); + + /** ExpandedDataSet metricNames */ + metricNames?: (string[]|null); + + /** ExpandedDataSet dimensionFilterExpression */ + dimensionFilterExpression?: (google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression|null); + + /** ExpandedDataSet dataCollectionStartTime */ + dataCollectionStartTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an ExpandedDataSet. */ + class ExpandedDataSet implements IExpandedDataSet { + + /** + * Constructs a new ExpandedDataSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IExpandedDataSet); + + /** ExpandedDataSet name. */ + public name: string; + + /** ExpandedDataSet displayName. */ + public displayName: string; + + /** ExpandedDataSet description. */ + public description: string; + + /** ExpandedDataSet dimensionNames. */ + public dimensionNames: string[]; + + /** ExpandedDataSet metricNames. */ + public metricNames: string[]; + + /** ExpandedDataSet dimensionFilterExpression. */ + public dimensionFilterExpression?: (google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression|null); + + /** ExpandedDataSet dataCollectionStartTime. */ + public dataCollectionStartTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new ExpandedDataSet instance using the specified properties. + * @param [properties] Properties to set + * @returns ExpandedDataSet instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IExpandedDataSet): google.analytics.admin.v1alpha.ExpandedDataSet; + + /** + * Encodes the specified ExpandedDataSet message. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSet.verify|verify} messages. + * @param message ExpandedDataSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IExpandedDataSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExpandedDataSet message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSet.verify|verify} messages. + * @param message ExpandedDataSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IExpandedDataSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExpandedDataSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExpandedDataSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ExpandedDataSet; + + /** + * Decodes an ExpandedDataSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExpandedDataSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ExpandedDataSet; + + /** + * Verifies an ExpandedDataSet message. + * @param message Plain 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 ExpandedDataSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExpandedDataSet + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ExpandedDataSet; + + /** + * Creates a plain object from an ExpandedDataSet message. Also converts values to other types if specified. + * @param message ExpandedDataSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ExpandedDataSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExpandedDataSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExpandedDataSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** IndustryCategory enum. */ + enum IndustryCategory { + INDUSTRY_CATEGORY_UNSPECIFIED = 0, + AUTOMOTIVE = 1, + BUSINESS_AND_INDUSTRIAL_MARKETS = 2, + FINANCE = 3, + HEALTHCARE = 4, + TECHNOLOGY = 5, + TRAVEL = 6, + OTHER = 7, + ARTS_AND_ENTERTAINMENT = 8, + BEAUTY_AND_FITNESS = 9, + BOOKS_AND_LITERATURE = 10, + FOOD_AND_DRINK = 11, + GAMES = 12, + HOBBIES_AND_LEISURE = 13, + HOME_AND_GARDEN = 14, + INTERNET_AND_TELECOM = 15, + LAW_AND_GOVERNMENT = 16, + NEWS = 17, + ONLINE_COMMUNITIES = 18, + PEOPLE_AND_SOCIETY = 19, + PETS_AND_ANIMALS = 20, + REAL_ESTATE = 21, + REFERENCE = 22, + SCIENCE = 23, + SPORTS = 24, + JOBS_AND_EDUCATION = 25, + SHOPPING = 26 + } + + /** ServiceLevel enum. */ + enum ServiceLevel { + SERVICE_LEVEL_UNSPECIFIED = 0, + GOOGLE_ANALYTICS_STANDARD = 1, + GOOGLE_ANALYTICS_360 = 2 + } + + /** ActorType enum. */ + enum ActorType { + ACTOR_TYPE_UNSPECIFIED = 0, + USER = 1, + SYSTEM = 2, + SUPPORT = 3 + } + + /** ActionType enum. */ + enum ActionType { + ACTION_TYPE_UNSPECIFIED = 0, + CREATED = 1, + UPDATED = 2, + DELETED = 3 + } + + /** ChangeHistoryResourceType enum. */ + enum ChangeHistoryResourceType { + CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED = 0, + ACCOUNT = 1, + PROPERTY = 2, + FIREBASE_LINK = 6, + GOOGLE_ADS_LINK = 7, + GOOGLE_SIGNALS_SETTINGS = 8, + CONVERSION_EVENT = 9, + MEASUREMENT_PROTOCOL_SECRET = 10, + CUSTOM_DIMENSION = 11, + CUSTOM_METRIC = 12, + DATA_RETENTION_SETTINGS = 13, + DISPLAY_VIDEO_360_ADVERTISER_LINK = 14, + DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL = 15, + SEARCH_ADS_360_LINK = 16, + DATA_STREAM = 18, + ATTRIBUTION_SETTINGS = 20, + EXPANDED_DATA_SET = 21, + CHANNEL_GROUP = 22 + } + + /** GoogleSignalsState enum. */ + enum GoogleSignalsState { + GOOGLE_SIGNALS_STATE_UNSPECIFIED = 0, + GOOGLE_SIGNALS_ENABLED = 1, + GOOGLE_SIGNALS_DISABLED = 2 + } + + /** GoogleSignalsConsent enum. */ + enum GoogleSignalsConsent { + GOOGLE_SIGNALS_CONSENT_UNSPECIFIED = 0, + GOOGLE_SIGNALS_CONSENT_CONSENTED = 2, + GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED = 1 + } + + /** LinkProposalInitiatingProduct enum. */ + enum LinkProposalInitiatingProduct { + LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED = 0, + GOOGLE_ANALYTICS = 1, + LINKED_PRODUCT = 2 + } + + /** LinkProposalState enum. */ + enum LinkProposalState { + LINK_PROPOSAL_STATE_UNSPECIFIED = 0, + AWAITING_REVIEW_FROM_GOOGLE_ANALYTICS = 1, + AWAITING_REVIEW_FROM_LINKED_PRODUCT = 2, + WITHDRAWN = 3, + DECLINED = 4, + EXPIRED = 5, + OBSOLETE = 6 + } + + /** PropertyType enum. */ + enum PropertyType { + PROPERTY_TYPE_UNSPECIFIED = 0, + PROPERTY_TYPE_ORDINARY = 1, + PROPERTY_TYPE_SUBPROPERTY = 2, + PROPERTY_TYPE_ROLLUP = 3 + } + + /** Properties of an Account. */ + interface IAccount { + + /** Account name */ name?: (string|null); - /** UserLink emailAddress */ - emailAddress?: (string|null); + /** Account createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** UserLink directRoles */ - directRoles?: (string[]|null); + /** Account updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Account displayName */ + displayName?: (string|null); + + /** Account regionCode */ + regionCode?: (string|null); + + /** Account deleted */ + deleted?: (boolean|null); } - /** Represents a UserLink. */ - class UserLink implements IUserLink { + /** Represents an Account. */ + class Account implements IAccount { /** - * Constructs a new UserLink. + * Constructs a new Account. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IUserLink); + constructor(properties?: google.analytics.admin.v1alpha.IAccount); - /** UserLink name. */ + /** Account name. */ public name: string; - /** UserLink emailAddress. */ - public emailAddress: string; + /** Account createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** UserLink directRoles. */ - public directRoles: string[]; + /** Account updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Account displayName. */ + public displayName: string; + + /** Account regionCode. */ + public regionCode: string; + + /** Account deleted. */ + public deleted: boolean; /** - * Creates a new UserLink instance using the specified properties. + * Creates a new Account instance using the specified properties. * @param [properties] Properties to set - * @returns UserLink instance + * @returns Account instance */ - public static create(properties?: google.analytics.admin.v1alpha.IUserLink): google.analytics.admin.v1alpha.UserLink; + public static create(properties?: google.analytics.admin.v1alpha.IAccount): google.analytics.admin.v1alpha.Account; /** - * Encodes the specified UserLink message. Does not implicitly {@link google.analytics.admin.v1alpha.UserLink.verify|verify} messages. - * @param message UserLink message or plain object to encode + * Encodes the specified Account message. Does not implicitly {@link google.analytics.admin.v1alpha.Account.verify|verify} messages. + * @param message Account message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IUserLink, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IAccount, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UserLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UserLink.verify|verify} messages. - * @param message UserLink message or plain object to encode + * Encodes the specified Account message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.Account.verify|verify} messages. + * @param message Account message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IUserLink, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAccount, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a UserLink message from the specified reader or buffer. + * Decodes an Account message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UserLink + * @returns Account * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.UserLink; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.Account; /** - * Decodes a UserLink message from the specified reader or buffer, length delimited. + * Decodes an Account message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UserLink + * @returns Account * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.UserLink; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.Account; /** - * Verifies a UserLink message. + * Verifies an Account message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a UserLink message from a plain object. Also converts values to their respective internal types. + * Creates an Account message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UserLink + * @returns Account */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.UserLink; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.Account; /** - * Creates a plain object from a UserLink message. Also converts values to other types if specified. - * @param message UserLink + * Creates a plain object from an Account message. Also converts values to other types if specified. + * @param message Account * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.UserLink, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.Account, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UserLink to JSON. + * Converts this Account to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UserLink + * Gets the default type url for Account * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AuditUserLink. */ - interface IAuditUserLink { + /** Properties of a Property. */ + interface IProperty { - /** AuditUserLink name */ + /** Property name */ name?: (string|null); - /** AuditUserLink emailAddress */ - emailAddress?: (string|null); + /** Property propertyType */ + propertyType?: (google.analytics.admin.v1alpha.PropertyType|keyof typeof google.analytics.admin.v1alpha.PropertyType|null); - /** AuditUserLink directRoles */ - directRoles?: (string[]|null); + /** Property createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** AuditUserLink effectiveRoles */ - effectiveRoles?: (string[]|null); + /** Property updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Property parent */ + parent?: (string|null); + + /** Property displayName */ + displayName?: (string|null); + + /** Property industryCategory */ + industryCategory?: (google.analytics.admin.v1alpha.IndustryCategory|keyof typeof google.analytics.admin.v1alpha.IndustryCategory|null); + + /** Property timeZone */ + timeZone?: (string|null); + + /** Property currencyCode */ + currencyCode?: (string|null); + + /** Property serviceLevel */ + serviceLevel?: (google.analytics.admin.v1alpha.ServiceLevel|keyof typeof google.analytics.admin.v1alpha.ServiceLevel|null); + + /** Property deleteTime */ + deleteTime?: (google.protobuf.ITimestamp|null); + + /** Property expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + + /** Property account */ + account?: (string|null); } - /** Represents an AuditUserLink. */ - class AuditUserLink implements IAuditUserLink { + /** Represents a Property. */ + class Property implements IProperty { /** - * Constructs a new AuditUserLink. + * Constructs a new Property. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IAuditUserLink); + constructor(properties?: google.analytics.admin.v1alpha.IProperty); - /** AuditUserLink name. */ + /** Property name. */ public name: string; - /** AuditUserLink emailAddress. */ - public emailAddress: string; + /** Property propertyType. */ + public propertyType: (google.analytics.admin.v1alpha.PropertyType|keyof typeof google.analytics.admin.v1alpha.PropertyType); - /** AuditUserLink directRoles. */ - public directRoles: string[]; + /** Property createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** AuditUserLink effectiveRoles. */ - public effectiveRoles: string[]; + /** Property updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Property parent. */ + public parent: string; + + /** Property displayName. */ + public displayName: string; + + /** Property industryCategory. */ + public industryCategory: (google.analytics.admin.v1alpha.IndustryCategory|keyof typeof google.analytics.admin.v1alpha.IndustryCategory); + + /** Property timeZone. */ + public timeZone: string; + + /** Property currencyCode. */ + public currencyCode: string; + + /** Property serviceLevel. */ + public serviceLevel: (google.analytics.admin.v1alpha.ServiceLevel|keyof typeof google.analytics.admin.v1alpha.ServiceLevel); + + /** Property deleteTime. */ + public deleteTime?: (google.protobuf.ITimestamp|null); + + /** Property expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); + + /** Property account. */ + public account: string; /** - * Creates a new AuditUserLink instance using the specified properties. + * Creates a new Property instance using the specified properties. * @param [properties] Properties to set - * @returns AuditUserLink instance + * @returns Property instance */ - public static create(properties?: google.analytics.admin.v1alpha.IAuditUserLink): google.analytics.admin.v1alpha.AuditUserLink; + public static create(properties?: google.analytics.admin.v1alpha.IProperty): google.analytics.admin.v1alpha.Property; /** - * Encodes the specified AuditUserLink message. Does not implicitly {@link google.analytics.admin.v1alpha.AuditUserLink.verify|verify} messages. - * @param message AuditUserLink message or plain object to encode + * Encodes the specified Property message. Does not implicitly {@link google.analytics.admin.v1alpha.Property.verify|verify} messages. + * @param message Property message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IAuditUserLink, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IProperty, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AuditUserLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AuditUserLink.verify|verify} messages. - * @param message AuditUserLink message or plain object to encode + * Encodes the specified Property message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.Property.verify|verify} messages. + * @param message Property message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IAuditUserLink, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IProperty, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AuditUserLink message from the specified reader or buffer. + * Decodes a Property message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AuditUserLink + * @returns Property * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AuditUserLink; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.Property; /** - * Decodes an AuditUserLink message from the specified reader or buffer, length delimited. + * Decodes a Property message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AuditUserLink + * @returns Property * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AuditUserLink; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.Property; /** - * Verifies an AuditUserLink message. + * Verifies a Property message. * @param message Plain 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 AuditUserLink message from a plain object. Also converts values to their respective internal types. + * Creates a Property message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AuditUserLink + * @returns Property */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AuditUserLink; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.Property; - /** - * Creates a plain object from an AuditUserLink message. Also converts values to other types if specified. - * @param message AuditUserLink + /** + * Creates a plain object from a Property message. Also converts values to other types if specified. + * @param message Property * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.AuditUserLink, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.Property, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AuditUserLink to JSON. + * Converts this Property to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AuditUserLink + * Gets the default type url for Property * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FirebaseLink. */ - interface IFirebaseLink { + /** Properties of a DataStream. */ + interface IDataStream { - /** FirebaseLink name */ + /** DataStream webStreamData */ + webStreamData?: (google.analytics.admin.v1alpha.DataStream.IWebStreamData|null); + + /** DataStream androidAppStreamData */ + androidAppStreamData?: (google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData|null); + + /** DataStream iosAppStreamData */ + iosAppStreamData?: (google.analytics.admin.v1alpha.DataStream.IIosAppStreamData|null); + + /** DataStream name */ name?: (string|null); - /** FirebaseLink project */ - project?: (string|null); + /** DataStream type */ + type?: (google.analytics.admin.v1alpha.DataStream.DataStreamType|keyof typeof google.analytics.admin.v1alpha.DataStream.DataStreamType|null); - /** FirebaseLink createTime */ + /** DataStream displayName */ + displayName?: (string|null); + + /** DataStream createTime */ createTime?: (google.protobuf.ITimestamp|null); + + /** DataStream updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); } - /** Represents a FirebaseLink. */ - class FirebaseLink implements IFirebaseLink { + /** Represents a DataStream. */ + class DataStream implements IDataStream { /** - * Constructs a new FirebaseLink. + * Constructs a new DataStream. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IFirebaseLink); + constructor(properties?: google.analytics.admin.v1alpha.IDataStream); - /** FirebaseLink name. */ + /** DataStream webStreamData. */ + public webStreamData?: (google.analytics.admin.v1alpha.DataStream.IWebStreamData|null); + + /** DataStream androidAppStreamData. */ + public androidAppStreamData?: (google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData|null); + + /** DataStream iosAppStreamData. */ + public iosAppStreamData?: (google.analytics.admin.v1alpha.DataStream.IIosAppStreamData|null); + + /** DataStream name. */ public name: string; - /** FirebaseLink project. */ - public project: string; + /** DataStream type. */ + public type: (google.analytics.admin.v1alpha.DataStream.DataStreamType|keyof typeof google.analytics.admin.v1alpha.DataStream.DataStreamType); - /** FirebaseLink createTime. */ + /** DataStream displayName. */ + public displayName: string; + + /** DataStream createTime. */ public createTime?: (google.protobuf.ITimestamp|null); + /** DataStream updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** DataStream streamData. */ + public streamData?: ("webStreamData"|"androidAppStreamData"|"iosAppStreamData"); + /** - * Creates a new FirebaseLink instance using the specified properties. + * Creates a new DataStream instance using the specified properties. * @param [properties] Properties to set - * @returns FirebaseLink instance + * @returns DataStream instance */ - public static create(properties?: google.analytics.admin.v1alpha.IFirebaseLink): google.analytics.admin.v1alpha.FirebaseLink; + public static create(properties?: google.analytics.admin.v1alpha.IDataStream): google.analytics.admin.v1alpha.DataStream; /** - * Encodes the specified FirebaseLink message. Does not implicitly {@link google.analytics.admin.v1alpha.FirebaseLink.verify|verify} messages. - * @param message FirebaseLink message or plain object to encode + * Encodes the specified DataStream message. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.verify|verify} messages. + * @param message DataStream message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IFirebaseLink, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IDataStream, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FirebaseLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.FirebaseLink.verify|verify} messages. - * @param message FirebaseLink message or plain object to encode + * Encodes the specified DataStream message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.verify|verify} messages. + * @param message DataStream message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IFirebaseLink, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IDataStream, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FirebaseLink message from the specified reader or buffer. + * Decodes a DataStream message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FirebaseLink + * @returns DataStream * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.FirebaseLink; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DataStream; /** - * Decodes a FirebaseLink message from the specified reader or buffer, length delimited. + * Decodes a DataStream message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FirebaseLink + * @returns DataStream * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.FirebaseLink; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DataStream; /** - * Verifies a FirebaseLink message. + * Verifies a DataStream message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FirebaseLink message from a plain object. Also converts values to their respective internal types. + * Creates a DataStream message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FirebaseLink + * @returns DataStream */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.FirebaseLink; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DataStream; /** - * Creates a plain object from a FirebaseLink message. Also converts values to other types if specified. - * @param message FirebaseLink + * Creates a plain object from a DataStream message. Also converts values to other types if specified. + * @param message DataStream * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.FirebaseLink, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.DataStream, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FirebaseLink to JSON. + * Converts this DataStream to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FirebaseLink + * Gets the default type url for DataStream * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GlobalSiteTag. */ - interface IGlobalSiteTag { + namespace DataStream { - /** GlobalSiteTag name */ - name?: (string|null); + /** Properties of a WebStreamData. */ + interface IWebStreamData { - /** GlobalSiteTag snippet */ - snippet?: (string|null); - } + /** WebStreamData measurementId */ + measurementId?: (string|null); - /** Represents a GlobalSiteTag. */ - class GlobalSiteTag implements IGlobalSiteTag { + /** WebStreamData firebaseAppId */ + firebaseAppId?: (string|null); - /** - * Constructs a new GlobalSiteTag. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.admin.v1alpha.IGlobalSiteTag); + /** WebStreamData defaultUri */ + defaultUri?: (string|null); + } - /** GlobalSiteTag name. */ - public name: string; + /** Represents a WebStreamData. */ + class WebStreamData implements IWebStreamData { - /** GlobalSiteTag snippet. */ - public snippet: string; + /** + * Constructs a new WebStreamData. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.DataStream.IWebStreamData); - /** - * Creates a new GlobalSiteTag instance using the specified properties. - * @param [properties] Properties to set - * @returns GlobalSiteTag instance - */ - public static create(properties?: google.analytics.admin.v1alpha.IGlobalSiteTag): google.analytics.admin.v1alpha.GlobalSiteTag; + /** WebStreamData measurementId. */ + public measurementId: string; - /** - * Encodes the specified GlobalSiteTag message. Does not implicitly {@link google.analytics.admin.v1alpha.GlobalSiteTag.verify|verify} messages. - * @param message GlobalSiteTag message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.admin.v1alpha.IGlobalSiteTag, writer?: $protobuf.Writer): $protobuf.Writer; + /** WebStreamData firebaseAppId. */ + public firebaseAppId: string; - /** - * Encodes the specified GlobalSiteTag message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GlobalSiteTag.verify|verify} messages. - * @param message GlobalSiteTag message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IGlobalSiteTag, writer?: $protobuf.Writer): $protobuf.Writer; + /** WebStreamData defaultUri. */ + public defaultUri: string; + + /** + * Creates a new WebStreamData instance using the specified properties. + * @param [properties] Properties to set + * @returns WebStreamData instance + */ + public static create(properties?: google.analytics.admin.v1alpha.DataStream.IWebStreamData): google.analytics.admin.v1alpha.DataStream.WebStreamData; + + /** + * Encodes the specified WebStreamData message. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.WebStreamData.verify|verify} messages. + * @param message WebStreamData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.DataStream.IWebStreamData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WebStreamData message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.WebStreamData.verify|verify} messages. + * @param message WebStreamData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.DataStream.IWebStreamData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WebStreamData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WebStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DataStream.WebStreamData; + + /** + * Decodes a WebStreamData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WebStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DataStream.WebStreamData; + + /** + * Verifies a WebStreamData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WebStreamData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WebStreamData + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DataStream.WebStreamData; + + /** + * Creates a plain object from a WebStreamData message. Also converts values to other types if specified. + * @param message WebStreamData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.DataStream.WebStreamData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WebStreamData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WebStreamData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Decodes a GlobalSiteTag message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GlobalSiteTag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GlobalSiteTag; + /** Properties of an AndroidAppStreamData. */ + interface IAndroidAppStreamData { - /** - * Decodes a GlobalSiteTag message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GlobalSiteTag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GlobalSiteTag; + /** AndroidAppStreamData firebaseAppId */ + firebaseAppId?: (string|null); - /** - * Verifies a GlobalSiteTag message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** AndroidAppStreamData packageName */ + packageName?: (string|null); + } - /** - * Creates a GlobalSiteTag message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GlobalSiteTag - */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GlobalSiteTag; + /** Represents an AndroidAppStreamData. */ + class AndroidAppStreamData implements IAndroidAppStreamData { - /** - * Creates a plain object from a GlobalSiteTag message. Also converts values to other types if specified. - * @param message GlobalSiteTag - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.admin.v1alpha.GlobalSiteTag, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new AndroidAppStreamData. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData); - /** - * Converts this GlobalSiteTag to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** AndroidAppStreamData firebaseAppId. */ + public firebaseAppId: string; - /** - * Gets the default type url for GlobalSiteTag - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** AndroidAppStreamData packageName. */ + public packageName: string; - /** Properties of a GoogleAdsLink. */ - interface IGoogleAdsLink { + /** + * Creates a new AndroidAppStreamData instance using the specified properties. + * @param [properties] Properties to set + * @returns AndroidAppStreamData instance + */ + public static create(properties?: google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData): google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData; - /** GoogleAdsLink name */ - name?: (string|null); + /** + * Encodes the specified AndroidAppStreamData message. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData.verify|verify} messages. + * @param message AndroidAppStreamData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData, writer?: $protobuf.Writer): $protobuf.Writer; - /** GoogleAdsLink customerId */ - customerId?: (string|null); + /** + * Encodes the specified AndroidAppStreamData message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData.verify|verify} messages. + * @param message AndroidAppStreamData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData, writer?: $protobuf.Writer): $protobuf.Writer; - /** GoogleAdsLink canManageClients */ - canManageClients?: (boolean|null); + /** + * Decodes an AndroidAppStreamData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AndroidAppStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData; - /** GoogleAdsLink adsPersonalizationEnabled */ - adsPersonalizationEnabled?: (google.protobuf.IBoolValue|null); + /** + * Decodes an AndroidAppStreamData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AndroidAppStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData; - /** GoogleAdsLink createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** + * Verifies an AndroidAppStreamData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** GoogleAdsLink updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** + * Creates an AndroidAppStreamData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AndroidAppStreamData + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData; - /** GoogleAdsLink creatorEmailAddress */ - creatorEmailAddress?: (string|null); - } + /** + * Creates a plain object from an AndroidAppStreamData message. Also converts values to other types if specified. + * @param message AndroidAppStreamData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents a GoogleAdsLink. */ - class GoogleAdsLink implements IGoogleAdsLink { + /** + * Converts this AndroidAppStreamData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Constructs a new GoogleAdsLink. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.admin.v1alpha.IGoogleAdsLink); + /** + * Gets the default type url for AndroidAppStreamData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** GoogleAdsLink name. */ - public name: string; + /** Properties of an IosAppStreamData. */ + interface IIosAppStreamData { - /** GoogleAdsLink customerId. */ - public customerId: string; + /** IosAppStreamData firebaseAppId */ + firebaseAppId?: (string|null); - /** GoogleAdsLink canManageClients. */ - public canManageClients: boolean; + /** IosAppStreamData bundleId */ + bundleId?: (string|null); + } - /** GoogleAdsLink adsPersonalizationEnabled. */ - public adsPersonalizationEnabled?: (google.protobuf.IBoolValue|null); + /** Represents an IosAppStreamData. */ + class IosAppStreamData implements IIosAppStreamData { - /** GoogleAdsLink createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** + * Constructs a new IosAppStreamData. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.DataStream.IIosAppStreamData); - /** GoogleAdsLink updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** IosAppStreamData firebaseAppId. */ + public firebaseAppId: string; - /** GoogleAdsLink creatorEmailAddress. */ - public creatorEmailAddress: string; + /** IosAppStreamData bundleId. */ + public bundleId: string; - /** - * Creates a new GoogleAdsLink instance using the specified properties. - * @param [properties] Properties to set - * @returns GoogleAdsLink instance - */ - public static create(properties?: google.analytics.admin.v1alpha.IGoogleAdsLink): google.analytics.admin.v1alpha.GoogleAdsLink; + /** + * Creates a new IosAppStreamData instance using the specified properties. + * @param [properties] Properties to set + * @returns IosAppStreamData instance + */ + public static create(properties?: google.analytics.admin.v1alpha.DataStream.IIosAppStreamData): google.analytics.admin.v1alpha.DataStream.IosAppStreamData; - /** - * Encodes the specified GoogleAdsLink message. Does not implicitly {@link google.analytics.admin.v1alpha.GoogleAdsLink.verify|verify} messages. - * @param message GoogleAdsLink message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.admin.v1alpha.IGoogleAdsLink, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified IosAppStreamData message. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.IosAppStreamData.verify|verify} messages. + * @param message IosAppStreamData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.DataStream.IIosAppStreamData, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified GoogleAdsLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GoogleAdsLink.verify|verify} messages. - * @param message GoogleAdsLink message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IGoogleAdsLink, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified IosAppStreamData message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.IosAppStreamData.verify|verify} messages. + * @param message IosAppStreamData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.DataStream.IIosAppStreamData, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a GoogleAdsLink message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GoogleAdsLink - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GoogleAdsLink; + /** + * Decodes an IosAppStreamData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IosAppStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DataStream.IosAppStreamData; + + /** + * Decodes an IosAppStreamData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IosAppStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DataStream.IosAppStreamData; - /** - * Decodes a GoogleAdsLink message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GoogleAdsLink - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GoogleAdsLink; + /** + * Verifies an IosAppStreamData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Verifies a GoogleAdsLink message. - * @param message Plain 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 IosAppStreamData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IosAppStreamData + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DataStream.IosAppStreamData; - /** - * Creates a GoogleAdsLink message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GoogleAdsLink - */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GoogleAdsLink; + /** + * Creates a plain object from an IosAppStreamData message. Also converts values to other types if specified. + * @param message IosAppStreamData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.DataStream.IosAppStreamData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from a GoogleAdsLink message. Also converts values to other types if specified. - * @param message GoogleAdsLink - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.admin.v1alpha.GoogleAdsLink, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this IosAppStreamData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Converts this GoogleAdsLink to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Gets the default type url for IosAppStreamData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Gets the default type url for GoogleAdsLink - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** DataStreamType enum. */ + enum DataStreamType { + DATA_STREAM_TYPE_UNSPECIFIED = 0, + WEB_DATA_STREAM = 1, + ANDROID_APP_DATA_STREAM = 2, + IOS_APP_DATA_STREAM = 3 + } } - /** Properties of a DataSharingSettings. */ - interface IDataSharingSettings { + /** Properties of a UserLink. */ + interface IUserLink { - /** DataSharingSettings name */ + /** UserLink name */ name?: (string|null); - /** DataSharingSettings sharingWithGoogleSupportEnabled */ - sharingWithGoogleSupportEnabled?: (boolean|null); - - /** DataSharingSettings sharingWithGoogleAssignedSalesEnabled */ - sharingWithGoogleAssignedSalesEnabled?: (boolean|null); - - /** DataSharingSettings sharingWithGoogleAnySalesEnabled */ - sharingWithGoogleAnySalesEnabled?: (boolean|null); - - /** DataSharingSettings sharingWithGoogleProductsEnabled */ - sharingWithGoogleProductsEnabled?: (boolean|null); + /** UserLink emailAddress */ + emailAddress?: (string|null); - /** DataSharingSettings sharingWithOthersEnabled */ - sharingWithOthersEnabled?: (boolean|null); + /** UserLink directRoles */ + directRoles?: (string[]|null); } - /** Represents a DataSharingSettings. */ - class DataSharingSettings implements IDataSharingSettings { + /** Represents a UserLink. */ + class UserLink implements IUserLink { /** - * Constructs a new DataSharingSettings. + * Constructs a new UserLink. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IDataSharingSettings); + constructor(properties?: google.analytics.admin.v1alpha.IUserLink); - /** DataSharingSettings name. */ + /** UserLink name. */ public name: string; - /** DataSharingSettings sharingWithGoogleSupportEnabled. */ - public sharingWithGoogleSupportEnabled: boolean; - - /** DataSharingSettings sharingWithGoogleAssignedSalesEnabled. */ - public sharingWithGoogleAssignedSalesEnabled: boolean; - - /** DataSharingSettings sharingWithGoogleAnySalesEnabled. */ - public sharingWithGoogleAnySalesEnabled: boolean; - - /** DataSharingSettings sharingWithGoogleProductsEnabled. */ - public sharingWithGoogleProductsEnabled: boolean; + /** UserLink emailAddress. */ + public emailAddress: string; - /** DataSharingSettings sharingWithOthersEnabled. */ - public sharingWithOthersEnabled: boolean; + /** UserLink directRoles. */ + public directRoles: string[]; /** - * Creates a new DataSharingSettings instance using the specified properties. + * Creates a new UserLink instance using the specified properties. * @param [properties] Properties to set - * @returns DataSharingSettings instance + * @returns UserLink instance */ - public static create(properties?: google.analytics.admin.v1alpha.IDataSharingSettings): google.analytics.admin.v1alpha.DataSharingSettings; + public static create(properties?: google.analytics.admin.v1alpha.IUserLink): google.analytics.admin.v1alpha.UserLink; /** - * Encodes the specified DataSharingSettings message. Does not implicitly {@link google.analytics.admin.v1alpha.DataSharingSettings.verify|verify} messages. - * @param message DataSharingSettings message or plain object to encode + * Encodes the specified UserLink message. Does not implicitly {@link google.analytics.admin.v1alpha.UserLink.verify|verify} messages. + * @param message UserLink message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IDataSharingSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IUserLink, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DataSharingSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataSharingSettings.verify|verify} messages. - * @param message DataSharingSettings message or plain object to encode + * Encodes the specified UserLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UserLink.verify|verify} messages. + * @param message UserLink message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IDataSharingSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IUserLink, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DataSharingSettings message from the specified reader or buffer. + * Decodes a UserLink message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DataSharingSettings + * @returns UserLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DataSharingSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.UserLink; /** - * Decodes a DataSharingSettings message from the specified reader or buffer, length delimited. + * Decodes a UserLink message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DataSharingSettings + * @returns UserLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DataSharingSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.UserLink; /** - * Verifies a DataSharingSettings message. + * Verifies a UserLink message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DataSharingSettings message from a plain object. Also converts values to their respective internal types. + * Creates a UserLink message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DataSharingSettings + * @returns UserLink */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DataSharingSettings; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.UserLink; /** - * Creates a plain object from a DataSharingSettings message. Also converts values to other types if specified. - * @param message DataSharingSettings + * Creates a plain object from a UserLink message. Also converts values to other types if specified. + * @param message UserLink * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.DataSharingSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.UserLink, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DataSharingSettings to JSON. + * Converts this UserLink to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DataSharingSettings + * Gets the default type url for UserLink * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AccountSummary. */ - interface IAccountSummary { + /** Properties of an AuditUserLink. */ + interface IAuditUserLink { - /** AccountSummary name */ + /** AuditUserLink name */ name?: (string|null); - /** AccountSummary account */ - account?: (string|null); + /** AuditUserLink emailAddress */ + emailAddress?: (string|null); - /** AccountSummary displayName */ - displayName?: (string|null); + /** AuditUserLink directRoles */ + directRoles?: (string[]|null); - /** AccountSummary propertySummaries */ - propertySummaries?: (google.analytics.admin.v1alpha.IPropertySummary[]|null); + /** AuditUserLink effectiveRoles */ + effectiveRoles?: (string[]|null); } - /** Represents an AccountSummary. */ - class AccountSummary implements IAccountSummary { + /** Represents an AuditUserLink. */ + class AuditUserLink implements IAuditUserLink { /** - * Constructs a new AccountSummary. + * Constructs a new AuditUserLink. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IAccountSummary); + constructor(properties?: google.analytics.admin.v1alpha.IAuditUserLink); - /** AccountSummary name. */ + /** AuditUserLink name. */ public name: string; - /** AccountSummary account. */ - public account: string; + /** AuditUserLink emailAddress. */ + public emailAddress: string; - /** AccountSummary displayName. */ - public displayName: string; + /** AuditUserLink directRoles. */ + public directRoles: string[]; - /** AccountSummary propertySummaries. */ - public propertySummaries: google.analytics.admin.v1alpha.IPropertySummary[]; + /** AuditUserLink effectiveRoles. */ + public effectiveRoles: string[]; /** - * Creates a new AccountSummary instance using the specified properties. + * Creates a new AuditUserLink instance using the specified properties. * @param [properties] Properties to set - * @returns AccountSummary instance + * @returns AuditUserLink instance */ - public static create(properties?: google.analytics.admin.v1alpha.IAccountSummary): google.analytics.admin.v1alpha.AccountSummary; + public static create(properties?: google.analytics.admin.v1alpha.IAuditUserLink): google.analytics.admin.v1alpha.AuditUserLink; /** - * Encodes the specified AccountSummary message. Does not implicitly {@link google.analytics.admin.v1alpha.AccountSummary.verify|verify} messages. - * @param message AccountSummary message or plain object to encode + * Encodes the specified AuditUserLink message. Does not implicitly {@link google.analytics.admin.v1alpha.AuditUserLink.verify|verify} messages. + * @param message AuditUserLink message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IAccountSummary, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IAuditUserLink, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AccountSummary message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccountSummary.verify|verify} messages. - * @param message AccountSummary message or plain object to encode + * Encodes the specified AuditUserLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AuditUserLink.verify|verify} messages. + * @param message AuditUserLink message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IAccountSummary, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAuditUserLink, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AccountSummary message from the specified reader or buffer. + * Decodes an AuditUserLink message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AccountSummary + * @returns AuditUserLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AccountSummary; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AuditUserLink; /** - * Decodes an AccountSummary message from the specified reader or buffer, length delimited. + * Decodes an AuditUserLink message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AccountSummary + * @returns AuditUserLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AccountSummary; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AuditUserLink; /** - * Verifies an AccountSummary message. + * Verifies an AuditUserLink message. * @param message Plain 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 AccountSummary message from a plain object. Also converts values to their respective internal types. + * Creates an AuditUserLink message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AccountSummary + * @returns AuditUserLink */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AccountSummary; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AuditUserLink; /** - * Creates a plain object from an AccountSummary message. Also converts values to other types if specified. - * @param message AccountSummary + * Creates a plain object from an AuditUserLink message. Also converts values to other types if specified. + * @param message AuditUserLink * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.AccountSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.AuditUserLink, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AccountSummary to JSON. + * Converts this AuditUserLink to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AccountSummary + * Gets the default type url for AuditUserLink * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PropertySummary. */ - interface IPropertySummary { - - /** PropertySummary property */ - property?: (string|null); + /** Properties of a FirebaseLink. */ + interface IFirebaseLink { - /** PropertySummary displayName */ - displayName?: (string|null); + /** FirebaseLink name */ + name?: (string|null); - /** PropertySummary propertyType */ - propertyType?: (google.analytics.admin.v1alpha.PropertyType|keyof typeof google.analytics.admin.v1alpha.PropertyType|null); + /** FirebaseLink project */ + project?: (string|null); - /** PropertySummary parent */ - parent?: (string|null); + /** FirebaseLink createTime */ + createTime?: (google.protobuf.ITimestamp|null); } - /** Represents a PropertySummary. */ - class PropertySummary implements IPropertySummary { + /** Represents a FirebaseLink. */ + class FirebaseLink implements IFirebaseLink { /** - * Constructs a new PropertySummary. + * Constructs a new FirebaseLink. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IPropertySummary); - - /** PropertySummary property. */ - public property: string; + constructor(properties?: google.analytics.admin.v1alpha.IFirebaseLink); - /** PropertySummary displayName. */ - public displayName: string; + /** FirebaseLink name. */ + public name: string; - /** PropertySummary propertyType. */ - public propertyType: (google.analytics.admin.v1alpha.PropertyType|keyof typeof google.analytics.admin.v1alpha.PropertyType); + /** FirebaseLink project. */ + public project: string; - /** PropertySummary parent. */ - public parent: string; + /** FirebaseLink createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new PropertySummary instance using the specified properties. + * Creates a new FirebaseLink instance using the specified properties. * @param [properties] Properties to set - * @returns PropertySummary instance + * @returns FirebaseLink instance */ - public static create(properties?: google.analytics.admin.v1alpha.IPropertySummary): google.analytics.admin.v1alpha.PropertySummary; + public static create(properties?: google.analytics.admin.v1alpha.IFirebaseLink): google.analytics.admin.v1alpha.FirebaseLink; /** - * Encodes the specified PropertySummary message. Does not implicitly {@link google.analytics.admin.v1alpha.PropertySummary.verify|verify} messages. - * @param message PropertySummary message or plain object to encode + * Encodes the specified FirebaseLink message. Does not implicitly {@link google.analytics.admin.v1alpha.FirebaseLink.verify|verify} messages. + * @param message FirebaseLink message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IPropertySummary, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IFirebaseLink, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PropertySummary message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.PropertySummary.verify|verify} messages. - * @param message PropertySummary message or plain object to encode + * Encodes the specified FirebaseLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.FirebaseLink.verify|verify} messages. + * @param message FirebaseLink message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IPropertySummary, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IFirebaseLink, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PropertySummary message from the specified reader or buffer. + * Decodes a FirebaseLink message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PropertySummary + * @returns FirebaseLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.PropertySummary; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.FirebaseLink; /** - * Decodes a PropertySummary message from the specified reader or buffer, length delimited. + * Decodes a FirebaseLink message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PropertySummary + * @returns FirebaseLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.PropertySummary; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.FirebaseLink; /** - * Verifies a PropertySummary message. + * Verifies a FirebaseLink message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PropertySummary message from a plain object. Also converts values to their respective internal types. + * Creates a FirebaseLink message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PropertySummary + * @returns FirebaseLink */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.PropertySummary; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.FirebaseLink; /** - * Creates a plain object from a PropertySummary message. Also converts values to other types if specified. - * @param message PropertySummary + * Creates a plain object from a FirebaseLink message. Also converts values to other types if specified. + * @param message FirebaseLink * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.PropertySummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.FirebaseLink, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PropertySummary to JSON. + * Converts this FirebaseLink to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PropertySummary + * Gets the default type url for FirebaseLink * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MeasurementProtocolSecret. */ - interface IMeasurementProtocolSecret { + /** Properties of a GlobalSiteTag. */ + interface IGlobalSiteTag { - /** MeasurementProtocolSecret name */ + /** GlobalSiteTag name */ name?: (string|null); - /** MeasurementProtocolSecret displayName */ - displayName?: (string|null); - - /** MeasurementProtocolSecret secretValue */ - secretValue?: (string|null); + /** GlobalSiteTag snippet */ + snippet?: (string|null); } - /** Represents a MeasurementProtocolSecret. */ - class MeasurementProtocolSecret implements IMeasurementProtocolSecret { + /** Represents a GlobalSiteTag. */ + class GlobalSiteTag implements IGlobalSiteTag { /** - * Constructs a new MeasurementProtocolSecret. + * Constructs a new GlobalSiteTag. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IMeasurementProtocolSecret); + constructor(properties?: google.analytics.admin.v1alpha.IGlobalSiteTag); - /** MeasurementProtocolSecret name. */ + /** GlobalSiteTag name. */ public name: string; - /** MeasurementProtocolSecret displayName. */ - public displayName: string; - - /** MeasurementProtocolSecret secretValue. */ - public secretValue: string; + /** GlobalSiteTag snippet. */ + public snippet: string; /** - * Creates a new MeasurementProtocolSecret instance using the specified properties. + * Creates a new GlobalSiteTag instance using the specified properties. * @param [properties] Properties to set - * @returns MeasurementProtocolSecret instance + * @returns GlobalSiteTag instance */ - public static create(properties?: google.analytics.admin.v1alpha.IMeasurementProtocolSecret): google.analytics.admin.v1alpha.MeasurementProtocolSecret; + public static create(properties?: google.analytics.admin.v1alpha.IGlobalSiteTag): google.analytics.admin.v1alpha.GlobalSiteTag; /** - * Encodes the specified MeasurementProtocolSecret message. Does not implicitly {@link google.analytics.admin.v1alpha.MeasurementProtocolSecret.verify|verify} messages. - * @param message MeasurementProtocolSecret message or plain object to encode + * Encodes the specified GlobalSiteTag message. Does not implicitly {@link google.analytics.admin.v1alpha.GlobalSiteTag.verify|verify} messages. + * @param message GlobalSiteTag message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IMeasurementProtocolSecret, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IGlobalSiteTag, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MeasurementProtocolSecret message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.MeasurementProtocolSecret.verify|verify} messages. - * @param message MeasurementProtocolSecret message or plain object to encode + * Encodes the specified GlobalSiteTag message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GlobalSiteTag.verify|verify} messages. + * @param message GlobalSiteTag message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IMeasurementProtocolSecret, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGlobalSiteTag, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MeasurementProtocolSecret message from the specified reader or buffer. + * Decodes a GlobalSiteTag message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MeasurementProtocolSecret + * @returns GlobalSiteTag * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.MeasurementProtocolSecret; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GlobalSiteTag; /** - * Decodes a MeasurementProtocolSecret message from the specified reader or buffer, length delimited. + * Decodes a GlobalSiteTag message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MeasurementProtocolSecret + * @returns GlobalSiteTag * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.MeasurementProtocolSecret; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GlobalSiteTag; /** - * Verifies a MeasurementProtocolSecret message. + * Verifies a GlobalSiteTag message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MeasurementProtocolSecret message from a plain object. Also converts values to their respective internal types. + * Creates a GlobalSiteTag message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MeasurementProtocolSecret + * @returns GlobalSiteTag */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.MeasurementProtocolSecret; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GlobalSiteTag; /** - * Creates a plain object from a MeasurementProtocolSecret message. Also converts values to other types if specified. - * @param message MeasurementProtocolSecret + * Creates a plain object from a GlobalSiteTag message. Also converts values to other types if specified. + * @param message GlobalSiteTag * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.MeasurementProtocolSecret, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.GlobalSiteTag, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MeasurementProtocolSecret to JSON. + * Converts this GlobalSiteTag to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MeasurementProtocolSecret + * Gets the default type url for GlobalSiteTag * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ChangeHistoryEvent. */ - interface IChangeHistoryEvent { + /** Properties of a GoogleAdsLink. */ + interface IGoogleAdsLink { - /** ChangeHistoryEvent id */ - id?: (string|null); + /** GoogleAdsLink name */ + name?: (string|null); - /** ChangeHistoryEvent changeTime */ - changeTime?: (google.protobuf.ITimestamp|null); + /** GoogleAdsLink customerId */ + customerId?: (string|null); - /** ChangeHistoryEvent actorType */ - actorType?: (google.analytics.admin.v1alpha.ActorType|keyof typeof google.analytics.admin.v1alpha.ActorType|null); + /** GoogleAdsLink canManageClients */ + canManageClients?: (boolean|null); - /** ChangeHistoryEvent userActorEmail */ - userActorEmail?: (string|null); + /** GoogleAdsLink adsPersonalizationEnabled */ + adsPersonalizationEnabled?: (google.protobuf.IBoolValue|null); - /** ChangeHistoryEvent changesFiltered */ - changesFiltered?: (boolean|null); + /** GoogleAdsLink createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** ChangeHistoryEvent changes */ - changes?: (google.analytics.admin.v1alpha.IChangeHistoryChange[]|null); + /** GoogleAdsLink updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** GoogleAdsLink creatorEmailAddress */ + creatorEmailAddress?: (string|null); } - /** Represents a ChangeHistoryEvent. */ - class ChangeHistoryEvent implements IChangeHistoryEvent { + /** Represents a GoogleAdsLink. */ + class GoogleAdsLink implements IGoogleAdsLink { /** - * Constructs a new ChangeHistoryEvent. + * Constructs a new GoogleAdsLink. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IChangeHistoryEvent); + constructor(properties?: google.analytics.admin.v1alpha.IGoogleAdsLink); - /** ChangeHistoryEvent id. */ - public id: string; + /** GoogleAdsLink name. */ + public name: string; - /** ChangeHistoryEvent changeTime. */ - public changeTime?: (google.protobuf.ITimestamp|null); + /** GoogleAdsLink customerId. */ + public customerId: string; - /** ChangeHistoryEvent actorType. */ - public actorType: (google.analytics.admin.v1alpha.ActorType|keyof typeof google.analytics.admin.v1alpha.ActorType); + /** GoogleAdsLink canManageClients. */ + public canManageClients: boolean; - /** ChangeHistoryEvent userActorEmail. */ - public userActorEmail: string; + /** GoogleAdsLink adsPersonalizationEnabled. */ + public adsPersonalizationEnabled?: (google.protobuf.IBoolValue|null); - /** ChangeHistoryEvent changesFiltered. */ - public changesFiltered: boolean; + /** GoogleAdsLink createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** ChangeHistoryEvent changes. */ - public changes: google.analytics.admin.v1alpha.IChangeHistoryChange[]; + /** GoogleAdsLink updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** GoogleAdsLink creatorEmailAddress. */ + public creatorEmailAddress: string; /** - * Creates a new ChangeHistoryEvent instance using the specified properties. + * Creates a new GoogleAdsLink instance using the specified properties. * @param [properties] Properties to set - * @returns ChangeHistoryEvent instance + * @returns GoogleAdsLink instance */ - public static create(properties?: google.analytics.admin.v1alpha.IChangeHistoryEvent): google.analytics.admin.v1alpha.ChangeHistoryEvent; + public static create(properties?: google.analytics.admin.v1alpha.IGoogleAdsLink): google.analytics.admin.v1alpha.GoogleAdsLink; /** - * Encodes the specified ChangeHistoryEvent message. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryEvent.verify|verify} messages. - * @param message ChangeHistoryEvent message or plain object to encode + * Encodes the specified GoogleAdsLink message. Does not implicitly {@link google.analytics.admin.v1alpha.GoogleAdsLink.verify|verify} messages. + * @param message GoogleAdsLink message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IChangeHistoryEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IGoogleAdsLink, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ChangeHistoryEvent message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryEvent.verify|verify} messages. - * @param message ChangeHistoryEvent message or plain object to encode + * Encodes the specified GoogleAdsLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GoogleAdsLink.verify|verify} messages. + * @param message GoogleAdsLink message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IChangeHistoryEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGoogleAdsLink, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ChangeHistoryEvent message from the specified reader or buffer. + * Decodes a GoogleAdsLink message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ChangeHistoryEvent + * @returns GoogleAdsLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ChangeHistoryEvent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GoogleAdsLink; /** - * Decodes a ChangeHistoryEvent message from the specified reader or buffer, length delimited. + * Decodes a GoogleAdsLink message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ChangeHistoryEvent + * @returns GoogleAdsLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ChangeHistoryEvent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GoogleAdsLink; /** - * Verifies a ChangeHistoryEvent message. + * Verifies a GoogleAdsLink message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ChangeHistoryEvent message from a plain object. Also converts values to their respective internal types. + * Creates a GoogleAdsLink message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ChangeHistoryEvent + * @returns GoogleAdsLink */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ChangeHistoryEvent; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GoogleAdsLink; /** - * Creates a plain object from a ChangeHistoryEvent message. Also converts values to other types if specified. - * @param message ChangeHistoryEvent + * Creates a plain object from a GoogleAdsLink message. Also converts values to other types if specified. + * @param message GoogleAdsLink * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.ChangeHistoryEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.GoogleAdsLink, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ChangeHistoryEvent to JSON. + * Converts this GoogleAdsLink to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ChangeHistoryEvent + * Gets the default type url for GoogleAdsLink * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ChangeHistoryChange. */ - interface IChangeHistoryChange { + /** Properties of a DataSharingSettings. */ + interface IDataSharingSettings { - /** ChangeHistoryChange resource */ - resource?: (string|null); + /** DataSharingSettings name */ + name?: (string|null); - /** ChangeHistoryChange action */ - action?: (google.analytics.admin.v1alpha.ActionType|keyof typeof google.analytics.admin.v1alpha.ActionType|null); + /** DataSharingSettings sharingWithGoogleSupportEnabled */ + sharingWithGoogleSupportEnabled?: (boolean|null); - /** ChangeHistoryChange resourceBeforeChange */ - resourceBeforeChange?: (google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource|null); + /** DataSharingSettings sharingWithGoogleAssignedSalesEnabled */ + sharingWithGoogleAssignedSalesEnabled?: (boolean|null); - /** ChangeHistoryChange resourceAfterChange */ - resourceAfterChange?: (google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource|null); + /** DataSharingSettings sharingWithGoogleAnySalesEnabled */ + sharingWithGoogleAnySalesEnabled?: (boolean|null); + + /** DataSharingSettings sharingWithGoogleProductsEnabled */ + sharingWithGoogleProductsEnabled?: (boolean|null); + + /** DataSharingSettings sharingWithOthersEnabled */ + sharingWithOthersEnabled?: (boolean|null); } - /** Represents a ChangeHistoryChange. */ - class ChangeHistoryChange implements IChangeHistoryChange { + /** Represents a DataSharingSettings. */ + class DataSharingSettings implements IDataSharingSettings { /** - * Constructs a new ChangeHistoryChange. + * Constructs a new DataSharingSettings. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IChangeHistoryChange); + constructor(properties?: google.analytics.admin.v1alpha.IDataSharingSettings); - /** ChangeHistoryChange resource. */ - public resource: string; + /** DataSharingSettings name. */ + public name: string; - /** ChangeHistoryChange action. */ - public action: (google.analytics.admin.v1alpha.ActionType|keyof typeof google.analytics.admin.v1alpha.ActionType); + /** DataSharingSettings sharingWithGoogleSupportEnabled. */ + public sharingWithGoogleSupportEnabled: boolean; - /** ChangeHistoryChange resourceBeforeChange. */ - public resourceBeforeChange?: (google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource|null); + /** DataSharingSettings sharingWithGoogleAssignedSalesEnabled. */ + public sharingWithGoogleAssignedSalesEnabled: boolean; - /** ChangeHistoryChange resourceAfterChange. */ - public resourceAfterChange?: (google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource|null); + /** DataSharingSettings sharingWithGoogleAnySalesEnabled. */ + public sharingWithGoogleAnySalesEnabled: boolean; + + /** DataSharingSettings sharingWithGoogleProductsEnabled. */ + public sharingWithGoogleProductsEnabled: boolean; + + /** DataSharingSettings sharingWithOthersEnabled. */ + public sharingWithOthersEnabled: boolean; /** - * Creates a new ChangeHistoryChange instance using the specified properties. + * Creates a new DataSharingSettings instance using the specified properties. * @param [properties] Properties to set - * @returns ChangeHistoryChange instance + * @returns DataSharingSettings instance */ - public static create(properties?: google.analytics.admin.v1alpha.IChangeHistoryChange): google.analytics.admin.v1alpha.ChangeHistoryChange; + public static create(properties?: google.analytics.admin.v1alpha.IDataSharingSettings): google.analytics.admin.v1alpha.DataSharingSettings; /** - * Encodes the specified ChangeHistoryChange message. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryChange.verify|verify} messages. - * @param message ChangeHistoryChange message or plain object to encode + * Encodes the specified DataSharingSettings message. Does not implicitly {@link google.analytics.admin.v1alpha.DataSharingSettings.verify|verify} messages. + * @param message DataSharingSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IChangeHistoryChange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IDataSharingSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ChangeHistoryChange message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryChange.verify|verify} messages. - * @param message ChangeHistoryChange message or plain object to encode + * Encodes the specified DataSharingSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataSharingSettings.verify|verify} messages. + * @param message DataSharingSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IChangeHistoryChange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IDataSharingSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ChangeHistoryChange message from the specified reader or buffer. + * Decodes a DataSharingSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ChangeHistoryChange + * @returns DataSharingSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ChangeHistoryChange; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DataSharingSettings; /** - * Decodes a ChangeHistoryChange message from the specified reader or buffer, length delimited. + * Decodes a DataSharingSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ChangeHistoryChange + * @returns DataSharingSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ChangeHistoryChange; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DataSharingSettings; /** - * Verifies a ChangeHistoryChange message. + * Verifies a DataSharingSettings message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ChangeHistoryChange message from a plain object. Also converts values to their respective internal types. + * Creates a DataSharingSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ChangeHistoryChange + * @returns DataSharingSettings */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ChangeHistoryChange; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DataSharingSettings; /** - * Creates a plain object from a ChangeHistoryChange message. Also converts values to other types if specified. - * @param message ChangeHistoryChange + * Creates a plain object from a DataSharingSettings message. Also converts values to other types if specified. + * @param message DataSharingSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.ChangeHistoryChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.DataSharingSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ChangeHistoryChange to JSON. + * Converts this DataSharingSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ChangeHistoryChange + * Gets the default type url for DataSharingSettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ChangeHistoryChange { - - /** Properties of a ChangeHistoryResource. */ - interface IChangeHistoryResource { - - /** ChangeHistoryResource account */ - account?: (google.analytics.admin.v1alpha.IAccount|null); - - /** ChangeHistoryResource property */ - property?: (google.analytics.admin.v1alpha.IProperty|null); - - /** ChangeHistoryResource firebaseLink */ - firebaseLink?: (google.analytics.admin.v1alpha.IFirebaseLink|null); - - /** ChangeHistoryResource googleAdsLink */ - googleAdsLink?: (google.analytics.admin.v1alpha.IGoogleAdsLink|null); - - /** ChangeHistoryResource googleSignalsSettings */ - googleSignalsSettings?: (google.analytics.admin.v1alpha.IGoogleSignalsSettings|null); - - /** ChangeHistoryResource displayVideo_360AdvertiserLink */ - displayVideo_360AdvertiserLink?: (google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink|null); - - /** ChangeHistoryResource displayVideo_360AdvertiserLinkProposal */ - displayVideo_360AdvertiserLinkProposal?: (google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal|null); - - /** ChangeHistoryResource conversionEvent */ - conversionEvent?: (google.analytics.admin.v1alpha.IConversionEvent|null); - - /** ChangeHistoryResource measurementProtocolSecret */ - measurementProtocolSecret?: (google.analytics.admin.v1alpha.IMeasurementProtocolSecret|null); - - /** ChangeHistoryResource customDimension */ - customDimension?: (google.analytics.admin.v1alpha.ICustomDimension|null); - - /** ChangeHistoryResource customMetric */ - customMetric?: (google.analytics.admin.v1alpha.ICustomMetric|null); - - /** ChangeHistoryResource dataRetentionSettings */ - dataRetentionSettings?: (google.analytics.admin.v1alpha.IDataRetentionSettings|null); - - /** ChangeHistoryResource searchAds_360Link */ - searchAds_360Link?: (google.analytics.admin.v1alpha.ISearchAds360Link|null); - - /** ChangeHistoryResource dataStream */ - dataStream?: (google.analytics.admin.v1alpha.IDataStream|null); - - /** ChangeHistoryResource attributionSettings */ - attributionSettings?: (google.analytics.admin.v1alpha.IAttributionSettings|null); - - /** ChangeHistoryResource expandedDataSet */ - expandedDataSet?: (google.analytics.admin.v1alpha.IExpandedDataSet|null); - - /** ChangeHistoryResource bigqueryLink */ - bigqueryLink?: (google.analytics.admin.v1alpha.IBigQueryLink|null); - } - - /** Represents a ChangeHistoryResource. */ - class ChangeHistoryResource implements IChangeHistoryResource { - - /** - * Constructs a new ChangeHistoryResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource); - - /** ChangeHistoryResource account. */ - public account?: (google.analytics.admin.v1alpha.IAccount|null); - - /** ChangeHistoryResource property. */ - public property?: (google.analytics.admin.v1alpha.IProperty|null); - - /** ChangeHistoryResource firebaseLink. */ - public firebaseLink?: (google.analytics.admin.v1alpha.IFirebaseLink|null); - - /** ChangeHistoryResource googleAdsLink. */ - public googleAdsLink?: (google.analytics.admin.v1alpha.IGoogleAdsLink|null); - - /** ChangeHistoryResource googleSignalsSettings. */ - public googleSignalsSettings?: (google.analytics.admin.v1alpha.IGoogleSignalsSettings|null); - - /** ChangeHistoryResource displayVideo_360AdvertiserLink. */ - public displayVideo_360AdvertiserLink?: (google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink|null); - - /** ChangeHistoryResource displayVideo_360AdvertiserLinkProposal. */ - public displayVideo_360AdvertiserLinkProposal?: (google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal|null); - - /** ChangeHistoryResource conversionEvent. */ - public conversionEvent?: (google.analytics.admin.v1alpha.IConversionEvent|null); + /** Properties of an AccountSummary. */ + interface IAccountSummary { - /** ChangeHistoryResource measurementProtocolSecret. */ - public measurementProtocolSecret?: (google.analytics.admin.v1alpha.IMeasurementProtocolSecret|null); + /** AccountSummary name */ + name?: (string|null); - /** ChangeHistoryResource customDimension. */ - public customDimension?: (google.analytics.admin.v1alpha.ICustomDimension|null); + /** AccountSummary account */ + account?: (string|null); - /** ChangeHistoryResource customMetric. */ - public customMetric?: (google.analytics.admin.v1alpha.ICustomMetric|null); + /** AccountSummary displayName */ + displayName?: (string|null); - /** ChangeHistoryResource dataRetentionSettings. */ - public dataRetentionSettings?: (google.analytics.admin.v1alpha.IDataRetentionSettings|null); + /** AccountSummary propertySummaries */ + propertySummaries?: (google.analytics.admin.v1alpha.IPropertySummary[]|null); + } - /** ChangeHistoryResource searchAds_360Link. */ - public searchAds_360Link?: (google.analytics.admin.v1alpha.ISearchAds360Link|null); + /** Represents an AccountSummary. */ + class AccountSummary implements IAccountSummary { - /** ChangeHistoryResource dataStream. */ - public dataStream?: (google.analytics.admin.v1alpha.IDataStream|null); + /** + * Constructs a new AccountSummary. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAccountSummary); - /** ChangeHistoryResource attributionSettings. */ - public attributionSettings?: (google.analytics.admin.v1alpha.IAttributionSettings|null); + /** AccountSummary name. */ + public name: string; - /** ChangeHistoryResource expandedDataSet. */ - public expandedDataSet?: (google.analytics.admin.v1alpha.IExpandedDataSet|null); + /** AccountSummary account. */ + public account: string; - /** ChangeHistoryResource bigqueryLink. */ - public bigqueryLink?: (google.analytics.admin.v1alpha.IBigQueryLink|null); + /** AccountSummary displayName. */ + public displayName: string; - /** ChangeHistoryResource resource. */ - public resource?: ("account"|"property"|"firebaseLink"|"googleAdsLink"|"googleSignalsSettings"|"displayVideo_360AdvertiserLink"|"displayVideo_360AdvertiserLinkProposal"|"conversionEvent"|"measurementProtocolSecret"|"customDimension"|"customMetric"|"dataRetentionSettings"|"searchAds_360Link"|"dataStream"|"attributionSettings"|"expandedDataSet"|"bigqueryLink"); + /** AccountSummary propertySummaries. */ + public propertySummaries: google.analytics.admin.v1alpha.IPropertySummary[]; - /** - * Creates a new ChangeHistoryResource instance using the specified properties. - * @param [properties] Properties to set - * @returns ChangeHistoryResource instance - */ - public static create(properties?: google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource): google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource; + /** + * Creates a new AccountSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns AccountSummary instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAccountSummary): google.analytics.admin.v1alpha.AccountSummary; - /** - * Encodes the specified ChangeHistoryResource message. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.verify|verify} messages. - * @param message ChangeHistoryResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified AccountSummary message. Does not implicitly {@link google.analytics.admin.v1alpha.AccountSummary.verify|verify} messages. + * @param message AccountSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAccountSummary, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ChangeHistoryResource message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.verify|verify} messages. - * @param message ChangeHistoryResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified AccountSummary message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccountSummary.verify|verify} messages. + * @param message AccountSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAccountSummary, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ChangeHistoryResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ChangeHistoryResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource; + /** + * Decodes an AccountSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccountSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AccountSummary; - /** - * Decodes a ChangeHistoryResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ChangeHistoryResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource; + /** + * Decodes an AccountSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccountSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AccountSummary; - /** - * Verifies a ChangeHistoryResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies an AccountSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a ChangeHistoryResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ChangeHistoryResource - */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource; + /** + * Creates an AccountSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccountSummary + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AccountSummary; - /** - * Creates a plain object from a ChangeHistoryResource message. Also converts values to other types if specified. - * @param message ChangeHistoryResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from an AccountSummary message. Also converts values to other types if specified. + * @param message AccountSummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AccountSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this ChangeHistoryResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this AccountSummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for ChangeHistoryResource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for AccountSummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DisplayVideo360AdvertiserLink. */ - interface IDisplayVideo360AdvertiserLink { - - /** DisplayVideo360AdvertiserLink name */ - name?: (string|null); - - /** DisplayVideo360AdvertiserLink advertiserId */ - advertiserId?: (string|null); + /** Properties of a PropertySummary. */ + interface IPropertySummary { - /** DisplayVideo360AdvertiserLink advertiserDisplayName */ - advertiserDisplayName?: (string|null); + /** PropertySummary property */ + property?: (string|null); - /** DisplayVideo360AdvertiserLink adsPersonalizationEnabled */ - adsPersonalizationEnabled?: (google.protobuf.IBoolValue|null); + /** PropertySummary displayName */ + displayName?: (string|null); - /** DisplayVideo360AdvertiserLink campaignDataSharingEnabled */ - campaignDataSharingEnabled?: (google.protobuf.IBoolValue|null); + /** PropertySummary propertyType */ + propertyType?: (google.analytics.admin.v1alpha.PropertyType|keyof typeof google.analytics.admin.v1alpha.PropertyType|null); - /** DisplayVideo360AdvertiserLink costDataSharingEnabled */ - costDataSharingEnabled?: (google.protobuf.IBoolValue|null); + /** PropertySummary parent */ + parent?: (string|null); } - /** Represents a DisplayVideo360AdvertiserLink. */ - class DisplayVideo360AdvertiserLink implements IDisplayVideo360AdvertiserLink { + /** Represents a PropertySummary. */ + class PropertySummary implements IPropertySummary { /** - * Constructs a new DisplayVideo360AdvertiserLink. + * Constructs a new PropertySummary. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink); - - /** DisplayVideo360AdvertiserLink name. */ - public name: string; - - /** DisplayVideo360AdvertiserLink advertiserId. */ - public advertiserId: string; + constructor(properties?: google.analytics.admin.v1alpha.IPropertySummary); - /** DisplayVideo360AdvertiserLink advertiserDisplayName. */ - public advertiserDisplayName: string; + /** PropertySummary property. */ + public property: string; - /** DisplayVideo360AdvertiserLink adsPersonalizationEnabled. */ - public adsPersonalizationEnabled?: (google.protobuf.IBoolValue|null); + /** PropertySummary displayName. */ + public displayName: string; - /** DisplayVideo360AdvertiserLink campaignDataSharingEnabled. */ - public campaignDataSharingEnabled?: (google.protobuf.IBoolValue|null); + /** PropertySummary propertyType. */ + public propertyType: (google.analytics.admin.v1alpha.PropertyType|keyof typeof google.analytics.admin.v1alpha.PropertyType); - /** DisplayVideo360AdvertiserLink costDataSharingEnabled. */ - public costDataSharingEnabled?: (google.protobuf.IBoolValue|null); + /** PropertySummary parent. */ + public parent: string; /** - * Creates a new DisplayVideo360AdvertiserLink instance using the specified properties. + * Creates a new PropertySummary instance using the specified properties. * @param [properties] Properties to set - * @returns DisplayVideo360AdvertiserLink instance + * @returns PropertySummary instance */ - public static create(properties?: google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink): google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink; + public static create(properties?: google.analytics.admin.v1alpha.IPropertySummary): google.analytics.admin.v1alpha.PropertySummary; /** - * Encodes the specified DisplayVideo360AdvertiserLink message. Does not implicitly {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.verify|verify} messages. - * @param message DisplayVideo360AdvertiserLink message or plain object to encode + * Encodes the specified PropertySummary message. Does not implicitly {@link google.analytics.admin.v1alpha.PropertySummary.verify|verify} messages. + * @param message PropertySummary message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IPropertySummary, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DisplayVideo360AdvertiserLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.verify|verify} messages. - * @param message DisplayVideo360AdvertiserLink message or plain object to encode + * Encodes the specified PropertySummary message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.PropertySummary.verify|verify} messages. + * @param message PropertySummary message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IPropertySummary, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DisplayVideo360AdvertiserLink message from the specified reader or buffer. + * Decodes a PropertySummary message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DisplayVideo360AdvertiserLink + * @returns PropertySummary * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.PropertySummary; /** - * Decodes a DisplayVideo360AdvertiserLink message from the specified reader or buffer, length delimited. + * Decodes a PropertySummary message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DisplayVideo360AdvertiserLink + * @returns PropertySummary * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.PropertySummary; /** - * Verifies a DisplayVideo360AdvertiserLink message. + * Verifies a PropertySummary message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DisplayVideo360AdvertiserLink message from a plain object. Also converts values to their respective internal types. + * Creates a PropertySummary message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DisplayVideo360AdvertiserLink + * @returns PropertySummary */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.PropertySummary; /** - * Creates a plain object from a DisplayVideo360AdvertiserLink message. Also converts values to other types if specified. - * @param message DisplayVideo360AdvertiserLink + * Creates a plain object from a PropertySummary message. Also converts values to other types if specified. + * @param message PropertySummary * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.PropertySummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DisplayVideo360AdvertiserLink to JSON. + * Converts this PropertySummary to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DisplayVideo360AdvertiserLink + * Gets the default type url for PropertySummary * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DisplayVideo360AdvertiserLinkProposal. */ - interface IDisplayVideo360AdvertiserLinkProposal { + /** Properties of a MeasurementProtocolSecret. */ + interface IMeasurementProtocolSecret { - /** DisplayVideo360AdvertiserLinkProposal name */ + /** MeasurementProtocolSecret name */ name?: (string|null); - /** DisplayVideo360AdvertiserLinkProposal advertiserId */ - advertiserId?: (string|null); - - /** DisplayVideo360AdvertiserLinkProposal linkProposalStatusDetails */ - linkProposalStatusDetails?: (google.analytics.admin.v1alpha.ILinkProposalStatusDetails|null); - - /** DisplayVideo360AdvertiserLinkProposal advertiserDisplayName */ - advertiserDisplayName?: (string|null); - - /** DisplayVideo360AdvertiserLinkProposal validationEmail */ - validationEmail?: (string|null); - - /** DisplayVideo360AdvertiserLinkProposal adsPersonalizationEnabled */ - adsPersonalizationEnabled?: (google.protobuf.IBoolValue|null); - - /** DisplayVideo360AdvertiserLinkProposal campaignDataSharingEnabled */ - campaignDataSharingEnabled?: (google.protobuf.IBoolValue|null); + /** MeasurementProtocolSecret displayName */ + displayName?: (string|null); - /** DisplayVideo360AdvertiserLinkProposal costDataSharingEnabled */ - costDataSharingEnabled?: (google.protobuf.IBoolValue|null); + /** MeasurementProtocolSecret secretValue */ + secretValue?: (string|null); } - /** Represents a DisplayVideo360AdvertiserLinkProposal. */ - class DisplayVideo360AdvertiserLinkProposal implements IDisplayVideo360AdvertiserLinkProposal { + /** Represents a MeasurementProtocolSecret. */ + class MeasurementProtocolSecret implements IMeasurementProtocolSecret { /** - * Constructs a new DisplayVideo360AdvertiserLinkProposal. + * Constructs a new MeasurementProtocolSecret. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal); + constructor(properties?: google.analytics.admin.v1alpha.IMeasurementProtocolSecret); - /** DisplayVideo360AdvertiserLinkProposal name. */ + /** MeasurementProtocolSecret name. */ public name: string; - /** DisplayVideo360AdvertiserLinkProposal advertiserId. */ - public advertiserId: string; - - /** DisplayVideo360AdvertiserLinkProposal linkProposalStatusDetails. */ - public linkProposalStatusDetails?: (google.analytics.admin.v1alpha.ILinkProposalStatusDetails|null); - - /** DisplayVideo360AdvertiserLinkProposal advertiserDisplayName. */ - public advertiserDisplayName: string; - - /** DisplayVideo360AdvertiserLinkProposal validationEmail. */ - public validationEmail: string; - - /** DisplayVideo360AdvertiserLinkProposal adsPersonalizationEnabled. */ - public adsPersonalizationEnabled?: (google.protobuf.IBoolValue|null); - - /** DisplayVideo360AdvertiserLinkProposal campaignDataSharingEnabled. */ - public campaignDataSharingEnabled?: (google.protobuf.IBoolValue|null); + /** MeasurementProtocolSecret displayName. */ + public displayName: string; - /** DisplayVideo360AdvertiserLinkProposal costDataSharingEnabled. */ - public costDataSharingEnabled?: (google.protobuf.IBoolValue|null); + /** MeasurementProtocolSecret secretValue. */ + public secretValue: string; /** - * Creates a new DisplayVideo360AdvertiserLinkProposal instance using the specified properties. + * Creates a new MeasurementProtocolSecret instance using the specified properties. * @param [properties] Properties to set - * @returns DisplayVideo360AdvertiserLinkProposal instance + * @returns MeasurementProtocolSecret instance */ - public static create(properties?: google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal): google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal; + public static create(properties?: google.analytics.admin.v1alpha.IMeasurementProtocolSecret): google.analytics.admin.v1alpha.MeasurementProtocolSecret; /** - * Encodes the specified DisplayVideo360AdvertiserLinkProposal message. Does not implicitly {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.verify|verify} messages. - * @param message DisplayVideo360AdvertiserLinkProposal message or plain object to encode + * Encodes the specified MeasurementProtocolSecret message. Does not implicitly {@link google.analytics.admin.v1alpha.MeasurementProtocolSecret.verify|verify} messages. + * @param message MeasurementProtocolSecret message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IMeasurementProtocolSecret, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DisplayVideo360AdvertiserLinkProposal message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.verify|verify} messages. - * @param message DisplayVideo360AdvertiserLinkProposal message or plain object to encode + * Encodes the specified MeasurementProtocolSecret message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.MeasurementProtocolSecret.verify|verify} messages. + * @param message MeasurementProtocolSecret message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IMeasurementProtocolSecret, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DisplayVideo360AdvertiserLinkProposal message from the specified reader or buffer. + * Decodes a MeasurementProtocolSecret message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DisplayVideo360AdvertiserLinkProposal + * @returns MeasurementProtocolSecret * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.MeasurementProtocolSecret; /** - * Decodes a DisplayVideo360AdvertiserLinkProposal message from the specified reader or buffer, length delimited. + * Decodes a MeasurementProtocolSecret message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DisplayVideo360AdvertiserLinkProposal + * @returns MeasurementProtocolSecret * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.MeasurementProtocolSecret; /** - * Verifies a DisplayVideo360AdvertiserLinkProposal message. + * Verifies a MeasurementProtocolSecret message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DisplayVideo360AdvertiserLinkProposal message from a plain object. Also converts values to their respective internal types. + * Creates a MeasurementProtocolSecret message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DisplayVideo360AdvertiserLinkProposal + * @returns MeasurementProtocolSecret */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.MeasurementProtocolSecret; /** - * Creates a plain object from a DisplayVideo360AdvertiserLinkProposal message. Also converts values to other types if specified. - * @param message DisplayVideo360AdvertiserLinkProposal + * Creates a plain object from a MeasurementProtocolSecret message. Also converts values to other types if specified. + * @param message MeasurementProtocolSecret * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.MeasurementProtocolSecret, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DisplayVideo360AdvertiserLinkProposal to JSON. + * Converts this MeasurementProtocolSecret to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DisplayVideo360AdvertiserLinkProposal + * Gets the default type url for MeasurementProtocolSecret * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SearchAds360Link. */ - interface ISearchAds360Link { - - /** SearchAds360Link name */ - name?: (string|null); + /** Properties of a ChangeHistoryEvent. */ + interface IChangeHistoryEvent { - /** SearchAds360Link advertiserId */ - advertiserId?: (string|null); + /** ChangeHistoryEvent id */ + id?: (string|null); - /** SearchAds360Link campaignDataSharingEnabled */ - campaignDataSharingEnabled?: (google.protobuf.IBoolValue|null); + /** ChangeHistoryEvent changeTime */ + changeTime?: (google.protobuf.ITimestamp|null); - /** SearchAds360Link costDataSharingEnabled */ - costDataSharingEnabled?: (google.protobuf.IBoolValue|null); + /** ChangeHistoryEvent actorType */ + actorType?: (google.analytics.admin.v1alpha.ActorType|keyof typeof google.analytics.admin.v1alpha.ActorType|null); - /** SearchAds360Link advertiserDisplayName */ - advertiserDisplayName?: (string|null); + /** ChangeHistoryEvent userActorEmail */ + userActorEmail?: (string|null); - /** SearchAds360Link adsPersonalizationEnabled */ - adsPersonalizationEnabled?: (google.protobuf.IBoolValue|null); + /** ChangeHistoryEvent changesFiltered */ + changesFiltered?: (boolean|null); - /** SearchAds360Link siteStatsSharingEnabled */ - siteStatsSharingEnabled?: (google.protobuf.IBoolValue|null); + /** ChangeHistoryEvent changes */ + changes?: (google.analytics.admin.v1alpha.IChangeHistoryChange[]|null); } - /** Represents a SearchAds360Link. */ - class SearchAds360Link implements ISearchAds360Link { + /** Represents a ChangeHistoryEvent. */ + class ChangeHistoryEvent implements IChangeHistoryEvent { /** - * Constructs a new SearchAds360Link. + * Constructs a new ChangeHistoryEvent. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.ISearchAds360Link); - - /** SearchAds360Link name. */ - public name: string; + constructor(properties?: google.analytics.admin.v1alpha.IChangeHistoryEvent); - /** SearchAds360Link advertiserId. */ - public advertiserId: string; + /** ChangeHistoryEvent id. */ + public id: string; - /** SearchAds360Link campaignDataSharingEnabled. */ - public campaignDataSharingEnabled?: (google.protobuf.IBoolValue|null); + /** ChangeHistoryEvent changeTime. */ + public changeTime?: (google.protobuf.ITimestamp|null); - /** SearchAds360Link costDataSharingEnabled. */ - public costDataSharingEnabled?: (google.protobuf.IBoolValue|null); + /** ChangeHistoryEvent actorType. */ + public actorType: (google.analytics.admin.v1alpha.ActorType|keyof typeof google.analytics.admin.v1alpha.ActorType); - /** SearchAds360Link advertiserDisplayName. */ - public advertiserDisplayName: string; + /** ChangeHistoryEvent userActorEmail. */ + public userActorEmail: string; - /** SearchAds360Link adsPersonalizationEnabled. */ - public adsPersonalizationEnabled?: (google.protobuf.IBoolValue|null); + /** ChangeHistoryEvent changesFiltered. */ + public changesFiltered: boolean; - /** SearchAds360Link siteStatsSharingEnabled. */ - public siteStatsSharingEnabled?: (google.protobuf.IBoolValue|null); + /** ChangeHistoryEvent changes. */ + public changes: google.analytics.admin.v1alpha.IChangeHistoryChange[]; /** - * Creates a new SearchAds360Link instance using the specified properties. + * Creates a new ChangeHistoryEvent instance using the specified properties. * @param [properties] Properties to set - * @returns SearchAds360Link instance + * @returns ChangeHistoryEvent instance */ - public static create(properties?: google.analytics.admin.v1alpha.ISearchAds360Link): google.analytics.admin.v1alpha.SearchAds360Link; + public static create(properties?: google.analytics.admin.v1alpha.IChangeHistoryEvent): google.analytics.admin.v1alpha.ChangeHistoryEvent; /** - * Encodes the specified SearchAds360Link message. Does not implicitly {@link google.analytics.admin.v1alpha.SearchAds360Link.verify|verify} messages. - * @param message SearchAds360Link message or plain object to encode + * Encodes the specified ChangeHistoryEvent message. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryEvent.verify|verify} messages. + * @param message ChangeHistoryEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.ISearchAds360Link, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IChangeHistoryEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SearchAds360Link message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.SearchAds360Link.verify|verify} messages. - * @param message SearchAds360Link message or plain object to encode + * Encodes the specified ChangeHistoryEvent message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryEvent.verify|verify} messages. + * @param message ChangeHistoryEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.ISearchAds360Link, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IChangeHistoryEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SearchAds360Link message from the specified reader or buffer. + * Decodes a ChangeHistoryEvent message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SearchAds360Link + * @returns ChangeHistoryEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.SearchAds360Link; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ChangeHistoryEvent; /** - * Decodes a SearchAds360Link message from the specified reader or buffer, length delimited. + * Decodes a ChangeHistoryEvent message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SearchAds360Link + * @returns ChangeHistoryEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.SearchAds360Link; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ChangeHistoryEvent; /** - * Verifies a SearchAds360Link message. + * Verifies a ChangeHistoryEvent message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SearchAds360Link message from a plain object. Also converts values to their respective internal types. + * Creates a ChangeHistoryEvent message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SearchAds360Link + * @returns ChangeHistoryEvent */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.SearchAds360Link; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ChangeHistoryEvent; /** - * Creates a plain object from a SearchAds360Link message. Also converts values to other types if specified. - * @param message SearchAds360Link + * Creates a plain object from a ChangeHistoryEvent message. Also converts values to other types if specified. + * @param message ChangeHistoryEvent * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.SearchAds360Link, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.ChangeHistoryEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SearchAds360Link to JSON. + * Converts this ChangeHistoryEvent to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SearchAds360Link + * Gets the default type url for ChangeHistoryEvent * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a LinkProposalStatusDetails. */ - interface ILinkProposalStatusDetails { + /** Properties of a ChangeHistoryChange. */ + interface IChangeHistoryChange { - /** LinkProposalStatusDetails linkProposalInitiatingProduct */ - linkProposalInitiatingProduct?: (google.analytics.admin.v1alpha.LinkProposalInitiatingProduct|keyof typeof google.analytics.admin.v1alpha.LinkProposalInitiatingProduct|null); + /** ChangeHistoryChange resource */ + resource?: (string|null); - /** LinkProposalStatusDetails requestorEmail */ - requestorEmail?: (string|null); + /** ChangeHistoryChange action */ + action?: (google.analytics.admin.v1alpha.ActionType|keyof typeof google.analytics.admin.v1alpha.ActionType|null); - /** LinkProposalStatusDetails linkProposalState */ - linkProposalState?: (google.analytics.admin.v1alpha.LinkProposalState|keyof typeof google.analytics.admin.v1alpha.LinkProposalState|null); + /** ChangeHistoryChange resourceBeforeChange */ + resourceBeforeChange?: (google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource|null); + + /** ChangeHistoryChange resourceAfterChange */ + resourceAfterChange?: (google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource|null); } - /** Represents a LinkProposalStatusDetails. */ - class LinkProposalStatusDetails implements ILinkProposalStatusDetails { + /** Represents a ChangeHistoryChange. */ + class ChangeHistoryChange implements IChangeHistoryChange { /** - * Constructs a new LinkProposalStatusDetails. + * Constructs a new ChangeHistoryChange. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.ILinkProposalStatusDetails); + constructor(properties?: google.analytics.admin.v1alpha.IChangeHistoryChange); - /** LinkProposalStatusDetails linkProposalInitiatingProduct. */ - public linkProposalInitiatingProduct: (google.analytics.admin.v1alpha.LinkProposalInitiatingProduct|keyof typeof google.analytics.admin.v1alpha.LinkProposalInitiatingProduct); + /** ChangeHistoryChange resource. */ + public resource: string; + + /** ChangeHistoryChange action. */ + public action: (google.analytics.admin.v1alpha.ActionType|keyof typeof google.analytics.admin.v1alpha.ActionType); - /** LinkProposalStatusDetails requestorEmail. */ - public requestorEmail: string; + /** ChangeHistoryChange resourceBeforeChange. */ + public resourceBeforeChange?: (google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource|null); - /** LinkProposalStatusDetails linkProposalState. */ - public linkProposalState: (google.analytics.admin.v1alpha.LinkProposalState|keyof typeof google.analytics.admin.v1alpha.LinkProposalState); + /** ChangeHistoryChange resourceAfterChange. */ + public resourceAfterChange?: (google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource|null); /** - * Creates a new LinkProposalStatusDetails instance using the specified properties. + * Creates a new ChangeHistoryChange instance using the specified properties. * @param [properties] Properties to set - * @returns LinkProposalStatusDetails instance + * @returns ChangeHistoryChange instance */ - public static create(properties?: google.analytics.admin.v1alpha.ILinkProposalStatusDetails): google.analytics.admin.v1alpha.LinkProposalStatusDetails; + public static create(properties?: google.analytics.admin.v1alpha.IChangeHistoryChange): google.analytics.admin.v1alpha.ChangeHistoryChange; /** - * Encodes the specified LinkProposalStatusDetails message. Does not implicitly {@link google.analytics.admin.v1alpha.LinkProposalStatusDetails.verify|verify} messages. - * @param message LinkProposalStatusDetails message or plain object to encode + * Encodes the specified ChangeHistoryChange message. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryChange.verify|verify} messages. + * @param message ChangeHistoryChange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.ILinkProposalStatusDetails, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IChangeHistoryChange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LinkProposalStatusDetails message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.LinkProposalStatusDetails.verify|verify} messages. - * @param message LinkProposalStatusDetails message or plain object to encode + * Encodes the specified ChangeHistoryChange message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryChange.verify|verify} messages. + * @param message ChangeHistoryChange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.ILinkProposalStatusDetails, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IChangeHistoryChange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LinkProposalStatusDetails message from the specified reader or buffer. + * Decodes a ChangeHistoryChange message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LinkProposalStatusDetails + * @returns ChangeHistoryChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.LinkProposalStatusDetails; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ChangeHistoryChange; /** - * Decodes a LinkProposalStatusDetails message from the specified reader or buffer, length delimited. + * Decodes a ChangeHistoryChange message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LinkProposalStatusDetails + * @returns ChangeHistoryChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.LinkProposalStatusDetails; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ChangeHistoryChange; /** - * Verifies a LinkProposalStatusDetails message. + * Verifies a ChangeHistoryChange message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LinkProposalStatusDetails message from a plain object. Also converts values to their respective internal types. + * Creates a ChangeHistoryChange message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LinkProposalStatusDetails + * @returns ChangeHistoryChange */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.LinkProposalStatusDetails; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ChangeHistoryChange; /** - * Creates a plain object from a LinkProposalStatusDetails message. Also converts values to other types if specified. - * @param message LinkProposalStatusDetails + * Creates a plain object from a ChangeHistoryChange message. Also converts values to other types if specified. + * @param message ChangeHistoryChange * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.LinkProposalStatusDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.ChangeHistoryChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LinkProposalStatusDetails to JSON. + * Converts this ChangeHistoryChange to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for LinkProposalStatusDetails + * Gets the default type url for ChangeHistoryChange * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ConversionEvent. */ - interface IConversionEvent { + namespace ChangeHistoryChange { + + /** Properties of a ChangeHistoryResource. */ + interface IChangeHistoryResource { + + /** ChangeHistoryResource account */ + account?: (google.analytics.admin.v1alpha.IAccount|null); + + /** ChangeHistoryResource property */ + property?: (google.analytics.admin.v1alpha.IProperty|null); + + /** ChangeHistoryResource firebaseLink */ + firebaseLink?: (google.analytics.admin.v1alpha.IFirebaseLink|null); + + /** ChangeHistoryResource googleAdsLink */ + googleAdsLink?: (google.analytics.admin.v1alpha.IGoogleAdsLink|null); + + /** ChangeHistoryResource googleSignalsSettings */ + googleSignalsSettings?: (google.analytics.admin.v1alpha.IGoogleSignalsSettings|null); + + /** ChangeHistoryResource displayVideo_360AdvertiserLink */ + displayVideo_360AdvertiserLink?: (google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink|null); + + /** ChangeHistoryResource displayVideo_360AdvertiserLinkProposal */ + displayVideo_360AdvertiserLinkProposal?: (google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal|null); + + /** ChangeHistoryResource conversionEvent */ + conversionEvent?: (google.analytics.admin.v1alpha.IConversionEvent|null); + + /** ChangeHistoryResource measurementProtocolSecret */ + measurementProtocolSecret?: (google.analytics.admin.v1alpha.IMeasurementProtocolSecret|null); + + /** ChangeHistoryResource customDimension */ + customDimension?: (google.analytics.admin.v1alpha.ICustomDimension|null); + + /** ChangeHistoryResource customMetric */ + customMetric?: (google.analytics.admin.v1alpha.ICustomMetric|null); + + /** ChangeHistoryResource dataRetentionSettings */ + dataRetentionSettings?: (google.analytics.admin.v1alpha.IDataRetentionSettings|null); + + /** ChangeHistoryResource searchAds_360Link */ + searchAds_360Link?: (google.analytics.admin.v1alpha.ISearchAds360Link|null); + + /** ChangeHistoryResource dataStream */ + dataStream?: (google.analytics.admin.v1alpha.IDataStream|null); + + /** ChangeHistoryResource attributionSettings */ + attributionSettings?: (google.analytics.admin.v1alpha.IAttributionSettings|null); + + /** ChangeHistoryResource expandedDataSet */ + expandedDataSet?: (google.analytics.admin.v1alpha.IExpandedDataSet|null); + + /** ChangeHistoryResource bigqueryLink */ + bigqueryLink?: (google.analytics.admin.v1alpha.IBigQueryLink|null); + } + + /** Represents a ChangeHistoryResource. */ + class ChangeHistoryResource implements IChangeHistoryResource { + + /** + * Constructs a new ChangeHistoryResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource); + + /** ChangeHistoryResource account. */ + public account?: (google.analytics.admin.v1alpha.IAccount|null); + + /** ChangeHistoryResource property. */ + public property?: (google.analytics.admin.v1alpha.IProperty|null); + + /** ChangeHistoryResource firebaseLink. */ + public firebaseLink?: (google.analytics.admin.v1alpha.IFirebaseLink|null); + + /** ChangeHistoryResource googleAdsLink. */ + public googleAdsLink?: (google.analytics.admin.v1alpha.IGoogleAdsLink|null); + + /** ChangeHistoryResource googleSignalsSettings. */ + public googleSignalsSettings?: (google.analytics.admin.v1alpha.IGoogleSignalsSettings|null); + + /** ChangeHistoryResource displayVideo_360AdvertiserLink. */ + public displayVideo_360AdvertiserLink?: (google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink|null); + + /** ChangeHistoryResource displayVideo_360AdvertiserLinkProposal. */ + public displayVideo_360AdvertiserLinkProposal?: (google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal|null); + + /** ChangeHistoryResource conversionEvent. */ + public conversionEvent?: (google.analytics.admin.v1alpha.IConversionEvent|null); + + /** ChangeHistoryResource measurementProtocolSecret. */ + public measurementProtocolSecret?: (google.analytics.admin.v1alpha.IMeasurementProtocolSecret|null); + + /** ChangeHistoryResource customDimension. */ + public customDimension?: (google.analytics.admin.v1alpha.ICustomDimension|null); + + /** ChangeHistoryResource customMetric. */ + public customMetric?: (google.analytics.admin.v1alpha.ICustomMetric|null); + + /** ChangeHistoryResource dataRetentionSettings. */ + public dataRetentionSettings?: (google.analytics.admin.v1alpha.IDataRetentionSettings|null); + + /** ChangeHistoryResource searchAds_360Link. */ + public searchAds_360Link?: (google.analytics.admin.v1alpha.ISearchAds360Link|null); + + /** ChangeHistoryResource dataStream. */ + public dataStream?: (google.analytics.admin.v1alpha.IDataStream|null); + + /** ChangeHistoryResource attributionSettings. */ + public attributionSettings?: (google.analytics.admin.v1alpha.IAttributionSettings|null); + + /** ChangeHistoryResource expandedDataSet. */ + public expandedDataSet?: (google.analytics.admin.v1alpha.IExpandedDataSet|null); + + /** ChangeHistoryResource bigqueryLink. */ + public bigqueryLink?: (google.analytics.admin.v1alpha.IBigQueryLink|null); + + /** ChangeHistoryResource resource. */ + public resource?: ("account"|"property"|"firebaseLink"|"googleAdsLink"|"googleSignalsSettings"|"displayVideo_360AdvertiserLink"|"displayVideo_360AdvertiserLinkProposal"|"conversionEvent"|"measurementProtocolSecret"|"customDimension"|"customMetric"|"dataRetentionSettings"|"searchAds_360Link"|"dataStream"|"attributionSettings"|"expandedDataSet"|"bigqueryLink"); + + /** + * Creates a new ChangeHistoryResource instance using the specified properties. + * @param [properties] Properties to set + * @returns ChangeHistoryResource instance + */ + public static create(properties?: google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource): google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource; + + /** + * Encodes the specified ChangeHistoryResource message. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.verify|verify} messages. + * @param message ChangeHistoryResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChangeHistoryResource message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.verify|verify} messages. + * @param message ChangeHistoryResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChangeHistoryResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChangeHistoryResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource; + + /** + * Decodes a ChangeHistoryResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChangeHistoryResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource; + + /** + * Verifies a ChangeHistoryResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChangeHistoryResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChangeHistoryResource + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource; + + /** + * Creates a plain object from a ChangeHistoryResource message. Also converts values to other types if specified. + * @param message ChangeHistoryResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChangeHistoryResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChangeHistoryResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a DisplayVideo360AdvertiserLink. */ + interface IDisplayVideo360AdvertiserLink { - /** ConversionEvent name */ + /** DisplayVideo360AdvertiserLink name */ name?: (string|null); - /** ConversionEvent eventName */ - eventName?: (string|null); + /** DisplayVideo360AdvertiserLink advertiserId */ + advertiserId?: (string|null); - /** ConversionEvent createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** DisplayVideo360AdvertiserLink advertiserDisplayName */ + advertiserDisplayName?: (string|null); - /** ConversionEvent deletable */ - deletable?: (boolean|null); + /** DisplayVideo360AdvertiserLink adsPersonalizationEnabled */ + adsPersonalizationEnabled?: (google.protobuf.IBoolValue|null); - /** ConversionEvent custom */ - custom?: (boolean|null); + /** DisplayVideo360AdvertiserLink campaignDataSharingEnabled */ + campaignDataSharingEnabled?: (google.protobuf.IBoolValue|null); + + /** DisplayVideo360AdvertiserLink costDataSharingEnabled */ + costDataSharingEnabled?: (google.protobuf.IBoolValue|null); } - /** Represents a ConversionEvent. */ - class ConversionEvent implements IConversionEvent { + /** Represents a DisplayVideo360AdvertiserLink. */ + class DisplayVideo360AdvertiserLink implements IDisplayVideo360AdvertiserLink { /** - * Constructs a new ConversionEvent. + * Constructs a new DisplayVideo360AdvertiserLink. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IConversionEvent); + constructor(properties?: google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink); - /** ConversionEvent name. */ + /** DisplayVideo360AdvertiserLink name. */ public name: string; - /** ConversionEvent eventName. */ - public eventName: string; + /** DisplayVideo360AdvertiserLink advertiserId. */ + public advertiserId: string; - /** ConversionEvent createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** DisplayVideo360AdvertiserLink advertiserDisplayName. */ + public advertiserDisplayName: string; - /** ConversionEvent deletable. */ - public deletable: boolean; + /** DisplayVideo360AdvertiserLink adsPersonalizationEnabled. */ + public adsPersonalizationEnabled?: (google.protobuf.IBoolValue|null); - /** ConversionEvent custom. */ - public custom: boolean; + /** DisplayVideo360AdvertiserLink campaignDataSharingEnabled. */ + public campaignDataSharingEnabled?: (google.protobuf.IBoolValue|null); + + /** DisplayVideo360AdvertiserLink costDataSharingEnabled. */ + public costDataSharingEnabled?: (google.protobuf.IBoolValue|null); /** - * Creates a new ConversionEvent instance using the specified properties. + * Creates a new DisplayVideo360AdvertiserLink instance using the specified properties. * @param [properties] Properties to set - * @returns ConversionEvent instance + * @returns DisplayVideo360AdvertiserLink instance */ - public static create(properties?: google.analytics.admin.v1alpha.IConversionEvent): google.analytics.admin.v1alpha.ConversionEvent; + public static create(properties?: google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink): google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink; /** - * Encodes the specified ConversionEvent message. Does not implicitly {@link google.analytics.admin.v1alpha.ConversionEvent.verify|verify} messages. - * @param message ConversionEvent message or plain object to encode + * Encodes the specified DisplayVideo360AdvertiserLink message. Does not implicitly {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.verify|verify} messages. + * @param message DisplayVideo360AdvertiserLink message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IConversionEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ConversionEvent message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ConversionEvent.verify|verify} messages. - * @param message ConversionEvent message or plain object to encode + * Encodes the specified DisplayVideo360AdvertiserLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.verify|verify} messages. + * @param message DisplayVideo360AdvertiserLink message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IConversionEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ConversionEvent message from the specified reader or buffer. + * Decodes a DisplayVideo360AdvertiserLink message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ConversionEvent + * @returns DisplayVideo360AdvertiserLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ConversionEvent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink; /** - * Decodes a ConversionEvent message from the specified reader or buffer, length delimited. + * Decodes a DisplayVideo360AdvertiserLink message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ConversionEvent + * @returns DisplayVideo360AdvertiserLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ConversionEvent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink; /** - * Verifies a ConversionEvent message. + * Verifies a DisplayVideo360AdvertiserLink message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ConversionEvent message from a plain object. Also converts values to their respective internal types. + * Creates a DisplayVideo360AdvertiserLink message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ConversionEvent + * @returns DisplayVideo360AdvertiserLink */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ConversionEvent; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink; /** - * Creates a plain object from a ConversionEvent message. Also converts values to other types if specified. - * @param message ConversionEvent + * Creates a plain object from a DisplayVideo360AdvertiserLink message. Also converts values to other types if specified. + * @param message DisplayVideo360AdvertiserLink * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.ConversionEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ConversionEvent to JSON. + * Converts this DisplayVideo360AdvertiserLink to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ConversionEvent + * Gets the default type url for DisplayVideo360AdvertiserLink * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GoogleSignalsSettings. */ - interface IGoogleSignalsSettings { + /** Properties of a DisplayVideo360AdvertiserLinkProposal. */ + interface IDisplayVideo360AdvertiserLinkProposal { - /** GoogleSignalsSettings name */ + /** DisplayVideo360AdvertiserLinkProposal name */ name?: (string|null); - /** GoogleSignalsSettings state */ - state?: (google.analytics.admin.v1alpha.GoogleSignalsState|keyof typeof google.analytics.admin.v1alpha.GoogleSignalsState|null); + /** DisplayVideo360AdvertiserLinkProposal advertiserId */ + advertiserId?: (string|null); - /** GoogleSignalsSettings consent */ - consent?: (google.analytics.admin.v1alpha.GoogleSignalsConsent|keyof typeof google.analytics.admin.v1alpha.GoogleSignalsConsent|null); + /** DisplayVideo360AdvertiserLinkProposal linkProposalStatusDetails */ + linkProposalStatusDetails?: (google.analytics.admin.v1alpha.ILinkProposalStatusDetails|null); + + /** DisplayVideo360AdvertiserLinkProposal advertiserDisplayName */ + advertiserDisplayName?: (string|null); + + /** DisplayVideo360AdvertiserLinkProposal validationEmail */ + validationEmail?: (string|null); + + /** DisplayVideo360AdvertiserLinkProposal adsPersonalizationEnabled */ + adsPersonalizationEnabled?: (google.protobuf.IBoolValue|null); + + /** DisplayVideo360AdvertiserLinkProposal campaignDataSharingEnabled */ + campaignDataSharingEnabled?: (google.protobuf.IBoolValue|null); + + /** DisplayVideo360AdvertiserLinkProposal costDataSharingEnabled */ + costDataSharingEnabled?: (google.protobuf.IBoolValue|null); } - /** Represents a GoogleSignalsSettings. */ - class GoogleSignalsSettings implements IGoogleSignalsSettings { + /** Represents a DisplayVideo360AdvertiserLinkProposal. */ + class DisplayVideo360AdvertiserLinkProposal implements IDisplayVideo360AdvertiserLinkProposal { /** - * Constructs a new GoogleSignalsSettings. + * Constructs a new DisplayVideo360AdvertiserLinkProposal. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IGoogleSignalsSettings); + constructor(properties?: google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal); - /** GoogleSignalsSettings name. */ + /** DisplayVideo360AdvertiserLinkProposal name. */ public name: string; - /** GoogleSignalsSettings state. */ - public state: (google.analytics.admin.v1alpha.GoogleSignalsState|keyof typeof google.analytics.admin.v1alpha.GoogleSignalsState); + /** DisplayVideo360AdvertiserLinkProposal advertiserId. */ + public advertiserId: string; - /** GoogleSignalsSettings consent. */ - public consent: (google.analytics.admin.v1alpha.GoogleSignalsConsent|keyof typeof google.analytics.admin.v1alpha.GoogleSignalsConsent); + /** DisplayVideo360AdvertiserLinkProposal linkProposalStatusDetails. */ + public linkProposalStatusDetails?: (google.analytics.admin.v1alpha.ILinkProposalStatusDetails|null); + + /** DisplayVideo360AdvertiserLinkProposal advertiserDisplayName. */ + public advertiserDisplayName: string; + + /** DisplayVideo360AdvertiserLinkProposal validationEmail. */ + public validationEmail: string; + + /** DisplayVideo360AdvertiserLinkProposal adsPersonalizationEnabled. */ + public adsPersonalizationEnabled?: (google.protobuf.IBoolValue|null); + + /** DisplayVideo360AdvertiserLinkProposal campaignDataSharingEnabled. */ + public campaignDataSharingEnabled?: (google.protobuf.IBoolValue|null); + + /** DisplayVideo360AdvertiserLinkProposal costDataSharingEnabled. */ + public costDataSharingEnabled?: (google.protobuf.IBoolValue|null); /** - * Creates a new GoogleSignalsSettings instance using the specified properties. + * Creates a new DisplayVideo360AdvertiserLinkProposal instance using the specified properties. * @param [properties] Properties to set - * @returns GoogleSignalsSettings instance + * @returns DisplayVideo360AdvertiserLinkProposal instance */ - public static create(properties?: google.analytics.admin.v1alpha.IGoogleSignalsSettings): google.analytics.admin.v1alpha.GoogleSignalsSettings; + public static create(properties?: google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal): google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal; /** - * Encodes the specified GoogleSignalsSettings message. Does not implicitly {@link google.analytics.admin.v1alpha.GoogleSignalsSettings.verify|verify} messages. - * @param message GoogleSignalsSettings message or plain object to encode + * Encodes the specified DisplayVideo360AdvertiserLinkProposal message. Does not implicitly {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.verify|verify} messages. + * @param message DisplayVideo360AdvertiserLinkProposal message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IGoogleSignalsSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GoogleSignalsSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GoogleSignalsSettings.verify|verify} messages. - * @param message GoogleSignalsSettings message or plain object to encode + * Encodes the specified DisplayVideo360AdvertiserLinkProposal message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.verify|verify} messages. + * @param message DisplayVideo360AdvertiserLinkProposal message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IGoogleSignalsSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GoogleSignalsSettings message from the specified reader or buffer. + * Decodes a DisplayVideo360AdvertiserLinkProposal message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GoogleSignalsSettings + * @returns DisplayVideo360AdvertiserLinkProposal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GoogleSignalsSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal; /** - * Decodes a GoogleSignalsSettings message from the specified reader or buffer, length delimited. + * Decodes a DisplayVideo360AdvertiserLinkProposal message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GoogleSignalsSettings + * @returns DisplayVideo360AdvertiserLinkProposal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GoogleSignalsSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal; /** - * Verifies a GoogleSignalsSettings message. + * Verifies a DisplayVideo360AdvertiserLinkProposal message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GoogleSignalsSettings message from a plain object. Also converts values to their respective internal types. + * Creates a DisplayVideo360AdvertiserLinkProposal message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GoogleSignalsSettings + * @returns DisplayVideo360AdvertiserLinkProposal */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GoogleSignalsSettings; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal; /** - * Creates a plain object from a GoogleSignalsSettings message. Also converts values to other types if specified. - * @param message GoogleSignalsSettings + * Creates a plain object from a DisplayVideo360AdvertiserLinkProposal message. Also converts values to other types if specified. + * @param message DisplayVideo360AdvertiserLinkProposal * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.GoogleSignalsSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GoogleSignalsSettings to JSON. + * Converts this DisplayVideo360AdvertiserLinkProposal to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GoogleSignalsSettings + * Gets the default type url for DisplayVideo360AdvertiserLinkProposal * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CustomDimension. */ - interface ICustomDimension { + /** Properties of a SearchAds360Link. */ + interface ISearchAds360Link { - /** CustomDimension name */ + /** SearchAds360Link name */ name?: (string|null); - /** CustomDimension parameterName */ - parameterName?: (string|null); + /** SearchAds360Link advertiserId */ + advertiserId?: (string|null); - /** CustomDimension displayName */ - displayName?: (string|null); + /** SearchAds360Link campaignDataSharingEnabled */ + campaignDataSharingEnabled?: (google.protobuf.IBoolValue|null); - /** CustomDimension description */ - description?: (string|null); + /** SearchAds360Link costDataSharingEnabled */ + costDataSharingEnabled?: (google.protobuf.IBoolValue|null); - /** CustomDimension scope */ - scope?: (google.analytics.admin.v1alpha.CustomDimension.DimensionScope|keyof typeof google.analytics.admin.v1alpha.CustomDimension.DimensionScope|null); + /** SearchAds360Link advertiserDisplayName */ + advertiserDisplayName?: (string|null); - /** CustomDimension disallowAdsPersonalization */ - disallowAdsPersonalization?: (boolean|null); + /** SearchAds360Link adsPersonalizationEnabled */ + adsPersonalizationEnabled?: (google.protobuf.IBoolValue|null); + + /** SearchAds360Link siteStatsSharingEnabled */ + siteStatsSharingEnabled?: (google.protobuf.IBoolValue|null); } - /** Represents a CustomDimension. */ - class CustomDimension implements ICustomDimension { + /** Represents a SearchAds360Link. */ + class SearchAds360Link implements ISearchAds360Link { /** - * Constructs a new CustomDimension. + * Constructs a new SearchAds360Link. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.ICustomDimension); + constructor(properties?: google.analytics.admin.v1alpha.ISearchAds360Link); - /** CustomDimension name. */ + /** SearchAds360Link name. */ public name: string; - /** CustomDimension parameterName. */ - public parameterName: string; + /** SearchAds360Link advertiserId. */ + public advertiserId: string; - /** CustomDimension displayName. */ - public displayName: string; + /** SearchAds360Link campaignDataSharingEnabled. */ + public campaignDataSharingEnabled?: (google.protobuf.IBoolValue|null); - /** CustomDimension description. */ - public description: string; + /** SearchAds360Link costDataSharingEnabled. */ + public costDataSharingEnabled?: (google.protobuf.IBoolValue|null); - /** CustomDimension scope. */ - public scope: (google.analytics.admin.v1alpha.CustomDimension.DimensionScope|keyof typeof google.analytics.admin.v1alpha.CustomDimension.DimensionScope); + /** SearchAds360Link advertiserDisplayName. */ + public advertiserDisplayName: string; - /** CustomDimension disallowAdsPersonalization. */ - public disallowAdsPersonalization: boolean; + /** SearchAds360Link adsPersonalizationEnabled. */ + public adsPersonalizationEnabled?: (google.protobuf.IBoolValue|null); + + /** SearchAds360Link siteStatsSharingEnabled. */ + public siteStatsSharingEnabled?: (google.protobuf.IBoolValue|null); /** - * Creates a new CustomDimension instance using the specified properties. + * Creates a new SearchAds360Link instance using the specified properties. * @param [properties] Properties to set - * @returns CustomDimension instance + * @returns SearchAds360Link instance */ - public static create(properties?: google.analytics.admin.v1alpha.ICustomDimension): google.analytics.admin.v1alpha.CustomDimension; + public static create(properties?: google.analytics.admin.v1alpha.ISearchAds360Link): google.analytics.admin.v1alpha.SearchAds360Link; /** - * Encodes the specified CustomDimension message. Does not implicitly {@link google.analytics.admin.v1alpha.CustomDimension.verify|verify} messages. - * @param message CustomDimension message or plain object to encode + * Encodes the specified SearchAds360Link message. Does not implicitly {@link google.analytics.admin.v1alpha.SearchAds360Link.verify|verify} messages. + * @param message SearchAds360Link message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.ICustomDimension, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.ISearchAds360Link, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CustomDimension message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CustomDimension.verify|verify} messages. - * @param message CustomDimension message or plain object to encode + * Encodes the specified SearchAds360Link message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.SearchAds360Link.verify|verify} messages. + * @param message SearchAds360Link message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.ICustomDimension, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.ISearchAds360Link, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomDimension message from the specified reader or buffer. + * Decodes a SearchAds360Link message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomDimension + * @returns SearchAds360Link * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.CustomDimension; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.SearchAds360Link; /** - * Decodes a CustomDimension message from the specified reader or buffer, length delimited. + * Decodes a SearchAds360Link message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomDimension + * @returns SearchAds360Link * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.CustomDimension; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.SearchAds360Link; /** - * Verifies a CustomDimension message. + * Verifies a SearchAds360Link message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CustomDimension message from a plain object. Also converts values to their respective internal types. + * Creates a SearchAds360Link message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomDimension + * @returns SearchAds360Link */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.CustomDimension; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.SearchAds360Link; /** - * Creates a plain object from a CustomDimension message. Also converts values to other types if specified. - * @param message CustomDimension + * Creates a plain object from a SearchAds360Link message. Also converts values to other types if specified. + * @param message SearchAds360Link * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.CustomDimension, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.SearchAds360Link, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomDimension to JSON. + * Converts this SearchAds360Link to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CustomDimension + * Gets the default type url for SearchAds360Link * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace CustomDimension { - - /** DimensionScope enum. */ - enum DimensionScope { - DIMENSION_SCOPE_UNSPECIFIED = 0, - EVENT = 1, - USER = 2 - } - } - - /** Properties of a CustomMetric. */ - interface ICustomMetric { - - /** CustomMetric name */ - name?: (string|null); - - /** CustomMetric parameterName */ - parameterName?: (string|null); - - /** CustomMetric displayName */ - displayName?: (string|null); - - /** CustomMetric description */ - description?: (string|null); + /** Properties of a LinkProposalStatusDetails. */ + interface ILinkProposalStatusDetails { - /** CustomMetric measurementUnit */ - measurementUnit?: (google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit|keyof typeof google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit|null); + /** LinkProposalStatusDetails linkProposalInitiatingProduct */ + linkProposalInitiatingProduct?: (google.analytics.admin.v1alpha.LinkProposalInitiatingProduct|keyof typeof google.analytics.admin.v1alpha.LinkProposalInitiatingProduct|null); - /** CustomMetric scope */ - scope?: (google.analytics.admin.v1alpha.CustomMetric.MetricScope|keyof typeof google.analytics.admin.v1alpha.CustomMetric.MetricScope|null); + /** LinkProposalStatusDetails requestorEmail */ + requestorEmail?: (string|null); - /** CustomMetric restrictedMetricType */ - restrictedMetricType?: (google.analytics.admin.v1alpha.CustomMetric.RestrictedMetricType[]|null); + /** LinkProposalStatusDetails linkProposalState */ + linkProposalState?: (google.analytics.admin.v1alpha.LinkProposalState|keyof typeof google.analytics.admin.v1alpha.LinkProposalState|null); } - /** Represents a CustomMetric. */ - class CustomMetric implements ICustomMetric { + /** Represents a LinkProposalStatusDetails. */ + class LinkProposalStatusDetails implements ILinkProposalStatusDetails { /** - * Constructs a new CustomMetric. + * Constructs a new LinkProposalStatusDetails. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.ICustomMetric); - - /** CustomMetric name. */ - public name: string; - - /** CustomMetric parameterName. */ - public parameterName: string; - - /** CustomMetric displayName. */ - public displayName: string; - - /** CustomMetric description. */ - public description: string; + constructor(properties?: google.analytics.admin.v1alpha.ILinkProposalStatusDetails); - /** CustomMetric measurementUnit. */ - public measurementUnit: (google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit|keyof typeof google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit); + /** LinkProposalStatusDetails linkProposalInitiatingProduct. */ + public linkProposalInitiatingProduct: (google.analytics.admin.v1alpha.LinkProposalInitiatingProduct|keyof typeof google.analytics.admin.v1alpha.LinkProposalInitiatingProduct); - /** CustomMetric scope. */ - public scope: (google.analytics.admin.v1alpha.CustomMetric.MetricScope|keyof typeof google.analytics.admin.v1alpha.CustomMetric.MetricScope); + /** LinkProposalStatusDetails requestorEmail. */ + public requestorEmail: string; - /** CustomMetric restrictedMetricType. */ - public restrictedMetricType: google.analytics.admin.v1alpha.CustomMetric.RestrictedMetricType[]; + /** LinkProposalStatusDetails linkProposalState. */ + public linkProposalState: (google.analytics.admin.v1alpha.LinkProposalState|keyof typeof google.analytics.admin.v1alpha.LinkProposalState); /** - * Creates a new CustomMetric instance using the specified properties. + * Creates a new LinkProposalStatusDetails instance using the specified properties. * @param [properties] Properties to set - * @returns CustomMetric instance + * @returns LinkProposalStatusDetails instance */ - public static create(properties?: google.analytics.admin.v1alpha.ICustomMetric): google.analytics.admin.v1alpha.CustomMetric; + public static create(properties?: google.analytics.admin.v1alpha.ILinkProposalStatusDetails): google.analytics.admin.v1alpha.LinkProposalStatusDetails; /** - * Encodes the specified CustomMetric message. Does not implicitly {@link google.analytics.admin.v1alpha.CustomMetric.verify|verify} messages. - * @param message CustomMetric message or plain object to encode + * Encodes the specified LinkProposalStatusDetails message. Does not implicitly {@link google.analytics.admin.v1alpha.LinkProposalStatusDetails.verify|verify} messages. + * @param message LinkProposalStatusDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.ICustomMetric, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.ILinkProposalStatusDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CustomMetric message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CustomMetric.verify|verify} messages. - * @param message CustomMetric message or plain object to encode + * Encodes the specified LinkProposalStatusDetails message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.LinkProposalStatusDetails.verify|verify} messages. + * @param message LinkProposalStatusDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.ICustomMetric, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.ILinkProposalStatusDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomMetric message from the specified reader or buffer. + * Decodes a LinkProposalStatusDetails message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomMetric + * @returns LinkProposalStatusDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.CustomMetric; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.LinkProposalStatusDetails; /** - * Decodes a CustomMetric message from the specified reader or buffer, length delimited. + * Decodes a LinkProposalStatusDetails message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomMetric + * @returns LinkProposalStatusDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.CustomMetric; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.LinkProposalStatusDetails; /** - * Verifies a CustomMetric message. + * Verifies a LinkProposalStatusDetails message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CustomMetric message from a plain object. Also converts values to their respective internal types. + * Creates a LinkProposalStatusDetails message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomMetric + * @returns LinkProposalStatusDetails */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.CustomMetric; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.LinkProposalStatusDetails; /** - * Creates a plain object from a CustomMetric message. Also converts values to other types if specified. - * @param message CustomMetric + * Creates a plain object from a LinkProposalStatusDetails message. Also converts values to other types if specified. + * @param message LinkProposalStatusDetails * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.CustomMetric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.LinkProposalStatusDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomMetric to JSON. + * Converts this LinkProposalStatusDetails to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CustomMetric + * Gets the default type url for LinkProposalStatusDetails * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace CustomMetric { - - /** MeasurementUnit enum. */ - enum MeasurementUnit { - MEASUREMENT_UNIT_UNSPECIFIED = 0, - STANDARD = 1, - CURRENCY = 2, - FEET = 3, - METERS = 4, - KILOMETERS = 5, - MILES = 6, - MILLISECONDS = 7, - SECONDS = 8, - MINUTES = 9, - HOURS = 10 - } - - /** MetricScope enum. */ - enum MetricScope { - METRIC_SCOPE_UNSPECIFIED = 0, - EVENT = 1 - } + /** Properties of a ConversionEvent. */ + interface IConversionEvent { - /** RestrictedMetricType enum. */ - enum RestrictedMetricType { - RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0, - COST_DATA = 1, - REVENUE_DATA = 2 - } - } + /** ConversionEvent name */ + name?: (string|null); - /** Properties of a DataRetentionSettings. */ - interface IDataRetentionSettings { + /** ConversionEvent eventName */ + eventName?: (string|null); - /** DataRetentionSettings name */ - name?: (string|null); + /** ConversionEvent createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** DataRetentionSettings eventDataRetention */ - eventDataRetention?: (google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration|keyof typeof google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration|null); + /** ConversionEvent deletable */ + deletable?: (boolean|null); - /** DataRetentionSettings resetUserDataOnNewActivity */ - resetUserDataOnNewActivity?: (boolean|null); + /** ConversionEvent custom */ + custom?: (boolean|null); } - /** Represents a DataRetentionSettings. */ - class DataRetentionSettings implements IDataRetentionSettings { + /** Represents a ConversionEvent. */ + class ConversionEvent implements IConversionEvent { /** - * Constructs a new DataRetentionSettings. + * Constructs a new ConversionEvent. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IDataRetentionSettings); + constructor(properties?: google.analytics.admin.v1alpha.IConversionEvent); - /** DataRetentionSettings name. */ + /** ConversionEvent name. */ public name: string; - /** DataRetentionSettings eventDataRetention. */ - public eventDataRetention: (google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration|keyof typeof google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration); + /** ConversionEvent eventName. */ + public eventName: string; - /** DataRetentionSettings resetUserDataOnNewActivity. */ - public resetUserDataOnNewActivity: boolean; + /** ConversionEvent createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ConversionEvent deletable. */ + public deletable: boolean; + + /** ConversionEvent custom. */ + public custom: boolean; /** - * Creates a new DataRetentionSettings instance using the specified properties. + * Creates a new ConversionEvent instance using the specified properties. * @param [properties] Properties to set - * @returns DataRetentionSettings instance + * @returns ConversionEvent instance */ - public static create(properties?: google.analytics.admin.v1alpha.IDataRetentionSettings): google.analytics.admin.v1alpha.DataRetentionSettings; + public static create(properties?: google.analytics.admin.v1alpha.IConversionEvent): google.analytics.admin.v1alpha.ConversionEvent; /** - * Encodes the specified DataRetentionSettings message. Does not implicitly {@link google.analytics.admin.v1alpha.DataRetentionSettings.verify|verify} messages. - * @param message DataRetentionSettings message or plain object to encode + * Encodes the specified ConversionEvent message. Does not implicitly {@link google.analytics.admin.v1alpha.ConversionEvent.verify|verify} messages. + * @param message ConversionEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IDataRetentionSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IConversionEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DataRetentionSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataRetentionSettings.verify|verify} messages. - * @param message DataRetentionSettings message or plain object to encode + * Encodes the specified ConversionEvent message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ConversionEvent.verify|verify} messages. + * @param message ConversionEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IDataRetentionSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IConversionEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DataRetentionSettings message from the specified reader or buffer. + * Decodes a ConversionEvent message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DataRetentionSettings + * @returns ConversionEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DataRetentionSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ConversionEvent; /** - * Decodes a DataRetentionSettings message from the specified reader or buffer, length delimited. + * Decodes a ConversionEvent message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DataRetentionSettings + * @returns ConversionEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DataRetentionSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ConversionEvent; /** - * Verifies a DataRetentionSettings message. + * Verifies a ConversionEvent message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DataRetentionSettings message from a plain object. Also converts values to their respective internal types. + * Creates a ConversionEvent message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DataRetentionSettings + * @returns ConversionEvent */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DataRetentionSettings; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ConversionEvent; /** - * Creates a plain object from a DataRetentionSettings message. Also converts values to other types if specified. - * @param message DataRetentionSettings + * Creates a plain object from a ConversionEvent message. Also converts values to other types if specified. + * @param message ConversionEvent * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.DataRetentionSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.ConversionEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DataRetentionSettings to JSON. + * Converts this ConversionEvent to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DataRetentionSettings + * Gets the default type url for ConversionEvent * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace DataRetentionSettings { - - /** RetentionDuration enum. */ - enum RetentionDuration { - RETENTION_DURATION_UNSPECIFIED = 0, - TWO_MONTHS = 1, - FOURTEEN_MONTHS = 3, - TWENTY_SIX_MONTHS = 4, - THIRTY_EIGHT_MONTHS = 5, - FIFTY_MONTHS = 6 - } - } - - /** Properties of an AttributionSettings. */ - interface IAttributionSettings { + /** Properties of a GoogleSignalsSettings. */ + interface IGoogleSignalsSettings { - /** AttributionSettings name */ + /** GoogleSignalsSettings name */ name?: (string|null); - /** AttributionSettings acquisitionConversionEventLookbackWindow */ - acquisitionConversionEventLookbackWindow?: (google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow|keyof typeof google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow|null); - - /** AttributionSettings otherConversionEventLookbackWindow */ - otherConversionEventLookbackWindow?: (google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow|keyof typeof google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow|null); + /** GoogleSignalsSettings state */ + state?: (google.analytics.admin.v1alpha.GoogleSignalsState|keyof typeof google.analytics.admin.v1alpha.GoogleSignalsState|null); - /** AttributionSettings reportingAttributionModel */ - reportingAttributionModel?: (google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel|keyof typeof google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel|null); + /** GoogleSignalsSettings consent */ + consent?: (google.analytics.admin.v1alpha.GoogleSignalsConsent|keyof typeof google.analytics.admin.v1alpha.GoogleSignalsConsent|null); } - /** Represents an AttributionSettings. */ - class AttributionSettings implements IAttributionSettings { + /** Represents a GoogleSignalsSettings. */ + class GoogleSignalsSettings implements IGoogleSignalsSettings { /** - * Constructs a new AttributionSettings. + * Constructs a new GoogleSignalsSettings. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IAttributionSettings); + constructor(properties?: google.analytics.admin.v1alpha.IGoogleSignalsSettings); - /** AttributionSettings name. */ + /** GoogleSignalsSettings name. */ public name: string; - /** AttributionSettings acquisitionConversionEventLookbackWindow. */ - public acquisitionConversionEventLookbackWindow: (google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow|keyof typeof google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow); - - /** AttributionSettings otherConversionEventLookbackWindow. */ - public otherConversionEventLookbackWindow: (google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow|keyof typeof google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow); + /** GoogleSignalsSettings state. */ + public state: (google.analytics.admin.v1alpha.GoogleSignalsState|keyof typeof google.analytics.admin.v1alpha.GoogleSignalsState); - /** AttributionSettings reportingAttributionModel. */ - public reportingAttributionModel: (google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel|keyof typeof google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel); + /** GoogleSignalsSettings consent. */ + public consent: (google.analytics.admin.v1alpha.GoogleSignalsConsent|keyof typeof google.analytics.admin.v1alpha.GoogleSignalsConsent); /** - * Creates a new AttributionSettings instance using the specified properties. + * Creates a new GoogleSignalsSettings instance using the specified properties. * @param [properties] Properties to set - * @returns AttributionSettings instance + * @returns GoogleSignalsSettings instance */ - public static create(properties?: google.analytics.admin.v1alpha.IAttributionSettings): google.analytics.admin.v1alpha.AttributionSettings; + public static create(properties?: google.analytics.admin.v1alpha.IGoogleSignalsSettings): google.analytics.admin.v1alpha.GoogleSignalsSettings; /** - * Encodes the specified AttributionSettings message. Does not implicitly {@link google.analytics.admin.v1alpha.AttributionSettings.verify|verify} messages. - * @param message AttributionSettings message or plain object to encode + * Encodes the specified GoogleSignalsSettings message. Does not implicitly {@link google.analytics.admin.v1alpha.GoogleSignalsSettings.verify|verify} messages. + * @param message GoogleSignalsSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IAttributionSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IGoogleSignalsSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AttributionSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AttributionSettings.verify|verify} messages. - * @param message AttributionSettings message or plain object to encode + * Encodes the specified GoogleSignalsSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GoogleSignalsSettings.verify|verify} messages. + * @param message GoogleSignalsSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IAttributionSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGoogleSignalsSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AttributionSettings message from the specified reader or buffer. + * Decodes a GoogleSignalsSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AttributionSettings + * @returns GoogleSignalsSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AttributionSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GoogleSignalsSettings; /** - * Decodes an AttributionSettings message from the specified reader or buffer, length delimited. + * Decodes a GoogleSignalsSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AttributionSettings + * @returns GoogleSignalsSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AttributionSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GoogleSignalsSettings; /** - * Verifies an AttributionSettings message. + * Verifies a GoogleSignalsSettings message. * @param message Plain 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 AttributionSettings message from a plain object. Also converts values to their respective internal types. + * Creates a GoogleSignalsSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AttributionSettings + * @returns GoogleSignalsSettings */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AttributionSettings; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GoogleSignalsSettings; /** - * Creates a plain object from an AttributionSettings message. Also converts values to other types if specified. - * @param message AttributionSettings + * Creates a plain object from a GoogleSignalsSettings message. Also converts values to other types if specified. + * @param message GoogleSignalsSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.AttributionSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.GoogleSignalsSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AttributionSettings to JSON. + * Converts this GoogleSignalsSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AttributionSettings + * Gets the default type url for GoogleSignalsSettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace AttributionSettings { - - /** AcquisitionConversionEventLookbackWindow enum. */ - enum AcquisitionConversionEventLookbackWindow { - ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED = 0, - ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_7_DAYS = 1, - ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS = 2 - } - - /** OtherConversionEventLookbackWindow enum. */ - enum OtherConversionEventLookbackWindow { - OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED = 0, - OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS = 1, - OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_60_DAYS = 2, - OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_90_DAYS = 3 - } - - /** ReportingAttributionModel enum. */ - enum ReportingAttributionModel { - REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED = 0, - CROSS_CHANNEL_DATA_DRIVEN = 1, - CROSS_CHANNEL_LAST_CLICK = 2, - CROSS_CHANNEL_FIRST_CLICK = 3, - CROSS_CHANNEL_LINEAR = 4, - CROSS_CHANNEL_POSITION_BASED = 5, - CROSS_CHANNEL_TIME_DECAY = 6, - ADS_PREFERRED_LAST_CLICK = 7 - } - } - - /** Properties of a BigQueryLink. */ - interface IBigQueryLink { + /** Properties of a CustomDimension. */ + interface ICustomDimension { - /** BigQueryLink name */ + /** CustomDimension name */ name?: (string|null); - /** BigQueryLink project */ - project?: (string|null); - - /** BigQueryLink createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** BigQueryLink dailyExportEnabled */ - dailyExportEnabled?: (boolean|null); + /** CustomDimension parameterName */ + parameterName?: (string|null); - /** BigQueryLink streamingExportEnabled */ - streamingExportEnabled?: (boolean|null); + /** CustomDimension displayName */ + displayName?: (string|null); - /** BigQueryLink includeAdvertisingId */ - includeAdvertisingId?: (boolean|null); + /** CustomDimension description */ + description?: (string|null); - /** BigQueryLink exportStreams */ - exportStreams?: (string[]|null); + /** CustomDimension scope */ + scope?: (google.analytics.admin.v1alpha.CustomDimension.DimensionScope|keyof typeof google.analytics.admin.v1alpha.CustomDimension.DimensionScope|null); - /** BigQueryLink excludedEvents */ - excludedEvents?: (string[]|null); + /** CustomDimension disallowAdsPersonalization */ + disallowAdsPersonalization?: (boolean|null); } - /** Represents a BigQueryLink. */ - class BigQueryLink implements IBigQueryLink { + /** Represents a CustomDimension. */ + class CustomDimension implements ICustomDimension { /** - * Constructs a new BigQueryLink. + * Constructs a new CustomDimension. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IBigQueryLink); + constructor(properties?: google.analytics.admin.v1alpha.ICustomDimension); - /** BigQueryLink name. */ + /** CustomDimension name. */ public name: string; - /** BigQueryLink project. */ - public project: string; - - /** BigQueryLink createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** BigQueryLink dailyExportEnabled. */ - public dailyExportEnabled: boolean; + /** CustomDimension parameterName. */ + public parameterName: string; - /** BigQueryLink streamingExportEnabled. */ - public streamingExportEnabled: boolean; + /** CustomDimension displayName. */ + public displayName: string; - /** BigQueryLink includeAdvertisingId. */ - public includeAdvertisingId: boolean; + /** CustomDimension description. */ + public description: string; - /** BigQueryLink exportStreams. */ - public exportStreams: string[]; + /** CustomDimension scope. */ + public scope: (google.analytics.admin.v1alpha.CustomDimension.DimensionScope|keyof typeof google.analytics.admin.v1alpha.CustomDimension.DimensionScope); - /** BigQueryLink excludedEvents. */ - public excludedEvents: string[]; + /** CustomDimension disallowAdsPersonalization. */ + public disallowAdsPersonalization: boolean; /** - * Creates a new BigQueryLink instance using the specified properties. + * Creates a new CustomDimension instance using the specified properties. * @param [properties] Properties to set - * @returns BigQueryLink instance + * @returns CustomDimension instance */ - public static create(properties?: google.analytics.admin.v1alpha.IBigQueryLink): google.analytics.admin.v1alpha.BigQueryLink; + public static create(properties?: google.analytics.admin.v1alpha.ICustomDimension): google.analytics.admin.v1alpha.CustomDimension; /** - * Encodes the specified BigQueryLink message. Does not implicitly {@link google.analytics.admin.v1alpha.BigQueryLink.verify|verify} messages. - * @param message BigQueryLink message or plain object to encode + * Encodes the specified CustomDimension message. Does not implicitly {@link google.analytics.admin.v1alpha.CustomDimension.verify|verify} messages. + * @param message CustomDimension message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IBigQueryLink, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.ICustomDimension, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BigQueryLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BigQueryLink.verify|verify} messages. - * @param message BigQueryLink message or plain object to encode + * Encodes the specified CustomDimension message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CustomDimension.verify|verify} messages. + * @param message CustomDimension message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IBigQueryLink, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.ICustomDimension, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BigQueryLink message from the specified reader or buffer. + * Decodes a CustomDimension message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BigQueryLink + * @returns CustomDimension * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.BigQueryLink; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.CustomDimension; /** - * Decodes a BigQueryLink message from the specified reader or buffer, length delimited. + * Decodes a CustomDimension message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BigQueryLink + * @returns CustomDimension * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.BigQueryLink; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.CustomDimension; /** - * Verifies a BigQueryLink message. + * Verifies a CustomDimension message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BigQueryLink message from a plain object. Also converts values to their respective internal types. + * Creates a CustomDimension message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BigQueryLink + * @returns CustomDimension */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.BigQueryLink; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.CustomDimension; /** - * Creates a plain object from a BigQueryLink message. Also converts values to other types if specified. - * @param message BigQueryLink + * Creates a plain object from a CustomDimension message. Also converts values to other types if specified. + * @param message CustomDimension * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.BigQueryLink, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.CustomDimension, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BigQueryLink to JSON. + * Converts this CustomDimension to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for BigQueryLink + * Gets the default type url for CustomDimension * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ExpandedDataSetFilter. */ - interface IExpandedDataSetFilter { + namespace CustomDimension { - /** ExpandedDataSetFilter stringFilter */ - stringFilter?: (google.analytics.admin.v1alpha.ExpandedDataSetFilter.IStringFilter|null); + /** DimensionScope enum. */ + enum DimensionScope { + DIMENSION_SCOPE_UNSPECIFIED = 0, + EVENT = 1, + USER = 2 + } + } - /** ExpandedDataSetFilter inListFilter */ - inListFilter?: (google.analytics.admin.v1alpha.ExpandedDataSetFilter.IInListFilter|null); + /** Properties of a CustomMetric. */ + interface ICustomMetric { - /** ExpandedDataSetFilter fieldName */ - fieldName?: (string|null); + /** CustomMetric name */ + name?: (string|null); + + /** CustomMetric parameterName */ + parameterName?: (string|null); + + /** CustomMetric displayName */ + displayName?: (string|null); + + /** CustomMetric description */ + description?: (string|null); + + /** CustomMetric measurementUnit */ + measurementUnit?: (google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit|keyof typeof google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit|null); + + /** CustomMetric scope */ + scope?: (google.analytics.admin.v1alpha.CustomMetric.MetricScope|keyof typeof google.analytics.admin.v1alpha.CustomMetric.MetricScope|null); + + /** CustomMetric restrictedMetricType */ + restrictedMetricType?: (google.analytics.admin.v1alpha.CustomMetric.RestrictedMetricType[]|null); } - /** Represents an ExpandedDataSetFilter. */ - class ExpandedDataSetFilter implements IExpandedDataSetFilter { + /** Represents a CustomMetric. */ + class CustomMetric implements ICustomMetric { /** - * Constructs a new ExpandedDataSetFilter. + * Constructs a new CustomMetric. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IExpandedDataSetFilter); + constructor(properties?: google.analytics.admin.v1alpha.ICustomMetric); - /** ExpandedDataSetFilter stringFilter. */ - public stringFilter?: (google.analytics.admin.v1alpha.ExpandedDataSetFilter.IStringFilter|null); + /** CustomMetric name. */ + public name: string; - /** ExpandedDataSetFilter inListFilter. */ - public inListFilter?: (google.analytics.admin.v1alpha.ExpandedDataSetFilter.IInListFilter|null); + /** CustomMetric parameterName. */ + public parameterName: string; - /** ExpandedDataSetFilter fieldName. */ - public fieldName: string; + /** CustomMetric displayName. */ + public displayName: string; - /** ExpandedDataSetFilter oneFilter. */ - public oneFilter?: ("stringFilter"|"inListFilter"); + /** CustomMetric description. */ + public description: string; + + /** CustomMetric measurementUnit. */ + public measurementUnit: (google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit|keyof typeof google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit); + + /** CustomMetric scope. */ + public scope: (google.analytics.admin.v1alpha.CustomMetric.MetricScope|keyof typeof google.analytics.admin.v1alpha.CustomMetric.MetricScope); + + /** CustomMetric restrictedMetricType. */ + public restrictedMetricType: google.analytics.admin.v1alpha.CustomMetric.RestrictedMetricType[]; /** - * Creates a new ExpandedDataSetFilter instance using the specified properties. + * Creates a new CustomMetric instance using the specified properties. * @param [properties] Properties to set - * @returns ExpandedDataSetFilter instance + * @returns CustomMetric instance */ - public static create(properties?: google.analytics.admin.v1alpha.IExpandedDataSetFilter): google.analytics.admin.v1alpha.ExpandedDataSetFilter; + public static create(properties?: google.analytics.admin.v1alpha.ICustomMetric): google.analytics.admin.v1alpha.CustomMetric; /** - * Encodes the specified ExpandedDataSetFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilter.verify|verify} messages. - * @param message ExpandedDataSetFilter message or plain object to encode + * Encodes the specified CustomMetric message. Does not implicitly {@link google.analytics.admin.v1alpha.CustomMetric.verify|verify} messages. + * @param message CustomMetric message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IExpandedDataSetFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.ICustomMetric, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExpandedDataSetFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilter.verify|verify} messages. - * @param message ExpandedDataSetFilter message or plain object to encode + * Encodes the specified CustomMetric message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CustomMetric.verify|verify} messages. + * @param message CustomMetric message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IExpandedDataSetFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.ICustomMetric, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExpandedDataSetFilter message from the specified reader or buffer. + * Decodes a CustomMetric message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExpandedDataSetFilter + * @returns CustomMetric * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ExpandedDataSetFilter; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.CustomMetric; /** - * Decodes an ExpandedDataSetFilter message from the specified reader or buffer, length delimited. + * Decodes a CustomMetric message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExpandedDataSetFilter + * @returns CustomMetric * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ExpandedDataSetFilter; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.CustomMetric; /** - * Verifies an ExpandedDataSetFilter message. + * Verifies a CustomMetric message. * @param message Plain 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 ExpandedDataSetFilter message from a plain object. Also converts values to their respective internal types. + * Creates a CustomMetric message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExpandedDataSetFilter + * @returns CustomMetric */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ExpandedDataSetFilter; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.CustomMetric; /** - * Creates a plain object from an ExpandedDataSetFilter message. Also converts values to other types if specified. - * @param message ExpandedDataSetFilter + * Creates a plain object from a CustomMetric message. Also converts values to other types if specified. + * @param message CustomMetric * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.ExpandedDataSetFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.CustomMetric, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExpandedDataSetFilter to JSON. + * Converts this CustomMetric to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExpandedDataSetFilter + * Gets the default type url for CustomMetric * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ExpandedDataSetFilter { - - /** Properties of a StringFilter. */ - interface IStringFilter { - - /** StringFilter matchType */ - matchType?: (google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.MatchType|keyof typeof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.MatchType|null); - - /** StringFilter value */ - value?: (string|null); - - /** StringFilter caseSensitive */ - caseSensitive?: (boolean|null); - } - - /** Represents a StringFilter. */ - class StringFilter implements IStringFilter { - - /** - * Constructs a new StringFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.admin.v1alpha.ExpandedDataSetFilter.IStringFilter); - - /** StringFilter matchType. */ - public matchType: (google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.MatchType|keyof typeof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.MatchType); - - /** StringFilter value. */ - public value: string; - - /** StringFilter caseSensitive. */ - public caseSensitive: boolean; - - /** - * Creates a new StringFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns StringFilter instance - */ - public static create(properties?: google.analytics.admin.v1alpha.ExpandedDataSetFilter.IStringFilter): google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter; - - /** - * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.verify|verify} messages. - * @param message StringFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.admin.v1alpha.ExpandedDataSetFilter.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.verify|verify} messages. - * @param message StringFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.ExpandedDataSetFilter.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StringFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StringFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter; - - /** - * Decodes a StringFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StringFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter; - - /** - * Verifies a StringFilter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StringFilter - */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter; - - /** - * Creates a plain object from a StringFilter message. Also converts values to other types if specified. - * @param message StringFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + } - /** - * Converts this StringFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + namespace CustomMetric { - /** - * Gets the default type url for StringFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** MeasurementUnit enum. */ + enum MeasurementUnit { + MEASUREMENT_UNIT_UNSPECIFIED = 0, + STANDARD = 1, + CURRENCY = 2, + FEET = 3, + METERS = 4, + KILOMETERS = 5, + MILES = 6, + MILLISECONDS = 7, + SECONDS = 8, + MINUTES = 9, + HOURS = 10 } - namespace StringFilter { + /** MetricScope enum. */ + enum MetricScope { + METRIC_SCOPE_UNSPECIFIED = 0, + EVENT = 1 + } - /** MatchType enum. */ - enum MatchType { - MATCH_TYPE_UNSPECIFIED = 0, - EXACT = 1, - CONTAINS = 2 - } + /** RestrictedMetricType enum. */ + enum RestrictedMetricType { + RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0, + COST_DATA = 1, + REVENUE_DATA = 2 } + } - /** Properties of an InListFilter. */ - interface IInListFilter { + /** Properties of a DataRetentionSettings. */ + interface IDataRetentionSettings { - /** InListFilter values */ - values?: (string[]|null); + /** DataRetentionSettings name */ + name?: (string|null); - /** InListFilter caseSensitive */ - caseSensitive?: (boolean|null); - } + /** DataRetentionSettings eventDataRetention */ + eventDataRetention?: (google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration|keyof typeof google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration|null); - /** Represents an InListFilter. */ - class InListFilter implements IInListFilter { + /** DataRetentionSettings resetUserDataOnNewActivity */ + resetUserDataOnNewActivity?: (boolean|null); + } - /** - * Constructs a new InListFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.admin.v1alpha.ExpandedDataSetFilter.IInListFilter); + /** Represents a DataRetentionSettings. */ + class DataRetentionSettings implements IDataRetentionSettings { - /** InListFilter values. */ - public values: string[]; + /** + * Constructs a new DataRetentionSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IDataRetentionSettings); - /** InListFilter caseSensitive. */ - public caseSensitive: boolean; + /** DataRetentionSettings name. */ + public name: string; - /** - * Creates a new InListFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns InListFilter instance - */ - public static create(properties?: google.analytics.admin.v1alpha.ExpandedDataSetFilter.IInListFilter): google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter; + /** DataRetentionSettings eventDataRetention. */ + public eventDataRetention: (google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration|keyof typeof google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration); - /** - * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter.verify|verify} messages. - * @param message InListFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.admin.v1alpha.ExpandedDataSetFilter.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + /** DataRetentionSettings resetUserDataOnNewActivity. */ + public resetUserDataOnNewActivity: boolean; - /** - * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter.verify|verify} messages. - * @param message InListFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.ExpandedDataSetFilter.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new DataRetentionSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DataRetentionSettings instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IDataRetentionSettings): google.analytics.admin.v1alpha.DataRetentionSettings; - /** - * Decodes an InListFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InListFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter; + /** + * Encodes the specified DataRetentionSettings message. Does not implicitly {@link google.analytics.admin.v1alpha.DataRetentionSettings.verify|verify} messages. + * @param message DataRetentionSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IDataRetentionSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an InListFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InListFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter; + /** + * Encodes the specified DataRetentionSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataRetentionSettings.verify|verify} messages. + * @param message DataRetentionSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IDataRetentionSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies an InListFilter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a DataRetentionSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataRetentionSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DataRetentionSettings; - /** - * Creates an InListFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InListFilter - */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter; + /** + * Decodes a DataRetentionSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataRetentionSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DataRetentionSettings; - /** - * Creates a plain object from an InListFilter message. Also converts values to other types if specified. - * @param message InListFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a DataRetentionSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this InListFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a DataRetentionSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataRetentionSettings + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DataRetentionSettings; - /** - * Gets the default type url for InListFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** + * Creates a plain object from a DataRetentionSettings message. Also converts values to other types if specified. + * @param message DataRetentionSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.DataRetentionSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataRetentionSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataRetentionSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataRetentionSettings { + + /** RetentionDuration enum. */ + enum RetentionDuration { + RETENTION_DURATION_UNSPECIFIED = 0, + TWO_MONTHS = 1, + FOURTEEN_MONTHS = 3, + TWENTY_SIX_MONTHS = 4, + THIRTY_EIGHT_MONTHS = 5, + FIFTY_MONTHS = 6 } } - /** Properties of an ExpandedDataSetFilterExpression. */ - interface IExpandedDataSetFilterExpression { + /** Properties of an AttributionSettings. */ + interface IAttributionSettings { - /** ExpandedDataSetFilterExpression andGroup */ - andGroup?: (google.analytics.admin.v1alpha.IExpandedDataSetFilterExpressionList|null); + /** AttributionSettings name */ + name?: (string|null); - /** ExpandedDataSetFilterExpression notExpression */ - notExpression?: (google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression|null); + /** AttributionSettings acquisitionConversionEventLookbackWindow */ + acquisitionConversionEventLookbackWindow?: (google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow|keyof typeof google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow|null); - /** ExpandedDataSetFilterExpression filter */ - filter?: (google.analytics.admin.v1alpha.IExpandedDataSetFilter|null); + /** AttributionSettings otherConversionEventLookbackWindow */ + otherConversionEventLookbackWindow?: (google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow|keyof typeof google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow|null); + + /** AttributionSettings reportingAttributionModel */ + reportingAttributionModel?: (google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel|keyof typeof google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel|null); } - /** Represents an ExpandedDataSetFilterExpression. */ - class ExpandedDataSetFilterExpression implements IExpandedDataSetFilterExpression { + /** Represents an AttributionSettings. */ + class AttributionSettings implements IAttributionSettings { /** - * Constructs a new ExpandedDataSetFilterExpression. + * Constructs a new AttributionSettings. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression); + constructor(properties?: google.analytics.admin.v1alpha.IAttributionSettings); - /** ExpandedDataSetFilterExpression andGroup. */ - public andGroup?: (google.analytics.admin.v1alpha.IExpandedDataSetFilterExpressionList|null); + /** AttributionSettings name. */ + public name: string; - /** ExpandedDataSetFilterExpression notExpression. */ - public notExpression?: (google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression|null); + /** AttributionSettings acquisitionConversionEventLookbackWindow. */ + public acquisitionConversionEventLookbackWindow: (google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow|keyof typeof google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow); - /** ExpandedDataSetFilterExpression filter. */ - public filter?: (google.analytics.admin.v1alpha.IExpandedDataSetFilter|null); + /** AttributionSettings otherConversionEventLookbackWindow. */ + public otherConversionEventLookbackWindow: (google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow|keyof typeof google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow); - /** ExpandedDataSetFilterExpression expr. */ - public expr?: ("andGroup"|"notExpression"|"filter"); + /** AttributionSettings reportingAttributionModel. */ + public reportingAttributionModel: (google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel|keyof typeof google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel); /** - * Creates a new ExpandedDataSetFilterExpression instance using the specified properties. + * Creates a new AttributionSettings instance using the specified properties. * @param [properties] Properties to set - * @returns ExpandedDataSetFilterExpression instance + * @returns AttributionSettings instance */ - public static create(properties?: google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression): google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression; + public static create(properties?: google.analytics.admin.v1alpha.IAttributionSettings): google.analytics.admin.v1alpha.AttributionSettings; /** - * Encodes the specified ExpandedDataSetFilterExpression message. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.verify|verify} messages. - * @param message ExpandedDataSetFilterExpression message or plain object to encode + * Encodes the specified AttributionSettings message. Does not implicitly {@link google.analytics.admin.v1alpha.AttributionSettings.verify|verify} messages. + * @param message AttributionSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IAttributionSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExpandedDataSetFilterExpression message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.verify|verify} messages. - * @param message ExpandedDataSetFilterExpression message or plain object to encode + * Encodes the specified AttributionSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AttributionSettings.verify|verify} messages. + * @param message AttributionSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAttributionSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExpandedDataSetFilterExpression message from the specified reader or buffer. + * Decodes an AttributionSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExpandedDataSetFilterExpression + * @returns AttributionSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AttributionSettings; /** - * Decodes an ExpandedDataSetFilterExpression message from the specified reader or buffer, length delimited. + * Decodes an AttributionSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExpandedDataSetFilterExpression + * @returns AttributionSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AttributionSettings; /** - * Verifies an ExpandedDataSetFilterExpression message. + * Verifies an AttributionSettings message. * @param message Plain 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 ExpandedDataSetFilterExpression message from a plain object. Also converts values to their respective internal types. + * Creates an AttributionSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExpandedDataSetFilterExpression + * @returns AttributionSettings */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AttributionSettings; /** - * Creates a plain object from an ExpandedDataSetFilterExpression message. Also converts values to other types if specified. - * @param message ExpandedDataSetFilterExpression + * Creates a plain object from an AttributionSettings message. Also converts values to other types if specified. + * @param message AttributionSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.AttributionSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExpandedDataSetFilterExpression to JSON. + * Converts this AttributionSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExpandedDataSetFilterExpression + * Gets the default type url for AttributionSettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ExpandedDataSetFilterExpressionList. */ - interface IExpandedDataSetFilterExpressionList { + namespace AttributionSettings { - /** ExpandedDataSetFilterExpressionList filterExpressions */ - filterExpressions?: (google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression[]|null); + /** AcquisitionConversionEventLookbackWindow enum. */ + enum AcquisitionConversionEventLookbackWindow { + ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED = 0, + ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_7_DAYS = 1, + ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS = 2 + } + + /** OtherConversionEventLookbackWindow enum. */ + enum OtherConversionEventLookbackWindow { + OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED = 0, + OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS = 1, + OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_60_DAYS = 2, + OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_90_DAYS = 3 + } + + /** ReportingAttributionModel enum. */ + enum ReportingAttributionModel { + REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED = 0, + CROSS_CHANNEL_DATA_DRIVEN = 1, + CROSS_CHANNEL_LAST_CLICK = 2, + CROSS_CHANNEL_FIRST_CLICK = 3, + CROSS_CHANNEL_LINEAR = 4, + CROSS_CHANNEL_POSITION_BASED = 5, + CROSS_CHANNEL_TIME_DECAY = 6, + ADS_PREFERRED_LAST_CLICK = 7 + } } - /** Represents an ExpandedDataSetFilterExpressionList. */ - class ExpandedDataSetFilterExpressionList implements IExpandedDataSetFilterExpressionList { + /** Properties of an AccessBinding. */ + interface IAccessBinding { + + /** AccessBinding user */ + user?: (string|null); + + /** AccessBinding name */ + name?: (string|null); + + /** AccessBinding roles */ + roles?: (string[]|null); + } + + /** Represents an AccessBinding. */ + class AccessBinding implements IAccessBinding { /** - * Constructs a new ExpandedDataSetFilterExpressionList. + * Constructs a new AccessBinding. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IExpandedDataSetFilterExpressionList); + constructor(properties?: google.analytics.admin.v1alpha.IAccessBinding); - /** ExpandedDataSetFilterExpressionList filterExpressions. */ - public filterExpressions: google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression[]; + /** AccessBinding user. */ + public user?: (string|null); + + /** AccessBinding name. */ + public name: string; + + /** AccessBinding roles. */ + public roles: string[]; + + /** AccessBinding accessTarget. */ + public accessTarget?: "user"; /** - * Creates a new ExpandedDataSetFilterExpressionList instance using the specified properties. + * Creates a new AccessBinding instance using the specified properties. * @param [properties] Properties to set - * @returns ExpandedDataSetFilterExpressionList instance + * @returns AccessBinding instance */ - public static create(properties?: google.analytics.admin.v1alpha.IExpandedDataSetFilterExpressionList): google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList; + public static create(properties?: google.analytics.admin.v1alpha.IAccessBinding): google.analytics.admin.v1alpha.AccessBinding; /** - * Encodes the specified ExpandedDataSetFilterExpressionList message. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList.verify|verify} messages. - * @param message ExpandedDataSetFilterExpressionList message or plain object to encode + * Encodes the specified AccessBinding message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessBinding.verify|verify} messages. + * @param message AccessBinding message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IExpandedDataSetFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IAccessBinding, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExpandedDataSetFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList.verify|verify} messages. - * @param message ExpandedDataSetFilterExpressionList message or plain object to encode + * Encodes the specified AccessBinding message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessBinding.verify|verify} messages. + * @param message AccessBinding message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IExpandedDataSetFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAccessBinding, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExpandedDataSetFilterExpressionList message from the specified reader or buffer. + * Decodes an AccessBinding message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExpandedDataSetFilterExpressionList + * @returns AccessBinding * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AccessBinding; /** - * Decodes an ExpandedDataSetFilterExpressionList message from the specified reader or buffer, length delimited. + * Decodes an AccessBinding message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExpandedDataSetFilterExpressionList + * @returns AccessBinding * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AccessBinding; /** - * Verifies an ExpandedDataSetFilterExpressionList message. + * Verifies an AccessBinding message. * @param message Plain 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 ExpandedDataSetFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * Creates an AccessBinding message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExpandedDataSetFilterExpressionList + * @returns AccessBinding */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AccessBinding; /** - * Creates a plain object from an ExpandedDataSetFilterExpressionList message. Also converts values to other types if specified. - * @param message ExpandedDataSetFilterExpressionList + * Creates a plain object from an AccessBinding message. Also converts values to other types if specified. + * @param message AccessBinding * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.AccessBinding, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExpandedDataSetFilterExpressionList to JSON. + * Converts this AccessBinding to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExpandedDataSetFilterExpressionList + * Gets the default type url for AccessBinding * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ExpandedDataSet. */ - interface IExpandedDataSet { + /** Properties of a BigQueryLink. */ + interface IBigQueryLink { - /** ExpandedDataSet name */ + /** BigQueryLink name */ name?: (string|null); - /** ExpandedDataSet displayName */ - displayName?: (string|null); + /** BigQueryLink project */ + project?: (string|null); - /** ExpandedDataSet description */ - description?: (string|null); + /** BigQueryLink createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** ExpandedDataSet dimensionNames */ - dimensionNames?: (string[]|null); + /** BigQueryLink dailyExportEnabled */ + dailyExportEnabled?: (boolean|null); - /** ExpandedDataSet metricNames */ - metricNames?: (string[]|null); + /** BigQueryLink streamingExportEnabled */ + streamingExportEnabled?: (boolean|null); - /** ExpandedDataSet dimensionFilterExpression */ - dimensionFilterExpression?: (google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression|null); + /** BigQueryLink includeAdvertisingId */ + includeAdvertisingId?: (boolean|null); - /** ExpandedDataSet dataCollectionStartTime */ - dataCollectionStartTime?: (google.protobuf.ITimestamp|null); + /** BigQueryLink exportStreams */ + exportStreams?: (string[]|null); + + /** BigQueryLink excludedEvents */ + excludedEvents?: (string[]|null); } - /** Represents an ExpandedDataSet. */ - class ExpandedDataSet implements IExpandedDataSet { + /** Represents a BigQueryLink. */ + class BigQueryLink implements IBigQueryLink { /** - * Constructs a new ExpandedDataSet. + * Constructs a new BigQueryLink. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IExpandedDataSet); + constructor(properties?: google.analytics.admin.v1alpha.IBigQueryLink); - /** ExpandedDataSet name. */ + /** BigQueryLink name. */ public name: string; - /** ExpandedDataSet displayName. */ - public displayName: string; + /** BigQueryLink project. */ + public project: string; - /** ExpandedDataSet description. */ - public description: string; + /** BigQueryLink createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** ExpandedDataSet dimensionNames. */ - public dimensionNames: string[]; + /** BigQueryLink dailyExportEnabled. */ + public dailyExportEnabled: boolean; - /** ExpandedDataSet metricNames. */ - public metricNames: string[]; + /** BigQueryLink streamingExportEnabled. */ + public streamingExportEnabled: boolean; - /** ExpandedDataSet dimensionFilterExpression. */ - public dimensionFilterExpression?: (google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression|null); + /** BigQueryLink includeAdvertisingId. */ + public includeAdvertisingId: boolean; - /** ExpandedDataSet dataCollectionStartTime. */ - public dataCollectionStartTime?: (google.protobuf.ITimestamp|null); + /** BigQueryLink exportStreams. */ + public exportStreams: string[]; + + /** BigQueryLink excludedEvents. */ + public excludedEvents: string[]; /** - * Creates a new ExpandedDataSet instance using the specified properties. + * Creates a new BigQueryLink instance using the specified properties. * @param [properties] Properties to set - * @returns ExpandedDataSet instance + * @returns BigQueryLink instance */ - public static create(properties?: google.analytics.admin.v1alpha.IExpandedDataSet): google.analytics.admin.v1alpha.ExpandedDataSet; + public static create(properties?: google.analytics.admin.v1alpha.IBigQueryLink): google.analytics.admin.v1alpha.BigQueryLink; /** - * Encodes the specified ExpandedDataSet message. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSet.verify|verify} messages. - * @param message ExpandedDataSet message or plain object to encode + * Encodes the specified BigQueryLink message. Does not implicitly {@link google.analytics.admin.v1alpha.BigQueryLink.verify|verify} messages. + * @param message BigQueryLink message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IExpandedDataSet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IBigQueryLink, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExpandedDataSet message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSet.verify|verify} messages. - * @param message ExpandedDataSet message or plain object to encode + * Encodes the specified BigQueryLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BigQueryLink.verify|verify} messages. + * @param message BigQueryLink message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IExpandedDataSet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IBigQueryLink, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExpandedDataSet message from the specified reader or buffer. + * Decodes a BigQueryLink message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExpandedDataSet + * @returns BigQueryLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ExpandedDataSet; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.BigQueryLink; /** - * Decodes an ExpandedDataSet message from the specified reader or buffer, length delimited. + * Decodes a BigQueryLink message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExpandedDataSet + * @returns BigQueryLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ExpandedDataSet; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.BigQueryLink; /** - * Verifies an ExpandedDataSet message. + * Verifies a BigQueryLink message. * @param message Plain 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 ExpandedDataSet message from a plain object. Also converts values to their respective internal types. + * Creates a BigQueryLink message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExpandedDataSet + * @returns BigQueryLink */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ExpandedDataSet; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.BigQueryLink; /** - * Creates a plain object from an ExpandedDataSet message. Also converts values to other types if specified. - * @param message ExpandedDataSet + * Creates a plain object from a BigQueryLink message. Also converts values to other types if specified. + * @param message BigQueryLink * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.ExpandedDataSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.BigQueryLink, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExpandedDataSet to JSON. + * Converts this BigQueryLink to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExpandedDataSet + * Gets the default type url for BigQueryLink * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ diff --git a/packages/google-analytics-admin/protos/protos.js b/packages/google-analytics-admin/protos/protos.js index ac745c38cab..38135a8dae9 100644 --- a/packages/google-analytics-admin/protos/protos.js +++ b/packages/google-analytics-admin/protos/protos.js @@ -8158,6 +8158,468 @@ * @variation 2 */ + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createAccessBinding}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef CreateAccessBindingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.AccessBinding} [response] AccessBinding + */ + + /** + * Calls CreateAccessBinding. + * @function createAccessBinding + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateAccessBindingRequest} request CreateAccessBindingRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.CreateAccessBindingCallback} callback Node-style callback called with the error, if any, and AccessBinding + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createAccessBinding = function createAccessBinding(request, callback) { + return this.rpcCall(createAccessBinding, $root.google.analytics.admin.v1alpha.CreateAccessBindingRequest, $root.google.analytics.admin.v1alpha.AccessBinding, request, callback); + }, "name", { value: "CreateAccessBinding" }); + + /** + * Calls CreateAccessBinding. + * @function createAccessBinding + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateAccessBindingRequest} request CreateAccessBindingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getAccessBinding}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef GetAccessBindingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.AccessBinding} [response] AccessBinding + */ + + /** + * Calls GetAccessBinding. + * @function getAccessBinding + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetAccessBindingRequest} request GetAccessBindingRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.GetAccessBindingCallback} callback Node-style callback called with the error, if any, and AccessBinding + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getAccessBinding = function getAccessBinding(request, callback) { + return this.rpcCall(getAccessBinding, $root.google.analytics.admin.v1alpha.GetAccessBindingRequest, $root.google.analytics.admin.v1alpha.AccessBinding, request, callback); + }, "name", { value: "GetAccessBinding" }); + + /** + * Calls GetAccessBinding. + * @function getAccessBinding + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetAccessBindingRequest} request GetAccessBindingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateAccessBinding}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef UpdateAccessBindingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.AccessBinding} [response] AccessBinding + */ + + /** + * Calls UpdateAccessBinding. + * @function updateAccessBinding + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateAccessBindingRequest} request UpdateAccessBindingRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateAccessBindingCallback} callback Node-style callback called with the error, if any, and AccessBinding + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateAccessBinding = function updateAccessBinding(request, callback) { + return this.rpcCall(updateAccessBinding, $root.google.analytics.admin.v1alpha.UpdateAccessBindingRequest, $root.google.analytics.admin.v1alpha.AccessBinding, request, callback); + }, "name", { value: "UpdateAccessBinding" }); + + /** + * Calls UpdateAccessBinding. + * @function updateAccessBinding + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateAccessBindingRequest} request UpdateAccessBindingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteAccessBinding}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef DeleteAccessBindingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteAccessBinding. + * @function deleteAccessBinding + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeleteAccessBindingRequest} request DeleteAccessBindingRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteAccessBindingCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.deleteAccessBinding = function deleteAccessBinding(request, callback) { + return this.rpcCall(deleteAccessBinding, $root.google.analytics.admin.v1alpha.DeleteAccessBindingRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteAccessBinding" }); + + /** + * Calls DeleteAccessBinding. + * @function deleteAccessBinding + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeleteAccessBindingRequest} request DeleteAccessBindingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listAccessBindings}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef ListAccessBindingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.ListAccessBindingsResponse} [response] ListAccessBindingsResponse + */ + + /** + * Calls ListAccessBindings. + * @function listAccessBindings + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListAccessBindingsRequest} request ListAccessBindingsRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.ListAccessBindingsCallback} callback Node-style callback called with the error, if any, and ListAccessBindingsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listAccessBindings = function listAccessBindings(request, callback) { + return this.rpcCall(listAccessBindings, $root.google.analytics.admin.v1alpha.ListAccessBindingsRequest, $root.google.analytics.admin.v1alpha.ListAccessBindingsResponse, request, callback); + }, "name", { value: "ListAccessBindings" }); + + /** + * Calls ListAccessBindings. + * @function listAccessBindings + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListAccessBindingsRequest} request ListAccessBindingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|batchCreateAccessBindings}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef BatchCreateAccessBindingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse} [response] BatchCreateAccessBindingsResponse + */ + + /** + * Calls BatchCreateAccessBindings. + * @function batchCreateAccessBindings + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IBatchCreateAccessBindingsRequest} request BatchCreateAccessBindingsRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.BatchCreateAccessBindingsCallback} callback Node-style callback called with the error, if any, and BatchCreateAccessBindingsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.batchCreateAccessBindings = function batchCreateAccessBindings(request, callback) { + return this.rpcCall(batchCreateAccessBindings, $root.google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest, $root.google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse, request, callback); + }, "name", { value: "BatchCreateAccessBindings" }); + + /** + * Calls BatchCreateAccessBindings. + * @function batchCreateAccessBindings + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IBatchCreateAccessBindingsRequest} request BatchCreateAccessBindingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|batchGetAccessBindings}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef BatchGetAccessBindingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse} [response] BatchGetAccessBindingsResponse + */ + + /** + * Calls BatchGetAccessBindings. + * @function batchGetAccessBindings + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IBatchGetAccessBindingsRequest} request BatchGetAccessBindingsRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.BatchGetAccessBindingsCallback} callback Node-style callback called with the error, if any, and BatchGetAccessBindingsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.batchGetAccessBindings = function batchGetAccessBindings(request, callback) { + return this.rpcCall(batchGetAccessBindings, $root.google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest, $root.google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse, request, callback); + }, "name", { value: "BatchGetAccessBindings" }); + + /** + * Calls BatchGetAccessBindings. + * @function batchGetAccessBindings + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IBatchGetAccessBindingsRequest} request BatchGetAccessBindingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|batchUpdateAccessBindings}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef BatchUpdateAccessBindingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse} [response] BatchUpdateAccessBindingsResponse + */ + + /** + * Calls BatchUpdateAccessBindings. + * @function batchUpdateAccessBindings + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsRequest} request BatchUpdateAccessBindingsRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.BatchUpdateAccessBindingsCallback} callback Node-style callback called with the error, if any, and BatchUpdateAccessBindingsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.batchUpdateAccessBindings = function batchUpdateAccessBindings(request, callback) { + return this.rpcCall(batchUpdateAccessBindings, $root.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest, $root.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse, request, callback); + }, "name", { value: "BatchUpdateAccessBindings" }); + + /** + * Calls BatchUpdateAccessBindings. + * @function batchUpdateAccessBindings + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsRequest} request BatchUpdateAccessBindingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|batchDeleteAccessBindings}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef BatchDeleteAccessBindingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls BatchDeleteAccessBindings. + * @function batchDeleteAccessBindings + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IBatchDeleteAccessBindingsRequest} request BatchDeleteAccessBindingsRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.BatchDeleteAccessBindingsCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.batchDeleteAccessBindings = function batchDeleteAccessBindings(request, callback) { + return this.rpcCall(batchDeleteAccessBindings, $root.google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "BatchDeleteAccessBindings" }); + + /** + * Calls BatchDeleteAccessBindings. + * @function batchDeleteAccessBindings + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IBatchDeleteAccessBindingsRequest} request BatchDeleteAccessBindingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getExpandedDataSet}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef GetExpandedDataSetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.ExpandedDataSet} [response] ExpandedDataSet + */ + + /** + * Calls GetExpandedDataSet. + * @function getExpandedDataSet + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetExpandedDataSetRequest} request GetExpandedDataSetRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.GetExpandedDataSetCallback} callback Node-style callback called with the error, if any, and ExpandedDataSet + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getExpandedDataSet = function getExpandedDataSet(request, callback) { + return this.rpcCall(getExpandedDataSet, $root.google.analytics.admin.v1alpha.GetExpandedDataSetRequest, $root.google.analytics.admin.v1alpha.ExpandedDataSet, request, callback); + }, "name", { value: "GetExpandedDataSet" }); + + /** + * Calls GetExpandedDataSet. + * @function getExpandedDataSet + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetExpandedDataSetRequest} request GetExpandedDataSetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listExpandedDataSets}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef ListExpandedDataSetsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.ListExpandedDataSetsResponse} [response] ListExpandedDataSetsResponse + */ + + /** + * Calls ListExpandedDataSets. + * @function listExpandedDataSets + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListExpandedDataSetsRequest} request ListExpandedDataSetsRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.ListExpandedDataSetsCallback} callback Node-style callback called with the error, if any, and ListExpandedDataSetsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listExpandedDataSets = function listExpandedDataSets(request, callback) { + return this.rpcCall(listExpandedDataSets, $root.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest, $root.google.analytics.admin.v1alpha.ListExpandedDataSetsResponse, request, callback); + }, "name", { value: "ListExpandedDataSets" }); + + /** + * Calls ListExpandedDataSets. + * @function listExpandedDataSets + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListExpandedDataSetsRequest} request ListExpandedDataSetsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createExpandedDataSet}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef CreateExpandedDataSetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.ExpandedDataSet} [response] ExpandedDataSet + */ + + /** + * Calls CreateExpandedDataSet. + * @function createExpandedDataSet + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateExpandedDataSetRequest} request CreateExpandedDataSetRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.CreateExpandedDataSetCallback} callback Node-style callback called with the error, if any, and ExpandedDataSet + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createExpandedDataSet = function createExpandedDataSet(request, callback) { + return this.rpcCall(createExpandedDataSet, $root.google.analytics.admin.v1alpha.CreateExpandedDataSetRequest, $root.google.analytics.admin.v1alpha.ExpandedDataSet, request, callback); + }, "name", { value: "CreateExpandedDataSet" }); + + /** + * Calls CreateExpandedDataSet. + * @function createExpandedDataSet + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateExpandedDataSetRequest} request CreateExpandedDataSetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateExpandedDataSet}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef UpdateExpandedDataSetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.ExpandedDataSet} [response] ExpandedDataSet + */ + + /** + * Calls UpdateExpandedDataSet. + * @function updateExpandedDataSet + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateExpandedDataSetRequest} request UpdateExpandedDataSetRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateExpandedDataSetCallback} callback Node-style callback called with the error, if any, and ExpandedDataSet + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateExpandedDataSet = function updateExpandedDataSet(request, callback) { + return this.rpcCall(updateExpandedDataSet, $root.google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest, $root.google.analytics.admin.v1alpha.ExpandedDataSet, request, callback); + }, "name", { value: "UpdateExpandedDataSet" }); + + /** + * Calls UpdateExpandedDataSet. + * @function updateExpandedDataSet + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateExpandedDataSetRequest} request UpdateExpandedDataSetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteExpandedDataSet}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef DeleteExpandedDataSetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteExpandedDataSet. + * @function deleteExpandedDataSet + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeleteExpandedDataSetRequest} request DeleteExpandedDataSetRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteExpandedDataSetCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.deleteExpandedDataSet = function deleteExpandedDataSet(request, callback) { + return this.rpcCall(deleteExpandedDataSet, $root.google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteExpandedDataSet" }); + + /** + * Calls DeleteExpandedDataSet. + * @function deleteExpandedDataSet + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeleteExpandedDataSetRequest} request DeleteExpandedDataSetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|setAutomatedGa4ConfigurationOptOut}. * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService @@ -33756,25 +34218,24 @@ return UpdateAttributionSettingsRequest; })(); - v1alpha.SetAutomatedGa4ConfigurationOptOutRequest = (function() { + v1alpha.GetAccessBindingRequest = (function() { /** - * Properties of a SetAutomatedGa4ConfigurationOptOutRequest. + * Properties of a GetAccessBindingRequest. * @memberof google.analytics.admin.v1alpha - * @interface ISetAutomatedGa4ConfigurationOptOutRequest - * @property {string|null} [property] SetAutomatedGa4ConfigurationOptOutRequest property - * @property {boolean|null} [optOut] SetAutomatedGa4ConfigurationOptOutRequest optOut + * @interface IGetAccessBindingRequest + * @property {string|null} [name] GetAccessBindingRequest name */ /** - * Constructs a new SetAutomatedGa4ConfigurationOptOutRequest. + * Constructs a new GetAccessBindingRequest. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a SetAutomatedGa4ConfigurationOptOutRequest. - * @implements ISetAutomatedGa4ConfigurationOptOutRequest + * @classdesc Represents a GetAccessBindingRequest. + * @implements IGetAccessBindingRequest * @constructor - * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IGetAccessBindingRequest=} [properties] Properties to set */ - function SetAutomatedGa4ConfigurationOptOutRequest(properties) { + function GetAccessBindingRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33782,89 +34243,75 @@ } /** - * SetAutomatedGa4ConfigurationOptOutRequest property. - * @member {string} property - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest - * @instance - */ - SetAutomatedGa4ConfigurationOptOutRequest.prototype.property = ""; - - /** - * SetAutomatedGa4ConfigurationOptOutRequest optOut. - * @member {boolean} optOut - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest + * GetAccessBindingRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.GetAccessBindingRequest * @instance */ - SetAutomatedGa4ConfigurationOptOutRequest.prototype.optOut = false; + GetAccessBindingRequest.prototype.name = ""; /** - * Creates a new SetAutomatedGa4ConfigurationOptOutRequest instance using the specified properties. + * Creates a new GetAccessBindingRequest instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.GetAccessBindingRequest * @static - * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest} SetAutomatedGa4ConfigurationOptOutRequest instance + * @param {google.analytics.admin.v1alpha.IGetAccessBindingRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GetAccessBindingRequest} GetAccessBindingRequest instance */ - SetAutomatedGa4ConfigurationOptOutRequest.create = function create(properties) { - return new SetAutomatedGa4ConfigurationOptOutRequest(properties); + GetAccessBindingRequest.create = function create(properties) { + return new GetAccessBindingRequest(properties); }; /** - * Encodes the specified SetAutomatedGa4ConfigurationOptOutRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. + * Encodes the specified GetAccessBindingRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetAccessBindingRequest.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.GetAccessBindingRequest * @static - * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest} message SetAutomatedGa4ConfigurationOptOutRequest message or plain object to encode + * @param {google.analytics.admin.v1alpha.IGetAccessBindingRequest} message GetAccessBindingRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetAutomatedGa4ConfigurationOptOutRequest.encode = function encode(message, writer) { + GetAccessBindingRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.property != null && Object.hasOwnProperty.call(message, "property")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); - if (message.optOut != null && Object.hasOwnProperty.call(message, "optOut")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.optOut); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified SetAutomatedGa4ConfigurationOptOutRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. + * Encodes the specified GetAccessBindingRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetAccessBindingRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.GetAccessBindingRequest * @static - * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest} message SetAutomatedGa4ConfigurationOptOutRequest message or plain object to encode + * @param {google.analytics.admin.v1alpha.IGetAccessBindingRequest} message GetAccessBindingRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetAutomatedGa4ConfigurationOptOutRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetAccessBindingRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SetAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer. + * Decodes a GetAccessBindingRequest message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.GetAccessBindingRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest} SetAutomatedGa4ConfigurationOptOutRequest + * @returns {google.analytics.admin.v1alpha.GetAccessBindingRequest} GetAccessBindingRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetAutomatedGa4ConfigurationOptOutRequest.decode = function decode(reader, length) { + GetAccessBindingRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GetAccessBindingRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.property = reader.string(); - break; - } - case 2: { - message.optOut = reader.bool(); + message.name = reader.string(); break; } default: @@ -33876,130 +34323,124 @@ }; /** - * Decodes a SetAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer, length delimited. + * Decodes a GetAccessBindingRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.GetAccessBindingRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest} SetAutomatedGa4ConfigurationOptOutRequest + * @returns {google.analytics.admin.v1alpha.GetAccessBindingRequest} GetAccessBindingRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetAutomatedGa4ConfigurationOptOutRequest.decodeDelimited = function decodeDelimited(reader) { + GetAccessBindingRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SetAutomatedGa4ConfigurationOptOutRequest message. + * Verifies a GetAccessBindingRequest message. * @function verify - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.GetAccessBindingRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SetAutomatedGa4ConfigurationOptOutRequest.verify = function verify(message) { + GetAccessBindingRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.property != null && message.hasOwnProperty("property")) - if (!$util.isString(message.property)) - return "property: string expected"; - if (message.optOut != null && message.hasOwnProperty("optOut")) - if (typeof message.optOut !== "boolean") - return "optOut: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a SetAutomatedGa4ConfigurationOptOutRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetAccessBindingRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.GetAccessBindingRequest * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest} SetAutomatedGa4ConfigurationOptOutRequest + * @returns {google.analytics.admin.v1alpha.GetAccessBindingRequest} GetAccessBindingRequest */ - SetAutomatedGa4ConfigurationOptOutRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest) + GetAccessBindingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GetAccessBindingRequest) return object; - var message = new $root.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest(); - if (object.property != null) - message.property = String(object.property); - if (object.optOut != null) - message.optOut = Boolean(object.optOut); + var message = new $root.google.analytics.admin.v1alpha.GetAccessBindingRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a SetAutomatedGa4ConfigurationOptOutRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetAccessBindingRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.GetAccessBindingRequest * @static - * @param {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest} message SetAutomatedGa4ConfigurationOptOutRequest + * @param {google.analytics.admin.v1alpha.GetAccessBindingRequest} message GetAccessBindingRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetAutomatedGa4ConfigurationOptOutRequest.toObject = function toObject(message, options) { + GetAccessBindingRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.property = ""; - object.optOut = false; - } - if (message.property != null && message.hasOwnProperty("property")) - object.property = message.property; - if (message.optOut != null && message.hasOwnProperty("optOut")) - object.optOut = message.optOut; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this SetAutomatedGa4ConfigurationOptOutRequest to JSON. + * Converts this GetAccessBindingRequest to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.GetAccessBindingRequest * @instance * @returns {Object.} JSON object */ - SetAutomatedGa4ConfigurationOptOutRequest.prototype.toJSON = function toJSON() { + GetAccessBindingRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SetAutomatedGa4ConfigurationOptOutRequest + * Gets the default type url for GetAccessBindingRequest * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.GetAccessBindingRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SetAutomatedGa4ConfigurationOptOutRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetAccessBindingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GetAccessBindingRequest"; }; - return SetAutomatedGa4ConfigurationOptOutRequest; + return GetAccessBindingRequest; })(); - v1alpha.SetAutomatedGa4ConfigurationOptOutResponse = (function() { + v1alpha.BatchGetAccessBindingsRequest = (function() { /** - * Properties of a SetAutomatedGa4ConfigurationOptOutResponse. + * Properties of a BatchGetAccessBindingsRequest. * @memberof google.analytics.admin.v1alpha - * @interface ISetAutomatedGa4ConfigurationOptOutResponse + * @interface IBatchGetAccessBindingsRequest + * @property {string|null} [parent] BatchGetAccessBindingsRequest parent + * @property {Array.|null} [names] BatchGetAccessBindingsRequest names */ /** - * Constructs a new SetAutomatedGa4ConfigurationOptOutResponse. + * Constructs a new BatchGetAccessBindingsRequest. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a SetAutomatedGa4ConfigurationOptOutResponse. - * @implements ISetAutomatedGa4ConfigurationOptOutResponse + * @classdesc Represents a BatchGetAccessBindingsRequest. + * @implements IBatchGetAccessBindingsRequest * @constructor - * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IBatchGetAccessBindingsRequest=} [properties] Properties to set */ - function SetAutomatedGa4ConfigurationOptOutResponse(properties) { + function BatchGetAccessBindingsRequest(properties) { + this.names = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34007,63 +34448,94 @@ } /** - * Creates a new SetAutomatedGa4ConfigurationOptOutResponse instance using the specified properties. + * BatchGetAccessBindingsRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest + * @instance + */ + BatchGetAccessBindingsRequest.prototype.parent = ""; + + /** + * BatchGetAccessBindingsRequest names. + * @member {Array.} names + * @memberof google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest + * @instance + */ + BatchGetAccessBindingsRequest.prototype.names = $util.emptyArray; + + /** + * Creates a new BatchGetAccessBindingsRequest instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest * @static - * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse} SetAutomatedGa4ConfigurationOptOutResponse instance + * @param {google.analytics.admin.v1alpha.IBatchGetAccessBindingsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest} BatchGetAccessBindingsRequest instance */ - SetAutomatedGa4ConfigurationOptOutResponse.create = function create(properties) { - return new SetAutomatedGa4ConfigurationOptOutResponse(properties); + BatchGetAccessBindingsRequest.create = function create(properties) { + return new BatchGetAccessBindingsRequest(properties); }; /** - * Encodes the specified SetAutomatedGa4ConfigurationOptOutResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. + * Encodes the specified BatchGetAccessBindingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest * @static - * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse} message SetAutomatedGa4ConfigurationOptOutResponse message or plain object to encode + * @param {google.analytics.admin.v1alpha.IBatchGetAccessBindingsRequest} message BatchGetAccessBindingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetAutomatedGa4ConfigurationOptOutResponse.encode = function encode(message, writer) { + BatchGetAccessBindingsRequest.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.names != null && message.names.length) + for (var i = 0; i < message.names.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.names[i]); return writer; }; /** - * Encodes the specified SetAutomatedGa4ConfigurationOptOutResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. + * Encodes the specified BatchGetAccessBindingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest * @static - * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse} message SetAutomatedGa4ConfigurationOptOutResponse message or plain object to encode + * @param {google.analytics.admin.v1alpha.IBatchGetAccessBindingsRequest} message BatchGetAccessBindingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetAutomatedGa4ConfigurationOptOutResponse.encodeDelimited = function encodeDelimited(message, writer) { + BatchGetAccessBindingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SetAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer. + * Decodes a BatchGetAccessBindingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse} SetAutomatedGa4ConfigurationOptOutResponse + * @returns {google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest} BatchGetAccessBindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetAutomatedGa4ConfigurationOptOutResponse.decode = function decode(reader, length) { + BatchGetAccessBindingsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + if (!(message.names && message.names.length)) + message.names = []; + message.names.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -34073,109 +34545,144 @@ }; /** - * Decodes a SetAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer, length delimited. + * Decodes a BatchGetAccessBindingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse} SetAutomatedGa4ConfigurationOptOutResponse + * @returns {google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest} BatchGetAccessBindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetAutomatedGa4ConfigurationOptOutResponse.decodeDelimited = function decodeDelimited(reader) { + BatchGetAccessBindingsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SetAutomatedGa4ConfigurationOptOutResponse message. + * Verifies a BatchGetAccessBindingsRequest message. * @function verify - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SetAutomatedGa4ConfigurationOptOutResponse.verify = function verify(message) { + BatchGetAccessBindingsRequest.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.names != null && message.hasOwnProperty("names")) { + if (!Array.isArray(message.names)) + return "names: array expected"; + for (var i = 0; i < message.names.length; ++i) + if (!$util.isString(message.names[i])) + return "names: string[] expected"; + } return null; }; /** - * Creates a SetAutomatedGa4ConfigurationOptOutResponse message from a plain object. Also converts values to their respective internal types. + * Creates a BatchGetAccessBindingsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse} SetAutomatedGa4ConfigurationOptOutResponse + * @returns {google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest} BatchGetAccessBindingsRequest */ - SetAutomatedGa4ConfigurationOptOutResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse) + BatchGetAccessBindingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest) return object; - return new $root.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse(); + var message = new $root.google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.names) { + if (!Array.isArray(object.names)) + throw TypeError(".google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest.names: array expected"); + message.names = []; + for (var i = 0; i < object.names.length; ++i) + message.names[i] = String(object.names[i]); + } + return message; }; /** - * Creates a plain object from a SetAutomatedGa4ConfigurationOptOutResponse message. Also converts values to other types if specified. + * Creates a plain object from a BatchGetAccessBindingsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest * @static - * @param {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse} message SetAutomatedGa4ConfigurationOptOutResponse + * @param {google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest} message BatchGetAccessBindingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetAutomatedGa4ConfigurationOptOutResponse.toObject = function toObject() { - return {}; + BatchGetAccessBindingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.names = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.names && message.names.length) { + object.names = []; + for (var j = 0; j < message.names.length; ++j) + object.names[j] = message.names[j]; + } + return object; }; /** - * Converts this SetAutomatedGa4ConfigurationOptOutResponse to JSON. + * Converts this BatchGetAccessBindingsRequest to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest * @instance * @returns {Object.} JSON object */ - SetAutomatedGa4ConfigurationOptOutResponse.prototype.toJSON = function toJSON() { + BatchGetAccessBindingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SetAutomatedGa4ConfigurationOptOutResponse + * Gets the default type url for BatchGetAccessBindingsRequest * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SetAutomatedGa4ConfigurationOptOutResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchGetAccessBindingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest"; }; - return SetAutomatedGa4ConfigurationOptOutResponse; + return BatchGetAccessBindingsRequest; })(); - v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest = (function() { + v1alpha.BatchGetAccessBindingsResponse = (function() { /** - * Properties of a FetchAutomatedGa4ConfigurationOptOutRequest. + * Properties of a BatchGetAccessBindingsResponse. * @memberof google.analytics.admin.v1alpha - * @interface IFetchAutomatedGa4ConfigurationOptOutRequest - * @property {string|null} [property] FetchAutomatedGa4ConfigurationOptOutRequest property + * @interface IBatchGetAccessBindingsResponse + * @property {Array.|null} [accessBindings] BatchGetAccessBindingsResponse accessBindings */ /** - * Constructs a new FetchAutomatedGa4ConfigurationOptOutRequest. + * Constructs a new BatchGetAccessBindingsResponse. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a FetchAutomatedGa4ConfigurationOptOutRequest. - * @implements IFetchAutomatedGa4ConfigurationOptOutRequest + * @classdesc Represents a BatchGetAccessBindingsResponse. + * @implements IBatchGetAccessBindingsResponse * @constructor - * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IBatchGetAccessBindingsResponse=} [properties] Properties to set */ - function FetchAutomatedGa4ConfigurationOptOutRequest(properties) { + function BatchGetAccessBindingsResponse(properties) { + this.accessBindings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34183,75 +34690,78 @@ } /** - * FetchAutomatedGa4ConfigurationOptOutRequest property. - * @member {string} property - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * BatchGetAccessBindingsResponse accessBindings. + * @member {Array.} accessBindings + * @memberof google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse * @instance */ - FetchAutomatedGa4ConfigurationOptOutRequest.prototype.property = ""; + BatchGetAccessBindingsResponse.prototype.accessBindings = $util.emptyArray; /** - * Creates a new FetchAutomatedGa4ConfigurationOptOutRequest instance using the specified properties. + * Creates a new BatchGetAccessBindingsResponse instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse * @static - * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest} FetchAutomatedGa4ConfigurationOptOutRequest instance + * @param {google.analytics.admin.v1alpha.IBatchGetAccessBindingsResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse} BatchGetAccessBindingsResponse instance */ - FetchAutomatedGa4ConfigurationOptOutRequest.create = function create(properties) { - return new FetchAutomatedGa4ConfigurationOptOutRequest(properties); + BatchGetAccessBindingsResponse.create = function create(properties) { + return new BatchGetAccessBindingsResponse(properties); }; /** - * Encodes the specified FetchAutomatedGa4ConfigurationOptOutRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. + * Encodes the specified BatchGetAccessBindingsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse * @static - * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest} message FetchAutomatedGa4ConfigurationOptOutRequest message or plain object to encode + * @param {google.analytics.admin.v1alpha.IBatchGetAccessBindingsResponse} message BatchGetAccessBindingsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FetchAutomatedGa4ConfigurationOptOutRequest.encode = function encode(message, writer) { + BatchGetAccessBindingsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.property != null && Object.hasOwnProperty.call(message, "property")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.accessBindings != null && message.accessBindings.length) + for (var i = 0; i < message.accessBindings.length; ++i) + $root.google.analytics.admin.v1alpha.AccessBinding.encode(message.accessBindings[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified FetchAutomatedGa4ConfigurationOptOutRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. + * Encodes the specified BatchGetAccessBindingsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse * @static - * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest} message FetchAutomatedGa4ConfigurationOptOutRequest message or plain object to encode + * @param {google.analytics.admin.v1alpha.IBatchGetAccessBindingsResponse} message BatchGetAccessBindingsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FetchAutomatedGa4ConfigurationOptOutRequest.encodeDelimited = function encodeDelimited(message, writer) { + BatchGetAccessBindingsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FetchAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer. + * Decodes a BatchGetAccessBindingsResponse message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest} FetchAutomatedGa4ConfigurationOptOutRequest + * @returns {google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse} BatchGetAccessBindingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FetchAutomatedGa4ConfigurationOptOutRequest.decode = function decode(reader, length) { + BatchGetAccessBindingsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.property = reader.string(); + if (!(message.accessBindings && message.accessBindings.length)) + message.accessBindings = []; + message.accessBindings.push($root.google.analytics.admin.v1alpha.AccessBinding.decode(reader, reader.uint32())); break; } default: @@ -34263,122 +34773,141 @@ }; /** - * Decodes a FetchAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchGetAccessBindingsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest} FetchAutomatedGa4ConfigurationOptOutRequest + * @returns {google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse} BatchGetAccessBindingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FetchAutomatedGa4ConfigurationOptOutRequest.decodeDelimited = function decodeDelimited(reader) { + BatchGetAccessBindingsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FetchAutomatedGa4ConfigurationOptOutRequest message. + * Verifies a BatchGetAccessBindingsResponse message. * @function verify - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FetchAutomatedGa4ConfigurationOptOutRequest.verify = function verify(message) { + BatchGetAccessBindingsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.property != null && message.hasOwnProperty("property")) - if (!$util.isString(message.property)) - return "property: string expected"; + if (message.accessBindings != null && message.hasOwnProperty("accessBindings")) { + if (!Array.isArray(message.accessBindings)) + return "accessBindings: array expected"; + for (var i = 0; i < message.accessBindings.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.AccessBinding.verify(message.accessBindings[i]); + if (error) + return "accessBindings." + error; + } + } return null; }; /** - * Creates a FetchAutomatedGa4ConfigurationOptOutRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchGetAccessBindingsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest} FetchAutomatedGa4ConfigurationOptOutRequest + * @returns {google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse} BatchGetAccessBindingsResponse */ - FetchAutomatedGa4ConfigurationOptOutRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest) + BatchGetAccessBindingsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse) return object; - var message = new $root.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest(); - if (object.property != null) - message.property = String(object.property); + var message = new $root.google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse(); + if (object.accessBindings) { + if (!Array.isArray(object.accessBindings)) + throw TypeError(".google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse.accessBindings: array expected"); + message.accessBindings = []; + for (var i = 0; i < object.accessBindings.length; ++i) { + if (typeof object.accessBindings[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse.accessBindings: object expected"); + message.accessBindings[i] = $root.google.analytics.admin.v1alpha.AccessBinding.fromObject(object.accessBindings[i]); + } + } return message; }; /** - * Creates a plain object from a FetchAutomatedGa4ConfigurationOptOutRequest message. Also converts values to other types if specified. + * Creates a plain object from a BatchGetAccessBindingsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse * @static - * @param {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest} message FetchAutomatedGa4ConfigurationOptOutRequest + * @param {google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse} message BatchGetAccessBindingsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FetchAutomatedGa4ConfigurationOptOutRequest.toObject = function toObject(message, options) { + BatchGetAccessBindingsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.property = ""; - if (message.property != null && message.hasOwnProperty("property")) - object.property = message.property; + if (options.arrays || options.defaults) + object.accessBindings = []; + if (message.accessBindings && message.accessBindings.length) { + object.accessBindings = []; + for (var j = 0; j < message.accessBindings.length; ++j) + object.accessBindings[j] = $root.google.analytics.admin.v1alpha.AccessBinding.toObject(message.accessBindings[j], options); + } return object; }; /** - * Converts this FetchAutomatedGa4ConfigurationOptOutRequest to JSON. + * Converts this BatchGetAccessBindingsResponse to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse * @instance * @returns {Object.} JSON object */ - FetchAutomatedGa4ConfigurationOptOutRequest.prototype.toJSON = function toJSON() { + BatchGetAccessBindingsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FetchAutomatedGa4ConfigurationOptOutRequest + * Gets the default type url for BatchGetAccessBindingsResponse * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FetchAutomatedGa4ConfigurationOptOutRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchGetAccessBindingsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse"; }; - return FetchAutomatedGa4ConfigurationOptOutRequest; + return BatchGetAccessBindingsResponse; })(); - v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse = (function() { + v1alpha.ListAccessBindingsRequest = (function() { /** - * Properties of a FetchAutomatedGa4ConfigurationOptOutResponse. + * Properties of a ListAccessBindingsRequest. * @memberof google.analytics.admin.v1alpha - * @interface IFetchAutomatedGa4ConfigurationOptOutResponse - * @property {boolean|null} [optOut] FetchAutomatedGa4ConfigurationOptOutResponse optOut + * @interface IListAccessBindingsRequest + * @property {string|null} [parent] ListAccessBindingsRequest parent + * @property {number|null} [pageSize] ListAccessBindingsRequest pageSize + * @property {string|null} [pageToken] ListAccessBindingsRequest pageToken */ /** - * Constructs a new FetchAutomatedGa4ConfigurationOptOutResponse. + * Constructs a new ListAccessBindingsRequest. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a FetchAutomatedGa4ConfigurationOptOutResponse. - * @implements IFetchAutomatedGa4ConfigurationOptOutResponse + * @classdesc Represents a ListAccessBindingsRequest. + * @implements IListAccessBindingsRequest * @constructor - * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IListAccessBindingsRequest=} [properties] Properties to set */ - function FetchAutomatedGa4ConfigurationOptOutResponse(properties) { + function ListAccessBindingsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34386,75 +34915,103 @@ } /** - * FetchAutomatedGa4ConfigurationOptOutResponse optOut. - * @member {boolean} optOut - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse + * ListAccessBindingsRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.ListAccessBindingsRequest * @instance */ - FetchAutomatedGa4ConfigurationOptOutResponse.prototype.optOut = false; + ListAccessBindingsRequest.prototype.parent = ""; /** - * Creates a new FetchAutomatedGa4ConfigurationOptOutResponse instance using the specified properties. + * ListAccessBindingsRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1alpha.ListAccessBindingsRequest + * @instance + */ + ListAccessBindingsRequest.prototype.pageSize = 0; + + /** + * ListAccessBindingsRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1alpha.ListAccessBindingsRequest + * @instance + */ + ListAccessBindingsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListAccessBindingsRequest instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.ListAccessBindingsRequest * @static - * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse} FetchAutomatedGa4ConfigurationOptOutResponse instance + * @param {google.analytics.admin.v1alpha.IListAccessBindingsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListAccessBindingsRequest} ListAccessBindingsRequest instance */ - FetchAutomatedGa4ConfigurationOptOutResponse.create = function create(properties) { - return new FetchAutomatedGa4ConfigurationOptOutResponse(properties); + ListAccessBindingsRequest.create = function create(properties) { + return new ListAccessBindingsRequest(properties); }; /** - * Encodes the specified FetchAutomatedGa4ConfigurationOptOutResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. + * Encodes the specified ListAccessBindingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListAccessBindingsRequest.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.ListAccessBindingsRequest * @static - * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse} message FetchAutomatedGa4ConfigurationOptOutResponse message or plain object to encode + * @param {google.analytics.admin.v1alpha.IListAccessBindingsRequest} message ListAccessBindingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FetchAutomatedGa4ConfigurationOptOutResponse.encode = function encode(message, writer) { + ListAccessBindingsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.optOut != null && Object.hasOwnProperty.call(message, "optOut")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.optOut); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified FetchAutomatedGa4ConfigurationOptOutResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. + * Encodes the specified ListAccessBindingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListAccessBindingsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.ListAccessBindingsRequest * @static - * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse} message FetchAutomatedGa4ConfigurationOptOutResponse message or plain object to encode + * @param {google.analytics.admin.v1alpha.IListAccessBindingsRequest} message ListAccessBindingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FetchAutomatedGa4ConfigurationOptOutResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListAccessBindingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FetchAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer. + * Decodes a ListAccessBindingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.ListAccessBindingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse} FetchAutomatedGa4ConfigurationOptOutResponse + * @returns {google.analytics.admin.v1alpha.ListAccessBindingsRequest} ListAccessBindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FetchAutomatedGa4ConfigurationOptOutResponse.decode = function decode(reader, length) { + ListAccessBindingsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListAccessBindingsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.optOut = reader.bool(); + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); break; } default: @@ -34466,122 +35023,141 @@ }; /** - * Decodes a FetchAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer, length delimited. + * Decodes a ListAccessBindingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.ListAccessBindingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse} FetchAutomatedGa4ConfigurationOptOutResponse + * @returns {google.analytics.admin.v1alpha.ListAccessBindingsRequest} ListAccessBindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FetchAutomatedGa4ConfigurationOptOutResponse.decodeDelimited = function decodeDelimited(reader) { + ListAccessBindingsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FetchAutomatedGa4ConfigurationOptOutResponse message. + * Verifies a ListAccessBindingsRequest message. * @function verify - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.ListAccessBindingsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FetchAutomatedGa4ConfigurationOptOutResponse.verify = function verify(message) { + ListAccessBindingsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.optOut != null && message.hasOwnProperty("optOut")) - if (typeof message.optOut !== "boolean") - return "optOut: boolean expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a FetchAutomatedGa4ConfigurationOptOutResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListAccessBindingsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.ListAccessBindingsRequest * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse} FetchAutomatedGa4ConfigurationOptOutResponse + * @returns {google.analytics.admin.v1alpha.ListAccessBindingsRequest} ListAccessBindingsRequest */ - FetchAutomatedGa4ConfigurationOptOutResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse) + ListAccessBindingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListAccessBindingsRequest) return object; - var message = new $root.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse(); - if (object.optOut != null) - message.optOut = Boolean(object.optOut); + var message = new $root.google.analytics.admin.v1alpha.ListAccessBindingsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a FetchAutomatedGa4ConfigurationOptOutResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListAccessBindingsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.ListAccessBindingsRequest * @static - * @param {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse} message FetchAutomatedGa4ConfigurationOptOutResponse + * @param {google.analytics.admin.v1alpha.ListAccessBindingsRequest} message ListAccessBindingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FetchAutomatedGa4ConfigurationOptOutResponse.toObject = function toObject(message, options) { + ListAccessBindingsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.optOut = false; - if (message.optOut != null && message.hasOwnProperty("optOut")) - object.optOut = message.optOut; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this FetchAutomatedGa4ConfigurationOptOutResponse to JSON. + * Converts this ListAccessBindingsRequest to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.ListAccessBindingsRequest * @instance * @returns {Object.} JSON object */ - FetchAutomatedGa4ConfigurationOptOutResponse.prototype.toJSON = function toJSON() { + ListAccessBindingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FetchAutomatedGa4ConfigurationOptOutResponse + * Gets the default type url for ListAccessBindingsRequest * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.ListAccessBindingsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FetchAutomatedGa4ConfigurationOptOutResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListAccessBindingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListAccessBindingsRequest"; }; - return FetchAutomatedGa4ConfigurationOptOutResponse; + return ListAccessBindingsRequest; })(); - v1alpha.GetBigQueryLinkRequest = (function() { + v1alpha.ListAccessBindingsResponse = (function() { /** - * Properties of a GetBigQueryLinkRequest. + * Properties of a ListAccessBindingsResponse. * @memberof google.analytics.admin.v1alpha - * @interface IGetBigQueryLinkRequest - * @property {string|null} [name] GetBigQueryLinkRequest name + * @interface IListAccessBindingsResponse + * @property {Array.|null} [accessBindings] ListAccessBindingsResponse accessBindings + * @property {string|null} [nextPageToken] ListAccessBindingsResponse nextPageToken */ /** - * Constructs a new GetBigQueryLinkRequest. + * Constructs a new ListAccessBindingsResponse. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a GetBigQueryLinkRequest. - * @implements IGetBigQueryLinkRequest + * @classdesc Represents a ListAccessBindingsResponse. + * @implements IListAccessBindingsResponse * @constructor - * @param {google.analytics.admin.v1alpha.IGetBigQueryLinkRequest=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IListAccessBindingsResponse=} [properties] Properties to set */ - function GetBigQueryLinkRequest(properties) { + function ListAccessBindingsResponse(properties) { + this.accessBindings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34589,75 +35165,92 @@ } /** - * GetBigQueryLinkRequest name. - * @member {string} name - * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest + * ListAccessBindingsResponse accessBindings. + * @member {Array.} accessBindings + * @memberof google.analytics.admin.v1alpha.ListAccessBindingsResponse * @instance */ - GetBigQueryLinkRequest.prototype.name = ""; + ListAccessBindingsResponse.prototype.accessBindings = $util.emptyArray; /** - * Creates a new GetBigQueryLinkRequest instance using the specified properties. + * ListAccessBindingsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1alpha.ListAccessBindingsResponse + * @instance + */ + ListAccessBindingsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListAccessBindingsResponse instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest + * @memberof google.analytics.admin.v1alpha.ListAccessBindingsResponse * @static - * @param {google.analytics.admin.v1alpha.IGetBigQueryLinkRequest=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.GetBigQueryLinkRequest} GetBigQueryLinkRequest instance + * @param {google.analytics.admin.v1alpha.IListAccessBindingsResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListAccessBindingsResponse} ListAccessBindingsResponse instance */ - GetBigQueryLinkRequest.create = function create(properties) { - return new GetBigQueryLinkRequest(properties); + ListAccessBindingsResponse.create = function create(properties) { + return new ListAccessBindingsResponse(properties); }; /** - * Encodes the specified GetBigQueryLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetBigQueryLinkRequest.verify|verify} messages. + * Encodes the specified ListAccessBindingsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListAccessBindingsResponse.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest + * @memberof google.analytics.admin.v1alpha.ListAccessBindingsResponse * @static - * @param {google.analytics.admin.v1alpha.IGetBigQueryLinkRequest} message GetBigQueryLinkRequest message or plain object to encode + * @param {google.analytics.admin.v1alpha.IListAccessBindingsResponse} message ListAccessBindingsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBigQueryLinkRequest.encode = function encode(message, writer) { + ListAccessBindingsResponse.encode = function encode(message, writer) { 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.accessBindings != null && message.accessBindings.length) + for (var i = 0; i < message.accessBindings.length; ++i) + $root.google.analytics.admin.v1alpha.AccessBinding.encode(message.accessBindings[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 GetBigQueryLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetBigQueryLinkRequest.verify|verify} messages. + * Encodes the specified ListAccessBindingsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListAccessBindingsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest + * @memberof google.analytics.admin.v1alpha.ListAccessBindingsResponse * @static - * @param {google.analytics.admin.v1alpha.IGetBigQueryLinkRequest} message GetBigQueryLinkRequest message or plain object to encode + * @param {google.analytics.admin.v1alpha.IListAccessBindingsResponse} message ListAccessBindingsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBigQueryLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListAccessBindingsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetBigQueryLinkRequest message from the specified reader or buffer. + * Decodes a ListAccessBindingsResponse message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest + * @memberof google.analytics.admin.v1alpha.ListAccessBindingsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.GetBigQueryLinkRequest} GetBigQueryLinkRequest + * @returns {google.analytics.admin.v1alpha.ListAccessBindingsResponse} ListAccessBindingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBigQueryLinkRequest.decode = function decode(reader, length) { + ListAccessBindingsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GetBigQueryLinkRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListAccessBindingsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.accessBindings && message.accessBindings.length)) + message.accessBindings = []; + message.accessBindings.push($root.google.analytics.admin.v1alpha.AccessBinding.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); break; } default: @@ -34669,124 +35262,149 @@ }; /** - * Decodes a GetBigQueryLinkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAccessBindingsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest + * @memberof google.analytics.admin.v1alpha.ListAccessBindingsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.GetBigQueryLinkRequest} GetBigQueryLinkRequest + * @returns {google.analytics.admin.v1alpha.ListAccessBindingsResponse} ListAccessBindingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBigQueryLinkRequest.decodeDelimited = function decodeDelimited(reader) { + ListAccessBindingsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetBigQueryLinkRequest message. + * Verifies a ListAccessBindingsResponse message. * @function verify - * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest + * @memberof google.analytics.admin.v1alpha.ListAccessBindingsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetBigQueryLinkRequest.verify = function verify(message) { + ListAccessBindingsResponse.verify = function verify(message) { if (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.accessBindings != null && message.hasOwnProperty("accessBindings")) { + if (!Array.isArray(message.accessBindings)) + return "accessBindings: array expected"; + for (var i = 0; i < message.accessBindings.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.AccessBinding.verify(message.accessBindings[i]); + if (error) + return "accessBindings." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a GetBigQueryLinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAccessBindingsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest + * @memberof google.analytics.admin.v1alpha.ListAccessBindingsResponse * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.GetBigQueryLinkRequest} GetBigQueryLinkRequest + * @returns {google.analytics.admin.v1alpha.ListAccessBindingsResponse} ListAccessBindingsResponse */ - GetBigQueryLinkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.GetBigQueryLinkRequest) + ListAccessBindingsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListAccessBindingsResponse) return object; - var message = new $root.google.analytics.admin.v1alpha.GetBigQueryLinkRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.analytics.admin.v1alpha.ListAccessBindingsResponse(); + if (object.accessBindings) { + if (!Array.isArray(object.accessBindings)) + throw TypeError(".google.analytics.admin.v1alpha.ListAccessBindingsResponse.accessBindings: array expected"); + message.accessBindings = []; + for (var i = 0; i < object.accessBindings.length; ++i) { + if (typeof object.accessBindings[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ListAccessBindingsResponse.accessBindings: object expected"); + message.accessBindings[i] = $root.google.analytics.admin.v1alpha.AccessBinding.fromObject(object.accessBindings[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a GetBigQueryLinkRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListAccessBindingsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest + * @memberof google.analytics.admin.v1alpha.ListAccessBindingsResponse * @static - * @param {google.analytics.admin.v1alpha.GetBigQueryLinkRequest} message GetBigQueryLinkRequest + * @param {google.analytics.admin.v1alpha.ListAccessBindingsResponse} message ListAccessBindingsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetBigQueryLinkRequest.toObject = function toObject(message, options) { + ListAccessBindingsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.accessBindings = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.nextPageToken = ""; + if (message.accessBindings && message.accessBindings.length) { + object.accessBindings = []; + for (var j = 0; j < message.accessBindings.length; ++j) + object.accessBindings[j] = $root.google.analytics.admin.v1alpha.AccessBinding.toObject(message.accessBindings[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this GetBigQueryLinkRequest to JSON. + * Converts this ListAccessBindingsResponse to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest + * @memberof google.analytics.admin.v1alpha.ListAccessBindingsResponse * @instance * @returns {Object.} JSON object */ - GetBigQueryLinkRequest.prototype.toJSON = function toJSON() { + ListAccessBindingsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetBigQueryLinkRequest + * Gets the default type url for ListAccessBindingsResponse * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest + * @memberof google.analytics.admin.v1alpha.ListAccessBindingsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetBigQueryLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListAccessBindingsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.GetBigQueryLinkRequest"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListAccessBindingsResponse"; }; - return GetBigQueryLinkRequest; + return ListAccessBindingsResponse; })(); - v1alpha.ListBigQueryLinksRequest = (function() { + v1alpha.CreateAccessBindingRequest = (function() { /** - * Properties of a ListBigQueryLinksRequest. + * Properties of a CreateAccessBindingRequest. * @memberof google.analytics.admin.v1alpha - * @interface IListBigQueryLinksRequest - * @property {string|null} [parent] ListBigQueryLinksRequest parent - * @property {number|null} [pageSize] ListBigQueryLinksRequest pageSize - * @property {string|null} [pageToken] ListBigQueryLinksRequest pageToken + * @interface ICreateAccessBindingRequest + * @property {string|null} [parent] CreateAccessBindingRequest parent + * @property {google.analytics.admin.v1alpha.IAccessBinding|null} [accessBinding] CreateAccessBindingRequest accessBinding */ /** - * Constructs a new ListBigQueryLinksRequest. + * Constructs a new CreateAccessBindingRequest. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a ListBigQueryLinksRequest. - * @implements IListBigQueryLinksRequest + * @classdesc Represents a CreateAccessBindingRequest. + * @implements ICreateAccessBindingRequest * @constructor - * @param {google.analytics.admin.v1alpha.IListBigQueryLinksRequest=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.ICreateAccessBindingRequest=} [properties] Properties to set */ - function ListBigQueryLinksRequest(properties) { + function CreateAccessBindingRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34794,90 +35412,80 @@ } /** - * ListBigQueryLinksRequest parent. + * CreateAccessBindingRequest parent. * @member {string} parent - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest - * @instance - */ - ListBigQueryLinksRequest.prototype.parent = ""; - - /** - * ListBigQueryLinksRequest pageSize. - * @member {number} pageSize - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @memberof google.analytics.admin.v1alpha.CreateAccessBindingRequest * @instance */ - ListBigQueryLinksRequest.prototype.pageSize = 0; + CreateAccessBindingRequest.prototype.parent = ""; /** - * ListBigQueryLinksRequest pageToken. - * @member {string} pageToken - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * CreateAccessBindingRequest accessBinding. + * @member {google.analytics.admin.v1alpha.IAccessBinding|null|undefined} accessBinding + * @memberof google.analytics.admin.v1alpha.CreateAccessBindingRequest * @instance */ - ListBigQueryLinksRequest.prototype.pageToken = ""; + CreateAccessBindingRequest.prototype.accessBinding = null; /** - * Creates a new ListBigQueryLinksRequest instance using the specified properties. + * Creates a new CreateAccessBindingRequest instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @memberof google.analytics.admin.v1alpha.CreateAccessBindingRequest * @static - * @param {google.analytics.admin.v1alpha.IListBigQueryLinksRequest=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksRequest} ListBigQueryLinksRequest instance + * @param {google.analytics.admin.v1alpha.ICreateAccessBindingRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.CreateAccessBindingRequest} CreateAccessBindingRequest instance */ - ListBigQueryLinksRequest.create = function create(properties) { - return new ListBigQueryLinksRequest(properties); + CreateAccessBindingRequest.create = function create(properties) { + return new CreateAccessBindingRequest(properties); }; /** - * Encodes the specified ListBigQueryLinksRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksRequest.verify|verify} messages. + * Encodes the specified CreateAccessBindingRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateAccessBindingRequest.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @memberof google.analytics.admin.v1alpha.CreateAccessBindingRequest * @static - * @param {google.analytics.admin.v1alpha.IListBigQueryLinksRequest} message ListBigQueryLinksRequest message or plain object to encode + * @param {google.analytics.admin.v1alpha.ICreateAccessBindingRequest} message CreateAccessBindingRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBigQueryLinksRequest.encode = function encode(message, writer) { + CreateAccessBindingRequest.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.accessBinding != null && Object.hasOwnProperty.call(message, "accessBinding")) + $root.google.analytics.admin.v1alpha.AccessBinding.encode(message.accessBinding, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListBigQueryLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksRequest.verify|verify} messages. + * Encodes the specified CreateAccessBindingRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateAccessBindingRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @memberof google.analytics.admin.v1alpha.CreateAccessBindingRequest * @static - * @param {google.analytics.admin.v1alpha.IListBigQueryLinksRequest} message ListBigQueryLinksRequest message or plain object to encode + * @param {google.analytics.admin.v1alpha.ICreateAccessBindingRequest} message CreateAccessBindingRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBigQueryLinksRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateAccessBindingRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListBigQueryLinksRequest message from the specified reader or buffer. + * Decodes a CreateAccessBindingRequest message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @memberof google.analytics.admin.v1alpha.CreateAccessBindingRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksRequest} ListBigQueryLinksRequest + * @returns {google.analytics.admin.v1alpha.CreateAccessBindingRequest} CreateAccessBindingRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBigQueryLinksRequest.decode = function decode(reader, length) { + CreateAccessBindingRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListBigQueryLinksRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.CreateAccessBindingRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -34886,11 +35494,7 @@ break; } case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); + message.accessBinding = $root.google.analytics.admin.v1alpha.AccessBinding.decode(reader, reader.uint32()); break; } default: @@ -34902,141 +35506,138 @@ }; /** - * Decodes a ListBigQueryLinksRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateAccessBindingRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @memberof google.analytics.admin.v1alpha.CreateAccessBindingRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksRequest} ListBigQueryLinksRequest + * @returns {google.analytics.admin.v1alpha.CreateAccessBindingRequest} CreateAccessBindingRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBigQueryLinksRequest.decodeDelimited = function decodeDelimited(reader) { + CreateAccessBindingRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListBigQueryLinksRequest message. + * Verifies a CreateAccessBindingRequest message. * @function verify - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @memberof google.analytics.admin.v1alpha.CreateAccessBindingRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListBigQueryLinksRequest.verify = function verify(message) { + CreateAccessBindingRequest.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.accessBinding != null && message.hasOwnProperty("accessBinding")) { + var error = $root.google.analytics.admin.v1alpha.AccessBinding.verify(message.accessBinding); + if (error) + return "accessBinding." + error; + } return null; }; /** - * Creates a ListBigQueryLinksRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateAccessBindingRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @memberof google.analytics.admin.v1alpha.CreateAccessBindingRequest * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksRequest} ListBigQueryLinksRequest + * @returns {google.analytics.admin.v1alpha.CreateAccessBindingRequest} CreateAccessBindingRequest */ - ListBigQueryLinksRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.ListBigQueryLinksRequest) + CreateAccessBindingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.CreateAccessBindingRequest) return object; - var message = new $root.google.analytics.admin.v1alpha.ListBigQueryLinksRequest(); + var message = new $root.google.analytics.admin.v1alpha.CreateAccessBindingRequest(); 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.accessBinding != null) { + if (typeof object.accessBinding !== "object") + throw TypeError(".google.analytics.admin.v1alpha.CreateAccessBindingRequest.accessBinding: object expected"); + message.accessBinding = $root.google.analytics.admin.v1alpha.AccessBinding.fromObject(object.accessBinding); + } return message; }; /** - * Creates a plain object from a ListBigQueryLinksRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateAccessBindingRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @memberof google.analytics.admin.v1alpha.CreateAccessBindingRequest * @static - * @param {google.analytics.admin.v1alpha.ListBigQueryLinksRequest} message ListBigQueryLinksRequest + * @param {google.analytics.admin.v1alpha.CreateAccessBindingRequest} message CreateAccessBindingRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBigQueryLinksRequest.toObject = function toObject(message, options) { + CreateAccessBindingRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + object.accessBinding = null; } 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.accessBinding != null && message.hasOwnProperty("accessBinding")) + object.accessBinding = $root.google.analytics.admin.v1alpha.AccessBinding.toObject(message.accessBinding, options); return object; }; /** - * Converts this ListBigQueryLinksRequest to JSON. + * Converts this CreateAccessBindingRequest to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @memberof google.analytics.admin.v1alpha.CreateAccessBindingRequest * @instance * @returns {Object.} JSON object */ - ListBigQueryLinksRequest.prototype.toJSON = function toJSON() { + CreateAccessBindingRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListBigQueryLinksRequest + * Gets the default type url for CreateAccessBindingRequest * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @memberof google.analytics.admin.v1alpha.CreateAccessBindingRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListBigQueryLinksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateAccessBindingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListBigQueryLinksRequest"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.CreateAccessBindingRequest"; }; - return ListBigQueryLinksRequest; + return CreateAccessBindingRequest; })(); - v1alpha.ListBigQueryLinksResponse = (function() { + v1alpha.BatchCreateAccessBindingsRequest = (function() { /** - * Properties of a ListBigQueryLinksResponse. + * Properties of a BatchCreateAccessBindingsRequest. * @memberof google.analytics.admin.v1alpha - * @interface IListBigQueryLinksResponse - * @property {Array.|null} [bigqueryLinks] ListBigQueryLinksResponse bigqueryLinks - * @property {string|null} [nextPageToken] ListBigQueryLinksResponse nextPageToken + * @interface IBatchCreateAccessBindingsRequest + * @property {string|null} [parent] BatchCreateAccessBindingsRequest parent + * @property {Array.|null} [requests] BatchCreateAccessBindingsRequest requests */ /** - * Constructs a new ListBigQueryLinksResponse. + * Constructs a new BatchCreateAccessBindingsRequest. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a ListBigQueryLinksResponse. - * @implements IListBigQueryLinksResponse + * @classdesc Represents a BatchCreateAccessBindingsRequest. + * @implements IBatchCreateAccessBindingsRequest * @constructor - * @param {google.analytics.admin.v1alpha.IListBigQueryLinksResponse=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IBatchCreateAccessBindingsRequest=} [properties] Properties to set */ - function ListBigQueryLinksResponse(properties) { - this.bigqueryLinks = []; + function BatchCreateAccessBindingsRequest(properties) { + this.requests = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35044,92 +35645,92 @@ } /** - * ListBigQueryLinksResponse bigqueryLinks. - * @member {Array.} bigqueryLinks - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * BatchCreateAccessBindingsRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest * @instance */ - ListBigQueryLinksResponse.prototype.bigqueryLinks = $util.emptyArray; + BatchCreateAccessBindingsRequest.prototype.parent = ""; /** - * ListBigQueryLinksResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * BatchCreateAccessBindingsRequest requests. + * @member {Array.} requests + * @memberof google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest * @instance */ - ListBigQueryLinksResponse.prototype.nextPageToken = ""; + BatchCreateAccessBindingsRequest.prototype.requests = $util.emptyArray; /** - * Creates a new ListBigQueryLinksResponse instance using the specified properties. + * Creates a new BatchCreateAccessBindingsRequest instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @memberof google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest * @static - * @param {google.analytics.admin.v1alpha.IListBigQueryLinksResponse=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksResponse} ListBigQueryLinksResponse instance + * @param {google.analytics.admin.v1alpha.IBatchCreateAccessBindingsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest} BatchCreateAccessBindingsRequest instance */ - ListBigQueryLinksResponse.create = function create(properties) { - return new ListBigQueryLinksResponse(properties); + BatchCreateAccessBindingsRequest.create = function create(properties) { + return new BatchCreateAccessBindingsRequest(properties); }; /** - * Encodes the specified ListBigQueryLinksResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksResponse.verify|verify} messages. + * Encodes the specified BatchCreateAccessBindingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @memberof google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest * @static - * @param {google.analytics.admin.v1alpha.IListBigQueryLinksResponse} message ListBigQueryLinksResponse message or plain object to encode + * @param {google.analytics.admin.v1alpha.IBatchCreateAccessBindingsRequest} message BatchCreateAccessBindingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBigQueryLinksResponse.encode = function encode(message, writer) { + BatchCreateAccessBindingsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.bigqueryLinks != null && message.bigqueryLinks.length) - for (var i = 0; i < message.bigqueryLinks.length; ++i) - $root.google.analytics.admin.v1alpha.BigQueryLink.encode(message.bigqueryLinks[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.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.requests != null && message.requests.length) + for (var i = 0; i < message.requests.length; ++i) + $root.google.analytics.admin.v1alpha.CreateAccessBindingRequest.encode(message.requests[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListBigQueryLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksResponse.verify|verify} messages. + * Encodes the specified BatchCreateAccessBindingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @memberof google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest * @static - * @param {google.analytics.admin.v1alpha.IListBigQueryLinksResponse} message ListBigQueryLinksResponse message or plain object to encode + * @param {google.analytics.admin.v1alpha.IBatchCreateAccessBindingsRequest} message BatchCreateAccessBindingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBigQueryLinksResponse.encodeDelimited = function encodeDelimited(message, writer) { + BatchCreateAccessBindingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListBigQueryLinksResponse message from the specified reader or buffer. + * Decodes a BatchCreateAccessBindingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @memberof google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksResponse} ListBigQueryLinksResponse + * @returns {google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest} BatchCreateAccessBindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBigQueryLinksResponse.decode = function decode(reader, length) { + BatchCreateAccessBindingsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListBigQueryLinksResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.bigqueryLinks && message.bigqueryLinks.length)) - message.bigqueryLinks = []; - message.bigqueryLinks.push($root.google.analytics.admin.v1alpha.BigQueryLink.decode(reader, reader.uint32())); + message.parent = reader.string(); break; } - case 2: { - message.nextPageToken = reader.string(); + case 3: { + if (!(message.requests && message.requests.length)) + message.requests = []; + message.requests.push($root.google.analytics.admin.v1alpha.CreateAccessBindingRequest.decode(reader, reader.uint32())); break; } default: @@ -35141,172 +35742,149 @@ }; /** - * Decodes a ListBigQueryLinksResponse message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateAccessBindingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @memberof google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksResponse} ListBigQueryLinksResponse + * @returns {google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest} BatchCreateAccessBindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBigQueryLinksResponse.decodeDelimited = function decodeDelimited(reader) { + BatchCreateAccessBindingsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListBigQueryLinksResponse message. + * Verifies a BatchCreateAccessBindingsRequest message. * @function verify - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @memberof google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListBigQueryLinksResponse.verify = function verify(message) { + BatchCreateAccessBindingsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.bigqueryLinks != null && message.hasOwnProperty("bigqueryLinks")) { - if (!Array.isArray(message.bigqueryLinks)) - return "bigqueryLinks: array expected"; - for (var i = 0; i < message.bigqueryLinks.length; ++i) { - var error = $root.google.analytics.admin.v1alpha.BigQueryLink.verify(message.bigqueryLinks[i]); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.requests != null && message.hasOwnProperty("requests")) { + if (!Array.isArray(message.requests)) + return "requests: array expected"; + for (var i = 0; i < message.requests.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.CreateAccessBindingRequest.verify(message.requests[i]); if (error) - return "bigqueryLinks." + error; + return "requests." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListBigQueryLinksResponse message from a plain object. Also converts values to their respective internal types. + * Creates a BatchCreateAccessBindingsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @memberof google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksResponse} ListBigQueryLinksResponse + * @returns {google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest} BatchCreateAccessBindingsRequest */ - ListBigQueryLinksResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.ListBigQueryLinksResponse) + BatchCreateAccessBindingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest) return object; - var message = new $root.google.analytics.admin.v1alpha.ListBigQueryLinksResponse(); - if (object.bigqueryLinks) { - if (!Array.isArray(object.bigqueryLinks)) - throw TypeError(".google.analytics.admin.v1alpha.ListBigQueryLinksResponse.bigqueryLinks: array expected"); - message.bigqueryLinks = []; - for (var i = 0; i < object.bigqueryLinks.length; ++i) { - if (typeof object.bigqueryLinks[i] !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ListBigQueryLinksResponse.bigqueryLinks: object expected"); - message.bigqueryLinks[i] = $root.google.analytics.admin.v1alpha.BigQueryLink.fromObject(object.bigqueryLinks[i]); + var message = new $root.google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.requests) { + if (!Array.isArray(object.requests)) + throw TypeError(".google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest.requests: array expected"); + message.requests = []; + for (var i = 0; i < object.requests.length; ++i) { + if (typeof object.requests[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest.requests: object expected"); + message.requests[i] = $root.google.analytics.admin.v1alpha.CreateAccessBindingRequest.fromObject(object.requests[i]); } } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListBigQueryLinksResponse message. Also converts values to other types if specified. + * Creates a plain object from a BatchCreateAccessBindingsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @memberof google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest * @static - * @param {google.analytics.admin.v1alpha.ListBigQueryLinksResponse} message ListBigQueryLinksResponse + * @param {google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest} message BatchCreateAccessBindingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBigQueryLinksResponse.toObject = function toObject(message, options) { + BatchCreateAccessBindingsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.bigqueryLinks = []; + object.requests = []; if (options.defaults) - object.nextPageToken = ""; - if (message.bigqueryLinks && message.bigqueryLinks.length) { - object.bigqueryLinks = []; - for (var j = 0; j < message.bigqueryLinks.length; ++j) - object.bigqueryLinks[j] = $root.google.analytics.admin.v1alpha.BigQueryLink.toObject(message.bigqueryLinks[j], options); + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.requests && message.requests.length) { + object.requests = []; + for (var j = 0; j < message.requests.length; ++j) + object.requests[j] = $root.google.analytics.admin.v1alpha.CreateAccessBindingRequest.toObject(message.requests[j], options); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListBigQueryLinksResponse to JSON. + * Converts this BatchCreateAccessBindingsRequest to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @memberof google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest * @instance * @returns {Object.} JSON object */ - ListBigQueryLinksResponse.prototype.toJSON = function toJSON() { + BatchCreateAccessBindingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListBigQueryLinksResponse + * Gets the default type url for BatchCreateAccessBindingsRequest * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @memberof google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListBigQueryLinksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchCreateAccessBindingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListBigQueryLinksResponse"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest"; }; - return ListBigQueryLinksResponse; - })(); - - /** - * AudienceFilterScope enum. - * @name google.analytics.admin.v1alpha.AudienceFilterScope - * @enum {number} - * @property {number} AUDIENCE_FILTER_SCOPE_UNSPECIFIED=0 AUDIENCE_FILTER_SCOPE_UNSPECIFIED value - * @property {number} AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT=1 AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT value - * @property {number} AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION=2 AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION value - * @property {number} AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS=3 AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS value - */ - v1alpha.AudienceFilterScope = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "AUDIENCE_FILTER_SCOPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT"] = 1; - values[valuesById[2] = "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION"] = 2; - values[valuesById[3] = "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS"] = 3; - return values; + return BatchCreateAccessBindingsRequest; })(); - v1alpha.AudienceDimensionOrMetricFilter = (function() { + v1alpha.BatchCreateAccessBindingsResponse = (function() { /** - * Properties of an AudienceDimensionOrMetricFilter. + * Properties of a BatchCreateAccessBindingsResponse. * @memberof google.analytics.admin.v1alpha - * @interface IAudienceDimensionOrMetricFilter - * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter|null} [stringFilter] AudienceDimensionOrMetricFilter stringFilter - * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter|null} [inListFilter] AudienceDimensionOrMetricFilter inListFilter - * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter|null} [numericFilter] AudienceDimensionOrMetricFilter numericFilter - * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter|null} [betweenFilter] AudienceDimensionOrMetricFilter betweenFilter - * @property {string|null} [fieldName] AudienceDimensionOrMetricFilter fieldName - * @property {boolean|null} [atAnyPointInTime] AudienceDimensionOrMetricFilter atAnyPointInTime - * @property {number|null} [inAnyNDayPeriod] AudienceDimensionOrMetricFilter inAnyNDayPeriod + * @interface IBatchCreateAccessBindingsResponse + * @property {Array.|null} [accessBindings] BatchCreateAccessBindingsResponse accessBindings */ /** - * Constructs a new AudienceDimensionOrMetricFilter. + * Constructs a new BatchCreateAccessBindingsResponse. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents an AudienceDimensionOrMetricFilter. - * @implements IAudienceDimensionOrMetricFilter + * @classdesc Represents a BatchCreateAccessBindingsResponse. + * @implements IBatchCreateAccessBindingsResponse * @constructor - * @param {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IBatchCreateAccessBindingsResponse=} [properties] Properties to set */ - function AudienceDimensionOrMetricFilter(properties) { + function BatchCreateAccessBindingsResponse(properties) { + this.accessBindings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35314,173 +35892,78 @@ } /** - * AudienceDimensionOrMetricFilter stringFilter. - * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter|null|undefined} stringFilter - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @instance - */ - AudienceDimensionOrMetricFilter.prototype.stringFilter = null; - - /** - * AudienceDimensionOrMetricFilter inListFilter. - * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter|null|undefined} inListFilter - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @instance - */ - AudienceDimensionOrMetricFilter.prototype.inListFilter = null; - - /** - * AudienceDimensionOrMetricFilter numericFilter. - * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter|null|undefined} numericFilter - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @instance - */ - AudienceDimensionOrMetricFilter.prototype.numericFilter = null; - - /** - * AudienceDimensionOrMetricFilter betweenFilter. - * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter|null|undefined} betweenFilter - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @instance - */ - AudienceDimensionOrMetricFilter.prototype.betweenFilter = null; - - /** - * AudienceDimensionOrMetricFilter fieldName. - * @member {string} fieldName - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @instance - */ - AudienceDimensionOrMetricFilter.prototype.fieldName = ""; - - /** - * AudienceDimensionOrMetricFilter atAnyPointInTime. - * @member {boolean} atAnyPointInTime - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @instance - */ - AudienceDimensionOrMetricFilter.prototype.atAnyPointInTime = false; - - /** - * AudienceDimensionOrMetricFilter inAnyNDayPeriod. - * @member {number} inAnyNDayPeriod - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @instance - */ - AudienceDimensionOrMetricFilter.prototype.inAnyNDayPeriod = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AudienceDimensionOrMetricFilter oneFilter. - * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * BatchCreateAccessBindingsResponse accessBindings. + * @member {Array.} accessBindings + * @memberof google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse * @instance */ - Object.defineProperty(AudienceDimensionOrMetricFilter.prototype, "oneFilter", { - get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); + BatchCreateAccessBindingsResponse.prototype.accessBindings = $util.emptyArray; /** - * Creates a new AudienceDimensionOrMetricFilter instance using the specified properties. + * Creates a new BatchCreateAccessBindingsResponse instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @memberof google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse * @static - * @param {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter} AudienceDimensionOrMetricFilter instance + * @param {google.analytics.admin.v1alpha.IBatchCreateAccessBindingsResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse} BatchCreateAccessBindingsResponse instance */ - AudienceDimensionOrMetricFilter.create = function create(properties) { - return new AudienceDimensionOrMetricFilter(properties); + BatchCreateAccessBindingsResponse.create = function create(properties) { + return new BatchCreateAccessBindingsResponse(properties); }; /** - * Encodes the specified AudienceDimensionOrMetricFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.verify|verify} messages. + * Encodes the specified BatchCreateAccessBindingsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @memberof google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse * @static - * @param {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter} message AudienceDimensionOrMetricFilter message or plain object to encode + * @param {google.analytics.admin.v1alpha.IBatchCreateAccessBindingsResponse} message BatchCreateAccessBindingsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceDimensionOrMetricFilter.encode = function encode(message, writer) { + BatchCreateAccessBindingsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); - if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) - $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.encode(message.stringFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) - $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.encode(message.inListFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) - $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) - $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.atAnyPointInTime != null && Object.hasOwnProperty.call(message, "atAnyPointInTime")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.atAnyPointInTime); - if (message.inAnyNDayPeriod != null && Object.hasOwnProperty.call(message, "inAnyNDayPeriod")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.inAnyNDayPeriod); + if (message.accessBindings != null && message.accessBindings.length) + for (var i = 0; i < message.accessBindings.length; ++i) + $root.google.analytics.admin.v1alpha.AccessBinding.encode(message.accessBindings[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified AudienceDimensionOrMetricFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.verify|verify} messages. + * Encodes the specified BatchCreateAccessBindingsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @memberof google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse * @static - * @param {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter} message AudienceDimensionOrMetricFilter message or plain object to encode + * @param {google.analytics.admin.v1alpha.IBatchCreateAccessBindingsResponse} message BatchCreateAccessBindingsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceDimensionOrMetricFilter.encodeDelimited = function encodeDelimited(message, writer) { + BatchCreateAccessBindingsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AudienceDimensionOrMetricFilter message from the specified reader or buffer. + * Decodes a BatchCreateAccessBindingsResponse message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @memberof google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter} AudienceDimensionOrMetricFilter + * @returns {google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse} BatchCreateAccessBindingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceDimensionOrMetricFilter.decode = function decode(reader, length) { + BatchCreateAccessBindingsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: { - message.stringFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.decode(reader, reader.uint32()); - break; - } - case 3: { - message.inListFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.decode(reader, reader.uint32()); - break; - } - case 4: { - message.numericFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.decode(reader, reader.uint32()); - break; - } - case 5: { - message.betweenFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.decode(reader, reader.uint32()); - break; - } case 1: { - message.fieldName = reader.string(); - break; - } - case 6: { - message.atAnyPointInTime = reader.bool(); - break; - } - case 7: { - message.inAnyNDayPeriod = reader.int32(); + if (!(message.accessBindings && message.accessBindings.length)) + message.accessBindings = []; + message.accessBindings.push($root.google.analytics.admin.v1alpha.AccessBinding.decode(reader, reader.uint32())); break; } default: @@ -35492,1549 +35975,1024 @@ }; /** - * Decodes an AudienceDimensionOrMetricFilter message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateAccessBindingsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @memberof google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter} AudienceDimensionOrMetricFilter + * @returns {google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse} BatchCreateAccessBindingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceDimensionOrMetricFilter.decodeDelimited = function decodeDelimited(reader) { + BatchCreateAccessBindingsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AudienceDimensionOrMetricFilter message. + * Verifies a BatchCreateAccessBindingsResponse message. * @function verify - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @memberof google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AudienceDimensionOrMetricFilter.verify = function verify(message) { + BatchCreateAccessBindingsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { - properties.oneFilter = 1; - { - var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.verify(message.stringFilter); - if (error) - return "stringFilter." + error; - } - } - if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.verify(message.inListFilter); - if (error) - return "inListFilter." + error; - } - } - if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.verify(message.numericFilter); - if (error) - return "numericFilter." + error; - } - } - if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.verify(message.betweenFilter); + if (message.accessBindings != null && message.hasOwnProperty("accessBindings")) { + if (!Array.isArray(message.accessBindings)) + return "accessBindings: array expected"; + for (var i = 0; i < message.accessBindings.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.AccessBinding.verify(message.accessBindings[i]); if (error) - return "betweenFilter." + error; + return "accessBindings." + error; } } - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - if (!$util.isString(message.fieldName)) - return "fieldName: string expected"; - if (message.atAnyPointInTime != null && message.hasOwnProperty("atAnyPointInTime")) - if (typeof message.atAnyPointInTime !== "boolean") - return "atAnyPointInTime: boolean expected"; - if (message.inAnyNDayPeriod != null && message.hasOwnProperty("inAnyNDayPeriod")) - if (!$util.isInteger(message.inAnyNDayPeriod)) - return "inAnyNDayPeriod: integer expected"; return null; }; /** - * Creates an AudienceDimensionOrMetricFilter message from a plain object. Also converts values to their respective internal types. + * Creates a BatchCreateAccessBindingsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @memberof google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter} AudienceDimensionOrMetricFilter + * @returns {google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse} BatchCreateAccessBindingsResponse */ - AudienceDimensionOrMetricFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter) + BatchCreateAccessBindingsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse) return object; - var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter(); - if (object.stringFilter != null) { - if (typeof object.stringFilter !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.stringFilter: object expected"); - message.stringFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.fromObject(object.stringFilter); - } - if (object.inListFilter != null) { - if (typeof object.inListFilter !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.inListFilter: object expected"); - message.inListFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.fromObject(object.inListFilter); - } - if (object.numericFilter != null) { - if (typeof object.numericFilter !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.numericFilter: object expected"); - message.numericFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.fromObject(object.numericFilter); - } - if (object.betweenFilter != null) { - if (typeof object.betweenFilter !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.betweenFilter: object expected"); - message.betweenFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.fromObject(object.betweenFilter); + var message = new $root.google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse(); + if (object.accessBindings) { + if (!Array.isArray(object.accessBindings)) + throw TypeError(".google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse.accessBindings: array expected"); + message.accessBindings = []; + for (var i = 0; i < object.accessBindings.length; ++i) { + if (typeof object.accessBindings[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse.accessBindings: object expected"); + message.accessBindings[i] = $root.google.analytics.admin.v1alpha.AccessBinding.fromObject(object.accessBindings[i]); + } } - if (object.fieldName != null) - message.fieldName = String(object.fieldName); - if (object.atAnyPointInTime != null) - message.atAnyPointInTime = Boolean(object.atAnyPointInTime); - if (object.inAnyNDayPeriod != null) - message.inAnyNDayPeriod = object.inAnyNDayPeriod | 0; return message; }; /** - * Creates a plain object from an AudienceDimensionOrMetricFilter message. Also converts values to other types if specified. + * Creates a plain object from a BatchCreateAccessBindingsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @memberof google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter} message AudienceDimensionOrMetricFilter + * @param {google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse} message BatchCreateAccessBindingsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AudienceDimensionOrMetricFilter.toObject = function toObject(message, options) { + BatchCreateAccessBindingsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.fieldName = ""; - object.atAnyPointInTime = false; - object.inAnyNDayPeriod = 0; - } - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - object.fieldName = message.fieldName; - if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { - object.stringFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.toObject(message.stringFilter, options); - if (options.oneofs) - object.oneFilter = "stringFilter"; - } - if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { - object.inListFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.toObject(message.inListFilter, options); - if (options.oneofs) - object.oneFilter = "inListFilter"; - } - if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { - object.numericFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.toObject(message.numericFilter, options); - if (options.oneofs) - object.oneFilter = "numericFilter"; - } - if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { - object.betweenFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.toObject(message.betweenFilter, options); - if (options.oneofs) - object.oneFilter = "betweenFilter"; + if (options.arrays || options.defaults) + object.accessBindings = []; + if (message.accessBindings && message.accessBindings.length) { + object.accessBindings = []; + for (var j = 0; j < message.accessBindings.length; ++j) + object.accessBindings[j] = $root.google.analytics.admin.v1alpha.AccessBinding.toObject(message.accessBindings[j], options); } - if (message.atAnyPointInTime != null && message.hasOwnProperty("atAnyPointInTime")) - object.atAnyPointInTime = message.atAnyPointInTime; - if (message.inAnyNDayPeriod != null && message.hasOwnProperty("inAnyNDayPeriod")) - object.inAnyNDayPeriod = message.inAnyNDayPeriod; return object; }; /** - * Converts this AudienceDimensionOrMetricFilter to JSON. + * Converts this BatchCreateAccessBindingsResponse to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @memberof google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse * @instance * @returns {Object.} JSON object */ - AudienceDimensionOrMetricFilter.prototype.toJSON = function toJSON() { + BatchCreateAccessBindingsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AudienceDimensionOrMetricFilter + * Gets the default type url for BatchCreateAccessBindingsResponse * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @memberof google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AudienceDimensionOrMetricFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchCreateAccessBindingsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse"; }; - AudienceDimensionOrMetricFilter.StringFilter = (function() { - - /** - * Properties of a StringFilter. - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @interface IStringFilter - * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType|null} [matchType] StringFilter matchType - * @property {string|null} [value] StringFilter value - * @property {boolean|null} [caseSensitive] StringFilter caseSensitive - */ - - /** - * Constructs a new StringFilter. - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @classdesc Represents a StringFilter. - * @implements IStringFilter - * @constructor - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter=} [properties] Properties to set - */ - function StringFilter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StringFilter matchType. - * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType} matchType - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter - * @instance - */ - StringFilter.prototype.matchType = 0; + return BatchCreateAccessBindingsResponse; + })(); - /** - * StringFilter value. - * @member {string} value - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter - * @instance - */ - StringFilter.prototype.value = ""; + v1alpha.UpdateAccessBindingRequest = (function() { - /** - * StringFilter caseSensitive. - * @member {boolean} caseSensitive - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter - * @instance - */ - StringFilter.prototype.caseSensitive = false; + /** + * Properties of an UpdateAccessBindingRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IUpdateAccessBindingRequest + * @property {google.analytics.admin.v1alpha.IAccessBinding|null} [accessBinding] UpdateAccessBindingRequest accessBinding + */ - /** - * Creates a new StringFilter instance using the specified properties. - * @function create - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter} StringFilter instance - */ - StringFilter.create = function create(properties) { - return new StringFilter(properties); - }; + /** + * Constructs a new UpdateAccessBindingRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an UpdateAccessBindingRequest. + * @implements IUpdateAccessBindingRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IUpdateAccessBindingRequest=} [properties] Properties to set + */ + function UpdateAccessBindingRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.verify|verify} messages. - * @function encode - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter} message StringFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.matchType != null && Object.hasOwnProperty.call(message, "matchType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.matchType); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.caseSensitive); - return writer; - }; + /** + * UpdateAccessBindingRequest accessBinding. + * @member {google.analytics.admin.v1alpha.IAccessBinding|null|undefined} accessBinding + * @memberof google.analytics.admin.v1alpha.UpdateAccessBindingRequest + * @instance + */ + UpdateAccessBindingRequest.prototype.accessBinding = null; - /** - * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter} message StringFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new UpdateAccessBindingRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.UpdateAccessBindingRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateAccessBindingRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.UpdateAccessBindingRequest} UpdateAccessBindingRequest instance + */ + UpdateAccessBindingRequest.create = function create(properties) { + return new UpdateAccessBindingRequest(properties); + }; - /** - * Decodes a StringFilter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter} StringFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringFilter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.matchType = reader.int32(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - case 3: { - message.caseSensitive = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified UpdateAccessBindingRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateAccessBindingRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.UpdateAccessBindingRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateAccessBindingRequest} message UpdateAccessBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAccessBindingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accessBinding != null && Object.hasOwnProperty.call(message, "accessBinding")) + $root.google.analytics.admin.v1alpha.AccessBinding.encode(message.accessBinding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Decodes a StringFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter} StringFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified UpdateAccessBindingRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateAccessBindingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateAccessBindingRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateAccessBindingRequest} message UpdateAccessBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAccessBindingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a StringFilter message. - * @function verify - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StringFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.matchType != null && message.hasOwnProperty("matchType")) - switch (message.matchType) { - default: - return "matchType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: + /** + * Decodes an UpdateAccessBindingRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.UpdateAccessBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.UpdateAccessBindingRequest} UpdateAccessBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAccessBindingRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.UpdateAccessBindingRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.accessBinding = $root.google.analytics.admin.v1alpha.AccessBinding.decode(reader, reader.uint32()); break; } - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) - if (typeof message.caseSensitive !== "boolean") - return "caseSensitive: boolean expected"; - return null; - }; - - /** - * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter} StringFilter - */ - StringFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter) - return object; - var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter(); - switch (object.matchType) { default: - if (typeof object.matchType === "number") { - message.matchType = object.matchType; - break; - } - break; - case "MATCH_TYPE_UNSPECIFIED": - case 0: - message.matchType = 0; - break; - case "EXACT": - case 1: - message.matchType = 1; - break; - case "BEGINS_WITH": - case 2: - message.matchType = 2; - break; - case "ENDS_WITH": - case 3: - message.matchType = 3; - break; - case "CONTAINS": - case 4: - message.matchType = 4; - break; - case "FULL_REGEXP": - case 5: - message.matchType = 5; + reader.skipType(tag & 7); break; } - if (object.value != null) - message.value = String(object.value); - if (object.caseSensitive != null) - message.caseSensitive = Boolean(object.caseSensitive); - return message; - }; - - /** - * Creates a plain object from a StringFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter} message StringFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StringFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.matchType = options.enums === String ? "MATCH_TYPE_UNSPECIFIED" : 0; - object.value = ""; - object.caseSensitive = false; - } - if (message.matchType != null && message.hasOwnProperty("matchType")) - object.matchType = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType[message.matchType] === undefined ? message.matchType : $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType[message.matchType] : message.matchType; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) - object.caseSensitive = message.caseSensitive; - return object; - }; - - /** - * Converts this StringFilter to JSON. - * @function toJSON - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter - * @instance - * @returns {Object.} JSON object - */ - StringFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + } + return message; + }; - /** - * Gets the default type url for StringFilter - * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StringFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter"; - }; + /** + * Decodes an UpdateAccessBindingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateAccessBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.UpdateAccessBindingRequest} UpdateAccessBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAccessBindingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * MatchType enum. - * @name google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType - * @enum {number} - * @property {number} MATCH_TYPE_UNSPECIFIED=0 MATCH_TYPE_UNSPECIFIED value - * @property {number} EXACT=1 EXACT value - * @property {number} BEGINS_WITH=2 BEGINS_WITH value - * @property {number} ENDS_WITH=3 ENDS_WITH value - * @property {number} CONTAINS=4 CONTAINS value - * @property {number} FULL_REGEXP=5 FULL_REGEXP value - */ - StringFilter.MatchType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MATCH_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "EXACT"] = 1; - values[valuesById[2] = "BEGINS_WITH"] = 2; - values[valuesById[3] = "ENDS_WITH"] = 3; - values[valuesById[4] = "CONTAINS"] = 4; - values[valuesById[5] = "FULL_REGEXP"] = 5; - return values; - })(); + /** + * Verifies an UpdateAccessBindingRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.UpdateAccessBindingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateAccessBindingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.accessBinding != null && message.hasOwnProperty("accessBinding")) { + var error = $root.google.analytics.admin.v1alpha.AccessBinding.verify(message.accessBinding); + if (error) + return "accessBinding." + error; + } + return null; + }; - return StringFilter; - })(); + /** + * Creates an UpdateAccessBindingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.UpdateAccessBindingRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.UpdateAccessBindingRequest} UpdateAccessBindingRequest + */ + UpdateAccessBindingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.UpdateAccessBindingRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.UpdateAccessBindingRequest(); + if (object.accessBinding != null) { + if (typeof object.accessBinding !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateAccessBindingRequest.accessBinding: object expected"); + message.accessBinding = $root.google.analytics.admin.v1alpha.AccessBinding.fromObject(object.accessBinding); + } + return message; + }; - AudienceDimensionOrMetricFilter.InListFilter = (function() { + /** + * Creates a plain object from an UpdateAccessBindingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.UpdateAccessBindingRequest + * @static + * @param {google.analytics.admin.v1alpha.UpdateAccessBindingRequest} message UpdateAccessBindingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateAccessBindingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.accessBinding = null; + if (message.accessBinding != null && message.hasOwnProperty("accessBinding")) + object.accessBinding = $root.google.analytics.admin.v1alpha.AccessBinding.toObject(message.accessBinding, options); + return object; + }; - /** - * Properties of an InListFilter. - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @interface IInListFilter - * @property {Array.|null} [values] InListFilter values - * @property {boolean|null} [caseSensitive] InListFilter caseSensitive - */ + /** + * Converts this UpdateAccessBindingRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.UpdateAccessBindingRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateAccessBindingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new InListFilter. - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @classdesc Represents an InListFilter. - * @implements IInListFilter - * @constructor - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter=} [properties] Properties to set - */ - function InListFilter(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]]; + /** + * Gets the default type url for UpdateAccessBindingRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.UpdateAccessBindingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateAccessBindingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.UpdateAccessBindingRequest"; + }; - /** - * InListFilter values. - * @member {Array.} values - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter - * @instance - */ - InListFilter.prototype.values = $util.emptyArray; + return UpdateAccessBindingRequest; + })(); - /** - * InListFilter caseSensitive. - * @member {boolean} caseSensitive - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter - * @instance - */ - InListFilter.prototype.caseSensitive = false; + v1alpha.BatchUpdateAccessBindingsRequest = (function() { - /** - * Creates a new InListFilter instance using the specified properties. - * @function create - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter} InListFilter instance - */ - InListFilter.create = function create(properties) { - return new InListFilter(properties); - }; + /** + * Properties of a BatchUpdateAccessBindingsRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IBatchUpdateAccessBindingsRequest + * @property {string|null} [parent] BatchUpdateAccessBindingsRequest parent + * @property {Array.|null} [requests] BatchUpdateAccessBindingsRequest requests + */ - /** - * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.verify|verify} messages. - * @function encode - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter} message InListFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InListFilter.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) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]); - if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.caseSensitive); - return writer; - }; + /** + * Constructs a new BatchUpdateAccessBindingsRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a BatchUpdateAccessBindingsRequest. + * @implements IBatchUpdateAccessBindingsRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsRequest=} [properties] Properties to set + */ + function BatchUpdateAccessBindingsRequest(properties) { + this.requests = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter} message InListFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InListFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * BatchUpdateAccessBindingsRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest + * @instance + */ + BatchUpdateAccessBindingsRequest.prototype.parent = ""; - /** - * Decodes an InListFilter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter} InListFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InListFilter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push(reader.string()); - break; - } - case 2: { - message.caseSensitive = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * BatchUpdateAccessBindingsRequest requests. + * @member {Array.} requests + * @memberof google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest + * @instance + */ + BatchUpdateAccessBindingsRequest.prototype.requests = $util.emptyArray; - /** - * Decodes an InListFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter} InListFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InListFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new BatchUpdateAccessBindingsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest} BatchUpdateAccessBindingsRequest instance + */ + BatchUpdateAccessBindingsRequest.create = function create(properties) { + return new BatchUpdateAccessBindingsRequest(properties); + }; - /** - * Verifies an InListFilter message. - * @function verify - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InListFilter.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) - if (!$util.isString(message.values[i])) - return "values: string[] expected"; - } - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) - if (typeof message.caseSensitive !== "boolean") - return "caseSensitive: boolean expected"; - return null; - }; + /** + * Encodes the specified BatchUpdateAccessBindingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsRequest} message BatchUpdateAccessBindingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchUpdateAccessBindingsRequest.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.requests != null && message.requests.length) + for (var i = 0; i < message.requests.length; ++i) + $root.google.analytics.admin.v1alpha.UpdateAccessBindingRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Creates an InListFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter} InListFilter - */ - InListFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter) - return object; - var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter(); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) - message.values[i] = String(object.values[i]); - } - if (object.caseSensitive != null) - message.caseSensitive = Boolean(object.caseSensitive); - return message; - }; + /** + * Encodes the specified BatchUpdateAccessBindingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsRequest} message BatchUpdateAccessBindingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchUpdateAccessBindingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from an InListFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter} message InListFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InListFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (options.defaults) - object.caseSensitive = false; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = message.values[j]; + /** + * Decodes a BatchUpdateAccessBindingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest} BatchUpdateAccessBindingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchUpdateAccessBindingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + if (!(message.requests && message.requests.length)) + message.requests = []; + message.requests.push($root.google.analytics.admin.v1alpha.UpdateAccessBindingRequest.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; } - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) - object.caseSensitive = message.caseSensitive; - return object; - }; + } + return message; + }; - /** - * Converts this InListFilter to JSON. - * @function toJSON - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter - * @instance - * @returns {Object.} JSON object - */ - InListFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a BatchUpdateAccessBindingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest} BatchUpdateAccessBindingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchUpdateAccessBindingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for InListFilter - * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InListFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Verifies a BatchUpdateAccessBindingsRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchUpdateAccessBindingsRequest.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.requests != null && message.hasOwnProperty("requests")) { + if (!Array.isArray(message.requests)) + return "requests: array expected"; + for (var i = 0; i < message.requests.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.UpdateAccessBindingRequest.verify(message.requests[i]); + if (error) + return "requests." + error; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter"; - }; + } + return null; + }; - return InListFilter; - })(); + /** + * Creates a BatchUpdateAccessBindingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest} BatchUpdateAccessBindingsRequest + */ + BatchUpdateAccessBindingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.requests) { + if (!Array.isArray(object.requests)) + throw TypeError(".google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest.requests: array expected"); + message.requests = []; + for (var i = 0; i < object.requests.length; ++i) { + if (typeof object.requests[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest.requests: object expected"); + message.requests[i] = $root.google.analytics.admin.v1alpha.UpdateAccessBindingRequest.fromObject(object.requests[i]); + } + } + return message; + }; - AudienceDimensionOrMetricFilter.NumericValue = (function() { + /** + * Creates a plain object from a BatchUpdateAccessBindingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest + * @static + * @param {google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest} message BatchUpdateAccessBindingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchUpdateAccessBindingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.requests = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.requests && message.requests.length) { + object.requests = []; + for (var j = 0; j < message.requests.length; ++j) + object.requests[j] = $root.google.analytics.admin.v1alpha.UpdateAccessBindingRequest.toObject(message.requests[j], options); + } + return object; + }; - /** - * Properties of a NumericValue. - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @interface INumericValue - * @property {number|Long|null} [int64Value] NumericValue int64Value - * @property {number|null} [doubleValue] NumericValue doubleValue - */ + /** + * Converts this BatchUpdateAccessBindingsRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest + * @instance + * @returns {Object.} JSON object + */ + BatchUpdateAccessBindingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new NumericValue. - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @classdesc Represents a NumericValue. - * @implements INumericValue - * @constructor - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue=} [properties] Properties to set - */ - function NumericValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Gets the default type url for BatchUpdateAccessBindingsRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchUpdateAccessBindingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest"; + }; - /** - * NumericValue int64Value. - * @member {number|Long|null|undefined} int64Value - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue - * @instance - */ - NumericValue.prototype.int64Value = null; + return BatchUpdateAccessBindingsRequest; + })(); - /** - * NumericValue doubleValue. - * @member {number|null|undefined} doubleValue - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue - * @instance - */ - NumericValue.prototype.doubleValue = null; + v1alpha.BatchUpdateAccessBindingsResponse = (function() { - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Properties of a BatchUpdateAccessBindingsResponse. + * @memberof google.analytics.admin.v1alpha + * @interface IBatchUpdateAccessBindingsResponse + * @property {Array.|null} [accessBindings] BatchUpdateAccessBindingsResponse accessBindings + */ - /** - * NumericValue oneValue. - * @member {"int64Value"|"doubleValue"|undefined} oneValue - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue - * @instance - */ - Object.defineProperty(NumericValue.prototype, "oneValue", { - get: $util.oneOfGetter($oneOfFields = ["int64Value", "doubleValue"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Constructs a new BatchUpdateAccessBindingsResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a BatchUpdateAccessBindingsResponse. + * @implements IBatchUpdateAccessBindingsResponse + * @constructor + * @param {google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsResponse=} [properties] Properties to set + */ + function BatchUpdateAccessBindingsResponse(properties) { + this.accessBindings = []; + if (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 NumericValue instance using the specified properties. - * @function create - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue} NumericValue instance - */ - NumericValue.create = function create(properties) { - return new NumericValue(properties); - }; + /** + * BatchUpdateAccessBindingsResponse accessBindings. + * @member {Array.} accessBindings + * @memberof google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse + * @instance + */ + BatchUpdateAccessBindingsResponse.prototype.accessBindings = $util.emptyArray; - /** - * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify|verify} messages. - * @function encode - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue} message NumericValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NumericValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.int64Value != null && Object.hasOwnProperty.call(message, "int64Value")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.int64Value); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.doubleValue); - return writer; - }; + /** + * Creates a new BatchUpdateAccessBindingsResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse + * @static + * @param {google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse} BatchUpdateAccessBindingsResponse instance + */ + BatchUpdateAccessBindingsResponse.create = function create(properties) { + return new BatchUpdateAccessBindingsResponse(properties); + }; - /** - * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue} message NumericValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NumericValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified BatchUpdateAccessBindingsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse + * @static + * @param {google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsResponse} message BatchUpdateAccessBindingsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchUpdateAccessBindingsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accessBindings != null && message.accessBindings.length) + for (var i = 0; i < message.accessBindings.length; ++i) + $root.google.analytics.admin.v1alpha.AccessBinding.encode(message.accessBindings[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Decodes a NumericValue message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue} NumericValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NumericValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.int64Value = reader.int64(); - break; - } - case 2: { - message.doubleValue = reader.double(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified BatchUpdateAccessBindingsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse + * @static + * @param {google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsResponse} message BatchUpdateAccessBindingsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchUpdateAccessBindingsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchUpdateAccessBindingsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse} BatchUpdateAccessBindingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchUpdateAccessBindingsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.accessBindings && message.accessBindings.length)) + message.accessBindings = []; + message.accessBindings.push($root.google.analytics.admin.v1alpha.AccessBinding.decode(reader, reader.uint32())); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes a NumericValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue} NumericValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NumericValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a BatchUpdateAccessBindingsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse} BatchUpdateAccessBindingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchUpdateAccessBindingsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a NumericValue message. - * @function verify - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NumericValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.int64Value != null && message.hasOwnProperty("int64Value")) { - properties.oneValue = 1; - if (!$util.isInteger(message.int64Value) && !(message.int64Value && $util.isInteger(message.int64Value.low) && $util.isInteger(message.int64Value.high))) - return "int64Value: integer|Long expected"; + /** + * Verifies a BatchUpdateAccessBindingsResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchUpdateAccessBindingsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.accessBindings != null && message.hasOwnProperty("accessBindings")) { + if (!Array.isArray(message.accessBindings)) + return "accessBindings: array expected"; + for (var i = 0; i < message.accessBindings.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.AccessBinding.verify(message.accessBindings[i]); + if (error) + return "accessBindings." + error; } - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - if (properties.oneValue === 1) - return "oneValue: multiple values"; - properties.oneValue = 1; - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - } - return null; - }; - - /** - * Creates a NumericValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue} NumericValue - */ - NumericValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue) - return object; - var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue(); - if (object.int64Value != null) - if ($util.Long) - (message.int64Value = $util.Long.fromValue(object.int64Value)).unsigned = false; - else if (typeof object.int64Value === "string") - message.int64Value = parseInt(object.int64Value, 10); - else if (typeof object.int64Value === "number") - message.int64Value = object.int64Value; - else if (typeof object.int64Value === "object") - message.int64Value = new $util.LongBits(object.int64Value.low >>> 0, object.int64Value.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - return message; - }; + } + return null; + }; - /** - * Creates a plain object from a NumericValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue} message NumericValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NumericValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.int64Value != null && message.hasOwnProperty("int64Value")) { - if (typeof message.int64Value === "number") - object.int64Value = options.longs === String ? String(message.int64Value) : message.int64Value; - else - object.int64Value = options.longs === String ? $util.Long.prototype.toString.call(message.int64Value) : options.longs === Number ? new $util.LongBits(message.int64Value.low >>> 0, message.int64Value.high >>> 0).toNumber() : message.int64Value; - if (options.oneofs) - object.oneValue = "int64Value"; - } - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (options.oneofs) - object.oneValue = "doubleValue"; - } + /** + * Creates a BatchUpdateAccessBindingsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse} BatchUpdateAccessBindingsResponse + */ + BatchUpdateAccessBindingsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse) return object; - }; - - /** - * Converts this NumericValue to JSON. - * @function toJSON - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue - * @instance - * @returns {Object.} JSON object - */ - NumericValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NumericValue - * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NumericValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + var message = new $root.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse(); + if (object.accessBindings) { + if (!Array.isArray(object.accessBindings)) + throw TypeError(".google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse.accessBindings: array expected"); + message.accessBindings = []; + for (var i = 0; i < object.accessBindings.length; ++i) { + if (typeof object.accessBindings[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse.accessBindings: object expected"); + message.accessBindings[i] = $root.google.analytics.admin.v1alpha.AccessBinding.fromObject(object.accessBindings[i]); } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue"; - }; - - return NumericValue; - })(); + } + return message; + }; - AudienceDimensionOrMetricFilter.NumericFilter = (function() { + /** + * Creates a plain object from a BatchUpdateAccessBindingsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse + * @static + * @param {google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse} message BatchUpdateAccessBindingsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchUpdateAccessBindingsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.accessBindings = []; + if (message.accessBindings && message.accessBindings.length) { + object.accessBindings = []; + for (var j = 0; j < message.accessBindings.length; ++j) + object.accessBindings[j] = $root.google.analytics.admin.v1alpha.AccessBinding.toObject(message.accessBindings[j], options); + } + return object; + }; - /** - * Properties of a NumericFilter. - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @interface INumericFilter - * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation|null} [operation] NumericFilter operation - * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null} [value] NumericFilter value - */ + /** + * Converts this BatchUpdateAccessBindingsResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse + * @instance + * @returns {Object.} JSON object + */ + BatchUpdateAccessBindingsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new NumericFilter. - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @classdesc Represents a NumericFilter. - * @implements INumericFilter - * @constructor - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter=} [properties] Properties to set - */ - function NumericFilter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Gets the default type url for BatchUpdateAccessBindingsResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchUpdateAccessBindingsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse"; + }; - /** - * NumericFilter operation. - * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation} operation - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter - * @instance - */ - NumericFilter.prototype.operation = 0; + return BatchUpdateAccessBindingsResponse; + })(); - /** - * NumericFilter value. - * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null|undefined} value - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter - * @instance - */ - NumericFilter.prototype.value = null; + v1alpha.DeleteAccessBindingRequest = (function() { - /** - * Creates a new NumericFilter instance using the specified properties. - * @function create - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter} NumericFilter instance - */ - NumericFilter.create = function create(properties) { - return new NumericFilter(properties); - }; + /** + * Properties of a DeleteAccessBindingRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IDeleteAccessBindingRequest + * @property {string|null} [name] DeleteAccessBindingRequest name + */ - /** - * Encodes the specified NumericFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.verify|verify} messages. - * @function encode - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter} message NumericFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NumericFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.operation); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Constructs a new DeleteAccessBindingRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a DeleteAccessBindingRequest. + * @implements IDeleteAccessBindingRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IDeleteAccessBindingRequest=} [properties] Properties to set + */ + function DeleteAccessBindingRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified NumericFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter} message NumericFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NumericFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * DeleteAccessBindingRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.DeleteAccessBindingRequest + * @instance + */ + DeleteAccessBindingRequest.prototype.name = ""; - /** - * Decodes a NumericFilter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter} NumericFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NumericFilter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.operation = reader.int32(); - break; - } - case 2: { - message.value = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new DeleteAccessBindingRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.DeleteAccessBindingRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteAccessBindingRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DeleteAccessBindingRequest} DeleteAccessBindingRequest instance + */ + DeleteAccessBindingRequest.create = function create(properties) { + return new DeleteAccessBindingRequest(properties); + }; - /** - * Decodes a NumericFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter} NumericFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NumericFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified DeleteAccessBindingRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteAccessBindingRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.DeleteAccessBindingRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteAccessBindingRequest} message DeleteAccessBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAccessBindingRequest.encode = function encode(message, writer) { + 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; + }; - /** - * Verifies a NumericFilter message. - * @function verify - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NumericFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.operation != null && message.hasOwnProperty("operation")) - switch (message.operation) { - default: - return "operation: enum value expected"; - case 0: - case 1: - case 2: - case 4: - break; - } - if (message.value != null && message.hasOwnProperty("value")) { - var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify(message.value); - if (error) - return "value." + error; - } - return null; - }; + /** + * Encodes the specified DeleteAccessBindingRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteAccessBindingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.DeleteAccessBindingRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteAccessBindingRequest} message DeleteAccessBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAccessBindingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a NumericFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter} NumericFilter - */ - NumericFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter) - return object; - var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter(); - switch (object.operation) { - default: - if (typeof object.operation === "number") { - message.operation = object.operation; + /** + * Decodes a DeleteAccessBindingRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.DeleteAccessBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.DeleteAccessBindingRequest} DeleteAccessBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAccessBindingRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DeleteAccessBindingRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; } + default: + reader.skipType(tag & 7); break; - case "OPERATION_UNSPECIFIED": - case 0: - message.operation = 0; - break; - case "EQUAL": - case 1: - message.operation = 1; - break; - case "LESS_THAN": - case 2: - message.operation = 2; - break; - case "GREATER_THAN": - case 4: - message.operation = 4; - break; - } - if (object.value != null) { - if (typeof object.value !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.value: object expected"); - message.value = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.fromObject(object.value); - } - return message; - }; - - /** - * Creates a plain object from a NumericFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter} message NumericFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NumericFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.operation = options.enums === String ? "OPERATION_UNSPECIFIED" : 0; - object.value = null; } - if (message.operation != null && message.hasOwnProperty("operation")) - object.operation = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation[message.operation] === undefined ? message.operation : $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation[message.operation] : message.operation; - if (message.value != null && message.hasOwnProperty("value")) - object.value = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.toObject(message.value, options); - return object; - }; + } + return message; + }; - /** - * Converts this NumericFilter to JSON. - * @function toJSON - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter - * @instance - * @returns {Object.} JSON object - */ - NumericFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a DeleteAccessBindingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.DeleteAccessBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.DeleteAccessBindingRequest} DeleteAccessBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAccessBindingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for NumericFilter - * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NumericFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter"; - }; + /** + * Verifies a DeleteAccessBindingRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.DeleteAccessBindingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteAccessBindingRequest.verify = function verify(message) { + if (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; + }; - /** - * Operation enum. - * @name google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation - * @enum {number} - * @property {number} OPERATION_UNSPECIFIED=0 OPERATION_UNSPECIFIED value - * @property {number} EQUAL=1 EQUAL value - * @property {number} LESS_THAN=2 LESS_THAN value - * @property {number} GREATER_THAN=4 GREATER_THAN value - */ - NumericFilter.Operation = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OPERATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "EQUAL"] = 1; - values[valuesById[2] = "LESS_THAN"] = 2; - values[valuesById[4] = "GREATER_THAN"] = 4; - return values; - })(); + /** + * Creates a DeleteAccessBindingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.DeleteAccessBindingRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.DeleteAccessBindingRequest} DeleteAccessBindingRequest + */ + DeleteAccessBindingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DeleteAccessBindingRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.DeleteAccessBindingRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - return NumericFilter; - })(); + /** + * Creates a plain object from a DeleteAccessBindingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.DeleteAccessBindingRequest + * @static + * @param {google.analytics.admin.v1alpha.DeleteAccessBindingRequest} message DeleteAccessBindingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteAccessBindingRequest.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; + }; - AudienceDimensionOrMetricFilter.BetweenFilter = (function() { + /** + * Converts this DeleteAccessBindingRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.DeleteAccessBindingRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteAccessBindingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of a BetweenFilter. - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @interface IBetweenFilter - * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null} [fromValue] BetweenFilter fromValue - * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null} [toValue] BetweenFilter toValue - */ - - /** - * Constructs a new BetweenFilter. - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @classdesc Represents a BetweenFilter. - * @implements IBetweenFilter - * @constructor - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter=} [properties] Properties to set - */ - function BetweenFilter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Gets the default type url for DeleteAccessBindingRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.DeleteAccessBindingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteAccessBindingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DeleteAccessBindingRequest"; + }; - /** - * BetweenFilter fromValue. - * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null|undefined} fromValue - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter - * @instance - */ - BetweenFilter.prototype.fromValue = null; - - /** - * BetweenFilter toValue. - * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null|undefined} toValue - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter - * @instance - */ - BetweenFilter.prototype.toValue = null; - - /** - * Creates a new BetweenFilter instance using the specified properties. - * @function create - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter} BetweenFilter instance - */ - BetweenFilter.create = function create(properties) { - return new BetweenFilter(properties); - }; - - /** - * Encodes the specified BetweenFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.verify|verify} messages. - * @function encode - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter} message BetweenFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BetweenFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fromValue != null && Object.hasOwnProperty.call(message, "fromValue")) - $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.encode(message.fromValue, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.toValue != null && Object.hasOwnProperty.call(message, "toValue")) - $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.encode(message.toValue, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BetweenFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter} message BetweenFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BetweenFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BetweenFilter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter} BetweenFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BetweenFilter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.fromValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.decode(reader, reader.uint32()); - break; - } - case 2: { - message.toValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BetweenFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter} BetweenFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BetweenFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BetweenFilter message. - * @function verify - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BetweenFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fromValue != null && message.hasOwnProperty("fromValue")) { - var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify(message.fromValue); - if (error) - return "fromValue." + error; - } - if (message.toValue != null && message.hasOwnProperty("toValue")) { - var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify(message.toValue); - if (error) - return "toValue." + error; - } - return null; - }; - - /** - * Creates a BetweenFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter} BetweenFilter - */ - BetweenFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter) - return object; - var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter(); - if (object.fromValue != null) { - if (typeof object.fromValue !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.fromValue: object expected"); - message.fromValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.fromObject(object.fromValue); - } - if (object.toValue != null) { - if (typeof object.toValue !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.toValue: object expected"); - message.toValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.fromObject(object.toValue); - } - return message; - }; - - /** - * Creates a plain object from a BetweenFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter} message BetweenFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BetweenFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.fromValue = null; - object.toValue = null; - } - if (message.fromValue != null && message.hasOwnProperty("fromValue")) - object.fromValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.toObject(message.fromValue, options); - if (message.toValue != null && message.hasOwnProperty("toValue")) - object.toValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.toObject(message.toValue, options); - return object; - }; - - /** - * Converts this BetweenFilter to JSON. - * @function toJSON - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter - * @instance - * @returns {Object.} JSON object - */ - BetweenFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BetweenFilter - * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BetweenFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter"; - }; - - return BetweenFilter; - })(); - - return AudienceDimensionOrMetricFilter; + return DeleteAccessBindingRequest; })(); - v1alpha.AudienceEventFilter = (function() { + v1alpha.BatchDeleteAccessBindingsRequest = (function() { /** - * Properties of an AudienceEventFilter. + * Properties of a BatchDeleteAccessBindingsRequest. * @memberof google.analytics.admin.v1alpha - * @interface IAudienceEventFilter - * @property {string|null} [eventName] AudienceEventFilter eventName - * @property {google.analytics.admin.v1alpha.IAudienceFilterExpression|null} [eventParameterFilterExpression] AudienceEventFilter eventParameterFilterExpression + * @interface IBatchDeleteAccessBindingsRequest + * @property {string|null} [parent] BatchDeleteAccessBindingsRequest parent + * @property {Array.|null} [requests] BatchDeleteAccessBindingsRequest requests */ /** - * Constructs a new AudienceEventFilter. + * Constructs a new BatchDeleteAccessBindingsRequest. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents an AudienceEventFilter. - * @implements IAudienceEventFilter + * @classdesc Represents a BatchDeleteAccessBindingsRequest. + * @implements IBatchDeleteAccessBindingsRequest * @constructor - * @param {google.analytics.admin.v1alpha.IAudienceEventFilter=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IBatchDeleteAccessBindingsRequest=} [properties] Properties to set */ - function AudienceEventFilter(properties) { + function BatchDeleteAccessBindingsRequest(properties) { + this.requests = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37042,89 +37000,92 @@ } /** - * AudienceEventFilter eventName. - * @member {string} eventName - * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * BatchDeleteAccessBindingsRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest * @instance */ - AudienceEventFilter.prototype.eventName = ""; + BatchDeleteAccessBindingsRequest.prototype.parent = ""; /** - * AudienceEventFilter eventParameterFilterExpression. - * @member {google.analytics.admin.v1alpha.IAudienceFilterExpression|null|undefined} eventParameterFilterExpression - * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * BatchDeleteAccessBindingsRequest requests. + * @member {Array.} requests + * @memberof google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest * @instance */ - AudienceEventFilter.prototype.eventParameterFilterExpression = null; + BatchDeleteAccessBindingsRequest.prototype.requests = $util.emptyArray; /** - * Creates a new AudienceEventFilter instance using the specified properties. + * Creates a new BatchDeleteAccessBindingsRequest instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @memberof google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest * @static - * @param {google.analytics.admin.v1alpha.IAudienceEventFilter=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AudienceEventFilter} AudienceEventFilter instance + * @param {google.analytics.admin.v1alpha.IBatchDeleteAccessBindingsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest} BatchDeleteAccessBindingsRequest instance */ - AudienceEventFilter.create = function create(properties) { - return new AudienceEventFilter(properties); + BatchDeleteAccessBindingsRequest.create = function create(properties) { + return new BatchDeleteAccessBindingsRequest(properties); }; /** - * Encodes the specified AudienceEventFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventFilter.verify|verify} messages. + * Encodes the specified BatchDeleteAccessBindingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @memberof google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest * @static - * @param {google.analytics.admin.v1alpha.IAudienceEventFilter} message AudienceEventFilter message or plain object to encode + * @param {google.analytics.admin.v1alpha.IBatchDeleteAccessBindingsRequest} message BatchDeleteAccessBindingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceEventFilter.encode = function encode(message, writer) { + BatchDeleteAccessBindingsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.eventName != null && Object.hasOwnProperty.call(message, "eventName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventName); - if (message.eventParameterFilterExpression != null && Object.hasOwnProperty.call(message, "eventParameterFilterExpression")) - $root.google.analytics.admin.v1alpha.AudienceFilterExpression.encode(message.eventParameterFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.requests != null && message.requests.length) + for (var i = 0; i < message.requests.length; ++i) + $root.google.analytics.admin.v1alpha.DeleteAccessBindingRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified AudienceEventFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventFilter.verify|verify} messages. + * Encodes the specified BatchDeleteAccessBindingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @memberof google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest * @static - * @param {google.analytics.admin.v1alpha.IAudienceEventFilter} message AudienceEventFilter message or plain object to encode + * @param {google.analytics.admin.v1alpha.IBatchDeleteAccessBindingsRequest} message BatchDeleteAccessBindingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceEventFilter.encodeDelimited = function encodeDelimited(message, writer) { + BatchDeleteAccessBindingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AudienceEventFilter message from the specified reader or buffer. + * Decodes a BatchDeleteAccessBindingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @memberof google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.AudienceEventFilter} AudienceEventFilter + * @returns {google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest} BatchDeleteAccessBindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceEventFilter.decode = function decode(reader, length) { + BatchDeleteAccessBindingsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceEventFilter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.eventName = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.eventParameterFilterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.decode(reader, reader.uint32()); + if (!(message.requests && message.requests.length)) + message.requests = []; + message.requests.push($root.google.analytics.admin.v1alpha.DeleteAccessBindingRequest.decode(reader, reader.uint32())); break; } default: @@ -37136,140 +37097,149 @@ }; /** - * Decodes an AudienceEventFilter message from the specified reader or buffer, length delimited. + * Decodes a BatchDeleteAccessBindingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @memberof google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AudienceEventFilter} AudienceEventFilter + * @returns {google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest} BatchDeleteAccessBindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceEventFilter.decodeDelimited = function decodeDelimited(reader) { + BatchDeleteAccessBindingsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AudienceEventFilter message. + * Verifies a BatchDeleteAccessBindingsRequest message. * @function verify - * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @memberof google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AudienceEventFilter.verify = function verify(message) { + BatchDeleteAccessBindingsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eventName != null && message.hasOwnProperty("eventName")) - if (!$util.isString(message.eventName)) - return "eventName: string expected"; - if (message.eventParameterFilterExpression != null && message.hasOwnProperty("eventParameterFilterExpression")) { - var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.verify(message.eventParameterFilterExpression); - if (error) - return "eventParameterFilterExpression." + error; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.requests != null && message.hasOwnProperty("requests")) { + if (!Array.isArray(message.requests)) + return "requests: array expected"; + for (var i = 0; i < message.requests.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.DeleteAccessBindingRequest.verify(message.requests[i]); + if (error) + return "requests." + error; + } } return null; }; /** - * Creates an AudienceEventFilter message from a plain object. Also converts values to their respective internal types. + * Creates a BatchDeleteAccessBindingsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @memberof google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AudienceEventFilter} AudienceEventFilter + * @returns {google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest} BatchDeleteAccessBindingsRequest */ - AudienceEventFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AudienceEventFilter) + BatchDeleteAccessBindingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest) return object; - var message = new $root.google.analytics.admin.v1alpha.AudienceEventFilter(); - if (object.eventName != null) - message.eventName = String(object.eventName); - if (object.eventParameterFilterExpression != null) { - if (typeof object.eventParameterFilterExpression !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceEventFilter.eventParameterFilterExpression: object expected"); - message.eventParameterFilterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.fromObject(object.eventParameterFilterExpression); + var message = new $root.google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.requests) { + if (!Array.isArray(object.requests)) + throw TypeError(".google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest.requests: array expected"); + message.requests = []; + for (var i = 0; i < object.requests.length; ++i) { + if (typeof object.requests[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest.requests: object expected"); + message.requests[i] = $root.google.analytics.admin.v1alpha.DeleteAccessBindingRequest.fromObject(object.requests[i]); + } } return message; }; /** - * Creates a plain object from an AudienceEventFilter message. Also converts values to other types if specified. + * Creates a plain object from a BatchDeleteAccessBindingsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @memberof google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest * @static - * @param {google.analytics.admin.v1alpha.AudienceEventFilter} message AudienceEventFilter + * @param {google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest} message BatchDeleteAccessBindingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AudienceEventFilter.toObject = function toObject(message, options) { + BatchDeleteAccessBindingsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.eventName = ""; - object.eventParameterFilterExpression = null; + if (options.arrays || options.defaults) + object.requests = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.requests && message.requests.length) { + object.requests = []; + for (var j = 0; j < message.requests.length; ++j) + object.requests[j] = $root.google.analytics.admin.v1alpha.DeleteAccessBindingRequest.toObject(message.requests[j], options); } - if (message.eventName != null && message.hasOwnProperty("eventName")) - object.eventName = message.eventName; - if (message.eventParameterFilterExpression != null && message.hasOwnProperty("eventParameterFilterExpression")) - object.eventParameterFilterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.toObject(message.eventParameterFilterExpression, options); return object; }; /** - * Converts this AudienceEventFilter to JSON. + * Converts this BatchDeleteAccessBindingsRequest to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @memberof google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest * @instance * @returns {Object.} JSON object */ - AudienceEventFilter.prototype.toJSON = function toJSON() { + BatchDeleteAccessBindingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AudienceEventFilter + * Gets the default type url for BatchDeleteAccessBindingsRequest * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @memberof google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AudienceEventFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchDeleteAccessBindingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceEventFilter"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest"; }; - return AudienceEventFilter; + return BatchDeleteAccessBindingsRequest; })(); - v1alpha.AudienceFilterExpression = (function() { + v1alpha.CreateExpandedDataSetRequest = (function() { /** - * Properties of an AudienceFilterExpression. + * Properties of a CreateExpandedDataSetRequest. * @memberof google.analytics.admin.v1alpha - * @interface IAudienceFilterExpression - * @property {google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null} [andGroup] AudienceFilterExpression andGroup - * @property {google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null} [orGroup] AudienceFilterExpression orGroup - * @property {google.analytics.admin.v1alpha.IAudienceFilterExpression|null} [notExpression] AudienceFilterExpression notExpression - * @property {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter|null} [dimensionOrMetricFilter] AudienceFilterExpression dimensionOrMetricFilter - * @property {google.analytics.admin.v1alpha.IAudienceEventFilter|null} [eventFilter] AudienceFilterExpression eventFilter + * @interface ICreateExpandedDataSetRequest + * @property {string|null} [parent] CreateExpandedDataSetRequest parent + * @property {google.analytics.admin.v1alpha.IExpandedDataSet|null} [expandedDataSet] CreateExpandedDataSetRequest expandedDataSet */ /** - * Constructs a new AudienceFilterExpression. + * Constructs a new CreateExpandedDataSetRequest. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents an AudienceFilterExpression. - * @implements IAudienceFilterExpression + * @classdesc Represents a CreateExpandedDataSetRequest. + * @implements ICreateExpandedDataSetRequest * @constructor - * @param {google.analytics.admin.v1alpha.IAudienceFilterExpression=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.ICreateExpandedDataSetRequest=} [properties] Properties to set */ - function AudienceFilterExpression(properties) { + function CreateExpandedDataSetRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37277,145 +37247,89 @@ } /** - * AudienceFilterExpression andGroup. - * @member {google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null|undefined} andGroup - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression - * @instance - */ - AudienceFilterExpression.prototype.andGroup = null; - - /** - * AudienceFilterExpression orGroup. - * @member {google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null|undefined} orGroup - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression - * @instance - */ - AudienceFilterExpression.prototype.orGroup = null; - - /** - * AudienceFilterExpression notExpression. - * @member {google.analytics.admin.v1alpha.IAudienceFilterExpression|null|undefined} notExpression - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression - * @instance - */ - AudienceFilterExpression.prototype.notExpression = null; - - /** - * AudienceFilterExpression dimensionOrMetricFilter. - * @member {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter|null|undefined} dimensionOrMetricFilter - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression - * @instance - */ - AudienceFilterExpression.prototype.dimensionOrMetricFilter = null; - - /** - * AudienceFilterExpression eventFilter. - * @member {google.analytics.admin.v1alpha.IAudienceEventFilter|null|undefined} eventFilter - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * CreateExpandedDataSetRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.CreateExpandedDataSetRequest * @instance */ - AudienceFilterExpression.prototype.eventFilter = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + CreateExpandedDataSetRequest.prototype.parent = ""; /** - * AudienceFilterExpression expr. - * @member {"andGroup"|"orGroup"|"notExpression"|"dimensionOrMetricFilter"|"eventFilter"|undefined} expr - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * CreateExpandedDataSetRequest expandedDataSet. + * @member {google.analytics.admin.v1alpha.IExpandedDataSet|null|undefined} expandedDataSet + * @memberof google.analytics.admin.v1alpha.CreateExpandedDataSetRequest * @instance */ - Object.defineProperty(AudienceFilterExpression.prototype, "expr", { - get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "dimensionOrMetricFilter", "eventFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); + CreateExpandedDataSetRequest.prototype.expandedDataSet = null; /** - * Creates a new AudienceFilterExpression instance using the specified properties. + * Creates a new CreateExpandedDataSetRequest instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @memberof google.analytics.admin.v1alpha.CreateExpandedDataSetRequest * @static - * @param {google.analytics.admin.v1alpha.IAudienceFilterExpression=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AudienceFilterExpression} AudienceFilterExpression instance + * @param {google.analytics.admin.v1alpha.ICreateExpandedDataSetRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.CreateExpandedDataSetRequest} CreateExpandedDataSetRequest instance */ - AudienceFilterExpression.create = function create(properties) { - return new AudienceFilterExpression(properties); + CreateExpandedDataSetRequest.create = function create(properties) { + return new CreateExpandedDataSetRequest(properties); }; /** - * Encodes the specified AudienceFilterExpression message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpression.verify|verify} messages. + * Encodes the specified CreateExpandedDataSetRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateExpandedDataSetRequest.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @memberof google.analytics.admin.v1alpha.CreateExpandedDataSetRequest * @static - * @param {google.analytics.admin.v1alpha.IAudienceFilterExpression} message AudienceFilterExpression message or plain object to encode + * @param {google.analytics.admin.v1alpha.ICreateExpandedDataSetRequest} message CreateExpandedDataSetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceFilterExpression.encode = function encode(message, writer) { + CreateExpandedDataSetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) - $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) - $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) - $root.google.analytics.admin.v1alpha.AudienceFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.dimensionOrMetricFilter != null && Object.hasOwnProperty.call(message, "dimensionOrMetricFilter")) - $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.encode(message.dimensionOrMetricFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.eventFilter != null && Object.hasOwnProperty.call(message, "eventFilter")) - $root.google.analytics.admin.v1alpha.AudienceEventFilter.encode(message.eventFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.expandedDataSet != null && Object.hasOwnProperty.call(message, "expandedDataSet")) + $root.google.analytics.admin.v1alpha.ExpandedDataSet.encode(message.expandedDataSet, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified AudienceFilterExpression message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpression.verify|verify} messages. + * Encodes the specified CreateExpandedDataSetRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateExpandedDataSetRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @memberof google.analytics.admin.v1alpha.CreateExpandedDataSetRequest * @static - * @param {google.analytics.admin.v1alpha.IAudienceFilterExpression} message AudienceFilterExpression message or plain object to encode + * @param {google.analytics.admin.v1alpha.ICreateExpandedDataSetRequest} message CreateExpandedDataSetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + CreateExpandedDataSetRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AudienceFilterExpression message from the specified reader or buffer. + * Decodes a CreateExpandedDataSetRequest message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @memberof google.analytics.admin.v1alpha.CreateExpandedDataSetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.AudienceFilterExpression} AudienceFilterExpression + * @returns {google.analytics.admin.v1alpha.CreateExpandedDataSetRequest} CreateExpandedDataSetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceFilterExpression.decode = function decode(reader, length) { + CreateExpandedDataSetRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceFilterExpression(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.CreateExpandedDataSetRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.andGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.decode(reader, reader.uint32()); + message.parent = reader.string(); break; } case 2: { - message.orGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.decode(reader, reader.uint32()); - break; - } - case 3: { - message.notExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.decode(reader, reader.uint32()); - break; - } - case 4: { - message.dimensionOrMetricFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.decode(reader, reader.uint32()); - break; - } - case 5: { - message.eventFilter = $root.google.analytics.admin.v1alpha.AudienceEventFilter.decode(reader, reader.uint32()); + message.expandedDataSet = $root.google.analytics.admin.v1alpha.ExpandedDataSet.decode(reader, reader.uint32()); break; } default: @@ -37427,213 +37341,137 @@ }; /** - * Decodes an AudienceFilterExpression message from the specified reader or buffer, length delimited. + * Decodes a CreateExpandedDataSetRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @memberof google.analytics.admin.v1alpha.CreateExpandedDataSetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AudienceFilterExpression} AudienceFilterExpression + * @returns {google.analytics.admin.v1alpha.CreateExpandedDataSetRequest} CreateExpandedDataSetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceFilterExpression.decodeDelimited = function decodeDelimited(reader) { + CreateExpandedDataSetRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AudienceFilterExpression message. + * Verifies a CreateExpandedDataSetRequest message. * @function verify - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @memberof google.analytics.admin.v1alpha.CreateExpandedDataSetRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AudienceFilterExpression.verify = function verify(message) { + CreateExpandedDataSetRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.andGroup != null && message.hasOwnProperty("andGroup")) { - properties.expr = 1; - { - var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify(message.andGroup); - if (error) - return "andGroup." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.expandedDataSet != null && message.hasOwnProperty("expandedDataSet")) { + var error = $root.google.analytics.admin.v1alpha.ExpandedDataSet.verify(message.expandedDataSet); + if (error) + return "expandedDataSet." + error; } - if (message.orGroup != null && message.hasOwnProperty("orGroup")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify(message.orGroup); - if (error) - return "orGroup." + error; - } - } - if (message.notExpression != null && message.hasOwnProperty("notExpression")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.verify(message.notExpression); - if (error) - return "notExpression." + error; - } - } - if (message.dimensionOrMetricFilter != null && message.hasOwnProperty("dimensionOrMetricFilter")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.verify(message.dimensionOrMetricFilter); - if (error) - return "dimensionOrMetricFilter." + error; - } - } - if (message.eventFilter != null && message.hasOwnProperty("eventFilter")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.admin.v1alpha.AudienceEventFilter.verify(message.eventFilter); - if (error) - return "eventFilter." + error; - } - } - return null; - }; - - /** - * Creates an AudienceFilterExpression message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AudienceFilterExpression} AudienceFilterExpression - */ - AudienceFilterExpression.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AudienceFilterExpression) - return object; - var message = new $root.google.analytics.admin.v1alpha.AudienceFilterExpression(); - if (object.andGroup != null) { - if (typeof object.andGroup !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpression.andGroup: object expected"); - message.andGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.fromObject(object.andGroup); - } - if (object.orGroup != null) { - if (typeof object.orGroup !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpression.orGroup: object expected"); - message.orGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.fromObject(object.orGroup); - } - if (object.notExpression != null) { - if (typeof object.notExpression !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpression.notExpression: object expected"); - message.notExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.fromObject(object.notExpression); - } - if (object.dimensionOrMetricFilter != null) { - if (typeof object.dimensionOrMetricFilter !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpression.dimensionOrMetricFilter: object expected"); - message.dimensionOrMetricFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.fromObject(object.dimensionOrMetricFilter); - } - if (object.eventFilter != null) { - if (typeof object.eventFilter !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpression.eventFilter: object expected"); - message.eventFilter = $root.google.analytics.admin.v1alpha.AudienceEventFilter.fromObject(object.eventFilter); + return null; + }; + + /** + * Creates a CreateExpandedDataSetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.CreateExpandedDataSetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.CreateExpandedDataSetRequest} CreateExpandedDataSetRequest + */ + CreateExpandedDataSetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.CreateExpandedDataSetRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.CreateExpandedDataSetRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.expandedDataSet != null) { + if (typeof object.expandedDataSet !== "object") + throw TypeError(".google.analytics.admin.v1alpha.CreateExpandedDataSetRequest.expandedDataSet: object expected"); + message.expandedDataSet = $root.google.analytics.admin.v1alpha.ExpandedDataSet.fromObject(object.expandedDataSet); } return message; }; /** - * Creates a plain object from an AudienceFilterExpression message. Also converts values to other types if specified. + * Creates a plain object from a CreateExpandedDataSetRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @memberof google.analytics.admin.v1alpha.CreateExpandedDataSetRequest * @static - * @param {google.analytics.admin.v1alpha.AudienceFilterExpression} message AudienceFilterExpression + * @param {google.analytics.admin.v1alpha.CreateExpandedDataSetRequest} message CreateExpandedDataSetRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AudienceFilterExpression.toObject = function toObject(message, options) { + CreateExpandedDataSetRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.andGroup != null && message.hasOwnProperty("andGroup")) { - object.andGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.toObject(message.andGroup, options); - if (options.oneofs) - object.expr = "andGroup"; - } - if (message.orGroup != null && message.hasOwnProperty("orGroup")) { - object.orGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.toObject(message.orGroup, options); - if (options.oneofs) - object.expr = "orGroup"; - } - if (message.notExpression != null && message.hasOwnProperty("notExpression")) { - object.notExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.toObject(message.notExpression, options); - if (options.oneofs) - object.expr = "notExpression"; - } - if (message.dimensionOrMetricFilter != null && message.hasOwnProperty("dimensionOrMetricFilter")) { - object.dimensionOrMetricFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.toObject(message.dimensionOrMetricFilter, options); - if (options.oneofs) - object.expr = "dimensionOrMetricFilter"; - } - if (message.eventFilter != null && message.hasOwnProperty("eventFilter")) { - object.eventFilter = $root.google.analytics.admin.v1alpha.AudienceEventFilter.toObject(message.eventFilter, options); - if (options.oneofs) - object.expr = "eventFilter"; + if (options.defaults) { + object.parent = ""; + object.expandedDataSet = null; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.expandedDataSet != null && message.hasOwnProperty("expandedDataSet")) + object.expandedDataSet = $root.google.analytics.admin.v1alpha.ExpandedDataSet.toObject(message.expandedDataSet, options); return object; }; /** - * Converts this AudienceFilterExpression to JSON. + * Converts this CreateExpandedDataSetRequest to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @memberof google.analytics.admin.v1alpha.CreateExpandedDataSetRequest * @instance * @returns {Object.} JSON object */ - AudienceFilterExpression.prototype.toJSON = function toJSON() { + CreateExpandedDataSetRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AudienceFilterExpression + * Gets the default type url for CreateExpandedDataSetRequest * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @memberof google.analytics.admin.v1alpha.CreateExpandedDataSetRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AudienceFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateExpandedDataSetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceFilterExpression"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.CreateExpandedDataSetRequest"; }; - return AudienceFilterExpression; + return CreateExpandedDataSetRequest; })(); - v1alpha.AudienceFilterExpressionList = (function() { + v1alpha.UpdateExpandedDataSetRequest = (function() { /** - * Properties of an AudienceFilterExpressionList. + * Properties of an UpdateExpandedDataSetRequest. * @memberof google.analytics.admin.v1alpha - * @interface IAudienceFilterExpressionList - * @property {Array.|null} [filterExpressions] AudienceFilterExpressionList filterExpressions + * @interface IUpdateExpandedDataSetRequest + * @property {google.analytics.admin.v1alpha.IExpandedDataSet|null} [expandedDataSet] UpdateExpandedDataSetRequest expandedDataSet + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateExpandedDataSetRequest updateMask */ /** - * Constructs a new AudienceFilterExpressionList. + * Constructs a new UpdateExpandedDataSetRequest. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents an AudienceFilterExpressionList. - * @implements IAudienceFilterExpressionList + * @classdesc Represents an UpdateExpandedDataSetRequest. + * @implements IUpdateExpandedDataSetRequest * @constructor - * @param {google.analytics.admin.v1alpha.IAudienceFilterExpressionList=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IUpdateExpandedDataSetRequest=} [properties] Properties to set */ - function AudienceFilterExpressionList(properties) { - this.filterExpressions = []; + function UpdateExpandedDataSetRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37641,78 +37479,89 @@ } /** - * AudienceFilterExpressionList filterExpressions. - * @member {Array.} filterExpressions - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * UpdateExpandedDataSetRequest expandedDataSet. + * @member {google.analytics.admin.v1alpha.IExpandedDataSet|null|undefined} expandedDataSet + * @memberof google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest * @instance */ - AudienceFilterExpressionList.prototype.filterExpressions = $util.emptyArray; + UpdateExpandedDataSetRequest.prototype.expandedDataSet = null; /** - * Creates a new AudienceFilterExpressionList instance using the specified properties. + * UpdateExpandedDataSetRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest + * @instance + */ + UpdateExpandedDataSetRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateExpandedDataSetRequest instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @memberof google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest * @static - * @param {google.analytics.admin.v1alpha.IAudienceFilterExpressionList=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AudienceFilterExpressionList} AudienceFilterExpressionList instance + * @param {google.analytics.admin.v1alpha.IUpdateExpandedDataSetRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest} UpdateExpandedDataSetRequest instance */ - AudienceFilterExpressionList.create = function create(properties) { - return new AudienceFilterExpressionList(properties); + UpdateExpandedDataSetRequest.create = function create(properties) { + return new UpdateExpandedDataSetRequest(properties); }; /** - * Encodes the specified AudienceFilterExpressionList message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify|verify} messages. + * Encodes the specified UpdateExpandedDataSetRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @memberof google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest * @static - * @param {google.analytics.admin.v1alpha.IAudienceFilterExpressionList} message AudienceFilterExpressionList message or plain object to encode + * @param {google.analytics.admin.v1alpha.IUpdateExpandedDataSetRequest} message UpdateExpandedDataSetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceFilterExpressionList.encode = function encode(message, writer) { + UpdateExpandedDataSetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.filterExpressions != null && message.filterExpressions.length) - for (var i = 0; i < message.filterExpressions.length; ++i) - $root.google.analytics.admin.v1alpha.AudienceFilterExpression.encode(message.filterExpressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.expandedDataSet != null && Object.hasOwnProperty.call(message, "expandedDataSet")) + $root.google.analytics.admin.v1alpha.ExpandedDataSet.encode(message.expandedDataSet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified AudienceFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify|verify} messages. + * Encodes the specified UpdateExpandedDataSetRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @memberof google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest * @static - * @param {google.analytics.admin.v1alpha.IAudienceFilterExpressionList} message AudienceFilterExpressionList message or plain object to encode + * @param {google.analytics.admin.v1alpha.IUpdateExpandedDataSetRequest} message UpdateExpandedDataSetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + UpdateExpandedDataSetRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AudienceFilterExpressionList message from the specified reader or buffer. + * Decodes an UpdateExpandedDataSetRequest message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @memberof google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.AudienceFilterExpressionList} AudienceFilterExpressionList + * @returns {google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest} UpdateExpandedDataSetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceFilterExpressionList.decode = function decode(reader, length) { + UpdateExpandedDataSetRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.filterExpressions && message.filterExpressions.length)) - message.filterExpressions = []; - message.filterExpressions.push($root.google.analytics.admin.v1alpha.AudienceFilterExpression.decode(reader, reader.uint32())); + message.expandedDataSet = $root.google.analytics.admin.v1alpha.ExpandedDataSet.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -37724,140 +37573,141 @@ }; /** - * Decodes an AudienceFilterExpressionList message from the specified reader or buffer, length delimited. + * Decodes an UpdateExpandedDataSetRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @memberof google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AudienceFilterExpressionList} AudienceFilterExpressionList + * @returns {google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest} UpdateExpandedDataSetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + UpdateExpandedDataSetRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AudienceFilterExpressionList message. + * Verifies an UpdateExpandedDataSetRequest message. * @function verify - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @memberof google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AudienceFilterExpressionList.verify = function verify(message) { + UpdateExpandedDataSetRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.filterExpressions != null && message.hasOwnProperty("filterExpressions")) { - if (!Array.isArray(message.filterExpressions)) - return "filterExpressions: array expected"; - for (var i = 0; i < message.filterExpressions.length; ++i) { - var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.verify(message.filterExpressions[i]); - if (error) - return "filterExpressions." + error; - } + if (message.expandedDataSet != null && message.hasOwnProperty("expandedDataSet")) { + var error = $root.google.analytics.admin.v1alpha.ExpandedDataSet.verify(message.expandedDataSet); + if (error) + return "expandedDataSet." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } return null; }; /** - * Creates an AudienceFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateExpandedDataSetRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @memberof google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AudienceFilterExpressionList} AudienceFilterExpressionList + * @returns {google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest} UpdateExpandedDataSetRequest */ - AudienceFilterExpressionList.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList) + UpdateExpandedDataSetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest) return object; - var message = new $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList(); - if (object.filterExpressions) { - if (!Array.isArray(object.filterExpressions)) - throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpressionList.filterExpressions: array expected"); - message.filterExpressions = []; - for (var i = 0; i < object.filterExpressions.length; ++i) { - if (typeof object.filterExpressions[i] !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpressionList.filterExpressions: object expected"); - message.filterExpressions[i] = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.fromObject(object.filterExpressions[i]); - } + var message = new $root.google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest(); + if (object.expandedDataSet != null) { + if (typeof object.expandedDataSet !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest.expandedDataSet: object expected"); + message.expandedDataSet = $root.google.analytics.admin.v1alpha.ExpandedDataSet.fromObject(object.expandedDataSet); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from an AudienceFilterExpressionList message. Also converts values to other types if specified. + * Creates a plain object from an UpdateExpandedDataSetRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @memberof google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest * @static - * @param {google.analytics.admin.v1alpha.AudienceFilterExpressionList} message AudienceFilterExpressionList + * @param {google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest} message UpdateExpandedDataSetRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AudienceFilterExpressionList.toObject = function toObject(message, options) { + UpdateExpandedDataSetRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.filterExpressions = []; - if (message.filterExpressions && message.filterExpressions.length) { - object.filterExpressions = []; - for (var j = 0; j < message.filterExpressions.length; ++j) - object.filterExpressions[j] = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.toObject(message.filterExpressions[j], options); + if (options.defaults) { + object.expandedDataSet = null; + object.updateMask = null; } + if (message.expandedDataSet != null && message.hasOwnProperty("expandedDataSet")) + object.expandedDataSet = $root.google.analytics.admin.v1alpha.ExpandedDataSet.toObject(message.expandedDataSet, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this AudienceFilterExpressionList to JSON. + * Converts this UpdateExpandedDataSetRequest to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @memberof google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest * @instance * @returns {Object.} JSON object */ - AudienceFilterExpressionList.prototype.toJSON = function toJSON() { + UpdateExpandedDataSetRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AudienceFilterExpressionList + * Gets the default type url for UpdateExpandedDataSetRequest * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @memberof google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AudienceFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateExpandedDataSetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceFilterExpressionList"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest"; }; - return AudienceFilterExpressionList; + return UpdateExpandedDataSetRequest; })(); - v1alpha.AudienceSimpleFilter = (function() { + v1alpha.DeleteExpandedDataSetRequest = (function() { /** - * Properties of an AudienceSimpleFilter. + * Properties of a DeleteExpandedDataSetRequest. * @memberof google.analytics.admin.v1alpha - * @interface IAudienceSimpleFilter - * @property {google.analytics.admin.v1alpha.AudienceFilterScope|null} [scope] AudienceSimpleFilter scope - * @property {google.analytics.admin.v1alpha.IAudienceFilterExpression|null} [filterExpression] AudienceSimpleFilter filterExpression + * @interface IDeleteExpandedDataSetRequest + * @property {string|null} [name] DeleteExpandedDataSetRequest name */ /** - * Constructs a new AudienceSimpleFilter. + * Constructs a new DeleteExpandedDataSetRequest. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents an AudienceSimpleFilter. - * @implements IAudienceSimpleFilter + * @classdesc Represents a DeleteExpandedDataSetRequest. + * @implements IDeleteExpandedDataSetRequest * @constructor - * @param {google.analytics.admin.v1alpha.IAudienceSimpleFilter=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IDeleteExpandedDataSetRequest=} [properties] Properties to set */ - function AudienceSimpleFilter(properties) { + function DeleteExpandedDataSetRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37865,89 +37715,75 @@ } /** - * AudienceSimpleFilter scope. - * @member {google.analytics.admin.v1alpha.AudienceFilterScope} scope - * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter - * @instance - */ - AudienceSimpleFilter.prototype.scope = 0; - - /** - * AudienceSimpleFilter filterExpression. - * @member {google.analytics.admin.v1alpha.IAudienceFilterExpression|null|undefined} filterExpression - * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * DeleteExpandedDataSetRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest * @instance */ - AudienceSimpleFilter.prototype.filterExpression = null; + DeleteExpandedDataSetRequest.prototype.name = ""; /** - * Creates a new AudienceSimpleFilter instance using the specified properties. + * Creates a new DeleteExpandedDataSetRequest instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @memberof google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest * @static - * @param {google.analytics.admin.v1alpha.IAudienceSimpleFilter=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AudienceSimpleFilter} AudienceSimpleFilter instance + * @param {google.analytics.admin.v1alpha.IDeleteExpandedDataSetRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest} DeleteExpandedDataSetRequest instance */ - AudienceSimpleFilter.create = function create(properties) { - return new AudienceSimpleFilter(properties); + DeleteExpandedDataSetRequest.create = function create(properties) { + return new DeleteExpandedDataSetRequest(properties); }; /** - * Encodes the specified AudienceSimpleFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSimpleFilter.verify|verify} messages. + * Encodes the specified DeleteExpandedDataSetRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @memberof google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest * @static - * @param {google.analytics.admin.v1alpha.IAudienceSimpleFilter} message AudienceSimpleFilter message or plain object to encode + * @param {google.analytics.admin.v1alpha.IDeleteExpandedDataSetRequest} message DeleteExpandedDataSetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceSimpleFilter.encode = function encode(message, writer) { + DeleteExpandedDataSetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.scope); - if (message.filterExpression != null && Object.hasOwnProperty.call(message, "filterExpression")) - $root.google.analytics.admin.v1alpha.AudienceFilterExpression.encode(message.filterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified AudienceSimpleFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSimpleFilter.verify|verify} messages. + * Encodes the specified DeleteExpandedDataSetRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @memberof google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest * @static - * @param {google.analytics.admin.v1alpha.IAudienceSimpleFilter} message AudienceSimpleFilter message or plain object to encode + * @param {google.analytics.admin.v1alpha.IDeleteExpandedDataSetRequest} message DeleteExpandedDataSetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceSimpleFilter.encodeDelimited = function encodeDelimited(message, writer) { + DeleteExpandedDataSetRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AudienceSimpleFilter message from the specified reader or buffer. + * Decodes a DeleteExpandedDataSetRequest message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @memberof google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.AudienceSimpleFilter} AudienceSimpleFilter + * @returns {google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest} DeleteExpandedDataSetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceSimpleFilter.decode = function decode(reader, length) { + DeleteExpandedDataSetRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceSimpleFilter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.scope = reader.int32(); - break; - } - case 2: { - message.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.decode(reader, reader.uint32()); + message.name = reader.string(); break; } default: @@ -37959,168 +37795,122 @@ }; /** - * Decodes an AudienceSimpleFilter message from the specified reader or buffer, length delimited. + * Decodes a DeleteExpandedDataSetRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @memberof google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AudienceSimpleFilter} AudienceSimpleFilter + * @returns {google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest} DeleteExpandedDataSetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceSimpleFilter.decodeDelimited = function decodeDelimited(reader) { + DeleteExpandedDataSetRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AudienceSimpleFilter message. + * Verifies a DeleteExpandedDataSetRequest message. * @function verify - * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @memberof google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AudienceSimpleFilter.verify = function verify(message) { + DeleteExpandedDataSetRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.scope != null && message.hasOwnProperty("scope")) - switch (message.scope) { - default: - return "scope: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) { - var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.verify(message.filterExpression); - if (error) - return "filterExpression." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an AudienceSimpleFilter message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteExpandedDataSetRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @memberof google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AudienceSimpleFilter} AudienceSimpleFilter + * @returns {google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest} DeleteExpandedDataSetRequest */ - AudienceSimpleFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AudienceSimpleFilter) + DeleteExpandedDataSetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest) return object; - var message = new $root.google.analytics.admin.v1alpha.AudienceSimpleFilter(); - switch (object.scope) { - default: - if (typeof object.scope === "number") { - message.scope = object.scope; - break; - } - break; - case "AUDIENCE_FILTER_SCOPE_UNSPECIFIED": - case 0: - message.scope = 0; - break; - case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT": - case 1: - message.scope = 1; - break; - case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION": - case 2: - message.scope = 2; - break; - case "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS": - case 3: - message.scope = 3; - break; - } - if (object.filterExpression != null) { - if (typeof object.filterExpression !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceSimpleFilter.filterExpression: object expected"); - message.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.fromObject(object.filterExpression); - } + var message = new $root.google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an AudienceSimpleFilter message. Also converts values to other types if specified. + * Creates a plain object from a DeleteExpandedDataSetRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @memberof google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest * @static - * @param {google.analytics.admin.v1alpha.AudienceSimpleFilter} message AudienceSimpleFilter + * @param {google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest} message DeleteExpandedDataSetRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AudienceSimpleFilter.toObject = function toObject(message, options) { + DeleteExpandedDataSetRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.scope = options.enums === String ? "AUDIENCE_FILTER_SCOPE_UNSPECIFIED" : 0; - object.filterExpression = null; - } - if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] : message.scope; - if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) - object.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.toObject(message.filterExpression, options); + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this AudienceSimpleFilter to JSON. + * Converts this DeleteExpandedDataSetRequest to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @memberof google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest * @instance * @returns {Object.} JSON object */ - AudienceSimpleFilter.prototype.toJSON = function toJSON() { + DeleteExpandedDataSetRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AudienceSimpleFilter + * Gets the default type url for DeleteExpandedDataSetRequest * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @memberof google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AudienceSimpleFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteExpandedDataSetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceSimpleFilter"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest"; }; - return AudienceSimpleFilter; + return DeleteExpandedDataSetRequest; })(); - v1alpha.AudienceSequenceFilter = (function() { + v1alpha.GetExpandedDataSetRequest = (function() { /** - * Properties of an AudienceSequenceFilter. + * Properties of a GetExpandedDataSetRequest. * @memberof google.analytics.admin.v1alpha - * @interface IAudienceSequenceFilter - * @property {google.analytics.admin.v1alpha.AudienceFilterScope|null} [scope] AudienceSequenceFilter scope - * @property {google.protobuf.IDuration|null} [sequenceMaximumDuration] AudienceSequenceFilter sequenceMaximumDuration - * @property {Array.|null} [sequenceSteps] AudienceSequenceFilter sequenceSteps + * @interface IGetExpandedDataSetRequest + * @property {string|null} [name] GetExpandedDataSetRequest name */ /** - * Constructs a new AudienceSequenceFilter. + * Constructs a new GetExpandedDataSetRequest. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents an AudienceSequenceFilter. - * @implements IAudienceSequenceFilter + * @classdesc Represents a GetExpandedDataSetRequest. + * @implements IGetExpandedDataSetRequest * @constructor - * @param {google.analytics.admin.v1alpha.IAudienceSequenceFilter=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IGetExpandedDataSetRequest=} [properties] Properties to set */ - function AudienceSequenceFilter(properties) { - this.sequenceSteps = []; + function GetExpandedDataSetRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38128,106 +37918,75 @@ } /** - * AudienceSequenceFilter scope. - * @member {google.analytics.admin.v1alpha.AudienceFilterScope} scope - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter - * @instance - */ - AudienceSequenceFilter.prototype.scope = 0; - - /** - * AudienceSequenceFilter sequenceMaximumDuration. - * @member {google.protobuf.IDuration|null|undefined} sequenceMaximumDuration - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter - * @instance - */ - AudienceSequenceFilter.prototype.sequenceMaximumDuration = null; - - /** - * AudienceSequenceFilter sequenceSteps. - * @member {Array.} sequenceSteps - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * GetExpandedDataSetRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.GetExpandedDataSetRequest * @instance */ - AudienceSequenceFilter.prototype.sequenceSteps = $util.emptyArray; + GetExpandedDataSetRequest.prototype.name = ""; /** - * Creates a new AudienceSequenceFilter instance using the specified properties. + * Creates a new GetExpandedDataSetRequest instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @memberof google.analytics.admin.v1alpha.GetExpandedDataSetRequest * @static - * @param {google.analytics.admin.v1alpha.IAudienceSequenceFilter=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter} AudienceSequenceFilter instance + * @param {google.analytics.admin.v1alpha.IGetExpandedDataSetRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GetExpandedDataSetRequest} GetExpandedDataSetRequest instance */ - AudienceSequenceFilter.create = function create(properties) { - return new AudienceSequenceFilter(properties); + GetExpandedDataSetRequest.create = function create(properties) { + return new GetExpandedDataSetRequest(properties); }; /** - * Encodes the specified AudienceSequenceFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.verify|verify} messages. + * Encodes the specified GetExpandedDataSetRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetExpandedDataSetRequest.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @memberof google.analytics.admin.v1alpha.GetExpandedDataSetRequest * @static - * @param {google.analytics.admin.v1alpha.IAudienceSequenceFilter} message AudienceSequenceFilter message or plain object to encode + * @param {google.analytics.admin.v1alpha.IGetExpandedDataSetRequest} message GetExpandedDataSetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceSequenceFilter.encode = function encode(message, writer) { + GetExpandedDataSetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.scope); - if (message.sequenceMaximumDuration != null && Object.hasOwnProperty.call(message, "sequenceMaximumDuration")) - $root.google.protobuf.Duration.encode(message.sequenceMaximumDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.sequenceSteps != null && message.sequenceSteps.length) - for (var i = 0; i < message.sequenceSteps.length; ++i) - $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.encode(message.sequenceSteps[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified AudienceSequenceFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.verify|verify} messages. + * Encodes the specified GetExpandedDataSetRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetExpandedDataSetRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @memberof google.analytics.admin.v1alpha.GetExpandedDataSetRequest * @static - * @param {google.analytics.admin.v1alpha.IAudienceSequenceFilter} message AudienceSequenceFilter message or plain object to encode + * @param {google.analytics.admin.v1alpha.IGetExpandedDataSetRequest} message GetExpandedDataSetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceSequenceFilter.encodeDelimited = function encodeDelimited(message, writer) { + GetExpandedDataSetRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AudienceSequenceFilter message from the specified reader or buffer. + * Decodes a GetExpandedDataSetRequest message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @memberof google.analytics.admin.v1alpha.GetExpandedDataSetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter} AudienceSequenceFilter + * @returns {google.analytics.admin.v1alpha.GetExpandedDataSetRequest} GetExpandedDataSetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceSequenceFilter.decode = function decode(reader, length) { + GetExpandedDataSetRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceSequenceFilter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GetExpandedDataSetRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.scope = reader.int32(); - break; - } - case 2: { - message.sequenceMaximumDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 3: { - if (!(message.sequenceSteps && message.sequenceSteps.length)) - message.sequenceSteps = []; - message.sequenceSteps.push($root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.decode(reader, reader.uint32())); + message.name = reader.string(); break; } default: @@ -38239,505 +37998,124 @@ }; /** - * Decodes an AudienceSequenceFilter message from the specified reader or buffer, length delimited. + * Decodes a GetExpandedDataSetRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @memberof google.analytics.admin.v1alpha.GetExpandedDataSetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter} AudienceSequenceFilter + * @returns {google.analytics.admin.v1alpha.GetExpandedDataSetRequest} GetExpandedDataSetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceSequenceFilter.decodeDelimited = function decodeDelimited(reader) { + GetExpandedDataSetRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AudienceSequenceFilter message. + * Verifies a GetExpandedDataSetRequest message. * @function verify - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @memberof google.analytics.admin.v1alpha.GetExpandedDataSetRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AudienceSequenceFilter.verify = function verify(message) { + GetExpandedDataSetRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.scope != null && message.hasOwnProperty("scope")) - switch (message.scope) { - default: - return "scope: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.sequenceMaximumDuration != null && message.hasOwnProperty("sequenceMaximumDuration")) { - var error = $root.google.protobuf.Duration.verify(message.sequenceMaximumDuration); - if (error) - return "sequenceMaximumDuration." + error; - } - if (message.sequenceSteps != null && message.hasOwnProperty("sequenceSteps")) { - if (!Array.isArray(message.sequenceSteps)) - return "sequenceSteps: array expected"; - for (var i = 0; i < message.sequenceSteps.length; ++i) { - var error = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.verify(message.sequenceSteps[i]); - if (error) - return "sequenceSteps." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an AudienceSequenceFilter message from a plain object. Also converts values to their respective internal types. + * Creates a GetExpandedDataSetRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @memberof google.analytics.admin.v1alpha.GetExpandedDataSetRequest * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter} AudienceSequenceFilter + * @returns {google.analytics.admin.v1alpha.GetExpandedDataSetRequest} GetExpandedDataSetRequest */ - AudienceSequenceFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AudienceSequenceFilter) + GetExpandedDataSetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GetExpandedDataSetRequest) return object; - var message = new $root.google.analytics.admin.v1alpha.AudienceSequenceFilter(); - switch (object.scope) { - default: - if (typeof object.scope === "number") { - message.scope = object.scope; - break; - } - break; - case "AUDIENCE_FILTER_SCOPE_UNSPECIFIED": - case 0: - message.scope = 0; - break; - case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT": - case 1: - message.scope = 1; - break; - case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION": - case 2: - message.scope = 2; - break; - case "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS": - case 3: - message.scope = 3; - break; - } - if (object.sequenceMaximumDuration != null) { - if (typeof object.sequenceMaximumDuration !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceSequenceFilter.sequenceMaximumDuration: object expected"); - message.sequenceMaximumDuration = $root.google.protobuf.Duration.fromObject(object.sequenceMaximumDuration); - } - if (object.sequenceSteps) { - if (!Array.isArray(object.sequenceSteps)) - throw TypeError(".google.analytics.admin.v1alpha.AudienceSequenceFilter.sequenceSteps: array expected"); - message.sequenceSteps = []; - for (var i = 0; i < object.sequenceSteps.length; ++i) { - if (typeof object.sequenceSteps[i] !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceSequenceFilter.sequenceSteps: object expected"); - message.sequenceSteps[i] = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.fromObject(object.sequenceSteps[i]); - } - } + var message = new $root.google.analytics.admin.v1alpha.GetExpandedDataSetRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an AudienceSequenceFilter message. Also converts values to other types if specified. + * Creates a plain object from a GetExpandedDataSetRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @memberof google.analytics.admin.v1alpha.GetExpandedDataSetRequest * @static - * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter} message AudienceSequenceFilter + * @param {google.analytics.admin.v1alpha.GetExpandedDataSetRequest} message GetExpandedDataSetRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AudienceSequenceFilter.toObject = function toObject(message, options) { + GetExpandedDataSetRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.sequenceSteps = []; - if (options.defaults) { - object.scope = options.enums === String ? "AUDIENCE_FILTER_SCOPE_UNSPECIFIED" : 0; - object.sequenceMaximumDuration = null; - } - if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] : message.scope; - if (message.sequenceMaximumDuration != null && message.hasOwnProperty("sequenceMaximumDuration")) - object.sequenceMaximumDuration = $root.google.protobuf.Duration.toObject(message.sequenceMaximumDuration, options); - if (message.sequenceSteps && message.sequenceSteps.length) { - object.sequenceSteps = []; - for (var j = 0; j < message.sequenceSteps.length; ++j) - object.sequenceSteps[j] = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.toObject(message.sequenceSteps[j], options); - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this AudienceSequenceFilter to JSON. + * Converts this GetExpandedDataSetRequest to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @memberof google.analytics.admin.v1alpha.GetExpandedDataSetRequest * @instance * @returns {Object.} JSON object */ - AudienceSequenceFilter.prototype.toJSON = function toJSON() { + GetExpandedDataSetRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AudienceSequenceFilter + * Gets the default type url for GetExpandedDataSetRequest * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @memberof google.analytics.admin.v1alpha.GetExpandedDataSetRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AudienceSequenceFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetExpandedDataSetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceSequenceFilter"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GetExpandedDataSetRequest"; }; - AudienceSequenceFilter.AudienceSequenceStep = (function() { - - /** - * Properties of an AudienceSequenceStep. - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter - * @interface IAudienceSequenceStep - * @property {google.analytics.admin.v1alpha.AudienceFilterScope|null} [scope] AudienceSequenceStep scope - * @property {boolean|null} [immediatelyFollows] AudienceSequenceStep immediatelyFollows - * @property {google.protobuf.IDuration|null} [constraintDuration] AudienceSequenceStep constraintDuration - * @property {google.analytics.admin.v1alpha.IAudienceFilterExpression|null} [filterExpression] AudienceSequenceStep filterExpression - */ - - /** - * Constructs a new AudienceSequenceStep. - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter - * @classdesc Represents an AudienceSequenceStep. - * @implements IAudienceSequenceStep - * @constructor - * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep=} [properties] Properties to set - */ - function AudienceSequenceStep(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AudienceSequenceStep scope. - * @member {google.analytics.admin.v1alpha.AudienceFilterScope} scope - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep - * @instance - */ - AudienceSequenceStep.prototype.scope = 0; - - /** - * AudienceSequenceStep immediatelyFollows. - * @member {boolean} immediatelyFollows - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep - * @instance - */ - AudienceSequenceStep.prototype.immediatelyFollows = false; - - /** - * AudienceSequenceStep constraintDuration. - * @member {google.protobuf.IDuration|null|undefined} constraintDuration - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep - * @instance - */ - AudienceSequenceStep.prototype.constraintDuration = null; - - /** - * AudienceSequenceStep filterExpression. - * @member {google.analytics.admin.v1alpha.IAudienceFilterExpression|null|undefined} filterExpression - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep - * @instance - */ - AudienceSequenceStep.prototype.filterExpression = null; - - /** - * Creates a new AudienceSequenceStep instance using the specified properties. - * @function create - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep - * @static - * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep} AudienceSequenceStep instance - */ - AudienceSequenceStep.create = function create(properties) { - return new AudienceSequenceStep(properties); - }; - - /** - * Encodes the specified AudienceSequenceStep message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.verify|verify} messages. - * @function encode - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep - * @static - * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep} message AudienceSequenceStep message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceSequenceStep.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.scope); - if (message.immediatelyFollows != null && Object.hasOwnProperty.call(message, "immediatelyFollows")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.immediatelyFollows); - if (message.constraintDuration != null && Object.hasOwnProperty.call(message, "constraintDuration")) - $root.google.protobuf.Duration.encode(message.constraintDuration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.filterExpression != null && Object.hasOwnProperty.call(message, "filterExpression")) - $root.google.analytics.admin.v1alpha.AudienceFilterExpression.encode(message.filterExpression, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AudienceSequenceStep message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep - * @static - * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep} message AudienceSequenceStep message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceSequenceStep.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AudienceSequenceStep message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep} AudienceSequenceStep - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceSequenceStep.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.scope = reader.int32(); - break; - } - case 2: { - message.immediatelyFollows = reader.bool(); - break; - } - case 3: { - message.constraintDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 4: { - message.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AudienceSequenceStep message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep} AudienceSequenceStep - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceSequenceStep.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AudienceSequenceStep message. - * @function verify - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AudienceSequenceStep.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.scope != null && message.hasOwnProperty("scope")) - switch (message.scope) { - default: - return "scope: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.immediatelyFollows != null && message.hasOwnProperty("immediatelyFollows")) - if (typeof message.immediatelyFollows !== "boolean") - return "immediatelyFollows: boolean expected"; - if (message.constraintDuration != null && message.hasOwnProperty("constraintDuration")) { - var error = $root.google.protobuf.Duration.verify(message.constraintDuration); - if (error) - return "constraintDuration." + error; - } - if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) { - var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.verify(message.filterExpression); - if (error) - return "filterExpression." + error; - } - return null; - }; - - /** - * Creates an AudienceSequenceStep message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep} AudienceSequenceStep - */ - AudienceSequenceStep.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep) - return object; - var message = new $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep(); - switch (object.scope) { - default: - if (typeof object.scope === "number") { - message.scope = object.scope; - break; - } - break; - case "AUDIENCE_FILTER_SCOPE_UNSPECIFIED": - case 0: - message.scope = 0; - break; - case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT": - case 1: - message.scope = 1; - break; - case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION": - case 2: - message.scope = 2; - break; - case "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS": - case 3: - message.scope = 3; - break; - } - if (object.immediatelyFollows != null) - message.immediatelyFollows = Boolean(object.immediatelyFollows); - if (object.constraintDuration != null) { - if (typeof object.constraintDuration !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.constraintDuration: object expected"); - message.constraintDuration = $root.google.protobuf.Duration.fromObject(object.constraintDuration); - } - if (object.filterExpression != null) { - if (typeof object.filterExpression !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.filterExpression: object expected"); - message.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.fromObject(object.filterExpression); - } - return message; - }; - - /** - * Creates a plain object from an AudienceSequenceStep message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep - * @static - * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep} message AudienceSequenceStep - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AudienceSequenceStep.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.scope = options.enums === String ? "AUDIENCE_FILTER_SCOPE_UNSPECIFIED" : 0; - object.immediatelyFollows = false; - object.constraintDuration = null; - object.filterExpression = null; - } - if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] : message.scope; - if (message.immediatelyFollows != null && message.hasOwnProperty("immediatelyFollows")) - object.immediatelyFollows = message.immediatelyFollows; - if (message.constraintDuration != null && message.hasOwnProperty("constraintDuration")) - object.constraintDuration = $root.google.protobuf.Duration.toObject(message.constraintDuration, options); - if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) - object.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.toObject(message.filterExpression, options); - return object; - }; - - /** - * Converts this AudienceSequenceStep to JSON. - * @function toJSON - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep - * @instance - * @returns {Object.} JSON object - */ - AudienceSequenceStep.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AudienceSequenceStep - * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AudienceSequenceStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep"; - }; - - return AudienceSequenceStep; - })(); - - return AudienceSequenceFilter; + return GetExpandedDataSetRequest; })(); - v1alpha.AudienceFilterClause = (function() { + v1alpha.ListExpandedDataSetsRequest = (function() { /** - * Properties of an AudienceFilterClause. + * Properties of a ListExpandedDataSetsRequest. * @memberof google.analytics.admin.v1alpha - * @interface IAudienceFilterClause - * @property {google.analytics.admin.v1alpha.IAudienceSimpleFilter|null} [simpleFilter] AudienceFilterClause simpleFilter - * @property {google.analytics.admin.v1alpha.IAudienceSequenceFilter|null} [sequenceFilter] AudienceFilterClause sequenceFilter - * @property {google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType|null} [clauseType] AudienceFilterClause clauseType + * @interface IListExpandedDataSetsRequest + * @property {string|null} [parent] ListExpandedDataSetsRequest parent + * @property {number|null} [pageSize] ListExpandedDataSetsRequest pageSize + * @property {string|null} [pageToken] ListExpandedDataSetsRequest pageToken */ /** - * Constructs a new AudienceFilterClause. + * Constructs a new ListExpandedDataSetsRequest. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents an AudienceFilterClause. - * @implements IAudienceFilterClause + * @classdesc Represents a ListExpandedDataSetsRequest. + * @implements IListExpandedDataSetsRequest * @constructor - * @param {google.analytics.admin.v1alpha.IAudienceFilterClause=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IListExpandedDataSetsRequest=} [properties] Properties to set */ - function AudienceFilterClause(properties) { + function ListExpandedDataSetsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38745,117 +38123,103 @@ } /** - * AudienceFilterClause simpleFilter. - * @member {google.analytics.admin.v1alpha.IAudienceSimpleFilter|null|undefined} simpleFilter - * @memberof google.analytics.admin.v1alpha.AudienceFilterClause - * @instance - */ - AudienceFilterClause.prototype.simpleFilter = null; - - /** - * AudienceFilterClause sequenceFilter. - * @member {google.analytics.admin.v1alpha.IAudienceSequenceFilter|null|undefined} sequenceFilter - * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * ListExpandedDataSetsRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.ListExpandedDataSetsRequest * @instance */ - AudienceFilterClause.prototype.sequenceFilter = null; + ListExpandedDataSetsRequest.prototype.parent = ""; /** - * AudienceFilterClause clauseType. - * @member {google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType} clauseType - * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * ListExpandedDataSetsRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1alpha.ListExpandedDataSetsRequest * @instance */ - AudienceFilterClause.prototype.clauseType = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ListExpandedDataSetsRequest.prototype.pageSize = 0; /** - * AudienceFilterClause filter. - * @member {"simpleFilter"|"sequenceFilter"|undefined} filter - * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * ListExpandedDataSetsRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1alpha.ListExpandedDataSetsRequest * @instance */ - Object.defineProperty(AudienceFilterClause.prototype, "filter", { - get: $util.oneOfGetter($oneOfFields = ["simpleFilter", "sequenceFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); + ListExpandedDataSetsRequest.prototype.pageToken = ""; /** - * Creates a new AudienceFilterClause instance using the specified properties. + * Creates a new ListExpandedDataSetsRequest instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @memberof google.analytics.admin.v1alpha.ListExpandedDataSetsRequest * @static - * @param {google.analytics.admin.v1alpha.IAudienceFilterClause=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AudienceFilterClause} AudienceFilterClause instance + * @param {google.analytics.admin.v1alpha.IListExpandedDataSetsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListExpandedDataSetsRequest} ListExpandedDataSetsRequest instance */ - AudienceFilterClause.create = function create(properties) { - return new AudienceFilterClause(properties); + ListExpandedDataSetsRequest.create = function create(properties) { + return new ListExpandedDataSetsRequest(properties); }; /** - * Encodes the specified AudienceFilterClause message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterClause.verify|verify} messages. + * Encodes the specified ListExpandedDataSetsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListExpandedDataSetsRequest.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @memberof google.analytics.admin.v1alpha.ListExpandedDataSetsRequest * @static - * @param {google.analytics.admin.v1alpha.IAudienceFilterClause} message AudienceFilterClause message or plain object to encode + * @param {google.analytics.admin.v1alpha.IListExpandedDataSetsRequest} message ListExpandedDataSetsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceFilterClause.encode = function encode(message, writer) { + ListExpandedDataSetsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.clauseType != null && Object.hasOwnProperty.call(message, "clauseType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.clauseType); - if (message.simpleFilter != null && Object.hasOwnProperty.call(message, "simpleFilter")) - $root.google.analytics.admin.v1alpha.AudienceSimpleFilter.encode(message.simpleFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.sequenceFilter != null && Object.hasOwnProperty.call(message, "sequenceFilter")) - $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.encode(message.sequenceFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified AudienceFilterClause message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterClause.verify|verify} messages. + * Encodes the specified ListExpandedDataSetsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListExpandedDataSetsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @memberof google.analytics.admin.v1alpha.ListExpandedDataSetsRequest * @static - * @param {google.analytics.admin.v1alpha.IAudienceFilterClause} message AudienceFilterClause message or plain object to encode + * @param {google.analytics.admin.v1alpha.IListExpandedDataSetsRequest} message ListExpandedDataSetsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceFilterClause.encodeDelimited = function encodeDelimited(message, writer) { + ListExpandedDataSetsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AudienceFilterClause message from the specified reader or buffer. + * Decodes a ListExpandedDataSetsRequest message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @memberof google.analytics.admin.v1alpha.ListExpandedDataSetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.AudienceFilterClause} AudienceFilterClause + * @returns {google.analytics.admin.v1alpha.ListExpandedDataSetsRequest} ListExpandedDataSetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceFilterClause.decode = function decode(reader, length) { + ListExpandedDataSetsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceFilterClause(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: { - message.simpleFilter = $root.google.analytics.admin.v1alpha.AudienceSimpleFilter.decode(reader, reader.uint32()); + case 1: { + message.parent = reader.string(); break; } - case 3: { - message.sequenceFilter = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.decode(reader, reader.uint32()); + case 2: { + message.pageSize = reader.int32(); break; } - case 1: { - message.clauseType = reader.int32(); + case 3: { + message.pageToken = reader.string(); break; } default: @@ -38867,202 +38231,141 @@ }; /** - * Decodes an AudienceFilterClause message from the specified reader or buffer, length delimited. + * Decodes a ListExpandedDataSetsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @memberof google.analytics.admin.v1alpha.ListExpandedDataSetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AudienceFilterClause} AudienceFilterClause + * @returns {google.analytics.admin.v1alpha.ListExpandedDataSetsRequest} ListExpandedDataSetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceFilterClause.decodeDelimited = function decodeDelimited(reader) { + ListExpandedDataSetsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AudienceFilterClause message. + * Verifies a ListExpandedDataSetsRequest message. * @function verify - * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @memberof google.analytics.admin.v1alpha.ListExpandedDataSetsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AudienceFilterClause.verify = function verify(message) { + ListExpandedDataSetsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.simpleFilter != null && message.hasOwnProperty("simpleFilter")) { - properties.filter = 1; - { - var error = $root.google.analytics.admin.v1alpha.AudienceSimpleFilter.verify(message.simpleFilter); - if (error) - return "simpleFilter." + error; - } - } - if (message.sequenceFilter != null && message.hasOwnProperty("sequenceFilter")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; - { - var error = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.verify(message.sequenceFilter); - if (error) - return "sequenceFilter." + error; - } - } - if (message.clauseType != null && message.hasOwnProperty("clauseType")) - switch (message.clauseType) { - default: - return "clauseType: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates an AudienceFilterClause message from a plain object. Also converts values to their respective internal types. + * Creates a ListExpandedDataSetsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @memberof google.analytics.admin.v1alpha.ListExpandedDataSetsRequest * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AudienceFilterClause} AudienceFilterClause + * @returns {google.analytics.admin.v1alpha.ListExpandedDataSetsRequest} ListExpandedDataSetsRequest */ - AudienceFilterClause.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AudienceFilterClause) + ListExpandedDataSetsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest) return object; - var message = new $root.google.analytics.admin.v1alpha.AudienceFilterClause(); - if (object.simpleFilter != null) { - if (typeof object.simpleFilter !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterClause.simpleFilter: object expected"); - message.simpleFilter = $root.google.analytics.admin.v1alpha.AudienceSimpleFilter.fromObject(object.simpleFilter); - } - if (object.sequenceFilter != null) { - if (typeof object.sequenceFilter !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterClause.sequenceFilter: object expected"); - message.sequenceFilter = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.fromObject(object.sequenceFilter); - } - switch (object.clauseType) { - default: - if (typeof object.clauseType === "number") { - message.clauseType = object.clauseType; - break; - } - break; - case "AUDIENCE_CLAUSE_TYPE_UNSPECIFIED": - case 0: - message.clauseType = 0; - break; - case "INCLUDE": - case 1: - message.clauseType = 1; - break; - case "EXCLUDE": - case 2: - message.clauseType = 2; - break; - } + var message = new $root.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from an AudienceFilterClause message. Also converts values to other types if specified. + * Creates a plain object from a ListExpandedDataSetsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @memberof google.analytics.admin.v1alpha.ListExpandedDataSetsRequest * @static - * @param {google.analytics.admin.v1alpha.AudienceFilterClause} message AudienceFilterClause + * @param {google.analytics.admin.v1alpha.ListExpandedDataSetsRequest} message ListExpandedDataSetsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AudienceFilterClause.toObject = function toObject(message, options) { + ListExpandedDataSetsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.clauseType = options.enums === String ? "AUDIENCE_CLAUSE_TYPE_UNSPECIFIED" : 0; - if (message.clauseType != null && message.hasOwnProperty("clauseType")) - object.clauseType = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType[message.clauseType] === undefined ? message.clauseType : $root.google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType[message.clauseType] : message.clauseType; - if (message.simpleFilter != null && message.hasOwnProperty("simpleFilter")) { - object.simpleFilter = $root.google.analytics.admin.v1alpha.AudienceSimpleFilter.toObject(message.simpleFilter, options); - if (options.oneofs) - object.filter = "simpleFilter"; - } - if (message.sequenceFilter != null && message.hasOwnProperty("sequenceFilter")) { - object.sequenceFilter = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.toObject(message.sequenceFilter, options); - if (options.oneofs) - object.filter = "sequenceFilter"; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this AudienceFilterClause to JSON. + * Converts this ListExpandedDataSetsRequest to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @memberof google.analytics.admin.v1alpha.ListExpandedDataSetsRequest * @instance * @returns {Object.} JSON object */ - AudienceFilterClause.prototype.toJSON = function toJSON() { + ListExpandedDataSetsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AudienceFilterClause + * Gets the default type url for ListExpandedDataSetsRequest * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @memberof google.analytics.admin.v1alpha.ListExpandedDataSetsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AudienceFilterClause.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListExpandedDataSetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceFilterClause"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListExpandedDataSetsRequest"; }; - /** - * AudienceClauseType enum. - * @name google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType - * @enum {number} - * @property {number} AUDIENCE_CLAUSE_TYPE_UNSPECIFIED=0 AUDIENCE_CLAUSE_TYPE_UNSPECIFIED value - * @property {number} INCLUDE=1 INCLUDE value - * @property {number} EXCLUDE=2 EXCLUDE value - */ - AudienceFilterClause.AudienceClauseType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "AUDIENCE_CLAUSE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INCLUDE"] = 1; - values[valuesById[2] = "EXCLUDE"] = 2; - return values; - })(); - - return AudienceFilterClause; + return ListExpandedDataSetsRequest; })(); - v1alpha.AudienceEventTrigger = (function() { + v1alpha.ListExpandedDataSetsResponse = (function() { /** - * Properties of an AudienceEventTrigger. + * Properties of a ListExpandedDataSetsResponse. * @memberof google.analytics.admin.v1alpha - * @interface IAudienceEventTrigger - * @property {string|null} [eventName] AudienceEventTrigger eventName - * @property {google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition|null} [logCondition] AudienceEventTrigger logCondition + * @interface IListExpandedDataSetsResponse + * @property {Array.|null} [expandedDataSets] ListExpandedDataSetsResponse expandedDataSets + * @property {string|null} [nextPageToken] ListExpandedDataSetsResponse nextPageToken */ /** - * Constructs a new AudienceEventTrigger. + * Constructs a new ListExpandedDataSetsResponse. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents an AudienceEventTrigger. - * @implements IAudienceEventTrigger + * @classdesc Represents a ListExpandedDataSetsResponse. + * @implements IListExpandedDataSetsResponse * @constructor - * @param {google.analytics.admin.v1alpha.IAudienceEventTrigger=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IListExpandedDataSetsResponse=} [properties] Properties to set */ - function AudienceEventTrigger(properties) { + function ListExpandedDataSetsResponse(properties) { + this.expandedDataSets = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39070,89 +38373,92 @@ } /** - * AudienceEventTrigger eventName. - * @member {string} eventName - * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * ListExpandedDataSetsResponse expandedDataSets. + * @member {Array.} expandedDataSets + * @memberof google.analytics.admin.v1alpha.ListExpandedDataSetsResponse * @instance */ - AudienceEventTrigger.prototype.eventName = ""; + ListExpandedDataSetsResponse.prototype.expandedDataSets = $util.emptyArray; /** - * AudienceEventTrigger logCondition. - * @member {google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition} logCondition - * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * ListExpandedDataSetsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1alpha.ListExpandedDataSetsResponse * @instance */ - AudienceEventTrigger.prototype.logCondition = 0; + ListExpandedDataSetsResponse.prototype.nextPageToken = ""; /** - * Creates a new AudienceEventTrigger instance using the specified properties. + * Creates a new ListExpandedDataSetsResponse instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @memberof google.analytics.admin.v1alpha.ListExpandedDataSetsResponse * @static - * @param {google.analytics.admin.v1alpha.IAudienceEventTrigger=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AudienceEventTrigger} AudienceEventTrigger instance + * @param {google.analytics.admin.v1alpha.IListExpandedDataSetsResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListExpandedDataSetsResponse} ListExpandedDataSetsResponse instance */ - AudienceEventTrigger.create = function create(properties) { - return new AudienceEventTrigger(properties); + ListExpandedDataSetsResponse.create = function create(properties) { + return new ListExpandedDataSetsResponse(properties); }; /** - * Encodes the specified AudienceEventTrigger message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventTrigger.verify|verify} messages. + * Encodes the specified ListExpandedDataSetsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListExpandedDataSetsResponse.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @memberof google.analytics.admin.v1alpha.ListExpandedDataSetsResponse * @static - * @param {google.analytics.admin.v1alpha.IAudienceEventTrigger} message AudienceEventTrigger message or plain object to encode + * @param {google.analytics.admin.v1alpha.IListExpandedDataSetsResponse} message ListExpandedDataSetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceEventTrigger.encode = function encode(message, writer) { + ListExpandedDataSetsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.eventName != null && Object.hasOwnProperty.call(message, "eventName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventName); - if (message.logCondition != null && Object.hasOwnProperty.call(message, "logCondition")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.logCondition); + if (message.expandedDataSets != null && message.expandedDataSets.length) + for (var i = 0; i < message.expandedDataSets.length; ++i) + $root.google.analytics.admin.v1alpha.ExpandedDataSet.encode(message.expandedDataSets[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 AudienceEventTrigger message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventTrigger.verify|verify} messages. + * Encodes the specified ListExpandedDataSetsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListExpandedDataSetsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @memberof google.analytics.admin.v1alpha.ListExpandedDataSetsResponse * @static - * @param {google.analytics.admin.v1alpha.IAudienceEventTrigger} message AudienceEventTrigger message or plain object to encode + * @param {google.analytics.admin.v1alpha.IListExpandedDataSetsResponse} message ListExpandedDataSetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceEventTrigger.encodeDelimited = function encodeDelimited(message, writer) { + ListExpandedDataSetsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AudienceEventTrigger message from the specified reader or buffer. + * Decodes a ListExpandedDataSetsResponse message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @memberof google.analytics.admin.v1alpha.ListExpandedDataSetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.AudienceEventTrigger} AudienceEventTrigger + * @returns {google.analytics.admin.v1alpha.ListExpandedDataSetsResponse} ListExpandedDataSetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceEventTrigger.decode = function decode(reader, length) { + ListExpandedDataSetsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceEventTrigger(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListExpandedDataSetsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.eventName = reader.string(); + if (!(message.expandedDataSets && message.expandedDataSets.length)) + message.expandedDataSets = []; + message.expandedDataSets.push($root.google.analytics.admin.v1alpha.ExpandedDataSet.decode(reader, reader.uint32())); break; } case 2: { - message.logCondition = reader.int32(); + message.nextPageToken = reader.string(); break; } default: @@ -39164,179 +38470,149 @@ }; /** - * Decodes an AudienceEventTrigger message from the specified reader or buffer, length delimited. + * Decodes a ListExpandedDataSetsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @memberof google.analytics.admin.v1alpha.ListExpandedDataSetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AudienceEventTrigger} AudienceEventTrigger + * @returns {google.analytics.admin.v1alpha.ListExpandedDataSetsResponse} ListExpandedDataSetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceEventTrigger.decodeDelimited = function decodeDelimited(reader) { + ListExpandedDataSetsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AudienceEventTrigger message. + * Verifies a ListExpandedDataSetsResponse message. * @function verify - * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @memberof google.analytics.admin.v1alpha.ListExpandedDataSetsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AudienceEventTrigger.verify = function verify(message) { + ListExpandedDataSetsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eventName != null && message.hasOwnProperty("eventName")) - if (!$util.isString(message.eventName)) - return "eventName: string expected"; - if (message.logCondition != null && message.hasOwnProperty("logCondition")) - switch (message.logCondition) { - default: - return "logCondition: enum value expected"; - case 0: - case 1: - case 2: - break; + if (message.expandedDataSets != null && message.hasOwnProperty("expandedDataSets")) { + if (!Array.isArray(message.expandedDataSets)) + return "expandedDataSets: array expected"; + for (var i = 0; i < message.expandedDataSets.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.ExpandedDataSet.verify(message.expandedDataSets[i]); + if (error) + return "expandedDataSets." + error; } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an AudienceEventTrigger message from a plain object. Also converts values to their respective internal types. + * Creates a ListExpandedDataSetsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @memberof google.analytics.admin.v1alpha.ListExpandedDataSetsResponse * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AudienceEventTrigger} AudienceEventTrigger + * @returns {google.analytics.admin.v1alpha.ListExpandedDataSetsResponse} ListExpandedDataSetsResponse */ - AudienceEventTrigger.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AudienceEventTrigger) + ListExpandedDataSetsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListExpandedDataSetsResponse) return object; - var message = new $root.google.analytics.admin.v1alpha.AudienceEventTrigger(); - if (object.eventName != null) - message.eventName = String(object.eventName); - switch (object.logCondition) { - default: - if (typeof object.logCondition === "number") { - message.logCondition = object.logCondition; - break; + var message = new $root.google.analytics.admin.v1alpha.ListExpandedDataSetsResponse(); + if (object.expandedDataSets) { + if (!Array.isArray(object.expandedDataSets)) + throw TypeError(".google.analytics.admin.v1alpha.ListExpandedDataSetsResponse.expandedDataSets: array expected"); + message.expandedDataSets = []; + for (var i = 0; i < object.expandedDataSets.length; ++i) { + if (typeof object.expandedDataSets[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ListExpandedDataSetsResponse.expandedDataSets: object expected"); + message.expandedDataSets[i] = $root.google.analytics.admin.v1alpha.ExpandedDataSet.fromObject(object.expandedDataSets[i]); } - break; - case "LOG_CONDITION_UNSPECIFIED": - case 0: - message.logCondition = 0; - break; - case "AUDIENCE_JOINED": - case 1: - message.logCondition = 1; - break; - case "AUDIENCE_MEMBERSHIP_RENEWED": - case 2: - message.logCondition = 2; - break; } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an AudienceEventTrigger message. Also converts values to other types if specified. + * Creates a plain object from a ListExpandedDataSetsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @memberof google.analytics.admin.v1alpha.ListExpandedDataSetsResponse * @static - * @param {google.analytics.admin.v1alpha.AudienceEventTrigger} message AudienceEventTrigger + * @param {google.analytics.admin.v1alpha.ListExpandedDataSetsResponse} message ListExpandedDataSetsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AudienceEventTrigger.toObject = function toObject(message, options) { + ListExpandedDataSetsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.eventName = ""; - object.logCondition = options.enums === String ? "LOG_CONDITION_UNSPECIFIED" : 0; + if (options.arrays || options.defaults) + object.expandedDataSets = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.expandedDataSets && message.expandedDataSets.length) { + object.expandedDataSets = []; + for (var j = 0; j < message.expandedDataSets.length; ++j) + object.expandedDataSets[j] = $root.google.analytics.admin.v1alpha.ExpandedDataSet.toObject(message.expandedDataSets[j], options); } - if (message.eventName != null && message.hasOwnProperty("eventName")) - object.eventName = message.eventName; - if (message.logCondition != null && message.hasOwnProperty("logCondition")) - object.logCondition = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition[message.logCondition] === undefined ? message.logCondition : $root.google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition[message.logCondition] : message.logCondition; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this AudienceEventTrigger to JSON. + * Converts this ListExpandedDataSetsResponse to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @memberof google.analytics.admin.v1alpha.ListExpandedDataSetsResponse * @instance * @returns {Object.} JSON object */ - AudienceEventTrigger.prototype.toJSON = function toJSON() { + ListExpandedDataSetsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AudienceEventTrigger + * Gets the default type url for ListExpandedDataSetsResponse * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @memberof google.analytics.admin.v1alpha.ListExpandedDataSetsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AudienceEventTrigger.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListExpandedDataSetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceEventTrigger"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListExpandedDataSetsResponse"; }; - /** - * LogCondition enum. - * @name google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition - * @enum {number} - * @property {number} LOG_CONDITION_UNSPECIFIED=0 LOG_CONDITION_UNSPECIFIED value - * @property {number} AUDIENCE_JOINED=1 AUDIENCE_JOINED value - * @property {number} AUDIENCE_MEMBERSHIP_RENEWED=2 AUDIENCE_MEMBERSHIP_RENEWED value - */ - AudienceEventTrigger.LogCondition = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOG_CONDITION_UNSPECIFIED"] = 0; - values[valuesById[1] = "AUDIENCE_JOINED"] = 1; - values[valuesById[2] = "AUDIENCE_MEMBERSHIP_RENEWED"] = 2; - return values; - })(); - - return AudienceEventTrigger; + return ListExpandedDataSetsResponse; })(); - v1alpha.Audience = (function() { + v1alpha.SetAutomatedGa4ConfigurationOptOutRequest = (function() { /** - * Properties of an Audience. + * Properties of a SetAutomatedGa4ConfigurationOptOutRequest. * @memberof google.analytics.admin.v1alpha - * @interface IAudience - * @property {string|null} [name] Audience name - * @property {string|null} [displayName] Audience displayName - * @property {string|null} [description] Audience description - * @property {number|null} [membershipDurationDays] Audience membershipDurationDays - * @property {boolean|null} [adsPersonalizationEnabled] Audience adsPersonalizationEnabled - * @property {google.analytics.admin.v1alpha.IAudienceEventTrigger|null} [eventTrigger] Audience eventTrigger - * @property {google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode|null} [exclusionDurationMode] Audience exclusionDurationMode - * @property {Array.|null} [filterClauses] Audience filterClauses + * @interface ISetAutomatedGa4ConfigurationOptOutRequest + * @property {string|null} [property] SetAutomatedGa4ConfigurationOptOutRequest property + * @property {boolean|null} [optOut] SetAutomatedGa4ConfigurationOptOutRequest optOut */ /** - * Constructs a new Audience. + * Constructs a new SetAutomatedGa4ConfigurationOptOutRequest. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents an Audience. - * @implements IAudience + * @classdesc Represents a SetAutomatedGa4ConfigurationOptOutRequest. + * @implements ISetAutomatedGa4ConfigurationOptOutRequest * @constructor - * @param {google.analytics.admin.v1alpha.IAudience=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest=} [properties] Properties to set */ - function Audience(properties) { - this.filterClauses = []; + function SetAutomatedGa4ConfigurationOptOutRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39344,176 +38620,89 @@ } /** - * Audience name. - * @member {string} name - * @memberof google.analytics.admin.v1alpha.Audience - * @instance - */ - Audience.prototype.name = ""; - - /** - * Audience displayName. - * @member {string} displayName - * @memberof google.analytics.admin.v1alpha.Audience - * @instance - */ - Audience.prototype.displayName = ""; - - /** - * Audience description. - * @member {string} description - * @memberof google.analytics.admin.v1alpha.Audience - * @instance - */ - Audience.prototype.description = ""; - - /** - * Audience membershipDurationDays. - * @member {number} membershipDurationDays - * @memberof google.analytics.admin.v1alpha.Audience - * @instance - */ - Audience.prototype.membershipDurationDays = 0; - - /** - * Audience adsPersonalizationEnabled. - * @member {boolean} adsPersonalizationEnabled - * @memberof google.analytics.admin.v1alpha.Audience - * @instance - */ - Audience.prototype.adsPersonalizationEnabled = false; - - /** - * Audience eventTrigger. - * @member {google.analytics.admin.v1alpha.IAudienceEventTrigger|null|undefined} eventTrigger - * @memberof google.analytics.admin.v1alpha.Audience - * @instance - */ - Audience.prototype.eventTrigger = null; - - /** - * Audience exclusionDurationMode. - * @member {google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode} exclusionDurationMode - * @memberof google.analytics.admin.v1alpha.Audience + * SetAutomatedGa4ConfigurationOptOutRequest property. + * @member {string} property + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest * @instance */ - Audience.prototype.exclusionDurationMode = 0; + SetAutomatedGa4ConfigurationOptOutRequest.prototype.property = ""; /** - * Audience filterClauses. - * @member {Array.} filterClauses - * @memberof google.analytics.admin.v1alpha.Audience + * SetAutomatedGa4ConfigurationOptOutRequest optOut. + * @member {boolean} optOut + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest * @instance */ - Audience.prototype.filterClauses = $util.emptyArray; + SetAutomatedGa4ConfigurationOptOutRequest.prototype.optOut = false; /** - * Creates a new Audience instance using the specified properties. + * Creates a new SetAutomatedGa4ConfigurationOptOutRequest instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.Audience + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest * @static - * @param {google.analytics.admin.v1alpha.IAudience=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.Audience} Audience instance + * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest} SetAutomatedGa4ConfigurationOptOutRequest instance */ - Audience.create = function create(properties) { - return new Audience(properties); + SetAutomatedGa4ConfigurationOptOutRequest.create = function create(properties) { + return new SetAutomatedGa4ConfigurationOptOutRequest(properties); }; /** - * Encodes the specified Audience message. Does not implicitly {@link google.analytics.admin.v1alpha.Audience.verify|verify} messages. + * Encodes the specified SetAutomatedGa4ConfigurationOptOutRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.Audience + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest * @static - * @param {google.analytics.admin.v1alpha.IAudience} message Audience message or plain object to encode + * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest} message SetAutomatedGa4ConfigurationOptOutRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Audience.encode = function encode(message, writer) { + SetAutomatedGa4ConfigurationOptOutRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.membershipDurationDays != null && Object.hasOwnProperty.call(message, "membershipDurationDays")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.membershipDurationDays); - if (message.adsPersonalizationEnabled != null && Object.hasOwnProperty.call(message, "adsPersonalizationEnabled")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.adsPersonalizationEnabled); - if (message.eventTrigger != null && Object.hasOwnProperty.call(message, "eventTrigger")) - $root.google.analytics.admin.v1alpha.AudienceEventTrigger.encode(message.eventTrigger, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.exclusionDurationMode != null && Object.hasOwnProperty.call(message, "exclusionDurationMode")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.exclusionDurationMode); - if (message.filterClauses != null && message.filterClauses.length) - for (var i = 0; i < message.filterClauses.length; ++i) - $root.google.analytics.admin.v1alpha.AudienceFilterClause.encode(message.filterClauses[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.optOut != null && Object.hasOwnProperty.call(message, "optOut")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.optOut); return writer; }; /** - * Encodes the specified Audience message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.Audience.verify|verify} messages. + * Encodes the specified SetAutomatedGa4ConfigurationOptOutRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.Audience + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest * @static - * @param {google.analytics.admin.v1alpha.IAudience} message Audience message or plain object to encode + * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest} message SetAutomatedGa4ConfigurationOptOutRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Audience.encodeDelimited = function encodeDelimited(message, writer) { + SetAutomatedGa4ConfigurationOptOutRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Audience message from the specified reader or buffer. + * Decodes a SetAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.Audience + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.Audience} Audience + * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest} SetAutomatedGa4ConfigurationOptOutRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Audience.decode = function decode(reader, length) { + SetAutomatedGa4ConfigurationOptOutRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.Audience(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.property = reader.string(); break; } case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 4: { - message.membershipDurationDays = reader.int32(); - break; - } - case 5: { - message.adsPersonalizationEnabled = reader.bool(); - break; - } - case 6: { - message.eventTrigger = $root.google.analytics.admin.v1alpha.AudienceEventTrigger.decode(reader, reader.uint32()); - break; - } - case 7: { - message.exclusionDurationMode = reader.int32(); - break; - } - case 8: { - if (!(message.filterClauses && message.filterClauses.length)) - message.filterClauses = []; - message.filterClauses.push($root.google.analytics.admin.v1alpha.AudienceFilterClause.decode(reader, reader.uint32())); + message.optOut = reader.bool(); break; } default: @@ -39525,499 +38714,130 @@ }; /** - * Decodes an Audience message from the specified reader or buffer, length delimited. + * Decodes a SetAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.Audience + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.Audience} Audience + * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest} SetAutomatedGa4ConfigurationOptOutRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Audience.decodeDelimited = function decodeDelimited(reader) { + SetAutomatedGa4ConfigurationOptOutRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Audience message. + * Verifies a SetAutomatedGa4ConfigurationOptOutRequest message. * @function verify - * @memberof google.analytics.admin.v1alpha.Audience + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Audience.verify = function verify(message) { + SetAutomatedGa4ConfigurationOptOutRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.membershipDurationDays != null && message.hasOwnProperty("membershipDurationDays")) - if (!$util.isInteger(message.membershipDurationDays)) - return "membershipDurationDays: integer expected"; - if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) - if (typeof message.adsPersonalizationEnabled !== "boolean") - return "adsPersonalizationEnabled: boolean expected"; - if (message.eventTrigger != null && message.hasOwnProperty("eventTrigger")) { - var error = $root.google.analytics.admin.v1alpha.AudienceEventTrigger.verify(message.eventTrigger); - if (error) - return "eventTrigger." + error; - } - if (message.exclusionDurationMode != null && message.hasOwnProperty("exclusionDurationMode")) - switch (message.exclusionDurationMode) { - default: - return "exclusionDurationMode: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.filterClauses != null && message.hasOwnProperty("filterClauses")) { - if (!Array.isArray(message.filterClauses)) - return "filterClauses: array expected"; - for (var i = 0; i < message.filterClauses.length; ++i) { - var error = $root.google.analytics.admin.v1alpha.AudienceFilterClause.verify(message.filterClauses[i]); - if (error) - return "filterClauses." + error; - } - } + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + if (message.optOut != null && message.hasOwnProperty("optOut")) + if (typeof message.optOut !== "boolean") + return "optOut: boolean expected"; return null; }; /** - * Creates an Audience message from a plain object. Also converts values to their respective internal types. + * Creates a SetAutomatedGa4ConfigurationOptOutRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.Audience + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.Audience} Audience + * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest} SetAutomatedGa4ConfigurationOptOutRequest */ - Audience.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.Audience) + SetAutomatedGa4ConfigurationOptOutRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest) return object; - var message = new $root.google.analytics.admin.v1alpha.Audience(); - 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.membershipDurationDays != null) - message.membershipDurationDays = object.membershipDurationDays | 0; - if (object.adsPersonalizationEnabled != null) - message.adsPersonalizationEnabled = Boolean(object.adsPersonalizationEnabled); - if (object.eventTrigger != null) { - if (typeof object.eventTrigger !== "object") - throw TypeError(".google.analytics.admin.v1alpha.Audience.eventTrigger: object expected"); - message.eventTrigger = $root.google.analytics.admin.v1alpha.AudienceEventTrigger.fromObject(object.eventTrigger); - } - switch (object.exclusionDurationMode) { - default: - if (typeof object.exclusionDurationMode === "number") { - message.exclusionDurationMode = object.exclusionDurationMode; - break; - } - break; - case "AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED": - case 0: - message.exclusionDurationMode = 0; - break; - case "EXCLUDE_TEMPORARILY": - case 1: - message.exclusionDurationMode = 1; - break; - case "EXCLUDE_PERMANENTLY": - case 2: - message.exclusionDurationMode = 2; - break; - } - if (object.filterClauses) { - if (!Array.isArray(object.filterClauses)) - throw TypeError(".google.analytics.admin.v1alpha.Audience.filterClauses: array expected"); - message.filterClauses = []; - for (var i = 0; i < object.filterClauses.length; ++i) { - if (typeof object.filterClauses[i] !== "object") - throw TypeError(".google.analytics.admin.v1alpha.Audience.filterClauses: object expected"); - message.filterClauses[i] = $root.google.analytics.admin.v1alpha.AudienceFilterClause.fromObject(object.filterClauses[i]); - } - } + var message = new $root.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest(); + if (object.property != null) + message.property = String(object.property); + if (object.optOut != null) + message.optOut = Boolean(object.optOut); return message; }; /** - * Creates a plain object from an Audience message. Also converts values to other types if specified. + * Creates a plain object from a SetAutomatedGa4ConfigurationOptOutRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.Audience + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest * @static - * @param {google.analytics.admin.v1alpha.Audience} message Audience + * @param {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest} message SetAutomatedGa4ConfigurationOptOutRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Audience.toObject = function toObject(message, options) { + SetAutomatedGa4ConfigurationOptOutRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.filterClauses = []; if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - object.membershipDurationDays = 0; - object.adsPersonalizationEnabled = false; - object.eventTrigger = null; - object.exclusionDurationMode = options.enums === String ? "AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.membershipDurationDays != null && message.hasOwnProperty("membershipDurationDays")) - object.membershipDurationDays = message.membershipDurationDays; - if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) - object.adsPersonalizationEnabled = message.adsPersonalizationEnabled; - if (message.eventTrigger != null && message.hasOwnProperty("eventTrigger")) - object.eventTrigger = $root.google.analytics.admin.v1alpha.AudienceEventTrigger.toObject(message.eventTrigger, options); - if (message.exclusionDurationMode != null && message.hasOwnProperty("exclusionDurationMode")) - object.exclusionDurationMode = options.enums === String ? $root.google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode[message.exclusionDurationMode] === undefined ? message.exclusionDurationMode : $root.google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode[message.exclusionDurationMode] : message.exclusionDurationMode; - if (message.filterClauses && message.filterClauses.length) { - object.filterClauses = []; - for (var j = 0; j < message.filterClauses.length; ++j) - object.filterClauses[j] = $root.google.analytics.admin.v1alpha.AudienceFilterClause.toObject(message.filterClauses[j], options); + object.property = ""; + object.optOut = false; } + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + if (message.optOut != null && message.hasOwnProperty("optOut")) + object.optOut = message.optOut; return object; }; /** - * Converts this Audience to JSON. + * Converts this SetAutomatedGa4ConfigurationOptOutRequest to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.Audience + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest * @instance * @returns {Object.} JSON object */ - Audience.prototype.toJSON = function toJSON() { + SetAutomatedGa4ConfigurationOptOutRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Audience + * Gets the default type url for SetAutomatedGa4ConfigurationOptOutRequest * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.Audience + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Audience.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SetAutomatedGa4ConfigurationOptOutRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.Audience"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest"; }; - /** - * AudienceExclusionDurationMode enum. - * @name google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode - * @enum {number} - * @property {number} AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED=0 AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED value - * @property {number} EXCLUDE_TEMPORARILY=1 EXCLUDE_TEMPORARILY value - * @property {number} EXCLUDE_PERMANENTLY=2 EXCLUDE_PERMANENTLY value - */ - Audience.AudienceExclusionDurationMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "EXCLUDE_TEMPORARILY"] = 1; - values[valuesById[2] = "EXCLUDE_PERMANENTLY"] = 2; - return values; - })(); - - return Audience; - })(); - - /** - * IndustryCategory enum. - * @name google.analytics.admin.v1alpha.IndustryCategory - * @enum {number} - * @property {number} INDUSTRY_CATEGORY_UNSPECIFIED=0 INDUSTRY_CATEGORY_UNSPECIFIED value - * @property {number} AUTOMOTIVE=1 AUTOMOTIVE value - * @property {number} BUSINESS_AND_INDUSTRIAL_MARKETS=2 BUSINESS_AND_INDUSTRIAL_MARKETS value - * @property {number} FINANCE=3 FINANCE value - * @property {number} HEALTHCARE=4 HEALTHCARE value - * @property {number} TECHNOLOGY=5 TECHNOLOGY value - * @property {number} TRAVEL=6 TRAVEL value - * @property {number} OTHER=7 OTHER value - * @property {number} ARTS_AND_ENTERTAINMENT=8 ARTS_AND_ENTERTAINMENT value - * @property {number} BEAUTY_AND_FITNESS=9 BEAUTY_AND_FITNESS value - * @property {number} BOOKS_AND_LITERATURE=10 BOOKS_AND_LITERATURE value - * @property {number} FOOD_AND_DRINK=11 FOOD_AND_DRINK value - * @property {number} GAMES=12 GAMES value - * @property {number} HOBBIES_AND_LEISURE=13 HOBBIES_AND_LEISURE value - * @property {number} HOME_AND_GARDEN=14 HOME_AND_GARDEN value - * @property {number} INTERNET_AND_TELECOM=15 INTERNET_AND_TELECOM value - * @property {number} LAW_AND_GOVERNMENT=16 LAW_AND_GOVERNMENT value - * @property {number} NEWS=17 NEWS value - * @property {number} ONLINE_COMMUNITIES=18 ONLINE_COMMUNITIES value - * @property {number} PEOPLE_AND_SOCIETY=19 PEOPLE_AND_SOCIETY value - * @property {number} PETS_AND_ANIMALS=20 PETS_AND_ANIMALS value - * @property {number} REAL_ESTATE=21 REAL_ESTATE value - * @property {number} REFERENCE=22 REFERENCE value - * @property {number} SCIENCE=23 SCIENCE value - * @property {number} SPORTS=24 SPORTS value - * @property {number} JOBS_AND_EDUCATION=25 JOBS_AND_EDUCATION value - * @property {number} SHOPPING=26 SHOPPING value - */ - v1alpha.IndustryCategory = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INDUSTRY_CATEGORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "AUTOMOTIVE"] = 1; - values[valuesById[2] = "BUSINESS_AND_INDUSTRIAL_MARKETS"] = 2; - values[valuesById[3] = "FINANCE"] = 3; - values[valuesById[4] = "HEALTHCARE"] = 4; - values[valuesById[5] = "TECHNOLOGY"] = 5; - values[valuesById[6] = "TRAVEL"] = 6; - values[valuesById[7] = "OTHER"] = 7; - values[valuesById[8] = "ARTS_AND_ENTERTAINMENT"] = 8; - values[valuesById[9] = "BEAUTY_AND_FITNESS"] = 9; - values[valuesById[10] = "BOOKS_AND_LITERATURE"] = 10; - values[valuesById[11] = "FOOD_AND_DRINK"] = 11; - values[valuesById[12] = "GAMES"] = 12; - values[valuesById[13] = "HOBBIES_AND_LEISURE"] = 13; - values[valuesById[14] = "HOME_AND_GARDEN"] = 14; - values[valuesById[15] = "INTERNET_AND_TELECOM"] = 15; - values[valuesById[16] = "LAW_AND_GOVERNMENT"] = 16; - values[valuesById[17] = "NEWS"] = 17; - values[valuesById[18] = "ONLINE_COMMUNITIES"] = 18; - values[valuesById[19] = "PEOPLE_AND_SOCIETY"] = 19; - values[valuesById[20] = "PETS_AND_ANIMALS"] = 20; - values[valuesById[21] = "REAL_ESTATE"] = 21; - values[valuesById[22] = "REFERENCE"] = 22; - values[valuesById[23] = "SCIENCE"] = 23; - values[valuesById[24] = "SPORTS"] = 24; - values[valuesById[25] = "JOBS_AND_EDUCATION"] = 25; - values[valuesById[26] = "SHOPPING"] = 26; - return values; - })(); - - /** - * ServiceLevel enum. - * @name google.analytics.admin.v1alpha.ServiceLevel - * @enum {number} - * @property {number} SERVICE_LEVEL_UNSPECIFIED=0 SERVICE_LEVEL_UNSPECIFIED value - * @property {number} GOOGLE_ANALYTICS_STANDARD=1 GOOGLE_ANALYTICS_STANDARD value - * @property {number} GOOGLE_ANALYTICS_360=2 GOOGLE_ANALYTICS_360 value - */ - v1alpha.ServiceLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SERVICE_LEVEL_UNSPECIFIED"] = 0; - values[valuesById[1] = "GOOGLE_ANALYTICS_STANDARD"] = 1; - values[valuesById[2] = "GOOGLE_ANALYTICS_360"] = 2; - return values; - })(); - - /** - * ActorType enum. - * @name google.analytics.admin.v1alpha.ActorType - * @enum {number} - * @property {number} ACTOR_TYPE_UNSPECIFIED=0 ACTOR_TYPE_UNSPECIFIED value - * @property {number} USER=1 USER value - * @property {number} SYSTEM=2 SYSTEM value - * @property {number} SUPPORT=3 SUPPORT value - */ - v1alpha.ActorType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACTOR_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "USER"] = 1; - values[valuesById[2] = "SYSTEM"] = 2; - values[valuesById[3] = "SUPPORT"] = 3; - return values; - })(); - - /** - * ActionType enum. - * @name google.analytics.admin.v1alpha.ActionType - * @enum {number} - * @property {number} ACTION_TYPE_UNSPECIFIED=0 ACTION_TYPE_UNSPECIFIED value - * @property {number} CREATED=1 CREATED value - * @property {number} UPDATED=2 UPDATED value - * @property {number} DELETED=3 DELETED value - */ - v1alpha.ActionType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACTION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATED"] = 1; - values[valuesById[2] = "UPDATED"] = 2; - values[valuesById[3] = "DELETED"] = 3; - return values; - })(); - - /** - * ChangeHistoryResourceType enum. - * @name google.analytics.admin.v1alpha.ChangeHistoryResourceType - * @enum {number} - * @property {number} CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED=0 CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED value - * @property {number} ACCOUNT=1 ACCOUNT value - * @property {number} PROPERTY=2 PROPERTY value - * @property {number} FIREBASE_LINK=6 FIREBASE_LINK value - * @property {number} GOOGLE_ADS_LINK=7 GOOGLE_ADS_LINK value - * @property {number} GOOGLE_SIGNALS_SETTINGS=8 GOOGLE_SIGNALS_SETTINGS value - * @property {number} CONVERSION_EVENT=9 CONVERSION_EVENT value - * @property {number} MEASUREMENT_PROTOCOL_SECRET=10 MEASUREMENT_PROTOCOL_SECRET value - * @property {number} CUSTOM_DIMENSION=11 CUSTOM_DIMENSION value - * @property {number} CUSTOM_METRIC=12 CUSTOM_METRIC value - * @property {number} DATA_RETENTION_SETTINGS=13 DATA_RETENTION_SETTINGS value - * @property {number} DISPLAY_VIDEO_360_ADVERTISER_LINK=14 DISPLAY_VIDEO_360_ADVERTISER_LINK value - * @property {number} DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL=15 DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL value - * @property {number} SEARCH_ADS_360_LINK=16 SEARCH_ADS_360_LINK value - * @property {number} DATA_STREAM=18 DATA_STREAM value - * @property {number} ATTRIBUTION_SETTINGS=20 ATTRIBUTION_SETTINGS value - * @property {number} EXPANDED_DATA_SET=21 EXPANDED_DATA_SET value - * @property {number} CHANNEL_GROUP=22 CHANNEL_GROUP value - */ - v1alpha.ChangeHistoryResourceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACCOUNT"] = 1; - values[valuesById[2] = "PROPERTY"] = 2; - values[valuesById[6] = "FIREBASE_LINK"] = 6; - values[valuesById[7] = "GOOGLE_ADS_LINK"] = 7; - values[valuesById[8] = "GOOGLE_SIGNALS_SETTINGS"] = 8; - values[valuesById[9] = "CONVERSION_EVENT"] = 9; - values[valuesById[10] = "MEASUREMENT_PROTOCOL_SECRET"] = 10; - values[valuesById[11] = "CUSTOM_DIMENSION"] = 11; - values[valuesById[12] = "CUSTOM_METRIC"] = 12; - values[valuesById[13] = "DATA_RETENTION_SETTINGS"] = 13; - values[valuesById[14] = "DISPLAY_VIDEO_360_ADVERTISER_LINK"] = 14; - values[valuesById[15] = "DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL"] = 15; - values[valuesById[16] = "SEARCH_ADS_360_LINK"] = 16; - values[valuesById[18] = "DATA_STREAM"] = 18; - values[valuesById[20] = "ATTRIBUTION_SETTINGS"] = 20; - values[valuesById[21] = "EXPANDED_DATA_SET"] = 21; - values[valuesById[22] = "CHANNEL_GROUP"] = 22; - return values; - })(); - - /** - * GoogleSignalsState enum. - * @name google.analytics.admin.v1alpha.GoogleSignalsState - * @enum {number} - * @property {number} GOOGLE_SIGNALS_STATE_UNSPECIFIED=0 GOOGLE_SIGNALS_STATE_UNSPECIFIED value - * @property {number} GOOGLE_SIGNALS_ENABLED=1 GOOGLE_SIGNALS_ENABLED value - * @property {number} GOOGLE_SIGNALS_DISABLED=2 GOOGLE_SIGNALS_DISABLED value - */ - v1alpha.GoogleSignalsState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "GOOGLE_SIGNALS_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "GOOGLE_SIGNALS_ENABLED"] = 1; - values[valuesById[2] = "GOOGLE_SIGNALS_DISABLED"] = 2; - return values; - })(); - - /** - * GoogleSignalsConsent enum. - * @name google.analytics.admin.v1alpha.GoogleSignalsConsent - * @enum {number} - * @property {number} GOOGLE_SIGNALS_CONSENT_UNSPECIFIED=0 GOOGLE_SIGNALS_CONSENT_UNSPECIFIED value - * @property {number} GOOGLE_SIGNALS_CONSENT_CONSENTED=2 GOOGLE_SIGNALS_CONSENT_CONSENTED value - * @property {number} GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED=1 GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED value - */ - v1alpha.GoogleSignalsConsent = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "GOOGLE_SIGNALS_CONSENT_UNSPECIFIED"] = 0; - values[valuesById[2] = "GOOGLE_SIGNALS_CONSENT_CONSENTED"] = 2; - values[valuesById[1] = "GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED"] = 1; - return values; - })(); - - /** - * LinkProposalInitiatingProduct enum. - * @name google.analytics.admin.v1alpha.LinkProposalInitiatingProduct - * @enum {number} - * @property {number} LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED=0 LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED value - * @property {number} GOOGLE_ANALYTICS=1 GOOGLE_ANALYTICS value - * @property {number} LINKED_PRODUCT=2 LINKED_PRODUCT value - */ - v1alpha.LinkProposalInitiatingProduct = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED"] = 0; - values[valuesById[1] = "GOOGLE_ANALYTICS"] = 1; - values[valuesById[2] = "LINKED_PRODUCT"] = 2; - return values; - })(); - - /** - * LinkProposalState enum. - * @name google.analytics.admin.v1alpha.LinkProposalState - * @enum {number} - * @property {number} LINK_PROPOSAL_STATE_UNSPECIFIED=0 LINK_PROPOSAL_STATE_UNSPECIFIED value - * @property {number} AWAITING_REVIEW_FROM_GOOGLE_ANALYTICS=1 AWAITING_REVIEW_FROM_GOOGLE_ANALYTICS value - * @property {number} AWAITING_REVIEW_FROM_LINKED_PRODUCT=2 AWAITING_REVIEW_FROM_LINKED_PRODUCT value - * @property {number} WITHDRAWN=3 WITHDRAWN value - * @property {number} DECLINED=4 DECLINED value - * @property {number} EXPIRED=5 EXPIRED value - * @property {number} OBSOLETE=6 OBSOLETE value - */ - v1alpha.LinkProposalState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LINK_PROPOSAL_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "AWAITING_REVIEW_FROM_GOOGLE_ANALYTICS"] = 1; - values[valuesById[2] = "AWAITING_REVIEW_FROM_LINKED_PRODUCT"] = 2; - values[valuesById[3] = "WITHDRAWN"] = 3; - values[valuesById[4] = "DECLINED"] = 4; - values[valuesById[5] = "EXPIRED"] = 5; - values[valuesById[6] = "OBSOLETE"] = 6; - return values; - })(); - - /** - * PropertyType enum. - * @name google.analytics.admin.v1alpha.PropertyType - * @enum {number} - * @property {number} PROPERTY_TYPE_UNSPECIFIED=0 PROPERTY_TYPE_UNSPECIFIED value - * @property {number} PROPERTY_TYPE_ORDINARY=1 PROPERTY_TYPE_ORDINARY value - * @property {number} PROPERTY_TYPE_SUBPROPERTY=2 PROPERTY_TYPE_SUBPROPERTY value - * @property {number} PROPERTY_TYPE_ROLLUP=3 PROPERTY_TYPE_ROLLUP value - */ - v1alpha.PropertyType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PROPERTY_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PROPERTY_TYPE_ORDINARY"] = 1; - values[valuesById[2] = "PROPERTY_TYPE_SUBPROPERTY"] = 2; - values[valuesById[3] = "PROPERTY_TYPE_ROLLUP"] = 3; - return values; + return SetAutomatedGa4ConfigurationOptOutRequest; })(); - v1alpha.Account = (function() { + v1alpha.SetAutomatedGa4ConfigurationOptOutResponse = (function() { /** - * Properties of an Account. + * Properties of a SetAutomatedGa4ConfigurationOptOutResponse. * @memberof google.analytics.admin.v1alpha - * @interface IAccount - * @property {string|null} [name] Account name - * @property {google.protobuf.ITimestamp|null} [createTime] Account createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Account updateTime - * @property {string|null} [displayName] Account displayName - * @property {string|null} [regionCode] Account regionCode - * @property {boolean|null} [deleted] Account deleted + * @interface ISetAutomatedGa4ConfigurationOptOutResponse */ /** - * Constructs a new Account. + * Constructs a new SetAutomatedGa4ConfigurationOptOutResponse. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents an Account. - * @implements IAccount + * @classdesc Represents a SetAutomatedGa4ConfigurationOptOutResponse. + * @implements ISetAutomatedGa4ConfigurationOptOutResponse * @constructor - * @param {google.analytics.admin.v1alpha.IAccount=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse=} [properties] Properties to set */ - function Account(properties) { + function SetAutomatedGa4ConfigurationOptOutResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40025,147 +38845,63 @@ } /** - * Account name. - * @member {string} name - * @memberof google.analytics.admin.v1alpha.Account - * @instance - */ - Account.prototype.name = ""; - - /** - * Account createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.analytics.admin.v1alpha.Account - * @instance - */ - Account.prototype.createTime = null; - - /** - * Account updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.analytics.admin.v1alpha.Account - * @instance - */ - Account.prototype.updateTime = null; - - /** - * Account displayName. - * @member {string} displayName - * @memberof google.analytics.admin.v1alpha.Account - * @instance - */ - Account.prototype.displayName = ""; - - /** - * Account regionCode. - * @member {string} regionCode - * @memberof google.analytics.admin.v1alpha.Account - * @instance - */ - Account.prototype.regionCode = ""; - - /** - * Account deleted. - * @member {boolean} deleted - * @memberof google.analytics.admin.v1alpha.Account - * @instance - */ - Account.prototype.deleted = false; - - /** - * Creates a new Account instance using the specified properties. + * Creates a new SetAutomatedGa4ConfigurationOptOutResponse instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.Account + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse * @static - * @param {google.analytics.admin.v1alpha.IAccount=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.Account} Account instance + * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse} SetAutomatedGa4ConfigurationOptOutResponse instance */ - Account.create = function create(properties) { - return new Account(properties); + SetAutomatedGa4ConfigurationOptOutResponse.create = function create(properties) { + return new SetAutomatedGa4ConfigurationOptOutResponse(properties); }; /** - * Encodes the specified Account message. Does not implicitly {@link google.analytics.admin.v1alpha.Account.verify|verify} messages. + * Encodes the specified SetAutomatedGa4ConfigurationOptOutResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.Account + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse * @static - * @param {google.analytics.admin.v1alpha.IAccount} message Account message or plain object to encode + * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse} message SetAutomatedGa4ConfigurationOptOutResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Account.encode = function encode(message, writer) { + SetAutomatedGa4ConfigurationOptOutResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); - if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.regionCode); - if (message.deleted != null && Object.hasOwnProperty.call(message, "deleted")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deleted); return writer; }; /** - * Encodes the specified Account message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.Account.verify|verify} messages. + * Encodes the specified SetAutomatedGa4ConfigurationOptOutResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.Account + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse * @static - * @param {google.analytics.admin.v1alpha.IAccount} message Account message or plain object to encode + * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse} message SetAutomatedGa4ConfigurationOptOutResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Account.encodeDelimited = function encodeDelimited(message, writer) { + SetAutomatedGa4ConfigurationOptOutResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Account message from the specified reader or buffer. + * Decodes a SetAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.Account + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.Account} Account + * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse} SetAutomatedGa4ConfigurationOptOutResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Account.decode = function decode(reader, length) { + SetAutomatedGa4ConfigurationOptOutResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.Account(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.displayName = reader.string(); - break; - } - case 5: { - message.regionCode = reader.string(); - break; - } - case 6: { - message.deleted = reader.bool(); - break; - } default: reader.skipType(tag & 7); break; @@ -40175,185 +38911,109 @@ }; /** - * Decodes an Account message from the specified reader or buffer, length delimited. + * Decodes a SetAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.Account + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.Account} Account + * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse} SetAutomatedGa4ConfigurationOptOutResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Account.decodeDelimited = function decodeDelimited(reader) { + SetAutomatedGa4ConfigurationOptOutResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Account message. + * Verifies a SetAutomatedGa4ConfigurationOptOutResponse message. * @function verify - * @memberof google.analytics.admin.v1alpha.Account + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Account.verify = function verify(message) { + SetAutomatedGa4ConfigurationOptOutResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.regionCode != null && message.hasOwnProperty("regionCode")) - if (!$util.isString(message.regionCode)) - return "regionCode: string expected"; - if (message.deleted != null && message.hasOwnProperty("deleted")) - if (typeof message.deleted !== "boolean") - return "deleted: boolean expected"; return null; }; /** - * Creates an Account message from a plain object. Also converts values to their respective internal types. + * Creates a SetAutomatedGa4ConfigurationOptOutResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.Account + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.Account} Account + * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse} SetAutomatedGa4ConfigurationOptOutResponse */ - Account.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.Account) + SetAutomatedGa4ConfigurationOptOutResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse) return object; - var message = new $root.google.analytics.admin.v1alpha.Account(); - if (object.name != null) - message.name = String(object.name); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.analytics.admin.v1alpha.Account.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.analytics.admin.v1alpha.Account.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.regionCode != null) - message.regionCode = String(object.regionCode); - if (object.deleted != null) - message.deleted = Boolean(object.deleted); - return message; + return new $root.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse(); }; /** - * Creates a plain object from an Account message. Also converts values to other types if specified. + * Creates a plain object from a SetAutomatedGa4ConfigurationOptOutResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.Account + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse * @static - * @param {google.analytics.admin.v1alpha.Account} message Account + * @param {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse} message SetAutomatedGa4ConfigurationOptOutResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Account.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.createTime = null; - object.updateTime = null; - object.displayName = ""; - object.regionCode = ""; - object.deleted = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.regionCode != null && message.hasOwnProperty("regionCode")) - object.regionCode = message.regionCode; - if (message.deleted != null && message.hasOwnProperty("deleted")) - object.deleted = message.deleted; - return object; + SetAutomatedGa4ConfigurationOptOutResponse.toObject = function toObject() { + return {}; }; /** - * Converts this Account to JSON. + * Converts this SetAutomatedGa4ConfigurationOptOutResponse to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.Account + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse * @instance * @returns {Object.} JSON object */ - Account.prototype.toJSON = function toJSON() { + SetAutomatedGa4ConfigurationOptOutResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Account + * Gets the default type url for SetAutomatedGa4ConfigurationOptOutResponse * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.Account + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Account.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SetAutomatedGa4ConfigurationOptOutResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.Account"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse"; }; - return Account; + return SetAutomatedGa4ConfigurationOptOutResponse; })(); - v1alpha.Property = (function() { + v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest = (function() { /** - * Properties of a Property. + * Properties of a FetchAutomatedGa4ConfigurationOptOutRequest. * @memberof google.analytics.admin.v1alpha - * @interface IProperty - * @property {string|null} [name] Property name - * @property {google.analytics.admin.v1alpha.PropertyType|null} [propertyType] Property propertyType - * @property {google.protobuf.ITimestamp|null} [createTime] Property createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Property updateTime - * @property {string|null} [parent] Property parent - * @property {string|null} [displayName] Property displayName - * @property {google.analytics.admin.v1alpha.IndustryCategory|null} [industryCategory] Property industryCategory - * @property {string|null} [timeZone] Property timeZone - * @property {string|null} [currencyCode] Property currencyCode - * @property {google.analytics.admin.v1alpha.ServiceLevel|null} [serviceLevel] Property serviceLevel - * @property {google.protobuf.ITimestamp|null} [deleteTime] Property deleteTime - * @property {google.protobuf.ITimestamp|null} [expireTime] Property expireTime - * @property {string|null} [account] Property account + * @interface IFetchAutomatedGa4ConfigurationOptOutRequest + * @property {string|null} [property] FetchAutomatedGa4ConfigurationOptOutRequest property */ /** - * Constructs a new Property. + * Constructs a new FetchAutomatedGa4ConfigurationOptOutRequest. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a Property. - * @implements IProperty + * @classdesc Represents a FetchAutomatedGa4ConfigurationOptOutRequest. + * @implements IFetchAutomatedGa4ConfigurationOptOutRequest * @constructor - * @param {google.analytics.admin.v1alpha.IProperty=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest=} [properties] Properties to set */ - function Property(properties) { + function FetchAutomatedGa4ConfigurationOptOutRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40361,243 +39021,278 @@ } /** - * Property name. - * @member {string} name - * @memberof google.analytics.admin.v1alpha.Property + * FetchAutomatedGa4ConfigurationOptOutRequest property. + * @member {string} property + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest * @instance */ - Property.prototype.name = ""; + FetchAutomatedGa4ConfigurationOptOutRequest.prototype.property = ""; /** - * Property propertyType. - * @member {google.analytics.admin.v1alpha.PropertyType} propertyType - * @memberof google.analytics.admin.v1alpha.Property - * @instance + * Creates a new FetchAutomatedGa4ConfigurationOptOutRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * @static + * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest} FetchAutomatedGa4ConfigurationOptOutRequest instance */ - Property.prototype.propertyType = 0; + FetchAutomatedGa4ConfigurationOptOutRequest.create = function create(properties) { + return new FetchAutomatedGa4ConfigurationOptOutRequest(properties); + }; /** - * Property createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.analytics.admin.v1alpha.Property - * @instance + * Encodes the specified FetchAutomatedGa4ConfigurationOptOutRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * @static + * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest} message FetchAutomatedGa4ConfigurationOptOutRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Property.prototype.createTime = null; + FetchAutomatedGa4ConfigurationOptOutRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + return writer; + }; /** - * Property updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.analytics.admin.v1alpha.Property - * @instance + * Encodes the specified FetchAutomatedGa4ConfigurationOptOutRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * @static + * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest} message FetchAutomatedGa4ConfigurationOptOutRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Property.prototype.updateTime = null; + FetchAutomatedGa4ConfigurationOptOutRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Property parent. - * @member {string} parent - * @memberof google.analytics.admin.v1alpha.Property - * @instance + * Decodes a FetchAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest} FetchAutomatedGa4ConfigurationOptOutRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Property.prototype.parent = ""; + FetchAutomatedGa4ConfigurationOptOutRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.property = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Property displayName. - * @member {string} displayName - * @memberof google.analytics.admin.v1alpha.Property - * @instance + * Decodes a FetchAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest} FetchAutomatedGa4ConfigurationOptOutRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Property.prototype.displayName = ""; + FetchAutomatedGa4ConfigurationOptOutRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Property industryCategory. - * @member {google.analytics.admin.v1alpha.IndustryCategory} industryCategory - * @memberof google.analytics.admin.v1alpha.Property - * @instance + * Verifies a FetchAutomatedGa4ConfigurationOptOutRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Property.prototype.industryCategory = 0; + FetchAutomatedGa4ConfigurationOptOutRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + return null; + }; /** - * Property timeZone. - * @member {string} timeZone - * @memberof google.analytics.admin.v1alpha.Property - * @instance + * Creates a FetchAutomatedGa4ConfigurationOptOutRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest} FetchAutomatedGa4ConfigurationOptOutRequest */ - Property.prototype.timeZone = ""; + FetchAutomatedGa4ConfigurationOptOutRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest(); + if (object.property != null) + message.property = String(object.property); + return message; + }; /** - * Property currencyCode. - * @member {string} currencyCode - * @memberof google.analytics.admin.v1alpha.Property - * @instance + * Creates a plain object from a FetchAutomatedGa4ConfigurationOptOutRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * @static + * @param {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest} message FetchAutomatedGa4ConfigurationOptOutRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Property.prototype.currencyCode = ""; + FetchAutomatedGa4ConfigurationOptOutRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.property = ""; + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + return object; + }; /** - * Property serviceLevel. - * @member {google.analytics.admin.v1alpha.ServiceLevel} serviceLevel - * @memberof google.analytics.admin.v1alpha.Property + * Converts this FetchAutomatedGa4ConfigurationOptOutRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest * @instance + * @returns {Object.} JSON object */ - Property.prototype.serviceLevel = 0; + FetchAutomatedGa4ConfigurationOptOutRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Property deleteTime. - * @member {google.protobuf.ITimestamp|null|undefined} deleteTime - * @memberof google.analytics.admin.v1alpha.Property - * @instance + * Gets the default type url for FetchAutomatedGa4ConfigurationOptOutRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - Property.prototype.deleteTime = null; + FetchAutomatedGa4ConfigurationOptOutRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest"; + }; + + return FetchAutomatedGa4ConfigurationOptOutRequest; + })(); + + v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse = (function() { /** - * Property expireTime. - * @member {google.protobuf.ITimestamp|null|undefined} expireTime - * @memberof google.analytics.admin.v1alpha.Property - * @instance + * Properties of a FetchAutomatedGa4ConfigurationOptOutResponse. + * @memberof google.analytics.admin.v1alpha + * @interface IFetchAutomatedGa4ConfigurationOptOutResponse + * @property {boolean|null} [optOut] FetchAutomatedGa4ConfigurationOptOutResponse optOut */ - Property.prototype.expireTime = null; /** - * Property account. - * @member {string} account - * @memberof google.analytics.admin.v1alpha.Property + * Constructs a new FetchAutomatedGa4ConfigurationOptOutResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a FetchAutomatedGa4ConfigurationOptOutResponse. + * @implements IFetchAutomatedGa4ConfigurationOptOutResponse + * @constructor + * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse=} [properties] Properties to set + */ + function FetchAutomatedGa4ConfigurationOptOutResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchAutomatedGa4ConfigurationOptOutResponse optOut. + * @member {boolean} optOut + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse * @instance */ - Property.prototype.account = ""; + FetchAutomatedGa4ConfigurationOptOutResponse.prototype.optOut = false; /** - * Creates a new Property instance using the specified properties. + * Creates a new FetchAutomatedGa4ConfigurationOptOutResponse instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.Property + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse * @static - * @param {google.analytics.admin.v1alpha.IProperty=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.Property} Property instance + * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse} FetchAutomatedGa4ConfigurationOptOutResponse instance */ - Property.create = function create(properties) { - return new Property(properties); + FetchAutomatedGa4ConfigurationOptOutResponse.create = function create(properties) { + return new FetchAutomatedGa4ConfigurationOptOutResponse(properties); }; /** - * Encodes the specified Property message. Does not implicitly {@link google.analytics.admin.v1alpha.Property.verify|verify} messages. + * Encodes the specified FetchAutomatedGa4ConfigurationOptOutResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.Property + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse * @static - * @param {google.analytics.admin.v1alpha.IProperty} message Property message or plain object to encode + * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse} message FetchAutomatedGa4ConfigurationOptOutResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Property.encode = function encode(message, writer) { + FetchAutomatedGa4ConfigurationOptOutResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.parent); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); - if (message.industryCategory != null && Object.hasOwnProperty.call(message, "industryCategory")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.industryCategory); - if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.timeZone); - if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.currencyCode); - if (message.serviceLevel != null && Object.hasOwnProperty.call(message, "serviceLevel")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.serviceLevel); - if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) - $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.account != null && Object.hasOwnProperty.call(message, "account")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.account); - if (message.propertyType != null && Object.hasOwnProperty.call(message, "propertyType")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.propertyType); + if (message.optOut != null && Object.hasOwnProperty.call(message, "optOut")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.optOut); return writer; }; /** - * Encodes the specified Property message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.Property.verify|verify} messages. + * Encodes the specified FetchAutomatedGa4ConfigurationOptOutResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.Property + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse * @static - * @param {google.analytics.admin.v1alpha.IProperty} message Property message or plain object to encode + * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse} message FetchAutomatedGa4ConfigurationOptOutResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Property.encodeDelimited = function encodeDelimited(message, writer) { + FetchAutomatedGa4ConfigurationOptOutResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Property message from the specified reader or buffer. + * Decodes a FetchAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.Property + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.Property} Property + * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse} FetchAutomatedGa4ConfigurationOptOutResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Property.decode = function decode(reader, length) { + FetchAutomatedGa4ConfigurationOptOutResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.Property(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 14: { - message.propertyType = reader.int32(); - break; - } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.parent = reader.string(); - break; - } - case 5: { - message.displayName = reader.string(); - break; - } - case 6: { - message.industryCategory = reader.int32(); - break; - } - case 7: { - message.timeZone = reader.string(); - break; - } - case 8: { - message.currencyCode = reader.string(); - break; - } - case 10: { - message.serviceLevel = reader.int32(); - break; - } - case 11: { - message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 12: { - message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 13: { - message.account = reader.string(); + message.optOut = reader.bool(); break; } default: @@ -40609,443 +39304,122 @@ }; /** - * Decodes a Property message from the specified reader or buffer, length delimited. + * Decodes a FetchAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.Property + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.Property} Property + * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse} FetchAutomatedGa4ConfigurationOptOutResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Property.decodeDelimited = function decodeDelimited(reader) { + FetchAutomatedGa4ConfigurationOptOutResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Property message. + * Verifies a FetchAutomatedGa4ConfigurationOptOutResponse message. * @function verify - * @memberof google.analytics.admin.v1alpha.Property + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Property.verify = function verify(message) { + FetchAutomatedGa4ConfigurationOptOutResponse.verify = function verify(message) { if (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.propertyType != null && message.hasOwnProperty("propertyType")) - switch (message.propertyType) { - default: - return "propertyType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.industryCategory != null && message.hasOwnProperty("industryCategory")) - switch (message.industryCategory) { - default: - return "industryCategory: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - case 19: - case 20: - case 21: - case 22: - case 23: - case 24: - case 25: - case 26: - break; - } - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - if (!$util.isString(message.timeZone)) - return "timeZone: string expected"; - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) - if (!$util.isString(message.currencyCode)) - return "currencyCode: string expected"; - if (message.serviceLevel != null && message.hasOwnProperty("serviceLevel")) - switch (message.serviceLevel) { - default: - return "serviceLevel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.deleteTime); - if (error) - return "deleteTime." + error; - } - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.expireTime); - if (error) - return "expireTime." + error; - } - if (message.account != null && message.hasOwnProperty("account")) - if (!$util.isString(message.account)) - return "account: string expected"; + if (message.optOut != null && message.hasOwnProperty("optOut")) + if (typeof message.optOut !== "boolean") + return "optOut: boolean expected"; return null; }; /** - * Creates a Property message from a plain object. Also converts values to their respective internal types. + * Creates a FetchAutomatedGa4ConfigurationOptOutResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.Property + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.Property} Property + * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse} FetchAutomatedGa4ConfigurationOptOutResponse */ - Property.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.Property) + FetchAutomatedGa4ConfigurationOptOutResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse) return object; - var message = new $root.google.analytics.admin.v1alpha.Property(); - if (object.name != null) - message.name = String(object.name); - switch (object.propertyType) { - default: - if (typeof object.propertyType === "number") { - message.propertyType = object.propertyType; - break; - } - break; - case "PROPERTY_TYPE_UNSPECIFIED": - case 0: - message.propertyType = 0; - break; - case "PROPERTY_TYPE_ORDINARY": - case 1: - message.propertyType = 1; - break; - case "PROPERTY_TYPE_SUBPROPERTY": - case 2: - message.propertyType = 2; - break; - case "PROPERTY_TYPE_ROLLUP": - case 3: - message.propertyType = 3; - break; - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.analytics.admin.v1alpha.Property.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.analytics.admin.v1alpha.Property.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.parent != null) - message.parent = String(object.parent); - if (object.displayName != null) - message.displayName = String(object.displayName); - switch (object.industryCategory) { - default: - if (typeof object.industryCategory === "number") { - message.industryCategory = object.industryCategory; - break; - } - break; - case "INDUSTRY_CATEGORY_UNSPECIFIED": - case 0: - message.industryCategory = 0; - break; - case "AUTOMOTIVE": - case 1: - message.industryCategory = 1; - break; - case "BUSINESS_AND_INDUSTRIAL_MARKETS": - case 2: - message.industryCategory = 2; - break; - case "FINANCE": - case 3: - message.industryCategory = 3; - break; - case "HEALTHCARE": - case 4: - message.industryCategory = 4; - break; - case "TECHNOLOGY": - case 5: - message.industryCategory = 5; - break; - case "TRAVEL": - case 6: - message.industryCategory = 6; - break; - case "OTHER": - case 7: - message.industryCategory = 7; - break; - case "ARTS_AND_ENTERTAINMENT": - case 8: - message.industryCategory = 8; - break; - case "BEAUTY_AND_FITNESS": - case 9: - message.industryCategory = 9; - break; - case "BOOKS_AND_LITERATURE": - case 10: - message.industryCategory = 10; - break; - case "FOOD_AND_DRINK": - case 11: - message.industryCategory = 11; - break; - case "GAMES": - case 12: - message.industryCategory = 12; - break; - case "HOBBIES_AND_LEISURE": - case 13: - message.industryCategory = 13; - break; - case "HOME_AND_GARDEN": - case 14: - message.industryCategory = 14; - break; - case "INTERNET_AND_TELECOM": - case 15: - message.industryCategory = 15; - break; - case "LAW_AND_GOVERNMENT": - case 16: - message.industryCategory = 16; - break; - case "NEWS": - case 17: - message.industryCategory = 17; - break; - case "ONLINE_COMMUNITIES": - case 18: - message.industryCategory = 18; - break; - case "PEOPLE_AND_SOCIETY": - case 19: - message.industryCategory = 19; - break; - case "PETS_AND_ANIMALS": - case 20: - message.industryCategory = 20; - break; - case "REAL_ESTATE": - case 21: - message.industryCategory = 21; - break; - case "REFERENCE": - case 22: - message.industryCategory = 22; - break; - case "SCIENCE": - case 23: - message.industryCategory = 23; - break; - case "SPORTS": - case 24: - message.industryCategory = 24; - break; - case "JOBS_AND_EDUCATION": - case 25: - message.industryCategory = 25; - break; - case "SHOPPING": - case 26: - message.industryCategory = 26; - break; - } - if (object.timeZone != null) - message.timeZone = String(object.timeZone); - if (object.currencyCode != null) - message.currencyCode = String(object.currencyCode); - switch (object.serviceLevel) { - default: - if (typeof object.serviceLevel === "number") { - message.serviceLevel = object.serviceLevel; - break; - } - break; - case "SERVICE_LEVEL_UNSPECIFIED": - case 0: - message.serviceLevel = 0; - break; - case "GOOGLE_ANALYTICS_STANDARD": - case 1: - message.serviceLevel = 1; - break; - case "GOOGLE_ANALYTICS_360": - case 2: - message.serviceLevel = 2; - break; - } - if (object.deleteTime != null) { - if (typeof object.deleteTime !== "object") - throw TypeError(".google.analytics.admin.v1alpha.Property.deleteTime: object expected"); - message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime); - } - if (object.expireTime != null) { - if (typeof object.expireTime !== "object") - throw TypeError(".google.analytics.admin.v1alpha.Property.expireTime: object expected"); - message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); - } - if (object.account != null) - message.account = String(object.account); + var message = new $root.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse(); + if (object.optOut != null) + message.optOut = Boolean(object.optOut); return message; }; /** - * Creates a plain object from a Property message. Also converts values to other types if specified. + * Creates a plain object from a FetchAutomatedGa4ConfigurationOptOutResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.Property + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse * @static - * @param {google.analytics.admin.v1alpha.Property} message Property + * @param {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse} message FetchAutomatedGa4ConfigurationOptOutResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Property.toObject = function toObject(message, options) { + FetchAutomatedGa4ConfigurationOptOutResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.parent = ""; - object.createTime = null; - object.updateTime = null; - object.displayName = ""; - object.industryCategory = options.enums === String ? "INDUSTRY_CATEGORY_UNSPECIFIED" : 0; - object.timeZone = ""; - object.currencyCode = ""; - object.serviceLevel = options.enums === String ? "SERVICE_LEVEL_UNSPECIFIED" : 0; - object.deleteTime = null; - object.expireTime = null; - object.account = ""; - object.propertyType = options.enums === String ? "PROPERTY_TYPE_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - 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.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.industryCategory != null && message.hasOwnProperty("industryCategory")) - object.industryCategory = options.enums === String ? $root.google.analytics.admin.v1alpha.IndustryCategory[message.industryCategory] === undefined ? message.industryCategory : $root.google.analytics.admin.v1alpha.IndustryCategory[message.industryCategory] : message.industryCategory; - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - object.timeZone = message.timeZone; - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) - object.currencyCode = message.currencyCode; - if (message.serviceLevel != null && message.hasOwnProperty("serviceLevel")) - object.serviceLevel = options.enums === String ? $root.google.analytics.admin.v1alpha.ServiceLevel[message.serviceLevel] === undefined ? message.serviceLevel : $root.google.analytics.admin.v1alpha.ServiceLevel[message.serviceLevel] : message.serviceLevel; - if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) - object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); - if (message.expireTime != null && message.hasOwnProperty("expireTime")) - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); - if (message.account != null && message.hasOwnProperty("account")) - object.account = message.account; - if (message.propertyType != null && message.hasOwnProperty("propertyType")) - object.propertyType = options.enums === String ? $root.google.analytics.admin.v1alpha.PropertyType[message.propertyType] === undefined ? message.propertyType : $root.google.analytics.admin.v1alpha.PropertyType[message.propertyType] : message.propertyType; + if (options.defaults) + object.optOut = false; + if (message.optOut != null && message.hasOwnProperty("optOut")) + object.optOut = message.optOut; return object; }; /** - * Converts this Property to JSON. + * Converts this FetchAutomatedGa4ConfigurationOptOutResponse to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.Property + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse * @instance * @returns {Object.} JSON object */ - Property.prototype.toJSON = function toJSON() { + FetchAutomatedGa4ConfigurationOptOutResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Property + * Gets the default type url for FetchAutomatedGa4ConfigurationOptOutResponse * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.Property + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Property.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FetchAutomatedGa4ConfigurationOptOutResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.Property"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse"; }; - return Property; + return FetchAutomatedGa4ConfigurationOptOutResponse; })(); - v1alpha.DataStream = (function() { + v1alpha.GetBigQueryLinkRequest = (function() { /** - * Properties of a DataStream. + * Properties of a GetBigQueryLinkRequest. * @memberof google.analytics.admin.v1alpha - * @interface IDataStream - * @property {google.analytics.admin.v1alpha.DataStream.IWebStreamData|null} [webStreamData] DataStream webStreamData - * @property {google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData|null} [androidAppStreamData] DataStream androidAppStreamData - * @property {google.analytics.admin.v1alpha.DataStream.IIosAppStreamData|null} [iosAppStreamData] DataStream iosAppStreamData - * @property {string|null} [name] DataStream name - * @property {google.analytics.admin.v1alpha.DataStream.DataStreamType|null} [type] DataStream type - * @property {string|null} [displayName] DataStream displayName - * @property {google.protobuf.ITimestamp|null} [createTime] DataStream createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] DataStream updateTime + * @interface IGetBigQueryLinkRequest + * @property {string|null} [name] GetBigQueryLinkRequest name */ /** - * Constructs a new DataStream. + * Constructs a new GetBigQueryLinkRequest. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a DataStream. - * @implements IDataStream + * @classdesc Represents a GetBigQueryLinkRequest. + * @implements IGetBigQueryLinkRequest * @constructor - * @param {google.analytics.admin.v1alpha.IDataStream=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IGetBigQueryLinkRequest=} [properties] Properties to set */ - function DataStream(properties) { + function GetBigQueryLinkRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41053,189 +39427,77 @@ } /** - * DataStream webStreamData. - * @member {google.analytics.admin.v1alpha.DataStream.IWebStreamData|null|undefined} webStreamData - * @memberof google.analytics.admin.v1alpha.DataStream - * @instance - */ - DataStream.prototype.webStreamData = null; - - /** - * DataStream androidAppStreamData. - * @member {google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData|null|undefined} androidAppStreamData - * @memberof google.analytics.admin.v1alpha.DataStream - * @instance - */ - DataStream.prototype.androidAppStreamData = null; - - /** - * DataStream iosAppStreamData. - * @member {google.analytics.admin.v1alpha.DataStream.IIosAppStreamData|null|undefined} iosAppStreamData - * @memberof google.analytics.admin.v1alpha.DataStream - * @instance - */ - DataStream.prototype.iosAppStreamData = null; - - /** - * DataStream name. + * GetBigQueryLinkRequest name. * @member {string} name - * @memberof google.analytics.admin.v1alpha.DataStream - * @instance - */ - DataStream.prototype.name = ""; - - /** - * DataStream type. - * @member {google.analytics.admin.v1alpha.DataStream.DataStreamType} type - * @memberof google.analytics.admin.v1alpha.DataStream - * @instance - */ - DataStream.prototype.type = 0; - - /** - * DataStream displayName. - * @member {string} displayName - * @memberof google.analytics.admin.v1alpha.DataStream - * @instance - */ - DataStream.prototype.displayName = ""; - - /** - * DataStream createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.analytics.admin.v1alpha.DataStream - * @instance - */ - DataStream.prototype.createTime = null; - - /** - * DataStream updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.analytics.admin.v1alpha.DataStream - * @instance - */ - DataStream.prototype.updateTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DataStream streamData. - * @member {"webStreamData"|"androidAppStreamData"|"iosAppStreamData"|undefined} streamData - * @memberof google.analytics.admin.v1alpha.DataStream + * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest * @instance */ - Object.defineProperty(DataStream.prototype, "streamData", { - get: $util.oneOfGetter($oneOfFields = ["webStreamData", "androidAppStreamData", "iosAppStreamData"]), - set: $util.oneOfSetter($oneOfFields) - }); + GetBigQueryLinkRequest.prototype.name = ""; /** - * Creates a new DataStream instance using the specified properties. + * Creates a new GetBigQueryLinkRequest instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.DataStream + * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest * @static - * @param {google.analytics.admin.v1alpha.IDataStream=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.DataStream} DataStream instance + * @param {google.analytics.admin.v1alpha.IGetBigQueryLinkRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GetBigQueryLinkRequest} GetBigQueryLinkRequest instance */ - DataStream.create = function create(properties) { - return new DataStream(properties); + GetBigQueryLinkRequest.create = function create(properties) { + return new GetBigQueryLinkRequest(properties); }; /** - * Encodes the specified DataStream message. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.verify|verify} messages. + * Encodes the specified GetBigQueryLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetBigQueryLinkRequest.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.DataStream + * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest * @static - * @param {google.analytics.admin.v1alpha.IDataStream} message DataStream message or plain object to encode + * @param {google.analytics.admin.v1alpha.IGetBigQueryLinkRequest} message GetBigQueryLinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataStream.encode = function encode(message, writer) { + GetBigQueryLinkRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.webStreamData != null && Object.hasOwnProperty.call(message, "webStreamData")) - $root.google.analytics.admin.v1alpha.DataStream.WebStreamData.encode(message.webStreamData, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.androidAppStreamData != null && Object.hasOwnProperty.call(message, "androidAppStreamData")) - $root.google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData.encode(message.androidAppStreamData, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.iosAppStreamData != null && Object.hasOwnProperty.call(message, "iosAppStreamData")) - $root.google.analytics.admin.v1alpha.DataStream.IosAppStreamData.encode(message.iosAppStreamData, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; /** - * Encodes the specified DataStream message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.verify|verify} messages. + * Encodes the specified GetBigQueryLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetBigQueryLinkRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.DataStream + * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest * @static - * @param {google.analytics.admin.v1alpha.IDataStream} message DataStream message or plain object to encode + * @param {google.analytics.admin.v1alpha.IGetBigQueryLinkRequest} message GetBigQueryLinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataStream.encodeDelimited = function encodeDelimited(message, writer) { + GetBigQueryLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DataStream message from the specified reader or buffer. + * Decodes a GetBigQueryLinkRequest message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.DataStream + * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.DataStream} DataStream + * @returns {google.analytics.admin.v1alpha.GetBigQueryLinkRequest} GetBigQueryLinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataStream.decode = function decode(reader, length) { + GetBigQueryLinkRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DataStream(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GetBigQueryLinkRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 6: { - message.webStreamData = $root.google.analytics.admin.v1alpha.DataStream.WebStreamData.decode(reader, reader.uint32()); - break; - } - case 7: { - message.androidAppStreamData = $root.google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData.decode(reader, reader.uint32()); - break; - } - case 8: { - message.iosAppStreamData = $root.google.analytics.admin.v1alpha.DataStream.IosAppStreamData.decode(reader, reader.uint32()); - break; - } case 1: { message.name = reader.string(); break; } - case 2: { - message.type = reader.int32(); - break; - } - case 3: { - message.displayName = reader.string(); - break; - } - case 4: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -41245,978 +39507,644 @@ }; /** - * Decodes a DataStream message from the specified reader or buffer, length delimited. + * Decodes a GetBigQueryLinkRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.DataStream + * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.DataStream} DataStream + * @returns {google.analytics.admin.v1alpha.GetBigQueryLinkRequest} GetBigQueryLinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataStream.decodeDelimited = function decodeDelimited(reader) { + GetBigQueryLinkRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DataStream message. + * Verifies a GetBigQueryLinkRequest message. * @function verify - * @memberof google.analytics.admin.v1alpha.DataStream + * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DataStream.verify = function verify(message) { + GetBigQueryLinkRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.webStreamData != null && message.hasOwnProperty("webStreamData")) { - properties.streamData = 1; - { - var error = $root.google.analytics.admin.v1alpha.DataStream.WebStreamData.verify(message.webStreamData); - if (error) - return "webStreamData." + error; - } - } - if (message.androidAppStreamData != null && message.hasOwnProperty("androidAppStreamData")) { - if (properties.streamData === 1) - return "streamData: multiple values"; - properties.streamData = 1; - { - var error = $root.google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData.verify(message.androidAppStreamData); - if (error) - return "androidAppStreamData." + error; - } - } - if (message.iosAppStreamData != null && message.hasOwnProperty("iosAppStreamData")) { - if (properties.streamData === 1) - return "streamData: multiple values"; - properties.streamData = 1; - { - var error = $root.google.analytics.admin.v1alpha.DataStream.IosAppStreamData.verify(message.iosAppStreamData); - if (error) - return "iosAppStreamData." + error; - } - } if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } return null; }; /** - * Creates a DataStream message from a plain object. Also converts values to their respective internal types. + * Creates a GetBigQueryLinkRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.DataStream + * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.DataStream} DataStream + * @returns {google.analytics.admin.v1alpha.GetBigQueryLinkRequest} GetBigQueryLinkRequest */ - DataStream.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.DataStream) + GetBigQueryLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GetBigQueryLinkRequest) return object; - var message = new $root.google.analytics.admin.v1alpha.DataStream(); - if (object.webStreamData != null) { - if (typeof object.webStreamData !== "object") - throw TypeError(".google.analytics.admin.v1alpha.DataStream.webStreamData: object expected"); - message.webStreamData = $root.google.analytics.admin.v1alpha.DataStream.WebStreamData.fromObject(object.webStreamData); - } - if (object.androidAppStreamData != null) { - if (typeof object.androidAppStreamData !== "object") - throw TypeError(".google.analytics.admin.v1alpha.DataStream.androidAppStreamData: object expected"); - message.androidAppStreamData = $root.google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData.fromObject(object.androidAppStreamData); - } - if (object.iosAppStreamData != null) { - if (typeof object.iosAppStreamData !== "object") - throw TypeError(".google.analytics.admin.v1alpha.DataStream.iosAppStreamData: object expected"); - message.iosAppStreamData = $root.google.analytics.admin.v1alpha.DataStream.IosAppStreamData.fromObject(object.iosAppStreamData); - } + var message = new $root.google.analytics.admin.v1alpha.GetBigQueryLinkRequest(); if (object.name != null) message.name = String(object.name); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "DATA_STREAM_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "WEB_DATA_STREAM": - case 1: - message.type = 1; - break; - case "ANDROID_APP_DATA_STREAM": - case 2: - message.type = 2; - break; - case "IOS_APP_DATA_STREAM": - case 3: - message.type = 3; - break; - } - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.analytics.admin.v1alpha.DataStream.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.analytics.admin.v1alpha.DataStream.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } return message; }; /** - * Creates a plain object from a DataStream message. Also converts values to other types if specified. + * Creates a plain object from a GetBigQueryLinkRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.DataStream + * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest * @static - * @param {google.analytics.admin.v1alpha.DataStream} message DataStream + * @param {google.analytics.admin.v1alpha.GetBigQueryLinkRequest} message GetBigQueryLinkRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DataStream.toObject = function toObject(message, options) { + GetBigQueryLinkRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.type = options.enums === String ? "DATA_STREAM_TYPE_UNSPECIFIED" : 0; - object.displayName = ""; - object.createTime = null; - object.updateTime = null; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.analytics.admin.v1alpha.DataStream.DataStreamType[message.type] === undefined ? message.type : $root.google.analytics.admin.v1alpha.DataStream.DataStreamType[message.type] : message.type; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - 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.webStreamData != null && message.hasOwnProperty("webStreamData")) { - object.webStreamData = $root.google.analytics.admin.v1alpha.DataStream.WebStreamData.toObject(message.webStreamData, options); - if (options.oneofs) - object.streamData = "webStreamData"; - } - if (message.androidAppStreamData != null && message.hasOwnProperty("androidAppStreamData")) { - object.androidAppStreamData = $root.google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData.toObject(message.androidAppStreamData, options); - if (options.oneofs) - object.streamData = "androidAppStreamData"; - } - if (message.iosAppStreamData != null && message.hasOwnProperty("iosAppStreamData")) { - object.iosAppStreamData = $root.google.analytics.admin.v1alpha.DataStream.IosAppStreamData.toObject(message.iosAppStreamData, options); - if (options.oneofs) - object.streamData = "iosAppStreamData"; - } return object; }; /** - * Converts this DataStream to JSON. + * Converts this GetBigQueryLinkRequest to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.DataStream + * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest * @instance * @returns {Object.} JSON object */ - DataStream.prototype.toJSON = function toJSON() { + GetBigQueryLinkRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DataStream + * Gets the default type url for GetBigQueryLinkRequest * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.DataStream + * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DataStream.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetBigQueryLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.DataStream"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GetBigQueryLinkRequest"; }; - DataStream.WebStreamData = (function() { + return GetBigQueryLinkRequest; + })(); - /** - * Properties of a WebStreamData. - * @memberof google.analytics.admin.v1alpha.DataStream - * @interface IWebStreamData - * @property {string|null} [measurementId] WebStreamData measurementId - * @property {string|null} [firebaseAppId] WebStreamData firebaseAppId - * @property {string|null} [defaultUri] WebStreamData defaultUri - */ + v1alpha.ListBigQueryLinksRequest = (function() { - /** - * Constructs a new WebStreamData. - * @memberof google.analytics.admin.v1alpha.DataStream - * @classdesc Represents a WebStreamData. - * @implements IWebStreamData - * @constructor - * @param {google.analytics.admin.v1alpha.DataStream.IWebStreamData=} [properties] Properties to set - */ - function WebStreamData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a ListBigQueryLinksRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IListBigQueryLinksRequest + * @property {string|null} [parent] ListBigQueryLinksRequest parent + * @property {number|null} [pageSize] ListBigQueryLinksRequest pageSize + * @property {string|null} [pageToken] ListBigQueryLinksRequest pageToken + */ - /** - * WebStreamData measurementId. - * @member {string} measurementId - * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData - * @instance - */ - WebStreamData.prototype.measurementId = ""; + /** + * Constructs a new ListBigQueryLinksRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListBigQueryLinksRequest. + * @implements IListBigQueryLinksRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IListBigQueryLinksRequest=} [properties] Properties to set + */ + function ListBigQueryLinksRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * WebStreamData firebaseAppId. - * @member {string} firebaseAppId - * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData - * @instance - */ - WebStreamData.prototype.firebaseAppId = ""; + /** + * ListBigQueryLinksRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @instance + */ + ListBigQueryLinksRequest.prototype.parent = ""; - /** - * WebStreamData defaultUri. - * @member {string} defaultUri - * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData - * @instance - */ - WebStreamData.prototype.defaultUri = ""; + /** + * ListBigQueryLinksRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @instance + */ + ListBigQueryLinksRequest.prototype.pageSize = 0; - /** - * Creates a new WebStreamData instance using the specified properties. - * @function create - * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData - * @static - * @param {google.analytics.admin.v1alpha.DataStream.IWebStreamData=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.DataStream.WebStreamData} WebStreamData instance - */ - WebStreamData.create = function create(properties) { - return new WebStreamData(properties); - }; + /** + * ListBigQueryLinksRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @instance + */ + ListBigQueryLinksRequest.prototype.pageToken = ""; - /** - * Encodes the specified WebStreamData message. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.WebStreamData.verify|verify} messages. - * @function encode - * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData - * @static - * @param {google.analytics.admin.v1alpha.DataStream.IWebStreamData} message WebStreamData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WebStreamData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.measurementId != null && Object.hasOwnProperty.call(message, "measurementId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.measurementId); - if (message.firebaseAppId != null && Object.hasOwnProperty.call(message, "firebaseAppId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.firebaseAppId); - if (message.defaultUri != null && Object.hasOwnProperty.call(message, "defaultUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.defaultUri); - return writer; - }; + /** + * Creates a new ListBigQueryLinksRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IListBigQueryLinksRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksRequest} ListBigQueryLinksRequest instance + */ + ListBigQueryLinksRequest.create = function create(properties) { + return new ListBigQueryLinksRequest(properties); + }; - /** - * Encodes the specified WebStreamData message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.WebStreamData.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData - * @static - * @param {google.analytics.admin.v1alpha.DataStream.IWebStreamData} message WebStreamData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WebStreamData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ListBigQueryLinksRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IListBigQueryLinksRequest} message ListBigQueryLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBigQueryLinksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; - /** - * Decodes a WebStreamData message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.DataStream.WebStreamData} WebStreamData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WebStreamData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DataStream.WebStreamData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.measurementId = reader.string(); - break; - } - case 2: { - message.firebaseAppId = reader.string(); - break; - } - case 3: { - message.defaultUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified ListBigQueryLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IListBigQueryLinksRequest} message ListBigQueryLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBigQueryLinksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBigQueryLinksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksRequest} ListBigQueryLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBigQueryLinksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListBigQueryLinksRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes a WebStreamData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.DataStream.WebStreamData} WebStreamData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WebStreamData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a ListBigQueryLinksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksRequest} ListBigQueryLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBigQueryLinksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a WebStreamData message. - * @function verify - * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WebStreamData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.measurementId != null && message.hasOwnProperty("measurementId")) - if (!$util.isString(message.measurementId)) - return "measurementId: string expected"; - if (message.firebaseAppId != null && message.hasOwnProperty("firebaseAppId")) - if (!$util.isString(message.firebaseAppId)) - return "firebaseAppId: string expected"; - if (message.defaultUri != null && message.hasOwnProperty("defaultUri")) - if (!$util.isString(message.defaultUri)) - return "defaultUri: string expected"; - return null; - }; + /** + * Verifies a ListBigQueryLinksRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBigQueryLinksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; - /** - * Creates a WebStreamData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.DataStream.WebStreamData} WebStreamData - */ - WebStreamData.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.DataStream.WebStreamData) - return object; - var message = new $root.google.analytics.admin.v1alpha.DataStream.WebStreamData(); - if (object.measurementId != null) - message.measurementId = String(object.measurementId); - if (object.firebaseAppId != null) - message.firebaseAppId = String(object.firebaseAppId); - if (object.defaultUri != null) - message.defaultUri = String(object.defaultUri); - return message; - }; + /** + * Creates a ListBigQueryLinksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksRequest} ListBigQueryLinksRequest + */ + ListBigQueryLinksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListBigQueryLinksRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListBigQueryLinksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; - /** - * Creates a plain object from a WebStreamData message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData - * @static - * @param {google.analytics.admin.v1alpha.DataStream.WebStreamData} message WebStreamData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WebStreamData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.measurementId = ""; - object.firebaseAppId = ""; - object.defaultUri = ""; - } - if (message.measurementId != null && message.hasOwnProperty("measurementId")) - object.measurementId = message.measurementId; - if (message.firebaseAppId != null && message.hasOwnProperty("firebaseAppId")) - object.firebaseAppId = message.firebaseAppId; - if (message.defaultUri != null && message.hasOwnProperty("defaultUri")) - object.defaultUri = message.defaultUri; - return object; - }; + /** + * Creates a plain object from a ListBigQueryLinksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.ListBigQueryLinksRequest} message ListBigQueryLinksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBigQueryLinksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; - /** - * Converts this WebStreamData to JSON. - * @function toJSON - * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData - * @instance - * @returns {Object.} JSON object - */ - WebStreamData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this ListBigQueryLinksRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @instance + * @returns {Object.} JSON object + */ + ListBigQueryLinksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for WebStreamData - * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WebStreamData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.DataStream.WebStreamData"; - }; + /** + * Gets the default type url for ListBigQueryLinksRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBigQueryLinksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListBigQueryLinksRequest"; + }; - return WebStreamData; - })(); + return ListBigQueryLinksRequest; + })(); - DataStream.AndroidAppStreamData = (function() { + v1alpha.ListBigQueryLinksResponse = (function() { - /** - * Properties of an AndroidAppStreamData. - * @memberof google.analytics.admin.v1alpha.DataStream - * @interface IAndroidAppStreamData - * @property {string|null} [firebaseAppId] AndroidAppStreamData firebaseAppId - * @property {string|null} [packageName] AndroidAppStreamData packageName - */ + /** + * Properties of a ListBigQueryLinksResponse. + * @memberof google.analytics.admin.v1alpha + * @interface IListBigQueryLinksResponse + * @property {Array.|null} [bigqueryLinks] ListBigQueryLinksResponse bigqueryLinks + * @property {string|null} [nextPageToken] ListBigQueryLinksResponse nextPageToken + */ - /** - * Constructs a new AndroidAppStreamData. - * @memberof google.analytics.admin.v1alpha.DataStream - * @classdesc Represents an AndroidAppStreamData. - * @implements IAndroidAppStreamData - * @constructor - * @param {google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData=} [properties] Properties to set - */ - function AndroidAppStreamData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new ListBigQueryLinksResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListBigQueryLinksResponse. + * @implements IListBigQueryLinksResponse + * @constructor + * @param {google.analytics.admin.v1alpha.IListBigQueryLinksResponse=} [properties] Properties to set + */ + function ListBigQueryLinksResponse(properties) { + this.bigqueryLinks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * AndroidAppStreamData firebaseAppId. - * @member {string} firebaseAppId - * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData - * @instance - */ - AndroidAppStreamData.prototype.firebaseAppId = ""; + /** + * ListBigQueryLinksResponse bigqueryLinks. + * @member {Array.} bigqueryLinks + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @instance + */ + ListBigQueryLinksResponse.prototype.bigqueryLinks = $util.emptyArray; - /** - * AndroidAppStreamData packageName. - * @member {string} packageName - * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData - * @instance - */ - AndroidAppStreamData.prototype.packageName = ""; + /** + * ListBigQueryLinksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @instance + */ + ListBigQueryLinksResponse.prototype.nextPageToken = ""; - /** - * Creates a new AndroidAppStreamData instance using the specified properties. - * @function create - * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData - * @static - * @param {google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData} AndroidAppStreamData instance - */ - AndroidAppStreamData.create = function create(properties) { - return new AndroidAppStreamData(properties); - }; + /** + * Creates a new ListBigQueryLinksResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IListBigQueryLinksResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksResponse} ListBigQueryLinksResponse instance + */ + ListBigQueryLinksResponse.create = function create(properties) { + return new ListBigQueryLinksResponse(properties); + }; - /** - * Encodes the specified AndroidAppStreamData message. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData.verify|verify} messages. - * @function encode - * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData - * @static - * @param {google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData} message AndroidAppStreamData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AndroidAppStreamData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.firebaseAppId != null && Object.hasOwnProperty.call(message, "firebaseAppId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.firebaseAppId); - if (message.packageName != null && Object.hasOwnProperty.call(message, "packageName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.packageName); - return writer; - }; + /** + * Encodes the specified ListBigQueryLinksResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IListBigQueryLinksResponse} message ListBigQueryLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBigQueryLinksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bigqueryLinks != null && message.bigqueryLinks.length) + for (var i = 0; i < message.bigqueryLinks.length; ++i) + $root.google.analytics.admin.v1alpha.BigQueryLink.encode(message.bigqueryLinks[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 AndroidAppStreamData message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData - * @static - * @param {google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData} message AndroidAppStreamData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AndroidAppStreamData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ListBigQueryLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IListBigQueryLinksResponse} message ListBigQueryLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBigQueryLinksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an AndroidAppStreamData message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData} AndroidAppStreamData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AndroidAppStreamData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.firebaseAppId = reader.string(); - break; - } - case 2: { - message.packageName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a ListBigQueryLinksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksResponse} ListBigQueryLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBigQueryLinksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListBigQueryLinksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.bigqueryLinks && message.bigqueryLinks.length)) + message.bigqueryLinks = []; + message.bigqueryLinks.push($root.google.analytics.admin.v1alpha.BigQueryLink.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes an AndroidAppStreamData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData} AndroidAppStreamData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AndroidAppStreamData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AndroidAppStreamData message. - * @function verify - * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AndroidAppStreamData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.firebaseAppId != null && message.hasOwnProperty("firebaseAppId")) - if (!$util.isString(message.firebaseAppId)) - return "firebaseAppId: string expected"; - if (message.packageName != null && message.hasOwnProperty("packageName")) - if (!$util.isString(message.packageName)) - return "packageName: string expected"; - return null; - }; + } + return message; + }; - /** - * Creates an AndroidAppStreamData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData} AndroidAppStreamData - */ - AndroidAppStreamData.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData) - return object; - var message = new $root.google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData(); - if (object.firebaseAppId != null) - message.firebaseAppId = String(object.firebaseAppId); - if (object.packageName != null) - message.packageName = String(object.packageName); - return message; - }; + /** + * Decodes a ListBigQueryLinksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksResponse} ListBigQueryLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBigQueryLinksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from an AndroidAppStreamData message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData - * @static - * @param {google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData} message AndroidAppStreamData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AndroidAppStreamData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.firebaseAppId = ""; - object.packageName = ""; + /** + * Verifies a ListBigQueryLinksResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBigQueryLinksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bigqueryLinks != null && message.hasOwnProperty("bigqueryLinks")) { + if (!Array.isArray(message.bigqueryLinks)) + return "bigqueryLinks: array expected"; + for (var i = 0; i < message.bigqueryLinks.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.BigQueryLink.verify(message.bigqueryLinks[i]); + if (error) + return "bigqueryLinks." + error; } - if (message.firebaseAppId != null && message.hasOwnProperty("firebaseAppId")) - object.firebaseAppId = message.firebaseAppId; - if (message.packageName != null && message.hasOwnProperty("packageName")) - object.packageName = message.packageName; - return object; - }; - - /** - * Converts this AndroidAppStreamData to JSON. - * @function toJSON - * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData - * @instance - * @returns {Object.} JSON object - */ - AndroidAppStreamData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; - /** - * Gets the default type url for AndroidAppStreamData - * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AndroidAppStreamData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Creates a ListBigQueryLinksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksResponse} ListBigQueryLinksResponse + */ + ListBigQueryLinksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListBigQueryLinksResponse) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListBigQueryLinksResponse(); + if (object.bigqueryLinks) { + if (!Array.isArray(object.bigqueryLinks)) + throw TypeError(".google.analytics.admin.v1alpha.ListBigQueryLinksResponse.bigqueryLinks: array expected"); + message.bigqueryLinks = []; + for (var i = 0; i < object.bigqueryLinks.length; ++i) { + if (typeof object.bigqueryLinks[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ListBigQueryLinksResponse.bigqueryLinks: object expected"); + message.bigqueryLinks[i] = $root.google.analytics.admin.v1alpha.BigQueryLink.fromObject(object.bigqueryLinks[i]); } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData"; - }; - - return AndroidAppStreamData; - })(); - - DataStream.IosAppStreamData = (function() { - - /** - * Properties of an IosAppStreamData. - * @memberof google.analytics.admin.v1alpha.DataStream - * @interface IIosAppStreamData - * @property {string|null} [firebaseAppId] IosAppStreamData firebaseAppId - * @property {string|null} [bundleId] IosAppStreamData bundleId - */ - - /** - * Constructs a new IosAppStreamData. - * @memberof google.analytics.admin.v1alpha.DataStream - * @classdesc Represents an IosAppStreamData. - * @implements IIosAppStreamData - * @constructor - * @param {google.analytics.admin.v1alpha.DataStream.IIosAppStreamData=} [properties] Properties to set - */ - function IosAppStreamData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * IosAppStreamData firebaseAppId. - * @member {string} firebaseAppId - * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData - * @instance - */ - IosAppStreamData.prototype.firebaseAppId = ""; - - /** - * IosAppStreamData bundleId. - * @member {string} bundleId - * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData - * @instance - */ - IosAppStreamData.prototype.bundleId = ""; - - /** - * Creates a new IosAppStreamData instance using the specified properties. - * @function create - * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData - * @static - * @param {google.analytics.admin.v1alpha.DataStream.IIosAppStreamData=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.DataStream.IosAppStreamData} IosAppStreamData instance - */ - IosAppStreamData.create = function create(properties) { - return new IosAppStreamData(properties); - }; - - /** - * Encodes the specified IosAppStreamData message. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.IosAppStreamData.verify|verify} messages. - * @function encode - * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData - * @static - * @param {google.analytics.admin.v1alpha.DataStream.IIosAppStreamData} message IosAppStreamData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IosAppStreamData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.firebaseAppId != null && Object.hasOwnProperty.call(message, "firebaseAppId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.firebaseAppId); - if (message.bundleId != null && Object.hasOwnProperty.call(message, "bundleId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.bundleId); - return writer; - }; - - /** - * Encodes the specified IosAppStreamData message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.IosAppStreamData.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData - * @static - * @param {google.analytics.admin.v1alpha.DataStream.IIosAppStreamData} message IosAppStreamData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IosAppStreamData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IosAppStreamData message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.DataStream.IosAppStreamData} IosAppStreamData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IosAppStreamData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DataStream.IosAppStreamData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.firebaseAppId = reader.string(); - break; - } - case 2: { - message.bundleId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IosAppStreamData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.DataStream.IosAppStreamData} IosAppStreamData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IosAppStreamData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IosAppStreamData message. - * @function verify - * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IosAppStreamData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.firebaseAppId != null && message.hasOwnProperty("firebaseAppId")) - if (!$util.isString(message.firebaseAppId)) - return "firebaseAppId: string expected"; - if (message.bundleId != null && message.hasOwnProperty("bundleId")) - if (!$util.isString(message.bundleId)) - return "bundleId: string expected"; - return null; - }; - - /** - * Creates an IosAppStreamData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.DataStream.IosAppStreamData} IosAppStreamData - */ - IosAppStreamData.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.DataStream.IosAppStreamData) - return object; - var message = new $root.google.analytics.admin.v1alpha.DataStream.IosAppStreamData(); - if (object.firebaseAppId != null) - message.firebaseAppId = String(object.firebaseAppId); - if (object.bundleId != null) - message.bundleId = String(object.bundleId); - return message; - }; - - /** - * Creates a plain object from an IosAppStreamData message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData - * @static - * @param {google.analytics.admin.v1alpha.DataStream.IosAppStreamData} message IosAppStreamData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IosAppStreamData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.firebaseAppId = ""; - object.bundleId = ""; - } - if (message.firebaseAppId != null && message.hasOwnProperty("firebaseAppId")) - object.firebaseAppId = message.firebaseAppId; - if (message.bundleId != null && message.hasOwnProperty("bundleId")) - object.bundleId = message.bundleId; - return object; - }; - - /** - * Converts this IosAppStreamData to JSON. - * @function toJSON - * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData - * @instance - * @returns {Object.} JSON object - */ - IosAppStreamData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for IosAppStreamData - * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IosAppStreamData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.DataStream.IosAppStreamData"; - }; + /** + * Creates a plain object from a ListBigQueryLinksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.ListBigQueryLinksResponse} message ListBigQueryLinksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBigQueryLinksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.bigqueryLinks = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.bigqueryLinks && message.bigqueryLinks.length) { + object.bigqueryLinks = []; + for (var j = 0; j < message.bigqueryLinks.length; ++j) + object.bigqueryLinks[j] = $root.google.analytics.admin.v1alpha.BigQueryLink.toObject(message.bigqueryLinks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - return IosAppStreamData; - })(); + /** + * Converts this ListBigQueryLinksResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @instance + * @returns {Object.} JSON object + */ + ListBigQueryLinksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * DataStreamType enum. - * @name google.analytics.admin.v1alpha.DataStream.DataStreamType - * @enum {number} - * @property {number} DATA_STREAM_TYPE_UNSPECIFIED=0 DATA_STREAM_TYPE_UNSPECIFIED value - * @property {number} WEB_DATA_STREAM=1 WEB_DATA_STREAM value - * @property {number} ANDROID_APP_DATA_STREAM=2 ANDROID_APP_DATA_STREAM value - * @property {number} IOS_APP_DATA_STREAM=3 IOS_APP_DATA_STREAM value + * Gets the default type url for ListBigQueryLinksResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - DataStream.DataStreamType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATA_STREAM_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "WEB_DATA_STREAM"] = 1; - values[valuesById[2] = "ANDROID_APP_DATA_STREAM"] = 2; - values[valuesById[3] = "IOS_APP_DATA_STREAM"] = 3; - return values; - })(); + ListBigQueryLinksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListBigQueryLinksResponse"; + }; - return DataStream; + return ListBigQueryLinksResponse; })(); - v1alpha.UserLink = (function() { + /** + * AudienceFilterScope enum. + * @name google.analytics.admin.v1alpha.AudienceFilterScope + * @enum {number} + * @property {number} AUDIENCE_FILTER_SCOPE_UNSPECIFIED=0 AUDIENCE_FILTER_SCOPE_UNSPECIFIED value + * @property {number} AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT=1 AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT value + * @property {number} AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION=2 AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION value + * @property {number} AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS=3 AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS value + */ + v1alpha.AudienceFilterScope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AUDIENCE_FILTER_SCOPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT"] = 1; + values[valuesById[2] = "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION"] = 2; + values[valuesById[3] = "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS"] = 3; + return values; + })(); + + v1alpha.AudienceDimensionOrMetricFilter = (function() { /** - * Properties of a UserLink. + * Properties of an AudienceDimensionOrMetricFilter. * @memberof google.analytics.admin.v1alpha - * @interface IUserLink - * @property {string|null} [name] UserLink name - * @property {string|null} [emailAddress] UserLink emailAddress - * @property {Array.|null} [directRoles] UserLink directRoles + * @interface IAudienceDimensionOrMetricFilter + * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter|null} [stringFilter] AudienceDimensionOrMetricFilter stringFilter + * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter|null} [inListFilter] AudienceDimensionOrMetricFilter inListFilter + * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter|null} [numericFilter] AudienceDimensionOrMetricFilter numericFilter + * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter|null} [betweenFilter] AudienceDimensionOrMetricFilter betweenFilter + * @property {string|null} [fieldName] AudienceDimensionOrMetricFilter fieldName + * @property {boolean|null} [atAnyPointInTime] AudienceDimensionOrMetricFilter atAnyPointInTime + * @property {number|null} [inAnyNDayPeriod] AudienceDimensionOrMetricFilter inAnyNDayPeriod */ /** - * Constructs a new UserLink. + * Constructs a new AudienceDimensionOrMetricFilter. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a UserLink. - * @implements IUserLink + * @classdesc Represents an AudienceDimensionOrMetricFilter. + * @implements IAudienceDimensionOrMetricFilter * @constructor - * @param {google.analytics.admin.v1alpha.IUserLink=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter=} [properties] Properties to set */ - function UserLink(properties) { - this.directRoles = []; + function AudienceDimensionOrMetricFilter(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42224,106 +40152,173 @@ } /** - * UserLink name. - * @member {string} name - * @memberof google.analytics.admin.v1alpha.UserLink + * AudienceDimensionOrMetricFilter stringFilter. + * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter|null|undefined} stringFilter + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter * @instance */ - UserLink.prototype.name = ""; + AudienceDimensionOrMetricFilter.prototype.stringFilter = null; /** - * UserLink emailAddress. - * @member {string} emailAddress - * @memberof google.analytics.admin.v1alpha.UserLink + * AudienceDimensionOrMetricFilter inListFilter. + * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter|null|undefined} inListFilter + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter * @instance */ - UserLink.prototype.emailAddress = ""; + AudienceDimensionOrMetricFilter.prototype.inListFilter = null; /** - * UserLink directRoles. - * @member {Array.} directRoles - * @memberof google.analytics.admin.v1alpha.UserLink + * AudienceDimensionOrMetricFilter numericFilter. + * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter|null|undefined} numericFilter + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter * @instance */ - UserLink.prototype.directRoles = $util.emptyArray; + AudienceDimensionOrMetricFilter.prototype.numericFilter = null; /** - * Creates a new UserLink instance using the specified properties. + * AudienceDimensionOrMetricFilter betweenFilter. + * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter|null|undefined} betweenFilter + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @instance + */ + AudienceDimensionOrMetricFilter.prototype.betweenFilter = null; + + /** + * AudienceDimensionOrMetricFilter fieldName. + * @member {string} fieldName + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @instance + */ + AudienceDimensionOrMetricFilter.prototype.fieldName = ""; + + /** + * AudienceDimensionOrMetricFilter atAnyPointInTime. + * @member {boolean} atAnyPointInTime + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @instance + */ + AudienceDimensionOrMetricFilter.prototype.atAnyPointInTime = false; + + /** + * AudienceDimensionOrMetricFilter inAnyNDayPeriod. + * @member {number} inAnyNDayPeriod + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @instance + */ + AudienceDimensionOrMetricFilter.prototype.inAnyNDayPeriod = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AudienceDimensionOrMetricFilter oneFilter. + * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @instance + */ + Object.defineProperty(AudienceDimensionOrMetricFilter.prototype, "oneFilter", { + get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AudienceDimensionOrMetricFilter instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.UserLink + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter * @static - * @param {google.analytics.admin.v1alpha.IUserLink=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.UserLink} UserLink instance + * @param {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter} AudienceDimensionOrMetricFilter instance */ - UserLink.create = function create(properties) { - return new UserLink(properties); + AudienceDimensionOrMetricFilter.create = function create(properties) { + return new AudienceDimensionOrMetricFilter(properties); }; /** - * Encodes the specified UserLink message. Does not implicitly {@link google.analytics.admin.v1alpha.UserLink.verify|verify} messages. + * Encodes the specified AudienceDimensionOrMetricFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.UserLink + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter * @static - * @param {google.analytics.admin.v1alpha.IUserLink} message UserLink message or plain object to encode + * @param {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter} message AudienceDimensionOrMetricFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserLink.encode = function encode(message, writer) { + AudienceDimensionOrMetricFilter.encode = function encode(message, writer) { 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.emailAddress != null && Object.hasOwnProperty.call(message, "emailAddress")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.emailAddress); - if (message.directRoles != null && message.directRoles.length) - for (var i = 0; i < message.directRoles.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.directRoles[i]); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) + $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.encode(message.stringFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) + $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.encode(message.inListFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) + $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) + $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.atAnyPointInTime != null && Object.hasOwnProperty.call(message, "atAnyPointInTime")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.atAnyPointInTime); + if (message.inAnyNDayPeriod != null && Object.hasOwnProperty.call(message, "inAnyNDayPeriod")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.inAnyNDayPeriod); return writer; }; /** - * Encodes the specified UserLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UserLink.verify|verify} messages. + * Encodes the specified AudienceDimensionOrMetricFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.UserLink + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter * @static - * @param {google.analytics.admin.v1alpha.IUserLink} message UserLink message or plain object to encode + * @param {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter} message AudienceDimensionOrMetricFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserLink.encodeDelimited = function encodeDelimited(message, writer) { + AudienceDimensionOrMetricFilter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a UserLink message from the specified reader or buffer. + * Decodes an AudienceDimensionOrMetricFilter message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.UserLink + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.UserLink} UserLink + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter} AudienceDimensionOrMetricFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserLink.decode = function decode(reader, length) { + AudienceDimensionOrMetricFilter.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.UserLink(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 2: { + message.stringFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.decode(reader, reader.uint32()); + break; + } + case 3: { + message.inListFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.decode(reader, reader.uint32()); + break; + } + case 4: { + message.numericFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.betweenFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.decode(reader, reader.uint32()); + break; + } case 1: { - message.name = reader.string(); + message.fieldName = reader.string(); break; } - case 2: { - message.emailAddress = reader.string(); + case 6: { + message.atAnyPointInTime = reader.bool(); break; } - case 3: { - if (!(message.directRoles && message.directRoles.length)) - message.directRoles = []; - message.directRoles.push(reader.string()); + case 7: { + message.inAnyNDayPeriod = reader.int32(); break; } default: @@ -42335,1742 +40330,1639 @@ }; /** - * Decodes a UserLink message from the specified reader or buffer, length delimited. + * Decodes an AudienceDimensionOrMetricFilter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.UserLink + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.UserLink} UserLink + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter} AudienceDimensionOrMetricFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserLink.decodeDelimited = function decodeDelimited(reader) { + AudienceDimensionOrMetricFilter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a UserLink message. + * Verifies an AudienceDimensionOrMetricFilter message. * @function verify - * @memberof google.analytics.admin.v1alpha.UserLink + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UserLink.verify = function verify(message) { + AudienceDimensionOrMetricFilter.verify = function verify(message) { if (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.emailAddress != null && message.hasOwnProperty("emailAddress")) - if (!$util.isString(message.emailAddress)) - return "emailAddress: string expected"; - if (message.directRoles != null && message.hasOwnProperty("directRoles")) { - if (!Array.isArray(message.directRoles)) - return "directRoles: array expected"; - for (var i = 0; i < message.directRoles.length; ++i) - if (!$util.isString(message.directRoles[i])) - return "directRoles: string[] expected"; + var properties = {}; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + properties.oneFilter = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.verify(message.stringFilter); + if (error) + return "stringFilter." + error; + } } - return null; - }; - - /** - * Creates a UserLink message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.admin.v1alpha.UserLink - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.UserLink} UserLink - */ - UserLink.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.UserLink) - return object; - var message = new $root.google.analytics.admin.v1alpha.UserLink(); - if (object.name != null) - message.name = String(object.name); - if (object.emailAddress != null) - message.emailAddress = String(object.emailAddress); - if (object.directRoles) { - if (!Array.isArray(object.directRoles)) - throw TypeError(".google.analytics.admin.v1alpha.UserLink.directRoles: array expected"); - message.directRoles = []; - for (var i = 0; i < object.directRoles.length; ++i) - message.directRoles[i] = String(object.directRoles[i]); - } - return message; - }; - - /** - * Creates a plain object from a UserLink message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.admin.v1alpha.UserLink - * @static - * @param {google.analytics.admin.v1alpha.UserLink} message UserLink - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UserLink.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.directRoles = []; - if (options.defaults) { - object.name = ""; - object.emailAddress = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.emailAddress != null && message.hasOwnProperty("emailAddress")) - object.emailAddress = message.emailAddress; - if (message.directRoles && message.directRoles.length) { - object.directRoles = []; - for (var j = 0; j < message.directRoles.length; ++j) - object.directRoles[j] = message.directRoles[j]; - } - return object; - }; - - /** - * Converts this UserLink to JSON. - * @function toJSON - * @memberof google.analytics.admin.v1alpha.UserLink - * @instance - * @returns {Object.} JSON object - */ - UserLink.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UserLink - * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.UserLink - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UserLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.UserLink"; - }; - - return UserLink; - })(); - - v1alpha.AuditUserLink = (function() { - - /** - * Properties of an AuditUserLink. - * @memberof google.analytics.admin.v1alpha - * @interface IAuditUserLink - * @property {string|null} [name] AuditUserLink name - * @property {string|null} [emailAddress] AuditUserLink emailAddress - * @property {Array.|null} [directRoles] AuditUserLink directRoles - * @property {Array.|null} [effectiveRoles] AuditUserLink effectiveRoles - */ - - /** - * Constructs a new AuditUserLink. - * @memberof google.analytics.admin.v1alpha - * @classdesc Represents an AuditUserLink. - * @implements IAuditUserLink - * @constructor - * @param {google.analytics.admin.v1alpha.IAuditUserLink=} [properties] Properties to set - */ - function AuditUserLink(properties) { - this.directRoles = []; - this.effectiveRoles = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AuditUserLink name. - * @member {string} name - * @memberof google.analytics.admin.v1alpha.AuditUserLink - * @instance - */ - AuditUserLink.prototype.name = ""; - - /** - * AuditUserLink emailAddress. - * @member {string} emailAddress - * @memberof google.analytics.admin.v1alpha.AuditUserLink - * @instance - */ - AuditUserLink.prototype.emailAddress = ""; - - /** - * AuditUserLink directRoles. - * @member {Array.} directRoles - * @memberof google.analytics.admin.v1alpha.AuditUserLink - * @instance - */ - AuditUserLink.prototype.directRoles = $util.emptyArray; - - /** - * AuditUserLink effectiveRoles. - * @member {Array.} effectiveRoles - * @memberof google.analytics.admin.v1alpha.AuditUserLink - * @instance - */ - AuditUserLink.prototype.effectiveRoles = $util.emptyArray; - - /** - * Creates a new AuditUserLink instance using the specified properties. - * @function create - * @memberof google.analytics.admin.v1alpha.AuditUserLink - * @static - * @param {google.analytics.admin.v1alpha.IAuditUserLink=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AuditUserLink} AuditUserLink instance - */ - AuditUserLink.create = function create(properties) { - return new AuditUserLink(properties); - }; - - /** - * Encodes the specified AuditUserLink message. Does not implicitly {@link google.analytics.admin.v1alpha.AuditUserLink.verify|verify} messages. - * @function encode - * @memberof google.analytics.admin.v1alpha.AuditUserLink - * @static - * @param {google.analytics.admin.v1alpha.IAuditUserLink} message AuditUserLink message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditUserLink.encode = function encode(message, writer) { - 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.emailAddress != null && Object.hasOwnProperty.call(message, "emailAddress")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.emailAddress); - if (message.directRoles != null && message.directRoles.length) - for (var i = 0; i < message.directRoles.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.directRoles[i]); - if (message.effectiveRoles != null && message.effectiveRoles.length) - for (var i = 0; i < message.effectiveRoles.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.effectiveRoles[i]); - return writer; - }; - - /** - * Encodes the specified AuditUserLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AuditUserLink.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AuditUserLink - * @static - * @param {google.analytics.admin.v1alpha.IAuditUserLink} message AuditUserLink message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditUserLink.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AuditUserLink message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.admin.v1alpha.AuditUserLink - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.AuditUserLink} AuditUserLink - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditUserLink.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AuditUserLink(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.emailAddress = reader.string(); - break; - } - case 3: { - if (!(message.directRoles && message.directRoles.length)) - message.directRoles = []; - message.directRoles.push(reader.string()); - break; - } - case 4: { - if (!(message.effectiveRoles && message.effectiveRoles.length)) - message.effectiveRoles = []; - message.effectiveRoles.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.verify(message.inListFilter); + if (error) + return "inListFilter." + error; } } - return message; - }; - - /** - * Decodes an AuditUserLink message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AuditUserLink - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AuditUserLink} AuditUserLink - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditUserLink.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AuditUserLink message. - * @function verify - * @memberof google.analytics.admin.v1alpha.AuditUserLink - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AuditUserLink.verify = function verify(message) { - if (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.emailAddress != null && message.hasOwnProperty("emailAddress")) - if (!$util.isString(message.emailAddress)) - return "emailAddress: string expected"; - if (message.directRoles != null && message.hasOwnProperty("directRoles")) { - if (!Array.isArray(message.directRoles)) - return "directRoles: array expected"; - for (var i = 0; i < message.directRoles.length; ++i) - if (!$util.isString(message.directRoles[i])) - return "directRoles: string[] expected"; + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.verify(message.numericFilter); + if (error) + return "numericFilter." + error; + } } - if (message.effectiveRoles != null && message.hasOwnProperty("effectiveRoles")) { - if (!Array.isArray(message.effectiveRoles)) - return "effectiveRoles: array expected"; - for (var i = 0; i < message.effectiveRoles.length; ++i) - if (!$util.isString(message.effectiveRoles[i])) - return "effectiveRoles: string[] expected"; + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.verify(message.betweenFilter); + if (error) + return "betweenFilter." + error; + } } + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + if (message.atAnyPointInTime != null && message.hasOwnProperty("atAnyPointInTime")) + if (typeof message.atAnyPointInTime !== "boolean") + return "atAnyPointInTime: boolean expected"; + if (message.inAnyNDayPeriod != null && message.hasOwnProperty("inAnyNDayPeriod")) + if (!$util.isInteger(message.inAnyNDayPeriod)) + return "inAnyNDayPeriod: integer expected"; return null; }; /** - * Creates an AuditUserLink message from a plain object. Also converts values to their respective internal types. + * Creates an AudienceDimensionOrMetricFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AuditUserLink} AuditUserLink + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter} AudienceDimensionOrMetricFilter */ - AuditUserLink.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AuditUserLink) + AudienceDimensionOrMetricFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter) return object; - var message = new $root.google.analytics.admin.v1alpha.AuditUserLink(); - if (object.name != null) - message.name = String(object.name); - if (object.emailAddress != null) - message.emailAddress = String(object.emailAddress); - if (object.directRoles) { - if (!Array.isArray(object.directRoles)) - throw TypeError(".google.analytics.admin.v1alpha.AuditUserLink.directRoles: array expected"); - message.directRoles = []; - for (var i = 0; i < object.directRoles.length; ++i) - message.directRoles[i] = String(object.directRoles[i]); + var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter(); + if (object.stringFilter != null) { + if (typeof object.stringFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.stringFilter: object expected"); + message.stringFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.fromObject(object.stringFilter); } - if (object.effectiveRoles) { - if (!Array.isArray(object.effectiveRoles)) - throw TypeError(".google.analytics.admin.v1alpha.AuditUserLink.effectiveRoles: array expected"); - message.effectiveRoles = []; - for (var i = 0; i < object.effectiveRoles.length; ++i) - message.effectiveRoles[i] = String(object.effectiveRoles[i]); + if (object.inListFilter != null) { + if (typeof object.inListFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.inListFilter: object expected"); + message.inListFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.fromObject(object.inListFilter); + } + if (object.numericFilter != null) { + if (typeof object.numericFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.numericFilter: object expected"); + message.numericFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.fromObject(object.numericFilter); + } + if (object.betweenFilter != null) { + if (typeof object.betweenFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.betweenFilter: object expected"); + message.betweenFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.fromObject(object.betweenFilter); } + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + if (object.atAnyPointInTime != null) + message.atAnyPointInTime = Boolean(object.atAnyPointInTime); + if (object.inAnyNDayPeriod != null) + message.inAnyNDayPeriod = object.inAnyNDayPeriod | 0; return message; }; /** - * Creates a plain object from an AuditUserLink message. Also converts values to other types if specified. + * Creates a plain object from an AudienceDimensionOrMetricFilter message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter * @static - * @param {google.analytics.admin.v1alpha.AuditUserLink} message AuditUserLink + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter} message AudienceDimensionOrMetricFilter * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AuditUserLink.toObject = function toObject(message, options) { + AudienceDimensionOrMetricFilter.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.directRoles = []; - object.effectiveRoles = []; - } if (options.defaults) { - object.name = ""; - object.emailAddress = ""; + object.fieldName = ""; + object.atAnyPointInTime = false; + object.inAnyNDayPeriod = 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.emailAddress != null && message.hasOwnProperty("emailAddress")) - object.emailAddress = message.emailAddress; - if (message.directRoles && message.directRoles.length) { - object.directRoles = []; - for (var j = 0; j < message.directRoles.length; ++j) - object.directRoles[j] = message.directRoles[j]; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + object.stringFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.toObject(message.stringFilter, options); + if (options.oneofs) + object.oneFilter = "stringFilter"; } - if (message.effectiveRoles && message.effectiveRoles.length) { - object.effectiveRoles = []; - for (var j = 0; j < message.effectiveRoles.length; ++j) - object.effectiveRoles[j] = message.effectiveRoles[j]; + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + object.inListFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.toObject(message.inListFilter, options); + if (options.oneofs) + object.oneFilter = "inListFilter"; + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + object.numericFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.toObject(message.numericFilter, options); + if (options.oneofs) + object.oneFilter = "numericFilter"; + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + object.betweenFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.toObject(message.betweenFilter, options); + if (options.oneofs) + object.oneFilter = "betweenFilter"; } + if (message.atAnyPointInTime != null && message.hasOwnProperty("atAnyPointInTime")) + object.atAnyPointInTime = message.atAnyPointInTime; + if (message.inAnyNDayPeriod != null && message.hasOwnProperty("inAnyNDayPeriod")) + object.inAnyNDayPeriod = message.inAnyNDayPeriod; return object; }; /** - * Converts this AuditUserLink to JSON. + * Converts this AudienceDimensionOrMetricFilter to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter * @instance * @returns {Object.} JSON object */ - AuditUserLink.prototype.toJSON = function toJSON() { + AudienceDimensionOrMetricFilter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AuditUserLink + * Gets the default type url for AudienceDimensionOrMetricFilter * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AuditUserLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AudienceDimensionOrMetricFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AuditUserLink"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter"; }; - return AuditUserLink; - })(); + AudienceDimensionOrMetricFilter.StringFilter = (function() { - v1alpha.FirebaseLink = (function() { + /** + * Properties of a StringFilter. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @interface IStringFilter + * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType|null} [matchType] StringFilter matchType + * @property {string|null} [value] StringFilter value + * @property {boolean|null} [caseSensitive] StringFilter caseSensitive + */ - /** - * Properties of a FirebaseLink. - * @memberof google.analytics.admin.v1alpha - * @interface IFirebaseLink - * @property {string|null} [name] FirebaseLink name - * @property {string|null} [project] FirebaseLink project - * @property {google.protobuf.ITimestamp|null} [createTime] FirebaseLink createTime - */ + /** + * Constructs a new StringFilter. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @classdesc Represents a StringFilter. + * @implements IStringFilter + * @constructor + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter=} [properties] Properties to set + */ + function StringFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new FirebaseLink. - * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a FirebaseLink. - * @implements IFirebaseLink - * @constructor - * @param {google.analytics.admin.v1alpha.IFirebaseLink=} [properties] Properties to set - */ - function FirebaseLink(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * StringFilter matchType. + * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType} matchType + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @instance + */ + StringFilter.prototype.matchType = 0; - /** - * FirebaseLink name. - * @member {string} name - * @memberof google.analytics.admin.v1alpha.FirebaseLink - * @instance - */ - FirebaseLink.prototype.name = ""; + /** + * StringFilter value. + * @member {string} value + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @instance + */ + StringFilter.prototype.value = ""; - /** - * FirebaseLink project. - * @member {string} project - * @memberof google.analytics.admin.v1alpha.FirebaseLink - * @instance - */ - FirebaseLink.prototype.project = ""; + /** + * StringFilter caseSensitive. + * @member {boolean} caseSensitive + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @instance + */ + StringFilter.prototype.caseSensitive = false; - /** - * FirebaseLink createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.analytics.admin.v1alpha.FirebaseLink - * @instance - */ - FirebaseLink.prototype.createTime = null; - - /** - * Creates a new FirebaseLink instance using the specified properties. - * @function create - * @memberof google.analytics.admin.v1alpha.FirebaseLink - * @static - * @param {google.analytics.admin.v1alpha.IFirebaseLink=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.FirebaseLink} FirebaseLink instance - */ - FirebaseLink.create = function create(properties) { - return new FirebaseLink(properties); - }; + /** + * Creates a new StringFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter} StringFilter instance + */ + StringFilter.create = function create(properties) { + return new StringFilter(properties); + }; - /** - * Encodes the specified FirebaseLink message. Does not implicitly {@link google.analytics.admin.v1alpha.FirebaseLink.verify|verify} messages. - * @function encode - * @memberof google.analytics.admin.v1alpha.FirebaseLink - * @static - * @param {google.analytics.admin.v1alpha.IFirebaseLink} message FirebaseLink message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FirebaseLink.encode = function encode(message, writer) { - 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.project != null && Object.hasOwnProperty.call(message, "project")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.project); - 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(); - return writer; - }; + /** + * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter} message StringFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.matchType != null && Object.hasOwnProperty.call(message, "matchType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.matchType); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.caseSensitive); + return writer; + }; - /** - * Encodes the specified FirebaseLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.FirebaseLink.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.FirebaseLink - * @static - * @param {google.analytics.admin.v1alpha.IFirebaseLink} message FirebaseLink message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FirebaseLink.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter} message StringFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a FirebaseLink message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.admin.v1alpha.FirebaseLink - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.FirebaseLink} FirebaseLink - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FirebaseLink.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.FirebaseLink(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); + /** + * Decodes a StringFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter} StringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.matchType = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + case 3: { + message.caseSensitive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); break; } - case 2: { - message.project = reader.string(); + } + return message; + }; + + /** + * Decodes a StringFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter} StringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StringFilter message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.matchType != null && message.hasOwnProperty("matchType")) + switch (message.matchType) { + default: + return "matchType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: break; } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (typeof message.caseSensitive !== "boolean") + return "caseSensitive: boolean expected"; + return null; + }; + + /** + * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter} StringFilter + */ + StringFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter(); + switch (object.matchType) { + default: + if (typeof object.matchType === "number") { + message.matchType = object.matchType; break; } - default: - reader.skipType(tag & 7); + break; + case "MATCH_TYPE_UNSPECIFIED": + case 0: + message.matchType = 0; + break; + case "EXACT": + case 1: + message.matchType = 1; + break; + case "BEGINS_WITH": + case 2: + message.matchType = 2; + break; + case "ENDS_WITH": + case 3: + message.matchType = 3; + break; + case "CONTAINS": + case 4: + message.matchType = 4; + break; + case "FULL_REGEXP": + case 5: + message.matchType = 5; break; } - } - return message; - }; - - /** - * Decodes a FirebaseLink message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.FirebaseLink - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.FirebaseLink} FirebaseLink - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FirebaseLink.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FirebaseLink message. - * @function verify - * @memberof google.analytics.admin.v1alpha.FirebaseLink - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FirebaseLink.verify = function verify(message) { - if (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.project != null && message.hasOwnProperty("project")) - if (!$util.isString(message.project)) - return "project: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - return null; - }; + if (object.value != null) + message.value = String(object.value); + if (object.caseSensitive != null) + message.caseSensitive = Boolean(object.caseSensitive); + return message; + }; - /** - * Creates a FirebaseLink message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.admin.v1alpha.FirebaseLink - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.FirebaseLink} FirebaseLink - */ - FirebaseLink.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.FirebaseLink) + /** + * Creates a plain object from a StringFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter} message StringFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.matchType = options.enums === String ? "MATCH_TYPE_UNSPECIFIED" : 0; + object.value = ""; + object.caseSensitive = false; + } + if (message.matchType != null && message.hasOwnProperty("matchType")) + object.matchType = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType[message.matchType] === undefined ? message.matchType : $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType[message.matchType] : message.matchType; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + object.caseSensitive = message.caseSensitive; return object; - var message = new $root.google.analytics.admin.v1alpha.FirebaseLink(); - if (object.name != null) - message.name = String(object.name); - if (object.project != null) - message.project = String(object.project); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.analytics.admin.v1alpha.FirebaseLink.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - return message; - }; + }; - /** - * Creates a plain object from a FirebaseLink message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.admin.v1alpha.FirebaseLink - * @static - * @param {google.analytics.admin.v1alpha.FirebaseLink} message FirebaseLink - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FirebaseLink.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.project = ""; - object.createTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.project != null && message.hasOwnProperty("project")) - object.project = message.project; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - return object; - }; + /** + * Converts this StringFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @instance + * @returns {Object.} JSON object + */ + StringFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this FirebaseLink to JSON. - * @function toJSON - * @memberof google.analytics.admin.v1alpha.FirebaseLink - * @instance - * @returns {Object.} JSON object - */ - FirebaseLink.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for StringFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter"; + }; - /** - * Gets the default type url for FirebaseLink - * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.FirebaseLink - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FirebaseLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.FirebaseLink"; - }; + /** + * MatchType enum. + * @name google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType + * @enum {number} + * @property {number} MATCH_TYPE_UNSPECIFIED=0 MATCH_TYPE_UNSPECIFIED value + * @property {number} EXACT=1 EXACT value + * @property {number} BEGINS_WITH=2 BEGINS_WITH value + * @property {number} ENDS_WITH=3 ENDS_WITH value + * @property {number} CONTAINS=4 CONTAINS value + * @property {number} FULL_REGEXP=5 FULL_REGEXP value + */ + StringFilter.MatchType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MATCH_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXACT"] = 1; + values[valuesById[2] = "BEGINS_WITH"] = 2; + values[valuesById[3] = "ENDS_WITH"] = 3; + values[valuesById[4] = "CONTAINS"] = 4; + values[valuesById[5] = "FULL_REGEXP"] = 5; + return values; + })(); - return FirebaseLink; - })(); + return StringFilter; + })(); - v1alpha.GlobalSiteTag = (function() { + AudienceDimensionOrMetricFilter.InListFilter = (function() { - /** - * Properties of a GlobalSiteTag. - * @memberof google.analytics.admin.v1alpha - * @interface IGlobalSiteTag - * @property {string|null} [name] GlobalSiteTag name - * @property {string|null} [snippet] GlobalSiteTag snippet - */ + /** + * Properties of an InListFilter. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @interface IInListFilter + * @property {Array.|null} [values] InListFilter values + * @property {boolean|null} [caseSensitive] InListFilter caseSensitive + */ - /** - * Constructs a new GlobalSiteTag. - * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a GlobalSiteTag. - * @implements IGlobalSiteTag - * @constructor - * @param {google.analytics.admin.v1alpha.IGlobalSiteTag=} [properties] Properties to set - */ - function GlobalSiteTag(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new InListFilter. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @classdesc Represents an InListFilter. + * @implements IInListFilter + * @constructor + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter=} [properties] Properties to set + */ + function InListFilter(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]]; + } - /** - * GlobalSiteTag name. - * @member {string} name - * @memberof google.analytics.admin.v1alpha.GlobalSiteTag - * @instance - */ - GlobalSiteTag.prototype.name = ""; + /** + * InListFilter values. + * @member {Array.} values + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @instance + */ + InListFilter.prototype.values = $util.emptyArray; - /** - * GlobalSiteTag snippet. - * @member {string} snippet - * @memberof google.analytics.admin.v1alpha.GlobalSiteTag - * @instance - */ - GlobalSiteTag.prototype.snippet = ""; + /** + * InListFilter caseSensitive. + * @member {boolean} caseSensitive + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @instance + */ + InListFilter.prototype.caseSensitive = false; - /** - * Creates a new GlobalSiteTag instance using the specified properties. - * @function create - * @memberof google.analytics.admin.v1alpha.GlobalSiteTag - * @static - * @param {google.analytics.admin.v1alpha.IGlobalSiteTag=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.GlobalSiteTag} GlobalSiteTag instance - */ - GlobalSiteTag.create = function create(properties) { - return new GlobalSiteTag(properties); - }; + /** + * Creates a new InListFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter} InListFilter instance + */ + InListFilter.create = function create(properties) { + return new InListFilter(properties); + }; - /** - * Encodes the specified GlobalSiteTag message. Does not implicitly {@link google.analytics.admin.v1alpha.GlobalSiteTag.verify|verify} messages. - * @function encode - * @memberof google.analytics.admin.v1alpha.GlobalSiteTag - * @static - * @param {google.analytics.admin.v1alpha.IGlobalSiteTag} message GlobalSiteTag message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GlobalSiteTag.encode = function encode(message, writer) { - 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.snippet != null && Object.hasOwnProperty.call(message, "snippet")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.snippet); - return writer; - }; + /** + * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter} message InListFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InListFilter.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) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]); + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.caseSensitive); + return writer; + }; - /** - * Encodes the specified GlobalSiteTag message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GlobalSiteTag.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.GlobalSiteTag - * @static - * @param {google.analytics.admin.v1alpha.IGlobalSiteTag} message GlobalSiteTag message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GlobalSiteTag.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter} message InListFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InListFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a GlobalSiteTag message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.admin.v1alpha.GlobalSiteTag - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.GlobalSiteTag} GlobalSiteTag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GlobalSiteTag.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GlobalSiteTag(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.snippet = reader.string(); + /** + * Decodes an InListFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter} InListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InListFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + case 2: { + message.caseSensitive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a GlobalSiteTag message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.GlobalSiteTag - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.GlobalSiteTag} GlobalSiteTag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GlobalSiteTag.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an InListFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter} InListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InListFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a GlobalSiteTag message. - * @function verify - * @memberof google.analytics.admin.v1alpha.GlobalSiteTag - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GlobalSiteTag.verify = function verify(message) { - if (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.snippet != null && message.hasOwnProperty("snippet")) - if (!$util.isString(message.snippet)) - return "snippet: string expected"; - return null; - }; + /** + * Verifies an InListFilter message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InListFilter.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) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (typeof message.caseSensitive !== "boolean") + return "caseSensitive: boolean expected"; + return null; + }; - /** - * Creates a GlobalSiteTag message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.admin.v1alpha.GlobalSiteTag - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.GlobalSiteTag} GlobalSiteTag - */ - GlobalSiteTag.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.GlobalSiteTag) + /** + * Creates an InListFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter} InListFilter + */ + InListFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + if (object.caseSensitive != null) + message.caseSensitive = Boolean(object.caseSensitive); + return message; + }; + + /** + * Creates a plain object from an InListFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter} message InListFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InListFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (options.defaults) + object.caseSensitive = false; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + object.caseSensitive = message.caseSensitive; return object; - var message = new $root.google.analytics.admin.v1alpha.GlobalSiteTag(); - if (object.name != null) - message.name = String(object.name); - if (object.snippet != null) - message.snippet = String(object.snippet); - return message; - }; + }; - /** - * Creates a plain object from a GlobalSiteTag message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.admin.v1alpha.GlobalSiteTag - * @static - * @param {google.analytics.admin.v1alpha.GlobalSiteTag} message GlobalSiteTag - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GlobalSiteTag.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.snippet = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.snippet != null && message.hasOwnProperty("snippet")) - object.snippet = message.snippet; - return object; - }; + /** + * Converts this InListFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @instance + * @returns {Object.} JSON object + */ + InListFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this GlobalSiteTag to JSON. - * @function toJSON - * @memberof google.analytics.admin.v1alpha.GlobalSiteTag - * @instance - * @returns {Object.} JSON object - */ - GlobalSiteTag.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for InListFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InListFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter"; + }; - /** - * Gets the default type url for GlobalSiteTag - * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.GlobalSiteTag - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GlobalSiteTag.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.GlobalSiteTag"; - }; + return InListFilter; + })(); - return GlobalSiteTag; - })(); + AudienceDimensionOrMetricFilter.NumericValue = (function() { - v1alpha.GoogleAdsLink = (function() { + /** + * Properties of a NumericValue. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @interface INumericValue + * @property {number|Long|null} [int64Value] NumericValue int64Value + * @property {number|null} [doubleValue] NumericValue doubleValue + */ - /** - * Properties of a GoogleAdsLink. - * @memberof google.analytics.admin.v1alpha - * @interface IGoogleAdsLink - * @property {string|null} [name] GoogleAdsLink name - * @property {string|null} [customerId] GoogleAdsLink customerId - * @property {boolean|null} [canManageClients] GoogleAdsLink canManageClients - * @property {google.protobuf.IBoolValue|null} [adsPersonalizationEnabled] GoogleAdsLink adsPersonalizationEnabled - * @property {google.protobuf.ITimestamp|null} [createTime] GoogleAdsLink createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] GoogleAdsLink updateTime - * @property {string|null} [creatorEmailAddress] GoogleAdsLink creatorEmailAddress - */ + /** + * Constructs a new NumericValue. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @classdesc Represents a NumericValue. + * @implements INumericValue + * @constructor + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue=} [properties] Properties to set + */ + function NumericValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new GoogleAdsLink. - * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a GoogleAdsLink. - * @implements IGoogleAdsLink - * @constructor - * @param {google.analytics.admin.v1alpha.IGoogleAdsLink=} [properties] Properties to set - */ - function GoogleAdsLink(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * NumericValue int64Value. + * @member {number|Long|null|undefined} int64Value + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @instance + */ + NumericValue.prototype.int64Value = null; - /** - * GoogleAdsLink name. - * @member {string} name - * @memberof google.analytics.admin.v1alpha.GoogleAdsLink - * @instance - */ - GoogleAdsLink.prototype.name = ""; + /** + * NumericValue doubleValue. + * @member {number|null|undefined} doubleValue + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @instance + */ + NumericValue.prototype.doubleValue = null; - /** - * GoogleAdsLink customerId. - * @member {string} customerId - * @memberof google.analytics.admin.v1alpha.GoogleAdsLink - * @instance - */ - GoogleAdsLink.prototype.customerId = ""; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * GoogleAdsLink canManageClients. - * @member {boolean} canManageClients - * @memberof google.analytics.admin.v1alpha.GoogleAdsLink - * @instance - */ - GoogleAdsLink.prototype.canManageClients = false; + /** + * NumericValue oneValue. + * @member {"int64Value"|"doubleValue"|undefined} oneValue + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @instance + */ + Object.defineProperty(NumericValue.prototype, "oneValue", { + get: $util.oneOfGetter($oneOfFields = ["int64Value", "doubleValue"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * GoogleAdsLink adsPersonalizationEnabled. - * @member {google.protobuf.IBoolValue|null|undefined} adsPersonalizationEnabled - * @memberof google.analytics.admin.v1alpha.GoogleAdsLink - * @instance - */ - GoogleAdsLink.prototype.adsPersonalizationEnabled = null; + /** + * Creates a new NumericValue instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue} NumericValue instance + */ + NumericValue.create = function create(properties) { + return new NumericValue(properties); + }; - /** - * GoogleAdsLink createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.analytics.admin.v1alpha.GoogleAdsLink - * @instance - */ - GoogleAdsLink.prototype.createTime = null; + /** + * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue} message NumericValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.int64Value != null && Object.hasOwnProperty.call(message, "int64Value")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.int64Value); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.doubleValue); + return writer; + }; - /** - * GoogleAdsLink updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.analytics.admin.v1alpha.GoogleAdsLink - * @instance - */ - GoogleAdsLink.prototype.updateTime = null; + /** + * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue} message NumericValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * GoogleAdsLink creatorEmailAddress. - * @member {string} creatorEmailAddress - * @memberof google.analytics.admin.v1alpha.GoogleAdsLink - * @instance - */ - GoogleAdsLink.prototype.creatorEmailAddress = ""; - - /** - * Creates a new GoogleAdsLink instance using the specified properties. - * @function create - * @memberof google.analytics.admin.v1alpha.GoogleAdsLink - * @static - * @param {google.analytics.admin.v1alpha.IGoogleAdsLink=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.GoogleAdsLink} GoogleAdsLink instance - */ - GoogleAdsLink.create = function create(properties) { - return new GoogleAdsLink(properties); - }; - - /** - * Encodes the specified GoogleAdsLink message. Does not implicitly {@link google.analytics.admin.v1alpha.GoogleAdsLink.verify|verify} messages. - * @function encode - * @memberof google.analytics.admin.v1alpha.GoogleAdsLink - * @static - * @param {google.analytics.admin.v1alpha.IGoogleAdsLink} message GoogleAdsLink message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoogleAdsLink.encode = function encode(message, writer) { - 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.customerId != null && Object.hasOwnProperty.call(message, "customerId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.customerId); - if (message.canManageClients != null && Object.hasOwnProperty.call(message, "canManageClients")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.canManageClients); - if (message.adsPersonalizationEnabled != null && Object.hasOwnProperty.call(message, "adsPersonalizationEnabled")) - $root.google.protobuf.BoolValue.encode(message.adsPersonalizationEnabled, writer.uint32(/* id 5, wireType 2 =*/42).fork()).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.creatorEmailAddress != null && Object.hasOwnProperty.call(message, "creatorEmailAddress")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.creatorEmailAddress); - return writer; - }; - - /** - * Encodes the specified GoogleAdsLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GoogleAdsLink.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.GoogleAdsLink - * @static - * @param {google.analytics.admin.v1alpha.IGoogleAdsLink} message GoogleAdsLink message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoogleAdsLink.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GoogleAdsLink message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.admin.v1alpha.GoogleAdsLink - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.GoogleAdsLink} GoogleAdsLink - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoogleAdsLink.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GoogleAdsLink(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 3: { - message.customerId = reader.string(); - break; - } - case 4: { - message.canManageClients = reader.bool(); - break; - } - case 5: { - message.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); - 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 9: { - message.creatorEmailAddress = reader.string(); + /** + * Decodes a NumericValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue} NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.int64Value = reader.int64(); + break; + } + case 2: { + message.doubleValue = reader.double(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a GoogleAdsLink message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.GoogleAdsLink - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.GoogleAdsLink} GoogleAdsLink - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoogleAdsLink.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a NumericValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue} NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a GoogleAdsLink message. - * @function verify - * @memberof google.analytics.admin.v1alpha.GoogleAdsLink - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GoogleAdsLink.verify = function verify(message) { - if (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.customerId != null && message.hasOwnProperty("customerId")) - if (!$util.isString(message.customerId)) - return "customerId: string expected"; - if (message.canManageClients != null && message.hasOwnProperty("canManageClients")) - if (typeof message.canManageClients !== "boolean") - return "canManageClients: boolean expected"; - if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) { - var error = $root.google.protobuf.BoolValue.verify(message.adsPersonalizationEnabled); - if (error) - return "adsPersonalizationEnabled." + error; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.creatorEmailAddress != null && message.hasOwnProperty("creatorEmailAddress")) - if (!$util.isString(message.creatorEmailAddress)) - return "creatorEmailAddress: string expected"; - return null; - }; + /** + * Verifies a NumericValue message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NumericValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + properties.oneValue = 1; + if (!$util.isInteger(message.int64Value) && !(message.int64Value && $util.isInteger(message.int64Value.low) && $util.isInteger(message.int64Value.high))) + return "int64Value: integer|Long expected"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + if (properties.oneValue === 1) + return "oneValue: multiple values"; + properties.oneValue = 1; + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + } + return null; + }; - /** - * Creates a GoogleAdsLink message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.admin.v1alpha.GoogleAdsLink - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.GoogleAdsLink} GoogleAdsLink - */ - GoogleAdsLink.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.GoogleAdsLink) - return object; - var message = new $root.google.analytics.admin.v1alpha.GoogleAdsLink(); - if (object.name != null) - message.name = String(object.name); - if (object.customerId != null) - message.customerId = String(object.customerId); - if (object.canManageClients != null) - message.canManageClients = Boolean(object.canManageClients); - if (object.adsPersonalizationEnabled != null) { - if (typeof object.adsPersonalizationEnabled !== "object") - throw TypeError(".google.analytics.admin.v1alpha.GoogleAdsLink.adsPersonalizationEnabled: object expected"); - message.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.fromObject(object.adsPersonalizationEnabled); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.analytics.admin.v1alpha.GoogleAdsLink.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.analytics.admin.v1alpha.GoogleAdsLink.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.creatorEmailAddress != null) - message.creatorEmailAddress = String(object.creatorEmailAddress); - return message; - }; + /** + * Creates a NumericValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue} NumericValue + */ + NumericValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue(); + if (object.int64Value != null) + if ($util.Long) + (message.int64Value = $util.Long.fromValue(object.int64Value)).unsigned = false; + else if (typeof object.int64Value === "string") + message.int64Value = parseInt(object.int64Value, 10); + else if (typeof object.int64Value === "number") + message.int64Value = object.int64Value; + else if (typeof object.int64Value === "object") + message.int64Value = new $util.LongBits(object.int64Value.low >>> 0, object.int64Value.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + return message; + }; - /** - * Creates a plain object from a GoogleAdsLink message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.admin.v1alpha.GoogleAdsLink - * @static - * @param {google.analytics.admin.v1alpha.GoogleAdsLink} message GoogleAdsLink - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GoogleAdsLink.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.customerId = ""; - object.canManageClients = false; - object.adsPersonalizationEnabled = null; - object.createTime = null; - object.updateTime = null; - object.creatorEmailAddress = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.customerId != null && message.hasOwnProperty("customerId")) - object.customerId = message.customerId; - if (message.canManageClients != null && message.hasOwnProperty("canManageClients")) - object.canManageClients = message.canManageClients; - if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) - object.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.toObject(message.adsPersonalizationEnabled, options); - 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.creatorEmailAddress != null && message.hasOwnProperty("creatorEmailAddress")) - object.creatorEmailAddress = message.creatorEmailAddress; - return object; - }; + /** + * Creates a plain object from a NumericValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue} message NumericValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NumericValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + if (typeof message.int64Value === "number") + object.int64Value = options.longs === String ? String(message.int64Value) : message.int64Value; + else + object.int64Value = options.longs === String ? $util.Long.prototype.toString.call(message.int64Value) : options.longs === Number ? new $util.LongBits(message.int64Value.low >>> 0, message.int64Value.high >>> 0).toNumber() : message.int64Value; + if (options.oneofs) + object.oneValue = "int64Value"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (options.oneofs) + object.oneValue = "doubleValue"; + } + return object; + }; - /** - * Converts this GoogleAdsLink to JSON. - * @function toJSON - * @memberof google.analytics.admin.v1alpha.GoogleAdsLink - * @instance - * @returns {Object.} JSON object - */ - GoogleAdsLink.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this NumericValue to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @instance + * @returns {Object.} JSON object + */ + NumericValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for GoogleAdsLink - * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.GoogleAdsLink - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GoogleAdsLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.GoogleAdsLink"; - }; + /** + * Gets the default type url for NumericValue + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NumericValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue"; + }; - return GoogleAdsLink; - })(); + return NumericValue; + })(); - v1alpha.DataSharingSettings = (function() { + AudienceDimensionOrMetricFilter.NumericFilter = (function() { - /** - * Properties of a DataSharingSettings. - * @memberof google.analytics.admin.v1alpha - * @interface IDataSharingSettings - * @property {string|null} [name] DataSharingSettings name - * @property {boolean|null} [sharingWithGoogleSupportEnabled] DataSharingSettings sharingWithGoogleSupportEnabled - * @property {boolean|null} [sharingWithGoogleAssignedSalesEnabled] DataSharingSettings sharingWithGoogleAssignedSalesEnabled - * @property {boolean|null} [sharingWithGoogleAnySalesEnabled] DataSharingSettings sharingWithGoogleAnySalesEnabled - * @property {boolean|null} [sharingWithGoogleProductsEnabled] DataSharingSettings sharingWithGoogleProductsEnabled - * @property {boolean|null} [sharingWithOthersEnabled] DataSharingSettings sharingWithOthersEnabled - */ + /** + * Properties of a NumericFilter. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @interface INumericFilter + * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation|null} [operation] NumericFilter operation + * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null} [value] NumericFilter value + */ - /** - * Constructs a new DataSharingSettings. - * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a DataSharingSettings. - * @implements IDataSharingSettings - * @constructor - * @param {google.analytics.admin.v1alpha.IDataSharingSettings=} [properties] Properties to set - */ - function DataSharingSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new NumericFilter. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @classdesc Represents a NumericFilter. + * @implements INumericFilter + * @constructor + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter=} [properties] Properties to set + */ + function NumericFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * DataSharingSettings name. - * @member {string} name - * @memberof google.analytics.admin.v1alpha.DataSharingSettings - * @instance - */ - DataSharingSettings.prototype.name = ""; + /** + * NumericFilter operation. + * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation} operation + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @instance + */ + NumericFilter.prototype.operation = 0; - /** - * DataSharingSettings sharingWithGoogleSupportEnabled. - * @member {boolean} sharingWithGoogleSupportEnabled - * @memberof google.analytics.admin.v1alpha.DataSharingSettings - * @instance - */ - DataSharingSettings.prototype.sharingWithGoogleSupportEnabled = false; + /** + * NumericFilter value. + * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null|undefined} value + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @instance + */ + NumericFilter.prototype.value = null; - /** - * DataSharingSettings sharingWithGoogleAssignedSalesEnabled. - * @member {boolean} sharingWithGoogleAssignedSalesEnabled - * @memberof google.analytics.admin.v1alpha.DataSharingSettings - * @instance - */ - DataSharingSettings.prototype.sharingWithGoogleAssignedSalesEnabled = false; + /** + * Creates a new NumericFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter} NumericFilter instance + */ + NumericFilter.create = function create(properties) { + return new NumericFilter(properties); + }; - /** - * DataSharingSettings sharingWithGoogleAnySalesEnabled. - * @member {boolean} sharingWithGoogleAnySalesEnabled - * @memberof google.analytics.admin.v1alpha.DataSharingSettings - * @instance - */ - DataSharingSettings.prototype.sharingWithGoogleAnySalesEnabled = false; - - /** - * DataSharingSettings sharingWithGoogleProductsEnabled. - * @member {boolean} sharingWithGoogleProductsEnabled - * @memberof google.analytics.admin.v1alpha.DataSharingSettings - * @instance - */ - DataSharingSettings.prototype.sharingWithGoogleProductsEnabled = false; - - /** - * DataSharingSettings sharingWithOthersEnabled. - * @member {boolean} sharingWithOthersEnabled - * @memberof google.analytics.admin.v1alpha.DataSharingSettings - * @instance - */ - DataSharingSettings.prototype.sharingWithOthersEnabled = false; - - /** - * Creates a new DataSharingSettings instance using the specified properties. - * @function create - * @memberof google.analytics.admin.v1alpha.DataSharingSettings - * @static - * @param {google.analytics.admin.v1alpha.IDataSharingSettings=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.DataSharingSettings} DataSharingSettings instance - */ - DataSharingSettings.create = function create(properties) { - return new DataSharingSettings(properties); - }; - - /** - * Encodes the specified DataSharingSettings message. Does not implicitly {@link google.analytics.admin.v1alpha.DataSharingSettings.verify|verify} messages. - * @function encode - * @memberof google.analytics.admin.v1alpha.DataSharingSettings - * @static - * @param {google.analytics.admin.v1alpha.IDataSharingSettings} message DataSharingSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataSharingSettings.encode = function encode(message, writer) { - 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.sharingWithGoogleSupportEnabled != null && Object.hasOwnProperty.call(message, "sharingWithGoogleSupportEnabled")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.sharingWithGoogleSupportEnabled); - if (message.sharingWithGoogleAssignedSalesEnabled != null && Object.hasOwnProperty.call(message, "sharingWithGoogleAssignedSalesEnabled")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.sharingWithGoogleAssignedSalesEnabled); - if (message.sharingWithGoogleAnySalesEnabled != null && Object.hasOwnProperty.call(message, "sharingWithGoogleAnySalesEnabled")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.sharingWithGoogleAnySalesEnabled); - if (message.sharingWithGoogleProductsEnabled != null && Object.hasOwnProperty.call(message, "sharingWithGoogleProductsEnabled")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.sharingWithGoogleProductsEnabled); - if (message.sharingWithOthersEnabled != null && Object.hasOwnProperty.call(message, "sharingWithOthersEnabled")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.sharingWithOthersEnabled); - return writer; - }; + /** + * Encodes the specified NumericFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter} message NumericFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.operation); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified DataSharingSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataSharingSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.DataSharingSettings - * @static - * @param {google.analytics.admin.v1alpha.IDataSharingSettings} message DataSharingSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataSharingSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified NumericFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter} message NumericFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a DataSharingSettings message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.admin.v1alpha.DataSharingSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.DataSharingSettings} DataSharingSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataSharingSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DataSharingSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.sharingWithGoogleSupportEnabled = reader.bool(); - break; - } - case 3: { - message.sharingWithGoogleAssignedSalesEnabled = reader.bool(); - break; - } - case 4: { - message.sharingWithGoogleAnySalesEnabled = reader.bool(); + /** + * Decodes a NumericFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter} NumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.operation = reader.int32(); + break; + } + case 2: { + message.value = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; } - case 5: { - message.sharingWithGoogleProductsEnabled = reader.bool(); + } + return message; + }; + + /** + * Decodes a NumericFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter} NumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NumericFilter message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NumericFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operation != null && message.hasOwnProperty("operation")) + switch (message.operation) { + default: + return "operation: enum value expected"; + case 0: + case 1: + case 2: + case 4: break; } - case 6: { - message.sharingWithOthersEnabled = reader.bool(); + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify(message.value); + if (error) + return "value." + error; + } + return null; + }; + + /** + * Creates a NumericFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter} NumericFilter + */ + NumericFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter(); + switch (object.operation) { + default: + if (typeof object.operation === "number") { + message.operation = object.operation; break; } - default: - reader.skipType(tag & 7); + break; + case "OPERATION_UNSPECIFIED": + case 0: + message.operation = 0; + break; + case "EQUAL": + case 1: + message.operation = 1; + break; + case "LESS_THAN": + case 2: + message.operation = 2; + break; + case "GREATER_THAN": + case 4: + message.operation = 4; break; } - } - return message; - }; - - /** - * Decodes a DataSharingSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.DataSharingSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.DataSharingSettings} DataSharingSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataSharingSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataSharingSettings message. - * @function verify - * @memberof google.analytics.admin.v1alpha.DataSharingSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataSharingSettings.verify = function verify(message) { - if (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.sharingWithGoogleSupportEnabled != null && message.hasOwnProperty("sharingWithGoogleSupportEnabled")) - if (typeof message.sharingWithGoogleSupportEnabled !== "boolean") - return "sharingWithGoogleSupportEnabled: boolean expected"; - if (message.sharingWithGoogleAssignedSalesEnabled != null && message.hasOwnProperty("sharingWithGoogleAssignedSalesEnabled")) - if (typeof message.sharingWithGoogleAssignedSalesEnabled !== "boolean") - return "sharingWithGoogleAssignedSalesEnabled: boolean expected"; - if (message.sharingWithGoogleAnySalesEnabled != null && message.hasOwnProperty("sharingWithGoogleAnySalesEnabled")) - if (typeof message.sharingWithGoogleAnySalesEnabled !== "boolean") - return "sharingWithGoogleAnySalesEnabled: boolean expected"; - if (message.sharingWithGoogleProductsEnabled != null && message.hasOwnProperty("sharingWithGoogleProductsEnabled")) - if (typeof message.sharingWithGoogleProductsEnabled !== "boolean") - return "sharingWithGoogleProductsEnabled: boolean expected"; - if (message.sharingWithOthersEnabled != null && message.hasOwnProperty("sharingWithOthersEnabled")) - if (typeof message.sharingWithOthersEnabled !== "boolean") - return "sharingWithOthersEnabled: boolean expected"; - return null; - }; + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.value: object expected"); + message.value = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.fromObject(object.value); + } + return message; + }; - /** - * Creates a DataSharingSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.admin.v1alpha.DataSharingSettings - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.DataSharingSettings} DataSharingSettings - */ - DataSharingSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.DataSharingSettings) + /** + * Creates a plain object from a NumericFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter} message NumericFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NumericFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.operation = options.enums === String ? "OPERATION_UNSPECIFIED" : 0; + object.value = null; + } + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation[message.operation] === undefined ? message.operation : $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation[message.operation] : message.operation; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.toObject(message.value, options); return object; - var message = new $root.google.analytics.admin.v1alpha.DataSharingSettings(); - if (object.name != null) - message.name = String(object.name); - if (object.sharingWithGoogleSupportEnabled != null) - message.sharingWithGoogleSupportEnabled = Boolean(object.sharingWithGoogleSupportEnabled); - if (object.sharingWithGoogleAssignedSalesEnabled != null) - message.sharingWithGoogleAssignedSalesEnabled = Boolean(object.sharingWithGoogleAssignedSalesEnabled); - if (object.sharingWithGoogleAnySalesEnabled != null) - message.sharingWithGoogleAnySalesEnabled = Boolean(object.sharingWithGoogleAnySalesEnabled); - if (object.sharingWithGoogleProductsEnabled != null) - message.sharingWithGoogleProductsEnabled = Boolean(object.sharingWithGoogleProductsEnabled); - if (object.sharingWithOthersEnabled != null) - message.sharingWithOthersEnabled = Boolean(object.sharingWithOthersEnabled); - return message; - }; - - /** - * Creates a plain object from a DataSharingSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.admin.v1alpha.DataSharingSettings - * @static - * @param {google.analytics.admin.v1alpha.DataSharingSettings} message DataSharingSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataSharingSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.sharingWithGoogleSupportEnabled = false; - object.sharingWithGoogleAssignedSalesEnabled = false; - object.sharingWithGoogleAnySalesEnabled = false; - object.sharingWithGoogleProductsEnabled = false; - object.sharingWithOthersEnabled = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.sharingWithGoogleSupportEnabled != null && message.hasOwnProperty("sharingWithGoogleSupportEnabled")) - object.sharingWithGoogleSupportEnabled = message.sharingWithGoogleSupportEnabled; - if (message.sharingWithGoogleAssignedSalesEnabled != null && message.hasOwnProperty("sharingWithGoogleAssignedSalesEnabled")) - object.sharingWithGoogleAssignedSalesEnabled = message.sharingWithGoogleAssignedSalesEnabled; - if (message.sharingWithGoogleAnySalesEnabled != null && message.hasOwnProperty("sharingWithGoogleAnySalesEnabled")) - object.sharingWithGoogleAnySalesEnabled = message.sharingWithGoogleAnySalesEnabled; - if (message.sharingWithGoogleProductsEnabled != null && message.hasOwnProperty("sharingWithGoogleProductsEnabled")) - object.sharingWithGoogleProductsEnabled = message.sharingWithGoogleProductsEnabled; - if (message.sharingWithOthersEnabled != null && message.hasOwnProperty("sharingWithOthersEnabled")) - object.sharingWithOthersEnabled = message.sharingWithOthersEnabled; - return object; - }; + }; - /** - * Converts this DataSharingSettings to JSON. - * @function toJSON - * @memberof google.analytics.admin.v1alpha.DataSharingSettings - * @instance - * @returns {Object.} JSON object - */ - DataSharingSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this NumericFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @instance + * @returns {Object.} JSON object + */ + NumericFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for DataSharingSettings - * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.DataSharingSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataSharingSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.DataSharingSettings"; - }; + /** + * Gets the default type url for NumericFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NumericFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter"; + }; - return DataSharingSettings; - })(); + /** + * Operation enum. + * @name google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation + * @enum {number} + * @property {number} OPERATION_UNSPECIFIED=0 OPERATION_UNSPECIFIED value + * @property {number} EQUAL=1 EQUAL value + * @property {number} LESS_THAN=2 LESS_THAN value + * @property {number} GREATER_THAN=4 GREATER_THAN value + */ + NumericFilter.Operation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OPERATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "EQUAL"] = 1; + values[valuesById[2] = "LESS_THAN"] = 2; + values[valuesById[4] = "GREATER_THAN"] = 4; + return values; + })(); - v1alpha.AccountSummary = (function() { + return NumericFilter; + })(); - /** - * Properties of an AccountSummary. - * @memberof google.analytics.admin.v1alpha - * @interface IAccountSummary - * @property {string|null} [name] AccountSummary name - * @property {string|null} [account] AccountSummary account - * @property {string|null} [displayName] AccountSummary displayName - * @property {Array.|null} [propertySummaries] AccountSummary propertySummaries - */ + AudienceDimensionOrMetricFilter.BetweenFilter = (function() { - /** - * Constructs a new AccountSummary. - * @memberof google.analytics.admin.v1alpha - * @classdesc Represents an AccountSummary. - * @implements IAccountSummary - * @constructor - * @param {google.analytics.admin.v1alpha.IAccountSummary=} [properties] Properties to set - */ - function AccountSummary(properties) { - this.propertySummaries = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a BetweenFilter. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @interface IBetweenFilter + * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null} [fromValue] BetweenFilter fromValue + * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null} [toValue] BetweenFilter toValue + */ - /** - * AccountSummary name. - * @member {string} name - * @memberof google.analytics.admin.v1alpha.AccountSummary - * @instance - */ - AccountSummary.prototype.name = ""; + /** + * Constructs a new BetweenFilter. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @classdesc Represents a BetweenFilter. + * @implements IBetweenFilter + * @constructor + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter=} [properties] Properties to set + */ + function BetweenFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BetweenFilter fromValue. + * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null|undefined} fromValue + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @instance + */ + BetweenFilter.prototype.fromValue = null; + + /** + * BetweenFilter toValue. + * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null|undefined} toValue + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @instance + */ + BetweenFilter.prototype.toValue = null; + + /** + * Creates a new BetweenFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter} BetweenFilter instance + */ + BetweenFilter.create = function create(properties) { + return new BetweenFilter(properties); + }; + + /** + * Encodes the specified BetweenFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter} message BetweenFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BetweenFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fromValue != null && Object.hasOwnProperty.call(message, "fromValue")) + $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.encode(message.fromValue, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.toValue != null && Object.hasOwnProperty.call(message, "toValue")) + $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.encode(message.toValue, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BetweenFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter} message BetweenFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BetweenFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter} BetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BetweenFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.fromValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.decode(reader, reader.uint32()); + break; + } + case 2: { + message.toValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter} BetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BetweenFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BetweenFilter message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BetweenFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fromValue != null && message.hasOwnProperty("fromValue")) { + var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify(message.fromValue); + if (error) + return "fromValue." + error; + } + if (message.toValue != null && message.hasOwnProperty("toValue")) { + var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify(message.toValue); + if (error) + return "toValue." + error; + } + return null; + }; + + /** + * Creates a BetweenFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter} BetweenFilter + */ + BetweenFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter(); + if (object.fromValue != null) { + if (typeof object.fromValue !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.fromValue: object expected"); + message.fromValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.fromObject(object.fromValue); + } + if (object.toValue != null) { + if (typeof object.toValue !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.toValue: object expected"); + message.toValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.fromObject(object.toValue); + } + return message; + }; + + /** + * Creates a plain object from a BetweenFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter} message BetweenFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BetweenFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fromValue = null; + object.toValue = null; + } + if (message.fromValue != null && message.hasOwnProperty("fromValue")) + object.fromValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.toObject(message.fromValue, options); + if (message.toValue != null && message.hasOwnProperty("toValue")) + object.toValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.toObject(message.toValue, options); + return object; + }; + + /** + * Converts this BetweenFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @instance + * @returns {Object.} JSON object + */ + BetweenFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BetweenFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BetweenFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter"; + }; + + return BetweenFilter; + })(); + + return AudienceDimensionOrMetricFilter; + })(); + + v1alpha.AudienceEventFilter = (function() { /** - * AccountSummary account. - * @member {string} account - * @memberof google.analytics.admin.v1alpha.AccountSummary - * @instance + * Properties of an AudienceEventFilter. + * @memberof google.analytics.admin.v1alpha + * @interface IAudienceEventFilter + * @property {string|null} [eventName] AudienceEventFilter eventName + * @property {google.analytics.admin.v1alpha.IAudienceFilterExpression|null} [eventParameterFilterExpression] AudienceEventFilter eventParameterFilterExpression */ - AccountSummary.prototype.account = ""; /** - * AccountSummary displayName. - * @member {string} displayName - * @memberof google.analytics.admin.v1alpha.AccountSummary + * Constructs a new AudienceEventFilter. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AudienceEventFilter. + * @implements IAudienceEventFilter + * @constructor + * @param {google.analytics.admin.v1alpha.IAudienceEventFilter=} [properties] Properties to set + */ + function AudienceEventFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AudienceEventFilter eventName. + * @member {string} eventName + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter * @instance */ - AccountSummary.prototype.displayName = ""; + AudienceEventFilter.prototype.eventName = ""; /** - * AccountSummary propertySummaries. - * @member {Array.} propertySummaries - * @memberof google.analytics.admin.v1alpha.AccountSummary + * AudienceEventFilter eventParameterFilterExpression. + * @member {google.analytics.admin.v1alpha.IAudienceFilterExpression|null|undefined} eventParameterFilterExpression + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter * @instance */ - AccountSummary.prototype.propertySummaries = $util.emptyArray; + AudienceEventFilter.prototype.eventParameterFilterExpression = null; /** - * Creates a new AccountSummary instance using the specified properties. + * Creates a new AudienceEventFilter instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.AccountSummary + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter * @static - * @param {google.analytics.admin.v1alpha.IAccountSummary=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AccountSummary} AccountSummary instance + * @param {google.analytics.admin.v1alpha.IAudienceEventFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceEventFilter} AudienceEventFilter instance */ - AccountSummary.create = function create(properties) { - return new AccountSummary(properties); + AudienceEventFilter.create = function create(properties) { + return new AudienceEventFilter(properties); }; /** - * Encodes the specified AccountSummary message. Does not implicitly {@link google.analytics.admin.v1alpha.AccountSummary.verify|verify} messages. + * Encodes the specified AudienceEventFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventFilter.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.AccountSummary + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter * @static - * @param {google.analytics.admin.v1alpha.IAccountSummary} message AccountSummary message or plain object to encode + * @param {google.analytics.admin.v1alpha.IAudienceEventFilter} message AudienceEventFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AccountSummary.encode = function encode(message, writer) { + AudienceEventFilter.encode = function encode(message, writer) { 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.account != null && Object.hasOwnProperty.call(message, "account")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.account); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); - if (message.propertySummaries != null && message.propertySummaries.length) - for (var i = 0; i < message.propertySummaries.length; ++i) - $root.google.analytics.admin.v1alpha.PropertySummary.encode(message.propertySummaries[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.eventName != null && Object.hasOwnProperty.call(message, "eventName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventName); + if (message.eventParameterFilterExpression != null && Object.hasOwnProperty.call(message, "eventParameterFilterExpression")) + $root.google.analytics.admin.v1alpha.AudienceFilterExpression.encode(message.eventParameterFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified AccountSummary message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccountSummary.verify|verify} messages. + * Encodes the specified AudienceEventFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventFilter.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AccountSummary + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter * @static - * @param {google.analytics.admin.v1alpha.IAccountSummary} message AccountSummary message or plain object to encode + * @param {google.analytics.admin.v1alpha.IAudienceEventFilter} message AudienceEventFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AccountSummary.encodeDelimited = function encodeDelimited(message, writer) { + AudienceEventFilter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AccountSummary message from the specified reader or buffer. + * Decodes an AudienceEventFilter message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.AccountSummary + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.AccountSummary} AccountSummary + * @returns {google.analytics.admin.v1alpha.AudienceEventFilter} AudienceEventFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AccountSummary.decode = function decode(reader, length) { + AudienceEventFilter.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AccountSummary(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceEventFilter(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.eventName = reader.string(); break; } case 2: { - message.account = reader.string(); - break; - } - case 3: { - message.displayName = reader.string(); - break; - } - case 4: { - if (!(message.propertySummaries && message.propertySummaries.length)) - message.propertySummaries = []; - message.propertySummaries.push($root.google.analytics.admin.v1alpha.PropertySummary.decode(reader, reader.uint32())); + message.eventParameterFilterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.decode(reader, reader.uint32()); break; } default: @@ -44082,168 +41974,140 @@ }; /** - * Decodes an AccountSummary message from the specified reader or buffer, length delimited. + * Decodes an AudienceEventFilter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AccountSummary + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AccountSummary} AccountSummary + * @returns {google.analytics.admin.v1alpha.AudienceEventFilter} AudienceEventFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AccountSummary.decodeDelimited = function decodeDelimited(reader) { + AudienceEventFilter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AccountSummary message. + * Verifies an AudienceEventFilter message. * @function verify - * @memberof google.analytics.admin.v1alpha.AccountSummary + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AccountSummary.verify = function verify(message) { + AudienceEventFilter.verify = function verify(message) { if (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.account != null && message.hasOwnProperty("account")) - if (!$util.isString(message.account)) - return "account: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.propertySummaries != null && message.hasOwnProperty("propertySummaries")) { - if (!Array.isArray(message.propertySummaries)) - return "propertySummaries: array expected"; - for (var i = 0; i < message.propertySummaries.length; ++i) { - var error = $root.google.analytics.admin.v1alpha.PropertySummary.verify(message.propertySummaries[i]); - if (error) - return "propertySummaries." + error; - } + if (message.eventName != null && message.hasOwnProperty("eventName")) + if (!$util.isString(message.eventName)) + return "eventName: string expected"; + if (message.eventParameterFilterExpression != null && message.hasOwnProperty("eventParameterFilterExpression")) { + var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.verify(message.eventParameterFilterExpression); + if (error) + return "eventParameterFilterExpression." + error; } return null; }; /** - * Creates an AccountSummary message from a plain object. Also converts values to their respective internal types. + * Creates an AudienceEventFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.AccountSummary + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AccountSummary} AccountSummary + * @returns {google.analytics.admin.v1alpha.AudienceEventFilter} AudienceEventFilter */ - AccountSummary.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AccountSummary) + AudienceEventFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceEventFilter) return object; - var message = new $root.google.analytics.admin.v1alpha.AccountSummary(); - if (object.name != null) - message.name = String(object.name); - if (object.account != null) - message.account = String(object.account); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.propertySummaries) { - if (!Array.isArray(object.propertySummaries)) - throw TypeError(".google.analytics.admin.v1alpha.AccountSummary.propertySummaries: array expected"); - message.propertySummaries = []; - for (var i = 0; i < object.propertySummaries.length; ++i) { - if (typeof object.propertySummaries[i] !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AccountSummary.propertySummaries: object expected"); - message.propertySummaries[i] = $root.google.analytics.admin.v1alpha.PropertySummary.fromObject(object.propertySummaries[i]); - } + var message = new $root.google.analytics.admin.v1alpha.AudienceEventFilter(); + if (object.eventName != null) + message.eventName = String(object.eventName); + if (object.eventParameterFilterExpression != null) { + if (typeof object.eventParameterFilterExpression !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceEventFilter.eventParameterFilterExpression: object expected"); + message.eventParameterFilterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.fromObject(object.eventParameterFilterExpression); } return message; }; /** - * Creates a plain object from an AccountSummary message. Also converts values to other types if specified. + * Creates a plain object from an AudienceEventFilter message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.AccountSummary + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter * @static - * @param {google.analytics.admin.v1alpha.AccountSummary} message AccountSummary + * @param {google.analytics.admin.v1alpha.AudienceEventFilter} message AudienceEventFilter * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AccountSummary.toObject = function toObject(message, options) { + AudienceEventFilter.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.propertySummaries = []; if (options.defaults) { - object.name = ""; - object.account = ""; - object.displayName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.account != null && message.hasOwnProperty("account")) - object.account = message.account; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.propertySummaries && message.propertySummaries.length) { - object.propertySummaries = []; - for (var j = 0; j < message.propertySummaries.length; ++j) - object.propertySummaries[j] = $root.google.analytics.admin.v1alpha.PropertySummary.toObject(message.propertySummaries[j], options); + object.eventName = ""; + object.eventParameterFilterExpression = null; } + if (message.eventName != null && message.hasOwnProperty("eventName")) + object.eventName = message.eventName; + if (message.eventParameterFilterExpression != null && message.hasOwnProperty("eventParameterFilterExpression")) + object.eventParameterFilterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.toObject(message.eventParameterFilterExpression, options); return object; }; /** - * Converts this AccountSummary to JSON. + * Converts this AudienceEventFilter to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.AccountSummary + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter * @instance * @returns {Object.} JSON object */ - AccountSummary.prototype.toJSON = function toJSON() { + AudienceEventFilter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AccountSummary + * Gets the default type url for AudienceEventFilter * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AccountSummary + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AccountSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AudienceEventFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AccountSummary"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceEventFilter"; }; - return AccountSummary; + return AudienceEventFilter; })(); - v1alpha.PropertySummary = (function() { + v1alpha.AudienceFilterExpression = (function() { /** - * Properties of a PropertySummary. + * Properties of an AudienceFilterExpression. * @memberof google.analytics.admin.v1alpha - * @interface IPropertySummary - * @property {string|null} [property] PropertySummary property - * @property {string|null} [displayName] PropertySummary displayName - * @property {google.analytics.admin.v1alpha.PropertyType|null} [propertyType] PropertySummary propertyType - * @property {string|null} [parent] PropertySummary parent + * @interface IAudienceFilterExpression + * @property {google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null} [andGroup] AudienceFilterExpression andGroup + * @property {google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null} [orGroup] AudienceFilterExpression orGroup + * @property {google.analytics.admin.v1alpha.IAudienceFilterExpression|null} [notExpression] AudienceFilterExpression notExpression + * @property {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter|null} [dimensionOrMetricFilter] AudienceFilterExpression dimensionOrMetricFilter + * @property {google.analytics.admin.v1alpha.IAudienceEventFilter|null} [eventFilter] AudienceFilterExpression eventFilter */ /** - * Constructs a new PropertySummary. + * Constructs a new AudienceFilterExpression. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a PropertySummary. - * @implements IPropertySummary + * @classdesc Represents an AudienceFilterExpression. + * @implements IAudienceFilterExpression * @constructor - * @param {google.analytics.admin.v1alpha.IPropertySummary=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IAudienceFilterExpression=} [properties] Properties to set */ - function PropertySummary(properties) { + function AudienceFilterExpression(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44251,117 +42115,145 @@ } /** - * PropertySummary property. - * @member {string} property - * @memberof google.analytics.admin.v1alpha.PropertySummary + * AudienceFilterExpression andGroup. + * @member {google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null|undefined} andGroup + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression * @instance */ - PropertySummary.prototype.property = ""; + AudienceFilterExpression.prototype.andGroup = null; /** - * PropertySummary displayName. - * @member {string} displayName - * @memberof google.analytics.admin.v1alpha.PropertySummary + * AudienceFilterExpression orGroup. + * @member {google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null|undefined} orGroup + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression * @instance */ - PropertySummary.prototype.displayName = ""; + AudienceFilterExpression.prototype.orGroup = null; /** - * PropertySummary propertyType. - * @member {google.analytics.admin.v1alpha.PropertyType} propertyType - * @memberof google.analytics.admin.v1alpha.PropertySummary + * AudienceFilterExpression notExpression. + * @member {google.analytics.admin.v1alpha.IAudienceFilterExpression|null|undefined} notExpression + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression * @instance */ - PropertySummary.prototype.propertyType = 0; + AudienceFilterExpression.prototype.notExpression = null; /** - * PropertySummary parent. - * @member {string} parent - * @memberof google.analytics.admin.v1alpha.PropertySummary + * AudienceFilterExpression dimensionOrMetricFilter. + * @member {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter|null|undefined} dimensionOrMetricFilter + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression * @instance */ - PropertySummary.prototype.parent = ""; + AudienceFilterExpression.prototype.dimensionOrMetricFilter = null; /** - * Creates a new PropertySummary instance using the specified properties. - * @function create - * @memberof google.analytics.admin.v1alpha.PropertySummary - * @static - * @param {google.analytics.admin.v1alpha.IPropertySummary=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.PropertySummary} PropertySummary instance + * AudienceFilterExpression eventFilter. + * @member {google.analytics.admin.v1alpha.IAudienceEventFilter|null|undefined} eventFilter + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @instance */ - PropertySummary.create = function create(properties) { - return new PropertySummary(properties); - }; + AudienceFilterExpression.prototype.eventFilter = null; - /** - * Encodes the specified PropertySummary message. Does not implicitly {@link google.analytics.admin.v1alpha.PropertySummary.verify|verify} messages. + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AudienceFilterExpression expr. + * @member {"andGroup"|"orGroup"|"notExpression"|"dimensionOrMetricFilter"|"eventFilter"|undefined} expr + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @instance + */ + Object.defineProperty(AudienceFilterExpression.prototype, "expr", { + get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "dimensionOrMetricFilter", "eventFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AudienceFilterExpression instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @static + * @param {google.analytics.admin.v1alpha.IAudienceFilterExpression=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceFilterExpression} AudienceFilterExpression instance + */ + AudienceFilterExpression.create = function create(properties) { + return new AudienceFilterExpression(properties); + }; + + /** + * Encodes the specified AudienceFilterExpression message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpression.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.PropertySummary + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression * @static - * @param {google.analytics.admin.v1alpha.IPropertySummary} message PropertySummary message or plain object to encode + * @param {google.analytics.admin.v1alpha.IAudienceFilterExpression} message AudienceFilterExpression message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PropertySummary.encode = function encode(message, writer) { + AudienceFilterExpression.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.property != null && Object.hasOwnProperty.call(message, "property")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.propertyType != null && Object.hasOwnProperty.call(message, "propertyType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.propertyType); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.parent); + if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) + $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) + $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) + $root.google.analytics.admin.v1alpha.AudienceFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dimensionOrMetricFilter != null && Object.hasOwnProperty.call(message, "dimensionOrMetricFilter")) + $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.encode(message.dimensionOrMetricFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.eventFilter != null && Object.hasOwnProperty.call(message, "eventFilter")) + $root.google.analytics.admin.v1alpha.AudienceEventFilter.encode(message.eventFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified PropertySummary message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.PropertySummary.verify|verify} messages. + * Encodes the specified AudienceFilterExpression message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpression.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.PropertySummary + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression * @static - * @param {google.analytics.admin.v1alpha.IPropertySummary} message PropertySummary message or plain object to encode + * @param {google.analytics.admin.v1alpha.IAudienceFilterExpression} message AudienceFilterExpression message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PropertySummary.encodeDelimited = function encodeDelimited(message, writer) { + AudienceFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PropertySummary message from the specified reader or buffer. + * Decodes an AudienceFilterExpression message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.PropertySummary + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.PropertySummary} PropertySummary + * @returns {google.analytics.admin.v1alpha.AudienceFilterExpression} AudienceFilterExpression * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PropertySummary.decode = function decode(reader, length) { + AudienceFilterExpression.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.PropertySummary(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceFilterExpression(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.property = reader.string(); + message.andGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.decode(reader, reader.uint32()); break; } case 2: { - message.displayName = reader.string(); + message.orGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.decode(reader, reader.uint32()); break; } case 3: { - message.propertyType = reader.int32(); + message.notExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.decode(reader, reader.uint32()); break; } case 4: { - message.parent = reader.string(); + message.dimensionOrMetricFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.eventFilter = $root.google.analytics.admin.v1alpha.AudienceEventFilter.decode(reader, reader.uint32()); break; } default: @@ -44373,178 +42265,213 @@ }; /** - * Decodes a PropertySummary message from the specified reader or buffer, length delimited. + * Decodes an AudienceFilterExpression message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.PropertySummary + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.PropertySummary} PropertySummary + * @returns {google.analytics.admin.v1alpha.AudienceFilterExpression} AudienceFilterExpression * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PropertySummary.decodeDelimited = function decodeDelimited(reader) { + AudienceFilterExpression.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PropertySummary message. + * Verifies an AudienceFilterExpression message. * @function verify - * @memberof google.analytics.admin.v1alpha.PropertySummary + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PropertySummary.verify = function verify(message) { + AudienceFilterExpression.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.property != null && message.hasOwnProperty("property")) - if (!$util.isString(message.property)) - return "property: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.propertyType != null && message.hasOwnProperty("propertyType")) - switch (message.propertyType) { - default: - return "propertyType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; + var properties = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + properties.expr = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify(message.andGroup); + if (error) + return "andGroup." + error; } - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify(message.orGroup); + if (error) + return "orGroup." + error; + } + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.verify(message.notExpression); + if (error) + return "notExpression." + error; + } + } + if (message.dimensionOrMetricFilter != null && message.hasOwnProperty("dimensionOrMetricFilter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.verify(message.dimensionOrMetricFilter); + if (error) + return "dimensionOrMetricFilter." + error; + } + } + if (message.eventFilter != null && message.hasOwnProperty("eventFilter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceEventFilter.verify(message.eventFilter); + if (error) + return "eventFilter." + error; + } + } return null; }; /** - * Creates a PropertySummary message from a plain object. Also converts values to their respective internal types. + * Creates an AudienceFilterExpression message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.PropertySummary + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.PropertySummary} PropertySummary + * @returns {google.analytics.admin.v1alpha.AudienceFilterExpression} AudienceFilterExpression */ - PropertySummary.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.PropertySummary) + AudienceFilterExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceFilterExpression) return object; - var message = new $root.google.analytics.admin.v1alpha.PropertySummary(); - if (object.property != null) - message.property = String(object.property); - if (object.displayName != null) - message.displayName = String(object.displayName); - switch (object.propertyType) { - default: - if (typeof object.propertyType === "number") { - message.propertyType = object.propertyType; - break; - } - break; - case "PROPERTY_TYPE_UNSPECIFIED": - case 0: - message.propertyType = 0; - break; - case "PROPERTY_TYPE_ORDINARY": - case 1: - message.propertyType = 1; - break; - case "PROPERTY_TYPE_SUBPROPERTY": - case 2: - message.propertyType = 2; - break; - case "PROPERTY_TYPE_ROLLUP": - case 3: - message.propertyType = 3; - break; + var message = new $root.google.analytics.admin.v1alpha.AudienceFilterExpression(); + if (object.andGroup != null) { + if (typeof object.andGroup !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpression.andGroup: object expected"); + message.andGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.fromObject(object.andGroup); + } + if (object.orGroup != null) { + if (typeof object.orGroup !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpression.orGroup: object expected"); + message.orGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.fromObject(object.orGroup); + } + if (object.notExpression != null) { + if (typeof object.notExpression !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpression.notExpression: object expected"); + message.notExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.fromObject(object.notExpression); + } + if (object.dimensionOrMetricFilter != null) { + if (typeof object.dimensionOrMetricFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpression.dimensionOrMetricFilter: object expected"); + message.dimensionOrMetricFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.fromObject(object.dimensionOrMetricFilter); + } + if (object.eventFilter != null) { + if (typeof object.eventFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpression.eventFilter: object expected"); + message.eventFilter = $root.google.analytics.admin.v1alpha.AudienceEventFilter.fromObject(object.eventFilter); } - if (object.parent != null) - message.parent = String(object.parent); return message; }; /** - * Creates a plain object from a PropertySummary message. Also converts values to other types if specified. + * Creates a plain object from an AudienceFilterExpression message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.PropertySummary + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression * @static - * @param {google.analytics.admin.v1alpha.PropertySummary} message PropertySummary + * @param {google.analytics.admin.v1alpha.AudienceFilterExpression} message AudienceFilterExpression * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PropertySummary.toObject = function toObject(message, options) { + AudienceFilterExpression.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.property = ""; - object.displayName = ""; - object.propertyType = options.enums === String ? "PROPERTY_TYPE_UNSPECIFIED" : 0; - object.parent = ""; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + object.andGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.toObject(message.andGroup, options); + if (options.oneofs) + object.expr = "andGroup"; + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + object.orGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.toObject(message.orGroup, options); + if (options.oneofs) + object.expr = "orGroup"; + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + object.notExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.toObject(message.notExpression, options); + if (options.oneofs) + object.expr = "notExpression"; + } + if (message.dimensionOrMetricFilter != null && message.hasOwnProperty("dimensionOrMetricFilter")) { + object.dimensionOrMetricFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.toObject(message.dimensionOrMetricFilter, options); + if (options.oneofs) + object.expr = "dimensionOrMetricFilter"; + } + if (message.eventFilter != null && message.hasOwnProperty("eventFilter")) { + object.eventFilter = $root.google.analytics.admin.v1alpha.AudienceEventFilter.toObject(message.eventFilter, options); + if (options.oneofs) + object.expr = "eventFilter"; } - if (message.property != null && message.hasOwnProperty("property")) - object.property = message.property; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.propertyType != null && message.hasOwnProperty("propertyType")) - object.propertyType = options.enums === String ? $root.google.analytics.admin.v1alpha.PropertyType[message.propertyType] === undefined ? message.propertyType : $root.google.analytics.admin.v1alpha.PropertyType[message.propertyType] : message.propertyType; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; return object; }; /** - * Converts this PropertySummary to JSON. + * Converts this AudienceFilterExpression to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.PropertySummary + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression * @instance * @returns {Object.} JSON object */ - PropertySummary.prototype.toJSON = function toJSON() { + AudienceFilterExpression.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PropertySummary + * Gets the default type url for AudienceFilterExpression * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.PropertySummary + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PropertySummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AudienceFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.PropertySummary"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceFilterExpression"; }; - return PropertySummary; + return AudienceFilterExpression; })(); - v1alpha.MeasurementProtocolSecret = (function() { + v1alpha.AudienceFilterExpressionList = (function() { /** - * Properties of a MeasurementProtocolSecret. + * Properties of an AudienceFilterExpressionList. * @memberof google.analytics.admin.v1alpha - * @interface IMeasurementProtocolSecret - * @property {string|null} [name] MeasurementProtocolSecret name - * @property {string|null} [displayName] MeasurementProtocolSecret displayName - * @property {string|null} [secretValue] MeasurementProtocolSecret secretValue + * @interface IAudienceFilterExpressionList + * @property {Array.|null} [filterExpressions] AudienceFilterExpressionList filterExpressions */ /** - * Constructs a new MeasurementProtocolSecret. + * Constructs a new AudienceFilterExpressionList. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a MeasurementProtocolSecret. - * @implements IMeasurementProtocolSecret + * @classdesc Represents an AudienceFilterExpressionList. + * @implements IAudienceFilterExpressionList * @constructor - * @param {google.analytics.admin.v1alpha.IMeasurementProtocolSecret=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IAudienceFilterExpressionList=} [properties] Properties to set */ - function MeasurementProtocolSecret(properties) { + function AudienceFilterExpressionList(properties) { + this.filterExpressions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44552,103 +42479,78 @@ } /** - * MeasurementProtocolSecret name. - * @member {string} name - * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret - * @instance - */ - MeasurementProtocolSecret.prototype.name = ""; - - /** - * MeasurementProtocolSecret displayName. - * @member {string} displayName - * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret - * @instance - */ - MeasurementProtocolSecret.prototype.displayName = ""; - - /** - * MeasurementProtocolSecret secretValue. - * @member {string} secretValue - * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * AudienceFilterExpressionList filterExpressions. + * @member {Array.} filterExpressions + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList * @instance */ - MeasurementProtocolSecret.prototype.secretValue = ""; + AudienceFilterExpressionList.prototype.filterExpressions = $util.emptyArray; /** - * Creates a new MeasurementProtocolSecret instance using the specified properties. + * Creates a new AudienceFilterExpressionList instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList * @static - * @param {google.analytics.admin.v1alpha.IMeasurementProtocolSecret=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.MeasurementProtocolSecret} MeasurementProtocolSecret instance + * @param {google.analytics.admin.v1alpha.IAudienceFilterExpressionList=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceFilterExpressionList} AudienceFilterExpressionList instance */ - MeasurementProtocolSecret.create = function create(properties) { - return new MeasurementProtocolSecret(properties); + AudienceFilterExpressionList.create = function create(properties) { + return new AudienceFilterExpressionList(properties); }; /** - * Encodes the specified MeasurementProtocolSecret message. Does not implicitly {@link google.analytics.admin.v1alpha.MeasurementProtocolSecret.verify|verify} messages. + * Encodes the specified AudienceFilterExpressionList message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList * @static - * @param {google.analytics.admin.v1alpha.IMeasurementProtocolSecret} message MeasurementProtocolSecret message or plain object to encode + * @param {google.analytics.admin.v1alpha.IAudienceFilterExpressionList} message AudienceFilterExpressionList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MeasurementProtocolSecret.encode = function encode(message, writer) { + AudienceFilterExpressionList.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.secretValue != null && Object.hasOwnProperty.call(message, "secretValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.secretValue); + if (message.filterExpressions != null && message.filterExpressions.length) + for (var i = 0; i < message.filterExpressions.length; ++i) + $root.google.analytics.admin.v1alpha.AudienceFilterExpression.encode(message.filterExpressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified MeasurementProtocolSecret message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.MeasurementProtocolSecret.verify|verify} messages. + * Encodes the specified AudienceFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList * @static - * @param {google.analytics.admin.v1alpha.IMeasurementProtocolSecret} message MeasurementProtocolSecret message or plain object to encode + * @param {google.analytics.admin.v1alpha.IAudienceFilterExpressionList} message AudienceFilterExpressionList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MeasurementProtocolSecret.encodeDelimited = function encodeDelimited(message, writer) { + AudienceFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MeasurementProtocolSecret message from the specified reader or buffer. + * Decodes an AudienceFilterExpressionList message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.MeasurementProtocolSecret} MeasurementProtocolSecret + * @returns {google.analytics.admin.v1alpha.AudienceFilterExpressionList} AudienceFilterExpressionList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MeasurementProtocolSecret.decode = function decode(reader, length) { + AudienceFilterExpressionList.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.secretValue = reader.string(); + if (!(message.filterExpressions && message.filterExpressions.length)) + message.filterExpressions = []; + message.filterExpressions.push($root.google.analytics.admin.v1alpha.AudienceFilterExpression.decode(reader, reader.uint32())); break; } default: @@ -44660,145 +42562,140 @@ }; /** - * Decodes a MeasurementProtocolSecret message from the specified reader or buffer, length delimited. + * Decodes an AudienceFilterExpressionList message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.MeasurementProtocolSecret} MeasurementProtocolSecret + * @returns {google.analytics.admin.v1alpha.AudienceFilterExpressionList} AudienceFilterExpressionList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MeasurementProtocolSecret.decodeDelimited = function decodeDelimited(reader) { + AudienceFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MeasurementProtocolSecret message. + * Verifies an AudienceFilterExpressionList message. * @function verify - * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MeasurementProtocolSecret.verify = function verify(message) { + AudienceFilterExpressionList.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.secretValue != null && message.hasOwnProperty("secretValue")) - if (!$util.isString(message.secretValue)) - return "secretValue: string expected"; + if (message.filterExpressions != null && message.hasOwnProperty("filterExpressions")) { + if (!Array.isArray(message.filterExpressions)) + return "filterExpressions: array expected"; + for (var i = 0; i < message.filterExpressions.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.verify(message.filterExpressions[i]); + if (error) + return "filterExpressions." + error; + } + } return null; }; /** - * Creates a MeasurementProtocolSecret message from a plain object. Also converts values to their respective internal types. + * Creates an AudienceFilterExpressionList message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.MeasurementProtocolSecret} MeasurementProtocolSecret + * @returns {google.analytics.admin.v1alpha.AudienceFilterExpressionList} AudienceFilterExpressionList */ - MeasurementProtocolSecret.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret) + AudienceFilterExpressionList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList) return object; - var message = new $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.secretValue != null) - message.secretValue = String(object.secretValue); + var message = new $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList(); + if (object.filterExpressions) { + if (!Array.isArray(object.filterExpressions)) + throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpressionList.filterExpressions: array expected"); + message.filterExpressions = []; + for (var i = 0; i < object.filterExpressions.length; ++i) { + if (typeof object.filterExpressions[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpressionList.filterExpressions: object expected"); + message.filterExpressions[i] = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.fromObject(object.filterExpressions[i]); + } + } return message; }; /** - * Creates a plain object from a MeasurementProtocolSecret message. Also converts values to other types if specified. + * Creates a plain object from an AudienceFilterExpressionList message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList * @static - * @param {google.analytics.admin.v1alpha.MeasurementProtocolSecret} message MeasurementProtocolSecret + * @param {google.analytics.admin.v1alpha.AudienceFilterExpressionList} message AudienceFilterExpressionList * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MeasurementProtocolSecret.toObject = function toObject(message, options) { + AudienceFilterExpressionList.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.secretValue = ""; + if (options.arrays || options.defaults) + object.filterExpressions = []; + if (message.filterExpressions && message.filterExpressions.length) { + object.filterExpressions = []; + for (var j = 0; j < message.filterExpressions.length; ++j) + object.filterExpressions[j] = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.toObject(message.filterExpressions[j], options); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.secretValue != null && message.hasOwnProperty("secretValue")) - object.secretValue = message.secretValue; return object; }; /** - * Converts this MeasurementProtocolSecret to JSON. + * Converts this AudienceFilterExpressionList to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList * @instance * @returns {Object.} JSON object */ - MeasurementProtocolSecret.prototype.toJSON = function toJSON() { + AudienceFilterExpressionList.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MeasurementProtocolSecret + * Gets the default type url for AudienceFilterExpressionList * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MeasurementProtocolSecret.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AudienceFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.MeasurementProtocolSecret"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceFilterExpressionList"; }; - return MeasurementProtocolSecret; + return AudienceFilterExpressionList; })(); - v1alpha.ChangeHistoryEvent = (function() { + v1alpha.AudienceSimpleFilter = (function() { /** - * Properties of a ChangeHistoryEvent. + * Properties of an AudienceSimpleFilter. * @memberof google.analytics.admin.v1alpha - * @interface IChangeHistoryEvent - * @property {string|null} [id] ChangeHistoryEvent id - * @property {google.protobuf.ITimestamp|null} [changeTime] ChangeHistoryEvent changeTime - * @property {google.analytics.admin.v1alpha.ActorType|null} [actorType] ChangeHistoryEvent actorType - * @property {string|null} [userActorEmail] ChangeHistoryEvent userActorEmail - * @property {boolean|null} [changesFiltered] ChangeHistoryEvent changesFiltered - * @property {Array.|null} [changes] ChangeHistoryEvent changes + * @interface IAudienceSimpleFilter + * @property {google.analytics.admin.v1alpha.AudienceFilterScope|null} [scope] AudienceSimpleFilter scope + * @property {google.analytics.admin.v1alpha.IAudienceFilterExpression|null} [filterExpression] AudienceSimpleFilter filterExpression */ /** - * Constructs a new ChangeHistoryEvent. + * Constructs a new AudienceSimpleFilter. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a ChangeHistoryEvent. - * @implements IChangeHistoryEvent - * @constructor - * @param {google.analytics.admin.v1alpha.IChangeHistoryEvent=} [properties] Properties to set + * @classdesc Represents an AudienceSimpleFilter. + * @implements IAudienceSimpleFilter + * @constructor + * @param {google.analytics.admin.v1alpha.IAudienceSimpleFilter=} [properties] Properties to set */ - function ChangeHistoryEvent(properties) { - this.changes = []; + function AudienceSimpleFilter(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44806,148 +42703,89 @@ } /** - * ChangeHistoryEvent id. - * @member {string} id - * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent - * @instance - */ - ChangeHistoryEvent.prototype.id = ""; - - /** - * ChangeHistoryEvent changeTime. - * @member {google.protobuf.ITimestamp|null|undefined} changeTime - * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent - * @instance - */ - ChangeHistoryEvent.prototype.changeTime = null; - - /** - * ChangeHistoryEvent actorType. - * @member {google.analytics.admin.v1alpha.ActorType} actorType - * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent - * @instance - */ - ChangeHistoryEvent.prototype.actorType = 0; - - /** - * ChangeHistoryEvent userActorEmail. - * @member {string} userActorEmail - * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent - * @instance - */ - ChangeHistoryEvent.prototype.userActorEmail = ""; - - /** - * ChangeHistoryEvent changesFiltered. - * @member {boolean} changesFiltered - * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * AudienceSimpleFilter scope. + * @member {google.analytics.admin.v1alpha.AudienceFilterScope} scope + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter * @instance */ - ChangeHistoryEvent.prototype.changesFiltered = false; + AudienceSimpleFilter.prototype.scope = 0; /** - * ChangeHistoryEvent changes. - * @member {Array.} changes - * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * AudienceSimpleFilter filterExpression. + * @member {google.analytics.admin.v1alpha.IAudienceFilterExpression|null|undefined} filterExpression + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter * @instance */ - ChangeHistoryEvent.prototype.changes = $util.emptyArray; + AudienceSimpleFilter.prototype.filterExpression = null; /** - * Creates a new ChangeHistoryEvent instance using the specified properties. + * Creates a new AudienceSimpleFilter instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter * @static - * @param {google.analytics.admin.v1alpha.IChangeHistoryEvent=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.ChangeHistoryEvent} ChangeHistoryEvent instance + * @param {google.analytics.admin.v1alpha.IAudienceSimpleFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceSimpleFilter} AudienceSimpleFilter instance */ - ChangeHistoryEvent.create = function create(properties) { - return new ChangeHistoryEvent(properties); + AudienceSimpleFilter.create = function create(properties) { + return new AudienceSimpleFilter(properties); }; /** - * Encodes the specified ChangeHistoryEvent message. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryEvent.verify|verify} messages. + * Encodes the specified AudienceSimpleFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSimpleFilter.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter * @static - * @param {google.analytics.admin.v1alpha.IChangeHistoryEvent} message ChangeHistoryEvent message or plain object to encode + * @param {google.analytics.admin.v1alpha.IAudienceSimpleFilter} message AudienceSimpleFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChangeHistoryEvent.encode = function encode(message, writer) { + AudienceSimpleFilter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.changeTime != null && Object.hasOwnProperty.call(message, "changeTime")) - $root.google.protobuf.Timestamp.encode(message.changeTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.actorType != null && Object.hasOwnProperty.call(message, "actorType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.actorType); - if (message.userActorEmail != null && Object.hasOwnProperty.call(message, "userActorEmail")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.userActorEmail); - if (message.changesFiltered != null && Object.hasOwnProperty.call(message, "changesFiltered")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.changesFiltered); - if (message.changes != null && message.changes.length) - for (var i = 0; i < message.changes.length; ++i) - $root.google.analytics.admin.v1alpha.ChangeHistoryChange.encode(message.changes[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.scope); + if (message.filterExpression != null && Object.hasOwnProperty.call(message, "filterExpression")) + $root.google.analytics.admin.v1alpha.AudienceFilterExpression.encode(message.filterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ChangeHistoryEvent message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryEvent.verify|verify} messages. + * Encodes the specified AudienceSimpleFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSimpleFilter.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter * @static - * @param {google.analytics.admin.v1alpha.IChangeHistoryEvent} message ChangeHistoryEvent message or plain object to encode + * @param {google.analytics.admin.v1alpha.IAudienceSimpleFilter} message AudienceSimpleFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChangeHistoryEvent.encodeDelimited = function encodeDelimited(message, writer) { + AudienceSimpleFilter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ChangeHistoryEvent message from the specified reader or buffer. + * Decodes an AudienceSimpleFilter message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.ChangeHistoryEvent} ChangeHistoryEvent + * @returns {google.analytics.admin.v1alpha.AudienceSimpleFilter} AudienceSimpleFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChangeHistoryEvent.decode = function decode(reader, length) { + AudienceSimpleFilter.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ChangeHistoryEvent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceSimpleFilter(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.id = reader.string(); + message.scope = reader.int32(); break; } case 2: { - message.changeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.actorType = reader.int32(); - break; - } - case 4: { - message.userActorEmail = reader.string(); - break; - } - case 5: { - message.changesFiltered = reader.bool(); - break; - } - case 6: { - if (!(message.changes && message.changes.length)) - message.changes = []; - message.changes.push($root.google.analytics.admin.v1alpha.ChangeHistoryChange.decode(reader, reader.uint32())); + message.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.decode(reader, reader.uint32()); break; } default: @@ -44959,218 +42797,168 @@ }; /** - * Decodes a ChangeHistoryEvent message from the specified reader or buffer, length delimited. + * Decodes an AudienceSimpleFilter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.ChangeHistoryEvent} ChangeHistoryEvent + * @returns {google.analytics.admin.v1alpha.AudienceSimpleFilter} AudienceSimpleFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChangeHistoryEvent.decodeDelimited = function decodeDelimited(reader) { + AudienceSimpleFilter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ChangeHistoryEvent message. + * Verifies an AudienceSimpleFilter message. * @function verify - * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ChangeHistoryEvent.verify = function verify(message) { + AudienceSimpleFilter.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.changeTime != null && message.hasOwnProperty("changeTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.changeTime); - if (error) - return "changeTime." + error; - } - if (message.actorType != null && message.hasOwnProperty("actorType")) - switch (message.actorType) { + if (message.scope != null && message.hasOwnProperty("scope")) + switch (message.scope) { default: - return "actorType: enum value expected"; + return "scope: enum value expected"; case 0: case 1: case 2: case 3: break; } - if (message.userActorEmail != null && message.hasOwnProperty("userActorEmail")) - if (!$util.isString(message.userActorEmail)) - return "userActorEmail: string expected"; - if (message.changesFiltered != null && message.hasOwnProperty("changesFiltered")) - if (typeof message.changesFiltered !== "boolean") - return "changesFiltered: boolean expected"; - if (message.changes != null && message.hasOwnProperty("changes")) { - if (!Array.isArray(message.changes)) - return "changes: array expected"; - for (var i = 0; i < message.changes.length; ++i) { - var error = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.verify(message.changes[i]); - if (error) - return "changes." + error; - } + if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) { + var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.verify(message.filterExpression); + if (error) + return "filterExpression." + error; } return null; }; /** - * Creates a ChangeHistoryEvent message from a plain object. Also converts values to their respective internal types. + * Creates an AudienceSimpleFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.ChangeHistoryEvent} ChangeHistoryEvent + * @returns {google.analytics.admin.v1alpha.AudienceSimpleFilter} AudienceSimpleFilter */ - ChangeHistoryEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.ChangeHistoryEvent) + AudienceSimpleFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceSimpleFilter) return object; - var message = new $root.google.analytics.admin.v1alpha.ChangeHistoryEvent(); - if (object.id != null) - message.id = String(object.id); - if (object.changeTime != null) { - if (typeof object.changeTime !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryEvent.changeTime: object expected"); - message.changeTime = $root.google.protobuf.Timestamp.fromObject(object.changeTime); - } - switch (object.actorType) { + var message = new $root.google.analytics.admin.v1alpha.AudienceSimpleFilter(); + switch (object.scope) { default: - if (typeof object.actorType === "number") { - message.actorType = object.actorType; + if (typeof object.scope === "number") { + message.scope = object.scope; break; } break; - case "ACTOR_TYPE_UNSPECIFIED": + case "AUDIENCE_FILTER_SCOPE_UNSPECIFIED": case 0: - message.actorType = 0; + message.scope = 0; break; - case "USER": + case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT": case 1: - message.actorType = 1; + message.scope = 1; break; - case "SYSTEM": + case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION": case 2: - message.actorType = 2; + message.scope = 2; break; - case "SUPPORT": + case "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS": case 3: - message.actorType = 3; + message.scope = 3; break; } - if (object.userActorEmail != null) - message.userActorEmail = String(object.userActorEmail); - if (object.changesFiltered != null) - message.changesFiltered = Boolean(object.changesFiltered); - if (object.changes) { - if (!Array.isArray(object.changes)) - throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryEvent.changes: array expected"); - message.changes = []; - for (var i = 0; i < object.changes.length; ++i) { - if (typeof object.changes[i] !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryEvent.changes: object expected"); - message.changes[i] = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.fromObject(object.changes[i]); - } + if (object.filterExpression != null) { + if (typeof object.filterExpression !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceSimpleFilter.filterExpression: object expected"); + message.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.fromObject(object.filterExpression); } return message; }; /** - * Creates a plain object from a ChangeHistoryEvent message. Also converts values to other types if specified. + * Creates a plain object from an AudienceSimpleFilter message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter * @static - * @param {google.analytics.admin.v1alpha.ChangeHistoryEvent} message ChangeHistoryEvent + * @param {google.analytics.admin.v1alpha.AudienceSimpleFilter} message AudienceSimpleFilter * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ChangeHistoryEvent.toObject = function toObject(message, options) { + AudienceSimpleFilter.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.changes = []; if (options.defaults) { - object.id = ""; - object.changeTime = null; - object.actorType = options.enums === String ? "ACTOR_TYPE_UNSPECIFIED" : 0; - object.userActorEmail = ""; - object.changesFiltered = false; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.changeTime != null && message.hasOwnProperty("changeTime")) - object.changeTime = $root.google.protobuf.Timestamp.toObject(message.changeTime, options); - if (message.actorType != null && message.hasOwnProperty("actorType")) - object.actorType = options.enums === String ? $root.google.analytics.admin.v1alpha.ActorType[message.actorType] === undefined ? message.actorType : $root.google.analytics.admin.v1alpha.ActorType[message.actorType] : message.actorType; - if (message.userActorEmail != null && message.hasOwnProperty("userActorEmail")) - object.userActorEmail = message.userActorEmail; - if (message.changesFiltered != null && message.hasOwnProperty("changesFiltered")) - object.changesFiltered = message.changesFiltered; - if (message.changes && message.changes.length) { - object.changes = []; - for (var j = 0; j < message.changes.length; ++j) - object.changes[j] = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.toObject(message.changes[j], options); + object.scope = options.enums === String ? "AUDIENCE_FILTER_SCOPE_UNSPECIFIED" : 0; + object.filterExpression = null; } + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] : message.scope; + if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) + object.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.toObject(message.filterExpression, options); return object; }; /** - * Converts this ChangeHistoryEvent to JSON. + * Converts this AudienceSimpleFilter to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter * @instance * @returns {Object.} JSON object */ - ChangeHistoryEvent.prototype.toJSON = function toJSON() { + AudienceSimpleFilter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ChangeHistoryEvent + * Gets the default type url for AudienceSimpleFilter * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ChangeHistoryEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AudienceSimpleFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.ChangeHistoryEvent"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceSimpleFilter"; }; - return ChangeHistoryEvent; + return AudienceSimpleFilter; })(); - v1alpha.ChangeHistoryChange = (function() { + v1alpha.AudienceSequenceFilter = (function() { /** - * Properties of a ChangeHistoryChange. + * Properties of an AudienceSequenceFilter. * @memberof google.analytics.admin.v1alpha - * @interface IChangeHistoryChange - * @property {string|null} [resource] ChangeHistoryChange resource - * @property {google.analytics.admin.v1alpha.ActionType|null} [action] ChangeHistoryChange action - * @property {google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource|null} [resourceBeforeChange] ChangeHistoryChange resourceBeforeChange - * @property {google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource|null} [resourceAfterChange] ChangeHistoryChange resourceAfterChange + * @interface IAudienceSequenceFilter + * @property {google.analytics.admin.v1alpha.AudienceFilterScope|null} [scope] AudienceSequenceFilter scope + * @property {google.protobuf.IDuration|null} [sequenceMaximumDuration] AudienceSequenceFilter sequenceMaximumDuration + * @property {Array.|null} [sequenceSteps] AudienceSequenceFilter sequenceSteps */ /** - * Constructs a new ChangeHistoryChange. + * Constructs a new AudienceSequenceFilter. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a ChangeHistoryChange. - * @implements IChangeHistoryChange + * @classdesc Represents an AudienceSequenceFilter. + * @implements IAudienceSequenceFilter * @constructor - * @param {google.analytics.admin.v1alpha.IChangeHistoryChange=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IAudienceSequenceFilter=} [properties] Properties to set */ - function ChangeHistoryChange(properties) { + function AudienceSequenceFilter(properties) { + this.sequenceSteps = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -45178,117 +42966,106 @@ } /** - * ChangeHistoryChange resource. - * @member {string} resource - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange - * @instance - */ - ChangeHistoryChange.prototype.resource = ""; - - /** - * ChangeHistoryChange action. - * @member {google.analytics.admin.v1alpha.ActionType} action - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * AudienceSequenceFilter scope. + * @member {google.analytics.admin.v1alpha.AudienceFilterScope} scope + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter * @instance */ - ChangeHistoryChange.prototype.action = 0; + AudienceSequenceFilter.prototype.scope = 0; /** - * ChangeHistoryChange resourceBeforeChange. - * @member {google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource|null|undefined} resourceBeforeChange - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * AudienceSequenceFilter sequenceMaximumDuration. + * @member {google.protobuf.IDuration|null|undefined} sequenceMaximumDuration + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter * @instance */ - ChangeHistoryChange.prototype.resourceBeforeChange = null; + AudienceSequenceFilter.prototype.sequenceMaximumDuration = null; /** - * ChangeHistoryChange resourceAfterChange. - * @member {google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource|null|undefined} resourceAfterChange - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * AudienceSequenceFilter sequenceSteps. + * @member {Array.} sequenceSteps + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter * @instance */ - ChangeHistoryChange.prototype.resourceAfterChange = null; + AudienceSequenceFilter.prototype.sequenceSteps = $util.emptyArray; /** - * Creates a new ChangeHistoryChange instance using the specified properties. + * Creates a new AudienceSequenceFilter instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter * @static - * @param {google.analytics.admin.v1alpha.IChangeHistoryChange=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.ChangeHistoryChange} ChangeHistoryChange instance + * @param {google.analytics.admin.v1alpha.IAudienceSequenceFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter} AudienceSequenceFilter instance */ - ChangeHistoryChange.create = function create(properties) { - return new ChangeHistoryChange(properties); + AudienceSequenceFilter.create = function create(properties) { + return new AudienceSequenceFilter(properties); }; /** - * Encodes the specified ChangeHistoryChange message. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryChange.verify|verify} messages. + * Encodes the specified AudienceSequenceFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter * @static - * @param {google.analytics.admin.v1alpha.IChangeHistoryChange} message ChangeHistoryChange message or plain object to encode + * @param {google.analytics.admin.v1alpha.IAudienceSequenceFilter} message AudienceSequenceFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChangeHistoryChange.encode = function encode(message, writer) { + AudienceSequenceFilter.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.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.action); - if (message.resourceBeforeChange != null && Object.hasOwnProperty.call(message, "resourceBeforeChange")) - $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.encode(message.resourceBeforeChange, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.resourceAfterChange != null && Object.hasOwnProperty.call(message, "resourceAfterChange")) - $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.encode(message.resourceAfterChange, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.scope); + if (message.sequenceMaximumDuration != null && Object.hasOwnProperty.call(message, "sequenceMaximumDuration")) + $root.google.protobuf.Duration.encode(message.sequenceMaximumDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sequenceSteps != null && message.sequenceSteps.length) + for (var i = 0; i < message.sequenceSteps.length; ++i) + $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.encode(message.sequenceSteps[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ChangeHistoryChange message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryChange.verify|verify} messages. + * Encodes the specified AudienceSequenceFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter * @static - * @param {google.analytics.admin.v1alpha.IChangeHistoryChange} message ChangeHistoryChange message or plain object to encode + * @param {google.analytics.admin.v1alpha.IAudienceSequenceFilter} message AudienceSequenceFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChangeHistoryChange.encodeDelimited = function encodeDelimited(message, writer) { + AudienceSequenceFilter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ChangeHistoryChange message from the specified reader or buffer. + * Decodes an AudienceSequenceFilter message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.ChangeHistoryChange} ChangeHistoryChange + * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter} AudienceSequenceFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChangeHistoryChange.decode = function decode(reader, length) { + AudienceSequenceFilter.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ChangeHistoryChange(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceSequenceFilter(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.resource = reader.string(); + message.scope = reader.int32(); break; } case 2: { - message.action = reader.int32(); + message.sequenceMaximumDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } case 3: { - message.resourceBeforeChange = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.decode(reader, reader.uint32()); - break; - } - case 4: { - message.resourceAfterChange = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.decode(reader, reader.uint32()); + if (!(message.sequenceSteps && message.sequenceSteps.length)) + message.sequenceSteps = []; + message.sequenceSteps.push($root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.decode(reader, reader.uint32())); break; } default: @@ -45300,199 +43077,191 @@ }; /** - * Decodes a ChangeHistoryChange message from the specified reader or buffer, length delimited. + * Decodes an AudienceSequenceFilter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.ChangeHistoryChange} ChangeHistoryChange + * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter} AudienceSequenceFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChangeHistoryChange.decodeDelimited = function decodeDelimited(reader) { + AudienceSequenceFilter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ChangeHistoryChange message. + * Verifies an AudienceSequenceFilter message. * @function verify - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ChangeHistoryChange.verify = function verify(message) { + AudienceSequenceFilter.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.action != null && message.hasOwnProperty("action")) - switch (message.action) { + if (message.scope != null && message.hasOwnProperty("scope")) + switch (message.scope) { default: - return "action: enum value expected"; + return "scope: enum value expected"; case 0: case 1: case 2: case 3: break; } - if (message.resourceBeforeChange != null && message.hasOwnProperty("resourceBeforeChange")) { - var error = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.verify(message.resourceBeforeChange); + if (message.sequenceMaximumDuration != null && message.hasOwnProperty("sequenceMaximumDuration")) { + var error = $root.google.protobuf.Duration.verify(message.sequenceMaximumDuration); if (error) - return "resourceBeforeChange." + error; + return "sequenceMaximumDuration." + error; } - if (message.resourceAfterChange != null && message.hasOwnProperty("resourceAfterChange")) { - var error = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.verify(message.resourceAfterChange); - if (error) - return "resourceAfterChange." + error; + if (message.sequenceSteps != null && message.hasOwnProperty("sequenceSteps")) { + if (!Array.isArray(message.sequenceSteps)) + return "sequenceSteps: array expected"; + for (var i = 0; i < message.sequenceSteps.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.verify(message.sequenceSteps[i]); + if (error) + return "sequenceSteps." + error; + } } return null; }; /** - * Creates a ChangeHistoryChange message from a plain object. Also converts values to their respective internal types. + * Creates an AudienceSequenceFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.ChangeHistoryChange} ChangeHistoryChange + * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter} AudienceSequenceFilter */ - ChangeHistoryChange.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.ChangeHistoryChange) + AudienceSequenceFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceSequenceFilter) return object; - var message = new $root.google.analytics.admin.v1alpha.ChangeHistoryChange(); - if (object.resource != null) - message.resource = String(object.resource); - switch (object.action) { + var message = new $root.google.analytics.admin.v1alpha.AudienceSequenceFilter(); + switch (object.scope) { default: - if (typeof object.action === "number") { - message.action = object.action; + if (typeof object.scope === "number") { + message.scope = object.scope; break; } break; - case "ACTION_TYPE_UNSPECIFIED": + case "AUDIENCE_FILTER_SCOPE_UNSPECIFIED": case 0: - message.action = 0; + message.scope = 0; break; - case "CREATED": + case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT": case 1: - message.action = 1; + message.scope = 1; break; - case "UPDATED": + case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION": case 2: - message.action = 2; + message.scope = 2; break; - case "DELETED": + case "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS": case 3: - message.action = 3; + message.scope = 3; break; } - if (object.resourceBeforeChange != null) { - if (typeof object.resourceBeforeChange !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.resourceBeforeChange: object expected"); - message.resourceBeforeChange = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.fromObject(object.resourceBeforeChange); + if (object.sequenceMaximumDuration != null) { + if (typeof object.sequenceMaximumDuration !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceSequenceFilter.sequenceMaximumDuration: object expected"); + message.sequenceMaximumDuration = $root.google.protobuf.Duration.fromObject(object.sequenceMaximumDuration); } - if (object.resourceAfterChange != null) { - if (typeof object.resourceAfterChange !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.resourceAfterChange: object expected"); - message.resourceAfterChange = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.fromObject(object.resourceAfterChange); + if (object.sequenceSteps) { + if (!Array.isArray(object.sequenceSteps)) + throw TypeError(".google.analytics.admin.v1alpha.AudienceSequenceFilter.sequenceSteps: array expected"); + message.sequenceSteps = []; + for (var i = 0; i < object.sequenceSteps.length; ++i) { + if (typeof object.sequenceSteps[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceSequenceFilter.sequenceSteps: object expected"); + message.sequenceSteps[i] = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.fromObject(object.sequenceSteps[i]); + } } return message; }; /** - * Creates a plain object from a ChangeHistoryChange message. Also converts values to other types if specified. + * Creates a plain object from an AudienceSequenceFilter message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter * @static - * @param {google.analytics.admin.v1alpha.ChangeHistoryChange} message ChangeHistoryChange + * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter} message AudienceSequenceFilter * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ChangeHistoryChange.toObject = function toObject(message, options) { + AudienceSequenceFilter.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.sequenceSteps = []; if (options.defaults) { - object.resource = ""; - object.action = options.enums === String ? "ACTION_TYPE_UNSPECIFIED" : 0; - object.resourceBeforeChange = null; - object.resourceAfterChange = null; + object.scope = options.enums === String ? "AUDIENCE_FILTER_SCOPE_UNSPECIFIED" : 0; + object.sequenceMaximumDuration = null; + } + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] : message.scope; + if (message.sequenceMaximumDuration != null && message.hasOwnProperty("sequenceMaximumDuration")) + object.sequenceMaximumDuration = $root.google.protobuf.Duration.toObject(message.sequenceMaximumDuration, options); + if (message.sequenceSteps && message.sequenceSteps.length) { + object.sequenceSteps = []; + for (var j = 0; j < message.sequenceSteps.length; ++j) + object.sequenceSteps[j] = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.toObject(message.sequenceSteps[j], options); } - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.action != null && message.hasOwnProperty("action")) - object.action = options.enums === String ? $root.google.analytics.admin.v1alpha.ActionType[message.action] === undefined ? message.action : $root.google.analytics.admin.v1alpha.ActionType[message.action] : message.action; - if (message.resourceBeforeChange != null && message.hasOwnProperty("resourceBeforeChange")) - object.resourceBeforeChange = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.toObject(message.resourceBeforeChange, options); - if (message.resourceAfterChange != null && message.hasOwnProperty("resourceAfterChange")) - object.resourceAfterChange = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.toObject(message.resourceAfterChange, options); return object; }; /** - * Converts this ChangeHistoryChange to JSON. + * Converts this AudienceSequenceFilter to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter * @instance * @returns {Object.} JSON object */ - ChangeHistoryChange.prototype.toJSON = function toJSON() { + AudienceSequenceFilter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ChangeHistoryChange + * Gets the default type url for AudienceSequenceFilter * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ChangeHistoryChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AudienceSequenceFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.ChangeHistoryChange"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceSequenceFilter"; }; - ChangeHistoryChange.ChangeHistoryResource = (function() { + AudienceSequenceFilter.AudienceSequenceStep = (function() { /** - * Properties of a ChangeHistoryResource. - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange - * @interface IChangeHistoryResource - * @property {google.analytics.admin.v1alpha.IAccount|null} [account] ChangeHistoryResource account - * @property {google.analytics.admin.v1alpha.IProperty|null} [property] ChangeHistoryResource property - * @property {google.analytics.admin.v1alpha.IFirebaseLink|null} [firebaseLink] ChangeHistoryResource firebaseLink - * @property {google.analytics.admin.v1alpha.IGoogleAdsLink|null} [googleAdsLink] ChangeHistoryResource googleAdsLink - * @property {google.analytics.admin.v1alpha.IGoogleSignalsSettings|null} [googleSignalsSettings] ChangeHistoryResource googleSignalsSettings - * @property {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink|null} [displayVideo_360AdvertiserLink] ChangeHistoryResource displayVideo_360AdvertiserLink - * @property {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal|null} [displayVideo_360AdvertiserLinkProposal] ChangeHistoryResource displayVideo_360AdvertiserLinkProposal - * @property {google.analytics.admin.v1alpha.IConversionEvent|null} [conversionEvent] ChangeHistoryResource conversionEvent - * @property {google.analytics.admin.v1alpha.IMeasurementProtocolSecret|null} [measurementProtocolSecret] ChangeHistoryResource measurementProtocolSecret - * @property {google.analytics.admin.v1alpha.ICustomDimension|null} [customDimension] ChangeHistoryResource customDimension - * @property {google.analytics.admin.v1alpha.ICustomMetric|null} [customMetric] ChangeHistoryResource customMetric - * @property {google.analytics.admin.v1alpha.IDataRetentionSettings|null} [dataRetentionSettings] ChangeHistoryResource dataRetentionSettings - * @property {google.analytics.admin.v1alpha.ISearchAds360Link|null} [searchAds_360Link] ChangeHistoryResource searchAds_360Link - * @property {google.analytics.admin.v1alpha.IDataStream|null} [dataStream] ChangeHistoryResource dataStream - * @property {google.analytics.admin.v1alpha.IAttributionSettings|null} [attributionSettings] ChangeHistoryResource attributionSettings - * @property {google.analytics.admin.v1alpha.IExpandedDataSet|null} [expandedDataSet] ChangeHistoryResource expandedDataSet - * @property {google.analytics.admin.v1alpha.IBigQueryLink|null} [bigqueryLink] ChangeHistoryResource bigqueryLink + * Properties of an AudienceSequenceStep. + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @interface IAudienceSequenceStep + * @property {google.analytics.admin.v1alpha.AudienceFilterScope|null} [scope] AudienceSequenceStep scope + * @property {boolean|null} [immediatelyFollows] AudienceSequenceStep immediatelyFollows + * @property {google.protobuf.IDuration|null} [constraintDuration] AudienceSequenceStep constraintDuration + * @property {google.analytics.admin.v1alpha.IAudienceFilterExpression|null} [filterExpression] AudienceSequenceStep filterExpression */ /** - * Constructs a new ChangeHistoryResource. - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange - * @classdesc Represents a ChangeHistoryResource. - * @implements IChangeHistoryResource + * Constructs a new AudienceSequenceStep. + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @classdesc Represents an AudienceSequenceStep. + * @implements IAudienceSequenceStep * @constructor - * @param {google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep=} [properties] Properties to set */ - function ChangeHistoryResource(properties) { + function AudienceSequenceStep(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -45500,313 +43269,117 @@ } /** - * ChangeHistoryResource account. - * @member {google.analytics.admin.v1alpha.IAccount|null|undefined} account - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource - * @instance - */ - ChangeHistoryResource.prototype.account = null; - - /** - * ChangeHistoryResource property. - * @member {google.analytics.admin.v1alpha.IProperty|null|undefined} property - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource - * @instance - */ - ChangeHistoryResource.prototype.property = null; - - /** - * ChangeHistoryResource firebaseLink. - * @member {google.analytics.admin.v1alpha.IFirebaseLink|null|undefined} firebaseLink - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource - * @instance - */ - ChangeHistoryResource.prototype.firebaseLink = null; - - /** - * ChangeHistoryResource googleAdsLink. - * @member {google.analytics.admin.v1alpha.IGoogleAdsLink|null|undefined} googleAdsLink - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource - * @instance - */ - ChangeHistoryResource.prototype.googleAdsLink = null; - - /** - * ChangeHistoryResource googleSignalsSettings. - * @member {google.analytics.admin.v1alpha.IGoogleSignalsSettings|null|undefined} googleSignalsSettings - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource - * @instance - */ - ChangeHistoryResource.prototype.googleSignalsSettings = null; - - /** - * ChangeHistoryResource displayVideo_360AdvertiserLink. - * @member {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink|null|undefined} displayVideo_360AdvertiserLink - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource - * @instance - */ - ChangeHistoryResource.prototype.displayVideo_360AdvertiserLink = null; - - /** - * ChangeHistoryResource displayVideo_360AdvertiserLinkProposal. - * @member {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal|null|undefined} displayVideo_360AdvertiserLinkProposal - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource - * @instance - */ - ChangeHistoryResource.prototype.displayVideo_360AdvertiserLinkProposal = null; - - /** - * ChangeHistoryResource conversionEvent. - * @member {google.analytics.admin.v1alpha.IConversionEvent|null|undefined} conversionEvent - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource - * @instance - */ - ChangeHistoryResource.prototype.conversionEvent = null; - - /** - * ChangeHistoryResource measurementProtocolSecret. - * @member {google.analytics.admin.v1alpha.IMeasurementProtocolSecret|null|undefined} measurementProtocolSecret - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource - * @instance - */ - ChangeHistoryResource.prototype.measurementProtocolSecret = null; - - /** - * ChangeHistoryResource customDimension. - * @member {google.analytics.admin.v1alpha.ICustomDimension|null|undefined} customDimension - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource - * @instance - */ - ChangeHistoryResource.prototype.customDimension = null; - - /** - * ChangeHistoryResource customMetric. - * @member {google.analytics.admin.v1alpha.ICustomMetric|null|undefined} customMetric - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource - * @instance - */ - ChangeHistoryResource.prototype.customMetric = null; - - /** - * ChangeHistoryResource dataRetentionSettings. - * @member {google.analytics.admin.v1alpha.IDataRetentionSettings|null|undefined} dataRetentionSettings - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource - * @instance - */ - ChangeHistoryResource.prototype.dataRetentionSettings = null; - - /** - * ChangeHistoryResource searchAds_360Link. - * @member {google.analytics.admin.v1alpha.ISearchAds360Link|null|undefined} searchAds_360Link - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource - * @instance - */ - ChangeHistoryResource.prototype.searchAds_360Link = null; - - /** - * ChangeHistoryResource dataStream. - * @member {google.analytics.admin.v1alpha.IDataStream|null|undefined} dataStream - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource - * @instance - */ - ChangeHistoryResource.prototype.dataStream = null; - - /** - * ChangeHistoryResource attributionSettings. - * @member {google.analytics.admin.v1alpha.IAttributionSettings|null|undefined} attributionSettings - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * AudienceSequenceStep scope. + * @member {google.analytics.admin.v1alpha.AudienceFilterScope} scope + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep * @instance */ - ChangeHistoryResource.prototype.attributionSettings = null; + AudienceSequenceStep.prototype.scope = 0; /** - * ChangeHistoryResource expandedDataSet. - * @member {google.analytics.admin.v1alpha.IExpandedDataSet|null|undefined} expandedDataSet - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * AudienceSequenceStep immediatelyFollows. + * @member {boolean} immediatelyFollows + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep * @instance */ - ChangeHistoryResource.prototype.expandedDataSet = null; + AudienceSequenceStep.prototype.immediatelyFollows = false; /** - * ChangeHistoryResource bigqueryLink. - * @member {google.analytics.admin.v1alpha.IBigQueryLink|null|undefined} bigqueryLink - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * AudienceSequenceStep constraintDuration. + * @member {google.protobuf.IDuration|null|undefined} constraintDuration + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep * @instance */ - ChangeHistoryResource.prototype.bigqueryLink = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + AudienceSequenceStep.prototype.constraintDuration = null; /** - * ChangeHistoryResource resource. - * @member {"account"|"property"|"firebaseLink"|"googleAdsLink"|"googleSignalsSettings"|"displayVideo_360AdvertiserLink"|"displayVideo_360AdvertiserLinkProposal"|"conversionEvent"|"measurementProtocolSecret"|"customDimension"|"customMetric"|"dataRetentionSettings"|"searchAds_360Link"|"dataStream"|"attributionSettings"|"expandedDataSet"|"bigqueryLink"|undefined} resource - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * AudienceSequenceStep filterExpression. + * @member {google.analytics.admin.v1alpha.IAudienceFilterExpression|null|undefined} filterExpression + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep * @instance */ - Object.defineProperty(ChangeHistoryResource.prototype, "resource", { - get: $util.oneOfGetter($oneOfFields = ["account", "property", "firebaseLink", "googleAdsLink", "googleSignalsSettings", "displayVideo_360AdvertiserLink", "displayVideo_360AdvertiserLinkProposal", "conversionEvent", "measurementProtocolSecret", "customDimension", "customMetric", "dataRetentionSettings", "searchAds_360Link", "dataStream", "attributionSettings", "expandedDataSet", "bigqueryLink"]), - set: $util.oneOfSetter($oneOfFields) - }); + AudienceSequenceStep.prototype.filterExpression = null; /** - * Creates a new ChangeHistoryResource instance using the specified properties. + * Creates a new AudienceSequenceStep instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep * @static - * @param {google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource} ChangeHistoryResource instance + * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep} AudienceSequenceStep instance */ - ChangeHistoryResource.create = function create(properties) { - return new ChangeHistoryResource(properties); + AudienceSequenceStep.create = function create(properties) { + return new AudienceSequenceStep(properties); }; /** - * Encodes the specified ChangeHistoryResource message. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.verify|verify} messages. + * Encodes the specified AudienceSequenceStep message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep * @static - * @param {google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource} message ChangeHistoryResource message or plain object to encode + * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep} message AudienceSequenceStep message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChangeHistoryResource.encode = function encode(message, writer) { + AudienceSequenceStep.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.account != null && Object.hasOwnProperty.call(message, "account")) - $root.google.analytics.admin.v1alpha.Account.encode(message.account, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.property != null && Object.hasOwnProperty.call(message, "property")) - $root.google.analytics.admin.v1alpha.Property.encode(message.property, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.firebaseLink != null && Object.hasOwnProperty.call(message, "firebaseLink")) - $root.google.analytics.admin.v1alpha.FirebaseLink.encode(message.firebaseLink, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.googleAdsLink != null && Object.hasOwnProperty.call(message, "googleAdsLink")) - $root.google.analytics.admin.v1alpha.GoogleAdsLink.encode(message.googleAdsLink, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.googleSignalsSettings != null && Object.hasOwnProperty.call(message, "googleSignalsSettings")) - $root.google.analytics.admin.v1alpha.GoogleSignalsSettings.encode(message.googleSignalsSettings, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.displayVideo_360AdvertiserLink != null && Object.hasOwnProperty.call(message, "displayVideo_360AdvertiserLink")) - $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.encode(message.displayVideo_360AdvertiserLink, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.displayVideo_360AdvertiserLinkProposal != null && Object.hasOwnProperty.call(message, "displayVideo_360AdvertiserLinkProposal")) - $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.encode(message.displayVideo_360AdvertiserLinkProposal, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.conversionEvent != null && Object.hasOwnProperty.call(message, "conversionEvent")) - $root.google.analytics.admin.v1alpha.ConversionEvent.encode(message.conversionEvent, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.measurementProtocolSecret != null && Object.hasOwnProperty.call(message, "measurementProtocolSecret")) - $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.encode(message.measurementProtocolSecret, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.customDimension != null && Object.hasOwnProperty.call(message, "customDimension")) - $root.google.analytics.admin.v1alpha.CustomDimension.encode(message.customDimension, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.customMetric != null && Object.hasOwnProperty.call(message, "customMetric")) - $root.google.analytics.admin.v1alpha.CustomMetric.encode(message.customMetric, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.dataRetentionSettings != null && Object.hasOwnProperty.call(message, "dataRetentionSettings")) - $root.google.analytics.admin.v1alpha.DataRetentionSettings.encode(message.dataRetentionSettings, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.searchAds_360Link != null && Object.hasOwnProperty.call(message, "searchAds_360Link")) - $root.google.analytics.admin.v1alpha.SearchAds360Link.encode(message.searchAds_360Link, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.dataStream != null && Object.hasOwnProperty.call(message, "dataStream")) - $root.google.analytics.admin.v1alpha.DataStream.encode(message.dataStream, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.attributionSettings != null && Object.hasOwnProperty.call(message, "attributionSettings")) - $root.google.analytics.admin.v1alpha.AttributionSettings.encode(message.attributionSettings, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.expandedDataSet != null && Object.hasOwnProperty.call(message, "expandedDataSet")) - $root.google.analytics.admin.v1alpha.ExpandedDataSet.encode(message.expandedDataSet, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.bigqueryLink != null && Object.hasOwnProperty.call(message, "bigqueryLink")) - $root.google.analytics.admin.v1alpha.BigQueryLink.encode(message.bigqueryLink, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.scope); + if (message.immediatelyFollows != null && Object.hasOwnProperty.call(message, "immediatelyFollows")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.immediatelyFollows); + if (message.constraintDuration != null && Object.hasOwnProperty.call(message, "constraintDuration")) + $root.google.protobuf.Duration.encode(message.constraintDuration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.filterExpression != null && Object.hasOwnProperty.call(message, "filterExpression")) + $root.google.analytics.admin.v1alpha.AudienceFilterExpression.encode(message.filterExpression, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified ChangeHistoryResource message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.verify|verify} messages. + * Encodes the specified AudienceSequenceStep message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep * @static - * @param {google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource} message ChangeHistoryResource message or plain object to encode + * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep} message AudienceSequenceStep message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChangeHistoryResource.encodeDelimited = function encodeDelimited(message, writer) { + AudienceSequenceStep.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ChangeHistoryResource message from the specified reader or buffer. + * Decodes an AudienceSequenceStep message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource} ChangeHistoryResource + * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep} AudienceSequenceStep * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChangeHistoryResource.decode = function decode(reader, length) { + AudienceSequenceStep.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.account = $root.google.analytics.admin.v1alpha.Account.decode(reader, reader.uint32()); + message.scope = reader.int32(); break; } case 2: { - message.property = $root.google.analytics.admin.v1alpha.Property.decode(reader, reader.uint32()); - break; - } - case 6: { - message.firebaseLink = $root.google.analytics.admin.v1alpha.FirebaseLink.decode(reader, reader.uint32()); - break; - } - case 7: { - message.googleAdsLink = $root.google.analytics.admin.v1alpha.GoogleAdsLink.decode(reader, reader.uint32()); - break; - } - case 8: { - message.googleSignalsSettings = $root.google.analytics.admin.v1alpha.GoogleSignalsSettings.decode(reader, reader.uint32()); - break; - } - case 9: { - message.displayVideo_360AdvertiserLink = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.decode(reader, reader.uint32()); - break; - } - case 10: { - message.displayVideo_360AdvertiserLinkProposal = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.decode(reader, reader.uint32()); - break; - } - case 11: { - message.conversionEvent = $root.google.analytics.admin.v1alpha.ConversionEvent.decode(reader, reader.uint32()); - break; - } - case 12: { - message.measurementProtocolSecret = $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.decode(reader, reader.uint32()); - break; - } - case 13: { - message.customDimension = $root.google.analytics.admin.v1alpha.CustomDimension.decode(reader, reader.uint32()); - break; - } - case 14: { - message.customMetric = $root.google.analytics.admin.v1alpha.CustomMetric.decode(reader, reader.uint32()); - break; - } - case 15: { - message.dataRetentionSettings = $root.google.analytics.admin.v1alpha.DataRetentionSettings.decode(reader, reader.uint32()); - break; - } - case 16: { - message.searchAds_360Link = $root.google.analytics.admin.v1alpha.SearchAds360Link.decode(reader, reader.uint32()); - break; - } - case 18: { - message.dataStream = $root.google.analytics.admin.v1alpha.DataStream.decode(reader, reader.uint32()); - break; - } - case 20: { - message.attributionSettings = $root.google.analytics.admin.v1alpha.AttributionSettings.decode(reader, reader.uint32()); + message.immediatelyFollows = reader.bool(); break; } - case 21: { - message.expandedDataSet = $root.google.analytics.admin.v1alpha.ExpandedDataSet.decode(reader, reader.uint32()); + case 3: { + message.constraintDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } - case 23: { - message.bigqueryLink = $root.google.analytics.admin.v1alpha.BigQueryLink.decode(reader, reader.uint32()); + case 4: { + message.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.decode(reader, reader.uint32()); break; } default: @@ -45818,460 +43391,191 @@ }; /** - * Decodes a ChangeHistoryResource message from the specified reader or buffer, length delimited. + * Decodes an AudienceSequenceStep message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource} ChangeHistoryResource + * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep} AudienceSequenceStep * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChangeHistoryResource.decodeDelimited = function decodeDelimited(reader) { + AudienceSequenceStep.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ChangeHistoryResource message. + * Verifies an AudienceSequenceStep message. * @function verify - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ChangeHistoryResource.verify = function verify(message) { + AudienceSequenceStep.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.account != null && message.hasOwnProperty("account")) { - properties.resource = 1; - { - var error = $root.google.analytics.admin.v1alpha.Account.verify(message.account); - if (error) - return "account." + error; - } - } - if (message.property != null && message.hasOwnProperty("property")) { - if (properties.resource === 1) - return "resource: multiple values"; - properties.resource = 1; - { - var error = $root.google.analytics.admin.v1alpha.Property.verify(message.property); - if (error) - return "property." + error; + if (message.scope != null && message.hasOwnProperty("scope")) + switch (message.scope) { + default: + return "scope: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } + if (message.immediatelyFollows != null && message.hasOwnProperty("immediatelyFollows")) + if (typeof message.immediatelyFollows !== "boolean") + return "immediatelyFollows: boolean expected"; + if (message.constraintDuration != null && message.hasOwnProperty("constraintDuration")) { + var error = $root.google.protobuf.Duration.verify(message.constraintDuration); + if (error) + return "constraintDuration." + error; } - if (message.firebaseLink != null && message.hasOwnProperty("firebaseLink")) { - if (properties.resource === 1) - return "resource: multiple values"; - properties.resource = 1; - { - var error = $root.google.analytics.admin.v1alpha.FirebaseLink.verify(message.firebaseLink); - if (error) - return "firebaseLink." + error; - } + if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) { + var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.verify(message.filterExpression); + if (error) + return "filterExpression." + error; } - if (message.googleAdsLink != null && message.hasOwnProperty("googleAdsLink")) { - if (properties.resource === 1) - return "resource: multiple values"; - properties.resource = 1; - { - var error = $root.google.analytics.admin.v1alpha.GoogleAdsLink.verify(message.googleAdsLink); - if (error) - return "googleAdsLink." + error; + return null; + }; + + /** + * Creates an AudienceSequenceStep message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep} AudienceSequenceStep + */ + AudienceSequenceStep.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep(); + switch (object.scope) { + default: + if (typeof object.scope === "number") { + message.scope = object.scope; + break; } + break; + case "AUDIENCE_FILTER_SCOPE_UNSPECIFIED": + case 0: + message.scope = 0; + break; + case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT": + case 1: + message.scope = 1; + break; + case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION": + case 2: + message.scope = 2; + break; + case "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS": + case 3: + message.scope = 3; + break; } - if (message.googleSignalsSettings != null && message.hasOwnProperty("googleSignalsSettings")) { - if (properties.resource === 1) - return "resource: multiple values"; - properties.resource = 1; - { - var error = $root.google.analytics.admin.v1alpha.GoogleSignalsSettings.verify(message.googleSignalsSettings); - if (error) - return "googleSignalsSettings." + error; - } + if (object.immediatelyFollows != null) + message.immediatelyFollows = Boolean(object.immediatelyFollows); + if (object.constraintDuration != null) { + if (typeof object.constraintDuration !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.constraintDuration: object expected"); + message.constraintDuration = $root.google.protobuf.Duration.fromObject(object.constraintDuration); } - if (message.displayVideo_360AdvertiserLink != null && message.hasOwnProperty("displayVideo_360AdvertiserLink")) { - if (properties.resource === 1) - return "resource: multiple values"; - properties.resource = 1; - { - var error = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.verify(message.displayVideo_360AdvertiserLink); - if (error) - return "displayVideo_360AdvertiserLink." + error; - } - } - if (message.displayVideo_360AdvertiserLinkProposal != null && message.hasOwnProperty("displayVideo_360AdvertiserLinkProposal")) { - if (properties.resource === 1) - return "resource: multiple values"; - properties.resource = 1; - { - var error = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.verify(message.displayVideo_360AdvertiserLinkProposal); - if (error) - return "displayVideo_360AdvertiserLinkProposal." + error; - } - } - if (message.conversionEvent != null && message.hasOwnProperty("conversionEvent")) { - if (properties.resource === 1) - return "resource: multiple values"; - properties.resource = 1; - { - var error = $root.google.analytics.admin.v1alpha.ConversionEvent.verify(message.conversionEvent); - if (error) - return "conversionEvent." + error; - } - } - if (message.measurementProtocolSecret != null && message.hasOwnProperty("measurementProtocolSecret")) { - if (properties.resource === 1) - return "resource: multiple values"; - properties.resource = 1; - { - var error = $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.verify(message.measurementProtocolSecret); - if (error) - return "measurementProtocolSecret." + error; - } - } - if (message.customDimension != null && message.hasOwnProperty("customDimension")) { - if (properties.resource === 1) - return "resource: multiple values"; - properties.resource = 1; - { - var error = $root.google.analytics.admin.v1alpha.CustomDimension.verify(message.customDimension); - if (error) - return "customDimension." + error; - } - } - if (message.customMetric != null && message.hasOwnProperty("customMetric")) { - if (properties.resource === 1) - return "resource: multiple values"; - properties.resource = 1; - { - var error = $root.google.analytics.admin.v1alpha.CustomMetric.verify(message.customMetric); - if (error) - return "customMetric." + error; - } - } - if (message.dataRetentionSettings != null && message.hasOwnProperty("dataRetentionSettings")) { - if (properties.resource === 1) - return "resource: multiple values"; - properties.resource = 1; - { - var error = $root.google.analytics.admin.v1alpha.DataRetentionSettings.verify(message.dataRetentionSettings); - if (error) - return "dataRetentionSettings." + error; - } - } - if (message.searchAds_360Link != null && message.hasOwnProperty("searchAds_360Link")) { - if (properties.resource === 1) - return "resource: multiple values"; - properties.resource = 1; - { - var error = $root.google.analytics.admin.v1alpha.SearchAds360Link.verify(message.searchAds_360Link); - if (error) - return "searchAds_360Link." + error; - } - } - if (message.dataStream != null && message.hasOwnProperty("dataStream")) { - if (properties.resource === 1) - return "resource: multiple values"; - properties.resource = 1; - { - var error = $root.google.analytics.admin.v1alpha.DataStream.verify(message.dataStream); - if (error) - return "dataStream." + error; - } - } - if (message.attributionSettings != null && message.hasOwnProperty("attributionSettings")) { - if (properties.resource === 1) - return "resource: multiple values"; - properties.resource = 1; - { - var error = $root.google.analytics.admin.v1alpha.AttributionSettings.verify(message.attributionSettings); - if (error) - return "attributionSettings." + error; - } - } - if (message.expandedDataSet != null && message.hasOwnProperty("expandedDataSet")) { - if (properties.resource === 1) - return "resource: multiple values"; - properties.resource = 1; - { - var error = $root.google.analytics.admin.v1alpha.ExpandedDataSet.verify(message.expandedDataSet); - if (error) - return "expandedDataSet." + error; - } - } - if (message.bigqueryLink != null && message.hasOwnProperty("bigqueryLink")) { - if (properties.resource === 1) - return "resource: multiple values"; - properties.resource = 1; - { - var error = $root.google.analytics.admin.v1alpha.BigQueryLink.verify(message.bigqueryLink); - if (error) - return "bigqueryLink." + error; - } - } - return null; - }; - - /** - * Creates a ChangeHistoryResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource} ChangeHistoryResource - */ - ChangeHistoryResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource) - return object; - var message = new $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource(); - if (object.account != null) { - if (typeof object.account !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.account: object expected"); - message.account = $root.google.analytics.admin.v1alpha.Account.fromObject(object.account); - } - if (object.property != null) { - if (typeof object.property !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.property: object expected"); - message.property = $root.google.analytics.admin.v1alpha.Property.fromObject(object.property); - } - if (object.firebaseLink != null) { - if (typeof object.firebaseLink !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.firebaseLink: object expected"); - message.firebaseLink = $root.google.analytics.admin.v1alpha.FirebaseLink.fromObject(object.firebaseLink); - } - if (object.googleAdsLink != null) { - if (typeof object.googleAdsLink !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.googleAdsLink: object expected"); - message.googleAdsLink = $root.google.analytics.admin.v1alpha.GoogleAdsLink.fromObject(object.googleAdsLink); - } - if (object.googleSignalsSettings != null) { - if (typeof object.googleSignalsSettings !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.googleSignalsSettings: object expected"); - message.googleSignalsSettings = $root.google.analytics.admin.v1alpha.GoogleSignalsSettings.fromObject(object.googleSignalsSettings); - } - if (object.displayVideo_360AdvertiserLink != null) { - if (typeof object.displayVideo_360AdvertiserLink !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.displayVideo_360AdvertiserLink: object expected"); - message.displayVideo_360AdvertiserLink = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.fromObject(object.displayVideo_360AdvertiserLink); - } - if (object.displayVideo_360AdvertiserLinkProposal != null) { - if (typeof object.displayVideo_360AdvertiserLinkProposal !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.displayVideo_360AdvertiserLinkProposal: object expected"); - message.displayVideo_360AdvertiserLinkProposal = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.fromObject(object.displayVideo_360AdvertiserLinkProposal); - } - if (object.conversionEvent != null) { - if (typeof object.conversionEvent !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.conversionEvent: object expected"); - message.conversionEvent = $root.google.analytics.admin.v1alpha.ConversionEvent.fromObject(object.conversionEvent); - } - if (object.measurementProtocolSecret != null) { - if (typeof object.measurementProtocolSecret !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.measurementProtocolSecret: object expected"); - message.measurementProtocolSecret = $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.fromObject(object.measurementProtocolSecret); - } - if (object.customDimension != null) { - if (typeof object.customDimension !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.customDimension: object expected"); - message.customDimension = $root.google.analytics.admin.v1alpha.CustomDimension.fromObject(object.customDimension); - } - if (object.customMetric != null) { - if (typeof object.customMetric !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.customMetric: object expected"); - message.customMetric = $root.google.analytics.admin.v1alpha.CustomMetric.fromObject(object.customMetric); - } - if (object.dataRetentionSettings != null) { - if (typeof object.dataRetentionSettings !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.dataRetentionSettings: object expected"); - message.dataRetentionSettings = $root.google.analytics.admin.v1alpha.DataRetentionSettings.fromObject(object.dataRetentionSettings); - } - if (object.searchAds_360Link != null) { - if (typeof object.searchAds_360Link !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.searchAds_360Link: object expected"); - message.searchAds_360Link = $root.google.analytics.admin.v1alpha.SearchAds360Link.fromObject(object.searchAds_360Link); - } - if (object.dataStream != null) { - if (typeof object.dataStream !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.dataStream: object expected"); - message.dataStream = $root.google.analytics.admin.v1alpha.DataStream.fromObject(object.dataStream); - } - if (object.attributionSettings != null) { - if (typeof object.attributionSettings !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.attributionSettings: object expected"); - message.attributionSettings = $root.google.analytics.admin.v1alpha.AttributionSettings.fromObject(object.attributionSettings); - } - if (object.expandedDataSet != null) { - if (typeof object.expandedDataSet !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.expandedDataSet: object expected"); - message.expandedDataSet = $root.google.analytics.admin.v1alpha.ExpandedDataSet.fromObject(object.expandedDataSet); - } - if (object.bigqueryLink != null) { - if (typeof object.bigqueryLink !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.bigqueryLink: object expected"); - message.bigqueryLink = $root.google.analytics.admin.v1alpha.BigQueryLink.fromObject(object.bigqueryLink); + if (object.filterExpression != null) { + if (typeof object.filterExpression !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.filterExpression: object expected"); + message.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.fromObject(object.filterExpression); } return message; }; /** - * Creates a plain object from a ChangeHistoryResource message. Also converts values to other types if specified. + * Creates a plain object from an AudienceSequenceStep message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep * @static - * @param {google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource} message ChangeHistoryResource + * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep} message AudienceSequenceStep * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ChangeHistoryResource.toObject = function toObject(message, options) { + AudienceSequenceStep.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.account != null && message.hasOwnProperty("account")) { - object.account = $root.google.analytics.admin.v1alpha.Account.toObject(message.account, options); - if (options.oneofs) - object.resource = "account"; - } - if (message.property != null && message.hasOwnProperty("property")) { - object.property = $root.google.analytics.admin.v1alpha.Property.toObject(message.property, options); - if (options.oneofs) - object.resource = "property"; - } - if (message.firebaseLink != null && message.hasOwnProperty("firebaseLink")) { - object.firebaseLink = $root.google.analytics.admin.v1alpha.FirebaseLink.toObject(message.firebaseLink, options); - if (options.oneofs) - object.resource = "firebaseLink"; - } - if (message.googleAdsLink != null && message.hasOwnProperty("googleAdsLink")) { - object.googleAdsLink = $root.google.analytics.admin.v1alpha.GoogleAdsLink.toObject(message.googleAdsLink, options); - if (options.oneofs) - object.resource = "googleAdsLink"; - } - if (message.googleSignalsSettings != null && message.hasOwnProperty("googleSignalsSettings")) { - object.googleSignalsSettings = $root.google.analytics.admin.v1alpha.GoogleSignalsSettings.toObject(message.googleSignalsSettings, options); - if (options.oneofs) - object.resource = "googleSignalsSettings"; - } - if (message.displayVideo_360AdvertiserLink != null && message.hasOwnProperty("displayVideo_360AdvertiserLink")) { - object.displayVideo_360AdvertiserLink = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.toObject(message.displayVideo_360AdvertiserLink, options); - if (options.oneofs) - object.resource = "displayVideo_360AdvertiserLink"; - } - if (message.displayVideo_360AdvertiserLinkProposal != null && message.hasOwnProperty("displayVideo_360AdvertiserLinkProposal")) { - object.displayVideo_360AdvertiserLinkProposal = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.toObject(message.displayVideo_360AdvertiserLinkProposal, options); - if (options.oneofs) - object.resource = "displayVideo_360AdvertiserLinkProposal"; - } - if (message.conversionEvent != null && message.hasOwnProperty("conversionEvent")) { - object.conversionEvent = $root.google.analytics.admin.v1alpha.ConversionEvent.toObject(message.conversionEvent, options); - if (options.oneofs) - object.resource = "conversionEvent"; - } - if (message.measurementProtocolSecret != null && message.hasOwnProperty("measurementProtocolSecret")) { - object.measurementProtocolSecret = $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.toObject(message.measurementProtocolSecret, options); - if (options.oneofs) - object.resource = "measurementProtocolSecret"; - } - if (message.customDimension != null && message.hasOwnProperty("customDimension")) { - object.customDimension = $root.google.analytics.admin.v1alpha.CustomDimension.toObject(message.customDimension, options); - if (options.oneofs) - object.resource = "customDimension"; - } - if (message.customMetric != null && message.hasOwnProperty("customMetric")) { - object.customMetric = $root.google.analytics.admin.v1alpha.CustomMetric.toObject(message.customMetric, options); - if (options.oneofs) - object.resource = "customMetric"; - } - if (message.dataRetentionSettings != null && message.hasOwnProperty("dataRetentionSettings")) { - object.dataRetentionSettings = $root.google.analytics.admin.v1alpha.DataRetentionSettings.toObject(message.dataRetentionSettings, options); - if (options.oneofs) - object.resource = "dataRetentionSettings"; - } - if (message.searchAds_360Link != null && message.hasOwnProperty("searchAds_360Link")) { - object.searchAds_360Link = $root.google.analytics.admin.v1alpha.SearchAds360Link.toObject(message.searchAds_360Link, options); - if (options.oneofs) - object.resource = "searchAds_360Link"; - } - if (message.dataStream != null && message.hasOwnProperty("dataStream")) { - object.dataStream = $root.google.analytics.admin.v1alpha.DataStream.toObject(message.dataStream, options); - if (options.oneofs) - object.resource = "dataStream"; - } - if (message.attributionSettings != null && message.hasOwnProperty("attributionSettings")) { - object.attributionSettings = $root.google.analytics.admin.v1alpha.AttributionSettings.toObject(message.attributionSettings, options); - if (options.oneofs) - object.resource = "attributionSettings"; - } - if (message.expandedDataSet != null && message.hasOwnProperty("expandedDataSet")) { - object.expandedDataSet = $root.google.analytics.admin.v1alpha.ExpandedDataSet.toObject(message.expandedDataSet, options); - if (options.oneofs) - object.resource = "expandedDataSet"; - } - if (message.bigqueryLink != null && message.hasOwnProperty("bigqueryLink")) { - object.bigqueryLink = $root.google.analytics.admin.v1alpha.BigQueryLink.toObject(message.bigqueryLink, options); - if (options.oneofs) - object.resource = "bigqueryLink"; + if (options.defaults) { + object.scope = options.enums === String ? "AUDIENCE_FILTER_SCOPE_UNSPECIFIED" : 0; + object.immediatelyFollows = false; + object.constraintDuration = null; + object.filterExpression = null; } + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] : message.scope; + if (message.immediatelyFollows != null && message.hasOwnProperty("immediatelyFollows")) + object.immediatelyFollows = message.immediatelyFollows; + if (message.constraintDuration != null && message.hasOwnProperty("constraintDuration")) + object.constraintDuration = $root.google.protobuf.Duration.toObject(message.constraintDuration, options); + if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) + object.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.toObject(message.filterExpression, options); return object; }; /** - * Converts this ChangeHistoryResource to JSON. + * Converts this AudienceSequenceStep to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep * @instance * @returns {Object.} JSON object */ - ChangeHistoryResource.prototype.toJSON = function toJSON() { + AudienceSequenceStep.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ChangeHistoryResource + * Gets the default type url for AudienceSequenceStep * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ChangeHistoryResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AudienceSequenceStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep"; }; - return ChangeHistoryResource; + return AudienceSequenceStep; })(); - return ChangeHistoryChange; + return AudienceSequenceFilter; })(); - v1alpha.DisplayVideo360AdvertiserLink = (function() { + v1alpha.AudienceFilterClause = (function() { /** - * Properties of a DisplayVideo360AdvertiserLink. + * Properties of an AudienceFilterClause. * @memberof google.analytics.admin.v1alpha - * @interface IDisplayVideo360AdvertiserLink - * @property {string|null} [name] DisplayVideo360AdvertiserLink name - * @property {string|null} [advertiserId] DisplayVideo360AdvertiserLink advertiserId - * @property {string|null} [advertiserDisplayName] DisplayVideo360AdvertiserLink advertiserDisplayName - * @property {google.protobuf.IBoolValue|null} [adsPersonalizationEnabled] DisplayVideo360AdvertiserLink adsPersonalizationEnabled - * @property {google.protobuf.IBoolValue|null} [campaignDataSharingEnabled] DisplayVideo360AdvertiserLink campaignDataSharingEnabled - * @property {google.protobuf.IBoolValue|null} [costDataSharingEnabled] DisplayVideo360AdvertiserLink costDataSharingEnabled + * @interface IAudienceFilterClause + * @property {google.analytics.admin.v1alpha.IAudienceSimpleFilter|null} [simpleFilter] AudienceFilterClause simpleFilter + * @property {google.analytics.admin.v1alpha.IAudienceSequenceFilter|null} [sequenceFilter] AudienceFilterClause sequenceFilter + * @property {google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType|null} [clauseType] AudienceFilterClause clauseType */ /** - * Constructs a new DisplayVideo360AdvertiserLink. + * Constructs a new AudienceFilterClause. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a DisplayVideo360AdvertiserLink. - * @implements IDisplayVideo360AdvertiserLink + * @classdesc Represents an AudienceFilterClause. + * @implements IAudienceFilterClause * @constructor - * @param {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IAudienceFilterClause=} [properties] Properties to set */ - function DisplayVideo360AdvertiserLink(properties) { + function AudienceFilterClause(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -46279,145 +43583,117 @@ } /** - * DisplayVideo360AdvertiserLink name. - * @member {string} name - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink - * @instance - */ - DisplayVideo360AdvertiserLink.prototype.name = ""; - - /** - * DisplayVideo360AdvertiserLink advertiserId. - * @member {string} advertiserId - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * AudienceFilterClause simpleFilter. + * @member {google.analytics.admin.v1alpha.IAudienceSimpleFilter|null|undefined} simpleFilter + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause * @instance */ - DisplayVideo360AdvertiserLink.prototype.advertiserId = ""; + AudienceFilterClause.prototype.simpleFilter = null; /** - * DisplayVideo360AdvertiserLink advertiserDisplayName. - * @member {string} advertiserDisplayName - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * AudienceFilterClause sequenceFilter. + * @member {google.analytics.admin.v1alpha.IAudienceSequenceFilter|null|undefined} sequenceFilter + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause * @instance */ - DisplayVideo360AdvertiserLink.prototype.advertiserDisplayName = ""; + AudienceFilterClause.prototype.sequenceFilter = null; /** - * DisplayVideo360AdvertiserLink adsPersonalizationEnabled. - * @member {google.protobuf.IBoolValue|null|undefined} adsPersonalizationEnabled - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * AudienceFilterClause clauseType. + * @member {google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType} clauseType + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause * @instance */ - DisplayVideo360AdvertiserLink.prototype.adsPersonalizationEnabled = null; + AudienceFilterClause.prototype.clauseType = 0; - /** - * DisplayVideo360AdvertiserLink campaignDataSharingEnabled. - * @member {google.protobuf.IBoolValue|null|undefined} campaignDataSharingEnabled - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink - * @instance - */ - DisplayVideo360AdvertiserLink.prototype.campaignDataSharingEnabled = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * DisplayVideo360AdvertiserLink costDataSharingEnabled. - * @member {google.protobuf.IBoolValue|null|undefined} costDataSharingEnabled - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * AudienceFilterClause filter. + * @member {"simpleFilter"|"sequenceFilter"|undefined} filter + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause * @instance */ - DisplayVideo360AdvertiserLink.prototype.costDataSharingEnabled = null; + Object.defineProperty(AudienceFilterClause.prototype, "filter", { + get: $util.oneOfGetter($oneOfFields = ["simpleFilter", "sequenceFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new DisplayVideo360AdvertiserLink instance using the specified properties. + * Creates a new AudienceFilterClause instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause * @static - * @param {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink} DisplayVideo360AdvertiserLink instance + * @param {google.analytics.admin.v1alpha.IAudienceFilterClause=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceFilterClause} AudienceFilterClause instance */ - DisplayVideo360AdvertiserLink.create = function create(properties) { - return new DisplayVideo360AdvertiserLink(properties); + AudienceFilterClause.create = function create(properties) { + return new AudienceFilterClause(properties); }; /** - * Encodes the specified DisplayVideo360AdvertiserLink message. Does not implicitly {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.verify|verify} messages. + * Encodes the specified AudienceFilterClause message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterClause.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause * @static - * @param {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink} message DisplayVideo360AdvertiserLink message or plain object to encode + * @param {google.analytics.admin.v1alpha.IAudienceFilterClause} message AudienceFilterClause message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DisplayVideo360AdvertiserLink.encode = function encode(message, writer) { + AudienceFilterClause.encode = function encode(message, writer) { 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.advertiserId != null && Object.hasOwnProperty.call(message, "advertiserId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.advertiserId); - if (message.advertiserDisplayName != null && Object.hasOwnProperty.call(message, "advertiserDisplayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.advertiserDisplayName); - if (message.adsPersonalizationEnabled != null && Object.hasOwnProperty.call(message, "adsPersonalizationEnabled")) - $root.google.protobuf.BoolValue.encode(message.adsPersonalizationEnabled, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.campaignDataSharingEnabled != null && Object.hasOwnProperty.call(message, "campaignDataSharingEnabled")) - $root.google.protobuf.BoolValue.encode(message.campaignDataSharingEnabled, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.costDataSharingEnabled != null && Object.hasOwnProperty.call(message, "costDataSharingEnabled")) - $root.google.protobuf.BoolValue.encode(message.costDataSharingEnabled, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.clauseType != null && Object.hasOwnProperty.call(message, "clauseType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.clauseType); + if (message.simpleFilter != null && Object.hasOwnProperty.call(message, "simpleFilter")) + $root.google.analytics.admin.v1alpha.AudienceSimpleFilter.encode(message.simpleFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sequenceFilter != null && Object.hasOwnProperty.call(message, "sequenceFilter")) + $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.encode(message.sequenceFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified DisplayVideo360AdvertiserLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.verify|verify} messages. + * Encodes the specified AudienceFilterClause message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterClause.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause * @static - * @param {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink} message DisplayVideo360AdvertiserLink message or plain object to encode + * @param {google.analytics.admin.v1alpha.IAudienceFilterClause} message AudienceFilterClause message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DisplayVideo360AdvertiserLink.encodeDelimited = function encodeDelimited(message, writer) { + AudienceFilterClause.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DisplayVideo360AdvertiserLink message from the specified reader or buffer. + * Decodes an AudienceFilterClause message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink} DisplayVideo360AdvertiserLink + * @returns {google.analytics.admin.v1alpha.AudienceFilterClause} AudienceFilterClause * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DisplayVideo360AdvertiserLink.decode = function decode(reader, length) { + AudienceFilterClause.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceFilterClause(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } case 2: { - message.advertiserId = reader.string(); + message.simpleFilter = $root.google.analytics.admin.v1alpha.AudienceSimpleFilter.decode(reader, reader.uint32()); break; } case 3: { - message.advertiserDisplayName = reader.string(); - break; - } - case 4: { - message.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); - break; - } - case 5: { - message.campaignDataSharingEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + message.sequenceFilter = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.decode(reader, reader.uint32()); break; } - case 6: { - message.costDataSharingEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + case 1: { + message.clauseType = reader.int32(); break; } default: @@ -46429,185 +43705,202 @@ }; /** - * Decodes a DisplayVideo360AdvertiserLink message from the specified reader or buffer, length delimited. + * Decodes an AudienceFilterClause message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink} DisplayVideo360AdvertiserLink + * @returns {google.analytics.admin.v1alpha.AudienceFilterClause} AudienceFilterClause * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DisplayVideo360AdvertiserLink.decodeDelimited = function decodeDelimited(reader) { + AudienceFilterClause.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DisplayVideo360AdvertiserLink message. + * Verifies an AudienceFilterClause message. * @function verify - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DisplayVideo360AdvertiserLink.verify = function verify(message) { + AudienceFilterClause.verify = function verify(message) { if (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.advertiserId != null && message.hasOwnProperty("advertiserId")) - if (!$util.isString(message.advertiserId)) - return "advertiserId: string expected"; - if (message.advertiserDisplayName != null && message.hasOwnProperty("advertiserDisplayName")) - if (!$util.isString(message.advertiserDisplayName)) - return "advertiserDisplayName: string expected"; - if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) { - var error = $root.google.protobuf.BoolValue.verify(message.adsPersonalizationEnabled); - if (error) - return "adsPersonalizationEnabled." + error; - } - if (message.campaignDataSharingEnabled != null && message.hasOwnProperty("campaignDataSharingEnabled")) { - var error = $root.google.protobuf.BoolValue.verify(message.campaignDataSharingEnabled); - if (error) - return "campaignDataSharingEnabled." + error; + var properties = {}; + if (message.simpleFilter != null && message.hasOwnProperty("simpleFilter")) { + properties.filter = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceSimpleFilter.verify(message.simpleFilter); + if (error) + return "simpleFilter." + error; + } } - if (message.costDataSharingEnabled != null && message.hasOwnProperty("costDataSharingEnabled")) { - var error = $root.google.protobuf.BoolValue.verify(message.costDataSharingEnabled); - if (error) - return "costDataSharingEnabled." + error; + if (message.sequenceFilter != null && message.hasOwnProperty("sequenceFilter")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.verify(message.sequenceFilter); + if (error) + return "sequenceFilter." + error; + } } + if (message.clauseType != null && message.hasOwnProperty("clauseType")) + switch (message.clauseType) { + default: + return "clauseType: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a DisplayVideo360AdvertiserLink message from a plain object. Also converts values to their respective internal types. + * Creates an AudienceFilterClause message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink} DisplayVideo360AdvertiserLink + * @returns {google.analytics.admin.v1alpha.AudienceFilterClause} AudienceFilterClause */ - DisplayVideo360AdvertiserLink.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink) + AudienceFilterClause.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceFilterClause) return object; - var message = new $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink(); - if (object.name != null) - message.name = String(object.name); - if (object.advertiserId != null) - message.advertiserId = String(object.advertiserId); - if (object.advertiserDisplayName != null) - message.advertiserDisplayName = String(object.advertiserDisplayName); - if (object.adsPersonalizationEnabled != null) { - if (typeof object.adsPersonalizationEnabled !== "object") - throw TypeError(".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.adsPersonalizationEnabled: object expected"); - message.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.fromObject(object.adsPersonalizationEnabled); + var message = new $root.google.analytics.admin.v1alpha.AudienceFilterClause(); + if (object.simpleFilter != null) { + if (typeof object.simpleFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterClause.simpleFilter: object expected"); + message.simpleFilter = $root.google.analytics.admin.v1alpha.AudienceSimpleFilter.fromObject(object.simpleFilter); } - if (object.campaignDataSharingEnabled != null) { - if (typeof object.campaignDataSharingEnabled !== "object") - throw TypeError(".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.campaignDataSharingEnabled: object expected"); - message.campaignDataSharingEnabled = $root.google.protobuf.BoolValue.fromObject(object.campaignDataSharingEnabled); + if (object.sequenceFilter != null) { + if (typeof object.sequenceFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterClause.sequenceFilter: object expected"); + message.sequenceFilter = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.fromObject(object.sequenceFilter); } - if (object.costDataSharingEnabled != null) { - if (typeof object.costDataSharingEnabled !== "object") - throw TypeError(".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.costDataSharingEnabled: object expected"); - message.costDataSharingEnabled = $root.google.protobuf.BoolValue.fromObject(object.costDataSharingEnabled); + switch (object.clauseType) { + default: + if (typeof object.clauseType === "number") { + message.clauseType = object.clauseType; + break; + } + break; + case "AUDIENCE_CLAUSE_TYPE_UNSPECIFIED": + case 0: + message.clauseType = 0; + break; + case "INCLUDE": + case 1: + message.clauseType = 1; + break; + case "EXCLUDE": + case 2: + message.clauseType = 2; + break; } return message; }; /** - * Creates a plain object from a DisplayVideo360AdvertiserLink message. Also converts values to other types if specified. + * Creates a plain object from an AudienceFilterClause message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause * @static - * @param {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink} message DisplayVideo360AdvertiserLink + * @param {google.analytics.admin.v1alpha.AudienceFilterClause} message AudienceFilterClause * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DisplayVideo360AdvertiserLink.toObject = function toObject(message, options) { + AudienceFilterClause.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.advertiserId = ""; - object.advertiserDisplayName = ""; - object.adsPersonalizationEnabled = null; - object.campaignDataSharingEnabled = null; - object.costDataSharingEnabled = null; + if (options.defaults) + object.clauseType = options.enums === String ? "AUDIENCE_CLAUSE_TYPE_UNSPECIFIED" : 0; + if (message.clauseType != null && message.hasOwnProperty("clauseType")) + object.clauseType = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType[message.clauseType] === undefined ? message.clauseType : $root.google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType[message.clauseType] : message.clauseType; + if (message.simpleFilter != null && message.hasOwnProperty("simpleFilter")) { + object.simpleFilter = $root.google.analytics.admin.v1alpha.AudienceSimpleFilter.toObject(message.simpleFilter, options); + if (options.oneofs) + object.filter = "simpleFilter"; + } + if (message.sequenceFilter != null && message.hasOwnProperty("sequenceFilter")) { + object.sequenceFilter = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.toObject(message.sequenceFilter, options); + if (options.oneofs) + object.filter = "sequenceFilter"; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.advertiserId != null && message.hasOwnProperty("advertiserId")) - object.advertiserId = message.advertiserId; - if (message.advertiserDisplayName != null && message.hasOwnProperty("advertiserDisplayName")) - object.advertiserDisplayName = message.advertiserDisplayName; - if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) - object.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.toObject(message.adsPersonalizationEnabled, options); - if (message.campaignDataSharingEnabled != null && message.hasOwnProperty("campaignDataSharingEnabled")) - object.campaignDataSharingEnabled = $root.google.protobuf.BoolValue.toObject(message.campaignDataSharingEnabled, options); - if (message.costDataSharingEnabled != null && message.hasOwnProperty("costDataSharingEnabled")) - object.costDataSharingEnabled = $root.google.protobuf.BoolValue.toObject(message.costDataSharingEnabled, options); return object; }; /** - * Converts this DisplayVideo360AdvertiserLink to JSON. + * Converts this AudienceFilterClause to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause * @instance * @returns {Object.} JSON object */ - DisplayVideo360AdvertiserLink.prototype.toJSON = function toJSON() { + AudienceFilterClause.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DisplayVideo360AdvertiserLink + * Gets the default type url for AudienceFilterClause * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DisplayVideo360AdvertiserLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AudienceFilterClause.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceFilterClause"; }; - return DisplayVideo360AdvertiserLink; + /** + * AudienceClauseType enum. + * @name google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType + * @enum {number} + * @property {number} AUDIENCE_CLAUSE_TYPE_UNSPECIFIED=0 AUDIENCE_CLAUSE_TYPE_UNSPECIFIED value + * @property {number} INCLUDE=1 INCLUDE value + * @property {number} EXCLUDE=2 EXCLUDE value + */ + AudienceFilterClause.AudienceClauseType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AUDIENCE_CLAUSE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INCLUDE"] = 1; + values[valuesById[2] = "EXCLUDE"] = 2; + return values; + })(); + + return AudienceFilterClause; })(); - v1alpha.DisplayVideo360AdvertiserLinkProposal = (function() { + v1alpha.AudienceEventTrigger = (function() { /** - * Properties of a DisplayVideo360AdvertiserLinkProposal. + * Properties of an AudienceEventTrigger. * @memberof google.analytics.admin.v1alpha - * @interface IDisplayVideo360AdvertiserLinkProposal - * @property {string|null} [name] DisplayVideo360AdvertiserLinkProposal name - * @property {string|null} [advertiserId] DisplayVideo360AdvertiserLinkProposal advertiserId - * @property {google.analytics.admin.v1alpha.ILinkProposalStatusDetails|null} [linkProposalStatusDetails] DisplayVideo360AdvertiserLinkProposal linkProposalStatusDetails - * @property {string|null} [advertiserDisplayName] DisplayVideo360AdvertiserLinkProposal advertiserDisplayName - * @property {string|null} [validationEmail] DisplayVideo360AdvertiserLinkProposal validationEmail - * @property {google.protobuf.IBoolValue|null} [adsPersonalizationEnabled] DisplayVideo360AdvertiserLinkProposal adsPersonalizationEnabled - * @property {google.protobuf.IBoolValue|null} [campaignDataSharingEnabled] DisplayVideo360AdvertiserLinkProposal campaignDataSharingEnabled - * @property {google.protobuf.IBoolValue|null} [costDataSharingEnabled] DisplayVideo360AdvertiserLinkProposal costDataSharingEnabled + * @interface IAudienceEventTrigger + * @property {string|null} [eventName] AudienceEventTrigger eventName + * @property {google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition|null} [logCondition] AudienceEventTrigger logCondition */ /** - * Constructs a new DisplayVideo360AdvertiserLinkProposal. + * Constructs a new AudienceEventTrigger. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a DisplayVideo360AdvertiserLinkProposal. - * @implements IDisplayVideo360AdvertiserLinkProposal + * @classdesc Represents an AudienceEventTrigger. + * @implements IAudienceEventTrigger * @constructor - * @param {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IAudienceEventTrigger=} [properties] Properties to set */ - function DisplayVideo360AdvertiserLinkProposal(properties) { + function AudienceEventTrigger(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -46615,173 +43908,89 @@ } /** - * DisplayVideo360AdvertiserLinkProposal name. - * @member {string} name - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal - * @instance - */ - DisplayVideo360AdvertiserLinkProposal.prototype.name = ""; - - /** - * DisplayVideo360AdvertiserLinkProposal advertiserId. - * @member {string} advertiserId - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal - * @instance - */ - DisplayVideo360AdvertiserLinkProposal.prototype.advertiserId = ""; - - /** - * DisplayVideo360AdvertiserLinkProposal linkProposalStatusDetails. - * @member {google.analytics.admin.v1alpha.ILinkProposalStatusDetails|null|undefined} linkProposalStatusDetails - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal - * @instance - */ - DisplayVideo360AdvertiserLinkProposal.prototype.linkProposalStatusDetails = null; - - /** - * DisplayVideo360AdvertiserLinkProposal advertiserDisplayName. - * @member {string} advertiserDisplayName - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal - * @instance - */ - DisplayVideo360AdvertiserLinkProposal.prototype.advertiserDisplayName = ""; - - /** - * DisplayVideo360AdvertiserLinkProposal validationEmail. - * @member {string} validationEmail - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal - * @instance - */ - DisplayVideo360AdvertiserLinkProposal.prototype.validationEmail = ""; - - /** - * DisplayVideo360AdvertiserLinkProposal adsPersonalizationEnabled. - * @member {google.protobuf.IBoolValue|null|undefined} adsPersonalizationEnabled - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal - * @instance - */ - DisplayVideo360AdvertiserLinkProposal.prototype.adsPersonalizationEnabled = null; - - /** - * DisplayVideo360AdvertiserLinkProposal campaignDataSharingEnabled. - * @member {google.protobuf.IBoolValue|null|undefined} campaignDataSharingEnabled - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * AudienceEventTrigger eventName. + * @member {string} eventName + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger * @instance */ - DisplayVideo360AdvertiserLinkProposal.prototype.campaignDataSharingEnabled = null; + AudienceEventTrigger.prototype.eventName = ""; /** - * DisplayVideo360AdvertiserLinkProposal costDataSharingEnabled. - * @member {google.protobuf.IBoolValue|null|undefined} costDataSharingEnabled - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * AudienceEventTrigger logCondition. + * @member {google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition} logCondition + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger * @instance */ - DisplayVideo360AdvertiserLinkProposal.prototype.costDataSharingEnabled = null; + AudienceEventTrigger.prototype.logCondition = 0; /** - * Creates a new DisplayVideo360AdvertiserLinkProposal instance using the specified properties. + * Creates a new AudienceEventTrigger instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger * @static - * @param {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal} DisplayVideo360AdvertiserLinkProposal instance + * @param {google.analytics.admin.v1alpha.IAudienceEventTrigger=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceEventTrigger} AudienceEventTrigger instance */ - DisplayVideo360AdvertiserLinkProposal.create = function create(properties) { - return new DisplayVideo360AdvertiserLinkProposal(properties); + AudienceEventTrigger.create = function create(properties) { + return new AudienceEventTrigger(properties); }; /** - * Encodes the specified DisplayVideo360AdvertiserLinkProposal message. Does not implicitly {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.verify|verify} messages. + * Encodes the specified AudienceEventTrigger message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventTrigger.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger * @static - * @param {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal} message DisplayVideo360AdvertiserLinkProposal message or plain object to encode + * @param {google.analytics.admin.v1alpha.IAudienceEventTrigger} message AudienceEventTrigger message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DisplayVideo360AdvertiserLinkProposal.encode = function encode(message, writer) { + AudienceEventTrigger.encode = function encode(message, writer) { 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.advertiserId != null && Object.hasOwnProperty.call(message, "advertiserId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.advertiserId); - if (message.linkProposalStatusDetails != null && Object.hasOwnProperty.call(message, "linkProposalStatusDetails")) - $root.google.analytics.admin.v1alpha.LinkProposalStatusDetails.encode(message.linkProposalStatusDetails, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.advertiserDisplayName != null && Object.hasOwnProperty.call(message, "advertiserDisplayName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.advertiserDisplayName); - if (message.validationEmail != null && Object.hasOwnProperty.call(message, "validationEmail")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.validationEmail); - if (message.adsPersonalizationEnabled != null && Object.hasOwnProperty.call(message, "adsPersonalizationEnabled")) - $root.google.protobuf.BoolValue.encode(message.adsPersonalizationEnabled, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.campaignDataSharingEnabled != null && Object.hasOwnProperty.call(message, "campaignDataSharingEnabled")) - $root.google.protobuf.BoolValue.encode(message.campaignDataSharingEnabled, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.costDataSharingEnabled != null && Object.hasOwnProperty.call(message, "costDataSharingEnabled")) - $root.google.protobuf.BoolValue.encode(message.costDataSharingEnabled, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.eventName != null && Object.hasOwnProperty.call(message, "eventName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventName); + if (message.logCondition != null && Object.hasOwnProperty.call(message, "logCondition")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.logCondition); return writer; }; /** - * Encodes the specified DisplayVideo360AdvertiserLinkProposal message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.verify|verify} messages. + * Encodes the specified AudienceEventTrigger message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventTrigger.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger * @static - * @param {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal} message DisplayVideo360AdvertiserLinkProposal message or plain object to encode + * @param {google.analytics.admin.v1alpha.IAudienceEventTrigger} message AudienceEventTrigger message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DisplayVideo360AdvertiserLinkProposal.encodeDelimited = function encodeDelimited(message, writer) { + AudienceEventTrigger.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DisplayVideo360AdvertiserLinkProposal message from the specified reader or buffer. + * Decodes an AudienceEventTrigger message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal} DisplayVideo360AdvertiserLinkProposal + * @returns {google.analytics.admin.v1alpha.AudienceEventTrigger} AudienceEventTrigger * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DisplayVideo360AdvertiserLinkProposal.decode = function decode(reader, length) { + AudienceEventTrigger.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceEventTrigger(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.eventName = reader.string(); break; } case 2: { - message.advertiserId = reader.string(); - break; - } - case 3: { - message.linkProposalStatusDetails = $root.google.analytics.admin.v1alpha.LinkProposalStatusDetails.decode(reader, reader.uint32()); - break; - } - case 4: { - message.advertiserDisplayName = reader.string(); - break; - } - case 5: { - message.validationEmail = reader.string(); - break; - } - case 6: { - message.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); - break; - } - case 7: { - message.campaignDataSharingEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); - break; - } - case 8: { - message.costDataSharingEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + message.logCondition = reader.int32(); break; } default: @@ -46793,205 +44002,179 @@ }; /** - * Decodes a DisplayVideo360AdvertiserLinkProposal message from the specified reader or buffer, length delimited. + * Decodes an AudienceEventTrigger message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal} DisplayVideo360AdvertiserLinkProposal + * @returns {google.analytics.admin.v1alpha.AudienceEventTrigger} AudienceEventTrigger * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DisplayVideo360AdvertiserLinkProposal.decodeDelimited = function decodeDelimited(reader) { + AudienceEventTrigger.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DisplayVideo360AdvertiserLinkProposal message. + * Verifies an AudienceEventTrigger message. * @function verify - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DisplayVideo360AdvertiserLinkProposal.verify = function verify(message) { + AudienceEventTrigger.verify = function verify(message) { if (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.advertiserId != null && message.hasOwnProperty("advertiserId")) - if (!$util.isString(message.advertiserId)) - return "advertiserId: string expected"; - if (message.linkProposalStatusDetails != null && message.hasOwnProperty("linkProposalStatusDetails")) { - var error = $root.google.analytics.admin.v1alpha.LinkProposalStatusDetails.verify(message.linkProposalStatusDetails); - if (error) - return "linkProposalStatusDetails." + error; - } - if (message.advertiserDisplayName != null && message.hasOwnProperty("advertiserDisplayName")) - if (!$util.isString(message.advertiserDisplayName)) - return "advertiserDisplayName: string expected"; - if (message.validationEmail != null && message.hasOwnProperty("validationEmail")) - if (!$util.isString(message.validationEmail)) - return "validationEmail: string expected"; - if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) { - var error = $root.google.protobuf.BoolValue.verify(message.adsPersonalizationEnabled); - if (error) - return "adsPersonalizationEnabled." + error; - } - if (message.campaignDataSharingEnabled != null && message.hasOwnProperty("campaignDataSharingEnabled")) { - var error = $root.google.protobuf.BoolValue.verify(message.campaignDataSharingEnabled); - if (error) - return "campaignDataSharingEnabled." + error; - } - if (message.costDataSharingEnabled != null && message.hasOwnProperty("costDataSharingEnabled")) { - var error = $root.google.protobuf.BoolValue.verify(message.costDataSharingEnabled); - if (error) - return "costDataSharingEnabled." + error; - } + if (message.eventName != null && message.hasOwnProperty("eventName")) + if (!$util.isString(message.eventName)) + return "eventName: string expected"; + if (message.logCondition != null && message.hasOwnProperty("logCondition")) + switch (message.logCondition) { + default: + return "logCondition: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a DisplayVideo360AdvertiserLinkProposal message from a plain object. Also converts values to their respective internal types. + * Creates an AudienceEventTrigger message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal} DisplayVideo360AdvertiserLinkProposal + * @returns {google.analytics.admin.v1alpha.AudienceEventTrigger} AudienceEventTrigger */ - DisplayVideo360AdvertiserLinkProposal.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal) + AudienceEventTrigger.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceEventTrigger) return object; - var message = new $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal(); - if (object.name != null) - message.name = String(object.name); - if (object.advertiserId != null) - message.advertiserId = String(object.advertiserId); - if (object.linkProposalStatusDetails != null) { - if (typeof object.linkProposalStatusDetails !== "object") - throw TypeError(".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.linkProposalStatusDetails: object expected"); - message.linkProposalStatusDetails = $root.google.analytics.admin.v1alpha.LinkProposalStatusDetails.fromObject(object.linkProposalStatusDetails); - } - if (object.advertiserDisplayName != null) - message.advertiserDisplayName = String(object.advertiserDisplayName); - if (object.validationEmail != null) - message.validationEmail = String(object.validationEmail); - if (object.adsPersonalizationEnabled != null) { - if (typeof object.adsPersonalizationEnabled !== "object") - throw TypeError(".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.adsPersonalizationEnabled: object expected"); - message.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.fromObject(object.adsPersonalizationEnabled); - } - if (object.campaignDataSharingEnabled != null) { - if (typeof object.campaignDataSharingEnabled !== "object") - throw TypeError(".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.campaignDataSharingEnabled: object expected"); - message.campaignDataSharingEnabled = $root.google.protobuf.BoolValue.fromObject(object.campaignDataSharingEnabled); - } - if (object.costDataSharingEnabled != null) { - if (typeof object.costDataSharingEnabled !== "object") - throw TypeError(".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.costDataSharingEnabled: object expected"); - message.costDataSharingEnabled = $root.google.protobuf.BoolValue.fromObject(object.costDataSharingEnabled); + var message = new $root.google.analytics.admin.v1alpha.AudienceEventTrigger(); + if (object.eventName != null) + message.eventName = String(object.eventName); + switch (object.logCondition) { + default: + if (typeof object.logCondition === "number") { + message.logCondition = object.logCondition; + break; + } + break; + case "LOG_CONDITION_UNSPECIFIED": + case 0: + message.logCondition = 0; + break; + case "AUDIENCE_JOINED": + case 1: + message.logCondition = 1; + break; + case "AUDIENCE_MEMBERSHIP_RENEWED": + case 2: + message.logCondition = 2; + break; } return message; }; /** - * Creates a plain object from a DisplayVideo360AdvertiserLinkProposal message. Also converts values to other types if specified. + * Creates a plain object from an AudienceEventTrigger message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger * @static - * @param {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal} message DisplayVideo360AdvertiserLinkProposal + * @param {google.analytics.admin.v1alpha.AudienceEventTrigger} message AudienceEventTrigger * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DisplayVideo360AdvertiserLinkProposal.toObject = function toObject(message, options) { + AudienceEventTrigger.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.advertiserId = ""; - object.linkProposalStatusDetails = null; - object.advertiserDisplayName = ""; - object.validationEmail = ""; - object.adsPersonalizationEnabled = null; - object.campaignDataSharingEnabled = null; - object.costDataSharingEnabled = null; + object.eventName = ""; + object.logCondition = options.enums === String ? "LOG_CONDITION_UNSPECIFIED" : 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.advertiserId != null && message.hasOwnProperty("advertiserId")) - object.advertiserId = message.advertiserId; - if (message.linkProposalStatusDetails != null && message.hasOwnProperty("linkProposalStatusDetails")) - object.linkProposalStatusDetails = $root.google.analytics.admin.v1alpha.LinkProposalStatusDetails.toObject(message.linkProposalStatusDetails, options); - if (message.advertiserDisplayName != null && message.hasOwnProperty("advertiserDisplayName")) - object.advertiserDisplayName = message.advertiserDisplayName; - if (message.validationEmail != null && message.hasOwnProperty("validationEmail")) - object.validationEmail = message.validationEmail; - if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) - object.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.toObject(message.adsPersonalizationEnabled, options); - if (message.campaignDataSharingEnabled != null && message.hasOwnProperty("campaignDataSharingEnabled")) - object.campaignDataSharingEnabled = $root.google.protobuf.BoolValue.toObject(message.campaignDataSharingEnabled, options); - if (message.costDataSharingEnabled != null && message.hasOwnProperty("costDataSharingEnabled")) - object.costDataSharingEnabled = $root.google.protobuf.BoolValue.toObject(message.costDataSharingEnabled, options); + if (message.eventName != null && message.hasOwnProperty("eventName")) + object.eventName = message.eventName; + if (message.logCondition != null && message.hasOwnProperty("logCondition")) + object.logCondition = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition[message.logCondition] === undefined ? message.logCondition : $root.google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition[message.logCondition] : message.logCondition; return object; }; /** - * Converts this DisplayVideo360AdvertiserLinkProposal to JSON. + * Converts this AudienceEventTrigger to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger * @instance * @returns {Object.} JSON object */ - DisplayVideo360AdvertiserLinkProposal.prototype.toJSON = function toJSON() { + AudienceEventTrigger.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DisplayVideo360AdvertiserLinkProposal + * Gets the default type url for AudienceEventTrigger * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DisplayVideo360AdvertiserLinkProposal.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AudienceEventTrigger.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceEventTrigger"; }; - return DisplayVideo360AdvertiserLinkProposal; - })(); + /** + * LogCondition enum. + * @name google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition + * @enum {number} + * @property {number} LOG_CONDITION_UNSPECIFIED=0 LOG_CONDITION_UNSPECIFIED value + * @property {number} AUDIENCE_JOINED=1 AUDIENCE_JOINED value + * @property {number} AUDIENCE_MEMBERSHIP_RENEWED=2 AUDIENCE_MEMBERSHIP_RENEWED value + */ + AudienceEventTrigger.LogCondition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOG_CONDITION_UNSPECIFIED"] = 0; + values[valuesById[1] = "AUDIENCE_JOINED"] = 1; + values[valuesById[2] = "AUDIENCE_MEMBERSHIP_RENEWED"] = 2; + return values; + })(); - v1alpha.SearchAds360Link = (function() { + return AudienceEventTrigger; + })(); + + v1alpha.Audience = (function() { /** - * Properties of a SearchAds360Link. + * Properties of an Audience. * @memberof google.analytics.admin.v1alpha - * @interface ISearchAds360Link - * @property {string|null} [name] SearchAds360Link name - * @property {string|null} [advertiserId] SearchAds360Link advertiserId - * @property {google.protobuf.IBoolValue|null} [campaignDataSharingEnabled] SearchAds360Link campaignDataSharingEnabled - * @property {google.protobuf.IBoolValue|null} [costDataSharingEnabled] SearchAds360Link costDataSharingEnabled - * @property {string|null} [advertiserDisplayName] SearchAds360Link advertiserDisplayName - * @property {google.protobuf.IBoolValue|null} [adsPersonalizationEnabled] SearchAds360Link adsPersonalizationEnabled - * @property {google.protobuf.IBoolValue|null} [siteStatsSharingEnabled] SearchAds360Link siteStatsSharingEnabled + * @interface IAudience + * @property {string|null} [name] Audience name + * @property {string|null} [displayName] Audience displayName + * @property {string|null} [description] Audience description + * @property {number|null} [membershipDurationDays] Audience membershipDurationDays + * @property {boolean|null} [adsPersonalizationEnabled] Audience adsPersonalizationEnabled + * @property {google.analytics.admin.v1alpha.IAudienceEventTrigger|null} [eventTrigger] Audience eventTrigger + * @property {google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode|null} [exclusionDurationMode] Audience exclusionDurationMode + * @property {Array.|null} [filterClauses] Audience filterClauses */ /** - * Constructs a new SearchAds360Link. + * Constructs a new Audience. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a SearchAds360Link. - * @implements ISearchAds360Link + * @classdesc Represents an Audience. + * @implements IAudience * @constructor - * @param {google.analytics.admin.v1alpha.ISearchAds360Link=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IAudience=} [properties] Properties to set */ - function SearchAds360Link(properties) { + function Audience(properties) { + this.filterClauses = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -46999,130 +44182,141 @@ } /** - * SearchAds360Link name. + * Audience name. * @member {string} name - * @memberof google.analytics.admin.v1alpha.SearchAds360Link + * @memberof google.analytics.admin.v1alpha.Audience * @instance */ - SearchAds360Link.prototype.name = ""; + Audience.prototype.name = ""; /** - * SearchAds360Link advertiserId. - * @member {string} advertiserId - * @memberof google.analytics.admin.v1alpha.SearchAds360Link + * Audience displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1alpha.Audience * @instance */ - SearchAds360Link.prototype.advertiserId = ""; + Audience.prototype.displayName = ""; /** - * SearchAds360Link campaignDataSharingEnabled. - * @member {google.protobuf.IBoolValue|null|undefined} campaignDataSharingEnabled - * @memberof google.analytics.admin.v1alpha.SearchAds360Link + * Audience description. + * @member {string} description + * @memberof google.analytics.admin.v1alpha.Audience * @instance */ - SearchAds360Link.prototype.campaignDataSharingEnabled = null; + Audience.prototype.description = ""; /** - * SearchAds360Link costDataSharingEnabled. - * @member {google.protobuf.IBoolValue|null|undefined} costDataSharingEnabled - * @memberof google.analytics.admin.v1alpha.SearchAds360Link + * Audience membershipDurationDays. + * @member {number} membershipDurationDays + * @memberof google.analytics.admin.v1alpha.Audience * @instance */ - SearchAds360Link.prototype.costDataSharingEnabled = null; + Audience.prototype.membershipDurationDays = 0; /** - * SearchAds360Link advertiserDisplayName. - * @member {string} advertiserDisplayName - * @memberof google.analytics.admin.v1alpha.SearchAds360Link + * Audience adsPersonalizationEnabled. + * @member {boolean} adsPersonalizationEnabled + * @memberof google.analytics.admin.v1alpha.Audience * @instance */ - SearchAds360Link.prototype.advertiserDisplayName = ""; + Audience.prototype.adsPersonalizationEnabled = false; /** - * SearchAds360Link adsPersonalizationEnabled. - * @member {google.protobuf.IBoolValue|null|undefined} adsPersonalizationEnabled - * @memberof google.analytics.admin.v1alpha.SearchAds360Link + * Audience eventTrigger. + * @member {google.analytics.admin.v1alpha.IAudienceEventTrigger|null|undefined} eventTrigger + * @memberof google.analytics.admin.v1alpha.Audience * @instance */ - SearchAds360Link.prototype.adsPersonalizationEnabled = null; + Audience.prototype.eventTrigger = null; /** - * SearchAds360Link siteStatsSharingEnabled. - * @member {google.protobuf.IBoolValue|null|undefined} siteStatsSharingEnabled - * @memberof google.analytics.admin.v1alpha.SearchAds360Link + * Audience exclusionDurationMode. + * @member {google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode} exclusionDurationMode + * @memberof google.analytics.admin.v1alpha.Audience * @instance */ - SearchAds360Link.prototype.siteStatsSharingEnabled = null; + Audience.prototype.exclusionDurationMode = 0; /** - * Creates a new SearchAds360Link instance using the specified properties. + * Audience filterClauses. + * @member {Array.} filterClauses + * @memberof google.analytics.admin.v1alpha.Audience + * @instance + */ + Audience.prototype.filterClauses = $util.emptyArray; + + /** + * Creates a new Audience instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.SearchAds360Link + * @memberof google.analytics.admin.v1alpha.Audience * @static - * @param {google.analytics.admin.v1alpha.ISearchAds360Link=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.SearchAds360Link} SearchAds360Link instance + * @param {google.analytics.admin.v1alpha.IAudience=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.Audience} Audience instance */ - SearchAds360Link.create = function create(properties) { - return new SearchAds360Link(properties); + Audience.create = function create(properties) { + return new Audience(properties); }; /** - * Encodes the specified SearchAds360Link message. Does not implicitly {@link google.analytics.admin.v1alpha.SearchAds360Link.verify|verify} messages. + * Encodes the specified Audience message. Does not implicitly {@link google.analytics.admin.v1alpha.Audience.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.SearchAds360Link + * @memberof google.analytics.admin.v1alpha.Audience * @static - * @param {google.analytics.admin.v1alpha.ISearchAds360Link} message SearchAds360Link message or plain object to encode + * @param {google.analytics.admin.v1alpha.IAudience} message Audience message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchAds360Link.encode = function encode(message, writer) { + Audience.encode = function encode(message, writer) { 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.advertiserId != null && Object.hasOwnProperty.call(message, "advertiserId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.advertiserId); - if (message.campaignDataSharingEnabled != null && Object.hasOwnProperty.call(message, "campaignDataSharingEnabled")) - $root.google.protobuf.BoolValue.encode(message.campaignDataSharingEnabled, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.costDataSharingEnabled != null && Object.hasOwnProperty.call(message, "costDataSharingEnabled")) - $root.google.protobuf.BoolValue.encode(message.costDataSharingEnabled, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.advertiserDisplayName != null && Object.hasOwnProperty.call(message, "advertiserDisplayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.advertiserDisplayName); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.membershipDurationDays != null && Object.hasOwnProperty.call(message, "membershipDurationDays")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.membershipDurationDays); if (message.adsPersonalizationEnabled != null && Object.hasOwnProperty.call(message, "adsPersonalizationEnabled")) - $root.google.protobuf.BoolValue.encode(message.adsPersonalizationEnabled, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.siteStatsSharingEnabled != null && Object.hasOwnProperty.call(message, "siteStatsSharingEnabled")) - $root.google.protobuf.BoolValue.encode(message.siteStatsSharingEnabled, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.adsPersonalizationEnabled); + if (message.eventTrigger != null && Object.hasOwnProperty.call(message, "eventTrigger")) + $root.google.analytics.admin.v1alpha.AudienceEventTrigger.encode(message.eventTrigger, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.exclusionDurationMode != null && Object.hasOwnProperty.call(message, "exclusionDurationMode")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.exclusionDurationMode); + if (message.filterClauses != null && message.filterClauses.length) + for (var i = 0; i < message.filterClauses.length; ++i) + $root.google.analytics.admin.v1alpha.AudienceFilterClause.encode(message.filterClauses[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; /** - * Encodes the specified SearchAds360Link message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.SearchAds360Link.verify|verify} messages. + * Encodes the specified Audience message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.Audience.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.SearchAds360Link + * @memberof google.analytics.admin.v1alpha.Audience * @static - * @param {google.analytics.admin.v1alpha.ISearchAds360Link} message SearchAds360Link message or plain object to encode + * @param {google.analytics.admin.v1alpha.IAudience} message Audience message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchAds360Link.encodeDelimited = function encodeDelimited(message, writer) { + Audience.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SearchAds360Link message from the specified reader or buffer. + * Decodes an Audience message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.SearchAds360Link + * @memberof google.analytics.admin.v1alpha.Audience * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.SearchAds360Link} SearchAds360Link + * @returns {google.analytics.admin.v1alpha.Audience} Audience * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchAds360Link.decode = function decode(reader, length) { + Audience.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.SearchAds360Link(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.Audience(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -47131,27 +44325,33 @@ break; } case 2: { - message.advertiserId = reader.string(); + message.displayName = reader.string(); break; } case 3: { - message.campaignDataSharingEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + message.description = reader.string(); break; } case 4: { - message.costDataSharingEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + message.membershipDurationDays = reader.int32(); break; } case 5: { - message.advertiserDisplayName = reader.string(); + message.adsPersonalizationEnabled = reader.bool(); break; } case 6: { - message.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + message.eventTrigger = $root.google.analytics.admin.v1alpha.AudienceEventTrigger.decode(reader, reader.uint32()); break; } case 7: { - message.siteStatsSharingEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + message.exclusionDurationMode = reader.int32(); + break; + } + case 8: { + if (!(message.filterClauses && message.filterClauses.length)) + message.filterClauses = []; + message.filterClauses.push($root.google.analytics.admin.v1alpha.AudienceFilterClause.decode(reader, reader.uint32())); break; } default: @@ -47163,193 +44363,244 @@ }; /** - * Decodes a SearchAds360Link message from the specified reader or buffer, length delimited. + * Decodes an Audience message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.SearchAds360Link + * @memberof google.analytics.admin.v1alpha.Audience * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.SearchAds360Link} SearchAds360Link + * @returns {google.analytics.admin.v1alpha.Audience} Audience * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchAds360Link.decodeDelimited = function decodeDelimited(reader) { + Audience.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SearchAds360Link message. + * Verifies an Audience message. * @function verify - * @memberof google.analytics.admin.v1alpha.SearchAds360Link + * @memberof google.analytics.admin.v1alpha.Audience * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SearchAds360Link.verify = function verify(message) { + Audience.verify = function verify(message) { if (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.advertiserId != null && message.hasOwnProperty("advertiserId")) - if (!$util.isString(message.advertiserId)) - return "advertiserId: string expected"; - if (message.campaignDataSharingEnabled != null && message.hasOwnProperty("campaignDataSharingEnabled")) { - var error = $root.google.protobuf.BoolValue.verify(message.campaignDataSharingEnabled); - if (error) - return "campaignDataSharingEnabled." + error; - } - if (message.costDataSharingEnabled != null && message.hasOwnProperty("costDataSharingEnabled")) { - var error = $root.google.protobuf.BoolValue.verify(message.costDataSharingEnabled); - if (error) - return "costDataSharingEnabled." + error; - } - if (message.advertiserDisplayName != null && message.hasOwnProperty("advertiserDisplayName")) - if (!$util.isString(message.advertiserDisplayName)) - return "advertiserDisplayName: string expected"; - if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) { - var error = $root.google.protobuf.BoolValue.verify(message.adsPersonalizationEnabled); + 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.membershipDurationDays != null && message.hasOwnProperty("membershipDurationDays")) + if (!$util.isInteger(message.membershipDurationDays)) + return "membershipDurationDays: integer expected"; + if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) + if (typeof message.adsPersonalizationEnabled !== "boolean") + return "adsPersonalizationEnabled: boolean expected"; + if (message.eventTrigger != null && message.hasOwnProperty("eventTrigger")) { + var error = $root.google.analytics.admin.v1alpha.AudienceEventTrigger.verify(message.eventTrigger); if (error) - return "adsPersonalizationEnabled." + error; + return "eventTrigger." + error; } - if (message.siteStatsSharingEnabled != null && message.hasOwnProperty("siteStatsSharingEnabled")) { - var error = $root.google.protobuf.BoolValue.verify(message.siteStatsSharingEnabled); - if (error) - return "siteStatsSharingEnabled." + error; + if (message.exclusionDurationMode != null && message.hasOwnProperty("exclusionDurationMode")) + switch (message.exclusionDurationMode) { + default: + return "exclusionDurationMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.filterClauses != null && message.hasOwnProperty("filterClauses")) { + if (!Array.isArray(message.filterClauses)) + return "filterClauses: array expected"; + for (var i = 0; i < message.filterClauses.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.AudienceFilterClause.verify(message.filterClauses[i]); + if (error) + return "filterClauses." + error; + } } return null; }; /** - * Creates a SearchAds360Link message from a plain object. Also converts values to their respective internal types. + * Creates an Audience message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.SearchAds360Link + * @memberof google.analytics.admin.v1alpha.Audience * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.SearchAds360Link} SearchAds360Link + * @returns {google.analytics.admin.v1alpha.Audience} Audience */ - SearchAds360Link.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.SearchAds360Link) + Audience.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.Audience) return object; - var message = new $root.google.analytics.admin.v1alpha.SearchAds360Link(); + var message = new $root.google.analytics.admin.v1alpha.Audience(); if (object.name != null) message.name = String(object.name); - if (object.advertiserId != null) - message.advertiserId = String(object.advertiserId); - if (object.campaignDataSharingEnabled != null) { - if (typeof object.campaignDataSharingEnabled !== "object") - throw TypeError(".google.analytics.admin.v1alpha.SearchAds360Link.campaignDataSharingEnabled: object expected"); - message.campaignDataSharingEnabled = $root.google.protobuf.BoolValue.fromObject(object.campaignDataSharingEnabled); - } - if (object.costDataSharingEnabled != null) { - if (typeof object.costDataSharingEnabled !== "object") - throw TypeError(".google.analytics.admin.v1alpha.SearchAds360Link.costDataSharingEnabled: object expected"); - message.costDataSharingEnabled = $root.google.protobuf.BoolValue.fromObject(object.costDataSharingEnabled); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.membershipDurationDays != null) + message.membershipDurationDays = object.membershipDurationDays | 0; + if (object.adsPersonalizationEnabled != null) + message.adsPersonalizationEnabled = Boolean(object.adsPersonalizationEnabled); + if (object.eventTrigger != null) { + if (typeof object.eventTrigger !== "object") + throw TypeError(".google.analytics.admin.v1alpha.Audience.eventTrigger: object expected"); + message.eventTrigger = $root.google.analytics.admin.v1alpha.AudienceEventTrigger.fromObject(object.eventTrigger); } - if (object.advertiserDisplayName != null) - message.advertiserDisplayName = String(object.advertiserDisplayName); - if (object.adsPersonalizationEnabled != null) { - if (typeof object.adsPersonalizationEnabled !== "object") - throw TypeError(".google.analytics.admin.v1alpha.SearchAds360Link.adsPersonalizationEnabled: object expected"); - message.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.fromObject(object.adsPersonalizationEnabled); + switch (object.exclusionDurationMode) { + default: + if (typeof object.exclusionDurationMode === "number") { + message.exclusionDurationMode = object.exclusionDurationMode; + break; + } + break; + case "AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED": + case 0: + message.exclusionDurationMode = 0; + break; + case "EXCLUDE_TEMPORARILY": + case 1: + message.exclusionDurationMode = 1; + break; + case "EXCLUDE_PERMANENTLY": + case 2: + message.exclusionDurationMode = 2; + break; } - if (object.siteStatsSharingEnabled != null) { - if (typeof object.siteStatsSharingEnabled !== "object") - throw TypeError(".google.analytics.admin.v1alpha.SearchAds360Link.siteStatsSharingEnabled: object expected"); - message.siteStatsSharingEnabled = $root.google.protobuf.BoolValue.fromObject(object.siteStatsSharingEnabled); + if (object.filterClauses) { + if (!Array.isArray(object.filterClauses)) + throw TypeError(".google.analytics.admin.v1alpha.Audience.filterClauses: array expected"); + message.filterClauses = []; + for (var i = 0; i < object.filterClauses.length; ++i) { + if (typeof object.filterClauses[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.Audience.filterClauses: object expected"); + message.filterClauses[i] = $root.google.analytics.admin.v1alpha.AudienceFilterClause.fromObject(object.filterClauses[i]); + } } return message; }; /** - * Creates a plain object from a SearchAds360Link message. Also converts values to other types if specified. + * Creates a plain object from an Audience message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.SearchAds360Link + * @memberof google.analytics.admin.v1alpha.Audience * @static - * @param {google.analytics.admin.v1alpha.SearchAds360Link} message SearchAds360Link + * @param {google.analytics.admin.v1alpha.Audience} message Audience * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SearchAds360Link.toObject = function toObject(message, options) { + Audience.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.filterClauses = []; if (options.defaults) { object.name = ""; - object.advertiserId = ""; - object.campaignDataSharingEnabled = null; - object.costDataSharingEnabled = null; - object.advertiserDisplayName = ""; - object.adsPersonalizationEnabled = null; - object.siteStatsSharingEnabled = null; + object.displayName = ""; + object.description = ""; + object.membershipDurationDays = 0; + object.adsPersonalizationEnabled = false; + object.eventTrigger = null; + object.exclusionDurationMode = options.enums === String ? "AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.advertiserId != null && message.hasOwnProperty("advertiserId")) - object.advertiserId = message.advertiserId; - if (message.campaignDataSharingEnabled != null && message.hasOwnProperty("campaignDataSharingEnabled")) - object.campaignDataSharingEnabled = $root.google.protobuf.BoolValue.toObject(message.campaignDataSharingEnabled, options); - if (message.costDataSharingEnabled != null && message.hasOwnProperty("costDataSharingEnabled")) - object.costDataSharingEnabled = $root.google.protobuf.BoolValue.toObject(message.costDataSharingEnabled, options); - if (message.advertiserDisplayName != null && message.hasOwnProperty("advertiserDisplayName")) - object.advertiserDisplayName = message.advertiserDisplayName; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.membershipDurationDays != null && message.hasOwnProperty("membershipDurationDays")) + object.membershipDurationDays = message.membershipDurationDays; if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) - object.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.toObject(message.adsPersonalizationEnabled, options); - if (message.siteStatsSharingEnabled != null && message.hasOwnProperty("siteStatsSharingEnabled")) - object.siteStatsSharingEnabled = $root.google.protobuf.BoolValue.toObject(message.siteStatsSharingEnabled, options); + object.adsPersonalizationEnabled = message.adsPersonalizationEnabled; + if (message.eventTrigger != null && message.hasOwnProperty("eventTrigger")) + object.eventTrigger = $root.google.analytics.admin.v1alpha.AudienceEventTrigger.toObject(message.eventTrigger, options); + if (message.exclusionDurationMode != null && message.hasOwnProperty("exclusionDurationMode")) + object.exclusionDurationMode = options.enums === String ? $root.google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode[message.exclusionDurationMode] === undefined ? message.exclusionDurationMode : $root.google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode[message.exclusionDurationMode] : message.exclusionDurationMode; + if (message.filterClauses && message.filterClauses.length) { + object.filterClauses = []; + for (var j = 0; j < message.filterClauses.length; ++j) + object.filterClauses[j] = $root.google.analytics.admin.v1alpha.AudienceFilterClause.toObject(message.filterClauses[j], options); + } return object; }; /** - * Converts this SearchAds360Link to JSON. + * Converts this Audience to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.SearchAds360Link + * @memberof google.analytics.admin.v1alpha.Audience * @instance * @returns {Object.} JSON object */ - SearchAds360Link.prototype.toJSON = function toJSON() { + Audience.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SearchAds360Link + * Gets the default type url for Audience * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.SearchAds360Link + * @memberof google.analytics.admin.v1alpha.Audience * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SearchAds360Link.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Audience.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.SearchAds360Link"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.Audience"; }; - return SearchAds360Link; + /** + * AudienceExclusionDurationMode enum. + * @name google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode + * @enum {number} + * @property {number} AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED=0 AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED value + * @property {number} EXCLUDE_TEMPORARILY=1 EXCLUDE_TEMPORARILY value + * @property {number} EXCLUDE_PERMANENTLY=2 EXCLUDE_PERMANENTLY value + */ + Audience.AudienceExclusionDurationMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXCLUDE_TEMPORARILY"] = 1; + values[valuesById[2] = "EXCLUDE_PERMANENTLY"] = 2; + return values; + })(); + + return Audience; })(); - v1alpha.LinkProposalStatusDetails = (function() { + v1alpha.ExpandedDataSetFilter = (function() { /** - * Properties of a LinkProposalStatusDetails. + * Properties of an ExpandedDataSetFilter. * @memberof google.analytics.admin.v1alpha - * @interface ILinkProposalStatusDetails - * @property {google.analytics.admin.v1alpha.LinkProposalInitiatingProduct|null} [linkProposalInitiatingProduct] LinkProposalStatusDetails linkProposalInitiatingProduct - * @property {string|null} [requestorEmail] LinkProposalStatusDetails requestorEmail - * @property {google.analytics.admin.v1alpha.LinkProposalState|null} [linkProposalState] LinkProposalStatusDetails linkProposalState + * @interface IExpandedDataSetFilter + * @property {google.analytics.admin.v1alpha.ExpandedDataSetFilter.IStringFilter|null} [stringFilter] ExpandedDataSetFilter stringFilter + * @property {google.analytics.admin.v1alpha.ExpandedDataSetFilter.IInListFilter|null} [inListFilter] ExpandedDataSetFilter inListFilter + * @property {string|null} [fieldName] ExpandedDataSetFilter fieldName */ /** - * Constructs a new LinkProposalStatusDetails. + * Constructs a new ExpandedDataSetFilter. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a LinkProposalStatusDetails. - * @implements ILinkProposalStatusDetails + * @classdesc Represents an ExpandedDataSetFilter. + * @implements IExpandedDataSetFilter * @constructor - * @param {google.analytics.admin.v1alpha.ILinkProposalStatusDetails=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IExpandedDataSetFilter=} [properties] Properties to set */ - function LinkProposalStatusDetails(properties) { + function ExpandedDataSetFilter(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -47357,319 +44608,8234 @@ } /** - * LinkProposalStatusDetails linkProposalInitiatingProduct. - * @member {google.analytics.admin.v1alpha.LinkProposalInitiatingProduct} linkProposalInitiatingProduct - * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails + * ExpandedDataSetFilter stringFilter. + * @member {google.analytics.admin.v1alpha.ExpandedDataSetFilter.IStringFilter|null|undefined} stringFilter + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter * @instance */ - LinkProposalStatusDetails.prototype.linkProposalInitiatingProduct = 0; + ExpandedDataSetFilter.prototype.stringFilter = null; /** - * LinkProposalStatusDetails requestorEmail. - * @member {string} requestorEmail - * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails + * ExpandedDataSetFilter inListFilter. + * @member {google.analytics.admin.v1alpha.ExpandedDataSetFilter.IInListFilter|null|undefined} inListFilter + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter * @instance */ - LinkProposalStatusDetails.prototype.requestorEmail = ""; + ExpandedDataSetFilter.prototype.inListFilter = null; /** - * LinkProposalStatusDetails linkProposalState. - * @member {google.analytics.admin.v1alpha.LinkProposalState} linkProposalState - * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails + * ExpandedDataSetFilter fieldName. + * @member {string} fieldName + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter * @instance */ - LinkProposalStatusDetails.prototype.linkProposalState = 0; + ExpandedDataSetFilter.prototype.fieldName = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new LinkProposalStatusDetails instance using the specified properties. + * ExpandedDataSetFilter oneFilter. + * @member {"stringFilter"|"inListFilter"|undefined} oneFilter + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter + * @instance + */ + Object.defineProperty(ExpandedDataSetFilter.prototype, "oneFilter", { + get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExpandedDataSetFilter instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter * @static - * @param {google.analytics.admin.v1alpha.ILinkProposalStatusDetails=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.LinkProposalStatusDetails} LinkProposalStatusDetails instance + * @param {google.analytics.admin.v1alpha.IExpandedDataSetFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilter} ExpandedDataSetFilter instance */ - LinkProposalStatusDetails.create = function create(properties) { - return new LinkProposalStatusDetails(properties); + ExpandedDataSetFilter.create = function create(properties) { + return new ExpandedDataSetFilter(properties); }; /** - * Encodes the specified LinkProposalStatusDetails message. Does not implicitly {@link google.analytics.admin.v1alpha.LinkProposalStatusDetails.verify|verify} messages. + * Encodes the specified ExpandedDataSetFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilter.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter * @static - * @param {google.analytics.admin.v1alpha.ILinkProposalStatusDetails} message LinkProposalStatusDetails message or plain object to encode + * @param {google.analytics.admin.v1alpha.IExpandedDataSetFilter} message ExpandedDataSetFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LinkProposalStatusDetails.encode = function encode(message, writer) { + ExpandedDataSetFilter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.linkProposalInitiatingProduct != null && Object.hasOwnProperty.call(message, "linkProposalInitiatingProduct")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.linkProposalInitiatingProduct); - if (message.requestorEmail != null && Object.hasOwnProperty.call(message, "requestorEmail")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestorEmail); - if (message.linkProposalState != null && Object.hasOwnProperty.call(message, "linkProposalState")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.linkProposalState); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) + $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.encode(message.stringFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) + $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter.encode(message.inListFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified LinkProposalStatusDetails message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.LinkProposalStatusDetails.verify|verify} messages. + * Encodes the specified ExpandedDataSetFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilter.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter * @static - * @param {google.analytics.admin.v1alpha.ILinkProposalStatusDetails} message LinkProposalStatusDetails message or plain object to encode + * @param {google.analytics.admin.v1alpha.IExpandedDataSetFilter} message ExpandedDataSetFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LinkProposalStatusDetails.encodeDelimited = function encodeDelimited(message, writer) { + ExpandedDataSetFilter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LinkProposalStatusDetails message from the specified reader or buffer. + * Decodes an ExpandedDataSetFilter message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.LinkProposalStatusDetails} LinkProposalStatusDetails + * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilter} ExpandedDataSetFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LinkProposalStatusDetails.decode = function decode(reader, length) { + ExpandedDataSetFilter.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.LinkProposalStatusDetails(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.linkProposalInitiatingProduct = reader.int32(); - break; - } case 2: { - message.requestorEmail = reader.string(); + message.stringFilter = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.decode(reader, reader.uint32()); break; } case 3: { - message.linkProposalState = reader.int32(); + message.inListFilter = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter.decode(reader, reader.uint32()); + break; + } + case 1: { + message.fieldName = reader.string(); break; } default: reader.skipType(tag & 7); break; } - } - return message; - }; - - /** - * Decodes a LinkProposalStatusDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.LinkProposalStatusDetails} LinkProposalStatusDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LinkProposalStatusDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LinkProposalStatusDetails message. - * @function verify - * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LinkProposalStatusDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.linkProposalInitiatingProduct != null && message.hasOwnProperty("linkProposalInitiatingProduct")) - switch (message.linkProposalInitiatingProduct) { - default: - return "linkProposalInitiatingProduct: enum value expected"; - case 0: - case 1: - case 2: - break; + } + return message; + }; + + /** + * Decodes an ExpandedDataSetFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilter} ExpandedDataSetFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExpandedDataSetFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExpandedDataSetFilter message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExpandedDataSetFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + properties.oneFilter = 1; + { + var error = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.verify(message.stringFilter); + if (error) + return "stringFilter." + error; + } + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter.verify(message.inListFilter); + if (error) + return "inListFilter." + error; + } + } + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + return null; + }; + + /** + * Creates an ExpandedDataSetFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilter} ExpandedDataSetFilter + */ + ExpandedDataSetFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter) + return object; + var message = new $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter(); + if (object.stringFilter != null) { + if (typeof object.stringFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ExpandedDataSetFilter.stringFilter: object expected"); + message.stringFilter = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.fromObject(object.stringFilter); + } + if (object.inListFilter != null) { + if (typeof object.inListFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ExpandedDataSetFilter.inListFilter: object expected"); + message.inListFilter = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter.fromObject(object.inListFilter); + } + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + return message; + }; + + /** + * Creates a plain object from an ExpandedDataSetFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter + * @static + * @param {google.analytics.admin.v1alpha.ExpandedDataSetFilter} message ExpandedDataSetFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExpandedDataSetFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.fieldName = ""; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + object.stringFilter = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.toObject(message.stringFilter, options); + if (options.oneofs) + object.oneFilter = "stringFilter"; + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + object.inListFilter = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter.toObject(message.inListFilter, options); + if (options.oneofs) + object.oneFilter = "inListFilter"; + } + return object; + }; + + /** + * Converts this ExpandedDataSetFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter + * @instance + * @returns {Object.} JSON object + */ + ExpandedDataSetFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExpandedDataSetFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExpandedDataSetFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ExpandedDataSetFilter"; + }; + + ExpandedDataSetFilter.StringFilter = (function() { + + /** + * Properties of a StringFilter. + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter + * @interface IStringFilter + * @property {google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.MatchType|null} [matchType] StringFilter matchType + * @property {string|null} [value] StringFilter value + * @property {boolean|null} [caseSensitive] StringFilter caseSensitive + */ + + /** + * Constructs a new StringFilter. + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter + * @classdesc Represents a StringFilter. + * @implements IStringFilter + * @constructor + * @param {google.analytics.admin.v1alpha.ExpandedDataSetFilter.IStringFilter=} [properties] Properties to set + */ + function StringFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StringFilter matchType. + * @member {google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.MatchType} matchType + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter + * @instance + */ + StringFilter.prototype.matchType = 0; + + /** + * StringFilter value. + * @member {string} value + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter + * @instance + */ + StringFilter.prototype.value = ""; + + /** + * StringFilter caseSensitive. + * @member {boolean} caseSensitive + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter + * @instance + */ + StringFilter.prototype.caseSensitive = false; + + /** + * Creates a new StringFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter + * @static + * @param {google.analytics.admin.v1alpha.ExpandedDataSetFilter.IStringFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter} StringFilter instance + */ + StringFilter.create = function create(properties) { + return new StringFilter(properties); + }; + + /** + * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter + * @static + * @param {google.analytics.admin.v1alpha.ExpandedDataSetFilter.IStringFilter} message StringFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.matchType != null && Object.hasOwnProperty.call(message, "matchType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.matchType); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.caseSensitive); + return writer; + }; + + /** + * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter + * @static + * @param {google.analytics.admin.v1alpha.ExpandedDataSetFilter.IStringFilter} message StringFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StringFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter} StringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.matchType = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + case 3: { + message.caseSensitive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StringFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter} StringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StringFilter message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.matchType != null && message.hasOwnProperty("matchType")) + switch (message.matchType) { + default: + return "matchType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (typeof message.caseSensitive !== "boolean") + return "caseSensitive: boolean expected"; + return null; + }; + + /** + * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter} StringFilter + */ + StringFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter) + return object; + var message = new $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter(); + switch (object.matchType) { + default: + if (typeof object.matchType === "number") { + message.matchType = object.matchType; + break; + } + break; + case "MATCH_TYPE_UNSPECIFIED": + case 0: + message.matchType = 0; + break; + case "EXACT": + case 1: + message.matchType = 1; + break; + case "CONTAINS": + case 2: + message.matchType = 2; + break; + } + if (object.value != null) + message.value = String(object.value); + if (object.caseSensitive != null) + message.caseSensitive = Boolean(object.caseSensitive); + return message; + }; + + /** + * Creates a plain object from a StringFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter + * @static + * @param {google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter} message StringFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.matchType = options.enums === String ? "MATCH_TYPE_UNSPECIFIED" : 0; + object.value = ""; + object.caseSensitive = false; + } + if (message.matchType != null && message.hasOwnProperty("matchType")) + object.matchType = options.enums === String ? $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.MatchType[message.matchType] === undefined ? message.matchType : $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.MatchType[message.matchType] : message.matchType; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + object.caseSensitive = message.caseSensitive; + return object; + }; + + /** + * Converts this StringFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter + * @instance + * @returns {Object.} JSON object + */ + StringFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StringFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter"; + }; + + /** + * MatchType enum. + * @name google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.MatchType + * @enum {number} + * @property {number} MATCH_TYPE_UNSPECIFIED=0 MATCH_TYPE_UNSPECIFIED value + * @property {number} EXACT=1 EXACT value + * @property {number} CONTAINS=2 CONTAINS value + */ + StringFilter.MatchType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MATCH_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXACT"] = 1; + values[valuesById[2] = "CONTAINS"] = 2; + return values; + })(); + + return StringFilter; + })(); + + ExpandedDataSetFilter.InListFilter = (function() { + + /** + * Properties of an InListFilter. + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter + * @interface IInListFilter + * @property {Array.|null} [values] InListFilter values + * @property {boolean|null} [caseSensitive] InListFilter caseSensitive + */ + + /** + * Constructs a new InListFilter. + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter + * @classdesc Represents an InListFilter. + * @implements IInListFilter + * @constructor + * @param {google.analytics.admin.v1alpha.ExpandedDataSetFilter.IInListFilter=} [properties] Properties to set + */ + function InListFilter(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]]; + } + + /** + * InListFilter values. + * @member {Array.} values + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter + * @instance + */ + InListFilter.prototype.values = $util.emptyArray; + + /** + * InListFilter caseSensitive. + * @member {boolean} caseSensitive + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter + * @instance + */ + InListFilter.prototype.caseSensitive = false; + + /** + * Creates a new InListFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter + * @static + * @param {google.analytics.admin.v1alpha.ExpandedDataSetFilter.IInListFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter} InListFilter instance + */ + InListFilter.create = function create(properties) { + return new InListFilter(properties); + }; + + /** + * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter + * @static + * @param {google.analytics.admin.v1alpha.ExpandedDataSetFilter.IInListFilter} message InListFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InListFilter.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) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]); + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.caseSensitive); + return writer; + }; + + /** + * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter + * @static + * @param {google.analytics.admin.v1alpha.ExpandedDataSetFilter.IInListFilter} message InListFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InListFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InListFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter} InListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InListFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + case 2: { + message.caseSensitive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InListFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter} InListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InListFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InListFilter message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InListFilter.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) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (typeof message.caseSensitive !== "boolean") + return "caseSensitive: boolean expected"; + return null; + }; + + /** + * Creates an InListFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter} InListFilter + */ + InListFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter) + return object; + var message = new $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + if (object.caseSensitive != null) + message.caseSensitive = Boolean(object.caseSensitive); + return message; + }; + + /** + * Creates a plain object from an InListFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter + * @static + * @param {google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter} message InListFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InListFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (options.defaults) + object.caseSensitive = false; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + object.caseSensitive = message.caseSensitive; + return object; + }; + + /** + * Converts this InListFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter + * @instance + * @returns {Object.} JSON object + */ + InListFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InListFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InListFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter"; + }; + + return InListFilter; + })(); + + return ExpandedDataSetFilter; + })(); + + v1alpha.ExpandedDataSetFilterExpression = (function() { + + /** + * Properties of an ExpandedDataSetFilterExpression. + * @memberof google.analytics.admin.v1alpha + * @interface IExpandedDataSetFilterExpression + * @property {google.analytics.admin.v1alpha.IExpandedDataSetFilterExpressionList|null} [andGroup] ExpandedDataSetFilterExpression andGroup + * @property {google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression|null} [notExpression] ExpandedDataSetFilterExpression notExpression + * @property {google.analytics.admin.v1alpha.IExpandedDataSetFilter|null} [filter] ExpandedDataSetFilterExpression filter + */ + + /** + * Constructs a new ExpandedDataSetFilterExpression. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an ExpandedDataSetFilterExpression. + * @implements IExpandedDataSetFilterExpression + * @constructor + * @param {google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression=} [properties] Properties to set + */ + function ExpandedDataSetFilterExpression(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExpandedDataSetFilterExpression andGroup. + * @member {google.analytics.admin.v1alpha.IExpandedDataSetFilterExpressionList|null|undefined} andGroup + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression + * @instance + */ + ExpandedDataSetFilterExpression.prototype.andGroup = null; + + /** + * ExpandedDataSetFilterExpression notExpression. + * @member {google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression|null|undefined} notExpression + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression + * @instance + */ + ExpandedDataSetFilterExpression.prototype.notExpression = null; + + /** + * ExpandedDataSetFilterExpression filter. + * @member {google.analytics.admin.v1alpha.IExpandedDataSetFilter|null|undefined} filter + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression + * @instance + */ + ExpandedDataSetFilterExpression.prototype.filter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExpandedDataSetFilterExpression expr. + * @member {"andGroup"|"notExpression"|"filter"|undefined} expr + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression + * @instance + */ + Object.defineProperty(ExpandedDataSetFilterExpression.prototype, "expr", { + get: $util.oneOfGetter($oneOfFields = ["andGroup", "notExpression", "filter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExpandedDataSetFilterExpression instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression + * @static + * @param {google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression} ExpandedDataSetFilterExpression instance + */ + ExpandedDataSetFilterExpression.create = function create(properties) { + return new ExpandedDataSetFilterExpression(properties); + }; + + /** + * Encodes the specified ExpandedDataSetFilterExpression message. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression + * @static + * @param {google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression} message ExpandedDataSetFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExpandedDataSetFilterExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) + $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) + $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.encode(message.notExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.encode(message.filter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExpandedDataSetFilterExpression message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression + * @static + * @param {google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression} message ExpandedDataSetFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExpandedDataSetFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExpandedDataSetFilterExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression} ExpandedDataSetFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExpandedDataSetFilterExpression.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.andGroup = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 2: { + message.notExpression = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.decode(reader, reader.uint32()); + break; + } + case 3: { + message.filter = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExpandedDataSetFilterExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression} ExpandedDataSetFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExpandedDataSetFilterExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExpandedDataSetFilterExpression message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExpandedDataSetFilterExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + properties.expr = 1; + { + var error = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList.verify(message.andGroup); + if (error) + return "andGroup." + error; + } + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.verify(message.notExpression); + if (error) + return "notExpression." + error; + } + } + if (message.filter != null && message.hasOwnProperty("filter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.verify(message.filter); + if (error) + return "filter." + error; + } + } + return null; + }; + + /** + * Creates an ExpandedDataSetFilterExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression} ExpandedDataSetFilterExpression + */ + ExpandedDataSetFilterExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression) + return object; + var message = new $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression(); + if (object.andGroup != null) { + if (typeof object.andGroup !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.andGroup: object expected"); + message.andGroup = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList.fromObject(object.andGroup); + } + if (object.notExpression != null) { + if (typeof object.notExpression !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.notExpression: object expected"); + message.notExpression = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.fromObject(object.notExpression); + } + if (object.filter != null) { + if (typeof object.filter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.filter: object expected"); + message.filter = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.fromObject(object.filter); + } + return message; + }; + + /** + * Creates a plain object from an ExpandedDataSetFilterExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression + * @static + * @param {google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression} message ExpandedDataSetFilterExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExpandedDataSetFilterExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + object.andGroup = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList.toObject(message.andGroup, options); + if (options.oneofs) + object.expr = "andGroup"; + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + object.notExpression = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.toObject(message.notExpression, options); + if (options.oneofs) + object.expr = "notExpression"; + } + if (message.filter != null && message.hasOwnProperty("filter")) { + object.filter = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.toObject(message.filter, options); + if (options.oneofs) + object.expr = "filter"; + } + return object; + }; + + /** + * Converts this ExpandedDataSetFilterExpression to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression + * @instance + * @returns {Object.} JSON object + */ + ExpandedDataSetFilterExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExpandedDataSetFilterExpression + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExpandedDataSetFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression"; + }; + + return ExpandedDataSetFilterExpression; + })(); + + v1alpha.ExpandedDataSetFilterExpressionList = (function() { + + /** + * Properties of an ExpandedDataSetFilterExpressionList. + * @memberof google.analytics.admin.v1alpha + * @interface IExpandedDataSetFilterExpressionList + * @property {Array.|null} [filterExpressions] ExpandedDataSetFilterExpressionList filterExpressions + */ + + /** + * Constructs a new ExpandedDataSetFilterExpressionList. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an ExpandedDataSetFilterExpressionList. + * @implements IExpandedDataSetFilterExpressionList + * @constructor + * @param {google.analytics.admin.v1alpha.IExpandedDataSetFilterExpressionList=} [properties] Properties to set + */ + function ExpandedDataSetFilterExpressionList(properties) { + this.filterExpressions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExpandedDataSetFilterExpressionList filterExpressions. + * @member {Array.} filterExpressions + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList + * @instance + */ + ExpandedDataSetFilterExpressionList.prototype.filterExpressions = $util.emptyArray; + + /** + * Creates a new ExpandedDataSetFilterExpressionList instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList + * @static + * @param {google.analytics.admin.v1alpha.IExpandedDataSetFilterExpressionList=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList} ExpandedDataSetFilterExpressionList instance + */ + ExpandedDataSetFilterExpressionList.create = function create(properties) { + return new ExpandedDataSetFilterExpressionList(properties); + }; + + /** + * Encodes the specified ExpandedDataSetFilterExpressionList message. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList + * @static + * @param {google.analytics.admin.v1alpha.IExpandedDataSetFilterExpressionList} message ExpandedDataSetFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExpandedDataSetFilterExpressionList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filterExpressions != null && message.filterExpressions.length) + for (var i = 0; i < message.filterExpressions.length; ++i) + $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.encode(message.filterExpressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExpandedDataSetFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList + * @static + * @param {google.analytics.admin.v1alpha.IExpandedDataSetFilterExpressionList} message ExpandedDataSetFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExpandedDataSetFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExpandedDataSetFilterExpressionList message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList} ExpandedDataSetFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExpandedDataSetFilterExpressionList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.filterExpressions && message.filterExpressions.length)) + message.filterExpressions = []; + message.filterExpressions.push($root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExpandedDataSetFilterExpressionList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList} ExpandedDataSetFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExpandedDataSetFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExpandedDataSetFilterExpressionList message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExpandedDataSetFilterExpressionList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filterExpressions != null && message.hasOwnProperty("filterExpressions")) { + if (!Array.isArray(message.filterExpressions)) + return "filterExpressions: array expected"; + for (var i = 0; i < message.filterExpressions.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.verify(message.filterExpressions[i]); + if (error) + return "filterExpressions." + error; + } + } + return null; + }; + + /** + * Creates an ExpandedDataSetFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList} ExpandedDataSetFilterExpressionList + */ + ExpandedDataSetFilterExpressionList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList) + return object; + var message = new $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList(); + if (object.filterExpressions) { + if (!Array.isArray(object.filterExpressions)) + throw TypeError(".google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList.filterExpressions: array expected"); + message.filterExpressions = []; + for (var i = 0; i < object.filterExpressions.length; ++i) { + if (typeof object.filterExpressions[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList.filterExpressions: object expected"); + message.filterExpressions[i] = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.fromObject(object.filterExpressions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExpandedDataSetFilterExpressionList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList + * @static + * @param {google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList} message ExpandedDataSetFilterExpressionList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExpandedDataSetFilterExpressionList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.filterExpressions = []; + if (message.filterExpressions && message.filterExpressions.length) { + object.filterExpressions = []; + for (var j = 0; j < message.filterExpressions.length; ++j) + object.filterExpressions[j] = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.toObject(message.filterExpressions[j], options); + } + return object; + }; + + /** + * Converts this ExpandedDataSetFilterExpressionList to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList + * @instance + * @returns {Object.} JSON object + */ + ExpandedDataSetFilterExpressionList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExpandedDataSetFilterExpressionList + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExpandedDataSetFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList"; + }; + + return ExpandedDataSetFilterExpressionList; + })(); + + v1alpha.ExpandedDataSet = (function() { + + /** + * Properties of an ExpandedDataSet. + * @memberof google.analytics.admin.v1alpha + * @interface IExpandedDataSet + * @property {string|null} [name] ExpandedDataSet name + * @property {string|null} [displayName] ExpandedDataSet displayName + * @property {string|null} [description] ExpandedDataSet description + * @property {Array.|null} [dimensionNames] ExpandedDataSet dimensionNames + * @property {Array.|null} [metricNames] ExpandedDataSet metricNames + * @property {google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression|null} [dimensionFilterExpression] ExpandedDataSet dimensionFilterExpression + * @property {google.protobuf.ITimestamp|null} [dataCollectionStartTime] ExpandedDataSet dataCollectionStartTime + */ + + /** + * Constructs a new ExpandedDataSet. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an ExpandedDataSet. + * @implements IExpandedDataSet + * @constructor + * @param {google.analytics.admin.v1alpha.IExpandedDataSet=} [properties] Properties to set + */ + function ExpandedDataSet(properties) { + this.dimensionNames = []; + this.metricNames = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExpandedDataSet name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * @instance + */ + ExpandedDataSet.prototype.name = ""; + + /** + * ExpandedDataSet displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * @instance + */ + ExpandedDataSet.prototype.displayName = ""; + + /** + * ExpandedDataSet description. + * @member {string} description + * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * @instance + */ + ExpandedDataSet.prototype.description = ""; + + /** + * ExpandedDataSet dimensionNames. + * @member {Array.} dimensionNames + * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * @instance + */ + ExpandedDataSet.prototype.dimensionNames = $util.emptyArray; + + /** + * ExpandedDataSet metricNames. + * @member {Array.} metricNames + * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * @instance + */ + ExpandedDataSet.prototype.metricNames = $util.emptyArray; + + /** + * ExpandedDataSet dimensionFilterExpression. + * @member {google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression|null|undefined} dimensionFilterExpression + * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * @instance + */ + ExpandedDataSet.prototype.dimensionFilterExpression = null; + + /** + * ExpandedDataSet dataCollectionStartTime. + * @member {google.protobuf.ITimestamp|null|undefined} dataCollectionStartTime + * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * @instance + */ + ExpandedDataSet.prototype.dataCollectionStartTime = null; + + /** + * Creates a new ExpandedDataSet instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * @static + * @param {google.analytics.admin.v1alpha.IExpandedDataSet=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ExpandedDataSet} ExpandedDataSet instance + */ + ExpandedDataSet.create = function create(properties) { + return new ExpandedDataSet(properties); + }; + + /** + * Encodes the specified ExpandedDataSet message. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSet.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * @static + * @param {google.analytics.admin.v1alpha.IExpandedDataSet} message ExpandedDataSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExpandedDataSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.dimensionNames != null && message.dimensionNames.length) + for (var i = 0; i < message.dimensionNames.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.dimensionNames[i]); + if (message.metricNames != null && message.metricNames.length) + for (var i = 0; i < message.metricNames.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.metricNames[i]); + if (message.dimensionFilterExpression != null && Object.hasOwnProperty.call(message, "dimensionFilterExpression")) + $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.encode(message.dimensionFilterExpression, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.dataCollectionStartTime != null && Object.hasOwnProperty.call(message, "dataCollectionStartTime")) + $root.google.protobuf.Timestamp.encode(message.dataCollectionStartTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExpandedDataSet message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * @static + * @param {google.analytics.admin.v1alpha.IExpandedDataSet} message ExpandedDataSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExpandedDataSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExpandedDataSet message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ExpandedDataSet} ExpandedDataSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExpandedDataSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ExpandedDataSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + if (!(message.dimensionNames && message.dimensionNames.length)) + message.dimensionNames = []; + message.dimensionNames.push(reader.string()); + break; + } + case 5: { + if (!(message.metricNames && message.metricNames.length)) + message.metricNames = []; + message.metricNames.push(reader.string()); + break; + } + case 6: { + message.dimensionFilterExpression = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.decode(reader, reader.uint32()); + break; + } + case 7: { + message.dataCollectionStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExpandedDataSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ExpandedDataSet} ExpandedDataSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExpandedDataSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExpandedDataSet message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExpandedDataSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.dimensionNames != null && message.hasOwnProperty("dimensionNames")) { + if (!Array.isArray(message.dimensionNames)) + return "dimensionNames: array expected"; + for (var i = 0; i < message.dimensionNames.length; ++i) + if (!$util.isString(message.dimensionNames[i])) + return "dimensionNames: string[] expected"; + } + if (message.metricNames != null && message.hasOwnProperty("metricNames")) { + if (!Array.isArray(message.metricNames)) + return "metricNames: array expected"; + for (var i = 0; i < message.metricNames.length; ++i) + if (!$util.isString(message.metricNames[i])) + return "metricNames: string[] expected"; + } + if (message.dimensionFilterExpression != null && message.hasOwnProperty("dimensionFilterExpression")) { + var error = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.verify(message.dimensionFilterExpression); + if (error) + return "dimensionFilterExpression." + error; + } + if (message.dataCollectionStartTime != null && message.hasOwnProperty("dataCollectionStartTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.dataCollectionStartTime); + if (error) + return "dataCollectionStartTime." + error; + } + return null; + }; + + /** + * Creates an ExpandedDataSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ExpandedDataSet} ExpandedDataSet + */ + ExpandedDataSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ExpandedDataSet) + return object; + var message = new $root.google.analytics.admin.v1alpha.ExpandedDataSet(); + 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.dimensionNames) { + if (!Array.isArray(object.dimensionNames)) + throw TypeError(".google.analytics.admin.v1alpha.ExpandedDataSet.dimensionNames: array expected"); + message.dimensionNames = []; + for (var i = 0; i < object.dimensionNames.length; ++i) + message.dimensionNames[i] = String(object.dimensionNames[i]); + } + if (object.metricNames) { + if (!Array.isArray(object.metricNames)) + throw TypeError(".google.analytics.admin.v1alpha.ExpandedDataSet.metricNames: array expected"); + message.metricNames = []; + for (var i = 0; i < object.metricNames.length; ++i) + message.metricNames[i] = String(object.metricNames[i]); + } + if (object.dimensionFilterExpression != null) { + if (typeof object.dimensionFilterExpression !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ExpandedDataSet.dimensionFilterExpression: object expected"); + message.dimensionFilterExpression = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.fromObject(object.dimensionFilterExpression); + } + if (object.dataCollectionStartTime != null) { + if (typeof object.dataCollectionStartTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ExpandedDataSet.dataCollectionStartTime: object expected"); + message.dataCollectionStartTime = $root.google.protobuf.Timestamp.fromObject(object.dataCollectionStartTime); + } + return message; + }; + + /** + * Creates a plain object from an ExpandedDataSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * @static + * @param {google.analytics.admin.v1alpha.ExpandedDataSet} message ExpandedDataSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExpandedDataSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensionNames = []; + object.metricNames = []; + } + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.description = ""; + object.dimensionFilterExpression = null; + object.dataCollectionStartTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.dimensionNames && message.dimensionNames.length) { + object.dimensionNames = []; + for (var j = 0; j < message.dimensionNames.length; ++j) + object.dimensionNames[j] = message.dimensionNames[j]; + } + if (message.metricNames && message.metricNames.length) { + object.metricNames = []; + for (var j = 0; j < message.metricNames.length; ++j) + object.metricNames[j] = message.metricNames[j]; + } + if (message.dimensionFilterExpression != null && message.hasOwnProperty("dimensionFilterExpression")) + object.dimensionFilterExpression = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.toObject(message.dimensionFilterExpression, options); + if (message.dataCollectionStartTime != null && message.hasOwnProperty("dataCollectionStartTime")) + object.dataCollectionStartTime = $root.google.protobuf.Timestamp.toObject(message.dataCollectionStartTime, options); + return object; + }; + + /** + * Converts this ExpandedDataSet to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * @instance + * @returns {Object.} JSON object + */ + ExpandedDataSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExpandedDataSet + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExpandedDataSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ExpandedDataSet"; + }; + + return ExpandedDataSet; + })(); + + /** + * IndustryCategory enum. + * @name google.analytics.admin.v1alpha.IndustryCategory + * @enum {number} + * @property {number} INDUSTRY_CATEGORY_UNSPECIFIED=0 INDUSTRY_CATEGORY_UNSPECIFIED value + * @property {number} AUTOMOTIVE=1 AUTOMOTIVE value + * @property {number} BUSINESS_AND_INDUSTRIAL_MARKETS=2 BUSINESS_AND_INDUSTRIAL_MARKETS value + * @property {number} FINANCE=3 FINANCE value + * @property {number} HEALTHCARE=4 HEALTHCARE value + * @property {number} TECHNOLOGY=5 TECHNOLOGY value + * @property {number} TRAVEL=6 TRAVEL value + * @property {number} OTHER=7 OTHER value + * @property {number} ARTS_AND_ENTERTAINMENT=8 ARTS_AND_ENTERTAINMENT value + * @property {number} BEAUTY_AND_FITNESS=9 BEAUTY_AND_FITNESS value + * @property {number} BOOKS_AND_LITERATURE=10 BOOKS_AND_LITERATURE value + * @property {number} FOOD_AND_DRINK=11 FOOD_AND_DRINK value + * @property {number} GAMES=12 GAMES value + * @property {number} HOBBIES_AND_LEISURE=13 HOBBIES_AND_LEISURE value + * @property {number} HOME_AND_GARDEN=14 HOME_AND_GARDEN value + * @property {number} INTERNET_AND_TELECOM=15 INTERNET_AND_TELECOM value + * @property {number} LAW_AND_GOVERNMENT=16 LAW_AND_GOVERNMENT value + * @property {number} NEWS=17 NEWS value + * @property {number} ONLINE_COMMUNITIES=18 ONLINE_COMMUNITIES value + * @property {number} PEOPLE_AND_SOCIETY=19 PEOPLE_AND_SOCIETY value + * @property {number} PETS_AND_ANIMALS=20 PETS_AND_ANIMALS value + * @property {number} REAL_ESTATE=21 REAL_ESTATE value + * @property {number} REFERENCE=22 REFERENCE value + * @property {number} SCIENCE=23 SCIENCE value + * @property {number} SPORTS=24 SPORTS value + * @property {number} JOBS_AND_EDUCATION=25 JOBS_AND_EDUCATION value + * @property {number} SHOPPING=26 SHOPPING value + */ + v1alpha.IndustryCategory = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INDUSTRY_CATEGORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "AUTOMOTIVE"] = 1; + values[valuesById[2] = "BUSINESS_AND_INDUSTRIAL_MARKETS"] = 2; + values[valuesById[3] = "FINANCE"] = 3; + values[valuesById[4] = "HEALTHCARE"] = 4; + values[valuesById[5] = "TECHNOLOGY"] = 5; + values[valuesById[6] = "TRAVEL"] = 6; + values[valuesById[7] = "OTHER"] = 7; + values[valuesById[8] = "ARTS_AND_ENTERTAINMENT"] = 8; + values[valuesById[9] = "BEAUTY_AND_FITNESS"] = 9; + values[valuesById[10] = "BOOKS_AND_LITERATURE"] = 10; + values[valuesById[11] = "FOOD_AND_DRINK"] = 11; + values[valuesById[12] = "GAMES"] = 12; + values[valuesById[13] = "HOBBIES_AND_LEISURE"] = 13; + values[valuesById[14] = "HOME_AND_GARDEN"] = 14; + values[valuesById[15] = "INTERNET_AND_TELECOM"] = 15; + values[valuesById[16] = "LAW_AND_GOVERNMENT"] = 16; + values[valuesById[17] = "NEWS"] = 17; + values[valuesById[18] = "ONLINE_COMMUNITIES"] = 18; + values[valuesById[19] = "PEOPLE_AND_SOCIETY"] = 19; + values[valuesById[20] = "PETS_AND_ANIMALS"] = 20; + values[valuesById[21] = "REAL_ESTATE"] = 21; + values[valuesById[22] = "REFERENCE"] = 22; + values[valuesById[23] = "SCIENCE"] = 23; + values[valuesById[24] = "SPORTS"] = 24; + values[valuesById[25] = "JOBS_AND_EDUCATION"] = 25; + values[valuesById[26] = "SHOPPING"] = 26; + return values; + })(); + + /** + * ServiceLevel enum. + * @name google.analytics.admin.v1alpha.ServiceLevel + * @enum {number} + * @property {number} SERVICE_LEVEL_UNSPECIFIED=0 SERVICE_LEVEL_UNSPECIFIED value + * @property {number} GOOGLE_ANALYTICS_STANDARD=1 GOOGLE_ANALYTICS_STANDARD value + * @property {number} GOOGLE_ANALYTICS_360=2 GOOGLE_ANALYTICS_360 value + */ + v1alpha.ServiceLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SERVICE_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "GOOGLE_ANALYTICS_STANDARD"] = 1; + values[valuesById[2] = "GOOGLE_ANALYTICS_360"] = 2; + return values; + })(); + + /** + * ActorType enum. + * @name google.analytics.admin.v1alpha.ActorType + * @enum {number} + * @property {number} ACTOR_TYPE_UNSPECIFIED=0 ACTOR_TYPE_UNSPECIFIED value + * @property {number} USER=1 USER value + * @property {number} SYSTEM=2 SYSTEM value + * @property {number} SUPPORT=3 SUPPORT value + */ + v1alpha.ActorType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTOR_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "USER"] = 1; + values[valuesById[2] = "SYSTEM"] = 2; + values[valuesById[3] = "SUPPORT"] = 3; + return values; + })(); + + /** + * ActionType enum. + * @name google.analytics.admin.v1alpha.ActionType + * @enum {number} + * @property {number} ACTION_TYPE_UNSPECIFIED=0 ACTION_TYPE_UNSPECIFIED value + * @property {number} CREATED=1 CREATED value + * @property {number} UPDATED=2 UPDATED value + * @property {number} DELETED=3 DELETED value + */ + v1alpha.ActionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATED"] = 1; + values[valuesById[2] = "UPDATED"] = 2; + values[valuesById[3] = "DELETED"] = 3; + return values; + })(); + + /** + * ChangeHistoryResourceType enum. + * @name google.analytics.admin.v1alpha.ChangeHistoryResourceType + * @enum {number} + * @property {number} CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED=0 CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED value + * @property {number} ACCOUNT=1 ACCOUNT value + * @property {number} PROPERTY=2 PROPERTY value + * @property {number} FIREBASE_LINK=6 FIREBASE_LINK value + * @property {number} GOOGLE_ADS_LINK=7 GOOGLE_ADS_LINK value + * @property {number} GOOGLE_SIGNALS_SETTINGS=8 GOOGLE_SIGNALS_SETTINGS value + * @property {number} CONVERSION_EVENT=9 CONVERSION_EVENT value + * @property {number} MEASUREMENT_PROTOCOL_SECRET=10 MEASUREMENT_PROTOCOL_SECRET value + * @property {number} CUSTOM_DIMENSION=11 CUSTOM_DIMENSION value + * @property {number} CUSTOM_METRIC=12 CUSTOM_METRIC value + * @property {number} DATA_RETENTION_SETTINGS=13 DATA_RETENTION_SETTINGS value + * @property {number} DISPLAY_VIDEO_360_ADVERTISER_LINK=14 DISPLAY_VIDEO_360_ADVERTISER_LINK value + * @property {number} DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL=15 DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL value + * @property {number} SEARCH_ADS_360_LINK=16 SEARCH_ADS_360_LINK value + * @property {number} DATA_STREAM=18 DATA_STREAM value + * @property {number} ATTRIBUTION_SETTINGS=20 ATTRIBUTION_SETTINGS value + * @property {number} EXPANDED_DATA_SET=21 EXPANDED_DATA_SET value + * @property {number} CHANNEL_GROUP=22 CHANNEL_GROUP value + */ + v1alpha.ChangeHistoryResourceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACCOUNT"] = 1; + values[valuesById[2] = "PROPERTY"] = 2; + values[valuesById[6] = "FIREBASE_LINK"] = 6; + values[valuesById[7] = "GOOGLE_ADS_LINK"] = 7; + values[valuesById[8] = "GOOGLE_SIGNALS_SETTINGS"] = 8; + values[valuesById[9] = "CONVERSION_EVENT"] = 9; + values[valuesById[10] = "MEASUREMENT_PROTOCOL_SECRET"] = 10; + values[valuesById[11] = "CUSTOM_DIMENSION"] = 11; + values[valuesById[12] = "CUSTOM_METRIC"] = 12; + values[valuesById[13] = "DATA_RETENTION_SETTINGS"] = 13; + values[valuesById[14] = "DISPLAY_VIDEO_360_ADVERTISER_LINK"] = 14; + values[valuesById[15] = "DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL"] = 15; + values[valuesById[16] = "SEARCH_ADS_360_LINK"] = 16; + values[valuesById[18] = "DATA_STREAM"] = 18; + values[valuesById[20] = "ATTRIBUTION_SETTINGS"] = 20; + values[valuesById[21] = "EXPANDED_DATA_SET"] = 21; + values[valuesById[22] = "CHANNEL_GROUP"] = 22; + return values; + })(); + + /** + * GoogleSignalsState enum. + * @name google.analytics.admin.v1alpha.GoogleSignalsState + * @enum {number} + * @property {number} GOOGLE_SIGNALS_STATE_UNSPECIFIED=0 GOOGLE_SIGNALS_STATE_UNSPECIFIED value + * @property {number} GOOGLE_SIGNALS_ENABLED=1 GOOGLE_SIGNALS_ENABLED value + * @property {number} GOOGLE_SIGNALS_DISABLED=2 GOOGLE_SIGNALS_DISABLED value + */ + v1alpha.GoogleSignalsState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GOOGLE_SIGNALS_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "GOOGLE_SIGNALS_ENABLED"] = 1; + values[valuesById[2] = "GOOGLE_SIGNALS_DISABLED"] = 2; + return values; + })(); + + /** + * GoogleSignalsConsent enum. + * @name google.analytics.admin.v1alpha.GoogleSignalsConsent + * @enum {number} + * @property {number} GOOGLE_SIGNALS_CONSENT_UNSPECIFIED=0 GOOGLE_SIGNALS_CONSENT_UNSPECIFIED value + * @property {number} GOOGLE_SIGNALS_CONSENT_CONSENTED=2 GOOGLE_SIGNALS_CONSENT_CONSENTED value + * @property {number} GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED=1 GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED value + */ + v1alpha.GoogleSignalsConsent = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GOOGLE_SIGNALS_CONSENT_UNSPECIFIED"] = 0; + values[valuesById[2] = "GOOGLE_SIGNALS_CONSENT_CONSENTED"] = 2; + values[valuesById[1] = "GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED"] = 1; + return values; + })(); + + /** + * LinkProposalInitiatingProduct enum. + * @name google.analytics.admin.v1alpha.LinkProposalInitiatingProduct + * @enum {number} + * @property {number} LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED=0 LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED value + * @property {number} GOOGLE_ANALYTICS=1 GOOGLE_ANALYTICS value + * @property {number} LINKED_PRODUCT=2 LINKED_PRODUCT value + */ + v1alpha.LinkProposalInitiatingProduct = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED"] = 0; + values[valuesById[1] = "GOOGLE_ANALYTICS"] = 1; + values[valuesById[2] = "LINKED_PRODUCT"] = 2; + return values; + })(); + + /** + * LinkProposalState enum. + * @name google.analytics.admin.v1alpha.LinkProposalState + * @enum {number} + * @property {number} LINK_PROPOSAL_STATE_UNSPECIFIED=0 LINK_PROPOSAL_STATE_UNSPECIFIED value + * @property {number} AWAITING_REVIEW_FROM_GOOGLE_ANALYTICS=1 AWAITING_REVIEW_FROM_GOOGLE_ANALYTICS value + * @property {number} AWAITING_REVIEW_FROM_LINKED_PRODUCT=2 AWAITING_REVIEW_FROM_LINKED_PRODUCT value + * @property {number} WITHDRAWN=3 WITHDRAWN value + * @property {number} DECLINED=4 DECLINED value + * @property {number} EXPIRED=5 EXPIRED value + * @property {number} OBSOLETE=6 OBSOLETE value + */ + v1alpha.LinkProposalState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LINK_PROPOSAL_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "AWAITING_REVIEW_FROM_GOOGLE_ANALYTICS"] = 1; + values[valuesById[2] = "AWAITING_REVIEW_FROM_LINKED_PRODUCT"] = 2; + values[valuesById[3] = "WITHDRAWN"] = 3; + values[valuesById[4] = "DECLINED"] = 4; + values[valuesById[5] = "EXPIRED"] = 5; + values[valuesById[6] = "OBSOLETE"] = 6; + return values; + })(); + + /** + * PropertyType enum. + * @name google.analytics.admin.v1alpha.PropertyType + * @enum {number} + * @property {number} PROPERTY_TYPE_UNSPECIFIED=0 PROPERTY_TYPE_UNSPECIFIED value + * @property {number} PROPERTY_TYPE_ORDINARY=1 PROPERTY_TYPE_ORDINARY value + * @property {number} PROPERTY_TYPE_SUBPROPERTY=2 PROPERTY_TYPE_SUBPROPERTY value + * @property {number} PROPERTY_TYPE_ROLLUP=3 PROPERTY_TYPE_ROLLUP value + */ + v1alpha.PropertyType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROPERTY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PROPERTY_TYPE_ORDINARY"] = 1; + values[valuesById[2] = "PROPERTY_TYPE_SUBPROPERTY"] = 2; + values[valuesById[3] = "PROPERTY_TYPE_ROLLUP"] = 3; + return values; + })(); + + v1alpha.Account = (function() { + + /** + * Properties of an Account. + * @memberof google.analytics.admin.v1alpha + * @interface IAccount + * @property {string|null} [name] Account name + * @property {google.protobuf.ITimestamp|null} [createTime] Account createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Account updateTime + * @property {string|null} [displayName] Account displayName + * @property {string|null} [regionCode] Account regionCode + * @property {boolean|null} [deleted] Account deleted + */ + + /** + * Constructs a new Account. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an Account. + * @implements IAccount + * @constructor + * @param {google.analytics.admin.v1alpha.IAccount=} [properties] Properties to set + */ + function Account(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Account name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.Account + * @instance + */ + Account.prototype.name = ""; + + /** + * Account createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.analytics.admin.v1alpha.Account + * @instance + */ + Account.prototype.createTime = null; + + /** + * Account updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.analytics.admin.v1alpha.Account + * @instance + */ + Account.prototype.updateTime = null; + + /** + * Account displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1alpha.Account + * @instance + */ + Account.prototype.displayName = ""; + + /** + * Account regionCode. + * @member {string} regionCode + * @memberof google.analytics.admin.v1alpha.Account + * @instance + */ + Account.prototype.regionCode = ""; + + /** + * Account deleted. + * @member {boolean} deleted + * @memberof google.analytics.admin.v1alpha.Account + * @instance + */ + Account.prototype.deleted = false; + + /** + * Creates a new Account instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.Account + * @static + * @param {google.analytics.admin.v1alpha.IAccount=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.Account} Account instance + */ + Account.create = function create(properties) { + return new Account(properties); + }; + + /** + * Encodes the specified Account message. Does not implicitly {@link google.analytics.admin.v1alpha.Account.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.Account + * @static + * @param {google.analytics.admin.v1alpha.IAccount} message Account message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Account.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); + if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.regionCode); + if (message.deleted != null && Object.hasOwnProperty.call(message, "deleted")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deleted); + return writer; + }; + + /** + * Encodes the specified Account message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.Account.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.Account + * @static + * @param {google.analytics.admin.v1alpha.IAccount} message Account message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Account.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Account message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.Account + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.Account} Account + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Account.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.Account(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.displayName = reader.string(); + break; + } + case 5: { + message.regionCode = reader.string(); + break; + } + case 6: { + message.deleted = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Account message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.Account + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.Account} Account + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Account.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Account message. + * @function verify + * @memberof google.analytics.admin.v1alpha.Account + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Account.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + if (!$util.isString(message.regionCode)) + return "regionCode: string expected"; + if (message.deleted != null && message.hasOwnProperty("deleted")) + if (typeof message.deleted !== "boolean") + return "deleted: boolean expected"; + return null; + }; + + /** + * Creates an Account message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.Account + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.Account} Account + */ + Account.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.Account) + return object; + var message = new $root.google.analytics.admin.v1alpha.Account(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.Account.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.Account.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.regionCode != null) + message.regionCode = String(object.regionCode); + if (object.deleted != null) + message.deleted = Boolean(object.deleted); + return message; + }; + + /** + * Creates a plain object from an Account message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.Account + * @static + * @param {google.analytics.admin.v1alpha.Account} message Account + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Account.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.displayName = ""; + object.regionCode = ""; + object.deleted = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + object.regionCode = message.regionCode; + if (message.deleted != null && message.hasOwnProperty("deleted")) + object.deleted = message.deleted; + return object; + }; + + /** + * Converts this Account to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.Account + * @instance + * @returns {Object.} JSON object + */ + Account.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Account + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.Account + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Account.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.Account"; + }; + + return Account; + })(); + + v1alpha.Property = (function() { + + /** + * Properties of a Property. + * @memberof google.analytics.admin.v1alpha + * @interface IProperty + * @property {string|null} [name] Property name + * @property {google.analytics.admin.v1alpha.PropertyType|null} [propertyType] Property propertyType + * @property {google.protobuf.ITimestamp|null} [createTime] Property createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Property updateTime + * @property {string|null} [parent] Property parent + * @property {string|null} [displayName] Property displayName + * @property {google.analytics.admin.v1alpha.IndustryCategory|null} [industryCategory] Property industryCategory + * @property {string|null} [timeZone] Property timeZone + * @property {string|null} [currencyCode] Property currencyCode + * @property {google.analytics.admin.v1alpha.ServiceLevel|null} [serviceLevel] Property serviceLevel + * @property {google.protobuf.ITimestamp|null} [deleteTime] Property deleteTime + * @property {google.protobuf.ITimestamp|null} [expireTime] Property expireTime + * @property {string|null} [account] Property account + */ + + /** + * Constructs a new Property. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a Property. + * @implements IProperty + * @constructor + * @param {google.analytics.admin.v1alpha.IProperty=} [properties] Properties to set + */ + function Property(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Property name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.Property + * @instance + */ + Property.prototype.name = ""; + + /** + * Property propertyType. + * @member {google.analytics.admin.v1alpha.PropertyType} propertyType + * @memberof google.analytics.admin.v1alpha.Property + * @instance + */ + Property.prototype.propertyType = 0; + + /** + * Property createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.analytics.admin.v1alpha.Property + * @instance + */ + Property.prototype.createTime = null; + + /** + * Property updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.analytics.admin.v1alpha.Property + * @instance + */ + Property.prototype.updateTime = null; + + /** + * Property parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.Property + * @instance + */ + Property.prototype.parent = ""; + + /** + * Property displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1alpha.Property + * @instance + */ + Property.prototype.displayName = ""; + + /** + * Property industryCategory. + * @member {google.analytics.admin.v1alpha.IndustryCategory} industryCategory + * @memberof google.analytics.admin.v1alpha.Property + * @instance + */ + Property.prototype.industryCategory = 0; + + /** + * Property timeZone. + * @member {string} timeZone + * @memberof google.analytics.admin.v1alpha.Property + * @instance + */ + Property.prototype.timeZone = ""; + + /** + * Property currencyCode. + * @member {string} currencyCode + * @memberof google.analytics.admin.v1alpha.Property + * @instance + */ + Property.prototype.currencyCode = ""; + + /** + * Property serviceLevel. + * @member {google.analytics.admin.v1alpha.ServiceLevel} serviceLevel + * @memberof google.analytics.admin.v1alpha.Property + * @instance + */ + Property.prototype.serviceLevel = 0; + + /** + * Property deleteTime. + * @member {google.protobuf.ITimestamp|null|undefined} deleteTime + * @memberof google.analytics.admin.v1alpha.Property + * @instance + */ + Property.prototype.deleteTime = null; + + /** + * Property expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.analytics.admin.v1alpha.Property + * @instance + */ + Property.prototype.expireTime = null; + + /** + * Property account. + * @member {string} account + * @memberof google.analytics.admin.v1alpha.Property + * @instance + */ + Property.prototype.account = ""; + + /** + * Creates a new Property instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.Property + * @static + * @param {google.analytics.admin.v1alpha.IProperty=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.Property} Property instance + */ + Property.create = function create(properties) { + return new Property(properties); + }; + + /** + * Encodes the specified Property message. Does not implicitly {@link google.analytics.admin.v1alpha.Property.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.Property + * @static + * @param {google.analytics.admin.v1alpha.IProperty} message Property message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Property.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.parent); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); + if (message.industryCategory != null && Object.hasOwnProperty.call(message, "industryCategory")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.industryCategory); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.timeZone); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.currencyCode); + if (message.serviceLevel != null && Object.hasOwnProperty.call(message, "serviceLevel")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.serviceLevel); + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) + $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.account != null && Object.hasOwnProperty.call(message, "account")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.account); + if (message.propertyType != null && Object.hasOwnProperty.call(message, "propertyType")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.propertyType); + return writer; + }; + + /** + * Encodes the specified Property message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.Property.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.Property + * @static + * @param {google.analytics.admin.v1alpha.IProperty} message Property message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Property.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Property message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.Property + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.Property} Property + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Property.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.Property(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 14: { + message.propertyType = reader.int32(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.parent = reader.string(); + break; + } + case 5: { + message.displayName = reader.string(); + break; + } + case 6: { + message.industryCategory = reader.int32(); + break; + } + case 7: { + message.timeZone = reader.string(); + break; + } + case 8: { + message.currencyCode = reader.string(); + break; + } + case 10: { + message.serviceLevel = reader.int32(); + break; + } + case 11: { + message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 12: { + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 13: { + message.account = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Property message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.Property + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.Property} Property + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Property.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Property message. + * @function verify + * @memberof google.analytics.admin.v1alpha.Property + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Property.verify = function verify(message) { + if (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.propertyType != null && message.hasOwnProperty("propertyType")) + switch (message.propertyType) { + default: + return "propertyType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.industryCategory != null && message.hasOwnProperty("industryCategory")) + switch (message.industryCategory) { + default: + return "industryCategory: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + break; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + if (!$util.isString(message.timeZone)) + return "timeZone: string expected"; + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + if (!$util.isString(message.currencyCode)) + return "currencyCode: string expected"; + if (message.serviceLevel != null && message.hasOwnProperty("serviceLevel")) + switch (message.serviceLevel) { + default: + return "serviceLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.deleteTime); + if (error) + return "deleteTime." + error; + } + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; + } + if (message.account != null && message.hasOwnProperty("account")) + if (!$util.isString(message.account)) + return "account: string expected"; + return null; + }; + + /** + * Creates a Property message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.Property + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.Property} Property + */ + Property.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.Property) + return object; + var message = new $root.google.analytics.admin.v1alpha.Property(); + if (object.name != null) + message.name = String(object.name); + switch (object.propertyType) { + default: + if (typeof object.propertyType === "number") { + message.propertyType = object.propertyType; + break; + } + break; + case "PROPERTY_TYPE_UNSPECIFIED": + case 0: + message.propertyType = 0; + break; + case "PROPERTY_TYPE_ORDINARY": + case 1: + message.propertyType = 1; + break; + case "PROPERTY_TYPE_SUBPROPERTY": + case 2: + message.propertyType = 2; + break; + case "PROPERTY_TYPE_ROLLUP": + case 3: + message.propertyType = 3; + break; + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.Property.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.Property.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.parent != null) + message.parent = String(object.parent); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.industryCategory) { + default: + if (typeof object.industryCategory === "number") { + message.industryCategory = object.industryCategory; + break; + } + break; + case "INDUSTRY_CATEGORY_UNSPECIFIED": + case 0: + message.industryCategory = 0; + break; + case "AUTOMOTIVE": + case 1: + message.industryCategory = 1; + break; + case "BUSINESS_AND_INDUSTRIAL_MARKETS": + case 2: + message.industryCategory = 2; + break; + case "FINANCE": + case 3: + message.industryCategory = 3; + break; + case "HEALTHCARE": + case 4: + message.industryCategory = 4; + break; + case "TECHNOLOGY": + case 5: + message.industryCategory = 5; + break; + case "TRAVEL": + case 6: + message.industryCategory = 6; + break; + case "OTHER": + case 7: + message.industryCategory = 7; + break; + case "ARTS_AND_ENTERTAINMENT": + case 8: + message.industryCategory = 8; + break; + case "BEAUTY_AND_FITNESS": + case 9: + message.industryCategory = 9; + break; + case "BOOKS_AND_LITERATURE": + case 10: + message.industryCategory = 10; + break; + case "FOOD_AND_DRINK": + case 11: + message.industryCategory = 11; + break; + case "GAMES": + case 12: + message.industryCategory = 12; + break; + case "HOBBIES_AND_LEISURE": + case 13: + message.industryCategory = 13; + break; + case "HOME_AND_GARDEN": + case 14: + message.industryCategory = 14; + break; + case "INTERNET_AND_TELECOM": + case 15: + message.industryCategory = 15; + break; + case "LAW_AND_GOVERNMENT": + case 16: + message.industryCategory = 16; + break; + case "NEWS": + case 17: + message.industryCategory = 17; + break; + case "ONLINE_COMMUNITIES": + case 18: + message.industryCategory = 18; + break; + case "PEOPLE_AND_SOCIETY": + case 19: + message.industryCategory = 19; + break; + case "PETS_AND_ANIMALS": + case 20: + message.industryCategory = 20; + break; + case "REAL_ESTATE": + case 21: + message.industryCategory = 21; + break; + case "REFERENCE": + case 22: + message.industryCategory = 22; + break; + case "SCIENCE": + case 23: + message.industryCategory = 23; + break; + case "SPORTS": + case 24: + message.industryCategory = 24; + break; + case "JOBS_AND_EDUCATION": + case 25: + message.industryCategory = 25; + break; + case "SHOPPING": + case 26: + message.industryCategory = 26; + break; + } + if (object.timeZone != null) + message.timeZone = String(object.timeZone); + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + switch (object.serviceLevel) { + default: + if (typeof object.serviceLevel === "number") { + message.serviceLevel = object.serviceLevel; + break; + } + break; + case "SERVICE_LEVEL_UNSPECIFIED": + case 0: + message.serviceLevel = 0; + break; + case "GOOGLE_ANALYTICS_STANDARD": + case 1: + message.serviceLevel = 1; + break; + case "GOOGLE_ANALYTICS_360": + case 2: + message.serviceLevel = 2; + break; + } + if (object.deleteTime != null) { + if (typeof object.deleteTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.Property.deleteTime: object expected"); + message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime); + } + if (object.expireTime != null) { + if (typeof object.expireTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.Property.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + } + if (object.account != null) + message.account = String(object.account); + return message; + }; + + /** + * Creates a plain object from a Property message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.Property + * @static + * @param {google.analytics.admin.v1alpha.Property} message Property + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Property.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.parent = ""; + object.createTime = null; + object.updateTime = null; + object.displayName = ""; + object.industryCategory = options.enums === String ? "INDUSTRY_CATEGORY_UNSPECIFIED" : 0; + object.timeZone = ""; + object.currencyCode = ""; + object.serviceLevel = options.enums === String ? "SERVICE_LEVEL_UNSPECIFIED" : 0; + object.deleteTime = null; + object.expireTime = null; + object.account = ""; + object.propertyType = options.enums === String ? "PROPERTY_TYPE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + 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.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.industryCategory != null && message.hasOwnProperty("industryCategory")) + object.industryCategory = options.enums === String ? $root.google.analytics.admin.v1alpha.IndustryCategory[message.industryCategory] === undefined ? message.industryCategory : $root.google.analytics.admin.v1alpha.IndustryCategory[message.industryCategory] : message.industryCategory; + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + object.timeZone = message.timeZone; + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + object.currencyCode = message.currencyCode; + if (message.serviceLevel != null && message.hasOwnProperty("serviceLevel")) + object.serviceLevel = options.enums === String ? $root.google.analytics.admin.v1alpha.ServiceLevel[message.serviceLevel] === undefined ? message.serviceLevel : $root.google.analytics.admin.v1alpha.ServiceLevel[message.serviceLevel] : message.serviceLevel; + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + if (message.account != null && message.hasOwnProperty("account")) + object.account = message.account; + if (message.propertyType != null && message.hasOwnProperty("propertyType")) + object.propertyType = options.enums === String ? $root.google.analytics.admin.v1alpha.PropertyType[message.propertyType] === undefined ? message.propertyType : $root.google.analytics.admin.v1alpha.PropertyType[message.propertyType] : message.propertyType; + return object; + }; + + /** + * Converts this Property to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.Property + * @instance + * @returns {Object.} JSON object + */ + Property.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Property + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.Property + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Property.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.Property"; + }; + + return Property; + })(); + + v1alpha.DataStream = (function() { + + /** + * Properties of a DataStream. + * @memberof google.analytics.admin.v1alpha + * @interface IDataStream + * @property {google.analytics.admin.v1alpha.DataStream.IWebStreamData|null} [webStreamData] DataStream webStreamData + * @property {google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData|null} [androidAppStreamData] DataStream androidAppStreamData + * @property {google.analytics.admin.v1alpha.DataStream.IIosAppStreamData|null} [iosAppStreamData] DataStream iosAppStreamData + * @property {string|null} [name] DataStream name + * @property {google.analytics.admin.v1alpha.DataStream.DataStreamType|null} [type] DataStream type + * @property {string|null} [displayName] DataStream displayName + * @property {google.protobuf.ITimestamp|null} [createTime] DataStream createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] DataStream updateTime + */ + + /** + * Constructs a new DataStream. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a DataStream. + * @implements IDataStream + * @constructor + * @param {google.analytics.admin.v1alpha.IDataStream=} [properties] Properties to set + */ + function DataStream(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataStream webStreamData. + * @member {google.analytics.admin.v1alpha.DataStream.IWebStreamData|null|undefined} webStreamData + * @memberof google.analytics.admin.v1alpha.DataStream + * @instance + */ + DataStream.prototype.webStreamData = null; + + /** + * DataStream androidAppStreamData. + * @member {google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData|null|undefined} androidAppStreamData + * @memberof google.analytics.admin.v1alpha.DataStream + * @instance + */ + DataStream.prototype.androidAppStreamData = null; + + /** + * DataStream iosAppStreamData. + * @member {google.analytics.admin.v1alpha.DataStream.IIosAppStreamData|null|undefined} iosAppStreamData + * @memberof google.analytics.admin.v1alpha.DataStream + * @instance + */ + DataStream.prototype.iosAppStreamData = null; + + /** + * DataStream name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.DataStream + * @instance + */ + DataStream.prototype.name = ""; + + /** + * DataStream type. + * @member {google.analytics.admin.v1alpha.DataStream.DataStreamType} type + * @memberof google.analytics.admin.v1alpha.DataStream + * @instance + */ + DataStream.prototype.type = 0; + + /** + * DataStream displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1alpha.DataStream + * @instance + */ + DataStream.prototype.displayName = ""; + + /** + * DataStream createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.analytics.admin.v1alpha.DataStream + * @instance + */ + DataStream.prototype.createTime = null; + + /** + * DataStream updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.analytics.admin.v1alpha.DataStream + * @instance + */ + DataStream.prototype.updateTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataStream streamData. + * @member {"webStreamData"|"androidAppStreamData"|"iosAppStreamData"|undefined} streamData + * @memberof google.analytics.admin.v1alpha.DataStream + * @instance + */ + Object.defineProperty(DataStream.prototype, "streamData", { + get: $util.oneOfGetter($oneOfFields = ["webStreamData", "androidAppStreamData", "iosAppStreamData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataStream instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.DataStream + * @static + * @param {google.analytics.admin.v1alpha.IDataStream=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DataStream} DataStream instance + */ + DataStream.create = function create(properties) { + return new DataStream(properties); + }; + + /** + * Encodes the specified DataStream message. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.DataStream + * @static + * @param {google.analytics.admin.v1alpha.IDataStream} message DataStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataStream.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.webStreamData != null && Object.hasOwnProperty.call(message, "webStreamData")) + $root.google.analytics.admin.v1alpha.DataStream.WebStreamData.encode(message.webStreamData, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.androidAppStreamData != null && Object.hasOwnProperty.call(message, "androidAppStreamData")) + $root.google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData.encode(message.androidAppStreamData, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.iosAppStreamData != null && Object.hasOwnProperty.call(message, "iosAppStreamData")) + $root.google.analytics.admin.v1alpha.DataStream.IosAppStreamData.encode(message.iosAppStreamData, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataStream message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.DataStream + * @static + * @param {google.analytics.admin.v1alpha.IDataStream} message DataStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataStream.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataStream message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.DataStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.DataStream} DataStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataStream.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DataStream(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 6: { + message.webStreamData = $root.google.analytics.admin.v1alpha.DataStream.WebStreamData.decode(reader, reader.uint32()); + break; + } + case 7: { + message.androidAppStreamData = $root.google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData.decode(reader, reader.uint32()); + break; + } + case 8: { + message.iosAppStreamData = $root.google.analytics.admin.v1alpha.DataStream.IosAppStreamData.decode(reader, reader.uint32()); + break; + } + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataStream message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.DataStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.DataStream} DataStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataStream.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataStream message. + * @function verify + * @memberof google.analytics.admin.v1alpha.DataStream + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataStream.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.webStreamData != null && message.hasOwnProperty("webStreamData")) { + properties.streamData = 1; + { + var error = $root.google.analytics.admin.v1alpha.DataStream.WebStreamData.verify(message.webStreamData); + if (error) + return "webStreamData." + error; + } + } + if (message.androidAppStreamData != null && message.hasOwnProperty("androidAppStreamData")) { + if (properties.streamData === 1) + return "streamData: multiple values"; + properties.streamData = 1; + { + var error = $root.google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData.verify(message.androidAppStreamData); + if (error) + return "androidAppStreamData." + error; + } + } + if (message.iosAppStreamData != null && message.hasOwnProperty("iosAppStreamData")) { + if (properties.streamData === 1) + return "streamData: multiple values"; + properties.streamData = 1; + { + var error = $root.google.analytics.admin.v1alpha.DataStream.IosAppStreamData.verify(message.iosAppStreamData); + if (error) + return "iosAppStreamData." + error; + } + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates a DataStream message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.DataStream + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.DataStream} DataStream + */ + DataStream.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DataStream) + return object; + var message = new $root.google.analytics.admin.v1alpha.DataStream(); + if (object.webStreamData != null) { + if (typeof object.webStreamData !== "object") + throw TypeError(".google.analytics.admin.v1alpha.DataStream.webStreamData: object expected"); + message.webStreamData = $root.google.analytics.admin.v1alpha.DataStream.WebStreamData.fromObject(object.webStreamData); + } + if (object.androidAppStreamData != null) { + if (typeof object.androidAppStreamData !== "object") + throw TypeError(".google.analytics.admin.v1alpha.DataStream.androidAppStreamData: object expected"); + message.androidAppStreamData = $root.google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData.fromObject(object.androidAppStreamData); + } + if (object.iosAppStreamData != null) { + if (typeof object.iosAppStreamData !== "object") + throw TypeError(".google.analytics.admin.v1alpha.DataStream.iosAppStreamData: object expected"); + message.iosAppStreamData = $root.google.analytics.admin.v1alpha.DataStream.IosAppStreamData.fromObject(object.iosAppStreamData); + } + if (object.name != null) + message.name = String(object.name); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "DATA_STREAM_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "WEB_DATA_STREAM": + case 1: + message.type = 1; + break; + case "ANDROID_APP_DATA_STREAM": + case 2: + message.type = 2; + break; + case "IOS_APP_DATA_STREAM": + case 3: + message.type = 3; + break; + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.DataStream.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.DataStream.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a DataStream message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.DataStream + * @static + * @param {google.analytics.admin.v1alpha.DataStream} message DataStream + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataStream.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.type = options.enums === String ? "DATA_STREAM_TYPE_UNSPECIFIED" : 0; + object.displayName = ""; + object.createTime = null; + object.updateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.analytics.admin.v1alpha.DataStream.DataStreamType[message.type] === undefined ? message.type : $root.google.analytics.admin.v1alpha.DataStream.DataStreamType[message.type] : message.type; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + 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.webStreamData != null && message.hasOwnProperty("webStreamData")) { + object.webStreamData = $root.google.analytics.admin.v1alpha.DataStream.WebStreamData.toObject(message.webStreamData, options); + if (options.oneofs) + object.streamData = "webStreamData"; + } + if (message.androidAppStreamData != null && message.hasOwnProperty("androidAppStreamData")) { + object.androidAppStreamData = $root.google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData.toObject(message.androidAppStreamData, options); + if (options.oneofs) + object.streamData = "androidAppStreamData"; + } + if (message.iosAppStreamData != null && message.hasOwnProperty("iosAppStreamData")) { + object.iosAppStreamData = $root.google.analytics.admin.v1alpha.DataStream.IosAppStreamData.toObject(message.iosAppStreamData, options); + if (options.oneofs) + object.streamData = "iosAppStreamData"; + } + return object; + }; + + /** + * Converts this DataStream to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.DataStream + * @instance + * @returns {Object.} JSON object + */ + DataStream.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataStream + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.DataStream + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataStream.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DataStream"; + }; + + DataStream.WebStreamData = (function() { + + /** + * Properties of a WebStreamData. + * @memberof google.analytics.admin.v1alpha.DataStream + * @interface IWebStreamData + * @property {string|null} [measurementId] WebStreamData measurementId + * @property {string|null} [firebaseAppId] WebStreamData firebaseAppId + * @property {string|null} [defaultUri] WebStreamData defaultUri + */ + + /** + * Constructs a new WebStreamData. + * @memberof google.analytics.admin.v1alpha.DataStream + * @classdesc Represents a WebStreamData. + * @implements IWebStreamData + * @constructor + * @param {google.analytics.admin.v1alpha.DataStream.IWebStreamData=} [properties] Properties to set + */ + function WebStreamData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WebStreamData measurementId. + * @member {string} measurementId + * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData + * @instance + */ + WebStreamData.prototype.measurementId = ""; + + /** + * WebStreamData firebaseAppId. + * @member {string} firebaseAppId + * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData + * @instance + */ + WebStreamData.prototype.firebaseAppId = ""; + + /** + * WebStreamData defaultUri. + * @member {string} defaultUri + * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData + * @instance + */ + WebStreamData.prototype.defaultUri = ""; + + /** + * Creates a new WebStreamData instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData + * @static + * @param {google.analytics.admin.v1alpha.DataStream.IWebStreamData=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DataStream.WebStreamData} WebStreamData instance + */ + WebStreamData.create = function create(properties) { + return new WebStreamData(properties); + }; + + /** + * Encodes the specified WebStreamData message. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.WebStreamData.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData + * @static + * @param {google.analytics.admin.v1alpha.DataStream.IWebStreamData} message WebStreamData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebStreamData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.measurementId != null && Object.hasOwnProperty.call(message, "measurementId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.measurementId); + if (message.firebaseAppId != null && Object.hasOwnProperty.call(message, "firebaseAppId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.firebaseAppId); + if (message.defaultUri != null && Object.hasOwnProperty.call(message, "defaultUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.defaultUri); + return writer; + }; + + /** + * Encodes the specified WebStreamData message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.WebStreamData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData + * @static + * @param {google.analytics.admin.v1alpha.DataStream.IWebStreamData} message WebStreamData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebStreamData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WebStreamData message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.DataStream.WebStreamData} WebStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebStreamData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DataStream.WebStreamData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.measurementId = reader.string(); + break; + } + case 2: { + message.firebaseAppId = reader.string(); + break; + } + case 3: { + message.defaultUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WebStreamData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.DataStream.WebStreamData} WebStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebStreamData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WebStreamData message. + * @function verify + * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebStreamData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.measurementId != null && message.hasOwnProperty("measurementId")) + if (!$util.isString(message.measurementId)) + return "measurementId: string expected"; + if (message.firebaseAppId != null && message.hasOwnProperty("firebaseAppId")) + if (!$util.isString(message.firebaseAppId)) + return "firebaseAppId: string expected"; + if (message.defaultUri != null && message.hasOwnProperty("defaultUri")) + if (!$util.isString(message.defaultUri)) + return "defaultUri: string expected"; + return null; + }; + + /** + * Creates a WebStreamData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.DataStream.WebStreamData} WebStreamData + */ + WebStreamData.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DataStream.WebStreamData) + return object; + var message = new $root.google.analytics.admin.v1alpha.DataStream.WebStreamData(); + if (object.measurementId != null) + message.measurementId = String(object.measurementId); + if (object.firebaseAppId != null) + message.firebaseAppId = String(object.firebaseAppId); + if (object.defaultUri != null) + message.defaultUri = String(object.defaultUri); + return message; + }; + + /** + * Creates a plain object from a WebStreamData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData + * @static + * @param {google.analytics.admin.v1alpha.DataStream.WebStreamData} message WebStreamData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WebStreamData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.measurementId = ""; + object.firebaseAppId = ""; + object.defaultUri = ""; + } + if (message.measurementId != null && message.hasOwnProperty("measurementId")) + object.measurementId = message.measurementId; + if (message.firebaseAppId != null && message.hasOwnProperty("firebaseAppId")) + object.firebaseAppId = message.firebaseAppId; + if (message.defaultUri != null && message.hasOwnProperty("defaultUri")) + object.defaultUri = message.defaultUri; + return object; + }; + + /** + * Converts this WebStreamData to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData + * @instance + * @returns {Object.} JSON object + */ + WebStreamData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WebStreamData + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WebStreamData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DataStream.WebStreamData"; + }; + + return WebStreamData; + })(); + + DataStream.AndroidAppStreamData = (function() { + + /** + * Properties of an AndroidAppStreamData. + * @memberof google.analytics.admin.v1alpha.DataStream + * @interface IAndroidAppStreamData + * @property {string|null} [firebaseAppId] AndroidAppStreamData firebaseAppId + * @property {string|null} [packageName] AndroidAppStreamData packageName + */ + + /** + * Constructs a new AndroidAppStreamData. + * @memberof google.analytics.admin.v1alpha.DataStream + * @classdesc Represents an AndroidAppStreamData. + * @implements IAndroidAppStreamData + * @constructor + * @param {google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData=} [properties] Properties to set + */ + function AndroidAppStreamData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AndroidAppStreamData firebaseAppId. + * @member {string} firebaseAppId + * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData + * @instance + */ + AndroidAppStreamData.prototype.firebaseAppId = ""; + + /** + * AndroidAppStreamData packageName. + * @member {string} packageName + * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData + * @instance + */ + AndroidAppStreamData.prototype.packageName = ""; + + /** + * Creates a new AndroidAppStreamData instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData + * @static + * @param {google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData} AndroidAppStreamData instance + */ + AndroidAppStreamData.create = function create(properties) { + return new AndroidAppStreamData(properties); + }; + + /** + * Encodes the specified AndroidAppStreamData message. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData + * @static + * @param {google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData} message AndroidAppStreamData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AndroidAppStreamData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.firebaseAppId != null && Object.hasOwnProperty.call(message, "firebaseAppId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.firebaseAppId); + if (message.packageName != null && Object.hasOwnProperty.call(message, "packageName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.packageName); + return writer; + }; + + /** + * Encodes the specified AndroidAppStreamData message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData + * @static + * @param {google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData} message AndroidAppStreamData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AndroidAppStreamData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AndroidAppStreamData message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData} AndroidAppStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AndroidAppStreamData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.firebaseAppId = reader.string(); + break; + } + case 2: { + message.packageName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AndroidAppStreamData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData} AndroidAppStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AndroidAppStreamData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AndroidAppStreamData message. + * @function verify + * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AndroidAppStreamData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.firebaseAppId != null && message.hasOwnProperty("firebaseAppId")) + if (!$util.isString(message.firebaseAppId)) + return "firebaseAppId: string expected"; + if (message.packageName != null && message.hasOwnProperty("packageName")) + if (!$util.isString(message.packageName)) + return "packageName: string expected"; + return null; + }; + + /** + * Creates an AndroidAppStreamData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData} AndroidAppStreamData + */ + AndroidAppStreamData.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData) + return object; + var message = new $root.google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData(); + if (object.firebaseAppId != null) + message.firebaseAppId = String(object.firebaseAppId); + if (object.packageName != null) + message.packageName = String(object.packageName); + return message; + }; + + /** + * Creates a plain object from an AndroidAppStreamData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData + * @static + * @param {google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData} message AndroidAppStreamData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AndroidAppStreamData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.firebaseAppId = ""; + object.packageName = ""; + } + if (message.firebaseAppId != null && message.hasOwnProperty("firebaseAppId")) + object.firebaseAppId = message.firebaseAppId; + if (message.packageName != null && message.hasOwnProperty("packageName")) + object.packageName = message.packageName; + return object; + }; + + /** + * Converts this AndroidAppStreamData to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData + * @instance + * @returns {Object.} JSON object + */ + AndroidAppStreamData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AndroidAppStreamData + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AndroidAppStreamData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData"; + }; + + return AndroidAppStreamData; + })(); + + DataStream.IosAppStreamData = (function() { + + /** + * Properties of an IosAppStreamData. + * @memberof google.analytics.admin.v1alpha.DataStream + * @interface IIosAppStreamData + * @property {string|null} [firebaseAppId] IosAppStreamData firebaseAppId + * @property {string|null} [bundleId] IosAppStreamData bundleId + */ + + /** + * Constructs a new IosAppStreamData. + * @memberof google.analytics.admin.v1alpha.DataStream + * @classdesc Represents an IosAppStreamData. + * @implements IIosAppStreamData + * @constructor + * @param {google.analytics.admin.v1alpha.DataStream.IIosAppStreamData=} [properties] Properties to set + */ + function IosAppStreamData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IosAppStreamData firebaseAppId. + * @member {string} firebaseAppId + * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData + * @instance + */ + IosAppStreamData.prototype.firebaseAppId = ""; + + /** + * IosAppStreamData bundleId. + * @member {string} bundleId + * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData + * @instance + */ + IosAppStreamData.prototype.bundleId = ""; + + /** + * Creates a new IosAppStreamData instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData + * @static + * @param {google.analytics.admin.v1alpha.DataStream.IIosAppStreamData=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DataStream.IosAppStreamData} IosAppStreamData instance + */ + IosAppStreamData.create = function create(properties) { + return new IosAppStreamData(properties); + }; + + /** + * Encodes the specified IosAppStreamData message. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.IosAppStreamData.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData + * @static + * @param {google.analytics.admin.v1alpha.DataStream.IIosAppStreamData} message IosAppStreamData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IosAppStreamData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.firebaseAppId != null && Object.hasOwnProperty.call(message, "firebaseAppId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.firebaseAppId); + if (message.bundleId != null && Object.hasOwnProperty.call(message, "bundleId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.bundleId); + return writer; + }; + + /** + * Encodes the specified IosAppStreamData message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.IosAppStreamData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData + * @static + * @param {google.analytics.admin.v1alpha.DataStream.IIosAppStreamData} message IosAppStreamData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IosAppStreamData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IosAppStreamData message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.DataStream.IosAppStreamData} IosAppStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IosAppStreamData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DataStream.IosAppStreamData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.firebaseAppId = reader.string(); + break; + } + case 2: { + message.bundleId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IosAppStreamData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.DataStream.IosAppStreamData} IosAppStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IosAppStreamData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IosAppStreamData message. + * @function verify + * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IosAppStreamData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.firebaseAppId != null && message.hasOwnProperty("firebaseAppId")) + if (!$util.isString(message.firebaseAppId)) + return "firebaseAppId: string expected"; + if (message.bundleId != null && message.hasOwnProperty("bundleId")) + if (!$util.isString(message.bundleId)) + return "bundleId: string expected"; + return null; + }; + + /** + * Creates an IosAppStreamData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.DataStream.IosAppStreamData} IosAppStreamData + */ + IosAppStreamData.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DataStream.IosAppStreamData) + return object; + var message = new $root.google.analytics.admin.v1alpha.DataStream.IosAppStreamData(); + if (object.firebaseAppId != null) + message.firebaseAppId = String(object.firebaseAppId); + if (object.bundleId != null) + message.bundleId = String(object.bundleId); + return message; + }; + + /** + * Creates a plain object from an IosAppStreamData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData + * @static + * @param {google.analytics.admin.v1alpha.DataStream.IosAppStreamData} message IosAppStreamData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IosAppStreamData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.firebaseAppId = ""; + object.bundleId = ""; + } + if (message.firebaseAppId != null && message.hasOwnProperty("firebaseAppId")) + object.firebaseAppId = message.firebaseAppId; + if (message.bundleId != null && message.hasOwnProperty("bundleId")) + object.bundleId = message.bundleId; + return object; + }; + + /** + * Converts this IosAppStreamData to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData + * @instance + * @returns {Object.} JSON object + */ + IosAppStreamData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IosAppStreamData + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IosAppStreamData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DataStream.IosAppStreamData"; + }; + + return IosAppStreamData; + })(); + + /** + * DataStreamType enum. + * @name google.analytics.admin.v1alpha.DataStream.DataStreamType + * @enum {number} + * @property {number} DATA_STREAM_TYPE_UNSPECIFIED=0 DATA_STREAM_TYPE_UNSPECIFIED value + * @property {number} WEB_DATA_STREAM=1 WEB_DATA_STREAM value + * @property {number} ANDROID_APP_DATA_STREAM=2 ANDROID_APP_DATA_STREAM value + * @property {number} IOS_APP_DATA_STREAM=3 IOS_APP_DATA_STREAM value + */ + DataStream.DataStreamType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_STREAM_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "WEB_DATA_STREAM"] = 1; + values[valuesById[2] = "ANDROID_APP_DATA_STREAM"] = 2; + values[valuesById[3] = "IOS_APP_DATA_STREAM"] = 3; + return values; + })(); + + return DataStream; + })(); + + v1alpha.UserLink = (function() { + + /** + * Properties of a UserLink. + * @memberof google.analytics.admin.v1alpha + * @interface IUserLink + * @property {string|null} [name] UserLink name + * @property {string|null} [emailAddress] UserLink emailAddress + * @property {Array.|null} [directRoles] UserLink directRoles + */ + + /** + * Constructs a new UserLink. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a UserLink. + * @implements IUserLink + * @constructor + * @param {google.analytics.admin.v1alpha.IUserLink=} [properties] Properties to set + */ + function UserLink(properties) { + this.directRoles = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserLink name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.UserLink + * @instance + */ + UserLink.prototype.name = ""; + + /** + * UserLink emailAddress. + * @member {string} emailAddress + * @memberof google.analytics.admin.v1alpha.UserLink + * @instance + */ + UserLink.prototype.emailAddress = ""; + + /** + * UserLink directRoles. + * @member {Array.} directRoles + * @memberof google.analytics.admin.v1alpha.UserLink + * @instance + */ + UserLink.prototype.directRoles = $util.emptyArray; + + /** + * Creates a new UserLink instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.UserLink + * @static + * @param {google.analytics.admin.v1alpha.IUserLink=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.UserLink} UserLink instance + */ + UserLink.create = function create(properties) { + return new UserLink(properties); + }; + + /** + * Encodes the specified UserLink message. Does not implicitly {@link google.analytics.admin.v1alpha.UserLink.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.UserLink + * @static + * @param {google.analytics.admin.v1alpha.IUserLink} message UserLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserLink.encode = function encode(message, writer) { + 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.emailAddress != null && Object.hasOwnProperty.call(message, "emailAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.emailAddress); + if (message.directRoles != null && message.directRoles.length) + for (var i = 0; i < message.directRoles.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.directRoles[i]); + return writer; + }; + + /** + * Encodes the specified UserLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UserLink.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.UserLink + * @static + * @param {google.analytics.admin.v1alpha.IUserLink} message UserLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserLink.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserLink message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.UserLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.UserLink} UserLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserLink.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.UserLink(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.emailAddress = reader.string(); + break; + } + case 3: { + if (!(message.directRoles && message.directRoles.length)) + message.directRoles = []; + message.directRoles.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserLink message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.UserLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.UserLink} UserLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserLink.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserLink message. + * @function verify + * @memberof google.analytics.admin.v1alpha.UserLink + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserLink.verify = function verify(message) { + if (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.emailAddress != null && message.hasOwnProperty("emailAddress")) + if (!$util.isString(message.emailAddress)) + return "emailAddress: string expected"; + if (message.directRoles != null && message.hasOwnProperty("directRoles")) { + if (!Array.isArray(message.directRoles)) + return "directRoles: array expected"; + for (var i = 0; i < message.directRoles.length; ++i) + if (!$util.isString(message.directRoles[i])) + return "directRoles: string[] expected"; + } + return null; + }; + + /** + * Creates a UserLink message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.UserLink + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.UserLink} UserLink + */ + UserLink.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.UserLink) + return object; + var message = new $root.google.analytics.admin.v1alpha.UserLink(); + if (object.name != null) + message.name = String(object.name); + if (object.emailAddress != null) + message.emailAddress = String(object.emailAddress); + if (object.directRoles) { + if (!Array.isArray(object.directRoles)) + throw TypeError(".google.analytics.admin.v1alpha.UserLink.directRoles: array expected"); + message.directRoles = []; + for (var i = 0; i < object.directRoles.length; ++i) + message.directRoles[i] = String(object.directRoles[i]); + } + return message; + }; + + /** + * Creates a plain object from a UserLink message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.UserLink + * @static + * @param {google.analytics.admin.v1alpha.UserLink} message UserLink + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserLink.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.directRoles = []; + if (options.defaults) { + object.name = ""; + object.emailAddress = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.emailAddress != null && message.hasOwnProperty("emailAddress")) + object.emailAddress = message.emailAddress; + if (message.directRoles && message.directRoles.length) { + object.directRoles = []; + for (var j = 0; j < message.directRoles.length; ++j) + object.directRoles[j] = message.directRoles[j]; + } + return object; + }; + + /** + * Converts this UserLink to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.UserLink + * @instance + * @returns {Object.} JSON object + */ + UserLink.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserLink + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.UserLink + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.UserLink"; + }; + + return UserLink; + })(); + + v1alpha.AuditUserLink = (function() { + + /** + * Properties of an AuditUserLink. + * @memberof google.analytics.admin.v1alpha + * @interface IAuditUserLink + * @property {string|null} [name] AuditUserLink name + * @property {string|null} [emailAddress] AuditUserLink emailAddress + * @property {Array.|null} [directRoles] AuditUserLink directRoles + * @property {Array.|null} [effectiveRoles] AuditUserLink effectiveRoles + */ + + /** + * Constructs a new AuditUserLink. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AuditUserLink. + * @implements IAuditUserLink + * @constructor + * @param {google.analytics.admin.v1alpha.IAuditUserLink=} [properties] Properties to set + */ + function AuditUserLink(properties) { + this.directRoles = []; + this.effectiveRoles = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuditUserLink name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @instance + */ + AuditUserLink.prototype.name = ""; + + /** + * AuditUserLink emailAddress. + * @member {string} emailAddress + * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @instance + */ + AuditUserLink.prototype.emailAddress = ""; + + /** + * AuditUserLink directRoles. + * @member {Array.} directRoles + * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @instance + */ + AuditUserLink.prototype.directRoles = $util.emptyArray; + + /** + * AuditUserLink effectiveRoles. + * @member {Array.} effectiveRoles + * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @instance + */ + AuditUserLink.prototype.effectiveRoles = $util.emptyArray; + + /** + * Creates a new AuditUserLink instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @static + * @param {google.analytics.admin.v1alpha.IAuditUserLink=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AuditUserLink} AuditUserLink instance + */ + AuditUserLink.create = function create(properties) { + return new AuditUserLink(properties); + }; + + /** + * Encodes the specified AuditUserLink message. Does not implicitly {@link google.analytics.admin.v1alpha.AuditUserLink.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @static + * @param {google.analytics.admin.v1alpha.IAuditUserLink} message AuditUserLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditUserLink.encode = function encode(message, writer) { + 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.emailAddress != null && Object.hasOwnProperty.call(message, "emailAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.emailAddress); + if (message.directRoles != null && message.directRoles.length) + for (var i = 0; i < message.directRoles.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.directRoles[i]); + if (message.effectiveRoles != null && message.effectiveRoles.length) + for (var i = 0; i < message.effectiveRoles.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.effectiveRoles[i]); + return writer; + }; + + /** + * Encodes the specified AuditUserLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AuditUserLink.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @static + * @param {google.analytics.admin.v1alpha.IAuditUserLink} message AuditUserLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditUserLink.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuditUserLink message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AuditUserLink} AuditUserLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditUserLink.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AuditUserLink(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.emailAddress = reader.string(); + break; + } + case 3: { + if (!(message.directRoles && message.directRoles.length)) + message.directRoles = []; + message.directRoles.push(reader.string()); + break; + } + case 4: { + if (!(message.effectiveRoles && message.effectiveRoles.length)) + message.effectiveRoles = []; + message.effectiveRoles.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuditUserLink message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AuditUserLink} AuditUserLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditUserLink.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditUserLink message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditUserLink.verify = function verify(message) { + if (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.emailAddress != null && message.hasOwnProperty("emailAddress")) + if (!$util.isString(message.emailAddress)) + return "emailAddress: string expected"; + if (message.directRoles != null && message.hasOwnProperty("directRoles")) { + if (!Array.isArray(message.directRoles)) + return "directRoles: array expected"; + for (var i = 0; i < message.directRoles.length; ++i) + if (!$util.isString(message.directRoles[i])) + return "directRoles: string[] expected"; + } + if (message.effectiveRoles != null && message.hasOwnProperty("effectiveRoles")) { + if (!Array.isArray(message.effectiveRoles)) + return "effectiveRoles: array expected"; + for (var i = 0; i < message.effectiveRoles.length; ++i) + if (!$util.isString(message.effectiveRoles[i])) + return "effectiveRoles: string[] expected"; + } + return null; + }; + + /** + * Creates an AuditUserLink message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AuditUserLink} AuditUserLink + */ + AuditUserLink.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AuditUserLink) + return object; + var message = new $root.google.analytics.admin.v1alpha.AuditUserLink(); + if (object.name != null) + message.name = String(object.name); + if (object.emailAddress != null) + message.emailAddress = String(object.emailAddress); + if (object.directRoles) { + if (!Array.isArray(object.directRoles)) + throw TypeError(".google.analytics.admin.v1alpha.AuditUserLink.directRoles: array expected"); + message.directRoles = []; + for (var i = 0; i < object.directRoles.length; ++i) + message.directRoles[i] = String(object.directRoles[i]); + } + if (object.effectiveRoles) { + if (!Array.isArray(object.effectiveRoles)) + throw TypeError(".google.analytics.admin.v1alpha.AuditUserLink.effectiveRoles: array expected"); + message.effectiveRoles = []; + for (var i = 0; i < object.effectiveRoles.length; ++i) + message.effectiveRoles[i] = String(object.effectiveRoles[i]); + } + return message; + }; + + /** + * Creates a plain object from an AuditUserLink message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @static + * @param {google.analytics.admin.v1alpha.AuditUserLink} message AuditUserLink + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditUserLink.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.directRoles = []; + object.effectiveRoles = []; + } + if (options.defaults) { + object.name = ""; + object.emailAddress = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.emailAddress != null && message.hasOwnProperty("emailAddress")) + object.emailAddress = message.emailAddress; + if (message.directRoles && message.directRoles.length) { + object.directRoles = []; + for (var j = 0; j < message.directRoles.length; ++j) + object.directRoles[j] = message.directRoles[j]; + } + if (message.effectiveRoles && message.effectiveRoles.length) { + object.effectiveRoles = []; + for (var j = 0; j < message.effectiveRoles.length; ++j) + object.effectiveRoles[j] = message.effectiveRoles[j]; + } + return object; + }; + + /** + * Converts this AuditUserLink to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @instance + * @returns {Object.} JSON object + */ + AuditUserLink.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuditUserLink + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditUserLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AuditUserLink"; + }; + + return AuditUserLink; + })(); + + v1alpha.FirebaseLink = (function() { + + /** + * Properties of a FirebaseLink. + * @memberof google.analytics.admin.v1alpha + * @interface IFirebaseLink + * @property {string|null} [name] FirebaseLink name + * @property {string|null} [project] FirebaseLink project + * @property {google.protobuf.ITimestamp|null} [createTime] FirebaseLink createTime + */ + + /** + * Constructs a new FirebaseLink. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a FirebaseLink. + * @implements IFirebaseLink + * @constructor + * @param {google.analytics.admin.v1alpha.IFirebaseLink=} [properties] Properties to set + */ + function FirebaseLink(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FirebaseLink name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.FirebaseLink + * @instance + */ + FirebaseLink.prototype.name = ""; + + /** + * FirebaseLink project. + * @member {string} project + * @memberof google.analytics.admin.v1alpha.FirebaseLink + * @instance + */ + FirebaseLink.prototype.project = ""; + + /** + * FirebaseLink createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.analytics.admin.v1alpha.FirebaseLink + * @instance + */ + FirebaseLink.prototype.createTime = null; + + /** + * Creates a new FirebaseLink instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.FirebaseLink + * @static + * @param {google.analytics.admin.v1alpha.IFirebaseLink=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.FirebaseLink} FirebaseLink instance + */ + FirebaseLink.create = function create(properties) { + return new FirebaseLink(properties); + }; + + /** + * Encodes the specified FirebaseLink message. Does not implicitly {@link google.analytics.admin.v1alpha.FirebaseLink.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.FirebaseLink + * @static + * @param {google.analytics.admin.v1alpha.IFirebaseLink} message FirebaseLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FirebaseLink.encode = function encode(message, writer) { + 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.project != null && Object.hasOwnProperty.call(message, "project")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.project); + 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(); + return writer; + }; + + /** + * Encodes the specified FirebaseLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.FirebaseLink.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.FirebaseLink + * @static + * @param {google.analytics.admin.v1alpha.IFirebaseLink} message FirebaseLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FirebaseLink.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FirebaseLink message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.FirebaseLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.FirebaseLink} FirebaseLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FirebaseLink.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.FirebaseLink(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.project = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FirebaseLink message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.FirebaseLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.FirebaseLink} FirebaseLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FirebaseLink.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FirebaseLink message. + * @function verify + * @memberof google.analytics.admin.v1alpha.FirebaseLink + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FirebaseLink.verify = function verify(message) { + if (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.project != null && message.hasOwnProperty("project")) + if (!$util.isString(message.project)) + return "project: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + return null; + }; + + /** + * Creates a FirebaseLink message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.FirebaseLink + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.FirebaseLink} FirebaseLink + */ + FirebaseLink.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.FirebaseLink) + return object; + var message = new $root.google.analytics.admin.v1alpha.FirebaseLink(); + if (object.name != null) + message.name = String(object.name); + if (object.project != null) + message.project = String(object.project); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.FirebaseLink.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + return message; + }; + + /** + * Creates a plain object from a FirebaseLink message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.FirebaseLink + * @static + * @param {google.analytics.admin.v1alpha.FirebaseLink} message FirebaseLink + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FirebaseLink.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.project = ""; + object.createTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.project != null && message.hasOwnProperty("project")) + object.project = message.project; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + return object; + }; + + /** + * Converts this FirebaseLink to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.FirebaseLink + * @instance + * @returns {Object.} JSON object + */ + FirebaseLink.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FirebaseLink + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.FirebaseLink + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FirebaseLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.FirebaseLink"; + }; + + return FirebaseLink; + })(); + + v1alpha.GlobalSiteTag = (function() { + + /** + * Properties of a GlobalSiteTag. + * @memberof google.analytics.admin.v1alpha + * @interface IGlobalSiteTag + * @property {string|null} [name] GlobalSiteTag name + * @property {string|null} [snippet] GlobalSiteTag snippet + */ + + /** + * Constructs a new GlobalSiteTag. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a GlobalSiteTag. + * @implements IGlobalSiteTag + * @constructor + * @param {google.analytics.admin.v1alpha.IGlobalSiteTag=} [properties] Properties to set + */ + function GlobalSiteTag(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GlobalSiteTag name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.GlobalSiteTag + * @instance + */ + GlobalSiteTag.prototype.name = ""; + + /** + * GlobalSiteTag snippet. + * @member {string} snippet + * @memberof google.analytics.admin.v1alpha.GlobalSiteTag + * @instance + */ + GlobalSiteTag.prototype.snippet = ""; + + /** + * Creates a new GlobalSiteTag instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.GlobalSiteTag + * @static + * @param {google.analytics.admin.v1alpha.IGlobalSiteTag=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GlobalSiteTag} GlobalSiteTag instance + */ + GlobalSiteTag.create = function create(properties) { + return new GlobalSiteTag(properties); + }; + + /** + * Encodes the specified GlobalSiteTag message. Does not implicitly {@link google.analytics.admin.v1alpha.GlobalSiteTag.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.GlobalSiteTag + * @static + * @param {google.analytics.admin.v1alpha.IGlobalSiteTag} message GlobalSiteTag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GlobalSiteTag.encode = function encode(message, writer) { + 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.snippet != null && Object.hasOwnProperty.call(message, "snippet")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.snippet); + return writer; + }; + + /** + * Encodes the specified GlobalSiteTag message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GlobalSiteTag.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.GlobalSiteTag + * @static + * @param {google.analytics.admin.v1alpha.IGlobalSiteTag} message GlobalSiteTag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GlobalSiteTag.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GlobalSiteTag message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.GlobalSiteTag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.GlobalSiteTag} GlobalSiteTag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GlobalSiteTag.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GlobalSiteTag(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.snippet = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GlobalSiteTag message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.GlobalSiteTag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.GlobalSiteTag} GlobalSiteTag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GlobalSiteTag.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GlobalSiteTag message. + * @function verify + * @memberof google.analytics.admin.v1alpha.GlobalSiteTag + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GlobalSiteTag.verify = function verify(message) { + if (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.snippet != null && message.hasOwnProperty("snippet")) + if (!$util.isString(message.snippet)) + return "snippet: string expected"; + return null; + }; + + /** + * Creates a GlobalSiteTag message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.GlobalSiteTag + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.GlobalSiteTag} GlobalSiteTag + */ + GlobalSiteTag.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GlobalSiteTag) + return object; + var message = new $root.google.analytics.admin.v1alpha.GlobalSiteTag(); + if (object.name != null) + message.name = String(object.name); + if (object.snippet != null) + message.snippet = String(object.snippet); + return message; + }; + + /** + * Creates a plain object from a GlobalSiteTag message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.GlobalSiteTag + * @static + * @param {google.analytics.admin.v1alpha.GlobalSiteTag} message GlobalSiteTag + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GlobalSiteTag.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.snippet = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.snippet != null && message.hasOwnProperty("snippet")) + object.snippet = message.snippet; + return object; + }; + + /** + * Converts this GlobalSiteTag to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.GlobalSiteTag + * @instance + * @returns {Object.} JSON object + */ + GlobalSiteTag.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GlobalSiteTag + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.GlobalSiteTag + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GlobalSiteTag.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GlobalSiteTag"; + }; + + return GlobalSiteTag; + })(); + + v1alpha.GoogleAdsLink = (function() { + + /** + * Properties of a GoogleAdsLink. + * @memberof google.analytics.admin.v1alpha + * @interface IGoogleAdsLink + * @property {string|null} [name] GoogleAdsLink name + * @property {string|null} [customerId] GoogleAdsLink customerId + * @property {boolean|null} [canManageClients] GoogleAdsLink canManageClients + * @property {google.protobuf.IBoolValue|null} [adsPersonalizationEnabled] GoogleAdsLink adsPersonalizationEnabled + * @property {google.protobuf.ITimestamp|null} [createTime] GoogleAdsLink createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] GoogleAdsLink updateTime + * @property {string|null} [creatorEmailAddress] GoogleAdsLink creatorEmailAddress + */ + + /** + * Constructs a new GoogleAdsLink. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a GoogleAdsLink. + * @implements IGoogleAdsLink + * @constructor + * @param {google.analytics.admin.v1alpha.IGoogleAdsLink=} [properties] Properties to set + */ + function GoogleAdsLink(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GoogleAdsLink name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @instance + */ + GoogleAdsLink.prototype.name = ""; + + /** + * GoogleAdsLink customerId. + * @member {string} customerId + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @instance + */ + GoogleAdsLink.prototype.customerId = ""; + + /** + * GoogleAdsLink canManageClients. + * @member {boolean} canManageClients + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @instance + */ + GoogleAdsLink.prototype.canManageClients = false; + + /** + * GoogleAdsLink adsPersonalizationEnabled. + * @member {google.protobuf.IBoolValue|null|undefined} adsPersonalizationEnabled + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @instance + */ + GoogleAdsLink.prototype.adsPersonalizationEnabled = null; + + /** + * GoogleAdsLink createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @instance + */ + GoogleAdsLink.prototype.createTime = null; + + /** + * GoogleAdsLink updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @instance + */ + GoogleAdsLink.prototype.updateTime = null; + + /** + * GoogleAdsLink creatorEmailAddress. + * @member {string} creatorEmailAddress + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @instance + */ + GoogleAdsLink.prototype.creatorEmailAddress = ""; + + /** + * Creates a new GoogleAdsLink instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @static + * @param {google.analytics.admin.v1alpha.IGoogleAdsLink=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GoogleAdsLink} GoogleAdsLink instance + */ + GoogleAdsLink.create = function create(properties) { + return new GoogleAdsLink(properties); + }; + + /** + * Encodes the specified GoogleAdsLink message. Does not implicitly {@link google.analytics.admin.v1alpha.GoogleAdsLink.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @static + * @param {google.analytics.admin.v1alpha.IGoogleAdsLink} message GoogleAdsLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoogleAdsLink.encode = function encode(message, writer) { + 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.customerId != null && Object.hasOwnProperty.call(message, "customerId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.customerId); + if (message.canManageClients != null && Object.hasOwnProperty.call(message, "canManageClients")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.canManageClients); + if (message.adsPersonalizationEnabled != null && Object.hasOwnProperty.call(message, "adsPersonalizationEnabled")) + $root.google.protobuf.BoolValue.encode(message.adsPersonalizationEnabled, writer.uint32(/* id 5, wireType 2 =*/42).fork()).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.creatorEmailAddress != null && Object.hasOwnProperty.call(message, "creatorEmailAddress")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.creatorEmailAddress); + return writer; + }; + + /** + * Encodes the specified GoogleAdsLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GoogleAdsLink.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @static + * @param {google.analytics.admin.v1alpha.IGoogleAdsLink} message GoogleAdsLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoogleAdsLink.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoogleAdsLink message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.GoogleAdsLink} GoogleAdsLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoogleAdsLink.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GoogleAdsLink(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.customerId = reader.string(); + break; + } + case 4: { + message.canManageClients = reader.bool(); + break; + } + case 5: { + message.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + 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 9: { + message.creatorEmailAddress = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoogleAdsLink message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.GoogleAdsLink} GoogleAdsLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoogleAdsLink.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoogleAdsLink message. + * @function verify + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoogleAdsLink.verify = function verify(message) { + if (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.customerId != null && message.hasOwnProperty("customerId")) + if (!$util.isString(message.customerId)) + return "customerId: string expected"; + if (message.canManageClients != null && message.hasOwnProperty("canManageClients")) + if (typeof message.canManageClients !== "boolean") + return "canManageClients: boolean expected"; + if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) { + var error = $root.google.protobuf.BoolValue.verify(message.adsPersonalizationEnabled); + if (error) + return "adsPersonalizationEnabled." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.creatorEmailAddress != null && message.hasOwnProperty("creatorEmailAddress")) + if (!$util.isString(message.creatorEmailAddress)) + return "creatorEmailAddress: string expected"; + return null; + }; + + /** + * Creates a GoogleAdsLink message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.GoogleAdsLink} GoogleAdsLink + */ + GoogleAdsLink.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GoogleAdsLink) + return object; + var message = new $root.google.analytics.admin.v1alpha.GoogleAdsLink(); + if (object.name != null) + message.name = String(object.name); + if (object.customerId != null) + message.customerId = String(object.customerId); + if (object.canManageClients != null) + message.canManageClients = Boolean(object.canManageClients); + if (object.adsPersonalizationEnabled != null) { + if (typeof object.adsPersonalizationEnabled !== "object") + throw TypeError(".google.analytics.admin.v1alpha.GoogleAdsLink.adsPersonalizationEnabled: object expected"); + message.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.fromObject(object.adsPersonalizationEnabled); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.GoogleAdsLink.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.GoogleAdsLink.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.creatorEmailAddress != null) + message.creatorEmailAddress = String(object.creatorEmailAddress); + return message; + }; + + /** + * Creates a plain object from a GoogleAdsLink message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @static + * @param {google.analytics.admin.v1alpha.GoogleAdsLink} message GoogleAdsLink + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoogleAdsLink.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.customerId = ""; + object.canManageClients = false; + object.adsPersonalizationEnabled = null; + object.createTime = null; + object.updateTime = null; + object.creatorEmailAddress = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.customerId != null && message.hasOwnProperty("customerId")) + object.customerId = message.customerId; + if (message.canManageClients != null && message.hasOwnProperty("canManageClients")) + object.canManageClients = message.canManageClients; + if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) + object.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.toObject(message.adsPersonalizationEnabled, options); + 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.creatorEmailAddress != null && message.hasOwnProperty("creatorEmailAddress")) + object.creatorEmailAddress = message.creatorEmailAddress; + return object; + }; + + /** + * Converts this GoogleAdsLink to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @instance + * @returns {Object.} JSON object + */ + GoogleAdsLink.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoogleAdsLink + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoogleAdsLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GoogleAdsLink"; + }; + + return GoogleAdsLink; + })(); + + v1alpha.DataSharingSettings = (function() { + + /** + * Properties of a DataSharingSettings. + * @memberof google.analytics.admin.v1alpha + * @interface IDataSharingSettings + * @property {string|null} [name] DataSharingSettings name + * @property {boolean|null} [sharingWithGoogleSupportEnabled] DataSharingSettings sharingWithGoogleSupportEnabled + * @property {boolean|null} [sharingWithGoogleAssignedSalesEnabled] DataSharingSettings sharingWithGoogleAssignedSalesEnabled + * @property {boolean|null} [sharingWithGoogleAnySalesEnabled] DataSharingSettings sharingWithGoogleAnySalesEnabled + * @property {boolean|null} [sharingWithGoogleProductsEnabled] DataSharingSettings sharingWithGoogleProductsEnabled + * @property {boolean|null} [sharingWithOthersEnabled] DataSharingSettings sharingWithOthersEnabled + */ + + /** + * Constructs a new DataSharingSettings. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a DataSharingSettings. + * @implements IDataSharingSettings + * @constructor + * @param {google.analytics.admin.v1alpha.IDataSharingSettings=} [properties] Properties to set + */ + function DataSharingSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataSharingSettings name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @instance + */ + DataSharingSettings.prototype.name = ""; + + /** + * DataSharingSettings sharingWithGoogleSupportEnabled. + * @member {boolean} sharingWithGoogleSupportEnabled + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @instance + */ + DataSharingSettings.prototype.sharingWithGoogleSupportEnabled = false; + + /** + * DataSharingSettings sharingWithGoogleAssignedSalesEnabled. + * @member {boolean} sharingWithGoogleAssignedSalesEnabled + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @instance + */ + DataSharingSettings.prototype.sharingWithGoogleAssignedSalesEnabled = false; + + /** + * DataSharingSettings sharingWithGoogleAnySalesEnabled. + * @member {boolean} sharingWithGoogleAnySalesEnabled + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @instance + */ + DataSharingSettings.prototype.sharingWithGoogleAnySalesEnabled = false; + + /** + * DataSharingSettings sharingWithGoogleProductsEnabled. + * @member {boolean} sharingWithGoogleProductsEnabled + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @instance + */ + DataSharingSettings.prototype.sharingWithGoogleProductsEnabled = false; + + /** + * DataSharingSettings sharingWithOthersEnabled. + * @member {boolean} sharingWithOthersEnabled + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @instance + */ + DataSharingSettings.prototype.sharingWithOthersEnabled = false; + + /** + * Creates a new DataSharingSettings instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @static + * @param {google.analytics.admin.v1alpha.IDataSharingSettings=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DataSharingSettings} DataSharingSettings instance + */ + DataSharingSettings.create = function create(properties) { + return new DataSharingSettings(properties); + }; + + /** + * Encodes the specified DataSharingSettings message. Does not implicitly {@link google.analytics.admin.v1alpha.DataSharingSettings.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @static + * @param {google.analytics.admin.v1alpha.IDataSharingSettings} message DataSharingSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSharingSettings.encode = function encode(message, writer) { + 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.sharingWithGoogleSupportEnabled != null && Object.hasOwnProperty.call(message, "sharingWithGoogleSupportEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.sharingWithGoogleSupportEnabled); + if (message.sharingWithGoogleAssignedSalesEnabled != null && Object.hasOwnProperty.call(message, "sharingWithGoogleAssignedSalesEnabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.sharingWithGoogleAssignedSalesEnabled); + if (message.sharingWithGoogleAnySalesEnabled != null && Object.hasOwnProperty.call(message, "sharingWithGoogleAnySalesEnabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.sharingWithGoogleAnySalesEnabled); + if (message.sharingWithGoogleProductsEnabled != null && Object.hasOwnProperty.call(message, "sharingWithGoogleProductsEnabled")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.sharingWithGoogleProductsEnabled); + if (message.sharingWithOthersEnabled != null && Object.hasOwnProperty.call(message, "sharingWithOthersEnabled")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.sharingWithOthersEnabled); + return writer; + }; + + /** + * Encodes the specified DataSharingSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataSharingSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @static + * @param {google.analytics.admin.v1alpha.IDataSharingSettings} message DataSharingSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSharingSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataSharingSettings message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.DataSharingSettings} DataSharingSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSharingSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DataSharingSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.sharingWithGoogleSupportEnabled = reader.bool(); + break; + } + case 3: { + message.sharingWithGoogleAssignedSalesEnabled = reader.bool(); + break; + } + case 4: { + message.sharingWithGoogleAnySalesEnabled = reader.bool(); + break; + } + case 5: { + message.sharingWithGoogleProductsEnabled = reader.bool(); + break; + } + case 6: { + message.sharingWithOthersEnabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataSharingSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.DataSharingSettings} DataSharingSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSharingSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataSharingSettings message. + * @function verify + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataSharingSettings.verify = function verify(message) { + if (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.sharingWithGoogleSupportEnabled != null && message.hasOwnProperty("sharingWithGoogleSupportEnabled")) + if (typeof message.sharingWithGoogleSupportEnabled !== "boolean") + return "sharingWithGoogleSupportEnabled: boolean expected"; + if (message.sharingWithGoogleAssignedSalesEnabled != null && message.hasOwnProperty("sharingWithGoogleAssignedSalesEnabled")) + if (typeof message.sharingWithGoogleAssignedSalesEnabled !== "boolean") + return "sharingWithGoogleAssignedSalesEnabled: boolean expected"; + if (message.sharingWithGoogleAnySalesEnabled != null && message.hasOwnProperty("sharingWithGoogleAnySalesEnabled")) + if (typeof message.sharingWithGoogleAnySalesEnabled !== "boolean") + return "sharingWithGoogleAnySalesEnabled: boolean expected"; + if (message.sharingWithGoogleProductsEnabled != null && message.hasOwnProperty("sharingWithGoogleProductsEnabled")) + if (typeof message.sharingWithGoogleProductsEnabled !== "boolean") + return "sharingWithGoogleProductsEnabled: boolean expected"; + if (message.sharingWithOthersEnabled != null && message.hasOwnProperty("sharingWithOthersEnabled")) + if (typeof message.sharingWithOthersEnabled !== "boolean") + return "sharingWithOthersEnabled: boolean expected"; + return null; + }; + + /** + * Creates a DataSharingSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.DataSharingSettings} DataSharingSettings + */ + DataSharingSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DataSharingSettings) + return object; + var message = new $root.google.analytics.admin.v1alpha.DataSharingSettings(); + if (object.name != null) + message.name = String(object.name); + if (object.sharingWithGoogleSupportEnabled != null) + message.sharingWithGoogleSupportEnabled = Boolean(object.sharingWithGoogleSupportEnabled); + if (object.sharingWithGoogleAssignedSalesEnabled != null) + message.sharingWithGoogleAssignedSalesEnabled = Boolean(object.sharingWithGoogleAssignedSalesEnabled); + if (object.sharingWithGoogleAnySalesEnabled != null) + message.sharingWithGoogleAnySalesEnabled = Boolean(object.sharingWithGoogleAnySalesEnabled); + if (object.sharingWithGoogleProductsEnabled != null) + message.sharingWithGoogleProductsEnabled = Boolean(object.sharingWithGoogleProductsEnabled); + if (object.sharingWithOthersEnabled != null) + message.sharingWithOthersEnabled = Boolean(object.sharingWithOthersEnabled); + return message; + }; + + /** + * Creates a plain object from a DataSharingSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @static + * @param {google.analytics.admin.v1alpha.DataSharingSettings} message DataSharingSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataSharingSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.sharingWithGoogleSupportEnabled = false; + object.sharingWithGoogleAssignedSalesEnabled = false; + object.sharingWithGoogleAnySalesEnabled = false; + object.sharingWithGoogleProductsEnabled = false; + object.sharingWithOthersEnabled = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.sharingWithGoogleSupportEnabled != null && message.hasOwnProperty("sharingWithGoogleSupportEnabled")) + object.sharingWithGoogleSupportEnabled = message.sharingWithGoogleSupportEnabled; + if (message.sharingWithGoogleAssignedSalesEnabled != null && message.hasOwnProperty("sharingWithGoogleAssignedSalesEnabled")) + object.sharingWithGoogleAssignedSalesEnabled = message.sharingWithGoogleAssignedSalesEnabled; + if (message.sharingWithGoogleAnySalesEnabled != null && message.hasOwnProperty("sharingWithGoogleAnySalesEnabled")) + object.sharingWithGoogleAnySalesEnabled = message.sharingWithGoogleAnySalesEnabled; + if (message.sharingWithGoogleProductsEnabled != null && message.hasOwnProperty("sharingWithGoogleProductsEnabled")) + object.sharingWithGoogleProductsEnabled = message.sharingWithGoogleProductsEnabled; + if (message.sharingWithOthersEnabled != null && message.hasOwnProperty("sharingWithOthersEnabled")) + object.sharingWithOthersEnabled = message.sharingWithOthersEnabled; + return object; + }; + + /** + * Converts this DataSharingSettings to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @instance + * @returns {Object.} JSON object + */ + DataSharingSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataSharingSettings + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataSharingSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DataSharingSettings"; + }; + + return DataSharingSettings; + })(); + + v1alpha.AccountSummary = (function() { + + /** + * Properties of an AccountSummary. + * @memberof google.analytics.admin.v1alpha + * @interface IAccountSummary + * @property {string|null} [name] AccountSummary name + * @property {string|null} [account] AccountSummary account + * @property {string|null} [displayName] AccountSummary displayName + * @property {Array.|null} [propertySummaries] AccountSummary propertySummaries + */ + + /** + * Constructs a new AccountSummary. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AccountSummary. + * @implements IAccountSummary + * @constructor + * @param {google.analytics.admin.v1alpha.IAccountSummary=} [properties] Properties to set + */ + function AccountSummary(properties) { + this.propertySummaries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccountSummary name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.AccountSummary + * @instance + */ + AccountSummary.prototype.name = ""; + + /** + * AccountSummary account. + * @member {string} account + * @memberof google.analytics.admin.v1alpha.AccountSummary + * @instance + */ + AccountSummary.prototype.account = ""; + + /** + * AccountSummary displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1alpha.AccountSummary + * @instance + */ + AccountSummary.prototype.displayName = ""; + + /** + * AccountSummary propertySummaries. + * @member {Array.} propertySummaries + * @memberof google.analytics.admin.v1alpha.AccountSummary + * @instance + */ + AccountSummary.prototype.propertySummaries = $util.emptyArray; + + /** + * Creates a new AccountSummary instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AccountSummary + * @static + * @param {google.analytics.admin.v1alpha.IAccountSummary=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AccountSummary} AccountSummary instance + */ + AccountSummary.create = function create(properties) { + return new AccountSummary(properties); + }; + + /** + * Encodes the specified AccountSummary message. Does not implicitly {@link google.analytics.admin.v1alpha.AccountSummary.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AccountSummary + * @static + * @param {google.analytics.admin.v1alpha.IAccountSummary} message AccountSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccountSummary.encode = function encode(message, writer) { + 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.account != null && Object.hasOwnProperty.call(message, "account")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.account); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.propertySummaries != null && message.propertySummaries.length) + for (var i = 0; i < message.propertySummaries.length; ++i) + $root.google.analytics.admin.v1alpha.PropertySummary.encode(message.propertySummaries[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AccountSummary message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccountSummary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AccountSummary + * @static + * @param {google.analytics.admin.v1alpha.IAccountSummary} message AccountSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccountSummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccountSummary message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AccountSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AccountSummary} AccountSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccountSummary.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AccountSummary(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.account = reader.string(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + case 4: { + if (!(message.propertySummaries && message.propertySummaries.length)) + message.propertySummaries = []; + message.propertySummaries.push($root.google.analytics.admin.v1alpha.PropertySummary.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccountSummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AccountSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AccountSummary} AccountSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccountSummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccountSummary message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AccountSummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccountSummary.verify = function verify(message) { + if (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.account != null && message.hasOwnProperty("account")) + if (!$util.isString(message.account)) + return "account: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.propertySummaries != null && message.hasOwnProperty("propertySummaries")) { + if (!Array.isArray(message.propertySummaries)) + return "propertySummaries: array expected"; + for (var i = 0; i < message.propertySummaries.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.PropertySummary.verify(message.propertySummaries[i]); + if (error) + return "propertySummaries." + error; + } + } + return null; + }; + + /** + * Creates an AccountSummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AccountSummary + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AccountSummary} AccountSummary + */ + AccountSummary.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AccountSummary) + return object; + var message = new $root.google.analytics.admin.v1alpha.AccountSummary(); + if (object.name != null) + message.name = String(object.name); + if (object.account != null) + message.account = String(object.account); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.propertySummaries) { + if (!Array.isArray(object.propertySummaries)) + throw TypeError(".google.analytics.admin.v1alpha.AccountSummary.propertySummaries: array expected"); + message.propertySummaries = []; + for (var i = 0; i < object.propertySummaries.length; ++i) { + if (typeof object.propertySummaries[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AccountSummary.propertySummaries: object expected"); + message.propertySummaries[i] = $root.google.analytics.admin.v1alpha.PropertySummary.fromObject(object.propertySummaries[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AccountSummary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AccountSummary + * @static + * @param {google.analytics.admin.v1alpha.AccountSummary} message AccountSummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccountSummary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.propertySummaries = []; + if (options.defaults) { + object.name = ""; + object.account = ""; + object.displayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.account != null && message.hasOwnProperty("account")) + object.account = message.account; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.propertySummaries && message.propertySummaries.length) { + object.propertySummaries = []; + for (var j = 0; j < message.propertySummaries.length; ++j) + object.propertySummaries[j] = $root.google.analytics.admin.v1alpha.PropertySummary.toObject(message.propertySummaries[j], options); + } + return object; + }; + + /** + * Converts this AccountSummary to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AccountSummary + * @instance + * @returns {Object.} JSON object + */ + AccountSummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccountSummary + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AccountSummary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccountSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AccountSummary"; + }; + + return AccountSummary; + })(); + + v1alpha.PropertySummary = (function() { + + /** + * Properties of a PropertySummary. + * @memberof google.analytics.admin.v1alpha + * @interface IPropertySummary + * @property {string|null} [property] PropertySummary property + * @property {string|null} [displayName] PropertySummary displayName + * @property {google.analytics.admin.v1alpha.PropertyType|null} [propertyType] PropertySummary propertyType + * @property {string|null} [parent] PropertySummary parent + */ + + /** + * Constructs a new PropertySummary. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a PropertySummary. + * @implements IPropertySummary + * @constructor + * @param {google.analytics.admin.v1alpha.IPropertySummary=} [properties] Properties to set + */ + function PropertySummary(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PropertySummary property. + * @member {string} property + * @memberof google.analytics.admin.v1alpha.PropertySummary + * @instance + */ + PropertySummary.prototype.property = ""; + + /** + * PropertySummary displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1alpha.PropertySummary + * @instance + */ + PropertySummary.prototype.displayName = ""; + + /** + * PropertySummary propertyType. + * @member {google.analytics.admin.v1alpha.PropertyType} propertyType + * @memberof google.analytics.admin.v1alpha.PropertySummary + * @instance + */ + PropertySummary.prototype.propertyType = 0; + + /** + * PropertySummary parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.PropertySummary + * @instance + */ + PropertySummary.prototype.parent = ""; + + /** + * Creates a new PropertySummary instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.PropertySummary + * @static + * @param {google.analytics.admin.v1alpha.IPropertySummary=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.PropertySummary} PropertySummary instance + */ + PropertySummary.create = function create(properties) { + return new PropertySummary(properties); + }; + + /** + * Encodes the specified PropertySummary message. Does not implicitly {@link google.analytics.admin.v1alpha.PropertySummary.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.PropertySummary + * @static + * @param {google.analytics.admin.v1alpha.IPropertySummary} message PropertySummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertySummary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.propertyType != null && Object.hasOwnProperty.call(message, "propertyType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.propertyType); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.parent); + return writer; + }; + + /** + * Encodes the specified PropertySummary message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.PropertySummary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.PropertySummary + * @static + * @param {google.analytics.admin.v1alpha.IPropertySummary} message PropertySummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertySummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PropertySummary message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.PropertySummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.PropertySummary} PropertySummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertySummary.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.PropertySummary(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.property = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.propertyType = reader.int32(); + break; + } + case 4: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PropertySummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.PropertySummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.PropertySummary} PropertySummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertySummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PropertySummary message. + * @function verify + * @memberof google.analytics.admin.v1alpha.PropertySummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PropertySummary.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.propertyType != null && message.hasOwnProperty("propertyType")) + switch (message.propertyType) { + default: + return "propertyType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + return null; + }; + + /** + * Creates a PropertySummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.PropertySummary + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.PropertySummary} PropertySummary + */ + PropertySummary.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.PropertySummary) + return object; + var message = new $root.google.analytics.admin.v1alpha.PropertySummary(); + if (object.property != null) + message.property = String(object.property); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.propertyType) { + default: + if (typeof object.propertyType === "number") { + message.propertyType = object.propertyType; + break; + } + break; + case "PROPERTY_TYPE_UNSPECIFIED": + case 0: + message.propertyType = 0; + break; + case "PROPERTY_TYPE_ORDINARY": + case 1: + message.propertyType = 1; + break; + case "PROPERTY_TYPE_SUBPROPERTY": + case 2: + message.propertyType = 2; + break; + case "PROPERTY_TYPE_ROLLUP": + case 3: + message.propertyType = 3; + break; + } + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a PropertySummary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.PropertySummary + * @static + * @param {google.analytics.admin.v1alpha.PropertySummary} message PropertySummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PropertySummary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.property = ""; + object.displayName = ""; + object.propertyType = options.enums === String ? "PROPERTY_TYPE_UNSPECIFIED" : 0; + object.parent = ""; + } + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.propertyType != null && message.hasOwnProperty("propertyType")) + object.propertyType = options.enums === String ? $root.google.analytics.admin.v1alpha.PropertyType[message.propertyType] === undefined ? message.propertyType : $root.google.analytics.admin.v1alpha.PropertyType[message.propertyType] : message.propertyType; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this PropertySummary to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.PropertySummary + * @instance + * @returns {Object.} JSON object + */ + PropertySummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PropertySummary + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.PropertySummary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PropertySummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.PropertySummary"; + }; + + return PropertySummary; + })(); + + v1alpha.MeasurementProtocolSecret = (function() { + + /** + * Properties of a MeasurementProtocolSecret. + * @memberof google.analytics.admin.v1alpha + * @interface IMeasurementProtocolSecret + * @property {string|null} [name] MeasurementProtocolSecret name + * @property {string|null} [displayName] MeasurementProtocolSecret displayName + * @property {string|null} [secretValue] MeasurementProtocolSecret secretValue + */ + + /** + * Constructs a new MeasurementProtocolSecret. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a MeasurementProtocolSecret. + * @implements IMeasurementProtocolSecret + * @constructor + * @param {google.analytics.admin.v1alpha.IMeasurementProtocolSecret=} [properties] Properties to set + */ + function MeasurementProtocolSecret(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MeasurementProtocolSecret name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @instance + */ + MeasurementProtocolSecret.prototype.name = ""; + + /** + * MeasurementProtocolSecret displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @instance + */ + MeasurementProtocolSecret.prototype.displayName = ""; + + /** + * MeasurementProtocolSecret secretValue. + * @member {string} secretValue + * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @instance + */ + MeasurementProtocolSecret.prototype.secretValue = ""; + + /** + * Creates a new MeasurementProtocolSecret instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @static + * @param {google.analytics.admin.v1alpha.IMeasurementProtocolSecret=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.MeasurementProtocolSecret} MeasurementProtocolSecret instance + */ + MeasurementProtocolSecret.create = function create(properties) { + return new MeasurementProtocolSecret(properties); + }; + + /** + * Encodes the specified MeasurementProtocolSecret message. Does not implicitly {@link google.analytics.admin.v1alpha.MeasurementProtocolSecret.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @static + * @param {google.analytics.admin.v1alpha.IMeasurementProtocolSecret} message MeasurementProtocolSecret message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MeasurementProtocolSecret.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.secretValue != null && Object.hasOwnProperty.call(message, "secretValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.secretValue); + return writer; + }; + + /** + * Encodes the specified MeasurementProtocolSecret message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.MeasurementProtocolSecret.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @static + * @param {google.analytics.admin.v1alpha.IMeasurementProtocolSecret} message MeasurementProtocolSecret message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MeasurementProtocolSecret.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MeasurementProtocolSecret message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.MeasurementProtocolSecret} MeasurementProtocolSecret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MeasurementProtocolSecret.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.secretValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MeasurementProtocolSecret message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.MeasurementProtocolSecret} MeasurementProtocolSecret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MeasurementProtocolSecret.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MeasurementProtocolSecret message. + * @function verify + * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MeasurementProtocolSecret.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.secretValue != null && message.hasOwnProperty("secretValue")) + if (!$util.isString(message.secretValue)) + return "secretValue: string expected"; + return null; + }; + + /** + * Creates a MeasurementProtocolSecret message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.MeasurementProtocolSecret} MeasurementProtocolSecret + */ + MeasurementProtocolSecret.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret) + return object; + var message = new $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.secretValue != null) + message.secretValue = String(object.secretValue); + return message; + }; + + /** + * Creates a plain object from a MeasurementProtocolSecret message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @static + * @param {google.analytics.admin.v1alpha.MeasurementProtocolSecret} message MeasurementProtocolSecret + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MeasurementProtocolSecret.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.secretValue = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.secretValue != null && message.hasOwnProperty("secretValue")) + object.secretValue = message.secretValue; + return object; + }; + + /** + * Converts this MeasurementProtocolSecret to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @instance + * @returns {Object.} JSON object + */ + MeasurementProtocolSecret.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MeasurementProtocolSecret + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MeasurementProtocolSecret.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.MeasurementProtocolSecret"; + }; + + return MeasurementProtocolSecret; + })(); + + v1alpha.ChangeHistoryEvent = (function() { + + /** + * Properties of a ChangeHistoryEvent. + * @memberof google.analytics.admin.v1alpha + * @interface IChangeHistoryEvent + * @property {string|null} [id] ChangeHistoryEvent id + * @property {google.protobuf.ITimestamp|null} [changeTime] ChangeHistoryEvent changeTime + * @property {google.analytics.admin.v1alpha.ActorType|null} [actorType] ChangeHistoryEvent actorType + * @property {string|null} [userActorEmail] ChangeHistoryEvent userActorEmail + * @property {boolean|null} [changesFiltered] ChangeHistoryEvent changesFiltered + * @property {Array.|null} [changes] ChangeHistoryEvent changes + */ + + /** + * Constructs a new ChangeHistoryEvent. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ChangeHistoryEvent. + * @implements IChangeHistoryEvent + * @constructor + * @param {google.analytics.admin.v1alpha.IChangeHistoryEvent=} [properties] Properties to set + */ + function ChangeHistoryEvent(properties) { + this.changes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChangeHistoryEvent id. + * @member {string} id + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @instance + */ + ChangeHistoryEvent.prototype.id = ""; + + /** + * ChangeHistoryEvent changeTime. + * @member {google.protobuf.ITimestamp|null|undefined} changeTime + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @instance + */ + ChangeHistoryEvent.prototype.changeTime = null; + + /** + * ChangeHistoryEvent actorType. + * @member {google.analytics.admin.v1alpha.ActorType} actorType + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @instance + */ + ChangeHistoryEvent.prototype.actorType = 0; + + /** + * ChangeHistoryEvent userActorEmail. + * @member {string} userActorEmail + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @instance + */ + ChangeHistoryEvent.prototype.userActorEmail = ""; + + /** + * ChangeHistoryEvent changesFiltered. + * @member {boolean} changesFiltered + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @instance + */ + ChangeHistoryEvent.prototype.changesFiltered = false; + + /** + * ChangeHistoryEvent changes. + * @member {Array.} changes + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @instance + */ + ChangeHistoryEvent.prototype.changes = $util.emptyArray; + + /** + * Creates a new ChangeHistoryEvent instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @static + * @param {google.analytics.admin.v1alpha.IChangeHistoryEvent=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ChangeHistoryEvent} ChangeHistoryEvent instance + */ + ChangeHistoryEvent.create = function create(properties) { + return new ChangeHistoryEvent(properties); + }; + + /** + * Encodes the specified ChangeHistoryEvent message. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryEvent.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @static + * @param {google.analytics.admin.v1alpha.IChangeHistoryEvent} message ChangeHistoryEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeHistoryEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.changeTime != null && Object.hasOwnProperty.call(message, "changeTime")) + $root.google.protobuf.Timestamp.encode(message.changeTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.actorType != null && Object.hasOwnProperty.call(message, "actorType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.actorType); + if (message.userActorEmail != null && Object.hasOwnProperty.call(message, "userActorEmail")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.userActorEmail); + if (message.changesFiltered != null && Object.hasOwnProperty.call(message, "changesFiltered")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.changesFiltered); + if (message.changes != null && message.changes.length) + for (var i = 0; i < message.changes.length; ++i) + $root.google.analytics.admin.v1alpha.ChangeHistoryChange.encode(message.changes[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChangeHistoryEvent message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @static + * @param {google.analytics.admin.v1alpha.IChangeHistoryEvent} message ChangeHistoryEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeHistoryEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChangeHistoryEvent message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ChangeHistoryEvent} ChangeHistoryEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeHistoryEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ChangeHistoryEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.changeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.actorType = reader.int32(); + break; + } + case 4: { + message.userActorEmail = reader.string(); + break; + } + case 5: { + message.changesFiltered = reader.bool(); + break; + } + case 6: { + if (!(message.changes && message.changes.length)) + message.changes = []; + message.changes.push($root.google.analytics.admin.v1alpha.ChangeHistoryChange.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChangeHistoryEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ChangeHistoryEvent} ChangeHistoryEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeHistoryEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChangeHistoryEvent message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeHistoryEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.changeTime != null && message.hasOwnProperty("changeTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.changeTime); + if (error) + return "changeTime." + error; + } + if (message.actorType != null && message.hasOwnProperty("actorType")) + switch (message.actorType) { + default: + return "actorType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.userActorEmail != null && message.hasOwnProperty("userActorEmail")) + if (!$util.isString(message.userActorEmail)) + return "userActorEmail: string expected"; + if (message.changesFiltered != null && message.hasOwnProperty("changesFiltered")) + if (typeof message.changesFiltered !== "boolean") + return "changesFiltered: boolean expected"; + if (message.changes != null && message.hasOwnProperty("changes")) { + if (!Array.isArray(message.changes)) + return "changes: array expected"; + for (var i = 0; i < message.changes.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.verify(message.changes[i]); + if (error) + return "changes." + error; + } + } + return null; + }; + + /** + * Creates a ChangeHistoryEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ChangeHistoryEvent} ChangeHistoryEvent + */ + ChangeHistoryEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ChangeHistoryEvent) + return object; + var message = new $root.google.analytics.admin.v1alpha.ChangeHistoryEvent(); + if (object.id != null) + message.id = String(object.id); + if (object.changeTime != null) { + if (typeof object.changeTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryEvent.changeTime: object expected"); + message.changeTime = $root.google.protobuf.Timestamp.fromObject(object.changeTime); + } + switch (object.actorType) { + default: + if (typeof object.actorType === "number") { + message.actorType = object.actorType; + break; + } + break; + case "ACTOR_TYPE_UNSPECIFIED": + case 0: + message.actorType = 0; + break; + case "USER": + case 1: + message.actorType = 1; + break; + case "SYSTEM": + case 2: + message.actorType = 2; + break; + case "SUPPORT": + case 3: + message.actorType = 3; + break; + } + if (object.userActorEmail != null) + message.userActorEmail = String(object.userActorEmail); + if (object.changesFiltered != null) + message.changesFiltered = Boolean(object.changesFiltered); + if (object.changes) { + if (!Array.isArray(object.changes)) + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryEvent.changes: array expected"); + message.changes = []; + for (var i = 0; i < object.changes.length; ++i) { + if (typeof object.changes[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryEvent.changes: object expected"); + message.changes[i] = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.fromObject(object.changes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ChangeHistoryEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @static + * @param {google.analytics.admin.v1alpha.ChangeHistoryEvent} message ChangeHistoryEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeHistoryEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.changes = []; + if (options.defaults) { + object.id = ""; + object.changeTime = null; + object.actorType = options.enums === String ? "ACTOR_TYPE_UNSPECIFIED" : 0; + object.userActorEmail = ""; + object.changesFiltered = false; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.changeTime != null && message.hasOwnProperty("changeTime")) + object.changeTime = $root.google.protobuf.Timestamp.toObject(message.changeTime, options); + if (message.actorType != null && message.hasOwnProperty("actorType")) + object.actorType = options.enums === String ? $root.google.analytics.admin.v1alpha.ActorType[message.actorType] === undefined ? message.actorType : $root.google.analytics.admin.v1alpha.ActorType[message.actorType] : message.actorType; + if (message.userActorEmail != null && message.hasOwnProperty("userActorEmail")) + object.userActorEmail = message.userActorEmail; + if (message.changesFiltered != null && message.hasOwnProperty("changesFiltered")) + object.changesFiltered = message.changesFiltered; + if (message.changes && message.changes.length) { + object.changes = []; + for (var j = 0; j < message.changes.length; ++j) + object.changes[j] = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.toObject(message.changes[j], options); + } + return object; + }; + + /** + * Converts this ChangeHistoryEvent to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @instance + * @returns {Object.} JSON object + */ + ChangeHistoryEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChangeHistoryEvent + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChangeHistoryEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ChangeHistoryEvent"; + }; + + return ChangeHistoryEvent; + })(); + + v1alpha.ChangeHistoryChange = (function() { + + /** + * Properties of a ChangeHistoryChange. + * @memberof google.analytics.admin.v1alpha + * @interface IChangeHistoryChange + * @property {string|null} [resource] ChangeHistoryChange resource + * @property {google.analytics.admin.v1alpha.ActionType|null} [action] ChangeHistoryChange action + * @property {google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource|null} [resourceBeforeChange] ChangeHistoryChange resourceBeforeChange + * @property {google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource|null} [resourceAfterChange] ChangeHistoryChange resourceAfterChange + */ + + /** + * Constructs a new ChangeHistoryChange. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ChangeHistoryChange. + * @implements IChangeHistoryChange + * @constructor + * @param {google.analytics.admin.v1alpha.IChangeHistoryChange=} [properties] Properties to set + */ + function ChangeHistoryChange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChangeHistoryChange resource. + * @member {string} resource + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @instance + */ + ChangeHistoryChange.prototype.resource = ""; + + /** + * ChangeHistoryChange action. + * @member {google.analytics.admin.v1alpha.ActionType} action + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @instance + */ + ChangeHistoryChange.prototype.action = 0; + + /** + * ChangeHistoryChange resourceBeforeChange. + * @member {google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource|null|undefined} resourceBeforeChange + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @instance + */ + ChangeHistoryChange.prototype.resourceBeforeChange = null; + + /** + * ChangeHistoryChange resourceAfterChange. + * @member {google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource|null|undefined} resourceAfterChange + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @instance + */ + ChangeHistoryChange.prototype.resourceAfterChange = null; + + /** + * Creates a new ChangeHistoryChange instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @static + * @param {google.analytics.admin.v1alpha.IChangeHistoryChange=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ChangeHistoryChange} ChangeHistoryChange instance + */ + ChangeHistoryChange.create = function create(properties) { + return new ChangeHistoryChange(properties); + }; + + /** + * Encodes the specified ChangeHistoryChange message. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryChange.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @static + * @param {google.analytics.admin.v1alpha.IChangeHistoryChange} message ChangeHistoryChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeHistoryChange.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.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.action); + if (message.resourceBeforeChange != null && Object.hasOwnProperty.call(message, "resourceBeforeChange")) + $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.encode(message.resourceBeforeChange, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.resourceAfterChange != null && Object.hasOwnProperty.call(message, "resourceAfterChange")) + $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.encode(message.resourceAfterChange, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChangeHistoryChange message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryChange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @static + * @param {google.analytics.admin.v1alpha.IChangeHistoryChange} message ChangeHistoryChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeHistoryChange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChangeHistoryChange message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ChangeHistoryChange} ChangeHistoryChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeHistoryChange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ChangeHistoryChange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + message.action = reader.int32(); + break; + } + case 3: { + message.resourceBeforeChange = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.decode(reader, reader.uint32()); + break; + } + case 4: { + message.resourceAfterChange = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChangeHistoryChange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ChangeHistoryChange} ChangeHistoryChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeHistoryChange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChangeHistoryChange message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeHistoryChange.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.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.resourceBeforeChange != null && message.hasOwnProperty("resourceBeforeChange")) { + var error = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.verify(message.resourceBeforeChange); + if (error) + return "resourceBeforeChange." + error; + } + if (message.resourceAfterChange != null && message.hasOwnProperty("resourceAfterChange")) { + var error = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.verify(message.resourceAfterChange); + if (error) + return "resourceAfterChange." + error; + } + return null; + }; + + /** + * Creates a ChangeHistoryChange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ChangeHistoryChange} ChangeHistoryChange + */ + ChangeHistoryChange.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ChangeHistoryChange) + return object; + var message = new $root.google.analytics.admin.v1alpha.ChangeHistoryChange(); + if (object.resource != null) + message.resource = String(object.resource); + switch (object.action) { + default: + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; + case "ACTION_TYPE_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "CREATED": + case 1: + message.action = 1; + break; + case "UPDATED": + case 2: + message.action = 2; + break; + case "DELETED": + case 3: + message.action = 3; + break; + } + if (object.resourceBeforeChange != null) { + if (typeof object.resourceBeforeChange !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.resourceBeforeChange: object expected"); + message.resourceBeforeChange = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.fromObject(object.resourceBeforeChange); + } + if (object.resourceAfterChange != null) { + if (typeof object.resourceAfterChange !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.resourceAfterChange: object expected"); + message.resourceAfterChange = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.fromObject(object.resourceAfterChange); + } + return message; + }; + + /** + * Creates a plain object from a ChangeHistoryChange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @static + * @param {google.analytics.admin.v1alpha.ChangeHistoryChange} message ChangeHistoryChange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeHistoryChange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resource = ""; + object.action = options.enums === String ? "ACTION_TYPE_UNSPECIFIED" : 0; + object.resourceBeforeChange = null; + object.resourceAfterChange = null; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.analytics.admin.v1alpha.ActionType[message.action] === undefined ? message.action : $root.google.analytics.admin.v1alpha.ActionType[message.action] : message.action; + if (message.resourceBeforeChange != null && message.hasOwnProperty("resourceBeforeChange")) + object.resourceBeforeChange = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.toObject(message.resourceBeforeChange, options); + if (message.resourceAfterChange != null && message.hasOwnProperty("resourceAfterChange")) + object.resourceAfterChange = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.toObject(message.resourceAfterChange, options); + return object; + }; + + /** + * Converts this ChangeHistoryChange to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @instance + * @returns {Object.} JSON object + */ + ChangeHistoryChange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChangeHistoryChange + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChangeHistoryChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ChangeHistoryChange"; + }; + + ChangeHistoryChange.ChangeHistoryResource = (function() { + + /** + * Properties of a ChangeHistoryResource. + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @interface IChangeHistoryResource + * @property {google.analytics.admin.v1alpha.IAccount|null} [account] ChangeHistoryResource account + * @property {google.analytics.admin.v1alpha.IProperty|null} [property] ChangeHistoryResource property + * @property {google.analytics.admin.v1alpha.IFirebaseLink|null} [firebaseLink] ChangeHistoryResource firebaseLink + * @property {google.analytics.admin.v1alpha.IGoogleAdsLink|null} [googleAdsLink] ChangeHistoryResource googleAdsLink + * @property {google.analytics.admin.v1alpha.IGoogleSignalsSettings|null} [googleSignalsSettings] ChangeHistoryResource googleSignalsSettings + * @property {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink|null} [displayVideo_360AdvertiserLink] ChangeHistoryResource displayVideo_360AdvertiserLink + * @property {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal|null} [displayVideo_360AdvertiserLinkProposal] ChangeHistoryResource displayVideo_360AdvertiserLinkProposal + * @property {google.analytics.admin.v1alpha.IConversionEvent|null} [conversionEvent] ChangeHistoryResource conversionEvent + * @property {google.analytics.admin.v1alpha.IMeasurementProtocolSecret|null} [measurementProtocolSecret] ChangeHistoryResource measurementProtocolSecret + * @property {google.analytics.admin.v1alpha.ICustomDimension|null} [customDimension] ChangeHistoryResource customDimension + * @property {google.analytics.admin.v1alpha.ICustomMetric|null} [customMetric] ChangeHistoryResource customMetric + * @property {google.analytics.admin.v1alpha.IDataRetentionSettings|null} [dataRetentionSettings] ChangeHistoryResource dataRetentionSettings + * @property {google.analytics.admin.v1alpha.ISearchAds360Link|null} [searchAds_360Link] ChangeHistoryResource searchAds_360Link + * @property {google.analytics.admin.v1alpha.IDataStream|null} [dataStream] ChangeHistoryResource dataStream + * @property {google.analytics.admin.v1alpha.IAttributionSettings|null} [attributionSettings] ChangeHistoryResource attributionSettings + * @property {google.analytics.admin.v1alpha.IExpandedDataSet|null} [expandedDataSet] ChangeHistoryResource expandedDataSet + * @property {google.analytics.admin.v1alpha.IBigQueryLink|null} [bigqueryLink] ChangeHistoryResource bigqueryLink + */ + + /** + * Constructs a new ChangeHistoryResource. + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @classdesc Represents a ChangeHistoryResource. + * @implements IChangeHistoryResource + * @constructor + * @param {google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource=} [properties] Properties to set + */ + function ChangeHistoryResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChangeHistoryResource account. + * @member {google.analytics.admin.v1alpha.IAccount|null|undefined} account + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.account = null; + + /** + * ChangeHistoryResource property. + * @member {google.analytics.admin.v1alpha.IProperty|null|undefined} property + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.property = null; + + /** + * ChangeHistoryResource firebaseLink. + * @member {google.analytics.admin.v1alpha.IFirebaseLink|null|undefined} firebaseLink + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.firebaseLink = null; + + /** + * ChangeHistoryResource googleAdsLink. + * @member {google.analytics.admin.v1alpha.IGoogleAdsLink|null|undefined} googleAdsLink + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.googleAdsLink = null; + + /** + * ChangeHistoryResource googleSignalsSettings. + * @member {google.analytics.admin.v1alpha.IGoogleSignalsSettings|null|undefined} googleSignalsSettings + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.googleSignalsSettings = null; + + /** + * ChangeHistoryResource displayVideo_360AdvertiserLink. + * @member {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink|null|undefined} displayVideo_360AdvertiserLink + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.displayVideo_360AdvertiserLink = null; + + /** + * ChangeHistoryResource displayVideo_360AdvertiserLinkProposal. + * @member {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal|null|undefined} displayVideo_360AdvertiserLinkProposal + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.displayVideo_360AdvertiserLinkProposal = null; + + /** + * ChangeHistoryResource conversionEvent. + * @member {google.analytics.admin.v1alpha.IConversionEvent|null|undefined} conversionEvent + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.conversionEvent = null; + + /** + * ChangeHistoryResource measurementProtocolSecret. + * @member {google.analytics.admin.v1alpha.IMeasurementProtocolSecret|null|undefined} measurementProtocolSecret + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.measurementProtocolSecret = null; + + /** + * ChangeHistoryResource customDimension. + * @member {google.analytics.admin.v1alpha.ICustomDimension|null|undefined} customDimension + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.customDimension = null; + + /** + * ChangeHistoryResource customMetric. + * @member {google.analytics.admin.v1alpha.ICustomMetric|null|undefined} customMetric + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.customMetric = null; + + /** + * ChangeHistoryResource dataRetentionSettings. + * @member {google.analytics.admin.v1alpha.IDataRetentionSettings|null|undefined} dataRetentionSettings + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.dataRetentionSettings = null; + + /** + * ChangeHistoryResource searchAds_360Link. + * @member {google.analytics.admin.v1alpha.ISearchAds360Link|null|undefined} searchAds_360Link + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.searchAds_360Link = null; + + /** + * ChangeHistoryResource dataStream. + * @member {google.analytics.admin.v1alpha.IDataStream|null|undefined} dataStream + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.dataStream = null; + + /** + * ChangeHistoryResource attributionSettings. + * @member {google.analytics.admin.v1alpha.IAttributionSettings|null|undefined} attributionSettings + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.attributionSettings = null; + + /** + * ChangeHistoryResource expandedDataSet. + * @member {google.analytics.admin.v1alpha.IExpandedDataSet|null|undefined} expandedDataSet + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.expandedDataSet = null; + + /** + * ChangeHistoryResource bigqueryLink. + * @member {google.analytics.admin.v1alpha.IBigQueryLink|null|undefined} bigqueryLink + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.bigqueryLink = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ChangeHistoryResource resource. + * @member {"account"|"property"|"firebaseLink"|"googleAdsLink"|"googleSignalsSettings"|"displayVideo_360AdvertiserLink"|"displayVideo_360AdvertiserLinkProposal"|"conversionEvent"|"measurementProtocolSecret"|"customDimension"|"customMetric"|"dataRetentionSettings"|"searchAds_360Link"|"dataStream"|"attributionSettings"|"expandedDataSet"|"bigqueryLink"|undefined} resource + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + Object.defineProperty(ChangeHistoryResource.prototype, "resource", { + get: $util.oneOfGetter($oneOfFields = ["account", "property", "firebaseLink", "googleAdsLink", "googleSignalsSettings", "displayVideo_360AdvertiserLink", "displayVideo_360AdvertiserLinkProposal", "conversionEvent", "measurementProtocolSecret", "customDimension", "customMetric", "dataRetentionSettings", "searchAds_360Link", "dataStream", "attributionSettings", "expandedDataSet", "bigqueryLink"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ChangeHistoryResource instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @static + * @param {google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource} ChangeHistoryResource instance + */ + ChangeHistoryResource.create = function create(properties) { + return new ChangeHistoryResource(properties); + }; + + /** + * Encodes the specified ChangeHistoryResource message. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @static + * @param {google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource} message ChangeHistoryResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeHistoryResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.account != null && Object.hasOwnProperty.call(message, "account")) + $root.google.analytics.admin.v1alpha.Account.encode(message.account, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + $root.google.analytics.admin.v1alpha.Property.encode(message.property, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.firebaseLink != null && Object.hasOwnProperty.call(message, "firebaseLink")) + $root.google.analytics.admin.v1alpha.FirebaseLink.encode(message.firebaseLink, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.googleAdsLink != null && Object.hasOwnProperty.call(message, "googleAdsLink")) + $root.google.analytics.admin.v1alpha.GoogleAdsLink.encode(message.googleAdsLink, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.googleSignalsSettings != null && Object.hasOwnProperty.call(message, "googleSignalsSettings")) + $root.google.analytics.admin.v1alpha.GoogleSignalsSettings.encode(message.googleSignalsSettings, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.displayVideo_360AdvertiserLink != null && Object.hasOwnProperty.call(message, "displayVideo_360AdvertiserLink")) + $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.encode(message.displayVideo_360AdvertiserLink, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.displayVideo_360AdvertiserLinkProposal != null && Object.hasOwnProperty.call(message, "displayVideo_360AdvertiserLinkProposal")) + $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.encode(message.displayVideo_360AdvertiserLinkProposal, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.conversionEvent != null && Object.hasOwnProperty.call(message, "conversionEvent")) + $root.google.analytics.admin.v1alpha.ConversionEvent.encode(message.conversionEvent, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.measurementProtocolSecret != null && Object.hasOwnProperty.call(message, "measurementProtocolSecret")) + $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.encode(message.measurementProtocolSecret, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.customDimension != null && Object.hasOwnProperty.call(message, "customDimension")) + $root.google.analytics.admin.v1alpha.CustomDimension.encode(message.customDimension, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.customMetric != null && Object.hasOwnProperty.call(message, "customMetric")) + $root.google.analytics.admin.v1alpha.CustomMetric.encode(message.customMetric, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.dataRetentionSettings != null && Object.hasOwnProperty.call(message, "dataRetentionSettings")) + $root.google.analytics.admin.v1alpha.DataRetentionSettings.encode(message.dataRetentionSettings, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.searchAds_360Link != null && Object.hasOwnProperty.call(message, "searchAds_360Link")) + $root.google.analytics.admin.v1alpha.SearchAds360Link.encode(message.searchAds_360Link, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.dataStream != null && Object.hasOwnProperty.call(message, "dataStream")) + $root.google.analytics.admin.v1alpha.DataStream.encode(message.dataStream, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.attributionSettings != null && Object.hasOwnProperty.call(message, "attributionSettings")) + $root.google.analytics.admin.v1alpha.AttributionSettings.encode(message.attributionSettings, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.expandedDataSet != null && Object.hasOwnProperty.call(message, "expandedDataSet")) + $root.google.analytics.admin.v1alpha.ExpandedDataSet.encode(message.expandedDataSet, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.bigqueryLink != null && Object.hasOwnProperty.call(message, "bigqueryLink")) + $root.google.analytics.admin.v1alpha.BigQueryLink.encode(message.bigqueryLink, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChangeHistoryResource message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @static + * @param {google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource} message ChangeHistoryResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeHistoryResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChangeHistoryResource message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource} ChangeHistoryResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeHistoryResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.account = $root.google.analytics.admin.v1alpha.Account.decode(reader, reader.uint32()); + break; + } + case 2: { + message.property = $root.google.analytics.admin.v1alpha.Property.decode(reader, reader.uint32()); + break; + } + case 6: { + message.firebaseLink = $root.google.analytics.admin.v1alpha.FirebaseLink.decode(reader, reader.uint32()); + break; + } + case 7: { + message.googleAdsLink = $root.google.analytics.admin.v1alpha.GoogleAdsLink.decode(reader, reader.uint32()); + break; + } + case 8: { + message.googleSignalsSettings = $root.google.analytics.admin.v1alpha.GoogleSignalsSettings.decode(reader, reader.uint32()); + break; + } + case 9: { + message.displayVideo_360AdvertiserLink = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.decode(reader, reader.uint32()); + break; + } + case 10: { + message.displayVideo_360AdvertiserLinkProposal = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.decode(reader, reader.uint32()); + break; + } + case 11: { + message.conversionEvent = $root.google.analytics.admin.v1alpha.ConversionEvent.decode(reader, reader.uint32()); + break; + } + case 12: { + message.measurementProtocolSecret = $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.decode(reader, reader.uint32()); + break; + } + case 13: { + message.customDimension = $root.google.analytics.admin.v1alpha.CustomDimension.decode(reader, reader.uint32()); + break; + } + case 14: { + message.customMetric = $root.google.analytics.admin.v1alpha.CustomMetric.decode(reader, reader.uint32()); + break; + } + case 15: { + message.dataRetentionSettings = $root.google.analytics.admin.v1alpha.DataRetentionSettings.decode(reader, reader.uint32()); + break; + } + case 16: { + message.searchAds_360Link = $root.google.analytics.admin.v1alpha.SearchAds360Link.decode(reader, reader.uint32()); + break; + } + case 18: { + message.dataStream = $root.google.analytics.admin.v1alpha.DataStream.decode(reader, reader.uint32()); + break; + } + case 20: { + message.attributionSettings = $root.google.analytics.admin.v1alpha.AttributionSettings.decode(reader, reader.uint32()); + break; + } + case 21: { + message.expandedDataSet = $root.google.analytics.admin.v1alpha.ExpandedDataSet.decode(reader, reader.uint32()); + break; + } + case 23: { + message.bigqueryLink = $root.google.analytics.admin.v1alpha.BigQueryLink.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChangeHistoryResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource} ChangeHistoryResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeHistoryResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChangeHistoryResource message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeHistoryResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.account != null && message.hasOwnProperty("account")) { + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.Account.verify(message.account); + if (error) + return "account." + error; + } + } + if (message.property != null && message.hasOwnProperty("property")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.Property.verify(message.property); + if (error) + return "property." + error; + } + } + if (message.firebaseLink != null && message.hasOwnProperty("firebaseLink")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.FirebaseLink.verify(message.firebaseLink); + if (error) + return "firebaseLink." + error; + } + } + if (message.googleAdsLink != null && message.hasOwnProperty("googleAdsLink")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.GoogleAdsLink.verify(message.googleAdsLink); + if (error) + return "googleAdsLink." + error; + } + } + if (message.googleSignalsSettings != null && message.hasOwnProperty("googleSignalsSettings")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.GoogleSignalsSettings.verify(message.googleSignalsSettings); + if (error) + return "googleSignalsSettings." + error; + } + } + if (message.displayVideo_360AdvertiserLink != null && message.hasOwnProperty("displayVideo_360AdvertiserLink")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.verify(message.displayVideo_360AdvertiserLink); + if (error) + return "displayVideo_360AdvertiserLink." + error; + } + } + if (message.displayVideo_360AdvertiserLinkProposal != null && message.hasOwnProperty("displayVideo_360AdvertiserLinkProposal")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.verify(message.displayVideo_360AdvertiserLinkProposal); + if (error) + return "displayVideo_360AdvertiserLinkProposal." + error; + } + } + if (message.conversionEvent != null && message.hasOwnProperty("conversionEvent")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.ConversionEvent.verify(message.conversionEvent); + if (error) + return "conversionEvent." + error; + } + } + if (message.measurementProtocolSecret != null && message.hasOwnProperty("measurementProtocolSecret")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.verify(message.measurementProtocolSecret); + if (error) + return "measurementProtocolSecret." + error; + } + } + if (message.customDimension != null && message.hasOwnProperty("customDimension")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.CustomDimension.verify(message.customDimension); + if (error) + return "customDimension." + error; + } + } + if (message.customMetric != null && message.hasOwnProperty("customMetric")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.CustomMetric.verify(message.customMetric); + if (error) + return "customMetric." + error; + } + } + if (message.dataRetentionSettings != null && message.hasOwnProperty("dataRetentionSettings")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.DataRetentionSettings.verify(message.dataRetentionSettings); + if (error) + return "dataRetentionSettings." + error; + } + } + if (message.searchAds_360Link != null && message.hasOwnProperty("searchAds_360Link")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.SearchAds360Link.verify(message.searchAds_360Link); + if (error) + return "searchAds_360Link." + error; + } + } + if (message.dataStream != null && message.hasOwnProperty("dataStream")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.DataStream.verify(message.dataStream); + if (error) + return "dataStream." + error; + } + } + if (message.attributionSettings != null && message.hasOwnProperty("attributionSettings")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.AttributionSettings.verify(message.attributionSettings); + if (error) + return "attributionSettings." + error; + } + } + if (message.expandedDataSet != null && message.hasOwnProperty("expandedDataSet")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.ExpandedDataSet.verify(message.expandedDataSet); + if (error) + return "expandedDataSet." + error; + } + } + if (message.bigqueryLink != null && message.hasOwnProperty("bigqueryLink")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.BigQueryLink.verify(message.bigqueryLink); + if (error) + return "bigqueryLink." + error; + } + } + return null; + }; + + /** + * Creates a ChangeHistoryResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource} ChangeHistoryResource + */ + ChangeHistoryResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource) + return object; + var message = new $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource(); + if (object.account != null) { + if (typeof object.account !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.account: object expected"); + message.account = $root.google.analytics.admin.v1alpha.Account.fromObject(object.account); + } + if (object.property != null) { + if (typeof object.property !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.property: object expected"); + message.property = $root.google.analytics.admin.v1alpha.Property.fromObject(object.property); + } + if (object.firebaseLink != null) { + if (typeof object.firebaseLink !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.firebaseLink: object expected"); + message.firebaseLink = $root.google.analytics.admin.v1alpha.FirebaseLink.fromObject(object.firebaseLink); + } + if (object.googleAdsLink != null) { + if (typeof object.googleAdsLink !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.googleAdsLink: object expected"); + message.googleAdsLink = $root.google.analytics.admin.v1alpha.GoogleAdsLink.fromObject(object.googleAdsLink); + } + if (object.googleSignalsSettings != null) { + if (typeof object.googleSignalsSettings !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.googleSignalsSettings: object expected"); + message.googleSignalsSettings = $root.google.analytics.admin.v1alpha.GoogleSignalsSettings.fromObject(object.googleSignalsSettings); + } + if (object.displayVideo_360AdvertiserLink != null) { + if (typeof object.displayVideo_360AdvertiserLink !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.displayVideo_360AdvertiserLink: object expected"); + message.displayVideo_360AdvertiserLink = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.fromObject(object.displayVideo_360AdvertiserLink); } - if (message.requestorEmail != null && message.hasOwnProperty("requestorEmail")) - if (!$util.isString(message.requestorEmail)) - return "requestorEmail: string expected"; - if (message.linkProposalState != null && message.hasOwnProperty("linkProposalState")) - switch (message.linkProposalState) { - default: - return "linkProposalState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; + if (object.displayVideo_360AdvertiserLinkProposal != null) { + if (typeof object.displayVideo_360AdvertiserLinkProposal !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.displayVideo_360AdvertiserLinkProposal: object expected"); + message.displayVideo_360AdvertiserLinkProposal = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.fromObject(object.displayVideo_360AdvertiserLinkProposal); } - return null; - }; + if (object.conversionEvent != null) { + if (typeof object.conversionEvent !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.conversionEvent: object expected"); + message.conversionEvent = $root.google.analytics.admin.v1alpha.ConversionEvent.fromObject(object.conversionEvent); + } + if (object.measurementProtocolSecret != null) { + if (typeof object.measurementProtocolSecret !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.measurementProtocolSecret: object expected"); + message.measurementProtocolSecret = $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.fromObject(object.measurementProtocolSecret); + } + if (object.customDimension != null) { + if (typeof object.customDimension !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.customDimension: object expected"); + message.customDimension = $root.google.analytics.admin.v1alpha.CustomDimension.fromObject(object.customDimension); + } + if (object.customMetric != null) { + if (typeof object.customMetric !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.customMetric: object expected"); + message.customMetric = $root.google.analytics.admin.v1alpha.CustomMetric.fromObject(object.customMetric); + } + if (object.dataRetentionSettings != null) { + if (typeof object.dataRetentionSettings !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.dataRetentionSettings: object expected"); + message.dataRetentionSettings = $root.google.analytics.admin.v1alpha.DataRetentionSettings.fromObject(object.dataRetentionSettings); + } + if (object.searchAds_360Link != null) { + if (typeof object.searchAds_360Link !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.searchAds_360Link: object expected"); + message.searchAds_360Link = $root.google.analytics.admin.v1alpha.SearchAds360Link.fromObject(object.searchAds_360Link); + } + if (object.dataStream != null) { + if (typeof object.dataStream !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.dataStream: object expected"); + message.dataStream = $root.google.analytics.admin.v1alpha.DataStream.fromObject(object.dataStream); + } + if (object.attributionSettings != null) { + if (typeof object.attributionSettings !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.attributionSettings: object expected"); + message.attributionSettings = $root.google.analytics.admin.v1alpha.AttributionSettings.fromObject(object.attributionSettings); + } + if (object.expandedDataSet != null) { + if (typeof object.expandedDataSet !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.expandedDataSet: object expected"); + message.expandedDataSet = $root.google.analytics.admin.v1alpha.ExpandedDataSet.fromObject(object.expandedDataSet); + } + if (object.bigqueryLink != null) { + if (typeof object.bigqueryLink !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.bigqueryLink: object expected"); + message.bigqueryLink = $root.google.analytics.admin.v1alpha.BigQueryLink.fromObject(object.bigqueryLink); + } + return message; + }; - /** - * Creates a LinkProposalStatusDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.LinkProposalStatusDetails} LinkProposalStatusDetails - */ - LinkProposalStatusDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.LinkProposalStatusDetails) - return object; - var message = new $root.google.analytics.admin.v1alpha.LinkProposalStatusDetails(); - switch (object.linkProposalInitiatingProduct) { - default: - if (typeof object.linkProposalInitiatingProduct === "number") { - message.linkProposalInitiatingProduct = object.linkProposalInitiatingProduct; - break; + /** + * Creates a plain object from a ChangeHistoryResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @static + * @param {google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource} message ChangeHistoryResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeHistoryResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.account != null && message.hasOwnProperty("account")) { + object.account = $root.google.analytics.admin.v1alpha.Account.toObject(message.account, options); + if (options.oneofs) + object.resource = "account"; } - break; - case "LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED": - case 0: - message.linkProposalInitiatingProduct = 0; - break; - case "GOOGLE_ANALYTICS": - case 1: - message.linkProposalInitiatingProduct = 1; - break; - case "LINKED_PRODUCT": - case 2: - message.linkProposalInitiatingProduct = 2; - break; - } - if (object.requestorEmail != null) - message.requestorEmail = String(object.requestorEmail); - switch (object.linkProposalState) { - default: - if (typeof object.linkProposalState === "number") { - message.linkProposalState = object.linkProposalState; - break; + if (message.property != null && message.hasOwnProperty("property")) { + object.property = $root.google.analytics.admin.v1alpha.Property.toObject(message.property, options); + if (options.oneofs) + object.resource = "property"; } - break; - case "LINK_PROPOSAL_STATE_UNSPECIFIED": - case 0: - message.linkProposalState = 0; - break; - case "AWAITING_REVIEW_FROM_GOOGLE_ANALYTICS": - case 1: - message.linkProposalState = 1; - break; - case "AWAITING_REVIEW_FROM_LINKED_PRODUCT": - case 2: - message.linkProposalState = 2; - break; - case "WITHDRAWN": - case 3: - message.linkProposalState = 3; - break; - case "DECLINED": - case 4: - message.linkProposalState = 4; - break; - case "EXPIRED": - case 5: - message.linkProposalState = 5; - break; - case "OBSOLETE": - case 6: - message.linkProposalState = 6; - break; - } - return message; - }; + if (message.firebaseLink != null && message.hasOwnProperty("firebaseLink")) { + object.firebaseLink = $root.google.analytics.admin.v1alpha.FirebaseLink.toObject(message.firebaseLink, options); + if (options.oneofs) + object.resource = "firebaseLink"; + } + if (message.googleAdsLink != null && message.hasOwnProperty("googleAdsLink")) { + object.googleAdsLink = $root.google.analytics.admin.v1alpha.GoogleAdsLink.toObject(message.googleAdsLink, options); + if (options.oneofs) + object.resource = "googleAdsLink"; + } + if (message.googleSignalsSettings != null && message.hasOwnProperty("googleSignalsSettings")) { + object.googleSignalsSettings = $root.google.analytics.admin.v1alpha.GoogleSignalsSettings.toObject(message.googleSignalsSettings, options); + if (options.oneofs) + object.resource = "googleSignalsSettings"; + } + if (message.displayVideo_360AdvertiserLink != null && message.hasOwnProperty("displayVideo_360AdvertiserLink")) { + object.displayVideo_360AdvertiserLink = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.toObject(message.displayVideo_360AdvertiserLink, options); + if (options.oneofs) + object.resource = "displayVideo_360AdvertiserLink"; + } + if (message.displayVideo_360AdvertiserLinkProposal != null && message.hasOwnProperty("displayVideo_360AdvertiserLinkProposal")) { + object.displayVideo_360AdvertiserLinkProposal = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.toObject(message.displayVideo_360AdvertiserLinkProposal, options); + if (options.oneofs) + object.resource = "displayVideo_360AdvertiserLinkProposal"; + } + if (message.conversionEvent != null && message.hasOwnProperty("conversionEvent")) { + object.conversionEvent = $root.google.analytics.admin.v1alpha.ConversionEvent.toObject(message.conversionEvent, options); + if (options.oneofs) + object.resource = "conversionEvent"; + } + if (message.measurementProtocolSecret != null && message.hasOwnProperty("measurementProtocolSecret")) { + object.measurementProtocolSecret = $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.toObject(message.measurementProtocolSecret, options); + if (options.oneofs) + object.resource = "measurementProtocolSecret"; + } + if (message.customDimension != null && message.hasOwnProperty("customDimension")) { + object.customDimension = $root.google.analytics.admin.v1alpha.CustomDimension.toObject(message.customDimension, options); + if (options.oneofs) + object.resource = "customDimension"; + } + if (message.customMetric != null && message.hasOwnProperty("customMetric")) { + object.customMetric = $root.google.analytics.admin.v1alpha.CustomMetric.toObject(message.customMetric, options); + if (options.oneofs) + object.resource = "customMetric"; + } + if (message.dataRetentionSettings != null && message.hasOwnProperty("dataRetentionSettings")) { + object.dataRetentionSettings = $root.google.analytics.admin.v1alpha.DataRetentionSettings.toObject(message.dataRetentionSettings, options); + if (options.oneofs) + object.resource = "dataRetentionSettings"; + } + if (message.searchAds_360Link != null && message.hasOwnProperty("searchAds_360Link")) { + object.searchAds_360Link = $root.google.analytics.admin.v1alpha.SearchAds360Link.toObject(message.searchAds_360Link, options); + if (options.oneofs) + object.resource = "searchAds_360Link"; + } + if (message.dataStream != null && message.hasOwnProperty("dataStream")) { + object.dataStream = $root.google.analytics.admin.v1alpha.DataStream.toObject(message.dataStream, options); + if (options.oneofs) + object.resource = "dataStream"; + } + if (message.attributionSettings != null && message.hasOwnProperty("attributionSettings")) { + object.attributionSettings = $root.google.analytics.admin.v1alpha.AttributionSettings.toObject(message.attributionSettings, options); + if (options.oneofs) + object.resource = "attributionSettings"; + } + if (message.expandedDataSet != null && message.hasOwnProperty("expandedDataSet")) { + object.expandedDataSet = $root.google.analytics.admin.v1alpha.ExpandedDataSet.toObject(message.expandedDataSet, options); + if (options.oneofs) + object.resource = "expandedDataSet"; + } + if (message.bigqueryLink != null && message.hasOwnProperty("bigqueryLink")) { + object.bigqueryLink = $root.google.analytics.admin.v1alpha.BigQueryLink.toObject(message.bigqueryLink, options); + if (options.oneofs) + object.resource = "bigqueryLink"; + } + return object; + }; - /** - * Creates a plain object from a LinkProposalStatusDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails - * @static - * @param {google.analytics.admin.v1alpha.LinkProposalStatusDetails} message LinkProposalStatusDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LinkProposalStatusDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.linkProposalInitiatingProduct = options.enums === String ? "LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED" : 0; - object.requestorEmail = ""; - object.linkProposalState = options.enums === String ? "LINK_PROPOSAL_STATE_UNSPECIFIED" : 0; - } - if (message.linkProposalInitiatingProduct != null && message.hasOwnProperty("linkProposalInitiatingProduct")) - object.linkProposalInitiatingProduct = options.enums === String ? $root.google.analytics.admin.v1alpha.LinkProposalInitiatingProduct[message.linkProposalInitiatingProduct] === undefined ? message.linkProposalInitiatingProduct : $root.google.analytics.admin.v1alpha.LinkProposalInitiatingProduct[message.linkProposalInitiatingProduct] : message.linkProposalInitiatingProduct; - if (message.requestorEmail != null && message.hasOwnProperty("requestorEmail")) - object.requestorEmail = message.requestorEmail; - if (message.linkProposalState != null && message.hasOwnProperty("linkProposalState")) - object.linkProposalState = options.enums === String ? $root.google.analytics.admin.v1alpha.LinkProposalState[message.linkProposalState] === undefined ? message.linkProposalState : $root.google.analytics.admin.v1alpha.LinkProposalState[message.linkProposalState] : message.linkProposalState; - return object; - }; + /** + * Converts this ChangeHistoryResource to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + * @returns {Object.} JSON object + */ + ChangeHistoryResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this LinkProposalStatusDetails to JSON. - * @function toJSON - * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails - * @instance - * @returns {Object.} JSON object - */ - LinkProposalStatusDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for ChangeHistoryResource + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChangeHistoryResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource"; + }; - /** - * Gets the default type url for LinkProposalStatusDetails - * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LinkProposalStatusDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.LinkProposalStatusDetails"; - }; + return ChangeHistoryResource; + })(); - return LinkProposalStatusDetails; + return ChangeHistoryChange; })(); - v1alpha.ConversionEvent = (function() { + v1alpha.DisplayVideo360AdvertiserLink = (function() { /** - * Properties of a ConversionEvent. + * Properties of a DisplayVideo360AdvertiserLink. * @memberof google.analytics.admin.v1alpha - * @interface IConversionEvent - * @property {string|null} [name] ConversionEvent name - * @property {string|null} [eventName] ConversionEvent eventName - * @property {google.protobuf.ITimestamp|null} [createTime] ConversionEvent createTime - * @property {boolean|null} [deletable] ConversionEvent deletable - * @property {boolean|null} [custom] ConversionEvent custom + * @interface IDisplayVideo360AdvertiserLink + * @property {string|null} [name] DisplayVideo360AdvertiserLink name + * @property {string|null} [advertiserId] DisplayVideo360AdvertiserLink advertiserId + * @property {string|null} [advertiserDisplayName] DisplayVideo360AdvertiserLink advertiserDisplayName + * @property {google.protobuf.IBoolValue|null} [adsPersonalizationEnabled] DisplayVideo360AdvertiserLink adsPersonalizationEnabled + * @property {google.protobuf.IBoolValue|null} [campaignDataSharingEnabled] DisplayVideo360AdvertiserLink campaignDataSharingEnabled + * @property {google.protobuf.IBoolValue|null} [costDataSharingEnabled] DisplayVideo360AdvertiserLink costDataSharingEnabled */ /** - * Constructs a new ConversionEvent. + * Constructs a new DisplayVideo360AdvertiserLink. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a ConversionEvent. - * @implements IConversionEvent + * @classdesc Represents a DisplayVideo360AdvertiserLink. + * @implements IDisplayVideo360AdvertiserLink * @constructor - * @param {google.analytics.admin.v1alpha.IConversionEvent=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink=} [properties] Properties to set */ - function ConversionEvent(properties) { + function DisplayVideo360AdvertiserLink(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -47677,110 +52843,120 @@ } /** - * ConversionEvent name. + * DisplayVideo360AdvertiserLink name. * @member {string} name - * @memberof google.analytics.admin.v1alpha.ConversionEvent + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink * @instance */ - ConversionEvent.prototype.name = ""; + DisplayVideo360AdvertiserLink.prototype.name = ""; /** - * ConversionEvent eventName. - * @member {string} eventName - * @memberof google.analytics.admin.v1alpha.ConversionEvent + * DisplayVideo360AdvertiserLink advertiserId. + * @member {string} advertiserId + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink * @instance */ - ConversionEvent.prototype.eventName = ""; + DisplayVideo360AdvertiserLink.prototype.advertiserId = ""; /** - * ConversionEvent createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.analytics.admin.v1alpha.ConversionEvent + * DisplayVideo360AdvertiserLink advertiserDisplayName. + * @member {string} advertiserDisplayName + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink * @instance */ - ConversionEvent.prototype.createTime = null; + DisplayVideo360AdvertiserLink.prototype.advertiserDisplayName = ""; /** - * ConversionEvent deletable. - * @member {boolean} deletable - * @memberof google.analytics.admin.v1alpha.ConversionEvent + * DisplayVideo360AdvertiserLink adsPersonalizationEnabled. + * @member {google.protobuf.IBoolValue|null|undefined} adsPersonalizationEnabled + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink * @instance */ - ConversionEvent.prototype.deletable = false; + DisplayVideo360AdvertiserLink.prototype.adsPersonalizationEnabled = null; /** - * ConversionEvent custom. - * @member {boolean} custom - * @memberof google.analytics.admin.v1alpha.ConversionEvent + * DisplayVideo360AdvertiserLink campaignDataSharingEnabled. + * @member {google.protobuf.IBoolValue|null|undefined} campaignDataSharingEnabled + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink * @instance */ - ConversionEvent.prototype.custom = false; + DisplayVideo360AdvertiserLink.prototype.campaignDataSharingEnabled = null; /** - * Creates a new ConversionEvent instance using the specified properties. + * DisplayVideo360AdvertiserLink costDataSharingEnabled. + * @member {google.protobuf.IBoolValue|null|undefined} costDataSharingEnabled + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * @instance + */ + DisplayVideo360AdvertiserLink.prototype.costDataSharingEnabled = null; + + /** + * Creates a new DisplayVideo360AdvertiserLink instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.ConversionEvent + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink * @static - * @param {google.analytics.admin.v1alpha.IConversionEvent=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.ConversionEvent} ConversionEvent instance + * @param {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink} DisplayVideo360AdvertiserLink instance */ - ConversionEvent.create = function create(properties) { - return new ConversionEvent(properties); + DisplayVideo360AdvertiserLink.create = function create(properties) { + return new DisplayVideo360AdvertiserLink(properties); }; /** - * Encodes the specified ConversionEvent message. Does not implicitly {@link google.analytics.admin.v1alpha.ConversionEvent.verify|verify} messages. + * Encodes the specified DisplayVideo360AdvertiserLink message. Does not implicitly {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.ConversionEvent + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink * @static - * @param {google.analytics.admin.v1alpha.IConversionEvent} message ConversionEvent message or plain object to encode + * @param {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink} message DisplayVideo360AdvertiserLink message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConversionEvent.encode = function encode(message, writer) { + DisplayVideo360AdvertiserLink.encode = function encode(message, writer) { 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.eventName != null && Object.hasOwnProperty.call(message, "eventName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.eventName); - 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.deletable != null && Object.hasOwnProperty.call(message, "deletable")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.deletable); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.custom); + if (message.advertiserId != null && Object.hasOwnProperty.call(message, "advertiserId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.advertiserId); + if (message.advertiserDisplayName != null && Object.hasOwnProperty.call(message, "advertiserDisplayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.advertiserDisplayName); + if (message.adsPersonalizationEnabled != null && Object.hasOwnProperty.call(message, "adsPersonalizationEnabled")) + $root.google.protobuf.BoolValue.encode(message.adsPersonalizationEnabled, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.campaignDataSharingEnabled != null && Object.hasOwnProperty.call(message, "campaignDataSharingEnabled")) + $root.google.protobuf.BoolValue.encode(message.campaignDataSharingEnabled, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.costDataSharingEnabled != null && Object.hasOwnProperty.call(message, "costDataSharingEnabled")) + $root.google.protobuf.BoolValue.encode(message.costDataSharingEnabled, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified ConversionEvent message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ConversionEvent.verify|verify} messages. + * Encodes the specified DisplayVideo360AdvertiserLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.ConversionEvent + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink * @static - * @param {google.analytics.admin.v1alpha.IConversionEvent} message ConversionEvent message or plain object to encode + * @param {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink} message DisplayVideo360AdvertiserLink message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConversionEvent.encodeDelimited = function encodeDelimited(message, writer) { + DisplayVideo360AdvertiserLink.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ConversionEvent message from the specified reader or buffer. + * Decodes a DisplayVideo360AdvertiserLink message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.ConversionEvent + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.ConversionEvent} ConversionEvent + * @returns {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink} DisplayVideo360AdvertiserLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversionEvent.decode = function decode(reader, length) { + DisplayVideo360AdvertiserLink.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ConversionEvent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -47789,19 +52965,23 @@ break; } case 2: { - message.eventName = reader.string(); + message.advertiserId = reader.string(); break; } case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.advertiserDisplayName = reader.string(); break; } case 4: { - message.deletable = reader.bool(); + message.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); break; } case 5: { - message.custom = reader.bool(); + message.campaignDataSharingEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + case 6: { + message.costDataSharingEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); break; } default: @@ -47813,162 +52993,185 @@ }; /** - * Decodes a ConversionEvent message from the specified reader or buffer, length delimited. + * Decodes a DisplayVideo360AdvertiserLink message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.ConversionEvent + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.ConversionEvent} ConversionEvent + * @returns {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink} DisplayVideo360AdvertiserLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversionEvent.decodeDelimited = function decodeDelimited(reader) { + DisplayVideo360AdvertiserLink.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ConversionEvent message. + * Verifies a DisplayVideo360AdvertiserLink message. * @function verify - * @memberof google.analytics.admin.v1alpha.ConversionEvent + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ConversionEvent.verify = function verify(message) { + DisplayVideo360AdvertiserLink.verify = function verify(message) { if (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.eventName != null && message.hasOwnProperty("eventName")) - if (!$util.isString(message.eventName)) - return "eventName: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (message.advertiserId != null && message.hasOwnProperty("advertiserId")) + if (!$util.isString(message.advertiserId)) + return "advertiserId: string expected"; + if (message.advertiserDisplayName != null && message.hasOwnProperty("advertiserDisplayName")) + if (!$util.isString(message.advertiserDisplayName)) + return "advertiserDisplayName: string expected"; + if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) { + var error = $root.google.protobuf.BoolValue.verify(message.adsPersonalizationEnabled); if (error) - return "createTime." + error; + return "adsPersonalizationEnabled." + error; + } + if (message.campaignDataSharingEnabled != null && message.hasOwnProperty("campaignDataSharingEnabled")) { + var error = $root.google.protobuf.BoolValue.verify(message.campaignDataSharingEnabled); + if (error) + return "campaignDataSharingEnabled." + error; + } + if (message.costDataSharingEnabled != null && message.hasOwnProperty("costDataSharingEnabled")) { + var error = $root.google.protobuf.BoolValue.verify(message.costDataSharingEnabled); + if (error) + return "costDataSharingEnabled." + error; } - if (message.deletable != null && message.hasOwnProperty("deletable")) - if (typeof message.deletable !== "boolean") - return "deletable: boolean expected"; - if (message.custom != null && message.hasOwnProperty("custom")) - if (typeof message.custom !== "boolean") - return "custom: boolean expected"; return null; }; /** - * Creates a ConversionEvent message from a plain object. Also converts values to their respective internal types. + * Creates a DisplayVideo360AdvertiserLink message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.ConversionEvent + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.ConversionEvent} ConversionEvent + * @returns {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink} DisplayVideo360AdvertiserLink */ - ConversionEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.ConversionEvent) + DisplayVideo360AdvertiserLink.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink) return object; - var message = new $root.google.analytics.admin.v1alpha.ConversionEvent(); + var message = new $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink(); if (object.name != null) message.name = String(object.name); - if (object.eventName != null) - message.eventName = String(object.eventName); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ConversionEvent.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + if (object.advertiserId != null) + message.advertiserId = String(object.advertiserId); + if (object.advertiserDisplayName != null) + message.advertiserDisplayName = String(object.advertiserDisplayName); + if (object.adsPersonalizationEnabled != null) { + if (typeof object.adsPersonalizationEnabled !== "object") + throw TypeError(".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.adsPersonalizationEnabled: object expected"); + message.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.fromObject(object.adsPersonalizationEnabled); + } + if (object.campaignDataSharingEnabled != null) { + if (typeof object.campaignDataSharingEnabled !== "object") + throw TypeError(".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.campaignDataSharingEnabled: object expected"); + message.campaignDataSharingEnabled = $root.google.protobuf.BoolValue.fromObject(object.campaignDataSharingEnabled); + } + if (object.costDataSharingEnabled != null) { + if (typeof object.costDataSharingEnabled !== "object") + throw TypeError(".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.costDataSharingEnabled: object expected"); + message.costDataSharingEnabled = $root.google.protobuf.BoolValue.fromObject(object.costDataSharingEnabled); } - if (object.deletable != null) - message.deletable = Boolean(object.deletable); - if (object.custom != null) - message.custom = Boolean(object.custom); return message; }; /** - * Creates a plain object from a ConversionEvent message. Also converts values to other types if specified. + * Creates a plain object from a DisplayVideo360AdvertiserLink message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.ConversionEvent + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink * @static - * @param {google.analytics.admin.v1alpha.ConversionEvent} message ConversionEvent + * @param {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink} message DisplayVideo360AdvertiserLink * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ConversionEvent.toObject = function toObject(message, options) { + DisplayVideo360AdvertiserLink.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; - object.eventName = ""; - object.createTime = null; - object.deletable = false; - object.custom = false; + object.advertiserId = ""; + object.advertiserDisplayName = ""; + object.adsPersonalizationEnabled = null; + object.campaignDataSharingEnabled = null; + object.costDataSharingEnabled = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.eventName != null && message.hasOwnProperty("eventName")) - object.eventName = message.eventName; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.deletable != null && message.hasOwnProperty("deletable")) - object.deletable = message.deletable; - if (message.custom != null && message.hasOwnProperty("custom")) - object.custom = message.custom; + if (message.advertiserId != null && message.hasOwnProperty("advertiserId")) + object.advertiserId = message.advertiserId; + if (message.advertiserDisplayName != null && message.hasOwnProperty("advertiserDisplayName")) + object.advertiserDisplayName = message.advertiserDisplayName; + if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) + object.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.toObject(message.adsPersonalizationEnabled, options); + if (message.campaignDataSharingEnabled != null && message.hasOwnProperty("campaignDataSharingEnabled")) + object.campaignDataSharingEnabled = $root.google.protobuf.BoolValue.toObject(message.campaignDataSharingEnabled, options); + if (message.costDataSharingEnabled != null && message.hasOwnProperty("costDataSharingEnabled")) + object.costDataSharingEnabled = $root.google.protobuf.BoolValue.toObject(message.costDataSharingEnabled, options); return object; }; /** - * Converts this ConversionEvent to JSON. + * Converts this DisplayVideo360AdvertiserLink to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.ConversionEvent + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink * @instance * @returns {Object.} JSON object */ - ConversionEvent.prototype.toJSON = function toJSON() { + DisplayVideo360AdvertiserLink.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ConversionEvent + * Gets the default type url for DisplayVideo360AdvertiserLink * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.ConversionEvent + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ConversionEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DisplayVideo360AdvertiserLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.ConversionEvent"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink"; }; - return ConversionEvent; + return DisplayVideo360AdvertiserLink; })(); - v1alpha.GoogleSignalsSettings = (function() { + v1alpha.DisplayVideo360AdvertiserLinkProposal = (function() { /** - * Properties of a GoogleSignalsSettings. + * Properties of a DisplayVideo360AdvertiserLinkProposal. * @memberof google.analytics.admin.v1alpha - * @interface IGoogleSignalsSettings - * @property {string|null} [name] GoogleSignalsSettings name - * @property {google.analytics.admin.v1alpha.GoogleSignalsState|null} [state] GoogleSignalsSettings state - * @property {google.analytics.admin.v1alpha.GoogleSignalsConsent|null} [consent] GoogleSignalsSettings consent + * @interface IDisplayVideo360AdvertiserLinkProposal + * @property {string|null} [name] DisplayVideo360AdvertiserLinkProposal name + * @property {string|null} [advertiserId] DisplayVideo360AdvertiserLinkProposal advertiserId + * @property {google.analytics.admin.v1alpha.ILinkProposalStatusDetails|null} [linkProposalStatusDetails] DisplayVideo360AdvertiserLinkProposal linkProposalStatusDetails + * @property {string|null} [advertiserDisplayName] DisplayVideo360AdvertiserLinkProposal advertiserDisplayName + * @property {string|null} [validationEmail] DisplayVideo360AdvertiserLinkProposal validationEmail + * @property {google.protobuf.IBoolValue|null} [adsPersonalizationEnabled] DisplayVideo360AdvertiserLinkProposal adsPersonalizationEnabled + * @property {google.protobuf.IBoolValue|null} [campaignDataSharingEnabled] DisplayVideo360AdvertiserLinkProposal campaignDataSharingEnabled + * @property {google.protobuf.IBoolValue|null} [costDataSharingEnabled] DisplayVideo360AdvertiserLinkProposal costDataSharingEnabled */ /** - * Constructs a new GoogleSignalsSettings. + * Constructs a new DisplayVideo360AdvertiserLinkProposal. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a GoogleSignalsSettings. - * @implements IGoogleSignalsSettings + * @classdesc Represents a DisplayVideo360AdvertiserLinkProposal. + * @implements IDisplayVideo360AdvertiserLinkProposal * @constructor - * @param {google.analytics.admin.v1alpha.IGoogleSignalsSettings=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal=} [properties] Properties to set */ - function GoogleSignalsSettings(properties) { + function DisplayVideo360AdvertiserLinkProposal(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -47976,90 +53179,140 @@ } /** - * GoogleSignalsSettings name. + * DisplayVideo360AdvertiserLinkProposal name. * @member {string} name - * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal * @instance */ - GoogleSignalsSettings.prototype.name = ""; + DisplayVideo360AdvertiserLinkProposal.prototype.name = ""; /** - * GoogleSignalsSettings state. - * @member {google.analytics.admin.v1alpha.GoogleSignalsState} state - * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings + * DisplayVideo360AdvertiserLinkProposal advertiserId. + * @member {string} advertiserId + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal * @instance */ - GoogleSignalsSettings.prototype.state = 0; + DisplayVideo360AdvertiserLinkProposal.prototype.advertiserId = ""; /** - * GoogleSignalsSettings consent. - * @member {google.analytics.admin.v1alpha.GoogleSignalsConsent} consent - * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings + * DisplayVideo360AdvertiserLinkProposal linkProposalStatusDetails. + * @member {google.analytics.admin.v1alpha.ILinkProposalStatusDetails|null|undefined} linkProposalStatusDetails + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal * @instance */ - GoogleSignalsSettings.prototype.consent = 0; + DisplayVideo360AdvertiserLinkProposal.prototype.linkProposalStatusDetails = null; /** - * Creates a new GoogleSignalsSettings instance using the specified properties. + * DisplayVideo360AdvertiserLinkProposal advertiserDisplayName. + * @member {string} advertiserDisplayName + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @instance + */ + DisplayVideo360AdvertiserLinkProposal.prototype.advertiserDisplayName = ""; + + /** + * DisplayVideo360AdvertiserLinkProposal validationEmail. + * @member {string} validationEmail + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @instance + */ + DisplayVideo360AdvertiserLinkProposal.prototype.validationEmail = ""; + + /** + * DisplayVideo360AdvertiserLinkProposal adsPersonalizationEnabled. + * @member {google.protobuf.IBoolValue|null|undefined} adsPersonalizationEnabled + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @instance + */ + DisplayVideo360AdvertiserLinkProposal.prototype.adsPersonalizationEnabled = null; + + /** + * DisplayVideo360AdvertiserLinkProposal campaignDataSharingEnabled. + * @member {google.protobuf.IBoolValue|null|undefined} campaignDataSharingEnabled + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @instance + */ + DisplayVideo360AdvertiserLinkProposal.prototype.campaignDataSharingEnabled = null; + + /** + * DisplayVideo360AdvertiserLinkProposal costDataSharingEnabled. + * @member {google.protobuf.IBoolValue|null|undefined} costDataSharingEnabled + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @instance + */ + DisplayVideo360AdvertiserLinkProposal.prototype.costDataSharingEnabled = null; + + /** + * Creates a new DisplayVideo360AdvertiserLinkProposal instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal * @static - * @param {google.analytics.admin.v1alpha.IGoogleSignalsSettings=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.GoogleSignalsSettings} GoogleSignalsSettings instance + * @param {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal} DisplayVideo360AdvertiserLinkProposal instance */ - GoogleSignalsSettings.create = function create(properties) { - return new GoogleSignalsSettings(properties); + DisplayVideo360AdvertiserLinkProposal.create = function create(properties) { + return new DisplayVideo360AdvertiserLinkProposal(properties); }; /** - * Encodes the specified GoogleSignalsSettings message. Does not implicitly {@link google.analytics.admin.v1alpha.GoogleSignalsSettings.verify|verify} messages. + * Encodes the specified DisplayVideo360AdvertiserLinkProposal message. Does not implicitly {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal * @static - * @param {google.analytics.admin.v1alpha.IGoogleSignalsSettings} message GoogleSignalsSettings message or plain object to encode + * @param {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal} message DisplayVideo360AdvertiserLinkProposal message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GoogleSignalsSettings.encode = function encode(message, writer) { + DisplayVideo360AdvertiserLinkProposal.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.consent != null && Object.hasOwnProperty.call(message, "consent")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.consent); + if (message.advertiserId != null && Object.hasOwnProperty.call(message, "advertiserId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.advertiserId); + if (message.linkProposalStatusDetails != null && Object.hasOwnProperty.call(message, "linkProposalStatusDetails")) + $root.google.analytics.admin.v1alpha.LinkProposalStatusDetails.encode(message.linkProposalStatusDetails, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.advertiserDisplayName != null && Object.hasOwnProperty.call(message, "advertiserDisplayName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.advertiserDisplayName); + if (message.validationEmail != null && Object.hasOwnProperty.call(message, "validationEmail")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.validationEmail); + if (message.adsPersonalizationEnabled != null && Object.hasOwnProperty.call(message, "adsPersonalizationEnabled")) + $root.google.protobuf.BoolValue.encode(message.adsPersonalizationEnabled, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.campaignDataSharingEnabled != null && Object.hasOwnProperty.call(message, "campaignDataSharingEnabled")) + $root.google.protobuf.BoolValue.encode(message.campaignDataSharingEnabled, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.costDataSharingEnabled != null && Object.hasOwnProperty.call(message, "costDataSharingEnabled")) + $root.google.protobuf.BoolValue.encode(message.costDataSharingEnabled, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; /** - * Encodes the specified GoogleSignalsSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GoogleSignalsSettings.verify|verify} messages. + * Encodes the specified DisplayVideo360AdvertiserLinkProposal message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal * @static - * @param {google.analytics.admin.v1alpha.IGoogleSignalsSettings} message GoogleSignalsSettings message or plain object to encode + * @param {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal} message DisplayVideo360AdvertiserLinkProposal message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GoogleSignalsSettings.encodeDelimited = function encodeDelimited(message, writer) { + DisplayVideo360AdvertiserLinkProposal.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GoogleSignalsSettings message from the specified reader or buffer. + * Decodes a DisplayVideo360AdvertiserLinkProposal message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.GoogleSignalsSettings} GoogleSignalsSettings + * @returns {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal} DisplayVideo360AdvertiserLinkProposal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GoogleSignalsSettings.decode = function decode(reader, length) { + DisplayVideo360AdvertiserLinkProposal.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GoogleSignalsSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -48067,12 +53320,32 @@ message.name = reader.string(); break; } + case 2: { + message.advertiserId = reader.string(); + break; + } case 3: { - message.state = reader.int32(); + message.linkProposalStatusDetails = $root.google.analytics.admin.v1alpha.LinkProposalStatusDetails.decode(reader, reader.uint32()); break; } case 4: { - message.consent = reader.int32(); + message.advertiserDisplayName = reader.string(); + break; + } + case 5: { + message.validationEmail = reader.string(); + break; + } + case 6: { + message.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + case 7: { + message.campaignDataSharingEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + case 8: { + message.costDataSharingEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); break; } default: @@ -48084,192 +53357,205 @@ }; /** - * Decodes a GoogleSignalsSettings message from the specified reader or buffer, length delimited. + * Decodes a DisplayVideo360AdvertiserLinkProposal message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.GoogleSignalsSettings} GoogleSignalsSettings + * @returns {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal} DisplayVideo360AdvertiserLinkProposal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GoogleSignalsSettings.decodeDelimited = function decodeDelimited(reader) { + DisplayVideo360AdvertiserLinkProposal.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GoogleSignalsSettings message. + * Verifies a DisplayVideo360AdvertiserLinkProposal message. * @function verify - * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GoogleSignalsSettings.verify = function verify(message) { + DisplayVideo360AdvertiserLinkProposal.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.consent != null && message.hasOwnProperty("consent")) - switch (message.consent) { - default: - return "consent: enum value expected"; - case 0: - case 2: - case 1: - break; - } + if (message.advertiserId != null && message.hasOwnProperty("advertiserId")) + if (!$util.isString(message.advertiserId)) + return "advertiserId: string expected"; + if (message.linkProposalStatusDetails != null && message.hasOwnProperty("linkProposalStatusDetails")) { + var error = $root.google.analytics.admin.v1alpha.LinkProposalStatusDetails.verify(message.linkProposalStatusDetails); + if (error) + return "linkProposalStatusDetails." + error; + } + if (message.advertiserDisplayName != null && message.hasOwnProperty("advertiserDisplayName")) + if (!$util.isString(message.advertiserDisplayName)) + return "advertiserDisplayName: string expected"; + if (message.validationEmail != null && message.hasOwnProperty("validationEmail")) + if (!$util.isString(message.validationEmail)) + return "validationEmail: string expected"; + if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) { + var error = $root.google.protobuf.BoolValue.verify(message.adsPersonalizationEnabled); + if (error) + return "adsPersonalizationEnabled." + error; + } + if (message.campaignDataSharingEnabled != null && message.hasOwnProperty("campaignDataSharingEnabled")) { + var error = $root.google.protobuf.BoolValue.verify(message.campaignDataSharingEnabled); + if (error) + return "campaignDataSharingEnabled." + error; + } + if (message.costDataSharingEnabled != null && message.hasOwnProperty("costDataSharingEnabled")) { + var error = $root.google.protobuf.BoolValue.verify(message.costDataSharingEnabled); + if (error) + return "costDataSharingEnabled." + error; + } return null; }; /** - * Creates a GoogleSignalsSettings message from a plain object. Also converts values to their respective internal types. + * Creates a DisplayVideo360AdvertiserLinkProposal message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.GoogleSignalsSettings} GoogleSignalsSettings + * @returns {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal} DisplayVideo360AdvertiserLinkProposal */ - GoogleSignalsSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.GoogleSignalsSettings) + DisplayVideo360AdvertiserLinkProposal.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal) return object; - var message = new $root.google.analytics.admin.v1alpha.GoogleSignalsSettings(); + var message = new $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal(); if (object.name != null) message.name = String(object.name); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "GOOGLE_SIGNALS_STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "GOOGLE_SIGNALS_ENABLED": - case 1: - message.state = 1; - break; - case "GOOGLE_SIGNALS_DISABLED": - case 2: - message.state = 2; - break; + if (object.advertiserId != null) + message.advertiserId = String(object.advertiserId); + if (object.linkProposalStatusDetails != null) { + if (typeof object.linkProposalStatusDetails !== "object") + throw TypeError(".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.linkProposalStatusDetails: object expected"); + message.linkProposalStatusDetails = $root.google.analytics.admin.v1alpha.LinkProposalStatusDetails.fromObject(object.linkProposalStatusDetails); } - switch (object.consent) { - default: - if (typeof object.consent === "number") { - message.consent = object.consent; - break; - } - break; - case "GOOGLE_SIGNALS_CONSENT_UNSPECIFIED": - case 0: - message.consent = 0; - break; - case "GOOGLE_SIGNALS_CONSENT_CONSENTED": - case 2: - message.consent = 2; - break; - case "GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED": - case 1: - message.consent = 1; - break; + if (object.advertiserDisplayName != null) + message.advertiserDisplayName = String(object.advertiserDisplayName); + if (object.validationEmail != null) + message.validationEmail = String(object.validationEmail); + if (object.adsPersonalizationEnabled != null) { + if (typeof object.adsPersonalizationEnabled !== "object") + throw TypeError(".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.adsPersonalizationEnabled: object expected"); + message.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.fromObject(object.adsPersonalizationEnabled); + } + if (object.campaignDataSharingEnabled != null) { + if (typeof object.campaignDataSharingEnabled !== "object") + throw TypeError(".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.campaignDataSharingEnabled: object expected"); + message.campaignDataSharingEnabled = $root.google.protobuf.BoolValue.fromObject(object.campaignDataSharingEnabled); + } + if (object.costDataSharingEnabled != null) { + if (typeof object.costDataSharingEnabled !== "object") + throw TypeError(".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.costDataSharingEnabled: object expected"); + message.costDataSharingEnabled = $root.google.protobuf.BoolValue.fromObject(object.costDataSharingEnabled); } return message; }; /** - * Creates a plain object from a GoogleSignalsSettings message. Also converts values to other types if specified. + * Creates a plain object from a DisplayVideo360AdvertiserLinkProposal message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal * @static - * @param {google.analytics.admin.v1alpha.GoogleSignalsSettings} message GoogleSignalsSettings + * @param {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal} message DisplayVideo360AdvertiserLinkProposal * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GoogleSignalsSettings.toObject = function toObject(message, options) { + DisplayVideo360AdvertiserLinkProposal.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; - object.state = options.enums === String ? "GOOGLE_SIGNALS_STATE_UNSPECIFIED" : 0; - object.consent = options.enums === String ? "GOOGLE_SIGNALS_CONSENT_UNSPECIFIED" : 0; + object.advertiserId = ""; + object.linkProposalStatusDetails = null; + object.advertiserDisplayName = ""; + object.validationEmail = ""; + object.adsPersonalizationEnabled = null; + object.campaignDataSharingEnabled = null; + object.costDataSharingEnabled = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.analytics.admin.v1alpha.GoogleSignalsState[message.state] === undefined ? message.state : $root.google.analytics.admin.v1alpha.GoogleSignalsState[message.state] : message.state; - if (message.consent != null && message.hasOwnProperty("consent")) - object.consent = options.enums === String ? $root.google.analytics.admin.v1alpha.GoogleSignalsConsent[message.consent] === undefined ? message.consent : $root.google.analytics.admin.v1alpha.GoogleSignalsConsent[message.consent] : message.consent; + if (message.advertiserId != null && message.hasOwnProperty("advertiserId")) + object.advertiserId = message.advertiserId; + if (message.linkProposalStatusDetails != null && message.hasOwnProperty("linkProposalStatusDetails")) + object.linkProposalStatusDetails = $root.google.analytics.admin.v1alpha.LinkProposalStatusDetails.toObject(message.linkProposalStatusDetails, options); + if (message.advertiserDisplayName != null && message.hasOwnProperty("advertiserDisplayName")) + object.advertiserDisplayName = message.advertiserDisplayName; + if (message.validationEmail != null && message.hasOwnProperty("validationEmail")) + object.validationEmail = message.validationEmail; + if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) + object.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.toObject(message.adsPersonalizationEnabled, options); + if (message.campaignDataSharingEnabled != null && message.hasOwnProperty("campaignDataSharingEnabled")) + object.campaignDataSharingEnabled = $root.google.protobuf.BoolValue.toObject(message.campaignDataSharingEnabled, options); + if (message.costDataSharingEnabled != null && message.hasOwnProperty("costDataSharingEnabled")) + object.costDataSharingEnabled = $root.google.protobuf.BoolValue.toObject(message.costDataSharingEnabled, options); return object; }; /** - * Converts this GoogleSignalsSettings to JSON. + * Converts this DisplayVideo360AdvertiserLinkProposal to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal * @instance * @returns {Object.} JSON object */ - GoogleSignalsSettings.prototype.toJSON = function toJSON() { + DisplayVideo360AdvertiserLinkProposal.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GoogleSignalsSettings + * Gets the default type url for DisplayVideo360AdvertiserLinkProposal * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GoogleSignalsSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DisplayVideo360AdvertiserLinkProposal.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.GoogleSignalsSettings"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal"; }; - return GoogleSignalsSettings; + return DisplayVideo360AdvertiserLinkProposal; })(); - v1alpha.CustomDimension = (function() { + v1alpha.SearchAds360Link = (function() { /** - * Properties of a CustomDimension. + * Properties of a SearchAds360Link. * @memberof google.analytics.admin.v1alpha - * @interface ICustomDimension - * @property {string|null} [name] CustomDimension name - * @property {string|null} [parameterName] CustomDimension parameterName - * @property {string|null} [displayName] CustomDimension displayName - * @property {string|null} [description] CustomDimension description - * @property {google.analytics.admin.v1alpha.CustomDimension.DimensionScope|null} [scope] CustomDimension scope - * @property {boolean|null} [disallowAdsPersonalization] CustomDimension disallowAdsPersonalization + * @interface ISearchAds360Link + * @property {string|null} [name] SearchAds360Link name + * @property {string|null} [advertiserId] SearchAds360Link advertiserId + * @property {google.protobuf.IBoolValue|null} [campaignDataSharingEnabled] SearchAds360Link campaignDataSharingEnabled + * @property {google.protobuf.IBoolValue|null} [costDataSharingEnabled] SearchAds360Link costDataSharingEnabled + * @property {string|null} [advertiserDisplayName] SearchAds360Link advertiserDisplayName + * @property {google.protobuf.IBoolValue|null} [adsPersonalizationEnabled] SearchAds360Link adsPersonalizationEnabled + * @property {google.protobuf.IBoolValue|null} [siteStatsSharingEnabled] SearchAds360Link siteStatsSharingEnabled */ /** - * Constructs a new CustomDimension. + * Constructs a new SearchAds360Link. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a CustomDimension. - * @implements ICustomDimension + * @classdesc Represents a SearchAds360Link. + * @implements ISearchAds360Link * @constructor - * @param {google.analytics.admin.v1alpha.ICustomDimension=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.ISearchAds360Link=} [properties] Properties to set */ - function CustomDimension(properties) { + function SearchAds360Link(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -48277,120 +53563,130 @@ } /** - * CustomDimension name. + * SearchAds360Link name. * @member {string} name - * @memberof google.analytics.admin.v1alpha.CustomDimension + * @memberof google.analytics.admin.v1alpha.SearchAds360Link * @instance */ - CustomDimension.prototype.name = ""; + SearchAds360Link.prototype.name = ""; /** - * CustomDimension parameterName. - * @member {string} parameterName - * @memberof google.analytics.admin.v1alpha.CustomDimension + * SearchAds360Link advertiserId. + * @member {string} advertiserId + * @memberof google.analytics.admin.v1alpha.SearchAds360Link * @instance */ - CustomDimension.prototype.parameterName = ""; + SearchAds360Link.prototype.advertiserId = ""; /** - * CustomDimension displayName. - * @member {string} displayName - * @memberof google.analytics.admin.v1alpha.CustomDimension + * SearchAds360Link campaignDataSharingEnabled. + * @member {google.protobuf.IBoolValue|null|undefined} campaignDataSharingEnabled + * @memberof google.analytics.admin.v1alpha.SearchAds360Link * @instance */ - CustomDimension.prototype.displayName = ""; + SearchAds360Link.prototype.campaignDataSharingEnabled = null; /** - * CustomDimension description. - * @member {string} description - * @memberof google.analytics.admin.v1alpha.CustomDimension + * SearchAds360Link costDataSharingEnabled. + * @member {google.protobuf.IBoolValue|null|undefined} costDataSharingEnabled + * @memberof google.analytics.admin.v1alpha.SearchAds360Link * @instance */ - CustomDimension.prototype.description = ""; + SearchAds360Link.prototype.costDataSharingEnabled = null; /** - * CustomDimension scope. - * @member {google.analytics.admin.v1alpha.CustomDimension.DimensionScope} scope - * @memberof google.analytics.admin.v1alpha.CustomDimension + * SearchAds360Link advertiserDisplayName. + * @member {string} advertiserDisplayName + * @memberof google.analytics.admin.v1alpha.SearchAds360Link * @instance */ - CustomDimension.prototype.scope = 0; + SearchAds360Link.prototype.advertiserDisplayName = ""; /** - * CustomDimension disallowAdsPersonalization. - * @member {boolean} disallowAdsPersonalization - * @memberof google.analytics.admin.v1alpha.CustomDimension + * SearchAds360Link adsPersonalizationEnabled. + * @member {google.protobuf.IBoolValue|null|undefined} adsPersonalizationEnabled + * @memberof google.analytics.admin.v1alpha.SearchAds360Link * @instance */ - CustomDimension.prototype.disallowAdsPersonalization = false; + SearchAds360Link.prototype.adsPersonalizationEnabled = null; /** - * Creates a new CustomDimension instance using the specified properties. + * SearchAds360Link siteStatsSharingEnabled. + * @member {google.protobuf.IBoolValue|null|undefined} siteStatsSharingEnabled + * @memberof google.analytics.admin.v1alpha.SearchAds360Link + * @instance + */ + SearchAds360Link.prototype.siteStatsSharingEnabled = null; + + /** + * Creates a new SearchAds360Link instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.CustomDimension + * @memberof google.analytics.admin.v1alpha.SearchAds360Link * @static - * @param {google.analytics.admin.v1alpha.ICustomDimension=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.CustomDimension} CustomDimension instance + * @param {google.analytics.admin.v1alpha.ISearchAds360Link=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.SearchAds360Link} SearchAds360Link instance */ - CustomDimension.create = function create(properties) { - return new CustomDimension(properties); + SearchAds360Link.create = function create(properties) { + return new SearchAds360Link(properties); }; /** - * Encodes the specified CustomDimension message. Does not implicitly {@link google.analytics.admin.v1alpha.CustomDimension.verify|verify} messages. + * Encodes the specified SearchAds360Link message. Does not implicitly {@link google.analytics.admin.v1alpha.SearchAds360Link.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.CustomDimension + * @memberof google.analytics.admin.v1alpha.SearchAds360Link * @static - * @param {google.analytics.admin.v1alpha.ICustomDimension} message CustomDimension message or plain object to encode + * @param {google.analytics.admin.v1alpha.ISearchAds360Link} message SearchAds360Link message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomDimension.encode = function encode(message, writer) { + SearchAds360Link.encode = function encode(message, writer) { 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.parameterName != null && Object.hasOwnProperty.call(message, "parameterName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.parameterName); - 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.scope != null && Object.hasOwnProperty.call(message, "scope")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.scope); - if (message.disallowAdsPersonalization != null && Object.hasOwnProperty.call(message, "disallowAdsPersonalization")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.disallowAdsPersonalization); + if (message.advertiserId != null && Object.hasOwnProperty.call(message, "advertiserId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.advertiserId); + if (message.campaignDataSharingEnabled != null && Object.hasOwnProperty.call(message, "campaignDataSharingEnabled")) + $root.google.protobuf.BoolValue.encode(message.campaignDataSharingEnabled, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.costDataSharingEnabled != null && Object.hasOwnProperty.call(message, "costDataSharingEnabled")) + $root.google.protobuf.BoolValue.encode(message.costDataSharingEnabled, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.advertiserDisplayName != null && Object.hasOwnProperty.call(message, "advertiserDisplayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.advertiserDisplayName); + if (message.adsPersonalizationEnabled != null && Object.hasOwnProperty.call(message, "adsPersonalizationEnabled")) + $root.google.protobuf.BoolValue.encode(message.adsPersonalizationEnabled, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.siteStatsSharingEnabled != null && Object.hasOwnProperty.call(message, "siteStatsSharingEnabled")) + $root.google.protobuf.BoolValue.encode(message.siteStatsSharingEnabled, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** - * Encodes the specified CustomDimension message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CustomDimension.verify|verify} messages. + * Encodes the specified SearchAds360Link message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.SearchAds360Link.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.CustomDimension + * @memberof google.analytics.admin.v1alpha.SearchAds360Link * @static - * @param {google.analytics.admin.v1alpha.ICustomDimension} message CustomDimension message or plain object to encode + * @param {google.analytics.admin.v1alpha.ISearchAds360Link} message SearchAds360Link message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomDimension.encodeDelimited = function encodeDelimited(message, writer) { + SearchAds360Link.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomDimension message from the specified reader or buffer. + * Decodes a SearchAds360Link message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.CustomDimension + * @memberof google.analytics.admin.v1alpha.SearchAds360Link * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.CustomDimension} CustomDimension + * @returns {google.analytics.admin.v1alpha.SearchAds360Link} SearchAds360Link * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomDimension.decode = function decode(reader, length) { + SearchAds360Link.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.CustomDimension(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.SearchAds360Link(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -48399,23 +53695,27 @@ break; } case 2: { - message.parameterName = reader.string(); + message.advertiserId = reader.string(); break; } case 3: { - message.displayName = reader.string(); + message.campaignDataSharingEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); break; } case 4: { - message.description = reader.string(); + message.costDataSharingEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); break; } case 5: { - message.scope = reader.int32(); + message.advertiserDisplayName = reader.string(); break; } case 6: { - message.disallowAdsPersonalization = reader.bool(); + message.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + case 7: { + message.siteStatsSharingEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); break; } default: @@ -48427,210 +53727,193 @@ }; /** - * Decodes a CustomDimension message from the specified reader or buffer, length delimited. + * Decodes a SearchAds360Link message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.CustomDimension + * @memberof google.analytics.admin.v1alpha.SearchAds360Link * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.CustomDimension} CustomDimension + * @returns {google.analytics.admin.v1alpha.SearchAds360Link} SearchAds360Link * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomDimension.decodeDelimited = function decodeDelimited(reader) { + SearchAds360Link.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomDimension message. + * Verifies a SearchAds360Link message. * @function verify - * @memberof google.analytics.admin.v1alpha.CustomDimension + * @memberof google.analytics.admin.v1alpha.SearchAds360Link * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomDimension.verify = function verify(message) { + SearchAds360Link.verify = function verify(message) { if (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.parameterName != null && message.hasOwnProperty("parameterName")) - if (!$util.isString(message.parameterName)) - return "parameterName: 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.scope != null && message.hasOwnProperty("scope")) - switch (message.scope) { - default: - return "scope: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.disallowAdsPersonalization != null && message.hasOwnProperty("disallowAdsPersonalization")) - if (typeof message.disallowAdsPersonalization !== "boolean") - return "disallowAdsPersonalization: boolean expected"; + if (message.advertiserId != null && message.hasOwnProperty("advertiserId")) + if (!$util.isString(message.advertiserId)) + return "advertiserId: string expected"; + if (message.campaignDataSharingEnabled != null && message.hasOwnProperty("campaignDataSharingEnabled")) { + var error = $root.google.protobuf.BoolValue.verify(message.campaignDataSharingEnabled); + if (error) + return "campaignDataSharingEnabled." + error; + } + if (message.costDataSharingEnabled != null && message.hasOwnProperty("costDataSharingEnabled")) { + var error = $root.google.protobuf.BoolValue.verify(message.costDataSharingEnabled); + if (error) + return "costDataSharingEnabled." + error; + } + if (message.advertiserDisplayName != null && message.hasOwnProperty("advertiserDisplayName")) + if (!$util.isString(message.advertiserDisplayName)) + return "advertiserDisplayName: string expected"; + if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) { + var error = $root.google.protobuf.BoolValue.verify(message.adsPersonalizationEnabled); + if (error) + return "adsPersonalizationEnabled." + error; + } + if (message.siteStatsSharingEnabled != null && message.hasOwnProperty("siteStatsSharingEnabled")) { + var error = $root.google.protobuf.BoolValue.verify(message.siteStatsSharingEnabled); + if (error) + return "siteStatsSharingEnabled." + error; + } return null; }; /** - * Creates a CustomDimension message from a plain object. Also converts values to their respective internal types. + * Creates a SearchAds360Link message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.CustomDimension + * @memberof google.analytics.admin.v1alpha.SearchAds360Link * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.CustomDimension} CustomDimension + * @returns {google.analytics.admin.v1alpha.SearchAds360Link} SearchAds360Link */ - CustomDimension.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.CustomDimension) + SearchAds360Link.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.SearchAds360Link) return object; - var message = new $root.google.analytics.admin.v1alpha.CustomDimension(); + var message = new $root.google.analytics.admin.v1alpha.SearchAds360Link(); if (object.name != null) message.name = String(object.name); - if (object.parameterName != null) - message.parameterName = String(object.parameterName); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - switch (object.scope) { - default: - if (typeof object.scope === "number") { - message.scope = object.scope; - break; - } - break; - case "DIMENSION_SCOPE_UNSPECIFIED": - case 0: - message.scope = 0; - break; - case "EVENT": - case 1: - message.scope = 1; - break; - case "USER": - case 2: - message.scope = 2; - break; + if (object.advertiserId != null) + message.advertiserId = String(object.advertiserId); + if (object.campaignDataSharingEnabled != null) { + if (typeof object.campaignDataSharingEnabled !== "object") + throw TypeError(".google.analytics.admin.v1alpha.SearchAds360Link.campaignDataSharingEnabled: object expected"); + message.campaignDataSharingEnabled = $root.google.protobuf.BoolValue.fromObject(object.campaignDataSharingEnabled); + } + if (object.costDataSharingEnabled != null) { + if (typeof object.costDataSharingEnabled !== "object") + throw TypeError(".google.analytics.admin.v1alpha.SearchAds360Link.costDataSharingEnabled: object expected"); + message.costDataSharingEnabled = $root.google.protobuf.BoolValue.fromObject(object.costDataSharingEnabled); + } + if (object.advertiserDisplayName != null) + message.advertiserDisplayName = String(object.advertiserDisplayName); + if (object.adsPersonalizationEnabled != null) { + if (typeof object.adsPersonalizationEnabled !== "object") + throw TypeError(".google.analytics.admin.v1alpha.SearchAds360Link.adsPersonalizationEnabled: object expected"); + message.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.fromObject(object.adsPersonalizationEnabled); + } + if (object.siteStatsSharingEnabled != null) { + if (typeof object.siteStatsSharingEnabled !== "object") + throw TypeError(".google.analytics.admin.v1alpha.SearchAds360Link.siteStatsSharingEnabled: object expected"); + message.siteStatsSharingEnabled = $root.google.protobuf.BoolValue.fromObject(object.siteStatsSharingEnabled); } - if (object.disallowAdsPersonalization != null) - message.disallowAdsPersonalization = Boolean(object.disallowAdsPersonalization); return message; }; /** - * Creates a plain object from a CustomDimension message. Also converts values to other types if specified. + * Creates a plain object from a SearchAds360Link message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.CustomDimension + * @memberof google.analytics.admin.v1alpha.SearchAds360Link * @static - * @param {google.analytics.admin.v1alpha.CustomDimension} message CustomDimension + * @param {google.analytics.admin.v1alpha.SearchAds360Link} message SearchAds360Link * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomDimension.toObject = function toObject(message, options) { + SearchAds360Link.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; - object.parameterName = ""; - object.displayName = ""; - object.description = ""; - object.scope = options.enums === String ? "DIMENSION_SCOPE_UNSPECIFIED" : 0; - object.disallowAdsPersonalization = false; + object.advertiserId = ""; + object.campaignDataSharingEnabled = null; + object.costDataSharingEnabled = null; + object.advertiserDisplayName = ""; + object.adsPersonalizationEnabled = null; + object.siteStatsSharingEnabled = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.parameterName != null && message.hasOwnProperty("parameterName")) - object.parameterName = message.parameterName; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.CustomDimension.DimensionScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1alpha.CustomDimension.DimensionScope[message.scope] : message.scope; - if (message.disallowAdsPersonalization != null && message.hasOwnProperty("disallowAdsPersonalization")) - object.disallowAdsPersonalization = message.disallowAdsPersonalization; + if (message.advertiserId != null && message.hasOwnProperty("advertiserId")) + object.advertiserId = message.advertiserId; + if (message.campaignDataSharingEnabled != null && message.hasOwnProperty("campaignDataSharingEnabled")) + object.campaignDataSharingEnabled = $root.google.protobuf.BoolValue.toObject(message.campaignDataSharingEnabled, options); + if (message.costDataSharingEnabled != null && message.hasOwnProperty("costDataSharingEnabled")) + object.costDataSharingEnabled = $root.google.protobuf.BoolValue.toObject(message.costDataSharingEnabled, options); + if (message.advertiserDisplayName != null && message.hasOwnProperty("advertiserDisplayName")) + object.advertiserDisplayName = message.advertiserDisplayName; + if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) + object.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.toObject(message.adsPersonalizationEnabled, options); + if (message.siteStatsSharingEnabled != null && message.hasOwnProperty("siteStatsSharingEnabled")) + object.siteStatsSharingEnabled = $root.google.protobuf.BoolValue.toObject(message.siteStatsSharingEnabled, options); return object; }; /** - * Converts this CustomDimension to JSON. + * Converts this SearchAds360Link to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.CustomDimension + * @memberof google.analytics.admin.v1alpha.SearchAds360Link * @instance * @returns {Object.} JSON object */ - CustomDimension.prototype.toJSON = function toJSON() { + SearchAds360Link.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomDimension + * Gets the default type url for SearchAds360Link * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.CustomDimension + * @memberof google.analytics.admin.v1alpha.SearchAds360Link * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomDimension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SearchAds360Link.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.CustomDimension"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.SearchAds360Link"; }; - /** - * DimensionScope enum. - * @name google.analytics.admin.v1alpha.CustomDimension.DimensionScope - * @enum {number} - * @property {number} DIMENSION_SCOPE_UNSPECIFIED=0 DIMENSION_SCOPE_UNSPECIFIED value - * @property {number} EVENT=1 EVENT value - * @property {number} USER=2 USER value - */ - CustomDimension.DimensionScope = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DIMENSION_SCOPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "EVENT"] = 1; - values[valuesById[2] = "USER"] = 2; - return values; - })(); - - return CustomDimension; + return SearchAds360Link; })(); - v1alpha.CustomMetric = (function() { + v1alpha.LinkProposalStatusDetails = (function() { /** - * Properties of a CustomMetric. + * Properties of a LinkProposalStatusDetails. * @memberof google.analytics.admin.v1alpha - * @interface ICustomMetric - * @property {string|null} [name] CustomMetric name - * @property {string|null} [parameterName] CustomMetric parameterName - * @property {string|null} [displayName] CustomMetric displayName - * @property {string|null} [description] CustomMetric description - * @property {google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit|null} [measurementUnit] CustomMetric measurementUnit - * @property {google.analytics.admin.v1alpha.CustomMetric.MetricScope|null} [scope] CustomMetric scope - * @property {Array.|null} [restrictedMetricType] CustomMetric restrictedMetricType + * @interface ILinkProposalStatusDetails + * @property {google.analytics.admin.v1alpha.LinkProposalInitiatingProduct|null} [linkProposalInitiatingProduct] LinkProposalStatusDetails linkProposalInitiatingProduct + * @property {string|null} [requestorEmail] LinkProposalStatusDetails requestorEmail + * @property {google.analytics.admin.v1alpha.LinkProposalState|null} [linkProposalState] LinkProposalStatusDetails linkProposalState */ /** - * Constructs a new CustomMetric. + * Constructs a new LinkProposalStatusDetails. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a CustomMetric. - * @implements ICustomMetric + * @classdesc Represents a LinkProposalStatusDetails. + * @implements ILinkProposalStatusDetails * @constructor - * @param {google.analytics.admin.v1alpha.ICustomMetric=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.ILinkProposalStatusDetails=} [properties] Properties to set */ - function CustomMetric(properties) { - this.restrictedMetricType = []; + function LinkProposalStatusDetails(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -48638,170 +53921,103 @@ } /** - * CustomMetric name. - * @member {string} name - * @memberof google.analytics.admin.v1alpha.CustomMetric - * @instance - */ - CustomMetric.prototype.name = ""; - - /** - * CustomMetric parameterName. - * @member {string} parameterName - * @memberof google.analytics.admin.v1alpha.CustomMetric - * @instance - */ - CustomMetric.prototype.parameterName = ""; - - /** - * CustomMetric displayName. - * @member {string} displayName - * @memberof google.analytics.admin.v1alpha.CustomMetric - * @instance - */ - CustomMetric.prototype.displayName = ""; - - /** - * CustomMetric description. - * @member {string} description - * @memberof google.analytics.admin.v1alpha.CustomMetric - * @instance - */ - CustomMetric.prototype.description = ""; - - /** - * CustomMetric measurementUnit. - * @member {google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit} measurementUnit - * @memberof google.analytics.admin.v1alpha.CustomMetric + * LinkProposalStatusDetails linkProposalInitiatingProduct. + * @member {google.analytics.admin.v1alpha.LinkProposalInitiatingProduct} linkProposalInitiatingProduct + * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails * @instance */ - CustomMetric.prototype.measurementUnit = 0; + LinkProposalStatusDetails.prototype.linkProposalInitiatingProduct = 0; /** - * CustomMetric scope. - * @member {google.analytics.admin.v1alpha.CustomMetric.MetricScope} scope - * @memberof google.analytics.admin.v1alpha.CustomMetric + * LinkProposalStatusDetails requestorEmail. + * @member {string} requestorEmail + * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails * @instance */ - CustomMetric.prototype.scope = 0; + LinkProposalStatusDetails.prototype.requestorEmail = ""; /** - * CustomMetric restrictedMetricType. - * @member {Array.} restrictedMetricType - * @memberof google.analytics.admin.v1alpha.CustomMetric + * LinkProposalStatusDetails linkProposalState. + * @member {google.analytics.admin.v1alpha.LinkProposalState} linkProposalState + * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails * @instance */ - CustomMetric.prototype.restrictedMetricType = $util.emptyArray; + LinkProposalStatusDetails.prototype.linkProposalState = 0; /** - * Creates a new CustomMetric instance using the specified properties. + * Creates a new LinkProposalStatusDetails instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.CustomMetric + * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails * @static - * @param {google.analytics.admin.v1alpha.ICustomMetric=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.CustomMetric} CustomMetric instance + * @param {google.analytics.admin.v1alpha.ILinkProposalStatusDetails=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.LinkProposalStatusDetails} LinkProposalStatusDetails instance */ - CustomMetric.create = function create(properties) { - return new CustomMetric(properties); + LinkProposalStatusDetails.create = function create(properties) { + return new LinkProposalStatusDetails(properties); }; /** - * Encodes the specified CustomMetric message. Does not implicitly {@link google.analytics.admin.v1alpha.CustomMetric.verify|verify} messages. + * Encodes the specified LinkProposalStatusDetails message. Does not implicitly {@link google.analytics.admin.v1alpha.LinkProposalStatusDetails.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.CustomMetric + * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails * @static - * @param {google.analytics.admin.v1alpha.ICustomMetric} message CustomMetric message or plain object to encode + * @param {google.analytics.admin.v1alpha.ILinkProposalStatusDetails} message LinkProposalStatusDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomMetric.encode = function encode(message, writer) { + LinkProposalStatusDetails.encode = function encode(message, writer) { 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.parameterName != null && Object.hasOwnProperty.call(message, "parameterName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.parameterName); - 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.measurementUnit != null && Object.hasOwnProperty.call(message, "measurementUnit")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.measurementUnit); - if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.scope); - if (message.restrictedMetricType != null && message.restrictedMetricType.length) { - writer.uint32(/* id 8, wireType 2 =*/66).fork(); - for (var i = 0; i < message.restrictedMetricType.length; ++i) - writer.int32(message.restrictedMetricType[i]); - writer.ldelim(); - } + if (message.linkProposalInitiatingProduct != null && Object.hasOwnProperty.call(message, "linkProposalInitiatingProduct")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.linkProposalInitiatingProduct); + if (message.requestorEmail != null && Object.hasOwnProperty.call(message, "requestorEmail")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestorEmail); + if (message.linkProposalState != null && Object.hasOwnProperty.call(message, "linkProposalState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.linkProposalState); return writer; }; /** - * Encodes the specified CustomMetric message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CustomMetric.verify|verify} messages. + * Encodes the specified LinkProposalStatusDetails message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.LinkProposalStatusDetails.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.CustomMetric + * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails * @static - * @param {google.analytics.admin.v1alpha.ICustomMetric} message CustomMetric message or plain object to encode + * @param {google.analytics.admin.v1alpha.ILinkProposalStatusDetails} message LinkProposalStatusDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomMetric.encodeDelimited = function encodeDelimited(message, writer) { + LinkProposalStatusDetails.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomMetric message from the specified reader or buffer. + * Decodes a LinkProposalStatusDetails message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.CustomMetric + * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.CustomMetric} CustomMetric + * @returns {google.analytics.admin.v1alpha.LinkProposalStatusDetails} LinkProposalStatusDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomMetric.decode = function decode(reader, length) { + LinkProposalStatusDetails.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.CustomMetric(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.LinkProposalStatusDetails(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.linkProposalInitiatingProduct = reader.int32(); break; } case 2: { - message.parameterName = reader.string(); + message.requestorEmail = reader.string(); break; } case 3: { - message.displayName = reader.string(); - break; - } - case 4: { - message.description = reader.string(); - break; - } - case 5: { - message.measurementUnit = reader.int32(); - break; - } - case 6: { - message.scope = reader.int32(); - break; - } - case 8: { - if (!(message.restrictedMetricType && message.restrictedMetricType.length)) - message.restrictedMetricType = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.restrictedMetricType.push(reader.int32()); - } else - message.restrictedMetricType.push(reader.int32()); + message.linkProposalState = reader.int32(); break; } default: @@ -48813,355 +54029,211 @@ }; /** - * Decodes a CustomMetric message from the specified reader or buffer, length delimited. + * Decodes a LinkProposalStatusDetails message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.CustomMetric + * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.CustomMetric} CustomMetric + * @returns {google.analytics.admin.v1alpha.LinkProposalStatusDetails} LinkProposalStatusDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomMetric.decodeDelimited = function decodeDelimited(reader) { + LinkProposalStatusDetails.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomMetric message. + * Verifies a LinkProposalStatusDetails message. * @function verify - * @memberof google.analytics.admin.v1alpha.CustomMetric + * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomMetric.verify = function verify(message) { + LinkProposalStatusDetails.verify = function verify(message) { if (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.parameterName != null && message.hasOwnProperty("parameterName")) - if (!$util.isString(message.parameterName)) - return "parameterName: 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.measurementUnit != null && message.hasOwnProperty("measurementUnit")) - switch (message.measurementUnit) { + if (message.linkProposalInitiatingProduct != null && message.hasOwnProperty("linkProposalInitiatingProduct")) + switch (message.linkProposalInitiatingProduct) { default: - return "measurementUnit: enum value expected"; + return "linkProposalInitiatingProduct: enum value expected"; case 0: case 1: case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: break; } - if (message.scope != null && message.hasOwnProperty("scope")) - switch (message.scope) { + if (message.requestorEmail != null && message.hasOwnProperty("requestorEmail")) + if (!$util.isString(message.requestorEmail)) + return "requestorEmail: string expected"; + if (message.linkProposalState != null && message.hasOwnProperty("linkProposalState")) + switch (message.linkProposalState) { default: - return "scope: enum value expected"; + return "linkProposalState: enum value expected"; case 0: case 1: + case 2: + case 3: + case 4: + case 5: + case 6: break; } - if (message.restrictedMetricType != null && message.hasOwnProperty("restrictedMetricType")) { - if (!Array.isArray(message.restrictedMetricType)) - return "restrictedMetricType: array expected"; - for (var i = 0; i < message.restrictedMetricType.length; ++i) - switch (message.restrictedMetricType[i]) { - default: - return "restrictedMetricType: enum value[] expected"; - case 0: - case 1: - case 2: - break; - } - } return null; }; /** - * Creates a CustomMetric message from a plain object. Also converts values to their respective internal types. + * Creates a LinkProposalStatusDetails message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.CustomMetric + * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.CustomMetric} CustomMetric + * @returns {google.analytics.admin.v1alpha.LinkProposalStatusDetails} LinkProposalStatusDetails */ - CustomMetric.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.CustomMetric) + LinkProposalStatusDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.LinkProposalStatusDetails) return object; - var message = new $root.google.analytics.admin.v1alpha.CustomMetric(); - if (object.name != null) - message.name = String(object.name); - if (object.parameterName != null) - message.parameterName = String(object.parameterName); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - switch (object.measurementUnit) { + var message = new $root.google.analytics.admin.v1alpha.LinkProposalStatusDetails(); + switch (object.linkProposalInitiatingProduct) { default: - if (typeof object.measurementUnit === "number") { - message.measurementUnit = object.measurementUnit; + if (typeof object.linkProposalInitiatingProduct === "number") { + message.linkProposalInitiatingProduct = object.linkProposalInitiatingProduct; break; } break; - case "MEASUREMENT_UNIT_UNSPECIFIED": + case "LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED": case 0: - message.measurementUnit = 0; + message.linkProposalInitiatingProduct = 0; break; - case "STANDARD": + case "GOOGLE_ANALYTICS": case 1: - message.measurementUnit = 1; + message.linkProposalInitiatingProduct = 1; break; - case "CURRENCY": + case "LINKED_PRODUCT": case 2: - message.measurementUnit = 2; - break; - case "FEET": - case 3: - message.measurementUnit = 3; - break; - case "METERS": - case 4: - message.measurementUnit = 4; - break; - case "KILOMETERS": - case 5: - message.measurementUnit = 5; - break; - case "MILES": - case 6: - message.measurementUnit = 6; - break; - case "MILLISECONDS": - case 7: - message.measurementUnit = 7; - break; - case "SECONDS": - case 8: - message.measurementUnit = 8; - break; - case "MINUTES": - case 9: - message.measurementUnit = 9; - break; - case "HOURS": - case 10: - message.measurementUnit = 10; + message.linkProposalInitiatingProduct = 2; break; } - switch (object.scope) { + if (object.requestorEmail != null) + message.requestorEmail = String(object.requestorEmail); + switch (object.linkProposalState) { default: - if (typeof object.scope === "number") { - message.scope = object.scope; + if (typeof object.linkProposalState === "number") { + message.linkProposalState = object.linkProposalState; break; } break; - case "METRIC_SCOPE_UNSPECIFIED": + case "LINK_PROPOSAL_STATE_UNSPECIFIED": case 0: - message.scope = 0; + message.linkProposalState = 0; break; - case "EVENT": + case "AWAITING_REVIEW_FROM_GOOGLE_ANALYTICS": case 1: - message.scope = 1; + message.linkProposalState = 1; + break; + case "AWAITING_REVIEW_FROM_LINKED_PRODUCT": + case 2: + message.linkProposalState = 2; + break; + case "WITHDRAWN": + case 3: + message.linkProposalState = 3; + break; + case "DECLINED": + case 4: + message.linkProposalState = 4; + break; + case "EXPIRED": + case 5: + message.linkProposalState = 5; + break; + case "OBSOLETE": + case 6: + message.linkProposalState = 6; break; - } - if (object.restrictedMetricType) { - if (!Array.isArray(object.restrictedMetricType)) - throw TypeError(".google.analytics.admin.v1alpha.CustomMetric.restrictedMetricType: array expected"); - message.restrictedMetricType = []; - for (var i = 0; i < object.restrictedMetricType.length; ++i) - switch (object.restrictedMetricType[i]) { - default: - if (typeof object.restrictedMetricType[i] === "number") { - message.restrictedMetricType[i] = object.restrictedMetricType[i]; - break; - } - case "RESTRICTED_METRIC_TYPE_UNSPECIFIED": - case 0: - message.restrictedMetricType[i] = 0; - break; - case "COST_DATA": - case 1: - message.restrictedMetricType[i] = 1; - break; - case "REVENUE_DATA": - case 2: - message.restrictedMetricType[i] = 2; - break; - } } return message; }; /** - * Creates a plain object from a CustomMetric message. Also converts values to other types if specified. + * Creates a plain object from a LinkProposalStatusDetails message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.CustomMetric + * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails * @static - * @param {google.analytics.admin.v1alpha.CustomMetric} message CustomMetric + * @param {google.analytics.admin.v1alpha.LinkProposalStatusDetails} message LinkProposalStatusDetails * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomMetric.toObject = function toObject(message, options) { + LinkProposalStatusDetails.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.restrictedMetricType = []; if (options.defaults) { - object.name = ""; - object.parameterName = ""; - object.displayName = ""; - object.description = ""; - object.measurementUnit = options.enums === String ? "MEASUREMENT_UNIT_UNSPECIFIED" : 0; - object.scope = options.enums === String ? "METRIC_SCOPE_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.parameterName != null && message.hasOwnProperty("parameterName")) - object.parameterName = message.parameterName; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.measurementUnit != null && message.hasOwnProperty("measurementUnit")) - object.measurementUnit = options.enums === String ? $root.google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit[message.measurementUnit] === undefined ? message.measurementUnit : $root.google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit[message.measurementUnit] : message.measurementUnit; - if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.CustomMetric.MetricScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1alpha.CustomMetric.MetricScope[message.scope] : message.scope; - if (message.restrictedMetricType && message.restrictedMetricType.length) { - object.restrictedMetricType = []; - for (var j = 0; j < message.restrictedMetricType.length; ++j) - object.restrictedMetricType[j] = options.enums === String ? $root.google.analytics.admin.v1alpha.CustomMetric.RestrictedMetricType[message.restrictedMetricType[j]] === undefined ? message.restrictedMetricType[j] : $root.google.analytics.admin.v1alpha.CustomMetric.RestrictedMetricType[message.restrictedMetricType[j]] : message.restrictedMetricType[j]; + object.linkProposalInitiatingProduct = options.enums === String ? "LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED" : 0; + object.requestorEmail = ""; + object.linkProposalState = options.enums === String ? "LINK_PROPOSAL_STATE_UNSPECIFIED" : 0; } + if (message.linkProposalInitiatingProduct != null && message.hasOwnProperty("linkProposalInitiatingProduct")) + object.linkProposalInitiatingProduct = options.enums === String ? $root.google.analytics.admin.v1alpha.LinkProposalInitiatingProduct[message.linkProposalInitiatingProduct] === undefined ? message.linkProposalInitiatingProduct : $root.google.analytics.admin.v1alpha.LinkProposalInitiatingProduct[message.linkProposalInitiatingProduct] : message.linkProposalInitiatingProduct; + if (message.requestorEmail != null && message.hasOwnProperty("requestorEmail")) + object.requestorEmail = message.requestorEmail; + if (message.linkProposalState != null && message.hasOwnProperty("linkProposalState")) + object.linkProposalState = options.enums === String ? $root.google.analytics.admin.v1alpha.LinkProposalState[message.linkProposalState] === undefined ? message.linkProposalState : $root.google.analytics.admin.v1alpha.LinkProposalState[message.linkProposalState] : message.linkProposalState; return object; }; /** - * Converts this CustomMetric to JSON. + * Converts this LinkProposalStatusDetails to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.CustomMetric + * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails * @instance * @returns {Object.} JSON object */ - CustomMetric.prototype.toJSON = function toJSON() { + LinkProposalStatusDetails.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomMetric + * Gets the default type url for LinkProposalStatusDetails * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.CustomMetric + * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomMetric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + LinkProposalStatusDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.CustomMetric"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.LinkProposalStatusDetails"; }; - /** - * MeasurementUnit enum. - * @name google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit - * @enum {number} - * @property {number} MEASUREMENT_UNIT_UNSPECIFIED=0 MEASUREMENT_UNIT_UNSPECIFIED value - * @property {number} STANDARD=1 STANDARD value - * @property {number} CURRENCY=2 CURRENCY value - * @property {number} FEET=3 FEET value - * @property {number} METERS=4 METERS value - * @property {number} KILOMETERS=5 KILOMETERS value - * @property {number} MILES=6 MILES value - * @property {number} MILLISECONDS=7 MILLISECONDS value - * @property {number} SECONDS=8 SECONDS value - * @property {number} MINUTES=9 MINUTES value - * @property {number} HOURS=10 HOURS value - */ - CustomMetric.MeasurementUnit = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MEASUREMENT_UNIT_UNSPECIFIED"] = 0; - values[valuesById[1] = "STANDARD"] = 1; - values[valuesById[2] = "CURRENCY"] = 2; - values[valuesById[3] = "FEET"] = 3; - values[valuesById[4] = "METERS"] = 4; - values[valuesById[5] = "KILOMETERS"] = 5; - values[valuesById[6] = "MILES"] = 6; - values[valuesById[7] = "MILLISECONDS"] = 7; - values[valuesById[8] = "SECONDS"] = 8; - values[valuesById[9] = "MINUTES"] = 9; - values[valuesById[10] = "HOURS"] = 10; - return values; - })(); - - /** - * MetricScope enum. - * @name google.analytics.admin.v1alpha.CustomMetric.MetricScope - * @enum {number} - * @property {number} METRIC_SCOPE_UNSPECIFIED=0 METRIC_SCOPE_UNSPECIFIED value - * @property {number} EVENT=1 EVENT value - */ - CustomMetric.MetricScope = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "METRIC_SCOPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "EVENT"] = 1; - return values; - })(); - - /** - * RestrictedMetricType enum. - * @name google.analytics.admin.v1alpha.CustomMetric.RestrictedMetricType - * @enum {number} - * @property {number} RESTRICTED_METRIC_TYPE_UNSPECIFIED=0 RESTRICTED_METRIC_TYPE_UNSPECIFIED value - * @property {number} COST_DATA=1 COST_DATA value - * @property {number} REVENUE_DATA=2 REVENUE_DATA value - */ - CustomMetric.RestrictedMetricType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RESTRICTED_METRIC_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "COST_DATA"] = 1; - values[valuesById[2] = "REVENUE_DATA"] = 2; - return values; - })(); - - return CustomMetric; + return LinkProposalStatusDetails; })(); - v1alpha.DataRetentionSettings = (function() { + v1alpha.ConversionEvent = (function() { /** - * Properties of a DataRetentionSettings. + * Properties of a ConversionEvent. * @memberof google.analytics.admin.v1alpha - * @interface IDataRetentionSettings - * @property {string|null} [name] DataRetentionSettings name - * @property {google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration|null} [eventDataRetention] DataRetentionSettings eventDataRetention - * @property {boolean|null} [resetUserDataOnNewActivity] DataRetentionSettings resetUserDataOnNewActivity + * @interface IConversionEvent + * @property {string|null} [name] ConversionEvent name + * @property {string|null} [eventName] ConversionEvent eventName + * @property {google.protobuf.ITimestamp|null} [createTime] ConversionEvent createTime + * @property {boolean|null} [deletable] ConversionEvent deletable + * @property {boolean|null} [custom] ConversionEvent custom */ /** - * Constructs a new DataRetentionSettings. + * Constructs a new ConversionEvent. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a DataRetentionSettings. - * @implements IDataRetentionSettings + * @classdesc Represents a ConversionEvent. + * @implements IConversionEvent * @constructor - * @param {google.analytics.admin.v1alpha.IDataRetentionSettings=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IConversionEvent=} [properties] Properties to set */ - function DataRetentionSettings(properties) { + function ConversionEvent(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -49169,90 +54241,110 @@ } /** - * DataRetentionSettings name. + * ConversionEvent name. * @member {string} name - * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @memberof google.analytics.admin.v1alpha.ConversionEvent * @instance */ - DataRetentionSettings.prototype.name = ""; + ConversionEvent.prototype.name = ""; /** - * DataRetentionSettings eventDataRetention. - * @member {google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration} eventDataRetention - * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * ConversionEvent eventName. + * @member {string} eventName + * @memberof google.analytics.admin.v1alpha.ConversionEvent * @instance */ - DataRetentionSettings.prototype.eventDataRetention = 0; + ConversionEvent.prototype.eventName = ""; /** - * DataRetentionSettings resetUserDataOnNewActivity. - * @member {boolean} resetUserDataOnNewActivity - * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * ConversionEvent createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.analytics.admin.v1alpha.ConversionEvent * @instance */ - DataRetentionSettings.prototype.resetUserDataOnNewActivity = false; + ConversionEvent.prototype.createTime = null; /** - * Creates a new DataRetentionSettings instance using the specified properties. + * ConversionEvent deletable. + * @member {boolean} deletable + * @memberof google.analytics.admin.v1alpha.ConversionEvent + * @instance + */ + ConversionEvent.prototype.deletable = false; + + /** + * ConversionEvent custom. + * @member {boolean} custom + * @memberof google.analytics.admin.v1alpha.ConversionEvent + * @instance + */ + ConversionEvent.prototype.custom = false; + + /** + * Creates a new ConversionEvent instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @memberof google.analytics.admin.v1alpha.ConversionEvent * @static - * @param {google.analytics.admin.v1alpha.IDataRetentionSettings=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.DataRetentionSettings} DataRetentionSettings instance + * @param {google.analytics.admin.v1alpha.IConversionEvent=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ConversionEvent} ConversionEvent instance */ - DataRetentionSettings.create = function create(properties) { - return new DataRetentionSettings(properties); + ConversionEvent.create = function create(properties) { + return new ConversionEvent(properties); }; /** - * Encodes the specified DataRetentionSettings message. Does not implicitly {@link google.analytics.admin.v1alpha.DataRetentionSettings.verify|verify} messages. + * Encodes the specified ConversionEvent message. Does not implicitly {@link google.analytics.admin.v1alpha.ConversionEvent.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @memberof google.analytics.admin.v1alpha.ConversionEvent * @static - * @param {google.analytics.admin.v1alpha.IDataRetentionSettings} message DataRetentionSettings message or plain object to encode + * @param {google.analytics.admin.v1alpha.IConversionEvent} message ConversionEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataRetentionSettings.encode = function encode(message, writer) { + ConversionEvent.encode = function encode(message, writer) { 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.eventDataRetention != null && Object.hasOwnProperty.call(message, "eventDataRetention")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.eventDataRetention); - if (message.resetUserDataOnNewActivity != null && Object.hasOwnProperty.call(message, "resetUserDataOnNewActivity")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.resetUserDataOnNewActivity); + if (message.eventName != null && Object.hasOwnProperty.call(message, "eventName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.eventName); + 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.deletable != null && Object.hasOwnProperty.call(message, "deletable")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.deletable); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.custom); return writer; }; /** - * Encodes the specified DataRetentionSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataRetentionSettings.verify|verify} messages. + * Encodes the specified ConversionEvent message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ConversionEvent.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @memberof google.analytics.admin.v1alpha.ConversionEvent * @static - * @param {google.analytics.admin.v1alpha.IDataRetentionSettings} message DataRetentionSettings message or plain object to encode + * @param {google.analytics.admin.v1alpha.IConversionEvent} message ConversionEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataRetentionSettings.encodeDelimited = function encodeDelimited(message, writer) { + ConversionEvent.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DataRetentionSettings message from the specified reader or buffer. + * Decodes a ConversionEvent message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @memberof google.analytics.admin.v1alpha.ConversionEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.DataRetentionSettings} DataRetentionSettings + * @returns {google.analytics.admin.v1alpha.ConversionEvent} ConversionEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataRetentionSettings.decode = function decode(reader, length) { + ConversionEvent.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DataRetentionSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ConversionEvent(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -49261,11 +54353,19 @@ break; } case 2: { - message.eventDataRetention = reader.int32(); + message.eventName = reader.string(); break; } case 3: { - message.resetUserDataOnNewActivity = reader.bool(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.deletable = reader.bool(); + break; + } + case 5: { + message.custom = reader.bool(); break; } default: @@ -49277,203 +54377,162 @@ }; /** - * Decodes a DataRetentionSettings message from the specified reader or buffer, length delimited. + * Decodes a ConversionEvent message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @memberof google.analytics.admin.v1alpha.ConversionEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.DataRetentionSettings} DataRetentionSettings + * @returns {google.analytics.admin.v1alpha.ConversionEvent} ConversionEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataRetentionSettings.decodeDelimited = function decodeDelimited(reader) { + ConversionEvent.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DataRetentionSettings message. + * Verifies a ConversionEvent message. * @function verify - * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @memberof google.analytics.admin.v1alpha.ConversionEvent * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DataRetentionSettings.verify = function verify(message) { + ConversionEvent.verify = function verify(message) { if (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.eventDataRetention != null && message.hasOwnProperty("eventDataRetention")) - switch (message.eventDataRetention) { - default: - return "eventDataRetention: enum value expected"; - case 0: - case 1: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.resetUserDataOnNewActivity != null && message.hasOwnProperty("resetUserDataOnNewActivity")) - if (typeof message.resetUserDataOnNewActivity !== "boolean") - return "resetUserDataOnNewActivity: boolean expected"; - return null; - }; - - /** - * Creates a DataRetentionSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.admin.v1alpha.DataRetentionSettings - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.DataRetentionSettings} DataRetentionSettings - */ - DataRetentionSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.DataRetentionSettings) - return object; - var message = new $root.google.analytics.admin.v1alpha.DataRetentionSettings(); - if (object.name != null) - message.name = String(object.name); - switch (object.eventDataRetention) { - default: - if (typeof object.eventDataRetention === "number") { - message.eventDataRetention = object.eventDataRetention; - break; - } - break; - case "RETENTION_DURATION_UNSPECIFIED": - case 0: - message.eventDataRetention = 0; - break; - case "TWO_MONTHS": - case 1: - message.eventDataRetention = 1; - break; - case "FOURTEEN_MONTHS": - case 3: - message.eventDataRetention = 3; - break; - case "TWENTY_SIX_MONTHS": - case 4: - message.eventDataRetention = 4; - break; - case "THIRTY_EIGHT_MONTHS": - case 5: - message.eventDataRetention = 5; - break; - case "FIFTY_MONTHS": - case 6: - message.eventDataRetention = 6; - break; + if (message.eventName != null && message.hasOwnProperty("eventName")) + if (!$util.isString(message.eventName)) + return "eventName: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; } - if (object.resetUserDataOnNewActivity != null) - message.resetUserDataOnNewActivity = Boolean(object.resetUserDataOnNewActivity); + if (message.deletable != null && message.hasOwnProperty("deletable")) + if (typeof message.deletable !== "boolean") + return "deletable: boolean expected"; + if (message.custom != null && message.hasOwnProperty("custom")) + if (typeof message.custom !== "boolean") + return "custom: boolean expected"; + return null; + }; + + /** + * Creates a ConversionEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ConversionEvent + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ConversionEvent} ConversionEvent + */ + ConversionEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ConversionEvent) + return object; + var message = new $root.google.analytics.admin.v1alpha.ConversionEvent(); + if (object.name != null) + message.name = String(object.name); + if (object.eventName != null) + message.eventName = String(object.eventName); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ConversionEvent.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.deletable != null) + message.deletable = Boolean(object.deletable); + if (object.custom != null) + message.custom = Boolean(object.custom); return message; }; /** - * Creates a plain object from a DataRetentionSettings message. Also converts values to other types if specified. + * Creates a plain object from a ConversionEvent message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @memberof google.analytics.admin.v1alpha.ConversionEvent * @static - * @param {google.analytics.admin.v1alpha.DataRetentionSettings} message DataRetentionSettings + * @param {google.analytics.admin.v1alpha.ConversionEvent} message ConversionEvent * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DataRetentionSettings.toObject = function toObject(message, options) { + ConversionEvent.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; - object.eventDataRetention = options.enums === String ? "RETENTION_DURATION_UNSPECIFIED" : 0; - object.resetUserDataOnNewActivity = false; + object.eventName = ""; + object.createTime = null; + object.deletable = false; + object.custom = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.eventDataRetention != null && message.hasOwnProperty("eventDataRetention")) - object.eventDataRetention = options.enums === String ? $root.google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration[message.eventDataRetention] === undefined ? message.eventDataRetention : $root.google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration[message.eventDataRetention] : message.eventDataRetention; - if (message.resetUserDataOnNewActivity != null && message.hasOwnProperty("resetUserDataOnNewActivity")) - object.resetUserDataOnNewActivity = message.resetUserDataOnNewActivity; + if (message.eventName != null && message.hasOwnProperty("eventName")) + object.eventName = message.eventName; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.deletable != null && message.hasOwnProperty("deletable")) + object.deletable = message.deletable; + if (message.custom != null && message.hasOwnProperty("custom")) + object.custom = message.custom; return object; }; /** - * Converts this DataRetentionSettings to JSON. + * Converts this ConversionEvent to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @memberof google.analytics.admin.v1alpha.ConversionEvent * @instance * @returns {Object.} JSON object */ - DataRetentionSettings.prototype.toJSON = function toJSON() { + ConversionEvent.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DataRetentionSettings + * Gets the default type url for ConversionEvent * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @memberof google.analytics.admin.v1alpha.ConversionEvent * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DataRetentionSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ConversionEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.DataRetentionSettings"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ConversionEvent"; }; - /** - * RetentionDuration enum. - * @name google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration - * @enum {number} - * @property {number} RETENTION_DURATION_UNSPECIFIED=0 RETENTION_DURATION_UNSPECIFIED value - * @property {number} TWO_MONTHS=1 TWO_MONTHS value - * @property {number} FOURTEEN_MONTHS=3 FOURTEEN_MONTHS value - * @property {number} TWENTY_SIX_MONTHS=4 TWENTY_SIX_MONTHS value - * @property {number} THIRTY_EIGHT_MONTHS=5 THIRTY_EIGHT_MONTHS value - * @property {number} FIFTY_MONTHS=6 FIFTY_MONTHS value - */ - DataRetentionSettings.RetentionDuration = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RETENTION_DURATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "TWO_MONTHS"] = 1; - values[valuesById[3] = "FOURTEEN_MONTHS"] = 3; - values[valuesById[4] = "TWENTY_SIX_MONTHS"] = 4; - values[valuesById[5] = "THIRTY_EIGHT_MONTHS"] = 5; - values[valuesById[6] = "FIFTY_MONTHS"] = 6; - return values; - })(); - - return DataRetentionSettings; + return ConversionEvent; })(); - v1alpha.AttributionSettings = (function() { + v1alpha.GoogleSignalsSettings = (function() { /** - * Properties of an AttributionSettings. + * Properties of a GoogleSignalsSettings. * @memberof google.analytics.admin.v1alpha - * @interface IAttributionSettings - * @property {string|null} [name] AttributionSettings name - * @property {google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow|null} [acquisitionConversionEventLookbackWindow] AttributionSettings acquisitionConversionEventLookbackWindow - * @property {google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow|null} [otherConversionEventLookbackWindow] AttributionSettings otherConversionEventLookbackWindow - * @property {google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel|null} [reportingAttributionModel] AttributionSettings reportingAttributionModel + * @interface IGoogleSignalsSettings + * @property {string|null} [name] GoogleSignalsSettings name + * @property {google.analytics.admin.v1alpha.GoogleSignalsState|null} [state] GoogleSignalsSettings state + * @property {google.analytics.admin.v1alpha.GoogleSignalsConsent|null} [consent] GoogleSignalsSettings consent */ /** - * Constructs a new AttributionSettings. + * Constructs a new GoogleSignalsSettings. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents an AttributionSettings. - * @implements IAttributionSettings + * @classdesc Represents a GoogleSignalsSettings. + * @implements IGoogleSignalsSettings * @constructor - * @param {google.analytics.admin.v1alpha.IAttributionSettings=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IGoogleSignalsSettings=} [properties] Properties to set */ - function AttributionSettings(properties) { + function GoogleSignalsSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -49481,100 +54540,90 @@ } /** - * AttributionSettings name. + * GoogleSignalsSettings name. * @member {string} name - * @memberof google.analytics.admin.v1alpha.AttributionSettings - * @instance - */ - AttributionSettings.prototype.name = ""; - - /** - * AttributionSettings acquisitionConversionEventLookbackWindow. - * @member {google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow} acquisitionConversionEventLookbackWindow - * @memberof google.analytics.admin.v1alpha.AttributionSettings + * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings * @instance */ - AttributionSettings.prototype.acquisitionConversionEventLookbackWindow = 0; + GoogleSignalsSettings.prototype.name = ""; /** - * AttributionSettings otherConversionEventLookbackWindow. - * @member {google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow} otherConversionEventLookbackWindow - * @memberof google.analytics.admin.v1alpha.AttributionSettings + * GoogleSignalsSettings state. + * @member {google.analytics.admin.v1alpha.GoogleSignalsState} state + * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings * @instance */ - AttributionSettings.prototype.otherConversionEventLookbackWindow = 0; + GoogleSignalsSettings.prototype.state = 0; /** - * AttributionSettings reportingAttributionModel. - * @member {google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel} reportingAttributionModel - * @memberof google.analytics.admin.v1alpha.AttributionSettings + * GoogleSignalsSettings consent. + * @member {google.analytics.admin.v1alpha.GoogleSignalsConsent} consent + * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings * @instance */ - AttributionSettings.prototype.reportingAttributionModel = 0; + GoogleSignalsSettings.prototype.consent = 0; /** - * Creates a new AttributionSettings instance using the specified properties. + * Creates a new GoogleSignalsSettings instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.AttributionSettings + * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings * @static - * @param {google.analytics.admin.v1alpha.IAttributionSettings=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AttributionSettings} AttributionSettings instance + * @param {google.analytics.admin.v1alpha.IGoogleSignalsSettings=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GoogleSignalsSettings} GoogleSignalsSettings instance */ - AttributionSettings.create = function create(properties) { - return new AttributionSettings(properties); + GoogleSignalsSettings.create = function create(properties) { + return new GoogleSignalsSettings(properties); }; /** - * Encodes the specified AttributionSettings message. Does not implicitly {@link google.analytics.admin.v1alpha.AttributionSettings.verify|verify} messages. + * Encodes the specified GoogleSignalsSettings message. Does not implicitly {@link google.analytics.admin.v1alpha.GoogleSignalsSettings.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.AttributionSettings + * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings * @static - * @param {google.analytics.admin.v1alpha.IAttributionSettings} message AttributionSettings message or plain object to encode + * @param {google.analytics.admin.v1alpha.IGoogleSignalsSettings} message GoogleSignalsSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AttributionSettings.encode = function encode(message, writer) { + GoogleSignalsSettings.encode = function encode(message, writer) { 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.acquisitionConversionEventLookbackWindow != null && Object.hasOwnProperty.call(message, "acquisitionConversionEventLookbackWindow")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.acquisitionConversionEventLookbackWindow); - if (message.otherConversionEventLookbackWindow != null && Object.hasOwnProperty.call(message, "otherConversionEventLookbackWindow")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.otherConversionEventLookbackWindow); - if (message.reportingAttributionModel != null && Object.hasOwnProperty.call(message, "reportingAttributionModel")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.reportingAttributionModel); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.consent != null && Object.hasOwnProperty.call(message, "consent")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.consent); return writer; }; /** - * Encodes the specified AttributionSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AttributionSettings.verify|verify} messages. + * Encodes the specified GoogleSignalsSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GoogleSignalsSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AttributionSettings + * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings * @static - * @param {google.analytics.admin.v1alpha.IAttributionSettings} message AttributionSettings message or plain object to encode + * @param {google.analytics.admin.v1alpha.IGoogleSignalsSettings} message GoogleSignalsSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AttributionSettings.encodeDelimited = function encodeDelimited(message, writer) { + GoogleSignalsSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AttributionSettings message from the specified reader or buffer. + * Decodes a GoogleSignalsSettings message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.AttributionSettings + * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.AttributionSettings} AttributionSettings + * @returns {google.analytics.admin.v1alpha.GoogleSignalsSettings} GoogleSignalsSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AttributionSettings.decode = function decode(reader, length) { + GoogleSignalsSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AttributionSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GoogleSignalsSettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -49582,16 +54631,12 @@ message.name = reader.string(); break; } - case 2: { - message.acquisitionConversionEventLookbackWindow = reader.int32(); - break; - } case 3: { - message.otherConversionEventLookbackWindow = reader.int32(); + message.state = reader.int32(); break; } case 4: { - message.reportingAttributionModel = reader.int32(); + message.consent = reader.int32(); break; } default: @@ -49603,318 +54648,192 @@ }; /** - * Decodes an AttributionSettings message from the specified reader or buffer, length delimited. + * Decodes a GoogleSignalsSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AttributionSettings + * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AttributionSettings} AttributionSettings + * @returns {google.analytics.admin.v1alpha.GoogleSignalsSettings} GoogleSignalsSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AttributionSettings.decodeDelimited = function decodeDelimited(reader) { + GoogleSignalsSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AttributionSettings message. + * Verifies a GoogleSignalsSettings message. * @function verify - * @memberof google.analytics.admin.v1alpha.AttributionSettings + * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AttributionSettings.verify = function verify(message) { + GoogleSignalsSettings.verify = function verify(message) { if (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.acquisitionConversionEventLookbackWindow != null && message.hasOwnProperty("acquisitionConversionEventLookbackWindow")) - switch (message.acquisitionConversionEventLookbackWindow) { + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { default: - return "acquisitionConversionEventLookbackWindow: enum value expected"; + return "state: enum value expected"; case 0: case 1: case 2: break; } - if (message.otherConversionEventLookbackWindow != null && message.hasOwnProperty("otherConversionEventLookbackWindow")) - switch (message.otherConversionEventLookbackWindow) { + if (message.consent != null && message.hasOwnProperty("consent")) + switch (message.consent) { default: - return "otherConversionEventLookbackWindow: enum value expected"; + return "consent: enum value expected"; case 0: - case 1: case 2: - case 3: - break; - } - if (message.reportingAttributionModel != null && message.hasOwnProperty("reportingAttributionModel")) - switch (message.reportingAttributionModel) { - default: - return "reportingAttributionModel: enum value expected"; - case 0: case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: break; } return null; }; /** - * Creates an AttributionSettings message from a plain object. Also converts values to their respective internal types. + * Creates a GoogleSignalsSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.AttributionSettings + * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AttributionSettings} AttributionSettings + * @returns {google.analytics.admin.v1alpha.GoogleSignalsSettings} GoogleSignalsSettings */ - AttributionSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AttributionSettings) + GoogleSignalsSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GoogleSignalsSettings) return object; - var message = new $root.google.analytics.admin.v1alpha.AttributionSettings(); + var message = new $root.google.analytics.admin.v1alpha.GoogleSignalsSettings(); if (object.name != null) message.name = String(object.name); - switch (object.acquisitionConversionEventLookbackWindow) { + switch (object.state) { default: - if (typeof object.acquisitionConversionEventLookbackWindow === "number") { - message.acquisitionConversionEventLookbackWindow = object.acquisitionConversionEventLookbackWindow; + if (typeof object.state === "number") { + message.state = object.state; break; } break; - case "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED": + case "GOOGLE_SIGNALS_STATE_UNSPECIFIED": case 0: - message.acquisitionConversionEventLookbackWindow = 0; + message.state = 0; break; - case "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_7_DAYS": + case "GOOGLE_SIGNALS_ENABLED": case 1: - message.acquisitionConversionEventLookbackWindow = 1; + message.state = 1; break; - case "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS": + case "GOOGLE_SIGNALS_DISABLED": case 2: - message.acquisitionConversionEventLookbackWindow = 2; + message.state = 2; break; } - switch (object.otherConversionEventLookbackWindow) { + switch (object.consent) { default: - if (typeof object.otherConversionEventLookbackWindow === "number") { - message.otherConversionEventLookbackWindow = object.otherConversionEventLookbackWindow; + if (typeof object.consent === "number") { + message.consent = object.consent; break; } break; - case "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED": + case "GOOGLE_SIGNALS_CONSENT_UNSPECIFIED": case 0: - message.otherConversionEventLookbackWindow = 0; - break; - case "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS": - case 1: - message.otherConversionEventLookbackWindow = 1; + message.consent = 0; break; - case "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_60_DAYS": + case "GOOGLE_SIGNALS_CONSENT_CONSENTED": case 2: - message.otherConversionEventLookbackWindow = 2; - break; - case "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_90_DAYS": - case 3: - message.otherConversionEventLookbackWindow = 3; - break; - } - switch (object.reportingAttributionModel) { - default: - if (typeof object.reportingAttributionModel === "number") { - message.reportingAttributionModel = object.reportingAttributionModel; - break; - } - break; - case "REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED": - case 0: - message.reportingAttributionModel = 0; + message.consent = 2; break; - case "CROSS_CHANNEL_DATA_DRIVEN": + case "GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED": case 1: - message.reportingAttributionModel = 1; - break; - case "CROSS_CHANNEL_LAST_CLICK": - case 2: - message.reportingAttributionModel = 2; - break; - case "CROSS_CHANNEL_FIRST_CLICK": - case 3: - message.reportingAttributionModel = 3; - break; - case "CROSS_CHANNEL_LINEAR": - case 4: - message.reportingAttributionModel = 4; - break; - case "CROSS_CHANNEL_POSITION_BASED": - case 5: - message.reportingAttributionModel = 5; - break; - case "CROSS_CHANNEL_TIME_DECAY": - case 6: - message.reportingAttributionModel = 6; - break; - case "ADS_PREFERRED_LAST_CLICK": - case 7: - message.reportingAttributionModel = 7; + message.consent = 1; break; } return message; }; /** - * Creates a plain object from an AttributionSettings message. Also converts values to other types if specified. + * Creates a plain object from a GoogleSignalsSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.AttributionSettings + * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings * @static - * @param {google.analytics.admin.v1alpha.AttributionSettings} message AttributionSettings + * @param {google.analytics.admin.v1alpha.GoogleSignalsSettings} message GoogleSignalsSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AttributionSettings.toObject = function toObject(message, options) { + GoogleSignalsSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; - object.acquisitionConversionEventLookbackWindow = options.enums === String ? "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED" : 0; - object.otherConversionEventLookbackWindow = options.enums === String ? "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED" : 0; - object.reportingAttributionModel = options.enums === String ? "REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED" : 0; + object.state = options.enums === String ? "GOOGLE_SIGNALS_STATE_UNSPECIFIED" : 0; + object.consent = options.enums === String ? "GOOGLE_SIGNALS_CONSENT_UNSPECIFIED" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.acquisitionConversionEventLookbackWindow != null && message.hasOwnProperty("acquisitionConversionEventLookbackWindow")) - object.acquisitionConversionEventLookbackWindow = options.enums === String ? $root.google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow[message.acquisitionConversionEventLookbackWindow] === undefined ? message.acquisitionConversionEventLookbackWindow : $root.google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow[message.acquisitionConversionEventLookbackWindow] : message.acquisitionConversionEventLookbackWindow; - if (message.otherConversionEventLookbackWindow != null && message.hasOwnProperty("otherConversionEventLookbackWindow")) - object.otherConversionEventLookbackWindow = options.enums === String ? $root.google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow[message.otherConversionEventLookbackWindow] === undefined ? message.otherConversionEventLookbackWindow : $root.google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow[message.otherConversionEventLookbackWindow] : message.otherConversionEventLookbackWindow; - if (message.reportingAttributionModel != null && message.hasOwnProperty("reportingAttributionModel")) - object.reportingAttributionModel = options.enums === String ? $root.google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel[message.reportingAttributionModel] === undefined ? message.reportingAttributionModel : $root.google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel[message.reportingAttributionModel] : message.reportingAttributionModel; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.analytics.admin.v1alpha.GoogleSignalsState[message.state] === undefined ? message.state : $root.google.analytics.admin.v1alpha.GoogleSignalsState[message.state] : message.state; + if (message.consent != null && message.hasOwnProperty("consent")) + object.consent = options.enums === String ? $root.google.analytics.admin.v1alpha.GoogleSignalsConsent[message.consent] === undefined ? message.consent : $root.google.analytics.admin.v1alpha.GoogleSignalsConsent[message.consent] : message.consent; return object; }; /** - * Converts this AttributionSettings to JSON. + * Converts this GoogleSignalsSettings to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.AttributionSettings + * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings * @instance * @returns {Object.} JSON object */ - AttributionSettings.prototype.toJSON = function toJSON() { + GoogleSignalsSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AttributionSettings + * Gets the default type url for GoogleSignalsSettings * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AttributionSettings + * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AttributionSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GoogleSignalsSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AttributionSettings"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GoogleSignalsSettings"; }; - /** - * AcquisitionConversionEventLookbackWindow enum. - * @name google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow - * @enum {number} - * @property {number} ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED=0 ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED value - * @property {number} ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_7_DAYS=1 ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_7_DAYS value - * @property {number} ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS=2 ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS value - */ - AttributionSettings.AcquisitionConversionEventLookbackWindow = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_7_DAYS"] = 1; - values[valuesById[2] = "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS"] = 2; - return values; - })(); - - /** - * OtherConversionEventLookbackWindow enum. - * @name google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow - * @enum {number} - * @property {number} OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED=0 OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED value - * @property {number} OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS=1 OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS value - * @property {number} OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_60_DAYS=2 OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_60_DAYS value - * @property {number} OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_90_DAYS=3 OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_90_DAYS value - */ - AttributionSettings.OtherConversionEventLookbackWindow = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED"] = 0; - values[valuesById[1] = "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS"] = 1; - values[valuesById[2] = "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_60_DAYS"] = 2; - values[valuesById[3] = "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_90_DAYS"] = 3; - return values; - })(); - - /** - * ReportingAttributionModel enum. - * @name google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel - * @enum {number} - * @property {number} REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED=0 REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED value - * @property {number} CROSS_CHANNEL_DATA_DRIVEN=1 CROSS_CHANNEL_DATA_DRIVEN value - * @property {number} CROSS_CHANNEL_LAST_CLICK=2 CROSS_CHANNEL_LAST_CLICK value - * @property {number} CROSS_CHANNEL_FIRST_CLICK=3 CROSS_CHANNEL_FIRST_CLICK value - * @property {number} CROSS_CHANNEL_LINEAR=4 CROSS_CHANNEL_LINEAR value - * @property {number} CROSS_CHANNEL_POSITION_BASED=5 CROSS_CHANNEL_POSITION_BASED value - * @property {number} CROSS_CHANNEL_TIME_DECAY=6 CROSS_CHANNEL_TIME_DECAY value - * @property {number} ADS_PREFERRED_LAST_CLICK=7 ADS_PREFERRED_LAST_CLICK value - */ - AttributionSettings.ReportingAttributionModel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED"] = 0; - values[valuesById[1] = "CROSS_CHANNEL_DATA_DRIVEN"] = 1; - values[valuesById[2] = "CROSS_CHANNEL_LAST_CLICK"] = 2; - values[valuesById[3] = "CROSS_CHANNEL_FIRST_CLICK"] = 3; - values[valuesById[4] = "CROSS_CHANNEL_LINEAR"] = 4; - values[valuesById[5] = "CROSS_CHANNEL_POSITION_BASED"] = 5; - values[valuesById[6] = "CROSS_CHANNEL_TIME_DECAY"] = 6; - values[valuesById[7] = "ADS_PREFERRED_LAST_CLICK"] = 7; - return values; - })(); - - return AttributionSettings; + return GoogleSignalsSettings; })(); - v1alpha.BigQueryLink = (function() { + v1alpha.CustomDimension = (function() { /** - * Properties of a BigQueryLink. + * Properties of a CustomDimension. * @memberof google.analytics.admin.v1alpha - * @interface IBigQueryLink - * @property {string|null} [name] BigQueryLink name - * @property {string|null} [project] BigQueryLink project - * @property {google.protobuf.ITimestamp|null} [createTime] BigQueryLink createTime - * @property {boolean|null} [dailyExportEnabled] BigQueryLink dailyExportEnabled - * @property {boolean|null} [streamingExportEnabled] BigQueryLink streamingExportEnabled - * @property {boolean|null} [includeAdvertisingId] BigQueryLink includeAdvertisingId - * @property {Array.|null} [exportStreams] BigQueryLink exportStreams - * @property {Array.|null} [excludedEvents] BigQueryLink excludedEvents + * @interface ICustomDimension + * @property {string|null} [name] CustomDimension name + * @property {string|null} [parameterName] CustomDimension parameterName + * @property {string|null} [displayName] CustomDimension displayName + * @property {string|null} [description] CustomDimension description + * @property {google.analytics.admin.v1alpha.CustomDimension.DimensionScope|null} [scope] CustomDimension scope + * @property {boolean|null} [disallowAdsPersonalization] CustomDimension disallowAdsPersonalization */ /** - * Constructs a new BigQueryLink. + * Constructs a new CustomDimension. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a BigQueryLink. - * @implements IBigQueryLink + * @classdesc Represents a CustomDimension. + * @implements ICustomDimension * @constructor - * @param {google.analytics.admin.v1alpha.IBigQueryLink=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.ICustomDimension=} [properties] Properties to set */ - function BigQueryLink(properties) { - this.exportStreams = []; - this.excludedEvents = []; + function CustomDimension(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -49922,142 +54841,120 @@ } /** - * BigQueryLink name. + * CustomDimension name. * @member {string} name - * @memberof google.analytics.admin.v1alpha.BigQueryLink - * @instance - */ - BigQueryLink.prototype.name = ""; - - /** - * BigQueryLink project. - * @member {string} project - * @memberof google.analytics.admin.v1alpha.BigQueryLink - * @instance - */ - BigQueryLink.prototype.project = ""; - - /** - * BigQueryLink createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.analytics.admin.v1alpha.BigQueryLink + * @memberof google.analytics.admin.v1alpha.CustomDimension * @instance */ - BigQueryLink.prototype.createTime = null; + CustomDimension.prototype.name = ""; /** - * BigQueryLink dailyExportEnabled. - * @member {boolean} dailyExportEnabled - * @memberof google.analytics.admin.v1alpha.BigQueryLink + * CustomDimension parameterName. + * @member {string} parameterName + * @memberof google.analytics.admin.v1alpha.CustomDimension * @instance */ - BigQueryLink.prototype.dailyExportEnabled = false; + CustomDimension.prototype.parameterName = ""; /** - * BigQueryLink streamingExportEnabled. - * @member {boolean} streamingExportEnabled - * @memberof google.analytics.admin.v1alpha.BigQueryLink + * CustomDimension displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1alpha.CustomDimension * @instance */ - BigQueryLink.prototype.streamingExportEnabled = false; + CustomDimension.prototype.displayName = ""; /** - * BigQueryLink includeAdvertisingId. - * @member {boolean} includeAdvertisingId - * @memberof google.analytics.admin.v1alpha.BigQueryLink + * CustomDimension description. + * @member {string} description + * @memberof google.analytics.admin.v1alpha.CustomDimension * @instance */ - BigQueryLink.prototype.includeAdvertisingId = false; + CustomDimension.prototype.description = ""; /** - * BigQueryLink exportStreams. - * @member {Array.} exportStreams - * @memberof google.analytics.admin.v1alpha.BigQueryLink + * CustomDimension scope. + * @member {google.analytics.admin.v1alpha.CustomDimension.DimensionScope} scope + * @memberof google.analytics.admin.v1alpha.CustomDimension * @instance */ - BigQueryLink.prototype.exportStreams = $util.emptyArray; + CustomDimension.prototype.scope = 0; /** - * BigQueryLink excludedEvents. - * @member {Array.} excludedEvents - * @memberof google.analytics.admin.v1alpha.BigQueryLink + * CustomDimension disallowAdsPersonalization. + * @member {boolean} disallowAdsPersonalization + * @memberof google.analytics.admin.v1alpha.CustomDimension * @instance */ - BigQueryLink.prototype.excludedEvents = $util.emptyArray; + CustomDimension.prototype.disallowAdsPersonalization = false; /** - * Creates a new BigQueryLink instance using the specified properties. + * Creates a new CustomDimension instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.BigQueryLink + * @memberof google.analytics.admin.v1alpha.CustomDimension * @static - * @param {google.analytics.admin.v1alpha.IBigQueryLink=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.BigQueryLink} BigQueryLink instance + * @param {google.analytics.admin.v1alpha.ICustomDimension=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.CustomDimension} CustomDimension instance */ - BigQueryLink.create = function create(properties) { - return new BigQueryLink(properties); + CustomDimension.create = function create(properties) { + return new CustomDimension(properties); }; /** - * Encodes the specified BigQueryLink message. Does not implicitly {@link google.analytics.admin.v1alpha.BigQueryLink.verify|verify} messages. + * Encodes the specified CustomDimension message. Does not implicitly {@link google.analytics.admin.v1alpha.CustomDimension.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.BigQueryLink + * @memberof google.analytics.admin.v1alpha.CustomDimension * @static - * @param {google.analytics.admin.v1alpha.IBigQueryLink} message BigQueryLink message or plain object to encode + * @param {google.analytics.admin.v1alpha.ICustomDimension} message CustomDimension message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryLink.encode = function encode(message, writer) { + CustomDimension.encode = function encode(message, writer) { 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.project != null && Object.hasOwnProperty.call(message, "project")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.project); - 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.dailyExportEnabled != null && Object.hasOwnProperty.call(message, "dailyExportEnabled")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.dailyExportEnabled); - if (message.streamingExportEnabled != null && Object.hasOwnProperty.call(message, "streamingExportEnabled")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.streamingExportEnabled); - if (message.includeAdvertisingId != null && Object.hasOwnProperty.call(message, "includeAdvertisingId")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.includeAdvertisingId); - if (message.exportStreams != null && message.exportStreams.length) - for (var i = 0; i < message.exportStreams.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.exportStreams[i]); - if (message.excludedEvents != null && message.excludedEvents.length) - for (var i = 0; i < message.excludedEvents.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.excludedEvents[i]); + if (message.parameterName != null && Object.hasOwnProperty.call(message, "parameterName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.parameterName); + 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.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.scope); + if (message.disallowAdsPersonalization != null && Object.hasOwnProperty.call(message, "disallowAdsPersonalization")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.disallowAdsPersonalization); return writer; }; /** - * Encodes the specified BigQueryLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BigQueryLink.verify|verify} messages. + * Encodes the specified CustomDimension message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CustomDimension.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.BigQueryLink + * @memberof google.analytics.admin.v1alpha.CustomDimension * @static - * @param {google.analytics.admin.v1alpha.IBigQueryLink} message BigQueryLink message or plain object to encode + * @param {google.analytics.admin.v1alpha.ICustomDimension} message CustomDimension message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryLink.encodeDelimited = function encodeDelimited(message, writer) { + CustomDimension.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigQueryLink message from the specified reader or buffer. + * Decodes a CustomDimension message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.BigQueryLink + * @memberof google.analytics.admin.v1alpha.CustomDimension * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.BigQueryLink} BigQueryLink + * @returns {google.analytics.admin.v1alpha.CustomDimension} CustomDimension * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryLink.decode = function decode(reader, length) { + CustomDimension.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.BigQueryLink(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.CustomDimension(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -50066,35 +54963,23 @@ break; } case 2: { - message.project = reader.string(); + message.parameterName = reader.string(); break; } case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.displayName = reader.string(); break; } case 4: { - message.dailyExportEnabled = reader.bool(); + message.description = reader.string(); break; } case 5: { - message.streamingExportEnabled = reader.bool(); + message.scope = reader.int32(); break; } case 6: { - message.includeAdvertisingId = reader.bool(); - break; - } - case 7: { - if (!(message.exportStreams && message.exportStreams.length)) - message.exportStreams = []; - message.exportStreams.push(reader.string()); - break; - } - case 8: { - if (!(message.excludedEvents && message.excludedEvents.length)) - message.excludedEvents = []; - message.excludedEvents.push(reader.string()); + message.disallowAdsPersonalization = reader.bool(); break; } default: @@ -50106,212 +54991,210 @@ }; /** - * Decodes a BigQueryLink message from the specified reader or buffer, length delimited. + * Decodes a CustomDimension message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.BigQueryLink + * @memberof google.analytics.admin.v1alpha.CustomDimension * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.BigQueryLink} BigQueryLink + * @returns {google.analytics.admin.v1alpha.CustomDimension} CustomDimension * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryLink.decodeDelimited = function decodeDelimited(reader) { + CustomDimension.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigQueryLink message. + * Verifies a CustomDimension message. * @function verify - * @memberof google.analytics.admin.v1alpha.BigQueryLink + * @memberof google.analytics.admin.v1alpha.CustomDimension * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BigQueryLink.verify = function verify(message) { + CustomDimension.verify = function verify(message) { if (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.project != null && message.hasOwnProperty("project")) - if (!$util.isString(message.project)) - return "project: 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.dailyExportEnabled != null && message.hasOwnProperty("dailyExportEnabled")) - if (typeof message.dailyExportEnabled !== "boolean") - return "dailyExportEnabled: boolean expected"; - if (message.streamingExportEnabled != null && message.hasOwnProperty("streamingExportEnabled")) - if (typeof message.streamingExportEnabled !== "boolean") - return "streamingExportEnabled: boolean expected"; - if (message.includeAdvertisingId != null && message.hasOwnProperty("includeAdvertisingId")) - if (typeof message.includeAdvertisingId !== "boolean") - return "includeAdvertisingId: boolean expected"; - if (message.exportStreams != null && message.hasOwnProperty("exportStreams")) { - if (!Array.isArray(message.exportStreams)) - return "exportStreams: array expected"; - for (var i = 0; i < message.exportStreams.length; ++i) - if (!$util.isString(message.exportStreams[i])) - return "exportStreams: string[] expected"; - } - if (message.excludedEvents != null && message.hasOwnProperty("excludedEvents")) { - if (!Array.isArray(message.excludedEvents)) - return "excludedEvents: array expected"; - for (var i = 0; i < message.excludedEvents.length; ++i) - if (!$util.isString(message.excludedEvents[i])) - return "excludedEvents: string[] expected"; - } + if (message.parameterName != null && message.hasOwnProperty("parameterName")) + if (!$util.isString(message.parameterName)) + return "parameterName: 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.scope != null && message.hasOwnProperty("scope")) + switch (message.scope) { + default: + return "scope: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.disallowAdsPersonalization != null && message.hasOwnProperty("disallowAdsPersonalization")) + if (typeof message.disallowAdsPersonalization !== "boolean") + return "disallowAdsPersonalization: boolean expected"; return null; }; /** - * Creates a BigQueryLink message from a plain object. Also converts values to their respective internal types. + * Creates a CustomDimension message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.BigQueryLink + * @memberof google.analytics.admin.v1alpha.CustomDimension * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.BigQueryLink} BigQueryLink + * @returns {google.analytics.admin.v1alpha.CustomDimension} CustomDimension */ - BigQueryLink.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.BigQueryLink) + CustomDimension.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.CustomDimension) return object; - var message = new $root.google.analytics.admin.v1alpha.BigQueryLink(); + var message = new $root.google.analytics.admin.v1alpha.CustomDimension(); if (object.name != null) message.name = String(object.name); - if (object.project != null) - message.project = String(object.project); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.analytics.admin.v1alpha.BigQueryLink.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.dailyExportEnabled != null) - message.dailyExportEnabled = Boolean(object.dailyExportEnabled); - if (object.streamingExportEnabled != null) - message.streamingExportEnabled = Boolean(object.streamingExportEnabled); - if (object.includeAdvertisingId != null) - message.includeAdvertisingId = Boolean(object.includeAdvertisingId); - if (object.exportStreams) { - if (!Array.isArray(object.exportStreams)) - throw TypeError(".google.analytics.admin.v1alpha.BigQueryLink.exportStreams: array expected"); - message.exportStreams = []; - for (var i = 0; i < object.exportStreams.length; ++i) - message.exportStreams[i] = String(object.exportStreams[i]); - } - if (object.excludedEvents) { - if (!Array.isArray(object.excludedEvents)) - throw TypeError(".google.analytics.admin.v1alpha.BigQueryLink.excludedEvents: array expected"); - message.excludedEvents = []; - for (var i = 0; i < object.excludedEvents.length; ++i) - message.excludedEvents[i] = String(object.excludedEvents[i]); + if (object.parameterName != null) + message.parameterName = String(object.parameterName); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + switch (object.scope) { + default: + if (typeof object.scope === "number") { + message.scope = object.scope; + break; + } + break; + case "DIMENSION_SCOPE_UNSPECIFIED": + case 0: + message.scope = 0; + break; + case "EVENT": + case 1: + message.scope = 1; + break; + case "USER": + case 2: + message.scope = 2; + break; } + if (object.disallowAdsPersonalization != null) + message.disallowAdsPersonalization = Boolean(object.disallowAdsPersonalization); return message; }; /** - * Creates a plain object from a BigQueryLink message. Also converts values to other types if specified. + * Creates a plain object from a CustomDimension message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.BigQueryLink + * @memberof google.analytics.admin.v1alpha.CustomDimension * @static - * @param {google.analytics.admin.v1alpha.BigQueryLink} message BigQueryLink + * @param {google.analytics.admin.v1alpha.CustomDimension} message CustomDimension * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigQueryLink.toObject = function toObject(message, options) { + CustomDimension.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.exportStreams = []; - object.excludedEvents = []; - } if (options.defaults) { object.name = ""; - object.project = ""; - object.createTime = null; - object.dailyExportEnabled = false; - object.streamingExportEnabled = false; - object.includeAdvertisingId = false; + object.parameterName = ""; + object.displayName = ""; + object.description = ""; + object.scope = options.enums === String ? "DIMENSION_SCOPE_UNSPECIFIED" : 0; + object.disallowAdsPersonalization = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.project != null && message.hasOwnProperty("project")) - object.project = message.project; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.dailyExportEnabled != null && message.hasOwnProperty("dailyExportEnabled")) - object.dailyExportEnabled = message.dailyExportEnabled; - if (message.streamingExportEnabled != null && message.hasOwnProperty("streamingExportEnabled")) - object.streamingExportEnabled = message.streamingExportEnabled; - if (message.includeAdvertisingId != null && message.hasOwnProperty("includeAdvertisingId")) - object.includeAdvertisingId = message.includeAdvertisingId; - if (message.exportStreams && message.exportStreams.length) { - object.exportStreams = []; - for (var j = 0; j < message.exportStreams.length; ++j) - object.exportStreams[j] = message.exportStreams[j]; - } - if (message.excludedEvents && message.excludedEvents.length) { - object.excludedEvents = []; - for (var j = 0; j < message.excludedEvents.length; ++j) - object.excludedEvents[j] = message.excludedEvents[j]; - } + if (message.parameterName != null && message.hasOwnProperty("parameterName")) + object.parameterName = message.parameterName; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.CustomDimension.DimensionScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1alpha.CustomDimension.DimensionScope[message.scope] : message.scope; + if (message.disallowAdsPersonalization != null && message.hasOwnProperty("disallowAdsPersonalization")) + object.disallowAdsPersonalization = message.disallowAdsPersonalization; return object; }; /** - * Converts this BigQueryLink to JSON. + * Converts this CustomDimension to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.BigQueryLink + * @memberof google.analytics.admin.v1alpha.CustomDimension * @instance * @returns {Object.} JSON object */ - BigQueryLink.prototype.toJSON = function toJSON() { + CustomDimension.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BigQueryLink + * Gets the default type url for CustomDimension * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.BigQueryLink + * @memberof google.analytics.admin.v1alpha.CustomDimension * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BigQueryLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CustomDimension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.BigQueryLink"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.CustomDimension"; }; - return BigQueryLink; + /** + * DimensionScope enum. + * @name google.analytics.admin.v1alpha.CustomDimension.DimensionScope + * @enum {number} + * @property {number} DIMENSION_SCOPE_UNSPECIFIED=0 DIMENSION_SCOPE_UNSPECIFIED value + * @property {number} EVENT=1 EVENT value + * @property {number} USER=2 USER value + */ + CustomDimension.DimensionScope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DIMENSION_SCOPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EVENT"] = 1; + values[valuesById[2] = "USER"] = 2; + return values; + })(); + + return CustomDimension; })(); - v1alpha.ExpandedDataSetFilter = (function() { + v1alpha.CustomMetric = (function() { /** - * Properties of an ExpandedDataSetFilter. + * Properties of a CustomMetric. * @memberof google.analytics.admin.v1alpha - * @interface IExpandedDataSetFilter - * @property {google.analytics.admin.v1alpha.ExpandedDataSetFilter.IStringFilter|null} [stringFilter] ExpandedDataSetFilter stringFilter - * @property {google.analytics.admin.v1alpha.ExpandedDataSetFilter.IInListFilter|null} [inListFilter] ExpandedDataSetFilter inListFilter - * @property {string|null} [fieldName] ExpandedDataSetFilter fieldName + * @interface ICustomMetric + * @property {string|null} [name] CustomMetric name + * @property {string|null} [parameterName] CustomMetric parameterName + * @property {string|null} [displayName] CustomMetric displayName + * @property {string|null} [description] CustomMetric description + * @property {google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit|null} [measurementUnit] CustomMetric measurementUnit + * @property {google.analytics.admin.v1alpha.CustomMetric.MetricScope|null} [scope] CustomMetric scope + * @property {Array.|null} [restrictedMetricType] CustomMetric restrictedMetricType */ /** - * Constructs a new ExpandedDataSetFilter. + * Constructs a new CustomMetric. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents an ExpandedDataSetFilter. - * @implements IExpandedDataSetFilter + * @classdesc Represents a CustomMetric. + * @implements ICustomMetric * @constructor - * @param {google.analytics.admin.v1alpha.IExpandedDataSetFilter=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.ICustomMetric=} [properties] Properties to set */ - function ExpandedDataSetFilter(properties) { + function CustomMetric(properties) { + this.restrictedMetricType = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -50319,117 +55202,170 @@ } /** - * ExpandedDataSetFilter stringFilter. - * @member {google.analytics.admin.v1alpha.ExpandedDataSetFilter.IStringFilter|null|undefined} stringFilter - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter + * CustomMetric name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.CustomMetric * @instance */ - ExpandedDataSetFilter.prototype.stringFilter = null; + CustomMetric.prototype.name = ""; /** - * ExpandedDataSetFilter inListFilter. - * @member {google.analytics.admin.v1alpha.ExpandedDataSetFilter.IInListFilter|null|undefined} inListFilter - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter + * CustomMetric parameterName. + * @member {string} parameterName + * @memberof google.analytics.admin.v1alpha.CustomMetric * @instance */ - ExpandedDataSetFilter.prototype.inListFilter = null; + CustomMetric.prototype.parameterName = ""; /** - * ExpandedDataSetFilter fieldName. - * @member {string} fieldName - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter + * CustomMetric displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1alpha.CustomMetric * @instance */ - ExpandedDataSetFilter.prototype.fieldName = ""; + CustomMetric.prototype.displayName = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * CustomMetric description. + * @member {string} description + * @memberof google.analytics.admin.v1alpha.CustomMetric + * @instance + */ + CustomMetric.prototype.description = ""; /** - * ExpandedDataSetFilter oneFilter. - * @member {"stringFilter"|"inListFilter"|undefined} oneFilter - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter + * CustomMetric measurementUnit. + * @member {google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit} measurementUnit + * @memberof google.analytics.admin.v1alpha.CustomMetric * @instance */ - Object.defineProperty(ExpandedDataSetFilter.prototype, "oneFilter", { - get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); + CustomMetric.prototype.measurementUnit = 0; /** - * Creates a new ExpandedDataSetFilter instance using the specified properties. + * CustomMetric scope. + * @member {google.analytics.admin.v1alpha.CustomMetric.MetricScope} scope + * @memberof google.analytics.admin.v1alpha.CustomMetric + * @instance + */ + CustomMetric.prototype.scope = 0; + + /** + * CustomMetric restrictedMetricType. + * @member {Array.} restrictedMetricType + * @memberof google.analytics.admin.v1alpha.CustomMetric + * @instance + */ + CustomMetric.prototype.restrictedMetricType = $util.emptyArray; + + /** + * Creates a new CustomMetric instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter + * @memberof google.analytics.admin.v1alpha.CustomMetric * @static - * @param {google.analytics.admin.v1alpha.IExpandedDataSetFilter=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilter} ExpandedDataSetFilter instance + * @param {google.analytics.admin.v1alpha.ICustomMetric=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.CustomMetric} CustomMetric instance */ - ExpandedDataSetFilter.create = function create(properties) { - return new ExpandedDataSetFilter(properties); + CustomMetric.create = function create(properties) { + return new CustomMetric(properties); }; /** - * Encodes the specified ExpandedDataSetFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilter.verify|verify} messages. + * Encodes the specified CustomMetric message. Does not implicitly {@link google.analytics.admin.v1alpha.CustomMetric.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter + * @memberof google.analytics.admin.v1alpha.CustomMetric * @static - * @param {google.analytics.admin.v1alpha.IExpandedDataSetFilter} message ExpandedDataSetFilter message or plain object to encode + * @param {google.analytics.admin.v1alpha.ICustomMetric} message CustomMetric message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExpandedDataSetFilter.encode = function encode(message, writer) { + CustomMetric.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); - if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) - $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.encode(message.stringFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) - $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter.encode(message.inListFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parameterName != null && Object.hasOwnProperty.call(message, "parameterName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.parameterName); + 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.measurementUnit != null && Object.hasOwnProperty.call(message, "measurementUnit")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.measurementUnit); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.scope); + if (message.restrictedMetricType != null && message.restrictedMetricType.length) { + writer.uint32(/* id 8, wireType 2 =*/66).fork(); + for (var i = 0; i < message.restrictedMetricType.length; ++i) + writer.int32(message.restrictedMetricType[i]); + writer.ldelim(); + } return writer; }; /** - * Encodes the specified ExpandedDataSetFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilter.verify|verify} messages. + * Encodes the specified CustomMetric message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CustomMetric.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter + * @memberof google.analytics.admin.v1alpha.CustomMetric * @static - * @param {google.analytics.admin.v1alpha.IExpandedDataSetFilter} message ExpandedDataSetFilter message or plain object to encode + * @param {google.analytics.admin.v1alpha.ICustomMetric} message CustomMetric message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExpandedDataSetFilter.encodeDelimited = function encodeDelimited(message, writer) { + CustomMetric.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExpandedDataSetFilter message from the specified reader or buffer. + * Decodes a CustomMetric message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter + * @memberof google.analytics.admin.v1alpha.CustomMetric * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilter} ExpandedDataSetFilter + * @returns {google.analytics.admin.v1alpha.CustomMetric} CustomMetric * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExpandedDataSetFilter.decode = function decode(reader, length) { + CustomMetric.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.CustomMetric(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } case 2: { - message.stringFilter = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.decode(reader, reader.uint32()); + message.parameterName = reader.string(); break; } case 3: { - message.inListFilter = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter.decode(reader, reader.uint32()); + message.displayName = reader.string(); break; } - case 1: { - message.fieldName = reader.string(); + case 4: { + message.description = reader.string(); + break; + } + case 5: { + message.measurementUnit = reader.int32(); + break; + } + case 6: { + message.scope = reader.int32(); + break; + } + case 8: { + if (!(message.restrictedMetricType && message.restrictedMetricType.length)) + message.restrictedMetricType = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.restrictedMetricType.push(reader.int32()); + } else + message.restrictedMetricType.push(reader.int32()); break; } default: @@ -50441,696 +55377,667 @@ }; /** - * Decodes an ExpandedDataSetFilter message from the specified reader or buffer, length delimited. + * Decodes a CustomMetric message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter + * @memberof google.analytics.admin.v1alpha.CustomMetric * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilter} ExpandedDataSetFilter + * @returns {google.analytics.admin.v1alpha.CustomMetric} CustomMetric * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExpandedDataSetFilter.decodeDelimited = function decodeDelimited(reader) { + CustomMetric.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExpandedDataSetFilter message. + * Verifies a CustomMetric message. * @function verify - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter + * @memberof google.analytics.admin.v1alpha.CustomMetric * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExpandedDataSetFilter.verify = function verify(message) { + CustomMetric.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { - properties.oneFilter = 1; - { - var error = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.verify(message.stringFilter); - if (error) - return "stringFilter." + error; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.parameterName != null && message.hasOwnProperty("parameterName")) + if (!$util.isString(message.parameterName)) + return "parameterName: 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.measurementUnit != null && message.hasOwnProperty("measurementUnit")) + switch (message.measurementUnit) { + default: + return "measurementUnit: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + break; } - } - if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter.verify(message.inListFilter); - if (error) - return "inListFilter." + error; + if (message.scope != null && message.hasOwnProperty("scope")) + switch (message.scope) { + default: + return "scope: enum value expected"; + case 0: + case 1: + break; } + if (message.restrictedMetricType != null && message.hasOwnProperty("restrictedMetricType")) { + if (!Array.isArray(message.restrictedMetricType)) + return "restrictedMetricType: array expected"; + for (var i = 0; i < message.restrictedMetricType.length; ++i) + switch (message.restrictedMetricType[i]) { + default: + return "restrictedMetricType: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } } - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - if (!$util.isString(message.fieldName)) - return "fieldName: string expected"; return null; }; /** - * Creates an ExpandedDataSetFilter message from a plain object. Also converts values to their respective internal types. + * Creates a CustomMetric message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter + * @memberof google.analytics.admin.v1alpha.CustomMetric * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilter} ExpandedDataSetFilter + * @returns {google.analytics.admin.v1alpha.CustomMetric} CustomMetric */ - ExpandedDataSetFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter) + CustomMetric.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.CustomMetric) return object; - var message = new $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter(); - if (object.stringFilter != null) { - if (typeof object.stringFilter !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ExpandedDataSetFilter.stringFilter: object expected"); - message.stringFilter = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.fromObject(object.stringFilter); + var message = new $root.google.analytics.admin.v1alpha.CustomMetric(); + if (object.name != null) + message.name = String(object.name); + if (object.parameterName != null) + message.parameterName = String(object.parameterName); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + switch (object.measurementUnit) { + default: + if (typeof object.measurementUnit === "number") { + message.measurementUnit = object.measurementUnit; + break; + } + break; + case "MEASUREMENT_UNIT_UNSPECIFIED": + case 0: + message.measurementUnit = 0; + break; + case "STANDARD": + case 1: + message.measurementUnit = 1; + break; + case "CURRENCY": + case 2: + message.measurementUnit = 2; + break; + case "FEET": + case 3: + message.measurementUnit = 3; + break; + case "METERS": + case 4: + message.measurementUnit = 4; + break; + case "KILOMETERS": + case 5: + message.measurementUnit = 5; + break; + case "MILES": + case 6: + message.measurementUnit = 6; + break; + case "MILLISECONDS": + case 7: + message.measurementUnit = 7; + break; + case "SECONDS": + case 8: + message.measurementUnit = 8; + break; + case "MINUTES": + case 9: + message.measurementUnit = 9; + break; + case "HOURS": + case 10: + message.measurementUnit = 10; + break; } - if (object.inListFilter != null) { - if (typeof object.inListFilter !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ExpandedDataSetFilter.inListFilter: object expected"); - message.inListFilter = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter.fromObject(object.inListFilter); + switch (object.scope) { + default: + if (typeof object.scope === "number") { + message.scope = object.scope; + break; + } + break; + case "METRIC_SCOPE_UNSPECIFIED": + case 0: + message.scope = 0; + break; + case "EVENT": + case 1: + message.scope = 1; + break; + } + if (object.restrictedMetricType) { + if (!Array.isArray(object.restrictedMetricType)) + throw TypeError(".google.analytics.admin.v1alpha.CustomMetric.restrictedMetricType: array expected"); + message.restrictedMetricType = []; + for (var i = 0; i < object.restrictedMetricType.length; ++i) + switch (object.restrictedMetricType[i]) { + default: + if (typeof object.restrictedMetricType[i] === "number") { + message.restrictedMetricType[i] = object.restrictedMetricType[i]; + break; + } + case "RESTRICTED_METRIC_TYPE_UNSPECIFIED": + case 0: + message.restrictedMetricType[i] = 0; + break; + case "COST_DATA": + case 1: + message.restrictedMetricType[i] = 1; + break; + case "REVENUE_DATA": + case 2: + message.restrictedMetricType[i] = 2; + break; + } } - if (object.fieldName != null) - message.fieldName = String(object.fieldName); return message; }; /** - * Creates a plain object from an ExpandedDataSetFilter message. Also converts values to other types if specified. + * Creates a plain object from a CustomMetric message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter + * @memberof google.analytics.admin.v1alpha.CustomMetric * @static - * @param {google.analytics.admin.v1alpha.ExpandedDataSetFilter} message ExpandedDataSetFilter + * @param {google.analytics.admin.v1alpha.CustomMetric} message CustomMetric * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExpandedDataSetFilter.toObject = function toObject(message, options) { + CustomMetric.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.fieldName = ""; - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - object.fieldName = message.fieldName; - if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { - object.stringFilter = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.toObject(message.stringFilter, options); - if (options.oneofs) - object.oneFilter = "stringFilter"; + if (options.arrays || options.defaults) + object.restrictedMetricType = []; + if (options.defaults) { + object.name = ""; + object.parameterName = ""; + object.displayName = ""; + object.description = ""; + object.measurementUnit = options.enums === String ? "MEASUREMENT_UNIT_UNSPECIFIED" : 0; + object.scope = options.enums === String ? "METRIC_SCOPE_UNSPECIFIED" : 0; } - if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { - object.inListFilter = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter.toObject(message.inListFilter, options); - if (options.oneofs) - object.oneFilter = "inListFilter"; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.parameterName != null && message.hasOwnProperty("parameterName")) + object.parameterName = message.parameterName; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.measurementUnit != null && message.hasOwnProperty("measurementUnit")) + object.measurementUnit = options.enums === String ? $root.google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit[message.measurementUnit] === undefined ? message.measurementUnit : $root.google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit[message.measurementUnit] : message.measurementUnit; + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.CustomMetric.MetricScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1alpha.CustomMetric.MetricScope[message.scope] : message.scope; + if (message.restrictedMetricType && message.restrictedMetricType.length) { + object.restrictedMetricType = []; + for (var j = 0; j < message.restrictedMetricType.length; ++j) + object.restrictedMetricType[j] = options.enums === String ? $root.google.analytics.admin.v1alpha.CustomMetric.RestrictedMetricType[message.restrictedMetricType[j]] === undefined ? message.restrictedMetricType[j] : $root.google.analytics.admin.v1alpha.CustomMetric.RestrictedMetricType[message.restrictedMetricType[j]] : message.restrictedMetricType[j]; } return object; }; /** - * Converts this ExpandedDataSetFilter to JSON. + * Converts this CustomMetric to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter + * @memberof google.analytics.admin.v1alpha.CustomMetric * @instance * @returns {Object.} JSON object */ - ExpandedDataSetFilter.prototype.toJSON = function toJSON() { + CustomMetric.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExpandedDataSetFilter + * Gets the default type url for CustomMetric * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter + * @memberof google.analytics.admin.v1alpha.CustomMetric * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExpandedDataSetFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.ExpandedDataSetFilter"; - }; - - ExpandedDataSetFilter.StringFilter = (function() { - - /** - * Properties of a StringFilter. - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter - * @interface IStringFilter - * @property {google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.MatchType|null} [matchType] StringFilter matchType - * @property {string|null} [value] StringFilter value - * @property {boolean|null} [caseSensitive] StringFilter caseSensitive - */ - - /** - * Constructs a new StringFilter. - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter - * @classdesc Represents a StringFilter. - * @implements IStringFilter - * @constructor - * @param {google.analytics.admin.v1alpha.ExpandedDataSetFilter.IStringFilter=} [properties] Properties to set - */ - function StringFilter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StringFilter matchType. - * @member {google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.MatchType} matchType - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter - * @instance - */ - StringFilter.prototype.matchType = 0; - - /** - * StringFilter value. - * @member {string} value - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter - * @instance - */ - StringFilter.prototype.value = ""; - - /** - * StringFilter caseSensitive. - * @member {boolean} caseSensitive - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter - * @instance - */ - StringFilter.prototype.caseSensitive = false; - - /** - * Creates a new StringFilter instance using the specified properties. - * @function create - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter - * @static - * @param {google.analytics.admin.v1alpha.ExpandedDataSetFilter.IStringFilter=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter} StringFilter instance - */ - StringFilter.create = function create(properties) { - return new StringFilter(properties); - }; - - /** - * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.verify|verify} messages. - * @function encode - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter - * @static - * @param {google.analytics.admin.v1alpha.ExpandedDataSetFilter.IStringFilter} message StringFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.matchType != null && Object.hasOwnProperty.call(message, "matchType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.matchType); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.caseSensitive); - return writer; - }; - - /** - * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter - * @static - * @param {google.analytics.admin.v1alpha.ExpandedDataSetFilter.IStringFilter} message StringFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StringFilter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter} StringFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringFilter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.matchType = reader.int32(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - case 3: { - message.caseSensitive = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StringFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter} StringFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StringFilter message. - * @function verify - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StringFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.matchType != null && message.hasOwnProperty("matchType")) - switch (message.matchType) { - default: - return "matchType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) - if (typeof message.caseSensitive !== "boolean") - return "caseSensitive: boolean expected"; - return null; - }; - - /** - * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter} StringFilter - */ - StringFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter) - return object; - var message = new $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter(); - switch (object.matchType) { - default: - if (typeof object.matchType === "number") { - message.matchType = object.matchType; - break; - } - break; - case "MATCH_TYPE_UNSPECIFIED": - case 0: - message.matchType = 0; - break; - case "EXACT": - case 1: - message.matchType = 1; - break; - case "CONTAINS": - case 2: - message.matchType = 2; - break; - } - if (object.value != null) - message.value = String(object.value); - if (object.caseSensitive != null) - message.caseSensitive = Boolean(object.caseSensitive); - return message; - }; - - /** - * Creates a plain object from a StringFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter - * @static - * @param {google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter} message StringFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StringFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.matchType = options.enums === String ? "MATCH_TYPE_UNSPECIFIED" : 0; - object.value = ""; - object.caseSensitive = false; - } - if (message.matchType != null && message.hasOwnProperty("matchType")) - object.matchType = options.enums === String ? $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.MatchType[message.matchType] === undefined ? message.matchType : $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.MatchType[message.matchType] : message.matchType; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) - object.caseSensitive = message.caseSensitive; - return object; - }; - - /** - * Converts this StringFilter to JSON. - * @function toJSON - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter - * @instance - * @returns {Object.} JSON object - */ - StringFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + CustomMetric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.CustomMetric"; + }; - /** - * Gets the default type url for StringFilter - * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StringFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter"; - }; + /** + * MeasurementUnit enum. + * @name google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit + * @enum {number} + * @property {number} MEASUREMENT_UNIT_UNSPECIFIED=0 MEASUREMENT_UNIT_UNSPECIFIED value + * @property {number} STANDARD=1 STANDARD value + * @property {number} CURRENCY=2 CURRENCY value + * @property {number} FEET=3 FEET value + * @property {number} METERS=4 METERS value + * @property {number} KILOMETERS=5 KILOMETERS value + * @property {number} MILES=6 MILES value + * @property {number} MILLISECONDS=7 MILLISECONDS value + * @property {number} SECONDS=8 SECONDS value + * @property {number} MINUTES=9 MINUTES value + * @property {number} HOURS=10 HOURS value + */ + CustomMetric.MeasurementUnit = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MEASUREMENT_UNIT_UNSPECIFIED"] = 0; + values[valuesById[1] = "STANDARD"] = 1; + values[valuesById[2] = "CURRENCY"] = 2; + values[valuesById[3] = "FEET"] = 3; + values[valuesById[4] = "METERS"] = 4; + values[valuesById[5] = "KILOMETERS"] = 5; + values[valuesById[6] = "MILES"] = 6; + values[valuesById[7] = "MILLISECONDS"] = 7; + values[valuesById[8] = "SECONDS"] = 8; + values[valuesById[9] = "MINUTES"] = 9; + values[valuesById[10] = "HOURS"] = 10; + return values; + })(); - /** - * MatchType enum. - * @name google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.MatchType - * @enum {number} - * @property {number} MATCH_TYPE_UNSPECIFIED=0 MATCH_TYPE_UNSPECIFIED value - * @property {number} EXACT=1 EXACT value - * @property {number} CONTAINS=2 CONTAINS value - */ - StringFilter.MatchType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MATCH_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "EXACT"] = 1; - values[valuesById[2] = "CONTAINS"] = 2; - return values; - })(); + /** + * MetricScope enum. + * @name google.analytics.admin.v1alpha.CustomMetric.MetricScope + * @enum {number} + * @property {number} METRIC_SCOPE_UNSPECIFIED=0 METRIC_SCOPE_UNSPECIFIED value + * @property {number} EVENT=1 EVENT value + */ + CustomMetric.MetricScope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METRIC_SCOPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EVENT"] = 1; + return values; + })(); - return StringFilter; + /** + * RestrictedMetricType enum. + * @name google.analytics.admin.v1alpha.CustomMetric.RestrictedMetricType + * @enum {number} + * @property {number} RESTRICTED_METRIC_TYPE_UNSPECIFIED=0 RESTRICTED_METRIC_TYPE_UNSPECIFIED value + * @property {number} COST_DATA=1 COST_DATA value + * @property {number} REVENUE_DATA=2 REVENUE_DATA value + */ + CustomMetric.RestrictedMetricType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESTRICTED_METRIC_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "COST_DATA"] = 1; + values[valuesById[2] = "REVENUE_DATA"] = 2; + return values; })(); - ExpandedDataSetFilter.InListFilter = (function() { + return CustomMetric; + })(); - /** - * Properties of an InListFilter. - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter - * @interface IInListFilter - * @property {Array.|null} [values] InListFilter values - * @property {boolean|null} [caseSensitive] InListFilter caseSensitive - */ + v1alpha.DataRetentionSettings = (function() { - /** - * Constructs a new InListFilter. - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter - * @classdesc Represents an InListFilter. - * @implements IInListFilter - * @constructor - * @param {google.analytics.admin.v1alpha.ExpandedDataSetFilter.IInListFilter=} [properties] Properties to set - */ - function InListFilter(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]]; - } + /** + * Properties of a DataRetentionSettings. + * @memberof google.analytics.admin.v1alpha + * @interface IDataRetentionSettings + * @property {string|null} [name] DataRetentionSettings name + * @property {google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration|null} [eventDataRetention] DataRetentionSettings eventDataRetention + * @property {boolean|null} [resetUserDataOnNewActivity] DataRetentionSettings resetUserDataOnNewActivity + */ - /** - * InListFilter values. - * @member {Array.} values - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter - * @instance - */ - InListFilter.prototype.values = $util.emptyArray; + /** + * Constructs a new DataRetentionSettings. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a DataRetentionSettings. + * @implements IDataRetentionSettings + * @constructor + * @param {google.analytics.admin.v1alpha.IDataRetentionSettings=} [properties] Properties to set + */ + function DataRetentionSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * InListFilter caseSensitive. - * @member {boolean} caseSensitive - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter - * @instance - */ - InListFilter.prototype.caseSensitive = false; + /** + * DataRetentionSettings name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @instance + */ + DataRetentionSettings.prototype.name = ""; - /** - * Creates a new InListFilter instance using the specified properties. - * @function create - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter - * @static - * @param {google.analytics.admin.v1alpha.ExpandedDataSetFilter.IInListFilter=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter} InListFilter instance - */ - InListFilter.create = function create(properties) { - return new InListFilter(properties); - }; + /** + * DataRetentionSettings eventDataRetention. + * @member {google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration} eventDataRetention + * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @instance + */ + DataRetentionSettings.prototype.eventDataRetention = 0; - /** - * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter.verify|verify} messages. - * @function encode - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter - * @static - * @param {google.analytics.admin.v1alpha.ExpandedDataSetFilter.IInListFilter} message InListFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InListFilter.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) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]); - if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.caseSensitive); - return writer; - }; + /** + * DataRetentionSettings resetUserDataOnNewActivity. + * @member {boolean} resetUserDataOnNewActivity + * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @instance + */ + DataRetentionSettings.prototype.resetUserDataOnNewActivity = false; - /** - * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter - * @static - * @param {google.analytics.admin.v1alpha.ExpandedDataSetFilter.IInListFilter} message InListFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InListFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new DataRetentionSettings instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @static + * @param {google.analytics.admin.v1alpha.IDataRetentionSettings=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DataRetentionSettings} DataRetentionSettings instance + */ + DataRetentionSettings.create = function create(properties) { + return new DataRetentionSettings(properties); + }; - /** - * Decodes an InListFilter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter} InListFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InListFilter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push(reader.string()); - break; - } - case 2: { - message.caseSensitive = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified DataRetentionSettings message. Does not implicitly {@link google.analytics.admin.v1alpha.DataRetentionSettings.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @static + * @param {google.analytics.admin.v1alpha.IDataRetentionSettings} message DataRetentionSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataRetentionSettings.encode = function encode(message, writer) { + 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.eventDataRetention != null && Object.hasOwnProperty.call(message, "eventDataRetention")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.eventDataRetention); + if (message.resetUserDataOnNewActivity != null && Object.hasOwnProperty.call(message, "resetUserDataOnNewActivity")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.resetUserDataOnNewActivity); + return writer; + }; + + /** + * Encodes the specified DataRetentionSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataRetentionSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @static + * @param {google.analytics.admin.v1alpha.IDataRetentionSettings} message DataRetentionSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataRetentionSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataRetentionSettings message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.DataRetentionSettings} DataRetentionSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataRetentionSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DataRetentionSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.eventDataRetention = reader.int32(); + break; + } + case 3: { + message.resetUserDataOnNewActivity = reader.bool(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes an InListFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter} InListFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InListFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a DataRetentionSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.DataRetentionSettings} DataRetentionSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataRetentionSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an InListFilter message. - * @function verify - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InListFilter.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) - if (!$util.isString(message.values[i])) - return "values: string[] expected"; + /** + * Verifies a DataRetentionSettings message. + * @function verify + * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataRetentionSettings.verify = function verify(message) { + if (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.eventDataRetention != null && message.hasOwnProperty("eventDataRetention")) + switch (message.eventDataRetention) { + default: + return "eventDataRetention: enum value expected"; + case 0: + case 1: + case 3: + case 4: + case 5: + case 6: + break; } - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) - if (typeof message.caseSensitive !== "boolean") - return "caseSensitive: boolean expected"; - return null; - }; + if (message.resetUserDataOnNewActivity != null && message.hasOwnProperty("resetUserDataOnNewActivity")) + if (typeof message.resetUserDataOnNewActivity !== "boolean") + return "resetUserDataOnNewActivity: boolean expected"; + return null; + }; - /** - * Creates an InListFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter} InListFilter - */ - InListFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter) - return object; - var message = new $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter(); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) - message.values[i] = String(object.values[i]); + /** + * Creates a DataRetentionSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.DataRetentionSettings} DataRetentionSettings + */ + DataRetentionSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DataRetentionSettings) + return object; + var message = new $root.google.analytics.admin.v1alpha.DataRetentionSettings(); + if (object.name != null) + message.name = String(object.name); + switch (object.eventDataRetention) { + default: + if (typeof object.eventDataRetention === "number") { + message.eventDataRetention = object.eventDataRetention; + break; } - if (object.caseSensitive != null) - message.caseSensitive = Boolean(object.caseSensitive); - return message; - }; + break; + case "RETENTION_DURATION_UNSPECIFIED": + case 0: + message.eventDataRetention = 0; + break; + case "TWO_MONTHS": + case 1: + message.eventDataRetention = 1; + break; + case "FOURTEEN_MONTHS": + case 3: + message.eventDataRetention = 3; + break; + case "TWENTY_SIX_MONTHS": + case 4: + message.eventDataRetention = 4; + break; + case "THIRTY_EIGHT_MONTHS": + case 5: + message.eventDataRetention = 5; + break; + case "FIFTY_MONTHS": + case 6: + message.eventDataRetention = 6; + break; + } + if (object.resetUserDataOnNewActivity != null) + message.resetUserDataOnNewActivity = Boolean(object.resetUserDataOnNewActivity); + return message; + }; - /** - * Creates a plain object from an InListFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter - * @static - * @param {google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter} message InListFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InListFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (options.defaults) - object.caseSensitive = false; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = message.values[j]; - } - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) - object.caseSensitive = message.caseSensitive; - return object; - }; + /** + * Creates a plain object from a DataRetentionSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @static + * @param {google.analytics.admin.v1alpha.DataRetentionSettings} message DataRetentionSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataRetentionSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.eventDataRetention = options.enums === String ? "RETENTION_DURATION_UNSPECIFIED" : 0; + object.resetUserDataOnNewActivity = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.eventDataRetention != null && message.hasOwnProperty("eventDataRetention")) + object.eventDataRetention = options.enums === String ? $root.google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration[message.eventDataRetention] === undefined ? message.eventDataRetention : $root.google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration[message.eventDataRetention] : message.eventDataRetention; + if (message.resetUserDataOnNewActivity != null && message.hasOwnProperty("resetUserDataOnNewActivity")) + object.resetUserDataOnNewActivity = message.resetUserDataOnNewActivity; + return object; + }; - /** - * Converts this InListFilter to JSON. - * @function toJSON - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter - * @instance - * @returns {Object.} JSON object - */ - InListFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this DataRetentionSettings to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @instance + * @returns {Object.} JSON object + */ + DataRetentionSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for InListFilter - * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InListFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.ExpandedDataSetFilter.InListFilter"; - }; + /** + * Gets the default type url for DataRetentionSettings + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataRetentionSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DataRetentionSettings"; + }; - return InListFilter; + /** + * RetentionDuration enum. + * @name google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration + * @enum {number} + * @property {number} RETENTION_DURATION_UNSPECIFIED=0 RETENTION_DURATION_UNSPECIFIED value + * @property {number} TWO_MONTHS=1 TWO_MONTHS value + * @property {number} FOURTEEN_MONTHS=3 FOURTEEN_MONTHS value + * @property {number} TWENTY_SIX_MONTHS=4 TWENTY_SIX_MONTHS value + * @property {number} THIRTY_EIGHT_MONTHS=5 THIRTY_EIGHT_MONTHS value + * @property {number} FIFTY_MONTHS=6 FIFTY_MONTHS value + */ + DataRetentionSettings.RetentionDuration = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_DURATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "TWO_MONTHS"] = 1; + values[valuesById[3] = "FOURTEEN_MONTHS"] = 3; + values[valuesById[4] = "TWENTY_SIX_MONTHS"] = 4; + values[valuesById[5] = "THIRTY_EIGHT_MONTHS"] = 5; + values[valuesById[6] = "FIFTY_MONTHS"] = 6; + return values; })(); - return ExpandedDataSetFilter; + return DataRetentionSettings; })(); - v1alpha.ExpandedDataSetFilterExpression = (function() { + v1alpha.AttributionSettings = (function() { /** - * Properties of an ExpandedDataSetFilterExpression. + * Properties of an AttributionSettings. * @memberof google.analytics.admin.v1alpha - * @interface IExpandedDataSetFilterExpression - * @property {google.analytics.admin.v1alpha.IExpandedDataSetFilterExpressionList|null} [andGroup] ExpandedDataSetFilterExpression andGroup - * @property {google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression|null} [notExpression] ExpandedDataSetFilterExpression notExpression - * @property {google.analytics.admin.v1alpha.IExpandedDataSetFilter|null} [filter] ExpandedDataSetFilterExpression filter + * @interface IAttributionSettings + * @property {string|null} [name] AttributionSettings name + * @property {google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow|null} [acquisitionConversionEventLookbackWindow] AttributionSettings acquisitionConversionEventLookbackWindow + * @property {google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow|null} [otherConversionEventLookbackWindow] AttributionSettings otherConversionEventLookbackWindow + * @property {google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel|null} [reportingAttributionModel] AttributionSettings reportingAttributionModel */ /** - * Constructs a new ExpandedDataSetFilterExpression. + * Constructs a new AttributionSettings. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents an ExpandedDataSetFilterExpression. - * @implements IExpandedDataSetFilterExpression + * @classdesc Represents an AttributionSettings. + * @implements IAttributionSettings * @constructor - * @param {google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IAttributionSettings=} [properties] Properties to set */ - function ExpandedDataSetFilterExpression(properties) { + function AttributionSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -51138,117 +56045,117 @@ } /** - * ExpandedDataSetFilterExpression andGroup. - * @member {google.analytics.admin.v1alpha.IExpandedDataSetFilterExpressionList|null|undefined} andGroup - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression + * AttributionSettings name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.AttributionSettings * @instance */ - ExpandedDataSetFilterExpression.prototype.andGroup = null; + AttributionSettings.prototype.name = ""; /** - * ExpandedDataSetFilterExpression notExpression. - * @member {google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression|null|undefined} notExpression - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression + * AttributionSettings acquisitionConversionEventLookbackWindow. + * @member {google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow} acquisitionConversionEventLookbackWindow + * @memberof google.analytics.admin.v1alpha.AttributionSettings * @instance */ - ExpandedDataSetFilterExpression.prototype.notExpression = null; + AttributionSettings.prototype.acquisitionConversionEventLookbackWindow = 0; /** - * ExpandedDataSetFilterExpression filter. - * @member {google.analytics.admin.v1alpha.IExpandedDataSetFilter|null|undefined} filter - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression + * AttributionSettings otherConversionEventLookbackWindow. + * @member {google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow} otherConversionEventLookbackWindow + * @memberof google.analytics.admin.v1alpha.AttributionSettings * @instance */ - ExpandedDataSetFilterExpression.prototype.filter = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + AttributionSettings.prototype.otherConversionEventLookbackWindow = 0; /** - * ExpandedDataSetFilterExpression expr. - * @member {"andGroup"|"notExpression"|"filter"|undefined} expr - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression + * AttributionSettings reportingAttributionModel. + * @member {google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel} reportingAttributionModel + * @memberof google.analytics.admin.v1alpha.AttributionSettings * @instance */ - Object.defineProperty(ExpandedDataSetFilterExpression.prototype, "expr", { - get: $util.oneOfGetter($oneOfFields = ["andGroup", "notExpression", "filter"]), - set: $util.oneOfSetter($oneOfFields) - }); + AttributionSettings.prototype.reportingAttributionModel = 0; /** - * Creates a new ExpandedDataSetFilterExpression instance using the specified properties. + * Creates a new AttributionSettings instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression + * @memberof google.analytics.admin.v1alpha.AttributionSettings * @static - * @param {google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression} ExpandedDataSetFilterExpression instance + * @param {google.analytics.admin.v1alpha.IAttributionSettings=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AttributionSettings} AttributionSettings instance */ - ExpandedDataSetFilterExpression.create = function create(properties) { - return new ExpandedDataSetFilterExpression(properties); + AttributionSettings.create = function create(properties) { + return new AttributionSettings(properties); }; /** - * Encodes the specified ExpandedDataSetFilterExpression message. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.verify|verify} messages. + * Encodes the specified AttributionSettings message. Does not implicitly {@link google.analytics.admin.v1alpha.AttributionSettings.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression + * @memberof google.analytics.admin.v1alpha.AttributionSettings * @static - * @param {google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression} message ExpandedDataSetFilterExpression message or plain object to encode + * @param {google.analytics.admin.v1alpha.IAttributionSettings} message AttributionSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExpandedDataSetFilterExpression.encode = function encode(message, writer) { + AttributionSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) - $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) - $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.encode(message.notExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.encode(message.filter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.acquisitionConversionEventLookbackWindow != null && Object.hasOwnProperty.call(message, "acquisitionConversionEventLookbackWindow")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.acquisitionConversionEventLookbackWindow); + if (message.otherConversionEventLookbackWindow != null && Object.hasOwnProperty.call(message, "otherConversionEventLookbackWindow")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.otherConversionEventLookbackWindow); + if (message.reportingAttributionModel != null && Object.hasOwnProperty.call(message, "reportingAttributionModel")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.reportingAttributionModel); return writer; }; /** - * Encodes the specified ExpandedDataSetFilterExpression message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.verify|verify} messages. + * Encodes the specified AttributionSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AttributionSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression + * @memberof google.analytics.admin.v1alpha.AttributionSettings * @static - * @param {google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression} message ExpandedDataSetFilterExpression message or plain object to encode + * @param {google.analytics.admin.v1alpha.IAttributionSettings} message AttributionSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExpandedDataSetFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + AttributionSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExpandedDataSetFilterExpression message from the specified reader or buffer. + * Decodes an AttributionSettings message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression + * @memberof google.analytics.admin.v1alpha.AttributionSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression} ExpandedDataSetFilterExpression + * @returns {google.analytics.admin.v1alpha.AttributionSettings} AttributionSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExpandedDataSetFilterExpression.decode = function decode(reader, length) { + AttributionSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AttributionSettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.andGroup = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList.decode(reader, reader.uint32()); + message.name = reader.string(); break; } case 2: { - message.notExpression = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.decode(reader, reader.uint32()); + message.acquisitionConversionEventLookbackWindow = reader.int32(); break; } case 3: { - message.filter = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.decode(reader, reader.uint32()); + message.otherConversionEventLookbackWindow = reader.int32(); + break; + } + case 4: { + message.reportingAttributionModel = reader.int32(); break; } default: @@ -51260,173 +56167,312 @@ }; /** - * Decodes an ExpandedDataSetFilterExpression message from the specified reader or buffer, length delimited. + * Decodes an AttributionSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression + * @memberof google.analytics.admin.v1alpha.AttributionSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression} ExpandedDataSetFilterExpression + * @returns {google.analytics.admin.v1alpha.AttributionSettings} AttributionSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExpandedDataSetFilterExpression.decodeDelimited = function decodeDelimited(reader) { + AttributionSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExpandedDataSetFilterExpression message. + * Verifies an AttributionSettings message. * @function verify - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression + * @memberof google.analytics.admin.v1alpha.AttributionSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExpandedDataSetFilterExpression.verify = function verify(message) { + AttributionSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.andGroup != null && message.hasOwnProperty("andGroup")) { - properties.expr = 1; - { - var error = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList.verify(message.andGroup); - if (error) - return "andGroup." + error; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.acquisitionConversionEventLookbackWindow != null && message.hasOwnProperty("acquisitionConversionEventLookbackWindow")) + switch (message.acquisitionConversionEventLookbackWindow) { + default: + return "acquisitionConversionEventLookbackWindow: enum value expected"; + case 0: + case 1: + case 2: + break; } - } - if (message.notExpression != null && message.hasOwnProperty("notExpression")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.verify(message.notExpression); - if (error) - return "notExpression." + error; + if (message.otherConversionEventLookbackWindow != null && message.hasOwnProperty("otherConversionEventLookbackWindow")) + switch (message.otherConversionEventLookbackWindow) { + default: + return "otherConversionEventLookbackWindow: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } - } - if (message.filter != null && message.hasOwnProperty("filter")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.verify(message.filter); - if (error) - return "filter." + error; + if (message.reportingAttributionModel != null && message.hasOwnProperty("reportingAttributionModel")) + switch (message.reportingAttributionModel) { + default: + return "reportingAttributionModel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; } - } return null; }; /** - * Creates an ExpandedDataSetFilterExpression message from a plain object. Also converts values to their respective internal types. + * Creates an AttributionSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression + * @memberof google.analytics.admin.v1alpha.AttributionSettings * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression} ExpandedDataSetFilterExpression + * @returns {google.analytics.admin.v1alpha.AttributionSettings} AttributionSettings */ - ExpandedDataSetFilterExpression.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression) + AttributionSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AttributionSettings) return object; - var message = new $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression(); - if (object.andGroup != null) { - if (typeof object.andGroup !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.andGroup: object expected"); - message.andGroup = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList.fromObject(object.andGroup); + var message = new $root.google.analytics.admin.v1alpha.AttributionSettings(); + if (object.name != null) + message.name = String(object.name); + switch (object.acquisitionConversionEventLookbackWindow) { + default: + if (typeof object.acquisitionConversionEventLookbackWindow === "number") { + message.acquisitionConversionEventLookbackWindow = object.acquisitionConversionEventLookbackWindow; + break; + } + break; + case "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED": + case 0: + message.acquisitionConversionEventLookbackWindow = 0; + break; + case "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_7_DAYS": + case 1: + message.acquisitionConversionEventLookbackWindow = 1; + break; + case "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS": + case 2: + message.acquisitionConversionEventLookbackWindow = 2; + break; } - if (object.notExpression != null) { - if (typeof object.notExpression !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.notExpression: object expected"); - message.notExpression = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.fromObject(object.notExpression); + switch (object.otherConversionEventLookbackWindow) { + default: + if (typeof object.otherConversionEventLookbackWindow === "number") { + message.otherConversionEventLookbackWindow = object.otherConversionEventLookbackWindow; + break; + } + break; + case "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED": + case 0: + message.otherConversionEventLookbackWindow = 0; + break; + case "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS": + case 1: + message.otherConversionEventLookbackWindow = 1; + break; + case "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_60_DAYS": + case 2: + message.otherConversionEventLookbackWindow = 2; + break; + case "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_90_DAYS": + case 3: + message.otherConversionEventLookbackWindow = 3; + break; } - if (object.filter != null) { - if (typeof object.filter !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.filter: object expected"); - message.filter = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.fromObject(object.filter); + switch (object.reportingAttributionModel) { + default: + if (typeof object.reportingAttributionModel === "number") { + message.reportingAttributionModel = object.reportingAttributionModel; + break; + } + break; + case "REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED": + case 0: + message.reportingAttributionModel = 0; + break; + case "CROSS_CHANNEL_DATA_DRIVEN": + case 1: + message.reportingAttributionModel = 1; + break; + case "CROSS_CHANNEL_LAST_CLICK": + case 2: + message.reportingAttributionModel = 2; + break; + case "CROSS_CHANNEL_FIRST_CLICK": + case 3: + message.reportingAttributionModel = 3; + break; + case "CROSS_CHANNEL_LINEAR": + case 4: + message.reportingAttributionModel = 4; + break; + case "CROSS_CHANNEL_POSITION_BASED": + case 5: + message.reportingAttributionModel = 5; + break; + case "CROSS_CHANNEL_TIME_DECAY": + case 6: + message.reportingAttributionModel = 6; + break; + case "ADS_PREFERRED_LAST_CLICK": + case 7: + message.reportingAttributionModel = 7; + break; } return message; }; /** - * Creates a plain object from an ExpandedDataSetFilterExpression message. Also converts values to other types if specified. + * Creates a plain object from an AttributionSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression + * @memberof google.analytics.admin.v1alpha.AttributionSettings * @static - * @param {google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression} message ExpandedDataSetFilterExpression + * @param {google.analytics.admin.v1alpha.AttributionSettings} message AttributionSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExpandedDataSetFilterExpression.toObject = function toObject(message, options) { + AttributionSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.andGroup != null && message.hasOwnProperty("andGroup")) { - object.andGroup = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList.toObject(message.andGroup, options); - if (options.oneofs) - object.expr = "andGroup"; - } - if (message.notExpression != null && message.hasOwnProperty("notExpression")) { - object.notExpression = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.toObject(message.notExpression, options); - if (options.oneofs) - object.expr = "notExpression"; - } - if (message.filter != null && message.hasOwnProperty("filter")) { - object.filter = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilter.toObject(message.filter, options); - if (options.oneofs) - object.expr = "filter"; + if (options.defaults) { + object.name = ""; + object.acquisitionConversionEventLookbackWindow = options.enums === String ? "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED" : 0; + object.otherConversionEventLookbackWindow = options.enums === String ? "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED" : 0; + object.reportingAttributionModel = options.enums === String ? "REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED" : 0; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.acquisitionConversionEventLookbackWindow != null && message.hasOwnProperty("acquisitionConversionEventLookbackWindow")) + object.acquisitionConversionEventLookbackWindow = options.enums === String ? $root.google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow[message.acquisitionConversionEventLookbackWindow] === undefined ? message.acquisitionConversionEventLookbackWindow : $root.google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow[message.acquisitionConversionEventLookbackWindow] : message.acquisitionConversionEventLookbackWindow; + if (message.otherConversionEventLookbackWindow != null && message.hasOwnProperty("otherConversionEventLookbackWindow")) + object.otherConversionEventLookbackWindow = options.enums === String ? $root.google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow[message.otherConversionEventLookbackWindow] === undefined ? message.otherConversionEventLookbackWindow : $root.google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow[message.otherConversionEventLookbackWindow] : message.otherConversionEventLookbackWindow; + if (message.reportingAttributionModel != null && message.hasOwnProperty("reportingAttributionModel")) + object.reportingAttributionModel = options.enums === String ? $root.google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel[message.reportingAttributionModel] === undefined ? message.reportingAttributionModel : $root.google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel[message.reportingAttributionModel] : message.reportingAttributionModel; return object; }; /** - * Converts this ExpandedDataSetFilterExpression to JSON. + * Converts this AttributionSettings to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression + * @memberof google.analytics.admin.v1alpha.AttributionSettings * @instance * @returns {Object.} JSON object */ - ExpandedDataSetFilterExpression.prototype.toJSON = function toJSON() { + AttributionSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExpandedDataSetFilterExpression + * Gets the default type url for AttributionSettings * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression + * @memberof google.analytics.admin.v1alpha.AttributionSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExpandedDataSetFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AttributionSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AttributionSettings"; }; - return ExpandedDataSetFilterExpression; + /** + * AcquisitionConversionEventLookbackWindow enum. + * @name google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow + * @enum {number} + * @property {number} ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED=0 ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED value + * @property {number} ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_7_DAYS=1 ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_7_DAYS value + * @property {number} ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS=2 ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS value + */ + AttributionSettings.AcquisitionConversionEventLookbackWindow = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_7_DAYS"] = 1; + values[valuesById[2] = "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS"] = 2; + return values; + })(); + + /** + * OtherConversionEventLookbackWindow enum. + * @name google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow + * @enum {number} + * @property {number} OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED=0 OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED value + * @property {number} OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS=1 OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS value + * @property {number} OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_60_DAYS=2 OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_60_DAYS value + * @property {number} OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_90_DAYS=3 OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_90_DAYS value + */ + AttributionSettings.OtherConversionEventLookbackWindow = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED"] = 0; + values[valuesById[1] = "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS"] = 1; + values[valuesById[2] = "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_60_DAYS"] = 2; + values[valuesById[3] = "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_90_DAYS"] = 3; + return values; + })(); + + /** + * ReportingAttributionModel enum. + * @name google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel + * @enum {number} + * @property {number} REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED=0 REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED value + * @property {number} CROSS_CHANNEL_DATA_DRIVEN=1 CROSS_CHANNEL_DATA_DRIVEN value + * @property {number} CROSS_CHANNEL_LAST_CLICK=2 CROSS_CHANNEL_LAST_CLICK value + * @property {number} CROSS_CHANNEL_FIRST_CLICK=3 CROSS_CHANNEL_FIRST_CLICK value + * @property {number} CROSS_CHANNEL_LINEAR=4 CROSS_CHANNEL_LINEAR value + * @property {number} CROSS_CHANNEL_POSITION_BASED=5 CROSS_CHANNEL_POSITION_BASED value + * @property {number} CROSS_CHANNEL_TIME_DECAY=6 CROSS_CHANNEL_TIME_DECAY value + * @property {number} ADS_PREFERRED_LAST_CLICK=7 ADS_PREFERRED_LAST_CLICK value + */ + AttributionSettings.ReportingAttributionModel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "CROSS_CHANNEL_DATA_DRIVEN"] = 1; + values[valuesById[2] = "CROSS_CHANNEL_LAST_CLICK"] = 2; + values[valuesById[3] = "CROSS_CHANNEL_FIRST_CLICK"] = 3; + values[valuesById[4] = "CROSS_CHANNEL_LINEAR"] = 4; + values[valuesById[5] = "CROSS_CHANNEL_POSITION_BASED"] = 5; + values[valuesById[6] = "CROSS_CHANNEL_TIME_DECAY"] = 6; + values[valuesById[7] = "ADS_PREFERRED_LAST_CLICK"] = 7; + return values; + })(); + + return AttributionSettings; })(); - v1alpha.ExpandedDataSetFilterExpressionList = (function() { + v1alpha.AccessBinding = (function() { /** - * Properties of an ExpandedDataSetFilterExpressionList. + * Properties of an AccessBinding. * @memberof google.analytics.admin.v1alpha - * @interface IExpandedDataSetFilterExpressionList - * @property {Array.|null} [filterExpressions] ExpandedDataSetFilterExpressionList filterExpressions + * @interface IAccessBinding + * @property {string|null} [user] AccessBinding user + * @property {string|null} [name] AccessBinding name + * @property {Array.|null} [roles] AccessBinding roles */ /** - * Constructs a new ExpandedDataSetFilterExpressionList. + * Constructs a new AccessBinding. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents an ExpandedDataSetFilterExpressionList. - * @implements IExpandedDataSetFilterExpressionList + * @classdesc Represents an AccessBinding. + * @implements IAccessBinding * @constructor - * @param {google.analytics.admin.v1alpha.IExpandedDataSetFilterExpressionList=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IAccessBinding=} [properties] Properties to set */ - function ExpandedDataSetFilterExpressionList(properties) { - this.filterExpressions = []; + function AccessBinding(properties) { + this.roles = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -51434,78 +56480,120 @@ } /** - * ExpandedDataSetFilterExpressionList filterExpressions. - * @member {Array.} filterExpressions - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList + * AccessBinding user. + * @member {string|null|undefined} user + * @memberof google.analytics.admin.v1alpha.AccessBinding * @instance */ - ExpandedDataSetFilterExpressionList.prototype.filterExpressions = $util.emptyArray; + AccessBinding.prototype.user = null; /** - * Creates a new ExpandedDataSetFilterExpressionList instance using the specified properties. + * AccessBinding name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.AccessBinding + * @instance + */ + AccessBinding.prototype.name = ""; + + /** + * AccessBinding roles. + * @member {Array.} roles + * @memberof google.analytics.admin.v1alpha.AccessBinding + * @instance + */ + AccessBinding.prototype.roles = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AccessBinding accessTarget. + * @member {"user"|undefined} accessTarget + * @memberof google.analytics.admin.v1alpha.AccessBinding + * @instance + */ + Object.defineProperty(AccessBinding.prototype, "accessTarget", { + get: $util.oneOfGetter($oneOfFields = ["user"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AccessBinding instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList + * @memberof google.analytics.admin.v1alpha.AccessBinding * @static - * @param {google.analytics.admin.v1alpha.IExpandedDataSetFilterExpressionList=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList} ExpandedDataSetFilterExpressionList instance + * @param {google.analytics.admin.v1alpha.IAccessBinding=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AccessBinding} AccessBinding instance */ - ExpandedDataSetFilterExpressionList.create = function create(properties) { - return new ExpandedDataSetFilterExpressionList(properties); + AccessBinding.create = function create(properties) { + return new AccessBinding(properties); }; /** - * Encodes the specified ExpandedDataSetFilterExpressionList message. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList.verify|verify} messages. + * Encodes the specified AccessBinding message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessBinding.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList + * @memberof google.analytics.admin.v1alpha.AccessBinding * @static - * @param {google.analytics.admin.v1alpha.IExpandedDataSetFilterExpressionList} message ExpandedDataSetFilterExpressionList message or plain object to encode + * @param {google.analytics.admin.v1alpha.IAccessBinding} message AccessBinding message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExpandedDataSetFilterExpressionList.encode = function encode(message, writer) { + AccessBinding.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.filterExpressions != null && message.filterExpressions.length) - for (var i = 0; i < message.filterExpressions.length; ++i) - $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.encode(message.filterExpressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.user != null && Object.hasOwnProperty.call(message, "user")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.user); + if (message.roles != null && message.roles.length) + for (var i = 0; i < message.roles.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.roles[i]); return writer; }; /** - * Encodes the specified ExpandedDataSetFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList.verify|verify} messages. + * Encodes the specified AccessBinding message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessBinding.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList + * @memberof google.analytics.admin.v1alpha.AccessBinding * @static - * @param {google.analytics.admin.v1alpha.IExpandedDataSetFilterExpressionList} message ExpandedDataSetFilterExpressionList message or plain object to encode + * @param {google.analytics.admin.v1alpha.IAccessBinding} message AccessBinding message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExpandedDataSetFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + AccessBinding.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExpandedDataSetFilterExpressionList message from the specified reader or buffer. + * Decodes an AccessBinding message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList + * @memberof google.analytics.admin.v1alpha.AccessBinding * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList} ExpandedDataSetFilterExpressionList + * @returns {google.analytics.admin.v1alpha.AccessBinding} AccessBinding * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExpandedDataSetFilterExpressionList.decode = function decode(reader, length) { + AccessBinding.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AccessBinding(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 2: { + message.user = reader.string(); + break; + } case 1: { - if (!(message.filterExpressions && message.filterExpressions.length)) - message.filterExpressions = []; - message.filterExpressions.push($root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.decode(reader, reader.uint32())); + message.name = reader.string(); + break; + } + case 3: { + if (!(message.roles && message.roles.length)) + message.roles = []; + message.roles.push(reader.string()); break; } default: @@ -51517,147 +56605,165 @@ }; /** - * Decodes an ExpandedDataSetFilterExpressionList message from the specified reader or buffer, length delimited. + * Decodes an AccessBinding message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList + * @memberof google.analytics.admin.v1alpha.AccessBinding * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList} ExpandedDataSetFilterExpressionList + * @returns {google.analytics.admin.v1alpha.AccessBinding} AccessBinding * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExpandedDataSetFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + AccessBinding.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExpandedDataSetFilterExpressionList message. + * Verifies an AccessBinding message. * @function verify - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList + * @memberof google.analytics.admin.v1alpha.AccessBinding * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExpandedDataSetFilterExpressionList.verify = function verify(message) { + AccessBinding.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.filterExpressions != null && message.hasOwnProperty("filterExpressions")) { - if (!Array.isArray(message.filterExpressions)) - return "filterExpressions: array expected"; - for (var i = 0; i < message.filterExpressions.length; ++i) { - var error = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.verify(message.filterExpressions[i]); - if (error) - return "filterExpressions." + error; - } + var properties = {}; + if (message.user != null && message.hasOwnProperty("user")) { + properties.accessTarget = 1; + if (!$util.isString(message.user)) + return "user: string expected"; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.roles != null && message.hasOwnProperty("roles")) { + if (!Array.isArray(message.roles)) + return "roles: array expected"; + for (var i = 0; i < message.roles.length; ++i) + if (!$util.isString(message.roles[i])) + return "roles: string[] expected"; } return null; }; /** - * Creates an ExpandedDataSetFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * Creates an AccessBinding message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList + * @memberof google.analytics.admin.v1alpha.AccessBinding * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList} ExpandedDataSetFilterExpressionList + * @returns {google.analytics.admin.v1alpha.AccessBinding} AccessBinding */ - ExpandedDataSetFilterExpressionList.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList) + AccessBinding.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AccessBinding) return object; - var message = new $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList(); - if (object.filterExpressions) { - if (!Array.isArray(object.filterExpressions)) - throw TypeError(".google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList.filterExpressions: array expected"); - message.filterExpressions = []; - for (var i = 0; i < object.filterExpressions.length; ++i) { - if (typeof object.filterExpressions[i] !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList.filterExpressions: object expected"); - message.filterExpressions[i] = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.fromObject(object.filterExpressions[i]); - } + var message = new $root.google.analytics.admin.v1alpha.AccessBinding(); + if (object.user != null) + message.user = String(object.user); + if (object.name != null) + message.name = String(object.name); + if (object.roles) { + if (!Array.isArray(object.roles)) + throw TypeError(".google.analytics.admin.v1alpha.AccessBinding.roles: array expected"); + message.roles = []; + for (var i = 0; i < object.roles.length; ++i) + message.roles[i] = String(object.roles[i]); } return message; }; /** - * Creates a plain object from an ExpandedDataSetFilterExpressionList message. Also converts values to other types if specified. + * Creates a plain object from an AccessBinding message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList + * @memberof google.analytics.admin.v1alpha.AccessBinding * @static - * @param {google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList} message ExpandedDataSetFilterExpressionList + * @param {google.analytics.admin.v1alpha.AccessBinding} message AccessBinding * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExpandedDataSetFilterExpressionList.toObject = function toObject(message, options) { + AccessBinding.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.filterExpressions = []; - if (message.filterExpressions && message.filterExpressions.length) { - object.filterExpressions = []; - for (var j = 0; j < message.filterExpressions.length; ++j) - object.filterExpressions[j] = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.toObject(message.filterExpressions[j], options); + object.roles = []; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.user != null && message.hasOwnProperty("user")) { + object.user = message.user; + if (options.oneofs) + object.accessTarget = "user"; + } + if (message.roles && message.roles.length) { + object.roles = []; + for (var j = 0; j < message.roles.length; ++j) + object.roles[j] = message.roles[j]; } return object; }; /** - * Converts this ExpandedDataSetFilterExpressionList to JSON. + * Converts this AccessBinding to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList + * @memberof google.analytics.admin.v1alpha.AccessBinding * @instance * @returns {Object.} JSON object */ - ExpandedDataSetFilterExpressionList.prototype.toJSON = function toJSON() { + AccessBinding.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExpandedDataSetFilterExpressionList + * Gets the default type url for AccessBinding * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList + * @memberof google.analytics.admin.v1alpha.AccessBinding * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExpandedDataSetFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AccessBinding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AccessBinding"; }; - return ExpandedDataSetFilterExpressionList; + return AccessBinding; })(); - v1alpha.ExpandedDataSet = (function() { + v1alpha.BigQueryLink = (function() { /** - * Properties of an ExpandedDataSet. + * Properties of a BigQueryLink. * @memberof google.analytics.admin.v1alpha - * @interface IExpandedDataSet - * @property {string|null} [name] ExpandedDataSet name - * @property {string|null} [displayName] ExpandedDataSet displayName - * @property {string|null} [description] ExpandedDataSet description - * @property {Array.|null} [dimensionNames] ExpandedDataSet dimensionNames - * @property {Array.|null} [metricNames] ExpandedDataSet metricNames - * @property {google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression|null} [dimensionFilterExpression] ExpandedDataSet dimensionFilterExpression - * @property {google.protobuf.ITimestamp|null} [dataCollectionStartTime] ExpandedDataSet dataCollectionStartTime + * @interface IBigQueryLink + * @property {string|null} [name] BigQueryLink name + * @property {string|null} [project] BigQueryLink project + * @property {google.protobuf.ITimestamp|null} [createTime] BigQueryLink createTime + * @property {boolean|null} [dailyExportEnabled] BigQueryLink dailyExportEnabled + * @property {boolean|null} [streamingExportEnabled] BigQueryLink streamingExportEnabled + * @property {boolean|null} [includeAdvertisingId] BigQueryLink includeAdvertisingId + * @property {Array.|null} [exportStreams] BigQueryLink exportStreams + * @property {Array.|null} [excludedEvents] BigQueryLink excludedEvents */ /** - * Constructs a new ExpandedDataSet. + * Constructs a new BigQueryLink. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents an ExpandedDataSet. - * @implements IExpandedDataSet + * @classdesc Represents a BigQueryLink. + * @implements IBigQueryLink * @constructor - * @param {google.analytics.admin.v1alpha.IExpandedDataSet=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IBigQueryLink=} [properties] Properties to set */ - function ExpandedDataSet(properties) { - this.dimensionNames = []; - this.metricNames = []; + function BigQueryLink(properties) { + this.exportStreams = []; + this.excludedEvents = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -51665,132 +56771,142 @@ } /** - * ExpandedDataSet name. + * BigQueryLink name. * @member {string} name - * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * @memberof google.analytics.admin.v1alpha.BigQueryLink * @instance */ - ExpandedDataSet.prototype.name = ""; + BigQueryLink.prototype.name = ""; /** - * ExpandedDataSet displayName. - * @member {string} displayName - * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * BigQueryLink project. + * @member {string} project + * @memberof google.analytics.admin.v1alpha.BigQueryLink * @instance */ - ExpandedDataSet.prototype.displayName = ""; + BigQueryLink.prototype.project = ""; /** - * ExpandedDataSet description. - * @member {string} description - * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * BigQueryLink createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.analytics.admin.v1alpha.BigQueryLink * @instance */ - ExpandedDataSet.prototype.description = ""; + BigQueryLink.prototype.createTime = null; /** - * ExpandedDataSet dimensionNames. - * @member {Array.} dimensionNames - * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * BigQueryLink dailyExportEnabled. + * @member {boolean} dailyExportEnabled + * @memberof google.analytics.admin.v1alpha.BigQueryLink * @instance */ - ExpandedDataSet.prototype.dimensionNames = $util.emptyArray; + BigQueryLink.prototype.dailyExportEnabled = false; /** - * ExpandedDataSet metricNames. - * @member {Array.} metricNames - * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * BigQueryLink streamingExportEnabled. + * @member {boolean} streamingExportEnabled + * @memberof google.analytics.admin.v1alpha.BigQueryLink * @instance */ - ExpandedDataSet.prototype.metricNames = $util.emptyArray; + BigQueryLink.prototype.streamingExportEnabled = false; /** - * ExpandedDataSet dimensionFilterExpression. - * @member {google.analytics.admin.v1alpha.IExpandedDataSetFilterExpression|null|undefined} dimensionFilterExpression - * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * BigQueryLink includeAdvertisingId. + * @member {boolean} includeAdvertisingId + * @memberof google.analytics.admin.v1alpha.BigQueryLink * @instance */ - ExpandedDataSet.prototype.dimensionFilterExpression = null; + BigQueryLink.prototype.includeAdvertisingId = false; /** - * ExpandedDataSet dataCollectionStartTime. - * @member {google.protobuf.ITimestamp|null|undefined} dataCollectionStartTime - * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * BigQueryLink exportStreams. + * @member {Array.} exportStreams + * @memberof google.analytics.admin.v1alpha.BigQueryLink * @instance */ - ExpandedDataSet.prototype.dataCollectionStartTime = null; + BigQueryLink.prototype.exportStreams = $util.emptyArray; /** - * Creates a new ExpandedDataSet instance using the specified properties. + * BigQueryLink excludedEvents. + * @member {Array.} excludedEvents + * @memberof google.analytics.admin.v1alpha.BigQueryLink + * @instance + */ + BigQueryLink.prototype.excludedEvents = $util.emptyArray; + + /** + * Creates a new BigQueryLink instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * @memberof google.analytics.admin.v1alpha.BigQueryLink * @static - * @param {google.analytics.admin.v1alpha.IExpandedDataSet=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.ExpandedDataSet} ExpandedDataSet instance + * @param {google.analytics.admin.v1alpha.IBigQueryLink=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.BigQueryLink} BigQueryLink instance */ - ExpandedDataSet.create = function create(properties) { - return new ExpandedDataSet(properties); + BigQueryLink.create = function create(properties) { + return new BigQueryLink(properties); }; /** - * Encodes the specified ExpandedDataSet message. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSet.verify|verify} messages. + * Encodes the specified BigQueryLink message. Does not implicitly {@link google.analytics.admin.v1alpha.BigQueryLink.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * @memberof google.analytics.admin.v1alpha.BigQueryLink * @static - * @param {google.analytics.admin.v1alpha.IExpandedDataSet} message ExpandedDataSet message or plain object to encode + * @param {google.analytics.admin.v1alpha.IBigQueryLink} message BigQueryLink message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExpandedDataSet.encode = function encode(message, writer) { + BigQueryLink.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.dimensionNames != null && message.dimensionNames.length) - for (var i = 0; i < message.dimensionNames.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.dimensionNames[i]); - if (message.metricNames != null && message.metricNames.length) - for (var i = 0; i < message.metricNames.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.metricNames[i]); - if (message.dimensionFilterExpression != null && Object.hasOwnProperty.call(message, "dimensionFilterExpression")) - $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.encode(message.dimensionFilterExpression, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.dataCollectionStartTime != null && Object.hasOwnProperty.call(message, "dataCollectionStartTime")) - $root.google.protobuf.Timestamp.encode(message.dataCollectionStartTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.project != null && Object.hasOwnProperty.call(message, "project")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.project); + 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.dailyExportEnabled != null && Object.hasOwnProperty.call(message, "dailyExportEnabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.dailyExportEnabled); + if (message.streamingExportEnabled != null && Object.hasOwnProperty.call(message, "streamingExportEnabled")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.streamingExportEnabled); + if (message.includeAdvertisingId != null && Object.hasOwnProperty.call(message, "includeAdvertisingId")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.includeAdvertisingId); + if (message.exportStreams != null && message.exportStreams.length) + for (var i = 0; i < message.exportStreams.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.exportStreams[i]); + if (message.excludedEvents != null && message.excludedEvents.length) + for (var i = 0; i < message.excludedEvents.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.excludedEvents[i]); return writer; }; /** - * Encodes the specified ExpandedDataSet message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ExpandedDataSet.verify|verify} messages. + * Encodes the specified BigQueryLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BigQueryLink.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * @memberof google.analytics.admin.v1alpha.BigQueryLink * @static - * @param {google.analytics.admin.v1alpha.IExpandedDataSet} message ExpandedDataSet message or plain object to encode + * @param {google.analytics.admin.v1alpha.IBigQueryLink} message BigQueryLink message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExpandedDataSet.encodeDelimited = function encodeDelimited(message, writer) { + BigQueryLink.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExpandedDataSet message from the specified reader or buffer. + * Decodes a BigQueryLink message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * @memberof google.analytics.admin.v1alpha.BigQueryLink * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.analytics.admin.v1alpha.ExpandedDataSet} ExpandedDataSet + * @returns {google.analytics.admin.v1alpha.BigQueryLink} BigQueryLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExpandedDataSet.decode = function decode(reader, length) { + BigQueryLink.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ExpandedDataSet(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.BigQueryLink(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -51799,31 +56915,35 @@ break; } case 2: { - message.displayName = reader.string(); + message.project = reader.string(); break; } case 3: { - message.description = reader.string(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 4: { - if (!(message.dimensionNames && message.dimensionNames.length)) - message.dimensionNames = []; - message.dimensionNames.push(reader.string()); + message.dailyExportEnabled = reader.bool(); break; } case 5: { - if (!(message.metricNames && message.metricNames.length)) - message.metricNames = []; - message.metricNames.push(reader.string()); + message.streamingExportEnabled = reader.bool(); break; } case 6: { - message.dimensionFilterExpression = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.decode(reader, reader.uint32()); + message.includeAdvertisingId = reader.bool(); break; } case 7: { - message.dataCollectionStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + if (!(message.exportStreams && message.exportStreams.length)) + message.exportStreams = []; + message.exportStreams.push(reader.string()); + break; + } + case 8: { + if (!(message.excludedEvents && message.excludedEvents.length)) + message.excludedEvents = []; + message.excludedEvents.push(reader.string()); break; } default: @@ -51835,187 +56955,190 @@ }; /** - * Decodes an ExpandedDataSet message from the specified reader or buffer, length delimited. + * Decodes a BigQueryLink message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * @memberof google.analytics.admin.v1alpha.BigQueryLink * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.ExpandedDataSet} ExpandedDataSet + * @returns {google.analytics.admin.v1alpha.BigQueryLink} BigQueryLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExpandedDataSet.decodeDelimited = function decodeDelimited(reader) { + BigQueryLink.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExpandedDataSet message. + * Verifies a BigQueryLink message. * @function verify - * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * @memberof google.analytics.admin.v1alpha.BigQueryLink * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExpandedDataSet.verify = function verify(message) { + BigQueryLink.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.dimensionNames != null && message.hasOwnProperty("dimensionNames")) { - if (!Array.isArray(message.dimensionNames)) - return "dimensionNames: array expected"; - for (var i = 0; i < message.dimensionNames.length; ++i) - if (!$util.isString(message.dimensionNames[i])) - return "dimensionNames: string[] expected"; - } - if (message.metricNames != null && message.hasOwnProperty("metricNames")) { - if (!Array.isArray(message.metricNames)) - return "metricNames: array expected"; - for (var i = 0; i < message.metricNames.length; ++i) - if (!$util.isString(message.metricNames[i])) - return "metricNames: string[] expected"; - } - if (message.dimensionFilterExpression != null && message.hasOwnProperty("dimensionFilterExpression")) { - var error = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.verify(message.dimensionFilterExpression); + if (message.project != null && message.hasOwnProperty("project")) + if (!$util.isString(message.project)) + return "project: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return "dimensionFilterExpression." + error; + return "createTime." + error; } - if (message.dataCollectionStartTime != null && message.hasOwnProperty("dataCollectionStartTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.dataCollectionStartTime); - if (error) - return "dataCollectionStartTime." + error; + if (message.dailyExportEnabled != null && message.hasOwnProperty("dailyExportEnabled")) + if (typeof message.dailyExportEnabled !== "boolean") + return "dailyExportEnabled: boolean expected"; + if (message.streamingExportEnabled != null && message.hasOwnProperty("streamingExportEnabled")) + if (typeof message.streamingExportEnabled !== "boolean") + return "streamingExportEnabled: boolean expected"; + if (message.includeAdvertisingId != null && message.hasOwnProperty("includeAdvertisingId")) + if (typeof message.includeAdvertisingId !== "boolean") + return "includeAdvertisingId: boolean expected"; + if (message.exportStreams != null && message.hasOwnProperty("exportStreams")) { + if (!Array.isArray(message.exportStreams)) + return "exportStreams: array expected"; + for (var i = 0; i < message.exportStreams.length; ++i) + if (!$util.isString(message.exportStreams[i])) + return "exportStreams: string[] expected"; + } + if (message.excludedEvents != null && message.hasOwnProperty("excludedEvents")) { + if (!Array.isArray(message.excludedEvents)) + return "excludedEvents: array expected"; + for (var i = 0; i < message.excludedEvents.length; ++i) + if (!$util.isString(message.excludedEvents[i])) + return "excludedEvents: string[] expected"; } return null; }; /** - * Creates an ExpandedDataSet message from a plain object. Also converts values to their respective internal types. + * Creates a BigQueryLink message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * @memberof google.analytics.admin.v1alpha.BigQueryLink * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.ExpandedDataSet} ExpandedDataSet + * @returns {google.analytics.admin.v1alpha.BigQueryLink} BigQueryLink */ - ExpandedDataSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.ExpandedDataSet) + BigQueryLink.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.BigQueryLink) return object; - var message = new $root.google.analytics.admin.v1alpha.ExpandedDataSet(); + var message = new $root.google.analytics.admin.v1alpha.BigQueryLink(); 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.dimensionNames) { - if (!Array.isArray(object.dimensionNames)) - throw TypeError(".google.analytics.admin.v1alpha.ExpandedDataSet.dimensionNames: array expected"); - message.dimensionNames = []; - for (var i = 0; i < object.dimensionNames.length; ++i) - message.dimensionNames[i] = String(object.dimensionNames[i]); - } - if (object.metricNames) { - if (!Array.isArray(object.metricNames)) - throw TypeError(".google.analytics.admin.v1alpha.ExpandedDataSet.metricNames: array expected"); - message.metricNames = []; - for (var i = 0; i < object.metricNames.length; ++i) - message.metricNames[i] = String(object.metricNames[i]); + if (object.project != null) + message.project = String(object.project); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.BigQueryLink.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.dimensionFilterExpression != null) { - if (typeof object.dimensionFilterExpression !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ExpandedDataSet.dimensionFilterExpression: object expected"); - message.dimensionFilterExpression = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.fromObject(object.dimensionFilterExpression); + if (object.dailyExportEnabled != null) + message.dailyExportEnabled = Boolean(object.dailyExportEnabled); + if (object.streamingExportEnabled != null) + message.streamingExportEnabled = Boolean(object.streamingExportEnabled); + if (object.includeAdvertisingId != null) + message.includeAdvertisingId = Boolean(object.includeAdvertisingId); + if (object.exportStreams) { + if (!Array.isArray(object.exportStreams)) + throw TypeError(".google.analytics.admin.v1alpha.BigQueryLink.exportStreams: array expected"); + message.exportStreams = []; + for (var i = 0; i < object.exportStreams.length; ++i) + message.exportStreams[i] = String(object.exportStreams[i]); } - if (object.dataCollectionStartTime != null) { - if (typeof object.dataCollectionStartTime !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ExpandedDataSet.dataCollectionStartTime: object expected"); - message.dataCollectionStartTime = $root.google.protobuf.Timestamp.fromObject(object.dataCollectionStartTime); + if (object.excludedEvents) { + if (!Array.isArray(object.excludedEvents)) + throw TypeError(".google.analytics.admin.v1alpha.BigQueryLink.excludedEvents: array expected"); + message.excludedEvents = []; + for (var i = 0; i < object.excludedEvents.length; ++i) + message.excludedEvents[i] = String(object.excludedEvents[i]); } return message; }; /** - * Creates a plain object from an ExpandedDataSet message. Also converts values to other types if specified. + * Creates a plain object from a BigQueryLink message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * @memberof google.analytics.admin.v1alpha.BigQueryLink * @static - * @param {google.analytics.admin.v1alpha.ExpandedDataSet} message ExpandedDataSet + * @param {google.analytics.admin.v1alpha.BigQueryLink} message BigQueryLink * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExpandedDataSet.toObject = function toObject(message, options) { + BigQueryLink.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { - object.dimensionNames = []; - object.metricNames = []; + object.exportStreams = []; + object.excludedEvents = []; } if (options.defaults) { object.name = ""; - object.displayName = ""; - object.description = ""; - object.dimensionFilterExpression = null; - object.dataCollectionStartTime = null; + object.project = ""; + object.createTime = null; + object.dailyExportEnabled = false; + object.streamingExportEnabled = false; + object.includeAdvertisingId = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.dimensionNames && message.dimensionNames.length) { - object.dimensionNames = []; - for (var j = 0; j < message.dimensionNames.length; ++j) - object.dimensionNames[j] = message.dimensionNames[j]; + if (message.project != null && message.hasOwnProperty("project")) + object.project = message.project; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.dailyExportEnabled != null && message.hasOwnProperty("dailyExportEnabled")) + object.dailyExportEnabled = message.dailyExportEnabled; + if (message.streamingExportEnabled != null && message.hasOwnProperty("streamingExportEnabled")) + object.streamingExportEnabled = message.streamingExportEnabled; + if (message.includeAdvertisingId != null && message.hasOwnProperty("includeAdvertisingId")) + object.includeAdvertisingId = message.includeAdvertisingId; + if (message.exportStreams && message.exportStreams.length) { + object.exportStreams = []; + for (var j = 0; j < message.exportStreams.length; ++j) + object.exportStreams[j] = message.exportStreams[j]; } - if (message.metricNames && message.metricNames.length) { - object.metricNames = []; - for (var j = 0; j < message.metricNames.length; ++j) - object.metricNames[j] = message.metricNames[j]; + if (message.excludedEvents && message.excludedEvents.length) { + object.excludedEvents = []; + for (var j = 0; j < message.excludedEvents.length; ++j) + object.excludedEvents[j] = message.excludedEvents[j]; } - if (message.dimensionFilterExpression != null && message.hasOwnProperty("dimensionFilterExpression")) - object.dimensionFilterExpression = $root.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression.toObject(message.dimensionFilterExpression, options); - if (message.dataCollectionStartTime != null && message.hasOwnProperty("dataCollectionStartTime")) - object.dataCollectionStartTime = $root.google.protobuf.Timestamp.toObject(message.dataCollectionStartTime, options); return object; }; /** - * Converts this ExpandedDataSet to JSON. + * Converts this BigQueryLink to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * @memberof google.analytics.admin.v1alpha.BigQueryLink * @instance * @returns {Object.} JSON object */ - ExpandedDataSet.prototype.toJSON = function toJSON() { + BigQueryLink.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExpandedDataSet + * Gets the default type url for BigQueryLink * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.ExpandedDataSet + * @memberof google.analytics.admin.v1alpha.BigQueryLink * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExpandedDataSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BigQueryLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.ExpandedDataSet"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.BigQueryLink"; }; - return ExpandedDataSet; + return BigQueryLink; })(); return v1alpha; diff --git a/packages/google-analytics-admin/protos/protos.json b/packages/google-analytics-admin/protos/protos.json index 570d33441c1..609517b569f 100644 --- a/packages/google-analytics-admin/protos/protos.json +++ b/packages/google-analytics-admin/protos/protos.json @@ -10,7 +10,7 @@ "options": { "go_package": "google.golang.org/genproto/googleapis/analytics/admin/v1alpha;admin", "java_multiple_files": true, - "java_outer_classname": "ExpandedDataSetProto", + "java_outer_classname": "ResourcesProto", "java_package": "com.google.analytics.admin.v1alpha" }, "nested": { @@ -1941,6 +1941,302 @@ } ] }, + "CreateAccessBinding": { + "requestType": "CreateAccessBindingRequest", + "responseType": "AccessBinding", + "options": { + "(google.api.http).post": "/v1alpha/{parent=accounts/*}/accessBindings", + "(google.api.http).body": "access_binding", + "(google.api.http).additional_bindings.post": "/v1alpha/{parent=properties/*}/accessBindings", + "(google.api.http).additional_bindings.body": "access_binding", + "(google.api.method_signature)": "parent,access_binding" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=accounts/*}/accessBindings", + "body": "access_binding", + "additional_bindings": { + "post": "/v1alpha/{parent=properties/*}/accessBindings", + "body": "access_binding" + } + } + }, + { + "(google.api.method_signature)": "parent,access_binding" + } + ] + }, + "GetAccessBinding": { + "requestType": "GetAccessBindingRequest", + "responseType": "AccessBinding", + "options": { + "(google.api.http).get": "/v1alpha/{name=accounts/*/accessBindings/*}", + "(google.api.http).additional_bindings.get": "/v1alpha/{name=properties/*/accessBindings/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=accounts/*/accessBindings/*}", + "additional_bindings": { + "get": "/v1alpha/{name=properties/*/accessBindings/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateAccessBinding": { + "requestType": "UpdateAccessBindingRequest", + "responseType": "AccessBinding", + "options": { + "(google.api.http).patch": "/v1alpha/{access_binding.name=accounts/*/accessBindings/*}", + "(google.api.http).body": "access_binding", + "(google.api.http).additional_bindings.patch": "/v1alpha/{access_binding.name=properties/*/accessBindings/*}", + "(google.api.http).additional_bindings.body": "access_binding", + "(google.api.method_signature)": "access_binding" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1alpha/{access_binding.name=accounts/*/accessBindings/*}", + "body": "access_binding", + "additional_bindings": { + "patch": "/v1alpha/{access_binding.name=properties/*/accessBindings/*}", + "body": "access_binding" + } + } + }, + { + "(google.api.method_signature)": "access_binding" + } + ] + }, + "DeleteAccessBinding": { + "requestType": "DeleteAccessBindingRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1alpha/{name=accounts/*/accessBindings/*}", + "(google.api.http).additional_bindings.delete": "/v1alpha/{name=properties/*/accessBindings/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1alpha/{name=accounts/*/accessBindings/*}", + "additional_bindings": { + "delete": "/v1alpha/{name=properties/*/accessBindings/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListAccessBindings": { + "requestType": "ListAccessBindingsRequest", + "responseType": "ListAccessBindingsResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=accounts/*}/accessBindings", + "(google.api.http).additional_bindings.get": "/v1alpha/{parent=properties/*}/accessBindings", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=accounts/*}/accessBindings", + "additional_bindings": { + "get": "/v1alpha/{parent=properties/*}/accessBindings" + } + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "BatchCreateAccessBindings": { + "requestType": "BatchCreateAccessBindingsRequest", + "responseType": "BatchCreateAccessBindingsResponse", + "options": { + "(google.api.http).post": "/v1alpha/{parent=accounts/*}/accessBindings:batchCreate", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1alpha/{parent=properties/*}/accessBindings:batchCreate", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=accounts/*}/accessBindings:batchCreate", + "body": "*", + "additional_bindings": { + "post": "/v1alpha/{parent=properties/*}/accessBindings:batchCreate", + "body": "*" + } + } + } + ] + }, + "BatchGetAccessBindings": { + "requestType": "BatchGetAccessBindingsRequest", + "responseType": "BatchGetAccessBindingsResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=accounts/*}/accessBindings:batchGet", + "(google.api.http).additional_bindings.get": "/v1alpha/{parent=properties/*}/accessBindings:batchGet" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=accounts/*}/accessBindings:batchGet", + "additional_bindings": { + "get": "/v1alpha/{parent=properties/*}/accessBindings:batchGet" + } + } + } + ] + }, + "BatchUpdateAccessBindings": { + "requestType": "BatchUpdateAccessBindingsRequest", + "responseType": "BatchUpdateAccessBindingsResponse", + "options": { + "(google.api.http).post": "/v1alpha/{parent=accounts/*}/accessBindings:batchUpdate", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1alpha/{parent=properties/*}/accessBindings:batchUpdate", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=accounts/*}/accessBindings:batchUpdate", + "body": "*", + "additional_bindings": { + "post": "/v1alpha/{parent=properties/*}/accessBindings:batchUpdate", + "body": "*" + } + } + } + ] + }, + "BatchDeleteAccessBindings": { + "requestType": "BatchDeleteAccessBindingsRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1alpha/{parent=accounts/*}/accessBindings:batchDelete", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1alpha/{parent=properties/*}/accessBindings:batchDelete", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=accounts/*}/accessBindings:batchDelete", + "body": "*", + "additional_bindings": { + "post": "/v1alpha/{parent=properties/*}/accessBindings:batchDelete", + "body": "*" + } + } + } + ] + }, + "GetExpandedDataSet": { + "requestType": "GetExpandedDataSetRequest", + "responseType": "ExpandedDataSet", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/expandedDataSets/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/expandedDataSets/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListExpandedDataSets": { + "requestType": "ListExpandedDataSetsRequest", + "responseType": "ListExpandedDataSetsResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=properties/*}/expandedDataSets", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=properties/*}/expandedDataSets" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateExpandedDataSet": { + "requestType": "CreateExpandedDataSetRequest", + "responseType": "ExpandedDataSet", + "options": { + "(google.api.http).post": "/v1alpha/{parent=properties/*}/expandedDataSets", + "(google.api.http).body": "expanded_data_set", + "(google.api.method_signature)": "parent,expanded_data_set" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=properties/*}/expandedDataSets", + "body": "expanded_data_set" + } + }, + { + "(google.api.method_signature)": "parent,expanded_data_set" + } + ] + }, + "UpdateExpandedDataSet": { + "requestType": "UpdateExpandedDataSetRequest", + "responseType": "ExpandedDataSet", + "options": { + "(google.api.http).patch": "/v1alpha/{expanded_data_set.name=properties/*/expandedDataSets/*}", + "(google.api.http).body": "expanded_data_set", + "(google.api.method_signature)": "expanded_data_set,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1alpha/{expanded_data_set.name=properties/*/expandedDataSets/*}", + "body": "expanded_data_set" + } + }, + { + "(google.api.method_signature)": "expanded_data_set,update_mask" + } + ] + }, + "DeleteExpandedDataSet": { + "requestType": "DeleteExpandedDataSetRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1alpha/{name=properties/*/expandedDataSets/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1alpha/{name=properties/*/expandedDataSets/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, "SetAutomatedGa4ConfigurationOptOut": { "requestType": "SetAutomatedGa4ConfigurationOptOutRequest", "responseType": "SetAutomatedGa4ConfigurationOptOutResponse", @@ -3725,63 +4021,56 @@ } } }, - "SetAutomatedGa4ConfigurationOptOutRequest": { + "GetAccessBindingRequest": { "fields": { - "property": { + "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/AccessBinding" } - }, - "optOut": { - "type": "bool", - "id": 2 } } }, - "SetAutomatedGa4ConfigurationOptOutResponse": { - "fields": {} - }, - "FetchAutomatedGa4ConfigurationOptOutRequest": { + "BatchGetAccessBindingsRequest": { "fields": { - "property": { + "parent": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/AccessBinding" + } + }, + "names": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/AccessBinding" } } } }, - "FetchAutomatedGa4ConfigurationOptOutResponse": { + "BatchGetAccessBindingsResponse": { "fields": { - "optOut": { - "type": "bool", + "accessBindings": { + "rule": "repeated", + "type": "AccessBinding", "id": 1 } } }, - "GetBigQueryLinkRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/BigQueryLink" - } - } - } - }, - "ListBigQueryLinksRequest": { + "ListAccessBindingsRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/BigQueryLink" + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/AccessBinding" } }, "pageSize": { @@ -3794,11 +4083,11 @@ } } }, - "ListBigQueryLinksResponse": { + "ListAccessBindingsResponse": { "fields": { - "bigqueryLinks": { + "accessBindings": { "rule": "repeated", - "type": "BigQueryLink", + "type": "AccessBinding", "id": 1 }, "nextPageToken": { @@ -3807,24 +4096,320 @@ } } }, - "AudienceFilterScope": { - "values": { - "AUDIENCE_FILTER_SCOPE_UNSPECIFIED": 0, - "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT": 1, - "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION": 2, - "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS": 3 - } - }, - "AudienceDimensionOrMetricFilter": { - "oneofs": { - "oneFilter": { - "oneof": [ - "stringFilter", - "inListFilter", - "numericFilter", - "betweenFilter" - ] - } + "CreateAccessBindingRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/AccessBinding" + } + }, + "accessBinding": { + "type": "AccessBinding", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BatchCreateAccessBindingsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/AccessBinding" + } + }, + "requests": { + "rule": "repeated", + "type": "CreateAccessBindingRequest", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BatchCreateAccessBindingsResponse": { + "fields": { + "accessBindings": { + "rule": "repeated", + "type": "AccessBinding", + "id": 1 + } + } + }, + "UpdateAccessBindingRequest": { + "fields": { + "accessBinding": { + "type": "AccessBinding", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BatchUpdateAccessBindingsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/AccessBinding" + } + }, + "requests": { + "rule": "repeated", + "type": "UpdateAccessBindingRequest", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BatchUpdateAccessBindingsResponse": { + "fields": { + "accessBindings": { + "rule": "repeated", + "type": "AccessBinding", + "id": 1 + } + } + }, + "DeleteAccessBindingRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/AccessBinding" + } + } + } + }, + "BatchDeleteAccessBindingsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/AccessBinding" + } + }, + "requests": { + "rule": "repeated", + "type": "DeleteAccessBindingRequest", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CreateExpandedDataSetRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/ExpandedDataSet" + } + }, + "expandedDataSet": { + "type": "ExpandedDataSet", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateExpandedDataSetRequest": { + "fields": { + "expandedDataSet": { + "type": "ExpandedDataSet", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteExpandedDataSetRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/ExpandedDataSet" + } + } + } + }, + "GetExpandedDataSetRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/ExpandedDataSet" + } + } + } + }, + "ListExpandedDataSetsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/ExpandedDataSet" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListExpandedDataSetsResponse": { + "fields": { + "expandedDataSets": { + "rule": "repeated", + "type": "ExpandedDataSet", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "SetAutomatedGa4ConfigurationOptOutRequest": { + "fields": { + "property": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "optOut": { + "type": "bool", + "id": 2 + } + } + }, + "SetAutomatedGa4ConfigurationOptOutResponse": { + "fields": {} + }, + "FetchAutomatedGa4ConfigurationOptOutRequest": { + "fields": { + "property": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "FetchAutomatedGa4ConfigurationOptOutResponse": { + "fields": { + "optOut": { + "type": "bool", + "id": 1 + } + } + }, + "GetBigQueryLinkRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/BigQueryLink" + } + } + } + }, + "ListBigQueryLinksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/BigQueryLink" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListBigQueryLinksResponse": { + "fields": { + "bigqueryLinks": { + "rule": "repeated", + "type": "BigQueryLink", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "AudienceFilterScope": { + "values": { + "AUDIENCE_FILTER_SCOPE_UNSPECIFIED": 0, + "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT": 1, + "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION": 2, + "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS": 3 + } + }, + "AudienceDimensionOrMetricFilter": { + "oneofs": { + "oneFilter": { + "oneof": [ + "stringFilter", + "inListFilter", + "numericFilter", + "betweenFilter" + ] + } }, "fields": { "stringFilter": { @@ -4193,10 +4778,200 @@ } } }, - "Audience": { + "Audience": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/Audience", + "(google.api.resource).pattern": "properties/{property}/audiences/{audience}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "description": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "membershipDurationDays": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "adsPersonalizationEnabled": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "eventTrigger": { + "type": "AudienceEventTrigger", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "exclusionDurationMode": { + "type": "AudienceExclusionDurationMode", + "id": 7, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "filterClauses": { + "rule": "repeated", + "type": "AudienceFilterClause", + "id": 8, + "options": { + "(google.api.field_behavior)": "UNORDERED_LIST" + } + } + }, + "nested": { + "AudienceExclusionDurationMode": { + "values": { + "AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED": 0, + "EXCLUDE_TEMPORARILY": 1, + "EXCLUDE_PERMANENTLY": 2 + } + } + } + }, + "ExpandedDataSetFilter": { + "oneofs": { + "oneFilter": { + "oneof": [ + "stringFilter", + "inListFilter" + ] + } + }, + "fields": { + "stringFilter": { + "type": "StringFilter", + "id": 2 + }, + "inListFilter": { + "type": "InListFilter", + "id": 3 + }, + "fieldName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "StringFilter": { + "fields": { + "matchType": { + "type": "MatchType", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "value": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "caseSensitive": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "MatchType": { + "values": { + "MATCH_TYPE_UNSPECIFIED": 0, + "EXACT": 1, + "CONTAINS": 2 + } + } + } + }, + "InListFilter": { + "fields": { + "values": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "caseSensitive": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "ExpandedDataSetFilterExpression": { + "oneofs": { + "expr": { + "oneof": [ + "andGroup", + "notExpression", + "filter" + ] + } + }, + "fields": { + "andGroup": { + "type": "ExpandedDataSetFilterExpressionList", + "id": 1 + }, + "notExpression": { + "type": "ExpandedDataSetFilterExpression", + "id": 2 + }, + "filter": { + "type": "ExpandedDataSetFilter", + "id": 3 + } + } + }, + "ExpandedDataSetFilterExpressionList": { + "fields": { + "filterExpressions": { + "rule": "repeated", + "type": "ExpandedDataSetFilterExpression", + "id": 1 + } + } + }, + "ExpandedDataSet": { "options": { - "(google.api.resource).type": "analyticsadmin.googleapis.com/Audience", - "(google.api.resource).pattern": "properties/{property}/audiences/{audience}" + "(google.api.resource).type": "analyticsadmin.googleapis.com/ExpandedDataSet", + "(google.api.resource).pattern": "properties/{property}/expandedDataSets/{expanded_data_set}" }, "fields": { "name": { @@ -4217,52 +4992,37 @@ "type": "string", "id": 3, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, - "membershipDurationDays": { - "type": "int32", + "dimensionNames": { + "rule": "repeated", + "type": "string", "id": 4, "options": { "(google.api.field_behavior)": "IMMUTABLE" } }, - "adsPersonalizationEnabled": { - "type": "bool", + "metricNames": { + "rule": "repeated", + "type": "string", "id": 5, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "IMMUTABLE" } }, - "eventTrigger": { - "type": "AudienceEventTrigger", + "dimensionFilterExpression": { + "type": "ExpandedDataSetFilterExpression", "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "exclusionDurationMode": { - "type": "AudienceExclusionDurationMode", - "id": 7, "options": { "(google.api.field_behavior)": "IMMUTABLE" } }, - "filterClauses": { - "rule": "repeated", - "type": "AudienceFilterClause", - "id": 8, + "dataCollectionStartTime": { + "type": "google.protobuf.Timestamp", + "id": 7, "options": { - "(google.api.field_behavior)": "UNORDERED_LIST" - } - } - }, - "nested": { - "AudienceExclusionDurationMode": { - "values": { - "AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED": 0, - "EXCLUDE_TEMPORARILY": 1, - "EXCLUDE_PERMANENTLY": 2 + "(google.api.field_behavior)": "OUTPUT_ONLY" } } } @@ -5574,6 +6334,37 @@ } } }, + "AccessBinding": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/AccessBinding", + "(google.api.resource).pattern": "properties/{property}/accessBindings/{access_binding}" + }, + "oneofs": { + "accessTarget": { + "oneof": [ + "user" + ] + } + }, + "fields": { + "user": { + "type": "string", + "id": 2 + }, + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "roles": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, "BigQueryLink": { "options": { "(google.api.resource).type": "analyticsadmin.googleapis.com/BigQueryLink", @@ -5624,181 +6415,6 @@ "id": 8 } } - }, - "ExpandedDataSetFilter": { - "oneofs": { - "oneFilter": { - "oneof": [ - "stringFilter", - "inListFilter" - ] - } - }, - "fields": { - "stringFilter": { - "type": "StringFilter", - "id": 2 - }, - "inListFilter": { - "type": "InListFilter", - "id": 3 - }, - "fieldName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - }, - "nested": { - "StringFilter": { - "fields": { - "matchType": { - "type": "MatchType", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "value": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "caseSensitive": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "MatchType": { - "values": { - "MATCH_TYPE_UNSPECIFIED": 0, - "EXACT": 1, - "CONTAINS": 2 - } - } - } - }, - "InListFilter": { - "fields": { - "values": { - "rule": "repeated", - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "caseSensitive": { - "type": "bool", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - } - } - }, - "ExpandedDataSetFilterExpression": { - "oneofs": { - "expr": { - "oneof": [ - "andGroup", - "notExpression", - "filter" - ] - } - }, - "fields": { - "andGroup": { - "type": "ExpandedDataSetFilterExpressionList", - "id": 1 - }, - "notExpression": { - "type": "ExpandedDataSetFilterExpression", - "id": 2 - }, - "filter": { - "type": "ExpandedDataSetFilter", - "id": 3 - } - } - }, - "ExpandedDataSetFilterExpressionList": { - "fields": { - "filterExpressions": { - "rule": "repeated", - "type": "ExpandedDataSetFilterExpression", - "id": 1 - } - } - }, - "ExpandedDataSet": { - "options": { - "(google.api.resource).type": "analyticsadmin.googleapis.com/ExpandedDataSet", - "(google.api.resource).pattern": "properties/{property}/expandedDataSets/{expanded_data_set}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "displayName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "description": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "dimensionNames": { - "rule": "repeated", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "metricNames": { - "rule": "repeated", - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "dimensionFilterExpression": { - "type": "ExpandedDataSetFilterExpression", - "id": 6, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "dataCollectionStartTime": { - "type": "google.protobuf.Timestamp", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } } } }, diff --git a/packages/google-analytics-admin/samples/README.md b/packages/google-analytics-admin/samples/README.md index 65afab42391..e647791e26f 100644 --- a/packages/google-analytics-admin/samples/README.md +++ b/packages/google-analytics-admin/samples/README.md @@ -18,11 +18,16 @@ * [Analytics_admin_service.archive_custom_dimension](#analytics_admin_service.archive_custom_dimension) * [Analytics_admin_service.archive_custom_metric](#analytics_admin_service.archive_custom_metric) * [Analytics_admin_service.audit_user_links](#analytics_admin_service.audit_user_links) + * [Analytics_admin_service.batch_create_access_bindings](#analytics_admin_service.batch_create_access_bindings) * [Analytics_admin_service.batch_create_user_links](#analytics_admin_service.batch_create_user_links) + * [Analytics_admin_service.batch_delete_access_bindings](#analytics_admin_service.batch_delete_access_bindings) * [Analytics_admin_service.batch_delete_user_links](#analytics_admin_service.batch_delete_user_links) + * [Analytics_admin_service.batch_get_access_bindings](#analytics_admin_service.batch_get_access_bindings) * [Analytics_admin_service.batch_get_user_links](#analytics_admin_service.batch_get_user_links) + * [Analytics_admin_service.batch_update_access_bindings](#analytics_admin_service.batch_update_access_bindings) * [Analytics_admin_service.batch_update_user_links](#analytics_admin_service.batch_update_user_links) * [Analytics_admin_service.cancel_display_video360_advertiser_link_proposal](#analytics_admin_service.cancel_display_video360_advertiser_link_proposal) + * [Analytics_admin_service.create_access_binding](#analytics_admin_service.create_access_binding) * [Analytics_admin_service.create_audience](#analytics_admin_service.create_audience) * [Analytics_admin_service.create_conversion_event](#analytics_admin_service.create_conversion_event) * [Analytics_admin_service.create_custom_dimension](#analytics_admin_service.create_custom_dimension) @@ -30,6 +35,7 @@ * [Analytics_admin_service.create_data_stream](#analytics_admin_service.create_data_stream) * [Analytics_admin_service.create_display_video360_advertiser_link](#analytics_admin_service.create_display_video360_advertiser_link) * [Analytics_admin_service.create_display_video360_advertiser_link_proposal](#analytics_admin_service.create_display_video360_advertiser_link_proposal) + * [Analytics_admin_service.create_expanded_data_set](#analytics_admin_service.create_expanded_data_set) * [Analytics_admin_service.create_firebase_link](#analytics_admin_service.create_firebase_link) * [Analytics_admin_service.create_google_ads_link](#analytics_admin_service.create_google_ads_link) * [Analytics_admin_service.create_measurement_protocol_secret](#analytics_admin_service.create_measurement_protocol_secret) @@ -37,12 +43,14 @@ * [Analytics_admin_service.create_search_ads360_link](#analytics_admin_service.create_search_ads360_link) * [Analytics_admin_service.create_user_link](#analytics_admin_service.create_user_link) * [Analytics_admin_service.create_web_data_stream](#analytics_admin_service.create_web_data_stream) + * [Analytics_admin_service.delete_access_binding](#analytics_admin_service.delete_access_binding) * [Analytics_admin_service.delete_account](#analytics_admin_service.delete_account) * [Analytics_admin_service.delete_android_app_data_stream](#analytics_admin_service.delete_android_app_data_stream) * [Analytics_admin_service.delete_conversion_event](#analytics_admin_service.delete_conversion_event) * [Analytics_admin_service.delete_data_stream](#analytics_admin_service.delete_data_stream) * [Analytics_admin_service.delete_display_video360_advertiser_link](#analytics_admin_service.delete_display_video360_advertiser_link) * [Analytics_admin_service.delete_display_video360_advertiser_link_proposal](#analytics_admin_service.delete_display_video360_advertiser_link_proposal) + * [Analytics_admin_service.delete_expanded_data_set](#analytics_admin_service.delete_expanded_data_set) * [Analytics_admin_service.delete_firebase_link](#analytics_admin_service.delete_firebase_link) * [Analytics_admin_service.delete_google_ads_link](#analytics_admin_service.delete_google_ads_link) * [Analytics_admin_service.delete_ios_app_data_stream](#analytics_admin_service.delete_ios_app_data_stream) @@ -52,6 +60,7 @@ * [Analytics_admin_service.delete_user_link](#analytics_admin_service.delete_user_link) * [Analytics_admin_service.delete_web_data_stream](#analytics_admin_service.delete_web_data_stream) * [Analytics_admin_service.fetch_automated_ga4_configuration_opt_out](#analytics_admin_service.fetch_automated_ga4_configuration_opt_out) + * [Analytics_admin_service.get_access_binding](#analytics_admin_service.get_access_binding) * [Analytics_admin_service.get_account](#analytics_admin_service.get_account) * [Analytics_admin_service.get_android_app_data_stream](#analytics_admin_service.get_android_app_data_stream) * [Analytics_admin_service.get_attribution_settings](#analytics_admin_service.get_attribution_settings) @@ -66,6 +75,7 @@ * [Analytics_admin_service.get_display_video360_advertiser_link](#analytics_admin_service.get_display_video360_advertiser_link) * [Analytics_admin_service.get_display_video360_advertiser_link_proposal](#analytics_admin_service.get_display_video360_advertiser_link_proposal) * [Analytics_admin_service.get_enhanced_measurement_settings](#analytics_admin_service.get_enhanced_measurement_settings) + * [Analytics_admin_service.get_expanded_data_set](#analytics_admin_service.get_expanded_data_set) * [Analytics_admin_service.get_global_site_tag](#analytics_admin_service.get_global_site_tag) * [Analytics_admin_service.get_google_signals_settings](#analytics_admin_service.get_google_signals_settings) * [Analytics_admin_service.get_ios_app_data_stream](#analytics_admin_service.get_ios_app_data_stream) @@ -74,6 +84,7 @@ * [Analytics_admin_service.get_search_ads360_link](#analytics_admin_service.get_search_ads360_link) * [Analytics_admin_service.get_user_link](#analytics_admin_service.get_user_link) * [Analytics_admin_service.get_web_data_stream](#analytics_admin_service.get_web_data_stream) + * [Analytics_admin_service.list_access_bindings](#analytics_admin_service.list_access_bindings) * [Analytics_admin_service.list_account_summaries](#analytics_admin_service.list_account_summaries) * [Analytics_admin_service.list_accounts](#analytics_admin_service.list_accounts) * [Analytics_admin_service.list_android_app_data_streams](#analytics_admin_service.list_android_app_data_streams) @@ -85,6 +96,7 @@ * [Analytics_admin_service.list_data_streams](#analytics_admin_service.list_data_streams) * [Analytics_admin_service.list_display_video360_advertiser_link_proposals](#analytics_admin_service.list_display_video360_advertiser_link_proposals) * [Analytics_admin_service.list_display_video360_advertiser_links](#analytics_admin_service.list_display_video360_advertiser_links) + * [Analytics_admin_service.list_expanded_data_sets](#analytics_admin_service.list_expanded_data_sets) * [Analytics_admin_service.list_firebase_links](#analytics_admin_service.list_firebase_links) * [Analytics_admin_service.list_google_ads_links](#analytics_admin_service.list_google_ads_links) * [Analytics_admin_service.list_ios_app_data_streams](#analytics_admin_service.list_ios_app_data_streams) @@ -97,6 +109,7 @@ * [Analytics_admin_service.run_access_report](#analytics_admin_service.run_access_report) * [Analytics_admin_service.search_change_history_events](#analytics_admin_service.search_change_history_events) * [Analytics_admin_service.set_automated_ga4_configuration_opt_out](#analytics_admin_service.set_automated_ga4_configuration_opt_out) + * [Analytics_admin_service.update_access_binding](#analytics_admin_service.update_access_binding) * [Analytics_admin_service.update_account](#analytics_admin_service.update_account) * [Analytics_admin_service.update_android_app_data_stream](#analytics_admin_service.update_android_app_data_stream) * [Analytics_admin_service.update_attribution_settings](#analytics_admin_service.update_attribution_settings) @@ -107,6 +120,7 @@ * [Analytics_admin_service.update_data_stream](#analytics_admin_service.update_data_stream) * [Analytics_admin_service.update_display_video360_advertiser_link](#analytics_admin_service.update_display_video360_advertiser_link) * [Analytics_admin_service.update_enhanced_measurement_settings](#analytics_admin_service.update_enhanced_measurement_settings) + * [Analytics_admin_service.update_expanded_data_set](#analytics_admin_service.update_expanded_data_set) * [Analytics_admin_service.update_google_ads_link](#analytics_admin_service.update_google_ads_link) * [Analytics_admin_service.update_google_signals_settings](#analytics_admin_service.update_google_signals_settings) * [Analytics_admin_service.update_ios_app_data_stream](#analytics_admin_service.update_ios_app_data_stream) @@ -282,6 +296,23 @@ __Usage:__ +### Analytics_admin_service.batch_create_access_bindings + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_create_access_bindings.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_create_access_bindings.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_create_access_bindings.js` + + +----- + + + + ### Analytics_admin_service.batch_create_user_links View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_create_user_links.js). @@ -299,6 +330,23 @@ __Usage:__ +### Analytics_admin_service.batch_delete_access_bindings + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_delete_access_bindings.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_delete_access_bindings.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_delete_access_bindings.js` + + +----- + + + + ### Analytics_admin_service.batch_delete_user_links View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_delete_user_links.js). @@ -316,6 +364,23 @@ __Usage:__ +### Analytics_admin_service.batch_get_access_bindings + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_get_access_bindings.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_get_access_bindings.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_get_access_bindings.js` + + +----- + + + + ### Analytics_admin_service.batch_get_user_links View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_get_user_links.js). @@ -333,6 +398,23 @@ __Usage:__ +### Analytics_admin_service.batch_update_access_bindings + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_update_access_bindings.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_update_access_bindings.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_update_access_bindings.js` + + +----- + + + + ### Analytics_admin_service.batch_update_user_links View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_update_user_links.js). @@ -367,6 +449,23 @@ __Usage:__ +### Analytics_admin_service.create_access_binding + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_access_binding.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_access_binding.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_access_binding.js` + + +----- + + + + ### Analytics_admin_service.create_audience View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_audience.js). @@ -486,6 +585,23 @@ __Usage:__ +### Analytics_admin_service.create_expanded_data_set + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_expanded_data_set.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_expanded_data_set.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_expanded_data_set.js` + + +----- + + + + ### Analytics_admin_service.create_firebase_link View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_firebase_link.js). @@ -605,6 +721,23 @@ __Usage:__ +### Analytics_admin_service.delete_access_binding + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_access_binding.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_access_binding.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_access_binding.js` + + +----- + + + + ### Analytics_admin_service.delete_account View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_account.js). @@ -707,6 +840,23 @@ __Usage:__ +### Analytics_admin_service.delete_expanded_data_set + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_expanded_data_set.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_expanded_data_set.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_expanded_data_set.js` + + +----- + + + + ### Analytics_admin_service.delete_firebase_link View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_firebase_link.js). @@ -860,6 +1010,23 @@ __Usage:__ +### Analytics_admin_service.get_access_binding + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_access_binding.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_access_binding.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_access_binding.js` + + +----- + + + + ### Analytics_admin_service.get_account View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_account.js). @@ -1098,6 +1265,23 @@ __Usage:__ +### Analytics_admin_service.get_expanded_data_set + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_expanded_data_set.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_expanded_data_set.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_expanded_data_set.js` + + +----- + + + + ### Analytics_admin_service.get_global_site_tag View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_global_site_tag.js). @@ -1234,6 +1418,23 @@ __Usage:__ +### Analytics_admin_service.list_access_bindings + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_access_bindings.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_access_bindings.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_access_bindings.js` + + +----- + + + + ### Analytics_admin_service.list_account_summaries View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_account_summaries.js). @@ -1421,6 +1622,23 @@ __Usage:__ +### Analytics_admin_service.list_expanded_data_sets + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_expanded_data_sets.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_expanded_data_sets.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_expanded_data_sets.js` + + +----- + + + + ### Analytics_admin_service.list_firebase_links View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_firebase_links.js). @@ -1625,6 +1843,23 @@ __Usage:__ +### Analytics_admin_service.update_access_binding + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_access_binding.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_access_binding.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_access_binding.js` + + +----- + + + + ### Analytics_admin_service.update_account View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_account.js). @@ -1795,6 +2030,23 @@ __Usage:__ +### Analytics_admin_service.update_expanded_data_set + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_expanded_data_set.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_expanded_data_set.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_expanded_data_set.js` + + +----- + + + + ### Analytics_admin_service.update_google_ads_link View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_google_ads_link.js). diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_create_access_bindings.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_create_access_bindings.js new file mode 100644 index 00000000000..b6cc750168a --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_create_access_bindings.js @@ -0,0 +1,71 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, requests) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchCreateAccessBindings_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 account or property that owns the access bindings. The parent + * field in the CreateAccessBindingRequest messages must either be empty or + * match this field. Formats: + * - accounts/{account} + * - properties/{property} + */ + // const parent = 'abc123' + /** + * Required. The requests specifying the access bindings to create. + * A maximum of 1000 access bindings can be created in a batch. + */ + // const requests = 1234 + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callBatchCreateAccessBindings() { + // Construct request + const request = { + parent, + requests, + }; + + // Run request + const response = await adminClient.batchCreateAccessBindings(request); + console.log(response); + } + + callBatchCreateAccessBindings(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchCreateAccessBindings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_delete_access_bindings.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_delete_access_bindings.js new file mode 100644 index 00000000000..76b3f46cf86 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_delete_access_bindings.js @@ -0,0 +1,71 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, requests) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchDeleteAccessBindings_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 account or property that owns the access bindings. The parent + * field in the DeleteAccessBindingRequest messages must either be empty or + * match this field. Formats: + * - accounts/{account} + * - properties/{property} + */ + // const parent = 'abc123' + /** + * Required. The requests specifying the access bindings to delete. + * A maximum of 1000 access bindings can be deleted in a batch. + */ + // const requests = 1234 + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callBatchDeleteAccessBindings() { + // Construct request + const request = { + parent, + requests, + }; + + // Run request + const response = await adminClient.batchDeleteAccessBindings(request); + console.log(response); + } + + callBatchDeleteAccessBindings(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchDeleteAccessBindings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_get_access_bindings.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_get_access_bindings.js new file mode 100644 index 00000000000..d161e86210b --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_get_access_bindings.js @@ -0,0 +1,74 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, names) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchGetAccessBindings_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 account or property that owns the access bindings. The parent + * of all provided values for the 'names' field must match this field. + * Formats: + * - accounts/{account} + * - properties/{property} + */ + // const parent = 'abc123' + /** + * Required. The names of the access bindings to retrieve. + * A maximum of 1000 access bindings can be retrieved in a batch. + * Formats: + * - accounts/{account}/accessBindings/{accessBinding} + * - properties/{property}/accessBindings/{accessBinding} + */ + // const names = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callBatchGetAccessBindings() { + // Construct request + const request = { + parent, + names, + }; + + // Run request + const response = await adminClient.batchGetAccessBindings(request); + console.log(response); + } + + callBatchGetAccessBindings(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchGetAccessBindings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_update_access_bindings.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_update_access_bindings.js new file mode 100644 index 00000000000..4bb6d92529a --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_update_access_bindings.js @@ -0,0 +1,71 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, requests) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchUpdateAccessBindings_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 account or property that owns the access bindings. The parent + * field in the UpdateAccessBindingRequest messages must either be empty or + * match this field. Formats: + * - accounts/{account} + * - properties/{property} + */ + // const parent = 'abc123' + /** + * Required. The requests specifying the access bindings to update. + * A maximum of 1000 access bindings can be updated in a batch. + */ + // const requests = 1234 + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callBatchUpdateAccessBindings() { + // Construct request + const request = { + parent, + requests, + }; + + // Run request + const response = await adminClient.batchUpdateAccessBindings(request); + console.log(response); + } + + callBatchUpdateAccessBindings(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchUpdateAccessBindings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_access_binding.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_access_binding.js new file mode 100644 index 00000000000..bd6831adac8 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_access_binding.js @@ -0,0 +1,68 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, accessBinding) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateAccessBinding_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. Formats: + * - accounts/{account} + * - properties/{property} + */ + // const parent = 'abc123' + /** + * Required. The access binding to create. + */ + // const accessBinding = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callCreateAccessBinding() { + // Construct request + const request = { + parent, + accessBinding, + }; + + // Run request + const response = await adminClient.createAccessBinding(request); + console.log(response); + } + + callCreateAccessBinding(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateAccessBinding_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_expanded_data_set.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_expanded_data_set.js new file mode 100644 index 00000000000..998c7143212 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_expanded_data_set.js @@ -0,0 +1,66 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, expandedDataSet) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateExpandedDataSet_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. Example format: properties/1234 + */ + // const parent = 'abc123' + /** + * Required. The ExpandedDataSet to create. + */ + // const expandedDataSet = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callCreateExpandedDataSet() { + // Construct request + const request = { + parent, + expandedDataSet, + }; + + // Run request + const response = await adminClient.createExpandedDataSet(request); + console.log(response); + } + + callCreateExpandedDataSet(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateExpandedDataSet_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_access_binding.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_access_binding.js new file mode 100644 index 00000000000..52a55931963 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_access_binding.js @@ -0,0 +1,63 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteAccessBinding_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. Formats: + * - accounts/{account}/accessBindings/{accessBinding} + * - properties/{property}/accessBindings/{accessBinding} + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callDeleteAccessBinding() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteAccessBinding(request); + console.log(response); + } + + callDeleteAccessBinding(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteAccessBinding_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_expanded_data_set.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_expanded_data_set.js new file mode 100644 index 00000000000..b72569808b2 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_expanded_data_set.js @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteExpandedDataSet_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. Example format: properties/1234/expandedDataSets/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callDeleteExpandedDataSet() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteExpandedDataSet(request); + console.log(response); + } + + callDeleteExpandedDataSet(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteExpandedDataSet_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_access_binding.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_access_binding.js new file mode 100644 index 00000000000..31b46782f6d --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_access_binding.js @@ -0,0 +1,64 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetAccessBinding_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the access binding to retrieve. + * Formats: + * - accounts/{account}/accessBindings/{accessBinding} + * - properties/{property}/accessBindings/{accessBinding} + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetAccessBinding() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getAccessBinding(request); + console.log(response); + } + + callGetAccessBinding(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetAccessBinding_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_expanded_data_set.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_expanded_data_set.js new file mode 100644 index 00000000000..96f278f0ea4 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_expanded_data_set.js @@ -0,0 +1,62 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetExpandedDataSet_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the Audience to get. + * Example format: properties/1234/expandedDataSets/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetExpandedDataSet() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getExpandedDataSet(request); + console.log(response); + } + + callGetExpandedDataSet(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetExpandedDataSet_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_access_bindings.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_access_bindings.js new file mode 100644 index 00000000000..42a759900f1 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_access_bindings.js @@ -0,0 +1,79 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAccessBindings_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. Formats: + * - accounts/{account} + * - properties/{property} + */ + // const parent = 'abc123' + /** + * The maximum number of access bindings to return. + * The service may return fewer than this value. + * If unspecified, at most 200 access bindings will be returned. + * The maximum value is 500; values above 500 will be coerced to 500. + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListAccessBindings` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAccessBindings` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListAccessBindings() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await adminClient.listAccessBindingsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAccessBindings(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAccessBindings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_expanded_data_sets.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_expanded_data_sets.js new file mode 100644 index 00000000000..3b0b6199b7c --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_expanded_data_sets.js @@ -0,0 +1,76 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListExpandedDataSets_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. Example format: properties/1234 + */ + // const parent = 'abc123' + /** + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListExpandedDataSets` call. Provide + * this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListExpandedDataSet` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListExpandedDataSets() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await adminClient.listExpandedDataSetsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListExpandedDataSets(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListExpandedDataSets_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.provision_account_ticket.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.provision_account_ticket.js index a61df8c392f..9417d872153 100644 --- a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.provision_account_ticket.js +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.provision_account_ticket.js @@ -34,7 +34,7 @@ function main() { // const account = {} /** * Redirect URI where the user will be sent after accepting Terms of Service. - * Must be configured in Developers Console as a Redirect URI + * Must be configured in Developers Console as a Redirect URI. */ // const redirectUri = 'abc123' diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.run_access_report.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.run_access_report.js index 081653dd3ad..e549cb3de55 100644 --- a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.run_access_report.js +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.run_access_report.js @@ -53,7 +53,7 @@ function main() { */ // const dateRanges = 1234 /** - * Dimension filters allow you to restrict report response to specific + * Dimension filters let you restrict report response to specific * dimension values which match the filter. For example, filtering on access * records of a single user. To learn more, see Fundamentals of Dimension * Filters (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_access_binding.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_access_binding.js new file mode 100644 index 00000000000..281f812a694 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_access_binding.js @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(accessBinding) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateAccessBinding_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 access binding to update. + */ + // const accessBinding = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callUpdateAccessBinding() { + // Construct request + const request = { + accessBinding, + }; + + // Run request + const response = await adminClient.updateAccessBinding(request); + console.log(response); + } + + callUpdateAccessBinding(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateAccessBinding_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_account.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_account.js index 857edcebdb0..c0f57011485 100644 --- a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_account.js +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_account.js @@ -35,8 +35,8 @@ function main(account, updateMask) { // const account = {} /** * Required. The list of fields to be updated. Field names must be in snake - * case (e.g., "field_to_update"). Omitted fields will not be updated. To - * replace the entire entity, use one path with the string "*" to match all + * case (for example, "field_to_update"). Omitted fields will not be updated. + * To replace the entire entity, use one path with the string "*" to match all * fields. */ // const updateMask = {} diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_expanded_data_set.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_expanded_data_set.js new file mode 100644 index 00000000000..29dd5a06ae2 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_expanded_data_set.js @@ -0,0 +1,71 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(expandedDataSet, updateMask) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateExpandedDataSet_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 ExpandedDataSet to update. + * The resource's `name` field is used to identify the ExpandedDataSet to be + * updated. + */ + // const expandedDataSet = {} + /** + * Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. + */ + // const updateMask = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callUpdateExpandedDataSet() { + // Construct request + const request = { + expandedDataSet, + updateMask, + }; + + // Run request + const response = await adminClient.updateExpandedDataSet(request); + console.log(response); + } + + callUpdateExpandedDataSet(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateExpandedDataSet_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata.google.analytics.admin.v1alpha.json b/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata.google.analytics.admin.v1alpha.json index 0d7dd7891b1..f527af1fd48 100644 --- a/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata.google.analytics.admin.v1alpha.json +++ b/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata.google.analytics.admin.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-admin", - "version": "4.5.0", + "version": "4.5.1", "language": "TYPESCRIPT", "apis": [ { @@ -1539,7 +1539,7 @@ "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_AcknowledgeUserDataCollection_async", "title": "AnalyticsAdminService acknowledgeUserDataCollection Sample", "origin": "API_DEFINITION", - "description": " Acknowledges the terms of user data collection for the specified property. This acknowledgement must be completed (either in the Google Analytics UI or via this API) before MeasurementProtocolSecret resources may be created.", + "description": " Acknowledges the terms of user data collection for the specified property. This acknowledgement must be completed (either in the Google Analytics UI or through this API) before MeasurementProtocolSecret resources may be created.", "canonical": true, "file": "analytics_admin_service.acknowledge_user_data_collection.js", "language": "JAVASCRIPT", @@ -3703,6 +3703,610 @@ } } }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateAccessBinding_async", + "title": "AnalyticsAdminService createAccessBinding Sample", + "origin": "API_DEFINITION", + "description": " Creates an access binding on an account or property.", + "canonical": true, + "file": "analytics_admin_service.create_access_binding.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAccessBinding", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateAccessBinding", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "access_binding", + "type": ".google.analytics.admin.v1alpha.AccessBinding" + } + ], + "resultType": ".google.analytics.admin.v1alpha.AccessBinding", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "CreateAccessBinding", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateAccessBinding", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetAccessBinding_async", + "title": "AnalyticsAdminService getAccessBinding Sample", + "origin": "API_DEFINITION", + "description": " Gets information about an access binding.", + "canonical": true, + "file": "analytics_admin_service.get_access_binding.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAccessBinding", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetAccessBinding", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.AccessBinding", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetAccessBinding", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetAccessBinding", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateAccessBinding_async", + "title": "AnalyticsAdminService updateAccessBinding Sample", + "origin": "API_DEFINITION", + "description": " Updates an access binding on an account or property.", + "canonical": true, + "file": "analytics_admin_service.update_access_binding.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateAccessBinding", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateAccessBinding", + "async": true, + "parameters": [ + { + "name": "access_binding", + "type": ".google.analytics.admin.v1alpha.AccessBinding" + } + ], + "resultType": ".google.analytics.admin.v1alpha.AccessBinding", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "UpdateAccessBinding", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateAccessBinding", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteAccessBinding_async", + "title": "AnalyticsAdminService deleteAccessBinding Sample", + "origin": "API_DEFINITION", + "description": " Deletes an access binding on an account or property.", + "canonical": true, + "file": "analytics_admin_service.delete_access_binding.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteAccessBinding", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteAccessBinding", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "DeleteAccessBinding", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteAccessBinding", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAccessBindings_async", + "title": "AnalyticsAdminService listAccessBindings Sample", + "origin": "API_DEFINITION", + "description": " Lists all access bindings on an account or property.", + "canonical": true, + "file": "analytics_admin_service.list_access_bindings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAccessBindings", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListAccessBindings", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.ListAccessBindingsResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ListAccessBindings", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListAccessBindings", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchCreateAccessBindings_async", + "title": "AnalyticsAdminService batchCreateAccessBindings Sample", + "origin": "API_DEFINITION", + "description": " Creates information about multiple access bindings to an account or property. This method is transactional. If any AccessBinding cannot be created, none of the AccessBindings will be created.", + "canonical": true, + "file": "analytics_admin_service.batch_create_access_bindings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchCreateAccessBindings", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.BatchCreateAccessBindings", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "BatchCreateAccessBindings", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.BatchCreateAccessBindings", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchGetAccessBindings_async", + "title": "AnalyticsAdminService batchGetAccessBindings Sample", + "origin": "API_DEFINITION", + "description": " Gets information about multiple access bindings to an account or property.", + "canonical": true, + "file": "analytics_admin_service.batch_get_access_bindings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchGetAccessBindings", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.BatchGetAccessBindings", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "names", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "BatchGetAccessBindings", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.BatchGetAccessBindings", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchUpdateAccessBindings_async", + "title": "AnalyticsAdminService batchUpdateAccessBindings Sample", + "origin": "API_DEFINITION", + "description": " Updates information about multiple access bindings to an account or property.", + "canonical": true, + "file": "analytics_admin_service.batch_update_access_bindings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchUpdateAccessBindings", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.BatchUpdateAccessBindings", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "BatchUpdateAccessBindings", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.BatchUpdateAccessBindings", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchDeleteAccessBindings_async", + "title": "AnalyticsAdminService batchDeleteAccessBindings Sample", + "origin": "API_DEFINITION", + "description": " Deletes information about multiple users' links to an account or property.", + "canonical": true, + "file": "analytics_admin_service.batch_delete_access_bindings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchDeleteAccessBindings", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.BatchDeleteAccessBindings", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "BatchDeleteAccessBindings", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.BatchDeleteAccessBindings", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetExpandedDataSet_async", + "title": "AnalyticsAdminService getExpandedDataSet Sample", + "origin": "API_DEFINITION", + "description": " Lookup for a single ExpandedDataSet.", + "canonical": true, + "file": "analytics_admin_service.get_expanded_data_set.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetExpandedDataSet", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetExpandedDataSet", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.ExpandedDataSet", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetExpandedDataSet", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetExpandedDataSet", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListExpandedDataSets_async", + "title": "AnalyticsAdminService listExpandedDataSets Sample", + "origin": "API_DEFINITION", + "description": " Lists ExpandedDataSets on a property.", + "canonical": true, + "file": "analytics_admin_service.list_expanded_data_sets.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListExpandedDataSets", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListExpandedDataSets", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.ListExpandedDataSetsResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ListExpandedDataSets", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListExpandedDataSets", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateExpandedDataSet_async", + "title": "AnalyticsAdminService createExpandedDataSet Sample", + "origin": "API_DEFINITION", + "description": " Creates a ExpandedDataSet.", + "canonical": true, + "file": "analytics_admin_service.create_expanded_data_set.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateExpandedDataSet", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateExpandedDataSet", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "expanded_data_set", + "type": ".google.analytics.admin.v1alpha.ExpandedDataSet" + } + ], + "resultType": ".google.analytics.admin.v1alpha.ExpandedDataSet", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "CreateExpandedDataSet", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateExpandedDataSet", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateExpandedDataSet_async", + "title": "AnalyticsAdminService updateExpandedDataSet Sample", + "origin": "API_DEFINITION", + "description": " Updates a ExpandedDataSet on a property.", + "canonical": true, + "file": "analytics_admin_service.update_expanded_data_set.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateExpandedDataSet", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateExpandedDataSet", + "async": true, + "parameters": [ + { + "name": "expanded_data_set", + "type": ".google.analytics.admin.v1alpha.ExpandedDataSet" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.analytics.admin.v1alpha.ExpandedDataSet", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "UpdateExpandedDataSet", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateExpandedDataSet", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteExpandedDataSet_async", + "title": "AnalyticsAdminService deleteExpandedDataSet Sample", + "origin": "API_DEFINITION", + "description": " Deletes a ExpandedDataSet on a property.", + "canonical": true, + "file": "analytics_admin_service.delete_expanded_data_set.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteExpandedDataSet", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteExpandedDataSet", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "DeleteExpandedDataSet", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteExpandedDataSet", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, { "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_SetAutomatedGa4ConfigurationOptOut_async", "title": "AnalyticsAdminService setAutomatedGa4ConfigurationOptOut Sample", diff --git a/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata.google.analytics.admin.v1beta.json b/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata.google.analytics.admin.v1beta.json index ceb9e7998ca..744e20b0981 100644 --- a/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata.google.analytics.admin.v1beta.json +++ b/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata.google.analytics.admin.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-admin", - "version": "4.5.0", + "version": "4.5.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_client.ts b/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_client.ts index 311c3ab0643..9f33ef1fc9a 100644 --- a/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_client.ts +++ b/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_client.ts @@ -182,6 +182,9 @@ export class AnalyticsAdminServiceClient { accountPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}' ), + accountAccessBindingPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/accessBindings/{access_binding}' + ), accountSummaryPathTemplate: new this._gaxModule.PathTemplate( 'accountSummaries/{account_summary}' ), @@ -244,6 +247,9 @@ export class AnalyticsAdminServiceClient { propertyPathTemplate: new this._gaxModule.PathTemplate( 'properties/{property}' ), + propertyAccessBindingPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/accessBindings/{access_binding}' + ), propertyUserLinkPathTemplate: new this._gaxModule.PathTemplate( 'properties/{property}/userLinks/{user_link}' ), @@ -342,6 +348,16 @@ export class AnalyticsAdminServiceClient { 'nextPageToken', 'searchAds_360Links' ), + listAccessBindings: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'accessBindings' + ), + listExpandedDataSets: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'expandedDataSets' + ), listBigQueryLinks: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', @@ -484,6 +500,20 @@ export class AnalyticsAdminServiceClient { 'getAttributionSettings', 'updateAttributionSettings', 'runAccessReport', + 'createAccessBinding', + 'getAccessBinding', + 'updateAccessBinding', + 'deleteAccessBinding', + 'listAccessBindings', + 'batchCreateAccessBindings', + 'batchGetAccessBindings', + 'batchUpdateAccessBindings', + 'batchDeleteAccessBindings', + 'getExpandedDataSet', + 'listExpandedDataSets', + 'createExpandedDataSet', + 'updateExpandedDataSet', + 'deleteExpandedDataSet', 'setAutomatedGa4ConfigurationOptOut', 'fetchAutomatedGa4ConfigurationOptOut', 'getBigQueryLink', @@ -782,8 +812,8 @@ export class AnalyticsAdminServiceClient { * The account's `name` field is used to identify the account. * @param {google.protobuf.FieldMask} request.updateMask * Required. The list of fields to be updated. Field names must be in snake - * case (e.g., "field_to_update"). Omitted fields will not be updated. To - * replace the entire entity, use one path with the string "*" to match all + * case (for example, "field_to_update"). Omitted fields will not be updated. + * To replace the entire entity, use one path with the string "*" to match all * fields. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -878,7 +908,7 @@ export class AnalyticsAdminServiceClient { * The account to create. * @param {string} request.redirectUri * Redirect URI where the user will be sent after accepting Terms of Service. - * Must be configured in Developers Console as a Redirect URI + * Must be configured in Developers Console as a Redirect URI. * @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. @@ -3265,7 +3295,8 @@ export class AnalyticsAdminServiceClient { * Acknowledges the terms of user data collection for the specified property. * * This acknowledgement must be completed (either in the Google Analytics UI - * or via this API) before MeasurementProtocolSecret resources may be created. + * or through this API) before MeasurementProtocolSecret resources may be + * created. * * @param {Object} request * The request object that will be sent. @@ -7235,7 +7266,7 @@ export class AnalyticsAdminServiceClient { * included in the response rows for both date ranges. Requests are allowed up * to 2 date ranges. * @param {google.analytics.admin.v1alpha.AccessFilterExpression} request.dimensionFilter - * Dimension filters allow you to restrict report response to specific + * Dimension filters let you restrict report response to specific * dimension values which match the filter. For example, filtering on access * records of a single user. To learn more, see [Fundamentals of Dimension * Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) @@ -7363,86 +7394,83 @@ export class AnalyticsAdminServiceClient { return this.innerApiCalls.runAccessReport(request, options, callback); } /** - * Sets the opt out status for the automated GA4 setup process for a UA - * property. - * Note: this has no effect on GA4 property. + * Creates an access binding on an account or property. * * @param {Object} request * The request object that will be sent. - * @param {string} request.property - * Required. The UA property to set the opt out status. Note this request uses - * the internal property ID, not the tracking ID of the form UA-XXXXXX-YY. - * Format: properties/{internalWebPropertyId} - * Example: properties/1234 - * @param {boolean} request.optOut - * The status to set. + * @param {string} request.parent + * Required. Formats: + * - accounts/{account} + * - properties/{property} + * @param {google.analytics.admin.v1alpha.AccessBinding} request.accessBinding + * Required. The access binding to create. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse | SetAutomatedGa4ConfigurationOptOutResponse}. + * The first element of the array is an object representing {@link google.analytics.admin.v1alpha.AccessBinding | AccessBinding}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.set_automated_ga4_configuration_opt_out.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_SetAutomatedGa4ConfigurationOptOut_async + * @example include:samples/generated/v1alpha/analytics_admin_service.create_access_binding.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateAccessBinding_async */ - setAutomatedGa4ConfigurationOptOut( - request?: protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest, + createAccessBinding( + request?: protos.google.analytics.admin.v1alpha.ICreateAccessBindingRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, + protos.google.analytics.admin.v1alpha.IAccessBinding, ( - | protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest + | protos.google.analytics.admin.v1alpha.ICreateAccessBindingRequest | undefined ), {} | undefined ] >; - setAutomatedGa4ConfigurationOptOut( - request: protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest, + createAccessBinding( + request: protos.google.analytics.admin.v1alpha.ICreateAccessBindingRequest, options: CallOptions, callback: Callback< - protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, - | protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest + protos.google.analytics.admin.v1alpha.IAccessBinding, + | protos.google.analytics.admin.v1alpha.ICreateAccessBindingRequest | null | undefined, {} | null | undefined > ): void; - setAutomatedGa4ConfigurationOptOut( - request: protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest, + createAccessBinding( + request: protos.google.analytics.admin.v1alpha.ICreateAccessBindingRequest, callback: Callback< - protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, - | protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest + protos.google.analytics.admin.v1alpha.IAccessBinding, + | protos.google.analytics.admin.v1alpha.ICreateAccessBindingRequest | null | undefined, {} | null | undefined > ): void; - setAutomatedGa4ConfigurationOptOut( - request?: protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest, + createAccessBinding( + request?: protos.google.analytics.admin.v1alpha.ICreateAccessBindingRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, - | protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest + protos.google.analytics.admin.v1alpha.IAccessBinding, + | protos.google.analytics.admin.v1alpha.ICreateAccessBindingRequest | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, - | protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest + protos.google.analytics.admin.v1alpha.IAccessBinding, + | protos.google.analytics.admin.v1alpha.ICreateAccessBindingRequest | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, + protos.google.analytics.admin.v1alpha.IAccessBinding, ( - | protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest + | protos.google.analytics.admin.v1alpha.ICreateAccessBindingRequest | undefined ), {} | undefined @@ -7459,92 +7487,90 @@ export class AnalyticsAdminServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); this.initialize(); - return this.innerApiCalls.setAutomatedGa4ConfigurationOptOut( - request, - options, - callback - ); + return this.innerApiCalls.createAccessBinding(request, options, callback); } /** - * Fetches the opt out status for the automated GA4 setup process for a UA - * property. - * Note: this has no effect on GA4 property. + * Gets information about an access binding. * * @param {Object} request * The request object that will be sent. - * @param {string} request.property - * Required. The UA property to get the opt out status. Note this request uses - * the internal property ID, not the tracking ID of the form UA-XXXXXX-YY. - * Format: properties/{internalWebPropertyId} - * Example: properties/1234 + * @param {string} request.name + * Required. The name of the access binding to retrieve. + * Formats: + * - accounts/{account}/accessBindings/{accessBinding} + * - properties/{property}/accessBindings/{accessBinding} * @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.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse | FetchAutomatedGa4ConfigurationOptOutResponse}. + * The first element of the array is an object representing {@link google.analytics.admin.v1alpha.AccessBinding | AccessBinding}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.fetch_automated_ga4_configuration_opt_out.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_FetchAutomatedGa4ConfigurationOptOut_async + * @example include:samples/generated/v1alpha/analytics_admin_service.get_access_binding.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetAccessBinding_async */ - fetchAutomatedGa4ConfigurationOptOut( - request?: protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest, + getAccessBinding( + request?: protos.google.analytics.admin.v1alpha.IGetAccessBindingRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, + protos.google.analytics.admin.v1alpha.IAccessBinding, ( - | protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest + | protos.google.analytics.admin.v1alpha.IGetAccessBindingRequest | undefined ), {} | undefined ] >; - fetchAutomatedGa4ConfigurationOptOut( - request: protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest, + getAccessBinding( + request: protos.google.analytics.admin.v1alpha.IGetAccessBindingRequest, options: CallOptions, callback: Callback< - protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, - | protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest + protos.google.analytics.admin.v1alpha.IAccessBinding, + | protos.google.analytics.admin.v1alpha.IGetAccessBindingRequest | null | undefined, {} | null | undefined > ): void; - fetchAutomatedGa4ConfigurationOptOut( - request: protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest, + getAccessBinding( + request: protos.google.analytics.admin.v1alpha.IGetAccessBindingRequest, callback: Callback< - protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, - | protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest + protos.google.analytics.admin.v1alpha.IAccessBinding, + | protos.google.analytics.admin.v1alpha.IGetAccessBindingRequest | null | undefined, {} | null | undefined > ): void; - fetchAutomatedGa4ConfigurationOptOut( - request?: protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest, + getAccessBinding( + request?: protos.google.analytics.admin.v1alpha.IGetAccessBindingRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, - | protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest + protos.google.analytics.admin.v1alpha.IAccessBinding, + | protos.google.analytics.admin.v1alpha.IGetAccessBindingRequest | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, - | protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest + protos.google.analytics.admin.v1alpha.IAccessBinding, + | protos.google.analytics.admin.v1alpha.IGetAccessBindingRequest | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, + protos.google.analytics.admin.v1alpha.IAccessBinding, ( - | protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest + | protos.google.analytics.admin.v1alpha.IGetAccessBindingRequest | undefined ), {} | undefined @@ -7561,85 +7587,89 @@ export class AnalyticsAdminServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); this.initialize(); - return this.innerApiCalls.fetchAutomatedGa4ConfigurationOptOut( - request, - options, - callback - ); + return this.innerApiCalls.getAccessBinding(request, options, callback); } /** - * Lookup for a single BigQuery Link. + * Updates an access binding on an account or property. * * @param {Object} request * The request object that will be sent. - * @param {string} request.name - * Required. The name of the BigQuery link to lookup. - * Format: properties/{property_id}/bigQueryLinks/{bigquery_link_id} - * Example: properties/123/bigQueryLinks/456 + * @param {google.analytics.admin.v1alpha.AccessBinding} request.accessBinding + * Required. The access binding to update. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.analytics.admin.v1alpha.BigQueryLink | BigQueryLink}. + * The first element of the array is an object representing {@link google.analytics.admin.v1alpha.AccessBinding | AccessBinding}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.get_big_query_link.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetBigQueryLink_async + * @example include:samples/generated/v1alpha/analytics_admin_service.update_access_binding.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateAccessBinding_async */ - getBigQueryLink( - request?: protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest, + updateAccessBinding( + request?: protos.google.analytics.admin.v1alpha.IUpdateAccessBindingRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IBigQueryLink, - protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest | undefined, + protos.google.analytics.admin.v1alpha.IAccessBinding, + ( + | protos.google.analytics.admin.v1alpha.IUpdateAccessBindingRequest + | undefined + ), {} | undefined ] >; - getBigQueryLink( - request: protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest, + updateAccessBinding( + request: protos.google.analytics.admin.v1alpha.IUpdateAccessBindingRequest, options: CallOptions, callback: Callback< - protos.google.analytics.admin.v1alpha.IBigQueryLink, - | protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest + protos.google.analytics.admin.v1alpha.IAccessBinding, + | protos.google.analytics.admin.v1alpha.IUpdateAccessBindingRequest | null | undefined, {} | null | undefined > ): void; - getBigQueryLink( - request: protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest, + updateAccessBinding( + request: protos.google.analytics.admin.v1alpha.IUpdateAccessBindingRequest, callback: Callback< - protos.google.analytics.admin.v1alpha.IBigQueryLink, - | protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest + protos.google.analytics.admin.v1alpha.IAccessBinding, + | protos.google.analytics.admin.v1alpha.IUpdateAccessBindingRequest | null | undefined, {} | null | undefined > ): void; - getBigQueryLink( - request?: protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest, + updateAccessBinding( + request?: protos.google.analytics.admin.v1alpha.IUpdateAccessBindingRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.analytics.admin.v1alpha.IBigQueryLink, - | protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest + protos.google.analytics.admin.v1alpha.IAccessBinding, + | protos.google.analytics.admin.v1alpha.IUpdateAccessBindingRequest | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.analytics.admin.v1alpha.IBigQueryLink, - | protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest + protos.google.analytics.admin.v1alpha.IAccessBinding, + | protos.google.analytics.admin.v1alpha.IUpdateAccessBindingRequest | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.analytics.admin.v1alpha.IBigQueryLink, - protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest | undefined, + protos.google.analytics.admin.v1alpha.IAccessBinding, + ( + | protos.google.analytics.admin.v1alpha.IUpdateAccessBindingRequest + | undefined + ), {} | undefined ] > | void { @@ -7656,102 +7686,90 @@ export class AnalyticsAdminServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', + 'access_binding.name': request.accessBinding!.name ?? '', }); this.initialize(); - return this.innerApiCalls.getBigQueryLink(request, options, callback); + return this.innerApiCalls.updateAccessBinding(request, options, callback); } - /** - * Returns all accounts accessible by the caller. - * - * Note that these accounts might not currently have GA4 properties. - * Soft-deleted (ie: "trashed") accounts are excluded by default. - * Returns an empty list if no relevant accounts are found. + * Deletes an access binding on an account or property. * * @param {Object} request * The request object that will be sent. - * @param {number} request.pageSize - * The maximum number of resources to return. The service may return - * fewer than this value, even if there are additional pages. - * If unspecified, at most 50 resources will be returned. - * The maximum value is 200; (higher values will be coerced to the maximum) - * @param {string} request.pageToken - * A page token, received from a previous `ListAccounts` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListAccounts` must - * match the call that provided the page token. - * @param {boolean} request.showDeleted - * Whether to include soft-deleted (ie: "trashed") Accounts in the - * results. Accounts can be inspected to determine whether they are deleted or - * not. + * @param {string} request.name + * Required. Formats: + * - accounts/{account}/accessBindings/{accessBinding} + * - properties/{property}/accessBindings/{accessBinding} * @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 google.analytics.admin.v1alpha.Account | Account}. - * 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 `listAccountsAsync()` - * method described below for async iteration which you can stop as needed. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.delete_access_binding.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteAccessBinding_async */ - listAccounts( - request?: protos.google.analytics.admin.v1alpha.IListAccountsRequest, + deleteAccessBinding( + request?: protos.google.analytics.admin.v1alpha.IDeleteAccessBindingRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IAccount[], - protos.google.analytics.admin.v1alpha.IListAccountsRequest | null, - protos.google.analytics.admin.v1alpha.IListAccountsResponse + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IDeleteAccessBindingRequest + | undefined + ), + {} | undefined ] >; - listAccounts( - request: protos.google.analytics.admin.v1alpha.IListAccountsRequest, + deleteAccessBinding( + request: protos.google.analytics.admin.v1alpha.IDeleteAccessBindingRequest, options: CallOptions, - callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListAccountsRequest, - | protos.google.analytics.admin.v1alpha.IListAccountsResponse + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteAccessBindingRequest | null | undefined, - protos.google.analytics.admin.v1alpha.IAccount + {} | null | undefined > ): void; - listAccounts( - request: protos.google.analytics.admin.v1alpha.IListAccountsRequest, - callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListAccountsRequest, - | protos.google.analytics.admin.v1alpha.IListAccountsResponse + deleteAccessBinding( + request: protos.google.analytics.admin.v1alpha.IDeleteAccessBindingRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteAccessBindingRequest | null | undefined, - protos.google.analytics.admin.v1alpha.IAccount + {} | null | undefined > ): void; - listAccounts( - request?: protos.google.analytics.admin.v1alpha.IListAccountsRequest, + deleteAccessBinding( + request?: protos.google.analytics.admin.v1alpha.IDeleteAccessBindingRequest, optionsOrCallback?: | CallOptions - | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListAccountsRequest, - | protos.google.analytics.admin.v1alpha.IListAccountsResponse + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteAccessBindingRequest | null | undefined, - protos.google.analytics.admin.v1alpha.IAccount + {} | null | undefined >, - callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListAccountsRequest, - | protos.google.analytics.admin.v1alpha.IListAccountsResponse + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteAccessBindingRequest | null | undefined, - protos.google.analytics.admin.v1alpha.IAccount + {} | null | undefined > ): Promise< [ - protos.google.analytics.admin.v1alpha.IAccount[], - protos.google.analytics.admin.v1alpha.IListAccountsRequest | null, - protos.google.analytics.admin.v1alpha.IListAccountsResponse + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IDeleteAccessBindingRequest + | undefined + ), + {} | undefined ] > | void { request = request || {}; @@ -7765,190 +7783,1886 @@ export class AnalyticsAdminServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); this.initialize(); - return this.innerApiCalls.listAccounts(request, options, callback); + return this.innerApiCalls.deleteAccessBinding(request, options, callback); } - /** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * Creates information about multiple access bindings to an account or + * property. + * + * This method is transactional. If any AccessBinding cannot be created, none + * of the AccessBindings will be created. + * * @param {Object} request * The request object that will be sent. - * @param {number} request.pageSize - * The maximum number of resources to return. The service may return - * fewer than this value, even if there are additional pages. - * If unspecified, at most 50 resources will be returned. - * The maximum value is 200; (higher values will be coerced to the maximum) - * @param {string} request.pageToken - * A page token, received from a previous `ListAccounts` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListAccounts` must - * match the call that provided the page token. - * @param {boolean} request.showDeleted - * Whether to include soft-deleted (ie: "trashed") Accounts in the - * results. Accounts can be inspected to determine whether they are deleted or - * not. + * @param {string} request.parent + * Required. The account or property that owns the access bindings. The parent + * field in the CreateAccessBindingRequest messages must either be empty or + * match this field. Formats: + * - accounts/{account} + * - properties/{property} + * @param {number[]} request.requests + * Required. The requests specifying the access bindings to create. + * A maximum of 1000 access bindings can be created in a batch. * @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 google.analytics.admin.v1alpha.Account | Account} 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 `listAccountsAsync()` - * method described below for async iteration which you can stop as needed. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse | BatchCreateAccessBindingsResponse}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.batch_create_access_bindings.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchCreateAccessBindings_async */ - listAccountsStream( - request?: protos.google.analytics.admin.v1alpha.IListAccountsRequest, + batchCreateAccessBindings( + request?: protos.google.analytics.admin.v1alpha.IBatchCreateAccessBindingsRequest, options?: CallOptions - ): Transform { - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - const defaultCallSettings = this._defaults['listAccounts']; - const callSettings = defaultCallSettings.merge(options); + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IBatchCreateAccessBindingsResponse, + ( + | protos.google.analytics.admin.v1alpha.IBatchCreateAccessBindingsRequest + | undefined + ), + {} | undefined + ] + >; + batchCreateAccessBindings( + request: protos.google.analytics.admin.v1alpha.IBatchCreateAccessBindingsRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IBatchCreateAccessBindingsResponse, + | protos.google.analytics.admin.v1alpha.IBatchCreateAccessBindingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + batchCreateAccessBindings( + request: protos.google.analytics.admin.v1alpha.IBatchCreateAccessBindingsRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IBatchCreateAccessBindingsResponse, + | protos.google.analytics.admin.v1alpha.IBatchCreateAccessBindingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + batchCreateAccessBindings( + request?: protos.google.analytics.admin.v1alpha.IBatchCreateAccessBindingsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IBatchCreateAccessBindingsResponse, + | protos.google.analytics.admin.v1alpha.IBatchCreateAccessBindingsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IBatchCreateAccessBindingsResponse, + | protos.google.analytics.admin.v1alpha.IBatchCreateAccessBindingsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IBatchCreateAccessBindingsResponse, + ( + | protos.google.analytics.admin.v1alpha.IBatchCreateAccessBindingsRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.batchCreateAccessBindings( + request, + options, + callback + ); + } + /** + * Gets information about multiple access bindings to an account or property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The account or property that owns the access bindings. The parent + * of all provided values for the 'names' field must match this field. + * Formats: + * - accounts/{account} + * - properties/{property} + * @param {string[]} request.names + * Required. The names of the access bindings to retrieve. + * A maximum of 1000 access bindings can be retrieved in a batch. + * Formats: + * - accounts/{account}/accessBindings/{accessBinding} + * - properties/{property}/accessBindings/{accessBinding} + * @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.analytics.admin.v1alpha.BatchGetAccessBindingsResponse | BatchGetAccessBindingsResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.batch_get_access_bindings.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchGetAccessBindings_async + */ + batchGetAccessBindings( + request?: protos.google.analytics.admin.v1alpha.IBatchGetAccessBindingsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IBatchGetAccessBindingsResponse, + ( + | protos.google.analytics.admin.v1alpha.IBatchGetAccessBindingsRequest + | undefined + ), + {} | undefined + ] + >; + batchGetAccessBindings( + request: protos.google.analytics.admin.v1alpha.IBatchGetAccessBindingsRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IBatchGetAccessBindingsResponse, + | protos.google.analytics.admin.v1alpha.IBatchGetAccessBindingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + batchGetAccessBindings( + request: protos.google.analytics.admin.v1alpha.IBatchGetAccessBindingsRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IBatchGetAccessBindingsResponse, + | protos.google.analytics.admin.v1alpha.IBatchGetAccessBindingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + batchGetAccessBindings( + request?: protos.google.analytics.admin.v1alpha.IBatchGetAccessBindingsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IBatchGetAccessBindingsResponse, + | protos.google.analytics.admin.v1alpha.IBatchGetAccessBindingsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IBatchGetAccessBindingsResponse, + | protos.google.analytics.admin.v1alpha.IBatchGetAccessBindingsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IBatchGetAccessBindingsResponse, + ( + | protos.google.analytics.admin.v1alpha.IBatchGetAccessBindingsRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.batchGetAccessBindings( + request, + options, + callback + ); + } + /** + * Updates information about multiple access bindings to an account or + * property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The account or property that owns the access bindings. The parent + * field in the UpdateAccessBindingRequest messages must either be empty or + * match this field. Formats: + * - accounts/{account} + * - properties/{property} + * @param {number[]} request.requests + * Required. The requests specifying the access bindings to update. + * A maximum of 1000 access bindings can be updated in a batch. + * @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.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse | BatchUpdateAccessBindingsResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.batch_update_access_bindings.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchUpdateAccessBindings_async + */ + batchUpdateAccessBindings( + request?: protos.google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsResponse, + ( + | protos.google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsRequest + | undefined + ), + {} | undefined + ] + >; + batchUpdateAccessBindings( + request: protos.google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsResponse, + | protos.google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + batchUpdateAccessBindings( + request: protos.google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsResponse, + | protos.google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + batchUpdateAccessBindings( + request?: protos.google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsResponse, + | protos.google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsResponse, + | protos.google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsResponse, + ( + | protos.google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.batchUpdateAccessBindings( + request, + options, + callback + ); + } + /** + * Deletes information about multiple users' links to an account or property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The account or property that owns the access bindings. The parent + * field in the DeleteAccessBindingRequest messages must either be empty or + * match this field. Formats: + * - accounts/{account} + * - properties/{property} + * @param {number[]} request.requests + * Required. The requests specifying the access bindings to delete. + * A maximum of 1000 access bindings can be deleted in a batch. + * @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.protobuf.Empty | Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.batch_delete_access_bindings.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchDeleteAccessBindings_async + */ + batchDeleteAccessBindings( + request?: protos.google.analytics.admin.v1alpha.IBatchDeleteAccessBindingsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IBatchDeleteAccessBindingsRequest + | undefined + ), + {} | undefined + ] + >; + batchDeleteAccessBindings( + request: protos.google.analytics.admin.v1alpha.IBatchDeleteAccessBindingsRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IBatchDeleteAccessBindingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + batchDeleteAccessBindings( + request: protos.google.analytics.admin.v1alpha.IBatchDeleteAccessBindingsRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IBatchDeleteAccessBindingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + batchDeleteAccessBindings( + request?: protos.google.analytics.admin.v1alpha.IBatchDeleteAccessBindingsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IBatchDeleteAccessBindingsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IBatchDeleteAccessBindingsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IBatchDeleteAccessBindingsRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.batchDeleteAccessBindings( + request, + options, + callback + ); + } + /** + * Lookup for a single ExpandedDataSet. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the Audience to get. + * Example format: properties/1234/expandedDataSets/5678 + * @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.analytics.admin.v1alpha.ExpandedDataSet | ExpandedDataSet}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.get_expanded_data_set.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetExpandedDataSet_async + */ + getExpandedDataSet( + request?: protos.google.analytics.admin.v1alpha.IGetExpandedDataSetRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IExpandedDataSet, + ( + | protos.google.analytics.admin.v1alpha.IGetExpandedDataSetRequest + | undefined + ), + {} | undefined + ] + >; + getExpandedDataSet( + request: protos.google.analytics.admin.v1alpha.IGetExpandedDataSetRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IExpandedDataSet, + | protos.google.analytics.admin.v1alpha.IGetExpandedDataSetRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getExpandedDataSet( + request: protos.google.analytics.admin.v1alpha.IGetExpandedDataSetRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IExpandedDataSet, + | protos.google.analytics.admin.v1alpha.IGetExpandedDataSetRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getExpandedDataSet( + request?: protos.google.analytics.admin.v1alpha.IGetExpandedDataSetRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IExpandedDataSet, + | protos.google.analytics.admin.v1alpha.IGetExpandedDataSetRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IExpandedDataSet, + | protos.google.analytics.admin.v1alpha.IGetExpandedDataSetRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IExpandedDataSet, + ( + | protos.google.analytics.admin.v1alpha.IGetExpandedDataSetRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getExpandedDataSet(request, options, callback); + } + /** + * Creates a ExpandedDataSet. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {google.analytics.admin.v1alpha.ExpandedDataSet} request.expandedDataSet + * Required. The ExpandedDataSet to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.analytics.admin.v1alpha.ExpandedDataSet | ExpandedDataSet}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.create_expanded_data_set.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateExpandedDataSet_async + */ + createExpandedDataSet( + request?: protos.google.analytics.admin.v1alpha.ICreateExpandedDataSetRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IExpandedDataSet, + ( + | protos.google.analytics.admin.v1alpha.ICreateExpandedDataSetRequest + | undefined + ), + {} | undefined + ] + >; + createExpandedDataSet( + request: protos.google.analytics.admin.v1alpha.ICreateExpandedDataSetRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IExpandedDataSet, + | protos.google.analytics.admin.v1alpha.ICreateExpandedDataSetRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createExpandedDataSet( + request: protos.google.analytics.admin.v1alpha.ICreateExpandedDataSetRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IExpandedDataSet, + | protos.google.analytics.admin.v1alpha.ICreateExpandedDataSetRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createExpandedDataSet( + request?: protos.google.analytics.admin.v1alpha.ICreateExpandedDataSetRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IExpandedDataSet, + | protos.google.analytics.admin.v1alpha.ICreateExpandedDataSetRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IExpandedDataSet, + | protos.google.analytics.admin.v1alpha.ICreateExpandedDataSetRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IExpandedDataSet, + ( + | protos.google.analytics.admin.v1alpha.ICreateExpandedDataSetRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createExpandedDataSet(request, options, callback); + } + /** + * Updates a ExpandedDataSet on a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.analytics.admin.v1alpha.ExpandedDataSet} request.expandedDataSet + * Required. The ExpandedDataSet to update. + * The resource's `name` field is used to identify the ExpandedDataSet to be + * updated. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. + * @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.analytics.admin.v1alpha.ExpandedDataSet | ExpandedDataSet}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.update_expanded_data_set.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateExpandedDataSet_async + */ + updateExpandedDataSet( + request?: protos.google.analytics.admin.v1alpha.IUpdateExpandedDataSetRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IExpandedDataSet, + ( + | protos.google.analytics.admin.v1alpha.IUpdateExpandedDataSetRequest + | undefined + ), + {} | undefined + ] + >; + updateExpandedDataSet( + request: protos.google.analytics.admin.v1alpha.IUpdateExpandedDataSetRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IExpandedDataSet, + | protos.google.analytics.admin.v1alpha.IUpdateExpandedDataSetRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateExpandedDataSet( + request: protos.google.analytics.admin.v1alpha.IUpdateExpandedDataSetRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IExpandedDataSet, + | protos.google.analytics.admin.v1alpha.IUpdateExpandedDataSetRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateExpandedDataSet( + request?: protos.google.analytics.admin.v1alpha.IUpdateExpandedDataSetRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IExpandedDataSet, + | protos.google.analytics.admin.v1alpha.IUpdateExpandedDataSetRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IExpandedDataSet, + | protos.google.analytics.admin.v1alpha.IUpdateExpandedDataSetRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IExpandedDataSet, + ( + | protos.google.analytics.admin.v1alpha.IUpdateExpandedDataSetRequest + | 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({ + 'expanded_data_set.name': request.expandedDataSet!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateExpandedDataSet(request, options, callback); + } + /** + * Deletes a ExpandedDataSet on a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Example format: properties/1234/expandedDataSets/5678 + * @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.protobuf.Empty | Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.delete_expanded_data_set.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteExpandedDataSet_async + */ + deleteExpandedDataSet( + request?: protos.google.analytics.admin.v1alpha.IDeleteExpandedDataSetRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IDeleteExpandedDataSetRequest + | undefined + ), + {} | undefined + ] + >; + deleteExpandedDataSet( + request: protos.google.analytics.admin.v1alpha.IDeleteExpandedDataSetRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteExpandedDataSetRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteExpandedDataSet( + request: protos.google.analytics.admin.v1alpha.IDeleteExpandedDataSetRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteExpandedDataSetRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteExpandedDataSet( + request?: protos.google.analytics.admin.v1alpha.IDeleteExpandedDataSetRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteExpandedDataSetRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteExpandedDataSetRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IDeleteExpandedDataSetRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteExpandedDataSet(request, options, callback); + } + /** + * Sets the opt out status for the automated GA4 setup process for a UA + * property. + * Note: this has no effect on GA4 property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.property + * Required. The UA property to set the opt out status. Note this request uses + * the internal property ID, not the tracking ID of the form UA-XXXXXX-YY. + * Format: properties/{internalWebPropertyId} + * Example: properties/1234 + * @param {boolean} request.optOut + * The status to set. + * @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.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse | SetAutomatedGa4ConfigurationOptOutResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.set_automated_ga4_configuration_opt_out.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_SetAutomatedGa4ConfigurationOptOut_async + */ + setAutomatedGa4ConfigurationOptOut( + request?: protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, + ( + | protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest + | undefined + ), + {} | undefined + ] + >; + setAutomatedGa4ConfigurationOptOut( + request: protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, + | protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest + | null + | undefined, + {} | null | undefined + > + ): void; + setAutomatedGa4ConfigurationOptOut( + request: protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, + | protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest + | null + | undefined, + {} | null | undefined + > + ): void; + setAutomatedGa4ConfigurationOptOut( + request?: protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, + | protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, + | protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, + ( + | protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest + | 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 || {}; + this.initialize(); + return this.innerApiCalls.setAutomatedGa4ConfigurationOptOut( + request, + options, + callback + ); + } + /** + * Fetches the opt out status for the automated GA4 setup process for a UA + * property. + * Note: this has no effect on GA4 property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.property + * Required. The UA property to get the opt out status. Note this request uses + * the internal property ID, not the tracking ID of the form UA-XXXXXX-YY. + * Format: properties/{internalWebPropertyId} + * Example: properties/1234 + * @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.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse | FetchAutomatedGa4ConfigurationOptOutResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.fetch_automated_ga4_configuration_opt_out.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_FetchAutomatedGa4ConfigurationOptOut_async + */ + fetchAutomatedGa4ConfigurationOptOut( + request?: protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, + ( + | protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest + | undefined + ), + {} | undefined + ] + >; + fetchAutomatedGa4ConfigurationOptOut( + request: protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, + | protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchAutomatedGa4ConfigurationOptOut( + request: protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, + | protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchAutomatedGa4ConfigurationOptOut( + request?: protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, + | protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, + | protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, + ( + | protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest + | 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 || {}; + this.initialize(); + return this.innerApiCalls.fetchAutomatedGa4ConfigurationOptOut( + request, + options, + callback + ); + } + /** + * Lookup for a single BigQuery Link. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the BigQuery link to lookup. + * Format: properties/{property_id}/bigQueryLinks/{bigquery_link_id} + * Example: properties/123/bigQueryLinks/456 + * @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.analytics.admin.v1alpha.BigQueryLink | BigQueryLink}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.get_big_query_link.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetBigQueryLink_async + */ + getBigQueryLink( + request?: protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IBigQueryLink, + protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest | undefined, + {} | undefined + ] + >; + getBigQueryLink( + request: protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IBigQueryLink, + | protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getBigQueryLink( + request: protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IBigQueryLink, + | protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getBigQueryLink( + request?: protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IBigQueryLink, + | protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IBigQueryLink, + | protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IBigQueryLink, + protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getBigQueryLink(request, options, callback); + } + + /** + * Returns all accounts accessible by the caller. + * + * Note that these accounts might not currently have GA4 properties. + * Soft-deleted (ie: "trashed") accounts are excluded by default. + * Returns an empty list if no relevant accounts are found. + * + * @param {Object} request + * The request object that will be sent. + * @param {number} request.pageSize + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListAccounts` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAccounts` must + * match the call that provided the page token. + * @param {boolean} request.showDeleted + * Whether to include soft-deleted (ie: "trashed") Accounts in the + * results. Accounts can be inspected to determine whether they are deleted or + * not. + * @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 google.analytics.admin.v1alpha.Account | Account}. + * 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 `listAccountsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAccounts( + request?: protos.google.analytics.admin.v1alpha.IListAccountsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAccount[], + protos.google.analytics.admin.v1alpha.IListAccountsRequest | null, + protos.google.analytics.admin.v1alpha.IListAccountsResponse + ] + >; + listAccounts( + request: protos.google.analytics.admin.v1alpha.IListAccountsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListAccountsRequest, + | protos.google.analytics.admin.v1alpha.IListAccountsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAccount + > + ): void; + listAccounts( + request: protos.google.analytics.admin.v1alpha.IListAccountsRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListAccountsRequest, + | protos.google.analytics.admin.v1alpha.IListAccountsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAccount + > + ): void; + listAccounts( + request?: protos.google.analytics.admin.v1alpha.IListAccountsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1alpha.IListAccountsRequest, + | protos.google.analytics.admin.v1alpha.IListAccountsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAccount + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListAccountsRequest, + | protos.google.analytics.admin.v1alpha.IListAccountsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAccount + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAccount[], + protos.google.analytics.admin.v1alpha.IListAccountsRequest | null, + protos.google.analytics.admin.v1alpha.IListAccountsResponse + ] + > | 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 || {}; + this.initialize(); + return this.innerApiCalls.listAccounts(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {number} request.pageSize + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListAccounts` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAccounts` must + * match the call that provided the page token. + * @param {boolean} request.showDeleted + * Whether to include soft-deleted (ie: "trashed") Accounts in the + * results. Accounts can be inspected to determine whether they are deleted or + * not. + * @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 google.analytics.admin.v1alpha.Account | Account} 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 `listAccountsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAccountsStream( + request?: protos.google.analytics.admin.v1alpha.IListAccountsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listAccounts']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAccounts.createStream( + this.innerApiCalls.listAccounts as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listAccounts`, 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 {number} request.pageSize + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListAccounts` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAccounts` must + * match the call that provided the page token. + * @param {boolean} request.showDeleted + * Whether to include soft-deleted (ie: "trashed") Accounts in the + * results. Accounts can be inspected to determine whether they are deleted or + * not. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.analytics.admin.v1alpha.Account | Account}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.list_accounts.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAccounts_async + */ + listAccountsAsync( + request?: protos.google.analytics.admin.v1alpha.IListAccountsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listAccounts']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAccounts.asyncIterate( + this.innerApiCalls['listAccounts'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns summaries of all accounts accessible by the caller. + * + * @param {Object} request + * The request object that will be sent. + * @param {number} request.pageSize + * The maximum number of AccountSummary resources to return. The service may + * return fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListAccountSummaries` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAccountSummaries` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.AccountSummary | AccountSummary}. + * 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 `listAccountSummariesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAccountSummaries( + request?: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAccountSummary[], + protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest | null, + protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + ] + >; + listAccountSummaries( + request: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + | protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAccountSummary + > + ): void; + listAccountSummaries( + request: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + | protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAccountSummary + > + ): void; + listAccountSummaries( + request?: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + | protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAccountSummary + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + | protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAccountSummary + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAccountSummary[], + protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest | null, + protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + ] + > | 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 || {}; + this.initialize(); + return this.innerApiCalls.listAccountSummaries(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {number} request.pageSize + * The maximum number of AccountSummary resources to return. The service may + * return fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListAccountSummaries` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAccountSummaries` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.AccountSummary | AccountSummary} 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 `listAccountSummariesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAccountSummariesStream( + request?: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listAccountSummaries']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAccountSummaries.createStream( + this.innerApiCalls.listAccountSummaries as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listAccountSummaries`, 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 {number} request.pageSize + * The maximum number of AccountSummary resources to return. The service may + * return fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListAccountSummaries` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAccountSummaries` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.analytics.admin.v1alpha.AccountSummary | AccountSummary}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.list_account_summaries.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAccountSummaries_async + */ + listAccountSummariesAsync( + request?: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listAccountSummaries']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAccountSummaries.asyncIterate( + this.innerApiCalls['listAccountSummaries'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns child Properties under the specified parent Account. + * + * Only "GA4" properties will be returned. + * Properties will be excluded if the caller does not have access. + * Soft-deleted (ie: "trashed") properties are excluded by default. + * Returns an empty list if no relevant properties are found. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.filter + * Required. An expression for filtering the results of the request. + * Fields eligible for filtering are: + * `parent:`(The resource name of the parent account/property) or + * `ancestor:`(The resource name of the parent account) or + * `firebase_project:`(The id or number of the linked firebase project). + * Some examples of filters: + * + * ``` + * | Filter | Description | + * |-----------------------------|-------------------------------------------| + * | parent:accounts/123 | The account with account id: 123. | + * | parent:properties/123 | The property with property id: 123. | + * | ancestor:accounts/123 | The account with account id: 123. | + * | firebase_project:project-id | The firebase project with id: project-id. | + * | firebase_project:123 | The firebase project with number: 123. | + * ``` + * @param {number} request.pageSize + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListProperties` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListProperties` must + * match the call that provided the page token. + * @param {boolean} request.showDeleted + * Whether to include soft-deleted (ie: "trashed") Properties in the + * results. Properties can be inspected to determine whether they are deleted + * or not. + * @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 google.analytics.admin.v1alpha.Property | Property}. + * 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 `listPropertiesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listProperties( + request?: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IProperty[], + protos.google.analytics.admin.v1alpha.IListPropertiesRequest | null, + protos.google.analytics.admin.v1alpha.IListPropertiesResponse + ] + >; + listProperties( + request: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + | protos.google.analytics.admin.v1alpha.IListPropertiesResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IProperty + > + ): void; + listProperties( + request: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + | protos.google.analytics.admin.v1alpha.IListPropertiesResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IProperty + > + ): void; + listProperties( + request?: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + | protos.google.analytics.admin.v1alpha.IListPropertiesResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IProperty + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + | protos.google.analytics.admin.v1alpha.IListPropertiesResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IProperty + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IProperty[], + protos.google.analytics.admin.v1alpha.IListPropertiesRequest | null, + protos.google.analytics.admin.v1alpha.IListPropertiesResponse + ] + > | 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 || {}; this.initialize(); - return this.descriptors.page.listAccounts.createStream( - this.innerApiCalls.listAccounts as GaxCall, + return this.innerApiCalls.listProperties(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.filter + * Required. An expression for filtering the results of the request. + * Fields eligible for filtering are: + * `parent:`(The resource name of the parent account/property) or + * `ancestor:`(The resource name of the parent account) or + * `firebase_project:`(The id or number of the linked firebase project). + * Some examples of filters: + * + * ``` + * | Filter | Description | + * |-----------------------------|-------------------------------------------| + * | parent:accounts/123 | The account with account id: 123. | + * | parent:properties/123 | The property with property id: 123. | + * | ancestor:accounts/123 | The account with account id: 123. | + * | firebase_project:project-id | The firebase project with id: project-id. | + * | firebase_project:123 | The firebase project with number: 123. | + * ``` + * @param {number} request.pageSize + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListProperties` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListProperties` must + * match the call that provided the page token. + * @param {boolean} request.showDeleted + * Whether to include soft-deleted (ie: "trashed") Properties in the + * results. Properties can be inspected to determine whether they are deleted + * or not. + * @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 google.analytics.admin.v1alpha.Property | Property} 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 `listPropertiesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listPropertiesStream( + request?: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listProperties']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listProperties.createStream( + this.innerApiCalls.listProperties as GaxCall, request, callSettings ); } /** - * Equivalent to `listAccounts`, but returns an iterable object. + * Equivalent to `listProperties`, 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.filter + * Required. An expression for filtering the results of the request. + * Fields eligible for filtering are: + * `parent:`(The resource name of the parent account/property) or + * `ancestor:`(The resource name of the parent account) or + * `firebase_project:`(The id or number of the linked firebase project). + * Some examples of filters: + * + * ``` + * | Filter | Description | + * |-----------------------------|-------------------------------------------| + * | parent:accounts/123 | The account with account id: 123. | + * | parent:properties/123 | The property with property id: 123. | + * | ancestor:accounts/123 | The account with account id: 123. | + * | firebase_project:project-id | The firebase project with id: project-id. | + * | firebase_project:123 | The firebase project with number: 123. | + * ``` * @param {number} request.pageSize * The maximum number of resources to return. The service may return * fewer than this value, even if there are additional pages. * If unspecified, at most 50 resources will be returned. * The maximum value is 200; (higher values will be coerced to the maximum) * @param {string} request.pageToken - * A page token, received from a previous `ListAccounts` call. + * A page token, received from a previous `ListProperties` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListAccounts` must + * When paginating, all other parameters provided to `ListProperties` must * match the call that provided the page token. * @param {boolean} request.showDeleted - * Whether to include soft-deleted (ie: "trashed") Accounts in the - * results. Accounts can be inspected to determine whether they are deleted or - * not. + * Whether to include soft-deleted (ie: "trashed") Properties in the + * results. Properties can be inspected to determine whether they are deleted + * or not. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.Account | Account}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.Property | Property}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_accounts.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAccounts_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_properties.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListProperties_async */ - listAccountsAsync( - request?: protos.google.analytics.admin.v1alpha.IListAccountsRequest, + listPropertiesAsync( + request?: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - const defaultCallSettings = this._defaults['listAccounts']; + const defaultCallSettings = this._defaults['listProperties']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listAccounts.asyncIterate( - this.innerApiCalls['listAccounts'] as GaxCall, + return this.descriptors.page.listProperties.asyncIterate( + this.innerApiCalls['listProperties'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Returns summaries of all accounts accessible by the caller. + * Lists all user links on an account or property. * * @param {Object} request * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: accounts/1234 * @param {number} request.pageSize - * The maximum number of AccountSummary resources to return. The service may - * return fewer than this value, even if there are additional pages. - * If unspecified, at most 50 resources will be returned. - * The maximum value is 200; (higher values will be coerced to the maximum) + * The maximum number of user links to return. + * The service may return fewer than this value. + * If unspecified, at most 200 user links will be returned. + * The maximum value is 500; values above 500 will be coerced to 500. * @param {string} request.pageToken - * A page token, received from a previous `ListAccountSummaries` call. + * A page token, received from a previous `ListUserLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListAccountSummaries` - * must match the call that provided the page token. + * When paginating, all other parameters provided to `ListUserLinks` must + * match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.AccountSummary | AccountSummary}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.UserLink | UserLink}. * 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 `listAccountSummariesAsync()` + * We recommend using `listUserLinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listAccountSummaries( - request?: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + listUserLinks( + request?: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IAccountSummary[], - protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest | null, - protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + protos.google.analytics.admin.v1alpha.IUserLink[], + protos.google.analytics.admin.v1alpha.IListUserLinksRequest | null, + protos.google.analytics.admin.v1alpha.IListUserLinksResponse ] >; - listAccountSummaries( - request: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + listUserLinks( + request: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, - | protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + | protos.google.analytics.admin.v1alpha.IListUserLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAccountSummary + protos.google.analytics.admin.v1alpha.IUserLink > ): void; - listAccountSummaries( - request: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + listUserLinks( + request: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, - | protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + | protos.google.analytics.admin.v1alpha.IListUserLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAccountSummary + protos.google.analytics.admin.v1alpha.IUserLink > ): void; - listAccountSummaries( - request?: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + listUserLinks( + request?: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, - | protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + | protos.google.analytics.admin.v1alpha.IListUserLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAccountSummary + protos.google.analytics.admin.v1alpha.IUserLink >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, - | protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + | protos.google.analytics.admin.v1alpha.IListUserLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAccountSummary + protos.google.analytics.admin.v1alpha.IUserLink > ): Promise< [ - protos.google.analytics.admin.v1alpha.IAccountSummary[], - protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest | null, - protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + protos.google.analytics.admin.v1alpha.IUserLink[], + protos.google.analytics.admin.v1alpha.IListUserLinksRequest | null, + protos.google.analytics.admin.v1alpha.IListUserLinksResponse ] > | void { request = request || {}; @@ -7962,208 +9676,208 @@ export class AnalyticsAdminServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); this.initialize(); - return this.innerApiCalls.listAccountSummaries(request, options, callback); + return this.innerApiCalls.listUserLinks(request, options, callback); } /** * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: accounts/1234 * @param {number} request.pageSize - * The maximum number of AccountSummary resources to return. The service may - * return fewer than this value, even if there are additional pages. - * If unspecified, at most 50 resources will be returned. - * The maximum value is 200; (higher values will be coerced to the maximum) + * The maximum number of user links to return. + * The service may return fewer than this value. + * If unspecified, at most 200 user links will be returned. + * The maximum value is 500; values above 500 will be coerced to 500. * @param {string} request.pageToken - * A page token, received from a previous `ListAccountSummaries` call. + * A page token, received from a previous `ListUserLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListAccountSummaries` - * must match the call that provided the page token. + * When paginating, all other parameters provided to `ListUserLinks` must + * match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.AccountSummary | AccountSummary} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.UserLink | UserLink} 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 `listAccountSummariesAsync()` + * We recommend using `listUserLinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listAccountSummariesStream( - request?: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + listUserLinksStream( + request?: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, options?: CallOptions ): Transform { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - const defaultCallSettings = this._defaults['listAccountSummaries']; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listUserLinks']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listAccountSummaries.createStream( - this.innerApiCalls.listAccountSummaries as GaxCall, + return this.descriptors.page.listUserLinks.createStream( + this.innerApiCalls.listUserLinks as GaxCall, request, callSettings ); } /** - * Equivalent to `listAccountSummaries`, but returns an iterable object. + * Equivalent to `listUserLinks`, 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. Example format: accounts/1234 * @param {number} request.pageSize - * The maximum number of AccountSummary resources to return. The service may - * return fewer than this value, even if there are additional pages. - * If unspecified, at most 50 resources will be returned. - * The maximum value is 200; (higher values will be coerced to the maximum) + * The maximum number of user links to return. + * The service may return fewer than this value. + * If unspecified, at most 200 user links will be returned. + * The maximum value is 500; values above 500 will be coerced to 500. * @param {string} request.pageToken - * A page token, received from a previous `ListAccountSummaries` call. + * A page token, received from a previous `ListUserLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListAccountSummaries` - * must match the call that provided the page token. + * When paginating, all other parameters provided to `ListUserLinks` must + * match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.AccountSummary | AccountSummary}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.UserLink | UserLink}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_account_summaries.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAccountSummaries_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_user_links.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListUserLinks_async */ - listAccountSummariesAsync( - request?: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + listUserLinksAsync( + request?: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - const defaultCallSettings = this._defaults['listAccountSummaries']; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listUserLinks']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listAccountSummaries.asyncIterate( - this.innerApiCalls['listAccountSummaries'] as GaxCall, + return this.descriptors.page.listUserLinks.asyncIterate( + this.innerApiCalls['listUserLinks'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Returns child Properties under the specified parent Account. + * Lists all user links on an account or property, including implicit ones + * that come from effective permissions granted by groups or organization + * admin roles. * - * Only "GA4" properties will be returned. - * Properties will be excluded if the caller does not have access. - * Soft-deleted (ie: "trashed") properties are excluded by default. - * Returns an empty list if no relevant properties are found. + * If a returned user link does not have direct permissions, they cannot + * be removed from the account or property directly with the DeleteUserLink + * command. They have to be removed from the group/etc that gives them + * permissions, which is currently only usable/discoverable in the GA or GMP + * UIs. * * @param {Object} request * The request object that will be sent. - * @param {string} request.filter - * Required. An expression for filtering the results of the request. - * Fields eligible for filtering are: - * `parent:`(The resource name of the parent account/property) or - * `ancestor:`(The resource name of the parent account) or - * `firebase_project:`(The id or number of the linked firebase project). - * Some examples of filters: - * - * ``` - * | Filter | Description | - * |-----------------------------|-------------------------------------------| - * | parent:accounts/123 | The account with account id: 123. | - * | parent:properties/123 | The property with property id: 123. | - * | ancestor:accounts/123 | The account with account id: 123. | - * | firebase_project:project-id | The firebase project with id: project-id. | - * | firebase_project:123 | The firebase project with number: 123. | - * ``` + * @param {string} request.parent + * Required. Example format: accounts/1234 * @param {number} request.pageSize - * The maximum number of resources to return. The service may return - * fewer than this value, even if there are additional pages. - * If unspecified, at most 50 resources will be returned. - * The maximum value is 200; (higher values will be coerced to the maximum) + * The maximum number of user links to return. + * The service may return fewer than this value. + * If unspecified, at most 1000 user links will be returned. + * The maximum value is 5000; values above 5000 will be coerced to 5000. * @param {string} request.pageToken - * A page token, received from a previous `ListProperties` call. + * A page token, received from a previous `AuditUserLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListProperties` must + * When paginating, all other parameters provided to `AuditUserLinks` must * match the call that provided the page token. - * @param {boolean} request.showDeleted - * Whether to include soft-deleted (ie: "trashed") Properties in the - * results. Properties can be inspected to determine whether they are deleted - * or not. * @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 google.analytics.admin.v1alpha.Property | Property}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.AuditUserLink | AuditUserLink}. * 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 `listPropertiesAsync()` + * We recommend using `auditUserLinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listProperties( - request?: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + auditUserLinks( + request?: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IProperty[], - protos.google.analytics.admin.v1alpha.IListPropertiesRequest | null, - protos.google.analytics.admin.v1alpha.IListPropertiesResponse + protos.google.analytics.admin.v1alpha.IAuditUserLink[], + protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest | null, + protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse ] >; - listProperties( - request: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + auditUserLinks( + request: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListPropertiesRequest, - | protos.google.analytics.admin.v1alpha.IListPropertiesResponse + protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + | protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IProperty + protos.google.analytics.admin.v1alpha.IAuditUserLink > ): void; - listProperties( - request: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + auditUserLinks( + request: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListPropertiesRequest, - | protos.google.analytics.admin.v1alpha.IListPropertiesResponse + protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + | protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IProperty + protos.google.analytics.admin.v1alpha.IAuditUserLink > ): void; - listProperties( - request?: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + auditUserLinks( + request?: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListPropertiesRequest, - | protos.google.analytics.admin.v1alpha.IListPropertiesResponse + protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + | protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IProperty + protos.google.analytics.admin.v1alpha.IAuditUserLink >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListPropertiesRequest, - | protos.google.analytics.admin.v1alpha.IListPropertiesResponse + protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + | protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IProperty + protos.google.analytics.admin.v1alpha.IAuditUserLink > ): Promise< [ - protos.google.analytics.admin.v1alpha.IProperty[], - protos.google.analytics.admin.v1alpha.IListPropertiesRequest | null, - protos.google.analytics.admin.v1alpha.IListPropertiesResponse + protos.google.analytics.admin.v1alpha.IAuditUserLink[], + protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest | null, + protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse ] > | void { request = request || {}; @@ -8177,226 +9891,202 @@ export class AnalyticsAdminServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); this.initialize(); - return this.innerApiCalls.listProperties(request, options, callback); + return this.innerApiCalls.auditUserLinks(request, options, callback); } /** * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. - * @param {string} request.filter - * Required. An expression for filtering the results of the request. - * Fields eligible for filtering are: - * `parent:`(The resource name of the parent account/property) or - * `ancestor:`(The resource name of the parent account) or - * `firebase_project:`(The id or number of the linked firebase project). - * Some examples of filters: - * - * ``` - * | Filter | Description | - * |-----------------------------|-------------------------------------------| - * | parent:accounts/123 | The account with account id: 123. | - * | parent:properties/123 | The property with property id: 123. | - * | ancestor:accounts/123 | The account with account id: 123. | - * | firebase_project:project-id | The firebase project with id: project-id. | - * | firebase_project:123 | The firebase project with number: 123. | - * ``` + * @param {string} request.parent + * Required. Example format: accounts/1234 * @param {number} request.pageSize - * The maximum number of resources to return. The service may return - * fewer than this value, even if there are additional pages. - * If unspecified, at most 50 resources will be returned. - * The maximum value is 200; (higher values will be coerced to the maximum) + * The maximum number of user links to return. + * The service may return fewer than this value. + * If unspecified, at most 1000 user links will be returned. + * The maximum value is 5000; values above 5000 will be coerced to 5000. * @param {string} request.pageToken - * A page token, received from a previous `ListProperties` call. + * A page token, received from a previous `AuditUserLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListProperties` must + * When paginating, all other parameters provided to `AuditUserLinks` must * match the call that provided the page token. - * @param {boolean} request.showDeleted - * Whether to include soft-deleted (ie: "trashed") Properties in the - * results. Properties can be inspected to determine whether they are deleted - * or not. * @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 google.analytics.admin.v1alpha.Property | Property} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.AuditUserLink | AuditUserLink} 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 `listPropertiesAsync()` + * We recommend using `auditUserLinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listPropertiesStream( - request?: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + auditUserLinksStream( + request?: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, options?: CallOptions ): Transform { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - const defaultCallSettings = this._defaults['listProperties']; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['auditUserLinks']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listProperties.createStream( - this.innerApiCalls.listProperties as GaxCall, + return this.descriptors.page.auditUserLinks.createStream( + this.innerApiCalls.auditUserLinks as GaxCall, request, callSettings ); } /** - * Equivalent to `listProperties`, but returns an iterable object. + * Equivalent to `auditUserLinks`, 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.filter - * Required. An expression for filtering the results of the request. - * Fields eligible for filtering are: - * `parent:`(The resource name of the parent account/property) or - * `ancestor:`(The resource name of the parent account) or - * `firebase_project:`(The id or number of the linked firebase project). - * Some examples of filters: - * - * ``` - * | Filter | Description | - * |-----------------------------|-------------------------------------------| - * | parent:accounts/123 | The account with account id: 123. | - * | parent:properties/123 | The property with property id: 123. | - * | ancestor:accounts/123 | The account with account id: 123. | - * | firebase_project:project-id | The firebase project with id: project-id. | - * | firebase_project:123 | The firebase project with number: 123. | - * ``` + * @param {string} request.parent + * Required. Example format: accounts/1234 * @param {number} request.pageSize - * The maximum number of resources to return. The service may return - * fewer than this value, even if there are additional pages. - * If unspecified, at most 50 resources will be returned. - * The maximum value is 200; (higher values will be coerced to the maximum) + * The maximum number of user links to return. + * The service may return fewer than this value. + * If unspecified, at most 1000 user links will be returned. + * The maximum value is 5000; values above 5000 will be coerced to 5000. * @param {string} request.pageToken - * A page token, received from a previous `ListProperties` call. + * A page token, received from a previous `AuditUserLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListProperties` must + * When paginating, all other parameters provided to `AuditUserLinks` must * match the call that provided the page token. - * @param {boolean} request.showDeleted - * Whether to include soft-deleted (ie: "trashed") Properties in the - * results. Properties can be inspected to determine whether they are deleted - * or not. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.Property | Property}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.AuditUserLink | AuditUserLink}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_properties.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListProperties_async + * @example include:samples/generated/v1alpha/analytics_admin_service.audit_user_links.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_AuditUserLinks_async */ - listPropertiesAsync( - request?: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + auditUserLinksAsync( + request?: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - const defaultCallSettings = this._defaults['listProperties']; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['auditUserLinks']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listProperties.asyncIterate( - this.innerApiCalls['listProperties'] as GaxCall, + return this.descriptors.page.auditUserLinks.asyncIterate( + this.innerApiCalls['auditUserLinks'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists all user links on an account or property. + * Lists FirebaseLinks on a property. + * Properties can have at most one FirebaseLink. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Example format: accounts/1234 - * @param {number} request.pageSize - * The maximum number of user links to return. - * The service may return fewer than this value. - * If unspecified, at most 200 user links will be returned. - * The maximum value is 500; values above 500 will be coerced to 500. + * Required. Format: properties/{property_id} + * Example: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) * @param {string} request.pageToken - * A page token, received from a previous `ListUserLinks` call. + * A page token, received from a previous `ListFirebaseLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListUserLinks` must + * When paginating, all other parameters provided to `ListFirebaseLinks` must * match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.UserLink | UserLink}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.FirebaseLink | FirebaseLink}. * 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 `listUserLinksAsync()` + * We recommend using `listFirebaseLinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listUserLinks( - request?: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + listFirebaseLinks( + request?: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IUserLink[], - protos.google.analytics.admin.v1alpha.IListUserLinksRequest | null, - protos.google.analytics.admin.v1alpha.IListUserLinksResponse + protos.google.analytics.admin.v1alpha.IFirebaseLink[], + protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest | null, + protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse ] >; - listUserLinks( - request: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + listFirebaseLinks( + request: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListUserLinksRequest, - | protos.google.analytics.admin.v1alpha.IListUserLinksResponse + protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + | protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IUserLink + protos.google.analytics.admin.v1alpha.IFirebaseLink > ): void; - listUserLinks( - request: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + listFirebaseLinks( + request: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListUserLinksRequest, - | protos.google.analytics.admin.v1alpha.IListUserLinksResponse + protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + | protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IUserLink + protos.google.analytics.admin.v1alpha.IFirebaseLink > ): void; - listUserLinks( - request?: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + listFirebaseLinks( + request?: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListUserLinksRequest, - | protos.google.analytics.admin.v1alpha.IListUserLinksResponse + protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + | protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IUserLink + protos.google.analytics.admin.v1alpha.IFirebaseLink >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListUserLinksRequest, - | protos.google.analytics.admin.v1alpha.IListUserLinksResponse + protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + | protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IUserLink + protos.google.analytics.admin.v1alpha.IFirebaseLink > ): Promise< [ - protos.google.analytics.admin.v1alpha.IUserLink[], - protos.google.analytics.admin.v1alpha.IListUserLinksRequest | null, - protos.google.analytics.admin.v1alpha.IListUserLinksResponse + protos.google.analytics.admin.v1alpha.IFirebaseLink[], + protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest | null, + protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse ] > | void { request = request || {}; @@ -8415,7 +10105,7 @@ export class AnalyticsAdminServiceClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listUserLinks(request, options, callback); + return this.innerApiCalls.listFirebaseLinks(request, options, callback); } /** @@ -8423,31 +10113,32 @@ export class AnalyticsAdminServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Example format: accounts/1234 + * Required. Format: properties/{property_id} + * Example: properties/1234 * @param {number} request.pageSize - * The maximum number of user links to return. - * The service may return fewer than this value. - * If unspecified, at most 200 user links will be returned. - * The maximum value is 500; values above 500 will be coerced to 500. + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) * @param {string} request.pageToken - * A page token, received from a previous `ListUserLinks` call. + * A page token, received from a previous `ListFirebaseLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListUserLinks` must + * When paginating, all other parameters provided to `ListFirebaseLinks` must * match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.UserLink | UserLink} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.FirebaseLink | FirebaseLink} 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 `listUserLinksAsync()` + * We recommend using `listFirebaseLinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listUserLinksStream( - request?: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + listFirebaseLinksStream( + request?: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, options?: CallOptions ): Transform { request = request || {}; @@ -8458,51 +10149,52 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listUserLinks']; + const defaultCallSettings = this._defaults['listFirebaseLinks']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listUserLinks.createStream( - this.innerApiCalls.listUserLinks as GaxCall, + return this.descriptors.page.listFirebaseLinks.createStream( + this.innerApiCalls.listFirebaseLinks as GaxCall, request, callSettings ); } /** - * Equivalent to `listUserLinks`, but returns an iterable object. + * Equivalent to `listFirebaseLinks`, 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. Example format: accounts/1234 + * Required. Format: properties/{property_id} + * Example: properties/1234 * @param {number} request.pageSize - * The maximum number of user links to return. - * The service may return fewer than this value. - * If unspecified, at most 200 user links will be returned. - * The maximum value is 500; values above 500 will be coerced to 500. + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) * @param {string} request.pageToken - * A page token, received from a previous `ListUserLinks` call. + * A page token, received from a previous `ListFirebaseLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListUserLinks` must + * When paginating, all other parameters provided to `ListFirebaseLinks` must * match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.UserLink | UserLink}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.FirebaseLink | FirebaseLink}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_user_links.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListUserLinks_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_firebase_links.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListFirebaseLinks_async */ - listUserLinksAsync( - request?: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + listFirebaseLinksAsync( + request?: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -8511,107 +10203,99 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listUserLinks']; + const defaultCallSettings = this._defaults['listFirebaseLinks']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listUserLinks.asyncIterate( - this.innerApiCalls['listUserLinks'] as GaxCall, + return this.descriptors.page.listFirebaseLinks.asyncIterate( + this.innerApiCalls['listFirebaseLinks'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists all user links on an account or property, including implicit ones - * that come from effective permissions granted by groups or organization - * admin roles. - * - * If a returned user link does not have direct permissions, they cannot - * be removed from the account or property directly with the DeleteUserLink - * command. They have to be removed from the group/etc that gives them - * permissions, which is currently only usable/discoverable in the GA or GMP - * UIs. + * Lists GoogleAdsLinks on a property. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Example format: accounts/1234 + * Required. Example format: properties/1234 * @param {number} request.pageSize - * The maximum number of user links to return. - * The service may return fewer than this value. - * If unspecified, at most 1000 user links will be returned. - * The maximum value is 5000; values above 5000 will be coerced to 5000. + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} request.pageToken - * A page token, received from a previous `AuditUserLinks` call. + * A page token, received from a previous `ListGoogleAdsLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `AuditUserLinks` must + * + * When paginating, all other parameters provided to `ListGoogleAdsLinks` must * match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.AuditUserLink | AuditUserLink}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.GoogleAdsLink | GoogleAdsLink}. * 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 `auditUserLinksAsync()` + * We recommend using `listGoogleAdsLinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - auditUserLinks( - request?: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + listGoogleAdsLinks( + request?: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IAuditUserLink[], - protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest | null, - protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse + protos.google.analytics.admin.v1alpha.IGoogleAdsLink[], + protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest | null, + protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse ] >; - auditUserLinks( - request: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + listGoogleAdsLinks( + request: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, - | protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse + protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + | protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAuditUserLink + protos.google.analytics.admin.v1alpha.IGoogleAdsLink > ): void; - auditUserLinks( - request: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + listGoogleAdsLinks( + request: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, - | protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse + protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + | protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAuditUserLink + protos.google.analytics.admin.v1alpha.IGoogleAdsLink > ): void; - auditUserLinks( - request?: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + listGoogleAdsLinks( + request?: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, - | protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse + protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + | protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAuditUserLink + protos.google.analytics.admin.v1alpha.IGoogleAdsLink >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, - | protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse + protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + | protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAuditUserLink + protos.google.analytics.admin.v1alpha.IGoogleAdsLink > ): Promise< [ - protos.google.analytics.admin.v1alpha.IAuditUserLink[], - protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest | null, - protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse + protos.google.analytics.admin.v1alpha.IGoogleAdsLink[], + protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest | null, + protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse ] > | void { request = request || {}; @@ -8630,7 +10314,7 @@ export class AnalyticsAdminServiceClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.auditUserLinks(request, options, callback); + return this.innerApiCalls.listGoogleAdsLinks(request, options, callback); } /** @@ -8638,31 +10322,31 @@ export class AnalyticsAdminServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Example format: accounts/1234 + * Required. Example format: properties/1234 * @param {number} request.pageSize - * The maximum number of user links to return. - * The service may return fewer than this value. - * If unspecified, at most 1000 user links will be returned. - * The maximum value is 5000; values above 5000 will be coerced to 5000. + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} request.pageToken - * A page token, received from a previous `AuditUserLinks` call. + * A page token, received from a previous `ListGoogleAdsLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `AuditUserLinks` must + * + * When paginating, all other parameters provided to `ListGoogleAdsLinks` must * match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.AuditUserLink | AuditUserLink} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.GoogleAdsLink | GoogleAdsLink} 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 `auditUserLinksAsync()` + * We recommend using `listGoogleAdsLinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - auditUserLinksStream( - request?: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + listGoogleAdsLinksStream( + request?: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, options?: CallOptions ): Transform { request = request || {}; @@ -8673,51 +10357,51 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['auditUserLinks']; + const defaultCallSettings = this._defaults['listGoogleAdsLinks']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.auditUserLinks.createStream( - this.innerApiCalls.auditUserLinks as GaxCall, + return this.descriptors.page.listGoogleAdsLinks.createStream( + this.innerApiCalls.listGoogleAdsLinks as GaxCall, request, callSettings ); } /** - * Equivalent to `auditUserLinks`, but returns an iterable object. + * Equivalent to `listGoogleAdsLinks`, 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. Example format: accounts/1234 + * Required. Example format: properties/1234 * @param {number} request.pageSize - * The maximum number of user links to return. - * The service may return fewer than this value. - * If unspecified, at most 1000 user links will be returned. - * The maximum value is 5000; values above 5000 will be coerced to 5000. + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} request.pageToken - * A page token, received from a previous `AuditUserLinks` call. + * A page token, received from a previous `ListGoogleAdsLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `AuditUserLinks` must + * + * When paginating, all other parameters provided to `ListGoogleAdsLinks` must * match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.AuditUserLink | AuditUserLink}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.GoogleAdsLink | GoogleAdsLink}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.audit_user_links.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_AuditUserLinks_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_google_ads_links.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListGoogleAdsLinks_async */ - auditUserLinksAsync( - request?: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + listGoogleAdsLinksAsync( + request?: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -8726,101 +10410,101 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['auditUserLinks']; + const defaultCallSettings = this._defaults['listGoogleAdsLinks']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.auditUserLinks.asyncIterate( - this.innerApiCalls['auditUserLinks'] as GaxCall, + return this.descriptors.page.listGoogleAdsLinks.asyncIterate( + this.innerApiCalls['listGoogleAdsLinks'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists FirebaseLinks on a property. - * Properties can have at most one FirebaseLink. + * Returns child MeasurementProtocolSecrets under the specified parent + * Property. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Format: properties/{property_id} - * Example: properties/1234 + * Required. The resource name of the parent stream. + * Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets * @param {number} request.pageSize - * The maximum number of resources to return. The service may return - * fewer than this value, even if there are additional pages. - * If unspecified, at most 50 resources will be returned. - * The maximum value is 200; (higher values will be coerced to the maximum) + * The maximum number of resources to return. + * If unspecified, at most 10 resources will be returned. + * The maximum value is 10. Higher values will be coerced to the maximum. * @param {string} request.pageToken - * A page token, received from a previous `ListFirebaseLinks` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListFirebaseLinks` must - * match the call that provided the page token. + * A page token, received from a previous `ListMeasurementProtocolSecrets` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListMeasurementProtocolSecrets` must match + * the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.FirebaseLink | FirebaseLink}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.MeasurementProtocolSecret | MeasurementProtocolSecret}. * 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 `listFirebaseLinksAsync()` + * We recommend using `listMeasurementProtocolSecretsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listFirebaseLinks( - request?: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + listMeasurementProtocolSecrets( + request?: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IFirebaseLink[], - protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest | null, - protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret[], + protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest | null, + protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse ] >; - listFirebaseLinks( - request: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + listMeasurementProtocolSecrets( + request: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, - | protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse + protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + | protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IFirebaseLink + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret > ): void; - listFirebaseLinks( - request: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + listMeasurementProtocolSecrets( + request: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, - | protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse + protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + | protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IFirebaseLink + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret > ): void; - listFirebaseLinks( - request?: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + listMeasurementProtocolSecrets( + request?: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, - | protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse + protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + | protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IFirebaseLink + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, - | protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse + protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + | protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IFirebaseLink + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret > ): Promise< [ - protos.google.analytics.admin.v1alpha.IFirebaseLink[], - protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest | null, - protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret[], + protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest | null, + protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse ] > | void { request = request || {}; @@ -8839,7 +10523,11 @@ export class AnalyticsAdminServiceClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listFirebaseLinks(request, options, callback); + return this.innerApiCalls.listMeasurementProtocolSecrets( + request, + options, + callback + ); } /** @@ -8847,32 +10535,32 @@ export class AnalyticsAdminServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Format: properties/{property_id} - * Example: properties/1234 + * Required. The resource name of the parent stream. + * Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets * @param {number} request.pageSize - * The maximum number of resources to return. The service may return - * fewer than this value, even if there are additional pages. - * If unspecified, at most 50 resources will be returned. - * The maximum value is 200; (higher values will be coerced to the maximum) + * The maximum number of resources to return. + * If unspecified, at most 10 resources will be returned. + * The maximum value is 10. Higher values will be coerced to the maximum. * @param {string} request.pageToken - * A page token, received from a previous `ListFirebaseLinks` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListFirebaseLinks` must - * match the call that provided the page token. + * A page token, received from a previous `ListMeasurementProtocolSecrets` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListMeasurementProtocolSecrets` must match + * the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.FirebaseLink | FirebaseLink} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.MeasurementProtocolSecret | MeasurementProtocolSecret} 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 `listFirebaseLinksAsync()` + * We recommend using `listMeasurementProtocolSecretsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listFirebaseLinksStream( - request?: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + listMeasurementProtocolSecretsStream( + request?: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -8883,52 +10571,53 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listFirebaseLinks']; + const defaultCallSettings = + this._defaults['listMeasurementProtocolSecrets']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listFirebaseLinks.createStream( - this.innerApiCalls.listFirebaseLinks as GaxCall, + return this.descriptors.page.listMeasurementProtocolSecrets.createStream( + this.innerApiCalls.listMeasurementProtocolSecrets as GaxCall, request, callSettings ); } /** - * Equivalent to `listFirebaseLinks`, but returns an iterable object. + * Equivalent to `listMeasurementProtocolSecrets`, 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. Format: properties/{property_id} - * Example: properties/1234 + * Required. The resource name of the parent stream. + * Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets * @param {number} request.pageSize - * The maximum number of resources to return. The service may return - * fewer than this value, even if there are additional pages. - * If unspecified, at most 50 resources will be returned. - * The maximum value is 200; (higher values will be coerced to the maximum) + * The maximum number of resources to return. + * If unspecified, at most 10 resources will be returned. + * The maximum value is 10. Higher values will be coerced to the maximum. * @param {string} request.pageToken - * A page token, received from a previous `ListFirebaseLinks` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListFirebaseLinks` must - * match the call that provided the page token. + * A page token, received from a previous `ListMeasurementProtocolSecrets` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListMeasurementProtocolSecrets` must match + * the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.FirebaseLink | FirebaseLink}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.MeasurementProtocolSecret | MeasurementProtocolSecret}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_firebase_links.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListFirebaseLinks_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_measurement_protocol_secrets.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListMeasurementProtocolSecrets_async */ - listFirebaseLinksAsync( - request?: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + listMeasurementProtocolSecretsAsync( + request?: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -8937,99 +10626,119 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listFirebaseLinks']; + const defaultCallSettings = + this._defaults['listMeasurementProtocolSecrets']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listFirebaseLinks.asyncIterate( - this.innerApiCalls['listFirebaseLinks'] as GaxCall, + return this.descriptors.page.listMeasurementProtocolSecrets.asyncIterate( + this.innerApiCalls['listMeasurementProtocolSecrets'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists GoogleAdsLinks on a property. + * Searches through all changes to an account or its children given the + * specified set of filters. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. Example format: properties/1234 - * @param {number} request.pageSize - * The maximum number of resources to return. - * If unspecified, at most 50 resources will be returned. + * @param {string} request.account + * Required. The account resource for which to return change history + * resources. + * @param {string} [request.property] + * Optional. Resource name for a child property. If set, only return changes + * made to this property or its child resources. + * @param {number[]} [request.resourceType] + * Optional. If set, only return changes if they are for a resource that + * matches at least one of these types. + * @param {number[]} [request.action] + * Optional. If set, only return changes that match one or more of these types + * of actions. + * @param {string[]} [request.actorEmail] + * Optional. If set, only return changes if they are made by a user in this + * list. + * @param {google.protobuf.Timestamp} [request.earliestChangeTime] + * Optional. If set, only return changes made after this time (inclusive). + * @param {google.protobuf.Timestamp} [request.latestChangeTime] + * Optional. If set, only return changes made before this time (inclusive). + * @param {number} [request.pageSize] + * Optional. The maximum number of ChangeHistoryEvent items to return. + * The service may return fewer than this value, even if there are additional + * pages. If unspecified, at most 50 items will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). - * @param {string} request.pageToken - * A page token, received from a previous `ListGoogleAdsLinks` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListGoogleAdsLinks` must - * match the call that provided the page token. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous + * `SearchChangeHistoryEvents` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `SearchChangeHistoryEvents` must match the call that provided the page + * token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.GoogleAdsLink | GoogleAdsLink}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.ChangeHistoryEvent | ChangeHistoryEvent}. * 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 `listGoogleAdsLinksAsync()` + * We recommend using `searchChangeHistoryEventsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listGoogleAdsLinks( - request?: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + searchChangeHistoryEvents( + request?: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IGoogleAdsLink[], - protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest | null, - protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse + protos.google.analytics.admin.v1alpha.IChangeHistoryEvent[], + protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest | null, + protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse ] >; - listGoogleAdsLinks( - request: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + searchChangeHistoryEvents( + request: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, - | protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse + protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + | protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IGoogleAdsLink + protos.google.analytics.admin.v1alpha.IChangeHistoryEvent > ): void; - listGoogleAdsLinks( - request: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + searchChangeHistoryEvents( + request: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, - | protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse + protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + | protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IGoogleAdsLink + protos.google.analytics.admin.v1alpha.IChangeHistoryEvent > ): void; - listGoogleAdsLinks( - request?: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + searchChangeHistoryEvents( + request?: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, - | protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse + protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + | protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IGoogleAdsLink + protos.google.analytics.admin.v1alpha.IChangeHistoryEvent >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, - | protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse + protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + | protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IGoogleAdsLink + protos.google.analytics.admin.v1alpha.IChangeHistoryEvent > ): Promise< [ - protos.google.analytics.admin.v1alpha.IGoogleAdsLink[], - protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest | null, - protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse + protos.google.analytics.admin.v1alpha.IChangeHistoryEvent[], + protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest | null, + protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse ] > | void { request = request || {}; @@ -9045,42 +10754,64 @@ export class AnalyticsAdminServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + account: request.account ?? '', }); this.initialize(); - return this.innerApiCalls.listGoogleAdsLinks(request, options, callback); + return this.innerApiCalls.searchChangeHistoryEvents( + request, + options, + callback + ); } /** * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. Example format: properties/1234 - * @param {number} request.pageSize - * The maximum number of resources to return. - * If unspecified, at most 50 resources will be returned. + * @param {string} request.account + * Required. The account resource for which to return change history + * resources. + * @param {string} [request.property] + * Optional. Resource name for a child property. If set, only return changes + * made to this property or its child resources. + * @param {number[]} [request.resourceType] + * Optional. If set, only return changes if they are for a resource that + * matches at least one of these types. + * @param {number[]} [request.action] + * Optional. If set, only return changes that match one or more of these types + * of actions. + * @param {string[]} [request.actorEmail] + * Optional. If set, only return changes if they are made by a user in this + * list. + * @param {google.protobuf.Timestamp} [request.earliestChangeTime] + * Optional. If set, only return changes made after this time (inclusive). + * @param {google.protobuf.Timestamp} [request.latestChangeTime] + * Optional. If set, only return changes made before this time (inclusive). + * @param {number} [request.pageSize] + * Optional. The maximum number of ChangeHistoryEvent items to return. + * The service may return fewer than this value, even if there are additional + * pages. If unspecified, at most 50 items will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). - * @param {string} request.pageToken - * A page token, received from a previous `ListGoogleAdsLinks` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListGoogleAdsLinks` must - * match the call that provided the page token. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous + * `SearchChangeHistoryEvents` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `SearchChangeHistoryEvents` must match the call that provided the page + * token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.GoogleAdsLink | GoogleAdsLink} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.ChangeHistoryEvent | ChangeHistoryEvent} 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 `listGoogleAdsLinksAsync()` + * We recommend using `searchChangeHistoryEventsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listGoogleAdsLinksStream( - request?: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + searchChangeHistoryEventsStream( + request?: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -9089,156 +10820,174 @@ export class AnalyticsAdminServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + account: request.account ?? '', }); - const defaultCallSettings = this._defaults['listGoogleAdsLinks']; + const defaultCallSettings = this._defaults['searchChangeHistoryEvents']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listGoogleAdsLinks.createStream( - this.innerApiCalls.listGoogleAdsLinks as GaxCall, + return this.descriptors.page.searchChangeHistoryEvents.createStream( + this.innerApiCalls.searchChangeHistoryEvents as GaxCall, request, callSettings ); } /** - * Equivalent to `listGoogleAdsLinks`, but returns an iterable object. + * Equivalent to `searchChangeHistoryEvents`, 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. Example format: properties/1234 - * @param {number} request.pageSize - * The maximum number of resources to return. - * If unspecified, at most 50 resources will be returned. + * @param {string} request.account + * Required. The account resource for which to return change history + * resources. + * @param {string} [request.property] + * Optional. Resource name for a child property. If set, only return changes + * made to this property or its child resources. + * @param {number[]} [request.resourceType] + * Optional. If set, only return changes if they are for a resource that + * matches at least one of these types. + * @param {number[]} [request.action] + * Optional. If set, only return changes that match one or more of these types + * of actions. + * @param {string[]} [request.actorEmail] + * Optional. If set, only return changes if they are made by a user in this + * list. + * @param {google.protobuf.Timestamp} [request.earliestChangeTime] + * Optional. If set, only return changes made after this time (inclusive). + * @param {google.protobuf.Timestamp} [request.latestChangeTime] + * Optional. If set, only return changes made before this time (inclusive). + * @param {number} [request.pageSize] + * Optional. The maximum number of ChangeHistoryEvent items to return. + * The service may return fewer than this value, even if there are additional + * pages. If unspecified, at most 50 items will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). - * @param {string} request.pageToken - * A page token, received from a previous `ListGoogleAdsLinks` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListGoogleAdsLinks` must - * match the call that provided the page token. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous + * `SearchChangeHistoryEvents` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `SearchChangeHistoryEvents` must match the call that provided the page + * token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.GoogleAdsLink | GoogleAdsLink}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.ChangeHistoryEvent | ChangeHistoryEvent}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_google_ads_links.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListGoogleAdsLinks_async + * @example include:samples/generated/v1alpha/analytics_admin_service.search_change_history_events.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_SearchChangeHistoryEvents_async */ - listGoogleAdsLinksAsync( - request?: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + searchChangeHistoryEventsAsync( + request?: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, options?: CallOptions - ): AsyncIterable { + ): 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 ?? '', + account: request.account ?? '', }); - const defaultCallSettings = this._defaults['listGoogleAdsLinks']; + const defaultCallSettings = this._defaults['searchChangeHistoryEvents']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listGoogleAdsLinks.asyncIterate( - this.innerApiCalls['listGoogleAdsLinks'] as GaxCall, + return this.descriptors.page.searchChangeHistoryEvents.asyncIterate( + this.innerApiCalls['searchChangeHistoryEvents'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Returns child MeasurementProtocolSecrets under the specified parent - * Property. + * Returns a list of conversion events in the specified parent property. + * + * Returns an empty list if no conversion events are found. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the parent stream. - * Format: - * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets + * Required. The resource name of the parent property. + * Example: 'properties/123' * @param {number} request.pageSize * The maximum number of resources to return. - * If unspecified, at most 10 resources will be returned. - * The maximum value is 10. Higher values will be coerced to the maximum. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) * @param {string} request.pageToken - * A page token, received from a previous `ListMeasurementProtocolSecrets` - * call. Provide this to retrieve the subsequent page. When paginating, all - * other parameters provided to `ListMeasurementProtocolSecrets` must match - * the call that provided the page token. + * A page token, received from a previous `ListConversionEvents` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListConversionEvents` + * must match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.MeasurementProtocolSecret | MeasurementProtocolSecret}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.ConversionEvent | ConversionEvent}. * 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 `listMeasurementProtocolSecretsAsync()` + * We recommend using `listConversionEventsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listMeasurementProtocolSecrets( - request?: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + listConversionEvents( + request?: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret[], - protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest | null, - protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse + protos.google.analytics.admin.v1alpha.IConversionEvent[], + protos.google.analytics.admin.v1alpha.IListConversionEventsRequest | null, + protos.google.analytics.admin.v1alpha.IListConversionEventsResponse ] >; - listMeasurementProtocolSecrets( - request: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + listConversionEvents( + request: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, - | protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse + protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + | protos.google.analytics.admin.v1alpha.IListConversionEventsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret + protos.google.analytics.admin.v1alpha.IConversionEvent > ): void; - listMeasurementProtocolSecrets( - request: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + listConversionEvents( + request: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, - | protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse + protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + | protos.google.analytics.admin.v1alpha.IListConversionEventsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret + protos.google.analytics.admin.v1alpha.IConversionEvent > ): void; - listMeasurementProtocolSecrets( - request?: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + listConversionEvents( + request?: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, - | protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse + protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + | protos.google.analytics.admin.v1alpha.IListConversionEventsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret + protos.google.analytics.admin.v1alpha.IConversionEvent >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, - | protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse + protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + | protos.google.analytics.admin.v1alpha.IListConversionEventsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret + protos.google.analytics.admin.v1alpha.IConversionEvent > ): Promise< [ - protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret[], - protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest | null, - protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse + protos.google.analytics.admin.v1alpha.IConversionEvent[], + protos.google.analytics.admin.v1alpha.IListConversionEventsRequest | null, + protos.google.analytics.admin.v1alpha.IListConversionEventsResponse ] > | void { request = request || {}; @@ -9257,11 +11006,7 @@ export class AnalyticsAdminServiceClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listMeasurementProtocolSecrets( - request, - options, - callback - ); + return this.innerApiCalls.listConversionEvents(request, options, callback); } /** @@ -9269,32 +11014,31 @@ export class AnalyticsAdminServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the parent stream. - * Format: - * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets + * Required. The resource name of the parent property. + * Example: 'properties/123' * @param {number} request.pageSize * The maximum number of resources to return. - * If unspecified, at most 10 resources will be returned. - * The maximum value is 10. Higher values will be coerced to the maximum. - * @param {string} request.pageToken - * A page token, received from a previous `ListMeasurementProtocolSecrets` - * call. Provide this to retrieve the subsequent page. When paginating, all - * other parameters provided to `ListMeasurementProtocolSecrets` must match - * the call that provided the page token. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListConversionEvents` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListConversionEvents` + * must match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.MeasurementProtocolSecret | MeasurementProtocolSecret} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.ConversionEvent | ConversionEvent} 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 `listMeasurementProtocolSecretsAsync()` + * We recommend using `listConversionEventsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listMeasurementProtocolSecretsStream( - request?: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + listConversionEventsStream( + request?: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -9305,53 +11049,51 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = - this._defaults['listMeasurementProtocolSecrets']; + const defaultCallSettings = this._defaults['listConversionEvents']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listMeasurementProtocolSecrets.createStream( - this.innerApiCalls.listMeasurementProtocolSecrets as GaxCall, + return this.descriptors.page.listConversionEvents.createStream( + this.innerApiCalls.listConversionEvents as GaxCall, request, callSettings ); } /** - * Equivalent to `listMeasurementProtocolSecrets`, but returns an iterable object. + * Equivalent to `listConversionEvents`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the parent stream. - * Format: - * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets + * Required. The resource name of the parent property. + * Example: 'properties/123' * @param {number} request.pageSize * The maximum number of resources to return. - * If unspecified, at most 10 resources will be returned. - * The maximum value is 10. Higher values will be coerced to the maximum. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) * @param {string} request.pageToken - * A page token, received from a previous `ListMeasurementProtocolSecrets` - * call. Provide this to retrieve the subsequent page. When paginating, all - * other parameters provided to `ListMeasurementProtocolSecrets` must match - * the call that provided the page token. + * A page token, received from a previous `ListConversionEvents` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListConversionEvents` + * must match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.MeasurementProtocolSecret | MeasurementProtocolSecret}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.ConversionEvent | ConversionEvent}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_measurement_protocol_secrets.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListMeasurementProtocolSecrets_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_conversion_events.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListConversionEvents_async */ - listMeasurementProtocolSecretsAsync( - request?: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + listConversionEventsAsync( + request?: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -9360,119 +11102,100 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = - this._defaults['listMeasurementProtocolSecrets']; + const defaultCallSettings = this._defaults['listConversionEvents']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listMeasurementProtocolSecrets.asyncIterate( - this.innerApiCalls['listMeasurementProtocolSecrets'] as GaxCall, + return this.descriptors.page.listConversionEvents.asyncIterate( + this.innerApiCalls['listConversionEvents'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Searches through all changes to an account or its children given the - * specified set of filters. + * Lists all DisplayVideo360AdvertiserLinks on a property. * * @param {Object} request * The request object that will be sent. - * @param {string} request.account - * Required. The account resource for which to return change history - * resources. - * @param {string} [request.property] - * Optional. Resource name for a child property. If set, only return changes - * made to this property or its child resources. - * @param {number[]} [request.resourceType] - * Optional. If set, only return changes if they are for a resource that - * matches at least one of these types. - * @param {number[]} [request.action] - * Optional. If set, only return changes that match one or more of these types - * of actions. - * @param {string[]} [request.actorEmail] - * Optional. If set, only return changes if they are made by a user in this - * list. - * @param {google.protobuf.Timestamp} [request.earliestChangeTime] - * Optional. If set, only return changes made after this time (inclusive). - * @param {google.protobuf.Timestamp} [request.latestChangeTime] - * Optional. If set, only return changes made before this time (inclusive). - * @param {number} [request.pageSize] - * Optional. The maximum number of ChangeHistoryEvent items to return. - * The service may return fewer than this value, even if there are additional - * pages. If unspecified, at most 50 items will be returned. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous - * `SearchChangeHistoryEvents` call. Provide this to retrieve the subsequent - * page. When paginating, all other parameters provided to - * `SearchChangeHistoryEvents` must match the call that provided the page - * token. + * @param {string} request.pageToken + * A page token, received from a previous `ListDisplayVideo360AdvertiserLinks` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListDisplayVideo360AdvertiserLinks` must match the call that provided the + * page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.ChangeHistoryEvent | ChangeHistoryEvent}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink | DisplayVideo360AdvertiserLink}. * 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 `searchChangeHistoryEventsAsync()` + * We recommend using `listDisplayVideo360AdvertiserLinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - searchChangeHistoryEvents( - request?: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + listDisplayVideo360AdvertiserLinks( + request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IChangeHistoryEvent[], - protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest | null, - protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink[], + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest | null, + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse ] >; - searchChangeHistoryEvents( - request: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + listDisplayVideo360AdvertiserLinks( + request: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, - | protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IChangeHistoryEvent + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink > ): void; - searchChangeHistoryEvents( - request: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + listDisplayVideo360AdvertiserLinks( + request: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, - | protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IChangeHistoryEvent + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink > ): void; - searchChangeHistoryEvents( - request?: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + listDisplayVideo360AdvertiserLinks( + request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, - | protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IChangeHistoryEvent + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, - | protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IChangeHistoryEvent + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink > ): Promise< [ - protos.google.analytics.admin.v1alpha.IChangeHistoryEvent[], - protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest | null, - protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink[], + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest | null, + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse ] > | void { request = request || {}; @@ -9488,10 +11211,10 @@ export class AnalyticsAdminServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - account: request.account ?? '', + parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.searchChangeHistoryEvents( + return this.innerApiCalls.listDisplayVideo360AdvertiserLinks( request, options, callback @@ -9502,50 +11225,33 @@ export class AnalyticsAdminServiceClient { * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. - * @param {string} request.account - * Required. The account resource for which to return change history - * resources. - * @param {string} [request.property] - * Optional. Resource name for a child property. If set, only return changes - * made to this property or its child resources. - * @param {number[]} [request.resourceType] - * Optional. If set, only return changes if they are for a resource that - * matches at least one of these types. - * @param {number[]} [request.action] - * Optional. If set, only return changes that match one or more of these types - * of actions. - * @param {string[]} [request.actorEmail] - * Optional. If set, only return changes if they are made by a user in this - * list. - * @param {google.protobuf.Timestamp} [request.earliestChangeTime] - * Optional. If set, only return changes made after this time (inclusive). - * @param {google.protobuf.Timestamp} [request.latestChangeTime] - * Optional. If set, only return changes made before this time (inclusive). - * @param {number} [request.pageSize] - * Optional. The maximum number of ChangeHistoryEvent items to return. - * The service may return fewer than this value, even if there are additional - * pages. If unspecified, at most 50 items will be returned. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous - * `SearchChangeHistoryEvents` call. Provide this to retrieve the subsequent - * page. When paginating, all other parameters provided to - * `SearchChangeHistoryEvents` must match the call that provided the page - * token. + * @param {string} request.pageToken + * A page token, received from a previous `ListDisplayVideo360AdvertiserLinks` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListDisplayVideo360AdvertiserLinks` must match the call that provided the + * page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.ChangeHistoryEvent | ChangeHistoryEvent} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink | DisplayVideo360AdvertiserLink} 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 `searchChangeHistoryEventsAsync()` + * We recommend using `listDisplayVideo360AdvertiserLinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - searchChangeHistoryEventsStream( - request?: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + listDisplayVideo360AdvertiserLinksStream( + request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, options?: CallOptions ): Transform { request = request || {}; @@ -9554,174 +11260,159 @@ export class AnalyticsAdminServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - account: request.account ?? '', - }); - const defaultCallSettings = this._defaults['searchChangeHistoryEvents']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.searchChangeHistoryEvents.createStream( - this.innerApiCalls.searchChangeHistoryEvents as GaxCall, - request, - callSettings - ); - } - - /** - * Equivalent to `searchChangeHistoryEvents`, 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.account - * Required. The account resource for which to return change history - * resources. - * @param {string} [request.property] - * Optional. Resource name for a child property. If set, only return changes - * made to this property or its child resources. - * @param {number[]} [request.resourceType] - * Optional. If set, only return changes if they are for a resource that - * matches at least one of these types. - * @param {number[]} [request.action] - * Optional. If set, only return changes that match one or more of these types - * of actions. - * @param {string[]} [request.actorEmail] - * Optional. If set, only return changes if they are made by a user in this - * list. - * @param {google.protobuf.Timestamp} [request.earliestChangeTime] - * Optional. If set, only return changes made after this time (inclusive). - * @param {google.protobuf.Timestamp} [request.latestChangeTime] - * Optional. If set, only return changes made before this time (inclusive). - * @param {number} [request.pageSize] - * Optional. The maximum number of ChangeHistoryEvent items to return. - * The service may return fewer than this value, even if there are additional - * pages. If unspecified, at most 50 items will be returned. + parent: request.parent ?? '', + }); + const defaultCallSettings = + this._defaults['listDisplayVideo360AdvertiserLinks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDisplayVideo360AdvertiserLinks.createStream( + this.innerApiCalls.listDisplayVideo360AdvertiserLinks as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listDisplayVideo360AdvertiserLinks`, 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. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous - * `SearchChangeHistoryEvents` call. Provide this to retrieve the subsequent - * page. When paginating, all other parameters provided to - * `SearchChangeHistoryEvents` must match the call that provided the page - * token. + * @param {string} request.pageToken + * A page token, received from a previous `ListDisplayVideo360AdvertiserLinks` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListDisplayVideo360AdvertiserLinks` must match the call that provided the + * page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.ChangeHistoryEvent | ChangeHistoryEvent}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink | DisplayVideo360AdvertiserLink}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.search_change_history_events.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_SearchChangeHistoryEvents_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_links.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListDisplayVideo360AdvertiserLinks_async */ - searchChangeHistoryEventsAsync( - request?: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + listDisplayVideo360AdvertiserLinksAsync( + request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, options?: CallOptions - ): AsyncIterable { + ): 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({ - account: request.account ?? '', + parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['searchChangeHistoryEvents']; + const defaultCallSettings = + this._defaults['listDisplayVideo360AdvertiserLinks']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.searchChangeHistoryEvents.asyncIterate( - this.innerApiCalls['searchChangeHistoryEvents'] as GaxCall, + return this.descriptors.page.listDisplayVideo360AdvertiserLinks.asyncIterate( + this.innerApiCalls['listDisplayVideo360AdvertiserLinks'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Returns a list of conversion events in the specified parent property. - * - * Returns an empty list if no conversion events are found. + * Lists DisplayVideo360AdvertiserLinkProposals on a property. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the parent property. - * Example: 'properties/123' + * Required. Example format: properties/1234 * @param {number} request.pageSize * The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. - * The maximum value is 200; (higher values will be coerced to the maximum) + * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} request.pageToken - * A page token, received from a previous `ListConversionEvents` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListConversionEvents` - * must match the call that provided the page token. + * A page token, received from a previous + * `ListDisplayVideo360AdvertiserLinkProposals` call. Provide this to retrieve + * the subsequent page. + * + * When paginating, all other parameters provided to + * `ListDisplayVideo360AdvertiserLinkProposals` must match the call that + * provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.ConversionEvent | ConversionEvent}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal | DisplayVideo360AdvertiserLinkProposal}. * 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 `listConversionEventsAsync()` + * We recommend using `listDisplayVideo360AdvertiserLinkProposalsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listConversionEvents( - request?: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + listDisplayVideo360AdvertiserLinkProposals( + request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IConversionEvent[], - protos.google.analytics.admin.v1alpha.IListConversionEventsRequest | null, - protos.google.analytics.admin.v1alpha.IListConversionEventsResponse + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal[], + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest | null, + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse ] >; - listConversionEvents( - request: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + listDisplayVideo360AdvertiserLinkProposals( + request: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, - | protos.google.analytics.admin.v1alpha.IListConversionEventsResponse + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IConversionEvent + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal > ): void; - listConversionEvents( - request: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + listDisplayVideo360AdvertiserLinkProposals( + request: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, - | protos.google.analytics.admin.v1alpha.IListConversionEventsResponse + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IConversionEvent + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal > ): void; - listConversionEvents( - request?: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + listDisplayVideo360AdvertiserLinkProposals( + request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, - | protos.google.analytics.admin.v1alpha.IListConversionEventsResponse + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IConversionEvent + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, - | protos.google.analytics.admin.v1alpha.IListConversionEventsResponse + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IConversionEvent + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal > ): Promise< [ - protos.google.analytics.admin.v1alpha.IConversionEvent[], - protos.google.analytics.admin.v1alpha.IListConversionEventsRequest | null, - protos.google.analytics.admin.v1alpha.IListConversionEventsResponse + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal[], + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest | null, + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse ] > | void { request = request || {}; @@ -9740,7 +11431,11 @@ export class AnalyticsAdminServiceClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listConversionEvents(request, options, callback); + return this.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals( + request, + options, + callback + ); } /** @@ -9748,31 +11443,33 @@ export class AnalyticsAdminServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the parent property. - * Example: 'properties/123' + * Required. Example format: properties/1234 * @param {number} request.pageSize * The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. - * The maximum value is 200; (higher values will be coerced to the maximum) + * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} request.pageToken - * A page token, received from a previous `ListConversionEvents` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListConversionEvents` - * must match the call that provided the page token. + * A page token, received from a previous + * `ListDisplayVideo360AdvertiserLinkProposals` call. Provide this to retrieve + * the subsequent page. + * + * When paginating, all other parameters provided to + * `ListDisplayVideo360AdvertiserLinkProposals` must match the call that + * provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.ConversionEvent | ConversionEvent} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal | DisplayVideo360AdvertiserLinkProposal} 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 `listConversionEventsAsync()` + * We recommend using `listDisplayVideo360AdvertiserLinkProposalsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listConversionEventsStream( - request?: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + listDisplayVideo360AdvertiserLinkProposalsStream( + request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -9783,51 +11480,54 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listConversionEvents']; + const defaultCallSettings = + this._defaults['listDisplayVideo360AdvertiserLinkProposals']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listConversionEvents.createStream( - this.innerApiCalls.listConversionEvents as GaxCall, + return this.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.createStream( + this.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals as GaxCall, request, callSettings ); } /** - * Equivalent to `listConversionEvents`, but returns an iterable object. + * Equivalent to `listDisplayVideo360AdvertiserLinkProposals`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the parent property. - * Example: 'properties/123' + * Required. Example format: properties/1234 * @param {number} request.pageSize * The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. - * The maximum value is 200; (higher values will be coerced to the maximum) + * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} request.pageToken - * A page token, received from a previous `ListConversionEvents` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListConversionEvents` - * must match the call that provided the page token. + * A page token, received from a previous + * `ListDisplayVideo360AdvertiserLinkProposals` call. Provide this to retrieve + * the subsequent page. + * + * When paginating, all other parameters provided to + * `ListDisplayVideo360AdvertiserLinkProposals` must match the call that + * provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.ConversionEvent | ConversionEvent}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal | DisplayVideo360AdvertiserLinkProposal}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_conversion_events.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListConversionEvents_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_link_proposals.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListDisplayVideo360AdvertiserLinkProposals_async */ - listConversionEventsAsync( - request?: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + listDisplayVideo360AdvertiserLinkProposalsAsync( + request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -9836,17 +11536,20 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listConversionEvents']; + const defaultCallSettings = + this._defaults['listDisplayVideo360AdvertiserLinkProposals']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listConversionEvents.asyncIterate( - this.innerApiCalls['listConversionEvents'] as GaxCall, + return this.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.asyncIterate( + this.innerApiCalls[ + 'listDisplayVideo360AdvertiserLinkProposals' + ] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists all DisplayVideo360AdvertiserLinks on a property. + * Lists CustomDimensions on a property. * * @param {Object} request * The request object that will be sent. @@ -9857,79 +11560,78 @@ export class AnalyticsAdminServiceClient { * If unspecified, at most 50 resources will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} request.pageToken - * A page token, received from a previous `ListDisplayVideo360AdvertiserLinks` - * call. Provide this to retrieve the subsequent page. + * A page token, received from a previous `ListCustomDimensions` call. + * Provide this to retrieve the subsequent page. * - * When paginating, all other parameters provided to - * `ListDisplayVideo360AdvertiserLinks` must match the call that provided the - * page token. + * When paginating, all other parameters provided to `ListCustomDimensions` + * must match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink | DisplayVideo360AdvertiserLink}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.CustomDimension | CustomDimension}. * 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 `listDisplayVideo360AdvertiserLinksAsync()` + * We recommend using `listCustomDimensionsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listDisplayVideo360AdvertiserLinks( - request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + listCustomDimensions( + request?: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink[], - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest | null, - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse + protos.google.analytics.admin.v1alpha.ICustomDimension[], + protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest | null, + protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse ] >; - listDisplayVideo360AdvertiserLinks( - request: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + listCustomDimensions( + request: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, - | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse + protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + | protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink + protos.google.analytics.admin.v1alpha.ICustomDimension > ): void; - listDisplayVideo360AdvertiserLinks( - request: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + listCustomDimensions( + request: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, - | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse + protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + | protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink + protos.google.analytics.admin.v1alpha.ICustomDimension > ): void; - listDisplayVideo360AdvertiserLinks( - request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + listCustomDimensions( + request?: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, - | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse + protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + | protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink + protos.google.analytics.admin.v1alpha.ICustomDimension >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, - | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse + protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + | protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink + protos.google.analytics.admin.v1alpha.ICustomDimension > ): Promise< [ - protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink[], - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest | null, - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse + protos.google.analytics.admin.v1alpha.ICustomDimension[], + protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest | null, + protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse ] > | void { request = request || {}; @@ -9948,11 +11650,7 @@ export class AnalyticsAdminServiceClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listDisplayVideo360AdvertiserLinks( - request, - options, - callback - ); + return this.innerApiCalls.listCustomDimensions(request, options, callback); } /** @@ -9966,26 +11664,25 @@ export class AnalyticsAdminServiceClient { * If unspecified, at most 50 resources will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} request.pageToken - * A page token, received from a previous `ListDisplayVideo360AdvertiserLinks` - * call. Provide this to retrieve the subsequent page. + * A page token, received from a previous `ListCustomDimensions` call. + * Provide this to retrieve the subsequent page. * - * When paginating, all other parameters provided to - * `ListDisplayVideo360AdvertiserLinks` must match the call that provided the - * page token. + * When paginating, all other parameters provided to `ListCustomDimensions` + * must match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink | DisplayVideo360AdvertiserLink} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.CustomDimension | CustomDimension} 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 `listDisplayVideo360AdvertiserLinksAsync()` + * We recommend using `listCustomDimensionsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listDisplayVideo360AdvertiserLinksStream( - request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + listCustomDimensionsStream( + request?: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -9996,19 +11693,18 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = - this._defaults['listDisplayVideo360AdvertiserLinks']; + const defaultCallSettings = this._defaults['listCustomDimensions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listDisplayVideo360AdvertiserLinks.createStream( - this.innerApiCalls.listDisplayVideo360AdvertiserLinks as GaxCall, + return this.descriptors.page.listCustomDimensions.createStream( + this.innerApiCalls.listCustomDimensions as GaxCall, request, callSettings ); } /** - * Equivalent to `listDisplayVideo360AdvertiserLinks`, but returns an iterable object. + * Equivalent to `listCustomDimensions`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request @@ -10020,29 +11716,28 @@ export class AnalyticsAdminServiceClient { * If unspecified, at most 50 resources will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} request.pageToken - * A page token, received from a previous `ListDisplayVideo360AdvertiserLinks` - * call. Provide this to retrieve the subsequent page. + * A page token, received from a previous `ListCustomDimensions` call. + * Provide this to retrieve the subsequent page. * - * When paginating, all other parameters provided to - * `ListDisplayVideo360AdvertiserLinks` must match the call that provided the - * page token. + * When paginating, all other parameters provided to `ListCustomDimensions` + * must match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink | DisplayVideo360AdvertiserLink}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.CustomDimension | CustomDimension}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_links.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListDisplayVideo360AdvertiserLinks_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_custom_dimensions.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListCustomDimensions_async */ - listDisplayVideo360AdvertiserLinksAsync( - request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + listCustomDimensionsAsync( + request?: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -10051,18 +11746,17 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = - this._defaults['listDisplayVideo360AdvertiserLinks']; + const defaultCallSettings = this._defaults['listCustomDimensions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listDisplayVideo360AdvertiserLinks.asyncIterate( - this.innerApiCalls['listDisplayVideo360AdvertiserLinks'] as GaxCall, + return this.descriptors.page.listCustomDimensions.asyncIterate( + this.innerApiCalls['listCustomDimensions'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists DisplayVideo360AdvertiserLinkProposals on a property. + * Lists CustomMetrics on a property. * * @param {Object} request * The request object that will be sent. @@ -10073,80 +11767,78 @@ export class AnalyticsAdminServiceClient { * If unspecified, at most 50 resources will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} request.pageToken - * A page token, received from a previous - * `ListDisplayVideo360AdvertiserLinkProposals` call. Provide this to retrieve - * the subsequent page. + * A page token, received from a previous `ListCustomMetrics` call. + * Provide this to retrieve the subsequent page. * - * When paginating, all other parameters provided to - * `ListDisplayVideo360AdvertiserLinkProposals` must match the call that - * provided the page token. + * When paginating, all other parameters provided to `ListCustomMetrics` must + * match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal | DisplayVideo360AdvertiserLinkProposal}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.CustomMetric | CustomMetric}. * 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 `listDisplayVideo360AdvertiserLinkProposalsAsync()` + * We recommend using `listCustomMetricsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listDisplayVideo360AdvertiserLinkProposals( - request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + listCustomMetrics( + request?: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal[], - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest | null, - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse + protos.google.analytics.admin.v1alpha.ICustomMetric[], + protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest | null, + protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse ] >; - listDisplayVideo360AdvertiserLinkProposals( - request: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + listCustomMetrics( + request: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, - | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse + protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + | protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal + protos.google.analytics.admin.v1alpha.ICustomMetric > ): void; - listDisplayVideo360AdvertiserLinkProposals( - request: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + listCustomMetrics( + request: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, - | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse + protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + | protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal + protos.google.analytics.admin.v1alpha.ICustomMetric > ): void; - listDisplayVideo360AdvertiserLinkProposals( - request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + listCustomMetrics( + request?: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, - | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse + protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + | protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal + protos.google.analytics.admin.v1alpha.ICustomMetric >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, - | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse + protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + | protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal + protos.google.analytics.admin.v1alpha.ICustomMetric > ): Promise< [ - protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal[], - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest | null, - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse + protos.google.analytics.admin.v1alpha.ICustomMetric[], + protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest | null, + protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse ] > | void { request = request || {}; @@ -10165,11 +11857,7 @@ export class AnalyticsAdminServiceClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals( - request, - options, - callback - ); + return this.innerApiCalls.listCustomMetrics(request, options, callback); } /** @@ -10183,27 +11871,25 @@ export class AnalyticsAdminServiceClient { * If unspecified, at most 50 resources will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} request.pageToken - * A page token, received from a previous - * `ListDisplayVideo360AdvertiserLinkProposals` call. Provide this to retrieve - * the subsequent page. + * A page token, received from a previous `ListCustomMetrics` call. + * Provide this to retrieve the subsequent page. * - * When paginating, all other parameters provided to - * `ListDisplayVideo360AdvertiserLinkProposals` must match the call that - * provided the page token. + * When paginating, all other parameters provided to `ListCustomMetrics` must + * match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal | DisplayVideo360AdvertiserLinkProposal} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.CustomMetric | CustomMetric} 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 `listDisplayVideo360AdvertiserLinkProposalsAsync()` + * We recommend using `listCustomMetricsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listDisplayVideo360AdvertiserLinkProposalsStream( - request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + listCustomMetricsStream( + request?: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -10214,19 +11900,18 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = - this._defaults['listDisplayVideo360AdvertiserLinkProposals']; + const defaultCallSettings = this._defaults['listCustomMetrics']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.createStream( - this.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals as GaxCall, + return this.descriptors.page.listCustomMetrics.createStream( + this.innerApiCalls.listCustomMetrics as GaxCall, request, callSettings ); } /** - * Equivalent to `listDisplayVideo360AdvertiserLinkProposals`, but returns an iterable object. + * Equivalent to `listCustomMetrics`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request @@ -10238,30 +11923,28 @@ export class AnalyticsAdminServiceClient { * If unspecified, at most 50 resources will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} request.pageToken - * A page token, received from a previous - * `ListDisplayVideo360AdvertiserLinkProposals` call. Provide this to retrieve - * the subsequent page. + * A page token, received from a previous `ListCustomMetrics` call. + * Provide this to retrieve the subsequent page. * - * When paginating, all other parameters provided to - * `ListDisplayVideo360AdvertiserLinkProposals` must match the call that - * provided the page token. + * When paginating, all other parameters provided to `ListCustomMetrics` must + * match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal | DisplayVideo360AdvertiserLinkProposal}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.CustomMetric | CustomMetric}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_link_proposals.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListDisplayVideo360AdvertiserLinkProposals_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_custom_metrics.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListCustomMetrics_async */ - listDisplayVideo360AdvertiserLinkProposalsAsync( - request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + listCustomMetricsAsync( + request?: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -10270,20 +11953,17 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = - this._defaults['listDisplayVideo360AdvertiserLinkProposals']; + const defaultCallSettings = this._defaults['listCustomMetrics']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.asyncIterate( - this.innerApiCalls[ - 'listDisplayVideo360AdvertiserLinkProposals' - ] as GaxCall, + return this.descriptors.page.listCustomMetrics.asyncIterate( + this.innerApiCalls['listCustomMetrics'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists CustomDimensions on a property. + * Lists DataStreams on a property. * * @param {Object} request * The request object that will be sent. @@ -10294,78 +11974,78 @@ export class AnalyticsAdminServiceClient { * If unspecified, at most 50 resources will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} request.pageToken - * A page token, received from a previous `ListCustomDimensions` call. + * A page token, received from a previous `ListDataStreams` call. * Provide this to retrieve the subsequent page. * - * When paginating, all other parameters provided to `ListCustomDimensions` - * must match the call that provided the page token. + * When paginating, all other parameters provided to `ListDataStreams` must + * match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.CustomDimension | CustomDimension}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.DataStream | DataStream}. * 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 `listCustomDimensionsAsync()` + * We recommend using `listDataStreamsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listCustomDimensions( - request?: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + listDataStreams( + request?: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.ICustomDimension[], - protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest | null, - protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse + protos.google.analytics.admin.v1alpha.IDataStream[], + protos.google.analytics.admin.v1alpha.IListDataStreamsRequest | null, + protos.google.analytics.admin.v1alpha.IListDataStreamsResponse ] >; - listCustomDimensions( - request: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + listDataStreams( + request: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, - | protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse + protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + | protos.google.analytics.admin.v1alpha.IListDataStreamsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.ICustomDimension + protos.google.analytics.admin.v1alpha.IDataStream > ): void; - listCustomDimensions( - request: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + listDataStreams( + request: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, - | protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse + protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + | protos.google.analytics.admin.v1alpha.IListDataStreamsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.ICustomDimension + protos.google.analytics.admin.v1alpha.IDataStream > ): void; - listCustomDimensions( - request?: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + listDataStreams( + request?: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, - | protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse + protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + | protos.google.analytics.admin.v1alpha.IListDataStreamsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.ICustomDimension + protos.google.analytics.admin.v1alpha.IDataStream >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, - | protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse + protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + | protos.google.analytics.admin.v1alpha.IListDataStreamsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.ICustomDimension + protos.google.analytics.admin.v1alpha.IDataStream > ): Promise< [ - protos.google.analytics.admin.v1alpha.ICustomDimension[], - protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest | null, - protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse + protos.google.analytics.admin.v1alpha.IDataStream[], + protos.google.analytics.admin.v1alpha.IListDataStreamsRequest | null, + protos.google.analytics.admin.v1alpha.IListDataStreamsResponse ] > | void { request = request || {}; @@ -10384,7 +12064,7 @@ export class AnalyticsAdminServiceClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listCustomDimensions(request, options, callback); + return this.innerApiCalls.listDataStreams(request, options, callback); } /** @@ -10398,25 +12078,25 @@ export class AnalyticsAdminServiceClient { * If unspecified, at most 50 resources will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} request.pageToken - * A page token, received from a previous `ListCustomDimensions` call. + * A page token, received from a previous `ListDataStreams` call. * Provide this to retrieve the subsequent page. * - * When paginating, all other parameters provided to `ListCustomDimensions` - * must match the call that provided the page token. + * When paginating, all other parameters provided to `ListDataStreams` must + * match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.CustomDimension | CustomDimension} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.DataStream | DataStream} 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 `listCustomDimensionsAsync()` + * We recommend using `listDataStreamsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listCustomDimensionsStream( - request?: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + listDataStreamsStream( + request?: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -10427,18 +12107,18 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listCustomDimensions']; + const defaultCallSettings = this._defaults['listDataStreams']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listCustomDimensions.createStream( - this.innerApiCalls.listCustomDimensions as GaxCall, + return this.descriptors.page.listDataStreams.createStream( + this.innerApiCalls.listDataStreams as GaxCall, request, callSettings ); } /** - * Equivalent to `listCustomDimensions`, but returns an iterable object. + * Equivalent to `listDataStreams`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request @@ -10450,28 +12130,28 @@ export class AnalyticsAdminServiceClient { * If unspecified, at most 50 resources will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} request.pageToken - * A page token, received from a previous `ListCustomDimensions` call. + * A page token, received from a previous `ListDataStreams` call. * Provide this to retrieve the subsequent page. * - * When paginating, all other parameters provided to `ListCustomDimensions` - * must match the call that provided the page token. + * When paginating, all other parameters provided to `ListDataStreams` must + * match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.CustomDimension | CustomDimension}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.DataStream | DataStream}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_custom_dimensions.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListCustomDimensions_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_data_streams.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListDataStreams_async */ - listCustomDimensionsAsync( - request?: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + listDataStreamsAsync( + request?: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -10480,17 +12160,19 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listCustomDimensions']; + const defaultCallSettings = this._defaults['listDataStreams']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listCustomDimensions.asyncIterate( - this.innerApiCalls['listCustomDimensions'] as GaxCall, + return this.descriptors.page.listDataStreams.asyncIterate( + this.innerApiCalls['listDataStreams'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists CustomMetrics on a property. + * Lists Audiences on a property. + * Audiences created before 2020 may not be supported. + * Default audiences will not show filter definitions. * * @param {Object} request * The request object that will be sent. @@ -10501,78 +12183,78 @@ export class AnalyticsAdminServiceClient { * If unspecified, at most 50 resources will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} request.pageToken - * A page token, received from a previous `ListCustomMetrics` call. - * Provide this to retrieve the subsequent page. + * A page token, received from a previous `ListAudiences` call. Provide this + * to retrieve the subsequent page. * - * When paginating, all other parameters provided to `ListCustomMetrics` must + * When paginating, all other parameters provided to `ListAudiences` must * match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.CustomMetric | CustomMetric}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.Audience | Audience}. * 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 `listCustomMetricsAsync()` + * We recommend using `listAudiencesAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listCustomMetrics( - request?: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + listAudiences( + request?: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.ICustomMetric[], - protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest | null, - protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse + protos.google.analytics.admin.v1alpha.IAudience[], + protos.google.analytics.admin.v1alpha.IListAudiencesRequest | null, + protos.google.analytics.admin.v1alpha.IListAudiencesResponse ] >; - listCustomMetrics( - request: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + listAudiences( + request: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, - | protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse + protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + | protos.google.analytics.admin.v1alpha.IListAudiencesResponse | null | undefined, - protos.google.analytics.admin.v1alpha.ICustomMetric + protos.google.analytics.admin.v1alpha.IAudience > ): void; - listCustomMetrics( - request: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + listAudiences( + request: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, - | protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse + protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + | protos.google.analytics.admin.v1alpha.IListAudiencesResponse | null | undefined, - protos.google.analytics.admin.v1alpha.ICustomMetric + protos.google.analytics.admin.v1alpha.IAudience > ): void; - listCustomMetrics( - request?: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + listAudiences( + request?: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, - | protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse + protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + | protos.google.analytics.admin.v1alpha.IListAudiencesResponse | null | undefined, - protos.google.analytics.admin.v1alpha.ICustomMetric + protos.google.analytics.admin.v1alpha.IAudience >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, - | protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse + protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + | protos.google.analytics.admin.v1alpha.IListAudiencesResponse | null | undefined, - protos.google.analytics.admin.v1alpha.ICustomMetric + protos.google.analytics.admin.v1alpha.IAudience > ): Promise< [ - protos.google.analytics.admin.v1alpha.ICustomMetric[], - protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest | null, - protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse + protos.google.analytics.admin.v1alpha.IAudience[], + protos.google.analytics.admin.v1alpha.IListAudiencesRequest | null, + protos.google.analytics.admin.v1alpha.IListAudiencesResponse ] > | void { request = request || {}; @@ -10591,7 +12273,7 @@ export class AnalyticsAdminServiceClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listCustomMetrics(request, options, callback); + return this.innerApiCalls.listAudiences(request, options, callback); } /** @@ -10605,25 +12287,25 @@ export class AnalyticsAdminServiceClient { * If unspecified, at most 50 resources will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} request.pageToken - * A page token, received from a previous `ListCustomMetrics` call. - * Provide this to retrieve the subsequent page. + * A page token, received from a previous `ListAudiences` call. Provide this + * to retrieve the subsequent page. * - * When paginating, all other parameters provided to `ListCustomMetrics` must + * When paginating, all other parameters provided to `ListAudiences` must * match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.CustomMetric | CustomMetric} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.Audience | Audience} 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 `listCustomMetricsAsync()` + * We recommend using `listAudiencesAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listCustomMetricsStream( - request?: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + listAudiencesStream( + request?: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, options?: CallOptions ): Transform { request = request || {}; @@ -10634,18 +12316,18 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listCustomMetrics']; + const defaultCallSettings = this._defaults['listAudiences']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listCustomMetrics.createStream( - this.innerApiCalls.listCustomMetrics as GaxCall, + return this.descriptors.page.listAudiences.createStream( + this.innerApiCalls.listAudiences as GaxCall, request, callSettings ); } /** - * Equivalent to `listCustomMetrics`, but returns an iterable object. + * Equivalent to `listAudiences`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request @@ -10657,28 +12339,28 @@ export class AnalyticsAdminServiceClient { * If unspecified, at most 50 resources will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} request.pageToken - * A page token, received from a previous `ListCustomMetrics` call. - * Provide this to retrieve the subsequent page. + * A page token, received from a previous `ListAudiences` call. Provide this + * to retrieve the subsequent page. * - * When paginating, all other parameters provided to `ListCustomMetrics` must + * When paginating, all other parameters provided to `ListAudiences` must * match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.CustomMetric | CustomMetric}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.Audience | Audience}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_custom_metrics.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListCustomMetrics_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_audiences.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAudiences_async */ - listCustomMetricsAsync( - request?: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + listAudiencesAsync( + request?: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -10687,17 +12369,17 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listCustomMetrics']; + const defaultCallSettings = this._defaults['listAudiences']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listCustomMetrics.asyncIterate( - this.innerApiCalls['listCustomMetrics'] as GaxCall, + return this.descriptors.page.listAudiences.asyncIterate( + this.innerApiCalls['listAudiences'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists DataStreams on a property. + * Lists all SearchAds360Links on a property. * * @param {Object} request * The request object that will be sent. @@ -10708,78 +12390,79 @@ export class AnalyticsAdminServiceClient { * If unspecified, at most 50 resources will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} request.pageToken - * A page token, received from a previous `ListDataStreams` call. - * Provide this to retrieve the subsequent page. + * A page token, received from a previous `ListSearchAds360Links` + * call. Provide this to retrieve the subsequent page. * - * When paginating, all other parameters provided to `ListDataStreams` must - * match the call that provided the page token. + * When paginating, all other parameters provided to + * `ListSearchAds360Links` must match the call that provided the + * page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.DataStream | DataStream}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.SearchAds360Link | SearchAds360Link}. * 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 `listDataStreamsAsync()` + * We recommend using `listSearchAds360LinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listDataStreams( - request?: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + listSearchAds360Links( + request?: protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IDataStream[], - protos.google.analytics.admin.v1alpha.IListDataStreamsRequest | null, - protos.google.analytics.admin.v1alpha.IListDataStreamsResponse + protos.google.analytics.admin.v1alpha.ISearchAds360Link[], + protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest | null, + protos.google.analytics.admin.v1alpha.IListSearchAds360LinksResponse ] >; - listDataStreams( - request: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + listSearchAds360Links( + request: protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, - | protos.google.analytics.admin.v1alpha.IListDataStreamsResponse + protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, + | protos.google.analytics.admin.v1alpha.IListSearchAds360LinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IDataStream + protos.google.analytics.admin.v1alpha.ISearchAds360Link > ): void; - listDataStreams( - request: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + listSearchAds360Links( + request: protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, - | protos.google.analytics.admin.v1alpha.IListDataStreamsResponse + protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, + | protos.google.analytics.admin.v1alpha.IListSearchAds360LinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IDataStream + protos.google.analytics.admin.v1alpha.ISearchAds360Link > ): void; - listDataStreams( - request?: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + listSearchAds360Links( + request?: protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, - | protos.google.analytics.admin.v1alpha.IListDataStreamsResponse + protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, + | protos.google.analytics.admin.v1alpha.IListSearchAds360LinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IDataStream + protos.google.analytics.admin.v1alpha.ISearchAds360Link >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, - | protos.google.analytics.admin.v1alpha.IListDataStreamsResponse + protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, + | protos.google.analytics.admin.v1alpha.IListSearchAds360LinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IDataStream + protos.google.analytics.admin.v1alpha.ISearchAds360Link > ): Promise< [ - protos.google.analytics.admin.v1alpha.IDataStream[], - protos.google.analytics.admin.v1alpha.IListDataStreamsRequest | null, - protos.google.analytics.admin.v1alpha.IListDataStreamsResponse + protos.google.analytics.admin.v1alpha.ISearchAds360Link[], + protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest | null, + protos.google.analytics.admin.v1alpha.IListSearchAds360LinksResponse ] > | void { request = request || {}; @@ -10798,7 +12481,7 @@ export class AnalyticsAdminServiceClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listDataStreams(request, options, callback); + return this.innerApiCalls.listSearchAds360Links(request, options, callback); } /** @@ -10812,25 +12495,26 @@ export class AnalyticsAdminServiceClient { * If unspecified, at most 50 resources will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} request.pageToken - * A page token, received from a previous `ListDataStreams` call. - * Provide this to retrieve the subsequent page. + * A page token, received from a previous `ListSearchAds360Links` + * call. Provide this to retrieve the subsequent page. * - * When paginating, all other parameters provided to `ListDataStreams` must - * match the call that provided the page token. + * When paginating, all other parameters provided to + * `ListSearchAds360Links` must match the call that provided the + * page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.DataStream | DataStream} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.SearchAds360Link | SearchAds360Link} 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 `listDataStreamsAsync()` + * We recommend using `listSearchAds360LinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listDataStreamsStream( - request?: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + listSearchAds360LinksStream( + request?: protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, options?: CallOptions ): Transform { request = request || {}; @@ -10841,18 +12525,18 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listDataStreams']; + const defaultCallSettings = this._defaults['listSearchAds360Links']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listDataStreams.createStream( - this.innerApiCalls.listDataStreams as GaxCall, + return this.descriptors.page.listSearchAds360Links.createStream( + this.innerApiCalls.listSearchAds360Links as GaxCall, request, callSettings ); } /** - * Equivalent to `listDataStreams`, but returns an iterable object. + * Equivalent to `listSearchAds360Links`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request @@ -10864,28 +12548,29 @@ export class AnalyticsAdminServiceClient { * If unspecified, at most 50 resources will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} request.pageToken - * A page token, received from a previous `ListDataStreams` call. - * Provide this to retrieve the subsequent page. + * A page token, received from a previous `ListSearchAds360Links` + * call. Provide this to retrieve the subsequent page. * - * When paginating, all other parameters provided to `ListDataStreams` must - * match the call that provided the page token. + * When paginating, all other parameters provided to + * `ListSearchAds360Links` must match the call that provided the + * page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.DataStream | DataStream}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.SearchAds360Link | SearchAds360Link}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_data_streams.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListDataStreams_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_search_ads360_links.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListSearchAds360Links_async */ - listDataStreamsAsync( - request?: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + listSearchAds360LinksAsync( + request?: protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -10894,101 +12579,101 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listDataStreams']; + const defaultCallSettings = this._defaults['listSearchAds360Links']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listDataStreams.asyncIterate( - this.innerApiCalls['listDataStreams'] as GaxCall, + return this.descriptors.page.listSearchAds360Links.asyncIterate( + this.innerApiCalls['listSearchAds360Links'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists Audiences on a property. - * Audiences created before 2020 may not be supported. - * Default audiences will not show filter definitions. + * Lists all access bindings on an account or property. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Example format: properties/1234 + * Required. Formats: + * - accounts/{account} + * - properties/{property} * @param {number} request.pageSize - * The maximum number of resources to return. - * If unspecified, at most 50 resources will be returned. - * The maximum value is 200 (higher values will be coerced to the maximum). + * The maximum number of access bindings to return. + * The service may return fewer than this value. + * If unspecified, at most 200 access bindings will be returned. + * The maximum value is 500; values above 500 will be coerced to 500. * @param {string} request.pageToken - * A page token, received from a previous `ListAudiences` call. Provide this - * to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListAudiences` must + * A page token, received from a previous `ListAccessBindings` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAccessBindings` must * match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.Audience | Audience}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.AccessBinding | AccessBinding}. * 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 `listAudiencesAsync()` + * We recommend using `listAccessBindingsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listAudiences( - request?: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + listAccessBindings( + request?: protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IAudience[], - protos.google.analytics.admin.v1alpha.IListAudiencesRequest | null, - protos.google.analytics.admin.v1alpha.IListAudiencesResponse + protos.google.analytics.admin.v1alpha.IAccessBinding[], + protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest | null, + protos.google.analytics.admin.v1alpha.IListAccessBindingsResponse ] >; - listAudiences( - request: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + listAccessBindings( + request: protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListAudiencesRequest, - | protos.google.analytics.admin.v1alpha.IListAudiencesResponse + protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, + | protos.google.analytics.admin.v1alpha.IListAccessBindingsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAudience + protos.google.analytics.admin.v1alpha.IAccessBinding > ): void; - listAudiences( - request: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + listAccessBindings( + request: protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListAudiencesRequest, - | protos.google.analytics.admin.v1alpha.IListAudiencesResponse + protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, + | protos.google.analytics.admin.v1alpha.IListAccessBindingsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAudience + protos.google.analytics.admin.v1alpha.IAccessBinding > ): void; - listAudiences( - request?: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + listAccessBindings( + request?: protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListAudiencesRequest, - | protos.google.analytics.admin.v1alpha.IListAudiencesResponse + protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, + | protos.google.analytics.admin.v1alpha.IListAccessBindingsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAudience + protos.google.analytics.admin.v1alpha.IAccessBinding >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListAudiencesRequest, - | protos.google.analytics.admin.v1alpha.IListAudiencesResponse + protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, + | protos.google.analytics.admin.v1alpha.IListAccessBindingsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAudience + protos.google.analytics.admin.v1alpha.IAccessBinding > ): Promise< [ - protos.google.analytics.admin.v1alpha.IAudience[], - protos.google.analytics.admin.v1alpha.IListAudiencesRequest | null, - protos.google.analytics.admin.v1alpha.IListAudiencesResponse + protos.google.analytics.admin.v1alpha.IAccessBinding[], + protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest | null, + protos.google.analytics.admin.v1alpha.IListAccessBindingsResponse ] > | void { request = request || {}; @@ -11007,7 +12692,7 @@ export class AnalyticsAdminServiceClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listAudiences(request, options, callback); + return this.innerApiCalls.listAccessBindings(request, options, callback); } /** @@ -11015,31 +12700,33 @@ export class AnalyticsAdminServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Example format: properties/1234 + * Required. Formats: + * - accounts/{account} + * - properties/{property} * @param {number} request.pageSize - * The maximum number of resources to return. - * If unspecified, at most 50 resources will be returned. - * The maximum value is 200 (higher values will be coerced to the maximum). + * The maximum number of access bindings to return. + * The service may return fewer than this value. + * If unspecified, at most 200 access bindings will be returned. + * The maximum value is 500; values above 500 will be coerced to 500. * @param {string} request.pageToken - * A page token, received from a previous `ListAudiences` call. Provide this - * to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListAudiences` must + * A page token, received from a previous `ListAccessBindings` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAccessBindings` must * match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.Audience | Audience} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.AccessBinding | AccessBinding} 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 `listAudiencesAsync()` + * We recommend using `listAccessBindingsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listAudiencesStream( - request?: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + listAccessBindingsStream( + request?: protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -11050,51 +12737,53 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listAudiences']; + const defaultCallSettings = this._defaults['listAccessBindings']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listAudiences.createStream( - this.innerApiCalls.listAudiences as GaxCall, + return this.descriptors.page.listAccessBindings.createStream( + this.innerApiCalls.listAccessBindings as GaxCall, request, callSettings ); } /** - * Equivalent to `listAudiences`, but returns an iterable object. + * Equivalent to `listAccessBindings`, 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. Example format: properties/1234 + * Required. Formats: + * - accounts/{account} + * - properties/{property} * @param {number} request.pageSize - * The maximum number of resources to return. - * If unspecified, at most 50 resources will be returned. - * The maximum value is 200 (higher values will be coerced to the maximum). + * The maximum number of access bindings to return. + * The service may return fewer than this value. + * If unspecified, at most 200 access bindings will be returned. + * The maximum value is 500; values above 500 will be coerced to 500. * @param {string} request.pageToken - * A page token, received from a previous `ListAudiences` call. Provide this - * to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListAudiences` must + * A page token, received from a previous `ListAccessBindings` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAccessBindings` must * match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.Audience | Audience}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.AccessBinding | AccessBinding}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_audiences.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAudiences_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_access_bindings.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAccessBindings_async */ - listAudiencesAsync( - request?: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + listAccessBindingsAsync( + request?: protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -11103,17 +12792,17 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listAudiences']; + const defaultCallSettings = this._defaults['listAccessBindings']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listAudiences.asyncIterate( - this.innerApiCalls['listAudiences'] as GaxCall, + return this.descriptors.page.listAccessBindings.asyncIterate( + this.innerApiCalls['listAccessBindings'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists all SearchAds360Links on a property. + * Lists ExpandedDataSets on a property. * * @param {Object} request * The request object that will be sent. @@ -11124,79 +12813,78 @@ export class AnalyticsAdminServiceClient { * If unspecified, at most 50 resources will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} request.pageToken - * A page token, received from a previous `ListSearchAds360Links` - * call. Provide this to retrieve the subsequent page. + * A page token, received from a previous `ListExpandedDataSets` call. Provide + * this to retrieve the subsequent page. * - * When paginating, all other parameters provided to - * `ListSearchAds360Links` must match the call that provided the - * page token. + * When paginating, all other parameters provided to `ListExpandedDataSet` + * must match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.SearchAds360Link | SearchAds360Link}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.ExpandedDataSet | ExpandedDataSet}. * 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 `listSearchAds360LinksAsync()` + * We recommend using `listExpandedDataSetsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listSearchAds360Links( - request?: protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, + listExpandedDataSets( + request?: protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.ISearchAds360Link[], - protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest | null, - protos.google.analytics.admin.v1alpha.IListSearchAds360LinksResponse + protos.google.analytics.admin.v1alpha.IExpandedDataSet[], + protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest | null, + protos.google.analytics.admin.v1alpha.IListExpandedDataSetsResponse ] >; - listSearchAds360Links( - request: protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, + listExpandedDataSets( + request: protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, - | protos.google.analytics.admin.v1alpha.IListSearchAds360LinksResponse + protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, + | protos.google.analytics.admin.v1alpha.IListExpandedDataSetsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.ISearchAds360Link + protos.google.analytics.admin.v1alpha.IExpandedDataSet > ): void; - listSearchAds360Links( - request: protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, + listExpandedDataSets( + request: protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, - | protos.google.analytics.admin.v1alpha.IListSearchAds360LinksResponse + protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, + | protos.google.analytics.admin.v1alpha.IListExpandedDataSetsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.ISearchAds360Link + protos.google.analytics.admin.v1alpha.IExpandedDataSet > ): void; - listSearchAds360Links( - request?: protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, + listExpandedDataSets( + request?: protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, - | protos.google.analytics.admin.v1alpha.IListSearchAds360LinksResponse + protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, + | protos.google.analytics.admin.v1alpha.IListExpandedDataSetsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.ISearchAds360Link + protos.google.analytics.admin.v1alpha.IExpandedDataSet >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, - | protos.google.analytics.admin.v1alpha.IListSearchAds360LinksResponse + protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, + | protos.google.analytics.admin.v1alpha.IListExpandedDataSetsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.ISearchAds360Link + protos.google.analytics.admin.v1alpha.IExpandedDataSet > ): Promise< [ - protos.google.analytics.admin.v1alpha.ISearchAds360Link[], - protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest | null, - protos.google.analytics.admin.v1alpha.IListSearchAds360LinksResponse + protos.google.analytics.admin.v1alpha.IExpandedDataSet[], + protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest | null, + protos.google.analytics.admin.v1alpha.IListExpandedDataSetsResponse ] > | void { request = request || {}; @@ -11215,7 +12903,7 @@ export class AnalyticsAdminServiceClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listSearchAds360Links(request, options, callback); + return this.innerApiCalls.listExpandedDataSets(request, options, callback); } /** @@ -11229,26 +12917,25 @@ export class AnalyticsAdminServiceClient { * If unspecified, at most 50 resources will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} request.pageToken - * A page token, received from a previous `ListSearchAds360Links` - * call. Provide this to retrieve the subsequent page. + * A page token, received from a previous `ListExpandedDataSets` call. Provide + * this to retrieve the subsequent page. * - * When paginating, all other parameters provided to - * `ListSearchAds360Links` must match the call that provided the - * page token. + * When paginating, all other parameters provided to `ListExpandedDataSet` + * must match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.SearchAds360Link | SearchAds360Link} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.ExpandedDataSet | ExpandedDataSet} 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 `listSearchAds360LinksAsync()` + * We recommend using `listExpandedDataSetsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listSearchAds360LinksStream( - request?: protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, + listExpandedDataSetsStream( + request?: protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -11259,18 +12946,18 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listSearchAds360Links']; + const defaultCallSettings = this._defaults['listExpandedDataSets']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listSearchAds360Links.createStream( - this.innerApiCalls.listSearchAds360Links as GaxCall, + return this.descriptors.page.listExpandedDataSets.createStream( + this.innerApiCalls.listExpandedDataSets as GaxCall, request, callSettings ); } /** - * Equivalent to `listSearchAds360Links`, but returns an iterable object. + * Equivalent to `listExpandedDataSets`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request @@ -11282,29 +12969,28 @@ export class AnalyticsAdminServiceClient { * If unspecified, at most 50 resources will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} request.pageToken - * A page token, received from a previous `ListSearchAds360Links` - * call. Provide this to retrieve the subsequent page. + * A page token, received from a previous `ListExpandedDataSets` call. Provide + * this to retrieve the subsequent page. * - * When paginating, all other parameters provided to - * `ListSearchAds360Links` must match the call that provided the - * page token. + * When paginating, all other parameters provided to `ListExpandedDataSet` + * must match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.SearchAds360Link | SearchAds360Link}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.ExpandedDataSet | ExpandedDataSet}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_search_ads360_links.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListSearchAds360Links_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_expanded_data_sets.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListExpandedDataSets_async */ - listSearchAds360LinksAsync( - request?: protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, + listExpandedDataSetsAsync( + request?: protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -11313,14 +12999,14 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listSearchAds360Links']; + const defaultCallSettings = this._defaults['listExpandedDataSets']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listSearchAds360Links.asyncIterate( - this.innerApiCalls['listSearchAds360Links'] as GaxCall, + return this.descriptors.page.listExpandedDataSets.asyncIterate( + this.innerApiCalls['listExpandedDataSets'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** * Lists BigQuery Links on a property. @@ -11562,6 +13248,48 @@ export class AnalyticsAdminServiceClient { return this.pathTemplates.accountPathTemplate.match(accountName).account; } + /** + * Return a fully-qualified accountAccessBinding resource name string. + * + * @param {string} account + * @param {string} access_binding + * @returns {string} Resource name string. + */ + accountAccessBindingPath(account: string, accessBinding: string) { + return this.pathTemplates.accountAccessBindingPathTemplate.render({ + account: account, + access_binding: accessBinding, + }); + } + + /** + * Parse the account from AccountAccessBinding resource. + * + * @param {string} accountAccessBindingName + * A fully-qualified path representing account_access_binding resource. + * @returns {string} A string representing the account. + */ + matchAccountFromAccountAccessBindingName(accountAccessBindingName: string) { + return this.pathTemplates.accountAccessBindingPathTemplate.match( + accountAccessBindingName + ).account; + } + + /** + * Parse the access_binding from AccountAccessBinding resource. + * + * @param {string} accountAccessBindingName + * A fully-qualified path representing account_access_binding resource. + * @returns {string} A string representing the access_binding. + */ + matchAccessBindingFromAccountAccessBindingName( + accountAccessBindingName: string + ) { + return this.pathTemplates.accountAccessBindingPathTemplate.match( + accountAccessBindingName + ).access_binding; + } + /** * Return a fully-qualified accountSummary resource name string. * @@ -12259,6 +13987,50 @@ export class AnalyticsAdminServiceClient { return this.pathTemplates.propertyPathTemplate.match(propertyName).property; } + /** + * Return a fully-qualified propertyAccessBinding resource name string. + * + * @param {string} property + * @param {string} access_binding + * @returns {string} Resource name string. + */ + propertyAccessBindingPath(property: string, accessBinding: string) { + return this.pathTemplates.propertyAccessBindingPathTemplate.render({ + property: property, + access_binding: accessBinding, + }); + } + + /** + * Parse the property from PropertyAccessBinding resource. + * + * @param {string} propertyAccessBindingName + * A fully-qualified path representing property_access_binding resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromPropertyAccessBindingName( + propertyAccessBindingName: string + ) { + return this.pathTemplates.propertyAccessBindingPathTemplate.match( + propertyAccessBindingName + ).property; + } + + /** + * Parse the access_binding from PropertyAccessBinding resource. + * + * @param {string} propertyAccessBindingName + * A fully-qualified path representing property_access_binding resource. + * @returns {string} A string representing the access_binding. + */ + matchAccessBindingFromPropertyAccessBindingName( + propertyAccessBindingName: string + ) { + return this.pathTemplates.propertyAccessBindingPathTemplate.match( + propertyAccessBindingName + ).access_binding; + } + /** * Return a fully-qualified propertyUserLink resource name string. * diff --git a/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_client_config.json b/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_client_config.json index fedba047124..b90d806ed55 100644 --- a/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_client_config.json +++ b/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_client_config.json @@ -453,6 +453,76 @@ "retry_codes_name": "unknown_unavailable", "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" }, + "CreateAccessBinding": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetAccessBinding": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateAccessBinding": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "DeleteAccessBinding": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListAccessBindings": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "BatchCreateAccessBindings": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "BatchGetAccessBindings": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "BatchUpdateAccessBindings": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "BatchDeleteAccessBindings": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetExpandedDataSet": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListExpandedDataSets": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateExpandedDataSet": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateExpandedDataSet": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "DeleteExpandedDataSet": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, "SetAutomatedGa4ConfigurationOptOut": { "timeout_millis": 60000, "retry_codes_name": "unknown_unavailable", diff --git a/packages/google-analytics-admin/src/v1alpha/gapic_metadata.json b/packages/google-analytics-admin/src/v1alpha/gapic_metadata.json index dec2ff66daa..1212e4c28a8 100644 --- a/packages/google-analytics-admin/src/v1alpha/gapic_metadata.json +++ b/packages/google-analytics-admin/src/v1alpha/gapic_metadata.json @@ -345,6 +345,66 @@ "runAccessReport" ] }, + "CreateAccessBinding": { + "methods": [ + "createAccessBinding" + ] + }, + "GetAccessBinding": { + "methods": [ + "getAccessBinding" + ] + }, + "UpdateAccessBinding": { + "methods": [ + "updateAccessBinding" + ] + }, + "DeleteAccessBinding": { + "methods": [ + "deleteAccessBinding" + ] + }, + "BatchCreateAccessBindings": { + "methods": [ + "batchCreateAccessBindings" + ] + }, + "BatchGetAccessBindings": { + "methods": [ + "batchGetAccessBindings" + ] + }, + "BatchUpdateAccessBindings": { + "methods": [ + "batchUpdateAccessBindings" + ] + }, + "BatchDeleteAccessBindings": { + "methods": [ + "batchDeleteAccessBindings" + ] + }, + "GetExpandedDataSet": { + "methods": [ + "getExpandedDataSet" + ] + }, + "CreateExpandedDataSet": { + "methods": [ + "createExpandedDataSet" + ] + }, + "UpdateExpandedDataSet": { + "methods": [ + "updateExpandedDataSet" + ] + }, + "DeleteExpandedDataSet": { + "methods": [ + "deleteExpandedDataSet" + ] + }, "SetAutomatedGa4ConfigurationOptOut": { "methods": [ "setAutomatedGa4ConfigurationOptOut" @@ -479,6 +539,20 @@ "listSearchAds360LinksAsync" ] }, + "ListAccessBindings": { + "methods": [ + "listAccessBindings", + "listAccessBindingsStream", + "listAccessBindingsAsync" + ] + }, + "ListExpandedDataSets": { + "methods": [ + "listExpandedDataSets", + "listExpandedDataSetsStream", + "listExpandedDataSetsAsync" + ] + }, "ListBigQueryLinks": { "methods": [ "listBigQueryLinks", @@ -826,6 +900,66 @@ "runAccessReport" ] }, + "CreateAccessBinding": { + "methods": [ + "createAccessBinding" + ] + }, + "GetAccessBinding": { + "methods": [ + "getAccessBinding" + ] + }, + "UpdateAccessBinding": { + "methods": [ + "updateAccessBinding" + ] + }, + "DeleteAccessBinding": { + "methods": [ + "deleteAccessBinding" + ] + }, + "BatchCreateAccessBindings": { + "methods": [ + "batchCreateAccessBindings" + ] + }, + "BatchGetAccessBindings": { + "methods": [ + "batchGetAccessBindings" + ] + }, + "BatchUpdateAccessBindings": { + "methods": [ + "batchUpdateAccessBindings" + ] + }, + "BatchDeleteAccessBindings": { + "methods": [ + "batchDeleteAccessBindings" + ] + }, + "GetExpandedDataSet": { + "methods": [ + "getExpandedDataSet" + ] + }, + "CreateExpandedDataSet": { + "methods": [ + "createExpandedDataSet" + ] + }, + "UpdateExpandedDataSet": { + "methods": [ + "updateExpandedDataSet" + ] + }, + "DeleteExpandedDataSet": { + "methods": [ + "deleteExpandedDataSet" + ] + }, "SetAutomatedGa4ConfigurationOptOut": { "methods": [ "setAutomatedGa4ConfigurationOptOut" @@ -960,6 +1094,20 @@ "listSearchAds360LinksAsync" ] }, + "ListAccessBindings": { + "methods": [ + "listAccessBindings", + "listAccessBindingsStream", + "listAccessBindingsAsync" + ] + }, + "ListExpandedDataSets": { + "methods": [ + "listExpandedDataSets", + "listExpandedDataSetsStream", + "listExpandedDataSetsAsync" + ] + }, "ListBigQueryLinks": { "methods": [ "listBigQueryLinks", diff --git a/packages/google-analytics-admin/test/gapic_analytics_admin_service_v1alpha.ts b/packages/google-analytics-admin/test/gapic_analytics_admin_service_v1alpha.ts index 5e56a12e8a7..f1dfe7ef450 100644 --- a/packages/google-analytics-admin/test/gapic_analytics_admin_service_v1alpha.ts +++ b/packages/google-analytics-admin/test/gapic_analytics_admin_service_v1alpha.ts @@ -9433,8 +9433,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('setAutomatedGa4ConfigurationOptOut', () => { - it('invokes setAutomatedGa4ConfigurationOptOut without error', async () => { + describe('createAccessBinding', () => { + it('invokes createAccessBinding without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -9442,20 +9442,32 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest() + new protos.google.analytics.admin.v1alpha.CreateAccessBindingRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateAccessBindingRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse() + new protos.google.analytics.admin.v1alpha.AccessBinding() ); - client.innerApiCalls.setAutomatedGa4ConfigurationOptOut = + client.innerApiCalls.createAccessBinding = stubSimpleCall(expectedResponse); - const [response] = await client.setAutomatedGa4ConfigurationOptOut( - request - ); + const [response] = await client.createAccessBinding(request); assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createAccessBinding as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAccessBinding as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes setAutomatedGa4ConfigurationOptOut without error using callback', async () => { + it('invokes createAccessBinding without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -9463,19 +9475,25 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest() + new protos.google.analytics.admin.v1alpha.CreateAccessBindingRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateAccessBindingRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse() + new protos.google.analytics.admin.v1alpha.AccessBinding() ); - client.innerApiCalls.setAutomatedGa4ConfigurationOptOut = + client.innerApiCalls.createAccessBinding = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.setAutomatedGa4ConfigurationOptOut( + client.createAccessBinding( request, ( err?: Error | null, - result?: protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse | null + result?: protos.google.analytics.admin.v1alpha.IAccessBinding | null ) => { if (err) { reject(err); @@ -9487,9 +9505,17 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createAccessBinding as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAccessBinding as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes setAutomatedGa4ConfigurationOptOut with error', async () => { + it('invokes createAccessBinding with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -9497,20 +9523,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest() + new protos.google.analytics.admin.v1alpha.CreateAccessBindingRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateAccessBindingRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.setAutomatedGa4ConfigurationOptOut = stubSimpleCall( + client.innerApiCalls.createAccessBinding = stubSimpleCall( undefined, expectedError ); - await assert.rejects( - client.setAutomatedGa4ConfigurationOptOut(request), - expectedError - ); + await assert.rejects(client.createAccessBinding(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createAccessBinding as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAccessBinding as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes setAutomatedGa4ConfigurationOptOut with closed client', async () => { + it('invokes createAccessBinding with closed client', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -9518,19 +9555,21 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest() + new protos.google.analytics.admin.v1alpha.CreateAccessBindingRequest() ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateAccessBindingRequest', + ['parent'] + ); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); - await assert.rejects( - client.setAutomatedGa4ConfigurationOptOut(request), - expectedError - ); + await assert.rejects(client.createAccessBinding(request), expectedError); }); }); - describe('fetchAutomatedGa4ConfigurationOptOut', () => { - it('invokes fetchAutomatedGa4ConfigurationOptOut without error', async () => { + describe('getAccessBinding', () => { + it('invokes getAccessBinding without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -9538,20 +9577,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest() + new protos.google.analytics.admin.v1alpha.GetAccessBindingRequest() ); - const expectedResponse = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse() + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetAccessBindingRequest', + ['name'] ); - client.innerApiCalls.fetchAutomatedGa4ConfigurationOptOut = - stubSimpleCall(expectedResponse); - const [response] = await client.fetchAutomatedGa4ConfigurationOptOut( - request + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccessBinding() ); + client.innerApiCalls.getAccessBinding = stubSimpleCall(expectedResponse); + const [response] = await client.getAccessBinding(request); assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAccessBinding as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAccessBinding as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes fetchAutomatedGa4ConfigurationOptOut without error using callback', async () => { + it('invokes getAccessBinding without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -9559,19 +9609,25 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest() + new protos.google.analytics.admin.v1alpha.GetAccessBindingRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetAccessBindingRequest', + ['name'] ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse() + new protos.google.analytics.admin.v1alpha.AccessBinding() ); - client.innerApiCalls.fetchAutomatedGa4ConfigurationOptOut = + client.innerApiCalls.getAccessBinding = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.fetchAutomatedGa4ConfigurationOptOut( + client.getAccessBinding( request, ( err?: Error | null, - result?: protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse | null + result?: protos.google.analytics.admin.v1alpha.IAccessBinding | null ) => { if (err) { reject(err); @@ -9583,9 +9639,17 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAccessBinding as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAccessBinding as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes fetchAutomatedGa4ConfigurationOptOut with error', async () => { + it('invokes getAccessBinding with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -9593,18 +9657,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest() + new protos.google.analytics.admin.v1alpha.GetAccessBindingRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetAccessBindingRequest', + ['name'] ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.fetchAutomatedGa4ConfigurationOptOut = - stubSimpleCall(undefined, expectedError); - await assert.rejects( - client.fetchAutomatedGa4ConfigurationOptOut(request), + client.innerApiCalls.getAccessBinding = stubSimpleCall( + undefined, expectedError ); + await assert.rejects(client.getAccessBinding(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getAccessBinding as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAccessBinding as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes fetchAutomatedGa4ConfigurationOptOut with closed client', async () => { + it('invokes getAccessBinding with closed client', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -9612,19 +9689,21 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest() + new protos.google.analytics.admin.v1alpha.GetAccessBindingRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetAccessBindingRequest', + ['name'] ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); - await assert.rejects( - client.fetchAutomatedGa4ConfigurationOptOut(request), - expectedError - ); + await assert.rejects(client.getAccessBinding(request), expectedError); }); }); - describe('getBigQueryLink', () => { - it('invokes getBigQueryLink without error', async () => { + describe('updateAccessBinding', () => { + it('invokes updateAccessBinding without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -9632,31 +9711,33 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GetBigQueryLinkRequest() + new protos.google.analytics.admin.v1alpha.UpdateAccessBindingRequest() ); + request.accessBinding ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.GetBigQueryLinkRequest', - ['name'] + '.google.analytics.admin.v1alpha.UpdateAccessBindingRequest', + ['accessBinding', 'name'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.accessBinding.name = defaultValue1; + const expectedHeaderRequestParams = `access_binding.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.BigQueryLink() + new protos.google.analytics.admin.v1alpha.AccessBinding() ); - client.innerApiCalls.getBigQueryLink = stubSimpleCall(expectedResponse); - const [response] = await client.getBigQueryLink(request); + client.innerApiCalls.updateAccessBinding = + stubSimpleCall(expectedResponse); + const [response] = await client.updateAccessBinding(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getBigQueryLink as SinonStub + client.innerApiCalls.updateAccessBinding as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getBigQueryLink as SinonStub + client.innerApiCalls.updateAccessBinding as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getBigQueryLink without error using callback', async () => { + it('invokes updateAccessBinding without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -9664,25 +9745,26 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GetBigQueryLinkRequest() + new protos.google.analytics.admin.v1alpha.UpdateAccessBindingRequest() ); + request.accessBinding ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.GetBigQueryLinkRequest', - ['name'] + '.google.analytics.admin.v1alpha.UpdateAccessBindingRequest', + ['accessBinding', 'name'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.accessBinding.name = defaultValue1; + const expectedHeaderRequestParams = `access_binding.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.BigQueryLink() + new protos.google.analytics.admin.v1alpha.AccessBinding() ); - client.innerApiCalls.getBigQueryLink = + client.innerApiCalls.updateAccessBinding = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.getBigQueryLink( + client.updateAccessBinding( request, ( err?: Error | null, - result?: protos.google.analytics.admin.v1alpha.IBigQueryLink | null + result?: protos.google.analytics.admin.v1alpha.IAccessBinding | null ) => { if (err) { reject(err); @@ -9695,16 +9777,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getBigQueryLink as SinonStub + client.innerApiCalls.updateAccessBinding as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getBigQueryLink as SinonStub + client.innerApiCalls.updateAccessBinding as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getBigQueryLink with error', async () => { + it('invokes updateAccessBinding with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -9712,31 +9794,32 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GetBigQueryLinkRequest() + new protos.google.analytics.admin.v1alpha.UpdateAccessBindingRequest() ); + request.accessBinding ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.GetBigQueryLinkRequest', - ['name'] + '.google.analytics.admin.v1alpha.UpdateAccessBindingRequest', + ['accessBinding', 'name'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.accessBinding.name = defaultValue1; + const expectedHeaderRequestParams = `access_binding.name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.getBigQueryLink = stubSimpleCall( + client.innerApiCalls.updateAccessBinding = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.getBigQueryLink(request), expectedError); + await assert.rejects(client.updateAccessBinding(request), expectedError); const actualRequest = ( - client.innerApiCalls.getBigQueryLink as SinonStub + client.innerApiCalls.updateAccessBinding as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getBigQueryLink as SinonStub + client.innerApiCalls.updateAccessBinding as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getBigQueryLink with closed client', async () => { + it('invokes updateAccessBinding with closed client', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -9744,21 +9827,22 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GetBigQueryLinkRequest() + new protos.google.analytics.admin.v1alpha.UpdateAccessBindingRequest() ); + request.accessBinding ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.GetBigQueryLinkRequest', - ['name'] + '.google.analytics.admin.v1alpha.UpdateAccessBindingRequest', + ['accessBinding', 'name'] ); - request.name = defaultValue1; + request.accessBinding.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); - await assert.rejects(client.getBigQueryLink(request), expectedError); + await assert.rejects(client.updateAccessBinding(request), expectedError); }); }); - describe('listAccounts', () => { - it('invokes listAccounts without error', async () => { + describe('deleteAccessBinding', () => { + it('invokes deleteAccessBinding without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -9766,25 +9850,32 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + new protos.google.analytics.admin.v1alpha.DeleteAccessBindingRequest() ); - const expectedResponse = [ - generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Account() - ), - generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Account() - ), - generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Account() - ), - ]; - client.innerApiCalls.listAccounts = stubSimpleCall(expectedResponse); - const [response] = await client.listAccounts(request); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteAccessBindingRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteAccessBinding = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteAccessBinding(request); assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteAccessBinding as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAccessBinding as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listAccounts without error using callback', async () => { + it('invokes deleteAccessBinding without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -9792,27 +9883,25 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + new protos.google.analytics.admin.v1alpha.DeleteAccessBindingRequest() ); - const expectedResponse = [ - generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Account() - ), - generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Account() - ), - generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Account() - ), - ]; - client.innerApiCalls.listAccounts = + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteAccessBindingRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteAccessBinding = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listAccounts( + client.deleteAccessBinding( request, ( err?: Error | null, - result?: protos.google.analytics.admin.v1alpha.IAccount[] | null + result?: protos.google.protobuf.IEmpty | null ) => { if (err) { reject(err); @@ -9824,9 +9913,17 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteAccessBinding as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAccessBinding as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listAccounts with error', async () => { + it('invokes deleteAccessBinding with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -9834,17 +9931,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + new protos.google.analytics.admin.v1alpha.DeleteAccessBindingRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteAccessBindingRequest', + ['name'] ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listAccounts = stubSimpleCall( + client.innerApiCalls.deleteAccessBinding = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listAccounts(request), expectedError); + await assert.rejects(client.deleteAccessBinding(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteAccessBinding as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAccessBinding as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listAccountsStream without error', async () => { + it('invokes deleteAccessBinding with closed client', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -9852,27 +9963,2070 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + new protos.google.analytics.admin.v1alpha.DeleteAccessBindingRequest() ); - const expectedResponse = [ - generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Account() - ), - generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Account() - ), + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteAccessBindingRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteAccessBinding(request), expectedError); + }); + }); + + describe('batchCreateAccessBindings', () => { + it('invokes batchCreateAccessBindings without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse() + ); + client.innerApiCalls.batchCreateAccessBindings = + stubSimpleCall(expectedResponse); + const [response] = await client.batchCreateAccessBindings(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.batchCreateAccessBindings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchCreateAccessBindings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchCreateAccessBindings without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse() + ); + client.innerApiCalls.batchCreateAccessBindings = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchCreateAccessBindings( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IBatchCreateAccessBindingsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.batchCreateAccessBindings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchCreateAccessBindings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchCreateAccessBindings with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchCreateAccessBindings = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.batchCreateAccessBindings(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.batchCreateAccessBindings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchCreateAccessBindings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchCreateAccessBindings with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.batchCreateAccessBindings(request), + expectedError + ); + }); + }); + + describe('batchGetAccessBindings', () => { + it('invokes batchGetAccessBindings without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse() + ); + client.innerApiCalls.batchGetAccessBindings = + stubSimpleCall(expectedResponse); + const [response] = await client.batchGetAccessBindings(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.batchGetAccessBindings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchGetAccessBindings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchGetAccessBindings without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse() + ); + client.innerApiCalls.batchGetAccessBindings = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchGetAccessBindings( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IBatchGetAccessBindingsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.batchGetAccessBindings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchGetAccessBindings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchGetAccessBindings with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchGetAccessBindings = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.batchGetAccessBindings(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.batchGetAccessBindings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchGetAccessBindings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchGetAccessBindings with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.batchGetAccessBindings(request), + expectedError + ); + }); + }); + + describe('batchUpdateAccessBindings', () => { + it('invokes batchUpdateAccessBindings without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse() + ); + client.innerApiCalls.batchUpdateAccessBindings = + stubSimpleCall(expectedResponse); + const [response] = await client.batchUpdateAccessBindings(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.batchUpdateAccessBindings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchUpdateAccessBindings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchUpdateAccessBindings without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse() + ); + client.innerApiCalls.batchUpdateAccessBindings = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchUpdateAccessBindings( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IBatchUpdateAccessBindingsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.batchUpdateAccessBindings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchUpdateAccessBindings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchUpdateAccessBindings with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchUpdateAccessBindings = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.batchUpdateAccessBindings(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.batchUpdateAccessBindings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchUpdateAccessBindings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchUpdateAccessBindings with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.batchUpdateAccessBindings(request), + expectedError + ); + }); + }); + + describe('batchDeleteAccessBindings', () => { + it('invokes batchDeleteAccessBindings without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.batchDeleteAccessBindings = + stubSimpleCall(expectedResponse); + const [response] = await client.batchDeleteAccessBindings(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.batchDeleteAccessBindings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchDeleteAccessBindings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchDeleteAccessBindings without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.batchDeleteAccessBindings = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchDeleteAccessBindings( + 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.batchDeleteAccessBindings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchDeleteAccessBindings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchDeleteAccessBindings with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchDeleteAccessBindings = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.batchDeleteAccessBindings(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.batchDeleteAccessBindings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchDeleteAccessBindings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchDeleteAccessBindings with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.batchDeleteAccessBindings(request), + expectedError + ); + }); + }); + + describe('getExpandedDataSet', () => { + it('invokes getExpandedDataSet without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetExpandedDataSetRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetExpandedDataSetRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() + ); + client.innerApiCalls.getExpandedDataSet = + stubSimpleCall(expectedResponse); + const [response] = await client.getExpandedDataSet(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getExpandedDataSet as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getExpandedDataSet as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getExpandedDataSet without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetExpandedDataSetRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetExpandedDataSetRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() + ); + client.innerApiCalls.getExpandedDataSet = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getExpandedDataSet( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IExpandedDataSet | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getExpandedDataSet as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getExpandedDataSet as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getExpandedDataSet with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetExpandedDataSetRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetExpandedDataSetRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getExpandedDataSet = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getExpandedDataSet(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getExpandedDataSet as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getExpandedDataSet as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getExpandedDataSet with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetExpandedDataSetRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetExpandedDataSetRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getExpandedDataSet(request), expectedError); + }); + }); + + describe('createExpandedDataSet', () => { + it('invokes createExpandedDataSet without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateExpandedDataSetRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateExpandedDataSetRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() + ); + client.innerApiCalls.createExpandedDataSet = + stubSimpleCall(expectedResponse); + const [response] = await client.createExpandedDataSet(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createExpandedDataSet as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createExpandedDataSet as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createExpandedDataSet without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateExpandedDataSetRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateExpandedDataSetRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() + ); + client.innerApiCalls.createExpandedDataSet = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createExpandedDataSet( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IExpandedDataSet | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createExpandedDataSet as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createExpandedDataSet as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createExpandedDataSet with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateExpandedDataSetRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateExpandedDataSetRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createExpandedDataSet = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.createExpandedDataSet(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.createExpandedDataSet as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createExpandedDataSet as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createExpandedDataSet with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateExpandedDataSetRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateExpandedDataSetRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.createExpandedDataSet(request), + expectedError + ); + }); + }); + + describe('updateExpandedDataSet', () => { + it('invokes updateExpandedDataSet without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest() + ); + request.expandedDataSet ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest', + ['expandedDataSet', 'name'] + ); + request.expandedDataSet.name = defaultValue1; + const expectedHeaderRequestParams = `expanded_data_set.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() + ); + client.innerApiCalls.updateExpandedDataSet = + stubSimpleCall(expectedResponse); + const [response] = await client.updateExpandedDataSet(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateExpandedDataSet as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateExpandedDataSet as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateExpandedDataSet without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest() + ); + request.expandedDataSet ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest', + ['expandedDataSet', 'name'] + ); + request.expandedDataSet.name = defaultValue1; + const expectedHeaderRequestParams = `expanded_data_set.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() + ); + client.innerApiCalls.updateExpandedDataSet = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateExpandedDataSet( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IExpandedDataSet | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateExpandedDataSet as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateExpandedDataSet as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateExpandedDataSet with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest() + ); + request.expandedDataSet ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest', + ['expandedDataSet', 'name'] + ); + request.expandedDataSet.name = defaultValue1; + const expectedHeaderRequestParams = `expanded_data_set.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateExpandedDataSet = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.updateExpandedDataSet(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.updateExpandedDataSet as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateExpandedDataSet as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateExpandedDataSet with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest() + ); + request.expandedDataSet ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest', + ['expandedDataSet', 'name'] + ); + request.expandedDataSet.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.updateExpandedDataSet(request), + expectedError + ); + }); + }); + + describe('deleteExpandedDataSet', () => { + it('invokes deleteExpandedDataSet without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteExpandedDataSet = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteExpandedDataSet(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteExpandedDataSet as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteExpandedDataSet as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteExpandedDataSet without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteExpandedDataSet = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteExpandedDataSet( + 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.deleteExpandedDataSet as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteExpandedDataSet as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteExpandedDataSet with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteExpandedDataSet = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteExpandedDataSet(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.deleteExpandedDataSet as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteExpandedDataSet as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteExpandedDataSet with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.deleteExpandedDataSet(request), + expectedError + ); + }); + }); + + describe('setAutomatedGa4ConfigurationOptOut', () => { + it('invokes setAutomatedGa4ConfigurationOptOut without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse() + ); + client.innerApiCalls.setAutomatedGa4ConfigurationOptOut = + stubSimpleCall(expectedResponse); + const [response] = await client.setAutomatedGa4ConfigurationOptOut( + request + ); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes setAutomatedGa4ConfigurationOptOut without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse() + ); + client.innerApiCalls.setAutomatedGa4ConfigurationOptOut = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setAutomatedGa4ConfigurationOptOut( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes setAutomatedGa4ConfigurationOptOut with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.setAutomatedGa4ConfigurationOptOut = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.setAutomatedGa4ConfigurationOptOut(request), + expectedError + ); + }); + + it('invokes setAutomatedGa4ConfigurationOptOut with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.setAutomatedGa4ConfigurationOptOut(request), + expectedError + ); + }); + }); + + describe('fetchAutomatedGa4ConfigurationOptOut', () => { + it('invokes fetchAutomatedGa4ConfigurationOptOut without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse() + ); + client.innerApiCalls.fetchAutomatedGa4ConfigurationOptOut = + stubSimpleCall(expectedResponse); + const [response] = await client.fetchAutomatedGa4ConfigurationOptOut( + request + ); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes fetchAutomatedGa4ConfigurationOptOut without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse() + ); + client.innerApiCalls.fetchAutomatedGa4ConfigurationOptOut = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchAutomatedGa4ConfigurationOptOut( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes fetchAutomatedGa4ConfigurationOptOut with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.fetchAutomatedGa4ConfigurationOptOut = + stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.fetchAutomatedGa4ConfigurationOptOut(request), + expectedError + ); + }); + + it('invokes fetchAutomatedGa4ConfigurationOptOut with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.fetchAutomatedGa4ConfigurationOptOut(request), + expectedError + ); + }); + }); + + describe('getBigQueryLink', () => { + it('invokes getBigQueryLink without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetBigQueryLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetBigQueryLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BigQueryLink() + ); + client.innerApiCalls.getBigQueryLink = stubSimpleCall(expectedResponse); + const [response] = await client.getBigQueryLink(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBigQueryLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBigQueryLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBigQueryLink without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetBigQueryLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetBigQueryLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BigQueryLink() + ); + client.innerApiCalls.getBigQueryLink = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getBigQueryLink( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IBigQueryLink | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBigQueryLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBigQueryLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBigQueryLink with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetBigQueryLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetBigQueryLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getBigQueryLink = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getBigQueryLink(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getBigQueryLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBigQueryLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBigQueryLink with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetBigQueryLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetBigQueryLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getBigQueryLink(request), expectedError); + }); + }); + + describe('listAccounts', () => { + it('invokes listAccounts without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + ]; + client.innerApiCalls.listAccounts = stubSimpleCall(expectedResponse); + const [response] = await client.listAccounts(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listAccounts without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + ]; + client.innerApiCalls.listAccounts = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAccounts( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IAccount[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listAccounts with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.listAccounts = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listAccounts(request), expectedError); + }); + + it('invokes listAccountsStream without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + ]; + client.descriptors.page.listAccounts.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listAccountsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.Account[] = []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.Account) => { + 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.listAccounts.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAccounts, request) + ); + }); + + it('invokes listAccountsStream with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listAccounts.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listAccountsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.Account[] = []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.Account) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listAccounts.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAccounts, request) + ); + }); + + it('uses async iteration with listAccounts without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + ]; + client.descriptors.page.listAccounts.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1alpha.IAccount[] = []; + const iterable = client.listAccountsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listAccounts.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + + it('uses async iteration with listAccounts with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listAccounts.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAccountsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1alpha.IAccount[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listAccounts.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); + + describe('listAccountSummaries', () => { + it('invokes listAccountSummaries without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + ]; + client.innerApiCalls.listAccountSummaries = + stubSimpleCall(expectedResponse); + const [response] = await client.listAccountSummaries(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listAccountSummaries without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + ]; + client.innerApiCalls.listAccountSummaries = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAccountSummaries( + request, + ( + err?: Error | null, + result?: + | protos.google.analytics.admin.v1alpha.IAccountSummary[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listAccountSummaries with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.listAccountSummaries = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listAccountSummaries(request), expectedError); + }); + + it('invokes listAccountSummariesStream without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + ); + const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Account() + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() ), ]; - client.descriptors.page.listAccounts.createStream = + client.descriptors.page.listAccountSummaries.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listAccountSummariesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.AccountSummary[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.AccountSummary) => { + 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.listAccountSummaries.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAccountSummaries, request) + ); + }); + + it('invokes listAccountSummariesStream with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listAccountSummaries.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listAccountSummariesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.AccountSummary[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.AccountSummary) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listAccountSummaries.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAccountSummaries, request) + ); + }); + + it('uses async iteration with listAccountSummaries without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + ]; + client.descriptors.page.listAccountSummaries.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1alpha.IAccountSummary[] = + []; + const iterable = client.listAccountSummariesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listAccountSummaries.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + + it('uses async iteration with listAccountSummaries with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listAccountSummaries.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAccountSummariesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1alpha.IAccountSummary[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listAccountSummaries.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); + + describe('listProperties', () => { + it('invokes listProperties without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + ]; + client.innerApiCalls.listProperties = stubSimpleCall(expectedResponse); + const [response] = await client.listProperties(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listProperties without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + ]; + client.innerApiCalls.listProperties = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listProperties( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IProperty[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listProperties with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.listProperties = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listProperties(request), expectedError); + }); + + it('invokes listPropertiesStream without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + ]; + client.descriptors.page.listProperties.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listAccountsStream(request); + const stream = client.listPropertiesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.Account[] = []; + const responses: protos.google.analytics.admin.v1alpha.Property[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.Account) => { + (response: protos.google.analytics.admin.v1alpha.Property) => { responses.push(response); } ); @@ -9886,13 +12040,13 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listAccounts.createStream as SinonStub) + (client.descriptors.page.listProperties.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listAccounts, request) + .calledWith(client.innerApiCalls.listProperties, request) ); }); - it('invokes listAccountsStream with error', async () => { + it('invokes listPropertiesStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -9900,19 +12054,17 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() ); const expectedError = new Error('expected'); - client.descriptors.page.listAccounts.createStream = stubPageStreamingCall( - undefined, - expectedError - ); - const stream = client.listAccountsStream(request); + client.descriptors.page.listProperties.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listPropertiesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.Account[] = []; + const responses: protos.google.analytics.admin.v1alpha.Property[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.Account) => { + (response: protos.google.analytics.admin.v1alpha.Property) => { responses.push(response); } ); @@ -9925,13 +12077,13 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listAccounts.createStream as SinonStub) + (client.descriptors.page.listProperties.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listAccounts, request) + .calledWith(client.innerApiCalls.listProperties, request) ); }); - it('uses async iteration with listAccounts without error', async () => { + it('uses async iteration with listProperties without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -9939,36 +12091,36 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() ); const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Account() + new protos.google.analytics.admin.v1alpha.Property() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Account() + new protos.google.analytics.admin.v1alpha.Property() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Account() + new protos.google.analytics.admin.v1alpha.Property() ), ]; - client.descriptors.page.listAccounts.asyncIterate = + client.descriptors.page.listProperties.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IAccount[] = []; - const iterable = client.listAccountsAsync(request); + const responses: protos.google.analytics.admin.v1alpha.IProperty[] = []; + const iterable = client.listPropertiesAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listAccounts.asyncIterate as SinonStub + client.descriptors.page.listProperties.asyncIterate as SinonStub ).getCall(0).args[1], request ); }); - it('uses async iteration with listAccounts with error', async () => { + it('uses async iteration with listProperties with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -9976,29 +12128,29 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() ); const expectedError = new Error('expected'); - client.descriptors.page.listAccounts.asyncIterate = + client.descriptors.page.listProperties.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listAccountsAsync(request); + const iterable = client.listPropertiesAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IAccount[] = []; + const responses: protos.google.analytics.admin.v1alpha.IProperty[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( ( - client.descriptors.page.listAccounts.asyncIterate as SinonStub + client.descriptors.page.listProperties.asyncIterate as SinonStub ).getCall(0).args[1], request ); }); }); - describe('listAccountSummaries', () => { - it('invokes listAccountSummaries without error', async () => { + describe('listUserLinks', () => { + it('invokes listUserLinks without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -10006,26 +12158,39 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListUserLinksRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccountSummary() + new protos.google.analytics.admin.v1alpha.UserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccountSummary() + new protos.google.analytics.admin.v1alpha.UserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccountSummary() + new protos.google.analytics.admin.v1alpha.UserLink() ), ]; - client.innerApiCalls.listAccountSummaries = - stubSimpleCall(expectedResponse); - const [response] = await client.listAccountSummaries(request); + client.innerApiCalls.listUserLinks = stubSimpleCall(expectedResponse); + const [response] = await client.listUserLinks(request); assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listAccountSummaries without error using callback', async () => { + it('invokes listUserLinks without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -10033,29 +12198,33 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccountSummary() + new protos.google.analytics.admin.v1alpha.UserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccountSummary() + new protos.google.analytics.admin.v1alpha.UserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccountSummary() + new protos.google.analytics.admin.v1alpha.UserLink() ), ]; - client.innerApiCalls.listAccountSummaries = + client.innerApiCalls.listUserLinks = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listAccountSummaries( + client.listUserLinks( request, ( err?: Error | null, - result?: - | protos.google.analytics.admin.v1alpha.IAccountSummary[] - | null + result?: protos.google.analytics.admin.v1alpha.IUserLink[] | null ) => { if (err) { reject(err); @@ -10067,9 +12236,17 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listAccountSummaries with error', async () => { + it('invokes listUserLinks with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -10077,17 +12254,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listAccountSummaries = stubSimpleCall( + client.innerApiCalls.listUserLinks = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listAccountSummaries(request), expectedError); + await assert.rejects(client.listUserLinks(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listAccountSummariesStream without error', async () => { + it('invokes listUserLinksStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -10095,28 +12286,33 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListUserLinksRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccountSummary() + new protos.google.analytics.admin.v1alpha.UserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccountSummary() + new protos.google.analytics.admin.v1alpha.UserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccountSummary() + new protos.google.analytics.admin.v1alpha.UserLink() ), ]; - client.descriptors.page.listAccountSummaries.createStream = + client.descriptors.page.listUserLinks.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listAccountSummariesStream(request); + const stream = client.listUserLinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.AccountSummary[] = - []; + const responses: protos.google.analytics.admin.v1alpha.UserLink[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.AccountSummary) => { + (response: protos.google.analytics.admin.v1alpha.UserLink) => { responses.push(response); } ); @@ -10130,13 +12326,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listAccountSummaries.createStream as SinonStub) + (client.descriptors.page.listUserLinks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listAccountSummaries, request) + .calledWith(client.innerApiCalls.listUserLinks, request) + ); + assert( + (client.descriptors.page.listUserLinks.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('invokes listAccountSummariesStream with error', async () => { + it('invokes listUserLinksStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -10144,18 +12347,23 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListUserLinksRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listAccountSummaries.createStream = + client.descriptors.page.listUserLinks.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listAccountSummariesStream(request); + const stream = client.listUserLinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.AccountSummary[] = - []; + const responses: protos.google.analytics.admin.v1alpha.UserLink[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.AccountSummary) => { + (response: protos.google.analytics.admin.v1alpha.UserLink) => { responses.push(response); } ); @@ -10168,13 +12376,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listAccountSummaries.createStream as SinonStub) + (client.descriptors.page.listUserLinks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listAccountSummaries, request) + .calledWith(client.innerApiCalls.listUserLinks, request) + ); + assert( + (client.descriptors.page.listUserLinks.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('uses async iteration with listAccountSummaries without error', async () => { + it('uses async iteration with listUserLinks without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -10182,37 +12397,49 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccountSummary() + new protos.google.analytics.admin.v1alpha.UserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccountSummary() + new protos.google.analytics.admin.v1alpha.UserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccountSummary() + new protos.google.analytics.admin.v1alpha.UserLink() ), ]; - client.descriptors.page.listAccountSummaries.asyncIterate = + client.descriptors.page.listUserLinks.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IAccountSummary[] = - []; - const iterable = client.listAccountSummariesAsync(request); + const responses: protos.google.analytics.admin.v1alpha.IUserLink[] = []; + const iterable = client.listUserLinksAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listAccountSummaries.asyncIterate as SinonStub + client.descriptors.page.listUserLinks.asyncIterate as SinonStub ).getCall(0).args[1], request ); + assert( + (client.descriptors.page.listUserLinks.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); }); - it('uses async iteration with listAccountSummaries with error', async () => { + it('uses async iteration with listUserLinks with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -10220,30 +12447,42 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listAccountSummaries.asyncIterate = + client.descriptors.page.listUserLinks.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listAccountSummariesAsync(request); + const iterable = client.listUserLinksAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IAccountSummary[] = - []; + const responses: protos.google.analytics.admin.v1alpha.IUserLink[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( ( - client.descriptors.page.listAccountSummaries.asyncIterate as SinonStub + client.descriptors.page.listUserLinks.asyncIterate as SinonStub ).getCall(0).args[1], request ); + assert( + (client.descriptors.page.listUserLinks.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); }); }); - describe('listProperties', () => { - it('invokes listProperties without error', async () => { + describe('auditUserLinks', () => { + it('invokes auditUserLinks without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -10251,25 +12490,39 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Property() + new protos.google.analytics.admin.v1alpha.AuditUserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Property() + new protos.google.analytics.admin.v1alpha.AuditUserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Property() + new protos.google.analytics.admin.v1alpha.AuditUserLink() ), ]; - client.innerApiCalls.listProperties = stubSimpleCall(expectedResponse); - const [response] = await client.listProperties(request); + client.innerApiCalls.auditUserLinks = stubSimpleCall(expectedResponse); + const [response] = await client.auditUserLinks(request); assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.auditUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.auditUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listProperties without error using callback', async () => { + it('invokes auditUserLinks without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -10277,27 +12530,35 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Property() + new protos.google.analytics.admin.v1alpha.AuditUserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Property() + new protos.google.analytics.admin.v1alpha.AuditUserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Property() + new protos.google.analytics.admin.v1alpha.AuditUserLink() ), ]; - client.innerApiCalls.listProperties = + client.innerApiCalls.auditUserLinks = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listProperties( + client.auditUserLinks( request, ( err?: Error | null, - result?: protos.google.analytics.admin.v1alpha.IProperty[] | null + result?: + | protos.google.analytics.admin.v1alpha.IAuditUserLink[] + | null ) => { if (err) { reject(err); @@ -10309,9 +12570,17 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.auditUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.auditUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listProperties with error', async () => { + it('invokes auditUserLinks with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -10319,17 +12588,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listProperties = stubSimpleCall( + client.innerApiCalls.auditUserLinks = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listProperties(request), expectedError); + await assert.rejects(client.auditUserLinks(request), expectedError); + const actualRequest = ( + client.innerApiCalls.auditUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.auditUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listPropertiesStream without error', async () => { + it('invokes auditUserLinksStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -10337,27 +12620,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Property() + new protos.google.analytics.admin.v1alpha.AuditUserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Property() + new protos.google.analytics.admin.v1alpha.AuditUserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Property() + new protos.google.analytics.admin.v1alpha.AuditUserLink() ), ]; - client.descriptors.page.listProperties.createStream = + client.descriptors.page.auditUserLinks.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listPropertiesStream(request); + const stream = client.auditUserLinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.Property[] = []; + const responses: protos.google.analytics.admin.v1alpha.AuditUserLink[] = + []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.Property) => { + (response: protos.google.analytics.admin.v1alpha.AuditUserLink) => { responses.push(response); } ); @@ -10371,13 +12661,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listProperties.createStream as SinonStub) + (client.descriptors.page.auditUserLinks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listProperties, request) + .calledWith(client.innerApiCalls.auditUserLinks, request) + ); + assert( + (client.descriptors.page.auditUserLinks.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('invokes listPropertiesStream with error', async () => { + it('invokes auditUserLinksStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -10385,17 +12682,24 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listProperties.createStream = + client.descriptors.page.auditUserLinks.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listPropertiesStream(request); + const stream = client.auditUserLinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.Property[] = []; + const responses: protos.google.analytics.admin.v1alpha.AuditUserLink[] = + []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.Property) => { + (response: protos.google.analytics.admin.v1alpha.AuditUserLink) => { responses.push(response); } ); @@ -10408,13 +12712,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listProperties.createStream as SinonStub) + (client.descriptors.page.auditUserLinks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listProperties, request) + .calledWith(client.innerApiCalls.auditUserLinks, request) + ); + assert( + (client.descriptors.page.auditUserLinks.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('uses async iteration with listProperties without error', async () => { + it('uses async iteration with auditUserLinks without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -10422,36 +12733,50 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Property() + new protos.google.analytics.admin.v1alpha.AuditUserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Property() + new protos.google.analytics.admin.v1alpha.AuditUserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Property() + new protos.google.analytics.admin.v1alpha.AuditUserLink() ), ]; - client.descriptors.page.listProperties.asyncIterate = + client.descriptors.page.auditUserLinks.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IProperty[] = []; - const iterable = client.listPropertiesAsync(request); + const responses: protos.google.analytics.admin.v1alpha.IAuditUserLink[] = + []; + const iterable = client.auditUserLinksAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listProperties.asyncIterate as SinonStub + client.descriptors.page.auditUserLinks.asyncIterate as SinonStub ).getCall(0).args[1], request ); + assert( + (client.descriptors.page.auditUserLinks.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); }); - it('uses async iteration with listProperties with error', async () => { + it('uses async iteration with auditUserLinks with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -10459,29 +12784,43 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listProperties.asyncIterate = + client.descriptors.page.auditUserLinks.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listPropertiesAsync(request); + const iterable = client.auditUserLinksAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IProperty[] = []; + const responses: protos.google.analytics.admin.v1alpha.IAuditUserLink[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( ( - client.descriptors.page.listProperties.asyncIterate as SinonStub + client.descriptors.page.auditUserLinks.asyncIterate as SinonStub ).getCall(0).args[1], request ); + assert( + (client.descriptors.page.auditUserLinks.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); }); }); - describe('listUserLinks', () => { - it('invokes listUserLinks without error', async () => { + describe('listFirebaseLinks', () => { + it('invokes listFirebaseLinks without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -10489,39 +12828,39 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListUserLinksRequest', + '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.UserLink() + new protos.google.analytics.admin.v1alpha.FirebaseLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.UserLink() + new protos.google.analytics.admin.v1alpha.FirebaseLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.UserLink() + new protos.google.analytics.admin.v1alpha.FirebaseLink() ), ]; - client.innerApiCalls.listUserLinks = stubSimpleCall(expectedResponse); - const [response] = await client.listUserLinks(request); + client.innerApiCalls.listFirebaseLinks = stubSimpleCall(expectedResponse); + const [response] = await client.listFirebaseLinks(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listUserLinks as SinonStub + client.innerApiCalls.listFirebaseLinks as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listUserLinks as SinonStub + client.innerApiCalls.listFirebaseLinks as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listUserLinks without error using callback', async () => { + it('invokes listFirebaseLinks without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -10529,33 +12868,35 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListUserLinksRequest', + '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.UserLink() + new protos.google.analytics.admin.v1alpha.FirebaseLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.UserLink() + new protos.google.analytics.admin.v1alpha.FirebaseLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.UserLink() + new protos.google.analytics.admin.v1alpha.FirebaseLink() ), ]; - client.innerApiCalls.listUserLinks = + client.innerApiCalls.listFirebaseLinks = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listUserLinks( + client.listFirebaseLinks( request, ( err?: Error | null, - result?: protos.google.analytics.admin.v1alpha.IUserLink[] | null + result?: + | protos.google.analytics.admin.v1alpha.IFirebaseLink[] + | null ) => { if (err) { reject(err); @@ -10568,16 +12909,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listUserLinks as SinonStub + client.innerApiCalls.listFirebaseLinks as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listUserLinks as SinonStub + client.innerApiCalls.listFirebaseLinks as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listUserLinks with error', async () => { + it('invokes listFirebaseLinks with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -10585,31 +12926,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListUserLinksRequest', + '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listUserLinks = stubSimpleCall( + client.innerApiCalls.listFirebaseLinks = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listUserLinks(request), expectedError); + await assert.rejects(client.listFirebaseLinks(request), expectedError); const actualRequest = ( - client.innerApiCalls.listUserLinks as SinonStub + client.innerApiCalls.listFirebaseLinks as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listUserLinks as SinonStub + client.innerApiCalls.listFirebaseLinks as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listUserLinksStream without error', async () => { + it('invokes listFirebaseLinksStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -10617,33 +12958,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListUserLinksRequest', + '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.UserLink() + new protos.google.analytics.admin.v1alpha.FirebaseLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.UserLink() + new protos.google.analytics.admin.v1alpha.FirebaseLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.UserLink() + new protos.google.analytics.admin.v1alpha.FirebaseLink() ), ]; - client.descriptors.page.listUserLinks.createStream = + client.descriptors.page.listFirebaseLinks.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listUserLinksStream(request); + const stream = client.listFirebaseLinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.UserLink[] = []; + const responses: protos.google.analytics.admin.v1alpha.FirebaseLink[] = + []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.UserLink) => { + (response: protos.google.analytics.admin.v1alpha.FirebaseLink) => { responses.push(response); } ); @@ -10657,12 +12999,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listUserLinks.createStream as SinonStub) + (client.descriptors.page.listFirebaseLinks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listUserLinks, request) + .calledWith(client.innerApiCalls.listFirebaseLinks, request) ); assert( - (client.descriptors.page.listUserLinks.createStream as SinonStub) + (client.descriptors.page.listFirebaseLinks.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -10670,7 +13012,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes listUserLinksStream with error', async () => { + it('invokes listFirebaseLinksStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -10678,23 +13020,24 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListUserLinksRequest', + '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listUserLinks.createStream = + client.descriptors.page.listFirebaseLinks.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listUserLinksStream(request); + const stream = client.listFirebaseLinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.UserLink[] = []; + const responses: protos.google.analytics.admin.v1alpha.FirebaseLink[] = + []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.UserLink) => { + (response: protos.google.analytics.admin.v1alpha.FirebaseLink) => { responses.push(response); } ); @@ -10707,12 +13050,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listUserLinks.createStream as SinonStub) + (client.descriptors.page.listFirebaseLinks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listUserLinks, request) + .calledWith(client.innerApiCalls.listFirebaseLinks, request) ); assert( - (client.descriptors.page.listUserLinks.createStream as SinonStub) + (client.descriptors.page.listFirebaseLinks.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -10720,7 +13063,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listUserLinks without error', async () => { + it('uses async iteration with listFirebaseLinks without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -10728,41 +13071,42 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListUserLinksRequest', + '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.UserLink() + new protos.google.analytics.admin.v1alpha.FirebaseLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.UserLink() + new protos.google.analytics.admin.v1alpha.FirebaseLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.UserLink() + new protos.google.analytics.admin.v1alpha.FirebaseLink() ), ]; - client.descriptors.page.listUserLinks.asyncIterate = + client.descriptors.page.listFirebaseLinks.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IUserLink[] = []; - const iterable = client.listUserLinksAsync(request); + const responses: protos.google.analytics.admin.v1alpha.IFirebaseLink[] = + []; + const iterable = client.listFirebaseLinksAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listUserLinks.asyncIterate as SinonStub + client.descriptors.page.listFirebaseLinks.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listUserLinks.asyncIterate as SinonStub) + (client.descriptors.page.listFirebaseLinks.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -10770,7 +13114,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listUserLinks with error', async () => { + it('uses async iteration with listFirebaseLinks with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -10778,32 +13122,33 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListUserLinksRequest', + '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listUserLinks.asyncIterate = + client.descriptors.page.listFirebaseLinks.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listUserLinksAsync(request); + const iterable = client.listFirebaseLinksAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IUserLink[] = []; + const responses: protos.google.analytics.admin.v1alpha.IFirebaseLink[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( ( - client.descriptors.page.listUserLinks.asyncIterate as SinonStub + client.descriptors.page.listFirebaseLinks.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listUserLinks.asyncIterate as SinonStub) + (client.descriptors.page.listFirebaseLinks.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -10812,8 +13157,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('auditUserLinks', () => { - it('invokes auditUserLinks without error', async () => { + describe('listGoogleAdsLinks', () => { + it('invokes listGoogleAdsLinks without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -10821,39 +13166,40 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLink() + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLink() + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLink() + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() ), ]; - client.innerApiCalls.auditUserLinks = stubSimpleCall(expectedResponse); - const [response] = await client.auditUserLinks(request); + client.innerApiCalls.listGoogleAdsLinks = + stubSimpleCall(expectedResponse); + const [response] = await client.listGoogleAdsLinks(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.auditUserLinks as SinonStub + client.innerApiCalls.listGoogleAdsLinks as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.auditUserLinks as SinonStub + client.innerApiCalls.listGoogleAdsLinks as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes auditUserLinks without error using callback', async () => { + it('invokes listGoogleAdsLinks without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -10861,34 +13207,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLink() + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLink() + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLink() + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() ), ]; - client.innerApiCalls.auditUserLinks = + client.innerApiCalls.listGoogleAdsLinks = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.auditUserLinks( + client.listGoogleAdsLinks( request, ( err?: Error | null, result?: - | protos.google.analytics.admin.v1alpha.IAuditUserLink[] + | protos.google.analytics.admin.v1alpha.IGoogleAdsLink[] | null ) => { if (err) { @@ -10902,16 +13248,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.auditUserLinks as SinonStub + client.innerApiCalls.listGoogleAdsLinks as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.auditUserLinks as SinonStub + client.innerApiCalls.listGoogleAdsLinks as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes auditUserLinks with error', async () => { + it('invokes listGoogleAdsLinks with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -10919,31 +13265,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.auditUserLinks = stubSimpleCall( + client.innerApiCalls.listGoogleAdsLinks = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.auditUserLinks(request), expectedError); + await assert.rejects(client.listGoogleAdsLinks(request), expectedError); const actualRequest = ( - client.innerApiCalls.auditUserLinks as SinonStub + client.innerApiCalls.listGoogleAdsLinks as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.auditUserLinks as SinonStub + client.innerApiCalls.listGoogleAdsLinks as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes auditUserLinksStream without error', async () => { + it('invokes listGoogleAdsLinksStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -10951,34 +13297,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLink() + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLink() + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLink() + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() ), ]; - client.descriptors.page.auditUserLinks.createStream = + client.descriptors.page.listGoogleAdsLinks.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.auditUserLinksStream(request); + const stream = client.listGoogleAdsLinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.AuditUserLink[] = + const responses: protos.google.analytics.admin.v1alpha.GoogleAdsLink[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.AuditUserLink) => { + (response: protos.google.analytics.admin.v1alpha.GoogleAdsLink) => { responses.push(response); } ); @@ -10992,12 +13338,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.auditUserLinks.createStream as SinonStub) + (client.descriptors.page.listGoogleAdsLinks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.auditUserLinks, request) + .calledWith(client.innerApiCalls.listGoogleAdsLinks, request) ); assert( - (client.descriptors.page.auditUserLinks.createStream as SinonStub) + (client.descriptors.page.listGoogleAdsLinks.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -11005,7 +13351,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes auditUserLinksStream with error', async () => { + it('invokes listGoogleAdsLinksStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11013,24 +13359,24 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.auditUserLinks.createStream = + client.descriptors.page.listGoogleAdsLinks.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.auditUserLinksStream(request); + const stream = client.listGoogleAdsLinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.AuditUserLink[] = + const responses: protos.google.analytics.admin.v1alpha.GoogleAdsLink[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.AuditUserLink) => { + (response: protos.google.analytics.admin.v1alpha.GoogleAdsLink) => { responses.push(response); } ); @@ -11043,12 +13389,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.auditUserLinks.createStream as SinonStub) + (client.descriptors.page.listGoogleAdsLinks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.auditUserLinks, request) + .calledWith(client.innerApiCalls.listGoogleAdsLinks, request) ); assert( - (client.descriptors.page.auditUserLinks.createStream as SinonStub) + (client.descriptors.page.listGoogleAdsLinks.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -11056,7 +13402,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with auditUserLinks without error', async () => { + it('uses async iteration with listGoogleAdsLinks without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11064,42 +13410,42 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLink() + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLink() + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLink() + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() ), ]; - client.descriptors.page.auditUserLinks.asyncIterate = + client.descriptors.page.listGoogleAdsLinks.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IAuditUserLink[] = + const responses: protos.google.analytics.admin.v1alpha.IGoogleAdsLink[] = []; - const iterable = client.auditUserLinksAsync(request); + const iterable = client.listGoogleAdsLinksAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.auditUserLinks.asyncIterate as SinonStub + client.descriptors.page.listGoogleAdsLinks.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.auditUserLinks.asyncIterate as SinonStub) + (client.descriptors.page.listGoogleAdsLinks.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -11107,7 +13453,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with auditUserLinks with error', async () => { + it('uses async iteration with listGoogleAdsLinks with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11115,20 +13461,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.auditUserLinks.asyncIterate = + client.descriptors.page.listGoogleAdsLinks.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.auditUserLinksAsync(request); + const iterable = client.listGoogleAdsLinksAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IAuditUserLink[] = + const responses: protos.google.analytics.admin.v1alpha.IGoogleAdsLink[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -11136,12 +13482,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.auditUserLinks.asyncIterate as SinonStub + client.descriptors.page.listGoogleAdsLinks.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.auditUserLinks.asyncIterate as SinonStub) + (client.descriptors.page.listGoogleAdsLinks.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -11150,8 +13496,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('listFirebaseLinks', () => { - it('invokes listFirebaseLinks without error', async () => { + describe('listMeasurementProtocolSecrets', () => { + it('invokes listMeasurementProtocolSecrets without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11159,39 +13505,40 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() + new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', + '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FirebaseLink() + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FirebaseLink() + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FirebaseLink() + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() ), ]; - client.innerApiCalls.listFirebaseLinks = stubSimpleCall(expectedResponse); - const [response] = await client.listFirebaseLinks(request); + client.innerApiCalls.listMeasurementProtocolSecrets = + stubSimpleCall(expectedResponse); + const [response] = await client.listMeasurementProtocolSecrets(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listFirebaseLinks as SinonStub + client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listFirebaseLinks as SinonStub + client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listFirebaseLinks without error using callback', async () => { + it('invokes listMeasurementProtocolSecrets without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11199,34 +13546,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() + new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', + '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FirebaseLink() + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FirebaseLink() + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FirebaseLink() + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() ), ]; - client.innerApiCalls.listFirebaseLinks = + client.innerApiCalls.listMeasurementProtocolSecrets = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listFirebaseLinks( + client.listMeasurementProtocolSecrets( request, ( err?: Error | null, result?: - | protos.google.analytics.admin.v1alpha.IFirebaseLink[] + | protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret[] | null ) => { if (err) { @@ -11240,16 +13587,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listFirebaseLinks as SinonStub + client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listFirebaseLinks as SinonStub + client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listFirebaseLinks with error', async () => { + it('invokes listMeasurementProtocolSecrets with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11257,31 +13604,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() + new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', + '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listFirebaseLinks = stubSimpleCall( + client.innerApiCalls.listMeasurementProtocolSecrets = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listFirebaseLinks(request), expectedError); + await assert.rejects( + client.listMeasurementProtocolSecrets(request), + expectedError + ); const actualRequest = ( - client.innerApiCalls.listFirebaseLinks as SinonStub + client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listFirebaseLinks as SinonStub + client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listFirebaseLinksStream without error', async () => { + it('invokes listMeasurementProtocolSecretsStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11289,34 +13639,36 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() + new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', + '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FirebaseLink() + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FirebaseLink() + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FirebaseLink() + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() ), ]; - client.descriptors.page.listFirebaseLinks.createStream = + client.descriptors.page.listMeasurementProtocolSecrets.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listFirebaseLinksStream(request); + const stream = client.listMeasurementProtocolSecretsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.FirebaseLink[] = + const responses: protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.FirebaseLink) => { + ( + response: protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret + ) => { responses.push(response); } ); @@ -11330,12 +13682,21 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listFirebaseLinks.createStream as SinonStub) + ( + client.descriptors.page.listMeasurementProtocolSecrets + .createStream as SinonStub + ) .getCall(0) - .calledWith(client.innerApiCalls.listFirebaseLinks, request) + .calledWith( + client.innerApiCalls.listMeasurementProtocolSecrets, + request + ) ); assert( - (client.descriptors.page.listFirebaseLinks.createStream as SinonStub) + ( + client.descriptors.page.listMeasurementProtocolSecrets + .createStream as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -11343,7 +13704,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes listFirebaseLinksStream with error', async () => { + it('invokes listMeasurementProtocolSecretsStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11351,24 +13712,26 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() + new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', + '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listFirebaseLinks.createStream = + client.descriptors.page.listMeasurementProtocolSecrets.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listFirebaseLinksStream(request); + const stream = client.listMeasurementProtocolSecretsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.FirebaseLink[] = + const responses: protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.FirebaseLink) => { + ( + response: protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret + ) => { responses.push(response); } ); @@ -11381,12 +13744,21 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listFirebaseLinks.createStream as SinonStub) + ( + client.descriptors.page.listMeasurementProtocolSecrets + .createStream as SinonStub + ) .getCall(0) - .calledWith(client.innerApiCalls.listFirebaseLinks, request) + .calledWith( + client.innerApiCalls.listMeasurementProtocolSecrets, + request + ) ); assert( - (client.descriptors.page.listFirebaseLinks.createStream as SinonStub) + ( + client.descriptors.page.listMeasurementProtocolSecrets + .createStream as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -11394,7 +13766,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listFirebaseLinks without error', async () => { + it('uses async iteration with listMeasurementProtocolSecrets without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11402,42 +13774,46 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() + new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', + '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FirebaseLink() + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FirebaseLink() + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FirebaseLink() + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() ), ]; - client.descriptors.page.listFirebaseLinks.asyncIterate = + client.descriptors.page.listMeasurementProtocolSecrets.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IFirebaseLink[] = + const responses: protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret[] = []; - const iterable = client.listFirebaseLinksAsync(request); + const iterable = client.listMeasurementProtocolSecretsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listFirebaseLinks.asyncIterate as SinonStub + client.descriptors.page.listMeasurementProtocolSecrets + .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listFirebaseLinks.asyncIterate as SinonStub) + ( + client.descriptors.page.listMeasurementProtocolSecrets + .asyncIterate as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -11445,7 +13821,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listFirebaseLinks with error', async () => { + it('uses async iteration with listMeasurementProtocolSecrets with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11453,20 +13829,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() + new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', + '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listFirebaseLinks.asyncIterate = + client.descriptors.page.listMeasurementProtocolSecrets.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listFirebaseLinksAsync(request); + const iterable = client.listMeasurementProtocolSecretsAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IFirebaseLink[] = + const responses: protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -11474,12 +13850,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listFirebaseLinks.asyncIterate as SinonStub + client.descriptors.page.listMeasurementProtocolSecrets + .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listFirebaseLinks.asyncIterate as SinonStub) + ( + client.descriptors.page.listMeasurementProtocolSecrets + .asyncIterate as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -11488,8 +13868,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('listGoogleAdsLinks', () => { - it('invokes listGoogleAdsLinks without error', async () => { + describe('searchChangeHistoryEvents', () => { + it('invokes searchChangeHistoryEvents without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11497,40 +13877,40 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() + new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', - ['parent'] + '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', + ['account'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.account = defaultValue1; + const expectedHeaderRequestParams = `account=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() ), ]; - client.innerApiCalls.listGoogleAdsLinks = + client.innerApiCalls.searchChangeHistoryEvents = stubSimpleCall(expectedResponse); - const [response] = await client.listGoogleAdsLinks(request); + const [response] = await client.searchChangeHistoryEvents(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listGoogleAdsLinks as SinonStub + client.innerApiCalls.searchChangeHistoryEvents as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listGoogleAdsLinks as SinonStub + client.innerApiCalls.searchChangeHistoryEvents as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listGoogleAdsLinks without error using callback', async () => { + it('invokes searchChangeHistoryEvents without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11538,34 +13918,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() + new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', - ['parent'] + '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', + ['account'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.account = defaultValue1; + const expectedHeaderRequestParams = `account=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() ), ]; - client.innerApiCalls.listGoogleAdsLinks = + client.innerApiCalls.searchChangeHistoryEvents = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listGoogleAdsLinks( + client.searchChangeHistoryEvents( request, ( err?: Error | null, result?: - | protos.google.analytics.admin.v1alpha.IGoogleAdsLink[] + | protos.google.analytics.admin.v1alpha.IChangeHistoryEvent[] | null ) => { if (err) { @@ -11579,16 +13959,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listGoogleAdsLinks as SinonStub + client.innerApiCalls.searchChangeHistoryEvents as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listGoogleAdsLinks as SinonStub + client.innerApiCalls.searchChangeHistoryEvents as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listGoogleAdsLinks with error', async () => { + it('invokes searchChangeHistoryEvents with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11596,31 +13976,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() + new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', - ['parent'] + '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', + ['account'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.account = defaultValue1; + const expectedHeaderRequestParams = `account=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listGoogleAdsLinks = stubSimpleCall( + client.innerApiCalls.searchChangeHistoryEvents = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listGoogleAdsLinks(request), expectedError); + await assert.rejects( + client.searchChangeHistoryEvents(request), + expectedError + ); const actualRequest = ( - client.innerApiCalls.listGoogleAdsLinks as SinonStub + client.innerApiCalls.searchChangeHistoryEvents as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listGoogleAdsLinks as SinonStub + client.innerApiCalls.searchChangeHistoryEvents as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listGoogleAdsLinksStream without error', async () => { + it('invokes searchChangeHistoryEventsStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11628,34 +14011,36 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() + new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', - ['parent'] + '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', + ['account'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.account = defaultValue1; + const expectedHeaderRequestParams = `account=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() ), ]; - client.descriptors.page.listGoogleAdsLinks.createStream = + client.descriptors.page.searchChangeHistoryEvents.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listGoogleAdsLinksStream(request); + const stream = client.searchChangeHistoryEventsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.GoogleAdsLink[] = + const responses: protos.google.analytics.admin.v1alpha.ChangeHistoryEvent[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.GoogleAdsLink) => { + ( + response: protos.google.analytics.admin.v1alpha.ChangeHistoryEvent + ) => { responses.push(response); } ); @@ -11669,12 +14054,18 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listGoogleAdsLinks.createStream as SinonStub) + ( + client.descriptors.page.searchChangeHistoryEvents + .createStream as SinonStub + ) .getCall(0) - .calledWith(client.innerApiCalls.listGoogleAdsLinks, request) + .calledWith(client.innerApiCalls.searchChangeHistoryEvents, request) ); assert( - (client.descriptors.page.listGoogleAdsLinks.createStream as SinonStub) + ( + client.descriptors.page.searchChangeHistoryEvents + .createStream as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -11682,7 +14073,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes listGoogleAdsLinksStream with error', async () => { + it('invokes searchChangeHistoryEventsStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11690,24 +14081,26 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() + new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', - ['parent'] + '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', + ['account'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.account = defaultValue1; + const expectedHeaderRequestParams = `account=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listGoogleAdsLinks.createStream = + client.descriptors.page.searchChangeHistoryEvents.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listGoogleAdsLinksStream(request); + const stream = client.searchChangeHistoryEventsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.GoogleAdsLink[] = + const responses: protos.google.analytics.admin.v1alpha.ChangeHistoryEvent[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.GoogleAdsLink) => { + ( + response: protos.google.analytics.admin.v1alpha.ChangeHistoryEvent + ) => { responses.push(response); } ); @@ -11720,12 +14113,18 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listGoogleAdsLinks.createStream as SinonStub) + ( + client.descriptors.page.searchChangeHistoryEvents + .createStream as SinonStub + ) .getCall(0) - .calledWith(client.innerApiCalls.listGoogleAdsLinks, request) + .calledWith(client.innerApiCalls.searchChangeHistoryEvents, request) ); assert( - (client.descriptors.page.listGoogleAdsLinks.createStream as SinonStub) + ( + client.descriptors.page.searchChangeHistoryEvents + .createStream as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -11733,7 +14132,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listGoogleAdsLinks without error', async () => { + it('uses async iteration with searchChangeHistoryEvents without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11741,42 +14140,46 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() + new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', - ['parent'] + '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', + ['account'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.account = defaultValue1; + const expectedHeaderRequestParams = `account=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() ), ]; - client.descriptors.page.listGoogleAdsLinks.asyncIterate = + client.descriptors.page.searchChangeHistoryEvents.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IGoogleAdsLink[] = + const responses: protos.google.analytics.admin.v1alpha.IChangeHistoryEvent[] = []; - const iterable = client.listGoogleAdsLinksAsync(request); + const iterable = client.searchChangeHistoryEventsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listGoogleAdsLinks.asyncIterate as SinonStub + client.descriptors.page.searchChangeHistoryEvents + .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listGoogleAdsLinks.asyncIterate as SinonStub) + ( + client.descriptors.page.searchChangeHistoryEvents + .asyncIterate as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -11784,7 +14187,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listGoogleAdsLinks with error', async () => { + it('uses async iteration with searchChangeHistoryEvents with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11792,20 +14195,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() + new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', - ['parent'] + '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', + ['account'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.account = defaultValue1; + const expectedHeaderRequestParams = `account=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listGoogleAdsLinks.asyncIterate = + client.descriptors.page.searchChangeHistoryEvents.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listGoogleAdsLinksAsync(request); + const iterable = client.searchChangeHistoryEventsAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IGoogleAdsLink[] = + const responses: protos.google.analytics.admin.v1alpha.IChangeHistoryEvent[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -11813,12 +14216,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listGoogleAdsLinks.asyncIterate as SinonStub + client.descriptors.page.searchChangeHistoryEvents + .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listGoogleAdsLinks.asyncIterate as SinonStub) + ( + client.descriptors.page.searchChangeHistoryEvents + .asyncIterate as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -11827,8 +14234,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('listMeasurementProtocolSecrets', () => { - it('invokes listMeasurementProtocolSecrets without error', async () => { + describe('listConversionEvents', () => { + it('invokes listConversionEvents without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11836,40 +14243,40 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() + new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', + '.google.analytics.admin.v1alpha.ListConversionEventsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + new protos.google.analytics.admin.v1alpha.ConversionEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + new protos.google.analytics.admin.v1alpha.ConversionEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + new protos.google.analytics.admin.v1alpha.ConversionEvent() ), ]; - client.innerApiCalls.listMeasurementProtocolSecrets = + client.innerApiCalls.listConversionEvents = stubSimpleCall(expectedResponse); - const [response] = await client.listMeasurementProtocolSecrets(request); + const [response] = await client.listConversionEvents(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub + client.innerApiCalls.listConversionEvents as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub + client.innerApiCalls.listConversionEvents as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listMeasurementProtocolSecrets without error using callback', async () => { + it('invokes listConversionEvents without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11877,34 +14284,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() + new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', + '.google.analytics.admin.v1alpha.ListConversionEventsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + new protos.google.analytics.admin.v1alpha.ConversionEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + new protos.google.analytics.admin.v1alpha.ConversionEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + new protos.google.analytics.admin.v1alpha.ConversionEvent() ), ]; - client.innerApiCalls.listMeasurementProtocolSecrets = + client.innerApiCalls.listConversionEvents = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listMeasurementProtocolSecrets( + client.listConversionEvents( request, ( err?: Error | null, result?: - | protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret[] + | protos.google.analytics.admin.v1alpha.IConversionEvent[] | null ) => { if (err) { @@ -11918,16 +14325,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub + client.innerApiCalls.listConversionEvents as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub + client.innerApiCalls.listConversionEvents as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listMeasurementProtocolSecrets with error', async () => { + it('invokes listConversionEvents with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11935,34 +14342,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() + new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', + '.google.analytics.admin.v1alpha.ListConversionEventsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listMeasurementProtocolSecrets = stubSimpleCall( + client.innerApiCalls.listConversionEvents = stubSimpleCall( undefined, expectedError ); - await assert.rejects( - client.listMeasurementProtocolSecrets(request), - expectedError - ); + await assert.rejects(client.listConversionEvents(request), expectedError); const actualRequest = ( - client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub + client.innerApiCalls.listConversionEvents as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub + client.innerApiCalls.listConversionEvents as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listMeasurementProtocolSecretsStream without error', async () => { + it('invokes listConversionEventsStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11970,36 +14374,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() + new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', + '.google.analytics.admin.v1alpha.ListConversionEventsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + new protos.google.analytics.admin.v1alpha.ConversionEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + new protos.google.analytics.admin.v1alpha.ConversionEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + new protos.google.analytics.admin.v1alpha.ConversionEvent() ), ]; - client.descriptors.page.listMeasurementProtocolSecrets.createStream = + client.descriptors.page.listConversionEvents.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listMeasurementProtocolSecretsStream(request); + const stream = client.listConversionEventsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret[] = + const responses: protos.google.analytics.admin.v1alpha.ConversionEvent[] = []; stream.on( 'data', - ( - response: protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret - ) => { + (response: protos.google.analytics.admin.v1alpha.ConversionEvent) => { responses.push(response); } ); @@ -12013,21 +14415,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - ( - client.descriptors.page.listMeasurementProtocolSecrets - .createStream as SinonStub - ) + (client.descriptors.page.listConversionEvents.createStream as SinonStub) .getCall(0) - .calledWith( - client.innerApiCalls.listMeasurementProtocolSecrets, - request - ) + .calledWith(client.innerApiCalls.listConversionEvents, request) ); assert( - ( - client.descriptors.page.listMeasurementProtocolSecrets - .createStream as SinonStub - ) + (client.descriptors.page.listConversionEvents.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -12035,7 +14428,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes listMeasurementProtocolSecretsStream with error', async () => { + it('invokes listConversionEventsStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12043,26 +14436,24 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() + new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', + '.google.analytics.admin.v1alpha.ListConversionEventsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listMeasurementProtocolSecrets.createStream = + client.descriptors.page.listConversionEvents.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listMeasurementProtocolSecretsStream(request); + const stream = client.listConversionEventsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret[] = + const responses: protos.google.analytics.admin.v1alpha.ConversionEvent[] = []; stream.on( 'data', - ( - response: protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret - ) => { + (response: protos.google.analytics.admin.v1alpha.ConversionEvent) => { responses.push(response); } ); @@ -12074,22 +14465,13 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); await assert.rejects(promise, expectedError); - assert( - ( - client.descriptors.page.listMeasurementProtocolSecrets - .createStream as SinonStub - ) - .getCall(0) - .calledWith( - client.innerApiCalls.listMeasurementProtocolSecrets, - request - ) + assert( + (client.descriptors.page.listConversionEvents.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listConversionEvents, request) ); assert( - ( - client.descriptors.page.listMeasurementProtocolSecrets - .createStream as SinonStub - ) + (client.descriptors.page.listConversionEvents.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -12097,7 +14479,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listMeasurementProtocolSecrets without error', async () => { + it('uses async iteration with listConversionEvents without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12105,46 +14487,42 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() + new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', + '.google.analytics.admin.v1alpha.ListConversionEventsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + new protos.google.analytics.admin.v1alpha.ConversionEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + new protos.google.analytics.admin.v1alpha.ConversionEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + new protos.google.analytics.admin.v1alpha.ConversionEvent() ), ]; - client.descriptors.page.listMeasurementProtocolSecrets.asyncIterate = + client.descriptors.page.listConversionEvents.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret[] = + const responses: protos.google.analytics.admin.v1alpha.IConversionEvent[] = []; - const iterable = client.listMeasurementProtocolSecretsAsync(request); + const iterable = client.listConversionEventsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listMeasurementProtocolSecrets - .asyncIterate as SinonStub + client.descriptors.page.listConversionEvents.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - ( - client.descriptors.page.listMeasurementProtocolSecrets - .asyncIterate as SinonStub - ) + (client.descriptors.page.listConversionEvents.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -12152,7 +14530,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listMeasurementProtocolSecrets with error', async () => { + it('uses async iteration with listConversionEvents with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12160,20 +14538,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() + new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', + '.google.analytics.admin.v1alpha.ListConversionEventsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listMeasurementProtocolSecrets.asyncIterate = + client.descriptors.page.listConversionEvents.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listMeasurementProtocolSecretsAsync(request); + const iterable = client.listConversionEventsAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret[] = + const responses: protos.google.analytics.admin.v1alpha.IConversionEvent[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -12181,16 +14559,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listMeasurementProtocolSecrets - .asyncIterate as SinonStub + client.descriptors.page.listConversionEvents.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - ( - client.descriptors.page.listMeasurementProtocolSecrets - .asyncIterate as SinonStub - ) + (client.descriptors.page.listConversionEvents.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -12199,8 +14573,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('searchChangeHistoryEvents', () => { - it('invokes searchChangeHistoryEvents without error', async () => { + describe('listDisplayVideo360AdvertiserLinks', () => { + it('invokes listDisplayVideo360AdvertiserLinks without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12208,40 +14582,42 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', - ['account'] + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', + ['parent'] ); - request.account = defaultValue1; - const expectedHeaderRequestParams = `account=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() ), ]; - client.innerApiCalls.searchChangeHistoryEvents = + client.innerApiCalls.listDisplayVideo360AdvertiserLinks = stubSimpleCall(expectedResponse); - const [response] = await client.searchChangeHistoryEvents(request); + const [response] = await client.listDisplayVideo360AdvertiserLinks( + request + ); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.searchChangeHistoryEvents as SinonStub + client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.searchChangeHistoryEvents as SinonStub + client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes searchChangeHistoryEvents without error using callback', async () => { + it('invokes listDisplayVideo360AdvertiserLinks without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12249,34 +14625,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', - ['account'] + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', + ['parent'] ); - request.account = defaultValue1; - const expectedHeaderRequestParams = `account=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() ), ]; - client.innerApiCalls.searchChangeHistoryEvents = + client.innerApiCalls.listDisplayVideo360AdvertiserLinks = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.searchChangeHistoryEvents( + client.listDisplayVideo360AdvertiserLinks( request, ( err?: Error | null, result?: - | protos.google.analytics.admin.v1alpha.IChangeHistoryEvent[] + | protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink[] | null ) => { if (err) { @@ -12290,16 +14666,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.searchChangeHistoryEvents as SinonStub + client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.searchChangeHistoryEvents as SinonStub + client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes searchChangeHistoryEvents with error', async () => { + it('invokes listDisplayVideo360AdvertiserLinks with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12307,34 +14683,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', - ['account'] + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', + ['parent'] ); - request.account = defaultValue1; - const expectedHeaderRequestParams = `account=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.searchChangeHistoryEvents = stubSimpleCall( + client.innerApiCalls.listDisplayVideo360AdvertiserLinks = stubSimpleCall( undefined, expectedError ); await assert.rejects( - client.searchChangeHistoryEvents(request), + client.listDisplayVideo360AdvertiserLinks(request), expectedError ); const actualRequest = ( - client.innerApiCalls.searchChangeHistoryEvents as SinonStub + client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.searchChangeHistoryEvents as SinonStub + client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes searchChangeHistoryEventsStream without error', async () => { + it('invokes listDisplayVideo360AdvertiserLinksStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12342,35 +14718,35 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', - ['account'] + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', + ['parent'] ); - request.account = defaultValue1; - const expectedHeaderRequestParams = `account=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() ), ]; - client.descriptors.page.searchChangeHistoryEvents.createStream = + client.descriptors.page.listDisplayVideo360AdvertiserLinks.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.searchChangeHistoryEventsStream(request); + const stream = client.listDisplayVideo360AdvertiserLinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.ChangeHistoryEvent[] = + const responses: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink[] = []; stream.on( 'data', ( - response: protos.google.analytics.admin.v1alpha.ChangeHistoryEvent + response: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink ) => { responses.push(response); } @@ -12386,15 +14762,18 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { assert.deepStrictEqual(responses, expectedResponse); assert( ( - client.descriptors.page.searchChangeHistoryEvents + client.descriptors.page.listDisplayVideo360AdvertiserLinks .createStream as SinonStub ) .getCall(0) - .calledWith(client.innerApiCalls.searchChangeHistoryEvents, request) + .calledWith( + client.innerApiCalls.listDisplayVideo360AdvertiserLinks, + request + ) ); assert( ( - client.descriptors.page.searchChangeHistoryEvents + client.descriptors.page.listDisplayVideo360AdvertiserLinks .createStream as SinonStub ) .getCall(0) @@ -12404,7 +14783,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes searchChangeHistoryEventsStream with error', async () => { + it('invokes listDisplayVideo360AdvertiserLinksStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12412,25 +14791,25 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', - ['account'] + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', + ['parent'] ); - request.account = defaultValue1; - const expectedHeaderRequestParams = `account=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.searchChangeHistoryEvents.createStream = + client.descriptors.page.listDisplayVideo360AdvertiserLinks.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.searchChangeHistoryEventsStream(request); + const stream = client.listDisplayVideo360AdvertiserLinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.ChangeHistoryEvent[] = + const responses: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink[] = []; stream.on( 'data', ( - response: protos.google.analytics.admin.v1alpha.ChangeHistoryEvent + response: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink ) => { responses.push(response); } @@ -12445,15 +14824,18 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { await assert.rejects(promise, expectedError); assert( ( - client.descriptors.page.searchChangeHistoryEvents + client.descriptors.page.listDisplayVideo360AdvertiserLinks .createStream as SinonStub ) .getCall(0) - .calledWith(client.innerApiCalls.searchChangeHistoryEvents, request) + .calledWith( + client.innerApiCalls.listDisplayVideo360AdvertiserLinks, + request + ) ); assert( ( - client.descriptors.page.searchChangeHistoryEvents + client.descriptors.page.listDisplayVideo360AdvertiserLinks .createStream as SinonStub ) .getCall(0) @@ -12463,7 +14845,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with searchChangeHistoryEvents without error', async () => { + it('uses async iteration with listDisplayVideo360AdvertiserLinks without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12471,44 +14853,44 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', - ['account'] + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', + ['parent'] ); - request.account = defaultValue1; - const expectedHeaderRequestParams = `account=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() ), ]; - client.descriptors.page.searchChangeHistoryEvents.asyncIterate = + client.descriptors.page.listDisplayVideo360AdvertiserLinks.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IChangeHistoryEvent[] = + const responses: protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink[] = []; - const iterable = client.searchChangeHistoryEventsAsync(request); + const iterable = client.listDisplayVideo360AdvertiserLinksAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.searchChangeHistoryEvents + client.descriptors.page.listDisplayVideo360AdvertiserLinks .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( ( - client.descriptors.page.searchChangeHistoryEvents + client.descriptors.page.listDisplayVideo360AdvertiserLinks .asyncIterate as SinonStub ) .getCall(0) @@ -12518,7 +14900,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with searchChangeHistoryEvents with error', async () => { + it('uses async iteration with listDisplayVideo360AdvertiserLinks with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12526,20 +14908,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', - ['account'] + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', + ['parent'] ); - request.account = defaultValue1; - const expectedHeaderRequestParams = `account=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.searchChangeHistoryEvents.asyncIterate = + client.descriptors.page.listDisplayVideo360AdvertiserLinks.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.searchChangeHistoryEventsAsync(request); + const iterable = client.listDisplayVideo360AdvertiserLinksAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IChangeHistoryEvent[] = + const responses: protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -12547,14 +14929,14 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.searchChangeHistoryEvents + client.descriptors.page.listDisplayVideo360AdvertiserLinks .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( ( - client.descriptors.page.searchChangeHistoryEvents + client.descriptors.page.listDisplayVideo360AdvertiserLinks .asyncIterate as SinonStub ) .getCall(0) @@ -12565,8 +14947,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('listConversionEvents', () => { - it('invokes listConversionEvents without error', async () => { + describe('listDisplayVideo360AdvertiserLinkProposals', () => { + it('invokes listDisplayVideo360AdvertiserLinkProposals without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12574,40 +14956,43 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListConversionEventsRequest', + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ConversionEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ConversionEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ConversionEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() ), ]; - client.innerApiCalls.listConversionEvents = + client.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals = stubSimpleCall(expectedResponse); - const [response] = await client.listConversionEvents(request); + const [response] = + await client.listDisplayVideo360AdvertiserLinkProposals(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listConversionEvents as SinonStub + client.innerApiCalls + .listDisplayVideo360AdvertiserLinkProposals as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listConversionEvents as SinonStub + client.innerApiCalls + .listDisplayVideo360AdvertiserLinkProposals as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listConversionEvents without error using callback', async () => { + it('invokes listDisplayVideo360AdvertiserLinkProposals without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12615,34 +15000,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListConversionEventsRequest', + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ConversionEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ConversionEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ConversionEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() ), ]; - client.innerApiCalls.listConversionEvents = + client.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listConversionEvents( + client.listDisplayVideo360AdvertiserLinkProposals( request, ( err?: Error | null, result?: - | protos.google.analytics.admin.v1alpha.IConversionEvent[] + | protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal[] | null ) => { if (err) { @@ -12656,16 +15041,18 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listConversionEvents as SinonStub + client.innerApiCalls + .listDisplayVideo360AdvertiserLinkProposals as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listConversionEvents as SinonStub + client.innerApiCalls + .listDisplayVideo360AdvertiserLinkProposals as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listConversionEvents with error', async () => { + it('invokes listDisplayVideo360AdvertiserLinkProposals with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12673,31 +15060,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListConversionEventsRequest', + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listConversionEvents = stubSimpleCall( - undefined, + client.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals = + stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.listDisplayVideo360AdvertiserLinkProposals(request), expectedError ); - await assert.rejects(client.listConversionEvents(request), expectedError); const actualRequest = ( - client.innerApiCalls.listConversionEvents as SinonStub + client.innerApiCalls + .listDisplayVideo360AdvertiserLinkProposals as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listConversionEvents as SinonStub + client.innerApiCalls + .listDisplayVideo360AdvertiserLinkProposals as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listConversionEventsStream without error', async () => { + it('invokes listDisplayVideo360AdvertiserLinkProposalsStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12705,34 +15095,37 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListConversionEventsRequest', + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ConversionEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ConversionEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ConversionEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() ), ]; - client.descriptors.page.listConversionEvents.createStream = + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listConversionEventsStream(request); + const stream = + client.listDisplayVideo360AdvertiserLinkProposalsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.ConversionEvent[] = + const responses: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.ConversionEvent) => { + ( + response: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + ) => { responses.push(response); } ); @@ -12746,12 +15139,21 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listConversionEvents.createStream as SinonStub) + ( + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals + .createStream as SinonStub + ) .getCall(0) - .calledWith(client.innerApiCalls.listConversionEvents, request) + .calledWith( + client.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals, + request + ) ); assert( - (client.descriptors.page.listConversionEvents.createStream as SinonStub) + ( + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals + .createStream as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -12759,7 +15161,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes listConversionEventsStream with error', async () => { + it('invokes listDisplayVideo360AdvertiserLinkProposalsStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12767,24 +15169,27 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListConversionEventsRequest', + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listConversionEvents.createStream = + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listConversionEventsStream(request); + const stream = + client.listDisplayVideo360AdvertiserLinkProposalsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.ConversionEvent[] = + const responses: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.ConversionEvent) => { + ( + response: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + ) => { responses.push(response); } ); @@ -12797,12 +15202,21 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listConversionEvents.createStream as SinonStub) + ( + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals + .createStream as SinonStub + ) .getCall(0) - .calledWith(client.innerApiCalls.listConversionEvents, request) + .calledWith( + client.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals, + request + ) ); assert( - (client.descriptors.page.listConversionEvents.createStream as SinonStub) + ( + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals + .createStream as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -12810,7 +15224,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listConversionEvents without error', async () => { + it('uses async iteration with listDisplayVideo360AdvertiserLinkProposals without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12818,42 +15232,47 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListConversionEventsRequest', + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ConversionEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ConversionEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ConversionEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() ), ]; - client.descriptors.page.listConversionEvents.asyncIterate = + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IConversionEvent[] = + const responses: protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal[] = []; - const iterable = client.listConversionEventsAsync(request); + const iterable = + client.listDisplayVideo360AdvertiserLinkProposalsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listConversionEvents.asyncIterate as SinonStub + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals + .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listConversionEvents.asyncIterate as SinonStub) + ( + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals + .asyncIterate as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -12861,7 +15280,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listConversionEvents with error', async () => { + it('uses async iteration with listDisplayVideo360AdvertiserLinkProposals with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12869,20 +15288,21 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListConversionEventsRequest', + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listConversionEvents.asyncIterate = + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listConversionEventsAsync(request); + const iterable = + client.listDisplayVideo360AdvertiserLinkProposalsAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IConversionEvent[] = + const responses: protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -12890,12 +15310,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listConversionEvents.asyncIterate as SinonStub + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals + .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listConversionEvents.asyncIterate as SinonStub) + ( + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals + .asyncIterate as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -12904,8 +15328,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('listDisplayVideo360AdvertiserLinks', () => { - it('invokes listDisplayVideo360AdvertiserLinks without error', async () => { + describe('listCustomDimensions', () => { + it('invokes listCustomDimensions without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12913,42 +15337,40 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', + '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + new protos.google.analytics.admin.v1alpha.CustomDimension() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + new protos.google.analytics.admin.v1alpha.CustomDimension() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + new protos.google.analytics.admin.v1alpha.CustomDimension() ), ]; - client.innerApiCalls.listDisplayVideo360AdvertiserLinks = + client.innerApiCalls.listCustomDimensions = stubSimpleCall(expectedResponse); - const [response] = await client.listDisplayVideo360AdvertiserLinks( - request - ); + const [response] = await client.listCustomDimensions(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub + client.innerApiCalls.listCustomDimensions as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub + client.innerApiCalls.listCustomDimensions as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listDisplayVideo360AdvertiserLinks without error using callback', async () => { + it('invokes listCustomDimensions without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12956,34 +15378,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', + '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + new protos.google.analytics.admin.v1alpha.CustomDimension() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + new protos.google.analytics.admin.v1alpha.CustomDimension() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + new protos.google.analytics.admin.v1alpha.CustomDimension() ), ]; - client.innerApiCalls.listDisplayVideo360AdvertiserLinks = + client.innerApiCalls.listCustomDimensions = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listDisplayVideo360AdvertiserLinks( + client.listCustomDimensions( request, ( err?: Error | null, result?: - | protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink[] + | protos.google.analytics.admin.v1alpha.ICustomDimension[] | null ) => { if (err) { @@ -12997,16 +15419,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub + client.innerApiCalls.listCustomDimensions as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub + client.innerApiCalls.listCustomDimensions as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listDisplayVideo360AdvertiserLinks with error', async () => { + it('invokes listCustomDimensions with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13014,34 +15436,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', + '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listDisplayVideo360AdvertiserLinks = stubSimpleCall( + client.innerApiCalls.listCustomDimensions = stubSimpleCall( undefined, expectedError ); - await assert.rejects( - client.listDisplayVideo360AdvertiserLinks(request), - expectedError - ); + await assert.rejects(client.listCustomDimensions(request), expectedError); const actualRequest = ( - client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub + client.innerApiCalls.listCustomDimensions as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub + client.innerApiCalls.listCustomDimensions as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listDisplayVideo360AdvertiserLinksStream without error', async () => { + it('invokes listCustomDimensionsStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13049,36 +15468,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', + '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + new protos.google.analytics.admin.v1alpha.CustomDimension() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + new protos.google.analytics.admin.v1alpha.CustomDimension() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + new protos.google.analytics.admin.v1alpha.CustomDimension() ), ]; - client.descriptors.page.listDisplayVideo360AdvertiserLinks.createStream = + client.descriptors.page.listCustomDimensions.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listDisplayVideo360AdvertiserLinksStream(request); + const stream = client.listCustomDimensionsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink[] = + const responses: protos.google.analytics.admin.v1alpha.CustomDimension[] = []; stream.on( 'data', - ( - response: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink - ) => { + (response: protos.google.analytics.admin.v1alpha.CustomDimension) => { responses.push(response); } ); @@ -13092,21 +15509,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - ( - client.descriptors.page.listDisplayVideo360AdvertiserLinks - .createStream as SinonStub - ) + (client.descriptors.page.listCustomDimensions.createStream as SinonStub) .getCall(0) - .calledWith( - client.innerApiCalls.listDisplayVideo360AdvertiserLinks, - request - ) + .calledWith(client.innerApiCalls.listCustomDimensions, request) ); assert( - ( - client.descriptors.page.listDisplayVideo360AdvertiserLinks - .createStream as SinonStub - ) + (client.descriptors.page.listCustomDimensions.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -13114,7 +15522,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes listDisplayVideo360AdvertiserLinksStream with error', async () => { + it('invokes listCustomDimensionsStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13122,26 +15530,24 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', + '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listDisplayVideo360AdvertiserLinks.createStream = + client.descriptors.page.listCustomDimensions.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listDisplayVideo360AdvertiserLinksStream(request); + const stream = client.listCustomDimensionsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink[] = + const responses: protos.google.analytics.admin.v1alpha.CustomDimension[] = []; stream.on( 'data', - ( - response: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink - ) => { + (response: protos.google.analytics.admin.v1alpha.CustomDimension) => { responses.push(response); } ); @@ -13154,21 +15560,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - ( - client.descriptors.page.listDisplayVideo360AdvertiserLinks - .createStream as SinonStub - ) + (client.descriptors.page.listCustomDimensions.createStream as SinonStub) .getCall(0) - .calledWith( - client.innerApiCalls.listDisplayVideo360AdvertiserLinks, - request - ) + .calledWith(client.innerApiCalls.listCustomDimensions, request) ); assert( - ( - client.descriptors.page.listDisplayVideo360AdvertiserLinks - .createStream as SinonStub - ) + (client.descriptors.page.listCustomDimensions.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -13176,7 +15573,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listDisplayVideo360AdvertiserLinks without error', async () => { + it('uses async iteration with listCustomDimensions without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13184,46 +15581,42 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', + '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + new protos.google.analytics.admin.v1alpha.CustomDimension() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + new protos.google.analytics.admin.v1alpha.CustomDimension() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + new protos.google.analytics.admin.v1alpha.CustomDimension() ), ]; - client.descriptors.page.listDisplayVideo360AdvertiserLinks.asyncIterate = + client.descriptors.page.listCustomDimensions.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink[] = + const responses: protos.google.analytics.admin.v1alpha.ICustomDimension[] = []; - const iterable = client.listDisplayVideo360AdvertiserLinksAsync(request); + const iterable = client.listCustomDimensionsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listDisplayVideo360AdvertiserLinks - .asyncIterate as SinonStub + client.descriptors.page.listCustomDimensions.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - ( - client.descriptors.page.listDisplayVideo360AdvertiserLinks - .asyncIterate as SinonStub - ) + (client.descriptors.page.listCustomDimensions.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -13231,7 +15624,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listDisplayVideo360AdvertiserLinks with error', async () => { + it('uses async iteration with listCustomDimensions with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13239,20 +15632,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', + '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listDisplayVideo360AdvertiserLinks.asyncIterate = + client.descriptors.page.listCustomDimensions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listDisplayVideo360AdvertiserLinksAsync(request); + const iterable = client.listCustomDimensionsAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink[] = + const responses: protos.google.analytics.admin.v1alpha.ICustomDimension[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -13260,16 +15653,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listDisplayVideo360AdvertiserLinks - .asyncIterate as SinonStub + client.descriptors.page.listCustomDimensions.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - ( - client.descriptors.page.listDisplayVideo360AdvertiserLinks - .asyncIterate as SinonStub - ) + (client.descriptors.page.listCustomDimensions.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -13278,8 +15667,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('listDisplayVideo360AdvertiserLinkProposals', () => { - it('invokes listDisplayVideo360AdvertiserLinkProposals without error', async () => { + describe('listCustomMetrics', () => { + it('invokes listCustomMetrics without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13287,43 +15676,39 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() + new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', + '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + new protos.google.analytics.admin.v1alpha.CustomMetric() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + new protos.google.analytics.admin.v1alpha.CustomMetric() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + new protos.google.analytics.admin.v1alpha.CustomMetric() ), ]; - client.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals = - stubSimpleCall(expectedResponse); - const [response] = - await client.listDisplayVideo360AdvertiserLinkProposals(request); + client.innerApiCalls.listCustomMetrics = stubSimpleCall(expectedResponse); + const [response] = await client.listCustomMetrics(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls - .listDisplayVideo360AdvertiserLinkProposals as SinonStub + client.innerApiCalls.listCustomMetrics as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls - .listDisplayVideo360AdvertiserLinkProposals as SinonStub + client.innerApiCalls.listCustomMetrics as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listDisplayVideo360AdvertiserLinkProposals without error using callback', async () => { + it('invokes listCustomMetrics without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13331,34 +15716,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() + new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', + '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + new protos.google.analytics.admin.v1alpha.CustomMetric() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + new protos.google.analytics.admin.v1alpha.CustomMetric() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + new protos.google.analytics.admin.v1alpha.CustomMetric() ), ]; - client.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals = + client.innerApiCalls.listCustomMetrics = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listDisplayVideo360AdvertiserLinkProposals( + client.listCustomMetrics( request, ( err?: Error | null, result?: - | protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal[] + | protos.google.analytics.admin.v1alpha.ICustomMetric[] | null ) => { if (err) { @@ -13372,18 +15757,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls - .listDisplayVideo360AdvertiserLinkProposals as SinonStub + client.innerApiCalls.listCustomMetrics as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls - .listDisplayVideo360AdvertiserLinkProposals as SinonStub + client.innerApiCalls.listCustomMetrics as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listDisplayVideo360AdvertiserLinkProposals with error', async () => { + it('invokes listCustomMetrics with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13391,34 +15774,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() + new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', + '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals = - stubSimpleCall(undefined, expectedError); - await assert.rejects( - client.listDisplayVideo360AdvertiserLinkProposals(request), + client.innerApiCalls.listCustomMetrics = stubSimpleCall( + undefined, expectedError ); + await assert.rejects(client.listCustomMetrics(request), expectedError); const actualRequest = ( - client.innerApiCalls - .listDisplayVideo360AdvertiserLinkProposals as SinonStub + client.innerApiCalls.listCustomMetrics as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls - .listDisplayVideo360AdvertiserLinkProposals as SinonStub + client.innerApiCalls.listCustomMetrics as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listDisplayVideo360AdvertiserLinkProposalsStream without error', async () => { + it('invokes listCustomMetricsStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13426,37 +15806,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() + new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', + '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + new protos.google.analytics.admin.v1alpha.CustomMetric() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + new protos.google.analytics.admin.v1alpha.CustomMetric() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + new protos.google.analytics.admin.v1alpha.CustomMetric() ), ]; - client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.createStream = + client.descriptors.page.listCustomMetrics.createStream = stubPageStreamingCall(expectedResponse); - const stream = - client.listDisplayVideo360AdvertiserLinkProposalsStream(request); + const stream = client.listCustomMetricsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal[] = + const responses: protos.google.analytics.admin.v1alpha.CustomMetric[] = []; stream.on( 'data', - ( - response: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal - ) => { + (response: protos.google.analytics.admin.v1alpha.CustomMetric) => { responses.push(response); } ); @@ -13470,21 +15847,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - ( - client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals - .createStream as SinonStub - ) + (client.descriptors.page.listCustomMetrics.createStream as SinonStub) .getCall(0) - .calledWith( - client.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals, - request - ) + .calledWith(client.innerApiCalls.listCustomMetrics, request) ); assert( - ( - client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals - .createStream as SinonStub - ) + (client.descriptors.page.listCustomMetrics.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -13492,7 +15860,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes listDisplayVideo360AdvertiserLinkProposalsStream with error', async () => { + it('invokes listCustomMetricsStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13500,27 +15868,24 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() + new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', + '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.createStream = + client.descriptors.page.listCustomMetrics.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = - client.listDisplayVideo360AdvertiserLinkProposalsStream(request); + const stream = client.listCustomMetricsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal[] = + const responses: protos.google.analytics.admin.v1alpha.CustomMetric[] = []; stream.on( 'data', - ( - response: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal - ) => { + (response: protos.google.analytics.admin.v1alpha.CustomMetric) => { responses.push(response); } ); @@ -13533,21 +15898,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - ( - client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals - .createStream as SinonStub - ) + (client.descriptors.page.listCustomMetrics.createStream as SinonStub) .getCall(0) - .calledWith( - client.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals, - request - ) + .calledWith(client.innerApiCalls.listCustomMetrics, request) ); assert( - ( - client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals - .createStream as SinonStub - ) + (client.descriptors.page.listCustomMetrics.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -13555,7 +15911,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listDisplayVideo360AdvertiserLinkProposals without error', async () => { + it('uses async iteration with listCustomMetrics without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13563,47 +15919,42 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() + new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', + '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + new protos.google.analytics.admin.v1alpha.CustomMetric() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + new protos.google.analytics.admin.v1alpha.CustomMetric() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + new protos.google.analytics.admin.v1alpha.CustomMetric() ), ]; - client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.asyncIterate = + client.descriptors.page.listCustomMetrics.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal[] = + const responses: protos.google.analytics.admin.v1alpha.ICustomMetric[] = []; - const iterable = - client.listDisplayVideo360AdvertiserLinkProposalsAsync(request); + const iterable = client.listCustomMetricsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals - .asyncIterate as SinonStub + client.descriptors.page.listCustomMetrics.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - ( - client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals - .asyncIterate as SinonStub - ) + (client.descriptors.page.listCustomMetrics.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -13611,7 +15962,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listDisplayVideo360AdvertiserLinkProposals with error', async () => { + it('uses async iteration with listCustomMetrics with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13619,21 +15970,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() + new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', + '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.asyncIterate = + client.descriptors.page.listCustomMetrics.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = - client.listDisplayVideo360AdvertiserLinkProposalsAsync(request); + const iterable = client.listCustomMetricsAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal[] = + const responses: protos.google.analytics.admin.v1alpha.ICustomMetric[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -13641,16 +15991,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals - .asyncIterate as SinonStub + client.descriptors.page.listCustomMetrics.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - ( - client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals - .asyncIterate as SinonStub - ) + (client.descriptors.page.listCustomMetrics.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -13659,8 +16005,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('listCustomDimensions', () => { - it('invokes listCustomDimensions without error', async () => { + describe('listDataStreams', () => { + it('invokes listDataStreams without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13668,40 +16014,39 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() + new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', + '.google.analytics.admin.v1alpha.ListDataStreamsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomDimension() + new protos.google.analytics.admin.v1alpha.DataStream() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomDimension() + new protos.google.analytics.admin.v1alpha.DataStream() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomDimension() + new protos.google.analytics.admin.v1alpha.DataStream() ), ]; - client.innerApiCalls.listCustomDimensions = - stubSimpleCall(expectedResponse); - const [response] = await client.listCustomDimensions(request); + client.innerApiCalls.listDataStreams = stubSimpleCall(expectedResponse); + const [response] = await client.listDataStreams(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listCustomDimensions as SinonStub + client.innerApiCalls.listDataStreams as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listCustomDimensions as SinonStub + client.innerApiCalls.listDataStreams as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listCustomDimensions without error using callback', async () => { + it('invokes listDataStreams without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13709,35 +16054,33 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() + new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', + '.google.analytics.admin.v1alpha.ListDataStreamsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomDimension() + new protos.google.analytics.admin.v1alpha.DataStream() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomDimension() + new protos.google.analytics.admin.v1alpha.DataStream() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomDimension() + new protos.google.analytics.admin.v1alpha.DataStream() ), ]; - client.innerApiCalls.listCustomDimensions = + client.innerApiCalls.listDataStreams = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listCustomDimensions( + client.listDataStreams( request, ( err?: Error | null, - result?: - | protos.google.analytics.admin.v1alpha.ICustomDimension[] - | null + result?: protos.google.analytics.admin.v1alpha.IDataStream[] | null ) => { if (err) { reject(err); @@ -13750,16 +16093,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listCustomDimensions as SinonStub + client.innerApiCalls.listDataStreams as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listCustomDimensions as SinonStub + client.innerApiCalls.listDataStreams as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listCustomDimensions with error', async () => { + it('invokes listDataStreams with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13767,31 +16110,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() + new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', + '.google.analytics.admin.v1alpha.ListDataStreamsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listCustomDimensions = stubSimpleCall( + client.innerApiCalls.listDataStreams = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listCustomDimensions(request), expectedError); + await assert.rejects(client.listDataStreams(request), expectedError); const actualRequest = ( - client.innerApiCalls.listCustomDimensions as SinonStub + client.innerApiCalls.listDataStreams as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listCustomDimensions as SinonStub + client.innerApiCalls.listDataStreams as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listCustomDimensionsStream without error', async () => { + it('invokes listDataStreamsStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13799,34 +16142,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() + new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', + '.google.analytics.admin.v1alpha.ListDataStreamsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomDimension() + new protos.google.analytics.admin.v1alpha.DataStream() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomDimension() + new protos.google.analytics.admin.v1alpha.DataStream() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomDimension() + new protos.google.analytics.admin.v1alpha.DataStream() ), ]; - client.descriptors.page.listCustomDimensions.createStream = + client.descriptors.page.listDataStreams.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listCustomDimensionsStream(request); + const stream = client.listDataStreamsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.CustomDimension[] = + const responses: protos.google.analytics.admin.v1alpha.DataStream[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.CustomDimension) => { + (response: protos.google.analytics.admin.v1alpha.DataStream) => { responses.push(response); } ); @@ -13840,12 +16183,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listCustomDimensions.createStream as SinonStub) + (client.descriptors.page.listDataStreams.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listCustomDimensions, request) + .calledWith(client.innerApiCalls.listDataStreams, request) ); assert( - (client.descriptors.page.listCustomDimensions.createStream as SinonStub) + (client.descriptors.page.listDataStreams.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -13853,7 +16196,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes listCustomDimensionsStream with error', async () => { + it('invokes listDataStreamsStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13861,24 +16204,24 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() + new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', + '.google.analytics.admin.v1alpha.ListDataStreamsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listCustomDimensions.createStream = + client.descriptors.page.listDataStreams.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listCustomDimensionsStream(request); + const stream = client.listDataStreamsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.CustomDimension[] = + const responses: protos.google.analytics.admin.v1alpha.DataStream[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.CustomDimension) => { + (response: protos.google.analytics.admin.v1alpha.DataStream) => { responses.push(response); } ); @@ -13891,12 +16234,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listCustomDimensions.createStream as SinonStub) + (client.descriptors.page.listDataStreams.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listCustomDimensions, request) + .calledWith(client.innerApiCalls.listDataStreams, request) ); assert( - (client.descriptors.page.listCustomDimensions.createStream as SinonStub) + (client.descriptors.page.listDataStreams.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -13904,7 +16247,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listCustomDimensions without error', async () => { + it('uses async iteration with listDataStreams without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13912,42 +16255,41 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() + new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', + '.google.analytics.admin.v1alpha.ListDataStreamsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomDimension() + new protos.google.analytics.admin.v1alpha.DataStream() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomDimension() + new protos.google.analytics.admin.v1alpha.DataStream() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomDimension() + new protos.google.analytics.admin.v1alpha.DataStream() ), ]; - client.descriptors.page.listCustomDimensions.asyncIterate = + client.descriptors.page.listDataStreams.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.ICustomDimension[] = - []; - const iterable = client.listCustomDimensionsAsync(request); + const responses: protos.google.analytics.admin.v1alpha.IDataStream[] = []; + const iterable = client.listDataStreamsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listCustomDimensions.asyncIterate as SinonStub + client.descriptors.page.listDataStreams.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listCustomDimensions.asyncIterate as SinonStub) + (client.descriptors.page.listDataStreams.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -13955,7 +16297,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listCustomDimensions with error', async () => { + it('uses async iteration with listDataStreams with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13963,20 +16305,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() + new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', + '.google.analytics.admin.v1alpha.ListDataStreamsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listCustomDimensions.asyncIterate = + client.descriptors.page.listDataStreams.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listCustomDimensionsAsync(request); + const iterable = client.listDataStreamsAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.ICustomDimension[] = + const responses: protos.google.analytics.admin.v1alpha.IDataStream[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -13984,12 +16326,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listCustomDimensions.asyncIterate as SinonStub + client.descriptors.page.listDataStreams.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listCustomDimensions.asyncIterate as SinonStub) + (client.descriptors.page.listDataStreams.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -13998,8 +16340,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('listCustomMetrics', () => { - it('invokes listCustomMetrics without error', async () => { + describe('listAudiences', () => { + it('invokes listAudiences without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14007,39 +16349,39 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() + new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', + '.google.analytics.admin.v1alpha.ListAudiencesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomMetric() + new protos.google.analytics.admin.v1alpha.Audience() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomMetric() + new protos.google.analytics.admin.v1alpha.Audience() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomMetric() + new protos.google.analytics.admin.v1alpha.Audience() ), ]; - client.innerApiCalls.listCustomMetrics = stubSimpleCall(expectedResponse); - const [response] = await client.listCustomMetrics(request); + client.innerApiCalls.listAudiences = stubSimpleCall(expectedResponse); + const [response] = await client.listAudiences(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listCustomMetrics as SinonStub + client.innerApiCalls.listAudiences as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listCustomMetrics as SinonStub + client.innerApiCalls.listAudiences as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listCustomMetrics without error using callback', async () => { + it('invokes listAudiences without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14047,35 +16389,33 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() + new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', + '.google.analytics.admin.v1alpha.ListAudiencesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomMetric() + new protos.google.analytics.admin.v1alpha.Audience() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomMetric() + new protos.google.analytics.admin.v1alpha.Audience() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomMetric() + new protos.google.analytics.admin.v1alpha.Audience() ), ]; - client.innerApiCalls.listCustomMetrics = + client.innerApiCalls.listAudiences = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listCustomMetrics( + client.listAudiences( request, ( err?: Error | null, - result?: - | protos.google.analytics.admin.v1alpha.ICustomMetric[] - | null + result?: protos.google.analytics.admin.v1alpha.IAudience[] | null ) => { if (err) { reject(err); @@ -14088,16 +16428,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listCustomMetrics as SinonStub + client.innerApiCalls.listAudiences as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listCustomMetrics as SinonStub + client.innerApiCalls.listAudiences as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listCustomMetrics with error', async () => { + it('invokes listAudiences with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14105,31 +16445,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() + new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', + '.google.analytics.admin.v1alpha.ListAudiencesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listCustomMetrics = stubSimpleCall( + client.innerApiCalls.listAudiences = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listCustomMetrics(request), expectedError); + await assert.rejects(client.listAudiences(request), expectedError); const actualRequest = ( - client.innerApiCalls.listCustomMetrics as SinonStub + client.innerApiCalls.listAudiences as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listCustomMetrics as SinonStub + client.innerApiCalls.listAudiences as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listCustomMetricsStream without error', async () => { + it('invokes listAudiencesStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14137,34 +16477,33 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() + new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', + '.google.analytics.admin.v1alpha.ListAudiencesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomMetric() + new protos.google.analytics.admin.v1alpha.Audience() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomMetric() + new protos.google.analytics.admin.v1alpha.Audience() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomMetric() + new protos.google.analytics.admin.v1alpha.Audience() ), ]; - client.descriptors.page.listCustomMetrics.createStream = + client.descriptors.page.listAudiences.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listCustomMetricsStream(request); + const stream = client.listAudiencesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.CustomMetric[] = - []; + const responses: protos.google.analytics.admin.v1alpha.Audience[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.CustomMetric) => { + (response: protos.google.analytics.admin.v1alpha.Audience) => { responses.push(response); } ); @@ -14178,12 +16517,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listCustomMetrics.createStream as SinonStub) + (client.descriptors.page.listAudiences.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listCustomMetrics, request) + .calledWith(client.innerApiCalls.listAudiences, request) ); assert( - (client.descriptors.page.listCustomMetrics.createStream as SinonStub) + (client.descriptors.page.listAudiences.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -14191,7 +16530,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes listCustomMetricsStream with error', async () => { + it('invokes listAudiencesStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14199,24 +16538,23 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() + new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', + '.google.analytics.admin.v1alpha.ListAudiencesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listCustomMetrics.createStream = + client.descriptors.page.listAudiences.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listCustomMetricsStream(request); + const stream = client.listAudiencesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.CustomMetric[] = - []; + const responses: protos.google.analytics.admin.v1alpha.Audience[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.CustomMetric) => { + (response: protos.google.analytics.admin.v1alpha.Audience) => { responses.push(response); } ); @@ -14229,12 +16567,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listCustomMetrics.createStream as SinonStub) + (client.descriptors.page.listAudiences.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listCustomMetrics, request) + .calledWith(client.innerApiCalls.listAudiences, request) ); assert( - (client.descriptors.page.listCustomMetrics.createStream as SinonStub) + (client.descriptors.page.listAudiences.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -14242,7 +16580,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listCustomMetrics without error', async () => { + it('uses async iteration with listAudiences without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14250,42 +16588,41 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() + new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', + '.google.analytics.admin.v1alpha.ListAudiencesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomMetric() + new protos.google.analytics.admin.v1alpha.Audience() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomMetric() + new protos.google.analytics.admin.v1alpha.Audience() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomMetric() + new protos.google.analytics.admin.v1alpha.Audience() ), ]; - client.descriptors.page.listCustomMetrics.asyncIterate = + client.descriptors.page.listAudiences.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.ICustomMetric[] = - []; - const iterable = client.listCustomMetricsAsync(request); + const responses: protos.google.analytics.admin.v1alpha.IAudience[] = []; + const iterable = client.listAudiencesAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listCustomMetrics.asyncIterate as SinonStub + client.descriptors.page.listAudiences.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listCustomMetrics.asyncIterate as SinonStub) + (client.descriptors.page.listAudiences.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -14293,7 +16630,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listCustomMetrics with error', async () => { + it('uses async iteration with listAudiences with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14301,33 +16638,32 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() + new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', + '.google.analytics.admin.v1alpha.ListAudiencesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listCustomMetrics.asyncIterate = + client.descriptors.page.listAudiences.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listCustomMetricsAsync(request); + const iterable = client.listAudiencesAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.ICustomMetric[] = - []; + const responses: protos.google.analytics.admin.v1alpha.IAudience[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( ( - client.descriptors.page.listCustomMetrics.asyncIterate as SinonStub + client.descriptors.page.listAudiences.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listCustomMetrics.asyncIterate as SinonStub) + (client.descriptors.page.listAudiences.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -14336,8 +16672,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('listDataStreams', () => { - it('invokes listDataStreams without error', async () => { + describe('listSearchAds360Links', () => { + it('invokes listSearchAds360Links without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14345,39 +16681,40 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() + new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDataStreamsRequest', + '.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DataStream() + new protos.google.analytics.admin.v1alpha.SearchAds360Link() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DataStream() + new protos.google.analytics.admin.v1alpha.SearchAds360Link() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DataStream() + new protos.google.analytics.admin.v1alpha.SearchAds360Link() ), ]; - client.innerApiCalls.listDataStreams = stubSimpleCall(expectedResponse); - const [response] = await client.listDataStreams(request); + client.innerApiCalls.listSearchAds360Links = + stubSimpleCall(expectedResponse); + const [response] = await client.listSearchAds360Links(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listDataStreams as SinonStub + client.innerApiCalls.listSearchAds360Links as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listDataStreams as SinonStub + client.innerApiCalls.listSearchAds360Links as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listDataStreams without error using callback', async () => { + it('invokes listSearchAds360Links without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14385,33 +16722,35 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() + new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDataStreamsRequest', + '.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DataStream() + new protos.google.analytics.admin.v1alpha.SearchAds360Link() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DataStream() + new protos.google.analytics.admin.v1alpha.SearchAds360Link() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DataStream() + new protos.google.analytics.admin.v1alpha.SearchAds360Link() ), ]; - client.innerApiCalls.listDataStreams = + client.innerApiCalls.listSearchAds360Links = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listDataStreams( + client.listSearchAds360Links( request, ( err?: Error | null, - result?: protos.google.analytics.admin.v1alpha.IDataStream[] | null + result?: + | protos.google.analytics.admin.v1alpha.ISearchAds360Link[] + | null ) => { if (err) { reject(err); @@ -14424,16 +16763,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listDataStreams as SinonStub + client.innerApiCalls.listSearchAds360Links as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listDataStreams as SinonStub + client.innerApiCalls.listSearchAds360Links as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listDataStreams with error', async () => { + it('invokes listSearchAds360Links with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14441,31 +16780,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() + new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDataStreamsRequest', + '.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listDataStreams = stubSimpleCall( + client.innerApiCalls.listSearchAds360Links = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listDataStreams(request), expectedError); + await assert.rejects( + client.listSearchAds360Links(request), + expectedError + ); const actualRequest = ( - client.innerApiCalls.listDataStreams as SinonStub + client.innerApiCalls.listSearchAds360Links as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listDataStreams as SinonStub + client.innerApiCalls.listSearchAds360Links as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listDataStreamsStream without error', async () => { + it('invokes listSearchAds360LinksStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14473,34 +16815,36 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() + new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDataStreamsRequest', + '.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DataStream() + new protos.google.analytics.admin.v1alpha.SearchAds360Link() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DataStream() + new protos.google.analytics.admin.v1alpha.SearchAds360Link() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DataStream() + new protos.google.analytics.admin.v1alpha.SearchAds360Link() ), ]; - client.descriptors.page.listDataStreams.createStream = + client.descriptors.page.listSearchAds360Links.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listDataStreamsStream(request); + const stream = client.listSearchAds360LinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.DataStream[] = + const responses: protos.google.analytics.admin.v1alpha.SearchAds360Link[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.DataStream) => { + ( + response: protos.google.analytics.admin.v1alpha.SearchAds360Link + ) => { responses.push(response); } ); @@ -14514,12 +16858,18 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listDataStreams.createStream as SinonStub) + ( + client.descriptors.page.listSearchAds360Links + .createStream as SinonStub + ) .getCall(0) - .calledWith(client.innerApiCalls.listDataStreams, request) + .calledWith(client.innerApiCalls.listSearchAds360Links, request) ); assert( - (client.descriptors.page.listDataStreams.createStream as SinonStub) + ( + client.descriptors.page.listSearchAds360Links + .createStream as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -14527,7 +16877,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes listDataStreamsStream with error', async () => { + it('invokes listSearchAds360LinksStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14535,24 +16885,26 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() + new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDataStreamsRequest', + '.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listDataStreams.createStream = + client.descriptors.page.listSearchAds360Links.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listDataStreamsStream(request); + const stream = client.listSearchAds360LinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.DataStream[] = + const responses: protos.google.analytics.admin.v1alpha.SearchAds360Link[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.DataStream) => { + ( + response: protos.google.analytics.admin.v1alpha.SearchAds360Link + ) => { responses.push(response); } ); @@ -14565,12 +16917,18 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listDataStreams.createStream as SinonStub) + ( + client.descriptors.page.listSearchAds360Links + .createStream as SinonStub + ) .getCall(0) - .calledWith(client.innerApiCalls.listDataStreams, request) + .calledWith(client.innerApiCalls.listSearchAds360Links, request) ); assert( - (client.descriptors.page.listDataStreams.createStream as SinonStub) + ( + client.descriptors.page.listSearchAds360Links + .createStream as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -14578,7 +16936,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listDataStreams without error', async () => { + it('uses async iteration with listSearchAds360Links without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14586,41 +16944,46 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() + new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDataStreamsRequest', + '.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DataStream() + new protos.google.analytics.admin.v1alpha.SearchAds360Link() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DataStream() + new protos.google.analytics.admin.v1alpha.SearchAds360Link() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DataStream() + new protos.google.analytics.admin.v1alpha.SearchAds360Link() ), ]; - client.descriptors.page.listDataStreams.asyncIterate = + client.descriptors.page.listSearchAds360Links.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IDataStream[] = []; - const iterable = client.listDataStreamsAsync(request); + const responses: protos.google.analytics.admin.v1alpha.ISearchAds360Link[] = + []; + const iterable = client.listSearchAds360LinksAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listDataStreams.asyncIterate as SinonStub + client.descriptors.page.listSearchAds360Links + .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listDataStreams.asyncIterate as SinonStub) + ( + client.descriptors.page.listSearchAds360Links + .asyncIterate as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -14628,7 +16991,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listDataStreams with error', async () => { + it('uses async iteration with listSearchAds360Links with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14636,20 +16999,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() + new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDataStreamsRequest', + '.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listDataStreams.asyncIterate = + client.descriptors.page.listSearchAds360Links.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listDataStreamsAsync(request); + const iterable = client.listSearchAds360LinksAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IDataStream[] = + const responses: protos.google.analytics.admin.v1alpha.ISearchAds360Link[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -14657,12 +17020,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listDataStreams.asyncIterate as SinonStub + client.descriptors.page.listSearchAds360Links + .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listDataStreams.asyncIterate as SinonStub) + ( + client.descriptors.page.listSearchAds360Links + .asyncIterate as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -14671,8 +17038,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('listAudiences', () => { - it('invokes listAudiences without error', async () => { + describe('listAccessBindings', () => { + it('invokes listAccessBindings without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14680,39 +17047,40 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() + new protos.google.analytics.admin.v1alpha.ListAccessBindingsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListAudiencesRequest', + '.google.analytics.admin.v1alpha.ListAccessBindingsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Audience() + new protos.google.analytics.admin.v1alpha.AccessBinding() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Audience() + new protos.google.analytics.admin.v1alpha.AccessBinding() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Audience() + new protos.google.analytics.admin.v1alpha.AccessBinding() ), ]; - client.innerApiCalls.listAudiences = stubSimpleCall(expectedResponse); - const [response] = await client.listAudiences(request); + client.innerApiCalls.listAccessBindings = + stubSimpleCall(expectedResponse); + const [response] = await client.listAccessBindings(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listAudiences as SinonStub + client.innerApiCalls.listAccessBindings as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listAudiences as SinonStub + client.innerApiCalls.listAccessBindings as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listAudiences without error using callback', async () => { + it('invokes listAccessBindings without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14720,33 +17088,35 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() + new protos.google.analytics.admin.v1alpha.ListAccessBindingsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListAudiencesRequest', + '.google.analytics.admin.v1alpha.ListAccessBindingsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Audience() + new protos.google.analytics.admin.v1alpha.AccessBinding() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Audience() + new protos.google.analytics.admin.v1alpha.AccessBinding() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Audience() + new protos.google.analytics.admin.v1alpha.AccessBinding() ), ]; - client.innerApiCalls.listAudiences = + client.innerApiCalls.listAccessBindings = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listAudiences( + client.listAccessBindings( request, ( err?: Error | null, - result?: protos.google.analytics.admin.v1alpha.IAudience[] | null + result?: + | protos.google.analytics.admin.v1alpha.IAccessBinding[] + | null ) => { if (err) { reject(err); @@ -14759,16 +17129,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listAudiences as SinonStub + client.innerApiCalls.listAccessBindings as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listAudiences as SinonStub + client.innerApiCalls.listAccessBindings as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listAudiences with error', async () => { + it('invokes listAccessBindings with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14776,31 +17146,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() + new protos.google.analytics.admin.v1alpha.ListAccessBindingsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListAudiencesRequest', + '.google.analytics.admin.v1alpha.ListAccessBindingsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listAudiences = stubSimpleCall( + client.innerApiCalls.listAccessBindings = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listAudiences(request), expectedError); + await assert.rejects(client.listAccessBindings(request), expectedError); const actualRequest = ( - client.innerApiCalls.listAudiences as SinonStub + client.innerApiCalls.listAccessBindings as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listAudiences as SinonStub + client.innerApiCalls.listAccessBindings as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listAudiencesStream without error', async () => { + it('invokes listAccessBindingsStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14808,33 +17178,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() + new protos.google.analytics.admin.v1alpha.ListAccessBindingsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListAudiencesRequest', + '.google.analytics.admin.v1alpha.ListAccessBindingsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Audience() + new protos.google.analytics.admin.v1alpha.AccessBinding() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Audience() + new protos.google.analytics.admin.v1alpha.AccessBinding() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Audience() + new protos.google.analytics.admin.v1alpha.AccessBinding() ), ]; - client.descriptors.page.listAudiences.createStream = + client.descriptors.page.listAccessBindings.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listAudiencesStream(request); + const stream = client.listAccessBindingsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.Audience[] = []; + const responses: protos.google.analytics.admin.v1alpha.AccessBinding[] = + []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.Audience) => { + (response: protos.google.analytics.admin.v1alpha.AccessBinding) => { responses.push(response); } ); @@ -14848,12 +17219,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listAudiences.createStream as SinonStub) + (client.descriptors.page.listAccessBindings.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listAudiences, request) + .calledWith(client.innerApiCalls.listAccessBindings, request) ); assert( - (client.descriptors.page.listAudiences.createStream as SinonStub) + (client.descriptors.page.listAccessBindings.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -14861,7 +17232,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes listAudiencesStream with error', async () => { + it('invokes listAccessBindingsStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14869,23 +17240,24 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() + new protos.google.analytics.admin.v1alpha.ListAccessBindingsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListAudiencesRequest', + '.google.analytics.admin.v1alpha.ListAccessBindingsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listAudiences.createStream = + client.descriptors.page.listAccessBindings.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listAudiencesStream(request); + const stream = client.listAccessBindingsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.Audience[] = []; + const responses: protos.google.analytics.admin.v1alpha.AccessBinding[] = + []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.Audience) => { + (response: protos.google.analytics.admin.v1alpha.AccessBinding) => { responses.push(response); } ); @@ -14898,12 +17270,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listAudiences.createStream as SinonStub) + (client.descriptors.page.listAccessBindings.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listAudiences, request) + .calledWith(client.innerApiCalls.listAccessBindings, request) ); assert( - (client.descriptors.page.listAudiences.createStream as SinonStub) + (client.descriptors.page.listAccessBindings.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -14911,7 +17283,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listAudiences without error', async () => { + it('uses async iteration with listAccessBindings without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14919,41 +17291,42 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() + new protos.google.analytics.admin.v1alpha.ListAccessBindingsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListAudiencesRequest', + '.google.analytics.admin.v1alpha.ListAccessBindingsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Audience() + new protos.google.analytics.admin.v1alpha.AccessBinding() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Audience() + new protos.google.analytics.admin.v1alpha.AccessBinding() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Audience() + new protos.google.analytics.admin.v1alpha.AccessBinding() ), ]; - client.descriptors.page.listAudiences.asyncIterate = + client.descriptors.page.listAccessBindings.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IAudience[] = []; - const iterable = client.listAudiencesAsync(request); + const responses: protos.google.analytics.admin.v1alpha.IAccessBinding[] = + []; + const iterable = client.listAccessBindingsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listAudiences.asyncIterate as SinonStub + client.descriptors.page.listAccessBindings.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listAudiences.asyncIterate as SinonStub) + (client.descriptors.page.listAccessBindings.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -14961,7 +17334,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listAudiences with error', async () => { + it('uses async iteration with listAccessBindings with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14969,32 +17342,33 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() + new protos.google.analytics.admin.v1alpha.ListAccessBindingsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListAudiencesRequest', + '.google.analytics.admin.v1alpha.ListAccessBindingsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listAudiences.asyncIterate = + client.descriptors.page.listAccessBindings.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listAudiencesAsync(request); + const iterable = client.listAccessBindingsAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IAudience[] = []; + const responses: protos.google.analytics.admin.v1alpha.IAccessBinding[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( ( - client.descriptors.page.listAudiences.asyncIterate as SinonStub + client.descriptors.page.listAccessBindings.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listAudiences.asyncIterate as SinonStub) + (client.descriptors.page.listAccessBindings.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -15003,8 +17377,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('listSearchAds360Links', () => { - it('invokes listSearchAds360Links without error', async () => { + describe('listExpandedDataSets', () => { + it('invokes listExpandedDataSets without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -15012,40 +17386,40 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() + new protos.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest', + '.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchAds360Link() + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchAds360Link() + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchAds360Link() + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() ), ]; - client.innerApiCalls.listSearchAds360Links = + client.innerApiCalls.listExpandedDataSets = stubSimpleCall(expectedResponse); - const [response] = await client.listSearchAds360Links(request); + const [response] = await client.listExpandedDataSets(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listSearchAds360Links as SinonStub + client.innerApiCalls.listExpandedDataSets as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listSearchAds360Links as SinonStub + client.innerApiCalls.listExpandedDataSets as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listSearchAds360Links without error using callback', async () => { + it('invokes listExpandedDataSets without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -15053,34 +17427,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() + new protos.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest', + '.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchAds360Link() + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchAds360Link() + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchAds360Link() + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() ), ]; - client.innerApiCalls.listSearchAds360Links = + client.innerApiCalls.listExpandedDataSets = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listSearchAds360Links( + client.listExpandedDataSets( request, ( err?: Error | null, result?: - | protos.google.analytics.admin.v1alpha.ISearchAds360Link[] + | protos.google.analytics.admin.v1alpha.IExpandedDataSet[] | null ) => { if (err) { @@ -15094,16 +17468,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listSearchAds360Links as SinonStub + client.innerApiCalls.listExpandedDataSets as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listSearchAds360Links as SinonStub + client.innerApiCalls.listExpandedDataSets as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listSearchAds360Links with error', async () => { + it('invokes listExpandedDataSets with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -15111,34 +17485,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() + new protos.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest', + '.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listSearchAds360Links = stubSimpleCall( + client.innerApiCalls.listExpandedDataSets = stubSimpleCall( undefined, expectedError ); - await assert.rejects( - client.listSearchAds360Links(request), - expectedError - ); + await assert.rejects(client.listExpandedDataSets(request), expectedError); const actualRequest = ( - client.innerApiCalls.listSearchAds360Links as SinonStub + client.innerApiCalls.listExpandedDataSets as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listSearchAds360Links as SinonStub + client.innerApiCalls.listExpandedDataSets as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listSearchAds360LinksStream without error', async () => { + it('invokes listExpandedDataSetsStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -15146,36 +17517,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() + new protos.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest', + '.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchAds360Link() + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchAds360Link() + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchAds360Link() + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() ), ]; - client.descriptors.page.listSearchAds360Links.createStream = + client.descriptors.page.listExpandedDataSets.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listSearchAds360LinksStream(request); + const stream = client.listExpandedDataSetsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.SearchAds360Link[] = + const responses: protos.google.analytics.admin.v1alpha.ExpandedDataSet[] = []; stream.on( 'data', - ( - response: protos.google.analytics.admin.v1alpha.SearchAds360Link - ) => { + (response: protos.google.analytics.admin.v1alpha.ExpandedDataSet) => { responses.push(response); } ); @@ -15189,18 +17558,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - ( - client.descriptors.page.listSearchAds360Links - .createStream as SinonStub - ) + (client.descriptors.page.listExpandedDataSets.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listSearchAds360Links, request) + .calledWith(client.innerApiCalls.listExpandedDataSets, request) ); assert( - ( - client.descriptors.page.listSearchAds360Links - .createStream as SinonStub - ) + (client.descriptors.page.listExpandedDataSets.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -15208,7 +17571,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes listSearchAds360LinksStream with error', async () => { + it('invokes listExpandedDataSetsStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -15216,26 +17579,24 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() + new protos.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest', + '.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listSearchAds360Links.createStream = + client.descriptors.page.listExpandedDataSets.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listSearchAds360LinksStream(request); + const stream = client.listExpandedDataSetsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.SearchAds360Link[] = + const responses: protos.google.analytics.admin.v1alpha.ExpandedDataSet[] = []; stream.on( 'data', - ( - response: protos.google.analytics.admin.v1alpha.SearchAds360Link - ) => { + (response: protos.google.analytics.admin.v1alpha.ExpandedDataSet) => { responses.push(response); } ); @@ -15248,18 +17609,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - ( - client.descriptors.page.listSearchAds360Links - .createStream as SinonStub - ) + (client.descriptors.page.listExpandedDataSets.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listSearchAds360Links, request) + .calledWith(client.innerApiCalls.listExpandedDataSets, request) ); assert( - ( - client.descriptors.page.listSearchAds360Links - .createStream as SinonStub - ) + (client.descriptors.page.listExpandedDataSets.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -15267,7 +17622,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listSearchAds360Links without error', async () => { + it('uses async iteration with listExpandedDataSets without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -15275,46 +17630,42 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() + new protos.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest', + '.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchAds360Link() + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchAds360Link() + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchAds360Link() + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() ), ]; - client.descriptors.page.listSearchAds360Links.asyncIterate = + client.descriptors.page.listExpandedDataSets.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.ISearchAds360Link[] = + const responses: protos.google.analytics.admin.v1alpha.IExpandedDataSet[] = []; - const iterable = client.listSearchAds360LinksAsync(request); + const iterable = client.listExpandedDataSetsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listSearchAds360Links - .asyncIterate as SinonStub + client.descriptors.page.listExpandedDataSets.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - ( - client.descriptors.page.listSearchAds360Links - .asyncIterate as SinonStub - ) + (client.descriptors.page.listExpandedDataSets.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -15322,7 +17673,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listSearchAds360Links with error', async () => { + it('uses async iteration with listExpandedDataSets with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -15330,20 +17681,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() + new protos.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest', + '.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listSearchAds360Links.asyncIterate = + client.descriptors.page.listExpandedDataSets.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listSearchAds360LinksAsync(request); + const iterable = client.listExpandedDataSetsAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.ISearchAds360Link[] = + const responses: protos.google.analytics.admin.v1alpha.IExpandedDataSet[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -15351,16 +17702,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listSearchAds360Links - .asyncIterate as SinonStub + client.descriptors.page.listExpandedDataSets.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - ( - client.descriptors.page.listSearchAds360Links - .asyncIterate as SinonStub - ) + (client.descriptors.page.listExpandedDataSets.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -15747,6 +18094,70 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); + describe('accountAccessBinding', () => { + const fakePath = '/rendered/path/accountAccessBinding'; + const expectedParameters = { + account: 'accountValue', + access_binding: 'accessBindingValue', + }; + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.accountAccessBindingPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.accountAccessBindingPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('accountAccessBindingPath', () => { + const result = client.accountAccessBindingPath( + 'accountValue', + 'accessBindingValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.accountAccessBindingPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromAccountAccessBindingName', () => { + const result = + client.matchAccountFromAccountAccessBindingName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + ( + client.pathTemplates.accountAccessBindingPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAccessBindingFromAccountAccessBindingName', () => { + const result = + client.matchAccessBindingFromAccountAccessBindingName(fakePath); + assert.strictEqual(result, 'accessBindingValue'); + assert( + ( + client.pathTemplates.accountAccessBindingPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('accountSummary', () => { const fakePath = '/rendered/path/accountSummary'; const expectedParameters = { @@ -16768,6 +19179,70 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); + describe('propertyAccessBinding', () => { + const fakePath = '/rendered/path/propertyAccessBinding'; + const expectedParameters = { + property: 'propertyValue', + access_binding: 'accessBindingValue', + }; + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.propertyAccessBindingPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.propertyAccessBindingPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('propertyAccessBindingPath', () => { + const result = client.propertyAccessBindingPath( + 'propertyValue', + 'accessBindingValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.propertyAccessBindingPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromPropertyAccessBindingName', () => { + const result = + client.matchPropertyFromPropertyAccessBindingName(fakePath); + assert.strictEqual(result, 'propertyValue'); + assert( + ( + client.pathTemplates.propertyAccessBindingPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAccessBindingFromPropertyAccessBindingName', () => { + const result = + client.matchAccessBindingFromPropertyAccessBindingName(fakePath); + assert.strictEqual(result, 'accessBindingValue'); + assert( + ( + client.pathTemplates.propertyAccessBindingPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('propertyUserLink', () => { const fakePath = '/rendered/path/propertyUserLink'; const expectedParameters = { From 62fb629fe6d3cd44fa0eadac41d8f5de1f64c681 Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Thu, 23 Feb 2023 19:16:44 -0800 Subject: [PATCH 49/80] docs: update the list of available APIs (#4023) --- README.md | 2 +- libraries.json | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 104fb808132..bc0046be124 100644 --- a/README.md +++ b/README.md @@ -146,7 +146,7 @@ applications that interact with individual Google Cloud services: | [Data Lineage API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-datacatalog-lineage) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/lineage)](https://npm.im/@google-cloud/lineage) | | [Data QnA](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-dataqna) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/data-qna)](https://npm.im/@google-cloud/data-qna) | | [Dataflow](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-dataflow) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/dataflow)](https://npm.im/@google-cloud/dataflow) | -| [Dataform API](https://github.com/googleapis/nodejs-dataform) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/dataform)](https://npm.im/@google-cloud/dataform) | +| [Dataform API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-dataform) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/dataform)](https://npm.im/@google-cloud/dataform) | | [Discovery Engine API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-discoveryengine) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/discoveryengine)](https://npm.im/@google-cloud/discoveryengine) | | [GKE Connect Gateway](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-gkeconnect-gateway) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/gke-connect-gateway)](https://npm.im/@google-cloud/gke-connect-gateway) | | [Google Analytics Admin](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-analytics-admin) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-analytics/admin)](https://npm.im/@google-analytics/admin) | diff --git a/libraries.json b/libraries.json index 7cb8a02d073..bae3e4f7f3e 100644 --- a/libraries.json +++ b/libraries.json @@ -2489,15 +2489,16 @@ "name_pretty": "Dataform API", "product_documentation": "https://dataform.co/", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/dataform/latest", - "issue_tracker": "https://github.com/googleapis/nodejs-dataform/issues", - "release_level": "beta", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "preview", "language": "nodejs", - "repo": "googleapis/nodejs-dataform", + "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/dataform", "api_id": "dataform.googleapis.com", "default_version": "v1beta1", "requires_billing": true, - "linkToRepoHomepage": "https://github.com/googleapis/nodejs-dataform", + "library_type": "GAPIC_AUTO", + "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-dataform", "support_documentation": "https://dataform.co/docs/getting-support" }, { From 4622e342df659045d865e6f4154cd14fc06f12d9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 23 Feb 2023 19:30:49 -0800 Subject: [PATCH 50/80] docs: [container] minor grammar improvements (#4021) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: minor grammar improvements PiperOrigin-RevId: 511850615 Source-Link: https://github.com/googleapis/googleapis/commit/6f90843c6b566e32a949bb958c2cf147e98f7915 Source-Link: https://github.com/googleapis/googleapis-gen/commit/26bf8b2af6276ca34ca6c53eb4410f1e24a8f6fa Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNvbnRhaW5lci8uT3dsQm90LnlhbWwiLCJoIjoiMjZiZjhiMmFmNjI3NmNhMzRjYTZjNTNlYjQ0MTBmMWUyNGE4ZjZmYSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: Daniel Bankhead --- .../protos/google/container/v1beta1/cluster_service.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-container/protos/google/container/v1beta1/cluster_service.proto b/packages/google-container/protos/google/container/v1beta1/cluster_service.proto index e9f06b2f913..3453a1970ba 100644 --- a/packages/google-container/protos/google/container/v1beta1/cluster_service.proto +++ b/packages/google-container/protos/google/container/v1beta1/cluster_service.proto @@ -1004,7 +1004,7 @@ message ReservationAffinity { repeated string values = 3; } -// Kubernetes taint is comprised of three fields: key, value, and effect. Effect +// Kubernetes taint is composed of three fields: key, value, and effect. Effect // can only be one of three types: NoSchedule, PreferNoSchedule or NoExecute. // // See From a16b18cbfb3ebfd48bd3441b330e0f26a9f6d726 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 27 Feb 2023 13:51:16 -0800 Subject: [PATCH 51/80] chore: [bigquery-connection] Fixed Ruby documentation generation (#4019) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add cloud spanner connection properties - serverless analytics feat: add cloud spanner connection properties - database role PiperOrigin-RevId: 511807110 Source-Link: https://github.com/googleapis/googleapis/commit/a563815f12d688285021656a562a0e9312142de3 Source-Link: https://github.com/googleapis/googleapis-gen/commit/a28f65acace12504dfe448b2bdc5513ee8986265 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWNvbm5lY3Rpb24vLk93bEJvdC55YW1sIiwiaCI6ImEyOGY2NWFjYWNlMTI1MDRkZmU0NDhiMmJkYzU1MTNlZTg5ODYyNjUifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: Fixed Ruby documentation generation PiperOrigin-RevId: 512672271 Source-Link: https://github.com/googleapis/googleapis/commit/bc22d9155d0b8eb0a2fe4ff1ae311baf62f7e1c5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/cad484d4dbdc434bab9bdeb17cdd078457c7c70d Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWNvbm5lY3Rpb24vLk93bEJvdC55YW1sIiwiaCI6ImNhZDQ4NGQ0ZGJkYzQzNGJhYjliZGViMTdjZGQwNzg0NTdjN2M3MGQifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: danieljbruce --- .../bigquery/connection/v1/connection.proto | 75 +++++++++++++------ .../protos/protos.d.ts | 12 +++ .../protos/protos.js | 46 ++++++++++++ .../protos/protos.json | 11 +++ ...a.google.cloud.bigquery.connection.v1.json | 2 +- ...gle.cloud.bigquery.connection.v1beta1.json | 2 +- 6 files changed, 125 insertions(+), 23 deletions(-) diff --git a/packages/google-cloud-bigquery-connection/protos/google/cloud/bigquery/connection/v1/connection.proto b/packages/google-cloud-bigquery-connection/protos/google/cloud/bigquery/connection/v1/connection.proto index 8350c3950ea..6ab5a8b5463 100644 --- a/packages/google-cloud-bigquery-connection/protos/google/cloud/bigquery/connection/v1/connection.proto +++ b/packages/google-cloud-bigquery-connection/protos/google/cloud/bigquery/connection/v1/connection.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -56,7 +56,8 @@ service ConnectionService { } // Returns a list of connections in the given project. - rpc ListConnections(ListConnectionsRequest) returns (ListConnectionsResponse) { + rpc ListConnections(ListConnectionsRequest) + returns (ListConnectionsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/connections" }; @@ -74,7 +75,8 @@ service ConnectionService { } // Deletes connection and associated credential. - rpc DeleteConnection(DeleteConnectionRequest) returns (google.protobuf.Empty) { + rpc DeleteConnection(DeleteConnectionRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/connections/*}" }; @@ -84,7 +86,8 @@ service ConnectionService { // Gets the access control policy for a resource. // Returns an empty policy if the resource exists and does not have a policy // set. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1/{resource=projects/*/locations/*/connections/*}:getIamPolicy" body: "*" @@ -96,7 +99,8 @@ service ConnectionService { // existing policy. // // Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1/{resource=projects/*/locations/*/connections/*}:setIamPolicy" body: "*" @@ -111,7 +115,8 @@ service ConnectionService { // Note: This operation is designed to be used for building permission-aware // UIs and command-line tools, not for authorization checking. This operation // may "fail open" without warning. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v1/{resource=projects/*/locations/*/connections/*}:testIamPermissions" body: "*" @@ -120,7 +125,8 @@ service ConnectionService { } } -// The request for [ConnectionService.CreateConnection][google.cloud.bigquery.connection.v1.ConnectionService.CreateConnection]. +// The request for +// [ConnectionService.CreateConnection][google.cloud.bigquery.connection.v1.ConnectionService.CreateConnection]. message CreateConnectionRequest { // Required. Parent resource name. // Must be in the format `projects/{project_id}/locations/{location_id}` @@ -138,7 +144,8 @@ message CreateConnectionRequest { Connection connection = 3 [(google.api.field_behavior) = REQUIRED]; } -// The request for [ConnectionService.GetConnection][google.cloud.bigquery.connection.v1.ConnectionService.GetConnection]. +// The request for +// [ConnectionService.GetConnection][google.cloud.bigquery.connection.v1.ConnectionService.GetConnection]. message GetConnectionRequest { // Required. Name of the requested connection, for example: // `projects/{project_id}/locations/{location_id}/connections/{connection_id}` @@ -150,7 +157,8 @@ message GetConnectionRequest { ]; } -// The request for [ConnectionService.ListConnections][google.cloud.bigquery.connection.v1.ConnectionService.ListConnections]. +// The request for +// [ConnectionService.ListConnections][google.cloud.bigquery.connection.v1.ConnectionService.ListConnections]. message ListConnectionsRequest { // Required. Parent resource name. // Must be in the form: `projects/{project_id}/locations/{location_id}` @@ -168,7 +176,8 @@ message ListConnectionsRequest { string page_token = 3; } -// The response for [ConnectionService.ListConnections][google.cloud.bigquery.connection.v1.ConnectionService.ListConnections]. +// The response for +// [ConnectionService.ListConnections][google.cloud.bigquery.connection.v1.ConnectionService.ListConnections]. message ListConnectionsResponse { // Next page token. string next_page_token = 1; @@ -177,7 +186,8 @@ message ListConnectionsResponse { repeated Connection connections = 2; } -// The request for [ConnectionService.UpdateConnection][google.cloud.bigquery.connection.v1.ConnectionService.UpdateConnection]. +// The request for +// [ConnectionService.UpdateConnection][google.cloud.bigquery.connection.v1.ConnectionService.UpdateConnection]. message UpdateConnectionRequest { // Required. Name of the connection to update, for example: // `projects/{project_id}/locations/{location_id}/connections/{connection_id}` @@ -192,7 +202,8 @@ message UpdateConnectionRequest { Connection connection = 2 [(google.api.field_behavior) = REQUIRED]; // Required. Update mask for the connection fields to be updated. - google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.FieldMask update_mask = 3 + [(google.api.field_behavior) = REQUIRED]; } // The request for [ConnectionService.DeleteConnectionRequest][]. @@ -279,10 +290,11 @@ message CloudSqlProperties { // Input only. Cloud SQL credential. CloudSqlCredential credential = 4 [(google.api.field_behavior) = INPUT_ONLY]; - // Output only. The account ID of the service used for the purpose of this connection. + // Output only. The account ID of the service used for the purpose of this + // connection. // // When the connection is used in the context of an operation in - // BigQuery, this service account will serve as identity being used for + // BigQuery, this service account will serve as the identity being used for // connecting to the CloudSQL instance specified in this connection. string service_account_id = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } @@ -303,6 +315,25 @@ message CloudSpannerProperties { // If parallelism should be used when reading from Cloud Spanner bool use_parallelism = 2; + + // If the serverless analytics service should be used to read data from Cloud + // Spanner. + // Note: `use_parallelism` must be set when using serverless analytics. + bool use_serverless_analytics = 3; + + // Optional. Cloud Spanner database role for fine-grained access control. + // A database role is a collection of fine-grained access privileges. Example: + // Admin predefines roles that provides user a set of permissions (SELECT, + // INSERT, ..). The user can then specify a predefined role on a connection to + // execute their Cloud Spanner query. The role is passthrough here. If the + // user is not authorized to use the specified role, they get an error. This + // validation happens on Cloud Spanner. + // + // See https://cloud.google.com/spanner/docs/fgac-about for more details. + // + // REQUIRES: database role name must start with uppercase/lowercase letter + // and only contain uppercase/lowercase letters, numbers, and underscores. + string database_role = 4 [(google.api.field_behavior) = OPTIONAL]; } // Connection properties specific to Amazon Web Services (AWS). @@ -330,8 +361,9 @@ message AwsCrossAccountRole { // Output only. Google-owned AWS IAM User for a Connection. string iam_user_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. A Google-generated id for representing Connection’s identity in AWS. - // External Id is also used for preventing the Confused Deputy Problem. See + // Output only. A Google-generated id for representing Connection’s identity + // in AWS. External Id is also used for preventing the Confused Deputy + // Problem. See // https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html string external_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } @@ -366,20 +398,21 @@ message AzureProperties { // setup. string redirect_uri = 5; - // The client id of the user's Azure Active Directory Application used for a + // The client ID of the user's Azure Active Directory Application used for a // federated connection. string federated_application_client_id = 6; - // Output only. A unique Google-owned and Google-generated identity for the Connection. - // This identity will be used to access the user's Azure Active Directory - // Application. + // Output only. A unique Google-owned and Google-generated identity for the + // Connection. This identity will be used to access the user's Azure Active + // Directory Application. string identity = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Container for connection properties for delegation of access to GCP // resources. message CloudResourceProperties { - // Output only. The account ID of the service created for the purpose of this connection. + // Output only. The account ID of the service created for the purpose of this + // connection. // // The service account does not have any permissions associated with it // when it is created. After creation, customers delegate permissions diff --git a/packages/google-cloud-bigquery-connection/protos/protos.d.ts b/packages/google-cloud-bigquery-connection/protos/protos.d.ts index 84274036698..365f5b44279 100644 --- a/packages/google-cloud-bigquery-connection/protos/protos.d.ts +++ b/packages/google-cloud-bigquery-connection/protos/protos.d.ts @@ -1247,6 +1247,12 @@ export namespace google { /** CloudSpannerProperties useParallelism */ useParallelism?: (boolean|null); + + /** CloudSpannerProperties useServerlessAnalytics */ + useServerlessAnalytics?: (boolean|null); + + /** CloudSpannerProperties databaseRole */ + databaseRole?: (string|null); } /** Represents a CloudSpannerProperties. */ @@ -1264,6 +1270,12 @@ export namespace google { /** CloudSpannerProperties useParallelism. */ public useParallelism: boolean; + /** CloudSpannerProperties useServerlessAnalytics. */ + public useServerlessAnalytics: boolean; + + /** CloudSpannerProperties databaseRole. */ + public databaseRole: string; + /** * Creates a new CloudSpannerProperties instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-bigquery-connection/protos/protos.js b/packages/google-cloud-bigquery-connection/protos/protos.js index b5ca3d1d4b7..cde256bb28d 100644 --- a/packages/google-cloud-bigquery-connection/protos/protos.js +++ b/packages/google-cloud-bigquery-connection/protos/protos.js @@ -2904,6 +2904,8 @@ * @interface ICloudSpannerProperties * @property {string|null} [database] CloudSpannerProperties database * @property {boolean|null} [useParallelism] CloudSpannerProperties useParallelism + * @property {boolean|null} [useServerlessAnalytics] CloudSpannerProperties useServerlessAnalytics + * @property {string|null} [databaseRole] CloudSpannerProperties databaseRole */ /** @@ -2937,6 +2939,22 @@ */ CloudSpannerProperties.prototype.useParallelism = false; + /** + * CloudSpannerProperties useServerlessAnalytics. + * @member {boolean} useServerlessAnalytics + * @memberof google.cloud.bigquery.connection.v1.CloudSpannerProperties + * @instance + */ + CloudSpannerProperties.prototype.useServerlessAnalytics = false; + + /** + * CloudSpannerProperties databaseRole. + * @member {string} databaseRole + * @memberof google.cloud.bigquery.connection.v1.CloudSpannerProperties + * @instance + */ + CloudSpannerProperties.prototype.databaseRole = ""; + /** * Creates a new CloudSpannerProperties instance using the specified properties. * @function create @@ -2965,6 +2983,10 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.database); if (message.useParallelism != null && Object.hasOwnProperty.call(message, "useParallelism")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.useParallelism); + if (message.useServerlessAnalytics != null && Object.hasOwnProperty.call(message, "useServerlessAnalytics")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.useServerlessAnalytics); + if (message.databaseRole != null && Object.hasOwnProperty.call(message, "databaseRole")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.databaseRole); return writer; }; @@ -3007,6 +3029,14 @@ message.useParallelism = reader.bool(); break; } + case 3: { + message.useServerlessAnalytics = reader.bool(); + break; + } + case 4: { + message.databaseRole = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -3048,6 +3078,12 @@ if (message.useParallelism != null && message.hasOwnProperty("useParallelism")) if (typeof message.useParallelism !== "boolean") return "useParallelism: boolean expected"; + if (message.useServerlessAnalytics != null && message.hasOwnProperty("useServerlessAnalytics")) + if (typeof message.useServerlessAnalytics !== "boolean") + return "useServerlessAnalytics: boolean expected"; + if (message.databaseRole != null && message.hasOwnProperty("databaseRole")) + if (!$util.isString(message.databaseRole)) + return "databaseRole: string expected"; return null; }; @@ -3067,6 +3103,10 @@ message.database = String(object.database); if (object.useParallelism != null) message.useParallelism = Boolean(object.useParallelism); + if (object.useServerlessAnalytics != null) + message.useServerlessAnalytics = Boolean(object.useServerlessAnalytics); + if (object.databaseRole != null) + message.databaseRole = String(object.databaseRole); return message; }; @@ -3086,11 +3126,17 @@ if (options.defaults) { object.database = ""; object.useParallelism = false; + object.useServerlessAnalytics = false; + object.databaseRole = ""; } if (message.database != null && message.hasOwnProperty("database")) object.database = message.database; if (message.useParallelism != null && message.hasOwnProperty("useParallelism")) object.useParallelism = message.useParallelism; + if (message.useServerlessAnalytics != null && message.hasOwnProperty("useServerlessAnalytics")) + object.useServerlessAnalytics = message.useServerlessAnalytics; + if (message.databaseRole != null && message.hasOwnProperty("databaseRole")) + object.databaseRole = message.databaseRole; return object; }; diff --git a/packages/google-cloud-bigquery-connection/protos/protos.json b/packages/google-cloud-bigquery-connection/protos/protos.json index cb3cdc9934d..6a6ad25c774 100644 --- a/packages/google-cloud-bigquery-connection/protos/protos.json +++ b/packages/google-cloud-bigquery-connection/protos/protos.json @@ -423,6 +423,17 @@ "useParallelism": { "type": "bool", "id": 2 + }, + "useServerlessAnalytics": { + "type": "bool", + "id": 3 + }, + "databaseRole": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, diff --git a/packages/google-cloud-bigquery-connection/samples/generated/v1/snippet_metadata.google.cloud.bigquery.connection.v1.json b/packages/google-cloud-bigquery-connection/samples/generated/v1/snippet_metadata.google.cloud.bigquery.connection.v1.json index e2c0b47b463..28cdfa3f33b 100644 --- a/packages/google-cloud-bigquery-connection/samples/generated/v1/snippet_metadata.google.cloud.bigquery.connection.v1.json +++ b/packages/google-cloud-bigquery-connection/samples/generated/v1/snippet_metadata.google.cloud.bigquery.connection.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-connection", - "version": "2.1.0", + "version": "2.1.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-connection/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.connection.v1beta1.json b/packages/google-cloud-bigquery-connection/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.connection.v1beta1.json index 62aeb82645b..2ab2040bf1d 100644 --- a/packages/google-cloud-bigquery-connection/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.connection.v1beta1.json +++ b/packages/google-cloud-bigquery-connection/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.connection.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-connection", - "version": "2.1.0", + "version": "2.1.1", "language": "TYPESCRIPT", "apis": [ { From c66276de5e7a2343913941abe373a339c84123bb Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 27 Feb 2023 13:51:49 -0800 Subject: [PATCH 52/80] feat: Voice Activity Detection: adding speech event time and speech event type (#4020) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Voice Activity Detection: adding speech event time and speech event type PiperOrigin-RevId: 511839326 Source-Link: https://github.com/googleapis/googleapis/commit/f04b13639db530c307bdba9492cdf8e5c9400066 Source-Link: https://github.com/googleapis/googleapis-gen/commit/2130aec98181cfba3e2bc95c9f14f13d058ac3eb Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNwZWVjaC8uT3dsQm90LnlhbWwiLCJoIjoiMjEzMGFlYzk4MTgxY2ZiYTNlMmJjOTVjOWYxNGYxM2QwNThhYzNlYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../google/cloud/speech/v1/cloud_speech.proto | 91 ++- .../cloud/speech/v1p1beta1/cloud_speech.proto | 97 ++- .../google-cloud-speech/protos/protos.d.ts | 258 ++++++- packages/google-cloud-speech/protos/protos.js | 678 +++++++++++++++++- .../google-cloud-speech/protos/protos.json | 62 +- ...ippet_metadata.google.cloud.speech.v1.json | 2 +- ...etadata.google.cloud.speech.v1p1beta1.json | 2 +- ...ippet_metadata.google.cloud.speech.v2.json | 2 +- 8 files changed, 1133 insertions(+), 59 deletions(-) diff --git a/packages/google-cloud-speech/protos/google/cloud/speech/v1/cloud_speech.proto b/packages/google-cloud-speech/protos/google/cloud/speech/v1/cloud_speech.proto index e62f752f3a8..94cfd612624 100644 --- a/packages/google-cloud-speech/protos/google/cloud/speech/v1/cloud_speech.proto +++ b/packages/google-cloud-speech/protos/google/cloud/speech/v1/cloud_speech.proto @@ -36,7 +36,8 @@ option objc_class_prefix = "GCS"; // Service that implements Google Cloud Speech API. service Speech { option (google.api.default_host) = "speech.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Performs synchronous speech recognition: receive results after all audio // has been sent and processed. @@ -54,7 +55,8 @@ service Speech { // a `LongRunningRecognizeResponse` message. // For more information on asynchronous speech recognition, see the // [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize). - rpc LongRunningRecognize(LongRunningRecognizeRequest) returns (google.longrunning.Operation) { + rpc LongRunningRecognize(LongRunningRecognizeRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/speech:longrunningrecognize" body: "*" @@ -68,8 +70,8 @@ service Speech { // Performs bidirectional streaming speech recognition: receive results while // sending audio. This method is only available via the gRPC API (not REST). - rpc StreamingRecognize(stream StreamingRecognizeRequest) returns (stream StreamingRecognizeResponse) { - } + rpc StreamingRecognize(stream StreamingRecognizeRequest) + returns (stream StreamingRecognizeResponse) {} } // The top-level message sent by the client for the `Recognize` method. @@ -93,7 +95,8 @@ message LongRunningRecognizeRequest { RecognitionAudio audio = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. Specifies an optional destination for the recognition results. - TranscriptOutputConfig output_config = 4 [(google.api.field_behavior) = OPTIONAL]; + TranscriptOutputConfig output_config = 4 + [(google.api.field_behavior) = OPTIONAL]; } // Specifies an optional destination for the recognition results. @@ -134,6 +137,15 @@ message StreamingRecognizeRequest { // Provides information to the recognizer that specifies how to process the // request. message StreamingRecognitionConfig { + // Events that a timeout can be set on for voice activity. + message VoiceActivityTimeout { + // Duration to timeout the stream if no speech begins. + google.protobuf.Duration speech_start_timeout = 1; + + // Duration to timeout the stream after speech ends. + google.protobuf.Duration speech_end_timeout = 2; + } + // Required. Provides information to the recognizer that specifies how to // process the request. RecognitionConfig config = 1 [(google.api.field_behavior) = REQUIRED]; @@ -166,6 +178,15 @@ message StreamingRecognitionConfig { // the `is_final=false` flag). // If `false` or omitted, only `is_final=true` result(s) are returned. bool interim_results = 3; + + // If `true`, responses with voice activity speech events will be returned as + // they are detected. + bool enable_voice_activity_events = 5; + + // If set, the server will automatically close the stream after the specified + // duration has elapsed after the last VOICE_ACTIVITY speech event has been + // sent. The field `voice_activity_events` must also be set to true. + VoiceActivityTimeout voice_activity_timeout = 6; } // Provides information to the recognizer that specifies how to process the @@ -193,7 +214,8 @@ message RecognitionConfig { // an `AudioEncoding` when you send send `FLAC` or `WAV` audio, the // encoding configuration must match the encoding described in the audio // header; otherwise the request returns an - // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error code. + // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error + // code. enum AudioEncoding { // Not specified. ENCODING_UNSPECIFIED = 0; @@ -246,7 +268,8 @@ message RecognitionConfig { // Encoding of audio data sent in all `RecognitionAudio` messages. // This field is optional for `FLAC` and `WAV` audio files and required - // for all other audio formats. For details, see [AudioEncoding][google.cloud.speech.v1.RecognitionConfig.AudioEncoding]. + // for all other audio formats. For details, see + // [AudioEncoding][google.cloud.speech.v1.RecognitionConfig.AudioEncoding]. AudioEncoding encoding = 1; // Sample rate in Hertz of the audio data sent in all @@ -255,7 +278,8 @@ message RecognitionConfig { // source to 16000 Hz. If that's not possible, use the native sample rate of // the audio source (instead of re-sampling). // This field is optional for FLAC and WAV audio files, but is - // required for all other audio formats. For details, see [AudioEncoding][google.cloud.speech.v1.RecognitionConfig.AudioEncoding]. + // required for all other audio formats. For details, see + // [AudioEncoding][google.cloud.speech.v1.RecognitionConfig.AudioEncoding]. int32 sample_rate_hertz = 2; // The number of channels in the input audio data. @@ -454,10 +478,8 @@ message SpeakerDiarizationConfig { int32 max_speaker_count = 3; // Output only. Unused. - int32 speaker_tag = 5 [ - deprecated = true, - (google.api.field_behavior) = OUTPUT_ONLY - ]; + int32 speaker_tag = 5 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; } // Description of audio data to be recognized. @@ -619,8 +641,8 @@ message SpeechContext { // Contains audio data in the encoding specified in the `RecognitionConfig`. // Either `content` or `uri` must be supplied. Supplying both or neither -// returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. See -// [content limits](https://cloud.google.com/speech-to-text/quotas#content). +// returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. +// See [content limits](https://cloud.google.com/speech-to-text/quotas#content). message RecognitionAudio { // The audio source, which is either inline content or a Google Cloud // Storage uri. @@ -635,8 +657,9 @@ message RecognitionAudio { // Currently, only Google Cloud Storage URIs are // supported, which must be specified in the following format: // `gs://bucket_name/object_name` (other URI formats return - // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see - // [Request URIs](https://cloud.google.com/storage/docs/reference-uris). + // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). + // For more information, see [Request + // URIs](https://cloud.google.com/storage/docs/reference-uris). string uri = 2; } } @@ -701,8 +724,8 @@ message LongRunningRecognizeMetadata { // Time of the most recent processing update. google.protobuf.Timestamp last_update_time = 3; - // Output only. The URI of the audio file being transcribed. Empty if the audio was sent - // as byte content. + // Output only. The URI of the audio file being transcribed. Empty if the + // audio was sent as byte content. string uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } @@ -769,6 +792,23 @@ message StreamingRecognizeResponse { // until the server closes the gRPC connection. This event is only sent if // `single_utterance` was set to `true`, and is not used otherwise. END_OF_SINGLE_UTTERANCE = 1; + + // This event indicates that the server has detected the beginning of human + // voice activity in the stream. This event can be returned multiple times + // if speech starts and stops repeatedly throughout the stream. This event + // is only sent if `voice_activity_events` is set to true. + SPEECH_ACTIVITY_BEGIN = 2; + + // This event indicates that the server has detected the end of human voice + // activity in the stream. This event can be returned multiple times if + // speech starts and stops repeatedly throughout the stream. This event is + // only sent if `voice_activity_events` is set to true. + SPEECH_ACTIVITY_END = 3; + + // This event indicates that the user-set timeout for speech activity begin + // or end has exceeded. Upon receiving this event, the client is expected to + // send a half close. Further audio will not be processed. + SPEECH_ACTIVITY_TIMEOUT = 4; } // If set, returns a [google.rpc.Status][google.rpc.Status] message that @@ -784,6 +824,9 @@ message StreamingRecognizeResponse { // Indicates the type of speech event. SpeechEventType speech_event_type = 4; + // Time offset between the beginning of the audio and event emission. + google.protobuf.Duration speech_event_time = 8; + // When available, billed audio seconds for the stream. // Set only if this is the last response in the stream. google.protobuf.Duration total_billed_time = 5; @@ -828,9 +871,9 @@ message StreamingRecognitionResult { // For audio_channel_count = N, its output values can range from '1' to 'N'. int32 channel_tag = 5; - // Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag - // of the language in this result. This language code was detected to have - // the most likelihood of being spoken in the audio. + // Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + // language tag of the language in this result. This language code was + // detected to have the most likelihood of being spoken in the audio. string language_code = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } @@ -851,9 +894,9 @@ message SpeechRecognitionResult { // beginning of the audio. google.protobuf.Duration result_end_time = 4; - // Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag - // of the language in this result. This language code was detected to have - // the most likelihood of being spoken in the audio. + // Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + // language tag of the language in this result. This language code was + // detected to have the most likelihood of being spoken in the audio. string language_code = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/packages/google-cloud-speech/protos/google/cloud/speech/v1p1beta1/cloud_speech.proto b/packages/google-cloud-speech/protos/google/cloud/speech/v1p1beta1/cloud_speech.proto index d72ad00563a..cc2e1192b24 100644 --- a/packages/google-cloud-speech/protos/google/cloud/speech/v1p1beta1/cloud_speech.proto +++ b/packages/google-cloud-speech/protos/google/cloud/speech/v1p1beta1/cloud_speech.proto @@ -36,7 +36,8 @@ option objc_class_prefix = "GCS"; // Service that implements Google Cloud Speech API. service Speech { option (google.api.default_host) = "speech.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Performs synchronous speech recognition: receive results after all audio // has been sent and processed. @@ -54,7 +55,8 @@ service Speech { // a `LongRunningRecognizeResponse` message. // For more information on asynchronous speech recognition, see the // [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize). - rpc LongRunningRecognize(LongRunningRecognizeRequest) returns (google.longrunning.Operation) { + rpc LongRunningRecognize(LongRunningRecognizeRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1p1beta1/speech:longrunningrecognize" body: "*" @@ -68,8 +70,8 @@ service Speech { // Performs bidirectional streaming speech recognition: receive results while // sending audio. This method is only available via the gRPC API (not REST). - rpc StreamingRecognize(stream StreamingRecognizeRequest) returns (stream StreamingRecognizeResponse) { - } + rpc StreamingRecognize(stream StreamingRecognizeRequest) + returns (stream StreamingRecognizeResponse) {} } // The top-level message sent by the client for the `Recognize` method. @@ -93,7 +95,8 @@ message LongRunningRecognizeRequest { RecognitionAudio audio = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. Specifies an optional destination for the recognition results. - TranscriptOutputConfig output_config = 4 [(google.api.field_behavior) = OPTIONAL]; + TranscriptOutputConfig output_config = 4 + [(google.api.field_behavior) = OPTIONAL]; } // Specifies an optional destination for the recognition results. @@ -134,6 +137,15 @@ message StreamingRecognizeRequest { // Provides information to the recognizer that specifies how to process the // request. message StreamingRecognitionConfig { + // Events that a timeout can be set on for voice activity. + message VoiceActivityTimeout { + // Duration to timeout the stream if no speech begins. + google.protobuf.Duration speech_start_timeout = 1; + + // Duration to timeout the stream after speech ends. + google.protobuf.Duration speech_end_timeout = 2; + } + // Required. Provides information to the recognizer that specifies how to // process the request. RecognitionConfig config = 1 [(google.api.field_behavior) = REQUIRED]; @@ -166,6 +178,15 @@ message StreamingRecognitionConfig { // the `is_final=false` flag). // If `false` or omitted, only `is_final=true` result(s) are returned. bool interim_results = 3; + + // If `true`, responses with voice activity speech events will be returned as + // they are detected. + bool enable_voice_activity_events = 5; + + // If set, the server will automatically close the stream after the specified + // duration has elapsed after the last VOICE_ACTIVITY speech event has been + // sent. The field `voice_activity_events` must also be set to true. + VoiceActivityTimeout voice_activity_timeout = 6; } // Provides information to the recognizer that specifies how to process the @@ -193,7 +214,8 @@ message RecognitionConfig { // an `AudioEncoding` when you send send `FLAC` or `WAV` audio, the // encoding configuration must match the encoding described in the audio // header; otherwise the request returns an - // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error code. + // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error + // code. enum AudioEncoding { // Not specified. ENCODING_UNSPECIFIED = 0; @@ -252,7 +274,8 @@ message RecognitionConfig { // Encoding of audio data sent in all `RecognitionAudio` messages. // This field is optional for `FLAC` and `WAV` audio files and required - // for all other audio formats. For details, see [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding]. + // for all other audio formats. For details, see + // [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding]. AudioEncoding encoding = 1; // Sample rate in Hertz of the audio data sent in all @@ -261,7 +284,8 @@ message RecognitionConfig { // source to 16000 Hz. If that's not possible, use the native sample rate of // the audio source (instead of re-sampling). // This field is optional for FLAC and WAV audio files, but is - // required for all other audio formats. For details, see [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding]. + // required for all other audio formats. For details, see + // [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding]. int32 sample_rate_hertz = 2; // The number of channels in the input audio data. @@ -477,10 +501,8 @@ message SpeakerDiarizationConfig { int32 max_speaker_count = 3; // Output only. Unused. - int32 speaker_tag = 5 [ - deprecated = true, - (google.api.field_behavior) = OUTPUT_ONLY - ]; + int32 speaker_tag = 5 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; } // Description of audio data to be recognized. @@ -646,8 +668,8 @@ message SpeechContext { // Contains audio data in the encoding specified in the `RecognitionConfig`. // Either `content` or `uri` must be supplied. Supplying both or neither -// returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. See -// [content limits](https://cloud.google.com/speech-to-text/quotas#content). +// returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. +// See [content limits](https://cloud.google.com/speech-to-text/quotas#content). message RecognitionAudio { // The audio source, which is either inline content or a Google Cloud // Storage uri. @@ -662,8 +684,9 @@ message RecognitionAudio { // Currently, only Google Cloud Storage URIs are // supported, which must be specified in the following format: // `gs://bucket_name/object_name` (other URI formats return - // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see - // [Request URIs](https://cloud.google.com/storage/docs/reference-uris). + // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). + // For more information, see [Request + // URIs](https://cloud.google.com/storage/docs/reference-uris). string uri = 2; } } @@ -728,12 +751,14 @@ message LongRunningRecognizeMetadata { // Time of the most recent processing update. google.protobuf.Timestamp last_update_time = 3; - // Output only. The URI of the audio file being transcribed. Empty if the audio was sent - // as byte content. + // Output only. The URI of the audio file being transcribed. Empty if the + // audio was sent as byte content. string uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. A copy of the TranscriptOutputConfig if it was set in the request. - TranscriptOutputConfig output_config = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. A copy of the TranscriptOutputConfig if it was set in the + // request. + TranscriptOutputConfig output_config = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // `StreamingRecognizeResponse` is the only message returned to the client by @@ -799,6 +824,23 @@ message StreamingRecognizeResponse { // until the server closes the gRPC connection. This event is only sent if // `single_utterance` was set to `true`, and is not used otherwise. END_OF_SINGLE_UTTERANCE = 1; + + // This event indicates that the server has detected the beginning of human + // voice activity in the stream. This event can be returned multiple times + // if speech starts and stops repeatedly throughout the stream. This event + // is only sent if `voice_activity_events` is set to true. + SPEECH_ACTIVITY_BEGIN = 2; + + // This event indicates that the server has detected the end of human voice + // activity in the stream. This event can be returned multiple times if + // speech starts and stops repeatedly throughout the stream. This event is + // only sent if `voice_activity_events` is set to true. + SPEECH_ACTIVITY_END = 3; + + // This event indicates that the user-set timeout for speech activity begin + // or end has exceeded. Upon receiving this event, the client is expected to + // send a half close. Further audio will not be processed. + SPEECH_ACTIVITY_TIMEOUT = 4; } // If set, returns a [google.rpc.Status][google.rpc.Status] message that @@ -814,6 +856,9 @@ message StreamingRecognizeResponse { // Indicates the type of speech event. SpeechEventType speech_event_type = 4; + // Time offset between the beginning of the audio and event emission. + google.protobuf.Duration speech_event_time = 8; + // When available, billed audio seconds for the stream. // Set only if this is the last response in the stream. google.protobuf.Duration total_billed_time = 5; @@ -858,9 +903,9 @@ message StreamingRecognitionResult { // For audio_channel_count = N, its output values can range from '1' to 'N'. int32 channel_tag = 5; - // Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag - // of the language in this result. This language code was detected to have - // the most likelihood of being spoken in the audio. + // Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + // language tag of the language in this result. This language code was + // detected to have the most likelihood of being spoken in the audio. string language_code = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } @@ -881,9 +926,9 @@ message SpeechRecognitionResult { // beginning of the audio. google.protobuf.Duration result_end_time = 4; - // Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag - // of the language in this result. This language code was detected to have - // the most likelihood of being spoken in the audio. + // Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + // language tag of the language in this result. This language code was + // detected to have the most likelihood of being spoken in the audio. string language_code = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/packages/google-cloud-speech/protos/protos.d.ts b/packages/google-cloud-speech/protos/protos.d.ts index a5f9175011e..88de90df43c 100644 --- a/packages/google-cloud-speech/protos/protos.d.ts +++ b/packages/google-cloud-speech/protos/protos.d.ts @@ -542,6 +542,12 @@ export namespace google { /** StreamingRecognitionConfig interimResults */ interimResults?: (boolean|null); + + /** StreamingRecognitionConfig enableVoiceActivityEvents */ + enableVoiceActivityEvents?: (boolean|null); + + /** StreamingRecognitionConfig voiceActivityTimeout */ + voiceActivityTimeout?: (google.cloud.speech.v1.StreamingRecognitionConfig.IVoiceActivityTimeout|null); } /** Represents a StreamingRecognitionConfig. */ @@ -562,6 +568,12 @@ export namespace google { /** StreamingRecognitionConfig interimResults. */ public interimResults: boolean; + /** StreamingRecognitionConfig enableVoiceActivityEvents. */ + public enableVoiceActivityEvents: boolean; + + /** StreamingRecognitionConfig voiceActivityTimeout. */ + public voiceActivityTimeout?: (google.cloud.speech.v1.StreamingRecognitionConfig.IVoiceActivityTimeout|null); + /** * Creates a new StreamingRecognitionConfig instance using the specified properties. * @param [properties] Properties to set @@ -640,6 +652,112 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace StreamingRecognitionConfig { + + /** Properties of a VoiceActivityTimeout. */ + interface IVoiceActivityTimeout { + + /** VoiceActivityTimeout speechStartTimeout */ + speechStartTimeout?: (google.protobuf.IDuration|null); + + /** VoiceActivityTimeout speechEndTimeout */ + speechEndTimeout?: (google.protobuf.IDuration|null); + } + + /** Represents a VoiceActivityTimeout. */ + class VoiceActivityTimeout implements IVoiceActivityTimeout { + + /** + * Constructs a new VoiceActivityTimeout. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.speech.v1.StreamingRecognitionConfig.IVoiceActivityTimeout); + + /** VoiceActivityTimeout speechStartTimeout. */ + public speechStartTimeout?: (google.protobuf.IDuration|null); + + /** VoiceActivityTimeout speechEndTimeout. */ + public speechEndTimeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new VoiceActivityTimeout instance using the specified properties. + * @param [properties] Properties to set + * @returns VoiceActivityTimeout instance + */ + public static create(properties?: google.cloud.speech.v1.StreamingRecognitionConfig.IVoiceActivityTimeout): google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout; + + /** + * Encodes the specified VoiceActivityTimeout message. Does not implicitly {@link google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout.verify|verify} messages. + * @param message VoiceActivityTimeout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.speech.v1.StreamingRecognitionConfig.IVoiceActivityTimeout, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VoiceActivityTimeout message, length delimited. Does not implicitly {@link google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout.verify|verify} messages. + * @param message VoiceActivityTimeout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.speech.v1.StreamingRecognitionConfig.IVoiceActivityTimeout, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VoiceActivityTimeout message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VoiceActivityTimeout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout; + + /** + * Decodes a VoiceActivityTimeout message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VoiceActivityTimeout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout; + + /** + * Verifies a VoiceActivityTimeout message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VoiceActivityTimeout message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VoiceActivityTimeout + */ + public static fromObject(object: { [k: string]: any }): google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout; + + /** + * Creates a plain object from a VoiceActivityTimeout message. Also converts values to other types if specified. + * @param message VoiceActivityTimeout + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VoiceActivityTimeout to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VoiceActivityTimeout + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + /** Properties of a RecognitionConfig. */ interface IRecognitionConfig { @@ -1735,6 +1853,9 @@ export namespace google { /** StreamingRecognizeResponse speechEventType */ speechEventType?: (google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType|keyof typeof google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType|null); + /** StreamingRecognizeResponse speechEventTime */ + speechEventTime?: (google.protobuf.IDuration|null); + /** StreamingRecognizeResponse totalBilledTime */ totalBilledTime?: (google.protobuf.IDuration|null); @@ -1763,6 +1884,9 @@ export namespace google { /** StreamingRecognizeResponse speechEventType. */ public speechEventType: (google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType|keyof typeof google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType); + /** StreamingRecognizeResponse speechEventTime. */ + public speechEventTime?: (google.protobuf.IDuration|null); + /** StreamingRecognizeResponse totalBilledTime. */ public totalBilledTime?: (google.protobuf.IDuration|null); @@ -1855,7 +1979,10 @@ export namespace google { /** SpeechEventType enum. */ enum SpeechEventType { SPEECH_EVENT_UNSPECIFIED = 0, - END_OF_SINGLE_UTTERANCE = 1 + END_OF_SINGLE_UTTERANCE = 1, + SPEECH_ACTIVITY_BEGIN = 2, + SPEECH_ACTIVITY_END = 3, + SPEECH_ACTIVITY_TIMEOUT = 4 } } @@ -5063,6 +5190,12 @@ export namespace google { /** StreamingRecognitionConfig interimResults */ interimResults?: (boolean|null); + + /** StreamingRecognitionConfig enableVoiceActivityEvents */ + enableVoiceActivityEvents?: (boolean|null); + + /** StreamingRecognitionConfig voiceActivityTimeout */ + voiceActivityTimeout?: (google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.IVoiceActivityTimeout|null); } /** Represents a StreamingRecognitionConfig. */ @@ -5083,6 +5216,12 @@ export namespace google { /** StreamingRecognitionConfig interimResults. */ public interimResults: boolean; + /** StreamingRecognitionConfig enableVoiceActivityEvents. */ + public enableVoiceActivityEvents: boolean; + + /** StreamingRecognitionConfig voiceActivityTimeout. */ + public voiceActivityTimeout?: (google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.IVoiceActivityTimeout|null); + /** * Creates a new StreamingRecognitionConfig instance using the specified properties. * @param [properties] Properties to set @@ -5161,6 +5300,112 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace StreamingRecognitionConfig { + + /** Properties of a VoiceActivityTimeout. */ + interface IVoiceActivityTimeout { + + /** VoiceActivityTimeout speechStartTimeout */ + speechStartTimeout?: (google.protobuf.IDuration|null); + + /** VoiceActivityTimeout speechEndTimeout */ + speechEndTimeout?: (google.protobuf.IDuration|null); + } + + /** Represents a VoiceActivityTimeout. */ + class VoiceActivityTimeout implements IVoiceActivityTimeout { + + /** + * Constructs a new VoiceActivityTimeout. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.IVoiceActivityTimeout); + + /** VoiceActivityTimeout speechStartTimeout. */ + public speechStartTimeout?: (google.protobuf.IDuration|null); + + /** VoiceActivityTimeout speechEndTimeout. */ + public speechEndTimeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new VoiceActivityTimeout instance using the specified properties. + * @param [properties] Properties to set + * @returns VoiceActivityTimeout instance + */ + public static create(properties?: google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.IVoiceActivityTimeout): google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout; + + /** + * Encodes the specified VoiceActivityTimeout message. Does not implicitly {@link google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout.verify|verify} messages. + * @param message VoiceActivityTimeout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.IVoiceActivityTimeout, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VoiceActivityTimeout message, length delimited. Does not implicitly {@link google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout.verify|verify} messages. + * @param message VoiceActivityTimeout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.IVoiceActivityTimeout, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VoiceActivityTimeout message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VoiceActivityTimeout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout; + + /** + * Decodes a VoiceActivityTimeout message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VoiceActivityTimeout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout; + + /** + * Verifies a VoiceActivityTimeout message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VoiceActivityTimeout message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VoiceActivityTimeout + */ + public static fromObject(object: { [k: string]: any }): google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout; + + /** + * Creates a plain object from a VoiceActivityTimeout message. Also converts values to other types if specified. + * @param message VoiceActivityTimeout + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VoiceActivityTimeout to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VoiceActivityTimeout + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + /** Properties of a RecognitionConfig. */ interface IRecognitionConfig { @@ -6287,6 +6532,9 @@ export namespace google { /** StreamingRecognizeResponse speechEventType */ speechEventType?: (google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.SpeechEventType|keyof typeof google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.SpeechEventType|null); + /** StreamingRecognizeResponse speechEventTime */ + speechEventTime?: (google.protobuf.IDuration|null); + /** StreamingRecognizeResponse totalBilledTime */ totalBilledTime?: (google.protobuf.IDuration|null); @@ -6315,6 +6563,9 @@ export namespace google { /** StreamingRecognizeResponse speechEventType. */ public speechEventType: (google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.SpeechEventType|keyof typeof google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.SpeechEventType); + /** StreamingRecognizeResponse speechEventTime. */ + public speechEventTime?: (google.protobuf.IDuration|null); + /** StreamingRecognizeResponse totalBilledTime. */ public totalBilledTime?: (google.protobuf.IDuration|null); @@ -6407,7 +6658,10 @@ export namespace google { /** SpeechEventType enum. */ enum SpeechEventType { SPEECH_EVENT_UNSPECIFIED = 0, - END_OF_SINGLE_UTTERANCE = 1 + END_OF_SINGLE_UTTERANCE = 1, + SPEECH_ACTIVITY_BEGIN = 2, + SPEECH_ACTIVITY_END = 3, + SPEECH_ACTIVITY_TIMEOUT = 4 } } diff --git a/packages/google-cloud-speech/protos/protos.js b/packages/google-cloud-speech/protos/protos.js index db82a8b67ca..2f2f8e08665 100644 --- a/packages/google-cloud-speech/protos/protos.js +++ b/packages/google-cloud-speech/protos/protos.js @@ -1191,6 +1191,8 @@ * @property {google.cloud.speech.v1.IRecognitionConfig|null} [config] StreamingRecognitionConfig config * @property {boolean|null} [singleUtterance] StreamingRecognitionConfig singleUtterance * @property {boolean|null} [interimResults] StreamingRecognitionConfig interimResults + * @property {boolean|null} [enableVoiceActivityEvents] StreamingRecognitionConfig enableVoiceActivityEvents + * @property {google.cloud.speech.v1.StreamingRecognitionConfig.IVoiceActivityTimeout|null} [voiceActivityTimeout] StreamingRecognitionConfig voiceActivityTimeout */ /** @@ -1232,6 +1234,22 @@ */ StreamingRecognitionConfig.prototype.interimResults = false; + /** + * StreamingRecognitionConfig enableVoiceActivityEvents. + * @member {boolean} enableVoiceActivityEvents + * @memberof google.cloud.speech.v1.StreamingRecognitionConfig + * @instance + */ + StreamingRecognitionConfig.prototype.enableVoiceActivityEvents = false; + + /** + * StreamingRecognitionConfig voiceActivityTimeout. + * @member {google.cloud.speech.v1.StreamingRecognitionConfig.IVoiceActivityTimeout|null|undefined} voiceActivityTimeout + * @memberof google.cloud.speech.v1.StreamingRecognitionConfig + * @instance + */ + StreamingRecognitionConfig.prototype.voiceActivityTimeout = null; + /** * Creates a new StreamingRecognitionConfig instance using the specified properties. * @function create @@ -1262,6 +1280,10 @@ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.singleUtterance); if (message.interimResults != null && Object.hasOwnProperty.call(message, "interimResults")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.interimResults); + if (message.enableVoiceActivityEvents != null && Object.hasOwnProperty.call(message, "enableVoiceActivityEvents")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.enableVoiceActivityEvents); + if (message.voiceActivityTimeout != null && Object.hasOwnProperty.call(message, "voiceActivityTimeout")) + $root.google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout.encode(message.voiceActivityTimeout, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -1308,6 +1330,14 @@ message.interimResults = reader.bool(); break; } + case 5: { + message.enableVoiceActivityEvents = reader.bool(); + break; + } + case 6: { + message.voiceActivityTimeout = $root.google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -1354,6 +1384,14 @@ if (message.interimResults != null && message.hasOwnProperty("interimResults")) if (typeof message.interimResults !== "boolean") return "interimResults: boolean expected"; + if (message.enableVoiceActivityEvents != null && message.hasOwnProperty("enableVoiceActivityEvents")) + if (typeof message.enableVoiceActivityEvents !== "boolean") + return "enableVoiceActivityEvents: boolean expected"; + if (message.voiceActivityTimeout != null && message.hasOwnProperty("voiceActivityTimeout")) { + var error = $root.google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout.verify(message.voiceActivityTimeout); + if (error) + return "voiceActivityTimeout." + error; + } return null; }; @@ -1378,6 +1416,13 @@ message.singleUtterance = Boolean(object.singleUtterance); if (object.interimResults != null) message.interimResults = Boolean(object.interimResults); + if (object.enableVoiceActivityEvents != null) + message.enableVoiceActivityEvents = Boolean(object.enableVoiceActivityEvents); + if (object.voiceActivityTimeout != null) { + if (typeof object.voiceActivityTimeout !== "object") + throw TypeError(".google.cloud.speech.v1.StreamingRecognitionConfig.voiceActivityTimeout: object expected"); + message.voiceActivityTimeout = $root.google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout.fromObject(object.voiceActivityTimeout); + } return message; }; @@ -1398,6 +1443,8 @@ object.config = null; object.singleUtterance = false; object.interimResults = false; + object.enableVoiceActivityEvents = false; + object.voiceActivityTimeout = null; } if (message.config != null && message.hasOwnProperty("config")) object.config = $root.google.cloud.speech.v1.RecognitionConfig.toObject(message.config, options); @@ -1405,6 +1452,10 @@ object.singleUtterance = message.singleUtterance; if (message.interimResults != null && message.hasOwnProperty("interimResults")) object.interimResults = message.interimResults; + if (message.enableVoiceActivityEvents != null && message.hasOwnProperty("enableVoiceActivityEvents")) + object.enableVoiceActivityEvents = message.enableVoiceActivityEvents; + if (message.voiceActivityTimeout != null && message.hasOwnProperty("voiceActivityTimeout")) + object.voiceActivityTimeout = $root.google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout.toObject(message.voiceActivityTimeout, options); return object; }; @@ -1434,6 +1485,243 @@ return typeUrlPrefix + "/google.cloud.speech.v1.StreamingRecognitionConfig"; }; + StreamingRecognitionConfig.VoiceActivityTimeout = (function() { + + /** + * Properties of a VoiceActivityTimeout. + * @memberof google.cloud.speech.v1.StreamingRecognitionConfig + * @interface IVoiceActivityTimeout + * @property {google.protobuf.IDuration|null} [speechStartTimeout] VoiceActivityTimeout speechStartTimeout + * @property {google.protobuf.IDuration|null} [speechEndTimeout] VoiceActivityTimeout speechEndTimeout + */ + + /** + * Constructs a new VoiceActivityTimeout. + * @memberof google.cloud.speech.v1.StreamingRecognitionConfig + * @classdesc Represents a VoiceActivityTimeout. + * @implements IVoiceActivityTimeout + * @constructor + * @param {google.cloud.speech.v1.StreamingRecognitionConfig.IVoiceActivityTimeout=} [properties] Properties to set + */ + function VoiceActivityTimeout(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VoiceActivityTimeout speechStartTimeout. + * @member {google.protobuf.IDuration|null|undefined} speechStartTimeout + * @memberof google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout + * @instance + */ + VoiceActivityTimeout.prototype.speechStartTimeout = null; + + /** + * VoiceActivityTimeout speechEndTimeout. + * @member {google.protobuf.IDuration|null|undefined} speechEndTimeout + * @memberof google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout + * @instance + */ + VoiceActivityTimeout.prototype.speechEndTimeout = null; + + /** + * Creates a new VoiceActivityTimeout instance using the specified properties. + * @function create + * @memberof google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout + * @static + * @param {google.cloud.speech.v1.StreamingRecognitionConfig.IVoiceActivityTimeout=} [properties] Properties to set + * @returns {google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout} VoiceActivityTimeout instance + */ + VoiceActivityTimeout.create = function create(properties) { + return new VoiceActivityTimeout(properties); + }; + + /** + * Encodes the specified VoiceActivityTimeout message. Does not implicitly {@link google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout.verify|verify} messages. + * @function encode + * @memberof google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout + * @static + * @param {google.cloud.speech.v1.StreamingRecognitionConfig.IVoiceActivityTimeout} message VoiceActivityTimeout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VoiceActivityTimeout.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.speechStartTimeout != null && Object.hasOwnProperty.call(message, "speechStartTimeout")) + $root.google.protobuf.Duration.encode(message.speechStartTimeout, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.speechEndTimeout != null && Object.hasOwnProperty.call(message, "speechEndTimeout")) + $root.google.protobuf.Duration.encode(message.speechEndTimeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified VoiceActivityTimeout message, length delimited. Does not implicitly {@link google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout + * @static + * @param {google.cloud.speech.v1.StreamingRecognitionConfig.IVoiceActivityTimeout} message VoiceActivityTimeout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VoiceActivityTimeout.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VoiceActivityTimeout message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout} VoiceActivityTimeout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VoiceActivityTimeout.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.speechStartTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.speechEndTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VoiceActivityTimeout message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout} VoiceActivityTimeout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VoiceActivityTimeout.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VoiceActivityTimeout message. + * @function verify + * @memberof google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VoiceActivityTimeout.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.speechStartTimeout != null && message.hasOwnProperty("speechStartTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.speechStartTimeout); + if (error) + return "speechStartTimeout." + error; + } + if (message.speechEndTimeout != null && message.hasOwnProperty("speechEndTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.speechEndTimeout); + if (error) + return "speechEndTimeout." + error; + } + return null; + }; + + /** + * Creates a VoiceActivityTimeout message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout} VoiceActivityTimeout + */ + VoiceActivityTimeout.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout) + return object; + var message = new $root.google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout(); + if (object.speechStartTimeout != null) { + if (typeof object.speechStartTimeout !== "object") + throw TypeError(".google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout.speechStartTimeout: object expected"); + message.speechStartTimeout = $root.google.protobuf.Duration.fromObject(object.speechStartTimeout); + } + if (object.speechEndTimeout != null) { + if (typeof object.speechEndTimeout !== "object") + throw TypeError(".google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout.speechEndTimeout: object expected"); + message.speechEndTimeout = $root.google.protobuf.Duration.fromObject(object.speechEndTimeout); + } + return message; + }; + + /** + * Creates a plain object from a VoiceActivityTimeout message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout + * @static + * @param {google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout} message VoiceActivityTimeout + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VoiceActivityTimeout.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.speechStartTimeout = null; + object.speechEndTimeout = null; + } + if (message.speechStartTimeout != null && message.hasOwnProperty("speechStartTimeout")) + object.speechStartTimeout = $root.google.protobuf.Duration.toObject(message.speechStartTimeout, options); + if (message.speechEndTimeout != null && message.hasOwnProperty("speechEndTimeout")) + object.speechEndTimeout = $root.google.protobuf.Duration.toObject(message.speechEndTimeout, options); + return object; + }; + + /** + * Converts this VoiceActivityTimeout to JSON. + * @function toJSON + * @memberof google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout + * @instance + * @returns {Object.} JSON object + */ + VoiceActivityTimeout.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VoiceActivityTimeout + * @function getTypeUrl + * @memberof google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VoiceActivityTimeout.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout"; + }; + + return VoiceActivityTimeout; + })(); + return StreamingRecognitionConfig; })(); @@ -4558,6 +4846,7 @@ * @property {google.rpc.IStatus|null} [error] StreamingRecognizeResponse error * @property {Array.|null} [results] StreamingRecognizeResponse results * @property {google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType|null} [speechEventType] StreamingRecognizeResponse speechEventType + * @property {google.protobuf.IDuration|null} [speechEventTime] StreamingRecognizeResponse speechEventTime * @property {google.protobuf.IDuration|null} [totalBilledTime] StreamingRecognizeResponse totalBilledTime * @property {google.cloud.speech.v1.ISpeechAdaptationInfo|null} [speechAdaptationInfo] StreamingRecognizeResponse speechAdaptationInfo * @property {number|Long|null} [requestId] StreamingRecognizeResponse requestId @@ -4603,6 +4892,14 @@ */ StreamingRecognizeResponse.prototype.speechEventType = 0; + /** + * StreamingRecognizeResponse speechEventTime. + * @member {google.protobuf.IDuration|null|undefined} speechEventTime + * @memberof google.cloud.speech.v1.StreamingRecognizeResponse + * @instance + */ + StreamingRecognizeResponse.prototype.speechEventTime = null; + /** * StreamingRecognizeResponse totalBilledTime. * @member {google.protobuf.IDuration|null|undefined} totalBilledTime @@ -4660,6 +4957,8 @@ writer.uint32(/* id 4, wireType 0 =*/32).int32(message.speechEventType); if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) $root.google.protobuf.Duration.encode(message.totalBilledTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.speechEventTime != null && Object.hasOwnProperty.call(message, "speechEventTime")) + $root.google.protobuf.Duration.encode(message.speechEventTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) $root.google.cloud.speech.v1.SpeechAdaptationInfo.encode(message.speechAdaptationInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) @@ -4712,6 +5011,10 @@ message.speechEventType = reader.int32(); break; } + case 8: { + message.speechEventTime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } case 5: { message.totalBilledTime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; @@ -4779,8 +5082,16 @@ return "speechEventType: enum value expected"; case 0: case 1: + case 2: + case 3: + case 4: break; } + if (message.speechEventTime != null && message.hasOwnProperty("speechEventTime")) { + var error = $root.google.protobuf.Duration.verify(message.speechEventTime); + if (error) + return "speechEventTime." + error; + } if (message.totalBilledTime != null && message.hasOwnProperty("totalBilledTime")) { var error = $root.google.protobuf.Duration.verify(message.totalBilledTime); if (error) @@ -4839,6 +5150,23 @@ case 1: message.speechEventType = 1; break; + case "SPEECH_ACTIVITY_BEGIN": + case 2: + message.speechEventType = 2; + break; + case "SPEECH_ACTIVITY_END": + case 3: + message.speechEventType = 3; + break; + case "SPEECH_ACTIVITY_TIMEOUT": + case 4: + message.speechEventType = 4; + break; + } + if (object.speechEventTime != null) { + if (typeof object.speechEventTime !== "object") + throw TypeError(".google.cloud.speech.v1.StreamingRecognizeResponse.speechEventTime: object expected"); + message.speechEventTime = $root.google.protobuf.Duration.fromObject(object.speechEventTime); } if (object.totalBilledTime != null) { if (typeof object.totalBilledTime !== "object") @@ -4881,6 +5209,7 @@ object.error = null; object.speechEventType = options.enums === String ? "SPEECH_EVENT_UNSPECIFIED" : 0; object.totalBilledTime = null; + object.speechEventTime = null; object.speechAdaptationInfo = null; if ($util.Long) { var long = new $util.Long(0, 0, false); @@ -4899,6 +5228,8 @@ object.speechEventType = options.enums === String ? $root.google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType[message.speechEventType] === undefined ? message.speechEventType : $root.google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType[message.speechEventType] : message.speechEventType; if (message.totalBilledTime != null && message.hasOwnProperty("totalBilledTime")) object.totalBilledTime = $root.google.protobuf.Duration.toObject(message.totalBilledTime, options); + if (message.speechEventTime != null && message.hasOwnProperty("speechEventTime")) + object.speechEventTime = $root.google.protobuf.Duration.toObject(message.speechEventTime, options); if (message.speechAdaptationInfo != null && message.hasOwnProperty("speechAdaptationInfo")) object.speechAdaptationInfo = $root.google.cloud.speech.v1.SpeechAdaptationInfo.toObject(message.speechAdaptationInfo, options); if (message.requestId != null && message.hasOwnProperty("requestId")) @@ -4941,11 +5272,17 @@ * @enum {number} * @property {number} SPEECH_EVENT_UNSPECIFIED=0 SPEECH_EVENT_UNSPECIFIED value * @property {number} END_OF_SINGLE_UTTERANCE=1 END_OF_SINGLE_UTTERANCE value + * @property {number} SPEECH_ACTIVITY_BEGIN=2 SPEECH_ACTIVITY_BEGIN value + * @property {number} SPEECH_ACTIVITY_END=3 SPEECH_ACTIVITY_END value + * @property {number} SPEECH_ACTIVITY_TIMEOUT=4 SPEECH_ACTIVITY_TIMEOUT value */ StreamingRecognizeResponse.SpeechEventType = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "SPEECH_EVENT_UNSPECIFIED"] = 0; values[valuesById[1] = "END_OF_SINGLE_UTTERANCE"] = 1; + values[valuesById[2] = "SPEECH_ACTIVITY_BEGIN"] = 2; + values[valuesById[3] = "SPEECH_ACTIVITY_END"] = 3; + values[valuesById[4] = "SPEECH_ACTIVITY_TIMEOUT"] = 4; return values; })(); @@ -12227,6 +12564,8 @@ * @property {google.cloud.speech.v1p1beta1.IRecognitionConfig|null} [config] StreamingRecognitionConfig config * @property {boolean|null} [singleUtterance] StreamingRecognitionConfig singleUtterance * @property {boolean|null} [interimResults] StreamingRecognitionConfig interimResults + * @property {boolean|null} [enableVoiceActivityEvents] StreamingRecognitionConfig enableVoiceActivityEvents + * @property {google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.IVoiceActivityTimeout|null} [voiceActivityTimeout] StreamingRecognitionConfig voiceActivityTimeout */ /** @@ -12268,6 +12607,22 @@ */ StreamingRecognitionConfig.prototype.interimResults = false; + /** + * StreamingRecognitionConfig enableVoiceActivityEvents. + * @member {boolean} enableVoiceActivityEvents + * @memberof google.cloud.speech.v1p1beta1.StreamingRecognitionConfig + * @instance + */ + StreamingRecognitionConfig.prototype.enableVoiceActivityEvents = false; + + /** + * StreamingRecognitionConfig voiceActivityTimeout. + * @member {google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.IVoiceActivityTimeout|null|undefined} voiceActivityTimeout + * @memberof google.cloud.speech.v1p1beta1.StreamingRecognitionConfig + * @instance + */ + StreamingRecognitionConfig.prototype.voiceActivityTimeout = null; + /** * Creates a new StreamingRecognitionConfig instance using the specified properties. * @function create @@ -12298,6 +12653,10 @@ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.singleUtterance); if (message.interimResults != null && Object.hasOwnProperty.call(message, "interimResults")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.interimResults); + if (message.enableVoiceActivityEvents != null && Object.hasOwnProperty.call(message, "enableVoiceActivityEvents")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.enableVoiceActivityEvents); + if (message.voiceActivityTimeout != null && Object.hasOwnProperty.call(message, "voiceActivityTimeout")) + $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout.encode(message.voiceActivityTimeout, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -12340,8 +12699,16 @@ message.singleUtterance = reader.bool(); break; } - case 3: { - message.interimResults = reader.bool(); + case 3: { + message.interimResults = reader.bool(); + break; + } + case 5: { + message.enableVoiceActivityEvents = reader.bool(); + break; + } + case 6: { + message.voiceActivityTimeout = $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout.decode(reader, reader.uint32()); break; } default: @@ -12390,6 +12757,14 @@ if (message.interimResults != null && message.hasOwnProperty("interimResults")) if (typeof message.interimResults !== "boolean") return "interimResults: boolean expected"; + if (message.enableVoiceActivityEvents != null && message.hasOwnProperty("enableVoiceActivityEvents")) + if (typeof message.enableVoiceActivityEvents !== "boolean") + return "enableVoiceActivityEvents: boolean expected"; + if (message.voiceActivityTimeout != null && message.hasOwnProperty("voiceActivityTimeout")) { + var error = $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout.verify(message.voiceActivityTimeout); + if (error) + return "voiceActivityTimeout." + error; + } return null; }; @@ -12414,6 +12789,13 @@ message.singleUtterance = Boolean(object.singleUtterance); if (object.interimResults != null) message.interimResults = Boolean(object.interimResults); + if (object.enableVoiceActivityEvents != null) + message.enableVoiceActivityEvents = Boolean(object.enableVoiceActivityEvents); + if (object.voiceActivityTimeout != null) { + if (typeof object.voiceActivityTimeout !== "object") + throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.voiceActivityTimeout: object expected"); + message.voiceActivityTimeout = $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout.fromObject(object.voiceActivityTimeout); + } return message; }; @@ -12434,6 +12816,8 @@ object.config = null; object.singleUtterance = false; object.interimResults = false; + object.enableVoiceActivityEvents = false; + object.voiceActivityTimeout = null; } if (message.config != null && message.hasOwnProperty("config")) object.config = $root.google.cloud.speech.v1p1beta1.RecognitionConfig.toObject(message.config, options); @@ -12441,6 +12825,10 @@ object.singleUtterance = message.singleUtterance; if (message.interimResults != null && message.hasOwnProperty("interimResults")) object.interimResults = message.interimResults; + if (message.enableVoiceActivityEvents != null && message.hasOwnProperty("enableVoiceActivityEvents")) + object.enableVoiceActivityEvents = message.enableVoiceActivityEvents; + if (message.voiceActivityTimeout != null && message.hasOwnProperty("voiceActivityTimeout")) + object.voiceActivityTimeout = $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout.toObject(message.voiceActivityTimeout, options); return object; }; @@ -12470,6 +12858,243 @@ return typeUrlPrefix + "/google.cloud.speech.v1p1beta1.StreamingRecognitionConfig"; }; + StreamingRecognitionConfig.VoiceActivityTimeout = (function() { + + /** + * Properties of a VoiceActivityTimeout. + * @memberof google.cloud.speech.v1p1beta1.StreamingRecognitionConfig + * @interface IVoiceActivityTimeout + * @property {google.protobuf.IDuration|null} [speechStartTimeout] VoiceActivityTimeout speechStartTimeout + * @property {google.protobuf.IDuration|null} [speechEndTimeout] VoiceActivityTimeout speechEndTimeout + */ + + /** + * Constructs a new VoiceActivityTimeout. + * @memberof google.cloud.speech.v1p1beta1.StreamingRecognitionConfig + * @classdesc Represents a VoiceActivityTimeout. + * @implements IVoiceActivityTimeout + * @constructor + * @param {google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.IVoiceActivityTimeout=} [properties] Properties to set + */ + function VoiceActivityTimeout(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VoiceActivityTimeout speechStartTimeout. + * @member {google.protobuf.IDuration|null|undefined} speechStartTimeout + * @memberof google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout + * @instance + */ + VoiceActivityTimeout.prototype.speechStartTimeout = null; + + /** + * VoiceActivityTimeout speechEndTimeout. + * @member {google.protobuf.IDuration|null|undefined} speechEndTimeout + * @memberof google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout + * @instance + */ + VoiceActivityTimeout.prototype.speechEndTimeout = null; + + /** + * Creates a new VoiceActivityTimeout instance using the specified properties. + * @function create + * @memberof google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout + * @static + * @param {google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.IVoiceActivityTimeout=} [properties] Properties to set + * @returns {google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout} VoiceActivityTimeout instance + */ + VoiceActivityTimeout.create = function create(properties) { + return new VoiceActivityTimeout(properties); + }; + + /** + * Encodes the specified VoiceActivityTimeout message. Does not implicitly {@link google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout.verify|verify} messages. + * @function encode + * @memberof google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout + * @static + * @param {google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.IVoiceActivityTimeout} message VoiceActivityTimeout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VoiceActivityTimeout.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.speechStartTimeout != null && Object.hasOwnProperty.call(message, "speechStartTimeout")) + $root.google.protobuf.Duration.encode(message.speechStartTimeout, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.speechEndTimeout != null && Object.hasOwnProperty.call(message, "speechEndTimeout")) + $root.google.protobuf.Duration.encode(message.speechEndTimeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified VoiceActivityTimeout message, length delimited. Does not implicitly {@link google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout + * @static + * @param {google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.IVoiceActivityTimeout} message VoiceActivityTimeout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VoiceActivityTimeout.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VoiceActivityTimeout message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout} VoiceActivityTimeout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VoiceActivityTimeout.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.speechStartTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.speechEndTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VoiceActivityTimeout message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout} VoiceActivityTimeout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VoiceActivityTimeout.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VoiceActivityTimeout message. + * @function verify + * @memberof google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VoiceActivityTimeout.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.speechStartTimeout != null && message.hasOwnProperty("speechStartTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.speechStartTimeout); + if (error) + return "speechStartTimeout." + error; + } + if (message.speechEndTimeout != null && message.hasOwnProperty("speechEndTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.speechEndTimeout); + if (error) + return "speechEndTimeout." + error; + } + return null; + }; + + /** + * Creates a VoiceActivityTimeout message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout} VoiceActivityTimeout + */ + VoiceActivityTimeout.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout) + return object; + var message = new $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout(); + if (object.speechStartTimeout != null) { + if (typeof object.speechStartTimeout !== "object") + throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout.speechStartTimeout: object expected"); + message.speechStartTimeout = $root.google.protobuf.Duration.fromObject(object.speechStartTimeout); + } + if (object.speechEndTimeout != null) { + if (typeof object.speechEndTimeout !== "object") + throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout.speechEndTimeout: object expected"); + message.speechEndTimeout = $root.google.protobuf.Duration.fromObject(object.speechEndTimeout); + } + return message; + }; + + /** + * Creates a plain object from a VoiceActivityTimeout message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout + * @static + * @param {google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout} message VoiceActivityTimeout + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VoiceActivityTimeout.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.speechStartTimeout = null; + object.speechEndTimeout = null; + } + if (message.speechStartTimeout != null && message.hasOwnProperty("speechStartTimeout")) + object.speechStartTimeout = $root.google.protobuf.Duration.toObject(message.speechStartTimeout, options); + if (message.speechEndTimeout != null && message.hasOwnProperty("speechEndTimeout")) + object.speechEndTimeout = $root.google.protobuf.Duration.toObject(message.speechEndTimeout, options); + return object; + }; + + /** + * Converts this VoiceActivityTimeout to JSON. + * @function toJSON + * @memberof google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout + * @instance + * @returns {Object.} JSON object + */ + VoiceActivityTimeout.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VoiceActivityTimeout + * @function getTypeUrl + * @memberof google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VoiceActivityTimeout.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout"; + }; + + return VoiceActivityTimeout; + })(); + return StreamingRecognitionConfig; })(); @@ -15740,6 +16365,7 @@ * @property {google.rpc.IStatus|null} [error] StreamingRecognizeResponse error * @property {Array.|null} [results] StreamingRecognizeResponse results * @property {google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.SpeechEventType|null} [speechEventType] StreamingRecognizeResponse speechEventType + * @property {google.protobuf.IDuration|null} [speechEventTime] StreamingRecognizeResponse speechEventTime * @property {google.protobuf.IDuration|null} [totalBilledTime] StreamingRecognizeResponse totalBilledTime * @property {google.cloud.speech.v1p1beta1.ISpeechAdaptationInfo|null} [speechAdaptationInfo] StreamingRecognizeResponse speechAdaptationInfo * @property {number|Long|null} [requestId] StreamingRecognizeResponse requestId @@ -15785,6 +16411,14 @@ */ StreamingRecognizeResponse.prototype.speechEventType = 0; + /** + * StreamingRecognizeResponse speechEventTime. + * @member {google.protobuf.IDuration|null|undefined} speechEventTime + * @memberof google.cloud.speech.v1p1beta1.StreamingRecognizeResponse + * @instance + */ + StreamingRecognizeResponse.prototype.speechEventTime = null; + /** * StreamingRecognizeResponse totalBilledTime. * @member {google.protobuf.IDuration|null|undefined} totalBilledTime @@ -15842,6 +16476,8 @@ writer.uint32(/* id 4, wireType 0 =*/32).int32(message.speechEventType); if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) $root.google.protobuf.Duration.encode(message.totalBilledTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.speechEventTime != null && Object.hasOwnProperty.call(message, "speechEventTime")) + $root.google.protobuf.Duration.encode(message.speechEventTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.encode(message.speechAdaptationInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) @@ -15894,6 +16530,10 @@ message.speechEventType = reader.int32(); break; } + case 8: { + message.speechEventTime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } case 5: { message.totalBilledTime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; @@ -15961,8 +16601,16 @@ return "speechEventType: enum value expected"; case 0: case 1: + case 2: + case 3: + case 4: break; } + if (message.speechEventTime != null && message.hasOwnProperty("speechEventTime")) { + var error = $root.google.protobuf.Duration.verify(message.speechEventTime); + if (error) + return "speechEventTime." + error; + } if (message.totalBilledTime != null && message.hasOwnProperty("totalBilledTime")) { var error = $root.google.protobuf.Duration.verify(message.totalBilledTime); if (error) @@ -16021,6 +16669,23 @@ case 1: message.speechEventType = 1; break; + case "SPEECH_ACTIVITY_BEGIN": + case 2: + message.speechEventType = 2; + break; + case "SPEECH_ACTIVITY_END": + case 3: + message.speechEventType = 3; + break; + case "SPEECH_ACTIVITY_TIMEOUT": + case 4: + message.speechEventType = 4; + break; + } + if (object.speechEventTime != null) { + if (typeof object.speechEventTime !== "object") + throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.speechEventTime: object expected"); + message.speechEventTime = $root.google.protobuf.Duration.fromObject(object.speechEventTime); } if (object.totalBilledTime != null) { if (typeof object.totalBilledTime !== "object") @@ -16063,6 +16728,7 @@ object.error = null; object.speechEventType = options.enums === String ? "SPEECH_EVENT_UNSPECIFIED" : 0; object.totalBilledTime = null; + object.speechEventTime = null; object.speechAdaptationInfo = null; if ($util.Long) { var long = new $util.Long(0, 0, false); @@ -16081,6 +16747,8 @@ object.speechEventType = options.enums === String ? $root.google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.SpeechEventType[message.speechEventType] === undefined ? message.speechEventType : $root.google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.SpeechEventType[message.speechEventType] : message.speechEventType; if (message.totalBilledTime != null && message.hasOwnProperty("totalBilledTime")) object.totalBilledTime = $root.google.protobuf.Duration.toObject(message.totalBilledTime, options); + if (message.speechEventTime != null && message.hasOwnProperty("speechEventTime")) + object.speechEventTime = $root.google.protobuf.Duration.toObject(message.speechEventTime, options); if (message.speechAdaptationInfo != null && message.hasOwnProperty("speechAdaptationInfo")) object.speechAdaptationInfo = $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.toObject(message.speechAdaptationInfo, options); if (message.requestId != null && message.hasOwnProperty("requestId")) @@ -16123,11 +16791,17 @@ * @enum {number} * @property {number} SPEECH_EVENT_UNSPECIFIED=0 SPEECH_EVENT_UNSPECIFIED value * @property {number} END_OF_SINGLE_UTTERANCE=1 END_OF_SINGLE_UTTERANCE value + * @property {number} SPEECH_ACTIVITY_BEGIN=2 SPEECH_ACTIVITY_BEGIN value + * @property {number} SPEECH_ACTIVITY_END=3 SPEECH_ACTIVITY_END value + * @property {number} SPEECH_ACTIVITY_TIMEOUT=4 SPEECH_ACTIVITY_TIMEOUT value */ StreamingRecognizeResponse.SpeechEventType = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "SPEECH_EVENT_UNSPECIFIED"] = 0; values[valuesById[1] = "END_OF_SINGLE_UTTERANCE"] = 1; + values[valuesById[2] = "SPEECH_ACTIVITY_BEGIN"] = 2; + values[valuesById[3] = "SPEECH_ACTIVITY_END"] = 3; + values[valuesById[4] = "SPEECH_ACTIVITY_TIMEOUT"] = 4; return values; })(); diff --git a/packages/google-cloud-speech/protos/protos.json b/packages/google-cloud-speech/protos/protos.json index 50e2355ca30..82e145425b8 100644 --- a/packages/google-cloud-speech/protos/protos.json +++ b/packages/google-cloud-speech/protos/protos.json @@ -172,6 +172,28 @@ "interimResults": { "type": "bool", "id": 3 + }, + "enableVoiceActivityEvents": { + "type": "bool", + "id": 5 + }, + "voiceActivityTimeout": { + "type": "VoiceActivityTimeout", + "id": 6 + } + }, + "nested": { + "VoiceActivityTimeout": { + "fields": { + "speechStartTimeout": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "speechEndTimeout": { + "type": "google.protobuf.Duration", + "id": 2 + } + } } } }, @@ -500,6 +522,10 @@ "type": "SpeechEventType", "id": 4 }, + "speechEventTime": { + "type": "google.protobuf.Duration", + "id": 8 + }, "totalBilledTime": { "type": "google.protobuf.Duration", "id": 5 @@ -517,7 +543,10 @@ "SpeechEventType": { "values": { "SPEECH_EVENT_UNSPECIFIED": 0, - "END_OF_SINGLE_UTTERANCE": 1 + "END_OF_SINGLE_UTTERANCE": 1, + "SPEECH_ACTIVITY_BEGIN": 2, + "SPEECH_ACTIVITY_END": 3, + "SPEECH_ACTIVITY_TIMEOUT": 4 } } } @@ -1297,6 +1326,28 @@ "interimResults": { "type": "bool", "id": 3 + }, + "enableVoiceActivityEvents": { + "type": "bool", + "id": 5 + }, + "voiceActivityTimeout": { + "type": "VoiceActivityTimeout", + "id": 6 + } + }, + "nested": { + "VoiceActivityTimeout": { + "fields": { + "speechStartTimeout": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "speechEndTimeout": { + "type": "google.protobuf.Duration", + "id": 2 + } + } } } }, @@ -1658,6 +1709,10 @@ "type": "SpeechEventType", "id": 4 }, + "speechEventTime": { + "type": "google.protobuf.Duration", + "id": 8 + }, "totalBilledTime": { "type": "google.protobuf.Duration", "id": 5 @@ -1675,7 +1730,10 @@ "SpeechEventType": { "values": { "SPEECH_EVENT_UNSPECIFIED": 0, - "END_OF_SINGLE_UTTERANCE": 1 + "END_OF_SINGLE_UTTERANCE": 1, + "SPEECH_ACTIVITY_BEGIN": 2, + "SPEECH_ACTIVITY_END": 3, + "SPEECH_ACTIVITY_TIMEOUT": 4 } } } diff --git a/packages/google-cloud-speech/samples/generated/v1/snippet_metadata.google.cloud.speech.v1.json b/packages/google-cloud-speech/samples/generated/v1/snippet_metadata.google.cloud.speech.v1.json index d2a716916f6..4ba50b816ea 100644 --- a/packages/google-cloud-speech/samples/generated/v1/snippet_metadata.google.cloud.speech.v1.json +++ b/packages/google-cloud-speech/samples/generated/v1/snippet_metadata.google.cloud.speech.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-speech", - "version": "5.3.0", + "version": "5.3.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-speech/samples/generated/v1p1beta1/snippet_metadata.google.cloud.speech.v1p1beta1.json b/packages/google-cloud-speech/samples/generated/v1p1beta1/snippet_metadata.google.cloud.speech.v1p1beta1.json index dff6522b8e2..511126d9a0f 100644 --- a/packages/google-cloud-speech/samples/generated/v1p1beta1/snippet_metadata.google.cloud.speech.v1p1beta1.json +++ b/packages/google-cloud-speech/samples/generated/v1p1beta1/snippet_metadata.google.cloud.speech.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-speech", - "version": "5.3.0", + "version": "5.3.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-speech/samples/generated/v2/snippet_metadata.google.cloud.speech.v2.json b/packages/google-cloud-speech/samples/generated/v2/snippet_metadata.google.cloud.speech.v2.json index 5635246e862..cae5606db48 100644 --- a/packages/google-cloud-speech/samples/generated/v2/snippet_metadata.google.cloud.speech.v2.json +++ b/packages/google-cloud-speech/samples/generated/v2/snippet_metadata.google.cloud.speech.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-speech", - "version": "5.3.0", + "version": "5.3.1", "language": "TYPESCRIPT", "apis": [ { From c61995882172a718fb104549e7a50a84ada3359b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 27 Feb 2023 16:19:35 -0800 Subject: [PATCH 53/80] docs: [container] minor grammar improvements (#4027) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: minor grammar improvements PiperOrigin-RevId: 512664562 Source-Link: https://github.com/googleapis/googleapis/commit/2328fdb96c0747ed08f769ce9c19c932a9d7d2da Source-Link: https://github.com/googleapis/googleapis-gen/commit/93635315eb7fb0d99a5b604d18106b8f472754b2 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNvbnRhaW5lci8uT3dsQm90LnlhbWwiLCJoIjoiOTM2MzUzMTVlYjdmYjBkOTlhNWI2MDRkMTgxMDZiOGY0NzI3NTRiMiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- .../protos/google/container/v1/cluster_service.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-container/protos/google/container/v1/cluster_service.proto b/packages/google-container/protos/google/container/v1/cluster_service.proto index aa2f3f45f13..5d17384436e 100644 --- a/packages/google-container/protos/google/container/v1/cluster_service.proto +++ b/packages/google-container/protos/google/container/v1/cluster_service.proto @@ -966,7 +966,7 @@ message ReservationAffinity { repeated string values = 3; } -// Kubernetes taint is comprised of three fields: key, value, and effect. Effect +// Kubernetes taint is composed of three fields: key, value, and effect. Effect // can only be one of three types: NoSchedule, PreferNoSchedule or NoExecute. // // See From 310c189c2af21be7363880206200f24c2ec60fbe Mon Sep 17 00:00:00 2001 From: "owlbot-bootstrapper[bot]" <104649659+owlbot-bootstrapper[bot]@users.noreply.github.com> Date: Mon, 27 Feb 2023 18:09:41 -0800 Subject: [PATCH 54/80] feat: add initial files for google.cloud.advisorynotifications.v1 (#4012) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: initial commit * feat: initial generation of library Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFkdmlzb3J5bm90aWZpY2F0aW9ucy8uT3dsQm90LnlhbWwiLCJoIjoiYTE5MzM0OWQzNWRmZTFkMTBlNDhhNDYzYmI4MGMwZGYxYjc4NWE2YiJ9 * Owl Bot copied code from https://github.com/googleapis/googleapis-gen/commit/a193349d35dfe1d10e48a463bb80c0df1b785a6b * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update test * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update quickstart.js * Update release-please-config.json * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update quickstart.js * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update quickstart.js * Update quickstart.js * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Owl Bot copied code from https://github.com/googleapis/googleapis-gen/commit/a193349d35dfe1d10e48a463bb80c0df1b785a6b * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owlbot Bootstrapper Co-authored-by: Owl Bot Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> Co-authored-by: Sofia Leon --- .../.OwlBot.yaml | 19 + .../.eslintignore | 7 + .../.eslintrc.json | 3 + .../.gitattributes | 4 + .../.gitignore | 14 + .../.jsdoc.js | 55 + .../.mocharc.js | 29 + .../google-cloud-advisorynotifications/.nycrc | 24 + .../.prettierignore | 6 + .../.prettierrc.js | 17 + .../.repo-metadata.json | 17 + .../CODE_OF_CONDUCT.md | 94 + .../CONTRIBUTING.md | 76 + .../LICENSE | 202 + .../README.md | 204 + .../linkinator.config.json | 16 + .../package.json | 71 + .../advisorynotifications/v1/service.proto | 253 + .../protos/protos.d.ts | 5368 ++++++ .../protos/protos.js | 14390 ++++++++++++++++ .../protos/protos.json | 1433 ++ .../samples/README.md | 104 + ..._notifications_service.get_notification.js | 71 + ...otifications_service.list_notifications.js | 90 + ...google.cloud.advisorynotifications.v1.json | 115 + .../samples/package.json | 24 + .../samples/quickstart.js | 91 + .../samples/test/quickstart.js | 26 + .../src/index.ts | 28 + .../advisory_notifications_service_client.ts | 816 + ...y_notifications_service_client_config.json | 48 + ...sory_notifications_service_proto_list.json | 3 + .../src/v1/gapic_metadata.json | 47 + .../src/v1/index.ts | 19 + .../system-test/fixtures/sample/src/index.js | 27 + .../system-test/fixtures/sample/src/index.ts | 37 + .../system-test/install.ts | 51 + ...gapic_advisory_notifications_service_v1.ts | 915 + .../tsconfig.json | 19 + .../webpack.config.js | 64 + release-please-config.json | 1 + 41 files changed, 24898 insertions(+) create mode 100644 packages/google-cloud-advisorynotifications/.OwlBot.yaml create mode 100644 packages/google-cloud-advisorynotifications/.eslintignore create mode 100644 packages/google-cloud-advisorynotifications/.eslintrc.json create mode 100644 packages/google-cloud-advisorynotifications/.gitattributes create mode 100644 packages/google-cloud-advisorynotifications/.gitignore create mode 100644 packages/google-cloud-advisorynotifications/.jsdoc.js create mode 100644 packages/google-cloud-advisorynotifications/.mocharc.js create mode 100644 packages/google-cloud-advisorynotifications/.nycrc create mode 100644 packages/google-cloud-advisorynotifications/.prettierignore create mode 100644 packages/google-cloud-advisorynotifications/.prettierrc.js create mode 100644 packages/google-cloud-advisorynotifications/.repo-metadata.json create mode 100644 packages/google-cloud-advisorynotifications/CODE_OF_CONDUCT.md create mode 100644 packages/google-cloud-advisorynotifications/CONTRIBUTING.md create mode 100644 packages/google-cloud-advisorynotifications/LICENSE create mode 100644 packages/google-cloud-advisorynotifications/README.md create mode 100644 packages/google-cloud-advisorynotifications/linkinator.config.json create mode 100644 packages/google-cloud-advisorynotifications/package.json create mode 100644 packages/google-cloud-advisorynotifications/protos/google/cloud/advisorynotifications/v1/service.proto create mode 100644 packages/google-cloud-advisorynotifications/protos/protos.d.ts create mode 100644 packages/google-cloud-advisorynotifications/protos/protos.js create mode 100644 packages/google-cloud-advisorynotifications/protos/protos.json create mode 100644 packages/google-cloud-advisorynotifications/samples/README.md create mode 100644 packages/google-cloud-advisorynotifications/samples/generated/v1/advisory_notifications_service.get_notification.js create mode 100644 packages/google-cloud-advisorynotifications/samples/generated/v1/advisory_notifications_service.list_notifications.js create mode 100644 packages/google-cloud-advisorynotifications/samples/generated/v1/snippet_metadata.google.cloud.advisorynotifications.v1.json create mode 100644 packages/google-cloud-advisorynotifications/samples/package.json create mode 100644 packages/google-cloud-advisorynotifications/samples/quickstart.js create mode 100644 packages/google-cloud-advisorynotifications/samples/test/quickstart.js create mode 100644 packages/google-cloud-advisorynotifications/src/index.ts create mode 100644 packages/google-cloud-advisorynotifications/src/v1/advisory_notifications_service_client.ts create mode 100644 packages/google-cloud-advisorynotifications/src/v1/advisory_notifications_service_client_config.json create mode 100644 packages/google-cloud-advisorynotifications/src/v1/advisory_notifications_service_proto_list.json create mode 100644 packages/google-cloud-advisorynotifications/src/v1/gapic_metadata.json create mode 100644 packages/google-cloud-advisorynotifications/src/v1/index.ts create mode 100644 packages/google-cloud-advisorynotifications/system-test/fixtures/sample/src/index.js create mode 100644 packages/google-cloud-advisorynotifications/system-test/fixtures/sample/src/index.ts create mode 100644 packages/google-cloud-advisorynotifications/system-test/install.ts create mode 100644 packages/google-cloud-advisorynotifications/test/gapic_advisory_notifications_service_v1.ts create mode 100644 packages/google-cloud-advisorynotifications/tsconfig.json create mode 100644 packages/google-cloud-advisorynotifications/webpack.config.js diff --git a/packages/google-cloud-advisorynotifications/.OwlBot.yaml b/packages/google-cloud-advisorynotifications/.OwlBot.yaml new file mode 100644 index 00000000000..9d0415e2502 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/.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/advisorynotifications/(.*)/.*-nodejs + dest: /owl-bot-staging/google-cloud-advisorynotifications/$1 + +api-name: advisorynotifications \ No newline at end of file diff --git a/packages/google-cloud-advisorynotifications/.eslintignore b/packages/google-cloud-advisorynotifications/.eslintignore new file mode 100644 index 00000000000..ea5b04aebe6 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ +samples/generated/ diff --git a/packages/google-cloud-advisorynotifications/.eslintrc.json b/packages/google-cloud-advisorynotifications/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-cloud-advisorynotifications/.gitattributes b/packages/google-cloud-advisorynotifications/.gitattributes new file mode 100644 index 00000000000..33739cb74e4 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/.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-advisorynotifications/.gitignore b/packages/google-cloud-advisorynotifications/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/packages/google-cloud-advisorynotifications/.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-advisorynotifications/.jsdoc.js b/packages/google-cloud-advisorynotifications/.jsdoc.js new file mode 100644 index 00000000000..b2ec07899d5 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2023 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/advisorynotifications', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-cloud-advisorynotifications/.mocharc.js b/packages/google-cloud-advisorynotifications/.mocharc.js new file mode 100644 index 00000000000..49e7e228701 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/.mocharc.js @@ -0,0 +1,29 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000, + "recursive": true +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/packages/google-cloud-advisorynotifications/.nycrc b/packages/google-cloud-advisorynotifications/.nycrc new file mode 100644 index 00000000000..b18d5472b62 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/.nycrc @@ -0,0 +1,24 @@ +{ + "report-dir": "./.coverage", + "reporter": ["text", "lcov"], + "exclude": [ + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/conformance", + "**/docs", + "**/samples", + "**/scripts", + "**/protos", + "**/test", + "**/*.d.ts", + ".jsdoc.js", + "**/.jsdoc.js", + "karma.conf.js", + "webpack-tests.config.js", + "webpack.config.js" + ], + "exclude-after-remap": false, + "all": true +} diff --git a/packages/google-cloud-advisorynotifications/.prettierignore b/packages/google-cloud-advisorynotifications/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-cloud-advisorynotifications/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-advisorynotifications/.prettierrc.js b/packages/google-cloud-advisorynotifications/.prettierrc.js new file mode 100644 index 00000000000..1e6cec783e4 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/.prettierrc.js @@ -0,0 +1,17 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/google-cloud-advisorynotifications/.repo-metadata.json b/packages/google-cloud-advisorynotifications/.repo-metadata.json new file mode 100644 index 00000000000..350a80b2bab --- /dev/null +++ b/packages/google-cloud-advisorynotifications/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "name": "advisorynotifications", + "name_pretty": "Advisory Notifications API", + "product_documentation": "https://cloud.google.com/advisory-notifications/docs/overview", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/advisorynotifications/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/advisorynotifications", + "api_id": "advisorynotifications.googleapis.com", + "default_version": "v1", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "api_shortname": "advisorynotifications" +} + diff --git a/packages/google-cloud-advisorynotifications/CODE_OF_CONDUCT.md b/packages/google-cloud-advisorynotifications/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..2add2547a81 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/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-advisorynotifications/CONTRIBUTING.md b/packages/google-cloud-advisorynotifications/CONTRIBUTING.md new file mode 100644 index 00000000000..63a63868039 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/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 Advisory Notifications API API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + # Run unit tests. + npm test + + # Run sample integration tests. + npm run samples-test + + # Run all system tests. + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=advisorynotifications.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-advisorynotifications/LICENSE b/packages/google-cloud-advisorynotifications/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/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-advisorynotifications/README.md b/packages/google-cloud-advisorynotifications/README.md new file mode 100644 index 00000000000..9d9170f0500 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/README.md @@ -0,0 +1,204 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Advisory Notifications API: Node.js Client](https://github.com/googleapis/google-cloud-node) + +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![npm version](https://img.shields.io/npm/v/@google-cloud/advisorynotifications.svg)](https://www.npmjs.org/package/@google-cloud/advisorynotifications) + + + + +Advisory Notifications API client for Node.js + + +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-advisorynotifications/CHANGELOG.md). + +* [Advisory Notifications API Node.js Client API Reference][client-docs] +* [Advisory Notifications API Documentation][product-docs] +* [github.com/googleapis/google-cloud-node/packages/google-cloud-advisorynotifications](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-advisorynotifications) + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + * [Using the client library](#using-the-client-library) +* [Samples](#samples) +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Advisory Notifications API API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + +### Installing the client library + +```bash +npm install @google-cloud/advisorynotifications +``` + + +### Using the client library + +```javascript +/** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ +/** + * Required. The parent, which owns this collection of notifications. + * Must be of the form "organizations/{organization}/locations/{location}". + */ +// const parent = 'abc123' +/** + * The maximum number of notifications to return. The service may return + * fewer than this value. If unspecified or equal to 0, at most 50 + * notifications will be returned. The maximum value is 50; values above 50 + * will be coerced to 50. + */ +// const pageSize = 1234 +/** + * A page token returned from a previous request. + * When paginating, all other parameters provided in the request + * must match the call that returned the page token. + */ +// const pageToken = 'abc123' +/** + * Specifies which parts of the notification resource should be returned + * in the response. + */ +// const view = {} +/** + * ISO code for requested localization language. If unset, will be + * interpereted as "en". If the requested language is valid, but not supported + * for this notification, English will be returned with an "Not applicable" + * LocalizationState. If the ISO code is invalid (i.e. not a real language), + * this RPC will throw an error. + */ +// const languageCode = 'abc123' + +// Imports the Advisorynotifications library +const {AdvisoryNotificationsServiceClient} = + require('@google-cloud/advisorynotifications').v1; + +// Instantiates a client +const advisorynotificationsClient = new AdvisoryNotificationsServiceClient(); + +async function callListNotifications() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await advisorynotificationsClient.listNotificationsAsync( + request + ); + for await (const response of iterable) { + console.log(response); + } +} + +callListNotifications(); + +``` + + + +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Advisory_notifications_service.get_notification | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-advisorynotifications/samples/generated/v1/advisory_notifications_service.get_notification.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-advisorynotifications/samples/generated/v1/advisory_notifications_service.get_notification.js,samples/README.md) | +| Advisory_notifications_service.list_notifications | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-advisorynotifications/samples/generated/v1/advisory_notifications_service.list_notifications.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-advisorynotifications/samples/generated/v1/advisory_notifications_service.list_notifications.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-advisorynotifications/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-advisorynotifications/samples/quickstart.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-advisorynotifications/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-advisorynotifications/samples/test/quickstart.js,samples/README.md) | + + + +The [Advisory Notifications API Node.js Client API Reference][client-docs] documentation +also contains samples. + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. +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/advisorynotifications@legacy-8` installs client libraries +for versions compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + + + + + + + +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. + + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md). + +Please note that this `README.md`, the `samples/README.md`, +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. To edit one of these files, make an edit +to its templates in +[directory](https://github.com/googleapis/synthtool). + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) + +[client-docs]: https://cloud.google.com/nodejs/docs/reference/advisorynotifications/latest +[product-docs]: https://cloud.google.com/advisory-notifications/docs/overview +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=advisorynotifications.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started diff --git a/packages/google-cloud-advisorynotifications/linkinator.config.json b/packages/google-cloud-advisorynotifications/linkinator.config.json new file mode 100644 index 00000000000..befd23c8633 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/linkinator.config.json @@ -0,0 +1,16 @@ +{ + "recurse": true, + "skip": [ + "https://codecov.io/gh/googleapis/", + "www.googleapis.com", + "img.shields.io", + "https://console.cloud.google.com/cloudshell", + "https://support.google.com" + ], + "silent": true, + "concurrency": 5, + "retry": true, + "retryErrors": true, + "retryErrorsCount": 5, + "retryErrorsJitter": 3000 +} diff --git a/packages/google-cloud-advisorynotifications/package.json b/packages/google-cloud-advisorynotifications/package.json new file mode 100644 index 00000000000..973902d1794 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/package.json @@ -0,0 +1,71 @@ +{ + "name": "@google-cloud/advisorynotifications", + "version": "0.0.0", + "description": "Advisory Notifications API client for Node.js", + "repository": { + "type": "git", + "url": "https://github.com/googleapis/google-cloud-node.git", + "directory": "packages/google-cloud-advisorynotifications" + }, + "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-advisorynotifications", + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google advisorynotifications", + "advisorynotifications", + "Advisory Notifications API" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "npm run compile && c8 mocha build/system-test", + "test": "c8 mocha build/test", + "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", + "prelint": "cd samples; npm link ../; npm i" + }, + "dependencies": { + "google-gax": "^3.5.2" + }, + "devDependencies": { + "@types/mocha": "^9.0.0", + "@types/node": "^18.0.0", + "@types/sinon": "^10.0.0", + "c8": "^7.3.5", + "gts": "^3.1.0", + "jsdoc": "^4.0.0", + "jsdoc-fresh": "^2.0.0", + "jsdoc-region-tag": "^2.0.0", + "linkinator": "^4.0.0", + "mocha": "^9.2.2", + "null-loader": "^4.0.1", + "pack-n-play": "^1.0.0-2", + "sinon": "^15.0.0", + "ts-loader": "^9.0.0", + "typescript": "^4.6.4", + "webpack": "^5.9.0", + "webpack-cli": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } +} diff --git a/packages/google-cloud-advisorynotifications/protos/google/cloud/advisorynotifications/v1/service.proto b/packages/google-cloud-advisorynotifications/protos/google/cloud/advisorynotifications/v1/service.proto new file mode 100644 index 00000000000..05b53b39432 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/protos/google/cloud/advisorynotifications/v1/service.proto @@ -0,0 +1,253 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.advisorynotifications.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.AdvisoryNotifications.V1"; +option go_package = "cloud.google.com/go/advisorynotifications/apiv1/advisorynotificationspb;advisorynotificationspb"; +option php_namespace = "Google\\Cloud\\AdvisoryNotifications\\V1"; +option ruby_package = "Google::Cloud::AdvisoryNotifications::V1"; +option java_multiple_files = true; +option java_outer_classname = "ServiceProto"; +option java_package = "com.google.cloud.advisorynotifications.v1"; +option (google.api.resource_definition) = { + type: "advisorynotifications.googleapis.com/Location" + pattern: "organizations/{organization}/locations/{location}" +}; + +// Service to manage Security and Privacy Notifications. +service AdvisoryNotificationsService { + option (google.api.default_host) = "advisorynotifications.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists notifications under a given parent. + rpc ListNotifications(ListNotificationsRequest) + returns (ListNotificationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=organizations/*/locations/*}/notifications" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a notification. + rpc GetNotification(GetNotificationRequest) returns (Notification) { + option (google.api.http) = { + get: "/v1/{name=organizations/*/locations/*/notifications/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Notification view. +enum NotificationView { + // Not specified, equivalent to BASIC. + NOTIFICATION_VIEW_UNSPECIFIED = 0; + + // Server responses only include title, creation time and Notification ID. + // Note: for internal use responses also include the last update time, + // the latest message text and whether notification has attachments. + BASIC = 1; + + // Include everything. + FULL = 2; +} + +// Status of localized text. +enum LocalizationState { + // Not used. + LOCALIZATION_STATE_UNSPECIFIED = 0; + + // Localization is not applicable for requested language. This can happen + // when: + // - The requested language was not supported by Advisory Notifications at the + // time of localization (including notifications created before the + // localization feature was launched). + // - The requested language is English, so only the English text is returned. + LOCALIZATION_STATE_NOT_APPLICABLE = 1; + + // Localization for requested language is in progress, and not ready yet. + LOCALIZATION_STATE_PENDING = 2; + + // Localization for requested language is completed. + LOCALIZATION_STATE_COMPLETED = 3; +} + +// A notification object for notifying customers about security and privacy +// issues. +message Notification { + option (google.api.resource) = { + type: "advisorynotifications.googleapis.com/Notification" + pattern: "organizations/{organization}/locations/{location}/notifications/{notification}" + }; + + // The resource name of the notification. + // Format: + // organizations/{organization}/locations/{location}/notifications/{notification}. + string name = 1; + + // The subject line of the notification. + Subject subject = 2; + + // A list of messages in the notification. + repeated Message messages = 3; + + // Output only. Time the notification was created. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A text object containing the English text and its localized copies. +message Text { + // The English copy. + string en_text = 1; + + // The requested localized copy (if applicable). + string localized_text = 2; + + // Status of the localization. + LocalizationState localization_state = 3; +} + +// A subject line of a notification. +message Subject { + // The text content. + Text text = 1; +} + +// A message which contains notification details. +message Message { + // A message body containing text. + message Body { + // The text content of the message body. + Text text = 1; + } + + // The message content. + Body body = 1; + + // The attachments to download. + repeated Attachment attachments = 2; + + // The Message creation timestamp. + google.protobuf.Timestamp create_time = 3; + + // Time when Message was localized + google.protobuf.Timestamp localization_time = 4; +} + +// Attachment with specific information about the issue. +message Attachment { + // Data type of the attachment. + oneof data { + // A CSV file attachment. Max size is 10 MB. + Csv csv = 2; + } + + // The title of the attachment. + string display_name = 1; +} + +// A representation of a CSV file attachment, as a list of column headers and +// a list of data rows. +message Csv { + // A representation of a single data row in a CSV file. + message CsvRow { + // The data entries in a CSV file row, as a string array rather than a + // single comma-separated string. + repeated string entries = 1; + } + + // The list of headers for data columns in a CSV file. + repeated string headers = 1; + + // The list of data rows in a CSV file, as string arrays rather than as a + // single comma-separated string. + repeated CsvRow data_rows = 2; +} + +// Request for fetching all notifications for a given parent. +message ListNotificationsRequest { + // Required. The parent, which owns this collection of notifications. + // Must be of the form "organizations/{organization}/locations/{location}". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "advisorynotifications.googleapis.com/Notification" + } + ]; + + // The maximum number of notifications to return. The service may return + // fewer than this value. If unspecified or equal to 0, at most 50 + // notifications will be returned. The maximum value is 50; values above 50 + // will be coerced to 50. + int32 page_size = 2; + + // A page token returned from a previous request. + // When paginating, all other parameters provided in the request + // must match the call that returned the page token. + string page_token = 3; + + // Specifies which parts of the notification resource should be returned + // in the response. + NotificationView view = 4; + + // ISO code for requested localization language. If unset, will be + // interpereted as "en". If the requested language is valid, but not supported + // for this notification, English will be returned with an "Not applicable" + // LocalizationState. If the ISO code is invalid (i.e. not a real language), + // this RPC will throw an error. + string language_code = 5; +} + +// Response of ListNotifications endpoint. +message ListNotificationsResponse { + // List of notifications under a given parent. + repeated Notification notifications = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Estimation of a total number of notifications. + int32 total_size = 3; +} + +// Request for fetching a notification. +message GetNotificationRequest { + // Required. A name of the notification to retrieve. + // Format: + // organizations/{organization}/locations/{location}/notifications/{notification}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "advisorynotifications.googleapis.com/Notification" + } + ]; + + // ISO code for requested localization language. If unset, will be + // interpereted as "en". If the requested language is valid, but not supported + // for this notification, English will be returned with an "Not applicable" + // LocalizationState. If the ISO code is invalid (i.e. not a real language), + // this RPC will throw an error. + string language_code = 5; +} diff --git a/packages/google-cloud-advisorynotifications/protos/protos.d.ts b/packages/google-cloud-advisorynotifications/protos/protos.d.ts new file mode 100644 index 00000000000..06ac2ac8478 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/protos/protos.d.ts @@ -0,0 +1,5368 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); +/** Namespace google. */ +export namespace google { + + /** Namespace cloud. */ + namespace cloud { + + /** Namespace advisorynotifications. */ + namespace advisorynotifications { + + /** Namespace v1. */ + namespace v1 { + + /** Represents an AdvisoryNotificationsService */ + class AdvisoryNotificationsService extends $protobuf.rpc.Service { + + /** + * Constructs a new AdvisoryNotificationsService 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 AdvisoryNotificationsService 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): AdvisoryNotificationsService; + + /** + * Calls ListNotifications. + * @param request ListNotificationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListNotificationsResponse + */ + public listNotifications(request: google.cloud.advisorynotifications.v1.IListNotificationsRequest, callback: google.cloud.advisorynotifications.v1.AdvisoryNotificationsService.ListNotificationsCallback): void; + + /** + * Calls ListNotifications. + * @param request ListNotificationsRequest message or plain object + * @returns Promise + */ + public listNotifications(request: google.cloud.advisorynotifications.v1.IListNotificationsRequest): Promise; + + /** + * Calls GetNotification. + * @param request GetNotificationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Notification + */ + public getNotification(request: google.cloud.advisorynotifications.v1.IGetNotificationRequest, callback: google.cloud.advisorynotifications.v1.AdvisoryNotificationsService.GetNotificationCallback): void; + + /** + * Calls GetNotification. + * @param request GetNotificationRequest message or plain object + * @returns Promise + */ + public getNotification(request: google.cloud.advisorynotifications.v1.IGetNotificationRequest): Promise; + } + + namespace AdvisoryNotificationsService { + + /** + * Callback as used by {@link google.cloud.advisorynotifications.v1.AdvisoryNotificationsService|listNotifications}. + * @param error Error, if any + * @param [response] ListNotificationsResponse + */ + type ListNotificationsCallback = (error: (Error|null), response?: google.cloud.advisorynotifications.v1.ListNotificationsResponse) => void; + + /** + * Callback as used by {@link google.cloud.advisorynotifications.v1.AdvisoryNotificationsService|getNotification}. + * @param error Error, if any + * @param [response] Notification + */ + type GetNotificationCallback = (error: (Error|null), response?: google.cloud.advisorynotifications.v1.Notification) => void; + } + + /** NotificationView enum. */ + enum NotificationView { + NOTIFICATION_VIEW_UNSPECIFIED = 0, + BASIC = 1, + FULL = 2 + } + + /** LocalizationState enum. */ + enum LocalizationState { + LOCALIZATION_STATE_UNSPECIFIED = 0, + LOCALIZATION_STATE_NOT_APPLICABLE = 1, + LOCALIZATION_STATE_PENDING = 2, + LOCALIZATION_STATE_COMPLETED = 3 + } + + /** Properties of a Notification. */ + interface INotification { + + /** Notification name */ + name?: (string|null); + + /** Notification subject */ + subject?: (google.cloud.advisorynotifications.v1.ISubject|null); + + /** Notification messages */ + messages?: (google.cloud.advisorynotifications.v1.IMessage[]|null); + + /** Notification createTime */ + createTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a Notification. */ + class Notification implements INotification { + + /** + * Constructs a new Notification. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.advisorynotifications.v1.INotification); + + /** Notification name. */ + public name: string; + + /** Notification subject. */ + public subject?: (google.cloud.advisorynotifications.v1.ISubject|null); + + /** Notification messages. */ + public messages: google.cloud.advisorynotifications.v1.IMessage[]; + + /** Notification createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new Notification instance using the specified properties. + * @param [properties] Properties to set + * @returns Notification instance + */ + public static create(properties?: google.cloud.advisorynotifications.v1.INotification): google.cloud.advisorynotifications.v1.Notification; + + /** + * Encodes the specified Notification message. Does not implicitly {@link google.cloud.advisorynotifications.v1.Notification.verify|verify} messages. + * @param message Notification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.advisorynotifications.v1.INotification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Notification message, length delimited. Does not implicitly {@link google.cloud.advisorynotifications.v1.Notification.verify|verify} messages. + * @param message Notification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.advisorynotifications.v1.INotification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Notification message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Notification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.advisorynotifications.v1.Notification; + + /** + * Decodes a Notification message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Notification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.advisorynotifications.v1.Notification; + + /** + * Verifies a Notification message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Notification message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Notification + */ + public static fromObject(object: { [k: string]: any }): google.cloud.advisorynotifications.v1.Notification; + + /** + * Creates a plain object from a Notification message. Also converts values to other types if specified. + * @param message Notification + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.advisorynotifications.v1.Notification, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Notification to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Notification + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Text. */ + interface IText { + + /** Text enText */ + enText?: (string|null); + + /** Text localizedText */ + localizedText?: (string|null); + + /** Text localizationState */ + localizationState?: (google.cloud.advisorynotifications.v1.LocalizationState|keyof typeof google.cloud.advisorynotifications.v1.LocalizationState|null); + } + + /** Represents a Text. */ + class Text implements IText { + + /** + * Constructs a new Text. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.advisorynotifications.v1.IText); + + /** Text enText. */ + public enText: string; + + /** Text localizedText. */ + public localizedText: string; + + /** Text localizationState. */ + public localizationState: (google.cloud.advisorynotifications.v1.LocalizationState|keyof typeof google.cloud.advisorynotifications.v1.LocalizationState); + + /** + * Creates a new Text instance using the specified properties. + * @param [properties] Properties to set + * @returns Text instance + */ + public static create(properties?: google.cloud.advisorynotifications.v1.IText): google.cloud.advisorynotifications.v1.Text; + + /** + * Encodes the specified Text message. Does not implicitly {@link google.cloud.advisorynotifications.v1.Text.verify|verify} messages. + * @param message Text message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.advisorynotifications.v1.IText, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Text message, length delimited. Does not implicitly {@link google.cloud.advisorynotifications.v1.Text.verify|verify} messages. + * @param message Text message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.advisorynotifications.v1.IText, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Text message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Text + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.advisorynotifications.v1.Text; + + /** + * Decodes a Text message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Text + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.advisorynotifications.v1.Text; + + /** + * Verifies a Text message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Text message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Text + */ + public static fromObject(object: { [k: string]: any }): google.cloud.advisorynotifications.v1.Text; + + /** + * Creates a plain object from a Text message. Also converts values to other types if specified. + * @param message Text + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.advisorynotifications.v1.Text, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Text to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Text + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Subject. */ + interface ISubject { + + /** Subject text */ + text?: (google.cloud.advisorynotifications.v1.IText|null); + } + + /** Represents a Subject. */ + class Subject implements ISubject { + + /** + * Constructs a new Subject. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.advisorynotifications.v1.ISubject); + + /** Subject text. */ + public text?: (google.cloud.advisorynotifications.v1.IText|null); + + /** + * Creates a new Subject instance using the specified properties. + * @param [properties] Properties to set + * @returns Subject instance + */ + public static create(properties?: google.cloud.advisorynotifications.v1.ISubject): google.cloud.advisorynotifications.v1.Subject; + + /** + * Encodes the specified Subject message. Does not implicitly {@link google.cloud.advisorynotifications.v1.Subject.verify|verify} messages. + * @param message Subject message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.advisorynotifications.v1.ISubject, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Subject message, length delimited. Does not implicitly {@link google.cloud.advisorynotifications.v1.Subject.verify|verify} messages. + * @param message Subject message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.advisorynotifications.v1.ISubject, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Subject message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Subject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.advisorynotifications.v1.Subject; + + /** + * Decodes a Subject message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Subject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.advisorynotifications.v1.Subject; + + /** + * Verifies a Subject message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Subject message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Subject + */ + public static fromObject(object: { [k: string]: any }): google.cloud.advisorynotifications.v1.Subject; + + /** + * Creates a plain object from a Subject message. Also converts values to other types if specified. + * @param message Subject + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.advisorynotifications.v1.Subject, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Subject to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Subject + * @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 body */ + body?: (google.cloud.advisorynotifications.v1.Message.IBody|null); + + /** Message attachments */ + attachments?: (google.cloud.advisorynotifications.v1.IAttachment[]|null); + + /** Message createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Message localizationTime */ + localizationTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a Message. */ + class Message implements IMessage { + + /** + * Constructs a new Message. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.advisorynotifications.v1.IMessage); + + /** Message body. */ + public body?: (google.cloud.advisorynotifications.v1.Message.IBody|null); + + /** Message attachments. */ + public attachments: google.cloud.advisorynotifications.v1.IAttachment[]; + + /** Message createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Message localizationTime. */ + public localizationTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new Message instance using the specified properties. + * @param [properties] Properties to set + * @returns Message instance + */ + public static create(properties?: google.cloud.advisorynotifications.v1.IMessage): google.cloud.advisorynotifications.v1.Message; + + /** + * Encodes the specified Message message. Does not implicitly {@link google.cloud.advisorynotifications.v1.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.advisorynotifications.v1.IMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Message message, length delimited. Does not implicitly {@link google.cloud.advisorynotifications.v1.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.advisorynotifications.v1.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.advisorynotifications.v1.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.advisorynotifications.v1.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.advisorynotifications.v1.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.advisorynotifications.v1.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; + } + + namespace Message { + + /** Properties of a Body. */ + interface IBody { + + /** Body text */ + text?: (google.cloud.advisorynotifications.v1.IText|null); + } + + /** Represents a Body. */ + class Body implements IBody { + + /** + * Constructs a new Body. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.advisorynotifications.v1.Message.IBody); + + /** Body text. */ + public text?: (google.cloud.advisorynotifications.v1.IText|null); + + /** + * Creates a new Body instance using the specified properties. + * @param [properties] Properties to set + * @returns Body instance + */ + public static create(properties?: google.cloud.advisorynotifications.v1.Message.IBody): google.cloud.advisorynotifications.v1.Message.Body; + + /** + * Encodes the specified Body message. Does not implicitly {@link google.cloud.advisorynotifications.v1.Message.Body.verify|verify} messages. + * @param message Body message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.advisorynotifications.v1.Message.IBody, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Body message, length delimited. Does not implicitly {@link google.cloud.advisorynotifications.v1.Message.Body.verify|verify} messages. + * @param message Body message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.advisorynotifications.v1.Message.IBody, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Body message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Body + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.advisorynotifications.v1.Message.Body; + + /** + * Decodes a Body message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Body + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.advisorynotifications.v1.Message.Body; + + /** + * Verifies a Body message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Body message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Body + */ + public static fromObject(object: { [k: string]: any }): google.cloud.advisorynotifications.v1.Message.Body; + + /** + * Creates a plain object from a Body message. Also converts values to other types if specified. + * @param message Body + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.advisorynotifications.v1.Message.Body, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Body to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Body + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an Attachment. */ + interface IAttachment { + + /** Attachment csv */ + csv?: (google.cloud.advisorynotifications.v1.ICsv|null); + + /** Attachment displayName */ + displayName?: (string|null); + } + + /** Represents an Attachment. */ + class Attachment implements IAttachment { + + /** + * Constructs a new Attachment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.advisorynotifications.v1.IAttachment); + + /** Attachment csv. */ + public csv?: (google.cloud.advisorynotifications.v1.ICsv|null); + + /** Attachment displayName. */ + public displayName: string; + + /** Attachment data. */ + public data?: "csv"; + + /** + * Creates a new Attachment instance using the specified properties. + * @param [properties] Properties to set + * @returns Attachment instance + */ + public static create(properties?: google.cloud.advisorynotifications.v1.IAttachment): google.cloud.advisorynotifications.v1.Attachment; + + /** + * Encodes the specified Attachment message. Does not implicitly {@link google.cloud.advisorynotifications.v1.Attachment.verify|verify} messages. + * @param message Attachment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.advisorynotifications.v1.IAttachment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Attachment message, length delimited. Does not implicitly {@link google.cloud.advisorynotifications.v1.Attachment.verify|verify} messages. + * @param message Attachment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.advisorynotifications.v1.IAttachment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Attachment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Attachment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.advisorynotifications.v1.Attachment; + + /** + * Decodes an Attachment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Attachment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.advisorynotifications.v1.Attachment; + + /** + * Verifies an Attachment message. + * @param message Plain 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 Attachment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Attachment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.advisorynotifications.v1.Attachment; + + /** + * Creates a plain object from an Attachment message. Also converts values to other types if specified. + * @param message Attachment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.advisorynotifications.v1.Attachment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Attachment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Attachment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Csv. */ + interface ICsv { + + /** Csv headers */ + headers?: (string[]|null); + + /** Csv dataRows */ + dataRows?: (google.cloud.advisorynotifications.v1.Csv.ICsvRow[]|null); + } + + /** Represents a Csv. */ + class Csv implements ICsv { + + /** + * Constructs a new Csv. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.advisorynotifications.v1.ICsv); + + /** Csv headers. */ + public headers: string[]; + + /** Csv dataRows. */ + public dataRows: google.cloud.advisorynotifications.v1.Csv.ICsvRow[]; + + /** + * Creates a new Csv instance using the specified properties. + * @param [properties] Properties to set + * @returns Csv instance + */ + public static create(properties?: google.cloud.advisorynotifications.v1.ICsv): google.cloud.advisorynotifications.v1.Csv; + + /** + * Encodes the specified Csv message. Does not implicitly {@link google.cloud.advisorynotifications.v1.Csv.verify|verify} messages. + * @param message Csv message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.advisorynotifications.v1.ICsv, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Csv message, length delimited. Does not implicitly {@link google.cloud.advisorynotifications.v1.Csv.verify|verify} messages. + * @param message Csv message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.advisorynotifications.v1.ICsv, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Csv message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Csv + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.advisorynotifications.v1.Csv; + + /** + * Decodes a Csv message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Csv + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.advisorynotifications.v1.Csv; + + /** + * Verifies a Csv message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Csv message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Csv + */ + public static fromObject(object: { [k: string]: any }): google.cloud.advisorynotifications.v1.Csv; + + /** + * Creates a plain object from a Csv message. Also converts values to other types if specified. + * @param message Csv + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.advisorynotifications.v1.Csv, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Csv to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Csv + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Csv { + + /** Properties of a CsvRow. */ + interface ICsvRow { + + /** CsvRow entries */ + entries?: (string[]|null); + } + + /** Represents a CsvRow. */ + class CsvRow implements ICsvRow { + + /** + * Constructs a new CsvRow. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.advisorynotifications.v1.Csv.ICsvRow); + + /** CsvRow entries. */ + public entries: string[]; + + /** + * Creates a new CsvRow instance using the specified properties. + * @param [properties] Properties to set + * @returns CsvRow instance + */ + public static create(properties?: google.cloud.advisorynotifications.v1.Csv.ICsvRow): google.cloud.advisorynotifications.v1.Csv.CsvRow; + + /** + * Encodes the specified CsvRow message. Does not implicitly {@link google.cloud.advisorynotifications.v1.Csv.CsvRow.verify|verify} messages. + * @param message CsvRow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.advisorynotifications.v1.Csv.ICsvRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CsvRow message, length delimited. Does not implicitly {@link google.cloud.advisorynotifications.v1.Csv.CsvRow.verify|verify} messages. + * @param message CsvRow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.advisorynotifications.v1.Csv.ICsvRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CsvRow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CsvRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.advisorynotifications.v1.Csv.CsvRow; + + /** + * Decodes a CsvRow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CsvRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.advisorynotifications.v1.Csv.CsvRow; + + /** + * Verifies a CsvRow message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CsvRow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CsvRow + */ + public static fromObject(object: { [k: string]: any }): google.cloud.advisorynotifications.v1.Csv.CsvRow; + + /** + * Creates a plain object from a CsvRow message. Also converts values to other types if specified. + * @param message CsvRow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.advisorynotifications.v1.Csv.CsvRow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CsvRow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CsvRow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ListNotificationsRequest. */ + interface IListNotificationsRequest { + + /** ListNotificationsRequest parent */ + parent?: (string|null); + + /** ListNotificationsRequest pageSize */ + pageSize?: (number|null); + + /** ListNotificationsRequest pageToken */ + pageToken?: (string|null); + + /** ListNotificationsRequest view */ + view?: (google.cloud.advisorynotifications.v1.NotificationView|keyof typeof google.cloud.advisorynotifications.v1.NotificationView|null); + + /** ListNotificationsRequest languageCode */ + languageCode?: (string|null); + } + + /** Represents a ListNotificationsRequest. */ + class ListNotificationsRequest implements IListNotificationsRequest { + + /** + * Constructs a new ListNotificationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.advisorynotifications.v1.IListNotificationsRequest); + + /** ListNotificationsRequest parent. */ + public parent: string; + + /** ListNotificationsRequest pageSize. */ + public pageSize: number; + + /** ListNotificationsRequest pageToken. */ + public pageToken: string; + + /** ListNotificationsRequest view. */ + public view: (google.cloud.advisorynotifications.v1.NotificationView|keyof typeof google.cloud.advisorynotifications.v1.NotificationView); + + /** ListNotificationsRequest languageCode. */ + public languageCode: string; + + /** + * Creates a new ListNotificationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListNotificationsRequest instance + */ + public static create(properties?: google.cloud.advisorynotifications.v1.IListNotificationsRequest): google.cloud.advisorynotifications.v1.ListNotificationsRequest; + + /** + * Encodes the specified ListNotificationsRequest message. Does not implicitly {@link google.cloud.advisorynotifications.v1.ListNotificationsRequest.verify|verify} messages. + * @param message ListNotificationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.advisorynotifications.v1.IListNotificationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListNotificationsRequest message, length delimited. Does not implicitly {@link google.cloud.advisorynotifications.v1.ListNotificationsRequest.verify|verify} messages. + * @param message ListNotificationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.advisorynotifications.v1.IListNotificationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListNotificationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListNotificationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.advisorynotifications.v1.ListNotificationsRequest; + + /** + * Decodes a ListNotificationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListNotificationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.advisorynotifications.v1.ListNotificationsRequest; + + /** + * Verifies a ListNotificationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListNotificationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListNotificationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.advisorynotifications.v1.ListNotificationsRequest; + + /** + * Creates a plain object from a ListNotificationsRequest message. Also converts values to other types if specified. + * @param message ListNotificationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.advisorynotifications.v1.ListNotificationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListNotificationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListNotificationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListNotificationsResponse. */ + interface IListNotificationsResponse { + + /** ListNotificationsResponse notifications */ + notifications?: (google.cloud.advisorynotifications.v1.INotification[]|null); + + /** ListNotificationsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListNotificationsResponse totalSize */ + totalSize?: (number|null); + } + + /** Represents a ListNotificationsResponse. */ + class ListNotificationsResponse implements IListNotificationsResponse { + + /** + * Constructs a new ListNotificationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.advisorynotifications.v1.IListNotificationsResponse); + + /** ListNotificationsResponse notifications. */ + public notifications: google.cloud.advisorynotifications.v1.INotification[]; + + /** ListNotificationsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListNotificationsResponse totalSize. */ + public totalSize: number; + + /** + * Creates a new ListNotificationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListNotificationsResponse instance + */ + public static create(properties?: google.cloud.advisorynotifications.v1.IListNotificationsResponse): google.cloud.advisorynotifications.v1.ListNotificationsResponse; + + /** + * Encodes the specified ListNotificationsResponse message. Does not implicitly {@link google.cloud.advisorynotifications.v1.ListNotificationsResponse.verify|verify} messages. + * @param message ListNotificationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.advisorynotifications.v1.IListNotificationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListNotificationsResponse message, length delimited. Does not implicitly {@link google.cloud.advisorynotifications.v1.ListNotificationsResponse.verify|verify} messages. + * @param message ListNotificationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.advisorynotifications.v1.IListNotificationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListNotificationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListNotificationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.advisorynotifications.v1.ListNotificationsResponse; + + /** + * Decodes a ListNotificationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListNotificationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.advisorynotifications.v1.ListNotificationsResponse; + + /** + * Verifies a ListNotificationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListNotificationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListNotificationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.advisorynotifications.v1.ListNotificationsResponse; + + /** + * Creates a plain object from a ListNotificationsResponse message. Also converts values to other types if specified. + * @param message ListNotificationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.advisorynotifications.v1.ListNotificationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListNotificationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListNotificationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetNotificationRequest. */ + interface IGetNotificationRequest { + + /** GetNotificationRequest name */ + name?: (string|null); + + /** GetNotificationRequest languageCode */ + languageCode?: (string|null); + } + + /** Represents a GetNotificationRequest. */ + class GetNotificationRequest implements IGetNotificationRequest { + + /** + * Constructs a new GetNotificationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.advisorynotifications.v1.IGetNotificationRequest); + + /** GetNotificationRequest name. */ + public name: string; + + /** GetNotificationRequest languageCode. */ + public languageCode: string; + + /** + * Creates a new GetNotificationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetNotificationRequest instance + */ + public static create(properties?: google.cloud.advisorynotifications.v1.IGetNotificationRequest): google.cloud.advisorynotifications.v1.GetNotificationRequest; + + /** + * Encodes the specified GetNotificationRequest message. Does not implicitly {@link google.cloud.advisorynotifications.v1.GetNotificationRequest.verify|verify} messages. + * @param message GetNotificationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.advisorynotifications.v1.IGetNotificationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetNotificationRequest message, length delimited. Does not implicitly {@link google.cloud.advisorynotifications.v1.GetNotificationRequest.verify|verify} messages. + * @param message GetNotificationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.advisorynotifications.v1.IGetNotificationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetNotificationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetNotificationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.advisorynotifications.v1.GetNotificationRequest; + + /** + * Decodes a GetNotificationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetNotificationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.advisorynotifications.v1.GetNotificationRequest; + + /** + * Verifies a GetNotificationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetNotificationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetNotificationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.advisorynotifications.v1.GetNotificationRequest; + + /** + * Creates a plain object from a GetNotificationRequest message. Also converts values to other types if specified. + * @param message GetNotificationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.advisorynotifications.v1.GetNotificationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetNotificationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetNotificationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions 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 + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } + + /** Properties of a 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; + } + } +} diff --git a/packages/google-cloud-advisorynotifications/protos/protos.js b/packages/google-cloud-advisorynotifications/protos/protos.js new file mode 100644 index 00000000000..f6110c40498 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/protos/protos.js @@ -0,0 +1,14390 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_cloud_advisorynotifications_protos || ($protobuf.roots._google_cloud_advisorynotifications_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.advisorynotifications = (function() { + + /** + * Namespace advisorynotifications. + * @memberof google.cloud + * @namespace + */ + var advisorynotifications = {}; + + advisorynotifications.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.advisorynotifications + * @namespace + */ + var v1 = {}; + + v1.AdvisoryNotificationsService = (function() { + + /** + * Constructs a new AdvisoryNotificationsService service. + * @memberof google.cloud.advisorynotifications.v1 + * @classdesc Represents an AdvisoryNotificationsService + * @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 AdvisoryNotificationsService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (AdvisoryNotificationsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AdvisoryNotificationsService; + + /** + * Creates new AdvisoryNotificationsService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.advisorynotifications.v1.AdvisoryNotificationsService + * @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 {AdvisoryNotificationsService} RPC service. Useful where requests and/or responses are streamed. + */ + AdvisoryNotificationsService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.advisorynotifications.v1.AdvisoryNotificationsService|listNotifications}. + * @memberof google.cloud.advisorynotifications.v1.AdvisoryNotificationsService + * @typedef ListNotificationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.advisorynotifications.v1.ListNotificationsResponse} [response] ListNotificationsResponse + */ + + /** + * Calls ListNotifications. + * @function listNotifications + * @memberof google.cloud.advisorynotifications.v1.AdvisoryNotificationsService + * @instance + * @param {google.cloud.advisorynotifications.v1.IListNotificationsRequest} request ListNotificationsRequest message or plain object + * @param {google.cloud.advisorynotifications.v1.AdvisoryNotificationsService.ListNotificationsCallback} callback Node-style callback called with the error, if any, and ListNotificationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AdvisoryNotificationsService.prototype.listNotifications = function listNotifications(request, callback) { + return this.rpcCall(listNotifications, $root.google.cloud.advisorynotifications.v1.ListNotificationsRequest, $root.google.cloud.advisorynotifications.v1.ListNotificationsResponse, request, callback); + }, "name", { value: "ListNotifications" }); + + /** + * Calls ListNotifications. + * @function listNotifications + * @memberof google.cloud.advisorynotifications.v1.AdvisoryNotificationsService + * @instance + * @param {google.cloud.advisorynotifications.v1.IListNotificationsRequest} request ListNotificationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.advisorynotifications.v1.AdvisoryNotificationsService|getNotification}. + * @memberof google.cloud.advisorynotifications.v1.AdvisoryNotificationsService + * @typedef GetNotificationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.advisorynotifications.v1.Notification} [response] Notification + */ + + /** + * Calls GetNotification. + * @function getNotification + * @memberof google.cloud.advisorynotifications.v1.AdvisoryNotificationsService + * @instance + * @param {google.cloud.advisorynotifications.v1.IGetNotificationRequest} request GetNotificationRequest message or plain object + * @param {google.cloud.advisorynotifications.v1.AdvisoryNotificationsService.GetNotificationCallback} callback Node-style callback called with the error, if any, and Notification + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AdvisoryNotificationsService.prototype.getNotification = function getNotification(request, callback) { + return this.rpcCall(getNotification, $root.google.cloud.advisorynotifications.v1.GetNotificationRequest, $root.google.cloud.advisorynotifications.v1.Notification, request, callback); + }, "name", { value: "GetNotification" }); + + /** + * Calls GetNotification. + * @function getNotification + * @memberof google.cloud.advisorynotifications.v1.AdvisoryNotificationsService + * @instance + * @param {google.cloud.advisorynotifications.v1.IGetNotificationRequest} request GetNotificationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return AdvisoryNotificationsService; + })(); + + /** + * NotificationView enum. + * @name google.cloud.advisorynotifications.v1.NotificationView + * @enum {number} + * @property {number} NOTIFICATION_VIEW_UNSPECIFIED=0 NOTIFICATION_VIEW_UNSPECIFIED value + * @property {number} BASIC=1 BASIC value + * @property {number} FULL=2 FULL value + */ + v1.NotificationView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NOTIFICATION_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BASIC"] = 1; + values[valuesById[2] = "FULL"] = 2; + return values; + })(); + + /** + * LocalizationState enum. + * @name google.cloud.advisorynotifications.v1.LocalizationState + * @enum {number} + * @property {number} LOCALIZATION_STATE_UNSPECIFIED=0 LOCALIZATION_STATE_UNSPECIFIED value + * @property {number} LOCALIZATION_STATE_NOT_APPLICABLE=1 LOCALIZATION_STATE_NOT_APPLICABLE value + * @property {number} LOCALIZATION_STATE_PENDING=2 LOCALIZATION_STATE_PENDING value + * @property {number} LOCALIZATION_STATE_COMPLETED=3 LOCALIZATION_STATE_COMPLETED value + */ + v1.LocalizationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOCALIZATION_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "LOCALIZATION_STATE_NOT_APPLICABLE"] = 1; + values[valuesById[2] = "LOCALIZATION_STATE_PENDING"] = 2; + values[valuesById[3] = "LOCALIZATION_STATE_COMPLETED"] = 3; + return values; + })(); + + v1.Notification = (function() { + + /** + * Properties of a Notification. + * @memberof google.cloud.advisorynotifications.v1 + * @interface INotification + * @property {string|null} [name] Notification name + * @property {google.cloud.advisorynotifications.v1.ISubject|null} [subject] Notification subject + * @property {Array.|null} [messages] Notification messages + * @property {google.protobuf.ITimestamp|null} [createTime] Notification createTime + */ + + /** + * Constructs a new Notification. + * @memberof google.cloud.advisorynotifications.v1 + * @classdesc Represents a Notification. + * @implements INotification + * @constructor + * @param {google.cloud.advisorynotifications.v1.INotification=} [properties] Properties to set + */ + function Notification(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]]; + } + + /** + * Notification name. + * @member {string} name + * @memberof google.cloud.advisorynotifications.v1.Notification + * @instance + */ + Notification.prototype.name = ""; + + /** + * Notification subject. + * @member {google.cloud.advisorynotifications.v1.ISubject|null|undefined} subject + * @memberof google.cloud.advisorynotifications.v1.Notification + * @instance + */ + Notification.prototype.subject = null; + + /** + * Notification messages. + * @member {Array.} messages + * @memberof google.cloud.advisorynotifications.v1.Notification + * @instance + */ + Notification.prototype.messages = $util.emptyArray; + + /** + * Notification createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.advisorynotifications.v1.Notification + * @instance + */ + Notification.prototype.createTime = null; + + /** + * Creates a new Notification instance using the specified properties. + * @function create + * @memberof google.cloud.advisorynotifications.v1.Notification + * @static + * @param {google.cloud.advisorynotifications.v1.INotification=} [properties] Properties to set + * @returns {google.cloud.advisorynotifications.v1.Notification} Notification instance + */ + Notification.create = function create(properties) { + return new Notification(properties); + }; + + /** + * Encodes the specified Notification message. Does not implicitly {@link google.cloud.advisorynotifications.v1.Notification.verify|verify} messages. + * @function encode + * @memberof google.cloud.advisorynotifications.v1.Notification + * @static + * @param {google.cloud.advisorynotifications.v1.INotification} message Notification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Notification.encode = function encode(message, writer) { + 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.subject != null && Object.hasOwnProperty.call(message, "subject")) + $root.google.cloud.advisorynotifications.v1.Subject.encode(message.subject, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.messages != null && message.messages.length) + for (var i = 0; i < message.messages.length; ++i) + $root.google.cloud.advisorynotifications.v1.Message.encode(message.messages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Notification message, length delimited. Does not implicitly {@link google.cloud.advisorynotifications.v1.Notification.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.advisorynotifications.v1.Notification + * @static + * @param {google.cloud.advisorynotifications.v1.INotification} message Notification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Notification.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Notification message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.advisorynotifications.v1.Notification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.advisorynotifications.v1.Notification} Notification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Notification.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.advisorynotifications.v1.Notification(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.subject = $root.google.cloud.advisorynotifications.v1.Subject.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.google.cloud.advisorynotifications.v1.Message.decode(reader, reader.uint32())); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Notification message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.advisorynotifications.v1.Notification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.advisorynotifications.v1.Notification} Notification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Notification.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Notification message. + * @function verify + * @memberof google.cloud.advisorynotifications.v1.Notification + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Notification.verify = function verify(message) { + if (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.subject != null && message.hasOwnProperty("subject")) { + var error = $root.google.cloud.advisorynotifications.v1.Subject.verify(message.subject); + if (error) + return "subject." + error; + } + 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.advisorynotifications.v1.Message.verify(message.messages[i]); + if (error) + return "messages." + error; + } + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + return null; + }; + + /** + * Creates a Notification message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.advisorynotifications.v1.Notification + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.advisorynotifications.v1.Notification} Notification + */ + Notification.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.advisorynotifications.v1.Notification) + return object; + var message = new $root.google.cloud.advisorynotifications.v1.Notification(); + if (object.name != null) + message.name = String(object.name); + if (object.subject != null) { + if (typeof object.subject !== "object") + throw TypeError(".google.cloud.advisorynotifications.v1.Notification.subject: object expected"); + message.subject = $root.google.cloud.advisorynotifications.v1.Subject.fromObject(object.subject); + } + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".google.cloud.advisorynotifications.v1.Notification.messages: array expected"); + message.messages = []; + for (var i = 0; i < object.messages.length; ++i) { + if (typeof object.messages[i] !== "object") + throw TypeError(".google.cloud.advisorynotifications.v1.Notification.messages: object expected"); + message.messages[i] = $root.google.cloud.advisorynotifications.v1.Message.fromObject(object.messages[i]); + } + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.advisorynotifications.v1.Notification.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + return message; + }; + + /** + * Creates a plain object from a Notification message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.advisorynotifications.v1.Notification + * @static + * @param {google.cloud.advisorynotifications.v1.Notification} message Notification + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Notification.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.messages = []; + if (options.defaults) { + object.name = ""; + object.subject = null; + object.createTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.subject != null && message.hasOwnProperty("subject")) + object.subject = $root.google.cloud.advisorynotifications.v1.Subject.toObject(message.subject, options); + if (message.messages && message.messages.length) { + object.messages = []; + for (var j = 0; j < message.messages.length; ++j) + object.messages[j] = $root.google.cloud.advisorynotifications.v1.Message.toObject(message.messages[j], options); + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + return object; + }; + + /** + * Converts this Notification to JSON. + * @function toJSON + * @memberof google.cloud.advisorynotifications.v1.Notification + * @instance + * @returns {Object.} JSON object + */ + Notification.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Notification + * @function getTypeUrl + * @memberof google.cloud.advisorynotifications.v1.Notification + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Notification.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.advisorynotifications.v1.Notification"; + }; + + return Notification; + })(); + + v1.Text = (function() { + + /** + * Properties of a Text. + * @memberof google.cloud.advisorynotifications.v1 + * @interface IText + * @property {string|null} [enText] Text enText + * @property {string|null} [localizedText] Text localizedText + * @property {google.cloud.advisorynotifications.v1.LocalizationState|null} [localizationState] Text localizationState + */ + + /** + * Constructs a new Text. + * @memberof google.cloud.advisorynotifications.v1 + * @classdesc Represents a Text. + * @implements IText + * @constructor + * @param {google.cloud.advisorynotifications.v1.IText=} [properties] Properties to set + */ + function Text(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Text enText. + * @member {string} enText + * @memberof google.cloud.advisorynotifications.v1.Text + * @instance + */ + Text.prototype.enText = ""; + + /** + * Text localizedText. + * @member {string} localizedText + * @memberof google.cloud.advisorynotifications.v1.Text + * @instance + */ + Text.prototype.localizedText = ""; + + /** + * Text localizationState. + * @member {google.cloud.advisorynotifications.v1.LocalizationState} localizationState + * @memberof google.cloud.advisorynotifications.v1.Text + * @instance + */ + Text.prototype.localizationState = 0; + + /** + * Creates a new Text instance using the specified properties. + * @function create + * @memberof google.cloud.advisorynotifications.v1.Text + * @static + * @param {google.cloud.advisorynotifications.v1.IText=} [properties] Properties to set + * @returns {google.cloud.advisorynotifications.v1.Text} Text instance + */ + Text.create = function create(properties) { + return new Text(properties); + }; + + /** + * Encodes the specified Text message. Does not implicitly {@link google.cloud.advisorynotifications.v1.Text.verify|verify} messages. + * @function encode + * @memberof google.cloud.advisorynotifications.v1.Text + * @static + * @param {google.cloud.advisorynotifications.v1.IText} message Text message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Text.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enText != null && Object.hasOwnProperty.call(message, "enText")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.enText); + if (message.localizedText != null && Object.hasOwnProperty.call(message, "localizedText")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.localizedText); + if (message.localizationState != null && Object.hasOwnProperty.call(message, "localizationState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.localizationState); + return writer; + }; + + /** + * Encodes the specified Text message, length delimited. Does not implicitly {@link google.cloud.advisorynotifications.v1.Text.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.advisorynotifications.v1.Text + * @static + * @param {google.cloud.advisorynotifications.v1.IText} message Text message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Text.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Text message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.advisorynotifications.v1.Text + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.advisorynotifications.v1.Text} Text + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Text.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.advisorynotifications.v1.Text(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enText = reader.string(); + break; + } + case 2: { + message.localizedText = reader.string(); + break; + } + case 3: { + message.localizationState = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Text message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.advisorynotifications.v1.Text + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.advisorynotifications.v1.Text} Text + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Text.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Text message. + * @function verify + * @memberof google.cloud.advisorynotifications.v1.Text + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Text.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enText != null && message.hasOwnProperty("enText")) + if (!$util.isString(message.enText)) + return "enText: string expected"; + if (message.localizedText != null && message.hasOwnProperty("localizedText")) + if (!$util.isString(message.localizedText)) + return "localizedText: string expected"; + if (message.localizationState != null && message.hasOwnProperty("localizationState")) + switch (message.localizationState) { + default: + return "localizationState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a Text message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.advisorynotifications.v1.Text + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.advisorynotifications.v1.Text} Text + */ + Text.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.advisorynotifications.v1.Text) + return object; + var message = new $root.google.cloud.advisorynotifications.v1.Text(); + if (object.enText != null) + message.enText = String(object.enText); + if (object.localizedText != null) + message.localizedText = String(object.localizedText); + switch (object.localizationState) { + default: + if (typeof object.localizationState === "number") { + message.localizationState = object.localizationState; + break; + } + break; + case "LOCALIZATION_STATE_UNSPECIFIED": + case 0: + message.localizationState = 0; + break; + case "LOCALIZATION_STATE_NOT_APPLICABLE": + case 1: + message.localizationState = 1; + break; + case "LOCALIZATION_STATE_PENDING": + case 2: + message.localizationState = 2; + break; + case "LOCALIZATION_STATE_COMPLETED": + case 3: + message.localizationState = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a Text message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.advisorynotifications.v1.Text + * @static + * @param {google.cloud.advisorynotifications.v1.Text} message Text + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Text.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enText = ""; + object.localizedText = ""; + object.localizationState = options.enums === String ? "LOCALIZATION_STATE_UNSPECIFIED" : 0; + } + if (message.enText != null && message.hasOwnProperty("enText")) + object.enText = message.enText; + if (message.localizedText != null && message.hasOwnProperty("localizedText")) + object.localizedText = message.localizedText; + if (message.localizationState != null && message.hasOwnProperty("localizationState")) + object.localizationState = options.enums === String ? $root.google.cloud.advisorynotifications.v1.LocalizationState[message.localizationState] === undefined ? message.localizationState : $root.google.cloud.advisorynotifications.v1.LocalizationState[message.localizationState] : message.localizationState; + return object; + }; + + /** + * Converts this Text to JSON. + * @function toJSON + * @memberof google.cloud.advisorynotifications.v1.Text + * @instance + * @returns {Object.} JSON object + */ + Text.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Text + * @function getTypeUrl + * @memberof google.cloud.advisorynotifications.v1.Text + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Text.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.advisorynotifications.v1.Text"; + }; + + return Text; + })(); + + v1.Subject = (function() { + + /** + * Properties of a Subject. + * @memberof google.cloud.advisorynotifications.v1 + * @interface ISubject + * @property {google.cloud.advisorynotifications.v1.IText|null} [text] Subject text + */ + + /** + * Constructs a new Subject. + * @memberof google.cloud.advisorynotifications.v1 + * @classdesc Represents a Subject. + * @implements ISubject + * @constructor + * @param {google.cloud.advisorynotifications.v1.ISubject=} [properties] Properties to set + */ + function Subject(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Subject text. + * @member {google.cloud.advisorynotifications.v1.IText|null|undefined} text + * @memberof google.cloud.advisorynotifications.v1.Subject + * @instance + */ + Subject.prototype.text = null; + + /** + * Creates a new Subject instance using the specified properties. + * @function create + * @memberof google.cloud.advisorynotifications.v1.Subject + * @static + * @param {google.cloud.advisorynotifications.v1.ISubject=} [properties] Properties to set + * @returns {google.cloud.advisorynotifications.v1.Subject} Subject instance + */ + Subject.create = function create(properties) { + return new Subject(properties); + }; + + /** + * Encodes the specified Subject message. Does not implicitly {@link google.cloud.advisorynotifications.v1.Subject.verify|verify} messages. + * @function encode + * @memberof google.cloud.advisorynotifications.v1.Subject + * @static + * @param {google.cloud.advisorynotifications.v1.ISubject} message Subject message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Subject.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + $root.google.cloud.advisorynotifications.v1.Text.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Subject message, length delimited. Does not implicitly {@link google.cloud.advisorynotifications.v1.Subject.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.advisorynotifications.v1.Subject + * @static + * @param {google.cloud.advisorynotifications.v1.ISubject} message Subject message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Subject.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Subject message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.advisorynotifications.v1.Subject + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.advisorynotifications.v1.Subject} Subject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Subject.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.advisorynotifications.v1.Subject(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.text = $root.google.cloud.advisorynotifications.v1.Text.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Subject message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.advisorynotifications.v1.Subject + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.advisorynotifications.v1.Subject} Subject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Subject.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Subject message. + * @function verify + * @memberof google.cloud.advisorynotifications.v1.Subject + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Subject.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) { + var error = $root.google.cloud.advisorynotifications.v1.Text.verify(message.text); + if (error) + return "text." + error; + } + return null; + }; + + /** + * Creates a Subject message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.advisorynotifications.v1.Subject + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.advisorynotifications.v1.Subject} Subject + */ + Subject.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.advisorynotifications.v1.Subject) + return object; + var message = new $root.google.cloud.advisorynotifications.v1.Subject(); + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.cloud.advisorynotifications.v1.Subject.text: object expected"); + message.text = $root.google.cloud.advisorynotifications.v1.Text.fromObject(object.text); + } + return message; + }; + + /** + * Creates a plain object from a Subject message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.advisorynotifications.v1.Subject + * @static + * @param {google.cloud.advisorynotifications.v1.Subject} message Subject + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Subject.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.text = null; + if (message.text != null && message.hasOwnProperty("text")) + object.text = $root.google.cloud.advisorynotifications.v1.Text.toObject(message.text, options); + return object; + }; + + /** + * Converts this Subject to JSON. + * @function toJSON + * @memberof google.cloud.advisorynotifications.v1.Subject + * @instance + * @returns {Object.} JSON object + */ + Subject.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Subject + * @function getTypeUrl + * @memberof google.cloud.advisorynotifications.v1.Subject + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Subject.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.advisorynotifications.v1.Subject"; + }; + + return Subject; + })(); + + v1.Message = (function() { + + /** + * Properties of a Message. + * @memberof google.cloud.advisorynotifications.v1 + * @interface IMessage + * @property {google.cloud.advisorynotifications.v1.Message.IBody|null} [body] Message body + * @property {Array.|null} [attachments] Message attachments + * @property {google.protobuf.ITimestamp|null} [createTime] Message createTime + * @property {google.protobuf.ITimestamp|null} [localizationTime] Message localizationTime + */ + + /** + * Constructs a new Message. + * @memberof google.cloud.advisorynotifications.v1 + * @classdesc Represents a Message. + * @implements IMessage + * @constructor + * @param {google.cloud.advisorynotifications.v1.IMessage=} [properties] Properties to set + */ + function Message(properties) { + this.attachments = []; + if (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 body. + * @member {google.cloud.advisorynotifications.v1.Message.IBody|null|undefined} body + * @memberof google.cloud.advisorynotifications.v1.Message + * @instance + */ + Message.prototype.body = null; + + /** + * Message attachments. + * @member {Array.} attachments + * @memberof google.cloud.advisorynotifications.v1.Message + * @instance + */ + Message.prototype.attachments = $util.emptyArray; + + /** + * Message createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.advisorynotifications.v1.Message + * @instance + */ + Message.prototype.createTime = null; + + /** + * Message localizationTime. + * @member {google.protobuf.ITimestamp|null|undefined} localizationTime + * @memberof google.cloud.advisorynotifications.v1.Message + * @instance + */ + Message.prototype.localizationTime = null; + + /** + * Creates a new Message instance using the specified properties. + * @function create + * @memberof google.cloud.advisorynotifications.v1.Message + * @static + * @param {google.cloud.advisorynotifications.v1.IMessage=} [properties] Properties to set + * @returns {google.cloud.advisorynotifications.v1.Message} Message instance + */ + Message.create = function create(properties) { + return new Message(properties); + }; + + /** + * Encodes the specified Message message. Does not implicitly {@link google.cloud.advisorynotifications.v1.Message.verify|verify} messages. + * @function encode + * @memberof google.cloud.advisorynotifications.v1.Message + * @static + * @param {google.cloud.advisorynotifications.v1.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.body != null && Object.hasOwnProperty.call(message, "body")) + $root.google.cloud.advisorynotifications.v1.Message.Body.encode(message.body, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.attachments != null && message.attachments.length) + for (var i = 0; i < message.attachments.length; ++i) + $root.google.cloud.advisorynotifications.v1.Attachment.encode(message.attachments[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + 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.localizationTime != null && Object.hasOwnProperty.call(message, "localizationTime")) + $root.google.protobuf.Timestamp.encode(message.localizationTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Message message, length delimited. Does not implicitly {@link google.cloud.advisorynotifications.v1.Message.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.advisorynotifications.v1.Message + * @static + * @param {google.cloud.advisorynotifications.v1.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.advisorynotifications.v1.Message + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.advisorynotifications.v1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.advisorynotifications.v1.Message(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.body = $root.google.cloud.advisorynotifications.v1.Message.Body.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.attachments && message.attachments.length)) + message.attachments = []; + message.attachments.push($root.google.cloud.advisorynotifications.v1.Attachment.decode(reader, reader.uint32())); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.localizationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + 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.advisorynotifications.v1.Message + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.advisorynotifications.v1.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.advisorynotifications.v1.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"; + if (message.body != null && message.hasOwnProperty("body")) { + var error = $root.google.cloud.advisorynotifications.v1.Message.Body.verify(message.body); + if (error) + return "body." + error; + } + if (message.attachments != null && message.hasOwnProperty("attachments")) { + if (!Array.isArray(message.attachments)) + return "attachments: array expected"; + for (var i = 0; i < message.attachments.length; ++i) { + var error = $root.google.cloud.advisorynotifications.v1.Attachment.verify(message.attachments[i]); + if (error) + return "attachments." + error; + } + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.localizationTime != null && message.hasOwnProperty("localizationTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.localizationTime); + if (error) + return "localizationTime." + error; + } + return null; + }; + + /** + * Creates a Message message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.advisorynotifications.v1.Message + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.advisorynotifications.v1.Message} Message + */ + Message.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.advisorynotifications.v1.Message) + return object; + var message = new $root.google.cloud.advisorynotifications.v1.Message(); + if (object.body != null) { + if (typeof object.body !== "object") + throw TypeError(".google.cloud.advisorynotifications.v1.Message.body: object expected"); + message.body = $root.google.cloud.advisorynotifications.v1.Message.Body.fromObject(object.body); + } + if (object.attachments) { + if (!Array.isArray(object.attachments)) + throw TypeError(".google.cloud.advisorynotifications.v1.Message.attachments: array expected"); + message.attachments = []; + for (var i = 0; i < object.attachments.length; ++i) { + if (typeof object.attachments[i] !== "object") + throw TypeError(".google.cloud.advisorynotifications.v1.Message.attachments: object expected"); + message.attachments[i] = $root.google.cloud.advisorynotifications.v1.Attachment.fromObject(object.attachments[i]); + } + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.advisorynotifications.v1.Message.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.localizationTime != null) { + if (typeof object.localizationTime !== "object") + throw TypeError(".google.cloud.advisorynotifications.v1.Message.localizationTime: object expected"); + message.localizationTime = $root.google.protobuf.Timestamp.fromObject(object.localizationTime); + } + return message; + }; + + /** + * Creates a plain object from a Message message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.advisorynotifications.v1.Message + * @static + * @param {google.cloud.advisorynotifications.v1.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.arrays || options.defaults) + object.attachments = []; + if (options.defaults) { + object.body = null; + object.createTime = null; + object.localizationTime = null; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = $root.google.cloud.advisorynotifications.v1.Message.Body.toObject(message.body, options); + if (message.attachments && message.attachments.length) { + object.attachments = []; + for (var j = 0; j < message.attachments.length; ++j) + object.attachments[j] = $root.google.cloud.advisorynotifications.v1.Attachment.toObject(message.attachments[j], options); + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.localizationTime != null && message.hasOwnProperty("localizationTime")) + object.localizationTime = $root.google.protobuf.Timestamp.toObject(message.localizationTime, options); + return object; + }; + + /** + * Converts this Message to JSON. + * @function toJSON + * @memberof google.cloud.advisorynotifications.v1.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.advisorynotifications.v1.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.advisorynotifications.v1.Message"; + }; + + Message.Body = (function() { + + /** + * Properties of a Body. + * @memberof google.cloud.advisorynotifications.v1.Message + * @interface IBody + * @property {google.cloud.advisorynotifications.v1.IText|null} [text] Body text + */ + + /** + * Constructs a new Body. + * @memberof google.cloud.advisorynotifications.v1.Message + * @classdesc Represents a Body. + * @implements IBody + * @constructor + * @param {google.cloud.advisorynotifications.v1.Message.IBody=} [properties] Properties to set + */ + function Body(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Body text. + * @member {google.cloud.advisorynotifications.v1.IText|null|undefined} text + * @memberof google.cloud.advisorynotifications.v1.Message.Body + * @instance + */ + Body.prototype.text = null; + + /** + * Creates a new Body instance using the specified properties. + * @function create + * @memberof google.cloud.advisorynotifications.v1.Message.Body + * @static + * @param {google.cloud.advisorynotifications.v1.Message.IBody=} [properties] Properties to set + * @returns {google.cloud.advisorynotifications.v1.Message.Body} Body instance + */ + Body.create = function create(properties) { + return new Body(properties); + }; + + /** + * Encodes the specified Body message. Does not implicitly {@link google.cloud.advisorynotifications.v1.Message.Body.verify|verify} messages. + * @function encode + * @memberof google.cloud.advisorynotifications.v1.Message.Body + * @static + * @param {google.cloud.advisorynotifications.v1.Message.IBody} message Body message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Body.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + $root.google.cloud.advisorynotifications.v1.Text.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Body message, length delimited. Does not implicitly {@link google.cloud.advisorynotifications.v1.Message.Body.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.advisorynotifications.v1.Message.Body + * @static + * @param {google.cloud.advisorynotifications.v1.Message.IBody} message Body message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Body.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Body message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.advisorynotifications.v1.Message.Body + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.advisorynotifications.v1.Message.Body} Body + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Body.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.advisorynotifications.v1.Message.Body(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.text = $root.google.cloud.advisorynotifications.v1.Text.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Body message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.advisorynotifications.v1.Message.Body + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.advisorynotifications.v1.Message.Body} Body + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Body.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Body message. + * @function verify + * @memberof google.cloud.advisorynotifications.v1.Message.Body + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Body.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) { + var error = $root.google.cloud.advisorynotifications.v1.Text.verify(message.text); + if (error) + return "text." + error; + } + return null; + }; + + /** + * Creates a Body message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.advisorynotifications.v1.Message.Body + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.advisorynotifications.v1.Message.Body} Body + */ + Body.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.advisorynotifications.v1.Message.Body) + return object; + var message = new $root.google.cloud.advisorynotifications.v1.Message.Body(); + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.cloud.advisorynotifications.v1.Message.Body.text: object expected"); + message.text = $root.google.cloud.advisorynotifications.v1.Text.fromObject(object.text); + } + return message; + }; + + /** + * Creates a plain object from a Body message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.advisorynotifications.v1.Message.Body + * @static + * @param {google.cloud.advisorynotifications.v1.Message.Body} message Body + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Body.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.text = null; + if (message.text != null && message.hasOwnProperty("text")) + object.text = $root.google.cloud.advisorynotifications.v1.Text.toObject(message.text, options); + return object; + }; + + /** + * Converts this Body to JSON. + * @function toJSON + * @memberof google.cloud.advisorynotifications.v1.Message.Body + * @instance + * @returns {Object.} JSON object + */ + Body.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Body + * @function getTypeUrl + * @memberof google.cloud.advisorynotifications.v1.Message.Body + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Body.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.advisorynotifications.v1.Message.Body"; + }; + + return Body; + })(); + + return Message; + })(); + + v1.Attachment = (function() { + + /** + * Properties of an Attachment. + * @memberof google.cloud.advisorynotifications.v1 + * @interface IAttachment + * @property {google.cloud.advisorynotifications.v1.ICsv|null} [csv] Attachment csv + * @property {string|null} [displayName] Attachment displayName + */ + + /** + * Constructs a new Attachment. + * @memberof google.cloud.advisorynotifications.v1 + * @classdesc Represents an Attachment. + * @implements IAttachment + * @constructor + * @param {google.cloud.advisorynotifications.v1.IAttachment=} [properties] Properties to set + */ + function Attachment(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Attachment csv. + * @member {google.cloud.advisorynotifications.v1.ICsv|null|undefined} csv + * @memberof google.cloud.advisorynotifications.v1.Attachment + * @instance + */ + Attachment.prototype.csv = null; + + /** + * Attachment displayName. + * @member {string} displayName + * @memberof google.cloud.advisorynotifications.v1.Attachment + * @instance + */ + Attachment.prototype.displayName = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Attachment data. + * @member {"csv"|undefined} data + * @memberof google.cloud.advisorynotifications.v1.Attachment + * @instance + */ + Object.defineProperty(Attachment.prototype, "data", { + get: $util.oneOfGetter($oneOfFields = ["csv"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Attachment instance using the specified properties. + * @function create + * @memberof google.cloud.advisorynotifications.v1.Attachment + * @static + * @param {google.cloud.advisorynotifications.v1.IAttachment=} [properties] Properties to set + * @returns {google.cloud.advisorynotifications.v1.Attachment} Attachment instance + */ + Attachment.create = function create(properties) { + return new Attachment(properties); + }; + + /** + * Encodes the specified Attachment message. Does not implicitly {@link google.cloud.advisorynotifications.v1.Attachment.verify|verify} messages. + * @function encode + * @memberof google.cloud.advisorynotifications.v1.Attachment + * @static + * @param {google.cloud.advisorynotifications.v1.IAttachment} message Attachment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Attachment.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.csv != null && Object.hasOwnProperty.call(message, "csv")) + $root.google.cloud.advisorynotifications.v1.Csv.encode(message.csv, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Attachment message, length delimited. Does not implicitly {@link google.cloud.advisorynotifications.v1.Attachment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.advisorynotifications.v1.Attachment + * @static + * @param {google.cloud.advisorynotifications.v1.IAttachment} message Attachment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Attachment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Attachment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.advisorynotifications.v1.Attachment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.advisorynotifications.v1.Attachment} Attachment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Attachment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.advisorynotifications.v1.Attachment(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.csv = $root.google.cloud.advisorynotifications.v1.Csv.decode(reader, reader.uint32()); + break; + } + case 1: { + message.displayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Attachment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.advisorynotifications.v1.Attachment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.advisorynotifications.v1.Attachment} Attachment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Attachment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Attachment message. + * @function verify + * @memberof google.cloud.advisorynotifications.v1.Attachment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Attachment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.csv != null && message.hasOwnProperty("csv")) { + properties.data = 1; + { + var error = $root.google.cloud.advisorynotifications.v1.Csv.verify(message.csv); + if (error) + return "csv." + error; + } + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates an Attachment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.advisorynotifications.v1.Attachment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.advisorynotifications.v1.Attachment} Attachment + */ + Attachment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.advisorynotifications.v1.Attachment) + return object; + var message = new $root.google.cloud.advisorynotifications.v1.Attachment(); + if (object.csv != null) { + if (typeof object.csv !== "object") + throw TypeError(".google.cloud.advisorynotifications.v1.Attachment.csv: object expected"); + message.csv = $root.google.cloud.advisorynotifications.v1.Csv.fromObject(object.csv); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from an Attachment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.advisorynotifications.v1.Attachment + * @static + * @param {google.cloud.advisorynotifications.v1.Attachment} message Attachment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Attachment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.displayName = ""; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.csv != null && message.hasOwnProperty("csv")) { + object.csv = $root.google.cloud.advisorynotifications.v1.Csv.toObject(message.csv, options); + if (options.oneofs) + object.data = "csv"; + } + return object; + }; + + /** + * Converts this Attachment to JSON. + * @function toJSON + * @memberof google.cloud.advisorynotifications.v1.Attachment + * @instance + * @returns {Object.} JSON object + */ + Attachment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Attachment + * @function getTypeUrl + * @memberof google.cloud.advisorynotifications.v1.Attachment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Attachment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.advisorynotifications.v1.Attachment"; + }; + + return Attachment; + })(); + + v1.Csv = (function() { + + /** + * Properties of a Csv. + * @memberof google.cloud.advisorynotifications.v1 + * @interface ICsv + * @property {Array.|null} [headers] Csv headers + * @property {Array.|null} [dataRows] Csv dataRows + */ + + /** + * Constructs a new Csv. + * @memberof google.cloud.advisorynotifications.v1 + * @classdesc Represents a Csv. + * @implements ICsv + * @constructor + * @param {google.cloud.advisorynotifications.v1.ICsv=} [properties] Properties to set + */ + function Csv(properties) { + this.headers = []; + this.dataRows = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Csv headers. + * @member {Array.} headers + * @memberof google.cloud.advisorynotifications.v1.Csv + * @instance + */ + Csv.prototype.headers = $util.emptyArray; + + /** + * Csv dataRows. + * @member {Array.} dataRows + * @memberof google.cloud.advisorynotifications.v1.Csv + * @instance + */ + Csv.prototype.dataRows = $util.emptyArray; + + /** + * Creates a new Csv instance using the specified properties. + * @function create + * @memberof google.cloud.advisorynotifications.v1.Csv + * @static + * @param {google.cloud.advisorynotifications.v1.ICsv=} [properties] Properties to set + * @returns {google.cloud.advisorynotifications.v1.Csv} Csv instance + */ + Csv.create = function create(properties) { + return new Csv(properties); + }; + + /** + * Encodes the specified Csv message. Does not implicitly {@link google.cloud.advisorynotifications.v1.Csv.verify|verify} messages. + * @function encode + * @memberof google.cloud.advisorynotifications.v1.Csv + * @static + * @param {google.cloud.advisorynotifications.v1.ICsv} message Csv message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Csv.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.headers != null && message.headers.length) + for (var i = 0; i < message.headers.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.headers[i]); + if (message.dataRows != null && message.dataRows.length) + for (var i = 0; i < message.dataRows.length; ++i) + $root.google.cloud.advisorynotifications.v1.Csv.CsvRow.encode(message.dataRows[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Csv message, length delimited. Does not implicitly {@link google.cloud.advisorynotifications.v1.Csv.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.advisorynotifications.v1.Csv + * @static + * @param {google.cloud.advisorynotifications.v1.ICsv} message Csv message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Csv.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Csv message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.advisorynotifications.v1.Csv + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.advisorynotifications.v1.Csv} Csv + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Csv.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.advisorynotifications.v1.Csv(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.headers && message.headers.length)) + message.headers = []; + message.headers.push(reader.string()); + break; + } + case 2: { + if (!(message.dataRows && message.dataRows.length)) + message.dataRows = []; + message.dataRows.push($root.google.cloud.advisorynotifications.v1.Csv.CsvRow.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Csv message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.advisorynotifications.v1.Csv + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.advisorynotifications.v1.Csv} Csv + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Csv.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Csv message. + * @function verify + * @memberof google.cloud.advisorynotifications.v1.Csv + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Csv.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.headers != null && message.hasOwnProperty("headers")) { + if (!Array.isArray(message.headers)) + return "headers: array expected"; + for (var i = 0; i < message.headers.length; ++i) + if (!$util.isString(message.headers[i])) + return "headers: string[] expected"; + } + if (message.dataRows != null && message.hasOwnProperty("dataRows")) { + if (!Array.isArray(message.dataRows)) + return "dataRows: array expected"; + for (var i = 0; i < message.dataRows.length; ++i) { + var error = $root.google.cloud.advisorynotifications.v1.Csv.CsvRow.verify(message.dataRows[i]); + if (error) + return "dataRows." + error; + } + } + return null; + }; + + /** + * Creates a Csv message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.advisorynotifications.v1.Csv + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.advisorynotifications.v1.Csv} Csv + */ + Csv.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.advisorynotifications.v1.Csv) + return object; + var message = new $root.google.cloud.advisorynotifications.v1.Csv(); + if (object.headers) { + if (!Array.isArray(object.headers)) + throw TypeError(".google.cloud.advisorynotifications.v1.Csv.headers: array expected"); + message.headers = []; + for (var i = 0; i < object.headers.length; ++i) + message.headers[i] = String(object.headers[i]); + } + if (object.dataRows) { + if (!Array.isArray(object.dataRows)) + throw TypeError(".google.cloud.advisorynotifications.v1.Csv.dataRows: array expected"); + message.dataRows = []; + for (var i = 0; i < object.dataRows.length; ++i) { + if (typeof object.dataRows[i] !== "object") + throw TypeError(".google.cloud.advisorynotifications.v1.Csv.dataRows: object expected"); + message.dataRows[i] = $root.google.cloud.advisorynotifications.v1.Csv.CsvRow.fromObject(object.dataRows[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Csv message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.advisorynotifications.v1.Csv + * @static + * @param {google.cloud.advisorynotifications.v1.Csv} message Csv + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Csv.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.headers = []; + object.dataRows = []; + } + if (message.headers && message.headers.length) { + object.headers = []; + for (var j = 0; j < message.headers.length; ++j) + object.headers[j] = message.headers[j]; + } + if (message.dataRows && message.dataRows.length) { + object.dataRows = []; + for (var j = 0; j < message.dataRows.length; ++j) + object.dataRows[j] = $root.google.cloud.advisorynotifications.v1.Csv.CsvRow.toObject(message.dataRows[j], options); + } + return object; + }; + + /** + * Converts this Csv to JSON. + * @function toJSON + * @memberof google.cloud.advisorynotifications.v1.Csv + * @instance + * @returns {Object.} JSON object + */ + Csv.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Csv + * @function getTypeUrl + * @memberof google.cloud.advisorynotifications.v1.Csv + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Csv.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.advisorynotifications.v1.Csv"; + }; + + Csv.CsvRow = (function() { + + /** + * Properties of a CsvRow. + * @memberof google.cloud.advisorynotifications.v1.Csv + * @interface ICsvRow + * @property {Array.|null} [entries] CsvRow entries + */ + + /** + * Constructs a new CsvRow. + * @memberof google.cloud.advisorynotifications.v1.Csv + * @classdesc Represents a CsvRow. + * @implements ICsvRow + * @constructor + * @param {google.cloud.advisorynotifications.v1.Csv.ICsvRow=} [properties] Properties to set + */ + function CsvRow(properties) { + this.entries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CsvRow entries. + * @member {Array.} entries + * @memberof google.cloud.advisorynotifications.v1.Csv.CsvRow + * @instance + */ + CsvRow.prototype.entries = $util.emptyArray; + + /** + * Creates a new CsvRow instance using the specified properties. + * @function create + * @memberof google.cloud.advisorynotifications.v1.Csv.CsvRow + * @static + * @param {google.cloud.advisorynotifications.v1.Csv.ICsvRow=} [properties] Properties to set + * @returns {google.cloud.advisorynotifications.v1.Csv.CsvRow} CsvRow instance + */ + CsvRow.create = function create(properties) { + return new CsvRow(properties); + }; + + /** + * Encodes the specified CsvRow message. Does not implicitly {@link google.cloud.advisorynotifications.v1.Csv.CsvRow.verify|verify} messages. + * @function encode + * @memberof google.cloud.advisorynotifications.v1.Csv.CsvRow + * @static + * @param {google.cloud.advisorynotifications.v1.Csv.ICsvRow} message CsvRow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvRow.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.entries[i]); + return writer; + }; + + /** + * Encodes the specified CsvRow message, length delimited. Does not implicitly {@link google.cloud.advisorynotifications.v1.Csv.CsvRow.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.advisorynotifications.v1.Csv.CsvRow + * @static + * @param {google.cloud.advisorynotifications.v1.Csv.ICsvRow} message CsvRow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvRow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CsvRow message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.advisorynotifications.v1.Csv.CsvRow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.advisorynotifications.v1.Csv.CsvRow} CsvRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvRow.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.advisorynotifications.v1.Csv.CsvRow(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CsvRow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.advisorynotifications.v1.Csv.CsvRow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.advisorynotifications.v1.Csv.CsvRow} CsvRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvRow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CsvRow message. + * @function verify + * @memberof google.cloud.advisorynotifications.v1.Csv.CsvRow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CsvRow.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) + if (!$util.isString(message.entries[i])) + return "entries: string[] expected"; + } + return null; + }; + + /** + * Creates a CsvRow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.advisorynotifications.v1.Csv.CsvRow + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.advisorynotifications.v1.Csv.CsvRow} CsvRow + */ + CsvRow.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.advisorynotifications.v1.Csv.CsvRow) + return object; + var message = new $root.google.cloud.advisorynotifications.v1.Csv.CsvRow(); + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".google.cloud.advisorynotifications.v1.Csv.CsvRow.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) + message.entries[i] = String(object.entries[i]); + } + return message; + }; + + /** + * Creates a plain object from a CsvRow message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.advisorynotifications.v1.Csv.CsvRow + * @static + * @param {google.cloud.advisorynotifications.v1.Csv.CsvRow} message CsvRow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CsvRow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entries = []; + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = message.entries[j]; + } + return object; + }; + + /** + * Converts this CsvRow to JSON. + * @function toJSON + * @memberof google.cloud.advisorynotifications.v1.Csv.CsvRow + * @instance + * @returns {Object.} JSON object + */ + CsvRow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CsvRow + * @function getTypeUrl + * @memberof google.cloud.advisorynotifications.v1.Csv.CsvRow + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CsvRow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.advisorynotifications.v1.Csv.CsvRow"; + }; + + return CsvRow; + })(); + + return Csv; + })(); + + v1.ListNotificationsRequest = (function() { + + /** + * Properties of a ListNotificationsRequest. + * @memberof google.cloud.advisorynotifications.v1 + * @interface IListNotificationsRequest + * @property {string|null} [parent] ListNotificationsRequest parent + * @property {number|null} [pageSize] ListNotificationsRequest pageSize + * @property {string|null} [pageToken] ListNotificationsRequest pageToken + * @property {google.cloud.advisorynotifications.v1.NotificationView|null} [view] ListNotificationsRequest view + * @property {string|null} [languageCode] ListNotificationsRequest languageCode + */ + + /** + * Constructs a new ListNotificationsRequest. + * @memberof google.cloud.advisorynotifications.v1 + * @classdesc Represents a ListNotificationsRequest. + * @implements IListNotificationsRequest + * @constructor + * @param {google.cloud.advisorynotifications.v1.IListNotificationsRequest=} [properties] Properties to set + */ + function ListNotificationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListNotificationsRequest parent. + * @member {string} parent + * @memberof google.cloud.advisorynotifications.v1.ListNotificationsRequest + * @instance + */ + ListNotificationsRequest.prototype.parent = ""; + + /** + * ListNotificationsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.advisorynotifications.v1.ListNotificationsRequest + * @instance + */ + ListNotificationsRequest.prototype.pageSize = 0; + + /** + * ListNotificationsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.advisorynotifications.v1.ListNotificationsRequest + * @instance + */ + ListNotificationsRequest.prototype.pageToken = ""; + + /** + * ListNotificationsRequest view. + * @member {google.cloud.advisorynotifications.v1.NotificationView} view + * @memberof google.cloud.advisorynotifications.v1.ListNotificationsRequest + * @instance + */ + ListNotificationsRequest.prototype.view = 0; + + /** + * ListNotificationsRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.advisorynotifications.v1.ListNotificationsRequest + * @instance + */ + ListNotificationsRequest.prototype.languageCode = ""; + + /** + * Creates a new ListNotificationsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.advisorynotifications.v1.ListNotificationsRequest + * @static + * @param {google.cloud.advisorynotifications.v1.IListNotificationsRequest=} [properties] Properties to set + * @returns {google.cloud.advisorynotifications.v1.ListNotificationsRequest} ListNotificationsRequest instance + */ + ListNotificationsRequest.create = function create(properties) { + return new ListNotificationsRequest(properties); + }; + + /** + * Encodes the specified ListNotificationsRequest message. Does not implicitly {@link google.cloud.advisorynotifications.v1.ListNotificationsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.advisorynotifications.v1.ListNotificationsRequest + * @static + * @param {google.cloud.advisorynotifications.v1.IListNotificationsRequest} message ListNotificationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListNotificationsRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.view); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.languageCode); + return writer; + }; + + /** + * Encodes the specified ListNotificationsRequest message, length delimited. Does not implicitly {@link google.cloud.advisorynotifications.v1.ListNotificationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.advisorynotifications.v1.ListNotificationsRequest + * @static + * @param {google.cloud.advisorynotifications.v1.IListNotificationsRequest} message ListNotificationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListNotificationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListNotificationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.advisorynotifications.v1.ListNotificationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.advisorynotifications.v1.ListNotificationsRequest} ListNotificationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListNotificationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.advisorynotifications.v1.ListNotificationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.view = reader.int32(); + break; + } + case 5: { + message.languageCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListNotificationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.advisorynotifications.v1.ListNotificationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.advisorynotifications.v1.ListNotificationsRequest} ListNotificationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListNotificationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListNotificationsRequest message. + * @function verify + * @memberof google.cloud.advisorynotifications.v1.ListNotificationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListNotificationsRequest.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.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + return null; + }; + + /** + * Creates a ListNotificationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.advisorynotifications.v1.ListNotificationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.advisorynotifications.v1.ListNotificationsRequest} ListNotificationsRequest + */ + ListNotificationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.advisorynotifications.v1.ListNotificationsRequest) + return object; + var message = new $root.google.cloud.advisorynotifications.v1.ListNotificationsRequest(); + 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); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "NOTIFICATION_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BASIC": + case 1: + message.view = 1; + break; + case "FULL": + case 2: + message.view = 2; + break; + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + return message; + }; + + /** + * Creates a plain object from a ListNotificationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.advisorynotifications.v1.ListNotificationsRequest + * @static + * @param {google.cloud.advisorynotifications.v1.ListNotificationsRequest} message ListNotificationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListNotificationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.view = options.enums === String ? "NOTIFICATION_VIEW_UNSPECIFIED" : 0; + object.languageCode = ""; + } + 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.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.advisorynotifications.v1.NotificationView[message.view] === undefined ? message.view : $root.google.cloud.advisorynotifications.v1.NotificationView[message.view] : message.view; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + return object; + }; + + /** + * Converts this ListNotificationsRequest to JSON. + * @function toJSON + * @memberof google.cloud.advisorynotifications.v1.ListNotificationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListNotificationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListNotificationsRequest + * @function getTypeUrl + * @memberof google.cloud.advisorynotifications.v1.ListNotificationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListNotificationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.advisorynotifications.v1.ListNotificationsRequest"; + }; + + return ListNotificationsRequest; + })(); + + v1.ListNotificationsResponse = (function() { + + /** + * Properties of a ListNotificationsResponse. + * @memberof google.cloud.advisorynotifications.v1 + * @interface IListNotificationsResponse + * @property {Array.|null} [notifications] ListNotificationsResponse notifications + * @property {string|null} [nextPageToken] ListNotificationsResponse nextPageToken + * @property {number|null} [totalSize] ListNotificationsResponse totalSize + */ + + /** + * Constructs a new ListNotificationsResponse. + * @memberof google.cloud.advisorynotifications.v1 + * @classdesc Represents a ListNotificationsResponse. + * @implements IListNotificationsResponse + * @constructor + * @param {google.cloud.advisorynotifications.v1.IListNotificationsResponse=} [properties] Properties to set + */ + function ListNotificationsResponse(properties) { + this.notifications = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListNotificationsResponse notifications. + * @member {Array.} notifications + * @memberof google.cloud.advisorynotifications.v1.ListNotificationsResponse + * @instance + */ + ListNotificationsResponse.prototype.notifications = $util.emptyArray; + + /** + * ListNotificationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.advisorynotifications.v1.ListNotificationsResponse + * @instance + */ + ListNotificationsResponse.prototype.nextPageToken = ""; + + /** + * ListNotificationsResponse totalSize. + * @member {number} totalSize + * @memberof google.cloud.advisorynotifications.v1.ListNotificationsResponse + * @instance + */ + ListNotificationsResponse.prototype.totalSize = 0; + + /** + * Creates a new ListNotificationsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.advisorynotifications.v1.ListNotificationsResponse + * @static + * @param {google.cloud.advisorynotifications.v1.IListNotificationsResponse=} [properties] Properties to set + * @returns {google.cloud.advisorynotifications.v1.ListNotificationsResponse} ListNotificationsResponse instance + */ + ListNotificationsResponse.create = function create(properties) { + return new ListNotificationsResponse(properties); + }; + + /** + * Encodes the specified ListNotificationsResponse message. Does not implicitly {@link google.cloud.advisorynotifications.v1.ListNotificationsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.advisorynotifications.v1.ListNotificationsResponse + * @static + * @param {google.cloud.advisorynotifications.v1.IListNotificationsResponse} message ListNotificationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListNotificationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.notifications != null && message.notifications.length) + for (var i = 0; i < message.notifications.length; ++i) + $root.google.cloud.advisorynotifications.v1.Notification.encode(message.notifications[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + return writer; + }; + + /** + * Encodes the specified ListNotificationsResponse message, length delimited. Does not implicitly {@link google.cloud.advisorynotifications.v1.ListNotificationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.advisorynotifications.v1.ListNotificationsResponse + * @static + * @param {google.cloud.advisorynotifications.v1.IListNotificationsResponse} message ListNotificationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListNotificationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListNotificationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.advisorynotifications.v1.ListNotificationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.advisorynotifications.v1.ListNotificationsResponse} ListNotificationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListNotificationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.advisorynotifications.v1.ListNotificationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.notifications && message.notifications.length)) + message.notifications = []; + message.notifications.push($root.google.cloud.advisorynotifications.v1.Notification.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + message.totalSize = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListNotificationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.advisorynotifications.v1.ListNotificationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.advisorynotifications.v1.ListNotificationsResponse} ListNotificationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListNotificationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListNotificationsResponse message. + * @function verify + * @memberof google.cloud.advisorynotifications.v1.ListNotificationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListNotificationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.notifications != null && message.hasOwnProperty("notifications")) { + if (!Array.isArray(message.notifications)) + return "notifications: array expected"; + for (var i = 0; i < message.notifications.length; ++i) { + var error = $root.google.cloud.advisorynotifications.v1.Notification.verify(message.notifications[i]); + if (error) + return "notifications." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; + return null; + }; + + /** + * Creates a ListNotificationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.advisorynotifications.v1.ListNotificationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.advisorynotifications.v1.ListNotificationsResponse} ListNotificationsResponse + */ + ListNotificationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.advisorynotifications.v1.ListNotificationsResponse) + return object; + var message = new $root.google.cloud.advisorynotifications.v1.ListNotificationsResponse(); + if (object.notifications) { + if (!Array.isArray(object.notifications)) + throw TypeError(".google.cloud.advisorynotifications.v1.ListNotificationsResponse.notifications: array expected"); + message.notifications = []; + for (var i = 0; i < object.notifications.length; ++i) { + if (typeof object.notifications[i] !== "object") + throw TypeError(".google.cloud.advisorynotifications.v1.ListNotificationsResponse.notifications: object expected"); + message.notifications[i] = $root.google.cloud.advisorynotifications.v1.Notification.fromObject(object.notifications[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListNotificationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.advisorynotifications.v1.ListNotificationsResponse + * @static + * @param {google.cloud.advisorynotifications.v1.ListNotificationsResponse} message ListNotificationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListNotificationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.notifications = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.notifications && message.notifications.length) { + object.notifications = []; + for (var j = 0; j < message.notifications.length; ++j) + object.notifications[j] = $root.google.cloud.advisorynotifications.v1.Notification.toObject(message.notifications[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + return object; + }; + + /** + * Converts this ListNotificationsResponse to JSON. + * @function toJSON + * @memberof google.cloud.advisorynotifications.v1.ListNotificationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListNotificationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListNotificationsResponse + * @function getTypeUrl + * @memberof google.cloud.advisorynotifications.v1.ListNotificationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListNotificationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.advisorynotifications.v1.ListNotificationsResponse"; + }; + + return ListNotificationsResponse; + })(); + + v1.GetNotificationRequest = (function() { + + /** + * Properties of a GetNotificationRequest. + * @memberof google.cloud.advisorynotifications.v1 + * @interface IGetNotificationRequest + * @property {string|null} [name] GetNotificationRequest name + * @property {string|null} [languageCode] GetNotificationRequest languageCode + */ + + /** + * Constructs a new GetNotificationRequest. + * @memberof google.cloud.advisorynotifications.v1 + * @classdesc Represents a GetNotificationRequest. + * @implements IGetNotificationRequest + * @constructor + * @param {google.cloud.advisorynotifications.v1.IGetNotificationRequest=} [properties] Properties to set + */ + function GetNotificationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetNotificationRequest name. + * @member {string} name + * @memberof google.cloud.advisorynotifications.v1.GetNotificationRequest + * @instance + */ + GetNotificationRequest.prototype.name = ""; + + /** + * GetNotificationRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.advisorynotifications.v1.GetNotificationRequest + * @instance + */ + GetNotificationRequest.prototype.languageCode = ""; + + /** + * Creates a new GetNotificationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.advisorynotifications.v1.GetNotificationRequest + * @static + * @param {google.cloud.advisorynotifications.v1.IGetNotificationRequest=} [properties] Properties to set + * @returns {google.cloud.advisorynotifications.v1.GetNotificationRequest} GetNotificationRequest instance + */ + GetNotificationRequest.create = function create(properties) { + return new GetNotificationRequest(properties); + }; + + /** + * Encodes the specified GetNotificationRequest message. Does not implicitly {@link google.cloud.advisorynotifications.v1.GetNotificationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.advisorynotifications.v1.GetNotificationRequest + * @static + * @param {google.cloud.advisorynotifications.v1.IGetNotificationRequest} message GetNotificationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetNotificationRequest.encode = function encode(message, writer) { + 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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.languageCode); + return writer; + }; + + /** + * Encodes the specified GetNotificationRequest message, length delimited. Does not implicitly {@link google.cloud.advisorynotifications.v1.GetNotificationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.advisorynotifications.v1.GetNotificationRequest + * @static + * @param {google.cloud.advisorynotifications.v1.IGetNotificationRequest} message GetNotificationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetNotificationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetNotificationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.advisorynotifications.v1.GetNotificationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.advisorynotifications.v1.GetNotificationRequest} GetNotificationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetNotificationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.advisorynotifications.v1.GetNotificationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 5: { + message.languageCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetNotificationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.advisorynotifications.v1.GetNotificationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.advisorynotifications.v1.GetNotificationRequest} GetNotificationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetNotificationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetNotificationRequest message. + * @function verify + * @memberof google.cloud.advisorynotifications.v1.GetNotificationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetNotificationRequest.verify = function verify(message) { + if (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.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + return null; + }; + + /** + * Creates a GetNotificationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.advisorynotifications.v1.GetNotificationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.advisorynotifications.v1.GetNotificationRequest} GetNotificationRequest + */ + GetNotificationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.advisorynotifications.v1.GetNotificationRequest) + return object; + var message = new $root.google.cloud.advisorynotifications.v1.GetNotificationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + return message; + }; + + /** + * Creates a plain object from a GetNotificationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.advisorynotifications.v1.GetNotificationRequest + * @static + * @param {google.cloud.advisorynotifications.v1.GetNotificationRequest} message GetNotificationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetNotificationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.languageCode = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + return object; + }; + + /** + * Converts this GetNotificationRequest to JSON. + * @function toJSON + * @memberof google.cloud.advisorynotifications.v1.GetNotificationRequest + * @instance + * @returns {Object.} JSON object + */ + GetNotificationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetNotificationRequest + * @function getTypeUrl + * @memberof google.cloud.advisorynotifications.v1.GetNotificationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetNotificationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.advisorynotifications.v1.GetNotificationRequest"; + }; + + return GetNotificationRequest; + })(); + + return v1; + })(); + + return advisorynotifications; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {string|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {string} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = ""; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.edition); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 13: { + message.edition = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + if (!$util.isString(message.edition)) + return "edition: string expected"; + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = message.edition; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 42: { + message.phpGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * 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 {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + return protobuf; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-cloud-advisorynotifications/protos/protos.json b/packages/google-cloud-advisorynotifications/protos/protos.json new file mode 100644 index 00000000000..1971b5f4d3e --- /dev/null +++ b/packages/google-cloud-advisorynotifications/protos/protos.json @@ -0,0 +1,1433 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "advisorynotifications": { + "nested": { + "v1": { + "options": { + "csharp_namespace": "Google.Cloud.AdvisoryNotifications.V1", + "go_package": "cloud.google.com/go/advisorynotifications/apiv1/advisorynotificationspb;advisorynotificationspb", + "php_namespace": "Google\\Cloud\\AdvisoryNotifications\\V1", + "ruby_package": "Google::Cloud::AdvisoryNotifications::V1", + "java_multiple_files": true, + "java_outer_classname": "ServiceProto", + "java_package": "com.google.cloud.advisorynotifications.v1", + "(google.api.resource_definition).type": "advisorynotifications.googleapis.com/Location", + "(google.api.resource_definition).pattern": "organizations/{organization}/locations/{location}" + }, + "nested": { + "AdvisoryNotificationsService": { + "options": { + "(google.api.default_host)": "advisorynotifications.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListNotifications": { + "requestType": "ListNotificationsRequest", + "responseType": "ListNotificationsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=organizations/*/locations/*}/notifications", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=organizations/*/locations/*}/notifications" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetNotification": { + "requestType": "GetNotificationRequest", + "responseType": "Notification", + "options": { + "(google.api.http).get": "/v1/{name=organizations/*/locations/*/notifications/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=organizations/*/locations/*/notifications/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "NotificationView": { + "values": { + "NOTIFICATION_VIEW_UNSPECIFIED": 0, + "BASIC": 1, + "FULL": 2 + } + }, + "LocalizationState": { + "values": { + "LOCALIZATION_STATE_UNSPECIFIED": 0, + "LOCALIZATION_STATE_NOT_APPLICABLE": 1, + "LOCALIZATION_STATE_PENDING": 2, + "LOCALIZATION_STATE_COMPLETED": 3 + } + }, + "Notification": { + "options": { + "(google.api.resource).type": "advisorynotifications.googleapis.com/Notification", + "(google.api.resource).pattern": "organizations/{organization}/locations/{location}/notifications/{notification}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "subject": { + "type": "Subject", + "id": 2 + }, + "messages": { + "rule": "repeated", + "type": "Message", + "id": 3 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "Text": { + "fields": { + "enText": { + "type": "string", + "id": 1 + }, + "localizedText": { + "type": "string", + "id": 2 + }, + "localizationState": { + "type": "LocalizationState", + "id": 3 + } + } + }, + "Subject": { + "fields": { + "text": { + "type": "Text", + "id": 1 + } + } + }, + "Message": { + "fields": { + "body": { + "type": "Body", + "id": 1 + }, + "attachments": { + "rule": "repeated", + "type": "Attachment", + "id": 2 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "localizationTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + } + }, + "nested": { + "Body": { + "fields": { + "text": { + "type": "Text", + "id": 1 + } + } + } + } + }, + "Attachment": { + "oneofs": { + "data": { + "oneof": [ + "csv" + ] + } + }, + "fields": { + "csv": { + "type": "Csv", + "id": 2 + }, + "displayName": { + "type": "string", + "id": 1 + } + } + }, + "Csv": { + "fields": { + "headers": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "dataRows": { + "rule": "repeated", + "type": "CsvRow", + "id": 2 + } + }, + "nested": { + "CsvRow": { + "fields": { + "entries": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + } + } + }, + "ListNotificationsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "advisorynotifications.googleapis.com/Notification" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "view": { + "type": "NotificationView", + "id": 4 + }, + "languageCode": { + "type": "string", + "id": 5 + } + } + }, + "ListNotificationsResponse": { + "fields": { + "notifications": { + "rule": "repeated", + "type": "Notification", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "totalSize": { + "type": "int32", + "id": 3 + } + } + }, + "GetNotificationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "advisorynotifications.googleapis.com/Notification" + } + }, + "languageCode": { + "type": "string", + "id": 5 + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ResourceProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "string", + "id": 13 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "phpGenericServices": { + "type": "bool", + "id": 42, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + } + } + }, + "OneofOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "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 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-cloud-advisorynotifications/samples/README.md b/packages/google-cloud-advisorynotifications/samples/README.md new file mode 100644 index 00000000000..4afe870fea7 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/samples/README.md @@ -0,0 +1,104 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Advisory Notifications API: Node.js Samples](https://github.com/googleapis/google-cloud-node) + +[![Open in Cloud Shell][shell_img]][shell_link] + + + +## Table of Contents + +* [Before you begin](#before-you-begin) +* [Samples](#samples) + * [Advisory_notifications_service.get_notification](#advisory_notifications_service.get_notification) + * [Advisory_notifications_service.list_notifications](#advisory_notifications_service.list_notifications) + * [Quickstart](#quickstart) + * [Quickstart](#quickstart) + +## Before you begin + +Before running the samples, make sure you've followed the steps outlined in +[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library). + +`cd samples` + +`npm install` + +`cd ..` + +## Samples + + + +### Advisory_notifications_service.get_notification + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-advisorynotifications/samples/generated/v1/advisory_notifications_service.get_notification.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-advisorynotifications/samples/generated/v1/advisory_notifications_service.get_notification.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-advisorynotifications/samples/generated/v1/advisory_notifications_service.get_notification.js` + + +----- + + + + +### Advisory_notifications_service.list_notifications + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-advisorynotifications/samples/generated/v1/advisory_notifications_service.list_notifications.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-advisorynotifications/samples/generated/v1/advisory_notifications_service.list_notifications.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-advisorynotifications/samples/generated/v1/advisory_notifications_service.list_notifications.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-advisorynotifications/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-advisorynotifications/samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-advisorynotifications/samples/quickstart.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-advisorynotifications/samples/test/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-advisorynotifications/samples/test/quickstart.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-advisorynotifications/samples/test/quickstart.js` + + + + + + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=samples/README.md +[product-docs]: https://cloud.google.com/advisory-notifications/docs/overview diff --git a/packages/google-cloud-advisorynotifications/samples/generated/v1/advisory_notifications_service.get_notification.js b/packages/google-cloud-advisorynotifications/samples/generated/v1/advisory_notifications_service.get_notification.js new file mode 100644 index 00000000000..6125c5e3ec6 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/samples/generated/v1/advisory_notifications_service.get_notification.js @@ -0,0 +1,71 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START advisorynotifications_v1_generated_AdvisoryNotificationsService_GetNotification_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. A name of the notification to retrieve. + * Format: + * organizations/{organization}/locations/{location}/notifications/{notification}. + */ + // const name = 'abc123' + /** + * ISO code for requested localization language. If unset, will be + * interpereted as "en". If the requested language is valid, but not supported + * for this notification, English will be returned with an "Not applicable" + * LocalizationState. If the ISO code is invalid (i.e. not a real language), + * this RPC will throw an error. + */ + // const languageCode = 'abc123' + + // Imports the Advisorynotifications library + const {AdvisoryNotificationsServiceClient} = require('@google-cloud/advisorynotifications').v1; + + // Instantiates a client + const advisorynotificationsClient = new AdvisoryNotificationsServiceClient(); + + async function callGetNotification() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await advisorynotificationsClient.getNotification(request); + console.log(response); + } + + callGetNotification(); + // [END advisorynotifications_v1_generated_AdvisoryNotificationsService_GetNotification_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-advisorynotifications/samples/generated/v1/advisory_notifications_service.list_notifications.js b/packages/google-cloud-advisorynotifications/samples/generated/v1/advisory_notifications_service.list_notifications.js new file mode 100644 index 00000000000..8714c815949 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/samples/generated/v1/advisory_notifications_service.list_notifications.js @@ -0,0 +1,90 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START advisorynotifications_v1_generated_AdvisoryNotificationsService_ListNotifications_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of notifications. + * Must be of the form "organizations/{organization}/locations/{location}". + */ + // const parent = 'abc123' + /** + * The maximum number of notifications to return. The service may return + * fewer than this value. If unspecified or equal to 0, at most 50 + * notifications will be returned. The maximum value is 50; values above 50 + * will be coerced to 50. + */ + // const pageSize = 1234 + /** + * A page token returned from a previous request. + * When paginating, all other parameters provided in the request + * must match the call that returned the page token. + */ + // const pageToken = 'abc123' + /** + * Specifies which parts of the notification resource should be returned + * in the response. + */ + // const view = {} + /** + * ISO code for requested localization language. If unset, will be + * interpereted as "en". If the requested language is valid, but not supported + * for this notification, English will be returned with an "Not applicable" + * LocalizationState. If the ISO code is invalid (i.e. not a real language), + * this RPC will throw an error. + */ + // const languageCode = 'abc123' + + // Imports the Advisorynotifications library + const {AdvisoryNotificationsServiceClient} = require('@google-cloud/advisorynotifications').v1; + + // Instantiates a client + const advisorynotificationsClient = new AdvisoryNotificationsServiceClient(); + + async function callListNotifications() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await advisorynotificationsClient.listNotificationsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListNotifications(); + // [END advisorynotifications_v1_generated_AdvisoryNotificationsService_ListNotifications_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-advisorynotifications/samples/generated/v1/snippet_metadata.google.cloud.advisorynotifications.v1.json b/packages/google-cloud-advisorynotifications/samples/generated/v1/snippet_metadata.google.cloud.advisorynotifications.v1.json new file mode 100644 index 00000000000..18bf3fb3780 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/samples/generated/v1/snippet_metadata.google.cloud.advisorynotifications.v1.json @@ -0,0 +1,115 @@ +{ + "clientLibrary": { + "name": "nodejs-advisorynotifications", + "version": "0.0.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.advisorynotifications.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "advisorynotifications_v1_generated_AdvisoryNotificationsService_ListNotifications_async", + "title": "AdvisoryNotificationsService listNotifications Sample", + "origin": "API_DEFINITION", + "description": " Lists notifications under a given parent.", + "canonical": true, + "file": "advisory_notifications_service.list_notifications.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListNotifications", + "fullName": "google.cloud.advisorynotifications.v1.AdvisoryNotificationsService.ListNotifications", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.advisorynotifications.v1.NotificationView" + }, + { + "name": "language_code", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.advisorynotifications.v1.ListNotificationsResponse", + "client": { + "shortName": "AdvisoryNotificationsServiceClient", + "fullName": "google.cloud.advisorynotifications.v1.AdvisoryNotificationsServiceClient" + }, + "method": { + "shortName": "ListNotifications", + "fullName": "google.cloud.advisorynotifications.v1.AdvisoryNotificationsService.ListNotifications", + "service": { + "shortName": "AdvisoryNotificationsService", + "fullName": "google.cloud.advisorynotifications.v1.AdvisoryNotificationsService" + } + } + } + }, + { + "regionTag": "advisorynotifications_v1_generated_AdvisoryNotificationsService_GetNotification_async", + "title": "AdvisoryNotificationsService getNotification Sample", + "origin": "API_DEFINITION", + "description": " Gets a notification.", + "canonical": true, + "file": "advisory_notifications_service.get_notification.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetNotification", + "fullName": "google.cloud.advisorynotifications.v1.AdvisoryNotificationsService.GetNotification", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "language_code", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.advisorynotifications.v1.Notification", + "client": { + "shortName": "AdvisoryNotificationsServiceClient", + "fullName": "google.cloud.advisorynotifications.v1.AdvisoryNotificationsServiceClient" + }, + "method": { + "shortName": "GetNotification", + "fullName": "google.cloud.advisorynotifications.v1.AdvisoryNotificationsService.GetNotification", + "service": { + "shortName": "AdvisoryNotificationsService", + "fullName": "google.cloud.advisorynotifications.v1.AdvisoryNotificationsService" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/google-cloud-advisorynotifications/samples/package.json b/packages/google-cloud-advisorynotifications/samples/package.json new file mode 100644 index 00000000000..d0ccef77575 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/samples/package.json @@ -0,0 +1,24 @@ +{ + "name": "advisorynotifications-samples", + "private": true, + "license": "Apache-2.0", + "author": "Google LLC", + "engines": { + "node": ">=12.0.0" + }, + "files": [ + "*.js" + ], + "scripts": { + "test": "c8 mocha --timeout 600000 test/*.js", + "publish": "echo 'sample test; do not publish'" + }, + "dependencies": { + "@google-cloud/advisorynotifications": "0.0.0" + }, + "devDependencies": { + "c8": "^7.1.0", + "chai": "^4.2.0", + "mocha": "^8.0.0" + } +} diff --git a/packages/google-cloud-advisorynotifications/samples/quickstart.js b/packages/google-cloud-advisorynotifications/samples/quickstart.js new file mode 100644 index 00000000000..e5727ea61c4 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/samples/quickstart.js @@ -0,0 +1,91 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +function main(parent) { + // [START advisorynotifications_quickstart] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of notifications. + * Must be of the form "organizations/{organization}/locations/{location}". + */ + // const parent = 'abc123' + /** + * The maximum number of notifications to return. The service may return + * fewer than this value. If unspecified or equal to 0, at most 50 + * notifications will be returned. The maximum value is 50; values above 50 + * will be coerced to 50. + */ + // const pageSize = 1234 + /** + * A page token returned from a previous request. + * When paginating, all other parameters provided in the request + * must match the call that returned the page token. + */ + // const pageToken = 'abc123' + /** + * Specifies which parts of the notification resource should be returned + * in the response. + */ + // const view = {} + /** + * ISO code for requested localization language. If unset, will be + * interpereted as "en". If the requested language is valid, but not supported + * for this notification, English will be returned with an "Not applicable" + * LocalizationState. If the ISO code is invalid (i.e. not a real language), + * this RPC will throw an error. + */ + // const languageCode = 'abc123' + + // Imports the Advisorynotifications library + const {AdvisoryNotificationsServiceClient} = + require('@google-cloud/advisorynotifications').v1; + + // Instantiates a client + const advisorynotificationsClient = new AdvisoryNotificationsServiceClient(); + + async function callListNotifications() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await advisorynotificationsClient.listNotificationsAsync( + request + ); + for await (const response of iterable) { + console.log(response); + } + } + + callListNotifications(); + // [END advisorynotifications_quickstart] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-advisorynotifications/samples/test/quickstart.js b/packages/google-cloud-advisorynotifications/samples/test/quickstart.js new file mode 100644 index 00000000000..db4e13f96d9 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/samples/test/quickstart.js @@ -0,0 +1,26 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +// describe('Quickstart', () => { +// Cannot run this test since we do not have these permissions on google org +// it('should run quickstart', async () => { +// const output = execSync( +// 'node ./quickstart.js organizations/433637338589/locations/us-central1', +// {cwd} +// ); +// assert(output !== null); +// }); +// }); diff --git a/packages/google-cloud-advisorynotifications/src/index.ts b/packages/google-cloud-advisorynotifications/src/index.ts new file mode 100644 index 00000000000..62206d0483a --- /dev/null +++ b/packages/google-cloud-advisorynotifications/src/index.ts @@ -0,0 +1,28 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by synthtool. ** +// ** https://github.com/googleapis/synthtool ** +// ** All changes to this file may be overwritten. ** + +import * as v1 from './v1'; + +const AdvisoryNotificationsServiceClient = + v1.AdvisoryNotificationsServiceClient; +type AdvisoryNotificationsServiceClient = v1.AdvisoryNotificationsServiceClient; + +export {v1, AdvisoryNotificationsServiceClient}; +export default {v1, AdvisoryNotificationsServiceClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-cloud-advisorynotifications/src/v1/advisory_notifications_service_client.ts b/packages/google-cloud-advisorynotifications/src/v1/advisory_notifications_service_client.ts new file mode 100644 index 00000000000..041dc2c6872 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/src/v1/advisory_notifications_service_client.ts @@ -0,0 +1,816 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + GaxCall, +} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/advisory_notifications_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './advisory_notifications_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service to manage Security and Privacy Notifications. + * @class + * @memberof v1 + */ +export class AdvisoryNotificationsServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + advisoryNotificationsServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of AdvisoryNotificationsServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @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 AdvisoryNotificationsServiceClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this + .constructor as typeof AdvisoryNotificationsServiceClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + locationPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}' + ), + notificationPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/notifications/{notification}' + ), + organizationPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}' + ), + }; + + // 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 = { + listNotifications: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'notifications' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.advisorynotifications.v1.AdvisoryNotificationsService', + 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.advisoryNotificationsServiceStub) { + return this.advisoryNotificationsServiceStub; + } + + // Put together the "service stub" for + // google.cloud.advisorynotifications.v1.AdvisoryNotificationsService. + this.advisoryNotificationsServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.advisorynotifications.v1.AdvisoryNotificationsService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.advisorynotifications.v1 + .AdvisoryNotificationsService, + 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 advisoryNotificationsServiceStubMethods = [ + 'listNotifications', + 'getNotification', + ]; + for (const methodName of advisoryNotificationsServiceStubMethods) { + const callPromise = this.advisoryNotificationsServiceStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = this.descriptors.page[methodName] || undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.advisoryNotificationsServiceStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'advisorynotifications.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'advisorynotifications.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Gets a notification. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. A name of the notification to retrieve. + * Format: + * organizations/{organization}/locations/{location}/notifications/{notification}. + * @param {string} request.languageCode + * ISO code for requested localization language. If unset, will be + * interpereted as "en". If the requested language is valid, but not supported + * for this notification, English will be returned with an "Not applicable" + * LocalizationState. If the ISO code is invalid (i.e. not a real language), + * this RPC will throw an error. + * @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.advisorynotifications.v1.Notification | Notification}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/advisory_notifications_service.get_notification.js + * region_tag:advisorynotifications_v1_generated_AdvisoryNotificationsService_GetNotification_async + */ + getNotification( + request?: protos.google.cloud.advisorynotifications.v1.IGetNotificationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.advisorynotifications.v1.INotification, + ( + | protos.google.cloud.advisorynotifications.v1.IGetNotificationRequest + | undefined + ), + {} | undefined + ] + >; + getNotification( + request: protos.google.cloud.advisorynotifications.v1.IGetNotificationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.advisorynotifications.v1.INotification, + | protos.google.cloud.advisorynotifications.v1.IGetNotificationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getNotification( + request: protos.google.cloud.advisorynotifications.v1.IGetNotificationRequest, + callback: Callback< + protos.google.cloud.advisorynotifications.v1.INotification, + | protos.google.cloud.advisorynotifications.v1.IGetNotificationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getNotification( + request?: protos.google.cloud.advisorynotifications.v1.IGetNotificationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.advisorynotifications.v1.INotification, + | protos.google.cloud.advisorynotifications.v1.IGetNotificationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.advisorynotifications.v1.INotification, + | protos.google.cloud.advisorynotifications.v1.IGetNotificationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.advisorynotifications.v1.INotification, + ( + | protos.google.cloud.advisorynotifications.v1.IGetNotificationRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getNotification(request, options, callback); + } + + /** + * Lists notifications under a given parent. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of notifications. + * Must be of the form "organizations/{organization}/locations/{location}". + * @param {number} request.pageSize + * The maximum number of notifications to return. The service may return + * fewer than this value. If unspecified or equal to 0, at most 50 + * notifications will be returned. The maximum value is 50; values above 50 + * will be coerced to 50. + * @param {string} request.pageToken + * A page token returned from a previous request. + * When paginating, all other parameters provided in the request + * must match the call that returned the page token. + * @param {google.cloud.advisorynotifications.v1.NotificationView} request.view + * Specifies which parts of the notification resource should be returned + * in the response. + * @param {string} request.languageCode + * ISO code for requested localization language. If unset, will be + * interpereted as "en". If the requested language is valid, but not supported + * for this notification, English will be returned with an "Not applicable" + * LocalizationState. If the ISO code is invalid (i.e. not a real language), + * this RPC will throw an error. + * @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 google.cloud.advisorynotifications.v1.Notification | Notification}. + * 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 `listNotificationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listNotifications( + request?: protos.google.cloud.advisorynotifications.v1.IListNotificationsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.advisorynotifications.v1.INotification[], + protos.google.cloud.advisorynotifications.v1.IListNotificationsRequest | null, + protos.google.cloud.advisorynotifications.v1.IListNotificationsResponse + ] + >; + listNotifications( + request: protos.google.cloud.advisorynotifications.v1.IListNotificationsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.advisorynotifications.v1.IListNotificationsRequest, + | protos.google.cloud.advisorynotifications.v1.IListNotificationsResponse + | null + | undefined, + protos.google.cloud.advisorynotifications.v1.INotification + > + ): void; + listNotifications( + request: protos.google.cloud.advisorynotifications.v1.IListNotificationsRequest, + callback: PaginationCallback< + protos.google.cloud.advisorynotifications.v1.IListNotificationsRequest, + | protos.google.cloud.advisorynotifications.v1.IListNotificationsResponse + | null + | undefined, + protos.google.cloud.advisorynotifications.v1.INotification + > + ): void; + listNotifications( + request?: protos.google.cloud.advisorynotifications.v1.IListNotificationsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.advisorynotifications.v1.IListNotificationsRequest, + | protos.google.cloud.advisorynotifications.v1.IListNotificationsResponse + | null + | undefined, + protos.google.cloud.advisorynotifications.v1.INotification + >, + callback?: PaginationCallback< + protos.google.cloud.advisorynotifications.v1.IListNotificationsRequest, + | protos.google.cloud.advisorynotifications.v1.IListNotificationsResponse + | null + | undefined, + protos.google.cloud.advisorynotifications.v1.INotification + > + ): Promise< + [ + protos.google.cloud.advisorynotifications.v1.INotification[], + protos.google.cloud.advisorynotifications.v1.IListNotificationsRequest | null, + protos.google.cloud.advisorynotifications.v1.IListNotificationsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listNotifications(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of notifications. + * Must be of the form "organizations/{organization}/locations/{location}". + * @param {number} request.pageSize + * The maximum number of notifications to return. The service may return + * fewer than this value. If unspecified or equal to 0, at most 50 + * notifications will be returned. The maximum value is 50; values above 50 + * will be coerced to 50. + * @param {string} request.pageToken + * A page token returned from a previous request. + * When paginating, all other parameters provided in the request + * must match the call that returned the page token. + * @param {google.cloud.advisorynotifications.v1.NotificationView} request.view + * Specifies which parts of the notification resource should be returned + * in the response. + * @param {string} request.languageCode + * ISO code for requested localization language. If unset, will be + * interpereted as "en". If the requested language is valid, but not supported + * for this notification, English will be returned with an "Not applicable" + * LocalizationState. If the ISO code is invalid (i.e. not a real language), + * this RPC will throw an error. + * @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 google.cloud.advisorynotifications.v1.Notification | Notification} 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 `listNotificationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listNotificationsStream( + request?: protos.google.cloud.advisorynotifications.v1.IListNotificationsRequest, + 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['listNotifications']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listNotifications.createStream( + this.innerApiCalls.listNotifications as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listNotifications`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of notifications. + * Must be of the form "organizations/{organization}/locations/{location}". + * @param {number} request.pageSize + * The maximum number of notifications to return. The service may return + * fewer than this value. If unspecified or equal to 0, at most 50 + * notifications will be returned. The maximum value is 50; values above 50 + * will be coerced to 50. + * @param {string} request.pageToken + * A page token returned from a previous request. + * When paginating, all other parameters provided in the request + * must match the call that returned the page token. + * @param {google.cloud.advisorynotifications.v1.NotificationView} request.view + * Specifies which parts of the notification resource should be returned + * in the response. + * @param {string} request.languageCode + * ISO code for requested localization language. If unset, will be + * interpereted as "en". If the requested language is valid, but not supported + * for this notification, English will be returned with an "Not applicable" + * LocalizationState. If the ISO code is invalid (i.e. not a real language), + * this RPC will throw an error. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.advisorynotifications.v1.Notification | Notification}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/advisory_notifications_service.list_notifications.js + * region_tag:advisorynotifications_v1_generated_AdvisoryNotificationsService_ListNotifications_async + */ + listNotificationsAsync( + request?: protos.google.cloud.advisorynotifications.v1.IListNotificationsRequest, + 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['listNotifications']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listNotifications.asyncIterate( + this.innerApiCalls['listNotifications'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} organization + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(organization: string, location: string) { + return this.pathTemplates.locationPathTemplate.render({ + organization: organization, + location: location, + }); + } + + /** + * Parse the organization from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName) + .organization; + } + + /** + * 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 notification resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} notification + * @returns {string} Resource name string. + */ + notificationPath( + organization: string, + location: string, + notification: string + ) { + return this.pathTemplates.notificationPathTemplate.render({ + organization: organization, + location: location, + notification: notification, + }); + } + + /** + * Parse the organization from Notification resource. + * + * @param {string} notificationName + * A fully-qualified path representing Notification resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromNotificationName(notificationName: string) { + return this.pathTemplates.notificationPathTemplate.match(notificationName) + .organization; + } + + /** + * Parse the location from Notification resource. + * + * @param {string} notificationName + * A fully-qualified path representing Notification resource. + * @returns {string} A string representing the location. + */ + matchLocationFromNotificationName(notificationName: string) { + return this.pathTemplates.notificationPathTemplate.match(notificationName) + .location; + } + + /** + * Parse the notification from Notification resource. + * + * @param {string} notificationName + * A fully-qualified path representing Notification resource. + * @returns {string} A string representing the notification. + */ + matchNotificationFromNotificationName(notificationName: string) { + return this.pathTemplates.notificationPathTemplate.match(notificationName) + .notification; + } + + /** + * Return a fully-qualified organization resource name string. + * + * @param {string} organization + * @returns {string} Resource name string. + */ + organizationPath(organization: string) { + return this.pathTemplates.organizationPathTemplate.render({ + organization: organization, + }); + } + + /** + * Parse the organization from Organization resource. + * + * @param {string} organizationName + * A fully-qualified path representing Organization resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationName(organizationName: string) { + return this.pathTemplates.organizationPathTemplate.match(organizationName) + .organization; + } + + /** + * 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.advisoryNotificationsServiceStub && !this._terminated) { + return this.advisoryNotificationsServiceStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-advisorynotifications/src/v1/advisory_notifications_service_client_config.json b/packages/google-cloud-advisorynotifications/src/v1/advisory_notifications_service_client_config.json new file mode 100644 index 00000000000..734b5e7ee86 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/src/v1/advisory_notifications_service_client_config.json @@ -0,0 +1,48 @@ +{ + "interfaces": { + "google.cloud.advisorynotifications.v1.AdvisoryNotificationsService": { + "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": { + "ListNotifications": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetNotification": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + } + } + } + } +} diff --git a/packages/google-cloud-advisorynotifications/src/v1/advisory_notifications_service_proto_list.json b/packages/google-cloud-advisorynotifications/src/v1/advisory_notifications_service_proto_list.json new file mode 100644 index 00000000000..ba37b79fdb6 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/src/v1/advisory_notifications_service_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/cloud/advisorynotifications/v1/service.proto" +] diff --git a/packages/google-cloud-advisorynotifications/src/v1/gapic_metadata.json b/packages/google-cloud-advisorynotifications/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..37bd989c792 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/src/v1/gapic_metadata.json @@ -0,0 +1,47 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.advisorynotifications.v1", + "libraryPackage": "@google-cloud/advisorynotifications", + "services": { + "AdvisoryNotificationsService": { + "clients": { + "grpc": { + "libraryClient": "AdvisoryNotificationsServiceClient", + "rpcs": { + "GetNotification": { + "methods": [ + "getNotification" + ] + }, + "ListNotifications": { + "methods": [ + "listNotifications", + "listNotificationsStream", + "listNotificationsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "AdvisoryNotificationsServiceClient", + "rpcs": { + "GetNotification": { + "methods": [ + "getNotification" + ] + }, + "ListNotifications": { + "methods": [ + "listNotifications", + "listNotificationsStream", + "listNotificationsAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-advisorynotifications/src/v1/index.ts b/packages/google-cloud-advisorynotifications/src/v1/index.ts new file mode 100644 index 00000000000..c23e444c25b --- /dev/null +++ b/packages/google-cloud-advisorynotifications/src/v1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {AdvisoryNotificationsServiceClient} from './advisory_notifications_service_client'; diff --git a/packages/google-cloud-advisorynotifications/system-test/fixtures/sample/src/index.js b/packages/google-cloud-advisorynotifications/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..666ea6f6561 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 advisorynotifications = require('@google-cloud/advisorynotifications'); + +function main() { + const advisoryNotificationsServiceClient = + new advisorynotifications.AdvisoryNotificationsServiceClient(); +} + +main(); diff --git a/packages/google-cloud-advisorynotifications/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-advisorynotifications/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..3d831cfee94 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,37 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {AdvisoryNotificationsServiceClient} from '@google-cloud/advisorynotifications'; + +// check that the client class type name can be used +function doStuffWithAdvisoryNotificationsServiceClient( + client: AdvisoryNotificationsServiceClient +) { + client.close(); +} + +function main() { + // check that the client instance can be created + const advisoryNotificationsServiceClient = + new AdvisoryNotificationsServiceClient(); + doStuffWithAdvisoryNotificationsServiceClient( + advisoryNotificationsServiceClient + ); +} + +main(); diff --git a/packages/google-cloud-advisorynotifications/system-test/install.ts b/packages/google-cloud-advisorynotifications/system-test/install.ts new file mode 100644 index 00000000000..f61fe236476 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/system-test/install.ts @@ -0,0 +1,51 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + it('TypeScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts' + ).toString(), + }, + }; + await packNTest(options); + }); + + it('JavaScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync( + './system-test/fixtures/sample/src/index.js' + ).toString(), + }, + }; + await packNTest(options); + }); +}); diff --git a/packages/google-cloud-advisorynotifications/test/gapic_advisory_notifications_service_v1.ts b/packages/google-cloud-advisorynotifications/test/gapic_advisory_notifications_service_v1.ts new file mode 100644 index 00000000000..296c2a99e94 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/test/gapic_advisory_notifications_service_v1.ts @@ -0,0 +1,915 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as advisorynotificationsserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.AdvisoryNotificationsServiceClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + advisorynotificationsserviceModule.v1.AdvisoryNotificationsServiceClient + .servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + advisorynotificationsserviceModule.v1.AdvisoryNotificationsServiceClient + .apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = + advisorynotificationsserviceModule.v1.AdvisoryNotificationsServiceClient + .port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = + new advisorynotificationsserviceModule.v1.AdvisoryNotificationsServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = + new advisorynotificationsserviceModule.v1.AdvisoryNotificationsServiceClient( + { + fallback: true, + } + ); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = + new advisorynotificationsserviceModule.v1.AdvisoryNotificationsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.advisoryNotificationsServiceStub, undefined); + await client.initialize(); + assert(client.advisoryNotificationsServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = + new advisorynotificationsserviceModule.v1.AdvisoryNotificationsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + assert(client.advisoryNotificationsServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = + new advisorynotificationsserviceModule.v1.AdvisoryNotificationsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.advisoryNotificationsServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new advisorynotificationsserviceModule.v1.AdvisoryNotificationsServiceClient( + { + 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 advisorynotificationsserviceModule.v1.AdvisoryNotificationsServiceClient( + { + 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('getNotification', () => { + it('invokes getNotification without error', async () => { + const client = + new advisorynotificationsserviceModule.v1.AdvisoryNotificationsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.advisorynotifications.v1.GetNotificationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.advisorynotifications.v1.GetNotificationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.advisorynotifications.v1.Notification() + ); + client.innerApiCalls.getNotification = stubSimpleCall(expectedResponse); + const [response] = await client.getNotification(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getNotification as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getNotification as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getNotification without error using callback', async () => { + const client = + new advisorynotificationsserviceModule.v1.AdvisoryNotificationsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.advisorynotifications.v1.GetNotificationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.advisorynotifications.v1.GetNotificationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.advisorynotifications.v1.Notification() + ); + client.innerApiCalls.getNotification = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getNotification( + request, + ( + err?: Error | null, + result?: protos.google.cloud.advisorynotifications.v1.INotification | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getNotification as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getNotification as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getNotification with error', async () => { + const client = + new advisorynotificationsserviceModule.v1.AdvisoryNotificationsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.advisorynotifications.v1.GetNotificationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.advisorynotifications.v1.GetNotificationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getNotification = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getNotification(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getNotification as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getNotification as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getNotification with closed client', async () => { + const client = + new advisorynotificationsserviceModule.v1.AdvisoryNotificationsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.advisorynotifications.v1.GetNotificationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.advisorynotifications.v1.GetNotificationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getNotification(request), expectedError); + }); + }); + + describe('listNotifications', () => { + it('invokes listNotifications without error', async () => { + const client = + new advisorynotificationsserviceModule.v1.AdvisoryNotificationsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.advisorynotifications.v1.ListNotificationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.advisorynotifications.v1.ListNotificationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.advisorynotifications.v1.Notification() + ), + generateSampleMessage( + new protos.google.cloud.advisorynotifications.v1.Notification() + ), + generateSampleMessage( + new protos.google.cloud.advisorynotifications.v1.Notification() + ), + ]; + client.innerApiCalls.listNotifications = stubSimpleCall(expectedResponse); + const [response] = await client.listNotifications(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listNotifications as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listNotifications as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listNotifications without error using callback', async () => { + const client = + new advisorynotificationsserviceModule.v1.AdvisoryNotificationsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.advisorynotifications.v1.ListNotificationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.advisorynotifications.v1.ListNotificationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.advisorynotifications.v1.Notification() + ), + generateSampleMessage( + new protos.google.cloud.advisorynotifications.v1.Notification() + ), + generateSampleMessage( + new protos.google.cloud.advisorynotifications.v1.Notification() + ), + ]; + client.innerApiCalls.listNotifications = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listNotifications( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.advisorynotifications.v1.INotification[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listNotifications as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listNotifications as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listNotifications with error', async () => { + const client = + new advisorynotificationsserviceModule.v1.AdvisoryNotificationsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.advisorynotifications.v1.ListNotificationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.advisorynotifications.v1.ListNotificationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listNotifications = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listNotifications(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listNotifications as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listNotifications as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listNotificationsStream without error', async () => { + const client = + new advisorynotificationsserviceModule.v1.AdvisoryNotificationsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.advisorynotifications.v1.ListNotificationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.advisorynotifications.v1.ListNotificationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.advisorynotifications.v1.Notification() + ), + generateSampleMessage( + new protos.google.cloud.advisorynotifications.v1.Notification() + ), + generateSampleMessage( + new protos.google.cloud.advisorynotifications.v1.Notification() + ), + ]; + client.descriptors.page.listNotifications.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listNotificationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.advisorynotifications.v1.Notification[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.advisorynotifications.v1.Notification + ) => { + 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.listNotifications.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listNotifications, request) + ); + assert( + (client.descriptors.page.listNotifications.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listNotificationsStream with error', async () => { + const client = + new advisorynotificationsserviceModule.v1.AdvisoryNotificationsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.advisorynotifications.v1.ListNotificationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.advisorynotifications.v1.ListNotificationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listNotifications.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listNotificationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.advisorynotifications.v1.Notification[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.advisorynotifications.v1.Notification + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listNotifications.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listNotifications, request) + ); + assert( + (client.descriptors.page.listNotifications.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listNotifications without error', async () => { + const client = + new advisorynotificationsserviceModule.v1.AdvisoryNotificationsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.advisorynotifications.v1.ListNotificationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.advisorynotifications.v1.ListNotificationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.advisorynotifications.v1.Notification() + ), + generateSampleMessage( + new protos.google.cloud.advisorynotifications.v1.Notification() + ), + generateSampleMessage( + new protos.google.cloud.advisorynotifications.v1.Notification() + ), + ]; + client.descriptors.page.listNotifications.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.advisorynotifications.v1.INotification[] = + []; + const iterable = client.listNotificationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listNotifications.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listNotifications.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listNotifications with error', async () => { + const client = + new advisorynotificationsserviceModule.v1.AdvisoryNotificationsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.advisorynotifications.v1.ListNotificationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.advisorynotifications.v1.ListNotificationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listNotifications.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listNotificationsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.advisorynotifications.v1.INotification[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listNotifications.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listNotifications.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + organization: 'organizationValue', + location: 'locationValue', + }; + const client = + new advisorynotificationsserviceModule.v1.AdvisoryNotificationsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath( + 'organizationValue', + 'locationValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromLocationName', () => { + const result = client.matchOrganizationFromLocationName(fakePath); + assert.strictEqual(result, 'organizationValue'); + 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('notification', () => { + const fakePath = '/rendered/path/notification'; + const expectedParameters = { + organization: 'organizationValue', + location: 'locationValue', + notification: 'notificationValue', + }; + const client = + new advisorynotificationsserviceModule.v1.AdvisoryNotificationsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.notificationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.notificationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('notificationPath', () => { + const result = client.notificationPath( + 'organizationValue', + 'locationValue', + 'notificationValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.notificationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromNotificationName', () => { + const result = client.matchOrganizationFromNotificationName(fakePath); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.notificationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromNotificationName', () => { + const result = client.matchLocationFromNotificationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.notificationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNotificationFromNotificationName', () => { + const result = client.matchNotificationFromNotificationName(fakePath); + assert.strictEqual(result, 'notificationValue'); + assert( + (client.pathTemplates.notificationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organization', () => { + const fakePath = '/rendered/path/organization'; + const expectedParameters = { + organization: 'organizationValue', + }; + const client = + new advisorynotificationsserviceModule.v1.AdvisoryNotificationsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.organizationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationPath', () => { + const result = client.organizationPath('organizationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationName', () => { + const result = client.matchOrganizationFromOrganizationName(fakePath); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-advisorynotifications/tsconfig.json b/packages/google-cloud-advisorynotifications/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/packages/google-cloud-advisorynotifications/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2018", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/packages/google-cloud-advisorynotifications/webpack.config.js b/packages/google-cloud-advisorynotifications/webpack.config.js new file mode 100644 index 00000000000..0e30abd91ff --- /dev/null +++ b/packages/google-cloud-advisorynotifications/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: 'AdvisoryNotificationsService', + filename: './advisory-notifications-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 ed5cd7095a7..67f44fe3e1d 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -132,6 +132,7 @@ "packages/google-privacy-dlp": {}, "packages/google-storagetransfer": {}, "packages/grafeas": {}, + "packages/google-cloud-advisorynotifications": {}, "packages/typeless-sample-bot": {} }, "plugins": [ From 8deb37b84bbe64e5b87fa5d80b5838f180fb9690 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 28 Feb 2023 14:46:09 -0800 Subject: [PATCH 55/80] chore: release main (#4022) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: release main * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 7 +-- changelog.json | 53 ++++++++++++++++++- packages/google-analytics-admin/CHANGELOG.md | 7 +++ packages/google-analytics-admin/package.json | 2 +- ...tadata.google.analytics.admin.v1alpha.json | 2 +- ...etadata.google.analytics.admin.v1beta.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 8 +++ .../package.json | 2 +- ...google.cloud.advisorynotifications.v1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-speech/CHANGELOG.md | 7 +++ packages/google-cloud-speech/package.json | 2 +- ...ippet_metadata.google.cloud.speech.v1.json | 2 +- ...etadata.google.cloud.speech.v1p1beta1.json | 2 +- ...ippet_metadata.google.cloud.speech.v2.json | 2 +- .../google-cloud-speech/samples/package.json | 2 +- 17 files changed, 90 insertions(+), 16 deletions(-) create mode 100644 packages/google-cloud-advisorynotifications/CHANGELOG.md diff --git a/.release-please-manifest.json b/.release-please-manifest.json index dec7a811bbe..b0fa3ce343f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,6 +1,6 @@ { "packages/gapic-node-templating": "0.0.0", - "packages/google-analytics-admin": "4.5.1", + "packages/google-analytics-admin": "4.6.0", "packages/google-analytics-data": "3.2.1", "packages/google-api-apikeys": "0.2.1", "packages/google-api-servicecontrol": "2.1.1", @@ -99,7 +99,7 @@ "packages/google-cloud-securitycenter": "7.2.1", "packages/google-cloud-servicedirectory": "4.0.6", "packages/google-cloud-shell": "2.1.1", - "packages/google-cloud-speech": "5.3.1", + "packages/google-cloud-speech": "5.4.0", "packages/google-cloud-talent": "5.1.1", "packages/google-cloud-tasks": "3.1.1", "packages/google-cloud-texttospeech": "4.2.1", @@ -131,5 +131,6 @@ "packages/google-privacy-dlp": "4.4.1", "packages/google-storagetransfer": "2.3.1", "packages/grafeas": "4.2.2", - "packages/typeless-sample-bot": "1.3.0" + "packages/typeless-sample-bot": "1.3.0", + "packages/google-cloud-advisorynotifications": "0.1.0" } diff --git a/changelog.json b/changelog.json index 6afc58d9688..b8ba1807554 100644 --- a/changelog.json +++ b/changelog.json @@ -1,6 +1,57 @@ { "repository": "googleapis/google-cloud-node", "entries": [ + { + "changes": [ + { + "type": "feat", + "sha": "310c189c2af21be7363880206200f24c2ec60fbe", + "message": "Add initial files for google.cloud.advisorynotifications.v1", + "issues": [ + "4012" + ] + } + ], + "version": "0.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/advisorynotifications", + "id": "79b4fe57-8379-457d-bda4-6b51ab5630cf", + "createTime": "2023-02-28T02:19:10.801Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c66276de5e7a2343913941abe373a339c84123bb", + "message": "Voice Activity Detection: adding speech event time and speech event type", + "issues": [ + "4020" + ] + } + ], + "version": "5.4.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/speech", + "id": "0b70b7b1-adbe-4974-8a77-4857e9bc4d5e", + "createTime": "2023-02-28T02:19:10.798Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "2dd56a77bc7bfcbfbbb5ba4beed27d918068fc79", + "message": "[analytics-admin] add `CreateAccessBinding`, `GetAccessBinding`, `UpdateAccessBinding`, `DeleteAccessBinding`, `ListAccessBindings`, `BatchCreateAccessBindings`, `BatchGetAccessBindings`, `BatchUpdateAccessBindings`, `BatchDeleteAccessBindings` m...", + "issues": [ + "4001" + ] + } + ], + "version": "4.6.0", + "language": "JAVASCRIPT", + "artifactName": "@google-analytics/admin", + "id": "97ec1ff2-31b0-4049-b837-d79f6ac9d737", + "createTime": "2023-02-28T02:19:10.796Z" + }, { "changes": [ { @@ -4231,5 +4282,5 @@ "createTime": "2023-01-28T04:18:24.718Z" } ], - "updateTime": "2023-02-23T20:30:56.022Z" + "updateTime": "2023-02-28T02:19:10.801Z" } \ No newline at end of file diff --git a/packages/google-analytics-admin/CHANGELOG.md b/packages/google-analytics-admin/CHANGELOG.md index e1e35e59fc3..d22550bf3b6 100644 --- a/packages/google-analytics-admin/CHANGELOG.md +++ b/packages/google-analytics-admin/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.6.0](https://github.com/googleapis/google-cloud-node/compare/admin-v4.5.1...admin-v4.6.0) (2023-02-28) + + +### Features + +* [analytics-admin] add `CreateAccessBinding`, `GetAccessBinding`, `UpdateAccessBinding`, `DeleteAccessBinding`, `ListAccessBindings`, `BatchCreateAccessBindings`, `BatchGetAccessBindings`, `BatchUpdateAccessBindings`, `BatchDeleteAccessBindings` m... ([#4001](https://github.com/googleapis/google-cloud-node/issues/4001)) ([2dd56a7](https://github.com/googleapis/google-cloud-node/commit/2dd56a77bc7bfcbfbbb5ba4beed27d918068fc79)) + ## [4.5.1](https://github.com/googleapis/google-cloud-node/compare/admin-v4.5.0...admin-v4.5.1) (2023-02-15) diff --git a/packages/google-analytics-admin/package.json b/packages/google-analytics-admin/package.json index 16b813c5926..7f2a4418725 100644 --- a/packages/google-analytics-admin/package.json +++ b/packages/google-analytics-admin/package.json @@ -1,6 +1,6 @@ { "name": "@google-analytics/admin", - "version": "4.5.1", + "version": "4.6.0", "description": "Admin client for Node.js", "repository": { "type": "git", diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata.google.analytics.admin.v1alpha.json b/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata.google.analytics.admin.v1alpha.json index f527af1fd48..494d923e343 100644 --- a/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata.google.analytics.admin.v1alpha.json +++ b/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata.google.analytics.admin.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-admin", - "version": "4.5.1", + "version": "4.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata.google.analytics.admin.v1beta.json b/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata.google.analytics.admin.v1beta.json index 744e20b0981..330acb5f214 100644 --- a/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata.google.analytics.admin.v1beta.json +++ b/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata.google.analytics.admin.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-admin", - "version": "4.5.1", + "version": "4.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-analytics-admin/samples/package.json b/packages/google-analytics-admin/samples/package.json index 704d91194de..2e9a6746779 100644 --- a/packages/google-analytics-admin/samples/package.json +++ b/packages/google-analytics-admin/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-analytics/admin": "^4.5.1", + "@google-analytics/admin": "^4.6.0", "google-auth-library": "^8.0.0", "google-gax": "^3.0.0", "http": "0.0.1-security", diff --git a/packages/google-cloud-advisorynotifications/CHANGELOG.md b/packages/google-cloud-advisorynotifications/CHANGELOG.md new file mode 100644 index 00000000000..c6886c7cd30 --- /dev/null +++ b/packages/google-cloud-advisorynotifications/CHANGELOG.md @@ -0,0 +1,8 @@ +# Changelog + +## 0.1.0 (2023-02-28) + + +### Features + +* Add initial files for google.cloud.advisorynotifications.v1 ([#4012](https://github.com/googleapis/google-cloud-node/issues/4012)) ([310c189](https://github.com/googleapis/google-cloud-node/commit/310c189c2af21be7363880206200f24c2ec60fbe)) diff --git a/packages/google-cloud-advisorynotifications/package.json b/packages/google-cloud-advisorynotifications/package.json index 973902d1794..88e36d17192 100644 --- a/packages/google-cloud-advisorynotifications/package.json +++ b/packages/google-cloud-advisorynotifications/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/advisorynotifications", - "version": "0.0.0", + "version": "0.1.0", "description": "Advisory Notifications API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-advisorynotifications/samples/generated/v1/snippet_metadata.google.cloud.advisorynotifications.v1.json b/packages/google-cloud-advisorynotifications/samples/generated/v1/snippet_metadata.google.cloud.advisorynotifications.v1.json index 18bf3fb3780..f77b6d78c3d 100644 --- a/packages/google-cloud-advisorynotifications/samples/generated/v1/snippet_metadata.google.cloud.advisorynotifications.v1.json +++ b/packages/google-cloud-advisorynotifications/samples/generated/v1/snippet_metadata.google.cloud.advisorynotifications.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-advisorynotifications", - "version": "0.0.0", + "version": "0.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-advisorynotifications/samples/package.json b/packages/google-cloud-advisorynotifications/samples/package.json index d0ccef77575..caf432b6291 100644 --- a/packages/google-cloud-advisorynotifications/samples/package.json +++ b/packages/google-cloud-advisorynotifications/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/advisorynotifications": "0.0.0" + "@google-cloud/advisorynotifications": "^0.1.0" }, "devDependencies": { "c8": "^7.1.0", diff --git a/packages/google-cloud-speech/CHANGELOG.md b/packages/google-cloud-speech/CHANGELOG.md index b82e5f84548..91d176d8796 100644 --- a/packages/google-cloud-speech/CHANGELOG.md +++ b/packages/google-cloud-speech/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/speech?activeTab=versions +## [5.4.0](https://github.com/googleapis/google-cloud-node/compare/speech-v5.3.1...speech-v5.4.0) (2023-02-28) + + +### Features + +* Voice Activity Detection: adding speech event time and speech event type ([#4020](https://github.com/googleapis/google-cloud-node/issues/4020)) ([c66276d](https://github.com/googleapis/google-cloud-node/commit/c66276de5e7a2343913941abe373a339c84123bb)) + ## [5.3.1](https://github.com/googleapis/google-cloud-node/compare/speech-v5.3.0...speech-v5.3.1) (2023-02-15) diff --git a/packages/google-cloud-speech/package.json b/packages/google-cloud-speech/package.json index c87780bd455..c19f2771d0f 100644 --- a/packages/google-cloud-speech/package.json +++ b/packages/google-cloud-speech/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/speech", "description": "Cloud Speech Client Library for Node.js", - "version": "5.3.1", + "version": "5.4.0", "license": "Apache-2.0", "author": "Google Inc.", "engines": { diff --git a/packages/google-cloud-speech/samples/generated/v1/snippet_metadata.google.cloud.speech.v1.json b/packages/google-cloud-speech/samples/generated/v1/snippet_metadata.google.cloud.speech.v1.json index 4ba50b816ea..c47bc924f18 100644 --- a/packages/google-cloud-speech/samples/generated/v1/snippet_metadata.google.cloud.speech.v1.json +++ b/packages/google-cloud-speech/samples/generated/v1/snippet_metadata.google.cloud.speech.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-speech", - "version": "5.3.1", + "version": "5.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-speech/samples/generated/v1p1beta1/snippet_metadata.google.cloud.speech.v1p1beta1.json b/packages/google-cloud-speech/samples/generated/v1p1beta1/snippet_metadata.google.cloud.speech.v1p1beta1.json index 511126d9a0f..7f5bfded480 100644 --- a/packages/google-cloud-speech/samples/generated/v1p1beta1/snippet_metadata.google.cloud.speech.v1p1beta1.json +++ b/packages/google-cloud-speech/samples/generated/v1p1beta1/snippet_metadata.google.cloud.speech.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-speech", - "version": "5.3.1", + "version": "5.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-speech/samples/generated/v2/snippet_metadata.google.cloud.speech.v2.json b/packages/google-cloud-speech/samples/generated/v2/snippet_metadata.google.cloud.speech.v2.json index cae5606db48..1f7d60ddac1 100644 --- a/packages/google-cloud-speech/samples/generated/v2/snippet_metadata.google.cloud.speech.v2.json +++ b/packages/google-cloud-speech/samples/generated/v2/snippet_metadata.google.cloud.speech.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-speech", - "version": "5.3.1", + "version": "5.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-speech/samples/package.json b/packages/google-cloud-speech/samples/package.json index 48e0e74fe88..46386954987 100644 --- a/packages/google-cloud-speech/samples/package.json +++ b/packages/google-cloud-speech/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha test --timeout 600000" }, "dependencies": { - "@google-cloud/speech": "^5.3.1", + "@google-cloud/speech": "^5.4.0", "@google-cloud/storage": "^6.0.0", "chalk": "^5.0.0", "fs.promises": "^0.1.2", From 848506cf64206d3bd3da849e62d93214831b0332 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 1 Mar 2023 17:05:22 +0000 Subject: [PATCH 56/80] test: remove iot tests (#4036) See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- packages/google-cloud-iot/README.md | 1 - packages/google-cloud-iot/samples/README.md | 18 --------- .../snippet_metadata.google.cloud.iot.v1.json | 2 +- .../google-cloud-iot/samples/package.json | 2 +- .../samples/test/quickstart.test.js | 40 ------------------- 5 files changed, 2 insertions(+), 61 deletions(-) delete mode 100644 packages/google-cloud-iot/samples/test/quickstart.test.js diff --git a/packages/google-cloud-iot/README.md b/packages/google-cloud-iot/README.md index aeb3eeb79e1..950f31511ea 100644 --- a/packages/google-cloud-iot/README.md +++ b/packages/google-cloud-iot/README.md @@ -82,7 +82,6 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Device_manager.update_device | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-iot/samples/generated/v1/device_manager.update_device.js,samples/README.md) | | Device_manager.update_device_registry | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/generated/v1/device_manager.update_device_registry.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-iot/samples/generated/v1/device_manager.update_device_registry.js,samples/README.md) | | Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-iot/samples/quickstart.js,samples/README.md) | -| Quickstart.test | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/test/quickstart.test.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-iot/samples/test/quickstart.test.js,samples/README.md) | diff --git a/packages/google-cloud-iot/samples/README.md b/packages/google-cloud-iot/samples/README.md index 95c0380012a..26146722294 100644 --- a/packages/google-cloud-iot/samples/README.md +++ b/packages/google-cloud-iot/samples/README.md @@ -32,7 +32,6 @@ * [Device_manager.update_device](#device_manager.update_device) * [Device_manager.update_device_registry](#device_manager.update_device_registry) * [Quickstart](#quickstart) - * [Quickstart.test](#quickstart.test) ## Before you begin @@ -384,23 +383,6 @@ __Usage:__ `node packages/google-cloud-iot/samples/quickstart.js` ------ - - - - -### Quickstart.test - -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-iot/samples/test/quickstart.test.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-iot/samples/test/quickstart.test.js,samples/README.md) - -__Usage:__ - - -`node packages/google-cloud-iot/samples/test/quickstart.test.js` - - diff --git a/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json b/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json index 49474a497e2..f4740ff6e8f 100644 --- a/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json +++ b/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-iot", - "version": "3.2.0", + "version": "3.2.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index a6b9f3ae25d..494d920f39d 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -12,7 +12,7 @@ "repository": "googleapis/nodejs-iot", "private": true, "scripts": { - "test": "mocha test" + "test": "echo tests deprecated" }, "dependencies": { "@google-cloud/iot": "^3.2.1", diff --git a/packages/google-cloud-iot/samples/test/quickstart.test.js b/packages/google-cloud-iot/samples/test/quickstart.test.js deleted file mode 100644 index 823ea9d7cb2..00000000000 --- a/packages/google-cloud-iot/samples/test/quickstart.test.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const {describe, it, before} = require('mocha'); -const cp = require('child_process'); -const iot = require('@google-cloud/iot'); -const client = new iot.v1.DeviceManagerClient(); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -describe('iot samples', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run the quickstart', async () => { - const stdout = execSync( - `node quickstart projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(stdout !== null); - }); -}); From b1040adbc2bb4f127ba366e39379761d8f471ac1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 1 Mar 2023 14:13:02 -0500 Subject: [PATCH 57/80] chore: [dialogflow] Fix C# namespace option (#4032) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: Fix C# namespace option PiperOrigin-RevId: 512846092 Source-Link: https://github.com/googleapis/googleapis/commit/d70b70f665f3e2e86359abc37732ef2e038d1cd3 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d508dd55d30b9bfa16312a93052d9bda3dabc532 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3cvLk93bEJvdC55YW1sIiwiaCI6ImQ1MDhkZDU1ZDMwYjliZmExNjMxMmE5MzA1MmQ5YmRhM2RhYmM1MzIifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: danieljbruce --- .../protos/google/cloud/dialogflow/v2beta1/agent.proto | 2 +- .../protos/google/cloud/dialogflow/v2beta1/answer_record.proto | 2 +- .../protos/google/cloud/dialogflow/v2beta1/audio_config.proto | 2 +- .../protos/google/cloud/dialogflow/v2beta1/context.proto | 2 +- .../protos/google/cloud/dialogflow/v2beta1/conversation.proto | 2 +- .../google/cloud/dialogflow/v2beta1/conversation_event.proto | 2 +- .../google/cloud/dialogflow/v2beta1/conversation_profile.proto | 2 +- .../protos/google/cloud/dialogflow/v2beta1/document.proto | 2 +- .../protos/google/cloud/dialogflow/v2beta1/entity_type.proto | 2 +- .../protos/google/cloud/dialogflow/v2beta1/environment.proto | 2 +- .../protos/google/cloud/dialogflow/v2beta1/fulfillment.proto | 2 +- .../protos/google/cloud/dialogflow/v2beta1/gcs.proto | 2 +- .../cloud/dialogflow/v2beta1/human_agent_assistant_event.proto | 2 +- .../protos/google/cloud/dialogflow/v2beta1/intent.proto | 2 +- .../protos/google/cloud/dialogflow/v2beta1/knowledge_base.proto | 2 +- .../protos/google/cloud/dialogflow/v2beta1/participant.proto | 2 +- .../protos/google/cloud/dialogflow/v2beta1/session.proto | 2 +- .../google/cloud/dialogflow/v2beta1/session_entity_type.proto | 2 +- .../google/cloud/dialogflow/v2beta1/validation_result.proto | 2 +- .../protos/google/cloud/dialogflow/v2beta1/version.proto | 2 +- .../protos/google/cloud/dialogflow/v2beta1/webhook.proto | 2 +- packages/google-cloud-dialogflow/protos/protos.json | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/agent.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/agent.proto index 67ebcfc008b..47582f591aa 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/agent.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/agent.proto @@ -26,7 +26,7 @@ import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option csharp_namespace = "Google.Cloud.Dialogflow.V2Beta1"; option go_package = "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb;dialogflowpb"; option java_multiple_files = true; option java_outer_classname = "AgentProto"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/answer_record.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/answer_record.proto index 28aabf7fd95..2e1817581bf 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/answer_record.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/answer_record.proto @@ -25,7 +25,7 @@ import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option csharp_namespace = "Google.Cloud.Dialogflow.V2Beta1"; option go_package = "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb;dialogflowpb"; option java_multiple_files = true; option java_outer_classname = "AnswerRecordsProto"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/audio_config.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/audio_config.proto index d7f49722095..eb0c01d47cf 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/audio_config.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/audio_config.proto @@ -21,7 +21,7 @@ import "google/api/resource.proto"; import "google/protobuf/duration.proto"; option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option csharp_namespace = "Google.Cloud.Dialogflow.V2Beta1"; option go_package = "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb;dialogflowpb"; option java_multiple_files = true; option java_outer_classname = "AudioConfigProto"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/context.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/context.proto index 6582563e466..5eb7de6a434 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/context.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/context.proto @@ -25,7 +25,7 @@ import "google/protobuf/field_mask.proto"; import "google/protobuf/struct.proto"; option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option csharp_namespace = "Google.Cloud.Dialogflow.V2Beta1"; option go_package = "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb;dialogflowpb"; option java_multiple_files = true; option java_outer_classname = "ContextProto"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation.proto index 6b511a570c4..4b3ca2646d3 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation.proto @@ -24,7 +24,7 @@ import "google/cloud/dialogflow/v2beta1/participant.proto"; import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option csharp_namespace = "Google.Cloud.Dialogflow.V2Beta1"; option go_package = "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb;dialogflowpb"; option java_multiple_files = true; option java_outer_classname = "ConversationProto"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation_event.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation_event.proto index 8299612ce72..79101074e55 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation_event.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation_event.proto @@ -20,7 +20,7 @@ import "google/cloud/dialogflow/v2beta1/participant.proto"; import "google/rpc/status.proto"; option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option csharp_namespace = "Google.Cloud.Dialogflow.V2Beta1"; option go_package = "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb;dialogflowpb"; option java_multiple_files = true; option java_outer_classname = "ConversationEventProto"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation_profile.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation_profile.proto index 371a31898ea..73af5bde055 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation_profile.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation_profile.proto @@ -28,7 +28,7 @@ import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option csharp_namespace = "Google.Cloud.Dialogflow.V2Beta1"; option go_package = "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb;dialogflowpb"; option java_multiple_files = true; option java_outer_classname = "ConversationProfileProto"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/document.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/document.proto index 8e30bb5ad7c..6721a35623e 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/document.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/document.proto @@ -27,7 +27,7 @@ import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option csharp_namespace = "Google.Cloud.Dialogflow.V2Beta1"; option go_package = "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb;dialogflowpb"; option java_multiple_files = true; option java_outer_classname = "DocumentProto"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/entity_type.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/entity_type.proto index 9855e5aec4d..9d35449dfec 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/entity_type.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/entity_type.proto @@ -25,7 +25,7 @@ import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option csharp_namespace = "Google.Cloud.Dialogflow.V2Beta1"; option go_package = "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb;dialogflowpb"; option java_multiple_files = true; option java_outer_classname = "EntityTypeProto"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/environment.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/environment.proto index dbe45f9293a..1efbaf3aab3 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/environment.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/environment.proto @@ -27,7 +27,7 @@ import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option csharp_namespace = "Google.Cloud.Dialogflow.V2Beta1"; option go_package = "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb;dialogflowpb"; option java_multiple_files = true; option java_outer_classname = "EnvironmentProto"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/fulfillment.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/fulfillment.proto index fd8d5589376..836a9d082f4 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/fulfillment.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/fulfillment.proto @@ -23,7 +23,7 @@ import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option csharp_namespace = "Google.Cloud.Dialogflow.V2Beta1"; option go_package = "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb;dialogflowpb"; option java_multiple_files = true; option java_outer_classname = "FulfillmentProto"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/gcs.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/gcs.proto index 73cd686d3b0..49aa6c3092a 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/gcs.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/gcs.proto @@ -19,7 +19,7 @@ package google.cloud.dialogflow.v2beta1; import "google/api/field_behavior.proto"; option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option csharp_namespace = "Google.Cloud.Dialogflow.V2Beta1"; option go_package = "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb;dialogflowpb"; option java_multiple_files = true; option java_outer_classname = "GcsProto"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/human_agent_assistant_event.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/human_agent_assistant_event.proto index af050a007ac..ae1d0db80be 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/human_agent_assistant_event.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/human_agent_assistant_event.proto @@ -19,7 +19,7 @@ package google.cloud.dialogflow.v2beta1; import "google/cloud/dialogflow/v2beta1/participant.proto"; option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option csharp_namespace = "Google.Cloud.Dialogflow.V2Beta1"; option go_package = "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb;dialogflowpb"; option java_multiple_files = true; option java_outer_classname = "HumanAgentAssistantEventProto"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/intent.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/intent.proto index c982e1fdbf4..b4cb7e6e89e 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/intent.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/intent.proto @@ -27,7 +27,7 @@ import "google/protobuf/field_mask.proto"; import "google/protobuf/struct.proto"; option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option csharp_namespace = "Google.Cloud.Dialogflow.V2Beta1"; option go_package = "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb;dialogflowpb"; option java_multiple_files = true; option java_outer_classname = "IntentProto"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/knowledge_base.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/knowledge_base.proto index 28238ed9cbc..04b08bfa77e 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/knowledge_base.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/knowledge_base.proto @@ -24,7 +24,7 @@ import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option csharp_namespace = "Google.Cloud.Dialogflow.V2Beta1"; option go_package = "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb;dialogflowpb"; option java_multiple_files = true; option java_outer_classname = "KnowledgeBaseProto"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/participant.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/participant.proto index 43cade6fb0c..52bde05fb80 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/participant.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/participant.proto @@ -28,7 +28,7 @@ import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option csharp_namespace = "Google.Cloud.Dialogflow.V2Beta1"; option go_package = "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb;dialogflowpb"; option java_multiple_files = true; option java_outer_classname = "ParticipantProto"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/session.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/session.proto index a34f80f9596..b1683d8ec26 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/session.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/session.proto @@ -32,7 +32,7 @@ import "google/rpc/status.proto"; import "google/type/latlng.proto"; option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option csharp_namespace = "Google.Cloud.Dialogflow.V2Beta1"; option go_package = "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb;dialogflowpb"; option java_multiple_files = true; option java_outer_classname = "SessionProto"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/session_entity_type.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/session_entity_type.proto index 8291c2429a0..bdc89a45f09 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/session_entity_type.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/session_entity_type.proto @@ -25,7 +25,7 @@ import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option csharp_namespace = "Google.Cloud.Dialogflow.V2Beta1"; option go_package = "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb;dialogflowpb"; option java_multiple_files = true; option java_outer_classname = "SessionEntityTypeProto"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/validation_result.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/validation_result.proto index 99c67ddd202..91072ac155c 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/validation_result.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/validation_result.proto @@ -17,7 +17,7 @@ syntax = "proto3"; package google.cloud.dialogflow.v2beta1; option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option csharp_namespace = "Google.Cloud.Dialogflow.V2Beta1"; option go_package = "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb;dialogflowpb"; option java_multiple_files = true; option java_outer_classname = "ValidationResultProto"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/version.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/version.proto index b697b5694c9..d2933d10026 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/version.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/version.proto @@ -25,7 +25,7 @@ import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option csharp_namespace = "Google.Cloud.Dialogflow.V2Beta1"; option go_package = "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb;dialogflowpb"; option java_multiple_files = true; option java_outer_classname = "VersionProto"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/webhook.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/webhook.proto index cb4d5aa4ce1..bb3ca20202d 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/webhook.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/webhook.proto @@ -23,7 +23,7 @@ import "google/cloud/dialogflow/v2beta1/session_entity_type.proto"; import "google/protobuf/struct.proto"; option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option csharp_namespace = "Google.Cloud.Dialogflow.V2Beta1"; option go_package = "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb;dialogflowpb"; option java_multiple_files = true; option java_outer_classname = "WebhookProto"; diff --git a/packages/google-cloud-dialogflow/protos/protos.json b/packages/google-cloud-dialogflow/protos/protos.json index df660743409..cdb319e8b36 100644 --- a/packages/google-cloud-dialogflow/protos/protos.json +++ b/packages/google-cloud-dialogflow/protos/protos.json @@ -9735,7 +9735,7 @@ "v2beta1": { "options": { "cc_enable_arenas": true, - "csharp_namespace": "Google.Cloud.Dialogflow.V2beta1", + "csharp_namespace": "Google.Cloud.Dialogflow.V2Beta1", "go_package": "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb;dialogflowpb", "java_multiple_files": true, "java_outer_classname": "WebhookProto", From 73d846e1aedc4103d25ae7e7dbecf7c4f5a8775a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 1 Mar 2023 14:30:17 -0500 Subject: [PATCH 58/80] feat: [video-transcoder] Specifying language code and display name for text and audio streams is now supported (#4035) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Specifying language code and display name for text and audio streams is now supported PiperOrigin-RevId: 513138925 Source-Link: https://github.com/googleapis/googleapis/commit/187d78017667767bee6ceaaa90f9d9f2c59f8f9c Source-Link: https://github.com/googleapis/googleapis-gen/commit/b7979ed1865459c5d194dc5826a9cdf1cf877581 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZpZGVvLXRyYW5zY29kZXIvLk93bEJvdC55YW1sIiwiaCI6ImI3OTc5ZWQxODY1NDU5YzVkMTk0ZGM1ODI2YTljZGYxY2Y4Nzc1ODEifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: danieljbruce --- .../cloud/video/transcoder/v1/resources.proto | 117 +++++++++++------- .../cloud/video/transcoder/v1/services.proto | 28 ++--- .../protos/protos.d.ts | 24 ++++ .../protos/protos.js | 95 +++++++++++++- .../protos/protos.json | 16 +++ ...data.google.cloud.video.transcoder.v1.json | 2 +- .../transcoder_service.create_job_template.js | 4 +- .../transcoder_service.list_job_templates.js | 4 +- .../src/v1/transcoder_service_client.ts | 16 +-- 9 files changed, 234 insertions(+), 72 deletions(-) diff --git a/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/resources.proto b/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/resources.proto index 76f626f4eec..d790089f50c 100644 --- a/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/resources.proto +++ b/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/resources.proto @@ -57,18 +57,18 @@ message Job { // Format: `projects/{project_number}/locations/{location}/jobs/{job}` string name = 1; - // Input only. Specify the `input_uri` to populate empty `uri` fields in each element of - // `Job.config.inputs` or `JobTemplate.config.inputs` when using template. - // URI of the media. Input files must be at least 5 seconds in duration and - // stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). See - // [Supported input and output + // Input only. Specify the `input_uri` to populate empty `uri` fields in each + // element of `Job.config.inputs` or `JobTemplate.config.inputs` when using + // template. URI of the media. Input files must be at least 5 seconds in + // duration and stored in Cloud Storage (for example, + // `gs://bucket/inputs/file.mp4`). See [Supported input and output // formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). string input_uri = 2 [(google.api.field_behavior) = INPUT_ONLY]; - // Input only. Specify the `output_uri` to populate an empty `Job.config.output.uri` or - // `JobTemplate.config.output.uri` when using template. - // URI for the output file(s). For example, `gs://my-bucket/outputs/`. See - // [Supported input and output + // Input only. Specify the `output_uri` to populate an empty + // `Job.config.output.uri` or `JobTemplate.config.output.uri` when using + // template. URI for the output file(s). For example, + // `gs://my-bucket/outputs/`. See [Supported input and output // formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). string output_uri = 3 [(google.api.field_behavior) = INPUT_ONLY]; @@ -77,8 +77,8 @@ message Job { // `preset/web-hd` by default. When you use a `template_id` to create a job, // the `Job.config` is populated by the `JobTemplate.config`.
oneof job_config { - // Input only. Specify the `template_id` to use for populating `Job.config`. The default - // is `preset/web-hd`. + // Input only. Specify the `template_id` to use for populating `Job.config`. + // The default is `preset/web-hd`. // // Preset Transcoder templates: // - `preset/{preset_id}` @@ -95,13 +95,16 @@ message Job { ProcessingState state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time the job was created. - google.protobuf.Timestamp create_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time the transcoding started. - google.protobuf.Timestamp start_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp start_time = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time the transcoding finished. - google.protobuf.Timestamp end_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp end_time = 14 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Job time to live value in days, which will be effective after job // completion. Job should be deleted automatically after the given TTL. Enter @@ -301,7 +304,8 @@ message Manifest { // Required. Type of the manifest, can be `HLS` or `DASH`. ManifestType type = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. List of user given `MuxStream.key`s that should appear in this manifest. + // Required. List of user given `MuxStream.key`s that should appear in this + // manifest. // // When `Manifest.type` is `HLS`, a media manifest with name `MuxStream.key` // and `.m3u8` extension is generated for each element of the @@ -331,10 +335,13 @@ message SpriteSheet { // from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. string file_prefix = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. The width of sprite in pixels. Must be an even integer. To preserve the - // source aspect ratio, set the [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] field or - // the [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] field, but not both (the API will - // automatically calculate the missing field). + // Required. The width of sprite in pixels. Must be an even integer. To + // preserve the source aspect ratio, set the + // [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] + // field or the + // [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] + // field, but not both (the API will automatically calculate the missing + // field). // // For portrait videos that contain horizontal ASR and rotation metadata, // provide the width, in pixels, per the horizontal ASR. The API calculates @@ -342,10 +349,13 @@ message SpriteSheet { // and swaps the requested height and width for the output. int32 sprite_width_pixels = 3 [(google.api.field_behavior) = REQUIRED]; - // Required. The height of sprite in pixels. Must be an even integer. To preserve the - // source aspect ratio, set the [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] field or - // the [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] field, but not both (the API will - // automatically calculate the missing field). + // Required. The height of sprite in pixels. Must be an even integer. To + // preserve the source aspect ratio, set the + // [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] + // field or the + // [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] + // field, but not both (the API will automatically calculate the missing + // field). // // For portrait videos that contain horizontal ASR and rotation metadata, // provide the height, in pixels, per the horizontal ASR. The API calculates @@ -714,17 +724,17 @@ message VideoStream { // and swaps the requested height and width for the output. int32 height_pixels = 2; - // Required. The target video frame rate in frames per second (FPS). Must be less than - // or equal to 120. Will default to the input frame rate if larger than the - // input frame rate. The API will generate an output FPS that is divisible - // by the input FPS, and smaller or equal to the target FPS. See + // Required. The target video frame rate in frames per second (FPS). Must be + // less than or equal to 120. Will default to the input frame rate if larger + // than the input frame rate. The API will generate an output FPS that is + // divisible by the input FPS, and smaller or equal to the target FPS. See // [Calculating frame // rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for // more information. double frame_rate = 3 [(google.api.field_behavior) = REQUIRED]; - // Required. The video bitrate in bits per second. The minimum value is 1,000. - // The maximum value is 800,000,000. + // Required. The video bitrate in bits per second. The minimum value is + // 1,000. The maximum value is 800,000,000. int32 bitrate_bps = 4 [(google.api.field_behavior) = REQUIRED]; // Pixel format to use. The default is `yuv420p`. @@ -859,17 +869,17 @@ message VideoStream { // and swaps the requested height and width for the output. int32 height_pixels = 2; - // Required. The target video frame rate in frames per second (FPS). Must be less than - // or equal to 120. Will default to the input frame rate if larger than the - // input frame rate. The API will generate an output FPS that is divisible - // by the input FPS, and smaller or equal to the target FPS. See + // Required. The target video frame rate in frames per second (FPS). Must be + // less than or equal to 120. Will default to the input frame rate if larger + // than the input frame rate. The API will generate an output FPS that is + // divisible by the input FPS, and smaller or equal to the target FPS. See // [Calculating frame // rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for // more information. double frame_rate = 3 [(google.api.field_behavior) = REQUIRED]; - // Required. The video bitrate in bits per second. The minimum value is 1,000. - // The maximum value is 800,000,000. + // Required. The video bitrate in bits per second. The minimum value is + // 1,000. The maximum value is 800,000,000. int32 bitrate_bps = 4 [(google.api.field_behavior) = REQUIRED]; // Pixel format to use. The default is `yuv420p`. @@ -1011,17 +1021,17 @@ message VideoStream { // and swaps the requested height and width for the output. int32 height_pixels = 2; - // Required. The target video frame rate in frames per second (FPS). Must be less than - // or equal to 120. Will default to the input frame rate if larger than the - // input frame rate. The API will generate an output FPS that is divisible - // by the input FPS, and smaller or equal to the target FPS. See + // Required. The target video frame rate in frames per second (FPS). Must be + // less than or equal to 120. Will default to the input frame rate if larger + // than the input frame rate. The API will generate an output FPS that is + // divisible by the input FPS, and smaller or equal to the target FPS. See // [Calculating frame // rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for // more information. double frame_rate = 3 [(google.api.field_behavior) = REQUIRED]; - // Required. The video bitrate in bits per second. The minimum value is 1,000. - // The maximum value is 480,000,000. + // Required. The video bitrate in bits per second. The minimum value is + // 1,000. The maximum value is 480,000,000. int32 bitrate_bps = 4 [(google.api.field_behavior) = REQUIRED]; // Pixel format to use. The default is `yuv420p`. @@ -1099,8 +1109,8 @@ message VideoStream { message AudioStream { // The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`. message AudioMapping { - // Required. The `EditAtom.key` that references the atom with audio inputs in the - // `Job.edit_list`. + // Required. The `EditAtom.key` that references the atom with audio inputs + // in the `Job.edit_list`. string atom_key = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The `Input.key` that identifies the input file. @@ -1132,7 +1142,8 @@ message AudioStream { // - `eac3` string codec = 1; - // Required. Audio bitrate in bits per second. Must be between 1 and 10,000,000. + // Required. Audio bitrate in bits per second. Must be between 1 and + // 10,000,000. int32 bitrate_bps = 2 [(google.api.field_behavior) = REQUIRED]; // Number of audio channels. Must be between 1 and 6. The default is 2. @@ -1157,6 +1168,15 @@ message AudioStream { // The audio sample rate in Hertz. The default is 48000 Hertz. int32 sample_rate_hertz = 6; + + // The BCP-47 language code, such as `en-US` or `sr-Latn`. For more + // information, see + // https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + string language_code = 7; + + // The name for this particular audio stream that + // will be added to the HLS/DASH manifest. + string display_name = 8; } // Encoding of a text stream. For example, closed captions or subtitles. @@ -1185,8 +1205,17 @@ message TextStream { // - `webvtt` string codec = 1; + // The BCP-47 language code, such as `en-US` or `sr-Latn`. For more + // information, see + // https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + string language_code = 2; + // The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`. repeated TextMapping mapping = 3; + + // The name for this particular text stream that + // will be added to the HLS/DASH manifest. + string display_name = 4; } // Segment settings for `ts`, `fmp4` and `vtt`. diff --git a/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/services.proto b/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/services.proto index 658415c8790..726b4088e51 100644 --- a/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/services.proto +++ b/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/services.proto @@ -39,7 +39,8 @@ option ruby_package = "Google::Cloud::Video::Transcoder::V1"; // concatenation, and digital ad-stitch ready content generation. service TranscoderService { option (google.api.default_host) = "transcoder.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Creates a job in the specified region. rpc CreateJob(CreateJobRequest) returns (Job) { @@ -80,11 +81,13 @@ service TranscoderService { post: "/v1/{parent=projects/*/locations/*}/jobTemplates" body: "job_template" }; - option (google.api.method_signature) = "parent,job_template,job_template_id"; + option (google.api.method_signature) = + "parent,job_template,job_template_id"; } // Lists job templates in the specified region. - rpc ListJobTemplates(ListJobTemplatesRequest) returns (ListJobTemplatesResponse) { + rpc ListJobTemplates(ListJobTemplatesRequest) + returns (ListJobTemplatesResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/jobTemplates" }; @@ -100,7 +103,8 @@ service TranscoderService { } // Deletes a job template. - rpc DeleteJobTemplate(DeleteJobTemplateRequest) returns (google.protobuf.Empty) { + rpc DeleteJobTemplate(DeleteJobTemplateRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/jobTemplates/*}" }; @@ -156,9 +160,7 @@ message GetJobRequest { // Format: `projects/{project}/locations/{location}/jobs/{job}` string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "transcoder.googleapis.com/Job" - } + (google.api.resource_reference) = { type: "transcoder.googleapis.com/Job" } ]; } @@ -168,9 +170,7 @@ message DeleteJobRequest { // Format: `projects/{project}/locations/{location}/jobs/{job}` string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "transcoder.googleapis.com/Job" - } + (google.api.resource_reference) = { type: "transcoder.googleapis.com/Job" } ]; // If set to true, and the job is not found, the request will succeed but no @@ -204,8 +204,8 @@ message CreateJobTemplateRequest { // Required. Parameters for creating job template. JobTemplate job_template = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. The ID to use for the job template, which will become the final component - // of the job template's resource name. + // Required. The ID to use for the job template, which will become the final + // component of the job template's resource name. // // This value should be 4-63 characters, and valid characters must match the // regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. @@ -214,8 +214,8 @@ message CreateJobTemplateRequest { // Request message for `TranscoderService.ListJobTemplates`. message ListJobTemplatesRequest { - // Required. The parent location from which to retrieve the collection of job templates. - // Format: `projects/{project}/locations/{location}` + // Required. The parent location from which to retrieve the collection of job + // templates. Format: `projects/{project}/locations/{location}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/packages/google-cloud-video-transcoder/protos/protos.d.ts b/packages/google-cloud-video-transcoder/protos/protos.d.ts index 8b82326ab2e..fd19f2d83e1 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.d.ts +++ b/packages/google-cloud-video-transcoder/protos/protos.d.ts @@ -4086,6 +4086,12 @@ export namespace google { /** AudioStream sampleRateHertz */ sampleRateHertz?: (number|null); + + /** AudioStream languageCode */ + languageCode?: (string|null); + + /** AudioStream displayName */ + displayName?: (string|null); } /** Represents an AudioStream. */ @@ -4115,6 +4121,12 @@ export namespace google { /** AudioStream sampleRateHertz. */ public sampleRateHertz: number; + /** AudioStream languageCode. */ + public languageCode: string; + + /** AudioStream displayName. */ + public displayName: string; + /** * Creates a new AudioStream instance using the specified properties. * @param [properties] Properties to set @@ -4329,8 +4341,14 @@ export namespace google { /** TextStream codec */ codec?: (string|null); + /** TextStream languageCode */ + languageCode?: (string|null); + /** TextStream mapping */ mapping?: (google.cloud.video.transcoder.v1.TextStream.ITextMapping[]|null); + + /** TextStream displayName */ + displayName?: (string|null); } /** Represents a TextStream. */ @@ -4345,9 +4363,15 @@ export namespace google { /** TextStream codec. */ public codec: string; + /** TextStream languageCode. */ + public languageCode: string; + /** TextStream mapping. */ public mapping: google.cloud.video.transcoder.v1.TextStream.ITextMapping[]; + /** TextStream displayName. */ + public displayName: string; + /** * Creates a new TextStream instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-video-transcoder/protos/protos.js b/packages/google-cloud-video-transcoder/protos/protos.js index 5bd2f5fb355..81a34a6ea67 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.js +++ b/packages/google-cloud-video-transcoder/protos/protos.js @@ -10684,6 +10684,8 @@ * @property {Array.|null} [channelLayout] AudioStream channelLayout * @property {Array.|null} [mapping] AudioStream mapping * @property {number|null} [sampleRateHertz] AudioStream sampleRateHertz + * @property {string|null} [languageCode] AudioStream languageCode + * @property {string|null} [displayName] AudioStream displayName */ /** @@ -10751,6 +10753,22 @@ */ AudioStream.prototype.sampleRateHertz = 0; + /** + * AudioStream languageCode. + * @member {string} languageCode + * @memberof google.cloud.video.transcoder.v1.AudioStream + * @instance + */ + AudioStream.prototype.languageCode = ""; + + /** + * AudioStream displayName. + * @member {string} displayName + * @memberof google.cloud.video.transcoder.v1.AudioStream + * @instance + */ + AudioStream.prototype.displayName = ""; + /** * Creates a new AudioStream instance using the specified properties. * @function create @@ -10789,6 +10807,10 @@ $root.google.cloud.video.transcoder.v1.AudioStream.AudioMapping.encode(message.mapping[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.sampleRateHertz); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.languageCode); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.displayName); return writer; }; @@ -10851,6 +10873,14 @@ message.sampleRateHertz = reader.int32(); break; } + case 7: { + message.languageCode = reader.string(); + break; + } + case 8: { + message.displayName = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -10914,6 +10944,12 @@ if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) if (!$util.isInteger(message.sampleRateHertz)) return "sampleRateHertz: integer expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; return null; }; @@ -10954,6 +10990,10 @@ } if (object.sampleRateHertz != null) message.sampleRateHertz = object.sampleRateHertz | 0; + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.displayName != null) + message.displayName = String(object.displayName); return message; }; @@ -10979,6 +11019,8 @@ object.bitrateBps = 0; object.channelCount = 0; object.sampleRateHertz = 0; + object.languageCode = ""; + object.displayName = ""; } if (message.codec != null && message.hasOwnProperty("codec")) object.codec = message.codec; @@ -10998,6 +11040,10 @@ } if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) object.sampleRateHertz = message.sampleRateHertz; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; return object; }; @@ -11356,7 +11402,9 @@ * @memberof google.cloud.video.transcoder.v1 * @interface ITextStream * @property {string|null} [codec] TextStream codec + * @property {string|null} [languageCode] TextStream languageCode * @property {Array.|null} [mapping] TextStream mapping + * @property {string|null} [displayName] TextStream displayName */ /** @@ -11383,6 +11431,14 @@ */ TextStream.prototype.codec = ""; + /** + * TextStream languageCode. + * @member {string} languageCode + * @memberof google.cloud.video.transcoder.v1.TextStream + * @instance + */ + TextStream.prototype.languageCode = ""; + /** * TextStream mapping. * @member {Array.} mapping @@ -11391,6 +11447,14 @@ */ TextStream.prototype.mapping = $util.emptyArray; + /** + * TextStream displayName. + * @member {string} displayName + * @memberof google.cloud.video.transcoder.v1.TextStream + * @instance + */ + TextStream.prototype.displayName = ""; + /** * Creates a new TextStream instance using the specified properties. * @function create @@ -11417,9 +11481,13 @@ writer = $Writer.create(); if (message.codec != null && Object.hasOwnProperty.call(message, "codec")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.codec); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); if (message.mapping != null && message.mapping.length) for (var i = 0; i < message.mapping.length; ++i) $root.google.cloud.video.transcoder.v1.TextStream.TextMapping.encode(message.mapping[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); return writer; }; @@ -11458,12 +11526,20 @@ message.codec = reader.string(); break; } + case 2: { + message.languageCode = reader.string(); + break; + } case 3: { if (!(message.mapping && message.mapping.length)) message.mapping = []; message.mapping.push($root.google.cloud.video.transcoder.v1.TextStream.TextMapping.decode(reader, reader.uint32())); break; } + case 4: { + message.displayName = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -11502,6 +11578,9 @@ if (message.codec != null && message.hasOwnProperty("codec")) if (!$util.isString(message.codec)) return "codec: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; if (message.mapping != null && message.hasOwnProperty("mapping")) { if (!Array.isArray(message.mapping)) return "mapping: array expected"; @@ -11511,6 +11590,9 @@ return "mapping." + error; } } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; return null; }; @@ -11528,6 +11610,8 @@ var message = new $root.google.cloud.video.transcoder.v1.TextStream(); if (object.codec != null) message.codec = String(object.codec); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); if (object.mapping) { if (!Array.isArray(object.mapping)) throw TypeError(".google.cloud.video.transcoder.v1.TextStream.mapping: array expected"); @@ -11538,6 +11622,8 @@ message.mapping[i] = $root.google.cloud.video.transcoder.v1.TextStream.TextMapping.fromObject(object.mapping[i]); } } + if (object.displayName != null) + message.displayName = String(object.displayName); return message; }; @@ -11556,15 +11642,22 @@ var object = {}; if (options.arrays || options.defaults) object.mapping = []; - if (options.defaults) + if (options.defaults) { object.codec = ""; + object.languageCode = ""; + object.displayName = ""; + } if (message.codec != null && message.hasOwnProperty("codec")) object.codec = message.codec; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; if (message.mapping && message.mapping.length) { object.mapping = []; for (var j = 0; j < message.mapping.length; ++j) object.mapping[j] = $root.google.cloud.video.transcoder.v1.TextStream.TextMapping.toObject(message.mapping[j], options); } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; return object; }; diff --git a/packages/google-cloud-video-transcoder/protos/protos.json b/packages/google-cloud-video-transcoder/protos/protos.json index 2e7ff12fae4..dc264f44ca1 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.json +++ b/packages/google-cloud-video-transcoder/protos/protos.json @@ -1020,6 +1020,14 @@ "sampleRateHertz": { "type": "int32", "id": 6 + }, + "languageCode": { + "type": "string", + "id": 7 + }, + "displayName": { + "type": "string", + "id": 8 } }, "nested": { @@ -1074,10 +1082,18 @@ "type": "string", "id": 1 }, + "languageCode": { + "type": "string", + "id": 2 + }, "mapping": { "rule": "repeated", "type": "TextMapping", "id": 3 + }, + "displayName": { + "type": "string", + "id": 4 } }, "nested": { diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json index 058da075035..565b8eca285 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-transcoder", - "version": "2.4.0", + "version": "2.4.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job_template.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job_template.js index 81c3e0ba214..a3e7b58d7ed 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job_template.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job_template.js @@ -38,8 +38,8 @@ function main(parent, jobTemplate, jobTemplateId) { */ // const jobTemplate = {} /** - * Required. The ID to use for the job template, which will become the final component - * of the job template's resource name. + * Required. The ID to use for the job template, which will become the final + * component of the job template's resource name. * This value should be 4-63 characters, and valid characters must match the * regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. */ diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_job_templates.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_job_templates.js index f34d818c852..8ee258bbede 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_job_templates.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_job_templates.js @@ -29,8 +29,8 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The parent location from which to retrieve the collection of job templates. - * Format: `projects/{project}/locations/{location}` + * Required. The parent location from which to retrieve the collection of job + * templates. Format: `projects/{project}/locations/{location}` */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts index f33276dc34b..5d8d86afb69 100644 --- a/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts +++ b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts @@ -638,8 +638,8 @@ export class TranscoderServiceClient { * @param {google.cloud.video.transcoder.v1.JobTemplate} request.jobTemplate * Required. Parameters for creating job template. * @param {string} request.jobTemplateId - * Required. The ID to use for the job template, which will become the final component - * of the job template's resource name. + * Required. The ID to use for the job template, which will become the final + * component of the job template's resource name. * * This value should be 4-63 characters, and valid characters must match the * regular expression `{@link a-zA-Z0-9_-|a-zA-Z}*`. @@ -1150,8 +1150,8 @@ export class TranscoderServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent location from which to retrieve the collection of job templates. - * Format: `projects/{project}/locations/{location}` + * Required. The parent location from which to retrieve the collection of job + * templates. Format: `projects/{project}/locations/{location}` * @param {number} request.pageSize * The maximum number of items to return. * @param {string} request.pageToken @@ -1256,8 +1256,8 @@ export class TranscoderServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent location from which to retrieve the collection of job templates. - * Format: `projects/{project}/locations/{location}` + * Required. The parent location from which to retrieve the collection of job + * templates. Format: `projects/{project}/locations/{location}` * @param {number} request.pageSize * The maximum number of items to return. * @param {string} request.pageToken @@ -1310,8 +1310,8 @@ export class TranscoderServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent location from which to retrieve the collection of job templates. - * Format: `projects/{project}/locations/{location}` + * Required. The parent location from which to retrieve the collection of job + * templates. Format: `projects/{project}/locations/{location}` * @param {number} request.pageSize * The maximum number of items to return. * @param {string} request.pageToken From 7960c76d228f211727f6b5b4edfaba4adba8ae11 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 1 Mar 2023 15:12:04 -0500 Subject: [PATCH 59/80] chore: release main (#4038) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: release main * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- changelog.json | 19 ++++++++++++++++++- .../CHANGELOG.md | 7 +++++++ .../package.json | 2 +- ...data.google.cloud.video.transcoder.v1.json | 2 +- .../samples/package.json | 2 +- 6 files changed, 29 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b0fa3ce343f..923c706dcda 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -107,7 +107,7 @@ "packages/google-cloud-translate": "7.2.0", "packages/google-cloud-video-livestream": "0.4.1", "packages/google-cloud-video-stitcher": "0.3.1", - "packages/google-cloud-video-transcoder": "2.4.1", + "packages/google-cloud-video-transcoder": "2.5.0", "packages/google-cloud-videointelligence": "4.2.1", "packages/google-cloud-vision": "3.1.2", "packages/google-cloud-vmmigration": "2.3.1", diff --git a/changelog.json b/changelog.json index b8ba1807554..647b1dc2eee 100644 --- a/changelog.json +++ b/changelog.json @@ -1,6 +1,23 @@ { "repository": "googleapis/google-cloud-node", "entries": [ + { + "changes": [ + { + "type": "feat", + "sha": "73d846e1aedc4103d25ae7e7dbecf7c4f5a8775a", + "message": "[video-transcoder] Specifying language code and display name for text and audio streams is now supported", + "issues": [ + "4035" + ] + } + ], + "version": "2.5.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/video-transcoder", + "id": "f132205e-d61a-4db3-9b5b-cfccd629f480", + "createTime": "2023-03-01T19:38:11.617Z" + }, { "changes": [ { @@ -4282,5 +4299,5 @@ "createTime": "2023-01-28T04:18:24.718Z" } ], - "updateTime": "2023-02-28T02:19:10.801Z" + "updateTime": "2023-03-01T19:38:11.617Z" } \ No newline at end of file diff --git a/packages/google-cloud-video-transcoder/CHANGELOG.md b/packages/google-cloud-video-transcoder/CHANGELOG.md index ff688c0c9ce..660b9d57cb6 100644 --- a/packages/google-cloud-video-transcoder/CHANGELOG.md +++ b/packages/google-cloud-video-transcoder/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.5.0](https://github.com/googleapis/google-cloud-node/compare/video-transcoder-v2.4.1...video-transcoder-v2.5.0) (2023-03-01) + + +### Features + +* [video-transcoder] Specifying language code and display name for text and audio streams is now supported ([#4035](https://github.com/googleapis/google-cloud-node/issues/4035)) ([73d846e](https://github.com/googleapis/google-cloud-node/commit/73d846e1aedc4103d25ae7e7dbecf7c4f5a8775a)) + ## [2.4.1](https://github.com/googleapis/google-cloud-node/compare/video-transcoder-v2.4.0...video-transcoder-v2.4.1) (2023-02-15) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 11f0bc9ca3e..7022c0ac5fb 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-transcoder", - "version": "2.4.1", + "version": "2.5.0", "description": "Transcoder client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json index 565b8eca285..ac058fd1689 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-transcoder", - "version": "2.4.1", + "version": "2.5.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index 187cba59253..f40d8560a5b 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-transcoder": "^2.4.1" + "@google-cloud/video-transcoder": "^2.5.0" }, "devDependencies": { "@google-cloud/storage": "^6.0.0", From 7240a7ca4f4115ba7fcb4c97736602bf653f72e2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 1 Mar 2023 15:26:55 -0500 Subject: [PATCH 60/80] docs: [certificatemanager] corrected information about the limit of certificates that can be attached to a Certificate Map Entry (#4033) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: corrected information about the limit of certificates that can be attached to a Certificate Map Entry PiperOrigin-RevId: 512966986 Source-Link: https://github.com/googleapis/googleapis/commit/8226520e6aab5a8755719048626e004e7851ccf5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/644b69ddd0b9b88c55b3e702ea6bfc44a328d3fd Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNlcnRpZmljYXRlbWFuYWdlci8uT3dsQm90LnlhbWwiLCJoIjoiNjQ0YjY5ZGRkMGI5Yjg4YzU1YjNlNzAyZWE2YmZjNDRhMzI4ZDNmZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: danieljbruce --- .../cloud/certificatemanager/v1/certificate_manager.proto | 3 ++- .../snippet_metadata.google.cloud.certificatemanager.v1.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-certificatemanager/protos/google/cloud/certificatemanager/v1/certificate_manager.proto b/packages/google-cloud-certificatemanager/protos/google/cloud/certificatemanager/v1/certificate_manager.proto index d3e2449c84d..6cfbf6ac0c8 100644 --- a/packages/google-cloud-certificatemanager/protos/google/cloud/certificatemanager/v1/certificate_manager.proto +++ b/packages/google-cloud-certificatemanager/protos/google/cloud/certificatemanager/v1/certificate_manager.proto @@ -22,6 +22,7 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/certificatemanager/v1/certificate_issuance_config.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; @@ -1105,7 +1106,7 @@ message CertificateMapEntry { } // A set of Certificates defines for the given `hostname`. There can be - // defined up to fifteen certificates in each Certificate Map Entry. Each + // defined up to four certificates in each Certificate Map Entry. Each // certificate must match pattern `projects/*/locations/*/certificates/*`. repeated string certificates = 7 [(google.api.resource_reference) = { type: "certificatemanager.googleapis.com/Certificate" diff --git a/packages/google-cloud-certificatemanager/samples/generated/v1/snippet_metadata.google.cloud.certificatemanager.v1.json b/packages/google-cloud-certificatemanager/samples/generated/v1/snippet_metadata.google.cloud.certificatemanager.v1.json index ba7ca4b54da..bddfa44d927 100644 --- a/packages/google-cloud-certificatemanager/samples/generated/v1/snippet_metadata.google.cloud.certificatemanager.v1.json +++ b/packages/google-cloud-certificatemanager/samples/generated/v1/snippet_metadata.google.cloud.certificatemanager.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-certificatemanager", - "version": "0.7.0", + "version": "0.7.1", "language": "TYPESCRIPT", "apis": [ { From ebaed2007ee154ce8f9a604d023d5a5cd1ef7b81 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 1 Mar 2023 15:45:21 -0500 Subject: [PATCH 61/80] feat: [dialogflow-cx] Added persist_parameter_changes field from `query_params` to MatchIntentRequest (#4031) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Added persist_parameter_changes field from `query_params` to MatchIntentRequest PiperOrigin-RevId: 512734924 Source-Link: https://github.com/googleapis/googleapis/commit/7483cdc69f29271e75fc046d5e5648b2fe4f1ee9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/86f1d59a749e8075b345ce15730019dd1528f288 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3ctY3gvLk93bEJvdC55YW1sIiwiaCI6Ijg2ZjFkNTlhNzQ5ZTgwNzViMzQ1Y2UxNTczMDAxOWRkMTUyOGYyODgifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Added persist_parameter_changes field from `query_params` to MatchIntentRequest PiperOrigin-RevId: 513016804 Source-Link: https://github.com/googleapis/googleapis/commit/388f408465562bce221652ffd8939a16da627b03 Source-Link: https://github.com/googleapis/googleapis-gen/commit/99ede80d3d167cc396a6ba85e0ba9495abb6097f Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3ctY3gvLk93bEJvdC55YW1sIiwiaCI6Ijk5ZWRlODBkM2QxNjdjYzM5NmE2YmE4NWUwYmE5NDk1YWJiNjA5N2YifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: danieljbruce --- .../cloud/dialogflow/cx/v3/session.proto | 3 ++ .../cloud/dialogflow/cx/v3beta1/session.proto | 3 ++ .../protos/protos.d.ts | 12 +++++ .../protos/protos.js | 46 +++++++++++++++++++ .../protos/protos.json | 8 ++++ .../generated/v3/sessions.match_intent.js | 4 ++ ...etadata.google.cloud.dialogflow.cx.v3.json | 6 ++- .../v3beta1/sessions.match_intent.js | 4 ++ ...ta.google.cloud.dialogflow.cx.v3beta1.json | 6 ++- .../src/v3/sessions_client.ts | 2 + .../src/v3beta1/sessions_client.ts | 2 + 11 files changed, 94 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/session.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/session.proto index 2b7825d1176..a17815baeb4 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/session.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/session.proto @@ -833,6 +833,9 @@ message MatchIntentRequest { // Required. The input specification. QueryInput query_input = 3 [(google.api.field_behavior) = REQUIRED]; + + // Persist session parameter changes from `query_params`. + bool persist_parameter_changes = 5; } // Response of [MatchIntent][]. diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/session.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/session.proto index 6a5b0192a96..3634bc925ec 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/session.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/session.proto @@ -836,6 +836,9 @@ message MatchIntentRequest { // Required. The input specification. QueryInput query_input = 3 [(google.api.field_behavior) = REQUIRED]; + + // Persist session parameter changes from `query_params`. + bool persist_parameter_changes = 5; } // Response of [MatchIntent][]. diff --git a/packages/google-cloud-dialogflow-cx/protos/protos.d.ts b/packages/google-cloud-dialogflow-cx/protos/protos.d.ts index b1545bf5d90..1591f05c518 100644 --- a/packages/google-cloud-dialogflow-cx/protos/protos.d.ts +++ b/packages/google-cloud-dialogflow-cx/protos/protos.d.ts @@ -20563,6 +20563,9 @@ export namespace google { /** MatchIntentRequest queryInput */ queryInput?: (google.cloud.dialogflow.cx.v3.IQueryInput|null); + + /** MatchIntentRequest persistParameterChanges */ + persistParameterChanges?: (boolean|null); } /** Represents a MatchIntentRequest. */ @@ -20583,6 +20586,9 @@ export namespace google { /** MatchIntentRequest queryInput. */ public queryInput?: (google.cloud.dialogflow.cx.v3.IQueryInput|null); + /** MatchIntentRequest persistParameterChanges. */ + public persistParameterChanges: boolean; + /** * Creates a new MatchIntentRequest instance using the specified properties. * @param [properties] Properties to set @@ -50660,6 +50666,9 @@ export namespace google { /** MatchIntentRequest queryInput */ queryInput?: (google.cloud.dialogflow.cx.v3beta1.IQueryInput|null); + + /** MatchIntentRequest persistParameterChanges */ + persistParameterChanges?: (boolean|null); } /** Represents a MatchIntentRequest. */ @@ -50680,6 +50689,9 @@ export namespace google { /** MatchIntentRequest queryInput. */ public queryInput?: (google.cloud.dialogflow.cx.v3beta1.IQueryInput|null); + /** MatchIntentRequest persistParameterChanges. */ + public persistParameterChanges: boolean; + /** * Creates a new MatchIntentRequest instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-dialogflow-cx/protos/protos.js b/packages/google-cloud-dialogflow-cx/protos/protos.js index 459154e1d8c..bd87a801cf4 100644 --- a/packages/google-cloud-dialogflow-cx/protos/protos.js +++ b/packages/google-cloud-dialogflow-cx/protos/protos.js @@ -48999,6 +48999,7 @@ * @property {string|null} [session] MatchIntentRequest session * @property {google.cloud.dialogflow.cx.v3.IQueryParameters|null} [queryParams] MatchIntentRequest queryParams * @property {google.cloud.dialogflow.cx.v3.IQueryInput|null} [queryInput] MatchIntentRequest queryInput + * @property {boolean|null} [persistParameterChanges] MatchIntentRequest persistParameterChanges */ /** @@ -49040,6 +49041,14 @@ */ MatchIntentRequest.prototype.queryInput = null; + /** + * MatchIntentRequest persistParameterChanges. + * @member {boolean} persistParameterChanges + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest + * @instance + */ + MatchIntentRequest.prototype.persistParameterChanges = false; + /** * Creates a new MatchIntentRequest instance using the specified properties. * @function create @@ -49070,6 +49079,8 @@ $root.google.cloud.dialogflow.cx.v3.QueryParameters.encode(message.queryParams, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.queryInput != null && Object.hasOwnProperty.call(message, "queryInput")) $root.google.cloud.dialogflow.cx.v3.QueryInput.encode(message.queryInput, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.persistParameterChanges != null && Object.hasOwnProperty.call(message, "persistParameterChanges")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.persistParameterChanges); return writer; }; @@ -49116,6 +49127,10 @@ message.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.decode(reader, reader.uint32()); break; } + case 5: { + message.persistParameterChanges = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -49164,6 +49179,9 @@ if (error) return "queryInput." + error; } + if (message.persistParameterChanges != null && message.hasOwnProperty("persistParameterChanges")) + if (typeof message.persistParameterChanges !== "boolean") + return "persistParameterChanges: boolean expected"; return null; }; @@ -49191,6 +49209,8 @@ throw TypeError(".google.cloud.dialogflow.cx.v3.MatchIntentRequest.queryInput: object expected"); message.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.fromObject(object.queryInput); } + if (object.persistParameterChanges != null) + message.persistParameterChanges = Boolean(object.persistParameterChanges); return message; }; @@ -49211,6 +49231,7 @@ object.session = ""; object.queryParams = null; object.queryInput = null; + object.persistParameterChanges = false; } if (message.session != null && message.hasOwnProperty("session")) object.session = message.session; @@ -49218,6 +49239,8 @@ object.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.toObject(message.queryParams, options); if (message.queryInput != null && message.hasOwnProperty("queryInput")) object.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.toObject(message.queryInput, options); + if (message.persistParameterChanges != null && message.hasOwnProperty("persistParameterChanges")) + object.persistParameterChanges = message.persistParameterChanges; return object; }; @@ -120333,6 +120356,7 @@ * @property {string|null} [session] MatchIntentRequest session * @property {google.cloud.dialogflow.cx.v3beta1.IQueryParameters|null} [queryParams] MatchIntentRequest queryParams * @property {google.cloud.dialogflow.cx.v3beta1.IQueryInput|null} [queryInput] MatchIntentRequest queryInput + * @property {boolean|null} [persistParameterChanges] MatchIntentRequest persistParameterChanges */ /** @@ -120374,6 +120398,14 @@ */ MatchIntentRequest.prototype.queryInput = null; + /** + * MatchIntentRequest persistParameterChanges. + * @member {boolean} persistParameterChanges + * @memberof google.cloud.dialogflow.cx.v3beta1.MatchIntentRequest + * @instance + */ + MatchIntentRequest.prototype.persistParameterChanges = false; + /** * Creates a new MatchIntentRequest instance using the specified properties. * @function create @@ -120404,6 +120436,8 @@ $root.google.cloud.dialogflow.cx.v3beta1.QueryParameters.encode(message.queryParams, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.queryInput != null && Object.hasOwnProperty.call(message, "queryInput")) $root.google.cloud.dialogflow.cx.v3beta1.QueryInput.encode(message.queryInput, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.persistParameterChanges != null && Object.hasOwnProperty.call(message, "persistParameterChanges")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.persistParameterChanges); return writer; }; @@ -120450,6 +120484,10 @@ message.queryInput = $root.google.cloud.dialogflow.cx.v3beta1.QueryInput.decode(reader, reader.uint32()); break; } + case 5: { + message.persistParameterChanges = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -120498,6 +120536,9 @@ if (error) return "queryInput." + error; } + if (message.persistParameterChanges != null && message.hasOwnProperty("persistParameterChanges")) + if (typeof message.persistParameterChanges !== "boolean") + return "persistParameterChanges: boolean expected"; return null; }; @@ -120525,6 +120566,8 @@ throw TypeError(".google.cloud.dialogflow.cx.v3beta1.MatchIntentRequest.queryInput: object expected"); message.queryInput = $root.google.cloud.dialogflow.cx.v3beta1.QueryInput.fromObject(object.queryInput); } + if (object.persistParameterChanges != null) + message.persistParameterChanges = Boolean(object.persistParameterChanges); return message; }; @@ -120545,6 +120588,7 @@ object.session = ""; object.queryParams = null; object.queryInput = null; + object.persistParameterChanges = false; } if (message.session != null && message.hasOwnProperty("session")) object.session = message.session; @@ -120552,6 +120596,8 @@ object.queryParams = $root.google.cloud.dialogflow.cx.v3beta1.QueryParameters.toObject(message.queryParams, options); if (message.queryInput != null && message.hasOwnProperty("queryInput")) object.queryInput = $root.google.cloud.dialogflow.cx.v3beta1.QueryInput.toObject(message.queryInput, options); + if (message.persistParameterChanges != null && message.hasOwnProperty("persistParameterChanges")) + object.persistParameterChanges = message.persistParameterChanges; return object; }; diff --git a/packages/google-cloud-dialogflow-cx/protos/protos.json b/packages/google-cloud-dialogflow-cx/protos/protos.json index 5d1544ce2a2..e064a917b28 100644 --- a/packages/google-cloud-dialogflow-cx/protos/protos.json +++ b/packages/google-cloud-dialogflow-cx/protos/protos.json @@ -5168,6 +5168,10 @@ "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "persistParameterChanges": { + "type": "bool", + "id": 5 } } }, @@ -12746,6 +12750,10 @@ "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "persistParameterChanges": { + "type": "bool", + "id": 5 } } }, diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.match_intent.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.match_intent.js index 3ebdc4e65d1..73a790edc0a 100644 --- a/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.match_intent.js +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.match_intent.js @@ -50,6 +50,10 @@ function main(session, queryInput) { * Required. The input specification. */ // const queryInput = {} + /** + * Persist session parameter changes from `query_params`. + */ + // const persistParameterChanges = true // Imports the Cx library const {SessionsClient} = require('@google-cloud/dialogflow-cx').v3; diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json b/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json index 9ff076b7a71..22f24592200 100644 --- a/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json @@ -3014,7 +3014,7 @@ "segments": [ { "start": 25, - "end": 72, + "end": 76, "type": "FULL" } ], @@ -3034,6 +3034,10 @@ { "name": "query_input", "type": ".google.cloud.dialogflow.cx.v3.QueryInput" + }, + { + "name": "persist_parameter_changes", + "type": "TYPE_BOOL" } ], "resultType": ".google.cloud.dialogflow.cx.v3.MatchIntentResponse", diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.match_intent.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.match_intent.js index ed88239769d..506bf894319 100644 --- a/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.match_intent.js +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.match_intent.js @@ -50,6 +50,10 @@ function main(session, queryInput) { * Required. The input specification. */ // const queryInput = {} + /** + * Persist session parameter changes from `query_params`. + */ + // const persistParameterChanges = true // Imports the Cx library const {SessionsClient} = require('@google-cloud/dialogflow-cx').v3beta1; diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json index 17bb2af95ca..30a26601bc7 100644 --- a/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json @@ -3014,7 +3014,7 @@ "segments": [ { "start": 25, - "end": 72, + "end": 76, "type": "FULL" } ], @@ -3034,6 +3034,10 @@ { "name": "query_input", "type": ".google.cloud.dialogflow.cx.v3beta1.QueryInput" + }, + { + "name": "persist_parameter_changes", + "type": "TYPE_BOOL" } ], "resultType": ".google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse", diff --git a/packages/google-cloud-dialogflow-cx/src/v3/sessions_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/sessions_client.ts index b35c1d60b19..578ed494543 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/sessions_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/sessions_client.ts @@ -610,6 +610,8 @@ export class SessionsClient { * The parameters of this query. * @param {google.cloud.dialogflow.cx.v3.QueryInput} request.queryInput * Required. The input specification. + * @param {boolean} request.persistParameterChanges + * Persist session parameter changes from `query_params`. * @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. diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/sessions_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/sessions_client.ts index f7a3d62272e..9a3685b51d1 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/sessions_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/sessions_client.ts @@ -566,6 +566,8 @@ export class SessionsClient { * The parameters of this query. * @param {google.cloud.dialogflow.cx.v3beta1.QueryInput} request.queryInput * Required. The input specification. + * @param {boolean} request.persistParameterChanges + * Persist session parameter changes from `query_params`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. From d7826603de82fa5aa0dc5f7155c46fe701abfe4c Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Wed, 1 Mar 2023 12:52:05 -0800 Subject: [PATCH 62/80] docs: update the list of available APIs (#4030) Co-authored-by: danieljbruce --- README.md | 2 +- libraries.json | 35 ++++++++++++++++++----------------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index bc0046be124..0055f81308e 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,6 @@ applications that interact with individual Google Cloud services: | [Security Command Center](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-securitycenter) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/security-center)](https://npm.im/@google-cloud/security-center) | | [Service Control API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-api-servicecontrol) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/service-control)](https://npm.im/@google-cloud/service-control) | | [Service Directory](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-servicedirectory) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/service-directory)](https://npm.im/@google-cloud/service-directory) | -| [Service Directory](https://github.com/googleapis/nodejs-service-directory) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/service-directory)](https://npm.im/@google-cloud/service-directory) | | [Service Management API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-api-servicemanagement) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/service-management)](https://npm.im/@google-cloud/service-management) | | [Service Usage](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-api-serviceusage) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/service-usage)](https://npm.im/@google-cloud/service-usage) | | [Shell](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-shell) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/shell)](https://npm.im/@google-cloud/shell) | @@ -129,6 +128,7 @@ applications that interact with individual Google Cloud services: | [Web Security Scanner](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-websecurityscanner) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/web-security-scanner)](https://npm.im/@google-cloud/web-security-scanner) | | [Workflows](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-workflows-executions) | [![Stable][stable-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/workflows)](https://npm.im/@google-cloud/workflows) | | [](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-bigquery-datapolicies) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/bigquery-datapolicies)](https://npm.im/@google-cloud/bigquery-datapolicies) | +| [Advisory Notifications API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-advisorynotifications) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/advisorynotifications)](https://npm.im/@google-cloud/advisorynotifications) | | [Analytics Hub API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-bigquery-dataexchange) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/bigquery-data-exchange)](https://npm.im/@google-cloud/bigquery-data-exchange) | | [Anthos Multi-Cloud API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-gkemulticloud) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/gkemulticloud)](https://npm.im/@google-cloud/gkemulticloud) | | [API Keys API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-api-apikeys) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/apikeys)](https://npm.im/@google-cloud/apikeys) | diff --git a/libraries.json b/libraries.json index bae3e4f7f3e..3fa055538f3 100644 --- a/libraries.json +++ b/libraries.json @@ -1727,23 +1727,6 @@ "library_type": "GAPIC_AUTO", "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-servicedirectory" }, - { - "client_documentation": "https://cloud.google.com/nodejs/docs/reference/service-directory/latest", - "api_id": "servicedirectory.googleapis.com", - "distribution_name": "@google-cloud/service-directory", - "release_level": "stable", - "default_version": "v1", - "language": "nodejs", - "name_pretty": "Service Directory", - "repo": "googleapis/nodejs-service-directory", - "product_documentation": "", - "requires_billing": true, - "name": "servicedirectory", - "issue_tracker": "https://github.com/googleapis/nodejs-service-directory/issues", - "api_shortname": "servicedirectory", - "library_type": "GAPIC_AUTO", - "linkToRepoHomepage": "https://github.com/googleapis/nodejs-service-directory" - }, { "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", "distribution_name": "@google-cloud/service-management", @@ -2185,6 +2168,24 @@ "library_type": "GAPIC_AUTO", "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-bigquery-datapolicies" }, + { + "name": "advisorynotifications", + "name_pretty": "Advisory Notifications API", + "product_documentation": "https://cloud.google.com/advisory-notifications/docs/overview", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/advisorynotifications/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/advisorynotifications", + "api_id": "advisorynotifications.googleapis.com", + "default_version": "v1", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "api_shortname": "advisorynotifications", + "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-advisorynotifications", + "support_documentation": "https://cloud.google.com/advisory-notifications/docs/getting-support" + }, { "name": "analyticshub", "name_pretty": "Analytics Hub API", From bd2b775600e6a575075871473cd8cad673104a36 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 1 Mar 2023 16:30:55 -0500 Subject: [PATCH 63/80] chore: release main (#4039) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: release main * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 2 +- changelog.json | 19 ++++++++++++++++++- .../google-cloud-dialogflow-cx/CHANGELOG.md | 7 +++++++ .../google-cloud-dialogflow-cx/package.json | 2 +- ...etadata.google.cloud.dialogflow.cx.v3.json | 2 +- ...ta.google.cloud.dialogflow.cx.v3beta1.json | 2 +- .../samples/package.json | 2 +- 7 files changed, 30 insertions(+), 6 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 923c706dcda..9e9297b0b5d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -47,7 +47,7 @@ "packages/google-cloud-datastream": "2.2.1", "packages/google-cloud-deploy": "2.3.1", "packages/google-cloud-dialogflow": "5.6.0", - "packages/google-cloud-dialogflow-cx": "3.3.0", + "packages/google-cloud-dialogflow-cx": "3.4.0", "packages/google-cloud-discoveryengine": "0.3.1", "packages/google-cloud-documentai": "7.1.0", "packages/google-cloud-domains": "2.2.1", diff --git a/changelog.json b/changelog.json index 647b1dc2eee..6c2298ae02a 100644 --- a/changelog.json +++ b/changelog.json @@ -1,6 +1,23 @@ { "repository": "googleapis/google-cloud-node", "entries": [ + { + "changes": [ + { + "type": "feat", + "sha": "ebaed2007ee154ce8f9a604d023d5a5cd1ef7b81", + "message": "[dialogflow-cx] Added persist_parameter_changes field from `query_params` to MatchIntentRequest", + "issues": [ + "4031" + ] + } + ], + "version": "3.4.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dialogflow-cx", + "id": "a114f189-3dcb-4e93-8f61-392fa990908f", + "createTime": "2023-03-01T20:52:56.363Z" + }, { "changes": [ { @@ -4299,5 +4316,5 @@ "createTime": "2023-01-28T04:18:24.718Z" } ], - "updateTime": "2023-03-01T19:38:11.617Z" + "updateTime": "2023-03-01T20:52:56.363Z" } \ No newline at end of file diff --git a/packages/google-cloud-dialogflow-cx/CHANGELOG.md b/packages/google-cloud-dialogflow-cx/CHANGELOG.md index 5c5e21469fa..778cd682294 100644 --- a/packages/google-cloud-dialogflow-cx/CHANGELOG.md +++ b/packages/google-cloud-dialogflow-cx/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [3.4.0](https://github.com/googleapis/google-cloud-node/compare/dialogflow-cx-v3.3.0...dialogflow-cx-v3.4.0) (2023-03-01) + + +### Features + +* [dialogflow-cx] Added persist_parameter_changes field from `query_params` to MatchIntentRequest ([#4031](https://github.com/googleapis/google-cloud-node/issues/4031)) ([ebaed20](https://github.com/googleapis/google-cloud-node/commit/ebaed2007ee154ce8f9a604d023d5a5cd1ef7b81)) + ## [3.3.0](https://github.com/googleapis/google-cloud-node/compare/dialogflow-cx-v3.2.1...dialogflow-cx-v3.3.0) (2023-02-23) diff --git a/packages/google-cloud-dialogflow-cx/package.json b/packages/google-cloud-dialogflow-cx/package.json index cee878147b6..3c9fc9a665d 100644 --- a/packages/google-cloud-dialogflow-cx/package.json +++ b/packages/google-cloud-dialogflow-cx/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/dialogflow-cx", - "version": "3.3.0", + "version": "3.4.0", "description": "Cx client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json b/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json index 22f24592200..8a66759d3c8 100644 --- a/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cx", - "version": "3.3.0", + "version": "3.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json index 30a26601bc7..44fc2c70488 100644 --- a/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cx", - "version": "3.3.0", + "version": "3.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dialogflow-cx/samples/package.json b/packages/google-cloud-dialogflow-cx/samples/package.json index ea92e21bb71..501e03235dc 100644 --- a/packages/google-cloud-dialogflow-cx/samples/package.json +++ b/packages/google-cloud-dialogflow-cx/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/dialogflow-cx": "^3.3.0", + "@google-cloud/dialogflow-cx": "^3.4.0", "uuid": "^9.0.0" }, "devDependencies": { From eeff90b8caa061b524c64908d956b27ac7287a1b Mon Sep 17 00:00:00 2001 From: JesseLovelace <43148100+JesseLovelace@users.noreply.github.com> Date: Wed, 1 Mar 2023 13:53:10 -0800 Subject: [PATCH 64/80] docs: [storagetransfer] add default values to quickstart (#4037) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add samples to quickstart * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix copyright --------- Co-authored-by: Owl Bot --- .../v1/snippet_metadata.google.storagetransfer.v1.json | 2 +- packages/google-storagetransfer/samples/quickstart.js | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/google-storagetransfer/samples/generated/v1/snippet_metadata.google.storagetransfer.v1.json b/packages/google-storagetransfer/samples/generated/v1/snippet_metadata.google.storagetransfer.v1.json index 4c0ccae276e..ae6675a408d 100644 --- a/packages/google-storagetransfer/samples/generated/v1/snippet_metadata.google.storagetransfer.v1.json +++ b/packages/google-storagetransfer/samples/generated/v1/snippet_metadata.google.storagetransfer.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-storagetransfer", - "version": "2.3.0", + "version": "2.3.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-storagetransfer/samples/quickstart.js b/packages/google-storagetransfer/samples/quickstart.js index f8d689408a8..9df26e4ef45 100644 --- a/packages/google-storagetransfer/samples/quickstart.js +++ b/packages/google-storagetransfer/samples/quickstart.js @@ -1,3 +1,5 @@ +// Copyright 2023 Google LLC +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -13,7 +15,11 @@ 'use strict'; -async function main(projectId = 'my-project', gcsSourceBucket, gcsSinkBucket) { +async function main( + projectId = 'my-project', + gcsSourceBucket = 'my-source-bucket', + gcsSinkBucket = 'my-sink-bucket' +) { // [START storagetransfer_quickstart] // Imports the Google Cloud client library From 44756d7c15642a065628cd4a598198a56584dbff Mon Sep 17 00:00:00 2001 From: "owlbot-bootstrapper[bot]" <104649659+owlbot-bootstrapper[bot]@users.noreply.github.com> Date: Wed, 1 Mar 2023 23:12:40 -0800 Subject: [PATCH 65/80] feat: add initial files for google.cloud.kms.inventory.v1 (#4011) * feat: initial commit * feat: initial generation of library Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWttcy1pbnZlbnRvcnkvLk93bEJvdC55YW1sIiwiaCI6ImExOTMzNDlkMzVkZmUxZDEwZTQ4YTQ2M2JiODBjMGRmMWI3ODVhNmIifQ== --------- Co-authored-by: Owlbot Bootstrapper Co-authored-by: Owl Bot Co-authored-by: Sofia Leon Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- .../google-cloud-kms-inventory/.OwlBot.yaml | 19 + .../google-cloud-kms-inventory/.eslintignore | 7 + .../google-cloud-kms-inventory/.eslintrc.json | 3 + .../google-cloud-kms-inventory/.gitattributes | 4 + .../google-cloud-kms-inventory/.gitignore | 14 + packages/google-cloud-kms-inventory/.jsdoc.js | 55 + .../google-cloud-kms-inventory/.mocharc.js | 29 + packages/google-cloud-kms-inventory/.nycrc | 24 + .../.prettierignore | 6 + .../google-cloud-kms-inventory/.prettierrc.js | 17 + .../.repo-metadata.json | 17 + .../CODE_OF_CONDUCT.md | 94 + .../CONTRIBUTING.md | 76 + packages/google-cloud-kms-inventory/LICENSE | 202 + packages/google-cloud-kms-inventory/README.md | 188 + .../linkinator.config.json | 16 + .../google-cloud-kms-inventory/package.json | 73 + .../google/cloud/common_resources.proto | 52 + .../inventory/v1/key_dashboard_service.proto | 81 + .../inventory/v1/key_tracking_service.proto | 212 + .../google/cloud/kms/v1/resources.proto | 859 + .../protos/protos.d.ts | 7347 ++++++ .../protos/protos.js | 20084 ++++++++++++++++ .../protos/protos.json | 2033 ++ .../samples/README.md | 122 + .../key_dashboard_service.list_crypto_keys.js | 75 + ...service.get_protected_resources_summary.js | 62 + ...king_service.search_protected_resources.js | 86 + ...etadata.google.cloud.kms.inventory.v1.json | 155 + ...etadata_google.cloud.kms.inventory.v1.json | 155 + .../samples/package.json | 24 + .../samples/quickstart.js | 74 + .../samples/test/quickstart.js | 41 + .../google-cloud-kms-inventory/src/index.ts | 29 + .../src/v1/index.ts | 20 + .../src/v1/key_dashboard_service_client.ts | 1152 + .../key_dashboard_service_client_config.json | 31 + .../v1/key_dashboard_service_proto_list.json | 5 + .../src/v1/key_tracking_service_client.ts | 1293 + .../key_tracking_service_client_config.json | 36 + .../v1/key_tracking_service_proto_list.json | 5 + .../system-test/fixtures/sample/src/index.js | 27 + .../system-test/fixtures/sample/src/index.ts | 43 + .../system-test/install.ts | 51 + .../test/gapic_key_dashboard_service_v1.ts | 1238 + .../test/gapic_key_tracking_service_v1.ts | 1396 ++ .../google-cloud-kms-inventory/tsconfig.json | 19 + .../webpack.config.js | 64 + .../snippet_metadata.google.cloud.kms.v1.json | 2 +- release-please-config.json | 1 + 50 files changed, 37717 insertions(+), 1 deletion(-) create mode 100644 packages/google-cloud-kms-inventory/.OwlBot.yaml create mode 100644 packages/google-cloud-kms-inventory/.eslintignore create mode 100644 packages/google-cloud-kms-inventory/.eslintrc.json create mode 100644 packages/google-cloud-kms-inventory/.gitattributes create mode 100644 packages/google-cloud-kms-inventory/.gitignore create mode 100644 packages/google-cloud-kms-inventory/.jsdoc.js create mode 100644 packages/google-cloud-kms-inventory/.mocharc.js create mode 100644 packages/google-cloud-kms-inventory/.nycrc create mode 100644 packages/google-cloud-kms-inventory/.prettierignore create mode 100644 packages/google-cloud-kms-inventory/.prettierrc.js create mode 100644 packages/google-cloud-kms-inventory/.repo-metadata.json create mode 100644 packages/google-cloud-kms-inventory/CODE_OF_CONDUCT.md create mode 100644 packages/google-cloud-kms-inventory/CONTRIBUTING.md create mode 100644 packages/google-cloud-kms-inventory/LICENSE create mode 100644 packages/google-cloud-kms-inventory/README.md create mode 100644 packages/google-cloud-kms-inventory/linkinator.config.json create mode 100644 packages/google-cloud-kms-inventory/package.json create mode 100644 packages/google-cloud-kms-inventory/protos/google/cloud/common_resources.proto create mode 100644 packages/google-cloud-kms-inventory/protos/google/cloud/kms/inventory/v1/key_dashboard_service.proto create mode 100644 packages/google-cloud-kms-inventory/protos/google/cloud/kms/inventory/v1/key_tracking_service.proto create mode 100644 packages/google-cloud-kms-inventory/protos/google/cloud/kms/v1/resources.proto create mode 100644 packages/google-cloud-kms-inventory/protos/protos.d.ts create mode 100644 packages/google-cloud-kms-inventory/protos/protos.js create mode 100644 packages/google-cloud-kms-inventory/protos/protos.json create mode 100644 packages/google-cloud-kms-inventory/samples/README.md create mode 100644 packages/google-cloud-kms-inventory/samples/generated/v1/key_dashboard_service.list_crypto_keys.js create mode 100644 packages/google-cloud-kms-inventory/samples/generated/v1/key_tracking_service.get_protected_resources_summary.js create mode 100644 packages/google-cloud-kms-inventory/samples/generated/v1/key_tracking_service.search_protected_resources.js create mode 100644 packages/google-cloud-kms-inventory/samples/generated/v1/snippet_metadata.google.cloud.kms.inventory.v1.json create mode 100644 packages/google-cloud-kms-inventory/samples/generated/v1/snippet_metadata_google.cloud.kms.inventory.v1.json create mode 100644 packages/google-cloud-kms-inventory/samples/package.json create mode 100644 packages/google-cloud-kms-inventory/samples/quickstart.js create mode 100644 packages/google-cloud-kms-inventory/samples/test/quickstart.js create mode 100644 packages/google-cloud-kms-inventory/src/index.ts create mode 100644 packages/google-cloud-kms-inventory/src/v1/index.ts create mode 100644 packages/google-cloud-kms-inventory/src/v1/key_dashboard_service_client.ts create mode 100644 packages/google-cloud-kms-inventory/src/v1/key_dashboard_service_client_config.json create mode 100644 packages/google-cloud-kms-inventory/src/v1/key_dashboard_service_proto_list.json create mode 100644 packages/google-cloud-kms-inventory/src/v1/key_tracking_service_client.ts create mode 100644 packages/google-cloud-kms-inventory/src/v1/key_tracking_service_client_config.json create mode 100644 packages/google-cloud-kms-inventory/src/v1/key_tracking_service_proto_list.json create mode 100644 packages/google-cloud-kms-inventory/system-test/fixtures/sample/src/index.js create mode 100644 packages/google-cloud-kms-inventory/system-test/fixtures/sample/src/index.ts create mode 100644 packages/google-cloud-kms-inventory/system-test/install.ts create mode 100644 packages/google-cloud-kms-inventory/test/gapic_key_dashboard_service_v1.ts create mode 100644 packages/google-cloud-kms-inventory/test/gapic_key_tracking_service_v1.ts create mode 100644 packages/google-cloud-kms-inventory/tsconfig.json create mode 100644 packages/google-cloud-kms-inventory/webpack.config.js diff --git a/packages/google-cloud-kms-inventory/.OwlBot.yaml b/packages/google-cloud-kms-inventory/.OwlBot.yaml new file mode 100644 index 00000000000..777705534e8 --- /dev/null +++ b/packages/google-cloud-kms-inventory/.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/kms/inventory/(.*)/.*-nodejs + dest: /owl-bot-staging/google-cloud-kms-inventory/$1 + +api-name: kmsinventory \ No newline at end of file diff --git a/packages/google-cloud-kms-inventory/.eslintignore b/packages/google-cloud-kms-inventory/.eslintignore new file mode 100644 index 00000000000..ea5b04aebe6 --- /dev/null +++ b/packages/google-cloud-kms-inventory/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ +samples/generated/ diff --git a/packages/google-cloud-kms-inventory/.eslintrc.json b/packages/google-cloud-kms-inventory/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/packages/google-cloud-kms-inventory/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-cloud-kms-inventory/.gitattributes b/packages/google-cloud-kms-inventory/.gitattributes new file mode 100644 index 00000000000..33739cb74e4 --- /dev/null +++ b/packages/google-cloud-kms-inventory/.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-kms-inventory/.gitignore b/packages/google-cloud-kms-inventory/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/packages/google-cloud-kms-inventory/.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-kms-inventory/.jsdoc.js b/packages/google-cloud-kms-inventory/.jsdoc.js new file mode 100644 index 00000000000..38cdbc970f1 --- /dev/null +++ b/packages/google-cloud-kms-inventory/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2023 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: 'inventory', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-cloud-kms-inventory/.mocharc.js b/packages/google-cloud-kms-inventory/.mocharc.js new file mode 100644 index 00000000000..49e7e228701 --- /dev/null +++ b/packages/google-cloud-kms-inventory/.mocharc.js @@ -0,0 +1,29 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000, + "recursive": true +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/packages/google-cloud-kms-inventory/.nycrc b/packages/google-cloud-kms-inventory/.nycrc new file mode 100644 index 00000000000..b18d5472b62 --- /dev/null +++ b/packages/google-cloud-kms-inventory/.nycrc @@ -0,0 +1,24 @@ +{ + "report-dir": "./.coverage", + "reporter": ["text", "lcov"], + "exclude": [ + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/conformance", + "**/docs", + "**/samples", + "**/scripts", + "**/protos", + "**/test", + "**/*.d.ts", + ".jsdoc.js", + "**/.jsdoc.js", + "karma.conf.js", + "webpack-tests.config.js", + "webpack.config.js" + ], + "exclude-after-remap": false, + "all": true +} diff --git a/packages/google-cloud-kms-inventory/.prettierignore b/packages/google-cloud-kms-inventory/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-cloud-kms-inventory/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-kms-inventory/.prettierrc.js b/packages/google-cloud-kms-inventory/.prettierrc.js new file mode 100644 index 00000000000..1e6cec783e4 --- /dev/null +++ b/packages/google-cloud-kms-inventory/.prettierrc.js @@ -0,0 +1,17 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/google-cloud-kms-inventory/.repo-metadata.json b/packages/google-cloud-kms-inventory/.repo-metadata.json new file mode 100644 index 00000000000..bbcfad9d74b --- /dev/null +++ b/packages/google-cloud-kms-inventory/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "name": "kmsinventory", + "name_pretty": "KMS Inventory API", + "product_documentation": "https://cloud.google.com/kms/docs/", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/kmsinventory/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/inventory", + "api_id": "kmsinventory.googleapis.com", + "default_version": "v1", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "api_shortname": "kmsinventory" +} + diff --git a/packages/google-cloud-kms-inventory/CODE_OF_CONDUCT.md b/packages/google-cloud-kms-inventory/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..2add2547a81 --- /dev/null +++ b/packages/google-cloud-kms-inventory/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-kms-inventory/CONTRIBUTING.md b/packages/google-cloud-kms-inventory/CONTRIBUTING.md new file mode 100644 index 00000000000..bfd169383e1 --- /dev/null +++ b/packages/google-cloud-kms-inventory/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 KMS Inventory API API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + # Run unit tests. + npm test + + # Run sample integration tests. + npm run samples-test + + # Run all system tests. + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=kmsinventory.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-kms-inventory/LICENSE b/packages/google-cloud-kms-inventory/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/packages/google-cloud-kms-inventory/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-kms-inventory/README.md b/packages/google-cloud-kms-inventory/README.md new file mode 100644 index 00000000000..111342d1de2 --- /dev/null +++ b/packages/google-cloud-kms-inventory/README.md @@ -0,0 +1,188 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [KMS Inventory API: Node.js Client](https://github.com/googleapis/google-cloud-node) + +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![npm version](https://img.shields.io/npm/v/@google-cloud/kms-inventory.svg)](https://www.npmjs.org/package/@google-cloud/kms-inventory) + + + + +Inventory client for Node.js + + +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-kms-inventory/CHANGELOG.md). + +* [KMS Inventory API Node.js Client API Reference][client-docs] +* [KMS Inventory API Documentation][product-docs] +* [github.com/googleapis/google-cloud-node/packages/google-cloud-kms-inventory](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-kms-inventory) + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + * [Using the client library](#using-the-client-library) +* [Samples](#samples) +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the KMS Inventory API API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + +### Installing the client library + +```bash +npm install @google-cloud/kms-inventory +``` + + +### Using the client library + +```javascript +/** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ +/** + * Required. The Google Cloud project for which to retrieve key metadata, in + * the format `projects/*` + */ +// const parent = 'abc123' +/** + * Optional. The maximum number of keys to return. The service may return + * fewer than this value. If unspecified, at most 1000 keys will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + */ +// const pageSize = 1234 +/** + * Optional. Pass this into a subsequent request in order to receive the next + * page of results. + */ +// const pageToken = 'abc123' + +// Imports the Inventory library +const {KeyDashboardServiceClient} = require('@google-cloud/kms-inventory').v1; + +// Instantiates a client +const inventoryClient = new KeyDashboardServiceClient(); + +async function callListCryptoKeys() { + // Construct request + const request = { + parent, + }; + + // Run request + const [response] = await inventoryClient.listCryptoKeys(request, { + maxResults: 1, + autoPaginate: false, + }); + console.log(response); +} + +callListCryptoKeys(); + +``` + + + +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Key_dashboard_service.list_crypto_keys | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms-inventory/samples/generated/v1/key_dashboard_service.list_crypto_keys.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms-inventory/samples/generated/v1/key_dashboard_service.list_crypto_keys.js,samples/README.md) | +| Key_tracking_service.get_protected_resources_summary | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms-inventory/samples/generated/v1/key_tracking_service.get_protected_resources_summary.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms-inventory/samples/generated/v1/key_tracking_service.get_protected_resources_summary.js,samples/README.md) | +| Key_tracking_service.search_protected_resources | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms-inventory/samples/generated/v1/key_tracking_service.search_protected_resources.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms-inventory/samples/generated/v1/key_tracking_service.search_protected_resources.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms-inventory/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms-inventory/samples/quickstart.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms-inventory/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms-inventory/samples/test/quickstart.js,samples/README.md) | + + + +The [KMS Inventory API Node.js Client API Reference][client-docs] documentation +also contains samples. + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. +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/kms-inventory@legacy-8` installs client libraries +for versions compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + + + + + + + +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. + + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md). + +Please note that this `README.md`, the `samples/README.md`, +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. To edit one of these files, make an edit +to its templates in +[directory](https://github.com/googleapis/synthtool). + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) + +[client-docs]: https://cloud.google.com/nodejs/docs/reference/kmsinventory/latest +[product-docs]: https://cloud.google.com/kms/docs/ +[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=kmsinventory.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started diff --git a/packages/google-cloud-kms-inventory/linkinator.config.json b/packages/google-cloud-kms-inventory/linkinator.config.json new file mode 100644 index 00000000000..befd23c8633 --- /dev/null +++ b/packages/google-cloud-kms-inventory/linkinator.config.json @@ -0,0 +1,16 @@ +{ + "recurse": true, + "skip": [ + "https://codecov.io/gh/googleapis/", + "www.googleapis.com", + "img.shields.io", + "https://console.cloud.google.com/cloudshell", + "https://support.google.com" + ], + "silent": true, + "concurrency": 5, + "retry": true, + "retryErrors": true, + "retryErrorsCount": 5, + "retryErrorsJitter": 3000 +} diff --git a/packages/google-cloud-kms-inventory/package.json b/packages/google-cloud-kms-inventory/package.json new file mode 100644 index 00000000000..e757deaab31 --- /dev/null +++ b/packages/google-cloud-kms-inventory/package.json @@ -0,0 +1,73 @@ +{ + "name": "@google-cloud/kms-inventory", + "version": "0.1.0", + "description": "Inventory client for Node.js", + "repository": { + "type": "git", + "directory": "packages/google-cloud-kms-inventory", + "url": "https://github.com/googleapis/google-cloud-node.git" + }, + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google inventory", + "inventory", + "key dashboard service", + "key tracking service" + ], + "scripts": { + "clean": "gts clean", + "compile-protos": "compileProtos src", + "compile": "tsc -p . && cp -r protos build/", + "docs-test": "linkinator docs", + "docs": "jsdoc -c .jsdoc.js", + "fix": "gts fix", + "lint": "gts check", + "precompile": "gts clean", + "predocs-test": "npm run docs", + "prelint": "cd samples; npm link ../; npm install", + "prepare": "npm run compile-protos && npm run compile", + "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", + "system-test": "npm run compile && c8 mocha build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^3.5.7" + }, + "devDependencies": { + "@types/mocha": "^10.0.1", + "@types/node": "^18.11.18", + "@types/sinon": "^10.0.13", + "c8": "^7.13.0", + "gts": "^3.1.1", + "jsdoc": "^4.0.2", + "jsdoc-fresh": "^2.0.1", + "jsdoc-region-tag": "^2.0.1", + "linkinator": "^4.1.2", + "mocha": "^10.2.0", + "null-loader": "^4.0.1", + "pack-n-play": "^1.0.0-2", + "sinon": "^15.0.1", + "ts-loader": "^8.4.0", + "typescript": "^4.8.4", + "webpack": "^4.46.0", + "webpack-cli": "^4.10.0" + }, + "engines": { + "node": ">=12.0.0" + }, + "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-kms-inventory" +} diff --git a/packages/google-cloud-kms-inventory/protos/google/cloud/common_resources.proto b/packages/google-cloud-kms-inventory/protos/google/cloud/common_resources.proto new file mode 100644 index 00000000000..56c9f800d5e --- /dev/null +++ b/packages/google-cloud-kms-inventory/protos/google/cloud/common_resources.proto @@ -0,0 +1,52 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This file contains stub messages for common resources in GCP. +// It is not intended to be directly generated, and is instead used by +// other tooling to be able to match common resource patterns. +syntax = "proto3"; + +package google.cloud; + +import "google/api/resource.proto"; + + +option (google.api.resource_definition) = { + type: "cloudresourcemanager.googleapis.com/Project" + pattern: "projects/{project}" +}; + + +option (google.api.resource_definition) = { + type: "cloudresourcemanager.googleapis.com/Organization" + pattern: "organizations/{organization}" +}; + + +option (google.api.resource_definition) = { + type: "cloudresourcemanager.googleapis.com/Folder" + pattern: "folders/{folder}" +}; + + +option (google.api.resource_definition) = { + type: "cloudbilling.googleapis.com/BillingAccount" + pattern: "billingAccounts/{billing_account}" +}; + +option (google.api.resource_definition) = { + type: "locations.googleapis.com/Location" + pattern: "projects/{project}/locations/{location}" +}; + diff --git a/packages/google-cloud-kms-inventory/protos/google/cloud/kms/inventory/v1/key_dashboard_service.proto b/packages/google-cloud-kms-inventory/protos/google/cloud/kms/inventory/v1/key_dashboard_service.proto new file mode 100644 index 00000000000..d85c4ad5b39 --- /dev/null +++ b/packages/google-cloud-kms-inventory/protos/google/cloud/kms/inventory/v1/key_dashboard_service.proto @@ -0,0 +1,81 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.kms.inventory.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/kms/v1/resources.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Kms.Inventory.V1"; +option go_package = "cloud.google.com/go/kms/inventory/apiv1/inventorypb;inventorypb"; +option java_multiple_files = true; +option java_outer_classname = "KeyDashboardServiceProto"; +option java_package = "com.google.cloud.kms.inventory.v1"; +option php_namespace = "Google\\Cloud\\Kms\\Inventory\\V1"; + +// Provides a cross-region view of all Cloud KMS keys in a given Cloud project. +service KeyDashboardService { + option (google.api.default_host) = "kmsinventory.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Returns cryptographic keys managed by Cloud KMS in a given Cloud project. + // Note that this data is sourced from snapshots, meaning it may not + // completely reflect the actual state of key metadata at call time. + rpc ListCryptoKeys(ListCryptoKeysRequest) returns (ListCryptoKeysResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*}/cryptoKeys" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request message for +// [KeyDashboardService.ListCryptoKeys][google.cloud.kms.inventory.v1.KeyDashboardService.ListCryptoKeys]. +message ListCryptoKeysRequest { + // Required. The Google Cloud project for which to retrieve key metadata, in + // the format `projects/*` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Optional. The maximum number of keys to return. The service may return + // fewer than this value. If unspecified, at most 1000 keys will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Pass this into a subsequent request in order to receive the next + // page of results. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [KeyDashboardService.ListCryptoKeys][google.cloud.kms.inventory.v1.KeyDashboardService.ListCryptoKeys]. +message ListCryptoKeysResponse { + // The list of [CryptoKeys][google.cloud.kms.v1.CryptoKey]. + repeated google.cloud.kms.v1.CryptoKey crypto_keys = 1; + + // The page token returned from the previous response if the next page is + // desired. + string next_page_token = 2; +} diff --git a/packages/google-cloud-kms-inventory/protos/google/cloud/kms/inventory/v1/key_tracking_service.proto b/packages/google-cloud-kms-inventory/protos/google/cloud/kms/inventory/v1/key_tracking_service.proto new file mode 100644 index 00000000000..a3f7252cf16 --- /dev/null +++ b/packages/google-cloud-kms-inventory/protos/google/cloud/kms/inventory/v1/key_tracking_service.proto @@ -0,0 +1,212 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.kms.inventory.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Kms.Inventory.V1"; +option go_package = "cloud.google.com/go/kms/inventory/apiv1/inventorypb;inventorypb"; +option java_multiple_files = true; +option java_outer_classname = "KeyTrackingServiceProto"; +option java_package = "com.google.cloud.kms.inventory.v1"; +option php_namespace = "Google\\Cloud\\Kms\\Inventory\\V1"; + +// Returns information about the resources in an org that are protected by a +// given Cloud KMS key via CMEK. +service KeyTrackingService { + option (google.api.default_host) = "kmsinventory.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Returns aggregate information about the resources protected by the given + // Cloud KMS [CryptoKey][google.cloud.kms.v1.CryptoKey]. Only resources within + // the same Cloud organization as the key will be returned. The project that + // holds the key must be part of an organization in order for this call to + // succeed. + rpc GetProtectedResourcesSummary(GetProtectedResourcesSummaryRequest) + returns (ProtectedResourcesSummary) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/**}/protectedResourcesSummary" + }; + option (google.api.method_signature) = "name"; + } + + // Returns metadata about the resources protected by the given Cloud KMS + // [CryptoKey][google.cloud.kms.v1.CryptoKey] in the given Cloud organization. + rpc SearchProtectedResources(SearchProtectedResourcesRequest) + returns (SearchProtectedResourcesResponse) { + option (google.api.http) = { + get: "/v1/{scope=organizations/*}/protectedResources:search" + }; + option (google.api.method_signature) = "scope, crypto_key"; + } +} + +// Request message for +// [KeyTrackingService.GetProtectedResourcesSummary][google.cloud.kms.inventory.v1.KeyTrackingService.GetProtectedResourcesSummary]. +message GetProtectedResourcesSummaryRequest { + // Required. The resource name of the + // [CryptoKey][google.cloud.kms.v1.CryptoKey]. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "kmsinventory.googleapis.com/ProtectedResourcesSummary" + } + ]; +} + +// Aggregate information about the resources protected by a Cloud KMS key in the +// same Cloud organization as the key. +message ProtectedResourcesSummary { + option (google.api.resource) = { + type: "kmsinventory.googleapis.com/ProtectedResourcesSummary" + pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/protectedResourcesSummary" + pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}/protectedResourcesSummary" + }; + + // The full name of the ProtectedResourcesSummary resource. + // Example: + // projects/test-project/locations/us/keyRings/test-keyring/cryptoKeys/test-key/protectedResourcesSummary + string name = 5; + + // The total number of protected resources in the same Cloud organization as + // the key. + int64 resource_count = 1; + + // The number of distinct Cloud projects in the same Cloud organization as the + // key that have resources protected by the key. + int32 project_count = 2; + + // The number of resources protected by the key grouped by resource type. + map resource_types = 3; + + // The number of resources protected by the key grouped by Cloud product. + map cloud_products = 6; + + // The number of resources protected by the key grouped by region. + map locations = 4; +} + +// Request message for +// [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources]. +message SearchProtectedResourcesRequest { + // Required. Resource name of the organization. + // Example: organizations/123 + string scope = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Organization" + } + ]; + + // Required. The resource name of the + // [CryptoKey][google.cloud.kms.v1.CryptoKey]. + string crypto_key = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "*" } + ]; + + // The maximum number of resources to return. The service may return fewer + // than this value. + // If unspecified, at most 500 resources will be returned. + // The maximum value is 500; values above 500 will be coerced to 500. + int32 page_size = 3; + + // A page token, received from a previous + // [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources] + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources] + // must match the call that provided the page token. + string page_token = 4; +} + +// Response message for +// [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources]. +message SearchProtectedResourcesResponse { + // Protected resources for this page. + repeated ProtectedResource protected_resources = 1; + + // A token that can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Metadata about a resource protected by a Cloud KMS key. +message ProtectedResource { + option (google.api.resource) = { + type: "cloudasset.googleapis.com/Asset" + pattern: "*" + }; + + // The full resource name of the resource. + // Example: + // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + string name = 1; + + // Format: `projects/{PROJECT_NUMBER}`. + string project = 2; + + // The ID of the project that owns the resource. + string project_id = 9; + + // The Cloud product that owns the resource. + // Example: `compute` + string cloud_product = 8; + + // Example: `compute.googleapis.com/Disk` + string resource_type = 3; + + // Location can be `global`, regional like `us-east1`, or zonal like + // `us-west1-b`. + string location = 4; + + // A key-value pair of the resource's labels (v1) to their values. + map labels = 5; + + // The name of the Cloud KMS + // [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) + // used to protect this resource via CMEK. This field is empty if the + // Google Cloud product owning the resource does not provide key version data + // to Asset Inventory. If there are multiple key versions protecting the + // resource, then this is same value as the first element of + // crypto_key_versions. + string crypto_key_version = 6 [(google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + }]; + + // The names of the Cloud KMS + // [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) + // used to protect this resource via CMEK. This field is empty if the + // Google Cloud product owning the resource does not provide key versions data + // to Asset Inventory. The first element of this field is stored in + // crypto_key_version. + repeated string crypto_key_versions = 10 [(google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + }]; + + // Output only. The time at which this resource was created. The granularity + // is in seconds. Timestamp.nanos will always be 0. + google.protobuf.Timestamp create_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-kms-inventory/protos/google/cloud/kms/v1/resources.proto b/packages/google-cloud-kms-inventory/protos/google/cloud/kms/v1/resources.proto new file mode 100644 index 00000000000..23a787295fd --- /dev/null +++ b/packages/google-cloud-kms-inventory/protos/google/cloud/kms/v1/resources.proto @@ -0,0 +1,859 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.kms.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Kms.V1"; +option go_package = "cloud.google.com/go/kms/apiv1/kmspb;kmspb"; +option java_multiple_files = true; +option java_outer_classname = "KmsResourcesProto"; +option java_package = "com.google.cloud.kms.v1"; +option php_namespace = "Google\\Cloud\\Kms\\V1"; + +// A [KeyRing][google.cloud.kms.v1.KeyRing] is a toplevel logical grouping of +// [CryptoKeys][google.cloud.kms.v1.CryptoKey]. +message KeyRing { + option (google.api.resource) = { + type: "cloudkms.googleapis.com/KeyRing" + pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}" + }; + + // Output only. The resource name for the + // [KeyRing][google.cloud.kms.v1.KeyRing] in the format + // `projects/*/locations/*/keyRings/*`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this [KeyRing][google.cloud.kms.v1.KeyRing] + // was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A [CryptoKey][google.cloud.kms.v1.CryptoKey] represents a logical key that +// can be used for cryptographic operations. +// +// A [CryptoKey][google.cloud.kms.v1.CryptoKey] is made up of zero or more +// [versions][google.cloud.kms.v1.CryptoKeyVersion], which represent the actual +// key material used in cryptographic operations. +message CryptoKey { + option (google.api.resource) = { + type: "cloudkms.googleapis.com/CryptoKey" + pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}" + }; + + // [CryptoKeyPurpose][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose] + // describes the cryptographic capabilities of a + // [CryptoKey][google.cloud.kms.v1.CryptoKey]. A given key can only be used + // for the operations allowed by its purpose. For more information, see [Key + // purposes](https://cloud.google.com/kms/docs/algorithms#key_purposes). + enum CryptoKeyPurpose { + // Not specified. + CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0; + + // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used + // with [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and + // [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt]. + ENCRYPT_DECRYPT = 1; + + // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used + // with + // [AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign] + // and + // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. + ASYMMETRIC_SIGN = 5; + + // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used + // with + // [AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt] + // and + // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. + ASYMMETRIC_DECRYPT = 6; + + // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used + // with [MacSign][google.cloud.kms.v1.KeyManagementService.MacSign]. + MAC = 9; + } + + // Output only. The resource name for this + // [CryptoKey][google.cloud.kms.v1.CryptoKey] in the format + // `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A copy of the "primary" + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used + // by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this + // [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in + // [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name]. + // + // The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be + // updated via + // [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]. + // + // Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] + // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] + // may have a primary. For other keys, this field will be omitted. + CryptoKeyVersion primary = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The immutable purpose of this + // [CryptoKey][google.cloud.kms.v1.CryptoKey]. + CryptoKeyPurpose purpose = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The time at which this + // [CryptoKey][google.cloud.kms.v1.CryptoKey] was created. + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time], + // the Key Management Service will automatically: + // + // 1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey]. + // 2. Mark the new version as primary. + // + // Key rotations performed manually via + // [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + // and + // [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion] + // do not affect + // [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]. + // + // Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] + // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] + // support automatic rotation. For other keys, this field must be omitted. + google.protobuf.Timestamp next_rotation_time = 7; + + // Controls the rate of automatic rotation. + oneof rotation_schedule { + // [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time] + // will be advanced by this period when the service automatically rotates a + // key. Must be at least 24 hours and at most 876,000 hours. + // + // If [rotation_period][google.cloud.kms.v1.CryptoKey.rotation_period] is + // set, + // [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time] + // must also be set. + // + // Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] + // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] + // support automatic rotation. For other keys, this field must be omitted. + google.protobuf.Duration rotation_period = 8; + } + + // A template describing settings for new + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The + // properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + // instances created by either + // [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + // or auto-rotation are controlled by this template. + CryptoKeyVersionTemplate version_template = 11; + + // Labels with user-defined metadata. For more information, see + // [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys). + map labels = 10; + + // Immutable. Whether this key may contain imported versions only. + bool import_only = 13 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The period of time that versions of this key spend in the + // [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] + // state before transitioning to + // [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. + // If not specified at creation time, the default duration is 24 hours. + google.protobuf.Duration destroy_scheduled_duration = 14 + [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The resource name of the backend environment where the key + // material for all [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] + // associated with this [CryptoKey][google.cloud.kms.v1.CryptoKey] reside and + // where all related cryptographic operations are performed. Only applicable + // if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] have a + // [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of + // [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], with the + // resource name in the format `projects/*/locations/*/ekmConnections/*`. + // Note, this list is non-exhaustive and may apply to additional + // [ProtectionLevels][google.cloud.kms.v1.ProtectionLevel] in the future. + string crypto_key_backend = 15 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { type: "*" } + ]; +} + +// A [CryptoKeyVersionTemplate][google.cloud.kms.v1.CryptoKeyVersionTemplate] +// specifies the properties to use when creating a new +// [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], either manually +// with +// [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] +// or automatically as a result of auto-rotation. +message CryptoKeyVersionTemplate { + // [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating + // a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this + // template. Immutable. Defaults to + // [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE]. + ProtectionLevel protection_level = 1; + + // Required. + // [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + // to use when creating a + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this + // template. + // + // For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both + // this field is omitted and + // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is + // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. + CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// Contains an HSM-generated attestation about a key operation. For more +// information, see [Verifying attestations] +// (https://cloud.google.com/kms/docs/attest-key). +message KeyOperationAttestation { + // Attestation formats provided by the HSM. + enum AttestationFormat { + // Not specified. + ATTESTATION_FORMAT_UNSPECIFIED = 0; + + // Cavium HSM attestation compressed with gzip. Note that this format is + // defined by Cavium and subject to change at any time. + // + // See + // https://www.marvell.com/products/security-solutions/nitrox-hs-adapters/software-key-attestation.html. + CAVIUM_V1_COMPRESSED = 3; + + // Cavium HSM attestation V2 compressed with gzip. This is a new format + // introduced in Cavium's version 3.2-08. + CAVIUM_V2_COMPRESSED = 4; + } + + // Certificate chains needed to verify the attestation. + // Certificates in chains are PEM-encoded and are ordered based on + // https://tools.ietf.org/html/rfc5246#section-7.4.2. + message CertificateChains { + // Cavium certificate chain corresponding to the attestation. + repeated string cavium_certs = 1; + + // Google card certificate chain corresponding to the attestation. + repeated string google_card_certs = 2; + + // Google partition certificate chain corresponding to the attestation. + repeated string google_partition_certs = 3; + } + + // Output only. The format of the attestation data. + AttestationFormat format = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The attestation data provided by the HSM when the key + // operation was performed. + bytes content = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The certificate chains needed to validate the attestation + CertificateChains cert_chains = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents an +// individual cryptographic key, and the associated key material. +// +// An +// [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] +// version can be used for cryptographic operations. +// +// For security reasons, the raw cryptographic key material represented by a +// [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] can never be viewed +// or exported. It can only be used to encrypt, decrypt, or sign data when an +// authorized user or application invokes Cloud KMS. +message CryptoKeyVersion { + option (google.api.resource) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}" + }; + + // The algorithm of the + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], indicating what + // parameters must be used for each cryptographic operation. + // + // The + // [GOOGLE_SYMMETRIC_ENCRYPTION][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm.GOOGLE_SYMMETRIC_ENCRYPTION] + // algorithm is usable with + // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] + // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. + // + // Algorithms beginning with "RSA_SIGN_" are usable with + // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] + // [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN]. + // + // The fields in the name after "RSA_SIGN_" correspond to the following + // parameters: padding algorithm, modulus bit length, and digest algorithm. + // + // For PSS, the salt length used is equal to the length of digest + // algorithm. For example, + // [RSA_SIGN_PSS_2048_SHA256][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_2048_SHA256] + // will use PSS with a salt length of 256 bits or 32 bytes. + // + // Algorithms beginning with "RSA_DECRYPT_" are usable with + // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] + // [ASYMMETRIC_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_DECRYPT]. + // + // The fields in the name after "RSA_DECRYPT_" correspond to the following + // parameters: padding algorithm, modulus bit length, and digest algorithm. + // + // Algorithms beginning with "EC_SIGN_" are usable with + // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] + // [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN]. + // + // The fields in the name after "EC_SIGN_" correspond to the following + // parameters: elliptic curve, digest algorithm. + // + // Algorithms beginning with "HMAC_" are usable with + // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] + // [MAC][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.MAC]. + // + // The suffix following "HMAC_" corresponds to the hash algorithm being used + // (eg. SHA256). + // + // For more information, see [Key purposes and algorithms] + // (https://cloud.google.com/kms/docs/algorithms). + enum CryptoKeyVersionAlgorithm { + // Not specified. + CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0; + + // Creates symmetric encryption keys. + GOOGLE_SYMMETRIC_ENCRYPTION = 1; + + // RSASSA-PSS 2048 bit key with a SHA256 digest. + RSA_SIGN_PSS_2048_SHA256 = 2; + + // RSASSA-PSS 3072 bit key with a SHA256 digest. + RSA_SIGN_PSS_3072_SHA256 = 3; + + // RSASSA-PSS 4096 bit key with a SHA256 digest. + RSA_SIGN_PSS_4096_SHA256 = 4; + + // RSASSA-PSS 4096 bit key with a SHA512 digest. + RSA_SIGN_PSS_4096_SHA512 = 15; + + // RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_2048_SHA256 = 5; + + // RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_3072_SHA256 = 6; + + // RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_4096_SHA256 = 7; + + // RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest. + RSA_SIGN_PKCS1_4096_SHA512 = 16; + + // RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key. + RSA_SIGN_RAW_PKCS1_2048 = 28; + + // RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key. + RSA_SIGN_RAW_PKCS1_3072 = 29; + + // RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key. + RSA_SIGN_RAW_PKCS1_4096 = 30; + + // RSAES-OAEP 2048 bit key with a SHA256 digest. + RSA_DECRYPT_OAEP_2048_SHA256 = 8; + + // RSAES-OAEP 3072 bit key with a SHA256 digest. + RSA_DECRYPT_OAEP_3072_SHA256 = 9; + + // RSAES-OAEP 4096 bit key with a SHA256 digest. + RSA_DECRYPT_OAEP_4096_SHA256 = 10; + + // RSAES-OAEP 4096 bit key with a SHA512 digest. + RSA_DECRYPT_OAEP_4096_SHA512 = 17; + + // RSAES-OAEP 2048 bit key with a SHA1 digest. + RSA_DECRYPT_OAEP_2048_SHA1 = 37; + + // RSAES-OAEP 3072 bit key with a SHA1 digest. + RSA_DECRYPT_OAEP_3072_SHA1 = 38; + + // RSAES-OAEP 4096 bit key with a SHA1 digest. + RSA_DECRYPT_OAEP_4096_SHA1 = 39; + + // ECDSA on the NIST P-256 curve with a SHA256 digest. + EC_SIGN_P256_SHA256 = 12; + + // ECDSA on the NIST P-384 curve with a SHA384 digest. + EC_SIGN_P384_SHA384 = 13; + + // ECDSA on the non-NIST secp256k1 curve. This curve is only supported for + // HSM protection level. + EC_SIGN_SECP256K1_SHA256 = 31; + + // HMAC-SHA256 signing with a 256 bit key. + HMAC_SHA256 = 32; + + // HMAC-SHA1 signing with a 160 bit key. + HMAC_SHA1 = 33; + + // HMAC-SHA384 signing with a 384 bit key. + HMAC_SHA384 = 34; + + // HMAC-SHA512 signing with a 512 bit key. + HMAC_SHA512 = 35; + + // HMAC-SHA224 signing with a 224 bit key. + HMAC_SHA224 = 36; + + // Algorithm representing symmetric encryption by an external key manager. + EXTERNAL_SYMMETRIC_ENCRYPTION = 18; + } + + // The state of a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], + // indicating if it can be used. + enum CryptoKeyVersionState { + // Not specified. + CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0; + + // This version is still being generated. It may not be used, enabled, + // disabled, or destroyed yet. Cloud KMS will automatically mark this + // version + // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] + // as soon as the version is ready. + PENDING_GENERATION = 5; + + // This version may be used for cryptographic operations. + ENABLED = 1; + + // This version may not be used, but the key material is still available, + // and the version can be placed back into the + // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] + // state. + DISABLED = 2; + + // This version is destroyed, and the key material is no longer stored. + // This version may only become + // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] + // again if this version is + // [reimport_eligible][google.cloud.kms.v1.CryptoKeyVersion.reimport_eligible] + // and the original key material is reimported with a call to + // [KeyManagementService.ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion]. + DESTROYED = 3; + + // This version is scheduled for destruction, and will be destroyed soon. + // Call + // [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] + // to put it back into the + // [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED] + // state. + DESTROY_SCHEDULED = 4; + + // This version is still being imported. It may not be used, enabled, + // disabled, or destroyed yet. Cloud KMS will automatically mark this + // version + // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] + // as soon as the version is ready. + PENDING_IMPORT = 6; + + // This version was not imported successfully. It may not be used, enabled, + // disabled, or destroyed. The submitted key material has been discarded. + // Additional details can be found in + // [CryptoKeyVersion.import_failure_reason][google.cloud.kms.v1.CryptoKeyVersion.import_failure_reason]. + IMPORT_FAILED = 7; + } + + // A view for [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]s. + // Controls the level of detail returned for + // [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] in + // [KeyManagementService.ListCryptoKeyVersions][google.cloud.kms.v1.KeyManagementService.ListCryptoKeyVersions] + // and + // [KeyManagementService.ListCryptoKeys][google.cloud.kms.v1.KeyManagementService.ListCryptoKeys]. + enum CryptoKeyVersionView { + // Default view for each + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Does not + // include the + // [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation] field. + CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0; + + // Provides all fields in each + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], including the + // [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation]. + FULL = 1; + } + + // Output only. The resource name for this + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format + // `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The current state of the + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + CryptoKeyVersionState state = 3; + + // Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] + // describing how crypto operations are performed with this + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + ProtectionLevel protection_level = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The + // [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + // that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + // supports. + CryptoKeyVersionAlgorithm algorithm = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Statement that was generated and signed by the HSM at key + // creation time. Use this statement to verify attributes of the key as stored + // on the HSM, independently of Google. Only provided for key versions with + // [protection_level][google.cloud.kms.v1.CryptoKeyVersion.protection_level] + // [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. + KeyOperationAttestation attestation = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time this + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was + // generated. + google.protobuf.Timestamp generate_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time this + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is + // scheduled for destruction. Only present if + // [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + // [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]. + google.protobuf.Timestamp destroy_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time this CryptoKeyVersion's key material was + // destroyed. Only present if + // [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + // [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. + google.protobuf.Timestamp destroy_event_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the [ImportJob][google.cloud.kms.v1.ImportJob] + // used in the most recent import of this + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only present if + // the underlying key material was imported. + string import_job = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was + // most recently imported. + google.protobuf.Timestamp import_time = 15 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The root cause of the most recent import failure. Only present + // if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + // [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED]. + string import_failure_reason = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // ExternalProtectionLevelOptions stores a group of additional fields for + // configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that + // are specific to the + // [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level + // and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] + // protection levels. + ExternalProtectionLevelOptions external_protection_level_options = 17; + + // Output only. Whether or not this key version is eligible for reimport, by + // being specified as a target in + // [ImportCryptoKeyVersionRequest.crypto_key_version][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.crypto_key_version]. + bool reimport_eligible = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The public key for a given +// [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Obtained via +// [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. +message PublicKey { + option (google.api.resource) = { + type: "cloudkms.googleapis.com/PublicKey" + pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}/publicKey" + }; + + // The public key, encoded in PEM format. For more information, see the + // [RFC 7468](https://tools.ietf.org/html/rfc7468) sections for + // [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and + // [Textual Encoding of Subject Public Key Info] + // (https://tools.ietf.org/html/rfc7468#section-13). + string pem = 1; + + // The + // [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + // associated with this key. + CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2; + + // Integrity verification field. A CRC32C checksum of the returned + // [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of + // [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by + // computing the CRC32C checksum of + // [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and comparing your + // results to this field. Discard the response in case of non-matching + // checksum values, and perform a limited number of retries. A persistent + // mismatch may indicate an issue in your computation of the CRC32C checksum. + // Note: This field is defined as int64 for reasons of compatibility across + // different languages. However, it is a non-negative integer, which will + // never exceed 2^32-1, and can be safely downconverted to uint32 in languages + // that support this type. + // + // NOTE: This field is in Beta. + google.protobuf.Int64Value pem_crc32c = 3; + + // The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. + // Provided here for verification. + // + // NOTE: This field is in Beta. + string name = 4; + + // The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. + ProtectionLevel protection_level = 5; +} + +// An [ImportJob][google.cloud.kms.v1.ImportJob] can be used to create +// [CryptoKeys][google.cloud.kms.v1.CryptoKey] and +// [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] using pre-existing +// key material, generated outside of Cloud KMS. +// +// When an [ImportJob][google.cloud.kms.v1.ImportJob] is created, Cloud KMS will +// generate a "wrapping key", which is a public/private key pair. You use the +// wrapping key to encrypt (also known as wrap) the pre-existing key material to +// protect it during the import process. The nature of the wrapping key depends +// on the choice of +// [import_method][google.cloud.kms.v1.ImportJob.import_method]. When the +// wrapping key generation is complete, the +// [state][google.cloud.kms.v1.ImportJob.state] will be set to +// [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE] and the +// [public_key][google.cloud.kms.v1.ImportJob.public_key] can be fetched. The +// fetched public key can then be used to wrap your pre-existing key material. +// +// Once the key material is wrapped, it can be imported into a new +// [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in an existing +// [CryptoKey][google.cloud.kms.v1.CryptoKey] by calling +// [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion]. +// Multiple [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] can be +// imported with a single [ImportJob][google.cloud.kms.v1.ImportJob]. Cloud KMS +// uses the private key portion of the wrapping key to unwrap the key material. +// Only Cloud KMS has access to the private key. +// +// An [ImportJob][google.cloud.kms.v1.ImportJob] expires 3 days after it is +// created. Once expired, Cloud KMS will no longer be able to import or unwrap +// any key material that was wrapped with the +// [ImportJob][google.cloud.kms.v1.ImportJob]'s public key. +// +// For more information, see +// [Importing a key](https://cloud.google.com/kms/docs/importing-a-key). +message ImportJob { + option (google.api.resource) = { + type: "cloudkms.googleapis.com/ImportJob" + pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/importJobs/{import_job}" + }; + + // [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] describes the + // key wrapping method chosen for this + // [ImportJob][google.cloud.kms.v1.ImportJob]. + enum ImportMethod { + // Not specified. + IMPORT_METHOD_UNSPECIFIED = 0; + + // This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping + // scheme defined in the PKCS #11 standard. In summary, this involves + // wrapping the raw key with an ephemeral AES key, and wrapping the + // ephemeral AES key with a 3072 bit RSA key. For more details, see + // [RSA AES key wrap + // mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908). + RSA_OAEP_3072_SHA1_AES_256 = 1; + + // This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping + // scheme defined in the PKCS #11 standard. In summary, this involves + // wrapping the raw key with an ephemeral AES key, and wrapping the + // ephemeral AES key with a 4096 bit RSA key. For more details, see + // [RSA AES key wrap + // mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908). + RSA_OAEP_4096_SHA1_AES_256 = 2; + + // This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping + // scheme defined in the PKCS #11 standard. In summary, this involves + // wrapping the raw key with an ephemeral AES key, and wrapping the + // ephemeral AES key with a 3072 bit RSA key. For more details, see + // [RSA AES key wrap + // mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908). + RSA_OAEP_3072_SHA256_AES_256 = 3; + + // This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping + // scheme defined in the PKCS #11 standard. In summary, this involves + // wrapping the raw key with an ephemeral AES key, and wrapping the + // ephemeral AES key with a 4096 bit RSA key. For more details, see + // [RSA AES key wrap + // mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908). + RSA_OAEP_4096_SHA256_AES_256 = 4; + + // This ImportMethod represents RSAES-OAEP with a 3072 bit RSA key. The + // key material to be imported is wrapped directly with the RSA key. Due + // to technical limitations of RSA wrapping, this method cannot be used to + // wrap RSA keys for import. + RSA_OAEP_3072_SHA256 = 5; + + // This ImportMethod represents RSAES-OAEP with a 4096 bit RSA key. The + // key material to be imported is wrapped directly with the RSA key. Due + // to technical limitations of RSA wrapping, this method cannot be used to + // wrap RSA keys for import. + RSA_OAEP_4096_SHA256 = 6; + } + + // The state of the [ImportJob][google.cloud.kms.v1.ImportJob], indicating if + // it can be used. + enum ImportJobState { + // Not specified. + IMPORT_JOB_STATE_UNSPECIFIED = 0; + + // The wrapping key for this job is still being generated. It may not be + // used. Cloud KMS will automatically mark this job as + // [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE] as soon as + // the wrapping key is generated. + PENDING_GENERATION = 1; + + // This job may be used in + // [CreateCryptoKey][google.cloud.kms.v1.KeyManagementService.CreateCryptoKey] + // and + // [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + // requests. + ACTIVE = 2; + + // This job can no longer be used and may not leave this state once entered. + EXPIRED = 3; + } + + // The public key component of the wrapping key. For details of the type of + // key this public key corresponds to, see the + // [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod]. + message WrappingPublicKey { + // The public key, encoded in PEM format. For more information, see the [RFC + // 7468](https://tools.ietf.org/html/rfc7468) sections for [General + // Considerations](https://tools.ietf.org/html/rfc7468#section-2) and + // [Textual Encoding of Subject Public Key Info] + // (https://tools.ietf.org/html/rfc7468#section-13). + string pem = 1; + } + + // Output only. The resource name for this + // [ImportJob][google.cloud.kms.v1.ImportJob] in the format + // `projects/*/locations/*/keyRings/*/importJobs/*`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Immutable. The wrapping method to be used for incoming key + // material. + ImportMethod import_method = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. Immutable. The protection level of the + // [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the + // [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + // of the [version_template][google.cloud.kms.v1.CryptoKey.version_template] + // on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import + // into. + ProtectionLevel protection_level = 9 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Output only. The time at which this + // [ImportJob][google.cloud.kms.v1.ImportJob] was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key + // material was generated. + google.protobuf.Timestamp generate_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this + // [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and + // can no longer be used to import key material. + google.protobuf.Timestamp expire_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob] + // expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is + // [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED]. + google.protobuf.Timestamp expire_event_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the + // [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used. + ImportJobState state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The public key with which to wrap key material prior to + // import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is + // [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE]. + WrappingPublicKey public_key = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Statement that was generated and signed by the key creator + // (for example, an HSM) at key creation time. Use this statement to verify + // attributes of the key as stored on the HSM, independently of Google. + // Only present if the chosen + // [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a + // protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. + KeyOperationAttestation attestation = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// ExternalProtectionLevelOptions stores a group of additional fields for +// configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that +// are specific to the [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] +// protection level and +// [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] protection +// levels. +message ExternalProtectionLevelOptions { + // The URI for an external resource that this + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents. + string external_key_uri = 1; + + // The path to the external key material on the EKM when using + // [EkmConnection][google.cloud.kms.v1.EkmConnection] e.g., "v0/my/key". Set + // this field instead of external_key_uri when using an + // [EkmConnection][google.cloud.kms.v1.EkmConnection]. + string ekm_connection_key_path = 2; +} + +// [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] specifies how +// cryptographic operations are performed. For more information, see [Protection +// levels] (https://cloud.google.com/kms/docs/algorithms#protection_levels). +enum ProtectionLevel { + // Not specified. + PROTECTION_LEVEL_UNSPECIFIED = 0; + + // Crypto operations are performed in software. + SOFTWARE = 1; + + // Crypto operations are performed in a Hardware Security Module. + HSM = 2; + + // Crypto operations are performed by an external key manager. + EXTERNAL = 3; + + // Crypto operations are performed in an EKM-over-VPC backend. + EXTERNAL_VPC = 4; +} diff --git a/packages/google-cloud-kms-inventory/protos/protos.d.ts b/packages/google-cloud-kms-inventory/protos/protos.d.ts new file mode 100644 index 00000000000..775fd5f0570 --- /dev/null +++ b/packages/google-cloud-kms-inventory/protos/protos.d.ts @@ -0,0 +1,7347 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); +/** Namespace google. */ +export namespace google { + + /** Namespace cloud. */ + namespace cloud { + + /** Namespace kms. */ + namespace kms { + + /** Namespace inventory. */ + namespace inventory { + + /** Namespace v1. */ + namespace v1 { + + /** Represents a KeyDashboardService */ + class KeyDashboardService extends $protobuf.rpc.Service { + + /** + * Constructs a new KeyDashboardService 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 KeyDashboardService 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): KeyDashboardService; + + /** + * Calls ListCryptoKeys. + * @param request ListCryptoKeysRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCryptoKeysResponse + */ + public listCryptoKeys(request: google.cloud.kms.inventory.v1.IListCryptoKeysRequest, callback: google.cloud.kms.inventory.v1.KeyDashboardService.ListCryptoKeysCallback): void; + + /** + * Calls ListCryptoKeys. + * @param request ListCryptoKeysRequest message or plain object + * @returns Promise + */ + public listCryptoKeys(request: google.cloud.kms.inventory.v1.IListCryptoKeysRequest): Promise; + } + + namespace KeyDashboardService { + + /** + * Callback as used by {@link google.cloud.kms.inventory.v1.KeyDashboardService|listCryptoKeys}. + * @param error Error, if any + * @param [response] ListCryptoKeysResponse + */ + type ListCryptoKeysCallback = (error: (Error|null), response?: google.cloud.kms.inventory.v1.ListCryptoKeysResponse) => void; + } + + /** Properties of a ListCryptoKeysRequest. */ + interface IListCryptoKeysRequest { + + /** ListCryptoKeysRequest parent */ + parent?: (string|null); + + /** ListCryptoKeysRequest pageSize */ + pageSize?: (number|null); + + /** ListCryptoKeysRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListCryptoKeysRequest. */ + class ListCryptoKeysRequest implements IListCryptoKeysRequest { + + /** + * Constructs a new ListCryptoKeysRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.kms.inventory.v1.IListCryptoKeysRequest); + + /** ListCryptoKeysRequest parent. */ + public parent: string; + + /** ListCryptoKeysRequest pageSize. */ + public pageSize: number; + + /** ListCryptoKeysRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListCryptoKeysRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCryptoKeysRequest instance + */ + public static create(properties?: google.cloud.kms.inventory.v1.IListCryptoKeysRequest): google.cloud.kms.inventory.v1.ListCryptoKeysRequest; + + /** + * Encodes the specified ListCryptoKeysRequest message. Does not implicitly {@link google.cloud.kms.inventory.v1.ListCryptoKeysRequest.verify|verify} messages. + * @param message ListCryptoKeysRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.kms.inventory.v1.IListCryptoKeysRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCryptoKeysRequest message, length delimited. Does not implicitly {@link google.cloud.kms.inventory.v1.ListCryptoKeysRequest.verify|verify} messages. + * @param message ListCryptoKeysRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.kms.inventory.v1.IListCryptoKeysRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCryptoKeysRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCryptoKeysRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.inventory.v1.ListCryptoKeysRequest; + + /** + * Decodes a ListCryptoKeysRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCryptoKeysRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.inventory.v1.ListCryptoKeysRequest; + + /** + * Verifies a ListCryptoKeysRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCryptoKeysRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCryptoKeysRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.kms.inventory.v1.ListCryptoKeysRequest; + + /** + * Creates a plain object from a ListCryptoKeysRequest message. Also converts values to other types if specified. + * @param message ListCryptoKeysRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.kms.inventory.v1.ListCryptoKeysRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCryptoKeysRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCryptoKeysRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListCryptoKeysResponse. */ + interface IListCryptoKeysResponse { + + /** ListCryptoKeysResponse cryptoKeys */ + cryptoKeys?: (google.cloud.kms.v1.ICryptoKey[]|null); + + /** ListCryptoKeysResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListCryptoKeysResponse. */ + class ListCryptoKeysResponse implements IListCryptoKeysResponse { + + /** + * Constructs a new ListCryptoKeysResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.kms.inventory.v1.IListCryptoKeysResponse); + + /** ListCryptoKeysResponse cryptoKeys. */ + public cryptoKeys: google.cloud.kms.v1.ICryptoKey[]; + + /** ListCryptoKeysResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListCryptoKeysResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCryptoKeysResponse instance + */ + public static create(properties?: google.cloud.kms.inventory.v1.IListCryptoKeysResponse): google.cloud.kms.inventory.v1.ListCryptoKeysResponse; + + /** + * Encodes the specified ListCryptoKeysResponse message. Does not implicitly {@link google.cloud.kms.inventory.v1.ListCryptoKeysResponse.verify|verify} messages. + * @param message ListCryptoKeysResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.kms.inventory.v1.IListCryptoKeysResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCryptoKeysResponse message, length delimited. Does not implicitly {@link google.cloud.kms.inventory.v1.ListCryptoKeysResponse.verify|verify} messages. + * @param message ListCryptoKeysResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.kms.inventory.v1.IListCryptoKeysResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCryptoKeysResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCryptoKeysResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.inventory.v1.ListCryptoKeysResponse; + + /** + * Decodes a ListCryptoKeysResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCryptoKeysResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.inventory.v1.ListCryptoKeysResponse; + + /** + * Verifies a ListCryptoKeysResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCryptoKeysResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCryptoKeysResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.kms.inventory.v1.ListCryptoKeysResponse; + + /** + * Creates a plain object from a ListCryptoKeysResponse message. Also converts values to other types if specified. + * @param message ListCryptoKeysResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.kms.inventory.v1.ListCryptoKeysResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCryptoKeysResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCryptoKeysResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a KeyTrackingService */ + class KeyTrackingService extends $protobuf.rpc.Service { + + /** + * Constructs a new KeyTrackingService 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 KeyTrackingService 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): KeyTrackingService; + + /** + * Calls GetProtectedResourcesSummary. + * @param request GetProtectedResourcesSummaryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ProtectedResourcesSummary + */ + public getProtectedResourcesSummary(request: google.cloud.kms.inventory.v1.IGetProtectedResourcesSummaryRequest, callback: google.cloud.kms.inventory.v1.KeyTrackingService.GetProtectedResourcesSummaryCallback): void; + + /** + * Calls GetProtectedResourcesSummary. + * @param request GetProtectedResourcesSummaryRequest message or plain object + * @returns Promise + */ + public getProtectedResourcesSummary(request: google.cloud.kms.inventory.v1.IGetProtectedResourcesSummaryRequest): Promise; + + /** + * Calls SearchProtectedResources. + * @param request SearchProtectedResourcesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SearchProtectedResourcesResponse + */ + public searchProtectedResources(request: google.cloud.kms.inventory.v1.ISearchProtectedResourcesRequest, callback: google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResourcesCallback): void; + + /** + * Calls SearchProtectedResources. + * @param request SearchProtectedResourcesRequest message or plain object + * @returns Promise + */ + public searchProtectedResources(request: google.cloud.kms.inventory.v1.ISearchProtectedResourcesRequest): Promise; + } + + namespace KeyTrackingService { + + /** + * Callback as used by {@link google.cloud.kms.inventory.v1.KeyTrackingService|getProtectedResourcesSummary}. + * @param error Error, if any + * @param [response] ProtectedResourcesSummary + */ + type GetProtectedResourcesSummaryCallback = (error: (Error|null), response?: google.cloud.kms.inventory.v1.ProtectedResourcesSummary) => void; + + /** + * Callback as used by {@link google.cloud.kms.inventory.v1.KeyTrackingService|searchProtectedResources}. + * @param error Error, if any + * @param [response] SearchProtectedResourcesResponse + */ + type SearchProtectedResourcesCallback = (error: (Error|null), response?: google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse) => void; + } + + /** Properties of a GetProtectedResourcesSummaryRequest. */ + interface IGetProtectedResourcesSummaryRequest { + + /** GetProtectedResourcesSummaryRequest name */ + name?: (string|null); + } + + /** Represents a GetProtectedResourcesSummaryRequest. */ + class GetProtectedResourcesSummaryRequest implements IGetProtectedResourcesSummaryRequest { + + /** + * Constructs a new GetProtectedResourcesSummaryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.kms.inventory.v1.IGetProtectedResourcesSummaryRequest); + + /** GetProtectedResourcesSummaryRequest name. */ + public name: string; + + /** + * Creates a new GetProtectedResourcesSummaryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetProtectedResourcesSummaryRequest instance + */ + public static create(properties?: google.cloud.kms.inventory.v1.IGetProtectedResourcesSummaryRequest): google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest; + + /** + * Encodes the specified GetProtectedResourcesSummaryRequest message. Does not implicitly {@link google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest.verify|verify} messages. + * @param message GetProtectedResourcesSummaryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.kms.inventory.v1.IGetProtectedResourcesSummaryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetProtectedResourcesSummaryRequest message, length delimited. Does not implicitly {@link google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest.verify|verify} messages. + * @param message GetProtectedResourcesSummaryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.kms.inventory.v1.IGetProtectedResourcesSummaryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetProtectedResourcesSummaryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetProtectedResourcesSummaryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest; + + /** + * Decodes a GetProtectedResourcesSummaryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetProtectedResourcesSummaryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest; + + /** + * Verifies a GetProtectedResourcesSummaryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetProtectedResourcesSummaryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetProtectedResourcesSummaryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest; + + /** + * Creates a plain object from a GetProtectedResourcesSummaryRequest message. Also converts values to other types if specified. + * @param message GetProtectedResourcesSummaryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetProtectedResourcesSummaryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetProtectedResourcesSummaryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ProtectedResourcesSummary. */ + interface IProtectedResourcesSummary { + + /** ProtectedResourcesSummary name */ + name?: (string|null); + + /** ProtectedResourcesSummary resourceCount */ + resourceCount?: (number|Long|string|null); + + /** ProtectedResourcesSummary projectCount */ + projectCount?: (number|null); + + /** ProtectedResourcesSummary resourceTypes */ + resourceTypes?: ({ [k: string]: (number|Long|string) }|null); + + /** ProtectedResourcesSummary cloudProducts */ + cloudProducts?: ({ [k: string]: (number|Long|string) }|null); + + /** ProtectedResourcesSummary locations */ + locations?: ({ [k: string]: (number|Long|string) }|null); + } + + /** Represents a ProtectedResourcesSummary. */ + class ProtectedResourcesSummary implements IProtectedResourcesSummary { + + /** + * Constructs a new ProtectedResourcesSummary. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.kms.inventory.v1.IProtectedResourcesSummary); + + /** ProtectedResourcesSummary name. */ + public name: string; + + /** ProtectedResourcesSummary resourceCount. */ + public resourceCount: (number|Long|string); + + /** ProtectedResourcesSummary projectCount. */ + public projectCount: number; + + /** ProtectedResourcesSummary resourceTypes. */ + public resourceTypes: { [k: string]: (number|Long|string) }; + + /** ProtectedResourcesSummary cloudProducts. */ + public cloudProducts: { [k: string]: (number|Long|string) }; + + /** ProtectedResourcesSummary locations. */ + public locations: { [k: string]: (number|Long|string) }; + + /** + * Creates a new ProtectedResourcesSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns ProtectedResourcesSummary instance + */ + public static create(properties?: google.cloud.kms.inventory.v1.IProtectedResourcesSummary): google.cloud.kms.inventory.v1.ProtectedResourcesSummary; + + /** + * Encodes the specified ProtectedResourcesSummary message. Does not implicitly {@link google.cloud.kms.inventory.v1.ProtectedResourcesSummary.verify|verify} messages. + * @param message ProtectedResourcesSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.kms.inventory.v1.IProtectedResourcesSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProtectedResourcesSummary message, length delimited. Does not implicitly {@link google.cloud.kms.inventory.v1.ProtectedResourcesSummary.verify|verify} messages. + * @param message ProtectedResourcesSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.kms.inventory.v1.IProtectedResourcesSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProtectedResourcesSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProtectedResourcesSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.inventory.v1.ProtectedResourcesSummary; + + /** + * Decodes a ProtectedResourcesSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProtectedResourcesSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.inventory.v1.ProtectedResourcesSummary; + + /** + * Verifies a ProtectedResourcesSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProtectedResourcesSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProtectedResourcesSummary + */ + public static fromObject(object: { [k: string]: any }): google.cloud.kms.inventory.v1.ProtectedResourcesSummary; + + /** + * Creates a plain object from a ProtectedResourcesSummary message. Also converts values to other types if specified. + * @param message ProtectedResourcesSummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.kms.inventory.v1.ProtectedResourcesSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProtectedResourcesSummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProtectedResourcesSummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SearchProtectedResourcesRequest. */ + interface ISearchProtectedResourcesRequest { + + /** SearchProtectedResourcesRequest scope */ + scope?: (string|null); + + /** SearchProtectedResourcesRequest cryptoKey */ + cryptoKey?: (string|null); + + /** SearchProtectedResourcesRequest pageSize */ + pageSize?: (number|null); + + /** SearchProtectedResourcesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a SearchProtectedResourcesRequest. */ + class SearchProtectedResourcesRequest implements ISearchProtectedResourcesRequest { + + /** + * Constructs a new SearchProtectedResourcesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.kms.inventory.v1.ISearchProtectedResourcesRequest); + + /** SearchProtectedResourcesRequest scope. */ + public scope: string; + + /** SearchProtectedResourcesRequest cryptoKey. */ + public cryptoKey: string; + + /** SearchProtectedResourcesRequest pageSize. */ + public pageSize: number; + + /** SearchProtectedResourcesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new SearchProtectedResourcesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchProtectedResourcesRequest instance + */ + public static create(properties?: google.cloud.kms.inventory.v1.ISearchProtectedResourcesRequest): google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest; + + /** + * Encodes the specified SearchProtectedResourcesRequest message. Does not implicitly {@link google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest.verify|verify} messages. + * @param message SearchProtectedResourcesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.kms.inventory.v1.ISearchProtectedResourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchProtectedResourcesRequest message, length delimited. Does not implicitly {@link google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest.verify|verify} messages. + * @param message SearchProtectedResourcesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.kms.inventory.v1.ISearchProtectedResourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchProtectedResourcesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchProtectedResourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest; + + /** + * Decodes a SearchProtectedResourcesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchProtectedResourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest; + + /** + * Verifies a SearchProtectedResourcesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SearchProtectedResourcesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchProtectedResourcesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest; + + /** + * Creates a plain object from a SearchProtectedResourcesRequest message. Also converts values to other types if specified. + * @param message SearchProtectedResourcesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchProtectedResourcesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchProtectedResourcesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SearchProtectedResourcesResponse. */ + interface ISearchProtectedResourcesResponse { + + /** SearchProtectedResourcesResponse protectedResources */ + protectedResources?: (google.cloud.kms.inventory.v1.IProtectedResource[]|null); + + /** SearchProtectedResourcesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a SearchProtectedResourcesResponse. */ + class SearchProtectedResourcesResponse implements ISearchProtectedResourcesResponse { + + /** + * Constructs a new SearchProtectedResourcesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.kms.inventory.v1.ISearchProtectedResourcesResponse); + + /** SearchProtectedResourcesResponse protectedResources. */ + public protectedResources: google.cloud.kms.inventory.v1.IProtectedResource[]; + + /** SearchProtectedResourcesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new SearchProtectedResourcesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchProtectedResourcesResponse instance + */ + public static create(properties?: google.cloud.kms.inventory.v1.ISearchProtectedResourcesResponse): google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse; + + /** + * Encodes the specified SearchProtectedResourcesResponse message. Does not implicitly {@link google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse.verify|verify} messages. + * @param message SearchProtectedResourcesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.kms.inventory.v1.ISearchProtectedResourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchProtectedResourcesResponse message, length delimited. Does not implicitly {@link google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse.verify|verify} messages. + * @param message SearchProtectedResourcesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.kms.inventory.v1.ISearchProtectedResourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchProtectedResourcesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchProtectedResourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse; + + /** + * Decodes a SearchProtectedResourcesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchProtectedResourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse; + + /** + * Verifies a SearchProtectedResourcesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SearchProtectedResourcesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchProtectedResourcesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse; + + /** + * Creates a plain object from a SearchProtectedResourcesResponse message. Also converts values to other types if specified. + * @param message SearchProtectedResourcesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchProtectedResourcesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchProtectedResourcesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ProtectedResource. */ + interface IProtectedResource { + + /** ProtectedResource name */ + name?: (string|null); + + /** ProtectedResource project */ + project?: (string|null); + + /** ProtectedResource projectId */ + projectId?: (string|null); + + /** ProtectedResource cloudProduct */ + cloudProduct?: (string|null); + + /** ProtectedResource resourceType */ + resourceType?: (string|null); + + /** ProtectedResource location */ + location?: (string|null); + + /** ProtectedResource labels */ + labels?: ({ [k: string]: string }|null); + + /** ProtectedResource cryptoKeyVersion */ + cryptoKeyVersion?: (string|null); + + /** ProtectedResource cryptoKeyVersions */ + cryptoKeyVersions?: (string[]|null); + + /** ProtectedResource createTime */ + createTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a ProtectedResource. */ + class ProtectedResource implements IProtectedResource { + + /** + * Constructs a new ProtectedResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.kms.inventory.v1.IProtectedResource); + + /** ProtectedResource name. */ + public name: string; + + /** ProtectedResource project. */ + public project: string; + + /** ProtectedResource projectId. */ + public projectId: string; + + /** ProtectedResource cloudProduct. */ + public cloudProduct: string; + + /** ProtectedResource resourceType. */ + public resourceType: string; + + /** ProtectedResource location. */ + public location: string; + + /** ProtectedResource labels. */ + public labels: { [k: string]: string }; + + /** ProtectedResource cryptoKeyVersion. */ + public cryptoKeyVersion: string; + + /** ProtectedResource cryptoKeyVersions. */ + public cryptoKeyVersions: string[]; + + /** ProtectedResource createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new ProtectedResource instance using the specified properties. + * @param [properties] Properties to set + * @returns ProtectedResource instance + */ + public static create(properties?: google.cloud.kms.inventory.v1.IProtectedResource): google.cloud.kms.inventory.v1.ProtectedResource; + + /** + * Encodes the specified ProtectedResource message. Does not implicitly {@link google.cloud.kms.inventory.v1.ProtectedResource.verify|verify} messages. + * @param message ProtectedResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.kms.inventory.v1.IProtectedResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProtectedResource message, length delimited. Does not implicitly {@link google.cloud.kms.inventory.v1.ProtectedResource.verify|verify} messages. + * @param message ProtectedResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.kms.inventory.v1.IProtectedResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProtectedResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProtectedResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.inventory.v1.ProtectedResource; + + /** + * Decodes a ProtectedResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProtectedResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.inventory.v1.ProtectedResource; + + /** + * Verifies a ProtectedResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProtectedResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProtectedResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.kms.inventory.v1.ProtectedResource; + + /** + * Creates a plain object from a ProtectedResource message. Also converts values to other types if specified. + * @param message ProtectedResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.kms.inventory.v1.ProtectedResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProtectedResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProtectedResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a KeyRing. */ + interface IKeyRing { + + /** KeyRing name */ + name?: (string|null); + + /** KeyRing createTime */ + createTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a KeyRing. */ + class KeyRing implements IKeyRing { + + /** + * Constructs a new KeyRing. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.kms.v1.IKeyRing); + + /** KeyRing name. */ + public name: string; + + /** KeyRing createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new KeyRing instance using the specified properties. + * @param [properties] Properties to set + * @returns KeyRing instance + */ + public static create(properties?: google.cloud.kms.v1.IKeyRing): google.cloud.kms.v1.KeyRing; + + /** + * Encodes the specified KeyRing message. Does not implicitly {@link google.cloud.kms.v1.KeyRing.verify|verify} messages. + * @param message KeyRing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.kms.v1.IKeyRing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KeyRing message, length delimited. Does not implicitly {@link google.cloud.kms.v1.KeyRing.verify|verify} messages. + * @param message KeyRing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.kms.v1.IKeyRing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KeyRing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KeyRing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.KeyRing; + + /** + * Decodes a KeyRing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KeyRing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.KeyRing; + + /** + * Verifies a KeyRing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KeyRing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KeyRing + */ + public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.KeyRing; + + /** + * Creates a plain object from a KeyRing message. Also converts values to other types if specified. + * @param message KeyRing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.kms.v1.KeyRing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KeyRing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KeyRing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CryptoKey. */ + interface ICryptoKey { + + /** CryptoKey name */ + name?: (string|null); + + /** CryptoKey primary */ + primary?: (google.cloud.kms.v1.ICryptoKeyVersion|null); + + /** CryptoKey purpose */ + purpose?: (google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose|keyof typeof google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose|null); + + /** CryptoKey createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** CryptoKey nextRotationTime */ + nextRotationTime?: (google.protobuf.ITimestamp|null); + + /** CryptoKey rotationPeriod */ + rotationPeriod?: (google.protobuf.IDuration|null); + + /** CryptoKey versionTemplate */ + versionTemplate?: (google.cloud.kms.v1.ICryptoKeyVersionTemplate|null); + + /** CryptoKey labels */ + labels?: ({ [k: string]: string }|null); + + /** CryptoKey importOnly */ + importOnly?: (boolean|null); + + /** CryptoKey destroyScheduledDuration */ + destroyScheduledDuration?: (google.protobuf.IDuration|null); + + /** CryptoKey cryptoKeyBackend */ + cryptoKeyBackend?: (string|null); + } + + /** Represents a CryptoKey. */ + class CryptoKey implements ICryptoKey { + + /** + * Constructs a new CryptoKey. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.kms.v1.ICryptoKey); + + /** CryptoKey name. */ + public name: string; + + /** CryptoKey primary. */ + public primary?: (google.cloud.kms.v1.ICryptoKeyVersion|null); + + /** CryptoKey purpose. */ + public purpose: (google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose|keyof typeof google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose); + + /** CryptoKey createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** CryptoKey nextRotationTime. */ + public nextRotationTime?: (google.protobuf.ITimestamp|null); + + /** CryptoKey rotationPeriod. */ + public rotationPeriod?: (google.protobuf.IDuration|null); + + /** CryptoKey versionTemplate. */ + public versionTemplate?: (google.cloud.kms.v1.ICryptoKeyVersionTemplate|null); + + /** CryptoKey labels. */ + public labels: { [k: string]: string }; + + /** CryptoKey importOnly. */ + public importOnly: boolean; + + /** CryptoKey destroyScheduledDuration. */ + public destroyScheduledDuration?: (google.protobuf.IDuration|null); + + /** CryptoKey cryptoKeyBackend. */ + public cryptoKeyBackend: string; + + /** CryptoKey rotationSchedule. */ + public rotationSchedule?: "rotationPeriod"; + + /** + * Creates a new CryptoKey instance using the specified properties. + * @param [properties] Properties to set + * @returns CryptoKey instance + */ + public static create(properties?: google.cloud.kms.v1.ICryptoKey): google.cloud.kms.v1.CryptoKey; + + /** + * Encodes the specified CryptoKey message. Does not implicitly {@link google.cloud.kms.v1.CryptoKey.verify|verify} messages. + * @param message CryptoKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.kms.v1.ICryptoKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CryptoKey message, length delimited. Does not implicitly {@link google.cloud.kms.v1.CryptoKey.verify|verify} messages. + * @param message CryptoKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.kms.v1.ICryptoKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CryptoKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CryptoKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.CryptoKey; + + /** + * Decodes a CryptoKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CryptoKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.CryptoKey; + + /** + * Verifies a CryptoKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CryptoKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CryptoKey + */ + public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.CryptoKey; + + /** + * Creates a plain object from a CryptoKey message. Also converts values to other types if specified. + * @param message CryptoKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.kms.v1.CryptoKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CryptoKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CryptoKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CryptoKey { + + /** CryptoKeyPurpose enum. */ + enum CryptoKeyPurpose { + CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0, + ENCRYPT_DECRYPT = 1, + ASYMMETRIC_SIGN = 5, + ASYMMETRIC_DECRYPT = 6, + MAC = 9 + } + } + + /** Properties of a CryptoKeyVersionTemplate. */ + interface ICryptoKeyVersionTemplate { + + /** CryptoKeyVersionTemplate protectionLevel */ + protectionLevel?: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel|null); + + /** CryptoKeyVersionTemplate algorithm */ + algorithm?: (google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm|keyof typeof google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm|null); + } + + /** Represents a CryptoKeyVersionTemplate. */ + class CryptoKeyVersionTemplate implements ICryptoKeyVersionTemplate { + + /** + * Constructs a new CryptoKeyVersionTemplate. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.kms.v1.ICryptoKeyVersionTemplate); + + /** CryptoKeyVersionTemplate protectionLevel. */ + public protectionLevel: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel); + + /** CryptoKeyVersionTemplate algorithm. */ + public algorithm: (google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm|keyof typeof google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm); + + /** + * Creates a new CryptoKeyVersionTemplate instance using the specified properties. + * @param [properties] Properties to set + * @returns CryptoKeyVersionTemplate instance + */ + public static create(properties?: google.cloud.kms.v1.ICryptoKeyVersionTemplate): google.cloud.kms.v1.CryptoKeyVersionTemplate; + + /** + * Encodes the specified CryptoKeyVersionTemplate message. Does not implicitly {@link google.cloud.kms.v1.CryptoKeyVersionTemplate.verify|verify} messages. + * @param message CryptoKeyVersionTemplate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.kms.v1.ICryptoKeyVersionTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CryptoKeyVersionTemplate message, length delimited. Does not implicitly {@link google.cloud.kms.v1.CryptoKeyVersionTemplate.verify|verify} messages. + * @param message CryptoKeyVersionTemplate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.kms.v1.ICryptoKeyVersionTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CryptoKeyVersionTemplate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CryptoKeyVersionTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.CryptoKeyVersionTemplate; + + /** + * Decodes a CryptoKeyVersionTemplate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CryptoKeyVersionTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.CryptoKeyVersionTemplate; + + /** + * Verifies a CryptoKeyVersionTemplate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CryptoKeyVersionTemplate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CryptoKeyVersionTemplate + */ + public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.CryptoKeyVersionTemplate; + + /** + * Creates a plain object from a CryptoKeyVersionTemplate message. Also converts values to other types if specified. + * @param message CryptoKeyVersionTemplate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.kms.v1.CryptoKeyVersionTemplate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CryptoKeyVersionTemplate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CryptoKeyVersionTemplate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a KeyOperationAttestation. */ + interface IKeyOperationAttestation { + + /** KeyOperationAttestation format */ + format?: (google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat|keyof typeof google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat|null); + + /** KeyOperationAttestation content */ + content?: (Uint8Array|string|null); + + /** KeyOperationAttestation certChains */ + certChains?: (google.cloud.kms.v1.KeyOperationAttestation.ICertificateChains|null); + } + + /** Represents a KeyOperationAttestation. */ + class KeyOperationAttestation implements IKeyOperationAttestation { + + /** + * Constructs a new KeyOperationAttestation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.kms.v1.IKeyOperationAttestation); + + /** KeyOperationAttestation format. */ + public format: (google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat|keyof typeof google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat); + + /** KeyOperationAttestation content. */ + public content: (Uint8Array|string); + + /** KeyOperationAttestation certChains. */ + public certChains?: (google.cloud.kms.v1.KeyOperationAttestation.ICertificateChains|null); + + /** + * Creates a new KeyOperationAttestation instance using the specified properties. + * @param [properties] Properties to set + * @returns KeyOperationAttestation instance + */ + public static create(properties?: google.cloud.kms.v1.IKeyOperationAttestation): google.cloud.kms.v1.KeyOperationAttestation; + + /** + * Encodes the specified KeyOperationAttestation message. Does not implicitly {@link google.cloud.kms.v1.KeyOperationAttestation.verify|verify} messages. + * @param message KeyOperationAttestation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.kms.v1.IKeyOperationAttestation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KeyOperationAttestation message, length delimited. Does not implicitly {@link google.cloud.kms.v1.KeyOperationAttestation.verify|verify} messages. + * @param message KeyOperationAttestation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.kms.v1.IKeyOperationAttestation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KeyOperationAttestation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KeyOperationAttestation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.KeyOperationAttestation; + + /** + * Decodes a KeyOperationAttestation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KeyOperationAttestation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.KeyOperationAttestation; + + /** + * Verifies a KeyOperationAttestation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KeyOperationAttestation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KeyOperationAttestation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.KeyOperationAttestation; + + /** + * Creates a plain object from a KeyOperationAttestation message. Also converts values to other types if specified. + * @param message KeyOperationAttestation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.kms.v1.KeyOperationAttestation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KeyOperationAttestation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KeyOperationAttestation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace KeyOperationAttestation { + + /** AttestationFormat enum. */ + enum AttestationFormat { + ATTESTATION_FORMAT_UNSPECIFIED = 0, + CAVIUM_V1_COMPRESSED = 3, + CAVIUM_V2_COMPRESSED = 4 + } + + /** Properties of a CertificateChains. */ + interface ICertificateChains { + + /** CertificateChains caviumCerts */ + caviumCerts?: (string[]|null); + + /** CertificateChains googleCardCerts */ + googleCardCerts?: (string[]|null); + + /** CertificateChains googlePartitionCerts */ + googlePartitionCerts?: (string[]|null); + } + + /** Represents a CertificateChains. */ + class CertificateChains implements ICertificateChains { + + /** + * Constructs a new CertificateChains. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.kms.v1.KeyOperationAttestation.ICertificateChains); + + /** CertificateChains caviumCerts. */ + public caviumCerts: string[]; + + /** CertificateChains googleCardCerts. */ + public googleCardCerts: string[]; + + /** CertificateChains googlePartitionCerts. */ + public googlePartitionCerts: string[]; + + /** + * Creates a new CertificateChains instance using the specified properties. + * @param [properties] Properties to set + * @returns CertificateChains instance + */ + public static create(properties?: google.cloud.kms.v1.KeyOperationAttestation.ICertificateChains): google.cloud.kms.v1.KeyOperationAttestation.CertificateChains; + + /** + * Encodes the specified CertificateChains message. Does not implicitly {@link google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.verify|verify} messages. + * @param message CertificateChains message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.kms.v1.KeyOperationAttestation.ICertificateChains, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CertificateChains message, length delimited. Does not implicitly {@link google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.verify|verify} messages. + * @param message CertificateChains message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.kms.v1.KeyOperationAttestation.ICertificateChains, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CertificateChains message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CertificateChains + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.KeyOperationAttestation.CertificateChains; + + /** + * Decodes a CertificateChains message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CertificateChains + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.KeyOperationAttestation.CertificateChains; + + /** + * Verifies a CertificateChains message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CertificateChains message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CertificateChains + */ + public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.KeyOperationAttestation.CertificateChains; + + /** + * Creates a plain object from a CertificateChains message. Also converts values to other types if specified. + * @param message CertificateChains + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.kms.v1.KeyOperationAttestation.CertificateChains, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CertificateChains to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CertificateChains + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CryptoKeyVersion. */ + interface ICryptoKeyVersion { + + /** CryptoKeyVersion name */ + name?: (string|null); + + /** CryptoKeyVersion state */ + state?: (google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState|keyof typeof google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState|null); + + /** CryptoKeyVersion protectionLevel */ + protectionLevel?: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel|null); + + /** CryptoKeyVersion algorithm */ + algorithm?: (google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm|keyof typeof google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm|null); + + /** CryptoKeyVersion attestation */ + attestation?: (google.cloud.kms.v1.IKeyOperationAttestation|null); + + /** CryptoKeyVersion createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** CryptoKeyVersion generateTime */ + generateTime?: (google.protobuf.ITimestamp|null); + + /** CryptoKeyVersion destroyTime */ + destroyTime?: (google.protobuf.ITimestamp|null); + + /** CryptoKeyVersion destroyEventTime */ + destroyEventTime?: (google.protobuf.ITimestamp|null); + + /** CryptoKeyVersion importJob */ + importJob?: (string|null); + + /** CryptoKeyVersion importTime */ + importTime?: (google.protobuf.ITimestamp|null); + + /** CryptoKeyVersion importFailureReason */ + importFailureReason?: (string|null); + + /** CryptoKeyVersion externalProtectionLevelOptions */ + externalProtectionLevelOptions?: (google.cloud.kms.v1.IExternalProtectionLevelOptions|null); + + /** CryptoKeyVersion reimportEligible */ + reimportEligible?: (boolean|null); + } + + /** Represents a CryptoKeyVersion. */ + class CryptoKeyVersion implements ICryptoKeyVersion { + + /** + * Constructs a new CryptoKeyVersion. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.kms.v1.ICryptoKeyVersion); + + /** CryptoKeyVersion name. */ + public name: string; + + /** CryptoKeyVersion state. */ + public state: (google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState|keyof typeof google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState); + + /** CryptoKeyVersion protectionLevel. */ + public protectionLevel: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel); + + /** CryptoKeyVersion algorithm. */ + public algorithm: (google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm|keyof typeof google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm); + + /** CryptoKeyVersion attestation. */ + public attestation?: (google.cloud.kms.v1.IKeyOperationAttestation|null); + + /** CryptoKeyVersion createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** CryptoKeyVersion generateTime. */ + public generateTime?: (google.protobuf.ITimestamp|null); + + /** CryptoKeyVersion destroyTime. */ + public destroyTime?: (google.protobuf.ITimestamp|null); + + /** CryptoKeyVersion destroyEventTime. */ + public destroyEventTime?: (google.protobuf.ITimestamp|null); + + /** CryptoKeyVersion importJob. */ + public importJob: string; + + /** CryptoKeyVersion importTime. */ + public importTime?: (google.protobuf.ITimestamp|null); + + /** CryptoKeyVersion importFailureReason. */ + public importFailureReason: string; + + /** CryptoKeyVersion externalProtectionLevelOptions. */ + public externalProtectionLevelOptions?: (google.cloud.kms.v1.IExternalProtectionLevelOptions|null); + + /** CryptoKeyVersion reimportEligible. */ + public reimportEligible: boolean; + + /** + * Creates a new CryptoKeyVersion instance using the specified properties. + * @param [properties] Properties to set + * @returns CryptoKeyVersion instance + */ + public static create(properties?: google.cloud.kms.v1.ICryptoKeyVersion): google.cloud.kms.v1.CryptoKeyVersion; + + /** + * Encodes the specified CryptoKeyVersion message. Does not implicitly {@link google.cloud.kms.v1.CryptoKeyVersion.verify|verify} messages. + * @param message CryptoKeyVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.kms.v1.ICryptoKeyVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CryptoKeyVersion message, length delimited. Does not implicitly {@link google.cloud.kms.v1.CryptoKeyVersion.verify|verify} messages. + * @param message CryptoKeyVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.kms.v1.ICryptoKeyVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CryptoKeyVersion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CryptoKeyVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.CryptoKeyVersion; + + /** + * Decodes a CryptoKeyVersion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CryptoKeyVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.CryptoKeyVersion; + + /** + * Verifies a CryptoKeyVersion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CryptoKeyVersion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CryptoKeyVersion + */ + public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.CryptoKeyVersion; + + /** + * Creates a plain object from a CryptoKeyVersion message. Also converts values to other types if specified. + * @param message CryptoKeyVersion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.kms.v1.CryptoKeyVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CryptoKeyVersion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CryptoKeyVersion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CryptoKeyVersion { + + /** CryptoKeyVersionAlgorithm enum. */ + enum CryptoKeyVersionAlgorithm { + CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0, + GOOGLE_SYMMETRIC_ENCRYPTION = 1, + RSA_SIGN_PSS_2048_SHA256 = 2, + RSA_SIGN_PSS_3072_SHA256 = 3, + RSA_SIGN_PSS_4096_SHA256 = 4, + RSA_SIGN_PSS_4096_SHA512 = 15, + RSA_SIGN_PKCS1_2048_SHA256 = 5, + RSA_SIGN_PKCS1_3072_SHA256 = 6, + RSA_SIGN_PKCS1_4096_SHA256 = 7, + RSA_SIGN_PKCS1_4096_SHA512 = 16, + RSA_SIGN_RAW_PKCS1_2048 = 28, + RSA_SIGN_RAW_PKCS1_3072 = 29, + RSA_SIGN_RAW_PKCS1_4096 = 30, + RSA_DECRYPT_OAEP_2048_SHA256 = 8, + RSA_DECRYPT_OAEP_3072_SHA256 = 9, + RSA_DECRYPT_OAEP_4096_SHA256 = 10, + RSA_DECRYPT_OAEP_4096_SHA512 = 17, + RSA_DECRYPT_OAEP_2048_SHA1 = 37, + RSA_DECRYPT_OAEP_3072_SHA1 = 38, + RSA_DECRYPT_OAEP_4096_SHA1 = 39, + EC_SIGN_P256_SHA256 = 12, + EC_SIGN_P384_SHA384 = 13, + EC_SIGN_SECP256K1_SHA256 = 31, + HMAC_SHA256 = 32, + HMAC_SHA1 = 33, + HMAC_SHA384 = 34, + HMAC_SHA512 = 35, + HMAC_SHA224 = 36, + EXTERNAL_SYMMETRIC_ENCRYPTION = 18 + } + + /** CryptoKeyVersionState enum. */ + enum CryptoKeyVersionState { + CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0, + PENDING_GENERATION = 5, + ENABLED = 1, + DISABLED = 2, + DESTROYED = 3, + DESTROY_SCHEDULED = 4, + PENDING_IMPORT = 6, + IMPORT_FAILED = 7 + } + + /** CryptoKeyVersionView enum. */ + enum CryptoKeyVersionView { + CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0, + FULL = 1 + } + } + + /** Properties of a PublicKey. */ + interface IPublicKey { + + /** PublicKey pem */ + pem?: (string|null); + + /** PublicKey algorithm */ + algorithm?: (google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm|keyof typeof google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm|null); + + /** PublicKey pemCrc32c */ + pemCrc32c?: (google.protobuf.IInt64Value|null); + + /** PublicKey name */ + name?: (string|null); + + /** PublicKey protectionLevel */ + protectionLevel?: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel|null); + } + + /** Represents a PublicKey. */ + class PublicKey implements IPublicKey { + + /** + * Constructs a new PublicKey. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.kms.v1.IPublicKey); + + /** PublicKey pem. */ + public pem: string; + + /** PublicKey algorithm. */ + public algorithm: (google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm|keyof typeof google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm); + + /** PublicKey pemCrc32c. */ + public pemCrc32c?: (google.protobuf.IInt64Value|null); + + /** PublicKey name. */ + public name: string; + + /** PublicKey protectionLevel. */ + public protectionLevel: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel); + + /** + * Creates a new PublicKey instance using the specified properties. + * @param [properties] Properties to set + * @returns PublicKey instance + */ + public static create(properties?: google.cloud.kms.v1.IPublicKey): google.cloud.kms.v1.PublicKey; + + /** + * Encodes the specified PublicKey message. Does not implicitly {@link google.cloud.kms.v1.PublicKey.verify|verify} messages. + * @param message PublicKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.kms.v1.IPublicKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PublicKey message, length delimited. Does not implicitly {@link google.cloud.kms.v1.PublicKey.verify|verify} messages. + * @param message PublicKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.kms.v1.IPublicKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublicKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PublicKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.PublicKey; + + /** + * Decodes a PublicKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PublicKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.PublicKey; + + /** + * Verifies a PublicKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PublicKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublicKey + */ + public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.PublicKey; + + /** + * Creates a plain object from a PublicKey message. Also converts values to other types if specified. + * @param message PublicKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.kms.v1.PublicKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PublicKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PublicKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImportJob. */ + interface IImportJob { + + /** ImportJob name */ + name?: (string|null); + + /** ImportJob importMethod */ + importMethod?: (google.cloud.kms.v1.ImportJob.ImportMethod|keyof typeof google.cloud.kms.v1.ImportJob.ImportMethod|null); + + /** ImportJob protectionLevel */ + protectionLevel?: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel|null); + + /** ImportJob createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ImportJob generateTime */ + generateTime?: (google.protobuf.ITimestamp|null); + + /** ImportJob expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + + /** ImportJob expireEventTime */ + expireEventTime?: (google.protobuf.ITimestamp|null); + + /** ImportJob state */ + state?: (google.cloud.kms.v1.ImportJob.ImportJobState|keyof typeof google.cloud.kms.v1.ImportJob.ImportJobState|null); + + /** ImportJob publicKey */ + publicKey?: (google.cloud.kms.v1.ImportJob.IWrappingPublicKey|null); + + /** ImportJob attestation */ + attestation?: (google.cloud.kms.v1.IKeyOperationAttestation|null); + } + + /** Represents an ImportJob. */ + class ImportJob implements IImportJob { + + /** + * Constructs a new ImportJob. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.kms.v1.IImportJob); + + /** ImportJob name. */ + public name: string; + + /** ImportJob importMethod. */ + public importMethod: (google.cloud.kms.v1.ImportJob.ImportMethod|keyof typeof google.cloud.kms.v1.ImportJob.ImportMethod); + + /** ImportJob protectionLevel. */ + public protectionLevel: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel); + + /** ImportJob createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ImportJob generateTime. */ + public generateTime?: (google.protobuf.ITimestamp|null); + + /** ImportJob expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); + + /** ImportJob expireEventTime. */ + public expireEventTime?: (google.protobuf.ITimestamp|null); + + /** ImportJob state. */ + public state: (google.cloud.kms.v1.ImportJob.ImportJobState|keyof typeof google.cloud.kms.v1.ImportJob.ImportJobState); + + /** ImportJob publicKey. */ + public publicKey?: (google.cloud.kms.v1.ImportJob.IWrappingPublicKey|null); + + /** ImportJob attestation. */ + public attestation?: (google.cloud.kms.v1.IKeyOperationAttestation|null); + + /** + * Creates a new ImportJob instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportJob instance + */ + public static create(properties?: google.cloud.kms.v1.IImportJob): google.cloud.kms.v1.ImportJob; + + /** + * Encodes the specified ImportJob message. Does not implicitly {@link google.cloud.kms.v1.ImportJob.verify|verify} messages. + * @param message ImportJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.kms.v1.IImportJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportJob message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ImportJob.verify|verify} messages. + * @param message ImportJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.kms.v1.IImportJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportJob message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.ImportJob; + + /** + * Decodes an ImportJob message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.ImportJob; + + /** + * Verifies an ImportJob message. + * @param message Plain 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 ImportJob message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportJob + */ + public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.ImportJob; + + /** + * Creates a plain object from an ImportJob message. Also converts values to other types if specified. + * @param message ImportJob + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.kms.v1.ImportJob, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportJob to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportJob + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ImportJob { + + /** ImportMethod enum. */ + enum ImportMethod { + IMPORT_METHOD_UNSPECIFIED = 0, + RSA_OAEP_3072_SHA1_AES_256 = 1, + RSA_OAEP_4096_SHA1_AES_256 = 2, + RSA_OAEP_3072_SHA256_AES_256 = 3, + RSA_OAEP_4096_SHA256_AES_256 = 4, + RSA_OAEP_3072_SHA256 = 5, + RSA_OAEP_4096_SHA256 = 6 + } + + /** ImportJobState enum. */ + enum ImportJobState { + IMPORT_JOB_STATE_UNSPECIFIED = 0, + PENDING_GENERATION = 1, + ACTIVE = 2, + EXPIRED = 3 + } + + /** Properties of a WrappingPublicKey. */ + interface IWrappingPublicKey { + + /** WrappingPublicKey pem */ + pem?: (string|null); + } + + /** Represents a WrappingPublicKey. */ + class WrappingPublicKey implements IWrappingPublicKey { + + /** + * Constructs a new WrappingPublicKey. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.kms.v1.ImportJob.IWrappingPublicKey); + + /** WrappingPublicKey pem. */ + public pem: string; + + /** + * Creates a new WrappingPublicKey instance using the specified properties. + * @param [properties] Properties to set + * @returns WrappingPublicKey instance + */ + public static create(properties?: google.cloud.kms.v1.ImportJob.IWrappingPublicKey): google.cloud.kms.v1.ImportJob.WrappingPublicKey; + + /** + * Encodes the specified WrappingPublicKey message. Does not implicitly {@link google.cloud.kms.v1.ImportJob.WrappingPublicKey.verify|verify} messages. + * @param message WrappingPublicKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.kms.v1.ImportJob.IWrappingPublicKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WrappingPublicKey message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ImportJob.WrappingPublicKey.verify|verify} messages. + * @param message WrappingPublicKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.kms.v1.ImportJob.IWrappingPublicKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WrappingPublicKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WrappingPublicKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.ImportJob.WrappingPublicKey; + + /** + * Decodes a WrappingPublicKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WrappingPublicKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.ImportJob.WrappingPublicKey; + + /** + * Verifies a WrappingPublicKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WrappingPublicKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WrappingPublicKey + */ + public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.ImportJob.WrappingPublicKey; + + /** + * Creates a plain object from a WrappingPublicKey message. Also converts values to other types if specified. + * @param message WrappingPublicKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.kms.v1.ImportJob.WrappingPublicKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WrappingPublicKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WrappingPublicKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExternalProtectionLevelOptions. */ + interface IExternalProtectionLevelOptions { + + /** ExternalProtectionLevelOptions externalKeyUri */ + externalKeyUri?: (string|null); + + /** ExternalProtectionLevelOptions ekmConnectionKeyPath */ + ekmConnectionKeyPath?: (string|null); + } + + /** Represents an ExternalProtectionLevelOptions. */ + class ExternalProtectionLevelOptions implements IExternalProtectionLevelOptions { + + /** + * Constructs a new ExternalProtectionLevelOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.kms.v1.IExternalProtectionLevelOptions); + + /** ExternalProtectionLevelOptions externalKeyUri. */ + public externalKeyUri: string; + + /** ExternalProtectionLevelOptions ekmConnectionKeyPath. */ + public ekmConnectionKeyPath: string; + + /** + * Creates a new ExternalProtectionLevelOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExternalProtectionLevelOptions instance + */ + public static create(properties?: google.cloud.kms.v1.IExternalProtectionLevelOptions): google.cloud.kms.v1.ExternalProtectionLevelOptions; + + /** + * Encodes the specified ExternalProtectionLevelOptions message. Does not implicitly {@link google.cloud.kms.v1.ExternalProtectionLevelOptions.verify|verify} messages. + * @param message ExternalProtectionLevelOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.kms.v1.IExternalProtectionLevelOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExternalProtectionLevelOptions message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ExternalProtectionLevelOptions.verify|verify} messages. + * @param message ExternalProtectionLevelOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.kms.v1.IExternalProtectionLevelOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExternalProtectionLevelOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExternalProtectionLevelOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.ExternalProtectionLevelOptions; + + /** + * Decodes an ExternalProtectionLevelOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExternalProtectionLevelOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.ExternalProtectionLevelOptions; + + /** + * Verifies an ExternalProtectionLevelOptions message. + * @param message Plain 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 ExternalProtectionLevelOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExternalProtectionLevelOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.ExternalProtectionLevelOptions; + + /** + * Creates a plain object from an ExternalProtectionLevelOptions message. Also converts values to other types if specified. + * @param message ExternalProtectionLevelOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.kms.v1.ExternalProtectionLevelOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExternalProtectionLevelOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExternalProtectionLevelOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** ProtectionLevel enum. */ + enum ProtectionLevel { + PROTECTION_LEVEL_UNSPECIFIED = 0, + SOFTWARE = 1, + HSM = 2, + EXTERNAL = 3, + EXTERNAL_VPC = 4 + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions 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 + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } + + /** Properties of a 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 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 DoubleValue. */ + interface IDoubleValue { + + /** DoubleValue value */ + value?: (number|null); + } + + /** Represents a DoubleValue. */ + class DoubleValue implements IDoubleValue { + + /** + * Constructs a new DoubleValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDoubleValue); + + /** DoubleValue value. */ + public value: number; + + /** + * Creates a new DoubleValue instance using the specified properties. + * @param [properties] Properties to set + * @returns DoubleValue instance + */ + public static create(properties?: google.protobuf.IDoubleValue): google.protobuf.DoubleValue; + + /** + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DoubleValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DoubleValue; + + /** + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DoubleValue; + + /** + * Verifies a DoubleValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DoubleValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; + + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @param message DoubleValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DoubleValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DoubleValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FloatValue. */ + interface IFloatValue { + + /** FloatValue value */ + value?: (number|null); + } + + /** Represents a FloatValue. */ + class FloatValue implements IFloatValue { + + /** + * Constructs a new FloatValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFloatValue); + + /** FloatValue value. */ + public value: number; + + /** + * Creates a new FloatValue instance using the specified properties. + * @param [properties] Properties to set + * @returns FloatValue instance + */ + public static create(properties?: google.protobuf.IFloatValue): google.protobuf.FloatValue; + + /** + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FloatValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FloatValue; + + /** + * Decodes a FloatValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FloatValue; + + /** + * Verifies a FloatValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FloatValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; + + /** + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @param message FloatValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FloatValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FloatValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Int64Value. */ + interface IInt64Value { + + /** Int64Value value */ + value?: (number|Long|string|null); + } + + /** Represents an Int64Value. */ + class Int64Value implements IInt64Value { + + /** + * Constructs a new Int64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt64Value); + + /** Int64Value value. */ + public value: (number|Long|string); + + /** + * Creates a new Int64Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int64Value instance + */ + public static create(properties?: google.protobuf.IInt64Value): google.protobuf.Int64Value; + + /** + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int64Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Int64Value; + + /** + * Decodes an Int64Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Int64Value; + + /** + * Verifies an Int64Value message. + * @param message Plain 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 Int64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; + + /** + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @param message Int64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Int64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UInt64Value. */ + interface IUInt64Value { + + /** UInt64Value value */ + value?: (number|Long|string|null); + } + + /** Represents a UInt64Value. */ + class UInt64Value implements IUInt64Value { + + /** + * Constructs a new UInt64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt64Value); + + /** UInt64Value value. */ + public value: (number|Long|string); + + /** + * Creates a new UInt64Value instance using the specified properties. + * @param [properties] Properties to set + * @returns UInt64Value instance + */ + public static create(properties?: google.protobuf.IUInt64Value): google.protobuf.UInt64Value; + + /** + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UInt64Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt64Value; + + /** + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt64Value; + + /** + * Verifies a UInt64Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; + + /** + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @param message UInt64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UInt64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UInt64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Int32Value. */ + interface IInt32Value { + + /** Int32Value value */ + value?: (number|null); + } + + /** Represents an Int32Value. */ + class Int32Value implements IInt32Value { + + /** + * Constructs a new Int32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt32Value); + + /** Int32Value value. */ + public value: number; + + /** + * Creates a new Int32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int32Value instance + */ + public static create(properties?: google.protobuf.IInt32Value): google.protobuf.Int32Value; + + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Int32Value; + + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Int32Value; + + /** + * Verifies an Int32Value message. + * @param message Plain 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 Int32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; + + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @param message Int32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Int32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UInt32Value. */ + interface IUInt32Value { + + /** UInt32Value value */ + value?: (number|null); + } + + /** Represents a UInt32Value. */ + class UInt32Value implements IUInt32Value { + + /** + * Constructs a new UInt32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt32Value); + + /** UInt32Value value. */ + public value: number; + + /** + * Creates a new UInt32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns UInt32Value instance + */ + public static create(properties?: google.protobuf.IUInt32Value): google.protobuf.UInt32Value; + + /** + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UInt32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt32Value; + + /** + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt32Value; + + /** + * Verifies a UInt32Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; + + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @param message UInt32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UInt32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UInt32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BoolValue. */ + interface IBoolValue { + + /** BoolValue value */ + value?: (boolean|null); + } + + /** Represents a BoolValue. */ + class BoolValue implements IBoolValue { + + /** + * Constructs a new BoolValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBoolValue); + + /** BoolValue value. */ + public value: boolean; + + /** + * Creates a new BoolValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BoolValue instance + */ + public static create(properties?: google.protobuf.IBoolValue): google.protobuf.BoolValue; + + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.BoolValue; + + /** + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.BoolValue; + + /** + * Verifies a BoolValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BoolValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; + + /** + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @param message BoolValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BoolValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BoolValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StringValue. */ + interface IStringValue { + + /** StringValue value */ + value?: (string|null); + } + + /** Represents a StringValue. */ + class StringValue implements IStringValue { + + /** + * Constructs a new StringValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStringValue); + + /** StringValue value. */ + public value: string; + + /** + * Creates a new StringValue instance using the specified properties. + * @param [properties] Properties to set + * @returns StringValue instance + */ + public static create(properties?: google.protobuf.IStringValue): google.protobuf.StringValue; + + /** + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.StringValue; + + /** + * Decodes a StringValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.StringValue; + + /** + * Verifies a StringValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; + + /** + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @param message StringValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StringValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BytesValue. */ + interface IBytesValue { + + /** BytesValue value */ + value?: (Uint8Array|string|null); + } + + /** Represents a BytesValue. */ + class BytesValue implements IBytesValue { + + /** + * Constructs a new BytesValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBytesValue); + + /** BytesValue value. */ + public value: (Uint8Array|string); + + /** + * Creates a new BytesValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BytesValue instance + */ + public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue; + + /** + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BytesValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.BytesValue; + + /** + * Decodes a BytesValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.BytesValue; + + /** + * Verifies a BytesValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BytesValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; + + /** + * Creates a plain object from a BytesValue message. Also converts values to other types if specified. + * @param message BytesValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BytesValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BytesValue + * @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-kms-inventory/protos/protos.js b/packages/google-cloud-kms-inventory/protos/protos.js new file mode 100644 index 00000000000..650ec000494 --- /dev/null +++ b/packages/google-cloud-kms-inventory/protos/protos.js @@ -0,0 +1,20084 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_cloud_kms_inventory_protos || ($protobuf.roots._google_cloud_kms_inventory_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.kms = (function() { + + /** + * Namespace kms. + * @memberof google.cloud + * @namespace + */ + var kms = {}; + + kms.inventory = (function() { + + /** + * Namespace inventory. + * @memberof google.cloud.kms + * @namespace + */ + var inventory = {}; + + inventory.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.kms.inventory + * @namespace + */ + var v1 = {}; + + v1.KeyDashboardService = (function() { + + /** + * Constructs a new KeyDashboardService service. + * @memberof google.cloud.kms.inventory.v1 + * @classdesc Represents a KeyDashboardService + * @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 KeyDashboardService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (KeyDashboardService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = KeyDashboardService; + + /** + * Creates new KeyDashboardService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.kms.inventory.v1.KeyDashboardService + * @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 {KeyDashboardService} RPC service. Useful where requests and/or responses are streamed. + */ + KeyDashboardService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.kms.inventory.v1.KeyDashboardService|listCryptoKeys}. + * @memberof google.cloud.kms.inventory.v1.KeyDashboardService + * @typedef ListCryptoKeysCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.kms.inventory.v1.ListCryptoKeysResponse} [response] ListCryptoKeysResponse + */ + + /** + * Calls ListCryptoKeys. + * @function listCryptoKeys + * @memberof google.cloud.kms.inventory.v1.KeyDashboardService + * @instance + * @param {google.cloud.kms.inventory.v1.IListCryptoKeysRequest} request ListCryptoKeysRequest message or plain object + * @param {google.cloud.kms.inventory.v1.KeyDashboardService.ListCryptoKeysCallback} callback Node-style callback called with the error, if any, and ListCryptoKeysResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(KeyDashboardService.prototype.listCryptoKeys = function listCryptoKeys(request, callback) { + return this.rpcCall(listCryptoKeys, $root.google.cloud.kms.inventory.v1.ListCryptoKeysRequest, $root.google.cloud.kms.inventory.v1.ListCryptoKeysResponse, request, callback); + }, "name", { value: "ListCryptoKeys" }); + + /** + * Calls ListCryptoKeys. + * @function listCryptoKeys + * @memberof google.cloud.kms.inventory.v1.KeyDashboardService + * @instance + * @param {google.cloud.kms.inventory.v1.IListCryptoKeysRequest} request ListCryptoKeysRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return KeyDashboardService; + })(); + + v1.ListCryptoKeysRequest = (function() { + + /** + * Properties of a ListCryptoKeysRequest. + * @memberof google.cloud.kms.inventory.v1 + * @interface IListCryptoKeysRequest + * @property {string|null} [parent] ListCryptoKeysRequest parent + * @property {number|null} [pageSize] ListCryptoKeysRequest pageSize + * @property {string|null} [pageToken] ListCryptoKeysRequest pageToken + */ + + /** + * Constructs a new ListCryptoKeysRequest. + * @memberof google.cloud.kms.inventory.v1 + * @classdesc Represents a ListCryptoKeysRequest. + * @implements IListCryptoKeysRequest + * @constructor + * @param {google.cloud.kms.inventory.v1.IListCryptoKeysRequest=} [properties] Properties to set + */ + function ListCryptoKeysRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCryptoKeysRequest parent. + * @member {string} parent + * @memberof google.cloud.kms.inventory.v1.ListCryptoKeysRequest + * @instance + */ + ListCryptoKeysRequest.prototype.parent = ""; + + /** + * ListCryptoKeysRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.kms.inventory.v1.ListCryptoKeysRequest + * @instance + */ + ListCryptoKeysRequest.prototype.pageSize = 0; + + /** + * ListCryptoKeysRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.kms.inventory.v1.ListCryptoKeysRequest + * @instance + */ + ListCryptoKeysRequest.prototype.pageToken = ""; + + /** + * Creates a new ListCryptoKeysRequest instance using the specified properties. + * @function create + * @memberof google.cloud.kms.inventory.v1.ListCryptoKeysRequest + * @static + * @param {google.cloud.kms.inventory.v1.IListCryptoKeysRequest=} [properties] Properties to set + * @returns {google.cloud.kms.inventory.v1.ListCryptoKeysRequest} ListCryptoKeysRequest instance + */ + ListCryptoKeysRequest.create = function create(properties) { + return new ListCryptoKeysRequest(properties); + }; + + /** + * Encodes the specified ListCryptoKeysRequest message. Does not implicitly {@link google.cloud.kms.inventory.v1.ListCryptoKeysRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.kms.inventory.v1.ListCryptoKeysRequest + * @static + * @param {google.cloud.kms.inventory.v1.IListCryptoKeysRequest} message ListCryptoKeysRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCryptoKeysRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListCryptoKeysRequest message, length delimited. Does not implicitly {@link google.cloud.kms.inventory.v1.ListCryptoKeysRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.kms.inventory.v1.ListCryptoKeysRequest + * @static + * @param {google.cloud.kms.inventory.v1.IListCryptoKeysRequest} message ListCryptoKeysRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCryptoKeysRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCryptoKeysRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.kms.inventory.v1.ListCryptoKeysRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.kms.inventory.v1.ListCryptoKeysRequest} ListCryptoKeysRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCryptoKeysRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.inventory.v1.ListCryptoKeysRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListCryptoKeysRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.kms.inventory.v1.ListCryptoKeysRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.kms.inventory.v1.ListCryptoKeysRequest} ListCryptoKeysRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCryptoKeysRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCryptoKeysRequest message. + * @function verify + * @memberof google.cloud.kms.inventory.v1.ListCryptoKeysRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCryptoKeysRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListCryptoKeysRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.kms.inventory.v1.ListCryptoKeysRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.kms.inventory.v1.ListCryptoKeysRequest} ListCryptoKeysRequest + */ + ListCryptoKeysRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.kms.inventory.v1.ListCryptoKeysRequest) + return object; + var message = new $root.google.cloud.kms.inventory.v1.ListCryptoKeysRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListCryptoKeysRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.kms.inventory.v1.ListCryptoKeysRequest + * @static + * @param {google.cloud.kms.inventory.v1.ListCryptoKeysRequest} message ListCryptoKeysRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCryptoKeysRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListCryptoKeysRequest to JSON. + * @function toJSON + * @memberof google.cloud.kms.inventory.v1.ListCryptoKeysRequest + * @instance + * @returns {Object.} JSON object + */ + ListCryptoKeysRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListCryptoKeysRequest + * @function getTypeUrl + * @memberof google.cloud.kms.inventory.v1.ListCryptoKeysRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCryptoKeysRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.kms.inventory.v1.ListCryptoKeysRequest"; + }; + + return ListCryptoKeysRequest; + })(); + + v1.ListCryptoKeysResponse = (function() { + + /** + * Properties of a ListCryptoKeysResponse. + * @memberof google.cloud.kms.inventory.v1 + * @interface IListCryptoKeysResponse + * @property {Array.|null} [cryptoKeys] ListCryptoKeysResponse cryptoKeys + * @property {string|null} [nextPageToken] ListCryptoKeysResponse nextPageToken + */ + + /** + * Constructs a new ListCryptoKeysResponse. + * @memberof google.cloud.kms.inventory.v1 + * @classdesc Represents a ListCryptoKeysResponse. + * @implements IListCryptoKeysResponse + * @constructor + * @param {google.cloud.kms.inventory.v1.IListCryptoKeysResponse=} [properties] Properties to set + */ + function ListCryptoKeysResponse(properties) { + this.cryptoKeys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCryptoKeysResponse cryptoKeys. + * @member {Array.} cryptoKeys + * @memberof google.cloud.kms.inventory.v1.ListCryptoKeysResponse + * @instance + */ + ListCryptoKeysResponse.prototype.cryptoKeys = $util.emptyArray; + + /** + * ListCryptoKeysResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.kms.inventory.v1.ListCryptoKeysResponse + * @instance + */ + ListCryptoKeysResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListCryptoKeysResponse instance using the specified properties. + * @function create + * @memberof google.cloud.kms.inventory.v1.ListCryptoKeysResponse + * @static + * @param {google.cloud.kms.inventory.v1.IListCryptoKeysResponse=} [properties] Properties to set + * @returns {google.cloud.kms.inventory.v1.ListCryptoKeysResponse} ListCryptoKeysResponse instance + */ + ListCryptoKeysResponse.create = function create(properties) { + return new ListCryptoKeysResponse(properties); + }; + + /** + * Encodes the specified ListCryptoKeysResponse message. Does not implicitly {@link google.cloud.kms.inventory.v1.ListCryptoKeysResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.kms.inventory.v1.ListCryptoKeysResponse + * @static + * @param {google.cloud.kms.inventory.v1.IListCryptoKeysResponse} message ListCryptoKeysResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCryptoKeysResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cryptoKeys != null && message.cryptoKeys.length) + for (var i = 0; i < message.cryptoKeys.length; ++i) + $root.google.cloud.kms.v1.CryptoKey.encode(message.cryptoKeys[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 ListCryptoKeysResponse message, length delimited. Does not implicitly {@link google.cloud.kms.inventory.v1.ListCryptoKeysResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.kms.inventory.v1.ListCryptoKeysResponse + * @static + * @param {google.cloud.kms.inventory.v1.IListCryptoKeysResponse} message ListCryptoKeysResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCryptoKeysResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCryptoKeysResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.kms.inventory.v1.ListCryptoKeysResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.kms.inventory.v1.ListCryptoKeysResponse} ListCryptoKeysResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCryptoKeysResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.inventory.v1.ListCryptoKeysResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.cryptoKeys && message.cryptoKeys.length)) + message.cryptoKeys = []; + message.cryptoKeys.push($root.google.cloud.kms.v1.CryptoKey.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListCryptoKeysResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.kms.inventory.v1.ListCryptoKeysResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.kms.inventory.v1.ListCryptoKeysResponse} ListCryptoKeysResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCryptoKeysResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCryptoKeysResponse message. + * @function verify + * @memberof google.cloud.kms.inventory.v1.ListCryptoKeysResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCryptoKeysResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cryptoKeys != null && message.hasOwnProperty("cryptoKeys")) { + if (!Array.isArray(message.cryptoKeys)) + return "cryptoKeys: array expected"; + for (var i = 0; i < message.cryptoKeys.length; ++i) { + var error = $root.google.cloud.kms.v1.CryptoKey.verify(message.cryptoKeys[i]); + if (error) + return "cryptoKeys." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListCryptoKeysResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.kms.inventory.v1.ListCryptoKeysResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.kms.inventory.v1.ListCryptoKeysResponse} ListCryptoKeysResponse + */ + ListCryptoKeysResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.kms.inventory.v1.ListCryptoKeysResponse) + return object; + var message = new $root.google.cloud.kms.inventory.v1.ListCryptoKeysResponse(); + if (object.cryptoKeys) { + if (!Array.isArray(object.cryptoKeys)) + throw TypeError(".google.cloud.kms.inventory.v1.ListCryptoKeysResponse.cryptoKeys: array expected"); + message.cryptoKeys = []; + for (var i = 0; i < object.cryptoKeys.length; ++i) { + if (typeof object.cryptoKeys[i] !== "object") + throw TypeError(".google.cloud.kms.inventory.v1.ListCryptoKeysResponse.cryptoKeys: object expected"); + message.cryptoKeys[i] = $root.google.cloud.kms.v1.CryptoKey.fromObject(object.cryptoKeys[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListCryptoKeysResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.kms.inventory.v1.ListCryptoKeysResponse + * @static + * @param {google.cloud.kms.inventory.v1.ListCryptoKeysResponse} message ListCryptoKeysResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCryptoKeysResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.cryptoKeys = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.cryptoKeys && message.cryptoKeys.length) { + object.cryptoKeys = []; + for (var j = 0; j < message.cryptoKeys.length; ++j) + object.cryptoKeys[j] = $root.google.cloud.kms.v1.CryptoKey.toObject(message.cryptoKeys[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListCryptoKeysResponse to JSON. + * @function toJSON + * @memberof google.cloud.kms.inventory.v1.ListCryptoKeysResponse + * @instance + * @returns {Object.} JSON object + */ + ListCryptoKeysResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListCryptoKeysResponse + * @function getTypeUrl + * @memberof google.cloud.kms.inventory.v1.ListCryptoKeysResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCryptoKeysResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.kms.inventory.v1.ListCryptoKeysResponse"; + }; + + return ListCryptoKeysResponse; + })(); + + v1.KeyTrackingService = (function() { + + /** + * Constructs a new KeyTrackingService service. + * @memberof google.cloud.kms.inventory.v1 + * @classdesc Represents a KeyTrackingService + * @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 KeyTrackingService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (KeyTrackingService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = KeyTrackingService; + + /** + * Creates new KeyTrackingService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.kms.inventory.v1.KeyTrackingService + * @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 {KeyTrackingService} RPC service. Useful where requests and/or responses are streamed. + */ + KeyTrackingService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.kms.inventory.v1.KeyTrackingService|getProtectedResourcesSummary}. + * @memberof google.cloud.kms.inventory.v1.KeyTrackingService + * @typedef GetProtectedResourcesSummaryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.kms.inventory.v1.ProtectedResourcesSummary} [response] ProtectedResourcesSummary + */ + + /** + * Calls GetProtectedResourcesSummary. + * @function getProtectedResourcesSummary + * @memberof google.cloud.kms.inventory.v1.KeyTrackingService + * @instance + * @param {google.cloud.kms.inventory.v1.IGetProtectedResourcesSummaryRequest} request GetProtectedResourcesSummaryRequest message or plain object + * @param {google.cloud.kms.inventory.v1.KeyTrackingService.GetProtectedResourcesSummaryCallback} callback Node-style callback called with the error, if any, and ProtectedResourcesSummary + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(KeyTrackingService.prototype.getProtectedResourcesSummary = function getProtectedResourcesSummary(request, callback) { + return this.rpcCall(getProtectedResourcesSummary, $root.google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest, $root.google.cloud.kms.inventory.v1.ProtectedResourcesSummary, request, callback); + }, "name", { value: "GetProtectedResourcesSummary" }); + + /** + * Calls GetProtectedResourcesSummary. + * @function getProtectedResourcesSummary + * @memberof google.cloud.kms.inventory.v1.KeyTrackingService + * @instance + * @param {google.cloud.kms.inventory.v1.IGetProtectedResourcesSummaryRequest} request GetProtectedResourcesSummaryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.kms.inventory.v1.KeyTrackingService|searchProtectedResources}. + * @memberof google.cloud.kms.inventory.v1.KeyTrackingService + * @typedef SearchProtectedResourcesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse} [response] SearchProtectedResourcesResponse + */ + + /** + * Calls SearchProtectedResources. + * @function searchProtectedResources + * @memberof google.cloud.kms.inventory.v1.KeyTrackingService + * @instance + * @param {google.cloud.kms.inventory.v1.ISearchProtectedResourcesRequest} request SearchProtectedResourcesRequest message or plain object + * @param {google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResourcesCallback} callback Node-style callback called with the error, if any, and SearchProtectedResourcesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(KeyTrackingService.prototype.searchProtectedResources = function searchProtectedResources(request, callback) { + return this.rpcCall(searchProtectedResources, $root.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest, $root.google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse, request, callback); + }, "name", { value: "SearchProtectedResources" }); + + /** + * Calls SearchProtectedResources. + * @function searchProtectedResources + * @memberof google.cloud.kms.inventory.v1.KeyTrackingService + * @instance + * @param {google.cloud.kms.inventory.v1.ISearchProtectedResourcesRequest} request SearchProtectedResourcesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return KeyTrackingService; + })(); + + v1.GetProtectedResourcesSummaryRequest = (function() { + + /** + * Properties of a GetProtectedResourcesSummaryRequest. + * @memberof google.cloud.kms.inventory.v1 + * @interface IGetProtectedResourcesSummaryRequest + * @property {string|null} [name] GetProtectedResourcesSummaryRequest name + */ + + /** + * Constructs a new GetProtectedResourcesSummaryRequest. + * @memberof google.cloud.kms.inventory.v1 + * @classdesc Represents a GetProtectedResourcesSummaryRequest. + * @implements IGetProtectedResourcesSummaryRequest + * @constructor + * @param {google.cloud.kms.inventory.v1.IGetProtectedResourcesSummaryRequest=} [properties] Properties to set + */ + function GetProtectedResourcesSummaryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetProtectedResourcesSummaryRequest name. + * @member {string} name + * @memberof google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest + * @instance + */ + GetProtectedResourcesSummaryRequest.prototype.name = ""; + + /** + * Creates a new GetProtectedResourcesSummaryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest + * @static + * @param {google.cloud.kms.inventory.v1.IGetProtectedResourcesSummaryRequest=} [properties] Properties to set + * @returns {google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest} GetProtectedResourcesSummaryRequest instance + */ + GetProtectedResourcesSummaryRequest.create = function create(properties) { + return new GetProtectedResourcesSummaryRequest(properties); + }; + + /** + * Encodes the specified GetProtectedResourcesSummaryRequest message. Does not implicitly {@link google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest + * @static + * @param {google.cloud.kms.inventory.v1.IGetProtectedResourcesSummaryRequest} message GetProtectedResourcesSummaryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetProtectedResourcesSummaryRequest.encode = function encode(message, writer) { + 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 GetProtectedResourcesSummaryRequest message, length delimited. Does not implicitly {@link google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest + * @static + * @param {google.cloud.kms.inventory.v1.IGetProtectedResourcesSummaryRequest} message GetProtectedResourcesSummaryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetProtectedResourcesSummaryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetProtectedResourcesSummaryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest} GetProtectedResourcesSummaryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetProtectedResourcesSummaryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetProtectedResourcesSummaryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest} GetProtectedResourcesSummaryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetProtectedResourcesSummaryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetProtectedResourcesSummaryRequest message. + * @function verify + * @memberof google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetProtectedResourcesSummaryRequest.verify = function verify(message) { + if (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 GetProtectedResourcesSummaryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest} GetProtectedResourcesSummaryRequest + */ + GetProtectedResourcesSummaryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest) + return object; + var message = new $root.google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetProtectedResourcesSummaryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest + * @static + * @param {google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest} message GetProtectedResourcesSummaryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetProtectedResourcesSummaryRequest.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 GetProtectedResourcesSummaryRequest to JSON. + * @function toJSON + * @memberof google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest + * @instance + * @returns {Object.} JSON object + */ + GetProtectedResourcesSummaryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetProtectedResourcesSummaryRequest + * @function getTypeUrl + * @memberof google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetProtectedResourcesSummaryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest"; + }; + + return GetProtectedResourcesSummaryRequest; + })(); + + v1.ProtectedResourcesSummary = (function() { + + /** + * Properties of a ProtectedResourcesSummary. + * @memberof google.cloud.kms.inventory.v1 + * @interface IProtectedResourcesSummary + * @property {string|null} [name] ProtectedResourcesSummary name + * @property {number|Long|null} [resourceCount] ProtectedResourcesSummary resourceCount + * @property {number|null} [projectCount] ProtectedResourcesSummary projectCount + * @property {Object.|null} [resourceTypes] ProtectedResourcesSummary resourceTypes + * @property {Object.|null} [cloudProducts] ProtectedResourcesSummary cloudProducts + * @property {Object.|null} [locations] ProtectedResourcesSummary locations + */ + + /** + * Constructs a new ProtectedResourcesSummary. + * @memberof google.cloud.kms.inventory.v1 + * @classdesc Represents a ProtectedResourcesSummary. + * @implements IProtectedResourcesSummary + * @constructor + * @param {google.cloud.kms.inventory.v1.IProtectedResourcesSummary=} [properties] Properties to set + */ + function ProtectedResourcesSummary(properties) { + this.resourceTypes = {}; + this.cloudProducts = {}; + this.locations = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProtectedResourcesSummary name. + * @member {string} name + * @memberof google.cloud.kms.inventory.v1.ProtectedResourcesSummary + * @instance + */ + ProtectedResourcesSummary.prototype.name = ""; + + /** + * ProtectedResourcesSummary resourceCount. + * @member {number|Long} resourceCount + * @memberof google.cloud.kms.inventory.v1.ProtectedResourcesSummary + * @instance + */ + ProtectedResourcesSummary.prototype.resourceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ProtectedResourcesSummary projectCount. + * @member {number} projectCount + * @memberof google.cloud.kms.inventory.v1.ProtectedResourcesSummary + * @instance + */ + ProtectedResourcesSummary.prototype.projectCount = 0; + + /** + * ProtectedResourcesSummary resourceTypes. + * @member {Object.} resourceTypes + * @memberof google.cloud.kms.inventory.v1.ProtectedResourcesSummary + * @instance + */ + ProtectedResourcesSummary.prototype.resourceTypes = $util.emptyObject; + + /** + * ProtectedResourcesSummary cloudProducts. + * @member {Object.} cloudProducts + * @memberof google.cloud.kms.inventory.v1.ProtectedResourcesSummary + * @instance + */ + ProtectedResourcesSummary.prototype.cloudProducts = $util.emptyObject; + + /** + * ProtectedResourcesSummary locations. + * @member {Object.} locations + * @memberof google.cloud.kms.inventory.v1.ProtectedResourcesSummary + * @instance + */ + ProtectedResourcesSummary.prototype.locations = $util.emptyObject; + + /** + * Creates a new ProtectedResourcesSummary instance using the specified properties. + * @function create + * @memberof google.cloud.kms.inventory.v1.ProtectedResourcesSummary + * @static + * @param {google.cloud.kms.inventory.v1.IProtectedResourcesSummary=} [properties] Properties to set + * @returns {google.cloud.kms.inventory.v1.ProtectedResourcesSummary} ProtectedResourcesSummary instance + */ + ProtectedResourcesSummary.create = function create(properties) { + return new ProtectedResourcesSummary(properties); + }; + + /** + * Encodes the specified ProtectedResourcesSummary message. Does not implicitly {@link google.cloud.kms.inventory.v1.ProtectedResourcesSummary.verify|verify} messages. + * @function encode + * @memberof google.cloud.kms.inventory.v1.ProtectedResourcesSummary + * @static + * @param {google.cloud.kms.inventory.v1.IProtectedResourcesSummary} message ProtectedResourcesSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProtectedResourcesSummary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceCount != null && Object.hasOwnProperty.call(message, "resourceCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.resourceCount); + if (message.projectCount != null && Object.hasOwnProperty.call(message, "projectCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.projectCount); + if (message.resourceTypes != null && Object.hasOwnProperty.call(message, "resourceTypes")) + for (var keys = Object.keys(message.resourceTypes), 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 0 =*/16).int64(message.resourceTypes[keys[i]]).ldelim(); + if (message.locations != null && Object.hasOwnProperty.call(message, "locations")) + for (var keys = Object.keys(message.locations), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).int64(message.locations[keys[i]]).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + if (message.cloudProducts != null && Object.hasOwnProperty.call(message, "cloudProducts")) + for (var keys = Object.keys(message.cloudProducts), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).int64(message.cloudProducts[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified ProtectedResourcesSummary message, length delimited. Does not implicitly {@link google.cloud.kms.inventory.v1.ProtectedResourcesSummary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.kms.inventory.v1.ProtectedResourcesSummary + * @static + * @param {google.cloud.kms.inventory.v1.IProtectedResourcesSummary} message ProtectedResourcesSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProtectedResourcesSummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProtectedResourcesSummary message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.kms.inventory.v1.ProtectedResourcesSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.kms.inventory.v1.ProtectedResourcesSummary} ProtectedResourcesSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProtectedResourcesSummary.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.inventory.v1.ProtectedResourcesSummary(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: { + message.name = reader.string(); + break; + } + case 1: { + message.resourceCount = reader.int64(); + break; + } + case 2: { + message.projectCount = reader.int32(); + break; + } + case 3: { + if (message.resourceTypes === $util.emptyObject) + message.resourceTypes = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = 0; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.int64(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.resourceTypes[key] = value; + break; + } + case 6: { + if (message.cloudProducts === $util.emptyObject) + message.cloudProducts = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = 0; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.int64(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.cloudProducts[key] = value; + break; + } + case 4: { + if (message.locations === $util.emptyObject) + message.locations = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = 0; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.int64(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.locations[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProtectedResourcesSummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.kms.inventory.v1.ProtectedResourcesSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.kms.inventory.v1.ProtectedResourcesSummary} ProtectedResourcesSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProtectedResourcesSummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProtectedResourcesSummary message. + * @function verify + * @memberof google.cloud.kms.inventory.v1.ProtectedResourcesSummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProtectedResourcesSummary.verify = function verify(message) { + if (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.resourceCount != null && message.hasOwnProperty("resourceCount")) + if (!$util.isInteger(message.resourceCount) && !(message.resourceCount && $util.isInteger(message.resourceCount.low) && $util.isInteger(message.resourceCount.high))) + return "resourceCount: integer|Long expected"; + if (message.projectCount != null && message.hasOwnProperty("projectCount")) + if (!$util.isInteger(message.projectCount)) + return "projectCount: integer expected"; + if (message.resourceTypes != null && message.hasOwnProperty("resourceTypes")) { + if (!$util.isObject(message.resourceTypes)) + return "resourceTypes: object expected"; + var key = Object.keys(message.resourceTypes); + for (var i = 0; i < key.length; ++i) + if (!$util.isInteger(message.resourceTypes[key[i]]) && !(message.resourceTypes[key[i]] && $util.isInteger(message.resourceTypes[key[i]].low) && $util.isInteger(message.resourceTypes[key[i]].high))) + return "resourceTypes: integer|Long{k:string} expected"; + } + if (message.cloudProducts != null && message.hasOwnProperty("cloudProducts")) { + if (!$util.isObject(message.cloudProducts)) + return "cloudProducts: object expected"; + var key = Object.keys(message.cloudProducts); + for (var i = 0; i < key.length; ++i) + if (!$util.isInteger(message.cloudProducts[key[i]]) && !(message.cloudProducts[key[i]] && $util.isInteger(message.cloudProducts[key[i]].low) && $util.isInteger(message.cloudProducts[key[i]].high))) + return "cloudProducts: integer|Long{k:string} expected"; + } + if (message.locations != null && message.hasOwnProperty("locations")) { + if (!$util.isObject(message.locations)) + return "locations: object expected"; + var key = Object.keys(message.locations); + for (var i = 0; i < key.length; ++i) + if (!$util.isInteger(message.locations[key[i]]) && !(message.locations[key[i]] && $util.isInteger(message.locations[key[i]].low) && $util.isInteger(message.locations[key[i]].high))) + return "locations: integer|Long{k:string} expected"; + } + return null; + }; + + /** + * Creates a ProtectedResourcesSummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.kms.inventory.v1.ProtectedResourcesSummary + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.kms.inventory.v1.ProtectedResourcesSummary} ProtectedResourcesSummary + */ + ProtectedResourcesSummary.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.kms.inventory.v1.ProtectedResourcesSummary) + return object; + var message = new $root.google.cloud.kms.inventory.v1.ProtectedResourcesSummary(); + if (object.name != null) + message.name = String(object.name); + if (object.resourceCount != null) + if ($util.Long) + (message.resourceCount = $util.Long.fromValue(object.resourceCount)).unsigned = false; + else if (typeof object.resourceCount === "string") + message.resourceCount = parseInt(object.resourceCount, 10); + else if (typeof object.resourceCount === "number") + message.resourceCount = object.resourceCount; + else if (typeof object.resourceCount === "object") + message.resourceCount = new $util.LongBits(object.resourceCount.low >>> 0, object.resourceCount.high >>> 0).toNumber(); + if (object.projectCount != null) + message.projectCount = object.projectCount | 0; + if (object.resourceTypes) { + if (typeof object.resourceTypes !== "object") + throw TypeError(".google.cloud.kms.inventory.v1.ProtectedResourcesSummary.resourceTypes: object expected"); + message.resourceTypes = {}; + for (var keys = Object.keys(object.resourceTypes), i = 0; i < keys.length; ++i) + if ($util.Long) + (message.resourceTypes[keys[i]] = $util.Long.fromValue(object.resourceTypes[keys[i]])).unsigned = false; + else if (typeof object.resourceTypes[keys[i]] === "string") + message.resourceTypes[keys[i]] = parseInt(object.resourceTypes[keys[i]], 10); + else if (typeof object.resourceTypes[keys[i]] === "number") + message.resourceTypes[keys[i]] = object.resourceTypes[keys[i]]; + else if (typeof object.resourceTypes[keys[i]] === "object") + message.resourceTypes[keys[i]] = new $util.LongBits(object.resourceTypes[keys[i]].low >>> 0, object.resourceTypes[keys[i]].high >>> 0).toNumber(); + } + if (object.cloudProducts) { + if (typeof object.cloudProducts !== "object") + throw TypeError(".google.cloud.kms.inventory.v1.ProtectedResourcesSummary.cloudProducts: object expected"); + message.cloudProducts = {}; + for (var keys = Object.keys(object.cloudProducts), i = 0; i < keys.length; ++i) + if ($util.Long) + (message.cloudProducts[keys[i]] = $util.Long.fromValue(object.cloudProducts[keys[i]])).unsigned = false; + else if (typeof object.cloudProducts[keys[i]] === "string") + message.cloudProducts[keys[i]] = parseInt(object.cloudProducts[keys[i]], 10); + else if (typeof object.cloudProducts[keys[i]] === "number") + message.cloudProducts[keys[i]] = object.cloudProducts[keys[i]]; + else if (typeof object.cloudProducts[keys[i]] === "object") + message.cloudProducts[keys[i]] = new $util.LongBits(object.cloudProducts[keys[i]].low >>> 0, object.cloudProducts[keys[i]].high >>> 0).toNumber(); + } + if (object.locations) { + if (typeof object.locations !== "object") + throw TypeError(".google.cloud.kms.inventory.v1.ProtectedResourcesSummary.locations: object expected"); + message.locations = {}; + for (var keys = Object.keys(object.locations), i = 0; i < keys.length; ++i) + if ($util.Long) + (message.locations[keys[i]] = $util.Long.fromValue(object.locations[keys[i]])).unsigned = false; + else if (typeof object.locations[keys[i]] === "string") + message.locations[keys[i]] = parseInt(object.locations[keys[i]], 10); + else if (typeof object.locations[keys[i]] === "number") + message.locations[keys[i]] = object.locations[keys[i]]; + else if (typeof object.locations[keys[i]] === "object") + message.locations[keys[i]] = new $util.LongBits(object.locations[keys[i]].low >>> 0, object.locations[keys[i]].high >>> 0).toNumber(); + } + return message; + }; + + /** + * Creates a plain object from a ProtectedResourcesSummary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.kms.inventory.v1.ProtectedResourcesSummary + * @static + * @param {google.cloud.kms.inventory.v1.ProtectedResourcesSummary} message ProtectedResourcesSummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProtectedResourcesSummary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.resourceTypes = {}; + object.locations = {}; + object.cloudProducts = {}; + } + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.resourceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.resourceCount = options.longs === String ? "0" : 0; + object.projectCount = 0; + object.name = ""; + } + if (message.resourceCount != null && message.hasOwnProperty("resourceCount")) + if (typeof message.resourceCount === "number") + object.resourceCount = options.longs === String ? String(message.resourceCount) : message.resourceCount; + else + object.resourceCount = options.longs === String ? $util.Long.prototype.toString.call(message.resourceCount) : options.longs === Number ? new $util.LongBits(message.resourceCount.low >>> 0, message.resourceCount.high >>> 0).toNumber() : message.resourceCount; + if (message.projectCount != null && message.hasOwnProperty("projectCount")) + object.projectCount = message.projectCount; + var keys2; + if (message.resourceTypes && (keys2 = Object.keys(message.resourceTypes)).length) { + object.resourceTypes = {}; + for (var j = 0; j < keys2.length; ++j) + if (typeof message.resourceTypes[keys2[j]] === "number") + object.resourceTypes[keys2[j]] = options.longs === String ? String(message.resourceTypes[keys2[j]]) : message.resourceTypes[keys2[j]]; + else + object.resourceTypes[keys2[j]] = options.longs === String ? $util.Long.prototype.toString.call(message.resourceTypes[keys2[j]]) : options.longs === Number ? new $util.LongBits(message.resourceTypes[keys2[j]].low >>> 0, message.resourceTypes[keys2[j]].high >>> 0).toNumber() : message.resourceTypes[keys2[j]]; + } + if (message.locations && (keys2 = Object.keys(message.locations)).length) { + object.locations = {}; + for (var j = 0; j < keys2.length; ++j) + if (typeof message.locations[keys2[j]] === "number") + object.locations[keys2[j]] = options.longs === String ? String(message.locations[keys2[j]]) : message.locations[keys2[j]]; + else + object.locations[keys2[j]] = options.longs === String ? $util.Long.prototype.toString.call(message.locations[keys2[j]]) : options.longs === Number ? new $util.LongBits(message.locations[keys2[j]].low >>> 0, message.locations[keys2[j]].high >>> 0).toNumber() : message.locations[keys2[j]]; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.cloudProducts && (keys2 = Object.keys(message.cloudProducts)).length) { + object.cloudProducts = {}; + for (var j = 0; j < keys2.length; ++j) + if (typeof message.cloudProducts[keys2[j]] === "number") + object.cloudProducts[keys2[j]] = options.longs === String ? String(message.cloudProducts[keys2[j]]) : message.cloudProducts[keys2[j]]; + else + object.cloudProducts[keys2[j]] = options.longs === String ? $util.Long.prototype.toString.call(message.cloudProducts[keys2[j]]) : options.longs === Number ? new $util.LongBits(message.cloudProducts[keys2[j]].low >>> 0, message.cloudProducts[keys2[j]].high >>> 0).toNumber() : message.cloudProducts[keys2[j]]; + } + return object; + }; + + /** + * Converts this ProtectedResourcesSummary to JSON. + * @function toJSON + * @memberof google.cloud.kms.inventory.v1.ProtectedResourcesSummary + * @instance + * @returns {Object.} JSON object + */ + ProtectedResourcesSummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProtectedResourcesSummary + * @function getTypeUrl + * @memberof google.cloud.kms.inventory.v1.ProtectedResourcesSummary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProtectedResourcesSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.kms.inventory.v1.ProtectedResourcesSummary"; + }; + + return ProtectedResourcesSummary; + })(); + + v1.SearchProtectedResourcesRequest = (function() { + + /** + * Properties of a SearchProtectedResourcesRequest. + * @memberof google.cloud.kms.inventory.v1 + * @interface ISearchProtectedResourcesRequest + * @property {string|null} [scope] SearchProtectedResourcesRequest scope + * @property {string|null} [cryptoKey] SearchProtectedResourcesRequest cryptoKey + * @property {number|null} [pageSize] SearchProtectedResourcesRequest pageSize + * @property {string|null} [pageToken] SearchProtectedResourcesRequest pageToken + */ + + /** + * Constructs a new SearchProtectedResourcesRequest. + * @memberof google.cloud.kms.inventory.v1 + * @classdesc Represents a SearchProtectedResourcesRequest. + * @implements ISearchProtectedResourcesRequest + * @constructor + * @param {google.cloud.kms.inventory.v1.ISearchProtectedResourcesRequest=} [properties] Properties to set + */ + function SearchProtectedResourcesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchProtectedResourcesRequest scope. + * @member {string} scope + * @memberof google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest + * @instance + */ + SearchProtectedResourcesRequest.prototype.scope = ""; + + /** + * SearchProtectedResourcesRequest cryptoKey. + * @member {string} cryptoKey + * @memberof google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest + * @instance + */ + SearchProtectedResourcesRequest.prototype.cryptoKey = ""; + + /** + * SearchProtectedResourcesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest + * @instance + */ + SearchProtectedResourcesRequest.prototype.pageSize = 0; + + /** + * SearchProtectedResourcesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest + * @instance + */ + SearchProtectedResourcesRequest.prototype.pageToken = ""; + + /** + * Creates a new SearchProtectedResourcesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest + * @static + * @param {google.cloud.kms.inventory.v1.ISearchProtectedResourcesRequest=} [properties] Properties to set + * @returns {google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest} SearchProtectedResourcesRequest instance + */ + SearchProtectedResourcesRequest.create = function create(properties) { + return new SearchProtectedResourcesRequest(properties); + }; + + /** + * Encodes the specified SearchProtectedResourcesRequest message. Does not implicitly {@link google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest + * @static + * @param {google.cloud.kms.inventory.v1.ISearchProtectedResourcesRequest} message SearchProtectedResourcesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchProtectedResourcesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cryptoKey != null && Object.hasOwnProperty.call(message, "cryptoKey")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cryptoKey); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.scope); + 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); + return writer; + }; + + /** + * Encodes the specified SearchProtectedResourcesRequest message, length delimited. Does not implicitly {@link google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest + * @static + * @param {google.cloud.kms.inventory.v1.ISearchProtectedResourcesRequest} message SearchProtectedResourcesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchProtectedResourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchProtectedResourcesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest} SearchProtectedResourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchProtectedResourcesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.scope = reader.string(); + break; + } + case 1: { + message.cryptoKey = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchProtectedResourcesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest} SearchProtectedResourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchProtectedResourcesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchProtectedResourcesRequest message. + * @function verify + * @memberof google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchProtectedResourcesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scope != null && message.hasOwnProperty("scope")) + if (!$util.isString(message.scope)) + return "scope: string expected"; + if (message.cryptoKey != null && message.hasOwnProperty("cryptoKey")) + if (!$util.isString(message.cryptoKey)) + return "cryptoKey: 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 SearchProtectedResourcesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest} SearchProtectedResourcesRequest + */ + SearchProtectedResourcesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest) + return object; + var message = new $root.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest(); + if (object.scope != null) + message.scope = String(object.scope); + if (object.cryptoKey != null) + message.cryptoKey = String(object.cryptoKey); + 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 SearchProtectedResourcesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest + * @static + * @param {google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest} message SearchProtectedResourcesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchProtectedResourcesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cryptoKey = ""; + object.scope = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.cryptoKey != null && message.hasOwnProperty("cryptoKey")) + object.cryptoKey = message.cryptoKey; + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = message.scope; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this SearchProtectedResourcesRequest to JSON. + * @function toJSON + * @memberof google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest + * @instance + * @returns {Object.} JSON object + */ + SearchProtectedResourcesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchProtectedResourcesRequest + * @function getTypeUrl + * @memberof google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchProtectedResourcesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest"; + }; + + return SearchProtectedResourcesRequest; + })(); + + v1.SearchProtectedResourcesResponse = (function() { + + /** + * Properties of a SearchProtectedResourcesResponse. + * @memberof google.cloud.kms.inventory.v1 + * @interface ISearchProtectedResourcesResponse + * @property {Array.|null} [protectedResources] SearchProtectedResourcesResponse protectedResources + * @property {string|null} [nextPageToken] SearchProtectedResourcesResponse nextPageToken + */ + + /** + * Constructs a new SearchProtectedResourcesResponse. + * @memberof google.cloud.kms.inventory.v1 + * @classdesc Represents a SearchProtectedResourcesResponse. + * @implements ISearchProtectedResourcesResponse + * @constructor + * @param {google.cloud.kms.inventory.v1.ISearchProtectedResourcesResponse=} [properties] Properties to set + */ + function SearchProtectedResourcesResponse(properties) { + this.protectedResources = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchProtectedResourcesResponse protectedResources. + * @member {Array.} protectedResources + * @memberof google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse + * @instance + */ + SearchProtectedResourcesResponse.prototype.protectedResources = $util.emptyArray; + + /** + * SearchProtectedResourcesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse + * @instance + */ + SearchProtectedResourcesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new SearchProtectedResourcesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse + * @static + * @param {google.cloud.kms.inventory.v1.ISearchProtectedResourcesResponse=} [properties] Properties to set + * @returns {google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse} SearchProtectedResourcesResponse instance + */ + SearchProtectedResourcesResponse.create = function create(properties) { + return new SearchProtectedResourcesResponse(properties); + }; + + /** + * Encodes the specified SearchProtectedResourcesResponse message. Does not implicitly {@link google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse + * @static + * @param {google.cloud.kms.inventory.v1.ISearchProtectedResourcesResponse} message SearchProtectedResourcesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchProtectedResourcesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.protectedResources != null && message.protectedResources.length) + for (var i = 0; i < message.protectedResources.length; ++i) + $root.google.cloud.kms.inventory.v1.ProtectedResource.encode(message.protectedResources[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 SearchProtectedResourcesResponse message, length delimited. Does not implicitly {@link google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse + * @static + * @param {google.cloud.kms.inventory.v1.ISearchProtectedResourcesResponse} message SearchProtectedResourcesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchProtectedResourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchProtectedResourcesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse} SearchProtectedResourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchProtectedResourcesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.protectedResources && message.protectedResources.length)) + message.protectedResources = []; + message.protectedResources.push($root.google.cloud.kms.inventory.v1.ProtectedResource.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchProtectedResourcesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse} SearchProtectedResourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchProtectedResourcesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchProtectedResourcesResponse message. + * @function verify + * @memberof google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchProtectedResourcesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.protectedResources != null && message.hasOwnProperty("protectedResources")) { + if (!Array.isArray(message.protectedResources)) + return "protectedResources: array expected"; + for (var i = 0; i < message.protectedResources.length; ++i) { + var error = $root.google.cloud.kms.inventory.v1.ProtectedResource.verify(message.protectedResources[i]); + if (error) + return "protectedResources." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a SearchProtectedResourcesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse} SearchProtectedResourcesResponse + */ + SearchProtectedResourcesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse) + return object; + var message = new $root.google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse(); + if (object.protectedResources) { + if (!Array.isArray(object.protectedResources)) + throw TypeError(".google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse.protectedResources: array expected"); + message.protectedResources = []; + for (var i = 0; i < object.protectedResources.length; ++i) { + if (typeof object.protectedResources[i] !== "object") + throw TypeError(".google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse.protectedResources: object expected"); + message.protectedResources[i] = $root.google.cloud.kms.inventory.v1.ProtectedResource.fromObject(object.protectedResources[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a SearchProtectedResourcesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse + * @static + * @param {google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse} message SearchProtectedResourcesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchProtectedResourcesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.protectedResources = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.protectedResources && message.protectedResources.length) { + object.protectedResources = []; + for (var j = 0; j < message.protectedResources.length; ++j) + object.protectedResources[j] = $root.google.cloud.kms.inventory.v1.ProtectedResource.toObject(message.protectedResources[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this SearchProtectedResourcesResponse to JSON. + * @function toJSON + * @memberof google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse + * @instance + * @returns {Object.} JSON object + */ + SearchProtectedResourcesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchProtectedResourcesResponse + * @function getTypeUrl + * @memberof google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchProtectedResourcesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse"; + }; + + return SearchProtectedResourcesResponse; + })(); + + v1.ProtectedResource = (function() { + + /** + * Properties of a ProtectedResource. + * @memberof google.cloud.kms.inventory.v1 + * @interface IProtectedResource + * @property {string|null} [name] ProtectedResource name + * @property {string|null} [project] ProtectedResource project + * @property {string|null} [projectId] ProtectedResource projectId + * @property {string|null} [cloudProduct] ProtectedResource cloudProduct + * @property {string|null} [resourceType] ProtectedResource resourceType + * @property {string|null} [location] ProtectedResource location + * @property {Object.|null} [labels] ProtectedResource labels + * @property {string|null} [cryptoKeyVersion] ProtectedResource cryptoKeyVersion + * @property {Array.|null} [cryptoKeyVersions] ProtectedResource cryptoKeyVersions + * @property {google.protobuf.ITimestamp|null} [createTime] ProtectedResource createTime + */ + + /** + * Constructs a new ProtectedResource. + * @memberof google.cloud.kms.inventory.v1 + * @classdesc Represents a ProtectedResource. + * @implements IProtectedResource + * @constructor + * @param {google.cloud.kms.inventory.v1.IProtectedResource=} [properties] Properties to set + */ + function ProtectedResource(properties) { + this.labels = {}; + this.cryptoKeyVersions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProtectedResource name. + * @member {string} name + * @memberof google.cloud.kms.inventory.v1.ProtectedResource + * @instance + */ + ProtectedResource.prototype.name = ""; + + /** + * ProtectedResource project. + * @member {string} project + * @memberof google.cloud.kms.inventory.v1.ProtectedResource + * @instance + */ + ProtectedResource.prototype.project = ""; + + /** + * ProtectedResource projectId. + * @member {string} projectId + * @memberof google.cloud.kms.inventory.v1.ProtectedResource + * @instance + */ + ProtectedResource.prototype.projectId = ""; + + /** + * ProtectedResource cloudProduct. + * @member {string} cloudProduct + * @memberof google.cloud.kms.inventory.v1.ProtectedResource + * @instance + */ + ProtectedResource.prototype.cloudProduct = ""; + + /** + * ProtectedResource resourceType. + * @member {string} resourceType + * @memberof google.cloud.kms.inventory.v1.ProtectedResource + * @instance + */ + ProtectedResource.prototype.resourceType = ""; + + /** + * ProtectedResource location. + * @member {string} location + * @memberof google.cloud.kms.inventory.v1.ProtectedResource + * @instance + */ + ProtectedResource.prototype.location = ""; + + /** + * ProtectedResource labels. + * @member {Object.} labels + * @memberof google.cloud.kms.inventory.v1.ProtectedResource + * @instance + */ + ProtectedResource.prototype.labels = $util.emptyObject; + + /** + * ProtectedResource cryptoKeyVersion. + * @member {string} cryptoKeyVersion + * @memberof google.cloud.kms.inventory.v1.ProtectedResource + * @instance + */ + ProtectedResource.prototype.cryptoKeyVersion = ""; + + /** + * ProtectedResource cryptoKeyVersions. + * @member {Array.} cryptoKeyVersions + * @memberof google.cloud.kms.inventory.v1.ProtectedResource + * @instance + */ + ProtectedResource.prototype.cryptoKeyVersions = $util.emptyArray; + + /** + * ProtectedResource createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.kms.inventory.v1.ProtectedResource + * @instance + */ + ProtectedResource.prototype.createTime = null; + + /** + * Creates a new ProtectedResource instance using the specified properties. + * @function create + * @memberof google.cloud.kms.inventory.v1.ProtectedResource + * @static + * @param {google.cloud.kms.inventory.v1.IProtectedResource=} [properties] Properties to set + * @returns {google.cloud.kms.inventory.v1.ProtectedResource} ProtectedResource instance + */ + ProtectedResource.create = function create(properties) { + return new ProtectedResource(properties); + }; + + /** + * Encodes the specified ProtectedResource message. Does not implicitly {@link google.cloud.kms.inventory.v1.ProtectedResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.kms.inventory.v1.ProtectedResource + * @static + * @param {google.cloud.kms.inventory.v1.IProtectedResource} message ProtectedResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProtectedResource.encode = function encode(message, writer) { + 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.project != null && Object.hasOwnProperty.call(message, "project")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.project); + if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.resourceType); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.location); + 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.cryptoKeyVersion != null && Object.hasOwnProperty.call(message, "cryptoKeyVersion")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.cryptoKeyVersion); + 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.cloudProduct != null && Object.hasOwnProperty.call(message, "cloudProduct")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.cloudProduct); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.projectId); + if (message.cryptoKeyVersions != null && message.cryptoKeyVersions.length) + for (var i = 0; i < message.cryptoKeyVersions.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.cryptoKeyVersions[i]); + return writer; + }; + + /** + * Encodes the specified ProtectedResource message, length delimited. Does not implicitly {@link google.cloud.kms.inventory.v1.ProtectedResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.kms.inventory.v1.ProtectedResource + * @static + * @param {google.cloud.kms.inventory.v1.IProtectedResource} message ProtectedResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProtectedResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProtectedResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.kms.inventory.v1.ProtectedResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.kms.inventory.v1.ProtectedResource} ProtectedResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProtectedResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.inventory.v1.ProtectedResource(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.project = reader.string(); + break; + } + case 9: { + message.projectId = reader.string(); + break; + } + case 8: { + message.cloudProduct = reader.string(); + break; + } + case 3: { + message.resourceType = reader.string(); + break; + } + case 4: { + message.location = 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 6: { + message.cryptoKeyVersion = reader.string(); + break; + } + case 10: { + if (!(message.cryptoKeyVersions && message.cryptoKeyVersions.length)) + message.cryptoKeyVersions = []; + message.cryptoKeyVersions.push(reader.string()); + break; + } + case 7: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProtectedResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.kms.inventory.v1.ProtectedResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.kms.inventory.v1.ProtectedResource} ProtectedResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProtectedResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProtectedResource message. + * @function verify + * @memberof google.cloud.kms.inventory.v1.ProtectedResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProtectedResource.verify = function verify(message) { + if (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.project != null && message.hasOwnProperty("project")) + if (!$util.isString(message.project)) + return "project: string expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.cloudProduct != null && message.hasOwnProperty("cloudProduct")) + if (!$util.isString(message.cloudProduct)) + return "cloudProduct: string expected"; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + if (!$util.isString(message.resourceType)) + return "resourceType: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: 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.cryptoKeyVersion != null && message.hasOwnProperty("cryptoKeyVersion")) + if (!$util.isString(message.cryptoKeyVersion)) + return "cryptoKeyVersion: string expected"; + if (message.cryptoKeyVersions != null && message.hasOwnProperty("cryptoKeyVersions")) { + if (!Array.isArray(message.cryptoKeyVersions)) + return "cryptoKeyVersions: array expected"; + for (var i = 0; i < message.cryptoKeyVersions.length; ++i) + if (!$util.isString(message.cryptoKeyVersions[i])) + return "cryptoKeyVersions: string[] expected"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + return null; + }; + + /** + * Creates a ProtectedResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.kms.inventory.v1.ProtectedResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.kms.inventory.v1.ProtectedResource} ProtectedResource + */ + ProtectedResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.kms.inventory.v1.ProtectedResource) + return object; + var message = new $root.google.cloud.kms.inventory.v1.ProtectedResource(); + if (object.name != null) + message.name = String(object.name); + if (object.project != null) + message.project = String(object.project); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.cloudProduct != null) + message.cloudProduct = String(object.cloudProduct); + if (object.resourceType != null) + message.resourceType = String(object.resourceType); + if (object.location != null) + message.location = String(object.location); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.kms.inventory.v1.ProtectedResource.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.cryptoKeyVersion != null) + message.cryptoKeyVersion = String(object.cryptoKeyVersion); + if (object.cryptoKeyVersions) { + if (!Array.isArray(object.cryptoKeyVersions)) + throw TypeError(".google.cloud.kms.inventory.v1.ProtectedResource.cryptoKeyVersions: array expected"); + message.cryptoKeyVersions = []; + for (var i = 0; i < object.cryptoKeyVersions.length; ++i) + message.cryptoKeyVersions[i] = String(object.cryptoKeyVersions[i]); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.kms.inventory.v1.ProtectedResource.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + return message; + }; + + /** + * Creates a plain object from a ProtectedResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.kms.inventory.v1.ProtectedResource + * @static + * @param {google.cloud.kms.inventory.v1.ProtectedResource} message ProtectedResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProtectedResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.cryptoKeyVersions = []; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.project = ""; + object.resourceType = ""; + object.location = ""; + object.cryptoKeyVersion = ""; + object.createTime = null; + object.cloudProduct = ""; + object.projectId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.project != null && message.hasOwnProperty("project")) + object.project = message.project; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = message.resourceType; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + 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.cryptoKeyVersion != null && message.hasOwnProperty("cryptoKeyVersion")) + object.cryptoKeyVersion = message.cryptoKeyVersion; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.cloudProduct != null && message.hasOwnProperty("cloudProduct")) + object.cloudProduct = message.cloudProduct; + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.cryptoKeyVersions && message.cryptoKeyVersions.length) { + object.cryptoKeyVersions = []; + for (var j = 0; j < message.cryptoKeyVersions.length; ++j) + object.cryptoKeyVersions[j] = message.cryptoKeyVersions[j]; + } + return object; + }; + + /** + * Converts this ProtectedResource to JSON. + * @function toJSON + * @memberof google.cloud.kms.inventory.v1.ProtectedResource + * @instance + * @returns {Object.} JSON object + */ + ProtectedResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProtectedResource + * @function getTypeUrl + * @memberof google.cloud.kms.inventory.v1.ProtectedResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProtectedResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.kms.inventory.v1.ProtectedResource"; + }; + + return ProtectedResource; + })(); + + return v1; + })(); + + return inventory; + })(); + + kms.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.kms + * @namespace + */ + var v1 = {}; + + v1.KeyRing = (function() { + + /** + * Properties of a KeyRing. + * @memberof google.cloud.kms.v1 + * @interface IKeyRing + * @property {string|null} [name] KeyRing name + * @property {google.protobuf.ITimestamp|null} [createTime] KeyRing createTime + */ + + /** + * Constructs a new KeyRing. + * @memberof google.cloud.kms.v1 + * @classdesc Represents a KeyRing. + * @implements IKeyRing + * @constructor + * @param {google.cloud.kms.v1.IKeyRing=} [properties] Properties to set + */ + function KeyRing(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * KeyRing name. + * @member {string} name + * @memberof google.cloud.kms.v1.KeyRing + * @instance + */ + KeyRing.prototype.name = ""; + + /** + * KeyRing createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.kms.v1.KeyRing + * @instance + */ + KeyRing.prototype.createTime = null; + + /** + * Creates a new KeyRing instance using the specified properties. + * @function create + * @memberof google.cloud.kms.v1.KeyRing + * @static + * @param {google.cloud.kms.v1.IKeyRing=} [properties] Properties to set + * @returns {google.cloud.kms.v1.KeyRing} KeyRing instance + */ + KeyRing.create = function create(properties) { + return new KeyRing(properties); + }; + + /** + * Encodes the specified KeyRing message. Does not implicitly {@link google.cloud.kms.v1.KeyRing.verify|verify} messages. + * @function encode + * @memberof google.cloud.kms.v1.KeyRing + * @static + * @param {google.cloud.kms.v1.IKeyRing} message KeyRing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyRing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified KeyRing message, length delimited. Does not implicitly {@link google.cloud.kms.v1.KeyRing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.kms.v1.KeyRing + * @static + * @param {google.cloud.kms.v1.IKeyRing} message KeyRing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyRing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KeyRing message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.kms.v1.KeyRing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.kms.v1.KeyRing} KeyRing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyRing.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.KeyRing(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a KeyRing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.kms.v1.KeyRing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.kms.v1.KeyRing} KeyRing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyRing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KeyRing message. + * @function verify + * @memberof google.cloud.kms.v1.KeyRing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KeyRing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + return null; + }; + + /** + * Creates a KeyRing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.kms.v1.KeyRing + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.kms.v1.KeyRing} KeyRing + */ + KeyRing.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.kms.v1.KeyRing) + return object; + var message = new $root.google.cloud.kms.v1.KeyRing(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.kms.v1.KeyRing.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + return message; + }; + + /** + * Creates a plain object from a KeyRing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.kms.v1.KeyRing + * @static + * @param {google.cloud.kms.v1.KeyRing} message KeyRing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KeyRing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + return object; + }; + + /** + * Converts this KeyRing to JSON. + * @function toJSON + * @memberof google.cloud.kms.v1.KeyRing + * @instance + * @returns {Object.} JSON object + */ + KeyRing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for KeyRing + * @function getTypeUrl + * @memberof google.cloud.kms.v1.KeyRing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KeyRing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.kms.v1.KeyRing"; + }; + + return KeyRing; + })(); + + v1.CryptoKey = (function() { + + /** + * Properties of a CryptoKey. + * @memberof google.cloud.kms.v1 + * @interface ICryptoKey + * @property {string|null} [name] CryptoKey name + * @property {google.cloud.kms.v1.ICryptoKeyVersion|null} [primary] CryptoKey primary + * @property {google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose|null} [purpose] CryptoKey purpose + * @property {google.protobuf.ITimestamp|null} [createTime] CryptoKey createTime + * @property {google.protobuf.ITimestamp|null} [nextRotationTime] CryptoKey nextRotationTime + * @property {google.protobuf.IDuration|null} [rotationPeriod] CryptoKey rotationPeriod + * @property {google.cloud.kms.v1.ICryptoKeyVersionTemplate|null} [versionTemplate] CryptoKey versionTemplate + * @property {Object.|null} [labels] CryptoKey labels + * @property {boolean|null} [importOnly] CryptoKey importOnly + * @property {google.protobuf.IDuration|null} [destroyScheduledDuration] CryptoKey destroyScheduledDuration + * @property {string|null} [cryptoKeyBackend] CryptoKey cryptoKeyBackend + */ + + /** + * Constructs a new CryptoKey. + * @memberof google.cloud.kms.v1 + * @classdesc Represents a CryptoKey. + * @implements ICryptoKey + * @constructor + * @param {google.cloud.kms.v1.ICryptoKey=} [properties] Properties to set + */ + function CryptoKey(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]]; + } + + /** + * CryptoKey name. + * @member {string} name + * @memberof google.cloud.kms.v1.CryptoKey + * @instance + */ + CryptoKey.prototype.name = ""; + + /** + * CryptoKey primary. + * @member {google.cloud.kms.v1.ICryptoKeyVersion|null|undefined} primary + * @memberof google.cloud.kms.v1.CryptoKey + * @instance + */ + CryptoKey.prototype.primary = null; + + /** + * CryptoKey purpose. + * @member {google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose} purpose + * @memberof google.cloud.kms.v1.CryptoKey + * @instance + */ + CryptoKey.prototype.purpose = 0; + + /** + * CryptoKey createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.kms.v1.CryptoKey + * @instance + */ + CryptoKey.prototype.createTime = null; + + /** + * CryptoKey nextRotationTime. + * @member {google.protobuf.ITimestamp|null|undefined} nextRotationTime + * @memberof google.cloud.kms.v1.CryptoKey + * @instance + */ + CryptoKey.prototype.nextRotationTime = null; + + /** + * CryptoKey rotationPeriod. + * @member {google.protobuf.IDuration|null|undefined} rotationPeriod + * @memberof google.cloud.kms.v1.CryptoKey + * @instance + */ + CryptoKey.prototype.rotationPeriod = null; + + /** + * CryptoKey versionTemplate. + * @member {google.cloud.kms.v1.ICryptoKeyVersionTemplate|null|undefined} versionTemplate + * @memberof google.cloud.kms.v1.CryptoKey + * @instance + */ + CryptoKey.prototype.versionTemplate = null; + + /** + * CryptoKey labels. + * @member {Object.} labels + * @memberof google.cloud.kms.v1.CryptoKey + * @instance + */ + CryptoKey.prototype.labels = $util.emptyObject; + + /** + * CryptoKey importOnly. + * @member {boolean} importOnly + * @memberof google.cloud.kms.v1.CryptoKey + * @instance + */ + CryptoKey.prototype.importOnly = false; + + /** + * CryptoKey destroyScheduledDuration. + * @member {google.protobuf.IDuration|null|undefined} destroyScheduledDuration + * @memberof google.cloud.kms.v1.CryptoKey + * @instance + */ + CryptoKey.prototype.destroyScheduledDuration = null; + + /** + * CryptoKey cryptoKeyBackend. + * @member {string} cryptoKeyBackend + * @memberof google.cloud.kms.v1.CryptoKey + * @instance + */ + CryptoKey.prototype.cryptoKeyBackend = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CryptoKey rotationSchedule. + * @member {"rotationPeriod"|undefined} rotationSchedule + * @memberof google.cloud.kms.v1.CryptoKey + * @instance + */ + Object.defineProperty(CryptoKey.prototype, "rotationSchedule", { + get: $util.oneOfGetter($oneOfFields = ["rotationPeriod"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CryptoKey instance using the specified properties. + * @function create + * @memberof google.cloud.kms.v1.CryptoKey + * @static + * @param {google.cloud.kms.v1.ICryptoKey=} [properties] Properties to set + * @returns {google.cloud.kms.v1.CryptoKey} CryptoKey instance + */ + CryptoKey.create = function create(properties) { + return new CryptoKey(properties); + }; + + /** + * Encodes the specified CryptoKey message. Does not implicitly {@link google.cloud.kms.v1.CryptoKey.verify|verify} messages. + * @function encode + * @memberof google.cloud.kms.v1.CryptoKey + * @static + * @param {google.cloud.kms.v1.ICryptoKey} message CryptoKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CryptoKey.encode = function encode(message, writer) { + 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.primary != null && Object.hasOwnProperty.call(message, "primary")) + $root.google.cloud.kms.v1.CryptoKeyVersion.encode(message.primary, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.purpose != null && Object.hasOwnProperty.call(message, "purpose")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.purpose); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.nextRotationTime != null && Object.hasOwnProperty.call(message, "nextRotationTime")) + $root.google.protobuf.Timestamp.encode(message.nextRotationTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.rotationPeriod != null && Object.hasOwnProperty.call(message, "rotationPeriod")) + $root.google.protobuf.Duration.encode(message.rotationPeriod, writer.uint32(/* id 8, wireType 2 =*/66).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 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.versionTemplate != null && Object.hasOwnProperty.call(message, "versionTemplate")) + $root.google.cloud.kms.v1.CryptoKeyVersionTemplate.encode(message.versionTemplate, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.importOnly != null && Object.hasOwnProperty.call(message, "importOnly")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.importOnly); + if (message.destroyScheduledDuration != null && Object.hasOwnProperty.call(message, "destroyScheduledDuration")) + $root.google.protobuf.Duration.encode(message.destroyScheduledDuration, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.cryptoKeyBackend != null && Object.hasOwnProperty.call(message, "cryptoKeyBackend")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.cryptoKeyBackend); + return writer; + }; + + /** + * Encodes the specified CryptoKey message, length delimited. Does not implicitly {@link google.cloud.kms.v1.CryptoKey.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.kms.v1.CryptoKey + * @static + * @param {google.cloud.kms.v1.ICryptoKey} message CryptoKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CryptoKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CryptoKey message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.kms.v1.CryptoKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.kms.v1.CryptoKey} CryptoKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CryptoKey.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.CryptoKey(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.primary = $root.google.cloud.kms.v1.CryptoKeyVersion.decode(reader, reader.uint32()); + break; + } + case 3: { + message.purpose = reader.int32(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.nextRotationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.rotationPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 11: { + message.versionTemplate = $root.google.cloud.kms.v1.CryptoKeyVersionTemplate.decode(reader, reader.uint32()); + break; + } + case 10: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 13: { + message.importOnly = reader.bool(); + break; + } + case 14: { + message.destroyScheduledDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 15: { + message.cryptoKeyBackend = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CryptoKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.kms.v1.CryptoKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.kms.v1.CryptoKey} CryptoKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CryptoKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CryptoKey message. + * @function verify + * @memberof google.cloud.kms.v1.CryptoKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CryptoKey.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.primary != null && message.hasOwnProperty("primary")) { + var error = $root.google.cloud.kms.v1.CryptoKeyVersion.verify(message.primary); + if (error) + return "primary." + error; + } + if (message.purpose != null && message.hasOwnProperty("purpose")) + switch (message.purpose) { + default: + return "purpose: enum value expected"; + case 0: + case 1: + case 5: + case 6: + case 9: + break; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.nextRotationTime != null && message.hasOwnProperty("nextRotationTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.nextRotationTime); + if (error) + return "nextRotationTime." + error; + } + if (message.rotationPeriod != null && message.hasOwnProperty("rotationPeriod")) { + properties.rotationSchedule = 1; + { + var error = $root.google.protobuf.Duration.verify(message.rotationPeriod); + if (error) + return "rotationPeriod." + error; + } + } + if (message.versionTemplate != null && message.hasOwnProperty("versionTemplate")) { + var error = $root.google.cloud.kms.v1.CryptoKeyVersionTemplate.verify(message.versionTemplate); + if (error) + return "versionTemplate." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.importOnly != null && message.hasOwnProperty("importOnly")) + if (typeof message.importOnly !== "boolean") + return "importOnly: boolean expected"; + if (message.destroyScheduledDuration != null && message.hasOwnProperty("destroyScheduledDuration")) { + var error = $root.google.protobuf.Duration.verify(message.destroyScheduledDuration); + if (error) + return "destroyScheduledDuration." + error; + } + if (message.cryptoKeyBackend != null && message.hasOwnProperty("cryptoKeyBackend")) + if (!$util.isString(message.cryptoKeyBackend)) + return "cryptoKeyBackend: string expected"; + return null; + }; + + /** + * Creates a CryptoKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.kms.v1.CryptoKey + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.kms.v1.CryptoKey} CryptoKey + */ + CryptoKey.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.kms.v1.CryptoKey) + return object; + var message = new $root.google.cloud.kms.v1.CryptoKey(); + if (object.name != null) + message.name = String(object.name); + if (object.primary != null) { + if (typeof object.primary !== "object") + throw TypeError(".google.cloud.kms.v1.CryptoKey.primary: object expected"); + message.primary = $root.google.cloud.kms.v1.CryptoKeyVersion.fromObject(object.primary); + } + switch (object.purpose) { + default: + if (typeof object.purpose === "number") { + message.purpose = object.purpose; + break; + } + break; + case "CRYPTO_KEY_PURPOSE_UNSPECIFIED": + case 0: + message.purpose = 0; + break; + case "ENCRYPT_DECRYPT": + case 1: + message.purpose = 1; + break; + case "ASYMMETRIC_SIGN": + case 5: + message.purpose = 5; + break; + case "ASYMMETRIC_DECRYPT": + case 6: + message.purpose = 6; + break; + case "MAC": + case 9: + message.purpose = 9; + break; + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.kms.v1.CryptoKey.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.nextRotationTime != null) { + if (typeof object.nextRotationTime !== "object") + throw TypeError(".google.cloud.kms.v1.CryptoKey.nextRotationTime: object expected"); + message.nextRotationTime = $root.google.protobuf.Timestamp.fromObject(object.nextRotationTime); + } + if (object.rotationPeriod != null) { + if (typeof object.rotationPeriod !== "object") + throw TypeError(".google.cloud.kms.v1.CryptoKey.rotationPeriod: object expected"); + message.rotationPeriod = $root.google.protobuf.Duration.fromObject(object.rotationPeriod); + } + if (object.versionTemplate != null) { + if (typeof object.versionTemplate !== "object") + throw TypeError(".google.cloud.kms.v1.CryptoKey.versionTemplate: object expected"); + message.versionTemplate = $root.google.cloud.kms.v1.CryptoKeyVersionTemplate.fromObject(object.versionTemplate); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.kms.v1.CryptoKey.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.importOnly != null) + message.importOnly = Boolean(object.importOnly); + if (object.destroyScheduledDuration != null) { + if (typeof object.destroyScheduledDuration !== "object") + throw TypeError(".google.cloud.kms.v1.CryptoKey.destroyScheduledDuration: object expected"); + message.destroyScheduledDuration = $root.google.protobuf.Duration.fromObject(object.destroyScheduledDuration); + } + if (object.cryptoKeyBackend != null) + message.cryptoKeyBackend = String(object.cryptoKeyBackend); + return message; + }; + + /** + * Creates a plain object from a CryptoKey message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.kms.v1.CryptoKey + * @static + * @param {google.cloud.kms.v1.CryptoKey} message CryptoKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CryptoKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.primary = null; + object.purpose = options.enums === String ? "CRYPTO_KEY_PURPOSE_UNSPECIFIED" : 0; + object.createTime = null; + object.nextRotationTime = null; + object.versionTemplate = null; + object.importOnly = false; + object.destroyScheduledDuration = null; + object.cryptoKeyBackend = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.primary != null && message.hasOwnProperty("primary")) + object.primary = $root.google.cloud.kms.v1.CryptoKeyVersion.toObject(message.primary, options); + if (message.purpose != null && message.hasOwnProperty("purpose")) + object.purpose = options.enums === String ? $root.google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose[message.purpose] === undefined ? message.purpose : $root.google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose[message.purpose] : message.purpose; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.nextRotationTime != null && message.hasOwnProperty("nextRotationTime")) + object.nextRotationTime = $root.google.protobuf.Timestamp.toObject(message.nextRotationTime, options); + if (message.rotationPeriod != null && message.hasOwnProperty("rotationPeriod")) { + object.rotationPeriod = $root.google.protobuf.Duration.toObject(message.rotationPeriod, options); + if (options.oneofs) + object.rotationSchedule = "rotationPeriod"; + } + 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.versionTemplate != null && message.hasOwnProperty("versionTemplate")) + object.versionTemplate = $root.google.cloud.kms.v1.CryptoKeyVersionTemplate.toObject(message.versionTemplate, options); + if (message.importOnly != null && message.hasOwnProperty("importOnly")) + object.importOnly = message.importOnly; + if (message.destroyScheduledDuration != null && message.hasOwnProperty("destroyScheduledDuration")) + object.destroyScheduledDuration = $root.google.protobuf.Duration.toObject(message.destroyScheduledDuration, options); + if (message.cryptoKeyBackend != null && message.hasOwnProperty("cryptoKeyBackend")) + object.cryptoKeyBackend = message.cryptoKeyBackend; + return object; + }; + + /** + * Converts this CryptoKey to JSON. + * @function toJSON + * @memberof google.cloud.kms.v1.CryptoKey + * @instance + * @returns {Object.} JSON object + */ + CryptoKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CryptoKey + * @function getTypeUrl + * @memberof google.cloud.kms.v1.CryptoKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CryptoKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.kms.v1.CryptoKey"; + }; + + /** + * CryptoKeyPurpose enum. + * @name google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose + * @enum {number} + * @property {number} CRYPTO_KEY_PURPOSE_UNSPECIFIED=0 CRYPTO_KEY_PURPOSE_UNSPECIFIED value + * @property {number} ENCRYPT_DECRYPT=1 ENCRYPT_DECRYPT value + * @property {number} ASYMMETRIC_SIGN=5 ASYMMETRIC_SIGN value + * @property {number} ASYMMETRIC_DECRYPT=6 ASYMMETRIC_DECRYPT value + * @property {number} MAC=9 MAC value + */ + CryptoKey.CryptoKeyPurpose = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CRYPTO_KEY_PURPOSE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENCRYPT_DECRYPT"] = 1; + values[valuesById[5] = "ASYMMETRIC_SIGN"] = 5; + values[valuesById[6] = "ASYMMETRIC_DECRYPT"] = 6; + values[valuesById[9] = "MAC"] = 9; + return values; + })(); + + return CryptoKey; + })(); + + v1.CryptoKeyVersionTemplate = (function() { + + /** + * Properties of a CryptoKeyVersionTemplate. + * @memberof google.cloud.kms.v1 + * @interface ICryptoKeyVersionTemplate + * @property {google.cloud.kms.v1.ProtectionLevel|null} [protectionLevel] CryptoKeyVersionTemplate protectionLevel + * @property {google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm|null} [algorithm] CryptoKeyVersionTemplate algorithm + */ + + /** + * Constructs a new CryptoKeyVersionTemplate. + * @memberof google.cloud.kms.v1 + * @classdesc Represents a CryptoKeyVersionTemplate. + * @implements ICryptoKeyVersionTemplate + * @constructor + * @param {google.cloud.kms.v1.ICryptoKeyVersionTemplate=} [properties] Properties to set + */ + function CryptoKeyVersionTemplate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CryptoKeyVersionTemplate protectionLevel. + * @member {google.cloud.kms.v1.ProtectionLevel} protectionLevel + * @memberof google.cloud.kms.v1.CryptoKeyVersionTemplate + * @instance + */ + CryptoKeyVersionTemplate.prototype.protectionLevel = 0; + + /** + * CryptoKeyVersionTemplate algorithm. + * @member {google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm} algorithm + * @memberof google.cloud.kms.v1.CryptoKeyVersionTemplate + * @instance + */ + CryptoKeyVersionTemplate.prototype.algorithm = 0; + + /** + * Creates a new CryptoKeyVersionTemplate instance using the specified properties. + * @function create + * @memberof google.cloud.kms.v1.CryptoKeyVersionTemplate + * @static + * @param {google.cloud.kms.v1.ICryptoKeyVersionTemplate=} [properties] Properties to set + * @returns {google.cloud.kms.v1.CryptoKeyVersionTemplate} CryptoKeyVersionTemplate instance + */ + CryptoKeyVersionTemplate.create = function create(properties) { + return new CryptoKeyVersionTemplate(properties); + }; + + /** + * Encodes the specified CryptoKeyVersionTemplate message. Does not implicitly {@link google.cloud.kms.v1.CryptoKeyVersionTemplate.verify|verify} messages. + * @function encode + * @memberof google.cloud.kms.v1.CryptoKeyVersionTemplate + * @static + * @param {google.cloud.kms.v1.ICryptoKeyVersionTemplate} message CryptoKeyVersionTemplate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CryptoKeyVersionTemplate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.protectionLevel != null && Object.hasOwnProperty.call(message, "protectionLevel")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.protectionLevel); + if (message.algorithm != null && Object.hasOwnProperty.call(message, "algorithm")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.algorithm); + return writer; + }; + + /** + * Encodes the specified CryptoKeyVersionTemplate message, length delimited. Does not implicitly {@link google.cloud.kms.v1.CryptoKeyVersionTemplate.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.kms.v1.CryptoKeyVersionTemplate + * @static + * @param {google.cloud.kms.v1.ICryptoKeyVersionTemplate} message CryptoKeyVersionTemplate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CryptoKeyVersionTemplate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CryptoKeyVersionTemplate message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.kms.v1.CryptoKeyVersionTemplate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.kms.v1.CryptoKeyVersionTemplate} CryptoKeyVersionTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CryptoKeyVersionTemplate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.CryptoKeyVersionTemplate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.protectionLevel = reader.int32(); + break; + } + case 3: { + message.algorithm = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CryptoKeyVersionTemplate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.kms.v1.CryptoKeyVersionTemplate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.kms.v1.CryptoKeyVersionTemplate} CryptoKeyVersionTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CryptoKeyVersionTemplate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CryptoKeyVersionTemplate message. + * @function verify + * @memberof google.cloud.kms.v1.CryptoKeyVersionTemplate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CryptoKeyVersionTemplate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.protectionLevel != null && message.hasOwnProperty("protectionLevel")) + switch (message.protectionLevel) { + default: + return "protectionLevel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.algorithm != null && message.hasOwnProperty("algorithm")) + switch (message.algorithm) { + default: + return "algorithm: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 15: + case 5: + case 6: + case 7: + case 16: + case 28: + case 29: + case 30: + case 8: + case 9: + case 10: + case 17: + case 37: + case 38: + case 39: + case 12: + case 13: + case 31: + case 32: + case 33: + case 34: + case 35: + case 36: + case 18: + break; + } + return null; + }; + + /** + * Creates a CryptoKeyVersionTemplate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.kms.v1.CryptoKeyVersionTemplate + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.kms.v1.CryptoKeyVersionTemplate} CryptoKeyVersionTemplate + */ + CryptoKeyVersionTemplate.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.kms.v1.CryptoKeyVersionTemplate) + return object; + var message = new $root.google.cloud.kms.v1.CryptoKeyVersionTemplate(); + switch (object.protectionLevel) { + default: + if (typeof object.protectionLevel === "number") { + message.protectionLevel = object.protectionLevel; + break; + } + break; + case "PROTECTION_LEVEL_UNSPECIFIED": + case 0: + message.protectionLevel = 0; + break; + case "SOFTWARE": + case 1: + message.protectionLevel = 1; + break; + case "HSM": + case 2: + message.protectionLevel = 2; + break; + case "EXTERNAL": + case 3: + message.protectionLevel = 3; + break; + case "EXTERNAL_VPC": + case 4: + message.protectionLevel = 4; + break; + } + switch (object.algorithm) { + default: + if (typeof object.algorithm === "number") { + message.algorithm = object.algorithm; + break; + } + break; + case "CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED": + case 0: + message.algorithm = 0; + break; + case "GOOGLE_SYMMETRIC_ENCRYPTION": + case 1: + message.algorithm = 1; + break; + case "RSA_SIGN_PSS_2048_SHA256": + case 2: + message.algorithm = 2; + break; + case "RSA_SIGN_PSS_3072_SHA256": + case 3: + message.algorithm = 3; + break; + case "RSA_SIGN_PSS_4096_SHA256": + case 4: + message.algorithm = 4; + break; + case "RSA_SIGN_PSS_4096_SHA512": + case 15: + message.algorithm = 15; + break; + case "RSA_SIGN_PKCS1_2048_SHA256": + case 5: + message.algorithm = 5; + break; + case "RSA_SIGN_PKCS1_3072_SHA256": + case 6: + message.algorithm = 6; + break; + case "RSA_SIGN_PKCS1_4096_SHA256": + case 7: + message.algorithm = 7; + break; + case "RSA_SIGN_PKCS1_4096_SHA512": + case 16: + message.algorithm = 16; + break; + case "RSA_SIGN_RAW_PKCS1_2048": + case 28: + message.algorithm = 28; + break; + case "RSA_SIGN_RAW_PKCS1_3072": + case 29: + message.algorithm = 29; + break; + case "RSA_SIGN_RAW_PKCS1_4096": + case 30: + message.algorithm = 30; + break; + case "RSA_DECRYPT_OAEP_2048_SHA256": + case 8: + message.algorithm = 8; + break; + case "RSA_DECRYPT_OAEP_3072_SHA256": + case 9: + message.algorithm = 9; + break; + case "RSA_DECRYPT_OAEP_4096_SHA256": + case 10: + message.algorithm = 10; + break; + case "RSA_DECRYPT_OAEP_4096_SHA512": + case 17: + message.algorithm = 17; + break; + case "RSA_DECRYPT_OAEP_2048_SHA1": + case 37: + message.algorithm = 37; + break; + case "RSA_DECRYPT_OAEP_3072_SHA1": + case 38: + message.algorithm = 38; + break; + case "RSA_DECRYPT_OAEP_4096_SHA1": + case 39: + message.algorithm = 39; + break; + case "EC_SIGN_P256_SHA256": + case 12: + message.algorithm = 12; + break; + case "EC_SIGN_P384_SHA384": + case 13: + message.algorithm = 13; + break; + case "EC_SIGN_SECP256K1_SHA256": + case 31: + message.algorithm = 31; + break; + case "HMAC_SHA256": + case 32: + message.algorithm = 32; + break; + case "HMAC_SHA1": + case 33: + message.algorithm = 33; + break; + case "HMAC_SHA384": + case 34: + message.algorithm = 34; + break; + case "HMAC_SHA512": + case 35: + message.algorithm = 35; + break; + case "HMAC_SHA224": + case 36: + message.algorithm = 36; + break; + case "EXTERNAL_SYMMETRIC_ENCRYPTION": + case 18: + message.algorithm = 18; + break; + } + return message; + }; + + /** + * Creates a plain object from a CryptoKeyVersionTemplate message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.kms.v1.CryptoKeyVersionTemplate + * @static + * @param {google.cloud.kms.v1.CryptoKeyVersionTemplate} message CryptoKeyVersionTemplate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CryptoKeyVersionTemplate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.protectionLevel = options.enums === String ? "PROTECTION_LEVEL_UNSPECIFIED" : 0; + object.algorithm = options.enums === String ? "CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED" : 0; + } + if (message.protectionLevel != null && message.hasOwnProperty("protectionLevel")) + object.protectionLevel = options.enums === String ? $root.google.cloud.kms.v1.ProtectionLevel[message.protectionLevel] === undefined ? message.protectionLevel : $root.google.cloud.kms.v1.ProtectionLevel[message.protectionLevel] : message.protectionLevel; + if (message.algorithm != null && message.hasOwnProperty("algorithm")) + object.algorithm = options.enums === String ? $root.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm[message.algorithm] === undefined ? message.algorithm : $root.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm[message.algorithm] : message.algorithm; + return object; + }; + + /** + * Converts this CryptoKeyVersionTemplate to JSON. + * @function toJSON + * @memberof google.cloud.kms.v1.CryptoKeyVersionTemplate + * @instance + * @returns {Object.} JSON object + */ + CryptoKeyVersionTemplate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CryptoKeyVersionTemplate + * @function getTypeUrl + * @memberof google.cloud.kms.v1.CryptoKeyVersionTemplate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CryptoKeyVersionTemplate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.kms.v1.CryptoKeyVersionTemplate"; + }; + + return CryptoKeyVersionTemplate; + })(); + + v1.KeyOperationAttestation = (function() { + + /** + * Properties of a KeyOperationAttestation. + * @memberof google.cloud.kms.v1 + * @interface IKeyOperationAttestation + * @property {google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat|null} [format] KeyOperationAttestation format + * @property {Uint8Array|null} [content] KeyOperationAttestation content + * @property {google.cloud.kms.v1.KeyOperationAttestation.ICertificateChains|null} [certChains] KeyOperationAttestation certChains + */ + + /** + * Constructs a new KeyOperationAttestation. + * @memberof google.cloud.kms.v1 + * @classdesc Represents a KeyOperationAttestation. + * @implements IKeyOperationAttestation + * @constructor + * @param {google.cloud.kms.v1.IKeyOperationAttestation=} [properties] Properties to set + */ + function KeyOperationAttestation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * KeyOperationAttestation format. + * @member {google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat} format + * @memberof google.cloud.kms.v1.KeyOperationAttestation + * @instance + */ + KeyOperationAttestation.prototype.format = 0; + + /** + * KeyOperationAttestation content. + * @member {Uint8Array} content + * @memberof google.cloud.kms.v1.KeyOperationAttestation + * @instance + */ + KeyOperationAttestation.prototype.content = $util.newBuffer([]); + + /** + * KeyOperationAttestation certChains. + * @member {google.cloud.kms.v1.KeyOperationAttestation.ICertificateChains|null|undefined} certChains + * @memberof google.cloud.kms.v1.KeyOperationAttestation + * @instance + */ + KeyOperationAttestation.prototype.certChains = null; + + /** + * Creates a new KeyOperationAttestation instance using the specified properties. + * @function create + * @memberof google.cloud.kms.v1.KeyOperationAttestation + * @static + * @param {google.cloud.kms.v1.IKeyOperationAttestation=} [properties] Properties to set + * @returns {google.cloud.kms.v1.KeyOperationAttestation} KeyOperationAttestation instance + */ + KeyOperationAttestation.create = function create(properties) { + return new KeyOperationAttestation(properties); + }; + + /** + * Encodes the specified KeyOperationAttestation message. Does not implicitly {@link google.cloud.kms.v1.KeyOperationAttestation.verify|verify} messages. + * @function encode + * @memberof google.cloud.kms.v1.KeyOperationAttestation + * @static + * @param {google.cloud.kms.v1.IKeyOperationAttestation} message KeyOperationAttestation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyOperationAttestation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.format); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.content); + if (message.certChains != null && Object.hasOwnProperty.call(message, "certChains")) + $root.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.encode(message.certChains, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified KeyOperationAttestation message, length delimited. Does not implicitly {@link google.cloud.kms.v1.KeyOperationAttestation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.kms.v1.KeyOperationAttestation + * @static + * @param {google.cloud.kms.v1.IKeyOperationAttestation} message KeyOperationAttestation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyOperationAttestation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KeyOperationAttestation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.kms.v1.KeyOperationAttestation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.kms.v1.KeyOperationAttestation} KeyOperationAttestation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyOperationAttestation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.KeyOperationAttestation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + message.format = reader.int32(); + break; + } + case 5: { + message.content = reader.bytes(); + break; + } + case 6: { + message.certChains = $root.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a KeyOperationAttestation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.kms.v1.KeyOperationAttestation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.kms.v1.KeyOperationAttestation} KeyOperationAttestation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyOperationAttestation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KeyOperationAttestation message. + * @function verify + * @memberof google.cloud.kms.v1.KeyOperationAttestation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KeyOperationAttestation.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 3: + case 4: + break; + } + if (message.content != null && message.hasOwnProperty("content")) + if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content))) + return "content: buffer expected"; + if (message.certChains != null && message.hasOwnProperty("certChains")) { + var error = $root.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.verify(message.certChains); + if (error) + return "certChains." + error; + } + return null; + }; + + /** + * Creates a KeyOperationAttestation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.kms.v1.KeyOperationAttestation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.kms.v1.KeyOperationAttestation} KeyOperationAttestation + */ + KeyOperationAttestation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.kms.v1.KeyOperationAttestation) + return object; + var message = new $root.google.cloud.kms.v1.KeyOperationAttestation(); + switch (object.format) { + default: + if (typeof object.format === "number") { + message.format = object.format; + break; + } + break; + case "ATTESTATION_FORMAT_UNSPECIFIED": + case 0: + message.format = 0; + break; + case "CAVIUM_V1_COMPRESSED": + case 3: + message.format = 3; + break; + case "CAVIUM_V2_COMPRESSED": + case 4: + message.format = 4; + break; + } + if (object.content != null) + if (typeof object.content === "string") + $util.base64.decode(object.content, message.content = $util.newBuffer($util.base64.length(object.content)), 0); + else if (object.content.length >= 0) + message.content = object.content; + if (object.certChains != null) { + if (typeof object.certChains !== "object") + throw TypeError(".google.cloud.kms.v1.KeyOperationAttestation.certChains: object expected"); + message.certChains = $root.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.fromObject(object.certChains); + } + return message; + }; + + /** + * Creates a plain object from a KeyOperationAttestation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.kms.v1.KeyOperationAttestation + * @static + * @param {google.cloud.kms.v1.KeyOperationAttestation} message KeyOperationAttestation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KeyOperationAttestation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.format = options.enums === String ? "ATTESTATION_FORMAT_UNSPECIFIED" : 0; + if (options.bytes === String) + object.content = ""; + else { + object.content = []; + if (options.bytes !== Array) + object.content = $util.newBuffer(object.content); + } + object.certChains = null; + } + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat[message.format] === undefined ? message.format : $root.google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat[message.format] : message.format; + if (message.content != null && message.hasOwnProperty("content")) + object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content; + if (message.certChains != null && message.hasOwnProperty("certChains")) + object.certChains = $root.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.toObject(message.certChains, options); + return object; + }; + + /** + * Converts this KeyOperationAttestation to JSON. + * @function toJSON + * @memberof google.cloud.kms.v1.KeyOperationAttestation + * @instance + * @returns {Object.} JSON object + */ + KeyOperationAttestation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for KeyOperationAttestation + * @function getTypeUrl + * @memberof google.cloud.kms.v1.KeyOperationAttestation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KeyOperationAttestation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.kms.v1.KeyOperationAttestation"; + }; + + /** + * AttestationFormat enum. + * @name google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat + * @enum {number} + * @property {number} ATTESTATION_FORMAT_UNSPECIFIED=0 ATTESTATION_FORMAT_UNSPECIFIED value + * @property {number} CAVIUM_V1_COMPRESSED=3 CAVIUM_V1_COMPRESSED value + * @property {number} CAVIUM_V2_COMPRESSED=4 CAVIUM_V2_COMPRESSED value + */ + KeyOperationAttestation.AttestationFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ATTESTATION_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[3] = "CAVIUM_V1_COMPRESSED"] = 3; + values[valuesById[4] = "CAVIUM_V2_COMPRESSED"] = 4; + return values; + })(); + + KeyOperationAttestation.CertificateChains = (function() { + + /** + * Properties of a CertificateChains. + * @memberof google.cloud.kms.v1.KeyOperationAttestation + * @interface ICertificateChains + * @property {Array.|null} [caviumCerts] CertificateChains caviumCerts + * @property {Array.|null} [googleCardCerts] CertificateChains googleCardCerts + * @property {Array.|null} [googlePartitionCerts] CertificateChains googlePartitionCerts + */ + + /** + * Constructs a new CertificateChains. + * @memberof google.cloud.kms.v1.KeyOperationAttestation + * @classdesc Represents a CertificateChains. + * @implements ICertificateChains + * @constructor + * @param {google.cloud.kms.v1.KeyOperationAttestation.ICertificateChains=} [properties] Properties to set + */ + function CertificateChains(properties) { + this.caviumCerts = []; + this.googleCardCerts = []; + this.googlePartitionCerts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CertificateChains caviumCerts. + * @member {Array.} caviumCerts + * @memberof google.cloud.kms.v1.KeyOperationAttestation.CertificateChains + * @instance + */ + CertificateChains.prototype.caviumCerts = $util.emptyArray; + + /** + * CertificateChains googleCardCerts. + * @member {Array.} googleCardCerts + * @memberof google.cloud.kms.v1.KeyOperationAttestation.CertificateChains + * @instance + */ + CertificateChains.prototype.googleCardCerts = $util.emptyArray; + + /** + * CertificateChains googlePartitionCerts. + * @member {Array.} googlePartitionCerts + * @memberof google.cloud.kms.v1.KeyOperationAttestation.CertificateChains + * @instance + */ + CertificateChains.prototype.googlePartitionCerts = $util.emptyArray; + + /** + * Creates a new CertificateChains instance using the specified properties. + * @function create + * @memberof google.cloud.kms.v1.KeyOperationAttestation.CertificateChains + * @static + * @param {google.cloud.kms.v1.KeyOperationAttestation.ICertificateChains=} [properties] Properties to set + * @returns {google.cloud.kms.v1.KeyOperationAttestation.CertificateChains} CertificateChains instance + */ + CertificateChains.create = function create(properties) { + return new CertificateChains(properties); + }; + + /** + * Encodes the specified CertificateChains message. Does not implicitly {@link google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.verify|verify} messages. + * @function encode + * @memberof google.cloud.kms.v1.KeyOperationAttestation.CertificateChains + * @static + * @param {google.cloud.kms.v1.KeyOperationAttestation.ICertificateChains} message CertificateChains message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateChains.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.caviumCerts != null && message.caviumCerts.length) + for (var i = 0; i < message.caviumCerts.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.caviumCerts[i]); + if (message.googleCardCerts != null && message.googleCardCerts.length) + for (var i = 0; i < message.googleCardCerts.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.googleCardCerts[i]); + if (message.googlePartitionCerts != null && message.googlePartitionCerts.length) + for (var i = 0; i < message.googlePartitionCerts.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.googlePartitionCerts[i]); + return writer; + }; + + /** + * Encodes the specified CertificateChains message, length delimited. Does not implicitly {@link google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.kms.v1.KeyOperationAttestation.CertificateChains + * @static + * @param {google.cloud.kms.v1.KeyOperationAttestation.ICertificateChains} message CertificateChains message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateChains.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CertificateChains message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.kms.v1.KeyOperationAttestation.CertificateChains + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.kms.v1.KeyOperationAttestation.CertificateChains} CertificateChains + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateChains.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.caviumCerts && message.caviumCerts.length)) + message.caviumCerts = []; + message.caviumCerts.push(reader.string()); + break; + } + case 2: { + if (!(message.googleCardCerts && message.googleCardCerts.length)) + message.googleCardCerts = []; + message.googleCardCerts.push(reader.string()); + break; + } + case 3: { + if (!(message.googlePartitionCerts && message.googlePartitionCerts.length)) + message.googlePartitionCerts = []; + message.googlePartitionCerts.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CertificateChains message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.kms.v1.KeyOperationAttestation.CertificateChains + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.kms.v1.KeyOperationAttestation.CertificateChains} CertificateChains + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateChains.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CertificateChains message. + * @function verify + * @memberof google.cloud.kms.v1.KeyOperationAttestation.CertificateChains + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CertificateChains.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.caviumCerts != null && message.hasOwnProperty("caviumCerts")) { + if (!Array.isArray(message.caviumCerts)) + return "caviumCerts: array expected"; + for (var i = 0; i < message.caviumCerts.length; ++i) + if (!$util.isString(message.caviumCerts[i])) + return "caviumCerts: string[] expected"; + } + if (message.googleCardCerts != null && message.hasOwnProperty("googleCardCerts")) { + if (!Array.isArray(message.googleCardCerts)) + return "googleCardCerts: array expected"; + for (var i = 0; i < message.googleCardCerts.length; ++i) + if (!$util.isString(message.googleCardCerts[i])) + return "googleCardCerts: string[] expected"; + } + if (message.googlePartitionCerts != null && message.hasOwnProperty("googlePartitionCerts")) { + if (!Array.isArray(message.googlePartitionCerts)) + return "googlePartitionCerts: array expected"; + for (var i = 0; i < message.googlePartitionCerts.length; ++i) + if (!$util.isString(message.googlePartitionCerts[i])) + return "googlePartitionCerts: string[] expected"; + } + return null; + }; + + /** + * Creates a CertificateChains message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.kms.v1.KeyOperationAttestation.CertificateChains + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.kms.v1.KeyOperationAttestation.CertificateChains} CertificateChains + */ + CertificateChains.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains) + return object; + var message = new $root.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains(); + if (object.caviumCerts) { + if (!Array.isArray(object.caviumCerts)) + throw TypeError(".google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.caviumCerts: array expected"); + message.caviumCerts = []; + for (var i = 0; i < object.caviumCerts.length; ++i) + message.caviumCerts[i] = String(object.caviumCerts[i]); + } + if (object.googleCardCerts) { + if (!Array.isArray(object.googleCardCerts)) + throw TypeError(".google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.googleCardCerts: array expected"); + message.googleCardCerts = []; + for (var i = 0; i < object.googleCardCerts.length; ++i) + message.googleCardCerts[i] = String(object.googleCardCerts[i]); + } + if (object.googlePartitionCerts) { + if (!Array.isArray(object.googlePartitionCerts)) + throw TypeError(".google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.googlePartitionCerts: array expected"); + message.googlePartitionCerts = []; + for (var i = 0; i < object.googlePartitionCerts.length; ++i) + message.googlePartitionCerts[i] = String(object.googlePartitionCerts[i]); + } + return message; + }; + + /** + * Creates a plain object from a CertificateChains message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.kms.v1.KeyOperationAttestation.CertificateChains + * @static + * @param {google.cloud.kms.v1.KeyOperationAttestation.CertificateChains} message CertificateChains + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CertificateChains.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.caviumCerts = []; + object.googleCardCerts = []; + object.googlePartitionCerts = []; + } + if (message.caviumCerts && message.caviumCerts.length) { + object.caviumCerts = []; + for (var j = 0; j < message.caviumCerts.length; ++j) + object.caviumCerts[j] = message.caviumCerts[j]; + } + if (message.googleCardCerts && message.googleCardCerts.length) { + object.googleCardCerts = []; + for (var j = 0; j < message.googleCardCerts.length; ++j) + object.googleCardCerts[j] = message.googleCardCerts[j]; + } + if (message.googlePartitionCerts && message.googlePartitionCerts.length) { + object.googlePartitionCerts = []; + for (var j = 0; j < message.googlePartitionCerts.length; ++j) + object.googlePartitionCerts[j] = message.googlePartitionCerts[j]; + } + return object; + }; + + /** + * Converts this CertificateChains to JSON. + * @function toJSON + * @memberof google.cloud.kms.v1.KeyOperationAttestation.CertificateChains + * @instance + * @returns {Object.} JSON object + */ + CertificateChains.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CertificateChains + * @function getTypeUrl + * @memberof google.cloud.kms.v1.KeyOperationAttestation.CertificateChains + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CertificateChains.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.kms.v1.KeyOperationAttestation.CertificateChains"; + }; + + return CertificateChains; + })(); + + return KeyOperationAttestation; + })(); + + v1.CryptoKeyVersion = (function() { + + /** + * Properties of a CryptoKeyVersion. + * @memberof google.cloud.kms.v1 + * @interface ICryptoKeyVersion + * @property {string|null} [name] CryptoKeyVersion name + * @property {google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState|null} [state] CryptoKeyVersion state + * @property {google.cloud.kms.v1.ProtectionLevel|null} [protectionLevel] CryptoKeyVersion protectionLevel + * @property {google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm|null} [algorithm] CryptoKeyVersion algorithm + * @property {google.cloud.kms.v1.IKeyOperationAttestation|null} [attestation] CryptoKeyVersion attestation + * @property {google.protobuf.ITimestamp|null} [createTime] CryptoKeyVersion createTime + * @property {google.protobuf.ITimestamp|null} [generateTime] CryptoKeyVersion generateTime + * @property {google.protobuf.ITimestamp|null} [destroyTime] CryptoKeyVersion destroyTime + * @property {google.protobuf.ITimestamp|null} [destroyEventTime] CryptoKeyVersion destroyEventTime + * @property {string|null} [importJob] CryptoKeyVersion importJob + * @property {google.protobuf.ITimestamp|null} [importTime] CryptoKeyVersion importTime + * @property {string|null} [importFailureReason] CryptoKeyVersion importFailureReason + * @property {google.cloud.kms.v1.IExternalProtectionLevelOptions|null} [externalProtectionLevelOptions] CryptoKeyVersion externalProtectionLevelOptions + * @property {boolean|null} [reimportEligible] CryptoKeyVersion reimportEligible + */ + + /** + * Constructs a new CryptoKeyVersion. + * @memberof google.cloud.kms.v1 + * @classdesc Represents a CryptoKeyVersion. + * @implements ICryptoKeyVersion + * @constructor + * @param {google.cloud.kms.v1.ICryptoKeyVersion=} [properties] Properties to set + */ + function CryptoKeyVersion(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CryptoKeyVersion name. + * @member {string} name + * @memberof google.cloud.kms.v1.CryptoKeyVersion + * @instance + */ + CryptoKeyVersion.prototype.name = ""; + + /** + * CryptoKeyVersion state. + * @member {google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState} state + * @memberof google.cloud.kms.v1.CryptoKeyVersion + * @instance + */ + CryptoKeyVersion.prototype.state = 0; + + /** + * CryptoKeyVersion protectionLevel. + * @member {google.cloud.kms.v1.ProtectionLevel} protectionLevel + * @memberof google.cloud.kms.v1.CryptoKeyVersion + * @instance + */ + CryptoKeyVersion.prototype.protectionLevel = 0; + + /** + * CryptoKeyVersion algorithm. + * @member {google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm} algorithm + * @memberof google.cloud.kms.v1.CryptoKeyVersion + * @instance + */ + CryptoKeyVersion.prototype.algorithm = 0; + + /** + * CryptoKeyVersion attestation. + * @member {google.cloud.kms.v1.IKeyOperationAttestation|null|undefined} attestation + * @memberof google.cloud.kms.v1.CryptoKeyVersion + * @instance + */ + CryptoKeyVersion.prototype.attestation = null; + + /** + * CryptoKeyVersion createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.kms.v1.CryptoKeyVersion + * @instance + */ + CryptoKeyVersion.prototype.createTime = null; + + /** + * CryptoKeyVersion generateTime. + * @member {google.protobuf.ITimestamp|null|undefined} generateTime + * @memberof google.cloud.kms.v1.CryptoKeyVersion + * @instance + */ + CryptoKeyVersion.prototype.generateTime = null; + + /** + * CryptoKeyVersion destroyTime. + * @member {google.protobuf.ITimestamp|null|undefined} destroyTime + * @memberof google.cloud.kms.v1.CryptoKeyVersion + * @instance + */ + CryptoKeyVersion.prototype.destroyTime = null; + + /** + * CryptoKeyVersion destroyEventTime. + * @member {google.protobuf.ITimestamp|null|undefined} destroyEventTime + * @memberof google.cloud.kms.v1.CryptoKeyVersion + * @instance + */ + CryptoKeyVersion.prototype.destroyEventTime = null; + + /** + * CryptoKeyVersion importJob. + * @member {string} importJob + * @memberof google.cloud.kms.v1.CryptoKeyVersion + * @instance + */ + CryptoKeyVersion.prototype.importJob = ""; + + /** + * CryptoKeyVersion importTime. + * @member {google.protobuf.ITimestamp|null|undefined} importTime + * @memberof google.cloud.kms.v1.CryptoKeyVersion + * @instance + */ + CryptoKeyVersion.prototype.importTime = null; + + /** + * CryptoKeyVersion importFailureReason. + * @member {string} importFailureReason + * @memberof google.cloud.kms.v1.CryptoKeyVersion + * @instance + */ + CryptoKeyVersion.prototype.importFailureReason = ""; + + /** + * CryptoKeyVersion externalProtectionLevelOptions. + * @member {google.cloud.kms.v1.IExternalProtectionLevelOptions|null|undefined} externalProtectionLevelOptions + * @memberof google.cloud.kms.v1.CryptoKeyVersion + * @instance + */ + CryptoKeyVersion.prototype.externalProtectionLevelOptions = null; + + /** + * CryptoKeyVersion reimportEligible. + * @member {boolean} reimportEligible + * @memberof google.cloud.kms.v1.CryptoKeyVersion + * @instance + */ + CryptoKeyVersion.prototype.reimportEligible = false; + + /** + * Creates a new CryptoKeyVersion instance using the specified properties. + * @function create + * @memberof google.cloud.kms.v1.CryptoKeyVersion + * @static + * @param {google.cloud.kms.v1.ICryptoKeyVersion=} [properties] Properties to set + * @returns {google.cloud.kms.v1.CryptoKeyVersion} CryptoKeyVersion instance + */ + CryptoKeyVersion.create = function create(properties) { + return new CryptoKeyVersion(properties); + }; + + /** + * Encodes the specified CryptoKeyVersion message. Does not implicitly {@link google.cloud.kms.v1.CryptoKeyVersion.verify|verify} messages. + * @function encode + * @memberof google.cloud.kms.v1.CryptoKeyVersion + * @static + * @param {google.cloud.kms.v1.ICryptoKeyVersion} message CryptoKeyVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CryptoKeyVersion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.destroyTime != null && Object.hasOwnProperty.call(message, "destroyTime")) + $root.google.protobuf.Timestamp.encode(message.destroyTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.destroyEventTime != null && Object.hasOwnProperty.call(message, "destroyEventTime")) + $root.google.protobuf.Timestamp.encode(message.destroyEventTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.protectionLevel != null && Object.hasOwnProperty.call(message, "protectionLevel")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.protectionLevel); + if (message.attestation != null && Object.hasOwnProperty.call(message, "attestation")) + $root.google.cloud.kms.v1.KeyOperationAttestation.encode(message.attestation, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.algorithm != null && Object.hasOwnProperty.call(message, "algorithm")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.algorithm); + if (message.generateTime != null && Object.hasOwnProperty.call(message, "generateTime")) + $root.google.protobuf.Timestamp.encode(message.generateTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.importJob != null && Object.hasOwnProperty.call(message, "importJob")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.importJob); + if (message.importTime != null && Object.hasOwnProperty.call(message, "importTime")) + $root.google.protobuf.Timestamp.encode(message.importTime, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.importFailureReason != null && Object.hasOwnProperty.call(message, "importFailureReason")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.importFailureReason); + if (message.externalProtectionLevelOptions != null && Object.hasOwnProperty.call(message, "externalProtectionLevelOptions")) + $root.google.cloud.kms.v1.ExternalProtectionLevelOptions.encode(message.externalProtectionLevelOptions, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.reimportEligible != null && Object.hasOwnProperty.call(message, "reimportEligible")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.reimportEligible); + return writer; + }; + + /** + * Encodes the specified CryptoKeyVersion message, length delimited. Does not implicitly {@link google.cloud.kms.v1.CryptoKeyVersion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.kms.v1.CryptoKeyVersion + * @static + * @param {google.cloud.kms.v1.ICryptoKeyVersion} message CryptoKeyVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CryptoKeyVersion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CryptoKeyVersion message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.kms.v1.CryptoKeyVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.kms.v1.CryptoKeyVersion} CryptoKeyVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CryptoKeyVersion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.CryptoKeyVersion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.state = reader.int32(); + break; + } + case 7: { + message.protectionLevel = reader.int32(); + break; + } + case 10: { + message.algorithm = reader.int32(); + break; + } + case 8: { + message.attestation = $root.google.cloud.kms.v1.KeyOperationAttestation.decode(reader, reader.uint32()); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + message.generateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.destroyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.destroyEventTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 14: { + message.importJob = reader.string(); + break; + } + case 15: { + message.importTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 16: { + message.importFailureReason = reader.string(); + break; + } + case 17: { + message.externalProtectionLevelOptions = $root.google.cloud.kms.v1.ExternalProtectionLevelOptions.decode(reader, reader.uint32()); + break; + } + case 18: { + message.reimportEligible = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CryptoKeyVersion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.kms.v1.CryptoKeyVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.kms.v1.CryptoKeyVersion} CryptoKeyVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CryptoKeyVersion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CryptoKeyVersion message. + * @function verify + * @memberof google.cloud.kms.v1.CryptoKeyVersion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CryptoKeyVersion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 5: + case 1: + case 2: + case 3: + case 4: + case 6: + case 7: + break; + } + if (message.protectionLevel != null && message.hasOwnProperty("protectionLevel")) + switch (message.protectionLevel) { + default: + return "protectionLevel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.algorithm != null && message.hasOwnProperty("algorithm")) + switch (message.algorithm) { + default: + return "algorithm: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 15: + case 5: + case 6: + case 7: + case 16: + case 28: + case 29: + case 30: + case 8: + case 9: + case 10: + case 17: + case 37: + case 38: + case 39: + case 12: + case 13: + case 31: + case 32: + case 33: + case 34: + case 35: + case 36: + case 18: + break; + } + if (message.attestation != null && message.hasOwnProperty("attestation")) { + var error = $root.google.cloud.kms.v1.KeyOperationAttestation.verify(message.attestation); + if (error) + return "attestation." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.generateTime != null && message.hasOwnProperty("generateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.generateTime); + if (error) + return "generateTime." + error; + } + if (message.destroyTime != null && message.hasOwnProperty("destroyTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.destroyTime); + if (error) + return "destroyTime." + error; + } + if (message.destroyEventTime != null && message.hasOwnProperty("destroyEventTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.destroyEventTime); + if (error) + return "destroyEventTime." + error; + } + if (message.importJob != null && message.hasOwnProperty("importJob")) + if (!$util.isString(message.importJob)) + return "importJob: string expected"; + if (message.importTime != null && message.hasOwnProperty("importTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.importTime); + if (error) + return "importTime." + error; + } + if (message.importFailureReason != null && message.hasOwnProperty("importFailureReason")) + if (!$util.isString(message.importFailureReason)) + return "importFailureReason: string expected"; + if (message.externalProtectionLevelOptions != null && message.hasOwnProperty("externalProtectionLevelOptions")) { + var error = $root.google.cloud.kms.v1.ExternalProtectionLevelOptions.verify(message.externalProtectionLevelOptions); + if (error) + return "externalProtectionLevelOptions." + error; + } + if (message.reimportEligible != null && message.hasOwnProperty("reimportEligible")) + if (typeof message.reimportEligible !== "boolean") + return "reimportEligible: boolean expected"; + return null; + }; + + /** + * Creates a CryptoKeyVersion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.kms.v1.CryptoKeyVersion + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.kms.v1.CryptoKeyVersion} CryptoKeyVersion + */ + CryptoKeyVersion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.kms.v1.CryptoKeyVersion) + return object; + var message = new $root.google.cloud.kms.v1.CryptoKeyVersion(); + if (object.name != null) + message.name = String(object.name); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "CRYPTO_KEY_VERSION_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PENDING_GENERATION": + case 5: + message.state = 5; + break; + case "ENABLED": + case 1: + message.state = 1; + break; + case "DISABLED": + case 2: + message.state = 2; + break; + case "DESTROYED": + case 3: + message.state = 3; + break; + case "DESTROY_SCHEDULED": + case 4: + message.state = 4; + break; + case "PENDING_IMPORT": + case 6: + message.state = 6; + break; + case "IMPORT_FAILED": + case 7: + message.state = 7; + break; + } + switch (object.protectionLevel) { + default: + if (typeof object.protectionLevel === "number") { + message.protectionLevel = object.protectionLevel; + break; + } + break; + case "PROTECTION_LEVEL_UNSPECIFIED": + case 0: + message.protectionLevel = 0; + break; + case "SOFTWARE": + case 1: + message.protectionLevel = 1; + break; + case "HSM": + case 2: + message.protectionLevel = 2; + break; + case "EXTERNAL": + case 3: + message.protectionLevel = 3; + break; + case "EXTERNAL_VPC": + case 4: + message.protectionLevel = 4; + break; + } + switch (object.algorithm) { + default: + if (typeof object.algorithm === "number") { + message.algorithm = object.algorithm; + break; + } + break; + case "CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED": + case 0: + message.algorithm = 0; + break; + case "GOOGLE_SYMMETRIC_ENCRYPTION": + case 1: + message.algorithm = 1; + break; + case "RSA_SIGN_PSS_2048_SHA256": + case 2: + message.algorithm = 2; + break; + case "RSA_SIGN_PSS_3072_SHA256": + case 3: + message.algorithm = 3; + break; + case "RSA_SIGN_PSS_4096_SHA256": + case 4: + message.algorithm = 4; + break; + case "RSA_SIGN_PSS_4096_SHA512": + case 15: + message.algorithm = 15; + break; + case "RSA_SIGN_PKCS1_2048_SHA256": + case 5: + message.algorithm = 5; + break; + case "RSA_SIGN_PKCS1_3072_SHA256": + case 6: + message.algorithm = 6; + break; + case "RSA_SIGN_PKCS1_4096_SHA256": + case 7: + message.algorithm = 7; + break; + case "RSA_SIGN_PKCS1_4096_SHA512": + case 16: + message.algorithm = 16; + break; + case "RSA_SIGN_RAW_PKCS1_2048": + case 28: + message.algorithm = 28; + break; + case "RSA_SIGN_RAW_PKCS1_3072": + case 29: + message.algorithm = 29; + break; + case "RSA_SIGN_RAW_PKCS1_4096": + case 30: + message.algorithm = 30; + break; + case "RSA_DECRYPT_OAEP_2048_SHA256": + case 8: + message.algorithm = 8; + break; + case "RSA_DECRYPT_OAEP_3072_SHA256": + case 9: + message.algorithm = 9; + break; + case "RSA_DECRYPT_OAEP_4096_SHA256": + case 10: + message.algorithm = 10; + break; + case "RSA_DECRYPT_OAEP_4096_SHA512": + case 17: + message.algorithm = 17; + break; + case "RSA_DECRYPT_OAEP_2048_SHA1": + case 37: + message.algorithm = 37; + break; + case "RSA_DECRYPT_OAEP_3072_SHA1": + case 38: + message.algorithm = 38; + break; + case "RSA_DECRYPT_OAEP_4096_SHA1": + case 39: + message.algorithm = 39; + break; + case "EC_SIGN_P256_SHA256": + case 12: + message.algorithm = 12; + break; + case "EC_SIGN_P384_SHA384": + case 13: + message.algorithm = 13; + break; + case "EC_SIGN_SECP256K1_SHA256": + case 31: + message.algorithm = 31; + break; + case "HMAC_SHA256": + case 32: + message.algorithm = 32; + break; + case "HMAC_SHA1": + case 33: + message.algorithm = 33; + break; + case "HMAC_SHA384": + case 34: + message.algorithm = 34; + break; + case "HMAC_SHA512": + case 35: + message.algorithm = 35; + break; + case "HMAC_SHA224": + case 36: + message.algorithm = 36; + break; + case "EXTERNAL_SYMMETRIC_ENCRYPTION": + case 18: + message.algorithm = 18; + break; + } + if (object.attestation != null) { + if (typeof object.attestation !== "object") + throw TypeError(".google.cloud.kms.v1.CryptoKeyVersion.attestation: object expected"); + message.attestation = $root.google.cloud.kms.v1.KeyOperationAttestation.fromObject(object.attestation); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.kms.v1.CryptoKeyVersion.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.generateTime != null) { + if (typeof object.generateTime !== "object") + throw TypeError(".google.cloud.kms.v1.CryptoKeyVersion.generateTime: object expected"); + message.generateTime = $root.google.protobuf.Timestamp.fromObject(object.generateTime); + } + if (object.destroyTime != null) { + if (typeof object.destroyTime !== "object") + throw TypeError(".google.cloud.kms.v1.CryptoKeyVersion.destroyTime: object expected"); + message.destroyTime = $root.google.protobuf.Timestamp.fromObject(object.destroyTime); + } + if (object.destroyEventTime != null) { + if (typeof object.destroyEventTime !== "object") + throw TypeError(".google.cloud.kms.v1.CryptoKeyVersion.destroyEventTime: object expected"); + message.destroyEventTime = $root.google.protobuf.Timestamp.fromObject(object.destroyEventTime); + } + if (object.importJob != null) + message.importJob = String(object.importJob); + if (object.importTime != null) { + if (typeof object.importTime !== "object") + throw TypeError(".google.cloud.kms.v1.CryptoKeyVersion.importTime: object expected"); + message.importTime = $root.google.protobuf.Timestamp.fromObject(object.importTime); + } + if (object.importFailureReason != null) + message.importFailureReason = String(object.importFailureReason); + if (object.externalProtectionLevelOptions != null) { + if (typeof object.externalProtectionLevelOptions !== "object") + throw TypeError(".google.cloud.kms.v1.CryptoKeyVersion.externalProtectionLevelOptions: object expected"); + message.externalProtectionLevelOptions = $root.google.cloud.kms.v1.ExternalProtectionLevelOptions.fromObject(object.externalProtectionLevelOptions); + } + if (object.reimportEligible != null) + message.reimportEligible = Boolean(object.reimportEligible); + return message; + }; + + /** + * Creates a plain object from a CryptoKeyVersion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.kms.v1.CryptoKeyVersion + * @static + * @param {google.cloud.kms.v1.CryptoKeyVersion} message CryptoKeyVersion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CryptoKeyVersion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.state = options.enums === String ? "CRYPTO_KEY_VERSION_STATE_UNSPECIFIED" : 0; + object.createTime = null; + object.destroyTime = null; + object.destroyEventTime = null; + object.protectionLevel = options.enums === String ? "PROTECTION_LEVEL_UNSPECIFIED" : 0; + object.attestation = null; + object.algorithm = options.enums === String ? "CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED" : 0; + object.generateTime = null; + object.importJob = ""; + object.importTime = null; + object.importFailureReason = ""; + object.externalProtectionLevelOptions = null; + object.reimportEligible = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState[message.state] === undefined ? message.state : $root.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState[message.state] : message.state; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.destroyTime != null && message.hasOwnProperty("destroyTime")) + object.destroyTime = $root.google.protobuf.Timestamp.toObject(message.destroyTime, options); + if (message.destroyEventTime != null && message.hasOwnProperty("destroyEventTime")) + object.destroyEventTime = $root.google.protobuf.Timestamp.toObject(message.destroyEventTime, options); + if (message.protectionLevel != null && message.hasOwnProperty("protectionLevel")) + object.protectionLevel = options.enums === String ? $root.google.cloud.kms.v1.ProtectionLevel[message.protectionLevel] === undefined ? message.protectionLevel : $root.google.cloud.kms.v1.ProtectionLevel[message.protectionLevel] : message.protectionLevel; + if (message.attestation != null && message.hasOwnProperty("attestation")) + object.attestation = $root.google.cloud.kms.v1.KeyOperationAttestation.toObject(message.attestation, options); + if (message.algorithm != null && message.hasOwnProperty("algorithm")) + object.algorithm = options.enums === String ? $root.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm[message.algorithm] === undefined ? message.algorithm : $root.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm[message.algorithm] : message.algorithm; + if (message.generateTime != null && message.hasOwnProperty("generateTime")) + object.generateTime = $root.google.protobuf.Timestamp.toObject(message.generateTime, options); + if (message.importJob != null && message.hasOwnProperty("importJob")) + object.importJob = message.importJob; + if (message.importTime != null && message.hasOwnProperty("importTime")) + object.importTime = $root.google.protobuf.Timestamp.toObject(message.importTime, options); + if (message.importFailureReason != null && message.hasOwnProperty("importFailureReason")) + object.importFailureReason = message.importFailureReason; + if (message.externalProtectionLevelOptions != null && message.hasOwnProperty("externalProtectionLevelOptions")) + object.externalProtectionLevelOptions = $root.google.cloud.kms.v1.ExternalProtectionLevelOptions.toObject(message.externalProtectionLevelOptions, options); + if (message.reimportEligible != null && message.hasOwnProperty("reimportEligible")) + object.reimportEligible = message.reimportEligible; + return object; + }; + + /** + * Converts this CryptoKeyVersion to JSON. + * @function toJSON + * @memberof google.cloud.kms.v1.CryptoKeyVersion + * @instance + * @returns {Object.} JSON object + */ + CryptoKeyVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CryptoKeyVersion + * @function getTypeUrl + * @memberof google.cloud.kms.v1.CryptoKeyVersion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CryptoKeyVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.kms.v1.CryptoKeyVersion"; + }; + + /** + * CryptoKeyVersionAlgorithm enum. + * @name google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm + * @enum {number} + * @property {number} CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED=0 CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED value + * @property {number} GOOGLE_SYMMETRIC_ENCRYPTION=1 GOOGLE_SYMMETRIC_ENCRYPTION value + * @property {number} RSA_SIGN_PSS_2048_SHA256=2 RSA_SIGN_PSS_2048_SHA256 value + * @property {number} RSA_SIGN_PSS_3072_SHA256=3 RSA_SIGN_PSS_3072_SHA256 value + * @property {number} RSA_SIGN_PSS_4096_SHA256=4 RSA_SIGN_PSS_4096_SHA256 value + * @property {number} RSA_SIGN_PSS_4096_SHA512=15 RSA_SIGN_PSS_4096_SHA512 value + * @property {number} RSA_SIGN_PKCS1_2048_SHA256=5 RSA_SIGN_PKCS1_2048_SHA256 value + * @property {number} RSA_SIGN_PKCS1_3072_SHA256=6 RSA_SIGN_PKCS1_3072_SHA256 value + * @property {number} RSA_SIGN_PKCS1_4096_SHA256=7 RSA_SIGN_PKCS1_4096_SHA256 value + * @property {number} RSA_SIGN_PKCS1_4096_SHA512=16 RSA_SIGN_PKCS1_4096_SHA512 value + * @property {number} RSA_SIGN_RAW_PKCS1_2048=28 RSA_SIGN_RAW_PKCS1_2048 value + * @property {number} RSA_SIGN_RAW_PKCS1_3072=29 RSA_SIGN_RAW_PKCS1_3072 value + * @property {number} RSA_SIGN_RAW_PKCS1_4096=30 RSA_SIGN_RAW_PKCS1_4096 value + * @property {number} RSA_DECRYPT_OAEP_2048_SHA256=8 RSA_DECRYPT_OAEP_2048_SHA256 value + * @property {number} RSA_DECRYPT_OAEP_3072_SHA256=9 RSA_DECRYPT_OAEP_3072_SHA256 value + * @property {number} RSA_DECRYPT_OAEP_4096_SHA256=10 RSA_DECRYPT_OAEP_4096_SHA256 value + * @property {number} RSA_DECRYPT_OAEP_4096_SHA512=17 RSA_DECRYPT_OAEP_4096_SHA512 value + * @property {number} RSA_DECRYPT_OAEP_2048_SHA1=37 RSA_DECRYPT_OAEP_2048_SHA1 value + * @property {number} RSA_DECRYPT_OAEP_3072_SHA1=38 RSA_DECRYPT_OAEP_3072_SHA1 value + * @property {number} RSA_DECRYPT_OAEP_4096_SHA1=39 RSA_DECRYPT_OAEP_4096_SHA1 value + * @property {number} EC_SIGN_P256_SHA256=12 EC_SIGN_P256_SHA256 value + * @property {number} EC_SIGN_P384_SHA384=13 EC_SIGN_P384_SHA384 value + * @property {number} EC_SIGN_SECP256K1_SHA256=31 EC_SIGN_SECP256K1_SHA256 value + * @property {number} HMAC_SHA256=32 HMAC_SHA256 value + * @property {number} HMAC_SHA1=33 HMAC_SHA1 value + * @property {number} HMAC_SHA384=34 HMAC_SHA384 value + * @property {number} HMAC_SHA512=35 HMAC_SHA512 value + * @property {number} HMAC_SHA224=36 HMAC_SHA224 value + * @property {number} EXTERNAL_SYMMETRIC_ENCRYPTION=18 EXTERNAL_SYMMETRIC_ENCRYPTION value + */ + CryptoKeyVersion.CryptoKeyVersionAlgorithm = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED"] = 0; + values[valuesById[1] = "GOOGLE_SYMMETRIC_ENCRYPTION"] = 1; + values[valuesById[2] = "RSA_SIGN_PSS_2048_SHA256"] = 2; + values[valuesById[3] = "RSA_SIGN_PSS_3072_SHA256"] = 3; + values[valuesById[4] = "RSA_SIGN_PSS_4096_SHA256"] = 4; + values[valuesById[15] = "RSA_SIGN_PSS_4096_SHA512"] = 15; + values[valuesById[5] = "RSA_SIGN_PKCS1_2048_SHA256"] = 5; + values[valuesById[6] = "RSA_SIGN_PKCS1_3072_SHA256"] = 6; + values[valuesById[7] = "RSA_SIGN_PKCS1_4096_SHA256"] = 7; + values[valuesById[16] = "RSA_SIGN_PKCS1_4096_SHA512"] = 16; + values[valuesById[28] = "RSA_SIGN_RAW_PKCS1_2048"] = 28; + values[valuesById[29] = "RSA_SIGN_RAW_PKCS1_3072"] = 29; + values[valuesById[30] = "RSA_SIGN_RAW_PKCS1_4096"] = 30; + values[valuesById[8] = "RSA_DECRYPT_OAEP_2048_SHA256"] = 8; + values[valuesById[9] = "RSA_DECRYPT_OAEP_3072_SHA256"] = 9; + values[valuesById[10] = "RSA_DECRYPT_OAEP_4096_SHA256"] = 10; + values[valuesById[17] = "RSA_DECRYPT_OAEP_4096_SHA512"] = 17; + values[valuesById[37] = "RSA_DECRYPT_OAEP_2048_SHA1"] = 37; + values[valuesById[38] = "RSA_DECRYPT_OAEP_3072_SHA1"] = 38; + values[valuesById[39] = "RSA_DECRYPT_OAEP_4096_SHA1"] = 39; + values[valuesById[12] = "EC_SIGN_P256_SHA256"] = 12; + values[valuesById[13] = "EC_SIGN_P384_SHA384"] = 13; + values[valuesById[31] = "EC_SIGN_SECP256K1_SHA256"] = 31; + values[valuesById[32] = "HMAC_SHA256"] = 32; + values[valuesById[33] = "HMAC_SHA1"] = 33; + values[valuesById[34] = "HMAC_SHA384"] = 34; + values[valuesById[35] = "HMAC_SHA512"] = 35; + values[valuesById[36] = "HMAC_SHA224"] = 36; + values[valuesById[18] = "EXTERNAL_SYMMETRIC_ENCRYPTION"] = 18; + return values; + })(); + + /** + * CryptoKeyVersionState enum. + * @name google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState + * @enum {number} + * @property {number} CRYPTO_KEY_VERSION_STATE_UNSPECIFIED=0 CRYPTO_KEY_VERSION_STATE_UNSPECIFIED value + * @property {number} PENDING_GENERATION=5 PENDING_GENERATION value + * @property {number} ENABLED=1 ENABLED value + * @property {number} DISABLED=2 DISABLED value + * @property {number} DESTROYED=3 DESTROYED value + * @property {number} DESTROY_SCHEDULED=4 DESTROY_SCHEDULED value + * @property {number} PENDING_IMPORT=6 PENDING_IMPORT value + * @property {number} IMPORT_FAILED=7 IMPORT_FAILED value + */ + CryptoKeyVersion.CryptoKeyVersionState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CRYPTO_KEY_VERSION_STATE_UNSPECIFIED"] = 0; + values[valuesById[5] = "PENDING_GENERATION"] = 5; + values[valuesById[1] = "ENABLED"] = 1; + values[valuesById[2] = "DISABLED"] = 2; + values[valuesById[3] = "DESTROYED"] = 3; + values[valuesById[4] = "DESTROY_SCHEDULED"] = 4; + values[valuesById[6] = "PENDING_IMPORT"] = 6; + values[valuesById[7] = "IMPORT_FAILED"] = 7; + return values; + })(); + + /** + * CryptoKeyVersionView enum. + * @name google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView + * @enum {number} + * @property {number} CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED=0 CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED value + * @property {number} FULL=1 FULL value + */ + CryptoKeyVersion.CryptoKeyVersionView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "FULL"] = 1; + return values; + })(); + + return CryptoKeyVersion; + })(); + + v1.PublicKey = (function() { + + /** + * Properties of a PublicKey. + * @memberof google.cloud.kms.v1 + * @interface IPublicKey + * @property {string|null} [pem] PublicKey pem + * @property {google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm|null} [algorithm] PublicKey algorithm + * @property {google.protobuf.IInt64Value|null} [pemCrc32c] PublicKey pemCrc32c + * @property {string|null} [name] PublicKey name + * @property {google.cloud.kms.v1.ProtectionLevel|null} [protectionLevel] PublicKey protectionLevel + */ + + /** + * Constructs a new PublicKey. + * @memberof google.cloud.kms.v1 + * @classdesc Represents a PublicKey. + * @implements IPublicKey + * @constructor + * @param {google.cloud.kms.v1.IPublicKey=} [properties] Properties to set + */ + function PublicKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PublicKey pem. + * @member {string} pem + * @memberof google.cloud.kms.v1.PublicKey + * @instance + */ + PublicKey.prototype.pem = ""; + + /** + * PublicKey algorithm. + * @member {google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm} algorithm + * @memberof google.cloud.kms.v1.PublicKey + * @instance + */ + PublicKey.prototype.algorithm = 0; + + /** + * PublicKey pemCrc32c. + * @member {google.protobuf.IInt64Value|null|undefined} pemCrc32c + * @memberof google.cloud.kms.v1.PublicKey + * @instance + */ + PublicKey.prototype.pemCrc32c = null; + + /** + * PublicKey name. + * @member {string} name + * @memberof google.cloud.kms.v1.PublicKey + * @instance + */ + PublicKey.prototype.name = ""; + + /** + * PublicKey protectionLevel. + * @member {google.cloud.kms.v1.ProtectionLevel} protectionLevel + * @memberof google.cloud.kms.v1.PublicKey + * @instance + */ + PublicKey.prototype.protectionLevel = 0; + + /** + * Creates a new PublicKey instance using the specified properties. + * @function create + * @memberof google.cloud.kms.v1.PublicKey + * @static + * @param {google.cloud.kms.v1.IPublicKey=} [properties] Properties to set + * @returns {google.cloud.kms.v1.PublicKey} PublicKey instance + */ + PublicKey.create = function create(properties) { + return new PublicKey(properties); + }; + + /** + * Encodes the specified PublicKey message. Does not implicitly {@link google.cloud.kms.v1.PublicKey.verify|verify} messages. + * @function encode + * @memberof google.cloud.kms.v1.PublicKey + * @static + * @param {google.cloud.kms.v1.IPublicKey} message PublicKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublicKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pem != null && Object.hasOwnProperty.call(message, "pem")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pem); + if (message.algorithm != null && Object.hasOwnProperty.call(message, "algorithm")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.algorithm); + if (message.pemCrc32c != null && Object.hasOwnProperty.call(message, "pemCrc32c")) + $root.google.protobuf.Int64Value.encode(message.pemCrc32c, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + if (message.protectionLevel != null && Object.hasOwnProperty.call(message, "protectionLevel")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.protectionLevel); + return writer; + }; + + /** + * Encodes the specified PublicKey message, length delimited. Does not implicitly {@link google.cloud.kms.v1.PublicKey.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.kms.v1.PublicKey + * @static + * @param {google.cloud.kms.v1.IPublicKey} message PublicKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublicKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PublicKey message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.kms.v1.PublicKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.kms.v1.PublicKey} PublicKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublicKey.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.PublicKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.pem = reader.string(); + break; + } + case 2: { + message.algorithm = reader.int32(); + break; + } + case 3: { + message.pemCrc32c = $root.google.protobuf.Int64Value.decode(reader, reader.uint32()); + break; + } + case 4: { + message.name = reader.string(); + break; + } + case 5: { + message.protectionLevel = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PublicKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.kms.v1.PublicKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.kms.v1.PublicKey} PublicKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublicKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PublicKey message. + * @function verify + * @memberof google.cloud.kms.v1.PublicKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublicKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pem != null && message.hasOwnProperty("pem")) + if (!$util.isString(message.pem)) + return "pem: string expected"; + if (message.algorithm != null && message.hasOwnProperty("algorithm")) + switch (message.algorithm) { + default: + return "algorithm: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 15: + case 5: + case 6: + case 7: + case 16: + case 28: + case 29: + case 30: + case 8: + case 9: + case 10: + case 17: + case 37: + case 38: + case 39: + case 12: + case 13: + case 31: + case 32: + case 33: + case 34: + case 35: + case 36: + case 18: + break; + } + if (message.pemCrc32c != null && message.hasOwnProperty("pemCrc32c")) { + var error = $root.google.protobuf.Int64Value.verify(message.pemCrc32c); + if (error) + return "pemCrc32c." + error; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.protectionLevel != null && message.hasOwnProperty("protectionLevel")) + switch (message.protectionLevel) { + default: + return "protectionLevel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a PublicKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.kms.v1.PublicKey + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.kms.v1.PublicKey} PublicKey + */ + PublicKey.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.kms.v1.PublicKey) + return object; + var message = new $root.google.cloud.kms.v1.PublicKey(); + if (object.pem != null) + message.pem = String(object.pem); + switch (object.algorithm) { + default: + if (typeof object.algorithm === "number") { + message.algorithm = object.algorithm; + break; + } + break; + case "CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED": + case 0: + message.algorithm = 0; + break; + case "GOOGLE_SYMMETRIC_ENCRYPTION": + case 1: + message.algorithm = 1; + break; + case "RSA_SIGN_PSS_2048_SHA256": + case 2: + message.algorithm = 2; + break; + case "RSA_SIGN_PSS_3072_SHA256": + case 3: + message.algorithm = 3; + break; + case "RSA_SIGN_PSS_4096_SHA256": + case 4: + message.algorithm = 4; + break; + case "RSA_SIGN_PSS_4096_SHA512": + case 15: + message.algorithm = 15; + break; + case "RSA_SIGN_PKCS1_2048_SHA256": + case 5: + message.algorithm = 5; + break; + case "RSA_SIGN_PKCS1_3072_SHA256": + case 6: + message.algorithm = 6; + break; + case "RSA_SIGN_PKCS1_4096_SHA256": + case 7: + message.algorithm = 7; + break; + case "RSA_SIGN_PKCS1_4096_SHA512": + case 16: + message.algorithm = 16; + break; + case "RSA_SIGN_RAW_PKCS1_2048": + case 28: + message.algorithm = 28; + break; + case "RSA_SIGN_RAW_PKCS1_3072": + case 29: + message.algorithm = 29; + break; + case "RSA_SIGN_RAW_PKCS1_4096": + case 30: + message.algorithm = 30; + break; + case "RSA_DECRYPT_OAEP_2048_SHA256": + case 8: + message.algorithm = 8; + break; + case "RSA_DECRYPT_OAEP_3072_SHA256": + case 9: + message.algorithm = 9; + break; + case "RSA_DECRYPT_OAEP_4096_SHA256": + case 10: + message.algorithm = 10; + break; + case "RSA_DECRYPT_OAEP_4096_SHA512": + case 17: + message.algorithm = 17; + break; + case "RSA_DECRYPT_OAEP_2048_SHA1": + case 37: + message.algorithm = 37; + break; + case "RSA_DECRYPT_OAEP_3072_SHA1": + case 38: + message.algorithm = 38; + break; + case "RSA_DECRYPT_OAEP_4096_SHA1": + case 39: + message.algorithm = 39; + break; + case "EC_SIGN_P256_SHA256": + case 12: + message.algorithm = 12; + break; + case "EC_SIGN_P384_SHA384": + case 13: + message.algorithm = 13; + break; + case "EC_SIGN_SECP256K1_SHA256": + case 31: + message.algorithm = 31; + break; + case "HMAC_SHA256": + case 32: + message.algorithm = 32; + break; + case "HMAC_SHA1": + case 33: + message.algorithm = 33; + break; + case "HMAC_SHA384": + case 34: + message.algorithm = 34; + break; + case "HMAC_SHA512": + case 35: + message.algorithm = 35; + break; + case "HMAC_SHA224": + case 36: + message.algorithm = 36; + break; + case "EXTERNAL_SYMMETRIC_ENCRYPTION": + case 18: + message.algorithm = 18; + break; + } + if (object.pemCrc32c != null) { + if (typeof object.pemCrc32c !== "object") + throw TypeError(".google.cloud.kms.v1.PublicKey.pemCrc32c: object expected"); + message.pemCrc32c = $root.google.protobuf.Int64Value.fromObject(object.pemCrc32c); + } + if (object.name != null) + message.name = String(object.name); + switch (object.protectionLevel) { + default: + if (typeof object.protectionLevel === "number") { + message.protectionLevel = object.protectionLevel; + break; + } + break; + case "PROTECTION_LEVEL_UNSPECIFIED": + case 0: + message.protectionLevel = 0; + break; + case "SOFTWARE": + case 1: + message.protectionLevel = 1; + break; + case "HSM": + case 2: + message.protectionLevel = 2; + break; + case "EXTERNAL": + case 3: + message.protectionLevel = 3; + break; + case "EXTERNAL_VPC": + case 4: + message.protectionLevel = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a PublicKey message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.kms.v1.PublicKey + * @static + * @param {google.cloud.kms.v1.PublicKey} message PublicKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublicKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pem = ""; + object.algorithm = options.enums === String ? "CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED" : 0; + object.pemCrc32c = null; + object.name = ""; + object.protectionLevel = options.enums === String ? "PROTECTION_LEVEL_UNSPECIFIED" : 0; + } + if (message.pem != null && message.hasOwnProperty("pem")) + object.pem = message.pem; + if (message.algorithm != null && message.hasOwnProperty("algorithm")) + object.algorithm = options.enums === String ? $root.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm[message.algorithm] === undefined ? message.algorithm : $root.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm[message.algorithm] : message.algorithm; + if (message.pemCrc32c != null && message.hasOwnProperty("pemCrc32c")) + object.pemCrc32c = $root.google.protobuf.Int64Value.toObject(message.pemCrc32c, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.protectionLevel != null && message.hasOwnProperty("protectionLevel")) + object.protectionLevel = options.enums === String ? $root.google.cloud.kms.v1.ProtectionLevel[message.protectionLevel] === undefined ? message.protectionLevel : $root.google.cloud.kms.v1.ProtectionLevel[message.protectionLevel] : message.protectionLevel; + return object; + }; + + /** + * Converts this PublicKey to JSON. + * @function toJSON + * @memberof google.cloud.kms.v1.PublicKey + * @instance + * @returns {Object.} JSON object + */ + PublicKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PublicKey + * @function getTypeUrl + * @memberof google.cloud.kms.v1.PublicKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PublicKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.kms.v1.PublicKey"; + }; + + return PublicKey; + })(); + + v1.ImportJob = (function() { + + /** + * Properties of an ImportJob. + * @memberof google.cloud.kms.v1 + * @interface IImportJob + * @property {string|null} [name] ImportJob name + * @property {google.cloud.kms.v1.ImportJob.ImportMethod|null} [importMethod] ImportJob importMethod + * @property {google.cloud.kms.v1.ProtectionLevel|null} [protectionLevel] ImportJob protectionLevel + * @property {google.protobuf.ITimestamp|null} [createTime] ImportJob createTime + * @property {google.protobuf.ITimestamp|null} [generateTime] ImportJob generateTime + * @property {google.protobuf.ITimestamp|null} [expireTime] ImportJob expireTime + * @property {google.protobuf.ITimestamp|null} [expireEventTime] ImportJob expireEventTime + * @property {google.cloud.kms.v1.ImportJob.ImportJobState|null} [state] ImportJob state + * @property {google.cloud.kms.v1.ImportJob.IWrappingPublicKey|null} [publicKey] ImportJob publicKey + * @property {google.cloud.kms.v1.IKeyOperationAttestation|null} [attestation] ImportJob attestation + */ + + /** + * Constructs a new ImportJob. + * @memberof google.cloud.kms.v1 + * @classdesc Represents an ImportJob. + * @implements IImportJob + * @constructor + * @param {google.cloud.kms.v1.IImportJob=} [properties] Properties to set + */ + function ImportJob(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImportJob name. + * @member {string} name + * @memberof google.cloud.kms.v1.ImportJob + * @instance + */ + ImportJob.prototype.name = ""; + + /** + * ImportJob importMethod. + * @member {google.cloud.kms.v1.ImportJob.ImportMethod} importMethod + * @memberof google.cloud.kms.v1.ImportJob + * @instance + */ + ImportJob.prototype.importMethod = 0; + + /** + * ImportJob protectionLevel. + * @member {google.cloud.kms.v1.ProtectionLevel} protectionLevel + * @memberof google.cloud.kms.v1.ImportJob + * @instance + */ + ImportJob.prototype.protectionLevel = 0; + + /** + * ImportJob createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.kms.v1.ImportJob + * @instance + */ + ImportJob.prototype.createTime = null; + + /** + * ImportJob generateTime. + * @member {google.protobuf.ITimestamp|null|undefined} generateTime + * @memberof google.cloud.kms.v1.ImportJob + * @instance + */ + ImportJob.prototype.generateTime = null; + + /** + * ImportJob expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.cloud.kms.v1.ImportJob + * @instance + */ + ImportJob.prototype.expireTime = null; + + /** + * ImportJob expireEventTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireEventTime + * @memberof google.cloud.kms.v1.ImportJob + * @instance + */ + ImportJob.prototype.expireEventTime = null; + + /** + * ImportJob state. + * @member {google.cloud.kms.v1.ImportJob.ImportJobState} state + * @memberof google.cloud.kms.v1.ImportJob + * @instance + */ + ImportJob.prototype.state = 0; + + /** + * ImportJob publicKey. + * @member {google.cloud.kms.v1.ImportJob.IWrappingPublicKey|null|undefined} publicKey + * @memberof google.cloud.kms.v1.ImportJob + * @instance + */ + ImportJob.prototype.publicKey = null; + + /** + * ImportJob attestation. + * @member {google.cloud.kms.v1.IKeyOperationAttestation|null|undefined} attestation + * @memberof google.cloud.kms.v1.ImportJob + * @instance + */ + ImportJob.prototype.attestation = null; + + /** + * Creates a new ImportJob instance using the specified properties. + * @function create + * @memberof google.cloud.kms.v1.ImportJob + * @static + * @param {google.cloud.kms.v1.IImportJob=} [properties] Properties to set + * @returns {google.cloud.kms.v1.ImportJob} ImportJob instance + */ + ImportJob.create = function create(properties) { + return new ImportJob(properties); + }; + + /** + * Encodes the specified ImportJob message. Does not implicitly {@link google.cloud.kms.v1.ImportJob.verify|verify} messages. + * @function encode + * @memberof google.cloud.kms.v1.ImportJob + * @static + * @param {google.cloud.kms.v1.IImportJob} message ImportJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportJob.encode = function encode(message, writer) { + 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.importMethod != null && Object.hasOwnProperty.call(message, "importMethod")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.importMethod); + 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.generateTime != null && Object.hasOwnProperty.call(message, "generateTime")) + $root.google.protobuf.Timestamp.encode(message.generateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) + $root.google.cloud.kms.v1.ImportJob.WrappingPublicKey.encode(message.publicKey, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.attestation != null && Object.hasOwnProperty.call(message, "attestation")) + $root.google.cloud.kms.v1.KeyOperationAttestation.encode(message.attestation, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.protectionLevel != null && Object.hasOwnProperty.call(message, "protectionLevel")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.protectionLevel); + if (message.expireEventTime != null && Object.hasOwnProperty.call(message, "expireEventTime")) + $root.google.protobuf.Timestamp.encode(message.expireEventTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ImportJob message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ImportJob.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.kms.v1.ImportJob + * @static + * @param {google.cloud.kms.v1.IImportJob} message ImportJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportJob.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportJob message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.kms.v1.ImportJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.kms.v1.ImportJob} ImportJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportJob.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.ImportJob(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.importMethod = reader.int32(); + break; + } + case 9: { + message.protectionLevel = reader.int32(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.generateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 10: { + message.expireEventTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.state = reader.int32(); + break; + } + case 7: { + message.publicKey = $root.google.cloud.kms.v1.ImportJob.WrappingPublicKey.decode(reader, reader.uint32()); + break; + } + case 8: { + message.attestation = $root.google.cloud.kms.v1.KeyOperationAttestation.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportJob message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.kms.v1.ImportJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.kms.v1.ImportJob} ImportJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportJob.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportJob message. + * @function verify + * @memberof google.cloud.kms.v1.ImportJob + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportJob.verify = function verify(message) { + if (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.importMethod != null && message.hasOwnProperty("importMethod")) + switch (message.importMethod) { + default: + return "importMethod: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.protectionLevel != null && message.hasOwnProperty("protectionLevel")) + switch (message.protectionLevel) { + default: + return "protectionLevel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.generateTime != null && message.hasOwnProperty("generateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.generateTime); + if (error) + return "generateTime." + error; + } + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; + } + if (message.expireEventTime != null && message.hasOwnProperty("expireEventTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expireEventTime); + if (error) + return "expireEventTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + var error = $root.google.cloud.kms.v1.ImportJob.WrappingPublicKey.verify(message.publicKey); + if (error) + return "publicKey." + error; + } + if (message.attestation != null && message.hasOwnProperty("attestation")) { + var error = $root.google.cloud.kms.v1.KeyOperationAttestation.verify(message.attestation); + if (error) + return "attestation." + error; + } + return null; + }; + + /** + * Creates an ImportJob message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.kms.v1.ImportJob + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.kms.v1.ImportJob} ImportJob + */ + ImportJob.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.kms.v1.ImportJob) + return object; + var message = new $root.google.cloud.kms.v1.ImportJob(); + if (object.name != null) + message.name = String(object.name); + switch (object.importMethod) { + default: + if (typeof object.importMethod === "number") { + message.importMethod = object.importMethod; + break; + } + break; + case "IMPORT_METHOD_UNSPECIFIED": + case 0: + message.importMethod = 0; + break; + case "RSA_OAEP_3072_SHA1_AES_256": + case 1: + message.importMethod = 1; + break; + case "RSA_OAEP_4096_SHA1_AES_256": + case 2: + message.importMethod = 2; + break; + case "RSA_OAEP_3072_SHA256_AES_256": + case 3: + message.importMethod = 3; + break; + case "RSA_OAEP_4096_SHA256_AES_256": + case 4: + message.importMethod = 4; + break; + case "RSA_OAEP_3072_SHA256": + case 5: + message.importMethod = 5; + break; + case "RSA_OAEP_4096_SHA256": + case 6: + message.importMethod = 6; + break; + } + switch (object.protectionLevel) { + default: + if (typeof object.protectionLevel === "number") { + message.protectionLevel = object.protectionLevel; + break; + } + break; + case "PROTECTION_LEVEL_UNSPECIFIED": + case 0: + message.protectionLevel = 0; + break; + case "SOFTWARE": + case 1: + message.protectionLevel = 1; + break; + case "HSM": + case 2: + message.protectionLevel = 2; + break; + case "EXTERNAL": + case 3: + message.protectionLevel = 3; + break; + case "EXTERNAL_VPC": + case 4: + message.protectionLevel = 4; + break; + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.kms.v1.ImportJob.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.generateTime != null) { + if (typeof object.generateTime !== "object") + throw TypeError(".google.cloud.kms.v1.ImportJob.generateTime: object expected"); + message.generateTime = $root.google.protobuf.Timestamp.fromObject(object.generateTime); + } + if (object.expireTime != null) { + if (typeof object.expireTime !== "object") + throw TypeError(".google.cloud.kms.v1.ImportJob.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + } + if (object.expireEventTime != null) { + if (typeof object.expireEventTime !== "object") + throw TypeError(".google.cloud.kms.v1.ImportJob.expireEventTime: object expected"); + message.expireEventTime = $root.google.protobuf.Timestamp.fromObject(object.expireEventTime); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "IMPORT_JOB_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PENDING_GENERATION": + case 1: + message.state = 1; + break; + case "ACTIVE": + case 2: + message.state = 2; + break; + case "EXPIRED": + case 3: + message.state = 3; + break; + } + if (object.publicKey != null) { + if (typeof object.publicKey !== "object") + throw TypeError(".google.cloud.kms.v1.ImportJob.publicKey: object expected"); + message.publicKey = $root.google.cloud.kms.v1.ImportJob.WrappingPublicKey.fromObject(object.publicKey); + } + if (object.attestation != null) { + if (typeof object.attestation !== "object") + throw TypeError(".google.cloud.kms.v1.ImportJob.attestation: object expected"); + message.attestation = $root.google.cloud.kms.v1.KeyOperationAttestation.fromObject(object.attestation); + } + return message; + }; + + /** + * Creates a plain object from an ImportJob message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.kms.v1.ImportJob + * @static + * @param {google.cloud.kms.v1.ImportJob} message ImportJob + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportJob.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.importMethod = options.enums === String ? "IMPORT_METHOD_UNSPECIFIED" : 0; + object.createTime = null; + object.generateTime = null; + object.expireTime = null; + object.state = options.enums === String ? "IMPORT_JOB_STATE_UNSPECIFIED" : 0; + object.publicKey = null; + object.attestation = null; + object.protectionLevel = options.enums === String ? "PROTECTION_LEVEL_UNSPECIFIED" : 0; + object.expireEventTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.importMethod != null && message.hasOwnProperty("importMethod")) + object.importMethod = options.enums === String ? $root.google.cloud.kms.v1.ImportJob.ImportMethod[message.importMethod] === undefined ? message.importMethod : $root.google.cloud.kms.v1.ImportJob.ImportMethod[message.importMethod] : message.importMethod; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.generateTime != null && message.hasOwnProperty("generateTime")) + object.generateTime = $root.google.protobuf.Timestamp.toObject(message.generateTime, options); + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.kms.v1.ImportJob.ImportJobState[message.state] === undefined ? message.state : $root.google.cloud.kms.v1.ImportJob.ImportJobState[message.state] : message.state; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) + object.publicKey = $root.google.cloud.kms.v1.ImportJob.WrappingPublicKey.toObject(message.publicKey, options); + if (message.attestation != null && message.hasOwnProperty("attestation")) + object.attestation = $root.google.cloud.kms.v1.KeyOperationAttestation.toObject(message.attestation, options); + if (message.protectionLevel != null && message.hasOwnProperty("protectionLevel")) + object.protectionLevel = options.enums === String ? $root.google.cloud.kms.v1.ProtectionLevel[message.protectionLevel] === undefined ? message.protectionLevel : $root.google.cloud.kms.v1.ProtectionLevel[message.protectionLevel] : message.protectionLevel; + if (message.expireEventTime != null && message.hasOwnProperty("expireEventTime")) + object.expireEventTime = $root.google.protobuf.Timestamp.toObject(message.expireEventTime, options); + return object; + }; + + /** + * Converts this ImportJob to JSON. + * @function toJSON + * @memberof google.cloud.kms.v1.ImportJob + * @instance + * @returns {Object.} JSON object + */ + ImportJob.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImportJob + * @function getTypeUrl + * @memberof google.cloud.kms.v1.ImportJob + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.kms.v1.ImportJob"; + }; + + /** + * ImportMethod enum. + * @name google.cloud.kms.v1.ImportJob.ImportMethod + * @enum {number} + * @property {number} IMPORT_METHOD_UNSPECIFIED=0 IMPORT_METHOD_UNSPECIFIED value + * @property {number} RSA_OAEP_3072_SHA1_AES_256=1 RSA_OAEP_3072_SHA1_AES_256 value + * @property {number} RSA_OAEP_4096_SHA1_AES_256=2 RSA_OAEP_4096_SHA1_AES_256 value + * @property {number} RSA_OAEP_3072_SHA256_AES_256=3 RSA_OAEP_3072_SHA256_AES_256 value + * @property {number} RSA_OAEP_4096_SHA256_AES_256=4 RSA_OAEP_4096_SHA256_AES_256 value + * @property {number} RSA_OAEP_3072_SHA256=5 RSA_OAEP_3072_SHA256 value + * @property {number} RSA_OAEP_4096_SHA256=6 RSA_OAEP_4096_SHA256 value + */ + ImportJob.ImportMethod = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IMPORT_METHOD_UNSPECIFIED"] = 0; + values[valuesById[1] = "RSA_OAEP_3072_SHA1_AES_256"] = 1; + values[valuesById[2] = "RSA_OAEP_4096_SHA1_AES_256"] = 2; + values[valuesById[3] = "RSA_OAEP_3072_SHA256_AES_256"] = 3; + values[valuesById[4] = "RSA_OAEP_4096_SHA256_AES_256"] = 4; + values[valuesById[5] = "RSA_OAEP_3072_SHA256"] = 5; + values[valuesById[6] = "RSA_OAEP_4096_SHA256"] = 6; + return values; + })(); + + /** + * ImportJobState enum. + * @name google.cloud.kms.v1.ImportJob.ImportJobState + * @enum {number} + * @property {number} IMPORT_JOB_STATE_UNSPECIFIED=0 IMPORT_JOB_STATE_UNSPECIFIED value + * @property {number} PENDING_GENERATION=1 PENDING_GENERATION value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} EXPIRED=3 EXPIRED value + */ + ImportJob.ImportJobState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IMPORT_JOB_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING_GENERATION"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "EXPIRED"] = 3; + return values; + })(); + + ImportJob.WrappingPublicKey = (function() { + + /** + * Properties of a WrappingPublicKey. + * @memberof google.cloud.kms.v1.ImportJob + * @interface IWrappingPublicKey + * @property {string|null} [pem] WrappingPublicKey pem + */ + + /** + * Constructs a new WrappingPublicKey. + * @memberof google.cloud.kms.v1.ImportJob + * @classdesc Represents a WrappingPublicKey. + * @implements IWrappingPublicKey + * @constructor + * @param {google.cloud.kms.v1.ImportJob.IWrappingPublicKey=} [properties] Properties to set + */ + function WrappingPublicKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WrappingPublicKey pem. + * @member {string} pem + * @memberof google.cloud.kms.v1.ImportJob.WrappingPublicKey + * @instance + */ + WrappingPublicKey.prototype.pem = ""; + + /** + * Creates a new WrappingPublicKey instance using the specified properties. + * @function create + * @memberof google.cloud.kms.v1.ImportJob.WrappingPublicKey + * @static + * @param {google.cloud.kms.v1.ImportJob.IWrappingPublicKey=} [properties] Properties to set + * @returns {google.cloud.kms.v1.ImportJob.WrappingPublicKey} WrappingPublicKey instance + */ + WrappingPublicKey.create = function create(properties) { + return new WrappingPublicKey(properties); + }; + + /** + * Encodes the specified WrappingPublicKey message. Does not implicitly {@link google.cloud.kms.v1.ImportJob.WrappingPublicKey.verify|verify} messages. + * @function encode + * @memberof google.cloud.kms.v1.ImportJob.WrappingPublicKey + * @static + * @param {google.cloud.kms.v1.ImportJob.IWrappingPublicKey} message WrappingPublicKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WrappingPublicKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pem != null && Object.hasOwnProperty.call(message, "pem")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pem); + return writer; + }; + + /** + * Encodes the specified WrappingPublicKey message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ImportJob.WrappingPublicKey.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.kms.v1.ImportJob.WrappingPublicKey + * @static + * @param {google.cloud.kms.v1.ImportJob.IWrappingPublicKey} message WrappingPublicKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WrappingPublicKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WrappingPublicKey message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.kms.v1.ImportJob.WrappingPublicKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.kms.v1.ImportJob.WrappingPublicKey} WrappingPublicKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WrappingPublicKey.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.ImportJob.WrappingPublicKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.pem = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WrappingPublicKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.kms.v1.ImportJob.WrappingPublicKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.kms.v1.ImportJob.WrappingPublicKey} WrappingPublicKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WrappingPublicKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WrappingPublicKey message. + * @function verify + * @memberof google.cloud.kms.v1.ImportJob.WrappingPublicKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WrappingPublicKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pem != null && message.hasOwnProperty("pem")) + if (!$util.isString(message.pem)) + return "pem: string expected"; + return null; + }; + + /** + * Creates a WrappingPublicKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.kms.v1.ImportJob.WrappingPublicKey + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.kms.v1.ImportJob.WrappingPublicKey} WrappingPublicKey + */ + WrappingPublicKey.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.kms.v1.ImportJob.WrappingPublicKey) + return object; + var message = new $root.google.cloud.kms.v1.ImportJob.WrappingPublicKey(); + if (object.pem != null) + message.pem = String(object.pem); + return message; + }; + + /** + * Creates a plain object from a WrappingPublicKey message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.kms.v1.ImportJob.WrappingPublicKey + * @static + * @param {google.cloud.kms.v1.ImportJob.WrappingPublicKey} message WrappingPublicKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WrappingPublicKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.pem = ""; + if (message.pem != null && message.hasOwnProperty("pem")) + object.pem = message.pem; + return object; + }; + + /** + * Converts this WrappingPublicKey to JSON. + * @function toJSON + * @memberof google.cloud.kms.v1.ImportJob.WrappingPublicKey + * @instance + * @returns {Object.} JSON object + */ + WrappingPublicKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WrappingPublicKey + * @function getTypeUrl + * @memberof google.cloud.kms.v1.ImportJob.WrappingPublicKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WrappingPublicKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.kms.v1.ImportJob.WrappingPublicKey"; + }; + + return WrappingPublicKey; + })(); + + return ImportJob; + })(); + + v1.ExternalProtectionLevelOptions = (function() { + + /** + * Properties of an ExternalProtectionLevelOptions. + * @memberof google.cloud.kms.v1 + * @interface IExternalProtectionLevelOptions + * @property {string|null} [externalKeyUri] ExternalProtectionLevelOptions externalKeyUri + * @property {string|null} [ekmConnectionKeyPath] ExternalProtectionLevelOptions ekmConnectionKeyPath + */ + + /** + * Constructs a new ExternalProtectionLevelOptions. + * @memberof google.cloud.kms.v1 + * @classdesc Represents an ExternalProtectionLevelOptions. + * @implements IExternalProtectionLevelOptions + * @constructor + * @param {google.cloud.kms.v1.IExternalProtectionLevelOptions=} [properties] Properties to set + */ + function ExternalProtectionLevelOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExternalProtectionLevelOptions externalKeyUri. + * @member {string} externalKeyUri + * @memberof google.cloud.kms.v1.ExternalProtectionLevelOptions + * @instance + */ + ExternalProtectionLevelOptions.prototype.externalKeyUri = ""; + + /** + * ExternalProtectionLevelOptions ekmConnectionKeyPath. + * @member {string} ekmConnectionKeyPath + * @memberof google.cloud.kms.v1.ExternalProtectionLevelOptions + * @instance + */ + ExternalProtectionLevelOptions.prototype.ekmConnectionKeyPath = ""; + + /** + * Creates a new ExternalProtectionLevelOptions instance using the specified properties. + * @function create + * @memberof google.cloud.kms.v1.ExternalProtectionLevelOptions + * @static + * @param {google.cloud.kms.v1.IExternalProtectionLevelOptions=} [properties] Properties to set + * @returns {google.cloud.kms.v1.ExternalProtectionLevelOptions} ExternalProtectionLevelOptions instance + */ + ExternalProtectionLevelOptions.create = function create(properties) { + return new ExternalProtectionLevelOptions(properties); + }; + + /** + * Encodes the specified ExternalProtectionLevelOptions message. Does not implicitly {@link google.cloud.kms.v1.ExternalProtectionLevelOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.kms.v1.ExternalProtectionLevelOptions + * @static + * @param {google.cloud.kms.v1.IExternalProtectionLevelOptions} message ExternalProtectionLevelOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExternalProtectionLevelOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.externalKeyUri != null && Object.hasOwnProperty.call(message, "externalKeyUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.externalKeyUri); + if (message.ekmConnectionKeyPath != null && Object.hasOwnProperty.call(message, "ekmConnectionKeyPath")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ekmConnectionKeyPath); + return writer; + }; + + /** + * Encodes the specified ExternalProtectionLevelOptions message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ExternalProtectionLevelOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.kms.v1.ExternalProtectionLevelOptions + * @static + * @param {google.cloud.kms.v1.IExternalProtectionLevelOptions} message ExternalProtectionLevelOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExternalProtectionLevelOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExternalProtectionLevelOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.kms.v1.ExternalProtectionLevelOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.kms.v1.ExternalProtectionLevelOptions} ExternalProtectionLevelOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExternalProtectionLevelOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.ExternalProtectionLevelOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.externalKeyUri = reader.string(); + break; + } + case 2: { + message.ekmConnectionKeyPath = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExternalProtectionLevelOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.kms.v1.ExternalProtectionLevelOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.kms.v1.ExternalProtectionLevelOptions} ExternalProtectionLevelOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExternalProtectionLevelOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExternalProtectionLevelOptions message. + * @function verify + * @memberof google.cloud.kms.v1.ExternalProtectionLevelOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExternalProtectionLevelOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.externalKeyUri != null && message.hasOwnProperty("externalKeyUri")) + if (!$util.isString(message.externalKeyUri)) + return "externalKeyUri: string expected"; + if (message.ekmConnectionKeyPath != null && message.hasOwnProperty("ekmConnectionKeyPath")) + if (!$util.isString(message.ekmConnectionKeyPath)) + return "ekmConnectionKeyPath: string expected"; + return null; + }; + + /** + * Creates an ExternalProtectionLevelOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.kms.v1.ExternalProtectionLevelOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.kms.v1.ExternalProtectionLevelOptions} ExternalProtectionLevelOptions + */ + ExternalProtectionLevelOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.kms.v1.ExternalProtectionLevelOptions) + return object; + var message = new $root.google.cloud.kms.v1.ExternalProtectionLevelOptions(); + if (object.externalKeyUri != null) + message.externalKeyUri = String(object.externalKeyUri); + if (object.ekmConnectionKeyPath != null) + message.ekmConnectionKeyPath = String(object.ekmConnectionKeyPath); + return message; + }; + + /** + * Creates a plain object from an ExternalProtectionLevelOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.kms.v1.ExternalProtectionLevelOptions + * @static + * @param {google.cloud.kms.v1.ExternalProtectionLevelOptions} message ExternalProtectionLevelOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExternalProtectionLevelOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.externalKeyUri = ""; + object.ekmConnectionKeyPath = ""; + } + if (message.externalKeyUri != null && message.hasOwnProperty("externalKeyUri")) + object.externalKeyUri = message.externalKeyUri; + if (message.ekmConnectionKeyPath != null && message.hasOwnProperty("ekmConnectionKeyPath")) + object.ekmConnectionKeyPath = message.ekmConnectionKeyPath; + return object; + }; + + /** + * Converts this ExternalProtectionLevelOptions to JSON. + * @function toJSON + * @memberof google.cloud.kms.v1.ExternalProtectionLevelOptions + * @instance + * @returns {Object.} JSON object + */ + ExternalProtectionLevelOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExternalProtectionLevelOptions + * @function getTypeUrl + * @memberof google.cloud.kms.v1.ExternalProtectionLevelOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExternalProtectionLevelOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.kms.v1.ExternalProtectionLevelOptions"; + }; + + return ExternalProtectionLevelOptions; + })(); + + /** + * ProtectionLevel enum. + * @name google.cloud.kms.v1.ProtectionLevel + * @enum {number} + * @property {number} PROTECTION_LEVEL_UNSPECIFIED=0 PROTECTION_LEVEL_UNSPECIFIED value + * @property {number} SOFTWARE=1 SOFTWARE value + * @property {number} HSM=2 HSM value + * @property {number} EXTERNAL=3 EXTERNAL value + * @property {number} EXTERNAL_VPC=4 EXTERNAL_VPC value + */ + v1.ProtectionLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROTECTION_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "SOFTWARE"] = 1; + values[valuesById[2] = "HSM"] = 2; + values[valuesById[3] = "EXTERNAL"] = 3; + values[valuesById[4] = "EXTERNAL_VPC"] = 4; + return values; + })(); + + return v1; + })(); + + return kms; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {string|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {string} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = ""; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.edition); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 13: { + message.edition = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + if (!$util.isString(message.edition)) + return "edition: string expected"; + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = message.edition; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 42: { + message.phpGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * 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 {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + protobuf.DoubleValue = (function() { + + /** + * Properties of a DoubleValue. + * @memberof google.protobuf + * @interface IDoubleValue + * @property {number|null} [value] DoubleValue value + */ + + /** + * Constructs a new DoubleValue. + * @memberof google.protobuf + * @classdesc Represents a DoubleValue. + * @implements IDoubleValue + * @constructor + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + */ + function DoubleValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DoubleValue value. + * @member {number} value + * @memberof google.protobuf.DoubleValue + * @instance + */ + DoubleValue.prototype.value = 0; + + /** + * Creates a new DoubleValue instance using the specified properties. + * @function create + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + * @returns {google.protobuf.DoubleValue} DoubleValue instance + */ + DoubleValue.create = function create(properties) { + return new DoubleValue(properties); + }; + + /** + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); + return writer; + }; + + /** + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DoubleValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DoubleValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DoubleValue} DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DoubleValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DoubleValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DoubleValue} DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DoubleValue message. + * @function verify + * @memberof google.protobuf.DoubleValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DoubleValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; + + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DoubleValue} DoubleValue + */ + DoubleValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DoubleValue) + return object; + var message = new $root.google.protobuf.DoubleValue(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; + + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.DoubleValue} message DoubleValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DoubleValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; + + /** + * Converts this DoubleValue to JSON. + * @function toJSON + * @memberof google.protobuf.DoubleValue + * @instance + * @returns {Object.} JSON object + */ + DoubleValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DoubleValue + * @function getTypeUrl + * @memberof google.protobuf.DoubleValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DoubleValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DoubleValue"; + }; + + return DoubleValue; + })(); + + protobuf.FloatValue = (function() { + + /** + * Properties of a FloatValue. + * @memberof google.protobuf + * @interface IFloatValue + * @property {number|null} [value] FloatValue value + */ + + /** + * Constructs a new FloatValue. + * @memberof google.protobuf + * @classdesc Represents a FloatValue. + * @implements IFloatValue + * @constructor + * @param {google.protobuf.IFloatValue=} [properties] Properties to set + */ + function FloatValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FloatValue value. + * @member {number} value + * @memberof google.protobuf.FloatValue + * @instance + */ + FloatValue.prototype.value = 0; + + /** + * Creates a new FloatValue instance using the specified properties. + * @function create + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue=} [properties] Properties to set + * @returns {google.protobuf.FloatValue} FloatValue instance + */ + FloatValue.create = function create(properties) { + return new FloatValue(properties); + }; + + /** + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FloatValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); + return writer; + }; + + /** + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FloatValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FloatValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FloatValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FloatValue} FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FloatValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FloatValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FloatValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FloatValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FloatValue} FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FloatValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FloatValue message. + * @function verify + * @memberof google.protobuf.FloatValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FloatValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; + + /** + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FloatValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FloatValue} FloatValue + */ + FloatValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FloatValue) + return object; + var message = new $root.google.protobuf.FloatValue(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; + + /** + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.FloatValue} message FloatValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FloatValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; + + /** + * Converts this FloatValue to JSON. + * @function toJSON + * @memberof google.protobuf.FloatValue + * @instance + * @returns {Object.} JSON object + */ + FloatValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FloatValue + * @function getTypeUrl + * @memberof google.protobuf.FloatValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FloatValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FloatValue"; + }; + + return FloatValue; + })(); + + protobuf.Int64Value = (function() { + + /** + * Properties of an Int64Value. + * @memberof google.protobuf + * @interface IInt64Value + * @property {number|Long|null} [value] Int64Value value + */ + + /** + * Constructs a new Int64Value. + * @memberof google.protobuf + * @classdesc Represents an Int64Value. + * @implements IInt64Value + * @constructor + * @param {google.protobuf.IInt64Value=} [properties] Properties to set + */ + function Int64Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Int64Value value. + * @member {number|Long} value + * @memberof google.protobuf.Int64Value + * @instance + */ + Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Int64Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value=} [properties] Properties to set + * @returns {google.protobuf.Int64Value} Int64Value instance + */ + Int64Value.create = function create(properties) { + return new Int64Value(properties); + }; + + /** + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); + return writer; + }; + + /** + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Int64Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Int64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Int64Value} Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64Value.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int64Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Int64Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Int64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Int64Value} Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Int64Value message. + * @function verify + * @memberof google.protobuf.Int64Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int64Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; + return null; + }; + + /** + * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Int64Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Int64Value} Int64Value + */ + Int64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int64Value) + return object; + var message = new $root.google.protobuf.Int64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = false; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.Int64Value} message Int64Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Int64Value.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.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; + return object; + }; + + /** + * Converts this Int64Value to JSON. + * @function toJSON + * @memberof google.protobuf.Int64Value + * @instance + * @returns {Object.} JSON object + */ + Int64Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Int64Value + * @function getTypeUrl + * @memberof google.protobuf.Int64Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Int64Value"; + }; + + return Int64Value; + })(); + + protobuf.UInt64Value = (function() { + + /** + * Properties of a UInt64Value. + * @memberof google.protobuf + * @interface IUInt64Value + * @property {number|Long|null} [value] UInt64Value value + */ + + /** + * Constructs a new UInt64Value. + * @memberof google.protobuf + * @classdesc Represents a UInt64Value. + * @implements IUInt64Value + * @constructor + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + */ + function UInt64Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UInt64Value value. + * @member {number|Long} value + * @memberof google.protobuf.UInt64Value + * @instance + */ + UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new UInt64Value instance using the specified properties. + * @function create + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + * @returns {google.protobuf.UInt64Value} UInt64Value instance + */ + UInt64Value.create = function create(properties) { + return new UInt64Value(properties); + }; + + /** + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt64Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value); + return writer; + }; + + /** + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt64Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UInt64Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UInt64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UInt64Value} UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt64Value.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt64Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.uint64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UInt64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UInt64Value} UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt64Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UInt64Value message. + * @function verify + * @memberof google.protobuf.UInt64Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UInt64Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; + return null; + }; + + /** + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UInt64Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UInt64Value} UInt64Value + */ + UInt64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt64Value) + return object; + var message = new $root.google.protobuf.UInt64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = true; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.UInt64Value} message UInt64Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UInt64Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; + return object; + }; + + /** + * Converts this UInt64Value to JSON. + * @function toJSON + * @memberof google.protobuf.UInt64Value + * @instance + * @returns {Object.} JSON object + */ + UInt64Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UInt64Value + * @function getTypeUrl + * @memberof google.protobuf.UInt64Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UInt64Value"; + }; + + return UInt64Value; + })(); + + protobuf.Int32Value = (function() { + + /** + * Properties of an Int32Value. + * @memberof google.protobuf + * @interface IInt32Value + * @property {number|null} [value] Int32Value value + */ + + /** + * Constructs a new Int32Value. + * @memberof google.protobuf + * @classdesc Represents an Int32Value. + * @implements IInt32Value + * @constructor + * @param {google.protobuf.IInt32Value=} [properties] Properties to set + */ + function Int32Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Int32Value value. + * @member {number} value + * @memberof google.protobuf.Int32Value + * @instance + */ + Int32Value.prototype.value = 0; + + /** + * Creates a new Int32Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value=} [properties] Properties to set + * @returns {google.protobuf.Int32Value} Int32Value instance + */ + Int32Value.create = function create(properties) { + return new Int32Value(properties); + }; + + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value); + return writer; + }; + + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Int32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Int32Value} Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Value.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int32Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Int32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Int32Value} Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Int32Value message. + * @function verify + * @memberof google.protobuf.Int32Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int32Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; + return null; + }; + + /** + * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Int32Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Int32Value} Int32Value + */ + Int32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int32Value) + return object; + var message = new $root.google.protobuf.Int32Value(); + if (object.value != null) + message.value = object.value | 0; + return message; + }; + + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.Int32Value} message Int32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Int32Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this Int32Value to JSON. + * @function toJSON + * @memberof google.protobuf.Int32Value + * @instance + * @returns {Object.} JSON object + */ + Int32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Int32Value + * @function getTypeUrl + * @memberof google.protobuf.Int32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Int32Value"; + }; + + return Int32Value; + })(); + + protobuf.UInt32Value = (function() { + + /** + * Properties of a UInt32Value. + * @memberof google.protobuf + * @interface IUInt32Value + * @property {number|null} [value] UInt32Value value + */ + + /** + * Constructs a new UInt32Value. + * @memberof google.protobuf + * @classdesc Represents a UInt32Value. + * @implements IUInt32Value + * @constructor + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + */ + function UInt32Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UInt32Value value. + * @member {number} value + * @memberof google.protobuf.UInt32Value + * @instance + */ + UInt32Value.prototype.value = 0; + + /** + * Creates a new UInt32Value instance using the specified properties. + * @function create + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + * @returns {google.protobuf.UInt32Value} UInt32Value instance + */ + UInt32Value.create = function create(properties) { + return new UInt32Value(properties); + }; + + /** + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt32Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value); + return writer; + }; + + /** + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt32Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UInt32Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UInt32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UInt32Value} UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt32Value.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt32Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UInt32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UInt32Value} UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt32Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UInt32Value message. + * @function verify + * @memberof google.protobuf.UInt32Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UInt32Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; + return null; + }; + + /** + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UInt32Value} UInt32Value + */ + UInt32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt32Value) + return object; + var message = new $root.google.protobuf.UInt32Value(); + if (object.value != null) + message.value = object.value >>> 0; + return message; + }; + + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.UInt32Value} message UInt32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UInt32Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this UInt32Value to JSON. + * @function toJSON + * @memberof google.protobuf.UInt32Value + * @instance + * @returns {Object.} JSON object + */ + UInt32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UInt32Value + * @function getTypeUrl + * @memberof google.protobuf.UInt32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UInt32Value"; + }; + + return UInt32Value; + })(); + + protobuf.BoolValue = (function() { + + /** + * Properties of a BoolValue. + * @memberof google.protobuf + * @interface IBoolValue + * @property {boolean|null} [value] BoolValue value + */ + + /** + * Constructs a new BoolValue. + * @memberof google.protobuf + * @classdesc Represents a BoolValue. + * @implements IBoolValue + * @constructor + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + */ + function BoolValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BoolValue value. + * @member {boolean} value + * @memberof google.protobuf.BoolValue + * @instance + */ + BoolValue.prototype.value = false; + + /** + * Creates a new BoolValue instance using the specified properties. + * @function create + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + * @returns {google.protobuf.BoolValue} BoolValue instance + */ + BoolValue.create = function create(properties) { + return new BoolValue(properties); + }; + + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoolValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value); + return writer; + }; + + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoolValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.BoolValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.BoolValue} BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoolValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BoolValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.BoolValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.BoolValue} BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoolValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BoolValue message. + * @function verify + * @memberof google.protobuf.BoolValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BoolValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "boolean") + return "value: boolean expected"; + return null; + }; + + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.BoolValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.BoolValue} BoolValue + */ + BoolValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BoolValue) + return object; + var message = new $root.google.protobuf.BoolValue(); + if (object.value != null) + message.value = Boolean(object.value); + return message; + }; + + /** + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.BoolValue} message BoolValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BoolValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = false; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this BoolValue to JSON. + * @function toJSON + * @memberof google.protobuf.BoolValue + * @instance + * @returns {Object.} JSON object + */ + BoolValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BoolValue + * @function getTypeUrl + * @memberof google.protobuf.BoolValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BoolValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.BoolValue"; + }; + + return BoolValue; + })(); + + protobuf.StringValue = (function() { + + /** + * Properties of a StringValue. + * @memberof google.protobuf + * @interface IStringValue + * @property {string|null} [value] StringValue value + */ + + /** + * Constructs a new StringValue. + * @memberof google.protobuf + * @classdesc Represents a StringValue. + * @implements IStringValue + * @constructor + * @param {google.protobuf.IStringValue=} [properties] Properties to set + */ + function StringValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StringValue value. + * @member {string} value + * @memberof google.protobuf.StringValue + * @instance + */ + StringValue.prototype.value = ""; + + /** + * Creates a new StringValue instance using the specified properties. + * @function create + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue=} [properties] Properties to set + * @returns {google.protobuf.StringValue} StringValue instance + */ + StringValue.create = function create(properties) { + return new StringValue(properties); + }; + + /** + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; + + /** + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StringValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.StringValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.StringValue} StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.StringValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StringValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.StringValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.StringValue} StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StringValue message. + * @function verify + * @memberof google.protobuf.StringValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.StringValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.StringValue} StringValue + */ + StringValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.StringValue) + return object; + var message = new $root.google.protobuf.StringValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.StringValue} message StringValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = ""; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this StringValue to JSON. + * @function toJSON + * @memberof google.protobuf.StringValue + * @instance + * @returns {Object.} JSON object + */ + StringValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StringValue + * @function getTypeUrl + * @memberof google.protobuf.StringValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.StringValue"; + }; + + return StringValue; + })(); + + protobuf.BytesValue = (function() { + + /** + * Properties of a BytesValue. + * @memberof google.protobuf + * @interface IBytesValue + * @property {Uint8Array|null} [value] BytesValue value + */ + + /** + * Constructs a new BytesValue. + * @memberof google.protobuf + * @classdesc Represents a BytesValue. + * @implements IBytesValue + * @constructor + * @param {google.protobuf.IBytesValue=} [properties] Properties to set + */ + function BytesValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BytesValue value. + * @member {Uint8Array} value + * @memberof google.protobuf.BytesValue + * @instance + */ + BytesValue.prototype.value = $util.newBuffer([]); + + /** + * Creates a new BytesValue instance using the specified properties. + * @function create + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue=} [properties] Properties to set + * @returns {google.protobuf.BytesValue} BytesValue instance + */ + BytesValue.create = function create(properties) { + return new BytesValue(properties); + }; + + /** + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BytesValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BytesValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BytesValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.BytesValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.BytesValue} BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BytesValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BytesValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BytesValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.BytesValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.BytesValue} BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BytesValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BytesValue message. + * @function verify + * @memberof google.protobuf.BytesValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BytesValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.BytesValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.BytesValue} BytesValue + */ + BytesValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BytesValue) + return object; + var message = new $root.google.protobuf.BytesValue(); + 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 a BytesValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.BytesValue} message BytesValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BytesValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + 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 BytesValue to JSON. + * @function toJSON + * @memberof google.protobuf.BytesValue + * @instance + * @returns {Object.} JSON object + */ + BytesValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BytesValue + * @function getTypeUrl + * @memberof google.protobuf.BytesValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.BytesValue"; + }; + + return BytesValue; + })(); + + return protobuf; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-cloud-kms-inventory/protos/protos.json b/packages/google-cloud-kms-inventory/protos/protos.json new file mode 100644 index 00000000000..e8f987425a4 --- /dev/null +++ b/packages/google-cloud-kms-inventory/protos/protos.json @@ -0,0 +1,2033 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "kms": { + "nested": { + "inventory": { + "nested": { + "v1": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.Cloud.Kms.Inventory.V1", + "go_package": "cloud.google.com/go/kms/inventory/apiv1/inventorypb;inventorypb", + "java_multiple_files": true, + "java_outer_classname": "KeyTrackingServiceProto", + "java_package": "com.google.cloud.kms.inventory.v1", + "php_namespace": "Google\\Cloud\\Kms\\Inventory\\V1" + }, + "nested": { + "KeyDashboardService": { + "options": { + "(google.api.default_host)": "kmsinventory.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListCryptoKeys": { + "requestType": "ListCryptoKeysRequest", + "responseType": "ListCryptoKeysResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*}/cryptoKeys", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*}/cryptoKeys" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "ListCryptoKeysRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListCryptoKeysResponse": { + "fields": { + "cryptoKeys": { + "rule": "repeated", + "type": "google.cloud.kms.v1.CryptoKey", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "KeyTrackingService": { + "options": { + "(google.api.default_host)": "kmsinventory.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "GetProtectedResourcesSummary": { + "requestType": "GetProtectedResourcesSummaryRequest", + "responseType": "ProtectedResourcesSummary", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/**}/protectedResourcesSummary", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/**}/protectedResourcesSummary" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "SearchProtectedResources": { + "requestType": "SearchProtectedResourcesRequest", + "responseType": "SearchProtectedResourcesResponse", + "options": { + "(google.api.http).get": "/v1/{scope=organizations/*}/protectedResources:search", + "(google.api.method_signature)": "scope, crypto_key" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{scope=organizations/*}/protectedResources:search" + } + }, + { + "(google.api.method_signature)": "scope, crypto_key" + } + ] + } + } + }, + "GetProtectedResourcesSummaryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "kmsinventory.googleapis.com/ProtectedResourcesSummary" + } + } + } + }, + "ProtectedResourcesSummary": { + "options": { + "(google.api.resource).type": "kmsinventory.googleapis.com/ProtectedResourcesSummary", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}/protectedResourcesSummary" + }, + "fields": { + "name": { + "type": "string", + "id": 5 + }, + "resourceCount": { + "type": "int64", + "id": 1 + }, + "projectCount": { + "type": "int32", + "id": 2 + }, + "resourceTypes": { + "keyType": "string", + "type": "int64", + "id": 3 + }, + "cloudProducts": { + "keyType": "string", + "type": "int64", + "id": 6 + }, + "locations": { + "keyType": "string", + "type": "int64", + "id": 4 + } + } + }, + "SearchProtectedResourcesRequest": { + "fields": { + "scope": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Organization" + } + }, + "cryptoKey": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "pageToken": { + "type": "string", + "id": 4 + } + } + }, + "SearchProtectedResourcesResponse": { + "fields": { + "protectedResources": { + "rule": "repeated", + "type": "ProtectedResource", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ProtectedResource": { + "options": { + "(google.api.resource).type": "cloudasset.googleapis.com/Asset", + "(google.api.resource).pattern": "*" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "project": { + "type": "string", + "id": 2 + }, + "projectId": { + "type": "string", + "id": 9 + }, + "cloudProduct": { + "type": "string", + "id": 8 + }, + "resourceType": { + "type": "string", + "id": 3 + }, + "location": { + "type": "string", + "id": 4 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 5 + }, + "cryptoKeyVersion": { + "type": "string", + "id": 6, + "options": { + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKeyVersion" + } + }, + "cryptoKeyVersions": { + "rule": "repeated", + "type": "string", + "id": 10, + "options": { + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKeyVersion" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + } + } + } + } + }, + "v1": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.Cloud.Kms.V1", + "go_package": "cloud.google.com/go/kms/apiv1/kmspb;kmspb", + "java_multiple_files": true, + "java_outer_classname": "KmsResourcesProto", + "java_package": "com.google.cloud.kms.v1", + "php_namespace": "Google\\Cloud\\Kms\\V1" + }, + "nested": { + "KeyRing": { + "options": { + "(google.api.resource).type": "cloudkms.googleapis.com/KeyRing", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/keyRings/{key_ring}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "CryptoKey": { + "options": { + "(google.api.resource).type": "cloudkms.googleapis.com/CryptoKey", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}" + }, + "oneofs": { + "rotationSchedule": { + "oneof": [ + "rotationPeriod" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "primary": { + "type": "CryptoKeyVersion", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "purpose": { + "type": "CryptoKeyPurpose", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "nextRotationTime": { + "type": "google.protobuf.Timestamp", + "id": 7 + }, + "rotationPeriod": { + "type": "google.protobuf.Duration", + "id": 8 + }, + "versionTemplate": { + "type": "CryptoKeyVersionTemplate", + "id": 11 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 10 + }, + "importOnly": { + "type": "bool", + "id": 13, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "destroyScheduledDuration": { + "type": "google.protobuf.Duration", + "id": 14, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "cryptoKeyBackend": { + "type": "string", + "id": 15, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "(google.api.resource_reference).type": "*" + } + } + }, + "nested": { + "CryptoKeyPurpose": { + "values": { + "CRYPTO_KEY_PURPOSE_UNSPECIFIED": 0, + "ENCRYPT_DECRYPT": 1, + "ASYMMETRIC_SIGN": 5, + "ASYMMETRIC_DECRYPT": 6, + "MAC": 9 + } + } + } + }, + "CryptoKeyVersionTemplate": { + "fields": { + "protectionLevel": { + "type": "ProtectionLevel", + "id": 1 + }, + "algorithm": { + "type": "CryptoKeyVersion.CryptoKeyVersionAlgorithm", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "KeyOperationAttestation": { + "fields": { + "format": { + "type": "AttestationFormat", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "content": { + "type": "bytes", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "certChains": { + "type": "CertificateChains", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "AttestationFormat": { + "values": { + "ATTESTATION_FORMAT_UNSPECIFIED": 0, + "CAVIUM_V1_COMPRESSED": 3, + "CAVIUM_V2_COMPRESSED": 4 + } + }, + "CertificateChains": { + "fields": { + "caviumCerts": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "googleCardCerts": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "googlePartitionCerts": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + } + } + }, + "CryptoKeyVersion": { + "options": { + "(google.api.resource).type": "cloudkms.googleapis.com/CryptoKeyVersion", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "CryptoKeyVersionState", + "id": 3 + }, + "protectionLevel": { + "type": "ProtectionLevel", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "algorithm": { + "type": "CryptoKeyVersionAlgorithm", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "attestation": { + "type": "KeyOperationAttestation", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "generateTime": { + "type": "google.protobuf.Timestamp", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "destroyTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "destroyEventTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "importJob": { + "type": "string", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "importTime": { + "type": "google.protobuf.Timestamp", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "importFailureReason": { + "type": "string", + "id": 16, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "externalProtectionLevelOptions": { + "type": "ExternalProtectionLevelOptions", + "id": 17 + }, + "reimportEligible": { + "type": "bool", + "id": 18, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "CryptoKeyVersionAlgorithm": { + "values": { + "CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED": 0, + "GOOGLE_SYMMETRIC_ENCRYPTION": 1, + "RSA_SIGN_PSS_2048_SHA256": 2, + "RSA_SIGN_PSS_3072_SHA256": 3, + "RSA_SIGN_PSS_4096_SHA256": 4, + "RSA_SIGN_PSS_4096_SHA512": 15, + "RSA_SIGN_PKCS1_2048_SHA256": 5, + "RSA_SIGN_PKCS1_3072_SHA256": 6, + "RSA_SIGN_PKCS1_4096_SHA256": 7, + "RSA_SIGN_PKCS1_4096_SHA512": 16, + "RSA_SIGN_RAW_PKCS1_2048": 28, + "RSA_SIGN_RAW_PKCS1_3072": 29, + "RSA_SIGN_RAW_PKCS1_4096": 30, + "RSA_DECRYPT_OAEP_2048_SHA256": 8, + "RSA_DECRYPT_OAEP_3072_SHA256": 9, + "RSA_DECRYPT_OAEP_4096_SHA256": 10, + "RSA_DECRYPT_OAEP_4096_SHA512": 17, + "RSA_DECRYPT_OAEP_2048_SHA1": 37, + "RSA_DECRYPT_OAEP_3072_SHA1": 38, + "RSA_DECRYPT_OAEP_4096_SHA1": 39, + "EC_SIGN_P256_SHA256": 12, + "EC_SIGN_P384_SHA384": 13, + "EC_SIGN_SECP256K1_SHA256": 31, + "HMAC_SHA256": 32, + "HMAC_SHA1": 33, + "HMAC_SHA384": 34, + "HMAC_SHA512": 35, + "HMAC_SHA224": 36, + "EXTERNAL_SYMMETRIC_ENCRYPTION": 18 + } + }, + "CryptoKeyVersionState": { + "values": { + "CRYPTO_KEY_VERSION_STATE_UNSPECIFIED": 0, + "PENDING_GENERATION": 5, + "ENABLED": 1, + "DISABLED": 2, + "DESTROYED": 3, + "DESTROY_SCHEDULED": 4, + "PENDING_IMPORT": 6, + "IMPORT_FAILED": 7 + } + }, + "CryptoKeyVersionView": { + "values": { + "CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED": 0, + "FULL": 1 + } + } + } + }, + "PublicKey": { + "options": { + "(google.api.resource).type": "cloudkms.googleapis.com/PublicKey", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}/publicKey" + }, + "fields": { + "pem": { + "type": "string", + "id": 1 + }, + "algorithm": { + "type": "CryptoKeyVersion.CryptoKeyVersionAlgorithm", + "id": 2 + }, + "pemCrc32c": { + "type": "google.protobuf.Int64Value", + "id": 3 + }, + "name": { + "type": "string", + "id": 4 + }, + "protectionLevel": { + "type": "ProtectionLevel", + "id": 5 + } + } + }, + "ImportJob": { + "options": { + "(google.api.resource).type": "cloudkms.googleapis.com/ImportJob", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/keyRings/{key_ring}/importJobs/{import_job}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "importMethod": { + "type": "ImportMethod", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "protectionLevel": { + "type": "ProtectionLevel", + "id": 9, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "generateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "expireTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "expireEventTime": { + "type": "google.protobuf.Timestamp", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "ImportJobState", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "publicKey": { + "type": "WrappingPublicKey", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "attestation": { + "type": "KeyOperationAttestation", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "ImportMethod": { + "values": { + "IMPORT_METHOD_UNSPECIFIED": 0, + "RSA_OAEP_3072_SHA1_AES_256": 1, + "RSA_OAEP_4096_SHA1_AES_256": 2, + "RSA_OAEP_3072_SHA256_AES_256": 3, + "RSA_OAEP_4096_SHA256_AES_256": 4, + "RSA_OAEP_3072_SHA256": 5, + "RSA_OAEP_4096_SHA256": 6 + } + }, + "ImportJobState": { + "values": { + "IMPORT_JOB_STATE_UNSPECIFIED": 0, + "PENDING_GENERATION": 1, + "ACTIVE": 2, + "EXPIRED": 3 + } + }, + "WrappingPublicKey": { + "fields": { + "pem": { + "type": "string", + "id": 1 + } + } + } + } + }, + "ExternalProtectionLevelOptions": { + "fields": { + "externalKeyUri": { + "type": "string", + "id": 1 + }, + "ekmConnectionKeyPath": { + "type": "string", + "id": 2 + } + } + }, + "ProtectionLevel": { + "values": { + "PROTECTION_LEVEL_UNSPECIFIED": 0, + "SOFTWARE": 1, + "HSM": 2, + "EXTERNAL": 3, + "EXTERNAL_VPC": 4 + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ResourceProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "string", + "id": 13 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "phpGenericServices": { + "type": "bool", + "id": 42, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + } + } + }, + "OneofOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "DoubleValue": { + "fields": { + "value": { + "type": "double", + "id": 1 + } + } + }, + "FloatValue": { + "fields": { + "value": { + "type": "float", + "id": 1 + } + } + }, + "Int64Value": { + "fields": { + "value": { + "type": "int64", + "id": 1 + } + } + }, + "UInt64Value": { + "fields": { + "value": { + "type": "uint64", + "id": 1 + } + } + }, + "Int32Value": { + "fields": { + "value": { + "type": "int32", + "id": 1 + } + } + }, + "UInt32Value": { + "fields": { + "value": { + "type": "uint32", + "id": 1 + } + } + }, + "BoolValue": { + "fields": { + "value": { + "type": "bool", + "id": 1 + } + } + }, + "StringValue": { + "fields": { + "value": { + "type": "string", + "id": 1 + } + } + }, + "BytesValue": { + "fields": { + "value": { + "type": "bytes", + "id": 1 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-cloud-kms-inventory/samples/README.md b/packages/google-cloud-kms-inventory/samples/README.md new file mode 100644 index 00000000000..481ac8bd354 --- /dev/null +++ b/packages/google-cloud-kms-inventory/samples/README.md @@ -0,0 +1,122 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [KMS Inventory API: Node.js Samples](https://github.com/googleapis/google-cloud-node) + +[![Open in Cloud Shell][shell_img]][shell_link] + + + +## Table of Contents + +* [Before you begin](#before-you-begin) +* [Samples](#samples) + * [Key_dashboard_service.list_crypto_keys](#key_dashboard_service.list_crypto_keys) + * [Key_tracking_service.get_protected_resources_summary](#key_tracking_service.get_protected_resources_summary) + * [Key_tracking_service.search_protected_resources](#key_tracking_service.search_protected_resources) + * [Quickstart](#quickstart) + * [Quickstart](#quickstart) + +## Before you begin + +Before running the samples, make sure you've followed the steps outlined in +[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library). + +`cd samples` + +`npm install` + +`cd ..` + +## Samples + + + +### Key_dashboard_service.list_crypto_keys + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms-inventory/samples/generated/v1/key_dashboard_service.list_crypto_keys.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms-inventory/samples/generated/v1/key_dashboard_service.list_crypto_keys.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-kms-inventory/samples/generated/v1/key_dashboard_service.list_crypto_keys.js` + + +----- + + + + +### Key_tracking_service.get_protected_resources_summary + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms-inventory/samples/generated/v1/key_tracking_service.get_protected_resources_summary.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms-inventory/samples/generated/v1/key_tracking_service.get_protected_resources_summary.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-kms-inventory/samples/generated/v1/key_tracking_service.get_protected_resources_summary.js` + + +----- + + + + +### Key_tracking_service.search_protected_resources + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms-inventory/samples/generated/v1/key_tracking_service.search_protected_resources.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms-inventory/samples/generated/v1/key_tracking_service.search_protected_resources.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-kms-inventory/samples/generated/v1/key_tracking_service.search_protected_resources.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms-inventory/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms-inventory/samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-kms-inventory/samples/quickstart.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms-inventory/samples/test/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms-inventory/samples/test/quickstart.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-kms-inventory/samples/test/quickstart.js` + + + + + + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=samples/README.md +[product-docs]: https://cloud.google.com/kms/docs/ diff --git a/packages/google-cloud-kms-inventory/samples/generated/v1/key_dashboard_service.list_crypto_keys.js b/packages/google-cloud-kms-inventory/samples/generated/v1/key_dashboard_service.list_crypto_keys.js new file mode 100644 index 00000000000..702c7bcc1f8 --- /dev/null +++ b/packages/google-cloud-kms-inventory/samples/generated/v1/key_dashboard_service.list_crypto_keys.js @@ -0,0 +1,75 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START kmsinventory_v1_generated_KeyDashboardService_ListCryptoKeys_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 Google Cloud project for which to retrieve key metadata, in + * the format `projects/*` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of keys to return. The service may return + * fewer than this value. If unspecified, at most 1000 keys will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Pass this into a subsequent request in order to receive the next + * page of results. + */ + // const pageToken = 'abc123' + + // Imports the Inventory library + const {KeyDashboardServiceClient} = require('inventory').v1; + + // Instantiates a client + const inventoryClient = new KeyDashboardServiceClient(); + + async function callListCryptoKeys() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await inventoryClient.listCryptoKeysAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListCryptoKeys(); + // [END kmsinventory_v1_generated_KeyDashboardService_ListCryptoKeys_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-kms-inventory/samples/generated/v1/key_tracking_service.get_protected_resources_summary.js b/packages/google-cloud-kms-inventory/samples/generated/v1/key_tracking_service.get_protected_resources_summary.js new file mode 100644 index 00000000000..db1388efcc4 --- /dev/null +++ b/packages/google-cloud-kms-inventory/samples/generated/v1/key_tracking_service.get_protected_resources_summary.js @@ -0,0 +1,62 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START kmsinventory_v1_generated_KeyTrackingService_GetProtectedResourcesSummary_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the + * CryptoKey google.cloud.kms.v1.CryptoKey. + */ + // const name = 'abc123' + + // Imports the Inventory library + const {KeyTrackingServiceClient} = require('inventory').v1; + + // Instantiates a client + const inventoryClient = new KeyTrackingServiceClient(); + + async function callGetProtectedResourcesSummary() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await inventoryClient.getProtectedResourcesSummary(request); + console.log(response); + } + + callGetProtectedResourcesSummary(); + // [END kmsinventory_v1_generated_KeyTrackingService_GetProtectedResourcesSummary_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-kms-inventory/samples/generated/v1/key_tracking_service.search_protected_resources.js b/packages/google-cloud-kms-inventory/samples/generated/v1/key_tracking_service.search_protected_resources.js new file mode 100644 index 00000000000..af254e02ed3 --- /dev/null +++ b/packages/google-cloud-kms-inventory/samples/generated/v1/key_tracking_service.search_protected_resources.js @@ -0,0 +1,86 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(scope, cryptoKey) { + // [START kmsinventory_v1_generated_KeyTrackingService_SearchProtectedResources_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. Resource name of the organization. + * Example: organizations/123 + */ + // const scope = 'abc123' + /** + * Required. The resource name of the + * CryptoKey google.cloud.kms.v1.CryptoKey. + */ + // const cryptoKey = 'abc123' + /** + * The maximum number of resources to return. The service may return fewer + * than this value. + * If unspecified, at most 500 resources will be returned. + * The maximum value is 500; values above 500 will be coerced to 500. + */ + // const pageSize = 1234 + /** + * A page token, received from a previous + * KeyTrackingService.SearchProtectedResources google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * KeyTrackingService.SearchProtectedResources google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Inventory library + const {KeyTrackingServiceClient} = require('inventory').v1; + + // Instantiates a client + const inventoryClient = new KeyTrackingServiceClient(); + + async function callSearchProtectedResources() { + // Construct request + const request = { + scope, + cryptoKey, + }; + + // Run request + const iterable = await inventoryClient.searchProtectedResourcesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callSearchProtectedResources(); + // [END kmsinventory_v1_generated_KeyTrackingService_SearchProtectedResources_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-kms-inventory/samples/generated/v1/snippet_metadata.google.cloud.kms.inventory.v1.json b/packages/google-cloud-kms-inventory/samples/generated/v1/snippet_metadata.google.cloud.kms.inventory.v1.json new file mode 100644 index 00000000000..988482f0509 --- /dev/null +++ b/packages/google-cloud-kms-inventory/samples/generated/v1/snippet_metadata.google.cloud.kms.inventory.v1.json @@ -0,0 +1,155 @@ +{ + "clientLibrary": { + "name": "nodejs-inventory", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.kms.inventory.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "kmsinventory_v1_generated_KeyDashboardService_ListCryptoKeys_async", + "title": "KeyDashboardService listCryptoKeys Sample", + "origin": "API_DEFINITION", + "description": " Returns cryptographic keys managed by Cloud KMS in a given Cloud project. Note that this data is sourced from snapshots, meaning it may not completely reflect the actual state of key metadata at call time.", + "canonical": true, + "file": "key_dashboard_service.list_crypto_keys.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCryptoKeys", + "fullName": "google.cloud.kms.inventory.v1.KeyDashboardService.ListCryptoKeys", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.kms.inventory.v1.ListCryptoKeysResponse", + "client": { + "shortName": "KeyDashboardServiceClient", + "fullName": "google.cloud.kms.inventory.v1.KeyDashboardServiceClient" + }, + "method": { + "shortName": "ListCryptoKeys", + "fullName": "google.cloud.kms.inventory.v1.KeyDashboardService.ListCryptoKeys", + "service": { + "shortName": "KeyDashboardService", + "fullName": "google.cloud.kms.inventory.v1.KeyDashboardService" + } + } + } + }, + { + "regionTag": "kmsinventory_v1_generated_KeyTrackingService_GetProtectedResourcesSummary_async", + "title": "KeyDashboardService getProtectedResourcesSummary Sample", + "origin": "API_DEFINITION", + "description": " Returns aggregate information about the resources protected by the given Cloud KMS [CryptoKey][google.cloud.kms.v1.CryptoKey]. Only resources within the same Cloud organization as the key will be returned. The project that holds the key must be part of an organization in order for this call to succeed.", + "canonical": true, + "file": "key_tracking_service.get_protected_resources_summary.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetProtectedResourcesSummary", + "fullName": "google.cloud.kms.inventory.v1.KeyTrackingService.GetProtectedResourcesSummary", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.kms.inventory.v1.ProtectedResourcesSummary", + "client": { + "shortName": "KeyTrackingServiceClient", + "fullName": "google.cloud.kms.inventory.v1.KeyTrackingServiceClient" + }, + "method": { + "shortName": "GetProtectedResourcesSummary", + "fullName": "google.cloud.kms.inventory.v1.KeyTrackingService.GetProtectedResourcesSummary", + "service": { + "shortName": "KeyTrackingService", + "fullName": "google.cloud.kms.inventory.v1.KeyTrackingService" + } + } + } + }, + { + "regionTag": "kmsinventory_v1_generated_KeyTrackingService_SearchProtectedResources_async", + "title": "KeyDashboardService searchProtectedResources Sample", + "origin": "API_DEFINITION", + "description": " Returns metadata about the resources protected by the given Cloud KMS [CryptoKey][google.cloud.kms.v1.CryptoKey] in the given Cloud organization.", + "canonical": true, + "file": "key_tracking_service.search_protected_resources.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SearchProtectedResources", + "fullName": "google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources", + "async": true, + "parameters": [ + { + "name": "scope", + "type": "TYPE_STRING" + }, + { + "name": "crypto_key", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse", + "client": { + "shortName": "KeyTrackingServiceClient", + "fullName": "google.cloud.kms.inventory.v1.KeyTrackingServiceClient" + }, + "method": { + "shortName": "SearchProtectedResources", + "fullName": "google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources", + "service": { + "shortName": "KeyTrackingService", + "fullName": "google.cloud.kms.inventory.v1.KeyTrackingService" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/google-cloud-kms-inventory/samples/generated/v1/snippet_metadata_google.cloud.kms.inventory.v1.json b/packages/google-cloud-kms-inventory/samples/generated/v1/snippet_metadata_google.cloud.kms.inventory.v1.json new file mode 100644 index 00000000000..988482f0509 --- /dev/null +++ b/packages/google-cloud-kms-inventory/samples/generated/v1/snippet_metadata_google.cloud.kms.inventory.v1.json @@ -0,0 +1,155 @@ +{ + "clientLibrary": { + "name": "nodejs-inventory", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.kms.inventory.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "kmsinventory_v1_generated_KeyDashboardService_ListCryptoKeys_async", + "title": "KeyDashboardService listCryptoKeys Sample", + "origin": "API_DEFINITION", + "description": " Returns cryptographic keys managed by Cloud KMS in a given Cloud project. Note that this data is sourced from snapshots, meaning it may not completely reflect the actual state of key metadata at call time.", + "canonical": true, + "file": "key_dashboard_service.list_crypto_keys.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCryptoKeys", + "fullName": "google.cloud.kms.inventory.v1.KeyDashboardService.ListCryptoKeys", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.kms.inventory.v1.ListCryptoKeysResponse", + "client": { + "shortName": "KeyDashboardServiceClient", + "fullName": "google.cloud.kms.inventory.v1.KeyDashboardServiceClient" + }, + "method": { + "shortName": "ListCryptoKeys", + "fullName": "google.cloud.kms.inventory.v1.KeyDashboardService.ListCryptoKeys", + "service": { + "shortName": "KeyDashboardService", + "fullName": "google.cloud.kms.inventory.v1.KeyDashboardService" + } + } + } + }, + { + "regionTag": "kmsinventory_v1_generated_KeyTrackingService_GetProtectedResourcesSummary_async", + "title": "KeyDashboardService getProtectedResourcesSummary Sample", + "origin": "API_DEFINITION", + "description": " Returns aggregate information about the resources protected by the given Cloud KMS [CryptoKey][google.cloud.kms.v1.CryptoKey]. Only resources within the same Cloud organization as the key will be returned. The project that holds the key must be part of an organization in order for this call to succeed.", + "canonical": true, + "file": "key_tracking_service.get_protected_resources_summary.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetProtectedResourcesSummary", + "fullName": "google.cloud.kms.inventory.v1.KeyTrackingService.GetProtectedResourcesSummary", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.kms.inventory.v1.ProtectedResourcesSummary", + "client": { + "shortName": "KeyTrackingServiceClient", + "fullName": "google.cloud.kms.inventory.v1.KeyTrackingServiceClient" + }, + "method": { + "shortName": "GetProtectedResourcesSummary", + "fullName": "google.cloud.kms.inventory.v1.KeyTrackingService.GetProtectedResourcesSummary", + "service": { + "shortName": "KeyTrackingService", + "fullName": "google.cloud.kms.inventory.v1.KeyTrackingService" + } + } + } + }, + { + "regionTag": "kmsinventory_v1_generated_KeyTrackingService_SearchProtectedResources_async", + "title": "KeyDashboardService searchProtectedResources Sample", + "origin": "API_DEFINITION", + "description": " Returns metadata about the resources protected by the given Cloud KMS [CryptoKey][google.cloud.kms.v1.CryptoKey] in the given Cloud organization.", + "canonical": true, + "file": "key_tracking_service.search_protected_resources.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SearchProtectedResources", + "fullName": "google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources", + "async": true, + "parameters": [ + { + "name": "scope", + "type": "TYPE_STRING" + }, + { + "name": "crypto_key", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse", + "client": { + "shortName": "KeyTrackingServiceClient", + "fullName": "google.cloud.kms.inventory.v1.KeyTrackingServiceClient" + }, + "method": { + "shortName": "SearchProtectedResources", + "fullName": "google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources", + "service": { + "shortName": "KeyTrackingService", + "fullName": "google.cloud.kms.inventory.v1.KeyTrackingService" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/google-cloud-kms-inventory/samples/package.json b/packages/google-cloud-kms-inventory/samples/package.json new file mode 100644 index 00000000000..91b4c481ad0 --- /dev/null +++ b/packages/google-cloud-kms-inventory/samples/package.json @@ -0,0 +1,24 @@ +{ + "name": "kmsinventory-samples", + "private": true, + "license": "Apache-2.0", + "author": "Google LLC", + "engines": { + "node": ">=12.0.0" + }, + "files": [ + "*.js" + ], + "scripts": { + "test": "c8 mocha --timeout 600000 test/*.js", + "publish": "echo 'sample test; do not publish'" + }, + "dependencies": { + "@google-cloud/kms-inventory": "0.1.0" + }, + "devDependencies": { + "c8": "^7.1.0", + "chai": "^4.2.0", + "mocha": "^8.0.0" + } +} diff --git a/packages/google-cloud-kms-inventory/samples/quickstart.js b/packages/google-cloud-kms-inventory/samples/quickstart.js new file mode 100644 index 00000000000..0bfc7abd408 --- /dev/null +++ b/packages/google-cloud-kms-inventory/samples/quickstart.js @@ -0,0 +1,74 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +function main(parent) { + // [START kmsinventory_quickstart] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The Google Cloud project for which to retrieve key metadata, in + * the format `projects/*` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of keys to return. The service may return + * fewer than this value. If unspecified, at most 1000 keys will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Pass this into a subsequent request in order to receive the next + * page of results. + */ + // const pageToken = 'abc123' + + // Imports the Inventory library + const {KeyDashboardServiceClient} = require('@google-cloud/kms-inventory').v1; + + // Instantiates a client + const inventoryClient = new KeyDashboardServiceClient(); + + async function callListCryptoKeys() { + // Construct request + const request = { + parent, + }; + + // Run request + const [response] = await inventoryClient.listCryptoKeys(request, { + maxResults: 1, + autoPaginate: false, + }); + console.log(response); + } + + callListCryptoKeys(); + // [END kmsinventory_quickstart] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-kms-inventory/samples/test/quickstart.js b/packages/google-cloud-kms-inventory/samples/test/quickstart.js new file mode 100644 index 00000000000..7f1e247651a --- /dev/null +++ b/packages/google-cloud-kms-inventory/samples/test/quickstart.js @@ -0,0 +1,41 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +const assert = require('assert'); +const path = require('path'); +const cp = require('child_process'); +const {describe, it, before} = require('mocha'); +const {KeyDashboardServiceClient} = require('@google-cloud/kms-inventory').v1; +const inventoryClient = new KeyDashboardServiceClient(); + +const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); + +const cwd = path.join(__dirname, '..'); + +describe('Quickstart', () => { + let projectId; + + before(async () => { + projectId = await inventoryClient.getProjectId(); + }); + + it('should run quickstart', async () => { + const output = execSync(`node ./quickstart.js projects/${projectId}`, { + cwd, + }); + assert(output !== null); + }); +}); diff --git a/packages/google-cloud-kms-inventory/src/index.ts b/packages/google-cloud-kms-inventory/src/index.ts new file mode 100644 index 00000000000..294ce1ec391 --- /dev/null +++ b/packages/google-cloud-kms-inventory/src/index.ts @@ -0,0 +1,29 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by synthtool. ** +// ** https://github.com/googleapis/synthtool ** +// ** All changes to this file may be overwritten. ** + +import * as v1 from './v1'; + +const KeyDashboardServiceClient = v1.KeyDashboardServiceClient; +type KeyDashboardServiceClient = v1.KeyDashboardServiceClient; +const KeyTrackingServiceClient = v1.KeyTrackingServiceClient; +type KeyTrackingServiceClient = v1.KeyTrackingServiceClient; + +export {v1, KeyDashboardServiceClient, KeyTrackingServiceClient}; +export default {v1, KeyDashboardServiceClient, KeyTrackingServiceClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-cloud-kms-inventory/src/v1/index.ts b/packages/google-cloud-kms-inventory/src/v1/index.ts new file mode 100644 index 00000000000..3f97e3eb8e7 --- /dev/null +++ b/packages/google-cloud-kms-inventory/src/v1/index.ts @@ -0,0 +1,20 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {KeyDashboardServiceClient} from './key_dashboard_service_client'; +export {KeyTrackingServiceClient} from './key_tracking_service_client'; diff --git a/packages/google-cloud-kms-inventory/src/v1/key_dashboard_service_client.ts b/packages/google-cloud-kms-inventory/src/v1/key_dashboard_service_client.ts new file mode 100644 index 00000000000..fa61e0727d5 --- /dev/null +++ b/packages/google-cloud-kms-inventory/src/v1/key_dashboard_service_client.ts @@ -0,0 +1,1152 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + GaxCall, +} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/key_dashboard_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './key_dashboard_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Provides a cross-region view of all Cloud KMS keys in a given Cloud project. + * @class + * @memberof v1 + */ +export class KeyDashboardServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + keyDashboardServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of KeyDashboardServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @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 KeyDashboardServiceClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof KeyDashboardServiceClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + cryptoKeyPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}' + ), + cryptoKeyVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}' + ), + importJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/keyRings/{key_ring}/importJobs/{import_job}' + ), + keyRingPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/keyRings/{key_ring}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}/protectedResourcesSummary' + ), + projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/protectedResourcesSummary' + ), + publicKeyPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}/publicKey' + ), + }; + + // 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 = { + listCryptoKeys: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'cryptoKeys' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.kms.inventory.v1.KeyDashboardService', + 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.keyDashboardServiceStub) { + return this.keyDashboardServiceStub; + } + + // Put together the "service stub" for + // google.cloud.kms.inventory.v1.KeyDashboardService. + this.keyDashboardServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.kms.inventory.v1.KeyDashboardService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.kms.inventory.v1 + .KeyDashboardService, + 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 keyDashboardServiceStubMethods = ['listCryptoKeys']; + for (const methodName of keyDashboardServiceStubMethods) { + const callPromise = this.keyDashboardServiceStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = this.descriptors.page[methodName] || undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.keyDashboardServiceStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'kmsinventory.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'kmsinventory.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + + /** + * Returns cryptographic keys managed by Cloud KMS in a given Cloud project. + * Note that this data is sourced from snapshots, meaning it may not + * completely reflect the actual state of key metadata at call time. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The Google Cloud project for which to retrieve key metadata, in + * the format `projects/*` + * @param {number} [request.pageSize] + * Optional. The maximum number of keys to return. The service may return + * fewer than this value. If unspecified, at most 1000 keys will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Pass this into a subsequent request in order to receive the next + * page of results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link google.cloud.kms.v1.CryptoKey | CryptoKey}. + * 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 `listCryptoKeysAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listCryptoKeys( + request?: protos.google.cloud.kms.inventory.v1.IListCryptoKeysRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.kms.v1.ICryptoKey[], + protos.google.cloud.kms.inventory.v1.IListCryptoKeysRequest | null, + protos.google.cloud.kms.inventory.v1.IListCryptoKeysResponse + ] + >; + listCryptoKeys( + request: protos.google.cloud.kms.inventory.v1.IListCryptoKeysRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.kms.inventory.v1.IListCryptoKeysRequest, + | protos.google.cloud.kms.inventory.v1.IListCryptoKeysResponse + | null + | undefined, + protos.google.cloud.kms.v1.ICryptoKey + > + ): void; + listCryptoKeys( + request: protos.google.cloud.kms.inventory.v1.IListCryptoKeysRequest, + callback: PaginationCallback< + protos.google.cloud.kms.inventory.v1.IListCryptoKeysRequest, + | protos.google.cloud.kms.inventory.v1.IListCryptoKeysResponse + | null + | undefined, + protos.google.cloud.kms.v1.ICryptoKey + > + ): void; + listCryptoKeys( + request?: protos.google.cloud.kms.inventory.v1.IListCryptoKeysRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.kms.inventory.v1.IListCryptoKeysRequest, + | protos.google.cloud.kms.inventory.v1.IListCryptoKeysResponse + | null + | undefined, + protos.google.cloud.kms.v1.ICryptoKey + >, + callback?: PaginationCallback< + protos.google.cloud.kms.inventory.v1.IListCryptoKeysRequest, + | protos.google.cloud.kms.inventory.v1.IListCryptoKeysResponse + | null + | undefined, + protos.google.cloud.kms.v1.ICryptoKey + > + ): Promise< + [ + protos.google.cloud.kms.v1.ICryptoKey[], + protos.google.cloud.kms.inventory.v1.IListCryptoKeysRequest | null, + protos.google.cloud.kms.inventory.v1.IListCryptoKeysResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listCryptoKeys(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The Google Cloud project for which to retrieve key metadata, in + * the format `projects/*` + * @param {number} [request.pageSize] + * Optional. The maximum number of keys to return. The service may return + * fewer than this value. If unspecified, at most 1000 keys will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Pass this into a subsequent request in order to receive the next + * page of results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link google.cloud.kms.v1.CryptoKey | CryptoKey} 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 `listCryptoKeysAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listCryptoKeysStream( + request?: protos.google.cloud.kms.inventory.v1.IListCryptoKeysRequest, + 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['listCryptoKeys']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listCryptoKeys.createStream( + this.innerApiCalls.listCryptoKeys as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listCryptoKeys`, 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 Google Cloud project for which to retrieve key metadata, in + * the format `projects/*` + * @param {number} [request.pageSize] + * Optional. The maximum number of keys to return. The service may return + * fewer than this value. If unspecified, at most 1000 keys will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Pass this into a subsequent request in order to receive the next + * page of results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.kms.v1.CryptoKey | CryptoKey}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/key_dashboard_service.list_crypto_keys.js + * region_tag:kmsinventory_v1_generated_KeyDashboardService_ListCryptoKeys_async + */ + listCryptoKeysAsync( + request?: protos.google.cloud.kms.inventory.v1.IListCryptoKeysRequest, + 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['listCryptoKeys']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listCryptoKeys.asyncIterate( + this.innerApiCalls['listCryptoKeys'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified cryptoKey resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} key_ring + * @param {string} crypto_key + * @returns {string} Resource name string. + */ + cryptoKeyPath( + project: string, + location: string, + keyRing: string, + cryptoKey: string + ) { + return this.pathTemplates.cryptoKeyPathTemplate.render({ + project: project, + location: location, + key_ring: keyRing, + crypto_key: cryptoKey, + }); + } + + /** + * Parse the project from CryptoKey resource. + * + * @param {string} cryptoKeyName + * A fully-qualified path representing CryptoKey resource. + * @returns {string} A string representing the project. + */ + matchProjectFromCryptoKeyName(cryptoKeyName: string) { + return this.pathTemplates.cryptoKeyPathTemplate.match(cryptoKeyName) + .project; + } + + /** + * Parse the location from CryptoKey resource. + * + * @param {string} cryptoKeyName + * A fully-qualified path representing CryptoKey resource. + * @returns {string} A string representing the location. + */ + matchLocationFromCryptoKeyName(cryptoKeyName: string) { + return this.pathTemplates.cryptoKeyPathTemplate.match(cryptoKeyName) + .location; + } + + /** + * Parse the key_ring from CryptoKey resource. + * + * @param {string} cryptoKeyName + * A fully-qualified path representing CryptoKey resource. + * @returns {string} A string representing the key_ring. + */ + matchKeyRingFromCryptoKeyName(cryptoKeyName: string) { + return this.pathTemplates.cryptoKeyPathTemplate.match(cryptoKeyName) + .key_ring; + } + + /** + * Parse the crypto_key from CryptoKey resource. + * + * @param {string} cryptoKeyName + * A fully-qualified path representing CryptoKey resource. + * @returns {string} A string representing the crypto_key. + */ + matchCryptoKeyFromCryptoKeyName(cryptoKeyName: string) { + return this.pathTemplates.cryptoKeyPathTemplate.match(cryptoKeyName) + .crypto_key; + } + + /** + * Return a fully-qualified cryptoKeyVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} key_ring + * @param {string} crypto_key + * @param {string} crypto_key_version + * @returns {string} Resource name string. + */ + cryptoKeyVersionPath( + project: string, + location: string, + keyRing: string, + cryptoKey: string, + cryptoKeyVersion: string + ) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.render({ + project: project, + location: location, + key_ring: keyRing, + crypto_key: cryptoKey, + crypto_key_version: cryptoKeyVersion, + }); + } + + /** + * Parse the project from CryptoKeyVersion resource. + * + * @param {string} cryptoKeyVersionName + * A fully-qualified path representing CryptoKeyVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromCryptoKeyVersionName(cryptoKeyVersionName: string) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.match( + cryptoKeyVersionName + ).project; + } + + /** + * Parse the location from CryptoKeyVersion resource. + * + * @param {string} cryptoKeyVersionName + * A fully-qualified path representing CryptoKeyVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromCryptoKeyVersionName(cryptoKeyVersionName: string) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.match( + cryptoKeyVersionName + ).location; + } + + /** + * Parse the key_ring from CryptoKeyVersion resource. + * + * @param {string} cryptoKeyVersionName + * A fully-qualified path representing CryptoKeyVersion resource. + * @returns {string} A string representing the key_ring. + */ + matchKeyRingFromCryptoKeyVersionName(cryptoKeyVersionName: string) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.match( + cryptoKeyVersionName + ).key_ring; + } + + /** + * Parse the crypto_key from CryptoKeyVersion resource. + * + * @param {string} cryptoKeyVersionName + * A fully-qualified path representing CryptoKeyVersion resource. + * @returns {string} A string representing the crypto_key. + */ + matchCryptoKeyFromCryptoKeyVersionName(cryptoKeyVersionName: string) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.match( + cryptoKeyVersionName + ).crypto_key; + } + + /** + * Parse the crypto_key_version from CryptoKeyVersion resource. + * + * @param {string} cryptoKeyVersionName + * A fully-qualified path representing CryptoKeyVersion resource. + * @returns {string} A string representing the crypto_key_version. + */ + matchCryptoKeyVersionFromCryptoKeyVersionName(cryptoKeyVersionName: string) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.match( + cryptoKeyVersionName + ).crypto_key_version; + } + + /** + * Return a fully-qualified importJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} key_ring + * @param {string} import_job + * @returns {string} Resource name string. + */ + importJobPath( + project: string, + location: string, + keyRing: string, + importJob: string + ) { + return this.pathTemplates.importJobPathTemplate.render({ + project: project, + location: location, + key_ring: keyRing, + import_job: importJob, + }); + } + + /** + * Parse the project from ImportJob resource. + * + * @param {string} importJobName + * A fully-qualified path representing ImportJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromImportJobName(importJobName: string) { + return this.pathTemplates.importJobPathTemplate.match(importJobName) + .project; + } + + /** + * Parse the location from ImportJob resource. + * + * @param {string} importJobName + * A fully-qualified path representing ImportJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromImportJobName(importJobName: string) { + return this.pathTemplates.importJobPathTemplate.match(importJobName) + .location; + } + + /** + * Parse the key_ring from ImportJob resource. + * + * @param {string} importJobName + * A fully-qualified path representing ImportJob resource. + * @returns {string} A string representing the key_ring. + */ + matchKeyRingFromImportJobName(importJobName: string) { + return this.pathTemplates.importJobPathTemplate.match(importJobName) + .key_ring; + } + + /** + * Parse the import_job from ImportJob resource. + * + * @param {string} importJobName + * A fully-qualified path representing ImportJob resource. + * @returns {string} A string representing the import_job. + */ + matchImportJobFromImportJobName(importJobName: string) { + return this.pathTemplates.importJobPathTemplate.match(importJobName) + .import_job; + } + + /** + * Return a fully-qualified keyRing resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} key_ring + * @returns {string} Resource name string. + */ + keyRingPath(project: string, location: string, keyRing: string) { + return this.pathTemplates.keyRingPathTemplate.render({ + project: project, + location: location, + key_ring: keyRing, + }); + } + + /** + * Parse the project from KeyRing resource. + * + * @param {string} keyRingName + * A fully-qualified path representing KeyRing resource. + * @returns {string} A string representing the project. + */ + matchProjectFromKeyRingName(keyRingName: string) { + return this.pathTemplates.keyRingPathTemplate.match(keyRingName).project; + } + + /** + * Parse the location from KeyRing resource. + * + * @param {string} keyRingName + * A fully-qualified path representing KeyRing resource. + * @returns {string} A string representing the location. + */ + matchLocationFromKeyRingName(keyRingName: string) { + return this.pathTemplates.keyRingPathTemplate.match(keyRingName).location; + } + + /** + * Parse the key_ring from KeyRing resource. + * + * @param {string} keyRingName + * A fully-qualified path representing KeyRing resource. + * @returns {string} A string representing the key_ring. + */ + matchKeyRingFromKeyRingName(keyRingName: string) { + return this.pathTemplates.keyRingPathTemplate.match(keyRingName).key_ring; + } + + /** + * 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; + } + + /** + * Return a fully-qualified projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummary resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} key_ring + * @param {string} crypto_key + * @param {string} crypto_key_version + * @returns {string} Resource name string. + */ + projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPath( + project: string, + location: string, + keyRing: string, + cryptoKey: string, + cryptoKeyVersion: string + ) { + return this.pathTemplates.projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate.render( + { + project: project, + location: location, + key_ring: keyRing, + crypto_key: cryptoKey, + crypto_key_version: cryptoKeyVersion, + } + ); + } + + /** + * Parse the project from ProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummary resource. + * + * @param {string} projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName + * A fully-qualified path representing project_location_key_ring_crypto_key_crypto_key_version_protectedResourcesSummary resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName( + projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName: string + ) { + return this.pathTemplates.projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate.match( + projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName + ).project; + } + + /** + * Parse the location from ProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummary resource. + * + * @param {string} projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName + * A fully-qualified path representing project_location_key_ring_crypto_key_crypto_key_version_protectedResourcesSummary resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName( + projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName: string + ) { + return this.pathTemplates.projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate.match( + projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName + ).location; + } + + /** + * Parse the key_ring from ProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummary resource. + * + * @param {string} projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName + * A fully-qualified path representing project_location_key_ring_crypto_key_crypto_key_version_protectedResourcesSummary resource. + * @returns {string} A string representing the key_ring. + */ + matchKeyRingFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName( + projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName: string + ) { + return this.pathTemplates.projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate.match( + projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName + ).key_ring; + } + + /** + * Parse the crypto_key from ProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummary resource. + * + * @param {string} projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName + * A fully-qualified path representing project_location_key_ring_crypto_key_crypto_key_version_protectedResourcesSummary resource. + * @returns {string} A string representing the crypto_key. + */ + matchCryptoKeyFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName( + projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName: string + ) { + return this.pathTemplates.projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate.match( + projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName + ).crypto_key; + } + + /** + * Parse the crypto_key_version from ProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummary resource. + * + * @param {string} projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName + * A fully-qualified path representing project_location_key_ring_crypto_key_crypto_key_version_protectedResourcesSummary resource. + * @returns {string} A string representing the crypto_key_version. + */ + matchCryptoKeyVersionFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName( + projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName: string + ) { + return this.pathTemplates.projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate.match( + projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName + ).crypto_key_version; + } + + /** + * Return a fully-qualified projectLocationKeyRingCryptoKeyProtectedResourcesSummary resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} key_ring + * @param {string} crypto_key + * @returns {string} Resource name string. + */ + projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPath( + project: string, + location: string, + keyRing: string, + cryptoKey: string + ) { + return this.pathTemplates.projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate.render( + { + project: project, + location: location, + key_ring: keyRing, + crypto_key: cryptoKey, + } + ); + } + + /** + * Parse the project from ProjectLocationKeyRingCryptoKeyProtectedResourcesSummary resource. + * + * @param {string} projectLocationKeyRingCryptoKeyProtectedResourcesSummaryName + * A fully-qualified path representing project_location_key_ring_crypto_key_protectedResourcesSummary resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationKeyRingCryptoKeyProtectedResourcesSummaryName( + projectLocationKeyRingCryptoKeyProtectedResourcesSummaryName: string + ) { + return this.pathTemplates.projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate.match( + projectLocationKeyRingCryptoKeyProtectedResourcesSummaryName + ).project; + } + + /** + * Parse the location from ProjectLocationKeyRingCryptoKeyProtectedResourcesSummary resource. + * + * @param {string} projectLocationKeyRingCryptoKeyProtectedResourcesSummaryName + * A fully-qualified path representing project_location_key_ring_crypto_key_protectedResourcesSummary resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationKeyRingCryptoKeyProtectedResourcesSummaryName( + projectLocationKeyRingCryptoKeyProtectedResourcesSummaryName: string + ) { + return this.pathTemplates.projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate.match( + projectLocationKeyRingCryptoKeyProtectedResourcesSummaryName + ).location; + } + + /** + * Parse the key_ring from ProjectLocationKeyRingCryptoKeyProtectedResourcesSummary resource. + * + * @param {string} projectLocationKeyRingCryptoKeyProtectedResourcesSummaryName + * A fully-qualified path representing project_location_key_ring_crypto_key_protectedResourcesSummary resource. + * @returns {string} A string representing the key_ring. + */ + matchKeyRingFromProjectLocationKeyRingCryptoKeyProtectedResourcesSummaryName( + projectLocationKeyRingCryptoKeyProtectedResourcesSummaryName: string + ) { + return this.pathTemplates.projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate.match( + projectLocationKeyRingCryptoKeyProtectedResourcesSummaryName + ).key_ring; + } + + /** + * Parse the crypto_key from ProjectLocationKeyRingCryptoKeyProtectedResourcesSummary resource. + * + * @param {string} projectLocationKeyRingCryptoKeyProtectedResourcesSummaryName + * A fully-qualified path representing project_location_key_ring_crypto_key_protectedResourcesSummary resource. + * @returns {string} A string representing the crypto_key. + */ + matchCryptoKeyFromProjectLocationKeyRingCryptoKeyProtectedResourcesSummaryName( + projectLocationKeyRingCryptoKeyProtectedResourcesSummaryName: string + ) { + return this.pathTemplates.projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate.match( + projectLocationKeyRingCryptoKeyProtectedResourcesSummaryName + ).crypto_key; + } + + /** + * Return a fully-qualified publicKey resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} key_ring + * @param {string} crypto_key + * @param {string} crypto_key_version + * @returns {string} Resource name string. + */ + publicKeyPath( + project: string, + location: string, + keyRing: string, + cryptoKey: string, + cryptoKeyVersion: string + ) { + return this.pathTemplates.publicKeyPathTemplate.render({ + project: project, + location: location, + key_ring: keyRing, + crypto_key: cryptoKey, + crypto_key_version: cryptoKeyVersion, + }); + } + + /** + * Parse the project from PublicKey resource. + * + * @param {string} publicKeyName + * A fully-qualified path representing PublicKey resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPublicKeyName(publicKeyName: string) { + return this.pathTemplates.publicKeyPathTemplate.match(publicKeyName) + .project; + } + + /** + * Parse the location from PublicKey resource. + * + * @param {string} publicKeyName + * A fully-qualified path representing PublicKey resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPublicKeyName(publicKeyName: string) { + return this.pathTemplates.publicKeyPathTemplate.match(publicKeyName) + .location; + } + + /** + * Parse the key_ring from PublicKey resource. + * + * @param {string} publicKeyName + * A fully-qualified path representing PublicKey resource. + * @returns {string} A string representing the key_ring. + */ + matchKeyRingFromPublicKeyName(publicKeyName: string) { + return this.pathTemplates.publicKeyPathTemplate.match(publicKeyName) + .key_ring; + } + + /** + * Parse the crypto_key from PublicKey resource. + * + * @param {string} publicKeyName + * A fully-qualified path representing PublicKey resource. + * @returns {string} A string representing the crypto_key. + */ + matchCryptoKeyFromPublicKeyName(publicKeyName: string) { + return this.pathTemplates.publicKeyPathTemplate.match(publicKeyName) + .crypto_key; + } + + /** + * Parse the crypto_key_version from PublicKey resource. + * + * @param {string} publicKeyName + * A fully-qualified path representing PublicKey resource. + * @returns {string} A string representing the crypto_key_version. + */ + matchCryptoKeyVersionFromPublicKeyName(publicKeyName: string) { + return this.pathTemplates.publicKeyPathTemplate.match(publicKeyName) + .crypto_key_version; + } + + /** + * 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.keyDashboardServiceStub && !this._terminated) { + return this.keyDashboardServiceStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-kms-inventory/src/v1/key_dashboard_service_client_config.json b/packages/google-cloud-kms-inventory/src/v1/key_dashboard_service_client_config.json new file mode 100644 index 00000000000..2b60e8b9192 --- /dev/null +++ b/packages/google-cloud-kms-inventory/src/v1/key_dashboard_service_client_config.json @@ -0,0 +1,31 @@ +{ + "interfaces": { + "google.cloud.kms.inventory.v1.KeyDashboardService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "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 + } + }, + "methods": { + "ListCryptoKeys": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-kms-inventory/src/v1/key_dashboard_service_proto_list.json b/packages/google-cloud-kms-inventory/src/v1/key_dashboard_service_proto_list.json new file mode 100644 index 00000000000..c3534b31a62 --- /dev/null +++ b/packages/google-cloud-kms-inventory/src/v1/key_dashboard_service_proto_list.json @@ -0,0 +1,5 @@ +[ + "../../protos/google/cloud/kms/inventory/v1/key_dashboard_service.proto", + "../../protos/google/cloud/kms/inventory/v1/key_tracking_service.proto", + "../../protos/google/cloud/kms/v1/resources.proto" +] diff --git a/packages/google-cloud-kms-inventory/src/v1/key_tracking_service_client.ts b/packages/google-cloud-kms-inventory/src/v1/key_tracking_service_client.ts new file mode 100644 index 00000000000..b080331ef52 --- /dev/null +++ b/packages/google-cloud-kms-inventory/src/v1/key_tracking_service_client.ts @@ -0,0 +1,1293 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + GaxCall, +} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/key_tracking_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './key_tracking_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Returns information about the resources in an org that are protected by a + * given Cloud KMS key via CMEK. + * @class + * @memberof v1 + */ +export class KeyTrackingServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + keyTrackingServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of KeyTrackingServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @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 KeyTrackingServiceClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof KeyTrackingServiceClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + cryptoKeyPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}' + ), + cryptoKeyVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}' + ), + importJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/keyRings/{key_ring}/importJobs/{import_job}' + ), + keyRingPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/keyRings/{key_ring}' + ), + organizationPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}' + ), + projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}/protectedResourcesSummary' + ), + projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/protectedResourcesSummary' + ), + publicKeyPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}/publicKey' + ), + }; + + // 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 = { + searchProtectedResources: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'protectedResources' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.kms.inventory.v1.KeyTrackingService', + 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.keyTrackingServiceStub) { + return this.keyTrackingServiceStub; + } + + // Put together the "service stub" for + // google.cloud.kms.inventory.v1.KeyTrackingService. + this.keyTrackingServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.kms.inventory.v1.KeyTrackingService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.kms.inventory.v1 + .KeyTrackingService, + 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 keyTrackingServiceStubMethods = [ + 'getProtectedResourcesSummary', + 'searchProtectedResources', + ]; + for (const methodName of keyTrackingServiceStubMethods) { + const callPromise = this.keyTrackingServiceStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = this.descriptors.page[methodName] || undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.keyTrackingServiceStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'kmsinventory.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'kmsinventory.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Returns aggregate information about the resources protected by the given + * Cloud KMS {@link google.cloud.kms.v1.CryptoKey|CryptoKey}. Only resources within + * the same Cloud organization as the key will be returned. The project that + * holds the key must be part of an organization in order for this call to + * succeed. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the + * {@link google.cloud.kms.v1.CryptoKey|CryptoKey}. + * @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.kms.inventory.v1.ProtectedResourcesSummary | ProtectedResourcesSummary}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/key_tracking_service.get_protected_resources_summary.js + * region_tag:kmsinventory_v1_generated_KeyTrackingService_GetProtectedResourcesSummary_async + */ + getProtectedResourcesSummary( + request?: protos.google.cloud.kms.inventory.v1.IGetProtectedResourcesSummaryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.kms.inventory.v1.IProtectedResourcesSummary, + ( + | protos.google.cloud.kms.inventory.v1.IGetProtectedResourcesSummaryRequest + | undefined + ), + {} | undefined + ] + >; + getProtectedResourcesSummary( + request: protos.google.cloud.kms.inventory.v1.IGetProtectedResourcesSummaryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.kms.inventory.v1.IProtectedResourcesSummary, + | protos.google.cloud.kms.inventory.v1.IGetProtectedResourcesSummaryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getProtectedResourcesSummary( + request: protos.google.cloud.kms.inventory.v1.IGetProtectedResourcesSummaryRequest, + callback: Callback< + protos.google.cloud.kms.inventory.v1.IProtectedResourcesSummary, + | protos.google.cloud.kms.inventory.v1.IGetProtectedResourcesSummaryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getProtectedResourcesSummary( + request?: protos.google.cloud.kms.inventory.v1.IGetProtectedResourcesSummaryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.kms.inventory.v1.IProtectedResourcesSummary, + | protos.google.cloud.kms.inventory.v1.IGetProtectedResourcesSummaryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.kms.inventory.v1.IProtectedResourcesSummary, + | protos.google.cloud.kms.inventory.v1.IGetProtectedResourcesSummaryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.kms.inventory.v1.IProtectedResourcesSummary, + ( + | protos.google.cloud.kms.inventory.v1.IGetProtectedResourcesSummaryRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getProtectedResourcesSummary( + request, + options, + callback + ); + } + + /** + * Returns metadata about the resources protected by the given Cloud KMS + * {@link google.cloud.kms.v1.CryptoKey|CryptoKey} in the given Cloud organization. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.scope + * Required. Resource name of the organization. + * Example: organizations/123 + * @param {string} request.cryptoKey + * Required. The resource name of the + * {@link google.cloud.kms.v1.CryptoKey|CryptoKey}. + * @param {number} request.pageSize + * The maximum number of resources to return. The service may return fewer + * than this value. + * If unspecified, at most 500 resources will be returned. + * The maximum value is 500; values above 500 will be coerced to 500. + * @param {string} request.pageToken + * A page token, received from a previous + * {@link google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources|KeyTrackingService.SearchProtectedResources} + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * {@link google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources|KeyTrackingService.SearchProtectedResources} + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link google.cloud.kms.inventory.v1.ProtectedResource | ProtectedResource}. + * 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 `searchProtectedResourcesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + searchProtectedResources( + request?: protos.google.cloud.kms.inventory.v1.ISearchProtectedResourcesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.kms.inventory.v1.IProtectedResource[], + protos.google.cloud.kms.inventory.v1.ISearchProtectedResourcesRequest | null, + protos.google.cloud.kms.inventory.v1.ISearchProtectedResourcesResponse + ] + >; + searchProtectedResources( + request: protos.google.cloud.kms.inventory.v1.ISearchProtectedResourcesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.kms.inventory.v1.ISearchProtectedResourcesRequest, + | protos.google.cloud.kms.inventory.v1.ISearchProtectedResourcesResponse + | null + | undefined, + protos.google.cloud.kms.inventory.v1.IProtectedResource + > + ): void; + searchProtectedResources( + request: protos.google.cloud.kms.inventory.v1.ISearchProtectedResourcesRequest, + callback: PaginationCallback< + protos.google.cloud.kms.inventory.v1.ISearchProtectedResourcesRequest, + | protos.google.cloud.kms.inventory.v1.ISearchProtectedResourcesResponse + | null + | undefined, + protos.google.cloud.kms.inventory.v1.IProtectedResource + > + ): void; + searchProtectedResources( + request?: protos.google.cloud.kms.inventory.v1.ISearchProtectedResourcesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.kms.inventory.v1.ISearchProtectedResourcesRequest, + | protos.google.cloud.kms.inventory.v1.ISearchProtectedResourcesResponse + | null + | undefined, + protos.google.cloud.kms.inventory.v1.IProtectedResource + >, + callback?: PaginationCallback< + protos.google.cloud.kms.inventory.v1.ISearchProtectedResourcesRequest, + | protos.google.cloud.kms.inventory.v1.ISearchProtectedResourcesResponse + | null + | undefined, + protos.google.cloud.kms.inventory.v1.IProtectedResource + > + ): Promise< + [ + protos.google.cloud.kms.inventory.v1.IProtectedResource[], + protos.google.cloud.kms.inventory.v1.ISearchProtectedResourcesRequest | null, + protos.google.cloud.kms.inventory.v1.ISearchProtectedResourcesResponse + ] + > | 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({ + scope: request.scope ?? '', + }); + this.initialize(); + return this.innerApiCalls.searchProtectedResources( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.scope + * Required. Resource name of the organization. + * Example: organizations/123 + * @param {string} request.cryptoKey + * Required. The resource name of the + * {@link google.cloud.kms.v1.CryptoKey|CryptoKey}. + * @param {number} request.pageSize + * The maximum number of resources to return. The service may return fewer + * than this value. + * If unspecified, at most 500 resources will be returned. + * The maximum value is 500; values above 500 will be coerced to 500. + * @param {string} request.pageToken + * A page token, received from a previous + * {@link google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources|KeyTrackingService.SearchProtectedResources} + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * {@link google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources|KeyTrackingService.SearchProtectedResources} + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link google.cloud.kms.inventory.v1.ProtectedResource | ProtectedResource} 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 `searchProtectedResourcesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + searchProtectedResourcesStream( + request?: protos.google.cloud.kms.inventory.v1.ISearchProtectedResourcesRequest, + 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({ + scope: request.scope ?? '', + }); + const defaultCallSettings = this._defaults['searchProtectedResources']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.searchProtectedResources.createStream( + this.innerApiCalls.searchProtectedResources as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `searchProtectedResources`, 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.scope + * Required. Resource name of the organization. + * Example: organizations/123 + * @param {string} request.cryptoKey + * Required. The resource name of the + * {@link google.cloud.kms.v1.CryptoKey|CryptoKey}. + * @param {number} request.pageSize + * The maximum number of resources to return. The service may return fewer + * than this value. + * If unspecified, at most 500 resources will be returned. + * The maximum value is 500; values above 500 will be coerced to 500. + * @param {string} request.pageToken + * A page token, received from a previous + * {@link google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources|KeyTrackingService.SearchProtectedResources} + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * {@link google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources|KeyTrackingService.SearchProtectedResources} + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.kms.inventory.v1.ProtectedResource | ProtectedResource}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/key_tracking_service.search_protected_resources.js + * region_tag:kmsinventory_v1_generated_KeyTrackingService_SearchProtectedResources_async + */ + searchProtectedResourcesAsync( + request?: protos.google.cloud.kms.inventory.v1.ISearchProtectedResourcesRequest, + 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({ + scope: request.scope ?? '', + }); + const defaultCallSettings = this._defaults['searchProtectedResources']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.searchProtectedResources.asyncIterate( + this.innerApiCalls['searchProtectedResources'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified cryptoKey resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} key_ring + * @param {string} crypto_key + * @returns {string} Resource name string. + */ + cryptoKeyPath( + project: string, + location: string, + keyRing: string, + cryptoKey: string + ) { + return this.pathTemplates.cryptoKeyPathTemplate.render({ + project: project, + location: location, + key_ring: keyRing, + crypto_key: cryptoKey, + }); + } + + /** + * Parse the project from CryptoKey resource. + * + * @param {string} cryptoKeyName + * A fully-qualified path representing CryptoKey resource. + * @returns {string} A string representing the project. + */ + matchProjectFromCryptoKeyName(cryptoKeyName: string) { + return this.pathTemplates.cryptoKeyPathTemplate.match(cryptoKeyName) + .project; + } + + /** + * Parse the location from CryptoKey resource. + * + * @param {string} cryptoKeyName + * A fully-qualified path representing CryptoKey resource. + * @returns {string} A string representing the location. + */ + matchLocationFromCryptoKeyName(cryptoKeyName: string) { + return this.pathTemplates.cryptoKeyPathTemplate.match(cryptoKeyName) + .location; + } + + /** + * Parse the key_ring from CryptoKey resource. + * + * @param {string} cryptoKeyName + * A fully-qualified path representing CryptoKey resource. + * @returns {string} A string representing the key_ring. + */ + matchKeyRingFromCryptoKeyName(cryptoKeyName: string) { + return this.pathTemplates.cryptoKeyPathTemplate.match(cryptoKeyName) + .key_ring; + } + + /** + * Parse the crypto_key from CryptoKey resource. + * + * @param {string} cryptoKeyName + * A fully-qualified path representing CryptoKey resource. + * @returns {string} A string representing the crypto_key. + */ + matchCryptoKeyFromCryptoKeyName(cryptoKeyName: string) { + return this.pathTemplates.cryptoKeyPathTemplate.match(cryptoKeyName) + .crypto_key; + } + + /** + * Return a fully-qualified cryptoKeyVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} key_ring + * @param {string} crypto_key + * @param {string} crypto_key_version + * @returns {string} Resource name string. + */ + cryptoKeyVersionPath( + project: string, + location: string, + keyRing: string, + cryptoKey: string, + cryptoKeyVersion: string + ) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.render({ + project: project, + location: location, + key_ring: keyRing, + crypto_key: cryptoKey, + crypto_key_version: cryptoKeyVersion, + }); + } + + /** + * Parse the project from CryptoKeyVersion resource. + * + * @param {string} cryptoKeyVersionName + * A fully-qualified path representing CryptoKeyVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromCryptoKeyVersionName(cryptoKeyVersionName: string) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.match( + cryptoKeyVersionName + ).project; + } + + /** + * Parse the location from CryptoKeyVersion resource. + * + * @param {string} cryptoKeyVersionName + * A fully-qualified path representing CryptoKeyVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromCryptoKeyVersionName(cryptoKeyVersionName: string) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.match( + cryptoKeyVersionName + ).location; + } + + /** + * Parse the key_ring from CryptoKeyVersion resource. + * + * @param {string} cryptoKeyVersionName + * A fully-qualified path representing CryptoKeyVersion resource. + * @returns {string} A string representing the key_ring. + */ + matchKeyRingFromCryptoKeyVersionName(cryptoKeyVersionName: string) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.match( + cryptoKeyVersionName + ).key_ring; + } + + /** + * Parse the crypto_key from CryptoKeyVersion resource. + * + * @param {string} cryptoKeyVersionName + * A fully-qualified path representing CryptoKeyVersion resource. + * @returns {string} A string representing the crypto_key. + */ + matchCryptoKeyFromCryptoKeyVersionName(cryptoKeyVersionName: string) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.match( + cryptoKeyVersionName + ).crypto_key; + } + + /** + * Parse the crypto_key_version from CryptoKeyVersion resource. + * + * @param {string} cryptoKeyVersionName + * A fully-qualified path representing CryptoKeyVersion resource. + * @returns {string} A string representing the crypto_key_version. + */ + matchCryptoKeyVersionFromCryptoKeyVersionName(cryptoKeyVersionName: string) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.match( + cryptoKeyVersionName + ).crypto_key_version; + } + + /** + * Return a fully-qualified importJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} key_ring + * @param {string} import_job + * @returns {string} Resource name string. + */ + importJobPath( + project: string, + location: string, + keyRing: string, + importJob: string + ) { + return this.pathTemplates.importJobPathTemplate.render({ + project: project, + location: location, + key_ring: keyRing, + import_job: importJob, + }); + } + + /** + * Parse the project from ImportJob resource. + * + * @param {string} importJobName + * A fully-qualified path representing ImportJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromImportJobName(importJobName: string) { + return this.pathTemplates.importJobPathTemplate.match(importJobName) + .project; + } + + /** + * Parse the location from ImportJob resource. + * + * @param {string} importJobName + * A fully-qualified path representing ImportJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromImportJobName(importJobName: string) { + return this.pathTemplates.importJobPathTemplate.match(importJobName) + .location; + } + + /** + * Parse the key_ring from ImportJob resource. + * + * @param {string} importJobName + * A fully-qualified path representing ImportJob resource. + * @returns {string} A string representing the key_ring. + */ + matchKeyRingFromImportJobName(importJobName: string) { + return this.pathTemplates.importJobPathTemplate.match(importJobName) + .key_ring; + } + + /** + * Parse the import_job from ImportJob resource. + * + * @param {string} importJobName + * A fully-qualified path representing ImportJob resource. + * @returns {string} A string representing the import_job. + */ + matchImportJobFromImportJobName(importJobName: string) { + return this.pathTemplates.importJobPathTemplate.match(importJobName) + .import_job; + } + + /** + * Return a fully-qualified keyRing resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} key_ring + * @returns {string} Resource name string. + */ + keyRingPath(project: string, location: string, keyRing: string) { + return this.pathTemplates.keyRingPathTemplate.render({ + project: project, + location: location, + key_ring: keyRing, + }); + } + + /** + * Parse the project from KeyRing resource. + * + * @param {string} keyRingName + * A fully-qualified path representing KeyRing resource. + * @returns {string} A string representing the project. + */ + matchProjectFromKeyRingName(keyRingName: string) { + return this.pathTemplates.keyRingPathTemplate.match(keyRingName).project; + } + + /** + * Parse the location from KeyRing resource. + * + * @param {string} keyRingName + * A fully-qualified path representing KeyRing resource. + * @returns {string} A string representing the location. + */ + matchLocationFromKeyRingName(keyRingName: string) { + return this.pathTemplates.keyRingPathTemplate.match(keyRingName).location; + } + + /** + * Parse the key_ring from KeyRing resource. + * + * @param {string} keyRingName + * A fully-qualified path representing KeyRing resource. + * @returns {string} A string representing the key_ring. + */ + matchKeyRingFromKeyRingName(keyRingName: string) { + return this.pathTemplates.keyRingPathTemplate.match(keyRingName).key_ring; + } + + /** + * Return a fully-qualified organization resource name string. + * + * @param {string} organization + * @returns {string} Resource name string. + */ + organizationPath(organization: string) { + return this.pathTemplates.organizationPathTemplate.render({ + organization: organization, + }); + } + + /** + * Parse the organization from Organization resource. + * + * @param {string} organizationName + * A fully-qualified path representing Organization resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationName(organizationName: string) { + return this.pathTemplates.organizationPathTemplate.match(organizationName) + .organization; + } + + /** + * Return a fully-qualified projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummary resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} key_ring + * @param {string} crypto_key + * @param {string} crypto_key_version + * @returns {string} Resource name string. + */ + projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPath( + project: string, + location: string, + keyRing: string, + cryptoKey: string, + cryptoKeyVersion: string + ) { + return this.pathTemplates.projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate.render( + { + project: project, + location: location, + key_ring: keyRing, + crypto_key: cryptoKey, + crypto_key_version: cryptoKeyVersion, + } + ); + } + + /** + * Parse the project from ProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummary resource. + * + * @param {string} projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName + * A fully-qualified path representing project_location_key_ring_crypto_key_crypto_key_version_protectedResourcesSummary resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName( + projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName: string + ) { + return this.pathTemplates.projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate.match( + projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName + ).project; + } + + /** + * Parse the location from ProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummary resource. + * + * @param {string} projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName + * A fully-qualified path representing project_location_key_ring_crypto_key_crypto_key_version_protectedResourcesSummary resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName( + projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName: string + ) { + return this.pathTemplates.projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate.match( + projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName + ).location; + } + + /** + * Parse the key_ring from ProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummary resource. + * + * @param {string} projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName + * A fully-qualified path representing project_location_key_ring_crypto_key_crypto_key_version_protectedResourcesSummary resource. + * @returns {string} A string representing the key_ring. + */ + matchKeyRingFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName( + projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName: string + ) { + return this.pathTemplates.projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate.match( + projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName + ).key_ring; + } + + /** + * Parse the crypto_key from ProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummary resource. + * + * @param {string} projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName + * A fully-qualified path representing project_location_key_ring_crypto_key_crypto_key_version_protectedResourcesSummary resource. + * @returns {string} A string representing the crypto_key. + */ + matchCryptoKeyFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName( + projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName: string + ) { + return this.pathTemplates.projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate.match( + projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName + ).crypto_key; + } + + /** + * Parse the crypto_key_version from ProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummary resource. + * + * @param {string} projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName + * A fully-qualified path representing project_location_key_ring_crypto_key_crypto_key_version_protectedResourcesSummary resource. + * @returns {string} A string representing the crypto_key_version. + */ + matchCryptoKeyVersionFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName( + projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName: string + ) { + return this.pathTemplates.projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate.match( + projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName + ).crypto_key_version; + } + + /** + * Return a fully-qualified projectLocationKeyRingCryptoKeyProtectedResourcesSummary resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} key_ring + * @param {string} crypto_key + * @returns {string} Resource name string. + */ + projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPath( + project: string, + location: string, + keyRing: string, + cryptoKey: string + ) { + return this.pathTemplates.projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate.render( + { + project: project, + location: location, + key_ring: keyRing, + crypto_key: cryptoKey, + } + ); + } + + /** + * Parse the project from ProjectLocationKeyRingCryptoKeyProtectedResourcesSummary resource. + * + * @param {string} projectLocationKeyRingCryptoKeyProtectedResourcesSummaryName + * A fully-qualified path representing project_location_key_ring_crypto_key_protectedResourcesSummary resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationKeyRingCryptoKeyProtectedResourcesSummaryName( + projectLocationKeyRingCryptoKeyProtectedResourcesSummaryName: string + ) { + return this.pathTemplates.projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate.match( + projectLocationKeyRingCryptoKeyProtectedResourcesSummaryName + ).project; + } + + /** + * Parse the location from ProjectLocationKeyRingCryptoKeyProtectedResourcesSummary resource. + * + * @param {string} projectLocationKeyRingCryptoKeyProtectedResourcesSummaryName + * A fully-qualified path representing project_location_key_ring_crypto_key_protectedResourcesSummary resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationKeyRingCryptoKeyProtectedResourcesSummaryName( + projectLocationKeyRingCryptoKeyProtectedResourcesSummaryName: string + ) { + return this.pathTemplates.projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate.match( + projectLocationKeyRingCryptoKeyProtectedResourcesSummaryName + ).location; + } + + /** + * Parse the key_ring from ProjectLocationKeyRingCryptoKeyProtectedResourcesSummary resource. + * + * @param {string} projectLocationKeyRingCryptoKeyProtectedResourcesSummaryName + * A fully-qualified path representing project_location_key_ring_crypto_key_protectedResourcesSummary resource. + * @returns {string} A string representing the key_ring. + */ + matchKeyRingFromProjectLocationKeyRingCryptoKeyProtectedResourcesSummaryName( + projectLocationKeyRingCryptoKeyProtectedResourcesSummaryName: string + ) { + return this.pathTemplates.projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate.match( + projectLocationKeyRingCryptoKeyProtectedResourcesSummaryName + ).key_ring; + } + + /** + * Parse the crypto_key from ProjectLocationKeyRingCryptoKeyProtectedResourcesSummary resource. + * + * @param {string} projectLocationKeyRingCryptoKeyProtectedResourcesSummaryName + * A fully-qualified path representing project_location_key_ring_crypto_key_protectedResourcesSummary resource. + * @returns {string} A string representing the crypto_key. + */ + matchCryptoKeyFromProjectLocationKeyRingCryptoKeyProtectedResourcesSummaryName( + projectLocationKeyRingCryptoKeyProtectedResourcesSummaryName: string + ) { + return this.pathTemplates.projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate.match( + projectLocationKeyRingCryptoKeyProtectedResourcesSummaryName + ).crypto_key; + } + + /** + * Return a fully-qualified publicKey resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} key_ring + * @param {string} crypto_key + * @param {string} crypto_key_version + * @returns {string} Resource name string. + */ + publicKeyPath( + project: string, + location: string, + keyRing: string, + cryptoKey: string, + cryptoKeyVersion: string + ) { + return this.pathTemplates.publicKeyPathTemplate.render({ + project: project, + location: location, + key_ring: keyRing, + crypto_key: cryptoKey, + crypto_key_version: cryptoKeyVersion, + }); + } + + /** + * Parse the project from PublicKey resource. + * + * @param {string} publicKeyName + * A fully-qualified path representing PublicKey resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPublicKeyName(publicKeyName: string) { + return this.pathTemplates.publicKeyPathTemplate.match(publicKeyName) + .project; + } + + /** + * Parse the location from PublicKey resource. + * + * @param {string} publicKeyName + * A fully-qualified path representing PublicKey resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPublicKeyName(publicKeyName: string) { + return this.pathTemplates.publicKeyPathTemplate.match(publicKeyName) + .location; + } + + /** + * Parse the key_ring from PublicKey resource. + * + * @param {string} publicKeyName + * A fully-qualified path representing PublicKey resource. + * @returns {string} A string representing the key_ring. + */ + matchKeyRingFromPublicKeyName(publicKeyName: string) { + return this.pathTemplates.publicKeyPathTemplate.match(publicKeyName) + .key_ring; + } + + /** + * Parse the crypto_key from PublicKey resource. + * + * @param {string} publicKeyName + * A fully-qualified path representing PublicKey resource. + * @returns {string} A string representing the crypto_key. + */ + matchCryptoKeyFromPublicKeyName(publicKeyName: string) { + return this.pathTemplates.publicKeyPathTemplate.match(publicKeyName) + .crypto_key; + } + + /** + * Parse the crypto_key_version from PublicKey resource. + * + * @param {string} publicKeyName + * A fully-qualified path representing PublicKey resource. + * @returns {string} A string representing the crypto_key_version. + */ + matchCryptoKeyVersionFromPublicKeyName(publicKeyName: string) { + return this.pathTemplates.publicKeyPathTemplate.match(publicKeyName) + .crypto_key_version; + } + + /** + * 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.keyTrackingServiceStub && !this._terminated) { + return this.keyTrackingServiceStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-kms-inventory/src/v1/key_tracking_service_client_config.json b/packages/google-cloud-kms-inventory/src/v1/key_tracking_service_client_config.json new file mode 100644 index 00000000000..c3128be608e --- /dev/null +++ b/packages/google-cloud-kms-inventory/src/v1/key_tracking_service_client_config.json @@ -0,0 +1,36 @@ +{ + "interfaces": { + "google.cloud.kms.inventory.v1.KeyTrackingService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "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 + } + }, + "methods": { + "GetProtectedResourcesSummary": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SearchProtectedResources": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-kms-inventory/src/v1/key_tracking_service_proto_list.json b/packages/google-cloud-kms-inventory/src/v1/key_tracking_service_proto_list.json new file mode 100644 index 00000000000..c3534b31a62 --- /dev/null +++ b/packages/google-cloud-kms-inventory/src/v1/key_tracking_service_proto_list.json @@ -0,0 +1,5 @@ +[ + "../../protos/google/cloud/kms/inventory/v1/key_dashboard_service.proto", + "../../protos/google/cloud/kms/inventory/v1/key_tracking_service.proto", + "../../protos/google/cloud/kms/v1/resources.proto" +] diff --git a/packages/google-cloud-kms-inventory/system-test/fixtures/sample/src/index.js b/packages/google-cloud-kms-inventory/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..f663bec463a --- /dev/null +++ b/packages/google-cloud-kms-inventory/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 inventory = require('@google-cloud/kms-inventory'); + +function main() { + const keyDashboardServiceClient = new inventory.KeyDashboardServiceClient(); + const keyTrackingServiceClient = new inventory.KeyTrackingServiceClient(); +} + +main(); diff --git a/packages/google-cloud-kms-inventory/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-kms-inventory/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..164ac4fb0ab --- /dev/null +++ b/packages/google-cloud-kms-inventory/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,43 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import { + KeyDashboardServiceClient, + KeyTrackingServiceClient, +} from '@google-cloud/kms-inventory'; + +// check that the client class type name can be used +function doStuffWithKeyDashboardServiceClient( + client: KeyDashboardServiceClient +) { + client.close(); +} +function doStuffWithKeyTrackingServiceClient(client: KeyTrackingServiceClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const keyDashboardServiceClient = new KeyDashboardServiceClient(); + doStuffWithKeyDashboardServiceClient(keyDashboardServiceClient); + // check that the client instance can be created + const keyTrackingServiceClient = new KeyTrackingServiceClient(); + doStuffWithKeyTrackingServiceClient(keyTrackingServiceClient); +} + +main(); diff --git a/packages/google-cloud-kms-inventory/system-test/install.ts b/packages/google-cloud-kms-inventory/system-test/install.ts new file mode 100644 index 00000000000..f61fe236476 --- /dev/null +++ b/packages/google-cloud-kms-inventory/system-test/install.ts @@ -0,0 +1,51 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + it('TypeScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts' + ).toString(), + }, + }; + await packNTest(options); + }); + + it('JavaScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync( + './system-test/fixtures/sample/src/index.js' + ).toString(), + }, + }; + await packNTest(options); + }); +}); diff --git a/packages/google-cloud-kms-inventory/test/gapic_key_dashboard_service_v1.ts b/packages/google-cloud-kms-inventory/test/gapic_key_dashboard_service_v1.ts new file mode 100644 index 00000000000..6d6494e1138 --- /dev/null +++ b/packages/google-cloud-kms-inventory/test/gapic_key_dashboard_service_v1.ts @@ -0,0 +1,1238 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as keydashboardserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.KeyDashboardServiceClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + keydashboardserviceModule.v1.KeyDashboardServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + keydashboardserviceModule.v1.KeyDashboardServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = keydashboardserviceModule.v1.KeyDashboardServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = + new keydashboardserviceModule.v1.KeyDashboardServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new keydashboardserviceModule.v1.KeyDashboardServiceClient( + { + fallback: true, + } + ); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new keydashboardserviceModule.v1.KeyDashboardServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.keyDashboardServiceStub, undefined); + await client.initialize(); + assert(client.keyDashboardServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new keydashboardserviceModule.v1.KeyDashboardServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + assert(client.keyDashboardServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new keydashboardserviceModule.v1.KeyDashboardServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.keyDashboardServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new keydashboardserviceModule.v1.KeyDashboardServiceClient( + { + 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 keydashboardserviceModule.v1.KeyDashboardServiceClient( + { + 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('listCryptoKeys', () => { + it('invokes listCryptoKeys without error', async () => { + const client = new keydashboardserviceModule.v1.KeyDashboardServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.ListCryptoKeysRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.kms.inventory.v1.ListCryptoKeysRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.kms.v1.CryptoKey()), + generateSampleMessage(new protos.google.cloud.kms.v1.CryptoKey()), + generateSampleMessage(new protos.google.cloud.kms.v1.CryptoKey()), + ]; + client.innerApiCalls.listCryptoKeys = stubSimpleCall(expectedResponse); + const [response] = await client.listCryptoKeys(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listCryptoKeys as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCryptoKeys as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCryptoKeys without error using callback', async () => { + const client = new keydashboardserviceModule.v1.KeyDashboardServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.ListCryptoKeysRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.kms.inventory.v1.ListCryptoKeysRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.kms.v1.CryptoKey()), + generateSampleMessage(new protos.google.cloud.kms.v1.CryptoKey()), + generateSampleMessage(new protos.google.cloud.kms.v1.CryptoKey()), + ]; + client.innerApiCalls.listCryptoKeys = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listCryptoKeys( + request, + ( + err?: Error | null, + result?: protos.google.cloud.kms.v1.ICryptoKey[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listCryptoKeys as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCryptoKeys as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCryptoKeys with error', async () => { + const client = new keydashboardserviceModule.v1.KeyDashboardServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.ListCryptoKeysRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.kms.inventory.v1.ListCryptoKeysRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listCryptoKeys = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listCryptoKeys(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listCryptoKeys as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCryptoKeys as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCryptoKeysStream without error', async () => { + const client = new keydashboardserviceModule.v1.KeyDashboardServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.ListCryptoKeysRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.kms.inventory.v1.ListCryptoKeysRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.kms.v1.CryptoKey()), + generateSampleMessage(new protos.google.cloud.kms.v1.CryptoKey()), + generateSampleMessage(new protos.google.cloud.kms.v1.CryptoKey()), + ]; + client.descriptors.page.listCryptoKeys.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listCryptoKeysStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.kms.v1.CryptoKey[] = []; + stream.on('data', (response: protos.google.cloud.kms.v1.CryptoKey) => { + 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.listCryptoKeys.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listCryptoKeys, request) + ); + assert( + (client.descriptors.page.listCryptoKeys.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listCryptoKeysStream with error', async () => { + const client = new keydashboardserviceModule.v1.KeyDashboardServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.ListCryptoKeysRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.kms.inventory.v1.ListCryptoKeysRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listCryptoKeys.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listCryptoKeysStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.kms.v1.CryptoKey[] = []; + stream.on('data', (response: protos.google.cloud.kms.v1.CryptoKey) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listCryptoKeys.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listCryptoKeys, request) + ); + assert( + (client.descriptors.page.listCryptoKeys.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCryptoKeys without error', async () => { + const client = new keydashboardserviceModule.v1.KeyDashboardServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.ListCryptoKeysRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.kms.inventory.v1.ListCryptoKeysRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.kms.v1.CryptoKey()), + generateSampleMessage(new protos.google.cloud.kms.v1.CryptoKey()), + generateSampleMessage(new protos.google.cloud.kms.v1.CryptoKey()), + ]; + client.descriptors.page.listCryptoKeys.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.kms.v1.ICryptoKey[] = []; + const iterable = client.listCryptoKeysAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listCryptoKeys.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listCryptoKeys.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCryptoKeys with error', async () => { + const client = new keydashboardserviceModule.v1.KeyDashboardServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.ListCryptoKeysRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.kms.inventory.v1.ListCryptoKeysRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listCryptoKeys.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listCryptoKeysAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.kms.v1.ICryptoKey[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listCryptoKeys.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listCryptoKeys.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + describe('cryptoKey', () => { + const fakePath = '/rendered/path/cryptoKey'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + key_ring: 'keyRingValue', + crypto_key: 'cryptoKeyValue', + }; + const client = new keydashboardserviceModule.v1.KeyDashboardServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.cryptoKeyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.cryptoKeyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('cryptoKeyPath', () => { + const result = client.cryptoKeyPath( + 'projectValue', + 'locationValue', + 'keyRingValue', + 'cryptoKeyValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.cryptoKeyPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromCryptoKeyName', () => { + const result = client.matchProjectFromCryptoKeyName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.cryptoKeyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromCryptoKeyName', () => { + const result = client.matchLocationFromCryptoKeyName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.cryptoKeyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchKeyRingFromCryptoKeyName', () => { + const result = client.matchKeyRingFromCryptoKeyName(fakePath); + assert.strictEqual(result, 'keyRingValue'); + assert( + (client.pathTemplates.cryptoKeyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCryptoKeyFromCryptoKeyName', () => { + const result = client.matchCryptoKeyFromCryptoKeyName(fakePath); + assert.strictEqual(result, 'cryptoKeyValue'); + assert( + (client.pathTemplates.cryptoKeyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('cryptoKeyVersion', () => { + const fakePath = '/rendered/path/cryptoKeyVersion'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + key_ring: 'keyRingValue', + crypto_key: 'cryptoKeyValue', + crypto_key_version: 'cryptoKeyVersionValue', + }; + const client = new keydashboardserviceModule.v1.KeyDashboardServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.cryptoKeyVersionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.cryptoKeyVersionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('cryptoKeyVersionPath', () => { + const result = client.cryptoKeyVersionPath( + 'projectValue', + 'locationValue', + 'keyRingValue', + 'cryptoKeyValue', + 'cryptoKeyVersionValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.cryptoKeyVersionPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromCryptoKeyVersionName', () => { + const result = client.matchProjectFromCryptoKeyVersionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromCryptoKeyVersionName', () => { + const result = client.matchLocationFromCryptoKeyVersionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchKeyRingFromCryptoKeyVersionName', () => { + const result = client.matchKeyRingFromCryptoKeyVersionName(fakePath); + assert.strictEqual(result, 'keyRingValue'); + assert( + (client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCryptoKeyFromCryptoKeyVersionName', () => { + const result = client.matchCryptoKeyFromCryptoKeyVersionName(fakePath); + assert.strictEqual(result, 'cryptoKeyValue'); + assert( + (client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCryptoKeyVersionFromCryptoKeyVersionName', () => { + const result = + client.matchCryptoKeyVersionFromCryptoKeyVersionName(fakePath); + assert.strictEqual(result, 'cryptoKeyVersionValue'); + assert( + (client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('importJob', () => { + const fakePath = '/rendered/path/importJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + key_ring: 'keyRingValue', + import_job: 'importJobValue', + }; + const client = new keydashboardserviceModule.v1.KeyDashboardServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.importJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.importJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('importJobPath', () => { + const result = client.importJobPath( + 'projectValue', + 'locationValue', + 'keyRingValue', + 'importJobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.importJobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromImportJobName', () => { + const result = client.matchProjectFromImportJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.importJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromImportJobName', () => { + const result = client.matchLocationFromImportJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.importJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchKeyRingFromImportJobName', () => { + const result = client.matchKeyRingFromImportJobName(fakePath); + assert.strictEqual(result, 'keyRingValue'); + assert( + (client.pathTemplates.importJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchImportJobFromImportJobName', () => { + const result = client.matchImportJobFromImportJobName(fakePath); + assert.strictEqual(result, 'importJobValue'); + assert( + (client.pathTemplates.importJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('keyRing', () => { + const fakePath = '/rendered/path/keyRing'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + key_ring: 'keyRingValue', + }; + const client = new keydashboardserviceModule.v1.KeyDashboardServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.keyRingPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.keyRingPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('keyRingPath', () => { + const result = client.keyRingPath( + 'projectValue', + 'locationValue', + 'keyRingValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.keyRingPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromKeyRingName', () => { + const result = client.matchProjectFromKeyRingName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.keyRingPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromKeyRingName', () => { + const result = client.matchLocationFromKeyRingName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.keyRingPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchKeyRingFromKeyRingName', () => { + const result = client.matchKeyRingFromKeyRingName(fakePath); + assert.strictEqual(result, 'keyRingValue'); + assert( + (client.pathTemplates.keyRingPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('project', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new keydashboardserviceModule.v1.KeyDashboardServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + 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) + ); + }); + }); + + describe('projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummary', () => { + const fakePath = + '/rendered/path/projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummary'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + key_ring: 'keyRingValue', + crypto_key: 'cryptoKeyValue', + crypto_key_version: 'cryptoKeyVersionValue', + }; + const client = new keydashboardserviceModule.v1.KeyDashboardServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPath', () => { + const result = + client.projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPath( + 'projectValue', + 'locationValue', + 'keyRingValue', + 'cryptoKeyValue', + 'cryptoKeyVersionValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName', () => { + const result = + client.matchProjectFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName', () => { + const result = + client.matchLocationFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchKeyRingFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName', () => { + const result = + client.matchKeyRingFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName( + fakePath + ); + assert.strictEqual(result, 'keyRingValue'); + assert( + ( + client.pathTemplates + .projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCryptoKeyFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName', () => { + const result = + client.matchCryptoKeyFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName( + fakePath + ); + assert.strictEqual(result, 'cryptoKeyValue'); + assert( + ( + client.pathTemplates + .projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCryptoKeyVersionFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName', () => { + const result = + client.matchCryptoKeyVersionFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName( + fakePath + ); + assert.strictEqual(result, 'cryptoKeyVersionValue'); + assert( + ( + client.pathTemplates + .projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationKeyRingCryptoKeyProtectedResourcesSummary', () => { + const fakePath = + '/rendered/path/projectLocationKeyRingCryptoKeyProtectedResourcesSummary'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + key_ring: 'keyRingValue', + crypto_key: 'cryptoKeyValue', + }; + const client = new keydashboardserviceModule.v1.KeyDashboardServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPath', () => { + const result = + client.projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPath( + 'projectValue', + 'locationValue', + 'keyRingValue', + 'cryptoKeyValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationKeyRingCryptoKeyProtectedResourcesSummaryName', () => { + const result = + client.matchProjectFromProjectLocationKeyRingCryptoKeyProtectedResourcesSummaryName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationKeyRingCryptoKeyProtectedResourcesSummaryName', () => { + const result = + client.matchLocationFromProjectLocationKeyRingCryptoKeyProtectedResourcesSummaryName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchKeyRingFromProjectLocationKeyRingCryptoKeyProtectedResourcesSummaryName', () => { + const result = + client.matchKeyRingFromProjectLocationKeyRingCryptoKeyProtectedResourcesSummaryName( + fakePath + ); + assert.strictEqual(result, 'keyRingValue'); + assert( + ( + client.pathTemplates + .projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCryptoKeyFromProjectLocationKeyRingCryptoKeyProtectedResourcesSummaryName', () => { + const result = + client.matchCryptoKeyFromProjectLocationKeyRingCryptoKeyProtectedResourcesSummaryName( + fakePath + ); + assert.strictEqual(result, 'cryptoKeyValue'); + assert( + ( + client.pathTemplates + .projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('publicKey', () => { + const fakePath = '/rendered/path/publicKey'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + key_ring: 'keyRingValue', + crypto_key: 'cryptoKeyValue', + crypto_key_version: 'cryptoKeyVersionValue', + }; + const client = new keydashboardserviceModule.v1.KeyDashboardServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.publicKeyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.publicKeyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('publicKeyPath', () => { + const result = client.publicKeyPath( + 'projectValue', + 'locationValue', + 'keyRingValue', + 'cryptoKeyValue', + 'cryptoKeyVersionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.publicKeyPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPublicKeyName', () => { + const result = client.matchProjectFromPublicKeyName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.publicKeyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPublicKeyName', () => { + const result = client.matchLocationFromPublicKeyName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.publicKeyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchKeyRingFromPublicKeyName', () => { + const result = client.matchKeyRingFromPublicKeyName(fakePath); + assert.strictEqual(result, 'keyRingValue'); + assert( + (client.pathTemplates.publicKeyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCryptoKeyFromPublicKeyName', () => { + const result = client.matchCryptoKeyFromPublicKeyName(fakePath); + assert.strictEqual(result, 'cryptoKeyValue'); + assert( + (client.pathTemplates.publicKeyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCryptoKeyVersionFromPublicKeyName', () => { + const result = client.matchCryptoKeyVersionFromPublicKeyName(fakePath); + assert.strictEqual(result, 'cryptoKeyVersionValue'); + assert( + (client.pathTemplates.publicKeyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-kms-inventory/test/gapic_key_tracking_service_v1.ts b/packages/google-cloud-kms-inventory/test/gapic_key_tracking_service_v1.ts new file mode 100644 index 00000000000..d8a651d413a --- /dev/null +++ b/packages/google-cloud-kms-inventory/test/gapic_key_tracking_service_v1.ts @@ -0,0 +1,1396 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as keytrackingserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.KeyTrackingServiceClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + keytrackingserviceModule.v1.KeyTrackingServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + keytrackingserviceModule.v1.KeyTrackingServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = keytrackingserviceModule.v1.KeyTrackingServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new keytrackingserviceModule.v1.KeyTrackingServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new keytrackingserviceModule.v1.KeyTrackingServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new keytrackingserviceModule.v1.KeyTrackingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.keyTrackingServiceStub, undefined); + await client.initialize(); + assert(client.keyTrackingServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new keytrackingserviceModule.v1.KeyTrackingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.keyTrackingServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new keytrackingserviceModule.v1.KeyTrackingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.keyTrackingServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new keytrackingserviceModule.v1.KeyTrackingServiceClient({ + 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 keytrackingserviceModule.v1.KeyTrackingServiceClient({ + 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('getProtectedResourcesSummary', () => { + it('invokes getProtectedResourcesSummary without error', async () => { + const client = new keytrackingserviceModule.v1.KeyTrackingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.ProtectedResourcesSummary() + ); + client.innerApiCalls.getProtectedResourcesSummary = + stubSimpleCall(expectedResponse); + const [response] = await client.getProtectedResourcesSummary(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getProtectedResourcesSummary as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getProtectedResourcesSummary as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getProtectedResourcesSummary without error using callback', async () => { + const client = new keytrackingserviceModule.v1.KeyTrackingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.ProtectedResourcesSummary() + ); + client.innerApiCalls.getProtectedResourcesSummary = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getProtectedResourcesSummary( + request, + ( + err?: Error | null, + result?: protos.google.cloud.kms.inventory.v1.IProtectedResourcesSummary | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getProtectedResourcesSummary as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getProtectedResourcesSummary as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getProtectedResourcesSummary with error', async () => { + const client = new keytrackingserviceModule.v1.KeyTrackingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getProtectedResourcesSummary = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getProtectedResourcesSummary(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.getProtectedResourcesSummary as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getProtectedResourcesSummary as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getProtectedResourcesSummary with closed client', async () => { + const client = new keytrackingserviceModule.v1.KeyTrackingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getProtectedResourcesSummary(request), + expectedError + ); + }); + }); + + describe('searchProtectedResources', () => { + it('invokes searchProtectedResources without error', async () => { + const client = new keytrackingserviceModule.v1.KeyTrackingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest', + ['scope'] + ); + request.scope = defaultValue1; + const expectedHeaderRequestParams = `scope=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.ProtectedResource() + ), + generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.ProtectedResource() + ), + generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.ProtectedResource() + ), + ]; + client.innerApiCalls.searchProtectedResources = + stubSimpleCall(expectedResponse); + const [response] = await client.searchProtectedResources(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.searchProtectedResources as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.searchProtectedResources as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes searchProtectedResources without error using callback', async () => { + const client = new keytrackingserviceModule.v1.KeyTrackingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest', + ['scope'] + ); + request.scope = defaultValue1; + const expectedHeaderRequestParams = `scope=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.ProtectedResource() + ), + generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.ProtectedResource() + ), + generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.ProtectedResource() + ), + ]; + client.innerApiCalls.searchProtectedResources = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.searchProtectedResources( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.kms.inventory.v1.IProtectedResource[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.searchProtectedResources as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.searchProtectedResources as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes searchProtectedResources with error', async () => { + const client = new keytrackingserviceModule.v1.KeyTrackingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest', + ['scope'] + ); + request.scope = defaultValue1; + const expectedHeaderRequestParams = `scope=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.searchProtectedResources = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.searchProtectedResources(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.searchProtectedResources as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.searchProtectedResources as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes searchProtectedResourcesStream without error', async () => { + const client = new keytrackingserviceModule.v1.KeyTrackingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest', + ['scope'] + ); + request.scope = defaultValue1; + const expectedHeaderRequestParams = `scope=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.ProtectedResource() + ), + generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.ProtectedResource() + ), + generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.ProtectedResource() + ), + ]; + client.descriptors.page.searchProtectedResources.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.searchProtectedResourcesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.kms.inventory.v1.ProtectedResource[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.kms.inventory.v1.ProtectedResource + ) => { + 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.searchProtectedResources + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.searchProtectedResources, request) + ); + assert( + ( + client.descriptors.page.searchProtectedResources + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes searchProtectedResourcesStream with error', async () => { + const client = new keytrackingserviceModule.v1.KeyTrackingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest', + ['scope'] + ); + request.scope = defaultValue1; + const expectedHeaderRequestParams = `scope=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.searchProtectedResources.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.searchProtectedResourcesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.kms.inventory.v1.ProtectedResource[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.kms.inventory.v1.ProtectedResource + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.searchProtectedResources + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.searchProtectedResources, request) + ); + assert( + ( + client.descriptors.page.searchProtectedResources + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with searchProtectedResources without error', async () => { + const client = new keytrackingserviceModule.v1.KeyTrackingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest', + ['scope'] + ); + request.scope = defaultValue1; + const expectedHeaderRequestParams = `scope=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.ProtectedResource() + ), + generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.ProtectedResource() + ), + generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.ProtectedResource() + ), + ]; + client.descriptors.page.searchProtectedResources.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.kms.inventory.v1.IProtectedResource[] = + []; + const iterable = client.searchProtectedResourcesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.searchProtectedResources + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.searchProtectedResources + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with searchProtectedResources with error', async () => { + const client = new keytrackingserviceModule.v1.KeyTrackingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest', + ['scope'] + ); + request.scope = defaultValue1; + const expectedHeaderRequestParams = `scope=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.searchProtectedResources.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.searchProtectedResourcesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.kms.inventory.v1.IProtectedResource[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.searchProtectedResources + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.searchProtectedResources + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + describe('cryptoKey', () => { + const fakePath = '/rendered/path/cryptoKey'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + key_ring: 'keyRingValue', + crypto_key: 'cryptoKeyValue', + }; + const client = new keytrackingserviceModule.v1.KeyTrackingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.cryptoKeyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.cryptoKeyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('cryptoKeyPath', () => { + const result = client.cryptoKeyPath( + 'projectValue', + 'locationValue', + 'keyRingValue', + 'cryptoKeyValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.cryptoKeyPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromCryptoKeyName', () => { + const result = client.matchProjectFromCryptoKeyName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.cryptoKeyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromCryptoKeyName', () => { + const result = client.matchLocationFromCryptoKeyName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.cryptoKeyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchKeyRingFromCryptoKeyName', () => { + const result = client.matchKeyRingFromCryptoKeyName(fakePath); + assert.strictEqual(result, 'keyRingValue'); + assert( + (client.pathTemplates.cryptoKeyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCryptoKeyFromCryptoKeyName', () => { + const result = client.matchCryptoKeyFromCryptoKeyName(fakePath); + assert.strictEqual(result, 'cryptoKeyValue'); + assert( + (client.pathTemplates.cryptoKeyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('cryptoKeyVersion', () => { + const fakePath = '/rendered/path/cryptoKeyVersion'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + key_ring: 'keyRingValue', + crypto_key: 'cryptoKeyValue', + crypto_key_version: 'cryptoKeyVersionValue', + }; + const client = new keytrackingserviceModule.v1.KeyTrackingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.cryptoKeyVersionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.cryptoKeyVersionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('cryptoKeyVersionPath', () => { + const result = client.cryptoKeyVersionPath( + 'projectValue', + 'locationValue', + 'keyRingValue', + 'cryptoKeyValue', + 'cryptoKeyVersionValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.cryptoKeyVersionPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromCryptoKeyVersionName', () => { + const result = client.matchProjectFromCryptoKeyVersionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromCryptoKeyVersionName', () => { + const result = client.matchLocationFromCryptoKeyVersionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchKeyRingFromCryptoKeyVersionName', () => { + const result = client.matchKeyRingFromCryptoKeyVersionName(fakePath); + assert.strictEqual(result, 'keyRingValue'); + assert( + (client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCryptoKeyFromCryptoKeyVersionName', () => { + const result = client.matchCryptoKeyFromCryptoKeyVersionName(fakePath); + assert.strictEqual(result, 'cryptoKeyValue'); + assert( + (client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCryptoKeyVersionFromCryptoKeyVersionName', () => { + const result = + client.matchCryptoKeyVersionFromCryptoKeyVersionName(fakePath); + assert.strictEqual(result, 'cryptoKeyVersionValue'); + assert( + (client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('importJob', () => { + const fakePath = '/rendered/path/importJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + key_ring: 'keyRingValue', + import_job: 'importJobValue', + }; + const client = new keytrackingserviceModule.v1.KeyTrackingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.importJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.importJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('importJobPath', () => { + const result = client.importJobPath( + 'projectValue', + 'locationValue', + 'keyRingValue', + 'importJobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.importJobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromImportJobName', () => { + const result = client.matchProjectFromImportJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.importJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromImportJobName', () => { + const result = client.matchLocationFromImportJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.importJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchKeyRingFromImportJobName', () => { + const result = client.matchKeyRingFromImportJobName(fakePath); + assert.strictEqual(result, 'keyRingValue'); + assert( + (client.pathTemplates.importJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchImportJobFromImportJobName', () => { + const result = client.matchImportJobFromImportJobName(fakePath); + assert.strictEqual(result, 'importJobValue'); + assert( + (client.pathTemplates.importJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('keyRing', () => { + const fakePath = '/rendered/path/keyRing'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + key_ring: 'keyRingValue', + }; + const client = new keytrackingserviceModule.v1.KeyTrackingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.keyRingPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.keyRingPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('keyRingPath', () => { + const result = client.keyRingPath( + 'projectValue', + 'locationValue', + 'keyRingValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.keyRingPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromKeyRingName', () => { + const result = client.matchProjectFromKeyRingName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.keyRingPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromKeyRingName', () => { + const result = client.matchLocationFromKeyRingName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.keyRingPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchKeyRingFromKeyRingName', () => { + const result = client.matchKeyRingFromKeyRingName(fakePath); + assert.strictEqual(result, 'keyRingValue'); + assert( + (client.pathTemplates.keyRingPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organization', () => { + const fakePath = '/rendered/path/organization'; + const expectedParameters = { + organization: 'organizationValue', + }; + const client = new keytrackingserviceModule.v1.KeyTrackingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationPath', () => { + const result = client.organizationPath('organizationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationName', () => { + const result = client.matchOrganizationFromOrganizationName(fakePath); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummary', () => { + const fakePath = + '/rendered/path/projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummary'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + key_ring: 'keyRingValue', + crypto_key: 'cryptoKeyValue', + crypto_key_version: 'cryptoKeyVersionValue', + }; + const client = new keytrackingserviceModule.v1.KeyTrackingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPath', () => { + const result = + client.projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPath( + 'projectValue', + 'locationValue', + 'keyRingValue', + 'cryptoKeyValue', + 'cryptoKeyVersionValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName', () => { + const result = + client.matchProjectFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName', () => { + const result = + client.matchLocationFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchKeyRingFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName', () => { + const result = + client.matchKeyRingFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName( + fakePath + ); + assert.strictEqual(result, 'keyRingValue'); + assert( + ( + client.pathTemplates + .projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCryptoKeyFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName', () => { + const result = + client.matchCryptoKeyFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName( + fakePath + ); + assert.strictEqual(result, 'cryptoKeyValue'); + assert( + ( + client.pathTemplates + .projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCryptoKeyVersionFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName', () => { + const result = + client.matchCryptoKeyVersionFromProjectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName( + fakePath + ); + assert.strictEqual(result, 'cryptoKeyVersionValue'); + assert( + ( + client.pathTemplates + .projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationKeyRingCryptoKeyProtectedResourcesSummary', () => { + const fakePath = + '/rendered/path/projectLocationKeyRingCryptoKeyProtectedResourcesSummary'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + key_ring: 'keyRingValue', + crypto_key: 'cryptoKeyValue', + }; + const client = new keytrackingserviceModule.v1.KeyTrackingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPath', () => { + const result = + client.projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPath( + 'projectValue', + 'locationValue', + 'keyRingValue', + 'cryptoKeyValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationKeyRingCryptoKeyProtectedResourcesSummaryName', () => { + const result = + client.matchProjectFromProjectLocationKeyRingCryptoKeyProtectedResourcesSummaryName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationKeyRingCryptoKeyProtectedResourcesSummaryName', () => { + const result = + client.matchLocationFromProjectLocationKeyRingCryptoKeyProtectedResourcesSummaryName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchKeyRingFromProjectLocationKeyRingCryptoKeyProtectedResourcesSummaryName', () => { + const result = + client.matchKeyRingFromProjectLocationKeyRingCryptoKeyProtectedResourcesSummaryName( + fakePath + ); + assert.strictEqual(result, 'keyRingValue'); + assert( + ( + client.pathTemplates + .projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCryptoKeyFromProjectLocationKeyRingCryptoKeyProtectedResourcesSummaryName', () => { + const result = + client.matchCryptoKeyFromProjectLocationKeyRingCryptoKeyProtectedResourcesSummaryName( + fakePath + ); + assert.strictEqual(result, 'cryptoKeyValue'); + assert( + ( + client.pathTemplates + .projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('publicKey', () => { + const fakePath = '/rendered/path/publicKey'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + key_ring: 'keyRingValue', + crypto_key: 'cryptoKeyValue', + crypto_key_version: 'cryptoKeyVersionValue', + }; + const client = new keytrackingserviceModule.v1.KeyTrackingServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.publicKeyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.publicKeyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('publicKeyPath', () => { + const result = client.publicKeyPath( + 'projectValue', + 'locationValue', + 'keyRingValue', + 'cryptoKeyValue', + 'cryptoKeyVersionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.publicKeyPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPublicKeyName', () => { + const result = client.matchProjectFromPublicKeyName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.publicKeyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPublicKeyName', () => { + const result = client.matchLocationFromPublicKeyName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.publicKeyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchKeyRingFromPublicKeyName', () => { + const result = client.matchKeyRingFromPublicKeyName(fakePath); + assert.strictEqual(result, 'keyRingValue'); + assert( + (client.pathTemplates.publicKeyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCryptoKeyFromPublicKeyName', () => { + const result = client.matchCryptoKeyFromPublicKeyName(fakePath); + assert.strictEqual(result, 'cryptoKeyValue'); + assert( + (client.pathTemplates.publicKeyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCryptoKeyVersionFromPublicKeyName', () => { + const result = client.matchCryptoKeyVersionFromPublicKeyName(fakePath); + assert.strictEqual(result, 'cryptoKeyVersionValue'); + assert( + (client.pathTemplates.publicKeyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-kms-inventory/tsconfig.json b/packages/google-cloud-kms-inventory/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/packages/google-cloud-kms-inventory/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2018", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/packages/google-cloud-kms-inventory/webpack.config.js b/packages/google-cloud-kms-inventory/webpack.config.js new file mode 100644 index 00000000000..df0e73d1aa9 --- /dev/null +++ b/packages/google-cloud-kms-inventory/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: 'KeyDashboardService', + filename: './key-dashboard-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/packages/google-cloud-kms/samples/generated/v1/snippet_metadata.google.cloud.kms.v1.json b/packages/google-cloud-kms/samples/generated/v1/snippet_metadata.google.cloud.kms.v1.json index 8341629223e..b37f81e818b 100644 --- a/packages/google-cloud-kms/samples/generated/v1/snippet_metadata.google.cloud.kms.v1.json +++ b/packages/google-cloud-kms/samples/generated/v1/snippet_metadata.google.cloud.kms.v1.json @@ -1464,4 +1464,4 @@ } } ] -} \ No newline at end of file +} diff --git a/release-please-config.json b/release-please-config.json index 67f44fe3e1d..f35639b7d62 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -132,6 +132,7 @@ "packages/google-privacy-dlp": {}, "packages/google-storagetransfer": {}, "packages/grafeas": {}, + "packages/google-cloud-kms-inventory": {}, "packages/google-cloud-advisorynotifications": {}, "packages/typeless-sample-bot": {} }, From b01cab5f4068eb59442c2a20becb95be82eea8cc Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 2 Mar 2023 09:35:07 -0500 Subject: [PATCH 66/80] chore: release main (#4043) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: release main * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 5 +-- changelog.json | 36 ++++++++++++++++++- .../google-cloud-kms-inventory/CHANGELOG.md | 8 +++++ .../samples/package.json | 2 +- packages/google-cloud-kms/CHANGELOG.md | 7 ++++ packages/google-cloud-kms/package.json | 2 +- .../snippet_metadata.google.cloud.kms.v1.json | 4 +-- .../google-cloud-kms/samples/package.json | 2 +- 8 files changed, 58 insertions(+), 8 deletions(-) create mode 100644 packages/google-cloud-kms-inventory/CHANGELOG.md diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 9e9297b0b5d..fa49d1198d1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -65,7 +65,7 @@ "packages/google-cloud-iap": "2.2.1", "packages/google-cloud-ids": "2.2.1", "packages/google-cloud-iot": "3.2.1", - "packages/google-cloud-kms": "3.3.1", + "packages/google-cloud-kms": "3.4.0", "packages/google-cloud-language": "5.2.1", "packages/google-cloud-lifesciences": "2.3.1", "packages/google-cloud-managedidentities": "2.2.1", @@ -132,5 +132,6 @@ "packages/google-storagetransfer": "2.3.1", "packages/grafeas": "4.2.2", "packages/typeless-sample-bot": "1.3.0", - "packages/google-cloud-advisorynotifications": "0.1.0" + "packages/google-cloud-advisorynotifications": "0.1.0", + "packages/google-cloud-kms-inventory": "0.1.0" } diff --git a/changelog.json b/changelog.json index 6c2298ae02a..ea2504515fc 100644 --- a/changelog.json +++ b/changelog.json @@ -1,6 +1,40 @@ { "repository": "googleapis/google-cloud-node", "entries": [ + { + "changes": [ + { + "type": "feat", + "sha": "44756d7c15642a065628cd4a598198a56584dbff", + "message": "Add initial files for google.cloud.kms.inventory.v1", + "issues": [ + "4011" + ] + } + ], + "version": "0.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/kms-inventory", + "id": "a108d2a6-3503-40d3-ad24-467ec2fa1c80", + "createTime": "2023-03-02T07:21:42.471Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "44756d7c15642a065628cd4a598198a56584dbff", + "message": "Add initial files for google.cloud.kms.inventory.v1", + "issues": [ + "4011" + ] + } + ], + "version": "3.4.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/kms", + "id": "0a134d09-750b-412f-a8e9-e2e5cf3fa123", + "createTime": "2023-03-02T07:21:42.469Z" + }, { "changes": [ { @@ -4316,5 +4350,5 @@ "createTime": "2023-01-28T04:18:24.718Z" } ], - "updateTime": "2023-03-01T20:52:56.363Z" + "updateTime": "2023-03-02T07:21:42.471Z" } \ No newline at end of file diff --git a/packages/google-cloud-kms-inventory/CHANGELOG.md b/packages/google-cloud-kms-inventory/CHANGELOG.md new file mode 100644 index 00000000000..7be031f0766 --- /dev/null +++ b/packages/google-cloud-kms-inventory/CHANGELOG.md @@ -0,0 +1,8 @@ +# Changelog + +## 0.1.0 (2023-03-02) + + +### Features + +* Add initial files for google.cloud.kms.inventory.v1 ([#4011](https://github.com/googleapis/google-cloud-node/issues/4011)) ([44756d7](https://github.com/googleapis/google-cloud-node/commit/44756d7c15642a065628cd4a598198a56584dbff)) diff --git a/packages/google-cloud-kms-inventory/samples/package.json b/packages/google-cloud-kms-inventory/samples/package.json index 91b4c481ad0..6c7ea7a078c 100644 --- a/packages/google-cloud-kms-inventory/samples/package.json +++ b/packages/google-cloud-kms-inventory/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/kms-inventory": "0.1.0" + "@google-cloud/kms-inventory": "^0.1.0" }, "devDependencies": { "c8": "^7.1.0", diff --git a/packages/google-cloud-kms/CHANGELOG.md b/packages/google-cloud-kms/CHANGELOG.md index f9c5de100ce..80826c97829 100644 --- a/packages/google-cloud-kms/CHANGELOG.md +++ b/packages/google-cloud-kms/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/kms?activeTab=versions +## [3.4.0](https://github.com/googleapis/google-cloud-node/compare/kms-v3.3.1...kms-v3.4.0) (2023-03-02) + + +### Features + +* Add initial files for google.cloud.kms.inventory.v1 ([#4011](https://github.com/googleapis/google-cloud-node/issues/4011)) ([44756d7](https://github.com/googleapis/google-cloud-node/commit/44756d7c15642a065628cd4a598198a56584dbff)) + ## [3.3.1](https://github.com/googleapis/google-cloud-node/compare/kms-v3.3.0...kms-v3.3.1) (2023-02-15) diff --git a/packages/google-cloud-kms/package.json b/packages/google-cloud-kms/package.json index 89f316470ec..59ba447c688 100644 --- a/packages/google-cloud-kms/package.json +++ b/packages/google-cloud-kms/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/kms", "description": "Google Cloud Key Management Service (KMS) API client for Node.js", - "version": "3.3.1", + "version": "3.4.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-kms/samples/generated/v1/snippet_metadata.google.cloud.kms.v1.json b/packages/google-cloud-kms/samples/generated/v1/snippet_metadata.google.cloud.kms.v1.json index b37f81e818b..12a819b124e 100644 --- a/packages/google-cloud-kms/samples/generated/v1/snippet_metadata.google.cloud.kms.v1.json +++ b/packages/google-cloud-kms/samples/generated/v1/snippet_metadata.google.cloud.kms.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-kms", - "version": "3.3.0", + "version": "3.4.0", "language": "TYPESCRIPT", "apis": [ { @@ -1464,4 +1464,4 @@ } } ] -} +} \ No newline at end of file diff --git a/packages/google-cloud-kms/samples/package.json b/packages/google-cloud-kms/samples/package.json index bdbe6a6db18..534d03c7f18 100644 --- a/packages/google-cloud-kms/samples/package.json +++ b/packages/google-cloud-kms/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --recursive test/ --timeout=800000" }, "dependencies": { - "@google-cloud/kms": "^3.3.1", + "@google-cloud/kms": "^3.4.0", "fast-crc32c": "^2.0.0", "jslint": "^0.12.1" }, From a4c234315a2337c07f2556a6125f22bf7ddada2f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 2 Mar 2023 09:44:29 -0500 Subject: [PATCH 67/80] feat: [batch] added StatusEvent.task_state (#4042) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: resource usage docs: update comments PiperOrigin-RevId: 513425559 Source-Link: https://github.com/googleapis/googleapis/commit/2936faa73019cc9fa670eefc2776111457a7d798 Source-Link: https://github.com/googleapis/googleapis-gen/commit/5219e27baeeb63b209c4f0e9ca6c68e3b6698d66 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJhdGNoLy5Pd2xCb3QueWFtbCIsImgiOiI1MjE5ZTI3YmFlZWI2M2IyMDljNGYwZTljYTZjNjhlM2I2Njk4ZDY2In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: added StatusEvent.task_state docs: updated comments PiperOrigin-RevId: 513426000 Source-Link: https://github.com/googleapis/googleapis/commit/3f95ea2d86b8e826350897efac1674d6784b4030 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b191b40b95e42eeea8d0bccf91dd1d1ba8a61fb1 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJhdGNoLy5Pd2xCb3QueWFtbCIsImgiOiJiMTkxYjQwYjk1ZTQyZWVlYThkMGJjY2Y5MWRkMWQxYmE4YTYxZmIxIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: danieljbruce --- .../protos/google/cloud/batch/v1/batch.proto | 9 +- .../protos/google/cloud/batch/v1/job.proto | 3 +- .../protos/google/cloud/batch/v1/task.proto | 34 +- .../google/cloud/batch/v1alpha/batch.proto | 9 +- .../google/cloud/batch/v1alpha/job.proto | 12 +- .../google/cloud/batch/v1alpha/task.proto | 44 +- .../google-cloud-batch/protos/protos.d.ts | 218 +++++++ packages/google-cloud-batch/protos/protos.js | 589 +++++++++++++++++- .../google-cloud-batch/protos/protos.json | 32 + .../generated/v1/batch_service.create_job.js | 4 +- .../generated/v1/batch_service.delete_job.js | 4 +- .../v1alpha/batch_service.create_job.js | 4 +- .../v1alpha/batch_service.delete_job.js | 4 +- .../src/v1/batch_service_client.ts | 168 +---- .../src/v1alpha/batch_service_client.ts | 168 +---- .../test/gapic_batch_service_v1.ts | 325 ---------- .../test/gapic_batch_service_v1alpha.ts | 325 ---------- 17 files changed, 941 insertions(+), 1011 deletions(-) diff --git a/packages/google-cloud-batch/protos/google/cloud/batch/v1/batch.proto b/packages/google-cloud-batch/protos/google/cloud/batch/v1/batch.proto index c6bad651548..4e2e0d9c35d 100644 --- a/packages/google-cloud-batch/protos/google/cloud/batch/v1/batch.proto +++ b/packages/google-cloud-batch/protos/google/cloud/batch/v1/batch.proto @@ -23,6 +23,7 @@ import "google/api/resource.proto"; import "google/cloud/batch/v1/job.proto"; import "google/cloud/batch/v1/task.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Batch.V1"; @@ -124,8 +125,8 @@ message CreateJobRequest { // 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 t - // he request times out. If you make the request again with the same 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. @@ -157,8 +158,8 @@ message DeleteJobRequest { // 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 t - // he request times out. If you make the request again with the same 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. diff --git a/packages/google-cloud-batch/protos/google/cloud/batch/v1/job.proto b/packages/google-cloud-batch/protos/google/cloud/batch/v1/job.proto index d43f229dd6f..d41b2e1fe61 100644 --- a/packages/google-cloud-batch/protos/google/cloud/batch/v1/job.proto +++ b/packages/google-cloud-batch/protos/google/cloud/batch/v1/job.proto @@ -46,7 +46,8 @@ message Job { string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Priority of the Job. - // The valid value range is [0, 100). + // The valid value range is [0, 100). Default value is 0. + // Higher value indicates higher priority. // A job with higher priority value is more likely to run earlier if all other // requirements are satisfied. int64 priority = 3; diff --git a/packages/google-cloud-batch/protos/google/cloud/batch/v1/task.proto b/packages/google-cloud-batch/protos/google/cloud/batch/v1/task.proto index a468c3fcf0e..a4d4ba45c21 100644 --- a/packages/google-cloud-batch/protos/google/cloud/batch/v1/task.proto +++ b/packages/google-cloud-batch/protos/google/cloud/batch/v1/task.proto @@ -55,6 +55,9 @@ message StatusEvent { // Task Execution TaskExecution task_execution = 4; + + // Task State + TaskStatus.State task_state = 5; } // This Task Execution field includes detail information for @@ -140,9 +143,23 @@ message Runnable { message Script { oneof command { // Script file path on the host VM. + // + // To specify an interpreter, please add a `#!`(also known as + // [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the + // first line of the file.(For example, to execute the script using bash, + // `#!/bin/bash` should be the first line of the file. To execute the + // script using`Python3`, `#!/usr/bin/env python3` should be the first + // line of the file.) Otherwise, the file will by default be excuted by + // `/bin/sh`. string path = 1; // Shell script text. + // + // To specify an interpreter, please add a `#!\n` at the + // beginning of the text.(For example, to execute the script using bash, + // `#!/bin/bash\n` should be added. To execute the script using`Python3`, + // `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will + // by default be excuted by `/bin/sh`. string text = 2; } } @@ -220,13 +237,12 @@ message TaskSpec { int32 max_retry_count = 5; // Lifecycle management schema when any task in a task group is failed. - // The valid size of lifecycle policies are [0, 10]. - // For each lifecycle policy, when the condition is met, - // the action in that policy will execute. - // If there are multiple policies that the task execution result matches, - // we use the action from the first matched policy. If task execution result - // does not meet with any of the defined lifecycle policy, we consider it as - // the default policy. Default policy means if the exit code is 0, exit task. + // Currently we only support one lifecycle policy. + // When the lifecycle policy condition is met, + // the action in the policy will execute. + // If task execution result does not meet with the defined lifecycle + // policy, we consider it as the default policy. + // Default policy means if the exit code is 0, exit task. // If task ends with non-zero exit code, retry the task with max_retry_count. repeated LifecyclePolicy lifecycle_policies = 9; @@ -265,6 +281,10 @@ message LifecyclePolicy { } // Action to execute when ActionCondition is true. + // When RETRY_TASK is specified, we will retry failed tasks + // if we notice any exit code match and fail tasks if no match is found. + // Likewise, when FAIL_TASK is specified, we will fail tasks + // if we notice any exit code match and retry tasks if no match is found. Action action = 1; // Conditions that decide why a task failure is dealt with a specific action. diff --git a/packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/batch.proto b/packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/batch.proto index c92e60e18d9..d26b4c9e554 100644 --- a/packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/batch.proto +++ b/packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/batch.proto @@ -23,6 +23,7 @@ import "google/api/resource.proto"; import "google/cloud/batch/v1alpha/job.proto"; import "google/cloud/batch/v1alpha/task.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Batch.V1Alpha"; @@ -124,8 +125,8 @@ message CreateJobRequest { // 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 t - // he request times out. If you make the request again with the same 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. @@ -157,8 +158,8 @@ message DeleteJobRequest { // 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 t - // he request times out. If you make the request again with the same 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. diff --git a/packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/job.proto b/packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/job.proto index d8fc803e852..8edd462eadd 100644 --- a/packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/job.proto +++ b/packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/job.proto @@ -57,7 +57,8 @@ message Job { string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Priority of the Job. - // The valid value range is [0, 100). + // The valid value range is [0, 100). Default value is 0. + // Higher value indicates higher priority. // A job with higher priority value is more likely to run earlier if all other // requirements are satisfied. int64 priority = 3; @@ -227,6 +228,15 @@ message JobStatus { // The duration of time that the Job spent in status RUNNING. google.protobuf.Duration run_duration = 5; + + // The resource usage of the job. + ResourceUsage resource_usage = 6; +} + +// ResourceUsage describes the resource usage of the job. +message ResourceUsage { + // The CPU core hours that the job consumes. + double core_hours = 1; } // Notification configurations. diff --git a/packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/task.proto b/packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/task.proto index d43795bce8e..3896949746f 100644 --- a/packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/task.proto +++ b/packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/task.proto @@ -60,6 +60,9 @@ message StatusEvent { // Task Execution TaskExecution task_execution = 4; + + // Task State + TaskStatus.State task_state = 5; } // This Task Execution field includes detail information for @@ -98,6 +101,16 @@ message TaskStatus { // Detailed info about why the state is reached. repeated StatusEvent status_events = 2; + + // The resource usage of the task. + TaskResourceUsage resource_usage = 3; +} + +// TaskResourceUsage describes the resource usage of the task. +message TaskResourceUsage { + // The CPU core hours the task consumes based on task requirement and run + // time. + double core_hours = 1; } // Runnable describes instructions for executing a specific script or container @@ -145,9 +158,23 @@ message Runnable { message Script { oneof command { // Script file path on the host VM. + // + // To specify an interpreter, please add a `#!`(also known as + // [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the + // first line of the file.(For example, to execute the script using bash, + // `#!/bin/bash` should be the first line of the file. To execute the + // script using`Python3`, `#!/usr/bin/env python3` should be the first + // line of the file.) Otherwise, the file will by default be excuted by + // `/bin/sh`. string path = 1; // Shell script text. + // + // To specify an interpreter, please add a `#!\n` at the + // beginning of the text.(For example, to execute the script using bash, + // `#!/bin/bash\n` should be added. To execute the script using`Python3`, + // `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will + // by default be excuted by `/bin/sh`. string text = 2; } } @@ -228,13 +255,12 @@ message TaskSpec { int32 max_retry_count = 5; // Lifecycle management schema when any task in a task group is failed. - // The valid size of lifecycle policies are [0, 10]. - // For each lifecycle policy, when the condition is met, - // the action in that policy will execute. - // If there are multiple policies that the task execution result matches, - // we use the action from the first matched policy. If task execution result - // does not meet with any of the defined lifecycle policy, we consider it as - // the default policy. Default policy means if the exit code is 0, exit task. + // Currently we only support one lifecycle policy. + // When the lifecycle policy condition is met, + // the action in the policy will execute. + // If task execution result does not meet with the defined lifecycle + // policy, we consider it as the default policy. + // Default policy means if the exit code is 0, exit task. // If task ends with non-zero exit code, retry the task with max_retry_count. repeated LifecyclePolicy lifecycle_policies = 9; @@ -273,6 +299,10 @@ message LifecyclePolicy { } // Action to execute when ActionCondition is true. + // When RETRY_TASK is specified, we will retry failed tasks + // if we notice any exit code match and fail tasks if no match is found. + // Likewise, when FAIL_TASK is specified, we will fail tasks + // if we notice any exit code match and retry tasks if no match is found. Action action = 1; // Conditions that decide why a task failure is dealt with a specific action. diff --git a/packages/google-cloud-batch/protos/protos.d.ts b/packages/google-cloud-batch/protos/protos.d.ts index d2885d44412..d71a32d652a 100644 --- a/packages/google-cloud-batch/protos/protos.d.ts +++ b/packages/google-cloud-batch/protos/protos.d.ts @@ -3398,6 +3398,9 @@ export namespace google { /** StatusEvent taskExecution */ taskExecution?: (google.cloud.batch.v1.ITaskExecution|null); + + /** StatusEvent taskState */ + taskState?: (google.cloud.batch.v1.TaskStatus.State|keyof typeof google.cloud.batch.v1.TaskStatus.State|null); } /** Represents a StatusEvent. */ @@ -3421,6 +3424,9 @@ export namespace google { /** StatusEvent taskExecution. */ public taskExecution?: (google.cloud.batch.v1.ITaskExecution|null); + /** StatusEvent taskState. */ + public taskState: (google.cloud.batch.v1.TaskStatus.State|keyof typeof google.cloud.batch.v1.TaskStatus.State); + /** * Creates a new StatusEvent instance using the specified properties. * @param [properties] Properties to set @@ -6762,6 +6768,9 @@ export namespace google { /** JobStatus runDuration */ runDuration?: (google.protobuf.IDuration|null); + + /** JobStatus resourceUsage */ + resourceUsage?: (google.cloud.batch.v1alpha.IResourceUsage|null); } /** Represents a JobStatus. */ @@ -6785,6 +6794,9 @@ export namespace google { /** JobStatus runDuration. */ public runDuration?: (google.protobuf.IDuration|null); + /** JobStatus resourceUsage. */ + public resourceUsage?: (google.cloud.batch.v1alpha.IResourceUsage|null); + /** * Creates a new JobStatus instance using the specified properties. * @param [properties] Properties to set @@ -7095,6 +7107,103 @@ export namespace google { } } + /** Properties of a ResourceUsage. */ + interface IResourceUsage { + + /** ResourceUsage coreHours */ + coreHours?: (number|null); + } + + /** Represents a ResourceUsage. */ + class ResourceUsage implements IResourceUsage { + + /** + * Constructs a new ResourceUsage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.batch.v1alpha.IResourceUsage); + + /** ResourceUsage coreHours. */ + public coreHours: number; + + /** + * Creates a new ResourceUsage instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceUsage instance + */ + public static create(properties?: google.cloud.batch.v1alpha.IResourceUsage): google.cloud.batch.v1alpha.ResourceUsage; + + /** + * Encodes the specified ResourceUsage message. Does not implicitly {@link google.cloud.batch.v1alpha.ResourceUsage.verify|verify} messages. + * @param message ResourceUsage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.batch.v1alpha.IResourceUsage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceUsage message, length delimited. Does not implicitly {@link google.cloud.batch.v1alpha.ResourceUsage.verify|verify} messages. + * @param message ResourceUsage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.batch.v1alpha.IResourceUsage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceUsage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceUsage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.batch.v1alpha.ResourceUsage; + + /** + * Decodes a ResourceUsage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceUsage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.batch.v1alpha.ResourceUsage; + + /** + * Verifies a ResourceUsage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceUsage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceUsage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.batch.v1alpha.ResourceUsage; + + /** + * Creates a plain object from a ResourceUsage message. Also converts values to other types if specified. + * @param message ResourceUsage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.batch.v1alpha.ResourceUsage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceUsage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceUsage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a JobNotification. */ interface IJobNotification { @@ -8776,6 +8885,9 @@ export namespace google { /** StatusEvent taskExecution */ taskExecution?: (google.cloud.batch.v1alpha.ITaskExecution|null); + + /** StatusEvent taskState */ + taskState?: (google.cloud.batch.v1alpha.TaskStatus.State|keyof typeof google.cloud.batch.v1alpha.TaskStatus.State|null); } /** Represents a StatusEvent. */ @@ -8799,6 +8911,9 @@ export namespace google { /** StatusEvent taskExecution. */ public taskExecution?: (google.cloud.batch.v1alpha.ITaskExecution|null); + /** StatusEvent taskState. */ + public taskState: (google.cloud.batch.v1alpha.TaskStatus.State|keyof typeof google.cloud.batch.v1alpha.TaskStatus.State); + /** * Creates a new StatusEvent instance using the specified properties. * @param [properties] Properties to set @@ -8982,6 +9097,9 @@ export namespace google { /** TaskStatus statusEvents */ statusEvents?: (google.cloud.batch.v1alpha.IStatusEvent[]|null); + + /** TaskStatus resourceUsage */ + resourceUsage?: (google.cloud.batch.v1alpha.ITaskResourceUsage|null); } /** Represents a TaskStatus. */ @@ -8999,6 +9117,9 @@ export namespace google { /** TaskStatus statusEvents. */ public statusEvents: google.cloud.batch.v1alpha.IStatusEvent[]; + /** TaskStatus resourceUsage. */ + public resourceUsage?: (google.cloud.batch.v1alpha.ITaskResourceUsage|null); + /** * Creates a new TaskStatus instance using the specified properties. * @param [properties] Properties to set @@ -9090,6 +9211,103 @@ export namespace google { } } + /** Properties of a TaskResourceUsage. */ + interface ITaskResourceUsage { + + /** TaskResourceUsage coreHours */ + coreHours?: (number|null); + } + + /** Represents a TaskResourceUsage. */ + class TaskResourceUsage implements ITaskResourceUsage { + + /** + * Constructs a new TaskResourceUsage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.batch.v1alpha.ITaskResourceUsage); + + /** TaskResourceUsage coreHours. */ + public coreHours: number; + + /** + * Creates a new TaskResourceUsage instance using the specified properties. + * @param [properties] Properties to set + * @returns TaskResourceUsage instance + */ + public static create(properties?: google.cloud.batch.v1alpha.ITaskResourceUsage): google.cloud.batch.v1alpha.TaskResourceUsage; + + /** + * Encodes the specified TaskResourceUsage message. Does not implicitly {@link google.cloud.batch.v1alpha.TaskResourceUsage.verify|verify} messages. + * @param message TaskResourceUsage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.batch.v1alpha.ITaskResourceUsage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TaskResourceUsage message, length delimited. Does not implicitly {@link google.cloud.batch.v1alpha.TaskResourceUsage.verify|verify} messages. + * @param message TaskResourceUsage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.batch.v1alpha.ITaskResourceUsage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TaskResourceUsage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TaskResourceUsage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.batch.v1alpha.TaskResourceUsage; + + /** + * Decodes a TaskResourceUsage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TaskResourceUsage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.batch.v1alpha.TaskResourceUsage; + + /** + * Verifies a TaskResourceUsage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TaskResourceUsage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TaskResourceUsage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.batch.v1alpha.TaskResourceUsage; + + /** + * Creates a plain object from a TaskResourceUsage message. Also converts values to other types if specified. + * @param message TaskResourceUsage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.batch.v1alpha.TaskResourceUsage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TaskResourceUsage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TaskResourceUsage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a Runnable. */ interface IRunnable { diff --git a/packages/google-cloud-batch/protos/protos.js b/packages/google-cloud-batch/protos/protos.js index f5fdd35be33..b47b7031c1c 100644 --- a/packages/google-cloud-batch/protos/protos.js +++ b/packages/google-cloud-batch/protos/protos.js @@ -8772,6 +8772,7 @@ * @property {string|null} [description] StatusEvent description * @property {google.protobuf.ITimestamp|null} [eventTime] StatusEvent eventTime * @property {google.cloud.batch.v1.ITaskExecution|null} [taskExecution] StatusEvent taskExecution + * @property {google.cloud.batch.v1.TaskStatus.State|null} [taskState] StatusEvent taskState */ /** @@ -8821,6 +8822,14 @@ */ StatusEvent.prototype.taskExecution = null; + /** + * StatusEvent taskState. + * @member {google.cloud.batch.v1.TaskStatus.State} taskState + * @memberof google.cloud.batch.v1.StatusEvent + * @instance + */ + StatusEvent.prototype.taskState = 0; + /** * Creates a new StatusEvent instance using the specified properties. * @function create @@ -8853,6 +8862,8 @@ writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); if (message.taskExecution != null && Object.hasOwnProperty.call(message, "taskExecution")) $root.google.cloud.batch.v1.TaskExecution.encode(message.taskExecution, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.taskState != null && Object.hasOwnProperty.call(message, "taskState")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.taskState); return writer; }; @@ -8903,6 +8914,10 @@ message.taskExecution = $root.google.cloud.batch.v1.TaskExecution.decode(reader, reader.uint32()); break; } + case 5: { + message.taskState = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -8954,6 +8969,18 @@ if (error) return "taskExecution." + error; } + if (message.taskState != null && message.hasOwnProperty("taskState")) + switch (message.taskState) { + default: + return "taskState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } return null; }; @@ -8983,6 +9010,38 @@ throw TypeError(".google.cloud.batch.v1.StatusEvent.taskExecution: object expected"); message.taskExecution = $root.google.cloud.batch.v1.TaskExecution.fromObject(object.taskExecution); } + switch (object.taskState) { + default: + if (typeof object.taskState === "number") { + message.taskState = object.taskState; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.taskState = 0; + break; + case "PENDING": + case 1: + message.taskState = 1; + break; + case "ASSIGNED": + case 2: + message.taskState = 2; + break; + case "RUNNING": + case 3: + message.taskState = 3; + break; + case "FAILED": + case 4: + message.taskState = 4; + break; + case "SUCCEEDED": + case 5: + message.taskState = 5; + break; + } return message; }; @@ -9004,6 +9063,7 @@ object.eventTime = null; object.type = ""; object.taskExecution = null; + object.taskState = options.enums === String ? "STATE_UNSPECIFIED" : 0; } if (message.description != null && message.hasOwnProperty("description")) object.description = message.description; @@ -9013,6 +9073,8 @@ object.type = message.type; if (message.taskExecution != null && message.hasOwnProperty("taskExecution")) object.taskExecution = $root.google.cloud.batch.v1.TaskExecution.toObject(message.taskExecution, options); + if (message.taskState != null && message.hasOwnProperty("taskState")) + object.taskState = options.enums === String ? $root.google.cloud.batch.v1.TaskStatus.State[message.taskState] === undefined ? message.taskState : $root.google.cloud.batch.v1.TaskStatus.State[message.taskState] : message.taskState; return object; }; @@ -17279,6 +17341,7 @@ * @property {Array.|null} [statusEvents] JobStatus statusEvents * @property {Object.|null} [taskGroups] JobStatus taskGroups * @property {google.protobuf.IDuration|null} [runDuration] JobStatus runDuration + * @property {google.cloud.batch.v1alpha.IResourceUsage|null} [resourceUsage] JobStatus resourceUsage */ /** @@ -17330,6 +17393,14 @@ */ JobStatus.prototype.runDuration = null; + /** + * JobStatus resourceUsage. + * @member {google.cloud.batch.v1alpha.IResourceUsage|null|undefined} resourceUsage + * @memberof google.cloud.batch.v1alpha.JobStatus + * @instance + */ + JobStatus.prototype.resourceUsage = null; + /** * Creates a new JobStatus instance using the specified properties. * @function create @@ -17366,6 +17437,8 @@ } if (message.runDuration != null && Object.hasOwnProperty.call(message, "runDuration")) $root.google.protobuf.Duration.encode(message.runDuration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.resourceUsage != null && Object.hasOwnProperty.call(message, "resourceUsage")) + $root.google.cloud.batch.v1alpha.ResourceUsage.encode(message.resourceUsage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -17437,6 +17510,10 @@ message.runDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } + case 6: { + message.resourceUsage = $root.google.cloud.batch.v1alpha.ResourceUsage.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -17509,6 +17586,11 @@ if (error) return "runDuration." + error; } + if (message.resourceUsage != null && message.hasOwnProperty("resourceUsage")) { + var error = $root.google.cloud.batch.v1alpha.ResourceUsage.verify(message.resourceUsage); + if (error) + return "resourceUsage." + error; + } return null; }; @@ -17585,6 +17667,11 @@ throw TypeError(".google.cloud.batch.v1alpha.JobStatus.runDuration: object expected"); message.runDuration = $root.google.protobuf.Duration.fromObject(object.runDuration); } + if (object.resourceUsage != null) { + if (typeof object.resourceUsage !== "object") + throw TypeError(".google.cloud.batch.v1alpha.JobStatus.resourceUsage: object expected"); + message.resourceUsage = $root.google.cloud.batch.v1alpha.ResourceUsage.fromObject(object.resourceUsage); + } return message; }; @@ -17608,6 +17695,7 @@ if (options.defaults) { object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; object.runDuration = null; + object.resourceUsage = null; } if (message.state != null && message.hasOwnProperty("state")) object.state = options.enums === String ? $root.google.cloud.batch.v1alpha.JobStatus.State[message.state] === undefined ? message.state : $root.google.cloud.batch.v1alpha.JobStatus.State[message.state] : message.state; @@ -17624,6 +17712,8 @@ } if (message.runDuration != null && message.hasOwnProperty("runDuration")) object.runDuration = $root.google.protobuf.Duration.toObject(message.runDuration, options); + if (message.resourceUsage != null && message.hasOwnProperty("resourceUsage")) + object.resourceUsage = $root.google.cloud.batch.v1alpha.ResourceUsage.toObject(message.resourceUsage, options); return object; }; @@ -18294,6 +18384,209 @@ return JobStatus; })(); + v1alpha.ResourceUsage = (function() { + + /** + * Properties of a ResourceUsage. + * @memberof google.cloud.batch.v1alpha + * @interface IResourceUsage + * @property {number|null} [coreHours] ResourceUsage coreHours + */ + + /** + * Constructs a new ResourceUsage. + * @memberof google.cloud.batch.v1alpha + * @classdesc Represents a ResourceUsage. + * @implements IResourceUsage + * @constructor + * @param {google.cloud.batch.v1alpha.IResourceUsage=} [properties] Properties to set + */ + function ResourceUsage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceUsage coreHours. + * @member {number} coreHours + * @memberof google.cloud.batch.v1alpha.ResourceUsage + * @instance + */ + ResourceUsage.prototype.coreHours = 0; + + /** + * Creates a new ResourceUsage instance using the specified properties. + * @function create + * @memberof google.cloud.batch.v1alpha.ResourceUsage + * @static + * @param {google.cloud.batch.v1alpha.IResourceUsage=} [properties] Properties to set + * @returns {google.cloud.batch.v1alpha.ResourceUsage} ResourceUsage instance + */ + ResourceUsage.create = function create(properties) { + return new ResourceUsage(properties); + }; + + /** + * Encodes the specified ResourceUsage message. Does not implicitly {@link google.cloud.batch.v1alpha.ResourceUsage.verify|verify} messages. + * @function encode + * @memberof google.cloud.batch.v1alpha.ResourceUsage + * @static + * @param {google.cloud.batch.v1alpha.IResourceUsage} message ResourceUsage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceUsage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.coreHours != null && Object.hasOwnProperty.call(message, "coreHours")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.coreHours); + return writer; + }; + + /** + * Encodes the specified ResourceUsage message, length delimited. Does not implicitly {@link google.cloud.batch.v1alpha.ResourceUsage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.batch.v1alpha.ResourceUsage + * @static + * @param {google.cloud.batch.v1alpha.IResourceUsage} message ResourceUsage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceUsage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceUsage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.batch.v1alpha.ResourceUsage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.batch.v1alpha.ResourceUsage} ResourceUsage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceUsage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.batch.v1alpha.ResourceUsage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.coreHours = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceUsage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.batch.v1alpha.ResourceUsage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.batch.v1alpha.ResourceUsage} ResourceUsage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceUsage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceUsage message. + * @function verify + * @memberof google.cloud.batch.v1alpha.ResourceUsage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceUsage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.coreHours != null && message.hasOwnProperty("coreHours")) + if (typeof message.coreHours !== "number") + return "coreHours: number expected"; + return null; + }; + + /** + * Creates a ResourceUsage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.batch.v1alpha.ResourceUsage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.batch.v1alpha.ResourceUsage} ResourceUsage + */ + ResourceUsage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.batch.v1alpha.ResourceUsage) + return object; + var message = new $root.google.cloud.batch.v1alpha.ResourceUsage(); + if (object.coreHours != null) + message.coreHours = Number(object.coreHours); + return message; + }; + + /** + * Creates a plain object from a ResourceUsage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.batch.v1alpha.ResourceUsage + * @static + * @param {google.cloud.batch.v1alpha.ResourceUsage} message ResourceUsage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceUsage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.coreHours = 0; + if (message.coreHours != null && message.hasOwnProperty("coreHours")) + object.coreHours = options.json && !isFinite(message.coreHours) ? String(message.coreHours) : message.coreHours; + return object; + }; + + /** + * Converts this ResourceUsage to JSON. + * @function toJSON + * @memberof google.cloud.batch.v1alpha.ResourceUsage + * @instance + * @returns {Object.} JSON object + */ + ResourceUsage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceUsage + * @function getTypeUrl + * @memberof google.cloud.batch.v1alpha.ResourceUsage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceUsage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.batch.v1alpha.ResourceUsage"; + }; + + return ResourceUsage; + })(); + v1alpha.JobNotification = (function() { /** @@ -22963,6 +23256,7 @@ * @property {string|null} [description] StatusEvent description * @property {google.protobuf.ITimestamp|null} [eventTime] StatusEvent eventTime * @property {google.cloud.batch.v1alpha.ITaskExecution|null} [taskExecution] StatusEvent taskExecution + * @property {google.cloud.batch.v1alpha.TaskStatus.State|null} [taskState] StatusEvent taskState */ /** @@ -23012,6 +23306,14 @@ */ StatusEvent.prototype.taskExecution = null; + /** + * StatusEvent taskState. + * @member {google.cloud.batch.v1alpha.TaskStatus.State} taskState + * @memberof google.cloud.batch.v1alpha.StatusEvent + * @instance + */ + StatusEvent.prototype.taskState = 0; + /** * Creates a new StatusEvent instance using the specified properties. * @function create @@ -23044,6 +23346,8 @@ writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); if (message.taskExecution != null && Object.hasOwnProperty.call(message, "taskExecution")) $root.google.cloud.batch.v1alpha.TaskExecution.encode(message.taskExecution, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.taskState != null && Object.hasOwnProperty.call(message, "taskState")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.taskState); return writer; }; @@ -23094,6 +23398,10 @@ message.taskExecution = $root.google.cloud.batch.v1alpha.TaskExecution.decode(reader, reader.uint32()); break; } + case 5: { + message.taskState = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -23145,6 +23453,18 @@ if (error) return "taskExecution." + error; } + if (message.taskState != null && message.hasOwnProperty("taskState")) + switch (message.taskState) { + default: + return "taskState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } return null; }; @@ -23174,6 +23494,38 @@ throw TypeError(".google.cloud.batch.v1alpha.StatusEvent.taskExecution: object expected"); message.taskExecution = $root.google.cloud.batch.v1alpha.TaskExecution.fromObject(object.taskExecution); } + switch (object.taskState) { + default: + if (typeof object.taskState === "number") { + message.taskState = object.taskState; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.taskState = 0; + break; + case "PENDING": + case 1: + message.taskState = 1; + break; + case "ASSIGNED": + case 2: + message.taskState = 2; + break; + case "RUNNING": + case 3: + message.taskState = 3; + break; + case "FAILED": + case 4: + message.taskState = 4; + break; + case "SUCCEEDED": + case 5: + message.taskState = 5; + break; + } return message; }; @@ -23195,6 +23547,7 @@ object.eventTime = null; object.type = ""; object.taskExecution = null; + object.taskState = options.enums === String ? "STATE_UNSPECIFIED" : 0; } if (message.description != null && message.hasOwnProperty("description")) object.description = message.description; @@ -23204,6 +23557,8 @@ object.type = message.type; if (message.taskExecution != null && message.hasOwnProperty("taskExecution")) object.taskExecution = $root.google.cloud.batch.v1alpha.TaskExecution.toObject(message.taskExecution, options); + if (message.taskState != null && message.hasOwnProperty("taskState")) + object.taskState = options.enums === String ? $root.google.cloud.batch.v1alpha.TaskStatus.State[message.taskState] === undefined ? message.taskState : $root.google.cloud.batch.v1alpha.TaskStatus.State[message.taskState] : message.taskState; return object; }; @@ -23447,6 +23802,7 @@ * @interface ITaskStatus * @property {google.cloud.batch.v1alpha.TaskStatus.State|null} [state] TaskStatus state * @property {Array.|null} [statusEvents] TaskStatus statusEvents + * @property {google.cloud.batch.v1alpha.ITaskResourceUsage|null} [resourceUsage] TaskStatus resourceUsage */ /** @@ -23481,6 +23837,14 @@ */ TaskStatus.prototype.statusEvents = $util.emptyArray; + /** + * TaskStatus resourceUsage. + * @member {google.cloud.batch.v1alpha.ITaskResourceUsage|null|undefined} resourceUsage + * @memberof google.cloud.batch.v1alpha.TaskStatus + * @instance + */ + TaskStatus.prototype.resourceUsage = null; + /** * Creates a new TaskStatus instance using the specified properties. * @function create @@ -23510,6 +23874,8 @@ if (message.statusEvents != null && message.statusEvents.length) for (var i = 0; i < message.statusEvents.length; ++i) $root.google.cloud.batch.v1alpha.StatusEvent.encode(message.statusEvents[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.resourceUsage != null && Object.hasOwnProperty.call(message, "resourceUsage")) + $root.google.cloud.batch.v1alpha.TaskResourceUsage.encode(message.resourceUsage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -23554,6 +23920,10 @@ message.statusEvents.push($root.google.cloud.batch.v1alpha.StatusEvent.decode(reader, reader.uint32())); break; } + case 3: { + message.resourceUsage = $root.google.cloud.batch.v1alpha.TaskResourceUsage.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -23610,6 +23980,11 @@ return "statusEvents." + error; } } + if (message.resourceUsage != null && message.hasOwnProperty("resourceUsage")) { + var error = $root.google.cloud.batch.v1alpha.TaskResourceUsage.verify(message.resourceUsage); + if (error) + return "resourceUsage." + error; + } return null; }; @@ -23667,6 +24042,11 @@ message.statusEvents[i] = $root.google.cloud.batch.v1alpha.StatusEvent.fromObject(object.statusEvents[i]); } } + if (object.resourceUsage != null) { + if (typeof object.resourceUsage !== "object") + throw TypeError(".google.cloud.batch.v1alpha.TaskStatus.resourceUsage: object expected"); + message.resourceUsage = $root.google.cloud.batch.v1alpha.TaskResourceUsage.fromObject(object.resourceUsage); + } return message; }; @@ -23685,8 +24065,10 @@ var object = {}; if (options.arrays || options.defaults) object.statusEvents = []; - if (options.defaults) + if (options.defaults) { object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.resourceUsage = null; + } if (message.state != null && message.hasOwnProperty("state")) object.state = options.enums === String ? $root.google.cloud.batch.v1alpha.TaskStatus.State[message.state] === undefined ? message.state : $root.google.cloud.batch.v1alpha.TaskStatus.State[message.state] : message.state; if (message.statusEvents && message.statusEvents.length) { @@ -23694,6 +24076,8 @@ for (var j = 0; j < message.statusEvents.length; ++j) object.statusEvents[j] = $root.google.cloud.batch.v1alpha.StatusEvent.toObject(message.statusEvents[j], options); } + if (message.resourceUsage != null && message.hasOwnProperty("resourceUsage")) + object.resourceUsage = $root.google.cloud.batch.v1alpha.TaskResourceUsage.toObject(message.resourceUsage, options); return object; }; @@ -23748,6 +24132,209 @@ return TaskStatus; })(); + v1alpha.TaskResourceUsage = (function() { + + /** + * Properties of a TaskResourceUsage. + * @memberof google.cloud.batch.v1alpha + * @interface ITaskResourceUsage + * @property {number|null} [coreHours] TaskResourceUsage coreHours + */ + + /** + * Constructs a new TaskResourceUsage. + * @memberof google.cloud.batch.v1alpha + * @classdesc Represents a TaskResourceUsage. + * @implements ITaskResourceUsage + * @constructor + * @param {google.cloud.batch.v1alpha.ITaskResourceUsage=} [properties] Properties to set + */ + function TaskResourceUsage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TaskResourceUsage coreHours. + * @member {number} coreHours + * @memberof google.cloud.batch.v1alpha.TaskResourceUsage + * @instance + */ + TaskResourceUsage.prototype.coreHours = 0; + + /** + * Creates a new TaskResourceUsage instance using the specified properties. + * @function create + * @memberof google.cloud.batch.v1alpha.TaskResourceUsage + * @static + * @param {google.cloud.batch.v1alpha.ITaskResourceUsage=} [properties] Properties to set + * @returns {google.cloud.batch.v1alpha.TaskResourceUsage} TaskResourceUsage instance + */ + TaskResourceUsage.create = function create(properties) { + return new TaskResourceUsage(properties); + }; + + /** + * Encodes the specified TaskResourceUsage message. Does not implicitly {@link google.cloud.batch.v1alpha.TaskResourceUsage.verify|verify} messages. + * @function encode + * @memberof google.cloud.batch.v1alpha.TaskResourceUsage + * @static + * @param {google.cloud.batch.v1alpha.ITaskResourceUsage} message TaskResourceUsage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TaskResourceUsage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.coreHours != null && Object.hasOwnProperty.call(message, "coreHours")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.coreHours); + return writer; + }; + + /** + * Encodes the specified TaskResourceUsage message, length delimited. Does not implicitly {@link google.cloud.batch.v1alpha.TaskResourceUsage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.batch.v1alpha.TaskResourceUsage + * @static + * @param {google.cloud.batch.v1alpha.ITaskResourceUsage} message TaskResourceUsage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TaskResourceUsage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TaskResourceUsage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.batch.v1alpha.TaskResourceUsage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.batch.v1alpha.TaskResourceUsage} TaskResourceUsage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TaskResourceUsage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.batch.v1alpha.TaskResourceUsage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.coreHours = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TaskResourceUsage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.batch.v1alpha.TaskResourceUsage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.batch.v1alpha.TaskResourceUsage} TaskResourceUsage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TaskResourceUsage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TaskResourceUsage message. + * @function verify + * @memberof google.cloud.batch.v1alpha.TaskResourceUsage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TaskResourceUsage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.coreHours != null && message.hasOwnProperty("coreHours")) + if (typeof message.coreHours !== "number") + return "coreHours: number expected"; + return null; + }; + + /** + * Creates a TaskResourceUsage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.batch.v1alpha.TaskResourceUsage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.batch.v1alpha.TaskResourceUsage} TaskResourceUsage + */ + TaskResourceUsage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.batch.v1alpha.TaskResourceUsage) + return object; + var message = new $root.google.cloud.batch.v1alpha.TaskResourceUsage(); + if (object.coreHours != null) + message.coreHours = Number(object.coreHours); + return message; + }; + + /** + * Creates a plain object from a TaskResourceUsage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.batch.v1alpha.TaskResourceUsage + * @static + * @param {google.cloud.batch.v1alpha.TaskResourceUsage} message TaskResourceUsage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TaskResourceUsage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.coreHours = 0; + if (message.coreHours != null && message.hasOwnProperty("coreHours")) + object.coreHours = options.json && !isFinite(message.coreHours) ? String(message.coreHours) : message.coreHours; + return object; + }; + + /** + * Converts this TaskResourceUsage to JSON. + * @function toJSON + * @memberof google.cloud.batch.v1alpha.TaskResourceUsage + * @instance + * @returns {Object.} JSON object + */ + TaskResourceUsage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TaskResourceUsage + * @function getTypeUrl + * @memberof google.cloud.batch.v1alpha.TaskResourceUsage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TaskResourceUsage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.batch.v1alpha.TaskResourceUsage"; + }; + + return TaskResourceUsage; + })(); + v1alpha.Runnable = (function() { /** diff --git a/packages/google-cloud-batch/protos/protos.json b/packages/google-cloud-batch/protos/protos.json index c7d9d6ca9bd..14e79ce555f 100644 --- a/packages/google-cloud-batch/protos/protos.json +++ b/packages/google-cloud-batch/protos/protos.json @@ -845,6 +845,10 @@ "taskExecution": { "type": "TaskExecution", "id": 4 + }, + "taskState": { + "type": "TaskStatus.State", + "id": 5 } } }, @@ -1674,6 +1678,10 @@ "runDuration": { "type": "google.protobuf.Duration", "id": 5 + }, + "resourceUsage": { + "type": "ResourceUsage", + "id": 6 } }, "nested": { @@ -1724,6 +1732,14 @@ } } }, + "ResourceUsage": { + "fields": { + "coreHours": { + "type": "double", + "id": 1 + } + } + }, "JobNotification": { "fields": { "pubsubTopic": { @@ -2125,6 +2141,10 @@ "taskExecution": { "type": "TaskExecution", "id": 4 + }, + "taskState": { + "type": "TaskStatus.State", + "id": 5 } } }, @@ -2146,6 +2166,10 @@ "rule": "repeated", "type": "StatusEvent", "id": 2 + }, + "resourceUsage": { + "type": "TaskResourceUsage", + "id": 3 } }, "nested": { @@ -2161,6 +2185,14 @@ } } }, + "TaskResourceUsage": { + "fields": { + "coreHours": { + "type": "double", + "id": 1 + } + } + }, "Runnable": { "oneofs": { "executable": { diff --git a/packages/google-cloud-batch/samples/generated/v1/batch_service.create_job.js b/packages/google-cloud-batch/samples/generated/v1/batch_service.create_job.js index 6e4dfeb5fd6..de0c6885153 100644 --- a/packages/google-cloud-batch/samples/generated/v1/batch_service.create_job.js +++ b/packages/google-cloud-batch/samples/generated/v1/batch_service.create_job.js @@ -53,8 +53,8 @@ function main(parent, job) { * 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 t - * he request times out. If you make the request again with the same 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. diff --git a/packages/google-cloud-batch/samples/generated/v1/batch_service.delete_job.js b/packages/google-cloud-batch/samples/generated/v1/batch_service.delete_job.js index bd2f825f3b0..6e2ad9b9488 100644 --- a/packages/google-cloud-batch/samples/generated/v1/batch_service.delete_job.js +++ b/packages/google-cloud-batch/samples/generated/v1/batch_service.delete_job.js @@ -41,8 +41,8 @@ function main() { * 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 t - * he request times out. If you make the request again with the same 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. diff --git a/packages/google-cloud-batch/samples/generated/v1alpha/batch_service.create_job.js b/packages/google-cloud-batch/samples/generated/v1alpha/batch_service.create_job.js index e41716733e3..1ca515333b0 100644 --- a/packages/google-cloud-batch/samples/generated/v1alpha/batch_service.create_job.js +++ b/packages/google-cloud-batch/samples/generated/v1alpha/batch_service.create_job.js @@ -53,8 +53,8 @@ function main(parent, job) { * 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 t - * he request times out. If you make the request again with the same 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. diff --git a/packages/google-cloud-batch/samples/generated/v1alpha/batch_service.delete_job.js b/packages/google-cloud-batch/samples/generated/v1alpha/batch_service.delete_job.js index 019b5d4d2d5..3458538cfae 100644 --- a/packages/google-cloud-batch/samples/generated/v1alpha/batch_service.delete_job.js +++ b/packages/google-cloud-batch/samples/generated/v1alpha/batch_service.delete_job.js @@ -41,8 +41,8 @@ function main() { * 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 t - * he request times out. If you make the request again with the same 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. diff --git a/packages/google-cloud-batch/src/v1/batch_service_client.ts b/packages/google-cloud-batch/src/v1/batch_service_client.ts index 7308e14b7ae..da3aed8764e 100644 --- a/packages/google-cloud-batch/src/v1/batch_service_client.ts +++ b/packages/google-cloud-batch/src/v1/batch_service_client.ts @@ -27,8 +27,6 @@ import type { LROperation, PaginationCallback, GaxCall, - IamClient, - IamProtos, LocationsClient, LocationProtos, } from 'google-gax'; @@ -67,7 +65,6 @@ export class BatchServiceClient { }; warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; - iamClient: IamClient; locationsClient: LocationsClient; pathTemplates: {[name: string]: gax.PathTemplate}; operationsClient: gax.OperationsClient; @@ -166,8 +163,6 @@ export class BatchServiceClient { if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; } - this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); - this.locationsClient = new this._gaxModule.LocationsClient( this._gaxGrpc, opts @@ -247,20 +242,6 @@ export class BatchServiceClient { selector: 'google.cloud.location.Locations.ListLocations', get: '/v1/{name=projects/*}/locations', }, - { - selector: 'google.iam.v1.IAMPolicy.GetIamPolicy', - get: '/v1/{resource=projects/*/locations/*/jobs/*}:getIamPolicy', - }, - { - selector: 'google.iam.v1.IAMPolicy.SetIamPolicy', - post: '/v1/{resource=projects/*/locations/*/jobs/*}:setIamPolicy', - body: '*', - }, - { - selector: 'google.iam.v1.IAMPolicy.TestIamPermissions', - post: '/v1/{resource=projects/*/locations/*/jobs/*}:testIamPermissions', - body: '*', - }, { selector: 'google.longrunning.Operations.CancelOperation', post: '/v1/{name=projects/*/locations/*/operations/*}:cancel', @@ -466,8 +447,8 @@ export class BatchServiceClient { * 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 t - * he request times out. If you make the request again with the same 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. @@ -732,8 +713,8 @@ export class BatchServiceClient { * 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 t - * he request times out. If you make the request again with the same 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. @@ -1257,146 +1238,6 @@ export class BatchServiceClient { callSettings ) as AsyncIterable; } - /** - * Gets the access control policy for a resource. Returns an empty policy - * if the resource exists and does not have a policy set. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {Object} [request.options] - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. This field is only used by Cloud IAM. - * - * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ - getIamPolicy( - request: IamProtos.google.iam.v1.GetIamPolicyRequest, - options?: - | gax.CallOptions - | Callback< - IamProtos.google.iam.v1.Policy, - IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - IamProtos.google.iam.v1.Policy, - IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): Promise { - return this.iamClient.getIamPolicy(request, options, callback); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - * resource does not exist, this will return an empty set of - * permissions, not a NOT_FOUND error. - * - * Note: This operation is designed to be used for building - * permission-aware UIs and command-line tools, not for authorization - * checking. This operation may "fail open" without warning. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {string[]} request.permissions - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ - setIamPolicy( - request: IamProtos.google.iam.v1.SetIamPolicyRequest, - options?: - | gax.CallOptions - | Callback< - IamProtos.google.iam.v1.Policy, - IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - IamProtos.google.iam.v1.Policy, - IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): Promise { - return this.iamClient.setIamPolicy(request, options, callback); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - * resource does not exist, this will return an empty set of - * permissions, not a NOT_FOUND error. - * - * Note: This operation is designed to be used for building - * permission-aware UIs and command-line tools, not for authorization - * checking. This operation may "fail open" without warning. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {string[]} request.permissions - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - */ - testIamPermissions( - request: IamProtos.google.iam.v1.TestIamPermissionsRequest, - options?: - | gax.CallOptions - | Callback< - IamProtos.google.iam.v1.TestIamPermissionsResponse, - IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - IamProtos.google.iam.v1.TestIamPermissionsResponse, - IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, - {} | null | undefined - > - ): Promise { - return this.iamClient.testIamPermissions(request, options, callback); - } - /** * Gets information about a location. * @@ -1926,7 +1767,6 @@ export class BatchServiceClient { return this.batchServiceStub.then(stub => { this._terminated = true; stub.close(); - this.iamClient.close(); this.locationsClient.close(); this.operationsClient.close(); }); diff --git a/packages/google-cloud-batch/src/v1alpha/batch_service_client.ts b/packages/google-cloud-batch/src/v1alpha/batch_service_client.ts index 335b92e76a4..98c9f553c5a 100644 --- a/packages/google-cloud-batch/src/v1alpha/batch_service_client.ts +++ b/packages/google-cloud-batch/src/v1alpha/batch_service_client.ts @@ -27,8 +27,6 @@ import type { LROperation, PaginationCallback, GaxCall, - IamClient, - IamProtos, LocationsClient, LocationProtos, } from 'google-gax'; @@ -67,7 +65,6 @@ export class BatchServiceClient { }; warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; - iamClient: IamClient; locationsClient: LocationsClient; pathTemplates: {[name: string]: gax.PathTemplate}; operationsClient: gax.OperationsClient; @@ -166,8 +163,6 @@ export class BatchServiceClient { if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; } - this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); - this.locationsClient = new this._gaxModule.LocationsClient( this._gaxGrpc, opts @@ -247,20 +242,6 @@ export class BatchServiceClient { selector: 'google.cloud.location.Locations.ListLocations', get: '/v1alpha/{name=projects/*}/locations', }, - { - selector: 'google.iam.v1.IAMPolicy.GetIamPolicy', - get: '/v1alpha/{resource=projects/*/locations/*/jobs/*}:getIamPolicy', - }, - { - selector: 'google.iam.v1.IAMPolicy.SetIamPolicy', - post: '/v1alpha/{resource=projects/*/locations/*/jobs/*}:setIamPolicy', - body: '*', - }, - { - selector: 'google.iam.v1.IAMPolicy.TestIamPermissions', - post: '/v1alpha/{resource=projects/*/locations/*/jobs/*}:testIamPermissions', - body: '*', - }, { selector: 'google.longrunning.Operations.CancelOperation', post: '/v1alpha/{name=projects/*/locations/*/operations/*}:cancel', @@ -466,8 +447,8 @@ export class BatchServiceClient { * 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 t - * he request times out. If you make the request again with the same 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. @@ -734,8 +715,8 @@ export class BatchServiceClient { * 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 t - * he request times out. If you make the request again with the same 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. @@ -1263,146 +1244,6 @@ export class BatchServiceClient { callSettings ) as AsyncIterable; } - /** - * Gets the access control policy for a resource. Returns an empty policy - * if the resource exists and does not have a policy set. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {Object} [request.options] - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. This field is only used by Cloud IAM. - * - * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ - getIamPolicy( - request: IamProtos.google.iam.v1.GetIamPolicyRequest, - options?: - | gax.CallOptions - | Callback< - IamProtos.google.iam.v1.Policy, - IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - IamProtos.google.iam.v1.Policy, - IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): Promise { - return this.iamClient.getIamPolicy(request, options, callback); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - * resource does not exist, this will return an empty set of - * permissions, not a NOT_FOUND error. - * - * Note: This operation is designed to be used for building - * permission-aware UIs and command-line tools, not for authorization - * checking. This operation may "fail open" without warning. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {string[]} request.permissions - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ - setIamPolicy( - request: IamProtos.google.iam.v1.SetIamPolicyRequest, - options?: - | gax.CallOptions - | Callback< - IamProtos.google.iam.v1.Policy, - IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - IamProtos.google.iam.v1.Policy, - IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): Promise { - return this.iamClient.setIamPolicy(request, options, callback); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - * resource does not exist, this will return an empty set of - * permissions, not a NOT_FOUND error. - * - * Note: This operation is designed to be used for building - * permission-aware UIs and command-line tools, not for authorization - * checking. This operation may "fail open" without warning. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {string[]} request.permissions - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - */ - testIamPermissions( - request: IamProtos.google.iam.v1.TestIamPermissionsRequest, - options?: - | gax.CallOptions - | Callback< - IamProtos.google.iam.v1.TestIamPermissionsResponse, - IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - IamProtos.google.iam.v1.TestIamPermissionsResponse, - IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, - {} | null | undefined - > - ): Promise { - return this.iamClient.testIamPermissions(request, options, callback); - } - /** * Gets information about a location. * @@ -1932,7 +1773,6 @@ export class BatchServiceClient { return this.batchServiceStub.then(stub => { this._terminated = true; stub.close(); - this.iamClient.close(); this.locationsClient.close(); this.operationsClient.close(); }); diff --git a/packages/google-cloud-batch/test/gapic_batch_service_v1.ts b/packages/google-cloud-batch/test/gapic_batch_service_v1.ts index 288cfa0933d..96c6461a070 100644 --- a/packages/google-cloud-batch/test/gapic_batch_service_v1.ts +++ b/packages/google-cloud-batch/test/gapic_batch_service_v1.ts @@ -29,7 +29,6 @@ import { protobuf, LROperation, operationsProtos, - IamProtos, LocationProtos, } from 'google-gax'; @@ -1421,330 +1420,6 @@ describe('v1.BatchServiceClient', () => { ); }); }); - describe('getIamPolicy', () => { - it('invokes getIamPolicy without error', async () => { - const client = new batchserviceModule.v1.BatchServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.GetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.Policy() - ); - client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); - const response = await client.getIamPolicy(request, expectedOptions); - assert.deepStrictEqual(response, [expectedResponse]); - assert( - (client.iamClient.getIamPolicy as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - it('invokes getIamPolicy without error using callback', async () => { - const client = new batchserviceModule.v1.BatchServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.GetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.Policy() - ); - client.iamClient.getIamPolicy = sinon - .stub() - .callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getIamPolicy( - request, - expectedOptions, - ( - err?: Error | null, - result?: IamProtos.google.iam.v1.Policy | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.iamClient.getIamPolicy as SinonStub).getCall(0)); - }); - it('invokes getIamPolicy with error', async () => { - const client = new batchserviceModule.v1.BatchServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.GetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); - await assert.rejects( - client.getIamPolicy(request, expectedOptions), - expectedError - ); - assert( - (client.iamClient.getIamPolicy as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - describe('setIamPolicy', () => { - it('invokes setIamPolicy without error', async () => { - const client = new batchserviceModule.v1.BatchServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.SetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.Policy() - ); - client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); - const response = await client.setIamPolicy(request, expectedOptions); - assert.deepStrictEqual(response, [expectedResponse]); - assert( - (client.iamClient.setIamPolicy as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - it('invokes setIamPolicy without error using callback', async () => { - const client = new batchserviceModule.v1.BatchServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.SetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.Policy() - ); - client.iamClient.setIamPolicy = sinon - .stub() - .callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setIamPolicy( - request, - expectedOptions, - ( - err?: Error | null, - result?: IamProtos.google.iam.v1.Policy | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.iamClient.setIamPolicy as SinonStub).getCall(0)); - }); - it('invokes setIamPolicy with error', async () => { - const client = new batchserviceModule.v1.BatchServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.SetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); - await assert.rejects( - client.setIamPolicy(request, expectedOptions), - expectedError - ); - assert( - (client.iamClient.setIamPolicy as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - describe('testIamPermissions', () => { - it('invokes testIamPermissions without error', async () => { - const client = new batchserviceModule.v1.BatchServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.TestIamPermissionsRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.TestIamPermissionsResponse() - ); - client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); - const response = await client.testIamPermissions( - request, - expectedOptions - ); - assert.deepStrictEqual(response, [expectedResponse]); - assert( - (client.iamClient.testIamPermissions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - it('invokes testIamPermissions without error using callback', async () => { - const client = new batchserviceModule.v1.BatchServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.TestIamPermissionsRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.TestIamPermissionsResponse() - ); - client.iamClient.testIamPermissions = sinon - .stub() - .callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.testIamPermissions( - request, - expectedOptions, - ( - err?: Error | null, - result?: IamProtos.google.iam.v1.TestIamPermissionsResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.iamClient.testIamPermissions as SinonStub).getCall(0)); - }); - it('invokes testIamPermissions with error', async () => { - const client = new batchserviceModule.v1.BatchServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.TestIamPermissionsRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.iamClient.testIamPermissions = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.testIamPermissions(request, expectedOptions), - expectedError - ); - assert( - (client.iamClient.testIamPermissions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); describe('getLocation', () => { it('invokes getLocation without error', async () => { const client = new batchserviceModule.v1.BatchServiceClient({ diff --git a/packages/google-cloud-batch/test/gapic_batch_service_v1alpha.ts b/packages/google-cloud-batch/test/gapic_batch_service_v1alpha.ts index 5055912ba23..f13ace35c69 100644 --- a/packages/google-cloud-batch/test/gapic_batch_service_v1alpha.ts +++ b/packages/google-cloud-batch/test/gapic_batch_service_v1alpha.ts @@ -29,7 +29,6 @@ import { protobuf, LROperation, operationsProtos, - IamProtos, LocationProtos, } from 'google-gax'; @@ -1429,330 +1428,6 @@ describe('v1alpha.BatchServiceClient', () => { ); }); }); - describe('getIamPolicy', () => { - it('invokes getIamPolicy without error', async () => { - const client = new batchserviceModule.v1alpha.BatchServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.GetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.Policy() - ); - client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); - const response = await client.getIamPolicy(request, expectedOptions); - assert.deepStrictEqual(response, [expectedResponse]); - assert( - (client.iamClient.getIamPolicy as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - it('invokes getIamPolicy without error using callback', async () => { - const client = new batchserviceModule.v1alpha.BatchServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.GetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.Policy() - ); - client.iamClient.getIamPolicy = sinon - .stub() - .callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getIamPolicy( - request, - expectedOptions, - ( - err?: Error | null, - result?: IamProtos.google.iam.v1.Policy | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.iamClient.getIamPolicy as SinonStub).getCall(0)); - }); - it('invokes getIamPolicy with error', async () => { - const client = new batchserviceModule.v1alpha.BatchServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.GetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); - await assert.rejects( - client.getIamPolicy(request, expectedOptions), - expectedError - ); - assert( - (client.iamClient.getIamPolicy as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - describe('setIamPolicy', () => { - it('invokes setIamPolicy without error', async () => { - const client = new batchserviceModule.v1alpha.BatchServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.SetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.Policy() - ); - client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); - const response = await client.setIamPolicy(request, expectedOptions); - assert.deepStrictEqual(response, [expectedResponse]); - assert( - (client.iamClient.setIamPolicy as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - it('invokes setIamPolicy without error using callback', async () => { - const client = new batchserviceModule.v1alpha.BatchServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.SetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.Policy() - ); - client.iamClient.setIamPolicy = sinon - .stub() - .callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setIamPolicy( - request, - expectedOptions, - ( - err?: Error | null, - result?: IamProtos.google.iam.v1.Policy | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.iamClient.setIamPolicy as SinonStub).getCall(0)); - }); - it('invokes setIamPolicy with error', async () => { - const client = new batchserviceModule.v1alpha.BatchServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.SetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); - await assert.rejects( - client.setIamPolicy(request, expectedOptions), - expectedError - ); - assert( - (client.iamClient.setIamPolicy as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - describe('testIamPermissions', () => { - it('invokes testIamPermissions without error', async () => { - const client = new batchserviceModule.v1alpha.BatchServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.TestIamPermissionsRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.TestIamPermissionsResponse() - ); - client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); - const response = await client.testIamPermissions( - request, - expectedOptions - ); - assert.deepStrictEqual(response, [expectedResponse]); - assert( - (client.iamClient.testIamPermissions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - it('invokes testIamPermissions without error using callback', async () => { - const client = new batchserviceModule.v1alpha.BatchServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.TestIamPermissionsRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.TestIamPermissionsResponse() - ); - client.iamClient.testIamPermissions = sinon - .stub() - .callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.testIamPermissions( - request, - expectedOptions, - ( - err?: Error | null, - result?: IamProtos.google.iam.v1.TestIamPermissionsResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.iamClient.testIamPermissions as SinonStub).getCall(0)); - }); - it('invokes testIamPermissions with error', async () => { - const client = new batchserviceModule.v1alpha.BatchServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.TestIamPermissionsRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.iamClient.testIamPermissions = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.testIamPermissions(request, expectedOptions), - expectedError - ); - assert( - (client.iamClient.testIamPermissions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); describe('getLocation', () => { it('invokes getLocation without error', async () => { const client = new batchserviceModule.v1alpha.BatchServiceClient({ From d1cef14fabc0b1e3dbc957f70f383a5464f7c840 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 2 Mar 2023 15:02:26 +0000 Subject: [PATCH 68/80] fix(deps): roll back dependency @google-cloud/dataform to ^0.4.0 (#4044) --- packages/google-cloud-dataform/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-dataform/samples/package.json b/packages/google-cloud-dataform/samples/package.json index a5a0042d896..be75b9aaa75 100644 --- a/packages/google-cloud-dataform/samples/package.json +++ b/packages/google-cloud-dataform/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/dataform": "^1.0.0" + "@google-cloud/dataform": "^0.4.0" }, "devDependencies": { "c8": "^7.1.0", From 290d38e9b987a3fe05925e226249a461962df53b Mon Sep 17 00:00:00 2001 From: Jeffrey Rennie Date: Thu, 2 Mar 2023 07:29:34 -0800 Subject: [PATCH 69/80] chore: leave a tarball when publishing a package (#4040) The tarball will be archived in placer. Co-authored-by: danieljbruce --- .kokoro/release/publish-single.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.kokoro/release/publish-single.sh b/.kokoro/release/publish-single.sh index 062025d5f46..b6d846b52bb 100755 --- a/.kokoro/release/publish-single.sh +++ b/.kokoro/release/publish-single.sh @@ -21,6 +21,11 @@ set -eo pipefail pwd npm install +npm pack . +# npm provides no way to specify, observe, or predict the name of the tarball +# file it generates. We have to look in the current directory for the freshest +# .tgz file. +TARBALL=$(ls -1 -t *.tgz | head -1) -# publish library to npm -npm publish --access=public --registry=https://wombat-dressing-room.appspot.com +# publish library to npm. +npm publish --access=public --registry=https://wombat-dressing-room.appspot.com "$TARBALL" From 117ae7293c8cf472e900d56c90225c49d6ca2dbc Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 2 Mar 2023 10:43:45 -0500 Subject: [PATCH 70/80] feat: [contactcenterinsights] add a way to specify the conversation automatic analysis percentage for the UploadConversation API when creating Analyses in Insights (#4041) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add a way to specify the conversation automatic analysis percentage for the UploadConversation API when creating Analyses in Insights PiperOrigin-RevId: 513416013 Source-Link: https://github.com/googleapis/googleapis/commit/dacdbc86a108e19ce9363bf66b10385741936d92 Source-Link: https://github.com/googleapis/googleapis-gen/commit/7e3cf93300045e9a5cbfb19002d1cd4cb93b06d0 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbnRhY3RjZW50ZXJpbnNpZ2h0cy8uT3dsQm90LnlhbWwiLCJoIjoiN2UzY2Y5MzMwMDA0NWU5YTVjYmZiMTkwMDJkMWNkNGNiOTNiMDZkMCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: danieljbruce --- .../contactcenterinsights/v1/resources.proto | 4 ++++ .../protos/protos.d.ts | 6 +++++ .../protos/protos.js | 23 +++++++++++++++++++ .../protos/protos.json | 4 ++++ ...google.cloud.contactcenterinsights.v1.json | 2 +- 5 files changed, 38 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/resources.proto b/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/resources.proto index 9c0802b77f1..966680be169 100644 --- a/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/resources.proto +++ b/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/resources.proto @@ -865,6 +865,10 @@ message Settings { // to analyze automatically, between [0, 100]. double runtime_integration_analysis_percentage = 1; + // Percentage of conversations created using the UploadConversation endpoint + // to analyze automatically, between [0, 100]. + double upload_conversation_analysis_percentage = 6; + // To select the annotators to run and the phrase matchers to use // (if any). If not specified, all annotators will be run. AnnotatorSelector annotator_selector = 5; diff --git a/packages/google-cloud-contactcenterinsights/protos/protos.d.ts b/packages/google-cloud-contactcenterinsights/protos/protos.d.ts index 85f57b366ab..83fa0f133de 100644 --- a/packages/google-cloud-contactcenterinsights/protos/protos.d.ts +++ b/packages/google-cloud-contactcenterinsights/protos/protos.d.ts @@ -12117,6 +12117,9 @@ export namespace google { /** AnalysisConfig runtimeIntegrationAnalysisPercentage */ runtimeIntegrationAnalysisPercentage?: (number|null); + /** AnalysisConfig uploadConversationAnalysisPercentage */ + uploadConversationAnalysisPercentage?: (number|null); + /** AnalysisConfig annotatorSelector */ annotatorSelector?: (google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null); } @@ -12133,6 +12136,9 @@ export namespace google { /** AnalysisConfig runtimeIntegrationAnalysisPercentage. */ public runtimeIntegrationAnalysisPercentage: number; + /** AnalysisConfig uploadConversationAnalysisPercentage. */ + public uploadConversationAnalysisPercentage: number; + /** AnalysisConfig annotatorSelector. */ public annotatorSelector?: (google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null); diff --git a/packages/google-cloud-contactcenterinsights/protos/protos.js b/packages/google-cloud-contactcenterinsights/protos/protos.js index 635c9d96435..e38950c30ed 100644 --- a/packages/google-cloud-contactcenterinsights/protos/protos.js +++ b/packages/google-cloud-contactcenterinsights/protos/protos.js @@ -28707,6 +28707,7 @@ * @memberof google.cloud.contactcenterinsights.v1.Settings * @interface IAnalysisConfig * @property {number|null} [runtimeIntegrationAnalysisPercentage] AnalysisConfig runtimeIntegrationAnalysisPercentage + * @property {number|null} [uploadConversationAnalysisPercentage] AnalysisConfig uploadConversationAnalysisPercentage * @property {google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null} [annotatorSelector] AnalysisConfig annotatorSelector */ @@ -28733,6 +28734,14 @@ */ AnalysisConfig.prototype.runtimeIntegrationAnalysisPercentage = 0; + /** + * AnalysisConfig uploadConversationAnalysisPercentage. + * @member {number} uploadConversationAnalysisPercentage + * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig + * @instance + */ + AnalysisConfig.prototype.uploadConversationAnalysisPercentage = 0; + /** * AnalysisConfig annotatorSelector. * @member {google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null|undefined} annotatorSelector @@ -28769,6 +28778,8 @@ writer.uint32(/* id 1, wireType 1 =*/9).double(message.runtimeIntegrationAnalysisPercentage); if (message.annotatorSelector != null && Object.hasOwnProperty.call(message, "annotatorSelector")) $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.encode(message.annotatorSelector, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.uploadConversationAnalysisPercentage != null && Object.hasOwnProperty.call(message, "uploadConversationAnalysisPercentage")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.uploadConversationAnalysisPercentage); return writer; }; @@ -28807,6 +28818,10 @@ message.runtimeIntegrationAnalysisPercentage = reader.double(); break; } + case 6: { + message.uploadConversationAnalysisPercentage = reader.double(); + break; + } case 5: { message.annotatorSelector = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.decode(reader, reader.uint32()); break; @@ -28849,6 +28864,9 @@ if (message.runtimeIntegrationAnalysisPercentage != null && message.hasOwnProperty("runtimeIntegrationAnalysisPercentage")) if (typeof message.runtimeIntegrationAnalysisPercentage !== "number") return "runtimeIntegrationAnalysisPercentage: number expected"; + if (message.uploadConversationAnalysisPercentage != null && message.hasOwnProperty("uploadConversationAnalysisPercentage")) + if (typeof message.uploadConversationAnalysisPercentage !== "number") + return "uploadConversationAnalysisPercentage: number expected"; if (message.annotatorSelector != null && message.hasOwnProperty("annotatorSelector")) { var error = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.verify(message.annotatorSelector); if (error) @@ -28871,6 +28889,8 @@ var message = new $root.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig(); if (object.runtimeIntegrationAnalysisPercentage != null) message.runtimeIntegrationAnalysisPercentage = Number(object.runtimeIntegrationAnalysisPercentage); + if (object.uploadConversationAnalysisPercentage != null) + message.uploadConversationAnalysisPercentage = Number(object.uploadConversationAnalysisPercentage); if (object.annotatorSelector != null) { if (typeof object.annotatorSelector !== "object") throw TypeError(".google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.annotatorSelector: object expected"); @@ -28895,11 +28915,14 @@ if (options.defaults) { object.runtimeIntegrationAnalysisPercentage = 0; object.annotatorSelector = null; + object.uploadConversationAnalysisPercentage = 0; } if (message.runtimeIntegrationAnalysisPercentage != null && message.hasOwnProperty("runtimeIntegrationAnalysisPercentage")) object.runtimeIntegrationAnalysisPercentage = options.json && !isFinite(message.runtimeIntegrationAnalysisPercentage) ? String(message.runtimeIntegrationAnalysisPercentage) : message.runtimeIntegrationAnalysisPercentage; if (message.annotatorSelector != null && message.hasOwnProperty("annotatorSelector")) object.annotatorSelector = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.toObject(message.annotatorSelector, options); + if (message.uploadConversationAnalysisPercentage != null && message.hasOwnProperty("uploadConversationAnalysisPercentage")) + object.uploadConversationAnalysisPercentage = options.json && !isFinite(message.uploadConversationAnalysisPercentage) ? String(message.uploadConversationAnalysisPercentage) : message.uploadConversationAnalysisPercentage; return object; }; diff --git a/packages/google-cloud-contactcenterinsights/protos/protos.json b/packages/google-cloud-contactcenterinsights/protos/protos.json index d7cc1d18d16..f535fe676b7 100644 --- a/packages/google-cloud-contactcenterinsights/protos/protos.json +++ b/packages/google-cloud-contactcenterinsights/protos/protos.json @@ -2919,6 +2919,10 @@ "type": "double", "id": 1 }, + "uploadConversationAnalysisPercentage": { + "type": "double", + "id": 6 + }, "annotatorSelector": { "type": "AnnotatorSelector", "id": 5 diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json b/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json index f24b128bccd..5e9ed6823d5 100644 --- a/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-contactcenterinsights", - "version": "2.4.0", + "version": "2.4.1", "language": "TYPESCRIPT", "apis": [ { From 26c20bff015981f555cd69156138a2fb101a3d5a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 2 Mar 2023 11:00:34 -0500 Subject: [PATCH 71/80] docs: [bigquery-datatransfer] minor comment update (#4029) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: minor comment update PiperOrigin-RevId: 512725339 Source-Link: https://github.com/googleapis/googleapis/commit/ea8d8264e71fce9035c6b91787afff93fb23b803 Source-Link: https://github.com/googleapis/googleapis-gen/commit/dc453f7702cd4d398fe577311804aea1ad2051da Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWRhdGF0cmFuc2Zlci8uT3dsQm90LnlhbWwiLCJoIjoiZGM0NTNmNzcwMmNkNGQzOThmZTU3NzMxMTgwNGFlYTFhZDIwNTFkYSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> Co-authored-by: danieljbruce --- .../google/cloud/bigquery/datatransfer/v1/datatransfer.proto | 4 ++-- .../v1/data_transfer_service.create_transfer_config.js | 2 +- .../v1/data_transfer_service.update_transfer_config.js | 2 +- ...nippet_metadata.google.cloud.bigquery.datatransfer.v1.json | 2 +- .../src/v1/data_transfer_service_client.ts | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-bigquery-datatransfer/protos/google/cloud/bigquery/datatransfer/v1/datatransfer.proto b/packages/google-cloud-bigquery-datatransfer/protos/google/cloud/bigquery/datatransfer/v1/datatransfer.proto index 7400e45f05a..03bfb3b6dc1 100644 --- a/packages/google-cloud-bigquery-datatransfer/protos/google/cloud/bigquery/datatransfer/v1/datatransfer.proto +++ b/packages/google-cloud-bigquery-datatransfer/protos/google/cloud/bigquery/datatransfer/v1/datatransfer.proto @@ -528,7 +528,7 @@ message CreateTransferConfigRequest { // create the transfer config. string version_info = 5; - // Optional service account name. If this field is set, the transfer config + // Optional service account email. If this field is set, the transfer config // will be created with this service account's credentials. It requires that // the requesting user calling this API has permissions to act as this service // account. @@ -582,7 +582,7 @@ message UpdateTransferConfigRequest { // update the transfer config. string version_info = 5; - // Optional service account name. If this field is set, the transfer config + // Optional service account email. If this field is set, the transfer config // will be created with this service account's credentials. It requires that // the requesting user calling this API has permissions to act as this service // account. diff --git a/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/data_transfer_service.create_transfer_config.js b/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/data_transfer_service.create_transfer_config.js index e34a756cbfb..f76576ff3dd 100644 --- a/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/data_transfer_service.create_transfer_config.js +++ b/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/data_transfer_service.create_transfer_config.js @@ -73,7 +73,7 @@ function main(parent, transferConfig) { */ // const versionInfo = 'abc123' /** - * Optional service account name. If this field is set, the transfer config + * Optional service account email. If this field is set, the transfer config * will be created with this service account's credentials. It requires that * the requesting user calling this API has permissions to act as this service * account. diff --git a/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/data_transfer_service.update_transfer_config.js b/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/data_transfer_service.update_transfer_config.js index 87384799f52..97d99434ec4 100644 --- a/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/data_transfer_service.update_transfer_config.js +++ b/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/data_transfer_service.update_transfer_config.js @@ -69,7 +69,7 @@ function main(transferConfig, updateMask) { */ // const versionInfo = 'abc123' /** - * Optional service account name. If this field is set, the transfer config + * Optional service account email. If this field is set, the transfer config * will be created with this service account's credentials. It requires that * the requesting user calling this API has permissions to act as this service * account. diff --git a/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datatransfer.v1.json b/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datatransfer.v1.json index cd821b6d126..845172de3de 100644 --- a/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datatransfer.v1.json +++ b/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datatransfer.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datatransfer", - "version": "3.2.0", + "version": "3.2.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-datatransfer/src/v1/data_transfer_service_client.ts b/packages/google-cloud-bigquery-datatransfer/src/v1/data_transfer_service_client.ts index 8b934bfe28a..60c00149fe8 100644 --- a/packages/google-cloud-bigquery-datatransfer/src/v1/data_transfer_service_client.ts +++ b/packages/google-cloud-bigquery-datatransfer/src/v1/data_transfer_service_client.ts @@ -528,7 +528,7 @@ export class DataTransferServiceClient { * Note that this should not be set when `service_account_name` is used to * create the transfer config. * @param {string} request.serviceAccountName - * Optional service account name. If this field is set, the transfer config + * Optional service account email. If this field is set, the transfer config * will be created with this service account's credentials. It requires that * the requesting user calling this API has permissions to act as this service * account. @@ -668,7 +668,7 @@ export class DataTransferServiceClient { * Note that this should not be set when `service_account_name` is used to * update the transfer config. * @param {string} request.serviceAccountName - * Optional service account name. If this field is set, the transfer config + * Optional service account email. If this field is set, the transfer config * will be created with this service account's credentials. It requires that * the requesting user calling this API has permissions to act as this service * account. From e7a67d3e424c19bc576f821d65895e9598307eb8 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 3 Mar 2023 10:44:49 -0500 Subject: [PATCH 72/80] feat: [dialogflow] added support for custom content types (#4053) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: added support for custom content types docs: clarified wording around quota usage PiperOrigin-RevId: 513681148 Source-Link: https://github.com/googleapis/googleapis/commit/3b8869b89a700b57d3054136c45532abbdb884cf Source-Link: https://github.com/googleapis/googleapis-gen/commit/c1c7570b315ff2cc965c17a3c9a834b2af18ae0c Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3cvLk93bEJvdC55YW1sIiwiaCI6ImMxYzc1NzBiMzE1ZmYyY2M5NjVjMTdhM2M5YTgzNGIyYWYxOGFlMGMifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: added support for custom content types docs: clarified wording around quota usage PiperOrigin-RevId: 513764591 Source-Link: https://github.com/googleapis/googleapis/commit/79acb42407d32ed8e3ebbdb3ed7ea31616c60c02 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f6fabc9251235d35ea642896f2c30b5ee3d3b82c Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3cvLk93bEJvdC55YW1sIiwiaCI6ImY2ZmFiYzkyNTEyMzVkMzVlYTY0Mjg5NmYyYzMwYjVlZTNkM2I4MmMifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../dialogflow/v2/conversation_profile.proto | 4 + .../cloud/dialogflow/v2beta1/agent.proto | 1 + .../dialogflow/v2beta1/audio_config.proto | 36 ++ .../dialogflow/v2beta1/conversation.proto | 3 + .../v2beta1/conversation_profile.proto | 14 +- .../cloud/dialogflow/v2beta1/document.proto | 1 + .../dialogflow/v2beta1/entity_type.proto | 1 + .../protos/protos.d.ts | 121 +++++++ .../google-cloud-dialogflow/protos/protos.js | 321 ++++++++++++++++++ .../protos/protos.json | 44 ++- ...versations.suggest_conversation_summary.js | 4 + ...adata.google.cloud.dialogflow.v2beta1.json | 6 +- .../src/v2beta1/conversations_client.ts | 2 + 13 files changed, 551 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_profile.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_profile.proto index 73cdbea10c3..669dac9bb7c 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_profile.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_profile.proto @@ -150,6 +150,8 @@ service ConversationProfiles { } }; option (google.api.method_signature) = "conversation_profile"; + option (google.api.method_signature) = + "conversation_profile,participant_role,suggestion_feature_config"; option (google.longrunning.operation_info) = { response_type: "ConversationProfile" metadata_type: "SetSuggestionFeatureConfigOperationMetadata" @@ -178,6 +180,8 @@ service ConversationProfiles { } }; option (google.api.method_signature) = "conversation_profile"; + option (google.api.method_signature) = + "conversation_profile,participant_role,suggestion_feature_type"; option (google.longrunning.operation_info) = { response_type: "ConversationProfile" metadata_type: "ClearSuggestionFeatureConfigOperationMetadata" diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/agent.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/agent.proto index 47582f591aa..a6a23953993 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/agent.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/agent.proto @@ -24,6 +24,7 @@ import "google/cloud/dialogflow/v2beta1/validation_result.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Dialogflow.V2Beta1"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/audio_config.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/audio_config.proto index eb0c01d47cf..649b11b2bed 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/audio_config.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/audio_config.proto @@ -184,6 +184,39 @@ message SpeechWordInfo { float confidence = 4; } +// Configuration of the barge-in behavior. Barge-in instructs the API to return +// a detected utterance at a proper time while the client is playing back the +// response audio from a previous request. When the client sees the +// utterance, it should stop the playback and immediately get ready for +// receiving the responses for the current request. +// +// The barge-in handling requires the client to start streaming audio input +// as soon as it starts playing back the audio from the previous response. The +// playback is modeled into two phases: +// +// * No barge-in phase: which goes first and during which speech detection +// should not be carried out. +// +// * Barge-in phase: which follows the no barge-in phase and during which +// the API starts speech detection and may inform the client that an utterance +// has been detected. Note that no-speech event is not expected in this +// phase. +// +// The client provides this configuration in terms of the durations of those +// two phases. The durations are measured in terms of the audio length fromt the +// the start of the input audio. +// +// No-speech event is a response with END_OF_UTTERANCE without any transcript +// following up. +message BargeInConfig { + // Duration that is not eligible for barge-in at the beginning of the input + // audio. + google.protobuf.Duration no_barge_in_duration = 1; + + // Total duration for the playback at the beginning of the input audio. + google.protobuf.Duration total_duration = 2; +} + // Instructs the speech recognizer on how to process the audio content. message InputAudioConfig { // Required. Audio encoding of the audio content to process. @@ -266,6 +299,9 @@ message InputAudioConfig { // If `false` and recognition doesn't return any result, trigger // `NO_SPEECH_RECOGNIZED` event to Dialogflow agent. bool disable_no_speech_recognized_event = 14; + + // Configuration of barge-in behavior during the streaming of input audio. + BargeInConfig barge_in_config = 15; } // Gender of the voice as described in diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation.proto index 4b3ca2646d3..febaa863098 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation.proto @@ -478,6 +478,9 @@ message SuggestConversationSummaryRequest { // [latest_message] to use as context when compiling the // suggestion. By default 500 and at most 1000. int32 context_size = 4; + + // Parameters for a human assist query. + AssistQueryParameters assist_query_params = 5; } // The response message for diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation_profile.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation_profile.proto index 73af5bde055..cfaaf2c9d84 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation_profile.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation_profile.proto @@ -154,6 +154,8 @@ service ConversationProfiles { } }; option (google.api.method_signature) = "conversation_profile"; + option (google.api.method_signature) = + "conversation_profile,participant_role,suggestion_feature_config"; option (google.longrunning.operation_info) = { response_type: "ConversationProfile" metadata_type: "SetSuggestionFeatureConfigOperationMetadata" @@ -182,6 +184,8 @@ service ConversationProfiles { } }; option (google.api.method_signature) = "conversation_profile"; + option (google.api.method_signature) = + "conversation_profile,participant_role,suggestion_feature_type"; option (google.longrunning.operation_info) = { response_type: "ConversationProfile" metadata_type: "ClearSuggestionFeatureConfigOperationMetadata" @@ -257,6 +261,12 @@ message ConversationProfile { string security_settings = 13 [(google.api.resource_reference) = { type: "dialogflow.googleapis.com/CXSecuritySettings" }]; + + // Configuration for Text-to-Speech synthesization. + // + // Used by Phone Gateway to specify synthesization options. If agent defines + // synthesization options as well, agent settings overrides the option here. + SynthesizeSpeechConfig tts_config = 18; } // Defines the Automated Agent to connect to a conversation. @@ -568,10 +578,10 @@ message NotificationConfig { // If it is unspecified, PROTO will be used. MESSAGE_FORMAT_UNSPECIFIED = 0; - // Pubsub message will be serialized proto. + // Pub/Sub message will be serialized proto. PROTO = 1; - // Pubsub message will be json. + // Pub/Sub message will be json. JSON = 2; } diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/document.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/document.proto index 6721a35623e..2f5ee140608 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/document.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/document.proto @@ -22,6 +22,7 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/dialogflow/v2beta1/gcs.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/entity_type.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/entity_type.proto index 9d35449dfec..7fc3f67ed5f 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/entity_type.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/entity_type.proto @@ -23,6 +23,7 @@ import "google/api/resource.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Dialogflow.V2Beta1"; diff --git a/packages/google-cloud-dialogflow/protos/protos.d.ts b/packages/google-cloud-dialogflow/protos/protos.d.ts index 23c85b403c6..7738cdb70be 100644 --- a/packages/google-cloud-dialogflow/protos/protos.d.ts +++ b/packages/google-cloud-dialogflow/protos/protos.d.ts @@ -41965,6 +41965,109 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a BargeInConfig. */ + interface IBargeInConfig { + + /** BargeInConfig noBargeInDuration */ + noBargeInDuration?: (google.protobuf.IDuration|null); + + /** BargeInConfig totalDuration */ + totalDuration?: (google.protobuf.IDuration|null); + } + + /** Represents a BargeInConfig. */ + class BargeInConfig implements IBargeInConfig { + + /** + * Constructs a new BargeInConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.IBargeInConfig); + + /** BargeInConfig noBargeInDuration. */ + public noBargeInDuration?: (google.protobuf.IDuration|null); + + /** BargeInConfig totalDuration. */ + public totalDuration?: (google.protobuf.IDuration|null); + + /** + * Creates a new BargeInConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns BargeInConfig instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.IBargeInConfig): google.cloud.dialogflow.v2beta1.BargeInConfig; + + /** + * Encodes the specified BargeInConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BargeInConfig.verify|verify} messages. + * @param message BargeInConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.IBargeInConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BargeInConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BargeInConfig.verify|verify} messages. + * @param message BargeInConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IBargeInConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BargeInConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BargeInConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.BargeInConfig; + + /** + * Decodes a BargeInConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BargeInConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.BargeInConfig; + + /** + * Verifies a BargeInConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BargeInConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BargeInConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.BargeInConfig; + + /** + * Creates a plain object from a BargeInConfig message. Also converts values to other types if specified. + * @param message BargeInConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.BargeInConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BargeInConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BargeInConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of an InputAudioConfig. */ interface IInputAudioConfig { @@ -41997,6 +42100,9 @@ export namespace google { /** InputAudioConfig disableNoSpeechRecognizedEvent */ disableNoSpeechRecognizedEvent?: (boolean|null); + + /** InputAudioConfig bargeInConfig */ + bargeInConfig?: (google.cloud.dialogflow.v2beta1.IBargeInConfig|null); } /** Represents an InputAudioConfig. */ @@ -42038,6 +42144,9 @@ export namespace google { /** InputAudioConfig disableNoSpeechRecognizedEvent. */ public disableNoSpeechRecognizedEvent: boolean; + /** InputAudioConfig bargeInConfig. */ + public bargeInConfig?: (google.cloud.dialogflow.v2beta1.IBargeInConfig|null); + /** * Creates a new InputAudioConfig instance using the specified properties. * @param [properties] Properties to set @@ -56444,6 +56553,9 @@ export namespace google { /** SuggestConversationSummaryRequest contextSize */ contextSize?: (number|null); + + /** SuggestConversationSummaryRequest assistQueryParams */ + assistQueryParams?: (google.cloud.dialogflow.v2beta1.IAssistQueryParameters|null); } /** Represents a SuggestConversationSummaryRequest. */ @@ -56464,6 +56576,9 @@ export namespace google { /** SuggestConversationSummaryRequest contextSize. */ public contextSize: number; + /** SuggestConversationSummaryRequest assistQueryParams. */ + public assistQueryParams?: (google.cloud.dialogflow.v2beta1.IAssistQueryParameters|null); + /** * Creates a new SuggestConversationSummaryRequest instance using the specified properties. * @param [properties] Properties to set @@ -57109,6 +57224,9 @@ export namespace google { /** ConversationProfile securitySettings */ securitySettings?: (string|null); + + /** ConversationProfile ttsConfig */ + ttsConfig?: (google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig|null); } /** Represents a ConversationProfile. */ @@ -57162,6 +57280,9 @@ export namespace google { /** ConversationProfile securitySettings. */ public securitySettings: string; + /** ConversationProfile ttsConfig. */ + public ttsConfig?: (google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig|null); + /** * Creates a new ConversationProfile instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-dialogflow/protos/protos.js b/packages/google-cloud-dialogflow/protos/protos.js index 18807de3f9f..6ffa990049f 100644 --- a/packages/google-cloud-dialogflow/protos/protos.js +++ b/packages/google-cloud-dialogflow/protos/protos.js @@ -101411,6 +101411,243 @@ return SpeechWordInfo; })(); + v2beta1.BargeInConfig = (function() { + + /** + * Properties of a BargeInConfig. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IBargeInConfig + * @property {google.protobuf.IDuration|null} [noBargeInDuration] BargeInConfig noBargeInDuration + * @property {google.protobuf.IDuration|null} [totalDuration] BargeInConfig totalDuration + */ + + /** + * Constructs a new BargeInConfig. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a BargeInConfig. + * @implements IBargeInConfig + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IBargeInConfig=} [properties] Properties to set + */ + function BargeInConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BargeInConfig noBargeInDuration. + * @member {google.protobuf.IDuration|null|undefined} noBargeInDuration + * @memberof google.cloud.dialogflow.v2beta1.BargeInConfig + * @instance + */ + BargeInConfig.prototype.noBargeInDuration = null; + + /** + * BargeInConfig totalDuration. + * @member {google.protobuf.IDuration|null|undefined} totalDuration + * @memberof google.cloud.dialogflow.v2beta1.BargeInConfig + * @instance + */ + BargeInConfig.prototype.totalDuration = null; + + /** + * Creates a new BargeInConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.BargeInConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.IBargeInConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.BargeInConfig} BargeInConfig instance + */ + BargeInConfig.create = function create(properties) { + return new BargeInConfig(properties); + }; + + /** + * Encodes the specified BargeInConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BargeInConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.BargeInConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.IBargeInConfig} message BargeInConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BargeInConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.noBargeInDuration != null && Object.hasOwnProperty.call(message, "noBargeInDuration")) + $root.google.protobuf.Duration.encode(message.noBargeInDuration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.totalDuration != null && Object.hasOwnProperty.call(message, "totalDuration")) + $root.google.protobuf.Duration.encode(message.totalDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BargeInConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BargeInConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.BargeInConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.IBargeInConfig} message BargeInConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BargeInConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BargeInConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.BargeInConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.BargeInConfig} BargeInConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BargeInConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.BargeInConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.noBargeInDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.totalDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BargeInConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.BargeInConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.BargeInConfig} BargeInConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BargeInConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BargeInConfig message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.BargeInConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BargeInConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.noBargeInDuration != null && message.hasOwnProperty("noBargeInDuration")) { + var error = $root.google.protobuf.Duration.verify(message.noBargeInDuration); + if (error) + return "noBargeInDuration." + error; + } + if (message.totalDuration != null && message.hasOwnProperty("totalDuration")) { + var error = $root.google.protobuf.Duration.verify(message.totalDuration); + if (error) + return "totalDuration." + error; + } + return null; + }; + + /** + * Creates a BargeInConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.BargeInConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.BargeInConfig} BargeInConfig + */ + BargeInConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.BargeInConfig) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.BargeInConfig(); + if (object.noBargeInDuration != null) { + if (typeof object.noBargeInDuration !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.BargeInConfig.noBargeInDuration: object expected"); + message.noBargeInDuration = $root.google.protobuf.Duration.fromObject(object.noBargeInDuration); + } + if (object.totalDuration != null) { + if (typeof object.totalDuration !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.BargeInConfig.totalDuration: object expected"); + message.totalDuration = $root.google.protobuf.Duration.fromObject(object.totalDuration); + } + return message; + }; + + /** + * Creates a plain object from a BargeInConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.BargeInConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.BargeInConfig} message BargeInConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BargeInConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.noBargeInDuration = null; + object.totalDuration = null; + } + if (message.noBargeInDuration != null && message.hasOwnProperty("noBargeInDuration")) + object.noBargeInDuration = $root.google.protobuf.Duration.toObject(message.noBargeInDuration, options); + if (message.totalDuration != null && message.hasOwnProperty("totalDuration")) + object.totalDuration = $root.google.protobuf.Duration.toObject(message.totalDuration, options); + return object; + }; + + /** + * Converts this BargeInConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.BargeInConfig + * @instance + * @returns {Object.} JSON object + */ + BargeInConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BargeInConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2beta1.BargeInConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BargeInConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2beta1.BargeInConfig"; + }; + + return BargeInConfig; + })(); + v2beta1.InputAudioConfig = (function() { /** @@ -101427,6 +101664,7 @@ * @property {google.cloud.dialogflow.v2beta1.SpeechModelVariant|null} [modelVariant] InputAudioConfig modelVariant * @property {boolean|null} [singleUtterance] InputAudioConfig singleUtterance * @property {boolean|null} [disableNoSpeechRecognizedEvent] InputAudioConfig disableNoSpeechRecognizedEvent + * @property {google.cloud.dialogflow.v2beta1.IBargeInConfig|null} [bargeInConfig] InputAudioConfig bargeInConfig */ /** @@ -101526,6 +101764,14 @@ */ InputAudioConfig.prototype.disableNoSpeechRecognizedEvent = false; + /** + * InputAudioConfig bargeInConfig. + * @member {google.cloud.dialogflow.v2beta1.IBargeInConfig|null|undefined} bargeInConfig + * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig + * @instance + */ + InputAudioConfig.prototype.bargeInConfig = null; + /** * Creates a new InputAudioConfig instance using the specified properties. * @function create @@ -101572,6 +101818,8 @@ writer.uint32(/* id 13, wireType 0 =*/104).bool(message.enableWordInfo); if (message.disableNoSpeechRecognizedEvent != null && Object.hasOwnProperty.call(message, "disableNoSpeechRecognizedEvent")) writer.uint32(/* id 14, wireType 0 =*/112).bool(message.disableNoSpeechRecognizedEvent); + if (message.bargeInConfig != null && Object.hasOwnProperty.call(message, "bargeInConfig")) + $root.google.cloud.dialogflow.v2beta1.BargeInConfig.encode(message.bargeInConfig, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); return writer; }; @@ -101650,6 +101898,10 @@ message.disableNoSpeechRecognizedEvent = reader.bool(); break; } + case 15: { + message.bargeInConfig = $root.google.cloud.dialogflow.v2beta1.BargeInConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -101743,6 +101995,11 @@ if (message.disableNoSpeechRecognizedEvent != null && message.hasOwnProperty("disableNoSpeechRecognizedEvent")) if (typeof message.disableNoSpeechRecognizedEvent !== "boolean") return "disableNoSpeechRecognizedEvent: boolean expected"; + if (message.bargeInConfig != null && message.hasOwnProperty("bargeInConfig")) { + var error = $root.google.cloud.dialogflow.v2beta1.BargeInConfig.verify(message.bargeInConfig); + if (error) + return "bargeInConfig." + error; + } return null; }; @@ -101851,6 +102108,11 @@ message.singleUtterance = Boolean(object.singleUtterance); if (object.disableNoSpeechRecognizedEvent != null) message.disableNoSpeechRecognizedEvent = Boolean(object.disableNoSpeechRecognizedEvent); + if (object.bargeInConfig != null) { + if (typeof object.bargeInConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.InputAudioConfig.bargeInConfig: object expected"); + message.bargeInConfig = $root.google.cloud.dialogflow.v2beta1.BargeInConfig.fromObject(object.bargeInConfig); + } return message; }; @@ -101880,6 +102142,7 @@ object.modelVariant = options.enums === String ? "SPEECH_MODEL_VARIANT_UNSPECIFIED" : 0; object.enableWordInfo = false; object.disableNoSpeechRecognizedEvent = false; + object.bargeInConfig = null; } if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.AudioEncoding[message.audioEncoding] === undefined ? message.audioEncoding : $root.google.cloud.dialogflow.v2beta1.AudioEncoding[message.audioEncoding] : message.audioEncoding; @@ -101907,6 +102170,8 @@ object.enableWordInfo = message.enableWordInfo; if (message.disableNoSpeechRecognizedEvent != null && message.hasOwnProperty("disableNoSpeechRecognizedEvent")) object.disableNoSpeechRecognizedEvent = message.disableNoSpeechRecognizedEvent; + if (message.bargeInConfig != null && message.hasOwnProperty("bargeInConfig")) + object.bargeInConfig = $root.google.cloud.dialogflow.v2beta1.BargeInConfig.toObject(message.bargeInConfig, options); return object; }; @@ -137044,6 +137309,7 @@ * @property {string|null} [conversation] SuggestConversationSummaryRequest conversation * @property {string|null} [latestMessage] SuggestConversationSummaryRequest latestMessage * @property {number|null} [contextSize] SuggestConversationSummaryRequest contextSize + * @property {google.cloud.dialogflow.v2beta1.IAssistQueryParameters|null} [assistQueryParams] SuggestConversationSummaryRequest assistQueryParams */ /** @@ -137085,6 +137351,14 @@ */ SuggestConversationSummaryRequest.prototype.contextSize = 0; + /** + * SuggestConversationSummaryRequest assistQueryParams. + * @member {google.cloud.dialogflow.v2beta1.IAssistQueryParameters|null|undefined} assistQueryParams + * @memberof google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest + * @instance + */ + SuggestConversationSummaryRequest.prototype.assistQueryParams = null; + /** * Creates a new SuggestConversationSummaryRequest instance using the specified properties. * @function create @@ -137115,6 +137389,8 @@ writer.uint32(/* id 3, wireType 2 =*/26).string(message.latestMessage); if (message.contextSize != null && Object.hasOwnProperty.call(message, "contextSize")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.contextSize); + if (message.assistQueryParams != null && Object.hasOwnProperty.call(message, "assistQueryParams")) + $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.encode(message.assistQueryParams, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -137161,6 +137437,10 @@ message.contextSize = reader.int32(); break; } + case 5: { + message.assistQueryParams = $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -137205,6 +137485,11 @@ if (message.contextSize != null && message.hasOwnProperty("contextSize")) if (!$util.isInteger(message.contextSize)) return "contextSize: integer expected"; + if (message.assistQueryParams != null && message.hasOwnProperty("assistQueryParams")) { + var error = $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.verify(message.assistQueryParams); + if (error) + return "assistQueryParams." + error; + } return null; }; @@ -137226,6 +137511,11 @@ message.latestMessage = String(object.latestMessage); if (object.contextSize != null) message.contextSize = object.contextSize | 0; + if (object.assistQueryParams != null) { + if (typeof object.assistQueryParams !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest.assistQueryParams: object expected"); + message.assistQueryParams = $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.fromObject(object.assistQueryParams); + } return message; }; @@ -137246,6 +137536,7 @@ object.conversation = ""; object.latestMessage = ""; object.contextSize = 0; + object.assistQueryParams = null; } if (message.conversation != null && message.hasOwnProperty("conversation")) object.conversation = message.conversation; @@ -137253,6 +137544,8 @@ object.latestMessage = message.latestMessage; if (message.contextSize != null && message.hasOwnProperty("contextSize")) object.contextSize = message.contextSize; + if (message.assistQueryParams != null && message.hasOwnProperty("assistQueryParams")) + object.assistQueryParams = $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.toObject(message.assistQueryParams, options); return object; }; @@ -138476,6 +138769,7 @@ * @property {string|null} [languageCode] ConversationProfile languageCode * @property {string|null} [timeZone] ConversationProfile timeZone * @property {string|null} [securitySettings] ConversationProfile securitySettings + * @property {google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig|null} [ttsConfig] ConversationProfile ttsConfig */ /** @@ -138605,6 +138899,14 @@ */ ConversationProfile.prototype.securitySettings = ""; + /** + * ConversationProfile ttsConfig. + * @member {google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig|null|undefined} ttsConfig + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile + * @instance + */ + ConversationProfile.prototype.ttsConfig = null; + /** * Creates a new ConversationProfile instance using the specified properties. * @function create @@ -138657,6 +138959,8 @@ writer.uint32(/* id 13, wireType 2 =*/106).string(message.securitySettings); if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) writer.uint32(/* id 14, wireType 2 =*/114).string(message.timeZone); + if (message.ttsConfig != null && Object.hasOwnProperty.call(message, "ttsConfig")) + $root.google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig.encode(message.ttsConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); return writer; }; @@ -138747,6 +139051,10 @@ message.securitySettings = reader.string(); break; } + case 18: { + message.ttsConfig = $root.google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -138842,6 +139150,11 @@ if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) if (!$util.isString(message.securitySettings)) return "securitySettings: string expected"; + if (message.ttsConfig != null && message.hasOwnProperty("ttsConfig")) { + var error = $root.google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig.verify(message.ttsConfig); + if (error) + return "ttsConfig." + error; + } return null; }; @@ -138912,6 +139225,11 @@ message.timeZone = String(object.timeZone); if (object.securitySettings != null) message.securitySettings = String(object.securitySettings); + if (object.ttsConfig != null) { + if (typeof object.ttsConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ConversationProfile.ttsConfig: object expected"); + message.ttsConfig = $root.google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig.fromObject(object.ttsConfig); + } return message; }; @@ -138943,6 +139261,7 @@ object.updateTime = null; object.securitySettings = ""; object.timeZone = ""; + object.ttsConfig = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -138972,6 +139291,8 @@ object.securitySettings = message.securitySettings; if (message.timeZone != null && message.hasOwnProperty("timeZone")) object.timeZone = message.timeZone; + if (message.ttsConfig != null && message.hasOwnProperty("ttsConfig")) + object.ttsConfig = $root.google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig.toObject(message.ttsConfig, options); return object; }; diff --git a/packages/google-cloud-dialogflow/protos/protos.json b/packages/google-cloud-dialogflow/protos/protos.json index cdb319e8b36..64efec28a8f 100644 --- a/packages/google-cloud-dialogflow/protos/protos.json +++ b/packages/google-cloud-dialogflow/protos/protos.json @@ -7143,7 +7143,7 @@ "(google.api.http).body": "*", "(google.api.http).additional_bindings.post": "/v2/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:setSuggestionFeatureConfig", "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "conversation_profile", + "(google.api.method_signature)": "conversation_profile,participant_role,suggestion_feature_config", "(google.longrunning.operation_info).response_type": "ConversationProfile", "(google.longrunning.operation_info).metadata_type": "SetSuggestionFeatureConfigOperationMetadata" }, @@ -7161,6 +7161,9 @@ { "(google.api.method_signature)": "conversation_profile" }, + { + "(google.api.method_signature)": "conversation_profile,participant_role,suggestion_feature_config" + }, { "(google.longrunning.operation_info)": { "response_type": "ConversationProfile", @@ -7177,7 +7180,7 @@ "(google.api.http).body": "*", "(google.api.http).additional_bindings.post": "/v2/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:clearSuggestionFeatureConfig", "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "conversation_profile", + "(google.api.method_signature)": "conversation_profile,participant_role,suggestion_feature_type", "(google.longrunning.operation_info).response_type": "ConversationProfile", "(google.longrunning.operation_info).metadata_type": "ClearSuggestionFeatureConfigOperationMetadata" }, @@ -7195,6 +7198,9 @@ { "(google.api.method_signature)": "conversation_profile" }, + { + "(google.api.method_signature)": "conversation_profile,participant_role,suggestion_feature_type" + }, { "(google.longrunning.operation_info)": { "response_type": "ConversationProfile", @@ -12051,6 +12057,18 @@ } } }, + "BargeInConfig": { + "fields": { + "noBargeInDuration": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "totalDuration": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, "InputAudioConfig": { "fields": { "audioEncoding": { @@ -12097,6 +12115,10 @@ "disableNoSpeechRecognizedEvent": { "type": "bool", "id": 14 + }, + "bargeInConfig": { + "type": "BargeInConfig", + "id": 15 } } }, @@ -16034,6 +16056,10 @@ "contextSize": { "type": "int32", "id": 4 + }, + "assistQueryParams": { + "type": "AssistQueryParameters", + "id": 5 } } }, @@ -16249,7 +16275,7 @@ "(google.api.http).body": "*", "(google.api.http).additional_bindings.post": "/v2beta1/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:setSuggestionFeatureConfig", "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "conversation_profile", + "(google.api.method_signature)": "conversation_profile,participant_role,suggestion_feature_config", "(google.longrunning.operation_info).response_type": "ConversationProfile", "(google.longrunning.operation_info).metadata_type": "SetSuggestionFeatureConfigOperationMetadata" }, @@ -16267,6 +16293,9 @@ { "(google.api.method_signature)": "conversation_profile" }, + { + "(google.api.method_signature)": "conversation_profile,participant_role,suggestion_feature_config" + }, { "(google.longrunning.operation_info)": { "response_type": "ConversationProfile", @@ -16283,7 +16312,7 @@ "(google.api.http).body": "*", "(google.api.http).additional_bindings.post": "/v2beta1/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:clearSuggestionFeatureConfig", "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "conversation_profile", + "(google.api.method_signature)": "conversation_profile,participant_role,suggestion_feature_type", "(google.longrunning.operation_info).response_type": "ConversationProfile", "(google.longrunning.operation_info).metadata_type": "ClearSuggestionFeatureConfigOperationMetadata" }, @@ -16301,6 +16330,9 @@ { "(google.api.method_signature)": "conversation_profile" }, + { + "(google.api.method_signature)": "conversation_profile,participant_role,suggestion_feature_type" + }, { "(google.longrunning.operation_info)": { "response_type": "ConversationProfile", @@ -16384,6 +16416,10 @@ "options": { "(google.api.resource_reference).type": "dialogflow.googleapis.com/CXSecuritySettings" } + }, + "ttsConfig": { + "type": "SynthesizeSpeechConfig", + "id": 18 } } }, diff --git a/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.suggest_conversation_summary.js b/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.suggest_conversation_summary.js index a8376a5c005..5f67ea86cae 100644 --- a/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.suggest_conversation_summary.js +++ b/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.suggest_conversation_summary.js @@ -48,6 +48,10 @@ function main(conversation) { * suggestion. By default 500 and at most 1000. */ // const contextSize = 1234 + /** + * Parameters for a human assist query. + */ + // const assistQueryParams = {} // Imports the Dialogflow library const {ConversationsClient} = require('@google-cloud/dialogflow').v2beta1; diff --git a/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json b/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json index e7715fb8c63..b8f43a1956e 100644 --- a/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json +++ b/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json @@ -1398,7 +1398,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 73, "type": "FULL" } ], @@ -1418,6 +1418,10 @@ { "name": "context_size", "type": "TYPE_INT32" + }, + { + "name": "assist_query_params", + "type": ".google.cloud.dialogflow.v2beta1.AssistQueryParameters" } ], "resultType": ".google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse", diff --git a/packages/google-cloud-dialogflow/src/v2beta1/conversations_client.ts b/packages/google-cloud-dialogflow/src/v2beta1/conversations_client.ts index 741ebf3c860..e10222bf4f9 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/conversations_client.ts +++ b/packages/google-cloud-dialogflow/src/v2beta1/conversations_client.ts @@ -926,6 +926,8 @@ export class ConversationsClient { * Max number of messages prior to and including * [latest_message] to use as context when compiling the * suggestion. By default 500 and at most 1000. + * @param {google.cloud.dialogflow.v2beta1.AssistQueryParameters} request.assistQueryParams + * Parameters for a human assist query. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. From 735af33f8c5548118e0df774f08f89cc657445ef Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 3 Mar 2023 13:43:29 -0500 Subject: [PATCH 73/80] feat: add disable_container_logging to BatchPredictionJob in aiplatform v1,v1beta1 batch_prediction_job.proto (#4052) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add TPU_V4_POD to AcceleratorType in aiplatform v1beta1 accelerator_type.proto feat: add split to ExportDataConfig in aiplatform v1beta1 dataset.proto feat: add evaluated_annotation.proto to aiplatform v1beta1 feat: add cpu_utilization_target to Featurestore.OnlineServingConfig.Scaling in aiplatform v1beta1 featurestore.proto feat: add large_model_reference to Model in aiplatform v1beta1 model.proto feat: add slice_spec to ModelEvaluationSlice in aiplatform v1beta1 model_evaluation_slice.proto feat: add BatchImportEvaluatedAnnotations rpc to aiplatform v1beta1 model_service.proto docs: deprecated enable_restricted_image_training in NasJob in aiplatform v1beta1 nas_job.proto PiperOrigin-RevId: 513669538 Source-Link: https://github.com/googleapis/googleapis/commit/01293cf2c0b8f25fb7feb06e33947b5a581adbb5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b79c29acef2e53d3c513c51b64e9b759a6ce5233 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6ImI3OWMyOWFjZWYyZTUzZDNjNTEzYzUxYjY0ZTliNzU5YTZjZTUyMzMifQ== * feat: add TPU_V4_POD to AcceleratorType in aiplatform v1 accelerator_type.proto feat: add split to ExportDataConfig in aiplatform v1 dataset.proto feat: add offline_storage_ttl_days to EntityType in aiplatform v1 entity_type.proto feat: add evaluated_annotation.proto to aiplatform v1 feat: add cpu_utilization_target to Featurestore.OnlineServingConfig.Scaling in aiplatform v1 featurestore.proto feat: add online_storage_ttl_days to Featurestore in aiplatform v1 featurestore.proto feat: add slice_spec to ModelEvaluationSlice in aiplatform v1 model_evaluation_slice.proto feat: add BatchImportEvaluatedAnnotations rpc to aiplatform v1 model_service.proto PiperOrigin-RevId: 513671267 Source-Link: https://github.com/googleapis/googleapis/commit/daccff8b0feca06e4b380966d65db78b6e53e917 Source-Link: https://github.com/googleapis/googleapis-gen/commit/9ff0226910f2166a60bb920219dc77e6be70bd5c Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6IjlmZjAyMjY5MTBmMjE2NmE2MGJiOTIwMjE5ZGM3N2U2YmU3MGJkNWMifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add disable_container_logging to BatchPredictionJob in aiplatform v1,v1beta1 batch_prediction_job.proto PiperOrigin-RevId: 513711185 Source-Link: https://github.com/googleapis/googleapis/commit/4a6262fbc835a4937d1246a925e88547a4bfc1f3 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e1c1bb65dd0beb795343d0bb9678d5f25658a692 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6ImUxYzFiYjY1ZGQwYmViNzk1MzQzZDBiYjk2NzhkNWYyNTY1OGE2OTIifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: danieljbruce --- packages/google-cloud-aiplatform/README.md | 3 + .../aiplatform/v1/accelerator_type.proto | 4 + .../aiplatform/v1/batch_prediction_job.proto | 15 +- .../google/cloud/aiplatform/v1/dataset.proto | 24 + .../cloud/aiplatform/v1/dataset_service.proto | 1 + .../google/cloud/aiplatform/v1/endpoint.proto | 6 +- .../aiplatform/v1/endpoint_service.proto | 1 + .../aiplatform/v1/evaluated_annotation.proto | 185 + .../cloud/aiplatform/v1/featurestore.proto | 9 + .../v1/featurestore_monitoring.proto | 14 +- .../aiplatform/v1/featurestore_service.proto | 148 + .../v1/index_endpoint_service.proto | 1 + .../cloud/aiplatform/v1/index_service.proto | 1 + .../cloud/aiplatform/v1/job_state.proto | 7 +- .../aiplatform/v1/metadata_service.proto | 1 + .../google/cloud/aiplatform/v1/model.proto | 27 +- .../aiplatform/v1/model_evaluation.proto | 11 +- .../v1/model_evaluation_slice.proto | 117 + .../cloud/aiplatform/v1/model_service.proto | 43 +- .../google/cloud/aiplatform/v1/nas_job.proto | 2 +- .../aiplatform/v1/pipeline_service.proto | 1 + .../v1/specialist_pool_service.proto | 1 + .../aiplatform/v1/tensorboard_service.proto | 4 +- .../cloud/aiplatform/v1/vizier_service.proto | 2 +- .../aiplatform/v1beta1/accelerator_type.proto | 4 + .../v1beta1/batch_prediction_job.proto | 15 +- .../cloud/aiplatform/v1beta1/dataset.proto | 24 + .../aiplatform/v1beta1/dataset_service.proto | 1 + .../deployment_resource_pool_service.proto | 1 + .../cloud/aiplatform/v1beta1/endpoint.proto | 6 +- .../aiplatform/v1beta1/endpoint_service.proto | 1 + .../v1beta1/evaluated_annotation.proto | 185 + .../aiplatform/v1beta1/featurestore.proto | 9 + .../v1beta1/featurestore_monitoring.proto | 21 +- .../v1beta1/featurestore_service.proto | 45 +- .../v1beta1/index_endpoint_service.proto | 1 + .../aiplatform/v1beta1/index_service.proto | 1 + .../cloud/aiplatform/v1beta1/job_state.proto | 7 +- .../aiplatform/v1beta1/match_service.proto | 2 +- .../aiplatform/v1beta1/metadata_service.proto | 1 + .../cloud/aiplatform/v1beta1/model.proto | 36 +- .../v1beta1/model_evaluation_slice.proto | 117 + .../aiplatform/v1beta1/model_service.proto | 43 +- .../cloud/aiplatform/v1beta1/nas_job.proto | 2 +- .../aiplatform/v1beta1/pipeline_service.proto | 1 + .../v1beta1/specialist_pool_service.proto | 1 + .../v1beta1/tensorboard_service.proto | 4 +- .../aiplatform/v1beta1/vizier_service.proto | 2 +- .../protos/protos.d.ts | 3731 ++++++- .../google-cloud-aiplatform/protos/protos.js | 9300 ++++++++++++++++- .../protos/protos.json | 817 +- .../google-cloud-aiplatform/samples/README.md | 54 + ...turestore_service.delete_feature_values.js | 73 + ...vice.batch_import_evaluated_annotations.js | 68 + ...t_metadata.google.cloud.aiplatform.v1.json | 96 +- ...vice.batch_import_evaluated_annotations.js | 68 + ...adata.google.cloud.aiplatform.v1beta1.json | 48 +- .../src/v1/dataset_service_client.ts | 12 + .../src/v1/dataset_service_proto_list.json | 1 + .../src/v1/endpoint_service_client.ts | 12 + .../src/v1/endpoint_service_proto_list.json | 1 + ...ore_online_serving_service_proto_list.json | 1 + .../src/v1/featurestore_service_client.ts | 178 + .../featurestore_service_client_config.json | 4 + .../v1/featurestore_service_proto_list.json | 1 + .../src/v1/gapic_metadata.json | 20 + .../src/v1/index_endpoint_service_client.ts | 12 + .../v1/index_endpoint_service_proto_list.json | 1 + .../src/v1/index_service_client.ts | 12 + .../src/v1/index_service_proto_list.json | 1 + .../src/v1/job_service_client.ts | 12 + .../src/v1/job_service_proto_list.json | 1 + .../src/v1/metadata_service_client.ts | 12 + .../src/v1/metadata_service_proto_list.json | 1 + .../src/v1/migration_service_client.ts | 12 + .../src/v1/migration_service_proto_list.json | 1 + .../src/v1/model_service_client.ts | 123 +- .../src/v1/model_service_client_config.json | 4 + .../src/v1/model_service_proto_list.json | 1 + .../src/v1/pipeline_service_client.ts | 12 + .../src/v1/pipeline_service_proto_list.json | 1 + .../src/v1/prediction_service_proto_list.json | 1 + .../src/v1/specialist_pool_service_client.ts | 12 + .../specialist_pool_service_proto_list.json | 1 + .../src/v1/tensorboard_service_client.ts | 12 + .../v1/tensorboard_service_proto_list.json | 1 + .../src/v1/vizier_service_client.ts | 14 +- .../src/v1/vizier_service_proto_list.json | 1 + .../src/v1beta1/dataset_service_client.ts | 12 + .../v1beta1/dataset_service_proto_list.json | 1 + ...deployment_resource_pool_service_client.ts | 12 + ...ment_resource_pool_service_proto_list.json | 1 + .../src/v1beta1/endpoint_service_client.ts | 12 + .../v1beta1/endpoint_service_proto_list.json | 1 + ...ore_online_serving_service_proto_list.json | 1 + .../v1beta1/featurestore_service_client.ts | 12 + .../featurestore_service_proto_list.json | 1 + .../src/v1beta1/gapic_metadata.json | 10 + .../v1beta1/index_endpoint_service_client.ts | 12 + .../index_endpoint_service_proto_list.json | 1 + .../src/v1beta1/index_service_client.ts | 12 + .../src/v1beta1/index_service_proto_list.json | 1 + .../src/v1beta1/job_service_client.ts | 12 + .../src/v1beta1/job_service_proto_list.json | 1 + .../src/v1beta1/match_service_proto_list.json | 1 + .../src/v1beta1/metadata_service_client.ts | 12 + .../v1beta1/metadata_service_proto_list.json | 1 + .../src/v1beta1/migration_service_client.ts | 12 + .../v1beta1/migration_service_proto_list.json | 1 + .../src/v1beta1/model_service_client.ts | 123 +- .../v1beta1/model_service_client_config.json | 4 + .../src/v1beta1/model_service_proto_list.json | 1 + .../src/v1beta1/pipeline_service_client.ts | 12 + .../v1beta1/pipeline_service_proto_list.json | 1 + .../prediction_service_proto_list.json | 1 + .../v1beta1/specialist_pool_service_client.ts | 12 + .../specialist_pool_service_proto_list.json | 1 + .../src/v1beta1/tensorboard_service_client.ts | 12 + .../tensorboard_service_proto_list.json | 1 + .../src/v1beta1/vizier_service_client.ts | 14 +- .../v1beta1/vizier_service_proto_list.json | 1 + .../test/gapic_featurestore_service_v1.ts | 206 + .../test/gapic_model_service_v1.ts | 137 + .../test/gapic_model_service_v1beta1.ts | 137 + 124 files changed, 16597 insertions(+), 86 deletions(-) create mode 100644 packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/evaluated_annotation.proto create mode 100644 packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/evaluated_annotation.proto create mode 100644 packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_feature_values.js create mode 100644 packages/google-cloud-aiplatform/samples/generated/v1/model_service.batch_import_evaluated_annotations.js create mode 100644 packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.batch_import_evaluated_annotations.js diff --git a/packages/google-cloud-aiplatform/README.md b/packages/google-cloud-aiplatform/README.md index 5f217c275cb..48beb4eaaad 100644 --- a/packages/google-cloud-aiplatform/README.md +++ b/packages/google-cloud-aiplatform/README.md @@ -131,6 +131,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Featurestore_service.create_featurestore | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.create_featurestore.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.create_featurestore.js,samples/README.md) | | Featurestore_service.delete_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_entity_type.js,samples/README.md) | | Featurestore_service.delete_feature | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_feature.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_feature.js,samples/README.md) | +| Featurestore_service.delete_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_feature_values.js,samples/README.md) | | Featurestore_service.delete_featurestore | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_featurestore.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_featurestore.js,samples/README.md) | | Featurestore_service.export_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.export_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.export_feature_values.js,samples/README.md) | | Featurestore_service.get_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.get_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.get_entity_type.js,samples/README.md) | @@ -228,6 +229,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Metadata_service.update_execution | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.update_execution.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.update_execution.js,samples/README.md) | | Migration_service.batch_migrate_resources | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/migration_service.batch_migrate_resources.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/migration_service.batch_migrate_resources.js,samples/README.md) | | Migration_service.search_migratable_resources | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/migration_service.search_migratable_resources.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/migration_service.search_migratable_resources.js,samples/README.md) | +| Model_service.batch_import_evaluated_annotations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.batch_import_evaluated_annotations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.batch_import_evaluated_annotations.js,samples/README.md) | | Model_service.batch_import_model_evaluation_slices | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.batch_import_model_evaluation_slices.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.batch_import_model_evaluation_slices.js,samples/README.md) | | Model_service.copy_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.copy_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.copy_model.js,samples/README.md) | | Model_service.delete_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.delete_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.delete_model.js,samples/README.md) | @@ -440,6 +442,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Metadata_service.update_execution | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.update_execution.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.update_execution.js,samples/README.md) | | Migration_service.batch_migrate_resources | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/migration_service.batch_migrate_resources.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/migration_service.batch_migrate_resources.js,samples/README.md) | | Migration_service.search_migratable_resources | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/migration_service.search_migratable_resources.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/migration_service.search_migratable_resources.js,samples/README.md) | +| Model_service.batch_import_evaluated_annotations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.batch_import_evaluated_annotations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.batch_import_evaluated_annotations.js,samples/README.md) | | Model_service.batch_import_model_evaluation_slices | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.batch_import_model_evaluation_slices.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.batch_import_model_evaluation_slices.js,samples/README.md) | | Model_service.copy_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.copy_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.copy_model.js,samples/README.md) | | Model_service.delete_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.delete_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.delete_model.js,samples/README.md) | diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/accelerator_type.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/accelerator_type.proto index d8c61e0762a..38682297e64 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/accelerator_type.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/accelerator_type.proto @@ -25,6 +25,7 @@ option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; option ruby_package = "Google::Cloud::AIPlatform::V1"; // Represents a hardware accelerator type. +// NEXT ID: 11. enum AcceleratorType { // Unspecified accelerator type, which means no accelerator. ACCELERATOR_TYPE_UNSPECIFIED = 0; @@ -52,4 +53,7 @@ enum AcceleratorType { // TPU v3. TPU_V3 = 7; + + // TPU v4. + TPU_V4_POD = 10; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/batch_prediction_job.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/batch_prediction_job.proto index 3370f884362..74fc97a4fbb 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/batch_prediction_job.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/batch_prediction_job.proto @@ -273,7 +273,11 @@ message BatchPredictionJob { // Exactly one of model and unmanaged_container_model must be set. // // The model resource name may contain version id or version alias to specify - // the version, if no version is specified, the default version will be used. + // the version. + // Example: `projects/{project}/locations/{location}/models/{model}@2` + // or + // `projects/{project}/locations/{location}/models/{model}@golden` + // if no version is specified, the default version will be deployed. string model = 3 [(google.api.resource_reference) = { type: "aiplatform.googleapis.com/Model" }]; @@ -439,4 +443,13 @@ message BatchPredictionJob { // is set, then all resources created by the BatchPredictionJob will be // encrypted with the provided encryption key. EncryptionSpec encryption_spec = 24; + + // For custom-trained Models and AutoML Tabular Models, the container of the + // DeployedModel instances will send `stderr` and `stdout` streams to + // Stackdriver Logging by default. Please note that the logs incur cost, + // which are subject to [Cloud Logging + // pricing](https://cloud.google.com/stackdriver/pricing). + // + // User can disable container logging by setting this flag to true. + bool disable_container_logging = 34; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/dataset.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/dataset.proto index e9fcca74eb2..2020dafa178 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/dataset.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/dataset.proto @@ -169,9 +169,33 @@ message ExportDataConfig { GcsDestination gcs_destination = 1; } + // The instructions how the export data should be split between the + // training, validation and test sets. + oneof split { + // Split based on fractions defining the size of each set. + ExportFractionSplit fraction_split = 5; + } + // A filter on Annotations of the Dataset. Only Annotations on to-be-exported // DataItems(specified by [data_items_filter][]) that match this filter will // be exported. The filter syntax is the same as in // [ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations]. string annotations_filter = 2; } + +// Assigns the input data to training, validation, and test sets as per the +// given fractions. Any of `training_fraction`, `validation_fraction` and +// `test_fraction` may optionally be provided, they must sum to up to 1. If the +// provided ones sum to less than 1, the remainder is assigned to sets as +// decided by Vertex AI. If none of the fractions are set, by default roughly +// 80% of data is used for training, 10% for validation, and 10% for test. +message ExportFractionSplit { + // The fraction of the input data that is to be used to train the Model. + double training_fraction = 1; + + // The fraction of the input data that is to be used to validate the Model. + double validation_fraction = 2; + + // The fraction of the input data that is to be used to evaluate the Model. + double test_fraction = 3; +} diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/dataset_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/dataset_service.proto index 70223bef1d8..f575e6937fc 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/dataset_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/dataset_service.proto @@ -27,6 +27,7 @@ import "google/cloud/aiplatform/v1/dataset.proto"; import "google/cloud/aiplatform/v1/operation.proto"; import "google/cloud/aiplatform/v1/saved_query.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1"; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/endpoint.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/endpoint.proto index edbfc0cbe4e..4dbfca05caa 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/endpoint.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/endpoint.proto @@ -169,7 +169,11 @@ message DeployedModel { // Endpoint. // // The resource name may contain version id or version alias to specify the - // version, if no version is specified, the default version will be deployed. + // version. + // Example: `projects/{project}/locations/{location}/models/{model}@2` + // or + // `projects/{project}/locations/{location}/models/{model}@golden` + // if no version is specified, the default version will be deployed. string model = 2 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/endpoint_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/endpoint_service.proto index f7aed01fafa..00235dd73cc 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/endpoint_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/endpoint_service.proto @@ -23,6 +23,7 @@ import "google/api/resource.proto"; import "google/cloud/aiplatform/v1/endpoint.proto"; import "google/cloud/aiplatform/v1/operation.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1"; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/evaluated_annotation.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/evaluated_annotation.proto new file mode 100644 index 00000000000..35da290810f --- /dev/null +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/evaluated_annotation.proto @@ -0,0 +1,185 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1; + +import "google/api/field_behavior.proto"; +import "google/cloud/aiplatform/v1/explanation.proto"; +import "google/protobuf/struct.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "EvaluatedAnnotationProto"; +option java_package = "com.google.cloud.aiplatform.v1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; +option ruby_package = "Google::Cloud::AIPlatform::V1"; + +// True positive, false positive, or false negative. +// +// EvaluatedAnnotation is only available under ModelEvaluationSlice with slice +// of `annotationSpec` dimension. +message EvaluatedAnnotation { + // Describes the type of the EvaluatedAnnotation. The type is determined + enum EvaluatedAnnotationType { + // Invalid value. + EVALUATED_ANNOTATION_TYPE_UNSPECIFIED = 0; + + // The EvaluatedAnnotation is a true positive. It has a prediction created + // by the Model and a ground truth Annotation which the prediction matches. + TRUE_POSITIVE = 1; + + // The EvaluatedAnnotation is false positive. It has a prediction created by + // the Model which does not match any ground truth annotation. + FALSE_POSITIVE = 2; + + // The EvaluatedAnnotation is false negative. It has a ground truth + // annotation which is not matched by any of the model created predictions. + FALSE_NEGATIVE = 3; + } + + // Output only. Type of the EvaluatedAnnotation. + EvaluatedAnnotationType type = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The model predicted annotations. + // + // For true positive, there is one and only one prediction, which matches the + // only one ground truth annotation in + // [ground_truths][google.cloud.aiplatform.v1.EvaluatedAnnotation.ground_truths]. + // + // For false positive, there is one and only one prediction, which doesn't + // match any ground truth annotation of the corresponding + // [data_item_view_id][EvaluatedAnnotation.data_item_view_id]. + // + // For false negative, there are zero or more predictions which are similar to + // the only ground truth annotation in + // [ground_truths][google.cloud.aiplatform.v1.EvaluatedAnnotation.ground_truths] + // but not enough for a match. + // + // The schema of the prediction is stored in + // [ModelEvaluation.annotation_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.annotation_schema_uri] + repeated google.protobuf.Value predictions = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ground truth Annotations, i.e. the Annotations that exist + // in the test data the Model is evaluated on. + // + // For true positive, there is one and only one ground truth annotation, which + // matches the only prediction in + // [predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions]. + // + // For false positive, there are zero or more ground truth annotations that + // are similar to the only prediction in + // [predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions], + // but not enough for a match. + // + // For false negative, there is one and only one ground truth annotation, + // which doesn't match any predictions created by the model. + // + // The schema of the ground truth is stored in + // [ModelEvaluation.annotation_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.annotation_schema_uri] + repeated google.protobuf.Value ground_truths = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The data item payload that the Model predicted this + // EvaluatedAnnotation on. + google.protobuf.Value data_item_payload = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. ID of the EvaluatedDataItemView under the same ancestor + // ModelEvaluation. The EvaluatedDataItemView consists of all ground truths + // and predictions on + // [data_item_payload][google.cloud.aiplatform.v1.EvaluatedAnnotation.data_item_payload]. + // + // Can be passed in + // [GetEvaluatedDataItemView's][ModelService.GetEvaluatedDataItemView][] + // [id][GetEvaluatedDataItemViewRequest.id]. + string evaluated_data_item_view_id = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Explanations of + // [predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions]. + // Each element of the explanations indicates the explanation for one + // explanation Method. + // + // The attributions list in the + // [EvaluatedAnnotationExplanation.explanation][google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation.explanation] + // object corresponds to the + // [predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions] + // list. For example, the second element in the attributions list explains the + // second element in the predictions list. + repeated EvaluatedAnnotationExplanation explanations = 8; + + // Annotations of model error analysis results. + repeated ErrorAnalysisAnnotation error_analysis_annotations = 9; +} + +// Explanation result of the prediction produced by the Model. +message EvaluatedAnnotationExplanation { + // Explanation type. + // + // For AutoML Image Classification models, possible values are: + // + // * `image-integrated-gradients` + // * `image-xrai` + string explanation_type = 1; + + // Explanation attribution response details. + Explanation explanation = 2; +} + +// Model error analysis for each annotation. +message ErrorAnalysisAnnotation { + // Attributed items for a given annotation, typically representing neighbors + // from the training sets constrained by the query type. + message AttributedItem { + // The unique ID for each annotation. Used by FE to allocate the annotation + // in DB. + string annotation_resource_name = 1; + + // The distance of this item to the annotation. + double distance = 2; + } + + // The query type used for finding the attributed items. + enum QueryType { + // Unspecified query type for model error analysis. + QUERY_TYPE_UNSPECIFIED = 0; + + // Query similar samples across all classes in the dataset. + ALL_SIMILAR = 1; + + // Query similar samples from the same class of the input sample. + SAME_CLASS_SIMILAR = 2; + + // Query dissimilar samples from the same class of the input sample. + SAME_CLASS_DISSIMILAR = 3; + } + + // Attributed items for a given annotation, typically representing neighbors + // from the training sets constrained by the query type. + repeated AttributedItem attributed_items = 1; + + // The query type used for finding the attributed items. + QueryType query_type = 2; + + // The outlier score of this annotated item. Usually defined as the min of all + // distances from attributed items. + double outlier_score = 3; + + // The threshold used to determine if this annotation is an outlier or not. + double outlier_threshold = 4; +} diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/featurestore.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/featurestore.proto index 9e8d2d9b455..62bfd22df47 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/featurestore.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/featurestore.proto @@ -52,6 +52,15 @@ message Featurestore { // The maximum number of nodes to scale up to. Must be greater than // min_node_count, and less than or equal to 10 times of 'min_node_count'. int32 max_node_count = 2; + + // Optional. The cpu utilization that the Autoscaler should be trying to + // achieve. This number is on a scale from 0 (no utilization) to 100 + // (total utilization), and is limited between 10 and 80. When a cluster's + // CPU utilization exceeds the target that you have set, Bigtable + // immediately adds nodes to the cluster. When CPU utilization is + // substantially lower than the target, Bigtable removes nodes. If not set + // or set to 0, default to 50. + int32 cpu_utilization_target = 3 [(google.api.field_behavior) = OPTIONAL]; } // The number of nodes for the online store. The number of nodes doesn't diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/featurestore_monitoring.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/featurestore_monitoring.proto index 7dfa325abbf..99e66b13f0d 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/featurestore_monitoring.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/featurestore_monitoring.proto @@ -46,12 +46,6 @@ message FeaturestoreMonitoringConfig { // Configuration of the snapshot analysis based monitoring pipeline // running interval. The value indicates number of days. - // If both - // [FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days][google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days] - // and [FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval][] - // are set when creating/updating EntityTypes/Features, - // [FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days][google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days] - // will be used. int32 monitoring_interval_days = 3; // Customized export features time window for snapshot analysis. Unit is one @@ -62,7 +56,9 @@ message FeaturestoreMonitoringConfig { // Configuration of the Featurestore's ImportFeature Analysis Based // Monitoring. This type of analysis generates statistics for values of each - // Feature imported by every [ImportFeatureValues][] operation. + // Feature imported by every + // [ImportFeatureValues][google.cloud.aiplatform.v1.FeaturestoreService.ImportFeatureValues] + // operation. message ImportFeaturesAnalysis { // The state defines whether to enable ImportFeature analysis. enum State { @@ -89,7 +85,9 @@ message FeaturestoreMonitoringConfig { } // Defines the baseline to do anomaly detection for feature values imported - // by each [ImportFeatureValues][] operation. + // by each + // [ImportFeatureValues][google.cloud.aiplatform.v1.FeaturestoreService.ImportFeatureValues] + // operation. enum Baseline { // Should not be used. BASELINE_UNSPECIFIED = 0; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/featurestore_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/featurestore_service.proto index 86c3afb3509..0ea8d4ff2a4 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/featurestore_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/featurestore_service.proto @@ -27,8 +27,10 @@ import "google/cloud/aiplatform/v1/featurestore.proto"; import "google/cloud/aiplatform/v1/io.proto"; import "google/cloud/aiplatform/v1/operation.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; +import "google/type/interval.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1"; option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; @@ -295,6 +297,29 @@ service FeaturestoreService { }; } + // Delete Feature values from Featurestore. + // + // The progress of the deletion is tracked by the returned operation. The + // deleted feature values are guaranteed to be invisible to subsequent read + // operations after the operation is marked as successfully done. + // + // If a delete feature values operation fails, the feature values + // returned from reads and exports may be inconsistent. If consistency is + // required, the caller must retry the same delete request again and wait till + // the new operation returned is marked as successfully done. + rpc DeleteFeatureValues(DeleteFeatureValuesRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{entity_type=projects/*/locations/*/featurestores/*/entityTypes/*}:deleteFeatureValues" + body: "*" + }; + option (google.api.method_signature) = "entity_type"; + option (google.longrunning.operation_info) = { + response_type: "DeleteFeatureValuesResponse" + metadata_type: "DeleteFeatureValuesOperationMetadata" + }; + } + // Searches Features matching a query in a given project. rpc SearchFeatures(SearchFeaturesRequest) returns (SearchFeaturesResponse) { option (google.api.http) = { @@ -1280,6 +1305,12 @@ message BatchReadFeatureValuesOperationMetadata { GenericOperationMetadata generic_metadata = 1; } +// Details of operations that delete Feature values. +message DeleteFeatureValuesOperationMetadata { + // Operation metadata for Featurestore delete Features values. + GenericOperationMetadata generic_metadata = 1; +} + // Details of operations that perform create EntityType. message CreateEntityTypeOperationMetadata { // Operation metadata for EntityType. @@ -1297,3 +1328,120 @@ message BatchCreateFeaturesOperationMetadata { // Operation metadata for Feature. GenericOperationMetadata generic_metadata = 1; } + +// Request message for +// [FeaturestoreService.DeleteFeatureValues][google.cloud.aiplatform.v1.FeaturestoreService.DeleteFeatureValues]. +message DeleteFeatureValuesRequest { + // Message to select entity. + // If an entity id is selected, all the feature values corresponding to the + // entity id will be deleted, including the entityId. + message SelectEntity { + // Required. Selectors choosing feature values of which entity id to be + // deleted from the EntityType. + EntityIdSelector entity_id_selector = 1 + [(google.api.field_behavior) = REQUIRED]; + } + + // Message to select time range and feature. + // Values of the selected feature generated within an inclusive time range + // will be deleted. Using this option permanently deletes the feature values + // from the specified feature IDs within the specified time range. + // This might include data from the online storage. If you want to retain + // any deleted historical data in the online storage, you must re-ingest it. + message SelectTimeRangeAndFeature { + // Required. Select feature generated within a half-inclusive time range. + // The time range is lower inclusive and upper exclusive. + google.type.Interval time_range = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Selectors choosing which feature values to be deleted from the + // EntityType. + FeatureSelector feature_selector = 2 + [(google.api.field_behavior) = REQUIRED]; + + // If set, data will not be deleted from online storage. + // When time range is older than the data in online storage, setting this to + // be true will make the deletion have no impact on online serving. + bool skip_online_storage_delete = 3; + } + + // Defines options to select feature values to be deleted. + oneof DeleteOption { + // Select feature values to be deleted by specifying entities. + SelectEntity select_entity = 2; + + // Select feature values to be deleted by specifying time range and + // features. + SelectTimeRangeAndFeature select_time_range_and_feature = 3; + } + + // Required. The resource name of the EntityType grouping the Features for + // which values are being deleted from. Format: + // `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}` + string entity_type = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/EntityType" + } + ]; +} + +// Response message for +// [FeaturestoreService.DeleteFeatureValues][google.cloud.aiplatform.v1.FeaturestoreService.DeleteFeatureValues]. +message DeleteFeatureValuesResponse { + // Response message if the request uses the SelectEntity option. + message SelectEntity { + // The count of deleted entity rows in the offline storage. + // Each row corresponds to the combination of an entity ID and a timestamp. + // One entity ID can have multiple rows in the offline storage. + int64 offline_storage_deleted_entity_row_count = 1; + + // The count of deleted entities in the online storage. + // Each entity ID corresponds to one entity. + int64 online_storage_deleted_entity_count = 2; + } + + // Response message if the request uses the SelectTimeRangeAndFeature option. + message SelectTimeRangeAndFeature { + // The count of the features or columns impacted. + // This is the same as the feature count in the request. + int64 impacted_feature_count = 1; + + // The count of modified entity rows in the offline storage. + // Each row corresponds to the combination of an entity ID and a timestamp. + // One entity ID can have multiple rows in the offline storage. + // Within each row, only the features specified in the request are + // deleted. + int64 offline_storage_modified_entity_row_count = 2; + + // The count of modified entities in the online storage. + // Each entity ID corresponds to one entity. + // Within each entity, only the features specified in the request are + // deleted. + int64 online_storage_modified_entity_count = 3; + } + + // Response based on which delete option is specified in the + // request + oneof response { + // Response for request specifying the entities to delete + SelectEntity select_entity = 1; + + // Response for request specifying time range and feature + SelectTimeRangeAndFeature select_time_range_and_feature = 2; + } +} + +// Selector for entityId. Getting ids from the given source. +message EntityIdSelector { + // Details about the source data, including the location of the storage and + // the format. + oneof EntityIdsSource { + // Source of Csv + CsvSource csv_source = 3; + } + + // Source column that holds entity IDs. If not provided, entity IDs are + // extracted from the column named `entity_id`. + string entity_id_field = 5; +} diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/index_endpoint_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/index_endpoint_service.proto index 561edf93e28..f1be91add20 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/index_endpoint_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/index_endpoint_service.proto @@ -23,6 +23,7 @@ import "google/api/resource.proto"; import "google/cloud/aiplatform/v1/index_endpoint.proto"; import "google/cloud/aiplatform/v1/operation.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1"; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/index_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/index_service.proto index 229825e50ee..2fc0a19705c 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/index_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/index_service.proto @@ -23,6 +23,7 @@ import "google/api/resource.proto"; import "google/cloud/aiplatform/v1/index.proto"; import "google/cloud/aiplatform/v1/operation.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1"; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/job_state.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/job_state.proto index 16efd4556fa..0bd30c510ad 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/job_state.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/job_state.proto @@ -57,10 +57,7 @@ enum JobState { // The job has expired. JOB_STATE_EXPIRED = 9; - // The job is being updated. The job is only able to be updated at RUNNING - // state; if the update operation succeeds, job goes back to RUNNING state; if - // the update operation fails, the job goes back to RUNNING state with error - // messages written to [ModelDeploymentMonitoringJob.partial_errors][] field - // if it is a ModelDeploymentMonitoringJob. + // The job is being updated. Only jobs in the `RUNNING` state can be updated. + // After updating, the job goes back to the `RUNNING` state. JOB_STATE_UPDATING = 10; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/metadata_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/metadata_service.proto index 04a07627fcc..77432392363 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/metadata_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/metadata_service.proto @@ -29,6 +29,7 @@ import "google/cloud/aiplatform/v1/metadata_schema.proto"; import "google/cloud/aiplatform/v1/metadata_store.proto"; import "google/cloud/aiplatform/v1/operation.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1"; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model.proto index 8ca72f5260b..6f04eb34846 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model.proto @@ -208,12 +208,12 @@ message Model { // deploying this Model. The specification is ingested upon // [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], // and all binaries it contains are copied and stored internally by Vertex AI. - // Not present for AutoML Models. + // Not present for AutoML Models or Large Models. ModelContainerSpec container_spec = 9 [(google.api.field_behavior) = INPUT_ONLY]; // Immutable. The path to the directory containing the Model artifact and any - // of its supporting files. Not present for AutoML Models. + // of its supporting files. Not present for AutoML Models or Large Models. string artifact_uri = 26 [(google.api.field_behavior) = IMMUTABLE]; // Output only. When this Model is deployed, its prediction resources are @@ -341,11 +341,13 @@ message Model { // The default explanation specification for this Model. // - // The Model can be used for [requesting - // explanation][PredictionService.Explain] after being - // [deployed][google.cloud.aiplatform.v1.EndpointService.DeployModel] if it is - // populated. The Model can be used for [batch - // explanation][BatchPredictionJob.generate_explanation] if it is populated. + // The Model can be used for + // [requesting + // explanation][google.cloud.aiplatform.v1.PredictionService.Explain] after + // being [deployed][google.cloud.aiplatform.v1.EndpointService.DeployModel] if + // it is populated. The Model can be used for [batch + // explanation][google.cloud.aiplatform.v1.BatchPredictionJob.generate_explanation] + // if it is populated. // // All fields of the explanation_spec can be overridden by // [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] @@ -356,13 +358,16 @@ message Model { // of [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. // // If the default explanation specification is not set for this Model, this - // Model can still be used for [requesting - // explanation][PredictionService.Explain] by setting + // Model can still be used for + // [requesting + // explanation][google.cloud.aiplatform.v1.PredictionService.Explain] by + // setting // [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] // of // [DeployModelRequest.deployed_model][google.cloud.aiplatform.v1.DeployModelRequest.deployed_model] - // and for [batch explanation][BatchPredictionJob.generate_explanation] by - // setting + // and for [batch + // explanation][google.cloud.aiplatform.v1.BatchPredictionJob.generate_explanation] + // by setting // [explanation_spec][google.cloud.aiplatform.v1.BatchPredictionJob.explanation_spec] // of [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. ExplanationSpec explanation_spec = 23; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_evaluation.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_evaluation.proto index ecf0f9e014c..6b9499d1a11 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_evaluation.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_evaluation.proto @@ -79,8 +79,8 @@ message ModelEvaluation { // Points to a YAML file stored on Google Cloud Storage describing // [EvaluatedDataItemView.data_item_payload][] and - // [EvaluatedAnnotation.data_item_payload][]. The schema is defined as an - // OpenAPI 3.0.2 [Schema + // [EvaluatedAnnotation.data_item_payload][google.cloud.aiplatform.v1.EvaluatedAnnotation.data_item_payload]. + // The schema is defined as an OpenAPI 3.0.2 [Schema // Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). // // This field is not populated if there are neither EvaluatedDataItemViews nor @@ -90,9 +90,10 @@ message ModelEvaluation { // Points to a YAML file stored on Google Cloud Storage describing // [EvaluatedDataItemView.predictions][], // [EvaluatedDataItemView.ground_truths][], - // [EvaluatedAnnotation.predictions][], and - // [EvaluatedAnnotation.ground_truths][]. The schema is defined as an - // OpenAPI 3.0.2 [Schema + // [EvaluatedAnnotation.predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions], + // and + // [EvaluatedAnnotation.ground_truths][google.cloud.aiplatform.v1.EvaluatedAnnotation.ground_truths]. + // The schema is defined as an OpenAPI 3.0.2 [Schema // Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). // // This field is not populated if there are neither EvaluatedDataItemViews nor diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_evaluation_slice.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_evaluation_slice.proto index dd7949b772b..d870eb7b8fb 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_evaluation_slice.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_evaluation_slice.proto @@ -18,8 +18,10 @@ package google.cloud.aiplatform.v1; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/explanation.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1"; option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; @@ -39,6 +41,109 @@ message ModelEvaluationSlice { // Definition of a slice. message Slice { + // Specification for how the data should be sliced. + message SliceSpec { + // Specification message containing the config for this SliceSpec. + // When `kind` is selected as `value` and/or `range`, only a single slice + // will be computed. + // When `all_values` is present, a separate slice will be computed for + // each possible label/value for the corresponding key in `config`. + // Examples, with feature zip_code with values 12345, 23334, 88888 and + // feature country with values "US", "Canada", "Mexico" in the dataset: + // + // Example 1: + // + // { + // "zip_code": { "value": { "float_value": 12345.0 } } + // } + // + // A single slice for any data with zip_code 12345 in the dataset. + // + // Example 2: + // + // { + // "zip_code": { "range": { "low": 12345, "high": 20000 } } + // } + // + // A single slice containing data where the zip_codes between 12345 and + // 20000 For this example, data with the zip_code of 12345 will be in this + // slice. + // + // Example 3: + // + // { + // "zip_code": { "range": { "low": 10000, "high": 20000 } }, + // "country": { "value": { "string_value": "US" } } + // } + // + // A single slice containing data where the zip_codes between 10000 and + // 20000 has the country "US". For this example, data with the zip_code of + // 12345 and country "US" will be in this slice. + // + // Example 4: + // + // { "country": {"all_values": { "value": true } } } + // + // Three slices are computed, one for each unique country in the dataset. + // + // Example 5: + // + // { + // "country": { "all_values": { "value": true } }, + // "zip_code": { "value": { "float_value": 12345.0 } } + // } + // + // Three slices are computed, one for each unique country in the dataset + // where the zip_code is also 12345. For this example, data with zip_code + // 12345 and country "US" will be in one slice, zip_code 12345 and country + // "Canada" in another slice, and zip_code 12345 and country "Mexico" in + // another slice, totaling 3 slices. + message SliceConfig { + oneof kind { + // A unique specific value for a given feature. + // Example: `{ "value": { "string_value": "12345" } }` + Value value = 1; + + // A range of values for a numerical feature. + // Example: `{"range":{"low":10000.0,"high":50000.0}}` + // will capture 12345 and 23334 in the slice. + Range range = 2; + + // If all_values is set to true, then all possible labels of the keyed + // feature will have another slice computed. + // Example: `{"all_values":{"value":true}}` + google.protobuf.BoolValue all_values = 3; + } + } + + // A range of values for slice(s). + // `low` is inclusive, `high` is exclusive. + message Range { + // Inclusive low value for the range. + float low = 1; + + // Exclusive high value for the range. + float high = 2; + } + + // Single value that supports strings and floats. + message Value { + oneof kind { + // String type. + string string_value = 1; + + // Float type. + float float_value = 2; + } + } + + // Mapping configuration for this SliceSpec. + // The key is the name of the feature. + // By default, the key will be prefixed by "instance" as a dictionary + // prefix for Vertex Batch Predictions output format. + map configs = 1; + } + // Output only. The dimension of the slice. // Well-known dimensions are: // * `annotationSpec`: This slice is on the test data that has either @@ -46,10 +151,15 @@ message ModelEvaluationSlice { // [AnnotationSpec.display_name][google.cloud.aiplatform.v1.AnnotationSpec.display_name] // equals to // [value][google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.value]. + // * `slice`: This slice is a user customized slice defined by its + // SliceSpec. string dimension = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The value of the dimension in this slice. string value = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Specification for how the data was sliced. + SliceSpec slice_spec = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Output only. The resource name of the ModelEvaluationSlice. @@ -73,4 +183,11 @@ message ModelEvaluationSlice { // Output only. Timestamp when this ModelEvaluationSlice was created. google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Aggregated explanation metrics for the Model's prediction + // output over the data this ModelEvaluation uses. This field is populated + // only if the Model is evaluated with explanations, and only for tabular + // Models. + ModelExplanation model_explanation = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_service.proto index 4afe6afcac5..dc1fe7bdfec 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_service.proto @@ -21,12 +21,14 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/aiplatform/v1/encryption_spec.proto"; +import "google/cloud/aiplatform/v1/evaluated_annotation.proto"; import "google/cloud/aiplatform/v1/io.proto"; import "google/cloud/aiplatform/v1/model.proto"; import "google/cloud/aiplatform/v1/model_evaluation.proto"; import "google/cloud/aiplatform/v1/model_evaluation_slice.proto"; import "google/cloud/aiplatform/v1/operation.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1"; @@ -111,8 +113,9 @@ service ModelService { // Deletes a Model version. // - // Model version can only be deleted if there are no [DeployedModels][] - // created from it. Deleting the only version in the Model is not allowed. Use + // Model version can only be deleted if there are no + // [DeployedModels][google.cloud.aiplatform.v1.DeployedModel] created from it. + // Deleting the only version in the Model is not allowed. Use // [DeleteModel][google.cloud.aiplatform.v1.ModelService.DeleteModel] for // deleting the Model instead. rpc DeleteModelVersion(DeleteModelVersionRequest) @@ -190,6 +193,16 @@ service ModelService { option (google.api.method_signature) = "parent,model_evaluation_slices"; } + // Imports a list of externally generated EvaluatedAnnotations. + rpc BatchImportEvaluatedAnnotations(BatchImportEvaluatedAnnotationsRequest) + returns (BatchImportEvaluatedAnnotationsResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/models/*/evaluations/*/slices/*}:batchImport" + body: "*" + }; + option (google.api.method_signature) = "parent,evaluated_annotations"; + } + // Gets a ModelEvaluation. rpc GetModelEvaluation(GetModelEvaluationRequest) returns (ModelEvaluation) { option (google.api.http) = { @@ -711,6 +724,32 @@ message BatchImportModelEvaluationSlicesResponse { [(google.api.field_behavior) = OUTPUT_ONLY]; } +// Request message for +// [ModelService.BatchImportEvaluatedAnnotations][google.cloud.aiplatform.v1.ModelService.BatchImportEvaluatedAnnotations] +message BatchImportEvaluatedAnnotationsRequest { + // Required. The name of the parent ModelEvaluationSlice resource. + // Format: + // `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/ModelEvaluationSlice" + } + ]; + + // Required. Evaluated annotations resource to be imported. + repeated EvaluatedAnnotation evaluated_annotations = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for +// [ModelService.BatchImportEvaluatedAnnotations][google.cloud.aiplatform.v1.ModelService.BatchImportEvaluatedAnnotations] +message BatchImportEvaluatedAnnotationsResponse { + // Output only. Number of EvaluatedAnnotations imported. + int32 imported_evaluated_annotations_count = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // Request message for // [ModelService.GetModelEvaluation][google.cloud.aiplatform.v1.ModelService.GetModelEvaluation]. message GetModelEvaluationRequest { diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/nas_job.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/nas_job.proto index f763b655f9f..1d670eeca46 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/nas_job.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/nas_job.proto @@ -96,7 +96,7 @@ message NasJob { // Optional. Enable a separation of Custom model training // and restricted image training for tenant project. bool enable_restricted_image_training = 14 - [(google.api.field_behavior) = OPTIONAL]; + [deprecated = true, (google.api.field_behavior) = OPTIONAL]; } // Represents a NasTrial details along with it's parameters. If there is a diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/pipeline_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/pipeline_service.proto index 7bd1055f80f..63899ce24f9 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/pipeline_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/pipeline_service.proto @@ -20,6 +20,7 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/operation.proto"; import "google/cloud/aiplatform/v1/pipeline_job.proto"; import "google/cloud/aiplatform/v1/training_pipeline.proto"; import "google/longrunning/operations.proto"; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/specialist_pool_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/specialist_pool_service.proto index 0f1f7531f3f..c0d368081dc 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/specialist_pool_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/specialist_pool_service.proto @@ -23,6 +23,7 @@ import "google/api/resource.proto"; import "google/cloud/aiplatform/v1/operation.proto"; import "google/cloud/aiplatform/v1/specialist_pool.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1"; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tensorboard_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tensorboard_service.proto index 8a17a622101..63834044a70 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tensorboard_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tensorboard_service.proto @@ -27,6 +27,7 @@ import "google/cloud/aiplatform/v1/tensorboard_experiment.proto"; import "google/cloud/aiplatform/v1/tensorboard_run.proto"; import "google/cloud/aiplatform/v1/tensorboard_time_series.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1"; @@ -403,7 +404,8 @@ message ReadTensorboardUsageRequest { ]; } -// Response message for [TensorboardService.GetTensorboardUsage][]. +// Response message for +// [TensorboardService.ReadTensorboardUsage][google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardUsage]. message ReadTensorboardUsageResponse { // Per user usage data. message PerUserUsageData { diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/vizier_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/vizier_service.proto index d269b87efae..e3b467f18c9 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/vizier_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/vizier_service.proto @@ -158,7 +158,7 @@ service VizierService { // Checks whether a Trial should stop or not. Returns a // long-running operation. When the operation is successful, // it will contain a - // [CheckTrialEarlyStoppingStateResponse][google.cloud.ml.v1.CheckTrialEarlyStoppingStateResponse]. + // [CheckTrialEarlyStoppingStateResponse][google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse]. rpc CheckTrialEarlyStoppingState(CheckTrialEarlyStoppingStateRequest) returns (google.longrunning.Operation) { option (google.api.http) = { diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/accelerator_type.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/accelerator_type.proto index ebee15157ee..5587dc99f91 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/accelerator_type.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/accelerator_type.proto @@ -25,6 +25,7 @@ option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; // Represents a hardware accelerator type. +// NEXT ID: 11. enum AcceleratorType { // Unspecified accelerator type, which means no accelerator. ACCELERATOR_TYPE_UNSPECIFIED = 0; @@ -55,4 +56,7 @@ enum AcceleratorType { // TPU v3. TPU_V3 = 7; + + // TPU v4. + TPU_V4_POD = 10; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/batch_prediction_job.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/batch_prediction_job.proto index cbdd9f046a2..72599c8fc10 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/batch_prediction_job.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/batch_prediction_job.proto @@ -278,7 +278,11 @@ message BatchPredictionJob { // Exactly one of model and unmanaged_container_model must be set. // // The model resource name may contain version id or version alias to specify - // the version, if no version is specified, the default version will be used. + // the version. + // Example: `projects/{project}/locations/{location}/models/{model}@2` + // or + // `projects/{project}/locations/{location}/models/{model}@golden` + // if no version is specified, the default version will be deployed. string model = 3 [(google.api.resource_reference) = { type: "aiplatform.googleapis.com/Model" }]; @@ -456,4 +460,13 @@ message BatchPredictionJob { // Output only. The running status of the model monitoring pipeline. google.rpc.Status model_monitoring_status = 32 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // For custom-trained Models and AutoML Tabular Models, the container of the + // DeployedModel instances will send `stderr` and `stdout` streams to + // Stackdriver Logging by default. Please note that the logs incur cost, + // which are subject to [Cloud Logging + // pricing](https://cloud.google.com/stackdriver/pricing). + // + // User can disable container logging by setting this flag to true. + bool disable_container_logging = 34; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/dataset.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/dataset.proto index b89a9525f3a..0ea636da74c 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/dataset.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/dataset.proto @@ -170,9 +170,33 @@ message ExportDataConfig { GcsDestination gcs_destination = 1; } + // The instructions how the export data should be split between the + // training, validation and test sets. + oneof split { + // Split based on fractions defining the size of each set. + ExportFractionSplit fraction_split = 5; + } + // A filter on Annotations of the Dataset. Only Annotations on to-be-exported // DataItems(specified by [data_items_filter][]) that match this filter will // be exported. The filter syntax is the same as in // [ListAnnotations][google.cloud.aiplatform.v1beta1.DatasetService.ListAnnotations]. string annotations_filter = 2; } + +// Assigns the input data to training, validation, and test sets as per the +// given fractions. Any of `training_fraction`, `validation_fraction` and +// `test_fraction` may optionally be provided, they must sum to up to 1. If the +// provided ones sum to less than 1, the remainder is assigned to sets as +// decided by Vertex AI. If none of the fractions are set, by default roughly +// 80% of data is used for training, 10% for validation, and 10% for test. +message ExportFractionSplit { + // The fraction of the input data that is to be used to train the Model. + double training_fraction = 1; + + // The fraction of the input data that is to be used to validate the Model. + double validation_fraction = 2; + + // The fraction of the input data that is to be used to evaluate the Model. + double test_fraction = 3; +} diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/dataset_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/dataset_service.proto index fdef69d1502..a2cae6d5f49 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/dataset_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/dataset_service.proto @@ -27,6 +27,7 @@ import "google/cloud/aiplatform/v1beta1/dataset.proto"; import "google/cloud/aiplatform/v1beta1/operation.proto"; import "google/cloud/aiplatform/v1beta1/saved_query.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto index fbce75a91a7..0f11428f40c 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto @@ -25,6 +25,7 @@ import "google/cloud/aiplatform/v1beta1/deployment_resource_pool.proto"; import "google/cloud/aiplatform/v1beta1/endpoint.proto"; import "google/cloud/aiplatform/v1beta1/operation.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/endpoint.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/endpoint.proto index e5528607bf1..7486b872e70 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/endpoint.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/endpoint.proto @@ -176,7 +176,11 @@ message DeployedModel { // Endpoint. // // The resource name may contain version id or version alias to specify the - // version, if no version is specified, the default version will be deployed. + // version. + // Example: `projects/{project}/locations/{location}/models/{model}@2` + // or + // `projects/{project}/locations/{location}/models/{model}@golden` + // if no version is specified, the default version will be deployed. string model = 2 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto index d48a018b2fa..76b61d90589 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto @@ -23,6 +23,7 @@ import "google/api/resource.proto"; import "google/cloud/aiplatform/v1beta1/endpoint.proto"; import "google/cloud/aiplatform/v1beta1/operation.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/evaluated_annotation.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/evaluated_annotation.proto new file mode 100644 index 00000000000..9379cdeb365 --- /dev/null +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/evaluated_annotation.proto @@ -0,0 +1,185 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/cloud/aiplatform/v1beta1/explanation.proto"; +import "google/protobuf/struct.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "EvaluatedAnnotationProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; + +// True positive, false positive, or false negative. +// +// EvaluatedAnnotation is only available under ModelEvaluationSlice with slice +// of `annotationSpec` dimension. +message EvaluatedAnnotation { + // Describes the type of the EvaluatedAnnotation. The type is determined + enum EvaluatedAnnotationType { + // Invalid value. + EVALUATED_ANNOTATION_TYPE_UNSPECIFIED = 0; + + // The EvaluatedAnnotation is a true positive. It has a prediction created + // by the Model and a ground truth Annotation which the prediction matches. + TRUE_POSITIVE = 1; + + // The EvaluatedAnnotation is false positive. It has a prediction created by + // the Model which does not match any ground truth annotation. + FALSE_POSITIVE = 2; + + // The EvaluatedAnnotation is false negative. It has a ground truth + // annotation which is not matched by any of the model created predictions. + FALSE_NEGATIVE = 3; + } + + // Output only. Type of the EvaluatedAnnotation. + EvaluatedAnnotationType type = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The model predicted annotations. + // + // For true positive, there is one and only one prediction, which matches the + // only one ground truth annotation in + // [ground_truths][google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.ground_truths]. + // + // For false positive, there is one and only one prediction, which doesn't + // match any ground truth annotation of the corresponding + // [data_item_view_id][EvaluatedAnnotation.data_item_view_id]. + // + // For false negative, there are zero or more predictions which are similar to + // the only ground truth annotation in + // [ground_truths][google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.ground_truths] + // but not enough for a match. + // + // The schema of the prediction is stored in + // [ModelEvaluation.annotation_schema_uri][] + repeated google.protobuf.Value predictions = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ground truth Annotations, i.e. the Annotations that exist + // in the test data the Model is evaluated on. + // + // For true positive, there is one and only one ground truth annotation, which + // matches the only prediction in + // [predictions][google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.predictions]. + // + // For false positive, there are zero or more ground truth annotations that + // are similar to the only prediction in + // [predictions][google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.predictions], + // but not enough for a match. + // + // For false negative, there is one and only one ground truth annotation, + // which doesn't match any predictions created by the model. + // + // The schema of the ground truth is stored in + // [ModelEvaluation.annotation_schema_uri][] + repeated google.protobuf.Value ground_truths = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The data item payload that the Model predicted this + // EvaluatedAnnotation on. + google.protobuf.Value data_item_payload = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. ID of the EvaluatedDataItemView under the same ancestor + // ModelEvaluation. The EvaluatedDataItemView consists of all ground truths + // and predictions on + // [data_item_payload][google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.data_item_payload]. + // + // Can be passed in + // [GetEvaluatedDataItemView's][ModelService.GetEvaluatedDataItemView][] + // [id][GetEvaluatedDataItemViewRequest.id]. + string evaluated_data_item_view_id = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Explanations of + // [predictions][google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.predictions]. + // Each element of the explanations indicates the explanation for one + // explanation Method. + // + // The attributions list in the + // [EvaluatedAnnotationExplanation.explanation][google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation.explanation] + // object corresponds to the + // [predictions][google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.predictions] + // list. For example, the second element in the attributions list explains the + // second element in the predictions list. + repeated EvaluatedAnnotationExplanation explanations = 8; + + // Annotations of model error analysis results. + repeated ErrorAnalysisAnnotation error_analysis_annotations = 9; +} + +// Explanation result of the prediction produced by the Model. +message EvaluatedAnnotationExplanation { + // Explanation type. + // + // For AutoML Image Classification models, possible values are: + // + // * `image-integrated-gradients` + // * `image-xrai` + string explanation_type = 1; + + // Explanation attribution response details. + Explanation explanation = 2; +} + +// Model error analysis for each annotation. +message ErrorAnalysisAnnotation { + // Attributed items for a given annotation, typically representing neighbors + // from the training sets constrained by the query type. + message AttributedItem { + // The unique ID for each annotation. Used by FE to allocate the annotation + // in DB. + string annotation_resource_name = 1; + + // The distance of this item to the annotation. + double distance = 2; + } + + // The query type used for finding the attributed items. + enum QueryType { + // Unspecified query type for model error analysis. + QUERY_TYPE_UNSPECIFIED = 0; + + // Query similar samples across all classes in the dataset. + ALL_SIMILAR = 1; + + // Query similar samples from the same class of the input sample. + SAME_CLASS_SIMILAR = 2; + + // Query dissimilar samples from the same class of the input sample. + SAME_CLASS_DISSIMILAR = 3; + } + + // Attributed items for a given annotation, typically representing neighbors + // from the training sets constrained by the query type. + repeated AttributedItem attributed_items = 1; + + // The query type used for finding the attributed items. + QueryType query_type = 2; + + // The outlier score of this annotated item. Usually defined as the min of all + // distances from attributed items. + double outlier_score = 3; + + // The threshold used to determine if this annotation is an outlier or not. + double outlier_threshold = 4; +} diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/featurestore.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/featurestore.proto index a5c0ad452b9..8ae1c7d8169 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/featurestore.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/featurestore.proto @@ -52,6 +52,15 @@ message Featurestore { // The maximum number of nodes to scale up to. Must be greater than // min_node_count, and less than or equal to 10 times of 'min_node_count'. int32 max_node_count = 2; + + // Optional. The cpu utilization that the Autoscaler should be trying to + // achieve. This number is on a scale from 0 (no utilization) to 100 + // (total utilization), and is limited between 10 and 80. When a cluster's + // CPU utilization exceeds the target that you have set, Bigtable + // immediately adds nodes to the cluster. When CPU utilization is + // substantially lower than the target, Bigtable removes nodes. If not set + // or set to 0, default to 50. + int32 cpu_utilization_target = 3 [(google.api.field_behavior) = OPTIONAL]; } // The number of nodes for the online store. The number of nodes doesn't diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/featurestore_monitoring.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/featurestore_monitoring.proto index 3f1653dc02a..7099d8e0bee 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/featurestore_monitoring.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/featurestore_monitoring.proto @@ -48,17 +48,16 @@ message FeaturestoreMonitoringConfig { // Configuration of the snapshot analysis based monitoring pipeline running // interval. The value is rolled up to full day. + // If both + // [monitoring_interval_days][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days] + // and the deprecated `monitoring_interval` field + // are set when creating/updating EntityTypes/Features, + // [monitoring_interval_days][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days] + // will be used. google.protobuf.Duration monitoring_interval = 2 [deprecated = true]; // Configuration of the snapshot analysis based monitoring pipeline // running interval. The value indicates number of days. - // If both - // [FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days] - // and - // [FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval] - // are set when creating/updating EntityTypes/Features, - // [FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days] - // will be used. int32 monitoring_interval_days = 3; // Customized export features time window for snapshot analysis. Unit is one @@ -69,7 +68,9 @@ message FeaturestoreMonitoringConfig { // Configuration of the Featurestore's ImportFeature Analysis Based // Monitoring. This type of analysis generates statistics for values of each - // Feature imported by every [ImportFeatureValues][] operation. + // Feature imported by every + // [ImportFeatureValues][google.cloud.aiplatform.v1beta1.FeaturestoreService.ImportFeatureValues] + // operation. message ImportFeaturesAnalysis { // The state defines whether to enable ImportFeature analysis. enum State { @@ -96,7 +97,9 @@ message FeaturestoreMonitoringConfig { } // Defines the baseline to do anomaly detection for feature values imported - // by each [ImportFeatureValues][] operation. + // by each + // [ImportFeatureValues][google.cloud.aiplatform.v1beta1.FeaturestoreService.ImportFeatureValues] + // operation. enum Baseline { // Should not be used. BASELINE_UNSPECIFIED = 0; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/featurestore_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/featurestore_service.proto index 688deafa645..86fa13380f9 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/featurestore_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/featurestore_service.proto @@ -27,6 +27,7 @@ import "google/cloud/aiplatform/v1beta1/featurestore.proto"; import "google/cloud/aiplatform/v1beta1/io.proto"; import "google/cloud/aiplatform/v1beta1/operation.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/type/interval.proto"; @@ -1387,7 +1388,49 @@ message DeleteFeatureValuesRequest { // Response message for // [FeaturestoreService.DeleteFeatureValues][google.cloud.aiplatform.v1beta1.FeaturestoreService.DeleteFeatureValues]. -message DeleteFeatureValuesResponse {} +message DeleteFeatureValuesResponse { + // Response message if the request uses the SelectEntity option. + message SelectEntity { + // The count of deleted entity rows in the offline storage. + // Each row corresponds to the combination of an entity ID and a timestamp. + // One entity ID can have multiple rows in the offline storage. + int64 offline_storage_deleted_entity_row_count = 1; + + // The count of deleted entities in the online storage. + // Each entity ID corresponds to one entity. + int64 online_storage_deleted_entity_count = 2; + } + + // Response message if the request uses the SelectTimeRangeAndFeature option. + message SelectTimeRangeAndFeature { + // The count of the features or columns impacted. + // This is the same as the feature count in the request. + int64 impacted_feature_count = 1; + + // The count of modified entity rows in the offline storage. + // Each row corresponds to the combination of an entity ID and a timestamp. + // One entity ID can have multiple rows in the offline storage. + // Within each row, only the features specified in the request are + // deleted. + int64 offline_storage_modified_entity_row_count = 2; + + // The count of modified entities in the online storage. + // Each entity ID corresponds to one entity. + // Within each entity, only the features specified in the request are + // deleted. + int64 online_storage_modified_entity_count = 3; + } + + // Response based on which delete option is specified in the + // request + oneof response { + // Response for request specifying the entities to delete + SelectEntity select_entity = 1; + + // Response for request specifying time range and feature + SelectTimeRangeAndFeature select_time_range_and_feature = 2; + } +} // Selector for entityId. Getting ids from the given source. message EntityIdSelector { diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/index_endpoint_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/index_endpoint_service.proto index 64e1a2cc115..fbbc5095c60 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/index_endpoint_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/index_endpoint_service.proto @@ -23,6 +23,7 @@ import "google/api/resource.proto"; import "google/cloud/aiplatform/v1beta1/index_endpoint.proto"; import "google/cloud/aiplatform/v1beta1/operation.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/index_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/index_service.proto index 2565ca7ae86..f74394c0ea7 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/index_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/index_service.proto @@ -23,6 +23,7 @@ import "google/api/resource.proto"; import "google/cloud/aiplatform/v1beta1/index.proto"; import "google/cloud/aiplatform/v1beta1/operation.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/job_state.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/job_state.proto index fb0ffdc33d2..7a53cd2cfc3 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/job_state.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/job_state.proto @@ -57,10 +57,7 @@ enum JobState { // The job has expired. JOB_STATE_EXPIRED = 9; - // The job is being updated. The job is only able to be updated at RUNNING - // state; if the update operation succeeds, job goes back to RUNNING state; if - // the update operation fails, the job goes back to RUNNING state with error - // messages written to [ModelDeploymentMonitoringJob.partial_errors][] field - // if it is a ModelDeploymentMonitoringJob. + // The job is being updated. Only jobs in the `RUNNING` state can be updated. + // After updating, the job goes back to the `RUNNING` state. JOB_STATE_UPDATING = 10; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/match_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/match_service.proto index 07acb17b08f..bac8de1b3f3 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/match_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/match_service.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/metadata_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/metadata_service.proto index b1b6c664c93..8e23652d576 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/metadata_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/metadata_service.proto @@ -29,6 +29,7 @@ import "google/cloud/aiplatform/v1beta1/metadata_schema.proto"; import "google/cloud/aiplatform/v1beta1/metadata_store.proto"; import "google/cloud/aiplatform/v1beta1/operation.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model.proto index ed2b51e1848..5801b2e4282 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model.proto @@ -103,6 +103,13 @@ message Model { ]; } + // Contains information about the Large Model. + message LargeModelReference { + // Required. The unique name of the large Foundation or pre-built model. + // Like "chat-panda", "text-panda". + string name = 1 [(google.api.field_behavior) = REQUIRED]; + } + // Identifies a type of Model's prediction resources. enum DeploymentResourcesType { // Should not be used. @@ -210,12 +217,12 @@ message Model { // deploying this Model. The specification is ingested upon // [ModelService.UploadModel][google.cloud.aiplatform.v1beta1.ModelService.UploadModel], // and all binaries it contains are copied and stored internally by Vertex AI. - // Not present for AutoML Models. + // Not present for AutoML Models or Large Models. ModelContainerSpec container_spec = 9 [(google.api.field_behavior) = INPUT_ONLY]; // Immutable. The path to the directory containing the Model artifact and any - // of its supporting files. Not present for AutoML Models. + // of its supporting files. Not present for AutoML Models or Large Models. string artifact_uri = 26 [(google.api.field_behavior) = IMMUTABLE]; // Output only. When this Model is deployed, its prediction resources are @@ -343,11 +350,14 @@ message Model { // The default explanation specification for this Model. // - // The Model can be used for [requesting - // explanation][PredictionService.Explain] after being + // The Model can be used for + // [requesting + // explanation][google.cloud.aiplatform.v1beta1.PredictionService.Explain] + // after being // [deployed][google.cloud.aiplatform.v1beta1.EndpointService.DeployModel] if // it is populated. The Model can be used for [batch - // explanation][BatchPredictionJob.generate_explanation] if it is populated. + // explanation][google.cloud.aiplatform.v1beta1.BatchPredictionJob.generate_explanation] + // if it is populated. // // All fields of the explanation_spec can be overridden by // [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] @@ -359,13 +369,16 @@ message Model { // [BatchPredictionJob][google.cloud.aiplatform.v1beta1.BatchPredictionJob]. // // If the default explanation specification is not set for this Model, this - // Model can still be used for [requesting - // explanation][PredictionService.Explain] by setting + // Model can still be used for + // [requesting + // explanation][google.cloud.aiplatform.v1beta1.PredictionService.Explain] by + // setting // [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] // of // [DeployModelRequest.deployed_model][google.cloud.aiplatform.v1beta1.DeployModelRequest.deployed_model] - // and for [batch explanation][BatchPredictionJob.generate_explanation] by - // setting + // and for [batch + // explanation][google.cloud.aiplatform.v1beta1.BatchPredictionJob.generate_explanation] + // by setting // [explanation_spec][google.cloud.aiplatform.v1beta1.BatchPredictionJob.explanation_spec] // of // [BatchPredictionJob][google.cloud.aiplatform.v1beta1.BatchPredictionJob]. @@ -403,6 +416,11 @@ message Model { // is // `projects/{project}/locations/{location}/metadataStores/{metadata_store}/artifacts/{artifact}`. string metadata_artifact = 44 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Used to specify the large model reference. + // Only present for Large Models. + LargeModelReference large_model_reference = 45 + [(google.api.field_behavior) = OPTIONAL]; } // Contains the schemata used in Model's predictions and explanations via diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto index 145cbda470e..287ee6c3115 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto @@ -18,8 +18,10 @@ package google.cloud.aiplatform.v1beta1; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1beta1/explanation.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; @@ -39,6 +41,109 @@ message ModelEvaluationSlice { // Definition of a slice. message Slice { + // Specification for how the data should be sliced. + message SliceSpec { + // Specification message containing the config for this SliceSpec. + // When `kind` is selected as `value` and/or `range`, only a single slice + // will be computed. + // When `all_values` is present, a separate slice will be computed for + // each possible label/value for the corresponding key in `config`. + // Examples, with feature zip_code with values 12345, 23334, 88888 and + // feature country with values "US", "Canada", "Mexico" in the dataset: + // + // Example 1: + // + // { + // "zip_code": { "value": { "float_value": 12345.0 } } + // } + // + // A single slice for any data with zip_code 12345 in the dataset. + // + // Example 2: + // + // { + // "zip_code": { "range": { "low": 12345, "high": 20000 } } + // } + // + // A single slice containing data where the zip_codes between 12345 and + // 20000 For this example, data with the zip_code of 12345 will be in this + // slice. + // + // Example 3: + // + // { + // "zip_code": { "range": { "low": 10000, "high": 20000 } }, + // "country": { "value": { "string_value": "US" } } + // } + // + // A single slice containing data where the zip_codes between 10000 and + // 20000 has the country "US". For this example, data with the zip_code of + // 12345 and country "US" will be in this slice. + // + // Example 4: + // + // { "country": {"all_values": { "value": true } } } + // + // Three slices are computed, one for each unique country in the dataset. + // + // Example 5: + // + // { + // "country": { "all_values": { "value": true } }, + // "zip_code": { "value": { "float_value": 12345.0 } } + // } + // + // Three slices are computed, one for each unique country in the dataset + // where the zip_code is also 12345. For this example, data with zip_code + // 12345 and country "US" will be in one slice, zip_code 12345 and country + // "Canada" in another slice, and zip_code 12345 and country "Mexico" in + // another slice, totaling 3 slices. + message SliceConfig { + oneof kind { + // A unique specific value for a given feature. + // Example: `{ "value": { "string_value": "12345" } }` + Value value = 1; + + // A range of values for a numerical feature. + // Example: `{"range":{"low":10000.0,"high":50000.0}}` + // will capture 12345 and 23334 in the slice. + Range range = 2; + + // If all_values is set to true, then all possible labels of the keyed + // feature will have another slice computed. + // Example: `{"all_values":{"value":true}}` + google.protobuf.BoolValue all_values = 3; + } + } + + // A range of values for slice(s). + // `low` is inclusive, `high` is exclusive. + message Range { + // Inclusive low value for the range. + float low = 1; + + // Exclusive high value for the range. + float high = 2; + } + + // Single value that supports strings and floats. + message Value { + oneof kind { + // String type. + string string_value = 1; + + // Float type. + float float_value = 2; + } + } + + // Mapping configuration for this SliceSpec. + // The key is the name of the feature. + // By default, the key will be prefixed by "instance" as a dictionary + // prefix for Vertex Batch Predictions output format. + map configs = 1; + } + // Output only. The dimension of the slice. // Well-known dimensions are: // * `annotationSpec`: This slice is on the test data that has either @@ -46,10 +151,15 @@ message ModelEvaluationSlice { // [AnnotationSpec.display_name][google.cloud.aiplatform.v1beta1.AnnotationSpec.display_name] // equals to // [value][google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.value]. + // * `slice`: This slice is a user customized slice defined by its + // SliceSpec. string dimension = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The value of the dimension in this slice. string value = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Specification for how the data was sliced. + SliceSpec slice_spec = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Output only. The resource name of the ModelEvaluationSlice. @@ -74,4 +184,11 @@ message ModelEvaluationSlice { // Output only. Timestamp when this ModelEvaluationSlice was created. google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Aggregated explanation metrics for the Model's prediction + // output over the data this ModelEvaluation uses. This field is populated + // only if the Model is evaluated with explanations, and only for tabular + // Models. + ModelExplanation model_explanation = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model_service.proto index c1a68c12c52..af56ead5abd 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model_service.proto @@ -21,6 +21,7 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/aiplatform/v1beta1/encryption_spec.proto"; +import "google/cloud/aiplatform/v1beta1/evaluated_annotation.proto"; import "google/cloud/aiplatform/v1beta1/explanation.proto"; import "google/cloud/aiplatform/v1beta1/io.proto"; import "google/cloud/aiplatform/v1beta1/model.proto"; @@ -28,6 +29,7 @@ import "google/cloud/aiplatform/v1beta1/model_evaluation.proto"; import "google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto"; import "google/cloud/aiplatform/v1beta1/operation.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; @@ -126,8 +128,9 @@ service ModelService { // Deletes a Model version. // - // Model version can only be deleted if there are no [DeployedModels][] - // created from it. Deleting the only version in the Model is not allowed. Use + // Model version can only be deleted if there are no + // [DeployedModels][google.cloud.aiplatform.v1beta1.DeployedModel] created + // from it. Deleting the only version in the Model is not allowed. Use // [DeleteModel][google.cloud.aiplatform.v1beta1.ModelService.DeleteModel] for // deleting the Model instead. rpc DeleteModelVersion(DeleteModelVersionRequest) @@ -205,6 +208,16 @@ service ModelService { option (google.api.method_signature) = "parent,model_evaluation_slices"; } + // Imports a list of externally generated EvaluatedAnnotations. + rpc BatchImportEvaluatedAnnotations(BatchImportEvaluatedAnnotationsRequest) + returns (BatchImportEvaluatedAnnotationsResponse) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/models/*/evaluations/*/slices/*}:batchImport" + body: "*" + }; + option (google.api.method_signature) = "parent,evaluated_annotations"; + } + // Gets a ModelEvaluation. rpc GetModelEvaluation(GetModelEvaluationRequest) returns (ModelEvaluation) { option (google.api.http) = { @@ -743,6 +756,32 @@ message BatchImportModelEvaluationSlicesResponse { [(google.api.field_behavior) = OUTPUT_ONLY]; } +// Request message for +// [ModelService.BatchImportEvaluatedAnnotations][google.cloud.aiplatform.v1beta1.ModelService.BatchImportEvaluatedAnnotations] +message BatchImportEvaluatedAnnotationsRequest { + // Required. The name of the parent ModelEvaluationSlice resource. + // Format: + // `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/ModelEvaluationSlice" + } + ]; + + // Required. Evaluated annotations resource to be imported. + repeated EvaluatedAnnotation evaluated_annotations = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for +// [ModelService.BatchImportEvaluatedAnnotations][google.cloud.aiplatform.v1beta1.ModelService.BatchImportEvaluatedAnnotations] +message BatchImportEvaluatedAnnotationsResponse { + // Output only. Number of EvaluatedAnnotations imported. + int32 imported_evaluated_annotations_count = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // Request message for // [ModelService.GetModelEvaluation][google.cloud.aiplatform.v1beta1.ModelService.GetModelEvaluation]. message GetModelEvaluationRequest { diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/nas_job.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/nas_job.proto index 383d3c5aca2..39f468cc15d 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/nas_job.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/nas_job.proto @@ -96,7 +96,7 @@ message NasJob { // Optional. Enable a separation of Custom model training // and restricted image training for tenant project. bool enable_restricted_image_training = 14 - [(google.api.field_behavior) = OPTIONAL]; + [deprecated = true, (google.api.field_behavior) = OPTIONAL]; } // Represents a NasTrial details along with it's parameters. If there is a diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto index d17c375342e..e0e4d9ee466 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto @@ -20,6 +20,7 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1beta1/operation.proto"; import "google/cloud/aiplatform/v1beta1/pipeline_job.proto"; import "google/cloud/aiplatform/v1beta1/training_pipeline.proto"; import "google/longrunning/operations.proto"; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/specialist_pool_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/specialist_pool_service.proto index 01d037b812e..82a2f8f2572 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/specialist_pool_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/specialist_pool_service.proto @@ -23,6 +23,7 @@ import "google/api/resource.proto"; import "google/cloud/aiplatform/v1beta1/operation.proto"; import "google/cloud/aiplatform/v1beta1/specialist_pool.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tensorboard_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tensorboard_service.proto index 2a150320bec..2dbd620baef 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tensorboard_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tensorboard_service.proto @@ -27,6 +27,7 @@ import "google/cloud/aiplatform/v1beta1/tensorboard_experiment.proto"; import "google/cloud/aiplatform/v1beta1/tensorboard_run.proto"; import "google/cloud/aiplatform/v1beta1/tensorboard_time_series.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; @@ -402,7 +403,8 @@ message ReadTensorboardUsageRequest { ]; } -// Response message for [TensorboardService.GetTensorboardUsage][]. +// Response message for +// [TensorboardService.ReadTensorboardUsage][google.cloud.aiplatform.v1beta1.TensorboardService.ReadTensorboardUsage]. message ReadTensorboardUsageResponse { // Per user usage data. message PerUserUsageData { diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/vizier_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/vizier_service.proto index 6f2f0eac399..0e75beaa337 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/vizier_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/vizier_service.proto @@ -158,7 +158,7 @@ service VizierService { // Checks whether a Trial should stop or not. Returns a // long-running operation. When the operation is successful, // it will contain a - // [CheckTrialEarlyStoppingStateResponse][google.cloud.ml.v1.CheckTrialEarlyStoppingStateResponse]. + // [CheckTrialEarlyStoppingStateResponse][google.cloud.aiplatform.v1beta1.CheckTrialEarlyStoppingStateResponse]. rpc CheckTrialEarlyStoppingState(CheckTrialEarlyStoppingStateRequest) returns (google.longrunning.Operation) { option (google.api.http) = { diff --git a/packages/google-cloud-aiplatform/protos/protos.d.ts b/packages/google-cloud-aiplatform/protos/protos.d.ts index c10cea7b743..2169d9ffd23 100644 --- a/packages/google-cloud-aiplatform/protos/protos.d.ts +++ b/packages/google-cloud-aiplatform/protos/protos.d.ts @@ -36,7 +36,8 @@ export namespace google { NVIDIA_TESLA_T4 = 5, NVIDIA_TESLA_A100 = 8, TPU_V2 = 6, - TPU_V3 = 7 + TPU_V3 = 7, + TPU_V4_POD = 10 } /** Properties of an Annotation. */ @@ -664,6 +665,9 @@ export namespace google { /** BatchPredictionJob encryptionSpec */ encryptionSpec?: (google.cloud.aiplatform.v1.IEncryptionSpec|null); + + /** BatchPredictionJob disableContainerLogging */ + disableContainerLogging?: (boolean|null); } /** Represents a BatchPredictionJob. */ @@ -753,6 +757,9 @@ export namespace google { /** BatchPredictionJob encryptionSpec. */ public encryptionSpec?: (google.cloud.aiplatform.v1.IEncryptionSpec|null); + /** BatchPredictionJob disableContainerLogging. */ + public disableContainerLogging: boolean; + /** * Creates a new BatchPredictionJob instance using the specified properties. * @param [properties] Properties to set @@ -9081,6 +9088,9 @@ export namespace google { /** ExportDataConfig gcsDestination */ gcsDestination?: (google.cloud.aiplatform.v1.IGcsDestination|null); + /** ExportDataConfig fractionSplit */ + fractionSplit?: (google.cloud.aiplatform.v1.IExportFractionSplit|null); + /** ExportDataConfig annotationsFilter */ annotationsFilter?: (string|null); } @@ -9097,12 +9107,18 @@ export namespace google { /** ExportDataConfig gcsDestination. */ public gcsDestination?: (google.cloud.aiplatform.v1.IGcsDestination|null); + /** ExportDataConfig fractionSplit. */ + public fractionSplit?: (google.cloud.aiplatform.v1.IExportFractionSplit|null); + /** ExportDataConfig annotationsFilter. */ public annotationsFilter: string; /** ExportDataConfig destination. */ public destination?: "gcsDestination"; + /** ExportDataConfig split. */ + public split?: "fractionSplit"; + /** * Creates a new ExportDataConfig instance using the specified properties. * @param [properties] Properties to set @@ -9181,6 +9197,115 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an ExportFractionSplit. */ + interface IExportFractionSplit { + + /** ExportFractionSplit trainingFraction */ + trainingFraction?: (number|null); + + /** ExportFractionSplit validationFraction */ + validationFraction?: (number|null); + + /** ExportFractionSplit testFraction */ + testFraction?: (number|null); + } + + /** Represents an ExportFractionSplit. */ + class ExportFractionSplit implements IExportFractionSplit { + + /** + * Constructs a new ExportFractionSplit. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IExportFractionSplit); + + /** ExportFractionSplit trainingFraction. */ + public trainingFraction: number; + + /** ExportFractionSplit validationFraction. */ + public validationFraction: number; + + /** ExportFractionSplit testFraction. */ + public testFraction: number; + + /** + * Creates a new ExportFractionSplit instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportFractionSplit instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IExportFractionSplit): google.cloud.aiplatform.v1.ExportFractionSplit; + + /** + * Encodes the specified ExportFractionSplit message. Does not implicitly {@link google.cloud.aiplatform.v1.ExportFractionSplit.verify|verify} messages. + * @param message ExportFractionSplit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IExportFractionSplit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExportFractionSplit message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ExportFractionSplit.verify|verify} messages. + * @param message ExportFractionSplit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IExportFractionSplit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExportFractionSplit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportFractionSplit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1.ExportFractionSplit; + + /** + * Decodes an ExportFractionSplit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportFractionSplit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1.ExportFractionSplit; + + /** + * Verifies an ExportFractionSplit message. + * @param message Plain 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 ExportFractionSplit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportFractionSplit + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.ExportFractionSplit; + + /** + * Creates a plain object from an ExportFractionSplit message. Also converts values to other types if specified. + * @param message ExportFractionSplit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.ExportFractionSplit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportFractionSplit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExportFractionSplit + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a SavedQuery. */ interface ISavedQuery { @@ -15178,6 +15303,482 @@ export namespace google { } } + /** Properties of an EvaluatedAnnotation. */ + interface IEvaluatedAnnotation { + + /** EvaluatedAnnotation type */ + type?: (google.cloud.aiplatform.v1.EvaluatedAnnotation.EvaluatedAnnotationType|keyof typeof google.cloud.aiplatform.v1.EvaluatedAnnotation.EvaluatedAnnotationType|null); + + /** EvaluatedAnnotation predictions */ + predictions?: (google.protobuf.IValue[]|null); + + /** EvaluatedAnnotation groundTruths */ + groundTruths?: (google.protobuf.IValue[]|null); + + /** EvaluatedAnnotation dataItemPayload */ + dataItemPayload?: (google.protobuf.IValue|null); + + /** EvaluatedAnnotation evaluatedDataItemViewId */ + evaluatedDataItemViewId?: (string|null); + + /** EvaluatedAnnotation explanations */ + explanations?: (google.cloud.aiplatform.v1.IEvaluatedAnnotationExplanation[]|null); + + /** EvaluatedAnnotation errorAnalysisAnnotations */ + errorAnalysisAnnotations?: (google.cloud.aiplatform.v1.IErrorAnalysisAnnotation[]|null); + } + + /** Represents an EvaluatedAnnotation. */ + class EvaluatedAnnotation implements IEvaluatedAnnotation { + + /** + * Constructs a new EvaluatedAnnotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IEvaluatedAnnotation); + + /** EvaluatedAnnotation type. */ + public type: (google.cloud.aiplatform.v1.EvaluatedAnnotation.EvaluatedAnnotationType|keyof typeof google.cloud.aiplatform.v1.EvaluatedAnnotation.EvaluatedAnnotationType); + + /** EvaluatedAnnotation predictions. */ + public predictions: google.protobuf.IValue[]; + + /** EvaluatedAnnotation groundTruths. */ + public groundTruths: google.protobuf.IValue[]; + + /** EvaluatedAnnotation dataItemPayload. */ + public dataItemPayload?: (google.protobuf.IValue|null); + + /** EvaluatedAnnotation evaluatedDataItemViewId. */ + public evaluatedDataItemViewId: string; + + /** EvaluatedAnnotation explanations. */ + public explanations: google.cloud.aiplatform.v1.IEvaluatedAnnotationExplanation[]; + + /** EvaluatedAnnotation errorAnalysisAnnotations. */ + public errorAnalysisAnnotations: google.cloud.aiplatform.v1.IErrorAnalysisAnnotation[]; + + /** + * Creates a new EvaluatedAnnotation instance using the specified properties. + * @param [properties] Properties to set + * @returns EvaluatedAnnotation instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IEvaluatedAnnotation): google.cloud.aiplatform.v1.EvaluatedAnnotation; + + /** + * Encodes the specified EvaluatedAnnotation message. Does not implicitly {@link google.cloud.aiplatform.v1.EvaluatedAnnotation.verify|verify} messages. + * @param message EvaluatedAnnotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IEvaluatedAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EvaluatedAnnotation message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.EvaluatedAnnotation.verify|verify} messages. + * @param message EvaluatedAnnotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IEvaluatedAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EvaluatedAnnotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EvaluatedAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1.EvaluatedAnnotation; + + /** + * Decodes an EvaluatedAnnotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EvaluatedAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1.EvaluatedAnnotation; + + /** + * Verifies an EvaluatedAnnotation message. + * @param message Plain 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 EvaluatedAnnotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EvaluatedAnnotation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.EvaluatedAnnotation; + + /** + * Creates a plain object from an EvaluatedAnnotation message. Also converts values to other types if specified. + * @param message EvaluatedAnnotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.EvaluatedAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EvaluatedAnnotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EvaluatedAnnotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EvaluatedAnnotation { + + /** EvaluatedAnnotationType enum. */ + enum EvaluatedAnnotationType { + EVALUATED_ANNOTATION_TYPE_UNSPECIFIED = 0, + TRUE_POSITIVE = 1, + FALSE_POSITIVE = 2, + FALSE_NEGATIVE = 3 + } + } + + /** Properties of an EvaluatedAnnotationExplanation. */ + interface IEvaluatedAnnotationExplanation { + + /** EvaluatedAnnotationExplanation explanationType */ + explanationType?: (string|null); + + /** EvaluatedAnnotationExplanation explanation */ + explanation?: (google.cloud.aiplatform.v1.IExplanation|null); + } + + /** Represents an EvaluatedAnnotationExplanation. */ + class EvaluatedAnnotationExplanation implements IEvaluatedAnnotationExplanation { + + /** + * Constructs a new EvaluatedAnnotationExplanation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IEvaluatedAnnotationExplanation); + + /** EvaluatedAnnotationExplanation explanationType. */ + public explanationType: string; + + /** EvaluatedAnnotationExplanation explanation. */ + public explanation?: (google.cloud.aiplatform.v1.IExplanation|null); + + /** + * Creates a new EvaluatedAnnotationExplanation instance using the specified properties. + * @param [properties] Properties to set + * @returns EvaluatedAnnotationExplanation instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IEvaluatedAnnotationExplanation): google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation; + + /** + * Encodes the specified EvaluatedAnnotationExplanation message. Does not implicitly {@link google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation.verify|verify} messages. + * @param message EvaluatedAnnotationExplanation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IEvaluatedAnnotationExplanation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EvaluatedAnnotationExplanation message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation.verify|verify} messages. + * @param message EvaluatedAnnotationExplanation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IEvaluatedAnnotationExplanation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EvaluatedAnnotationExplanation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EvaluatedAnnotationExplanation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation; + + /** + * Decodes an EvaluatedAnnotationExplanation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EvaluatedAnnotationExplanation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation; + + /** + * Verifies an EvaluatedAnnotationExplanation message. + * @param message Plain 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 EvaluatedAnnotationExplanation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EvaluatedAnnotationExplanation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation; + + /** + * Creates a plain object from an EvaluatedAnnotationExplanation message. Also converts values to other types if specified. + * @param message EvaluatedAnnotationExplanation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EvaluatedAnnotationExplanation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EvaluatedAnnotationExplanation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ErrorAnalysisAnnotation. */ + interface IErrorAnalysisAnnotation { + + /** ErrorAnalysisAnnotation attributedItems */ + attributedItems?: (google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.IAttributedItem[]|null); + + /** ErrorAnalysisAnnotation queryType */ + queryType?: (google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.QueryType|keyof typeof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.QueryType|null); + + /** ErrorAnalysisAnnotation outlierScore */ + outlierScore?: (number|null); + + /** ErrorAnalysisAnnotation outlierThreshold */ + outlierThreshold?: (number|null); + } + + /** Represents an ErrorAnalysisAnnotation. */ + class ErrorAnalysisAnnotation implements IErrorAnalysisAnnotation { + + /** + * Constructs a new ErrorAnalysisAnnotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IErrorAnalysisAnnotation); + + /** ErrorAnalysisAnnotation attributedItems. */ + public attributedItems: google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.IAttributedItem[]; + + /** ErrorAnalysisAnnotation queryType. */ + public queryType: (google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.QueryType|keyof typeof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.QueryType); + + /** ErrorAnalysisAnnotation outlierScore. */ + public outlierScore: number; + + /** ErrorAnalysisAnnotation outlierThreshold. */ + public outlierThreshold: number; + + /** + * Creates a new ErrorAnalysisAnnotation instance using the specified properties. + * @param [properties] Properties to set + * @returns ErrorAnalysisAnnotation instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IErrorAnalysisAnnotation): google.cloud.aiplatform.v1.ErrorAnalysisAnnotation; + + /** + * Encodes the specified ErrorAnalysisAnnotation message. Does not implicitly {@link google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.verify|verify} messages. + * @param message ErrorAnalysisAnnotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IErrorAnalysisAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ErrorAnalysisAnnotation message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.verify|verify} messages. + * @param message ErrorAnalysisAnnotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IErrorAnalysisAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ErrorAnalysisAnnotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ErrorAnalysisAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1.ErrorAnalysisAnnotation; + + /** + * Decodes an ErrorAnalysisAnnotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ErrorAnalysisAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1.ErrorAnalysisAnnotation; + + /** + * Verifies an ErrorAnalysisAnnotation message. + * @param message Plain 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 ErrorAnalysisAnnotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ErrorAnalysisAnnotation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.ErrorAnalysisAnnotation; + + /** + * Creates a plain object from an ErrorAnalysisAnnotation message. Also converts values to other types if specified. + * @param message ErrorAnalysisAnnotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.ErrorAnalysisAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ErrorAnalysisAnnotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ErrorAnalysisAnnotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ErrorAnalysisAnnotation { + + /** Properties of an AttributedItem. */ + interface IAttributedItem { + + /** AttributedItem annotationResourceName */ + annotationResourceName?: (string|null); + + /** AttributedItem distance */ + distance?: (number|null); + } + + /** Represents an AttributedItem. */ + class AttributedItem implements IAttributedItem { + + /** + * Constructs a new AttributedItem. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.IAttributedItem); + + /** AttributedItem annotationResourceName. */ + public annotationResourceName: string; + + /** AttributedItem distance. */ + public distance: number; + + /** + * Creates a new AttributedItem instance using the specified properties. + * @param [properties] Properties to set + * @returns AttributedItem instance + */ + public static create(properties?: google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.IAttributedItem): google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem; + + /** + * Encodes the specified AttributedItem message. Does not implicitly {@link google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem.verify|verify} messages. + * @param message AttributedItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.IAttributedItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AttributedItem message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem.verify|verify} messages. + * @param message AttributedItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.IAttributedItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AttributedItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AttributedItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem; + + /** + * Decodes an AttributedItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AttributedItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem; + + /** + * Verifies an AttributedItem message. + * @param message Plain 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 AttributedItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AttributedItem + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem; + + /** + * Creates a plain object from an AttributedItem message. Also converts values to other types if specified. + * @param message AttributedItem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AttributedItem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AttributedItem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** QueryType enum. */ + enum QueryType { + QUERY_TYPE_UNSPECIFIED = 0, + ALL_SIMILAR = 1, + SAME_CLASS_SIMILAR = 2, + SAME_CLASS_DISSIMILAR = 3 + } + } + /** Properties of an Event. */ interface IEvent { @@ -16336,6 +16937,9 @@ export namespace google { /** Scaling maxNodeCount */ maxNodeCount?: (number|null); + + /** Scaling cpuUtilizationTarget */ + cpuUtilizationTarget?: (number|null); } /** Represents a Scaling. */ @@ -16353,6 +16957,9 @@ export namespace google { /** Scaling maxNodeCount. */ public maxNodeCount: number; + /** Scaling cpuUtilizationTarget. */ + public cpuUtilizationTarget: number; + /** * Creates a new Scaling instance using the specified properties. * @param [properties] Properties to set @@ -18585,6 +19192,20 @@ export namespace google { */ public exportFeatureValues(request: google.cloud.aiplatform.v1.IExportFeatureValuesRequest): Promise; + /** + * Calls DeleteFeatureValues. + * @param request DeleteFeatureValuesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteFeatureValues(request: google.cloud.aiplatform.v1.IDeleteFeatureValuesRequest, callback: google.cloud.aiplatform.v1.FeaturestoreService.DeleteFeatureValuesCallback): void; + + /** + * Calls DeleteFeatureValues. + * @param request DeleteFeatureValuesRequest message or plain object + * @returns Promise + */ + public deleteFeatureValues(request: google.cloud.aiplatform.v1.IDeleteFeatureValuesRequest): Promise; + /** * Calls SearchFeatures. * @param request SearchFeaturesRequest message or plain object @@ -18735,6 +19356,13 @@ export namespace google { */ type ExportFeatureValuesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** + * Callback as used by {@link google.cloud.aiplatform.v1.FeaturestoreService|deleteFeatureValues}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteFeatureValuesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** * Callback as used by {@link google.cloud.aiplatform.v1.FeaturestoreService|searchFeatures}. * @param error Error, if any @@ -23067,6 +23695,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a DeleteFeatureValuesOperationMetadata. */ + interface IDeleteFeatureValuesOperationMetadata { + + /** DeleteFeatureValuesOperationMetadata genericMetadata */ + genericMetadata?: (google.cloud.aiplatform.v1.IGenericOperationMetadata|null); + } + + /** Represents a DeleteFeatureValuesOperationMetadata. */ + class DeleteFeatureValuesOperationMetadata implements IDeleteFeatureValuesOperationMetadata { + + /** + * Constructs a new DeleteFeatureValuesOperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IDeleteFeatureValuesOperationMetadata); + + /** DeleteFeatureValuesOperationMetadata genericMetadata. */ + public genericMetadata?: (google.cloud.aiplatform.v1.IGenericOperationMetadata|null); + + /** + * Creates a new DeleteFeatureValuesOperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteFeatureValuesOperationMetadata instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IDeleteFeatureValuesOperationMetadata): google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata; + + /** + * Encodes the specified DeleteFeatureValuesOperationMetadata message. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata.verify|verify} messages. + * @param message DeleteFeatureValuesOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IDeleteFeatureValuesOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteFeatureValuesOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata.verify|verify} messages. + * @param message DeleteFeatureValuesOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IDeleteFeatureValuesOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteFeatureValuesOperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteFeatureValuesOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata; + + /** + * Decodes a DeleteFeatureValuesOperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteFeatureValuesOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata; + + /** + * Verifies a DeleteFeatureValuesOperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteFeatureValuesOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteFeatureValuesOperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata; + + /** + * Creates a plain object from a DeleteFeatureValuesOperationMetadata message. Also converts values to other types if specified. + * @param message DeleteFeatureValuesOperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteFeatureValuesOperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteFeatureValuesOperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a CreateEntityTypeOperationMetadata. */ interface ICreateEntityTypeOperationMetadata { @@ -23358,6 +24083,754 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a DeleteFeatureValuesRequest. */ + interface IDeleteFeatureValuesRequest { + + /** DeleteFeatureValuesRequest selectEntity */ + selectEntity?: (google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.ISelectEntity|null); + + /** DeleteFeatureValuesRequest selectTimeRangeAndFeature */ + selectTimeRangeAndFeature?: (google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.ISelectTimeRangeAndFeature|null); + + /** DeleteFeatureValuesRequest entityType */ + entityType?: (string|null); + } + + /** Represents a DeleteFeatureValuesRequest. */ + class DeleteFeatureValuesRequest implements IDeleteFeatureValuesRequest { + + /** + * Constructs a new DeleteFeatureValuesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IDeleteFeatureValuesRequest); + + /** DeleteFeatureValuesRequest selectEntity. */ + public selectEntity?: (google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.ISelectEntity|null); + + /** DeleteFeatureValuesRequest selectTimeRangeAndFeature. */ + public selectTimeRangeAndFeature?: (google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.ISelectTimeRangeAndFeature|null); + + /** DeleteFeatureValuesRequest entityType. */ + public entityType: string; + + /** DeleteFeatureValuesRequest DeleteOption. */ + public DeleteOption?: ("selectEntity"|"selectTimeRangeAndFeature"); + + /** + * Creates a new DeleteFeatureValuesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteFeatureValuesRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IDeleteFeatureValuesRequest): google.cloud.aiplatform.v1.DeleteFeatureValuesRequest; + + /** + * Encodes the specified DeleteFeatureValuesRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.verify|verify} messages. + * @param message DeleteFeatureValuesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IDeleteFeatureValuesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteFeatureValuesRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.verify|verify} messages. + * @param message DeleteFeatureValuesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IDeleteFeatureValuesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteFeatureValuesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteFeatureValuesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1.DeleteFeatureValuesRequest; + + /** + * Decodes a DeleteFeatureValuesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteFeatureValuesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1.DeleteFeatureValuesRequest; + + /** + * Verifies a DeleteFeatureValuesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteFeatureValuesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteFeatureValuesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.DeleteFeatureValuesRequest; + + /** + * Creates a plain object from a DeleteFeatureValuesRequest message. Also converts values to other types if specified. + * @param message DeleteFeatureValuesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.DeleteFeatureValuesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteFeatureValuesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteFeatureValuesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DeleteFeatureValuesRequest { + + /** Properties of a SelectEntity. */ + interface ISelectEntity { + + /** SelectEntity entityIdSelector */ + entityIdSelector?: (google.cloud.aiplatform.v1.IEntityIdSelector|null); + } + + /** Represents a SelectEntity. */ + class SelectEntity implements ISelectEntity { + + /** + * Constructs a new SelectEntity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.ISelectEntity); + + /** SelectEntity entityIdSelector. */ + public entityIdSelector?: (google.cloud.aiplatform.v1.IEntityIdSelector|null); + + /** + * Creates a new SelectEntity instance using the specified properties. + * @param [properties] Properties to set + * @returns SelectEntity instance + */ + public static create(properties?: google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.ISelectEntity): google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity; + + /** + * Encodes the specified SelectEntity message. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity.verify|verify} messages. + * @param message SelectEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.ISelectEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SelectEntity message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity.verify|verify} messages. + * @param message SelectEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.ISelectEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SelectEntity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SelectEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity; + + /** + * Decodes a SelectEntity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SelectEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity; + + /** + * Verifies a SelectEntity message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SelectEntity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SelectEntity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity; + + /** + * Creates a plain object from a SelectEntity message. Also converts values to other types if specified. + * @param message SelectEntity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SelectEntity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SelectEntity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SelectTimeRangeAndFeature. */ + interface ISelectTimeRangeAndFeature { + + /** SelectTimeRangeAndFeature timeRange */ + timeRange?: (google.type.IInterval|null); + + /** SelectTimeRangeAndFeature featureSelector */ + featureSelector?: (google.cloud.aiplatform.v1.IFeatureSelector|null); + + /** SelectTimeRangeAndFeature skipOnlineStorageDelete */ + skipOnlineStorageDelete?: (boolean|null); + } + + /** Represents a SelectTimeRangeAndFeature. */ + class SelectTimeRangeAndFeature implements ISelectTimeRangeAndFeature { + + /** + * Constructs a new SelectTimeRangeAndFeature. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.ISelectTimeRangeAndFeature); + + /** SelectTimeRangeAndFeature timeRange. */ + public timeRange?: (google.type.IInterval|null); + + /** SelectTimeRangeAndFeature featureSelector. */ + public featureSelector?: (google.cloud.aiplatform.v1.IFeatureSelector|null); + + /** SelectTimeRangeAndFeature skipOnlineStorageDelete. */ + public skipOnlineStorageDelete: boolean; + + /** + * Creates a new SelectTimeRangeAndFeature instance using the specified properties. + * @param [properties] Properties to set + * @returns SelectTimeRangeAndFeature instance + */ + public static create(properties?: google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.ISelectTimeRangeAndFeature): google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature; + + /** + * Encodes the specified SelectTimeRangeAndFeature message. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature.verify|verify} messages. + * @param message SelectTimeRangeAndFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.ISelectTimeRangeAndFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SelectTimeRangeAndFeature message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature.verify|verify} messages. + * @param message SelectTimeRangeAndFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.ISelectTimeRangeAndFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SelectTimeRangeAndFeature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SelectTimeRangeAndFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature; + + /** + * Decodes a SelectTimeRangeAndFeature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SelectTimeRangeAndFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature; + + /** + * Verifies a SelectTimeRangeAndFeature message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SelectTimeRangeAndFeature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SelectTimeRangeAndFeature + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature; + + /** + * Creates a plain object from a SelectTimeRangeAndFeature message. Also converts values to other types if specified. + * @param message SelectTimeRangeAndFeature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SelectTimeRangeAndFeature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SelectTimeRangeAndFeature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a DeleteFeatureValuesResponse. */ + interface IDeleteFeatureValuesResponse { + + /** DeleteFeatureValuesResponse selectEntity */ + selectEntity?: (google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.ISelectEntity|null); + + /** DeleteFeatureValuesResponse selectTimeRangeAndFeature */ + selectTimeRangeAndFeature?: (google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.ISelectTimeRangeAndFeature|null); + } + + /** Represents a DeleteFeatureValuesResponse. */ + class DeleteFeatureValuesResponse implements IDeleteFeatureValuesResponse { + + /** + * Constructs a new DeleteFeatureValuesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IDeleteFeatureValuesResponse); + + /** DeleteFeatureValuesResponse selectEntity. */ + public selectEntity?: (google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.ISelectEntity|null); + + /** DeleteFeatureValuesResponse selectTimeRangeAndFeature. */ + public selectTimeRangeAndFeature?: (google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.ISelectTimeRangeAndFeature|null); + + /** DeleteFeatureValuesResponse response. */ + public response?: ("selectEntity"|"selectTimeRangeAndFeature"); + + /** + * Creates a new DeleteFeatureValuesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteFeatureValuesResponse instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IDeleteFeatureValuesResponse): google.cloud.aiplatform.v1.DeleteFeatureValuesResponse; + + /** + * Encodes the specified DeleteFeatureValuesResponse message. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.verify|verify} messages. + * @param message DeleteFeatureValuesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IDeleteFeatureValuesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteFeatureValuesResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.verify|verify} messages. + * @param message DeleteFeatureValuesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IDeleteFeatureValuesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteFeatureValuesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteFeatureValuesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1.DeleteFeatureValuesResponse; + + /** + * Decodes a DeleteFeatureValuesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteFeatureValuesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1.DeleteFeatureValuesResponse; + + /** + * Verifies a DeleteFeatureValuesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteFeatureValuesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteFeatureValuesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.DeleteFeatureValuesResponse; + + /** + * Creates a plain object from a DeleteFeatureValuesResponse message. Also converts values to other types if specified. + * @param message DeleteFeatureValuesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.DeleteFeatureValuesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteFeatureValuesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteFeatureValuesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DeleteFeatureValuesResponse { + + /** Properties of a SelectEntity. */ + interface ISelectEntity { + + /** SelectEntity offlineStorageDeletedEntityRowCount */ + offlineStorageDeletedEntityRowCount?: (number|Long|string|null); + + /** SelectEntity onlineStorageDeletedEntityCount */ + onlineStorageDeletedEntityCount?: (number|Long|string|null); + } + + /** Represents a SelectEntity. */ + class SelectEntity implements ISelectEntity { + + /** + * Constructs a new SelectEntity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.ISelectEntity); + + /** SelectEntity offlineStorageDeletedEntityRowCount. */ + public offlineStorageDeletedEntityRowCount: (number|Long|string); + + /** SelectEntity onlineStorageDeletedEntityCount. */ + public onlineStorageDeletedEntityCount: (number|Long|string); + + /** + * Creates a new SelectEntity instance using the specified properties. + * @param [properties] Properties to set + * @returns SelectEntity instance + */ + public static create(properties?: google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.ISelectEntity): google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity; + + /** + * Encodes the specified SelectEntity message. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity.verify|verify} messages. + * @param message SelectEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.ISelectEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SelectEntity message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity.verify|verify} messages. + * @param message SelectEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.ISelectEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SelectEntity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SelectEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity; + + /** + * Decodes a SelectEntity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SelectEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity; + + /** + * Verifies a SelectEntity message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SelectEntity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SelectEntity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity; + + /** + * Creates a plain object from a SelectEntity message. Also converts values to other types if specified. + * @param message SelectEntity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SelectEntity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SelectEntity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SelectTimeRangeAndFeature. */ + interface ISelectTimeRangeAndFeature { + + /** SelectTimeRangeAndFeature impactedFeatureCount */ + impactedFeatureCount?: (number|Long|string|null); + + /** SelectTimeRangeAndFeature offlineStorageModifiedEntityRowCount */ + offlineStorageModifiedEntityRowCount?: (number|Long|string|null); + + /** SelectTimeRangeAndFeature onlineStorageModifiedEntityCount */ + onlineStorageModifiedEntityCount?: (number|Long|string|null); + } + + /** Represents a SelectTimeRangeAndFeature. */ + class SelectTimeRangeAndFeature implements ISelectTimeRangeAndFeature { + + /** + * Constructs a new SelectTimeRangeAndFeature. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.ISelectTimeRangeAndFeature); + + /** SelectTimeRangeAndFeature impactedFeatureCount. */ + public impactedFeatureCount: (number|Long|string); + + /** SelectTimeRangeAndFeature offlineStorageModifiedEntityRowCount. */ + public offlineStorageModifiedEntityRowCount: (number|Long|string); + + /** SelectTimeRangeAndFeature onlineStorageModifiedEntityCount. */ + public onlineStorageModifiedEntityCount: (number|Long|string); + + /** + * Creates a new SelectTimeRangeAndFeature instance using the specified properties. + * @param [properties] Properties to set + * @returns SelectTimeRangeAndFeature instance + */ + public static create(properties?: google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.ISelectTimeRangeAndFeature): google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature; + + /** + * Encodes the specified SelectTimeRangeAndFeature message. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature.verify|verify} messages. + * @param message SelectTimeRangeAndFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.ISelectTimeRangeAndFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SelectTimeRangeAndFeature message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature.verify|verify} messages. + * @param message SelectTimeRangeAndFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.ISelectTimeRangeAndFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SelectTimeRangeAndFeature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SelectTimeRangeAndFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature; + + /** + * Decodes a SelectTimeRangeAndFeature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SelectTimeRangeAndFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature; + + /** + * Verifies a SelectTimeRangeAndFeature message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SelectTimeRangeAndFeature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SelectTimeRangeAndFeature + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature; + + /** + * Creates a plain object from a SelectTimeRangeAndFeature message. Also converts values to other types if specified. + * @param message SelectTimeRangeAndFeature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SelectTimeRangeAndFeature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SelectTimeRangeAndFeature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EntityIdSelector. */ + interface IEntityIdSelector { + + /** EntityIdSelector csvSource */ + csvSource?: (google.cloud.aiplatform.v1.ICsvSource|null); + + /** EntityIdSelector entityIdField */ + entityIdField?: (string|null); + } + + /** Represents an EntityIdSelector. */ + class EntityIdSelector implements IEntityIdSelector { + + /** + * Constructs a new EntityIdSelector. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IEntityIdSelector); + + /** EntityIdSelector csvSource. */ + public csvSource?: (google.cloud.aiplatform.v1.ICsvSource|null); + + /** EntityIdSelector entityIdField. */ + public entityIdField: string; + + /** EntityIdSelector EntityIdsSource. */ + public EntityIdsSource?: "csvSource"; + + /** + * Creates a new EntityIdSelector instance using the specified properties. + * @param [properties] Properties to set + * @returns EntityIdSelector instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IEntityIdSelector): google.cloud.aiplatform.v1.EntityIdSelector; + + /** + * Encodes the specified EntityIdSelector message. Does not implicitly {@link google.cloud.aiplatform.v1.EntityIdSelector.verify|verify} messages. + * @param message EntityIdSelector message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IEntityIdSelector, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EntityIdSelector message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.EntityIdSelector.verify|verify} messages. + * @param message EntityIdSelector message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IEntityIdSelector, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EntityIdSelector message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EntityIdSelector + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1.EntityIdSelector; + + /** + * Decodes an EntityIdSelector message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EntityIdSelector + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1.EntityIdSelector; + + /** + * Verifies an EntityIdSelector message. + * @param message Plain 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 EntityIdSelector message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EntityIdSelector + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.EntityIdSelector; + + /** + * Creates a plain object from an EntityIdSelector message. Also converts values to other types if specified. + * @param message EntityIdSelector + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.EntityIdSelector, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EntityIdSelector to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EntityIdSelector + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a HyperparameterTuningJob. */ interface IHyperparameterTuningJob { @@ -48172,6 +49645,9 @@ export namespace google { /** ModelEvaluationSlice createTime */ createTime?: (google.protobuf.ITimestamp|null); + + /** ModelEvaluationSlice modelExplanation */ + modelExplanation?: (google.cloud.aiplatform.v1.IModelExplanation|null); } /** Represents a ModelEvaluationSlice. */ @@ -48198,6 +49674,9 @@ export namespace google { /** ModelEvaluationSlice createTime. */ public createTime?: (google.protobuf.ITimestamp|null); + /** ModelEvaluationSlice modelExplanation. */ + public modelExplanation?: (google.cloud.aiplatform.v1.IModelExplanation|null); + /** * Creates a new ModelEvaluationSlice instance using the specified properties. * @param [properties] Properties to set @@ -48286,6 +49765,9 @@ export namespace google { /** Slice value */ value?: (string|null); + + /** Slice sliceSpec */ + sliceSpec?: (google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.ISliceSpec|null); } /** Represents a Slice. */ @@ -48303,6 +49785,9 @@ export namespace google { /** Slice value. */ public value: string; + /** Slice sliceSpec. */ + public sliceSpec?: (google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.ISliceSpec|null); + /** * Creates a new Slice instance using the specified properties. * @param [properties] Properties to set @@ -48380,6 +49865,430 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + namespace Slice { + + /** Properties of a SliceSpec. */ + interface ISliceSpec { + + /** SliceSpec configs */ + configs?: ({ [k: string]: google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.ISliceConfig }|null); + } + + /** Represents a SliceSpec. */ + class SliceSpec implements ISliceSpec { + + /** + * Constructs a new SliceSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.ISliceSpec); + + /** SliceSpec configs. */ + public configs: { [k: string]: google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.ISliceConfig }; + + /** + * Creates a new SliceSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns SliceSpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.ISliceSpec): google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec; + + /** + * Encodes the specified SliceSpec message. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.verify|verify} messages. + * @param message SliceSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.ISliceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SliceSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.verify|verify} messages. + * @param message SliceSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.ISliceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SliceSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SliceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec; + + /** + * Decodes a SliceSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SliceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec; + + /** + * Verifies a SliceSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SliceSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SliceSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec; + + /** + * Creates a plain object from a SliceSpec message. Also converts values to other types if specified. + * @param message SliceSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SliceSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SliceSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SliceSpec { + + /** Properties of a SliceConfig. */ + interface ISliceConfig { + + /** SliceConfig value */ + value?: (google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IValue|null); + + /** SliceConfig range */ + range?: (google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IRange|null); + + /** SliceConfig allValues */ + allValues?: (google.protobuf.IBoolValue|null); + } + + /** Represents a SliceConfig. */ + class SliceConfig implements ISliceConfig { + + /** + * Constructs a new SliceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.ISliceConfig); + + /** SliceConfig value. */ + public value?: (google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IValue|null); + + /** SliceConfig range. */ + public range?: (google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IRange|null); + + /** SliceConfig allValues. */ + public allValues?: (google.protobuf.IBoolValue|null); + + /** SliceConfig kind. */ + public kind?: ("value"|"range"|"allValues"); + + /** + * Creates a new SliceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SliceConfig instance + */ + public static create(properties?: google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.ISliceConfig): google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig; + + /** + * Encodes the specified SliceConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.verify|verify} messages. + * @param message SliceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.ISliceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SliceConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.verify|verify} messages. + * @param message SliceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.ISliceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SliceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SliceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig; + + /** + * Decodes a SliceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SliceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig; + + /** + * Verifies a SliceConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SliceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SliceConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig; + + /** + * Creates a plain object from a SliceConfig message. Also converts values to other types if specified. + * @param message SliceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SliceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SliceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Range. */ + interface IRange { + + /** Range low */ + low?: (number|null); + + /** Range high */ + high?: (number|null); + } + + /** Represents a Range. */ + class Range implements IRange { + + /** + * Constructs a new Range. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IRange); + + /** Range low. */ + public low: number; + + /** Range high. */ + public high: number; + + /** + * Creates a new Range instance using the specified properties. + * @param [properties] Properties to set + * @returns Range instance + */ + public static create(properties?: google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IRange): google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range; + + /** + * Encodes the specified Range message. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range.verify|verify} messages. + * @param message Range message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Range message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range.verify|verify} messages. + * @param message Range message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Range message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range; + + /** + * Decodes a Range message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range; + + /** + * Verifies a Range message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Range message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Range + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range; + + /** + * Creates a plain object from a Range message. Also converts values to other types if specified. + * @param message Range + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Range to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Range + * @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 stringValue */ + stringValue?: (string|null); + + /** Value floatValue */ + floatValue?: (number|null); + } + + /** Represents a Value. */ + class Value implements IValue { + + /** + * Constructs a new Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IValue); + + /** Value stringValue. */ + public stringValue?: (string|null); + + /** Value floatValue. */ + public floatValue?: (number|null); + + /** Value kind. */ + public kind?: ("stringValue"|"floatValue"); + + /** + * Creates a new Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Value instance + */ + public static create(properties?: google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IValue): google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.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.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.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.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.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.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.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.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.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.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.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.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.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; + } + } + } } /** Represents a ModelService */ @@ -48570,6 +50479,20 @@ export namespace google { */ public batchImportModelEvaluationSlices(request: google.cloud.aiplatform.v1.IBatchImportModelEvaluationSlicesRequest): Promise; + /** + * Calls BatchImportEvaluatedAnnotations. + * @param request BatchImportEvaluatedAnnotationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchImportEvaluatedAnnotationsResponse + */ + public batchImportEvaluatedAnnotations(request: google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsRequest, callback: google.cloud.aiplatform.v1.ModelService.BatchImportEvaluatedAnnotationsCallback): void; + + /** + * Calls BatchImportEvaluatedAnnotations. + * @param request BatchImportEvaluatedAnnotationsRequest message or plain object + * @returns Promise + */ + public batchImportEvaluatedAnnotations(request: google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsRequest): Promise; + /** * Calls GetModelEvaluation. * @param request GetModelEvaluationRequest message or plain object @@ -48713,6 +50636,13 @@ export namespace google { */ type BatchImportModelEvaluationSlicesCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse) => void; + /** + * Callback as used by {@link google.cloud.aiplatform.v1.ModelService|batchImportEvaluatedAnnotations}. + * @param error Error, if any + * @param [response] BatchImportEvaluatedAnnotationsResponse + */ + type BatchImportEvaluatedAnnotationsCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse) => void; + /** * Callback as used by {@link google.cloud.aiplatform.v1.ModelService|getModelEvaluation}. * @param error Error, if any @@ -51162,6 +53092,206 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a BatchImportEvaluatedAnnotationsRequest. */ + interface IBatchImportEvaluatedAnnotationsRequest { + + /** BatchImportEvaluatedAnnotationsRequest parent */ + parent?: (string|null); + + /** BatchImportEvaluatedAnnotationsRequest evaluatedAnnotations */ + evaluatedAnnotations?: (google.cloud.aiplatform.v1.IEvaluatedAnnotation[]|null); + } + + /** Represents a BatchImportEvaluatedAnnotationsRequest. */ + class BatchImportEvaluatedAnnotationsRequest implements IBatchImportEvaluatedAnnotationsRequest { + + /** + * Constructs a new BatchImportEvaluatedAnnotationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsRequest); + + /** BatchImportEvaluatedAnnotationsRequest parent. */ + public parent: string; + + /** BatchImportEvaluatedAnnotationsRequest evaluatedAnnotations. */ + public evaluatedAnnotations: google.cloud.aiplatform.v1.IEvaluatedAnnotation[]; + + /** + * Creates a new BatchImportEvaluatedAnnotationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchImportEvaluatedAnnotationsRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsRequest): google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest; + + /** + * Encodes the specified BatchImportEvaluatedAnnotationsRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest.verify|verify} messages. + * @param message BatchImportEvaluatedAnnotationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchImportEvaluatedAnnotationsRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest.verify|verify} messages. + * @param message BatchImportEvaluatedAnnotationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchImportEvaluatedAnnotationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchImportEvaluatedAnnotationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest; + + /** + * Decodes a BatchImportEvaluatedAnnotationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchImportEvaluatedAnnotationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest; + + /** + * Verifies a BatchImportEvaluatedAnnotationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BatchImportEvaluatedAnnotationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchImportEvaluatedAnnotationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest; + + /** + * Creates a plain object from a BatchImportEvaluatedAnnotationsRequest message. Also converts values to other types if specified. + * @param message BatchImportEvaluatedAnnotationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchImportEvaluatedAnnotationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchImportEvaluatedAnnotationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchImportEvaluatedAnnotationsResponse. */ + interface IBatchImportEvaluatedAnnotationsResponse { + + /** BatchImportEvaluatedAnnotationsResponse importedEvaluatedAnnotationsCount */ + importedEvaluatedAnnotationsCount?: (number|null); + } + + /** Represents a BatchImportEvaluatedAnnotationsResponse. */ + class BatchImportEvaluatedAnnotationsResponse implements IBatchImportEvaluatedAnnotationsResponse { + + /** + * Constructs a new BatchImportEvaluatedAnnotationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsResponse); + + /** BatchImportEvaluatedAnnotationsResponse importedEvaluatedAnnotationsCount. */ + public importedEvaluatedAnnotationsCount: number; + + /** + * Creates a new BatchImportEvaluatedAnnotationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchImportEvaluatedAnnotationsResponse instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsResponse): google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse; + + /** + * Encodes the specified BatchImportEvaluatedAnnotationsResponse message. Does not implicitly {@link google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse.verify|verify} messages. + * @param message BatchImportEvaluatedAnnotationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchImportEvaluatedAnnotationsResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse.verify|verify} messages. + * @param message BatchImportEvaluatedAnnotationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchImportEvaluatedAnnotationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchImportEvaluatedAnnotationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse; + + /** + * Decodes a BatchImportEvaluatedAnnotationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchImportEvaluatedAnnotationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse; + + /** + * Verifies a BatchImportEvaluatedAnnotationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BatchImportEvaluatedAnnotationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchImportEvaluatedAnnotationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse; + + /** + * Creates a plain object from a BatchImportEvaluatedAnnotationsResponse message. Also converts values to other types if specified. + * @param message BatchImportEvaluatedAnnotationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchImportEvaluatedAnnotationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchImportEvaluatedAnnotationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a GetModelEvaluationRequest. */ interface IGetModelEvaluationRequest { @@ -73239,7 +75369,8 @@ export namespace google { NVIDIA_TESLA_A100 = 8, NVIDIA_A100_80GB = 9, TPU_V2 = 6, - TPU_V3 = 7 + TPU_V3 = 7, + TPU_V4_POD = 10 } /** Properties of an Annotation. */ @@ -73876,6 +76007,9 @@ export namespace google { /** BatchPredictionJob modelMonitoringStatus */ modelMonitoringStatus?: (google.rpc.IStatus|null); + + /** BatchPredictionJob disableContainerLogging */ + disableContainerLogging?: (boolean|null); } /** Represents a BatchPredictionJob. */ @@ -73974,6 +76108,9 @@ export namespace google { /** BatchPredictionJob modelMonitoringStatus. */ public modelMonitoringStatus?: (google.rpc.IStatus|null); + /** BatchPredictionJob disableContainerLogging. */ + public disableContainerLogging: boolean; + /** * Creates a new BatchPredictionJob instance using the specified properties. * @param [properties] Properties to set @@ -81978,6 +84115,9 @@ export namespace google { /** Model metadataArtifact */ metadataArtifact?: (string|null); + + /** Model largeModelReference */ + largeModelReference?: (google.cloud.aiplatform.v1beta1.Model.ILargeModelReference|null); } /** Represents a Model. */ @@ -82073,6 +84213,9 @@ export namespace google { /** Model metadataArtifact. */ public metadataArtifact: string; + /** Model largeModelReference. */ + public largeModelReference?: (google.cloud.aiplatform.v1beta1.Model.ILargeModelReference|null); + /** * Creates a new Model instance using the specified properties. * @param [properties] Properties to set @@ -82363,6 +84506,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a LargeModelReference. */ + interface ILargeModelReference { + + /** LargeModelReference name */ + name?: (string|null); + } + + /** Represents a LargeModelReference. */ + class LargeModelReference implements ILargeModelReference { + + /** + * Constructs a new LargeModelReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.Model.ILargeModelReference); + + /** LargeModelReference name. */ + public name: string; + + /** + * Creates a new LargeModelReference instance using the specified properties. + * @param [properties] Properties to set + * @returns LargeModelReference instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.Model.ILargeModelReference): google.cloud.aiplatform.v1beta1.Model.LargeModelReference; + + /** + * Encodes the specified LargeModelReference message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.Model.LargeModelReference.verify|verify} messages. + * @param message LargeModelReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.Model.ILargeModelReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LargeModelReference message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.Model.LargeModelReference.verify|verify} messages. + * @param message LargeModelReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.Model.ILargeModelReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LargeModelReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LargeModelReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.Model.LargeModelReference; + + /** + * Decodes a LargeModelReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LargeModelReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.Model.LargeModelReference; + + /** + * Verifies a LargeModelReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LargeModelReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LargeModelReference + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.Model.LargeModelReference; + + /** + * Creates a plain object from a LargeModelReference message. Also converts values to other types if specified. + * @param message LargeModelReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.Model.LargeModelReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LargeModelReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LargeModelReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** DeploymentResourcesType enum. */ enum DeploymentResourcesType { DEPLOYMENT_RESOURCES_TYPE_UNSPECIFIED = 0, @@ -84911,6 +87151,9 @@ export namespace google { /** ExportDataConfig gcsDestination */ gcsDestination?: (google.cloud.aiplatform.v1beta1.IGcsDestination|null); + /** ExportDataConfig fractionSplit */ + fractionSplit?: (google.cloud.aiplatform.v1beta1.IExportFractionSplit|null); + /** ExportDataConfig annotationsFilter */ annotationsFilter?: (string|null); } @@ -84927,12 +87170,18 @@ export namespace google { /** ExportDataConfig gcsDestination. */ public gcsDestination?: (google.cloud.aiplatform.v1beta1.IGcsDestination|null); + /** ExportDataConfig fractionSplit. */ + public fractionSplit?: (google.cloud.aiplatform.v1beta1.IExportFractionSplit|null); + /** ExportDataConfig annotationsFilter. */ public annotationsFilter: string; /** ExportDataConfig destination. */ public destination?: "gcsDestination"; + /** ExportDataConfig split. */ + public split?: "fractionSplit"; + /** * Creates a new ExportDataConfig instance using the specified properties. * @param [properties] Properties to set @@ -85011,6 +87260,115 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an ExportFractionSplit. */ + interface IExportFractionSplit { + + /** ExportFractionSplit trainingFraction */ + trainingFraction?: (number|null); + + /** ExportFractionSplit validationFraction */ + validationFraction?: (number|null); + + /** ExportFractionSplit testFraction */ + testFraction?: (number|null); + } + + /** Represents an ExportFractionSplit. */ + class ExportFractionSplit implements IExportFractionSplit { + + /** + * Constructs a new ExportFractionSplit. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IExportFractionSplit); + + /** ExportFractionSplit trainingFraction. */ + public trainingFraction: number; + + /** ExportFractionSplit validationFraction. */ + public validationFraction: number; + + /** ExportFractionSplit testFraction. */ + public testFraction: number; + + /** + * Creates a new ExportFractionSplit instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportFractionSplit instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IExportFractionSplit): google.cloud.aiplatform.v1beta1.ExportFractionSplit; + + /** + * Encodes the specified ExportFractionSplit message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ExportFractionSplit.verify|verify} messages. + * @param message ExportFractionSplit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IExportFractionSplit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExportFractionSplit message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ExportFractionSplit.verify|verify} messages. + * @param message ExportFractionSplit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IExportFractionSplit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExportFractionSplit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportFractionSplit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.ExportFractionSplit; + + /** + * Decodes an ExportFractionSplit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportFractionSplit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.ExportFractionSplit; + + /** + * Verifies an ExportFractionSplit message. + * @param message Plain 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 ExportFractionSplit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportFractionSplit + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ExportFractionSplit; + + /** + * Creates a plain object from an ExportFractionSplit message. Also converts values to other types if specified. + * @param message ExportFractionSplit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ExportFractionSplit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportFractionSplit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExportFractionSplit + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a SavedQuery. */ interface ISavedQuery { @@ -92203,6 +94561,482 @@ export namespace google { } } + /** Properties of an EvaluatedAnnotation. */ + interface IEvaluatedAnnotation { + + /** EvaluatedAnnotation type */ + type?: (google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.EvaluatedAnnotationType|keyof typeof google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.EvaluatedAnnotationType|null); + + /** EvaluatedAnnotation predictions */ + predictions?: (google.protobuf.IValue[]|null); + + /** EvaluatedAnnotation groundTruths */ + groundTruths?: (google.protobuf.IValue[]|null); + + /** EvaluatedAnnotation dataItemPayload */ + dataItemPayload?: (google.protobuf.IValue|null); + + /** EvaluatedAnnotation evaluatedDataItemViewId */ + evaluatedDataItemViewId?: (string|null); + + /** EvaluatedAnnotation explanations */ + explanations?: (google.cloud.aiplatform.v1beta1.IEvaluatedAnnotationExplanation[]|null); + + /** EvaluatedAnnotation errorAnalysisAnnotations */ + errorAnalysisAnnotations?: (google.cloud.aiplatform.v1beta1.IErrorAnalysisAnnotation[]|null); + } + + /** Represents an EvaluatedAnnotation. */ + class EvaluatedAnnotation implements IEvaluatedAnnotation { + + /** + * Constructs a new EvaluatedAnnotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IEvaluatedAnnotation); + + /** EvaluatedAnnotation type. */ + public type: (google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.EvaluatedAnnotationType|keyof typeof google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.EvaluatedAnnotationType); + + /** EvaluatedAnnotation predictions. */ + public predictions: google.protobuf.IValue[]; + + /** EvaluatedAnnotation groundTruths. */ + public groundTruths: google.protobuf.IValue[]; + + /** EvaluatedAnnotation dataItemPayload. */ + public dataItemPayload?: (google.protobuf.IValue|null); + + /** EvaluatedAnnotation evaluatedDataItemViewId. */ + public evaluatedDataItemViewId: string; + + /** EvaluatedAnnotation explanations. */ + public explanations: google.cloud.aiplatform.v1beta1.IEvaluatedAnnotationExplanation[]; + + /** EvaluatedAnnotation errorAnalysisAnnotations. */ + public errorAnalysisAnnotations: google.cloud.aiplatform.v1beta1.IErrorAnalysisAnnotation[]; + + /** + * Creates a new EvaluatedAnnotation instance using the specified properties. + * @param [properties] Properties to set + * @returns EvaluatedAnnotation instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IEvaluatedAnnotation): google.cloud.aiplatform.v1beta1.EvaluatedAnnotation; + + /** + * Encodes the specified EvaluatedAnnotation message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.verify|verify} messages. + * @param message EvaluatedAnnotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IEvaluatedAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EvaluatedAnnotation message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.verify|verify} messages. + * @param message EvaluatedAnnotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IEvaluatedAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EvaluatedAnnotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EvaluatedAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.EvaluatedAnnotation; + + /** + * Decodes an EvaluatedAnnotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EvaluatedAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.EvaluatedAnnotation; + + /** + * Verifies an EvaluatedAnnotation message. + * @param message Plain 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 EvaluatedAnnotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EvaluatedAnnotation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.EvaluatedAnnotation; + + /** + * Creates a plain object from an EvaluatedAnnotation message. Also converts values to other types if specified. + * @param message EvaluatedAnnotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.EvaluatedAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EvaluatedAnnotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EvaluatedAnnotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EvaluatedAnnotation { + + /** EvaluatedAnnotationType enum. */ + enum EvaluatedAnnotationType { + EVALUATED_ANNOTATION_TYPE_UNSPECIFIED = 0, + TRUE_POSITIVE = 1, + FALSE_POSITIVE = 2, + FALSE_NEGATIVE = 3 + } + } + + /** Properties of an EvaluatedAnnotationExplanation. */ + interface IEvaluatedAnnotationExplanation { + + /** EvaluatedAnnotationExplanation explanationType */ + explanationType?: (string|null); + + /** EvaluatedAnnotationExplanation explanation */ + explanation?: (google.cloud.aiplatform.v1beta1.IExplanation|null); + } + + /** Represents an EvaluatedAnnotationExplanation. */ + class EvaluatedAnnotationExplanation implements IEvaluatedAnnotationExplanation { + + /** + * Constructs a new EvaluatedAnnotationExplanation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IEvaluatedAnnotationExplanation); + + /** EvaluatedAnnotationExplanation explanationType. */ + public explanationType: string; + + /** EvaluatedAnnotationExplanation explanation. */ + public explanation?: (google.cloud.aiplatform.v1beta1.IExplanation|null); + + /** + * Creates a new EvaluatedAnnotationExplanation instance using the specified properties. + * @param [properties] Properties to set + * @returns EvaluatedAnnotationExplanation instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IEvaluatedAnnotationExplanation): google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation; + + /** + * Encodes the specified EvaluatedAnnotationExplanation message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation.verify|verify} messages. + * @param message EvaluatedAnnotationExplanation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IEvaluatedAnnotationExplanation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EvaluatedAnnotationExplanation message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation.verify|verify} messages. + * @param message EvaluatedAnnotationExplanation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IEvaluatedAnnotationExplanation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EvaluatedAnnotationExplanation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EvaluatedAnnotationExplanation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation; + + /** + * Decodes an EvaluatedAnnotationExplanation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EvaluatedAnnotationExplanation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation; + + /** + * Verifies an EvaluatedAnnotationExplanation message. + * @param message Plain 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 EvaluatedAnnotationExplanation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EvaluatedAnnotationExplanation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation; + + /** + * Creates a plain object from an EvaluatedAnnotationExplanation message. Also converts values to other types if specified. + * @param message EvaluatedAnnotationExplanation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EvaluatedAnnotationExplanation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EvaluatedAnnotationExplanation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ErrorAnalysisAnnotation. */ + interface IErrorAnalysisAnnotation { + + /** ErrorAnalysisAnnotation attributedItems */ + attributedItems?: (google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.IAttributedItem[]|null); + + /** ErrorAnalysisAnnotation queryType */ + queryType?: (google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.QueryType|keyof typeof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.QueryType|null); + + /** ErrorAnalysisAnnotation outlierScore */ + outlierScore?: (number|null); + + /** ErrorAnalysisAnnotation outlierThreshold */ + outlierThreshold?: (number|null); + } + + /** Represents an ErrorAnalysisAnnotation. */ + class ErrorAnalysisAnnotation implements IErrorAnalysisAnnotation { + + /** + * Constructs a new ErrorAnalysisAnnotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IErrorAnalysisAnnotation); + + /** ErrorAnalysisAnnotation attributedItems. */ + public attributedItems: google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.IAttributedItem[]; + + /** ErrorAnalysisAnnotation queryType. */ + public queryType: (google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.QueryType|keyof typeof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.QueryType); + + /** ErrorAnalysisAnnotation outlierScore. */ + public outlierScore: number; + + /** ErrorAnalysisAnnotation outlierThreshold. */ + public outlierThreshold: number; + + /** + * Creates a new ErrorAnalysisAnnotation instance using the specified properties. + * @param [properties] Properties to set + * @returns ErrorAnalysisAnnotation instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IErrorAnalysisAnnotation): google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation; + + /** + * Encodes the specified ErrorAnalysisAnnotation message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.verify|verify} messages. + * @param message ErrorAnalysisAnnotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IErrorAnalysisAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ErrorAnalysisAnnotation message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.verify|verify} messages. + * @param message ErrorAnalysisAnnotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IErrorAnalysisAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ErrorAnalysisAnnotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ErrorAnalysisAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation; + + /** + * Decodes an ErrorAnalysisAnnotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ErrorAnalysisAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation; + + /** + * Verifies an ErrorAnalysisAnnotation message. + * @param message Plain 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 ErrorAnalysisAnnotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ErrorAnalysisAnnotation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation; + + /** + * Creates a plain object from an ErrorAnalysisAnnotation message. Also converts values to other types if specified. + * @param message ErrorAnalysisAnnotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ErrorAnalysisAnnotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ErrorAnalysisAnnotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ErrorAnalysisAnnotation { + + /** Properties of an AttributedItem. */ + interface IAttributedItem { + + /** AttributedItem annotationResourceName */ + annotationResourceName?: (string|null); + + /** AttributedItem distance */ + distance?: (number|null); + } + + /** Represents an AttributedItem. */ + class AttributedItem implements IAttributedItem { + + /** + * Constructs a new AttributedItem. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.IAttributedItem); + + /** AttributedItem annotationResourceName. */ + public annotationResourceName: string; + + /** AttributedItem distance. */ + public distance: number; + + /** + * Creates a new AttributedItem instance using the specified properties. + * @param [properties] Properties to set + * @returns AttributedItem instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.IAttributedItem): google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem; + + /** + * Encodes the specified AttributedItem message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem.verify|verify} messages. + * @param message AttributedItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.IAttributedItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AttributedItem message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem.verify|verify} messages. + * @param message AttributedItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.IAttributedItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AttributedItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AttributedItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem; + + /** + * Decodes an AttributedItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AttributedItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem; + + /** + * Verifies an AttributedItem message. + * @param message Plain 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 AttributedItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AttributedItem + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem; + + /** + * Creates a plain object from an AttributedItem message. Also converts values to other types if specified. + * @param message AttributedItem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AttributedItem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AttributedItem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** QueryType enum. */ + enum QueryType { + QUERY_TYPE_UNSPECIFIED = 0, + ALL_SIMILAR = 1, + SAME_CLASS_SIMILAR = 2, + SAME_CLASS_DISSIMILAR = 3 + } + } + /** Properties of an Event. */ interface IEvent { @@ -93246,6 +96080,9 @@ export namespace google { /** Scaling maxNodeCount */ maxNodeCount?: (number|null); + + /** Scaling cpuUtilizationTarget */ + cpuUtilizationTarget?: (number|null); } /** Represents a Scaling. */ @@ -93263,6 +96100,9 @@ export namespace google { /** Scaling maxNodeCount. */ public maxNodeCount: number; + /** Scaling cpuUtilizationTarget. */ + public cpuUtilizationTarget: number; + /** * Creates a new Scaling instance using the specified properties. * @param [properties] Properties to set @@ -100709,6 +103549,12 @@ export namespace google { /** Properties of a DeleteFeatureValuesResponse. */ interface IDeleteFeatureValuesResponse { + + /** DeleteFeatureValuesResponse selectEntity */ + selectEntity?: (google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.ISelectEntity|null); + + /** DeleteFeatureValuesResponse selectTimeRangeAndFeature */ + selectTimeRangeAndFeature?: (google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.ISelectTimeRangeAndFeature|null); } /** Represents a DeleteFeatureValuesResponse. */ @@ -100720,6 +103566,15 @@ export namespace google { */ constructor(properties?: google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesResponse); + /** DeleteFeatureValuesResponse selectEntity. */ + public selectEntity?: (google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.ISelectEntity|null); + + /** DeleteFeatureValuesResponse selectTimeRangeAndFeature. */ + public selectTimeRangeAndFeature?: (google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.ISelectTimeRangeAndFeature|null); + + /** DeleteFeatureValuesResponse response. */ + public response?: ("selectEntity"|"selectTimeRangeAndFeature"); + /** * Creates a new DeleteFeatureValuesResponse instance using the specified properties. * @param [properties] Properties to set @@ -100798,6 +103653,221 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace DeleteFeatureValuesResponse { + + /** Properties of a SelectEntity. */ + interface ISelectEntity { + + /** SelectEntity offlineStorageDeletedEntityRowCount */ + offlineStorageDeletedEntityRowCount?: (number|Long|string|null); + + /** SelectEntity onlineStorageDeletedEntityCount */ + onlineStorageDeletedEntityCount?: (number|Long|string|null); + } + + /** Represents a SelectEntity. */ + class SelectEntity implements ISelectEntity { + + /** + * Constructs a new SelectEntity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.ISelectEntity); + + /** SelectEntity offlineStorageDeletedEntityRowCount. */ + public offlineStorageDeletedEntityRowCount: (number|Long|string); + + /** SelectEntity onlineStorageDeletedEntityCount. */ + public onlineStorageDeletedEntityCount: (number|Long|string); + + /** + * Creates a new SelectEntity instance using the specified properties. + * @param [properties] Properties to set + * @returns SelectEntity instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.ISelectEntity): google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity; + + /** + * Encodes the specified SelectEntity message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity.verify|verify} messages. + * @param message SelectEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.ISelectEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SelectEntity message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity.verify|verify} messages. + * @param message SelectEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.ISelectEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SelectEntity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SelectEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity; + + /** + * Decodes a SelectEntity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SelectEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity; + + /** + * Verifies a SelectEntity message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SelectEntity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SelectEntity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity; + + /** + * Creates a plain object from a SelectEntity message. Also converts values to other types if specified. + * @param message SelectEntity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SelectEntity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SelectEntity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SelectTimeRangeAndFeature. */ + interface ISelectTimeRangeAndFeature { + + /** SelectTimeRangeAndFeature impactedFeatureCount */ + impactedFeatureCount?: (number|Long|string|null); + + /** SelectTimeRangeAndFeature offlineStorageModifiedEntityRowCount */ + offlineStorageModifiedEntityRowCount?: (number|Long|string|null); + + /** SelectTimeRangeAndFeature onlineStorageModifiedEntityCount */ + onlineStorageModifiedEntityCount?: (number|Long|string|null); + } + + /** Represents a SelectTimeRangeAndFeature. */ + class SelectTimeRangeAndFeature implements ISelectTimeRangeAndFeature { + + /** + * Constructs a new SelectTimeRangeAndFeature. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.ISelectTimeRangeAndFeature); + + /** SelectTimeRangeAndFeature impactedFeatureCount. */ + public impactedFeatureCount: (number|Long|string); + + /** SelectTimeRangeAndFeature offlineStorageModifiedEntityRowCount. */ + public offlineStorageModifiedEntityRowCount: (number|Long|string); + + /** SelectTimeRangeAndFeature onlineStorageModifiedEntityCount. */ + public onlineStorageModifiedEntityCount: (number|Long|string); + + /** + * Creates a new SelectTimeRangeAndFeature instance using the specified properties. + * @param [properties] Properties to set + * @returns SelectTimeRangeAndFeature instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.ISelectTimeRangeAndFeature): google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature; + + /** + * Encodes the specified SelectTimeRangeAndFeature message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature.verify|verify} messages. + * @param message SelectTimeRangeAndFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.ISelectTimeRangeAndFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SelectTimeRangeAndFeature message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature.verify|verify} messages. + * @param message SelectTimeRangeAndFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.ISelectTimeRangeAndFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SelectTimeRangeAndFeature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SelectTimeRangeAndFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature; + + /** + * Decodes a SelectTimeRangeAndFeature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SelectTimeRangeAndFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature; + + /** + * Verifies a SelectTimeRangeAndFeature message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SelectTimeRangeAndFeature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SelectTimeRangeAndFeature + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature; + + /** + * Creates a plain object from a SelectTimeRangeAndFeature message. Also converts values to other types if specified. + * @param message SelectTimeRangeAndFeature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SelectTimeRangeAndFeature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SelectTimeRangeAndFeature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + /** Properties of an EntityIdSelector. */ interface IEntityIdSelector { @@ -124645,6 +127715,9 @@ export namespace google { /** ModelEvaluationSlice createTime */ createTime?: (google.protobuf.ITimestamp|null); + + /** ModelEvaluationSlice modelExplanation */ + modelExplanation?: (google.cloud.aiplatform.v1beta1.IModelExplanation|null); } /** Represents a ModelEvaluationSlice. */ @@ -124671,6 +127744,9 @@ export namespace google { /** ModelEvaluationSlice createTime. */ public createTime?: (google.protobuf.ITimestamp|null); + /** ModelEvaluationSlice modelExplanation. */ + public modelExplanation?: (google.cloud.aiplatform.v1beta1.IModelExplanation|null); + /** * Creates a new ModelEvaluationSlice instance using the specified properties. * @param [properties] Properties to set @@ -124759,6 +127835,9 @@ export namespace google { /** Slice value */ value?: (string|null); + + /** Slice sliceSpec */ + sliceSpec?: (google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.ISliceSpec|null); } /** Represents a Slice. */ @@ -124776,6 +127855,9 @@ export namespace google { /** Slice value. */ public value: string; + /** Slice sliceSpec. */ + public sliceSpec?: (google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.ISliceSpec|null); + /** * Creates a new Slice instance using the specified properties. * @param [properties] Properties to set @@ -124853,6 +127935,430 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + namespace Slice { + + /** Properties of a SliceSpec. */ + interface ISliceSpec { + + /** SliceSpec configs */ + configs?: ({ [k: string]: google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.ISliceConfig }|null); + } + + /** Represents a SliceSpec. */ + class SliceSpec implements ISliceSpec { + + /** + * Constructs a new SliceSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.ISliceSpec); + + /** SliceSpec configs. */ + public configs: { [k: string]: google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.ISliceConfig }; + + /** + * Creates a new SliceSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns SliceSpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.ISliceSpec): google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec; + + /** + * Encodes the specified SliceSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.verify|verify} messages. + * @param message SliceSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.ISliceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SliceSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.verify|verify} messages. + * @param message SliceSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.ISliceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SliceSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SliceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec; + + /** + * Decodes a SliceSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SliceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec; + + /** + * Verifies a SliceSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SliceSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SliceSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec; + + /** + * Creates a plain object from a SliceSpec message. Also converts values to other types if specified. + * @param message SliceSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SliceSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SliceSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SliceSpec { + + /** Properties of a SliceConfig. */ + interface ISliceConfig { + + /** SliceConfig value */ + value?: (google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.IValue|null); + + /** SliceConfig range */ + range?: (google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.IRange|null); + + /** SliceConfig allValues */ + allValues?: (google.protobuf.IBoolValue|null); + } + + /** Represents a SliceConfig. */ + class SliceConfig implements ISliceConfig { + + /** + * Constructs a new SliceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.ISliceConfig); + + /** SliceConfig value. */ + public value?: (google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.IValue|null); + + /** SliceConfig range. */ + public range?: (google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.IRange|null); + + /** SliceConfig allValues. */ + public allValues?: (google.protobuf.IBoolValue|null); + + /** SliceConfig kind. */ + public kind?: ("value"|"range"|"allValues"); + + /** + * Creates a new SliceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SliceConfig instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.ISliceConfig): google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig; + + /** + * Encodes the specified SliceConfig message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.verify|verify} messages. + * @param message SliceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.ISliceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SliceConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.verify|verify} messages. + * @param message SliceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.ISliceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SliceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SliceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig; + + /** + * Decodes a SliceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SliceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig; + + /** + * Verifies a SliceConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SliceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SliceConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig; + + /** + * Creates a plain object from a SliceConfig message. Also converts values to other types if specified. + * @param message SliceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SliceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SliceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Range. */ + interface IRange { + + /** Range low */ + low?: (number|null); + + /** Range high */ + high?: (number|null); + } + + /** Represents a Range. */ + class Range implements IRange { + + /** + * Constructs a new Range. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.IRange); + + /** Range low. */ + public low: number; + + /** Range high. */ + public high: number; + + /** + * Creates a new Range instance using the specified properties. + * @param [properties] Properties to set + * @returns Range instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.IRange): google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range; + + /** + * Encodes the specified Range message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range.verify|verify} messages. + * @param message Range message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.IRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Range message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range.verify|verify} messages. + * @param message Range message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.IRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Range message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range; + + /** + * Decodes a Range message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range; + + /** + * Verifies a Range message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Range message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Range + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range; + + /** + * Creates a plain object from a Range message. Also converts values to other types if specified. + * @param message Range + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Range to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Range + * @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 stringValue */ + stringValue?: (string|null); + + /** Value floatValue */ + floatValue?: (number|null); + } + + /** Represents a Value. */ + class Value implements IValue { + + /** + * Constructs a new Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.IValue); + + /** Value stringValue. */ + public stringValue?: (string|null); + + /** Value floatValue. */ + public floatValue?: (number|null); + + /** Value kind. */ + public kind?: ("stringValue"|"floatValue"); + + /** + * Creates a new Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Value instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.IValue): google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Value; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.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.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.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.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.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.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.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.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.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.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.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.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.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; + } + } + } } /** Represents a ModelService */ @@ -125057,6 +128563,20 @@ export namespace google { */ public batchImportModelEvaluationSlices(request: google.cloud.aiplatform.v1beta1.IBatchImportModelEvaluationSlicesRequest): Promise; + /** + * Calls BatchImportEvaluatedAnnotations. + * @param request BatchImportEvaluatedAnnotationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchImportEvaluatedAnnotationsResponse + */ + public batchImportEvaluatedAnnotations(request: google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsRequest, callback: google.cloud.aiplatform.v1beta1.ModelService.BatchImportEvaluatedAnnotationsCallback): void; + + /** + * Calls BatchImportEvaluatedAnnotations. + * @param request BatchImportEvaluatedAnnotationsRequest message or plain object + * @returns Promise + */ + public batchImportEvaluatedAnnotations(request: google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsRequest): Promise; + /** * Calls GetModelEvaluation. * @param request GetModelEvaluationRequest message or plain object @@ -125207,6 +128727,13 @@ export namespace google { */ type BatchImportModelEvaluationSlicesCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse) => void; + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.ModelService|batchImportEvaluatedAnnotations}. + * @param error Error, if any + * @param [response] BatchImportEvaluatedAnnotationsResponse + */ + type BatchImportEvaluatedAnnotationsCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse) => void; + /** * Callback as used by {@link google.cloud.aiplatform.v1beta1.ModelService|getModelEvaluation}. * @param error Error, if any @@ -127941,6 +131468,206 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a BatchImportEvaluatedAnnotationsRequest. */ + interface IBatchImportEvaluatedAnnotationsRequest { + + /** BatchImportEvaluatedAnnotationsRequest parent */ + parent?: (string|null); + + /** BatchImportEvaluatedAnnotationsRequest evaluatedAnnotations */ + evaluatedAnnotations?: (google.cloud.aiplatform.v1beta1.IEvaluatedAnnotation[]|null); + } + + /** Represents a BatchImportEvaluatedAnnotationsRequest. */ + class BatchImportEvaluatedAnnotationsRequest implements IBatchImportEvaluatedAnnotationsRequest { + + /** + * Constructs a new BatchImportEvaluatedAnnotationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsRequest); + + /** BatchImportEvaluatedAnnotationsRequest parent. */ + public parent: string; + + /** BatchImportEvaluatedAnnotationsRequest evaluatedAnnotations. */ + public evaluatedAnnotations: google.cloud.aiplatform.v1beta1.IEvaluatedAnnotation[]; + + /** + * Creates a new BatchImportEvaluatedAnnotationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchImportEvaluatedAnnotationsRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsRequest): google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest; + + /** + * Encodes the specified BatchImportEvaluatedAnnotationsRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest.verify|verify} messages. + * @param message BatchImportEvaluatedAnnotationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchImportEvaluatedAnnotationsRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest.verify|verify} messages. + * @param message BatchImportEvaluatedAnnotationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchImportEvaluatedAnnotationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchImportEvaluatedAnnotationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest; + + /** + * Decodes a BatchImportEvaluatedAnnotationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchImportEvaluatedAnnotationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest; + + /** + * Verifies a BatchImportEvaluatedAnnotationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BatchImportEvaluatedAnnotationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchImportEvaluatedAnnotationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest; + + /** + * Creates a plain object from a BatchImportEvaluatedAnnotationsRequest message. Also converts values to other types if specified. + * @param message BatchImportEvaluatedAnnotationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchImportEvaluatedAnnotationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchImportEvaluatedAnnotationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchImportEvaluatedAnnotationsResponse. */ + interface IBatchImportEvaluatedAnnotationsResponse { + + /** BatchImportEvaluatedAnnotationsResponse importedEvaluatedAnnotationsCount */ + importedEvaluatedAnnotationsCount?: (number|null); + } + + /** Represents a BatchImportEvaluatedAnnotationsResponse. */ + class BatchImportEvaluatedAnnotationsResponse implements IBatchImportEvaluatedAnnotationsResponse { + + /** + * Constructs a new BatchImportEvaluatedAnnotationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsResponse); + + /** BatchImportEvaluatedAnnotationsResponse importedEvaluatedAnnotationsCount. */ + public importedEvaluatedAnnotationsCount: number; + + /** + * Creates a new BatchImportEvaluatedAnnotationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchImportEvaluatedAnnotationsResponse instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsResponse): google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse; + + /** + * Encodes the specified BatchImportEvaluatedAnnotationsResponse message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse.verify|verify} messages. + * @param message BatchImportEvaluatedAnnotationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchImportEvaluatedAnnotationsResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse.verify|verify} messages. + * @param message BatchImportEvaluatedAnnotationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchImportEvaluatedAnnotationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchImportEvaluatedAnnotationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse; + + /** + * Decodes a BatchImportEvaluatedAnnotationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchImportEvaluatedAnnotationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse; + + /** + * Verifies a BatchImportEvaluatedAnnotationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BatchImportEvaluatedAnnotationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchImportEvaluatedAnnotationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse; + + /** + * Creates a plain object from a BatchImportEvaluatedAnnotationsResponse message. Also converts values to other types if specified. + * @param message BatchImportEvaluatedAnnotationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchImportEvaluatedAnnotationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchImportEvaluatedAnnotationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a GetModelEvaluationRequest. */ interface IGetModelEvaluationRequest { diff --git a/packages/google-cloud-aiplatform/protos/protos.js b/packages/google-cloud-aiplatform/protos/protos.js index 8ee8e8c7dd2..d1f7f028b42 100644 --- a/packages/google-cloud-aiplatform/protos/protos.js +++ b/packages/google-cloud-aiplatform/protos/protos.js @@ -79,6 +79,7 @@ * @property {number} NVIDIA_TESLA_A100=8 NVIDIA_TESLA_A100 value * @property {number} TPU_V2=6 TPU_V2 value * @property {number} TPU_V3=7 TPU_V3 value + * @property {number} TPU_V4_POD=10 TPU_V4_POD value */ v1.AcceleratorType = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -91,6 +92,7 @@ values[valuesById[8] = "NVIDIA_TESLA_A100"] = 8; values[valuesById[6] = "TPU_V2"] = 6; values[valuesById[7] = "TPU_V3"] = 7; + values[valuesById[10] = "TPU_V4_POD"] = 10; return values; })(); @@ -1675,6 +1677,7 @@ * @property {google.protobuf.ITimestamp|null} [updateTime] BatchPredictionJob updateTime * @property {Object.|null} [labels] BatchPredictionJob labels * @property {google.cloud.aiplatform.v1.IEncryptionSpec|null} [encryptionSpec] BatchPredictionJob encryptionSpec + * @property {boolean|null} [disableContainerLogging] BatchPredictionJob disableContainerLogging */ /** @@ -1902,6 +1905,14 @@ */ BatchPredictionJob.prototype.encryptionSpec = null; + /** + * BatchPredictionJob disableContainerLogging. + * @member {boolean} disableContainerLogging + * @memberof google.cloud.aiplatform.v1.BatchPredictionJob + * @instance + */ + BatchPredictionJob.prototype.disableContainerLogging = false; + /** * Creates a new BatchPredictionJob instance using the specified properties. * @function create @@ -1980,6 +1991,8 @@ writer.uint32(/* id 29, wireType 2 =*/234).string(message.serviceAccount); if (message.modelVersionId != null && Object.hasOwnProperty.call(message, "modelVersionId")) writer.uint32(/* id 30, wireType 2 =*/242).string(message.modelVersionId); + if (message.disableContainerLogging != null && Object.hasOwnProperty.call(message, "disableContainerLogging")) + writer.uint32(/* id 34, wireType 0 =*/272).bool(message.disableContainerLogging); return writer; }; @@ -2139,6 +2152,10 @@ message.encryptionSpec = $root.google.cloud.aiplatform.v1.EncryptionSpec.decode(reader, reader.uint32()); break; } + case 34: { + message.disableContainerLogging = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -2311,6 +2328,9 @@ if (error) return "encryptionSpec." + error; } + if (message.disableContainerLogging != null && message.hasOwnProperty("disableContainerLogging")) + if (typeof message.disableContainerLogging !== "boolean") + return "disableContainerLogging: boolean expected"; return null; }; @@ -2492,6 +2512,8 @@ throw TypeError(".google.cloud.aiplatform.v1.BatchPredictionJob.encryptionSpec: object expected"); message.encryptionSpec = $root.google.cloud.aiplatform.v1.EncryptionSpec.fromObject(object.encryptionSpec); } + if (object.disableContainerLogging != null) + message.disableContainerLogging = Boolean(object.disableContainerLogging); return message; }; @@ -2537,6 +2559,7 @@ object.unmanagedContainerModel = null; object.serviceAccount = ""; object.modelVersionId = ""; + object.disableContainerLogging = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -2597,6 +2620,8 @@ object.serviceAccount = message.serviceAccount; if (message.modelVersionId != null && message.hasOwnProperty("modelVersionId")) object.modelVersionId = message.modelVersionId; + if (message.disableContainerLogging != null && message.hasOwnProperty("disableContainerLogging")) + object.disableContainerLogging = message.disableContainerLogging; return object; }; @@ -13131,6 +13156,7 @@ case 8: case 6: case 7: + case 10: break; } if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) @@ -13196,6 +13222,10 @@ case 7: message.acceleratorType = 7; break; + case "TPU_V4_POD": + case 10: + message.acceleratorType = 10; + break; } if (object.acceleratorCount != null) message.acceleratorCount = object.acceleratorCount | 0; @@ -24366,6 +24396,7 @@ * @memberof google.cloud.aiplatform.v1 * @interface IExportDataConfig * @property {google.cloud.aiplatform.v1.IGcsDestination|null} [gcsDestination] ExportDataConfig gcsDestination + * @property {google.cloud.aiplatform.v1.IExportFractionSplit|null} [fractionSplit] ExportDataConfig fractionSplit * @property {string|null} [annotationsFilter] ExportDataConfig annotationsFilter */ @@ -24392,6 +24423,14 @@ */ ExportDataConfig.prototype.gcsDestination = null; + /** + * ExportDataConfig fractionSplit. + * @member {google.cloud.aiplatform.v1.IExportFractionSplit|null|undefined} fractionSplit + * @memberof google.cloud.aiplatform.v1.ExportDataConfig + * @instance + */ + ExportDataConfig.prototype.fractionSplit = null; + /** * ExportDataConfig annotationsFilter. * @member {string} annotationsFilter @@ -24414,6 +24453,17 @@ set: $util.oneOfSetter($oneOfFields) }); + /** + * ExportDataConfig split. + * @member {"fractionSplit"|undefined} split + * @memberof google.cloud.aiplatform.v1.ExportDataConfig + * @instance + */ + Object.defineProperty(ExportDataConfig.prototype, "split", { + get: $util.oneOfGetter($oneOfFields = ["fractionSplit"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new ExportDataConfig instance using the specified properties. * @function create @@ -24442,6 +24492,8 @@ $root.google.cloud.aiplatform.v1.GcsDestination.encode(message.gcsDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.annotationsFilter != null && Object.hasOwnProperty.call(message, "annotationsFilter")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.annotationsFilter); + if (message.fractionSplit != null && Object.hasOwnProperty.call(message, "fractionSplit")) + $root.google.cloud.aiplatform.v1.ExportFractionSplit.encode(message.fractionSplit, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -24480,6 +24532,10 @@ message.gcsDestination = $root.google.cloud.aiplatform.v1.GcsDestination.decode(reader, reader.uint32()); break; } + case 5: { + message.fractionSplit = $root.google.cloud.aiplatform.v1.ExportFractionSplit.decode(reader, reader.uint32()); + break; + } case 2: { message.annotationsFilter = reader.string(); break; @@ -24528,6 +24584,14 @@ return "gcsDestination." + error; } } + if (message.fractionSplit != null && message.hasOwnProperty("fractionSplit")) { + properties.split = 1; + { + var error = $root.google.cloud.aiplatform.v1.ExportFractionSplit.verify(message.fractionSplit); + if (error) + return "fractionSplit." + error; + } + } if (message.annotationsFilter != null && message.hasOwnProperty("annotationsFilter")) if (!$util.isString(message.annotationsFilter)) return "annotationsFilter: string expected"; @@ -24551,6 +24615,11 @@ throw TypeError(".google.cloud.aiplatform.v1.ExportDataConfig.gcsDestination: object expected"); message.gcsDestination = $root.google.cloud.aiplatform.v1.GcsDestination.fromObject(object.gcsDestination); } + if (object.fractionSplit != null) { + if (typeof object.fractionSplit !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ExportDataConfig.fractionSplit: object expected"); + message.fractionSplit = $root.google.cloud.aiplatform.v1.ExportFractionSplit.fromObject(object.fractionSplit); + } if (object.annotationsFilter != null) message.annotationsFilter = String(object.annotationsFilter); return message; @@ -24578,6 +24647,11 @@ } if (message.annotationsFilter != null && message.hasOwnProperty("annotationsFilter")) object.annotationsFilter = message.annotationsFilter; + if (message.fractionSplit != null && message.hasOwnProperty("fractionSplit")) { + object.fractionSplit = $root.google.cloud.aiplatform.v1.ExportFractionSplit.toObject(message.fractionSplit, options); + if (options.oneofs) + object.split = "fractionSplit"; + } return object; }; @@ -24610,6 +24684,256 @@ return ExportDataConfig; })(); + v1.ExportFractionSplit = (function() { + + /** + * Properties of an ExportFractionSplit. + * @memberof google.cloud.aiplatform.v1 + * @interface IExportFractionSplit + * @property {number|null} [trainingFraction] ExportFractionSplit trainingFraction + * @property {number|null} [validationFraction] ExportFractionSplit validationFraction + * @property {number|null} [testFraction] ExportFractionSplit testFraction + */ + + /** + * Constructs a new ExportFractionSplit. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents an ExportFractionSplit. + * @implements IExportFractionSplit + * @constructor + * @param {google.cloud.aiplatform.v1.IExportFractionSplit=} [properties] Properties to set + */ + function ExportFractionSplit(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExportFractionSplit trainingFraction. + * @member {number} trainingFraction + * @memberof google.cloud.aiplatform.v1.ExportFractionSplit + * @instance + */ + ExportFractionSplit.prototype.trainingFraction = 0; + + /** + * ExportFractionSplit validationFraction. + * @member {number} validationFraction + * @memberof google.cloud.aiplatform.v1.ExportFractionSplit + * @instance + */ + ExportFractionSplit.prototype.validationFraction = 0; + + /** + * ExportFractionSplit testFraction. + * @member {number} testFraction + * @memberof google.cloud.aiplatform.v1.ExportFractionSplit + * @instance + */ + ExportFractionSplit.prototype.testFraction = 0; + + /** + * Creates a new ExportFractionSplit instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.ExportFractionSplit + * @static + * @param {google.cloud.aiplatform.v1.IExportFractionSplit=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ExportFractionSplit} ExportFractionSplit instance + */ + ExportFractionSplit.create = function create(properties) { + return new ExportFractionSplit(properties); + }; + + /** + * Encodes the specified ExportFractionSplit message. Does not implicitly {@link google.cloud.aiplatform.v1.ExportFractionSplit.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.ExportFractionSplit + * @static + * @param {google.cloud.aiplatform.v1.IExportFractionSplit} message ExportFractionSplit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportFractionSplit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.trainingFraction != null && Object.hasOwnProperty.call(message, "trainingFraction")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.trainingFraction); + if (message.validationFraction != null && Object.hasOwnProperty.call(message, "validationFraction")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.validationFraction); + if (message.testFraction != null && Object.hasOwnProperty.call(message, "testFraction")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.testFraction); + return writer; + }; + + /** + * Encodes the specified ExportFractionSplit message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ExportFractionSplit.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.ExportFractionSplit + * @static + * @param {google.cloud.aiplatform.v1.IExportFractionSplit} message ExportFractionSplit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportFractionSplit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExportFractionSplit message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.ExportFractionSplit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.ExportFractionSplit} ExportFractionSplit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportFractionSplit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.ExportFractionSplit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.trainingFraction = reader.double(); + break; + } + case 2: { + message.validationFraction = reader.double(); + break; + } + case 3: { + message.testFraction = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExportFractionSplit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.ExportFractionSplit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.ExportFractionSplit} ExportFractionSplit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportFractionSplit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExportFractionSplit message. + * @function verify + * @memberof google.cloud.aiplatform.v1.ExportFractionSplit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportFractionSplit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.trainingFraction != null && message.hasOwnProperty("trainingFraction")) + if (typeof message.trainingFraction !== "number") + return "trainingFraction: number expected"; + if (message.validationFraction != null && message.hasOwnProperty("validationFraction")) + if (typeof message.validationFraction !== "number") + return "validationFraction: number expected"; + if (message.testFraction != null && message.hasOwnProperty("testFraction")) + if (typeof message.testFraction !== "number") + return "testFraction: number expected"; + return null; + }; + + /** + * Creates an ExportFractionSplit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.ExportFractionSplit + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.ExportFractionSplit} ExportFractionSplit + */ + ExportFractionSplit.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ExportFractionSplit) + return object; + var message = new $root.google.cloud.aiplatform.v1.ExportFractionSplit(); + if (object.trainingFraction != null) + message.trainingFraction = Number(object.trainingFraction); + if (object.validationFraction != null) + message.validationFraction = Number(object.validationFraction); + if (object.testFraction != null) + message.testFraction = Number(object.testFraction); + return message; + }; + + /** + * Creates a plain object from an ExportFractionSplit message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.ExportFractionSplit + * @static + * @param {google.cloud.aiplatform.v1.ExportFractionSplit} message ExportFractionSplit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportFractionSplit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.trainingFraction = 0; + object.validationFraction = 0; + object.testFraction = 0; + } + if (message.trainingFraction != null && message.hasOwnProperty("trainingFraction")) + object.trainingFraction = options.json && !isFinite(message.trainingFraction) ? String(message.trainingFraction) : message.trainingFraction; + if (message.validationFraction != null && message.hasOwnProperty("validationFraction")) + object.validationFraction = options.json && !isFinite(message.validationFraction) ? String(message.validationFraction) : message.validationFraction; + if (message.testFraction != null && message.hasOwnProperty("testFraction")) + object.testFraction = options.json && !isFinite(message.testFraction) ? String(message.testFraction) : message.testFraction; + return object; + }; + + /** + * Converts this ExportFractionSplit to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.ExportFractionSplit + * @instance + * @returns {Object.} JSON object + */ + ExportFractionSplit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExportFractionSplit + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.ExportFractionSplit + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportFractionSplit.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ExportFractionSplit"; + }; + + return ExportFractionSplit; + })(); + v1.SavedQuery = (function() { /** @@ -38866,6 +39190,1287 @@ return FeaturestoreMonitoringConfig; })(); + v1.EvaluatedAnnotation = (function() { + + /** + * Properties of an EvaluatedAnnotation. + * @memberof google.cloud.aiplatform.v1 + * @interface IEvaluatedAnnotation + * @property {google.cloud.aiplatform.v1.EvaluatedAnnotation.EvaluatedAnnotationType|null} [type] EvaluatedAnnotation type + * @property {Array.|null} [predictions] EvaluatedAnnotation predictions + * @property {Array.|null} [groundTruths] EvaluatedAnnotation groundTruths + * @property {google.protobuf.IValue|null} [dataItemPayload] EvaluatedAnnotation dataItemPayload + * @property {string|null} [evaluatedDataItemViewId] EvaluatedAnnotation evaluatedDataItemViewId + * @property {Array.|null} [explanations] EvaluatedAnnotation explanations + * @property {Array.|null} [errorAnalysisAnnotations] EvaluatedAnnotation errorAnalysisAnnotations + */ + + /** + * Constructs a new EvaluatedAnnotation. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents an EvaluatedAnnotation. + * @implements IEvaluatedAnnotation + * @constructor + * @param {google.cloud.aiplatform.v1.IEvaluatedAnnotation=} [properties] Properties to set + */ + function EvaluatedAnnotation(properties) { + this.predictions = []; + this.groundTruths = []; + this.explanations = []; + this.errorAnalysisAnnotations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EvaluatedAnnotation type. + * @member {google.cloud.aiplatform.v1.EvaluatedAnnotation.EvaluatedAnnotationType} type + * @memberof google.cloud.aiplatform.v1.EvaluatedAnnotation + * @instance + */ + EvaluatedAnnotation.prototype.type = 0; + + /** + * EvaluatedAnnotation predictions. + * @member {Array.} predictions + * @memberof google.cloud.aiplatform.v1.EvaluatedAnnotation + * @instance + */ + EvaluatedAnnotation.prototype.predictions = $util.emptyArray; + + /** + * EvaluatedAnnotation groundTruths. + * @member {Array.} groundTruths + * @memberof google.cloud.aiplatform.v1.EvaluatedAnnotation + * @instance + */ + EvaluatedAnnotation.prototype.groundTruths = $util.emptyArray; + + /** + * EvaluatedAnnotation dataItemPayload. + * @member {google.protobuf.IValue|null|undefined} dataItemPayload + * @memberof google.cloud.aiplatform.v1.EvaluatedAnnotation + * @instance + */ + EvaluatedAnnotation.prototype.dataItemPayload = null; + + /** + * EvaluatedAnnotation evaluatedDataItemViewId. + * @member {string} evaluatedDataItemViewId + * @memberof google.cloud.aiplatform.v1.EvaluatedAnnotation + * @instance + */ + EvaluatedAnnotation.prototype.evaluatedDataItemViewId = ""; + + /** + * EvaluatedAnnotation explanations. + * @member {Array.} explanations + * @memberof google.cloud.aiplatform.v1.EvaluatedAnnotation + * @instance + */ + EvaluatedAnnotation.prototype.explanations = $util.emptyArray; + + /** + * EvaluatedAnnotation errorAnalysisAnnotations. + * @member {Array.} errorAnalysisAnnotations + * @memberof google.cloud.aiplatform.v1.EvaluatedAnnotation + * @instance + */ + EvaluatedAnnotation.prototype.errorAnalysisAnnotations = $util.emptyArray; + + /** + * Creates a new EvaluatedAnnotation instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.EvaluatedAnnotation + * @static + * @param {google.cloud.aiplatform.v1.IEvaluatedAnnotation=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.EvaluatedAnnotation} EvaluatedAnnotation instance + */ + EvaluatedAnnotation.create = function create(properties) { + return new EvaluatedAnnotation(properties); + }; + + /** + * Encodes the specified EvaluatedAnnotation message. Does not implicitly {@link google.cloud.aiplatform.v1.EvaluatedAnnotation.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.EvaluatedAnnotation + * @static + * @param {google.cloud.aiplatform.v1.IEvaluatedAnnotation} message EvaluatedAnnotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvaluatedAnnotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.predictions != null && message.predictions.length) + for (var i = 0; i < message.predictions.length; ++i) + $root.google.protobuf.Value.encode(message.predictions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.groundTruths != null && message.groundTruths.length) + for (var i = 0; i < message.groundTruths.length; ++i) + $root.google.protobuf.Value.encode(message.groundTruths[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dataItemPayload != null && Object.hasOwnProperty.call(message, "dataItemPayload")) + $root.google.protobuf.Value.encode(message.dataItemPayload, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.evaluatedDataItemViewId != null && Object.hasOwnProperty.call(message, "evaluatedDataItemViewId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.evaluatedDataItemViewId); + if (message.explanations != null && message.explanations.length) + for (var i = 0; i < message.explanations.length; ++i) + $root.google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation.encode(message.explanations[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.errorAnalysisAnnotations != null && message.errorAnalysisAnnotations.length) + for (var i = 0; i < message.errorAnalysisAnnotations.length; ++i) + $root.google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.encode(message.errorAnalysisAnnotations[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EvaluatedAnnotation message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.EvaluatedAnnotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.EvaluatedAnnotation + * @static + * @param {google.cloud.aiplatform.v1.IEvaluatedAnnotation} message EvaluatedAnnotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvaluatedAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EvaluatedAnnotation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.EvaluatedAnnotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.EvaluatedAnnotation} EvaluatedAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvaluatedAnnotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.EvaluatedAnnotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + if (!(message.predictions && message.predictions.length)) + message.predictions = []; + message.predictions.push($root.google.protobuf.Value.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.groundTruths && message.groundTruths.length)) + message.groundTruths = []; + message.groundTruths.push($root.google.protobuf.Value.decode(reader, reader.uint32())); + break; + } + case 5: { + message.dataItemPayload = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + } + case 6: { + message.evaluatedDataItemViewId = reader.string(); + break; + } + case 8: { + if (!(message.explanations && message.explanations.length)) + message.explanations = []; + message.explanations.push($root.google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation.decode(reader, reader.uint32())); + break; + } + case 9: { + if (!(message.errorAnalysisAnnotations && message.errorAnalysisAnnotations.length)) + message.errorAnalysisAnnotations = []; + message.errorAnalysisAnnotations.push($root.google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EvaluatedAnnotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.EvaluatedAnnotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.EvaluatedAnnotation} EvaluatedAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvaluatedAnnotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EvaluatedAnnotation message. + * @function verify + * @memberof google.cloud.aiplatform.v1.EvaluatedAnnotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EvaluatedAnnotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.predictions != null && message.hasOwnProperty("predictions")) { + if (!Array.isArray(message.predictions)) + return "predictions: array expected"; + for (var i = 0; i < message.predictions.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.predictions[i]); + if (error) + return "predictions." + error; + } + } + if (message.groundTruths != null && message.hasOwnProperty("groundTruths")) { + if (!Array.isArray(message.groundTruths)) + return "groundTruths: array expected"; + for (var i = 0; i < message.groundTruths.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.groundTruths[i]); + if (error) + return "groundTruths." + error; + } + } + if (message.dataItemPayload != null && message.hasOwnProperty("dataItemPayload")) { + var error = $root.google.protobuf.Value.verify(message.dataItemPayload); + if (error) + return "dataItemPayload." + error; + } + if (message.evaluatedDataItemViewId != null && message.hasOwnProperty("evaluatedDataItemViewId")) + if (!$util.isString(message.evaluatedDataItemViewId)) + return "evaluatedDataItemViewId: string expected"; + if (message.explanations != null && message.hasOwnProperty("explanations")) { + if (!Array.isArray(message.explanations)) + return "explanations: array expected"; + for (var i = 0; i < message.explanations.length; ++i) { + var error = $root.google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation.verify(message.explanations[i]); + if (error) + return "explanations." + error; + } + } + if (message.errorAnalysisAnnotations != null && message.hasOwnProperty("errorAnalysisAnnotations")) { + if (!Array.isArray(message.errorAnalysisAnnotations)) + return "errorAnalysisAnnotations: array expected"; + for (var i = 0; i < message.errorAnalysisAnnotations.length; ++i) { + var error = $root.google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.verify(message.errorAnalysisAnnotations[i]); + if (error) + return "errorAnalysisAnnotations." + error; + } + } + return null; + }; + + /** + * Creates an EvaluatedAnnotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.EvaluatedAnnotation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.EvaluatedAnnotation} EvaluatedAnnotation + */ + EvaluatedAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.EvaluatedAnnotation) + return object; + var message = new $root.google.cloud.aiplatform.v1.EvaluatedAnnotation(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "EVALUATED_ANNOTATION_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TRUE_POSITIVE": + case 1: + message.type = 1; + break; + case "FALSE_POSITIVE": + case 2: + message.type = 2; + break; + case "FALSE_NEGATIVE": + case 3: + message.type = 3; + break; + } + if (object.predictions) { + if (!Array.isArray(object.predictions)) + throw TypeError(".google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions: array expected"); + message.predictions = []; + for (var i = 0; i < object.predictions.length; ++i) { + if (typeof object.predictions[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions: object expected"); + message.predictions[i] = $root.google.protobuf.Value.fromObject(object.predictions[i]); + } + } + if (object.groundTruths) { + if (!Array.isArray(object.groundTruths)) + throw TypeError(".google.cloud.aiplatform.v1.EvaluatedAnnotation.groundTruths: array expected"); + message.groundTruths = []; + for (var i = 0; i < object.groundTruths.length; ++i) { + if (typeof object.groundTruths[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.EvaluatedAnnotation.groundTruths: object expected"); + message.groundTruths[i] = $root.google.protobuf.Value.fromObject(object.groundTruths[i]); + } + } + if (object.dataItemPayload != null) { + if (typeof object.dataItemPayload !== "object") + throw TypeError(".google.cloud.aiplatform.v1.EvaluatedAnnotation.dataItemPayload: object expected"); + message.dataItemPayload = $root.google.protobuf.Value.fromObject(object.dataItemPayload); + } + if (object.evaluatedDataItemViewId != null) + message.evaluatedDataItemViewId = String(object.evaluatedDataItemViewId); + if (object.explanations) { + if (!Array.isArray(object.explanations)) + throw TypeError(".google.cloud.aiplatform.v1.EvaluatedAnnotation.explanations: array expected"); + message.explanations = []; + for (var i = 0; i < object.explanations.length; ++i) { + if (typeof object.explanations[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.EvaluatedAnnotation.explanations: object expected"); + message.explanations[i] = $root.google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation.fromObject(object.explanations[i]); + } + } + if (object.errorAnalysisAnnotations) { + if (!Array.isArray(object.errorAnalysisAnnotations)) + throw TypeError(".google.cloud.aiplatform.v1.EvaluatedAnnotation.errorAnalysisAnnotations: array expected"); + message.errorAnalysisAnnotations = []; + for (var i = 0; i < object.errorAnalysisAnnotations.length; ++i) { + if (typeof object.errorAnalysisAnnotations[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.EvaluatedAnnotation.errorAnalysisAnnotations: object expected"); + message.errorAnalysisAnnotations[i] = $root.google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.fromObject(object.errorAnalysisAnnotations[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EvaluatedAnnotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.EvaluatedAnnotation + * @static + * @param {google.cloud.aiplatform.v1.EvaluatedAnnotation} message EvaluatedAnnotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EvaluatedAnnotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.predictions = []; + object.groundTruths = []; + object.explanations = []; + object.errorAnalysisAnnotations = []; + } + if (options.defaults) { + object.type = options.enums === String ? "EVALUATED_ANNOTATION_TYPE_UNSPECIFIED" : 0; + object.dataItemPayload = null; + object.evaluatedDataItemViewId = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.aiplatform.v1.EvaluatedAnnotation.EvaluatedAnnotationType[message.type] === undefined ? message.type : $root.google.cloud.aiplatform.v1.EvaluatedAnnotation.EvaluatedAnnotationType[message.type] : message.type; + if (message.predictions && message.predictions.length) { + object.predictions = []; + for (var j = 0; j < message.predictions.length; ++j) + object.predictions[j] = $root.google.protobuf.Value.toObject(message.predictions[j], options); + } + if (message.groundTruths && message.groundTruths.length) { + object.groundTruths = []; + for (var j = 0; j < message.groundTruths.length; ++j) + object.groundTruths[j] = $root.google.protobuf.Value.toObject(message.groundTruths[j], options); + } + if (message.dataItemPayload != null && message.hasOwnProperty("dataItemPayload")) + object.dataItemPayload = $root.google.protobuf.Value.toObject(message.dataItemPayload, options); + if (message.evaluatedDataItemViewId != null && message.hasOwnProperty("evaluatedDataItemViewId")) + object.evaluatedDataItemViewId = message.evaluatedDataItemViewId; + if (message.explanations && message.explanations.length) { + object.explanations = []; + for (var j = 0; j < message.explanations.length; ++j) + object.explanations[j] = $root.google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation.toObject(message.explanations[j], options); + } + if (message.errorAnalysisAnnotations && message.errorAnalysisAnnotations.length) { + object.errorAnalysisAnnotations = []; + for (var j = 0; j < message.errorAnalysisAnnotations.length; ++j) + object.errorAnalysisAnnotations[j] = $root.google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.toObject(message.errorAnalysisAnnotations[j], options); + } + return object; + }; + + /** + * Converts this EvaluatedAnnotation to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.EvaluatedAnnotation + * @instance + * @returns {Object.} JSON object + */ + EvaluatedAnnotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EvaluatedAnnotation + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.EvaluatedAnnotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EvaluatedAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.EvaluatedAnnotation"; + }; + + /** + * EvaluatedAnnotationType enum. + * @name google.cloud.aiplatform.v1.EvaluatedAnnotation.EvaluatedAnnotationType + * @enum {number} + * @property {number} EVALUATED_ANNOTATION_TYPE_UNSPECIFIED=0 EVALUATED_ANNOTATION_TYPE_UNSPECIFIED value + * @property {number} TRUE_POSITIVE=1 TRUE_POSITIVE value + * @property {number} FALSE_POSITIVE=2 FALSE_POSITIVE value + * @property {number} FALSE_NEGATIVE=3 FALSE_NEGATIVE value + */ + EvaluatedAnnotation.EvaluatedAnnotationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVALUATED_ANNOTATION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TRUE_POSITIVE"] = 1; + values[valuesById[2] = "FALSE_POSITIVE"] = 2; + values[valuesById[3] = "FALSE_NEGATIVE"] = 3; + return values; + })(); + + return EvaluatedAnnotation; + })(); + + v1.EvaluatedAnnotationExplanation = (function() { + + /** + * Properties of an EvaluatedAnnotationExplanation. + * @memberof google.cloud.aiplatform.v1 + * @interface IEvaluatedAnnotationExplanation + * @property {string|null} [explanationType] EvaluatedAnnotationExplanation explanationType + * @property {google.cloud.aiplatform.v1.IExplanation|null} [explanation] EvaluatedAnnotationExplanation explanation + */ + + /** + * Constructs a new EvaluatedAnnotationExplanation. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents an EvaluatedAnnotationExplanation. + * @implements IEvaluatedAnnotationExplanation + * @constructor + * @param {google.cloud.aiplatform.v1.IEvaluatedAnnotationExplanation=} [properties] Properties to set + */ + function EvaluatedAnnotationExplanation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EvaluatedAnnotationExplanation explanationType. + * @member {string} explanationType + * @memberof google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation + * @instance + */ + EvaluatedAnnotationExplanation.prototype.explanationType = ""; + + /** + * EvaluatedAnnotationExplanation explanation. + * @member {google.cloud.aiplatform.v1.IExplanation|null|undefined} explanation + * @memberof google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation + * @instance + */ + EvaluatedAnnotationExplanation.prototype.explanation = null; + + /** + * Creates a new EvaluatedAnnotationExplanation instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation + * @static + * @param {google.cloud.aiplatform.v1.IEvaluatedAnnotationExplanation=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation} EvaluatedAnnotationExplanation instance + */ + EvaluatedAnnotationExplanation.create = function create(properties) { + return new EvaluatedAnnotationExplanation(properties); + }; + + /** + * Encodes the specified EvaluatedAnnotationExplanation message. Does not implicitly {@link google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation + * @static + * @param {google.cloud.aiplatform.v1.IEvaluatedAnnotationExplanation} message EvaluatedAnnotationExplanation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvaluatedAnnotationExplanation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.explanationType != null && Object.hasOwnProperty.call(message, "explanationType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.explanationType); + if (message.explanation != null && Object.hasOwnProperty.call(message, "explanation")) + $root.google.cloud.aiplatform.v1.Explanation.encode(message.explanation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EvaluatedAnnotationExplanation message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation + * @static + * @param {google.cloud.aiplatform.v1.IEvaluatedAnnotationExplanation} message EvaluatedAnnotationExplanation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvaluatedAnnotationExplanation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EvaluatedAnnotationExplanation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation} EvaluatedAnnotationExplanation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvaluatedAnnotationExplanation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.explanationType = reader.string(); + break; + } + case 2: { + message.explanation = $root.google.cloud.aiplatform.v1.Explanation.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EvaluatedAnnotationExplanation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation} EvaluatedAnnotationExplanation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvaluatedAnnotationExplanation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EvaluatedAnnotationExplanation message. + * @function verify + * @memberof google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EvaluatedAnnotationExplanation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.explanationType != null && message.hasOwnProperty("explanationType")) + if (!$util.isString(message.explanationType)) + return "explanationType: string expected"; + if (message.explanation != null && message.hasOwnProperty("explanation")) { + var error = $root.google.cloud.aiplatform.v1.Explanation.verify(message.explanation); + if (error) + return "explanation." + error; + } + return null; + }; + + /** + * Creates an EvaluatedAnnotationExplanation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation} EvaluatedAnnotationExplanation + */ + EvaluatedAnnotationExplanation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation) + return object; + var message = new $root.google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation(); + if (object.explanationType != null) + message.explanationType = String(object.explanationType); + if (object.explanation != null) { + if (typeof object.explanation !== "object") + throw TypeError(".google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation.explanation: object expected"); + message.explanation = $root.google.cloud.aiplatform.v1.Explanation.fromObject(object.explanation); + } + return message; + }; + + /** + * Creates a plain object from an EvaluatedAnnotationExplanation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation + * @static + * @param {google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation} message EvaluatedAnnotationExplanation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EvaluatedAnnotationExplanation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.explanationType = ""; + object.explanation = null; + } + if (message.explanationType != null && message.hasOwnProperty("explanationType")) + object.explanationType = message.explanationType; + if (message.explanation != null && message.hasOwnProperty("explanation")) + object.explanation = $root.google.cloud.aiplatform.v1.Explanation.toObject(message.explanation, options); + return object; + }; + + /** + * Converts this EvaluatedAnnotationExplanation to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation + * @instance + * @returns {Object.} JSON object + */ + EvaluatedAnnotationExplanation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EvaluatedAnnotationExplanation + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EvaluatedAnnotationExplanation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation"; + }; + + return EvaluatedAnnotationExplanation; + })(); + + v1.ErrorAnalysisAnnotation = (function() { + + /** + * Properties of an ErrorAnalysisAnnotation. + * @memberof google.cloud.aiplatform.v1 + * @interface IErrorAnalysisAnnotation + * @property {Array.|null} [attributedItems] ErrorAnalysisAnnotation attributedItems + * @property {google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.QueryType|null} [queryType] ErrorAnalysisAnnotation queryType + * @property {number|null} [outlierScore] ErrorAnalysisAnnotation outlierScore + * @property {number|null} [outlierThreshold] ErrorAnalysisAnnotation outlierThreshold + */ + + /** + * Constructs a new ErrorAnalysisAnnotation. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents an ErrorAnalysisAnnotation. + * @implements IErrorAnalysisAnnotation + * @constructor + * @param {google.cloud.aiplatform.v1.IErrorAnalysisAnnotation=} [properties] Properties to set + */ + function ErrorAnalysisAnnotation(properties) { + this.attributedItems = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ErrorAnalysisAnnotation attributedItems. + * @member {Array.} attributedItems + * @memberof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation + * @instance + */ + ErrorAnalysisAnnotation.prototype.attributedItems = $util.emptyArray; + + /** + * ErrorAnalysisAnnotation queryType. + * @member {google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.QueryType} queryType + * @memberof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation + * @instance + */ + ErrorAnalysisAnnotation.prototype.queryType = 0; + + /** + * ErrorAnalysisAnnotation outlierScore. + * @member {number} outlierScore + * @memberof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation + * @instance + */ + ErrorAnalysisAnnotation.prototype.outlierScore = 0; + + /** + * ErrorAnalysisAnnotation outlierThreshold. + * @member {number} outlierThreshold + * @memberof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation + * @instance + */ + ErrorAnalysisAnnotation.prototype.outlierThreshold = 0; + + /** + * Creates a new ErrorAnalysisAnnotation instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation + * @static + * @param {google.cloud.aiplatform.v1.IErrorAnalysisAnnotation=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ErrorAnalysisAnnotation} ErrorAnalysisAnnotation instance + */ + ErrorAnalysisAnnotation.create = function create(properties) { + return new ErrorAnalysisAnnotation(properties); + }; + + /** + * Encodes the specified ErrorAnalysisAnnotation message. Does not implicitly {@link google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation + * @static + * @param {google.cloud.aiplatform.v1.IErrorAnalysisAnnotation} message ErrorAnalysisAnnotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorAnalysisAnnotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.attributedItems != null && message.attributedItems.length) + for (var i = 0; i < message.attributedItems.length; ++i) + $root.google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem.encode(message.attributedItems[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.queryType != null && Object.hasOwnProperty.call(message, "queryType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.queryType); + if (message.outlierScore != null && Object.hasOwnProperty.call(message, "outlierScore")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.outlierScore); + if (message.outlierThreshold != null && Object.hasOwnProperty.call(message, "outlierThreshold")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.outlierThreshold); + return writer; + }; + + /** + * Encodes the specified ErrorAnalysisAnnotation message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation + * @static + * @param {google.cloud.aiplatform.v1.IErrorAnalysisAnnotation} message ErrorAnalysisAnnotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorAnalysisAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ErrorAnalysisAnnotation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.ErrorAnalysisAnnotation} ErrorAnalysisAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorAnalysisAnnotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.ErrorAnalysisAnnotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.attributedItems && message.attributedItems.length)) + message.attributedItems = []; + message.attributedItems.push($root.google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem.decode(reader, reader.uint32())); + break; + } + case 2: { + message.queryType = reader.int32(); + break; + } + case 3: { + message.outlierScore = reader.double(); + break; + } + case 4: { + message.outlierThreshold = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ErrorAnalysisAnnotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.ErrorAnalysisAnnotation} ErrorAnalysisAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorAnalysisAnnotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ErrorAnalysisAnnotation message. + * @function verify + * @memberof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ErrorAnalysisAnnotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.attributedItems != null && message.hasOwnProperty("attributedItems")) { + if (!Array.isArray(message.attributedItems)) + return "attributedItems: array expected"; + for (var i = 0; i < message.attributedItems.length; ++i) { + var error = $root.google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem.verify(message.attributedItems[i]); + if (error) + return "attributedItems." + error; + } + } + if (message.queryType != null && message.hasOwnProperty("queryType")) + switch (message.queryType) { + default: + return "queryType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.outlierScore != null && message.hasOwnProperty("outlierScore")) + if (typeof message.outlierScore !== "number") + return "outlierScore: number expected"; + if (message.outlierThreshold != null && message.hasOwnProperty("outlierThreshold")) + if (typeof message.outlierThreshold !== "number") + return "outlierThreshold: number expected"; + return null; + }; + + /** + * Creates an ErrorAnalysisAnnotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.ErrorAnalysisAnnotation} ErrorAnalysisAnnotation + */ + ErrorAnalysisAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ErrorAnalysisAnnotation) + return object; + var message = new $root.google.cloud.aiplatform.v1.ErrorAnalysisAnnotation(); + if (object.attributedItems) { + if (!Array.isArray(object.attributedItems)) + throw TypeError(".google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.attributedItems: array expected"); + message.attributedItems = []; + for (var i = 0; i < object.attributedItems.length; ++i) { + if (typeof object.attributedItems[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.attributedItems: object expected"); + message.attributedItems[i] = $root.google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem.fromObject(object.attributedItems[i]); + } + } + switch (object.queryType) { + default: + if (typeof object.queryType === "number") { + message.queryType = object.queryType; + break; + } + break; + case "QUERY_TYPE_UNSPECIFIED": + case 0: + message.queryType = 0; + break; + case "ALL_SIMILAR": + case 1: + message.queryType = 1; + break; + case "SAME_CLASS_SIMILAR": + case 2: + message.queryType = 2; + break; + case "SAME_CLASS_DISSIMILAR": + case 3: + message.queryType = 3; + break; + } + if (object.outlierScore != null) + message.outlierScore = Number(object.outlierScore); + if (object.outlierThreshold != null) + message.outlierThreshold = Number(object.outlierThreshold); + return message; + }; + + /** + * Creates a plain object from an ErrorAnalysisAnnotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation + * @static + * @param {google.cloud.aiplatform.v1.ErrorAnalysisAnnotation} message ErrorAnalysisAnnotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ErrorAnalysisAnnotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.attributedItems = []; + if (options.defaults) { + object.queryType = options.enums === String ? "QUERY_TYPE_UNSPECIFIED" : 0; + object.outlierScore = 0; + object.outlierThreshold = 0; + } + if (message.attributedItems && message.attributedItems.length) { + object.attributedItems = []; + for (var j = 0; j < message.attributedItems.length; ++j) + object.attributedItems[j] = $root.google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem.toObject(message.attributedItems[j], options); + } + if (message.queryType != null && message.hasOwnProperty("queryType")) + object.queryType = options.enums === String ? $root.google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.QueryType[message.queryType] === undefined ? message.queryType : $root.google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.QueryType[message.queryType] : message.queryType; + if (message.outlierScore != null && message.hasOwnProperty("outlierScore")) + object.outlierScore = options.json && !isFinite(message.outlierScore) ? String(message.outlierScore) : message.outlierScore; + if (message.outlierThreshold != null && message.hasOwnProperty("outlierThreshold")) + object.outlierThreshold = options.json && !isFinite(message.outlierThreshold) ? String(message.outlierThreshold) : message.outlierThreshold; + return object; + }; + + /** + * Converts this ErrorAnalysisAnnotation to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation + * @instance + * @returns {Object.} JSON object + */ + ErrorAnalysisAnnotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ErrorAnalysisAnnotation + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ErrorAnalysisAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ErrorAnalysisAnnotation"; + }; + + ErrorAnalysisAnnotation.AttributedItem = (function() { + + /** + * Properties of an AttributedItem. + * @memberof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation + * @interface IAttributedItem + * @property {string|null} [annotationResourceName] AttributedItem annotationResourceName + * @property {number|null} [distance] AttributedItem distance + */ + + /** + * Constructs a new AttributedItem. + * @memberof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation + * @classdesc Represents an AttributedItem. + * @implements IAttributedItem + * @constructor + * @param {google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.IAttributedItem=} [properties] Properties to set + */ + function AttributedItem(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AttributedItem annotationResourceName. + * @member {string} annotationResourceName + * @memberof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem + * @instance + */ + AttributedItem.prototype.annotationResourceName = ""; + + /** + * AttributedItem distance. + * @member {number} distance + * @memberof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem + * @instance + */ + AttributedItem.prototype.distance = 0; + + /** + * Creates a new AttributedItem instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem + * @static + * @param {google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.IAttributedItem=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem} AttributedItem instance + */ + AttributedItem.create = function create(properties) { + return new AttributedItem(properties); + }; + + /** + * Encodes the specified AttributedItem message. Does not implicitly {@link google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem + * @static + * @param {google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.IAttributedItem} message AttributedItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttributedItem.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotationResourceName != null && Object.hasOwnProperty.call(message, "annotationResourceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.annotationResourceName); + if (message.distance != null && Object.hasOwnProperty.call(message, "distance")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.distance); + return writer; + }; + + /** + * Encodes the specified AttributedItem message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem + * @static + * @param {google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.IAttributedItem} message AttributedItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttributedItem.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AttributedItem message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem} AttributedItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttributedItem.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.annotationResourceName = reader.string(); + break; + } + case 2: { + message.distance = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AttributedItem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem} AttributedItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttributedItem.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AttributedItem message. + * @function verify + * @memberof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AttributedItem.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotationResourceName != null && message.hasOwnProperty("annotationResourceName")) + if (!$util.isString(message.annotationResourceName)) + return "annotationResourceName: string expected"; + if (message.distance != null && message.hasOwnProperty("distance")) + if (typeof message.distance !== "number") + return "distance: number expected"; + return null; + }; + + /** + * Creates an AttributedItem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem} AttributedItem + */ + AttributedItem.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem) + return object; + var message = new $root.google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem(); + if (object.annotationResourceName != null) + message.annotationResourceName = String(object.annotationResourceName); + if (object.distance != null) + message.distance = Number(object.distance); + return message; + }; + + /** + * Creates a plain object from an AttributedItem message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem + * @static + * @param {google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem} message AttributedItem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AttributedItem.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.annotationResourceName = ""; + object.distance = 0; + } + if (message.annotationResourceName != null && message.hasOwnProperty("annotationResourceName")) + object.annotationResourceName = message.annotationResourceName; + if (message.distance != null && message.hasOwnProperty("distance")) + object.distance = options.json && !isFinite(message.distance) ? String(message.distance) : message.distance; + return object; + }; + + /** + * Converts this AttributedItem to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem + * @instance + * @returns {Object.} JSON object + */ + AttributedItem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AttributedItem + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AttributedItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem"; + }; + + return AttributedItem; + })(); + + /** + * QueryType enum. + * @name google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.QueryType + * @enum {number} + * @property {number} QUERY_TYPE_UNSPECIFIED=0 QUERY_TYPE_UNSPECIFIED value + * @property {number} ALL_SIMILAR=1 ALL_SIMILAR value + * @property {number} SAME_CLASS_SIMILAR=2 SAME_CLASS_SIMILAR value + * @property {number} SAME_CLASS_DISSIMILAR=3 SAME_CLASS_DISSIMILAR value + */ + ErrorAnalysisAnnotation.QueryType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "QUERY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALL_SIMILAR"] = 1; + values[valuesById[2] = "SAME_CLASS_SIMILAR"] = 2; + values[valuesById[3] = "SAME_CLASS_DISSIMILAR"] = 3; + return values; + })(); + + return ErrorAnalysisAnnotation; + })(); + v1.Event = (function() { /** @@ -42071,6 +43676,7 @@ * @interface IScaling * @property {number|null} [minNodeCount] Scaling minNodeCount * @property {number|null} [maxNodeCount] Scaling maxNodeCount + * @property {number|null} [cpuUtilizationTarget] Scaling cpuUtilizationTarget */ /** @@ -42104,6 +43710,14 @@ */ Scaling.prototype.maxNodeCount = 0; + /** + * Scaling cpuUtilizationTarget. + * @member {number} cpuUtilizationTarget + * @memberof google.cloud.aiplatform.v1.Featurestore.OnlineServingConfig.Scaling + * @instance + */ + Scaling.prototype.cpuUtilizationTarget = 0; + /** * Creates a new Scaling instance using the specified properties. * @function create @@ -42132,6 +43746,8 @@ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.minNodeCount); if (message.maxNodeCount != null && Object.hasOwnProperty.call(message, "maxNodeCount")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxNodeCount); + if (message.cpuUtilizationTarget != null && Object.hasOwnProperty.call(message, "cpuUtilizationTarget")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.cpuUtilizationTarget); return writer; }; @@ -42174,6 +43790,10 @@ message.maxNodeCount = reader.int32(); break; } + case 3: { + message.cpuUtilizationTarget = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -42215,6 +43835,9 @@ if (message.maxNodeCount != null && message.hasOwnProperty("maxNodeCount")) if (!$util.isInteger(message.maxNodeCount)) return "maxNodeCount: integer expected"; + if (message.cpuUtilizationTarget != null && message.hasOwnProperty("cpuUtilizationTarget")) + if (!$util.isInteger(message.cpuUtilizationTarget)) + return "cpuUtilizationTarget: integer expected"; return null; }; @@ -42234,6 +43857,8 @@ message.minNodeCount = object.minNodeCount | 0; if (object.maxNodeCount != null) message.maxNodeCount = object.maxNodeCount | 0; + if (object.cpuUtilizationTarget != null) + message.cpuUtilizationTarget = object.cpuUtilizationTarget | 0; return message; }; @@ -42253,11 +43878,14 @@ if (options.defaults) { object.minNodeCount = 0; object.maxNodeCount = 0; + object.cpuUtilizationTarget = 0; } if (message.minNodeCount != null && message.hasOwnProperty("minNodeCount")) object.minNodeCount = message.minNodeCount; if (message.maxNodeCount != null && message.hasOwnProperty("maxNodeCount")) object.maxNodeCount = message.maxNodeCount; + if (message.cpuUtilizationTarget != null && message.hasOwnProperty("cpuUtilizationTarget")) + object.cpuUtilizationTarget = message.cpuUtilizationTarget; return object; }; @@ -47383,6 +49011,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.aiplatform.v1.FeaturestoreService|deleteFeatureValues}. + * @memberof google.cloud.aiplatform.v1.FeaturestoreService + * @typedef DeleteFeatureValuesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteFeatureValues. + * @function deleteFeatureValues + * @memberof google.cloud.aiplatform.v1.FeaturestoreService + * @instance + * @param {google.cloud.aiplatform.v1.IDeleteFeatureValuesRequest} request DeleteFeatureValuesRequest message or plain object + * @param {google.cloud.aiplatform.v1.FeaturestoreService.DeleteFeatureValuesCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(FeaturestoreService.prototype.deleteFeatureValues = function deleteFeatureValues(request, callback) { + return this.rpcCall(deleteFeatureValues, $root.google.cloud.aiplatform.v1.DeleteFeatureValuesRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteFeatureValues" }); + + /** + * Calls DeleteFeatureValues. + * @function deleteFeatureValues + * @memberof google.cloud.aiplatform.v1.FeaturestoreService + * @instance + * @param {google.cloud.aiplatform.v1.IDeleteFeatureValuesRequest} request DeleteFeatureValuesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.cloud.aiplatform.v1.FeaturestoreService|searchFeatures}. * @memberof google.cloud.aiplatform.v1.FeaturestoreService @@ -57859,6 +59520,214 @@ return BatchReadFeatureValuesOperationMetadata; })(); + v1.DeleteFeatureValuesOperationMetadata = (function() { + + /** + * Properties of a DeleteFeatureValuesOperationMetadata. + * @memberof google.cloud.aiplatform.v1 + * @interface IDeleteFeatureValuesOperationMetadata + * @property {google.cloud.aiplatform.v1.IGenericOperationMetadata|null} [genericMetadata] DeleteFeatureValuesOperationMetadata genericMetadata + */ + + /** + * Constructs a new DeleteFeatureValuesOperationMetadata. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a DeleteFeatureValuesOperationMetadata. + * @implements IDeleteFeatureValuesOperationMetadata + * @constructor + * @param {google.cloud.aiplatform.v1.IDeleteFeatureValuesOperationMetadata=} [properties] Properties to set + */ + function DeleteFeatureValuesOperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteFeatureValuesOperationMetadata genericMetadata. + * @member {google.cloud.aiplatform.v1.IGenericOperationMetadata|null|undefined} genericMetadata + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata + * @instance + */ + DeleteFeatureValuesOperationMetadata.prototype.genericMetadata = null; + + /** + * Creates a new DeleteFeatureValuesOperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata + * @static + * @param {google.cloud.aiplatform.v1.IDeleteFeatureValuesOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata} DeleteFeatureValuesOperationMetadata instance + */ + DeleteFeatureValuesOperationMetadata.create = function create(properties) { + return new DeleteFeatureValuesOperationMetadata(properties); + }; + + /** + * Encodes the specified DeleteFeatureValuesOperationMetadata message. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata + * @static + * @param {google.cloud.aiplatform.v1.IDeleteFeatureValuesOperationMetadata} message DeleteFeatureValuesOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFeatureValuesOperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.genericMetadata != null && Object.hasOwnProperty.call(message, "genericMetadata")) + $root.google.cloud.aiplatform.v1.GenericOperationMetadata.encode(message.genericMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeleteFeatureValuesOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata + * @static + * @param {google.cloud.aiplatform.v1.IDeleteFeatureValuesOperationMetadata} message DeleteFeatureValuesOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFeatureValuesOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteFeatureValuesOperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata} DeleteFeatureValuesOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFeatureValuesOperationMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.genericMetadata = $root.google.cloud.aiplatform.v1.GenericOperationMetadata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteFeatureValuesOperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata} DeleteFeatureValuesOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFeatureValuesOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteFeatureValuesOperationMetadata message. + * @function verify + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteFeatureValuesOperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.genericMetadata != null && message.hasOwnProperty("genericMetadata")) { + var error = $root.google.cloud.aiplatform.v1.GenericOperationMetadata.verify(message.genericMetadata); + if (error) + return "genericMetadata." + error; + } + return null; + }; + + /** + * Creates a DeleteFeatureValuesOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata} DeleteFeatureValuesOperationMetadata + */ + DeleteFeatureValuesOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata) + return object; + var message = new $root.google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata(); + if (object.genericMetadata != null) { + if (typeof object.genericMetadata !== "object") + throw TypeError(".google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata.genericMetadata: object expected"); + message.genericMetadata = $root.google.cloud.aiplatform.v1.GenericOperationMetadata.fromObject(object.genericMetadata); + } + return message; + }; + + /** + * Creates a plain object from a DeleteFeatureValuesOperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata + * @static + * @param {google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata} message DeleteFeatureValuesOperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteFeatureValuesOperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.genericMetadata = null; + if (message.genericMetadata != null && message.hasOwnProperty("genericMetadata")) + object.genericMetadata = $root.google.cloud.aiplatform.v1.GenericOperationMetadata.toObject(message.genericMetadata, options); + return object; + }; + + /** + * Converts this DeleteFeatureValuesOperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata + * @instance + * @returns {Object.} JSON object + */ + DeleteFeatureValuesOperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteFeatureValuesOperationMetadata + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteFeatureValuesOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata"; + }; + + return DeleteFeatureValuesOperationMetadata; + })(); + v1.CreateEntityTypeOperationMetadata = (function() { /** @@ -58483,6 +60352,1820 @@ return BatchCreateFeaturesOperationMetadata; })(); + v1.DeleteFeatureValuesRequest = (function() { + + /** + * Properties of a DeleteFeatureValuesRequest. + * @memberof google.cloud.aiplatform.v1 + * @interface IDeleteFeatureValuesRequest + * @property {google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.ISelectEntity|null} [selectEntity] DeleteFeatureValuesRequest selectEntity + * @property {google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.ISelectTimeRangeAndFeature|null} [selectTimeRangeAndFeature] DeleteFeatureValuesRequest selectTimeRangeAndFeature + * @property {string|null} [entityType] DeleteFeatureValuesRequest entityType + */ + + /** + * Constructs a new DeleteFeatureValuesRequest. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a DeleteFeatureValuesRequest. + * @implements IDeleteFeatureValuesRequest + * @constructor + * @param {google.cloud.aiplatform.v1.IDeleteFeatureValuesRequest=} [properties] Properties to set + */ + function DeleteFeatureValuesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteFeatureValuesRequest selectEntity. + * @member {google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.ISelectEntity|null|undefined} selectEntity + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest + * @instance + */ + DeleteFeatureValuesRequest.prototype.selectEntity = null; + + /** + * DeleteFeatureValuesRequest selectTimeRangeAndFeature. + * @member {google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.ISelectTimeRangeAndFeature|null|undefined} selectTimeRangeAndFeature + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest + * @instance + */ + DeleteFeatureValuesRequest.prototype.selectTimeRangeAndFeature = null; + + /** + * DeleteFeatureValuesRequest entityType. + * @member {string} entityType + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest + * @instance + */ + DeleteFeatureValuesRequest.prototype.entityType = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DeleteFeatureValuesRequest DeleteOption. + * @member {"selectEntity"|"selectTimeRangeAndFeature"|undefined} DeleteOption + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest + * @instance + */ + Object.defineProperty(DeleteFeatureValuesRequest.prototype, "DeleteOption", { + get: $util.oneOfGetter($oneOfFields = ["selectEntity", "selectTimeRangeAndFeature"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DeleteFeatureValuesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest + * @static + * @param {google.cloud.aiplatform.v1.IDeleteFeatureValuesRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.DeleteFeatureValuesRequest} DeleteFeatureValuesRequest instance + */ + DeleteFeatureValuesRequest.create = function create(properties) { + return new DeleteFeatureValuesRequest(properties); + }; + + /** + * Encodes the specified DeleteFeatureValuesRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest + * @static + * @param {google.cloud.aiplatform.v1.IDeleteFeatureValuesRequest} message DeleteFeatureValuesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFeatureValuesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.entityType); + if (message.selectEntity != null && Object.hasOwnProperty.call(message, "selectEntity")) + $root.google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity.encode(message.selectEntity, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.selectTimeRangeAndFeature != null && Object.hasOwnProperty.call(message, "selectTimeRangeAndFeature")) + $root.google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature.encode(message.selectTimeRangeAndFeature, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeleteFeatureValuesRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest + * @static + * @param {google.cloud.aiplatform.v1.IDeleteFeatureValuesRequest} message DeleteFeatureValuesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFeatureValuesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteFeatureValuesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.DeleteFeatureValuesRequest} DeleteFeatureValuesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFeatureValuesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.DeleteFeatureValuesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.selectEntity = $root.google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity.decode(reader, reader.uint32()); + break; + } + case 3: { + message.selectTimeRangeAndFeature = $root.google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature.decode(reader, reader.uint32()); + break; + } + case 1: { + message.entityType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteFeatureValuesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.DeleteFeatureValuesRequest} DeleteFeatureValuesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFeatureValuesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteFeatureValuesRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteFeatureValuesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selectEntity != null && message.hasOwnProperty("selectEntity")) { + properties.DeleteOption = 1; + { + var error = $root.google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity.verify(message.selectEntity); + if (error) + return "selectEntity." + error; + } + } + if (message.selectTimeRangeAndFeature != null && message.hasOwnProperty("selectTimeRangeAndFeature")) { + if (properties.DeleteOption === 1) + return "DeleteOption: multiple values"; + properties.DeleteOption = 1; + { + var error = $root.google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature.verify(message.selectTimeRangeAndFeature); + if (error) + return "selectTimeRangeAndFeature." + error; + } + } + if (message.entityType != null && message.hasOwnProperty("entityType")) + if (!$util.isString(message.entityType)) + return "entityType: string expected"; + return null; + }; + + /** + * Creates a DeleteFeatureValuesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.DeleteFeatureValuesRequest} DeleteFeatureValuesRequest + */ + DeleteFeatureValuesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.DeleteFeatureValuesRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1.DeleteFeatureValuesRequest(); + if (object.selectEntity != null) { + if (typeof object.selectEntity !== "object") + throw TypeError(".google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.selectEntity: object expected"); + message.selectEntity = $root.google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity.fromObject(object.selectEntity); + } + if (object.selectTimeRangeAndFeature != null) { + if (typeof object.selectTimeRangeAndFeature !== "object") + throw TypeError(".google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.selectTimeRangeAndFeature: object expected"); + message.selectTimeRangeAndFeature = $root.google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature.fromObject(object.selectTimeRangeAndFeature); + } + if (object.entityType != null) + message.entityType = String(object.entityType); + return message; + }; + + /** + * Creates a plain object from a DeleteFeatureValuesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest + * @static + * @param {google.cloud.aiplatform.v1.DeleteFeatureValuesRequest} message DeleteFeatureValuesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteFeatureValuesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.entityType = ""; + if (message.entityType != null && message.hasOwnProperty("entityType")) + object.entityType = message.entityType; + if (message.selectEntity != null && message.hasOwnProperty("selectEntity")) { + object.selectEntity = $root.google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity.toObject(message.selectEntity, options); + if (options.oneofs) + object.DeleteOption = "selectEntity"; + } + if (message.selectTimeRangeAndFeature != null && message.hasOwnProperty("selectTimeRangeAndFeature")) { + object.selectTimeRangeAndFeature = $root.google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature.toObject(message.selectTimeRangeAndFeature, options); + if (options.oneofs) + object.DeleteOption = "selectTimeRangeAndFeature"; + } + return object; + }; + + /** + * Converts this DeleteFeatureValuesRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteFeatureValuesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteFeatureValuesRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteFeatureValuesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.DeleteFeatureValuesRequest"; + }; + + DeleteFeatureValuesRequest.SelectEntity = (function() { + + /** + * Properties of a SelectEntity. + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest + * @interface ISelectEntity + * @property {google.cloud.aiplatform.v1.IEntityIdSelector|null} [entityIdSelector] SelectEntity entityIdSelector + */ + + /** + * Constructs a new SelectEntity. + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest + * @classdesc Represents a SelectEntity. + * @implements ISelectEntity + * @constructor + * @param {google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.ISelectEntity=} [properties] Properties to set + */ + function SelectEntity(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SelectEntity entityIdSelector. + * @member {google.cloud.aiplatform.v1.IEntityIdSelector|null|undefined} entityIdSelector + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity + * @instance + */ + SelectEntity.prototype.entityIdSelector = null; + + /** + * Creates a new SelectEntity instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity + * @static + * @param {google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.ISelectEntity=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity} SelectEntity instance + */ + SelectEntity.create = function create(properties) { + return new SelectEntity(properties); + }; + + /** + * Encodes the specified SelectEntity message. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity + * @static + * @param {google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.ISelectEntity} message SelectEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectEntity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entityIdSelector != null && Object.hasOwnProperty.call(message, "entityIdSelector")) + $root.google.cloud.aiplatform.v1.EntityIdSelector.encode(message.entityIdSelector, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SelectEntity message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity + * @static + * @param {google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.ISelectEntity} message SelectEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectEntity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SelectEntity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity} SelectEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectEntity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.entityIdSelector = $root.google.cloud.aiplatform.v1.EntityIdSelector.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SelectEntity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity} SelectEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectEntity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SelectEntity message. + * @function verify + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SelectEntity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entityIdSelector != null && message.hasOwnProperty("entityIdSelector")) { + var error = $root.google.cloud.aiplatform.v1.EntityIdSelector.verify(message.entityIdSelector); + if (error) + return "entityIdSelector." + error; + } + return null; + }; + + /** + * Creates a SelectEntity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity} SelectEntity + */ + SelectEntity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity) + return object; + var message = new $root.google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity(); + if (object.entityIdSelector != null) { + if (typeof object.entityIdSelector !== "object") + throw TypeError(".google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity.entityIdSelector: object expected"); + message.entityIdSelector = $root.google.cloud.aiplatform.v1.EntityIdSelector.fromObject(object.entityIdSelector); + } + return message; + }; + + /** + * Creates a plain object from a SelectEntity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity + * @static + * @param {google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity} message SelectEntity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SelectEntity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.entityIdSelector = null; + if (message.entityIdSelector != null && message.hasOwnProperty("entityIdSelector")) + object.entityIdSelector = $root.google.cloud.aiplatform.v1.EntityIdSelector.toObject(message.entityIdSelector, options); + return object; + }; + + /** + * Converts this SelectEntity to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity + * @instance + * @returns {Object.} JSON object + */ + SelectEntity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SelectEntity + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SelectEntity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity"; + }; + + return SelectEntity; + })(); + + DeleteFeatureValuesRequest.SelectTimeRangeAndFeature = (function() { + + /** + * Properties of a SelectTimeRangeAndFeature. + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest + * @interface ISelectTimeRangeAndFeature + * @property {google.type.IInterval|null} [timeRange] SelectTimeRangeAndFeature timeRange + * @property {google.cloud.aiplatform.v1.IFeatureSelector|null} [featureSelector] SelectTimeRangeAndFeature featureSelector + * @property {boolean|null} [skipOnlineStorageDelete] SelectTimeRangeAndFeature skipOnlineStorageDelete + */ + + /** + * Constructs a new SelectTimeRangeAndFeature. + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest + * @classdesc Represents a SelectTimeRangeAndFeature. + * @implements ISelectTimeRangeAndFeature + * @constructor + * @param {google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.ISelectTimeRangeAndFeature=} [properties] Properties to set + */ + function SelectTimeRangeAndFeature(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SelectTimeRangeAndFeature timeRange. + * @member {google.type.IInterval|null|undefined} timeRange + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature + * @instance + */ + SelectTimeRangeAndFeature.prototype.timeRange = null; + + /** + * SelectTimeRangeAndFeature featureSelector. + * @member {google.cloud.aiplatform.v1.IFeatureSelector|null|undefined} featureSelector + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature + * @instance + */ + SelectTimeRangeAndFeature.prototype.featureSelector = null; + + /** + * SelectTimeRangeAndFeature skipOnlineStorageDelete. + * @member {boolean} skipOnlineStorageDelete + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature + * @instance + */ + SelectTimeRangeAndFeature.prototype.skipOnlineStorageDelete = false; + + /** + * Creates a new SelectTimeRangeAndFeature instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature + * @static + * @param {google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.ISelectTimeRangeAndFeature=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature} SelectTimeRangeAndFeature instance + */ + SelectTimeRangeAndFeature.create = function create(properties) { + return new SelectTimeRangeAndFeature(properties); + }; + + /** + * Encodes the specified SelectTimeRangeAndFeature message. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature + * @static + * @param {google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.ISelectTimeRangeAndFeature} message SelectTimeRangeAndFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectTimeRangeAndFeature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timeRange != null && Object.hasOwnProperty.call(message, "timeRange")) + $root.google.type.Interval.encode(message.timeRange, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.featureSelector != null && Object.hasOwnProperty.call(message, "featureSelector")) + $root.google.cloud.aiplatform.v1.FeatureSelector.encode(message.featureSelector, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.skipOnlineStorageDelete != null && Object.hasOwnProperty.call(message, "skipOnlineStorageDelete")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.skipOnlineStorageDelete); + return writer; + }; + + /** + * Encodes the specified SelectTimeRangeAndFeature message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature + * @static + * @param {google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.ISelectTimeRangeAndFeature} message SelectTimeRangeAndFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectTimeRangeAndFeature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SelectTimeRangeAndFeature message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature} SelectTimeRangeAndFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectTimeRangeAndFeature.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.timeRange = $root.google.type.Interval.decode(reader, reader.uint32()); + break; + } + case 2: { + message.featureSelector = $root.google.cloud.aiplatform.v1.FeatureSelector.decode(reader, reader.uint32()); + break; + } + case 3: { + message.skipOnlineStorageDelete = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SelectTimeRangeAndFeature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature} SelectTimeRangeAndFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectTimeRangeAndFeature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SelectTimeRangeAndFeature message. + * @function verify + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SelectTimeRangeAndFeature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.timeRange != null && message.hasOwnProperty("timeRange")) { + var error = $root.google.type.Interval.verify(message.timeRange); + if (error) + return "timeRange." + error; + } + if (message.featureSelector != null && message.hasOwnProperty("featureSelector")) { + var error = $root.google.cloud.aiplatform.v1.FeatureSelector.verify(message.featureSelector); + if (error) + return "featureSelector." + error; + } + if (message.skipOnlineStorageDelete != null && message.hasOwnProperty("skipOnlineStorageDelete")) + if (typeof message.skipOnlineStorageDelete !== "boolean") + return "skipOnlineStorageDelete: boolean expected"; + return null; + }; + + /** + * Creates a SelectTimeRangeAndFeature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature} SelectTimeRangeAndFeature + */ + SelectTimeRangeAndFeature.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature) + return object; + var message = new $root.google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature(); + if (object.timeRange != null) { + if (typeof object.timeRange !== "object") + throw TypeError(".google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature.timeRange: object expected"); + message.timeRange = $root.google.type.Interval.fromObject(object.timeRange); + } + if (object.featureSelector != null) { + if (typeof object.featureSelector !== "object") + throw TypeError(".google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature.featureSelector: object expected"); + message.featureSelector = $root.google.cloud.aiplatform.v1.FeatureSelector.fromObject(object.featureSelector); + } + if (object.skipOnlineStorageDelete != null) + message.skipOnlineStorageDelete = Boolean(object.skipOnlineStorageDelete); + return message; + }; + + /** + * Creates a plain object from a SelectTimeRangeAndFeature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature + * @static + * @param {google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature} message SelectTimeRangeAndFeature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SelectTimeRangeAndFeature.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.timeRange = null; + object.featureSelector = null; + object.skipOnlineStorageDelete = false; + } + if (message.timeRange != null && message.hasOwnProperty("timeRange")) + object.timeRange = $root.google.type.Interval.toObject(message.timeRange, options); + if (message.featureSelector != null && message.hasOwnProperty("featureSelector")) + object.featureSelector = $root.google.cloud.aiplatform.v1.FeatureSelector.toObject(message.featureSelector, options); + if (message.skipOnlineStorageDelete != null && message.hasOwnProperty("skipOnlineStorageDelete")) + object.skipOnlineStorageDelete = message.skipOnlineStorageDelete; + return object; + }; + + /** + * Converts this SelectTimeRangeAndFeature to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature + * @instance + * @returns {Object.} JSON object + */ + SelectTimeRangeAndFeature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SelectTimeRangeAndFeature + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SelectTimeRangeAndFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature"; + }; + + return SelectTimeRangeAndFeature; + })(); + + return DeleteFeatureValuesRequest; + })(); + + v1.DeleteFeatureValuesResponse = (function() { + + /** + * Properties of a DeleteFeatureValuesResponse. + * @memberof google.cloud.aiplatform.v1 + * @interface IDeleteFeatureValuesResponse + * @property {google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.ISelectEntity|null} [selectEntity] DeleteFeatureValuesResponse selectEntity + * @property {google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.ISelectTimeRangeAndFeature|null} [selectTimeRangeAndFeature] DeleteFeatureValuesResponse selectTimeRangeAndFeature + */ + + /** + * Constructs a new DeleteFeatureValuesResponse. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a DeleteFeatureValuesResponse. + * @implements IDeleteFeatureValuesResponse + * @constructor + * @param {google.cloud.aiplatform.v1.IDeleteFeatureValuesResponse=} [properties] Properties to set + */ + function DeleteFeatureValuesResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteFeatureValuesResponse selectEntity. + * @member {google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.ISelectEntity|null|undefined} selectEntity + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse + * @instance + */ + DeleteFeatureValuesResponse.prototype.selectEntity = null; + + /** + * DeleteFeatureValuesResponse selectTimeRangeAndFeature. + * @member {google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.ISelectTimeRangeAndFeature|null|undefined} selectTimeRangeAndFeature + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse + * @instance + */ + DeleteFeatureValuesResponse.prototype.selectTimeRangeAndFeature = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DeleteFeatureValuesResponse response. + * @member {"selectEntity"|"selectTimeRangeAndFeature"|undefined} response + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse + * @instance + */ + Object.defineProperty(DeleteFeatureValuesResponse.prototype, "response", { + get: $util.oneOfGetter($oneOfFields = ["selectEntity", "selectTimeRangeAndFeature"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DeleteFeatureValuesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse + * @static + * @param {google.cloud.aiplatform.v1.IDeleteFeatureValuesResponse=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.DeleteFeatureValuesResponse} DeleteFeatureValuesResponse instance + */ + DeleteFeatureValuesResponse.create = function create(properties) { + return new DeleteFeatureValuesResponse(properties); + }; + + /** + * Encodes the specified DeleteFeatureValuesResponse message. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse + * @static + * @param {google.cloud.aiplatform.v1.IDeleteFeatureValuesResponse} message DeleteFeatureValuesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFeatureValuesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selectEntity != null && Object.hasOwnProperty.call(message, "selectEntity")) + $root.google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity.encode(message.selectEntity, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.selectTimeRangeAndFeature != null && Object.hasOwnProperty.call(message, "selectTimeRangeAndFeature")) + $root.google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature.encode(message.selectTimeRangeAndFeature, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeleteFeatureValuesResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse + * @static + * @param {google.cloud.aiplatform.v1.IDeleteFeatureValuesResponse} message DeleteFeatureValuesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFeatureValuesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteFeatureValuesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.DeleteFeatureValuesResponse} DeleteFeatureValuesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFeatureValuesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.DeleteFeatureValuesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selectEntity = $root.google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity.decode(reader, reader.uint32()); + break; + } + case 2: { + message.selectTimeRangeAndFeature = $root.google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteFeatureValuesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.DeleteFeatureValuesResponse} DeleteFeatureValuesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFeatureValuesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteFeatureValuesResponse message. + * @function verify + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteFeatureValuesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selectEntity != null && message.hasOwnProperty("selectEntity")) { + properties.response = 1; + { + var error = $root.google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity.verify(message.selectEntity); + if (error) + return "selectEntity." + error; + } + } + if (message.selectTimeRangeAndFeature != null && message.hasOwnProperty("selectTimeRangeAndFeature")) { + if (properties.response === 1) + return "response: multiple values"; + properties.response = 1; + { + var error = $root.google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature.verify(message.selectTimeRangeAndFeature); + if (error) + return "selectTimeRangeAndFeature." + error; + } + } + return null; + }; + + /** + * Creates a DeleteFeatureValuesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.DeleteFeatureValuesResponse} DeleteFeatureValuesResponse + */ + DeleteFeatureValuesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.DeleteFeatureValuesResponse) + return object; + var message = new $root.google.cloud.aiplatform.v1.DeleteFeatureValuesResponse(); + if (object.selectEntity != null) { + if (typeof object.selectEntity !== "object") + throw TypeError(".google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.selectEntity: object expected"); + message.selectEntity = $root.google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity.fromObject(object.selectEntity); + } + if (object.selectTimeRangeAndFeature != null) { + if (typeof object.selectTimeRangeAndFeature !== "object") + throw TypeError(".google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.selectTimeRangeAndFeature: object expected"); + message.selectTimeRangeAndFeature = $root.google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature.fromObject(object.selectTimeRangeAndFeature); + } + return message; + }; + + /** + * Creates a plain object from a DeleteFeatureValuesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse + * @static + * @param {google.cloud.aiplatform.v1.DeleteFeatureValuesResponse} message DeleteFeatureValuesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteFeatureValuesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.selectEntity != null && message.hasOwnProperty("selectEntity")) { + object.selectEntity = $root.google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity.toObject(message.selectEntity, options); + if (options.oneofs) + object.response = "selectEntity"; + } + if (message.selectTimeRangeAndFeature != null && message.hasOwnProperty("selectTimeRangeAndFeature")) { + object.selectTimeRangeAndFeature = $root.google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature.toObject(message.selectTimeRangeAndFeature, options); + if (options.oneofs) + object.response = "selectTimeRangeAndFeature"; + } + return object; + }; + + /** + * Converts this DeleteFeatureValuesResponse to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse + * @instance + * @returns {Object.} JSON object + */ + DeleteFeatureValuesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteFeatureValuesResponse + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteFeatureValuesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.DeleteFeatureValuesResponse"; + }; + + DeleteFeatureValuesResponse.SelectEntity = (function() { + + /** + * Properties of a SelectEntity. + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse + * @interface ISelectEntity + * @property {number|Long|null} [offlineStorageDeletedEntityRowCount] SelectEntity offlineStorageDeletedEntityRowCount + * @property {number|Long|null} [onlineStorageDeletedEntityCount] SelectEntity onlineStorageDeletedEntityCount + */ + + /** + * Constructs a new SelectEntity. + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse + * @classdesc Represents a SelectEntity. + * @implements ISelectEntity + * @constructor + * @param {google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.ISelectEntity=} [properties] Properties to set + */ + function SelectEntity(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SelectEntity offlineStorageDeletedEntityRowCount. + * @member {number|Long} offlineStorageDeletedEntityRowCount + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity + * @instance + */ + SelectEntity.prototype.offlineStorageDeletedEntityRowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * SelectEntity onlineStorageDeletedEntityCount. + * @member {number|Long} onlineStorageDeletedEntityCount + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity + * @instance + */ + SelectEntity.prototype.onlineStorageDeletedEntityCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new SelectEntity instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity + * @static + * @param {google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.ISelectEntity=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity} SelectEntity instance + */ + SelectEntity.create = function create(properties) { + return new SelectEntity(properties); + }; + + /** + * Encodes the specified SelectEntity message. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity + * @static + * @param {google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.ISelectEntity} message SelectEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectEntity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.offlineStorageDeletedEntityRowCount != null && Object.hasOwnProperty.call(message, "offlineStorageDeletedEntityRowCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.offlineStorageDeletedEntityRowCount); + if (message.onlineStorageDeletedEntityCount != null && Object.hasOwnProperty.call(message, "onlineStorageDeletedEntityCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.onlineStorageDeletedEntityCount); + return writer; + }; + + /** + * Encodes the specified SelectEntity message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity + * @static + * @param {google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.ISelectEntity} message SelectEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectEntity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SelectEntity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity} SelectEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectEntity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.offlineStorageDeletedEntityRowCount = reader.int64(); + break; + } + case 2: { + message.onlineStorageDeletedEntityCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SelectEntity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity} SelectEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectEntity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SelectEntity message. + * @function verify + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SelectEntity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.offlineStorageDeletedEntityRowCount != null && message.hasOwnProperty("offlineStorageDeletedEntityRowCount")) + if (!$util.isInteger(message.offlineStorageDeletedEntityRowCount) && !(message.offlineStorageDeletedEntityRowCount && $util.isInteger(message.offlineStorageDeletedEntityRowCount.low) && $util.isInteger(message.offlineStorageDeletedEntityRowCount.high))) + return "offlineStorageDeletedEntityRowCount: integer|Long expected"; + if (message.onlineStorageDeletedEntityCount != null && message.hasOwnProperty("onlineStorageDeletedEntityCount")) + if (!$util.isInteger(message.onlineStorageDeletedEntityCount) && !(message.onlineStorageDeletedEntityCount && $util.isInteger(message.onlineStorageDeletedEntityCount.low) && $util.isInteger(message.onlineStorageDeletedEntityCount.high))) + return "onlineStorageDeletedEntityCount: integer|Long expected"; + return null; + }; + + /** + * Creates a SelectEntity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity} SelectEntity + */ + SelectEntity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity) + return object; + var message = new $root.google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity(); + if (object.offlineStorageDeletedEntityRowCount != null) + if ($util.Long) + (message.offlineStorageDeletedEntityRowCount = $util.Long.fromValue(object.offlineStorageDeletedEntityRowCount)).unsigned = false; + else if (typeof object.offlineStorageDeletedEntityRowCount === "string") + message.offlineStorageDeletedEntityRowCount = parseInt(object.offlineStorageDeletedEntityRowCount, 10); + else if (typeof object.offlineStorageDeletedEntityRowCount === "number") + message.offlineStorageDeletedEntityRowCount = object.offlineStorageDeletedEntityRowCount; + else if (typeof object.offlineStorageDeletedEntityRowCount === "object") + message.offlineStorageDeletedEntityRowCount = new $util.LongBits(object.offlineStorageDeletedEntityRowCount.low >>> 0, object.offlineStorageDeletedEntityRowCount.high >>> 0).toNumber(); + if (object.onlineStorageDeletedEntityCount != null) + if ($util.Long) + (message.onlineStorageDeletedEntityCount = $util.Long.fromValue(object.onlineStorageDeletedEntityCount)).unsigned = false; + else if (typeof object.onlineStorageDeletedEntityCount === "string") + message.onlineStorageDeletedEntityCount = parseInt(object.onlineStorageDeletedEntityCount, 10); + else if (typeof object.onlineStorageDeletedEntityCount === "number") + message.onlineStorageDeletedEntityCount = object.onlineStorageDeletedEntityCount; + else if (typeof object.onlineStorageDeletedEntityCount === "object") + message.onlineStorageDeletedEntityCount = new $util.LongBits(object.onlineStorageDeletedEntityCount.low >>> 0, object.onlineStorageDeletedEntityCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a SelectEntity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity + * @static + * @param {google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity} message SelectEntity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SelectEntity.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.offlineStorageDeletedEntityRowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offlineStorageDeletedEntityRowCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.onlineStorageDeletedEntityCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.onlineStorageDeletedEntityCount = options.longs === String ? "0" : 0; + } + if (message.offlineStorageDeletedEntityRowCount != null && message.hasOwnProperty("offlineStorageDeletedEntityRowCount")) + if (typeof message.offlineStorageDeletedEntityRowCount === "number") + object.offlineStorageDeletedEntityRowCount = options.longs === String ? String(message.offlineStorageDeletedEntityRowCount) : message.offlineStorageDeletedEntityRowCount; + else + object.offlineStorageDeletedEntityRowCount = options.longs === String ? $util.Long.prototype.toString.call(message.offlineStorageDeletedEntityRowCount) : options.longs === Number ? new $util.LongBits(message.offlineStorageDeletedEntityRowCount.low >>> 0, message.offlineStorageDeletedEntityRowCount.high >>> 0).toNumber() : message.offlineStorageDeletedEntityRowCount; + if (message.onlineStorageDeletedEntityCount != null && message.hasOwnProperty("onlineStorageDeletedEntityCount")) + if (typeof message.onlineStorageDeletedEntityCount === "number") + object.onlineStorageDeletedEntityCount = options.longs === String ? String(message.onlineStorageDeletedEntityCount) : message.onlineStorageDeletedEntityCount; + else + object.onlineStorageDeletedEntityCount = options.longs === String ? $util.Long.prototype.toString.call(message.onlineStorageDeletedEntityCount) : options.longs === Number ? new $util.LongBits(message.onlineStorageDeletedEntityCount.low >>> 0, message.onlineStorageDeletedEntityCount.high >>> 0).toNumber() : message.onlineStorageDeletedEntityCount; + return object; + }; + + /** + * Converts this SelectEntity to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity + * @instance + * @returns {Object.} JSON object + */ + SelectEntity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SelectEntity + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SelectEntity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity"; + }; + + return SelectEntity; + })(); + + DeleteFeatureValuesResponse.SelectTimeRangeAndFeature = (function() { + + /** + * Properties of a SelectTimeRangeAndFeature. + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse + * @interface ISelectTimeRangeAndFeature + * @property {number|Long|null} [impactedFeatureCount] SelectTimeRangeAndFeature impactedFeatureCount + * @property {number|Long|null} [offlineStorageModifiedEntityRowCount] SelectTimeRangeAndFeature offlineStorageModifiedEntityRowCount + * @property {number|Long|null} [onlineStorageModifiedEntityCount] SelectTimeRangeAndFeature onlineStorageModifiedEntityCount + */ + + /** + * Constructs a new SelectTimeRangeAndFeature. + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse + * @classdesc Represents a SelectTimeRangeAndFeature. + * @implements ISelectTimeRangeAndFeature + * @constructor + * @param {google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.ISelectTimeRangeAndFeature=} [properties] Properties to set + */ + function SelectTimeRangeAndFeature(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SelectTimeRangeAndFeature impactedFeatureCount. + * @member {number|Long} impactedFeatureCount + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature + * @instance + */ + SelectTimeRangeAndFeature.prototype.impactedFeatureCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * SelectTimeRangeAndFeature offlineStorageModifiedEntityRowCount. + * @member {number|Long} offlineStorageModifiedEntityRowCount + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature + * @instance + */ + SelectTimeRangeAndFeature.prototype.offlineStorageModifiedEntityRowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * SelectTimeRangeAndFeature onlineStorageModifiedEntityCount. + * @member {number|Long} onlineStorageModifiedEntityCount + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature + * @instance + */ + SelectTimeRangeAndFeature.prototype.onlineStorageModifiedEntityCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new SelectTimeRangeAndFeature instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature + * @static + * @param {google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.ISelectTimeRangeAndFeature=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature} SelectTimeRangeAndFeature instance + */ + SelectTimeRangeAndFeature.create = function create(properties) { + return new SelectTimeRangeAndFeature(properties); + }; + + /** + * Encodes the specified SelectTimeRangeAndFeature message. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature + * @static + * @param {google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.ISelectTimeRangeAndFeature} message SelectTimeRangeAndFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectTimeRangeAndFeature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.impactedFeatureCount != null && Object.hasOwnProperty.call(message, "impactedFeatureCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.impactedFeatureCount); + if (message.offlineStorageModifiedEntityRowCount != null && Object.hasOwnProperty.call(message, "offlineStorageModifiedEntityRowCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.offlineStorageModifiedEntityRowCount); + if (message.onlineStorageModifiedEntityCount != null && Object.hasOwnProperty.call(message, "onlineStorageModifiedEntityCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.onlineStorageModifiedEntityCount); + return writer; + }; + + /** + * Encodes the specified SelectTimeRangeAndFeature message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature + * @static + * @param {google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.ISelectTimeRangeAndFeature} message SelectTimeRangeAndFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectTimeRangeAndFeature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SelectTimeRangeAndFeature message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature} SelectTimeRangeAndFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectTimeRangeAndFeature.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.impactedFeatureCount = reader.int64(); + break; + } + case 2: { + message.offlineStorageModifiedEntityRowCount = reader.int64(); + break; + } + case 3: { + message.onlineStorageModifiedEntityCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SelectTimeRangeAndFeature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature} SelectTimeRangeAndFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectTimeRangeAndFeature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SelectTimeRangeAndFeature message. + * @function verify + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SelectTimeRangeAndFeature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.impactedFeatureCount != null && message.hasOwnProperty("impactedFeatureCount")) + if (!$util.isInteger(message.impactedFeatureCount) && !(message.impactedFeatureCount && $util.isInteger(message.impactedFeatureCount.low) && $util.isInteger(message.impactedFeatureCount.high))) + return "impactedFeatureCount: integer|Long expected"; + if (message.offlineStorageModifiedEntityRowCount != null && message.hasOwnProperty("offlineStorageModifiedEntityRowCount")) + if (!$util.isInteger(message.offlineStorageModifiedEntityRowCount) && !(message.offlineStorageModifiedEntityRowCount && $util.isInteger(message.offlineStorageModifiedEntityRowCount.low) && $util.isInteger(message.offlineStorageModifiedEntityRowCount.high))) + return "offlineStorageModifiedEntityRowCount: integer|Long expected"; + if (message.onlineStorageModifiedEntityCount != null && message.hasOwnProperty("onlineStorageModifiedEntityCount")) + if (!$util.isInteger(message.onlineStorageModifiedEntityCount) && !(message.onlineStorageModifiedEntityCount && $util.isInteger(message.onlineStorageModifiedEntityCount.low) && $util.isInteger(message.onlineStorageModifiedEntityCount.high))) + return "onlineStorageModifiedEntityCount: integer|Long expected"; + return null; + }; + + /** + * Creates a SelectTimeRangeAndFeature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature} SelectTimeRangeAndFeature + */ + SelectTimeRangeAndFeature.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature) + return object; + var message = new $root.google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature(); + if (object.impactedFeatureCount != null) + if ($util.Long) + (message.impactedFeatureCount = $util.Long.fromValue(object.impactedFeatureCount)).unsigned = false; + else if (typeof object.impactedFeatureCount === "string") + message.impactedFeatureCount = parseInt(object.impactedFeatureCount, 10); + else if (typeof object.impactedFeatureCount === "number") + message.impactedFeatureCount = object.impactedFeatureCount; + else if (typeof object.impactedFeatureCount === "object") + message.impactedFeatureCount = new $util.LongBits(object.impactedFeatureCount.low >>> 0, object.impactedFeatureCount.high >>> 0).toNumber(); + if (object.offlineStorageModifiedEntityRowCount != null) + if ($util.Long) + (message.offlineStorageModifiedEntityRowCount = $util.Long.fromValue(object.offlineStorageModifiedEntityRowCount)).unsigned = false; + else if (typeof object.offlineStorageModifiedEntityRowCount === "string") + message.offlineStorageModifiedEntityRowCount = parseInt(object.offlineStorageModifiedEntityRowCount, 10); + else if (typeof object.offlineStorageModifiedEntityRowCount === "number") + message.offlineStorageModifiedEntityRowCount = object.offlineStorageModifiedEntityRowCount; + else if (typeof object.offlineStorageModifiedEntityRowCount === "object") + message.offlineStorageModifiedEntityRowCount = new $util.LongBits(object.offlineStorageModifiedEntityRowCount.low >>> 0, object.offlineStorageModifiedEntityRowCount.high >>> 0).toNumber(); + if (object.onlineStorageModifiedEntityCount != null) + if ($util.Long) + (message.onlineStorageModifiedEntityCount = $util.Long.fromValue(object.onlineStorageModifiedEntityCount)).unsigned = false; + else if (typeof object.onlineStorageModifiedEntityCount === "string") + message.onlineStorageModifiedEntityCount = parseInt(object.onlineStorageModifiedEntityCount, 10); + else if (typeof object.onlineStorageModifiedEntityCount === "number") + message.onlineStorageModifiedEntityCount = object.onlineStorageModifiedEntityCount; + else if (typeof object.onlineStorageModifiedEntityCount === "object") + message.onlineStorageModifiedEntityCount = new $util.LongBits(object.onlineStorageModifiedEntityCount.low >>> 0, object.onlineStorageModifiedEntityCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a SelectTimeRangeAndFeature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature + * @static + * @param {google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature} message SelectTimeRangeAndFeature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SelectTimeRangeAndFeature.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.impactedFeatureCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.impactedFeatureCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.offlineStorageModifiedEntityRowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offlineStorageModifiedEntityRowCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.onlineStorageModifiedEntityCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.onlineStorageModifiedEntityCount = options.longs === String ? "0" : 0; + } + if (message.impactedFeatureCount != null && message.hasOwnProperty("impactedFeatureCount")) + if (typeof message.impactedFeatureCount === "number") + object.impactedFeatureCount = options.longs === String ? String(message.impactedFeatureCount) : message.impactedFeatureCount; + else + object.impactedFeatureCount = options.longs === String ? $util.Long.prototype.toString.call(message.impactedFeatureCount) : options.longs === Number ? new $util.LongBits(message.impactedFeatureCount.low >>> 0, message.impactedFeatureCount.high >>> 0).toNumber() : message.impactedFeatureCount; + if (message.offlineStorageModifiedEntityRowCount != null && message.hasOwnProperty("offlineStorageModifiedEntityRowCount")) + if (typeof message.offlineStorageModifiedEntityRowCount === "number") + object.offlineStorageModifiedEntityRowCount = options.longs === String ? String(message.offlineStorageModifiedEntityRowCount) : message.offlineStorageModifiedEntityRowCount; + else + object.offlineStorageModifiedEntityRowCount = options.longs === String ? $util.Long.prototype.toString.call(message.offlineStorageModifiedEntityRowCount) : options.longs === Number ? new $util.LongBits(message.offlineStorageModifiedEntityRowCount.low >>> 0, message.offlineStorageModifiedEntityRowCount.high >>> 0).toNumber() : message.offlineStorageModifiedEntityRowCount; + if (message.onlineStorageModifiedEntityCount != null && message.hasOwnProperty("onlineStorageModifiedEntityCount")) + if (typeof message.onlineStorageModifiedEntityCount === "number") + object.onlineStorageModifiedEntityCount = options.longs === String ? String(message.onlineStorageModifiedEntityCount) : message.onlineStorageModifiedEntityCount; + else + object.onlineStorageModifiedEntityCount = options.longs === String ? $util.Long.prototype.toString.call(message.onlineStorageModifiedEntityCount) : options.longs === Number ? new $util.LongBits(message.onlineStorageModifiedEntityCount.low >>> 0, message.onlineStorageModifiedEntityCount.high >>> 0).toNumber() : message.onlineStorageModifiedEntityCount; + return object; + }; + + /** + * Converts this SelectTimeRangeAndFeature to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature + * @instance + * @returns {Object.} JSON object + */ + SelectTimeRangeAndFeature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SelectTimeRangeAndFeature + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SelectTimeRangeAndFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature"; + }; + + return SelectTimeRangeAndFeature; + })(); + + return DeleteFeatureValuesResponse; + })(); + + v1.EntityIdSelector = (function() { + + /** + * Properties of an EntityIdSelector. + * @memberof google.cloud.aiplatform.v1 + * @interface IEntityIdSelector + * @property {google.cloud.aiplatform.v1.ICsvSource|null} [csvSource] EntityIdSelector csvSource + * @property {string|null} [entityIdField] EntityIdSelector entityIdField + */ + + /** + * Constructs a new EntityIdSelector. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents an EntityIdSelector. + * @implements IEntityIdSelector + * @constructor + * @param {google.cloud.aiplatform.v1.IEntityIdSelector=} [properties] Properties to set + */ + function EntityIdSelector(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EntityIdSelector csvSource. + * @member {google.cloud.aiplatform.v1.ICsvSource|null|undefined} csvSource + * @memberof google.cloud.aiplatform.v1.EntityIdSelector + * @instance + */ + EntityIdSelector.prototype.csvSource = null; + + /** + * EntityIdSelector entityIdField. + * @member {string} entityIdField + * @memberof google.cloud.aiplatform.v1.EntityIdSelector + * @instance + */ + EntityIdSelector.prototype.entityIdField = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * EntityIdSelector EntityIdsSource. + * @member {"csvSource"|undefined} EntityIdsSource + * @memberof google.cloud.aiplatform.v1.EntityIdSelector + * @instance + */ + Object.defineProperty(EntityIdSelector.prototype, "EntityIdsSource", { + get: $util.oneOfGetter($oneOfFields = ["csvSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new EntityIdSelector instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.EntityIdSelector + * @static + * @param {google.cloud.aiplatform.v1.IEntityIdSelector=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.EntityIdSelector} EntityIdSelector instance + */ + EntityIdSelector.create = function create(properties) { + return new EntityIdSelector(properties); + }; + + /** + * Encodes the specified EntityIdSelector message. Does not implicitly {@link google.cloud.aiplatform.v1.EntityIdSelector.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.EntityIdSelector + * @static + * @param {google.cloud.aiplatform.v1.IEntityIdSelector} message EntityIdSelector message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityIdSelector.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.csvSource != null && Object.hasOwnProperty.call(message, "csvSource")) + $root.google.cloud.aiplatform.v1.CsvSource.encode(message.csvSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.entityIdField != null && Object.hasOwnProperty.call(message, "entityIdField")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.entityIdField); + return writer; + }; + + /** + * Encodes the specified EntityIdSelector message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.EntityIdSelector.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.EntityIdSelector + * @static + * @param {google.cloud.aiplatform.v1.IEntityIdSelector} message EntityIdSelector message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityIdSelector.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EntityIdSelector message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.EntityIdSelector + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.EntityIdSelector} EntityIdSelector + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityIdSelector.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.EntityIdSelector(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.csvSource = $root.google.cloud.aiplatform.v1.CsvSource.decode(reader, reader.uint32()); + break; + } + case 5: { + message.entityIdField = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EntityIdSelector message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.EntityIdSelector + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.EntityIdSelector} EntityIdSelector + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityIdSelector.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EntityIdSelector message. + * @function verify + * @memberof google.cloud.aiplatform.v1.EntityIdSelector + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EntityIdSelector.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.csvSource != null && message.hasOwnProperty("csvSource")) { + properties.EntityIdsSource = 1; + { + var error = $root.google.cloud.aiplatform.v1.CsvSource.verify(message.csvSource); + if (error) + return "csvSource." + error; + } + } + if (message.entityIdField != null && message.hasOwnProperty("entityIdField")) + if (!$util.isString(message.entityIdField)) + return "entityIdField: string expected"; + return null; + }; + + /** + * Creates an EntityIdSelector message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.EntityIdSelector + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.EntityIdSelector} EntityIdSelector + */ + EntityIdSelector.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.EntityIdSelector) + return object; + var message = new $root.google.cloud.aiplatform.v1.EntityIdSelector(); + if (object.csvSource != null) { + if (typeof object.csvSource !== "object") + throw TypeError(".google.cloud.aiplatform.v1.EntityIdSelector.csvSource: object expected"); + message.csvSource = $root.google.cloud.aiplatform.v1.CsvSource.fromObject(object.csvSource); + } + if (object.entityIdField != null) + message.entityIdField = String(object.entityIdField); + return message; + }; + + /** + * Creates a plain object from an EntityIdSelector message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.EntityIdSelector + * @static + * @param {google.cloud.aiplatform.v1.EntityIdSelector} message EntityIdSelector + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EntityIdSelector.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.entityIdField = ""; + if (message.csvSource != null && message.hasOwnProperty("csvSource")) { + object.csvSource = $root.google.cloud.aiplatform.v1.CsvSource.toObject(message.csvSource, options); + if (options.oneofs) + object.EntityIdsSource = "csvSource"; + } + if (message.entityIdField != null && message.hasOwnProperty("entityIdField")) + object.entityIdField = message.entityIdField; + return object; + }; + + /** + * Converts this EntityIdSelector to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.EntityIdSelector + * @instance + * @returns {Object.} JSON object + */ + EntityIdSelector.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EntityIdSelector + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.EntityIdSelector + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EntityIdSelector.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.EntityIdSelector"; + }; + + return EntityIdSelector; + })(); + v1.HyperparameterTuningJob = (function() { /** @@ -117170,6 +120853,7 @@ * @property {string|null} [metricsSchemaUri] ModelEvaluationSlice metricsSchemaUri * @property {google.protobuf.IValue|null} [metrics] ModelEvaluationSlice metrics * @property {google.protobuf.ITimestamp|null} [createTime] ModelEvaluationSlice createTime + * @property {google.cloud.aiplatform.v1.IModelExplanation|null} [modelExplanation] ModelEvaluationSlice modelExplanation */ /** @@ -117227,6 +120911,14 @@ */ ModelEvaluationSlice.prototype.createTime = null; + /** + * ModelEvaluationSlice modelExplanation. + * @member {google.cloud.aiplatform.v1.IModelExplanation|null|undefined} modelExplanation + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice + * @instance + */ + ModelEvaluationSlice.prototype.modelExplanation = null; + /** * Creates a new ModelEvaluationSlice instance using the specified properties. * @function create @@ -117261,6 +120953,8 @@ $root.google.protobuf.Value.encode(message.metrics, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.modelExplanation != null && Object.hasOwnProperty.call(message, "modelExplanation")) + $root.google.cloud.aiplatform.v1.ModelExplanation.encode(message.modelExplanation, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -117315,6 +121009,10 @@ message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } + case 6: { + message.modelExplanation = $root.google.cloud.aiplatform.v1.ModelExplanation.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -117371,6 +121069,11 @@ if (error) return "createTime." + error; } + if (message.modelExplanation != null && message.hasOwnProperty("modelExplanation")) { + var error = $root.google.cloud.aiplatform.v1.ModelExplanation.verify(message.modelExplanation); + if (error) + return "modelExplanation." + error; + } return null; }; @@ -117405,6 +121108,11 @@ throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluationSlice.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } + if (object.modelExplanation != null) { + if (typeof object.modelExplanation !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluationSlice.modelExplanation: object expected"); + message.modelExplanation = $root.google.cloud.aiplatform.v1.ModelExplanation.fromObject(object.modelExplanation); + } return message; }; @@ -117427,6 +121135,7 @@ object.metricsSchemaUri = ""; object.metrics = null; object.createTime = null; + object.modelExplanation = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -117438,6 +121147,8 @@ object.metrics = $root.google.protobuf.Value.toObject(message.metrics, options); if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.modelExplanation != null && message.hasOwnProperty("modelExplanation")) + object.modelExplanation = $root.google.cloud.aiplatform.v1.ModelExplanation.toObject(message.modelExplanation, options); return object; }; @@ -117475,6 +121186,7 @@ * @interface ISlice * @property {string|null} [dimension] Slice dimension * @property {string|null} [value] Slice value + * @property {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.ISliceSpec|null} [sliceSpec] Slice sliceSpec */ /** @@ -117508,6 +121220,14 @@ */ Slice.prototype.value = ""; + /** + * Slice sliceSpec. + * @member {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.ISliceSpec|null|undefined} sliceSpec + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice + * @instance + */ + Slice.prototype.sliceSpec = null; + /** * Creates a new Slice instance using the specified properties. * @function create @@ -117536,6 +121256,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimension); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.sliceSpec != null && Object.hasOwnProperty.call(message, "sliceSpec")) + $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.encode(message.sliceSpec, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -117578,6 +121300,10 @@ message.value = reader.string(); break; } + case 3: { + message.sliceSpec = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -117619,6 +121345,11 @@ if (message.value != null && message.hasOwnProperty("value")) if (!$util.isString(message.value)) return "value: string expected"; + if (message.sliceSpec != null && message.hasOwnProperty("sliceSpec")) { + var error = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.verify(message.sliceSpec); + if (error) + return "sliceSpec." + error; + } return null; }; @@ -117638,6 +121369,11 @@ message.dimension = String(object.dimension); if (object.value != null) message.value = String(object.value); + if (object.sliceSpec != null) { + if (typeof object.sliceSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.sliceSpec: object expected"); + message.sliceSpec = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.fromObject(object.sliceSpec); + } return message; }; @@ -117657,11 +121393,14 @@ if (options.defaults) { object.dimension = ""; object.value = ""; + object.sliceSpec = null; } if (message.dimension != null && message.hasOwnProperty("dimension")) object.dimension = message.dimension; if (message.value != null && message.hasOwnProperty("value")) object.value = message.value; + if (message.sliceSpec != null && message.hasOwnProperty("sliceSpec")) + object.sliceSpec = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.toObject(message.sliceSpec, options); return object; }; @@ -117691,6 +121430,1025 @@ return typeUrlPrefix + "/google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice"; }; + Slice.SliceSpec = (function() { + + /** + * Properties of a SliceSpec. + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice + * @interface ISliceSpec + * @property {Object.|null} [configs] SliceSpec configs + */ + + /** + * Constructs a new SliceSpec. + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice + * @classdesc Represents a SliceSpec. + * @implements ISliceSpec + * @constructor + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.ISliceSpec=} [properties] Properties to set + */ + function SliceSpec(properties) { + this.configs = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SliceSpec configs. + * @member {Object.} configs + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @instance + */ + SliceSpec.prototype.configs = $util.emptyObject; + + /** + * Creates a new SliceSpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.ISliceSpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec} SliceSpec instance + */ + SliceSpec.create = function create(properties) { + return new SliceSpec(properties); + }; + + /** + * Encodes the specified SliceSpec message. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.ISliceSpec} message SliceSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SliceSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.configs != null && Object.hasOwnProperty.call(message, "configs")) + for (var keys = Object.keys(message.configs), 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.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.encode(message.configs[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified SliceSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.ISliceSpec} message SliceSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SliceSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SliceSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec} SliceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SliceSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (message.configs === $util.emptyObject) + message.configs = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.configs[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SliceSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec} SliceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SliceSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SliceSpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SliceSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.configs != null && message.hasOwnProperty("configs")) { + if (!$util.isObject(message.configs)) + return "configs: object expected"; + var key = Object.keys(message.configs); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.verify(message.configs[key[i]]); + if (error) + return "configs." + error; + } + } + return null; + }; + + /** + * Creates a SliceSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec} SliceSpec + */ + SliceSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec) + return object; + var message = new $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec(); + if (object.configs) { + if (typeof object.configs !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.configs: object expected"); + message.configs = {}; + for (var keys = Object.keys(object.configs), i = 0; i < keys.length; ++i) { + if (typeof object.configs[keys[i]] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.configs: object expected"); + message.configs[keys[i]] = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.fromObject(object.configs[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a SliceSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec} message SliceSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SliceSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.configs = {}; + var keys2; + if (message.configs && (keys2 = Object.keys(message.configs)).length) { + object.configs = {}; + for (var j = 0; j < keys2.length; ++j) + object.configs[keys2[j]] = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.toObject(message.configs[keys2[j]], options); + } + return object; + }; + + /** + * Converts this SliceSpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @instance + * @returns {Object.} JSON object + */ + SliceSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SliceSpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SliceSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec"; + }; + + SliceSpec.SliceConfig = (function() { + + /** + * Properties of a SliceConfig. + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @interface ISliceConfig + * @property {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IValue|null} [value] SliceConfig value + * @property {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IRange|null} [range] SliceConfig range + * @property {google.protobuf.IBoolValue|null} [allValues] SliceConfig allValues + */ + + /** + * Constructs a new SliceConfig. + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @classdesc Represents a SliceConfig. + * @implements ISliceConfig + * @constructor + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.ISliceConfig=} [properties] Properties to set + */ + function SliceConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SliceConfig value. + * @member {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IValue|null|undefined} value + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @instance + */ + SliceConfig.prototype.value = null; + + /** + * SliceConfig range. + * @member {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IRange|null|undefined} range + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @instance + */ + SliceConfig.prototype.range = null; + + /** + * SliceConfig allValues. + * @member {google.protobuf.IBoolValue|null|undefined} allValues + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @instance + */ + SliceConfig.prototype.allValues = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SliceConfig kind. + * @member {"value"|"range"|"allValues"|undefined} kind + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @instance + */ + Object.defineProperty(SliceConfig.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["value", "range", "allValues"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SliceConfig instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.ISliceConfig=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig} SliceConfig instance + */ + SliceConfig.create = function create(properties) { + return new SliceConfig(properties); + }; + + /** + * Encodes the specified SliceConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.ISliceConfig} message SliceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SliceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value.encode(message.value, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.range != null && Object.hasOwnProperty.call(message, "range")) + $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range.encode(message.range, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.allValues != null && Object.hasOwnProperty.call(message, "allValues")) + $root.google.protobuf.BoolValue.encode(message.allValues, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SliceConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.ISliceConfig} message SliceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SliceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SliceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig} SliceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SliceConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value.decode(reader, reader.uint32()); + break; + } + case 2: { + message.range = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range.decode(reader, reader.uint32()); + break; + } + case 3: { + message.allValues = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SliceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig} SliceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SliceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SliceConfig message. + * @function verify + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SliceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.value != null && message.hasOwnProperty("value")) { + properties.kind = 1; + { + var error = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value.verify(message.value); + if (error) + return "value." + error; + } + } + if (message.range != null && message.hasOwnProperty("range")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range.verify(message.range); + if (error) + return "range." + error; + } + } + if (message.allValues != null && message.hasOwnProperty("allValues")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.BoolValue.verify(message.allValues); + if (error) + return "allValues." + error; + } + } + return null; + }; + + /** + * Creates a SliceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig} SliceConfig + */ + SliceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig) + return object; + var message = new $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig(); + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.value: object expected"); + message.value = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value.fromObject(object.value); + } + if (object.range != null) { + if (typeof object.range !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.range: object expected"); + message.range = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range.fromObject(object.range); + } + if (object.allValues != null) { + if (typeof object.allValues !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.allValues: object expected"); + message.allValues = $root.google.protobuf.BoolValue.fromObject(object.allValues); + } + return message; + }; + + /** + * Creates a plain object from a SliceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig} message SliceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SliceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.value != null && message.hasOwnProperty("value")) { + object.value = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value.toObject(message.value, options); + if (options.oneofs) + object.kind = "value"; + } + if (message.range != null && message.hasOwnProperty("range")) { + object.range = $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range.toObject(message.range, options); + if (options.oneofs) + object.kind = "range"; + } + if (message.allValues != null && message.hasOwnProperty("allValues")) { + object.allValues = $root.google.protobuf.BoolValue.toObject(message.allValues, options); + if (options.oneofs) + object.kind = "allValues"; + } + return object; + }; + + /** + * Converts this SliceConfig to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @instance + * @returns {Object.} JSON object + */ + SliceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SliceConfig + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SliceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig"; + }; + + return SliceConfig; + })(); + + SliceSpec.Range = (function() { + + /** + * Properties of a Range. + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @interface IRange + * @property {number|null} [low] Range low + * @property {number|null} [high] Range high + */ + + /** + * Constructs a new Range. + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @classdesc Represents a Range. + * @implements IRange + * @constructor + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IRange=} [properties] Properties to set + */ + function Range(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Range low. + * @member {number} low + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @instance + */ + Range.prototype.low = 0; + + /** + * Range high. + * @member {number} high + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @instance + */ + Range.prototype.high = 0; + + /** + * Creates a new Range instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IRange=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range} Range instance + */ + Range.create = function create(properties) { + return new Range(properties); + }; + + /** + * Encodes the specified Range message. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IRange} message Range message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Range.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.low != null && Object.hasOwnProperty.call(message, "low")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.low); + if (message.high != null && Object.hasOwnProperty.call(message, "high")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.high); + return writer; + }; + + /** + * Encodes the specified Range message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IRange} message Range message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Range.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Range message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range} Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Range.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.low = reader.float(); + break; + } + case 2: { + message.high = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Range message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range} Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Range.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Range message. + * @function verify + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Range.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.low != null && message.hasOwnProperty("low")) + if (typeof message.low !== "number") + return "low: number expected"; + if (message.high != null && message.hasOwnProperty("high")) + if (typeof message.high !== "number") + return "high: number expected"; + return null; + }; + + /** + * Creates a Range message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range} Range + */ + Range.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range) + return object; + var message = new $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range(); + if (object.low != null) + message.low = Number(object.low); + if (object.high != null) + message.high = Number(object.high); + return message; + }; + + /** + * Creates a plain object from a Range message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range} message Range + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Range.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.low = 0; + object.high = 0; + } + if (message.low != null && message.hasOwnProperty("low")) + object.low = options.json && !isFinite(message.low) ? String(message.low) : message.low; + if (message.high != null && message.hasOwnProperty("high")) + object.high = options.json && !isFinite(message.high) ? String(message.high) : message.high; + return object; + }; + + /** + * Converts this Range to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @instance + * @returns {Object.} JSON object + */ + Range.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Range + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Range.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range"; + }; + + return Range; + })(); + + SliceSpec.Value = (function() { + + /** + * Properties of a Value. + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @interface IValue + * @property {string|null} [stringValue] Value stringValue + * @property {number|null} [floatValue] Value floatValue + */ + + /** + * Constructs a new Value. + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec + * @classdesc Represents a Value. + * @implements IValue + * @constructor + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.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 stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @instance + */ + Value.prototype.stringValue = null; + + /** + * Value floatValue. + * @member {number|null|undefined} floatValue + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @instance + */ + Value.prototype.floatValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Value kind. + * @member {"stringValue"|"floatValue"|undefined} kind + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @instance + */ + Object.defineProperty(Value.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["stringValue", "floatValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Value instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.IValue=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value} Value instance + */ + Value.create = function create(properties) { + return new Value(properties); + }; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.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.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.stringValue); + if (message.floatValue != null && Object.hasOwnProperty.call(message, "floatValue")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.floatValue); + return writer; + }; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.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.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.stringValue = reader.string(); + break; + } + case 2: { + message.floatValue = reader.float(); + 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.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.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.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.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.stringValue != null && message.hasOwnProperty("stringValue")) { + properties.kind = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.floatValue != null && message.hasOwnProperty("floatValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.floatValue !== "number") + return "floatValue: number expected"; + } + return null; + }; + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value} Value + */ + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value) + return object; + var message = new $root.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value(); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.floatValue != null) + message.floatValue = Number(object.floatValue); + return message; + }; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @static + * @param {google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.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.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; + } + if (message.floatValue != null && message.hasOwnProperty("floatValue")) { + object.floatValue = options.json && !isFinite(message.floatValue) ? String(message.floatValue) : message.floatValue; + if (options.oneofs) + object.kind = "floatValue"; + } + return object; + }; + + /** + * Converts this Value to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.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.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.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.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value"; + }; + + return Value; + })(); + + return SliceSpec; + })(); + return Slice; })(); @@ -118125,6 +122883,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.aiplatform.v1.ModelService|batchImportEvaluatedAnnotations}. + * @memberof google.cloud.aiplatform.v1.ModelService + * @typedef BatchImportEvaluatedAnnotationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse} [response] BatchImportEvaluatedAnnotationsResponse + */ + + /** + * Calls BatchImportEvaluatedAnnotations. + * @function batchImportEvaluatedAnnotations + * @memberof google.cloud.aiplatform.v1.ModelService + * @instance + * @param {google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsRequest} request BatchImportEvaluatedAnnotationsRequest message or plain object + * @param {google.cloud.aiplatform.v1.ModelService.BatchImportEvaluatedAnnotationsCallback} callback Node-style callback called with the error, if any, and BatchImportEvaluatedAnnotationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ModelService.prototype.batchImportEvaluatedAnnotations = function batchImportEvaluatedAnnotations(request, callback) { + return this.rpcCall(batchImportEvaluatedAnnotations, $root.google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest, $root.google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse, request, callback); + }, "name", { value: "BatchImportEvaluatedAnnotations" }); + + /** + * Calls BatchImportEvaluatedAnnotations. + * @function batchImportEvaluatedAnnotations + * @memberof google.cloud.aiplatform.v1.ModelService + * @instance + * @param {google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsRequest} request BatchImportEvaluatedAnnotationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.cloud.aiplatform.v1.ModelService|getModelEvaluation}. * @memberof google.cloud.aiplatform.v1.ModelService @@ -123820,6 +128611,457 @@ return BatchImportModelEvaluationSlicesResponse; })(); + v1.BatchImportEvaluatedAnnotationsRequest = (function() { + + /** + * Properties of a BatchImportEvaluatedAnnotationsRequest. + * @memberof google.cloud.aiplatform.v1 + * @interface IBatchImportEvaluatedAnnotationsRequest + * @property {string|null} [parent] BatchImportEvaluatedAnnotationsRequest parent + * @property {Array.|null} [evaluatedAnnotations] BatchImportEvaluatedAnnotationsRequest evaluatedAnnotations + */ + + /** + * Constructs a new BatchImportEvaluatedAnnotationsRequest. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a BatchImportEvaluatedAnnotationsRequest. + * @implements IBatchImportEvaluatedAnnotationsRequest + * @constructor + * @param {google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsRequest=} [properties] Properties to set + */ + function BatchImportEvaluatedAnnotationsRequest(properties) { + this.evaluatedAnnotations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BatchImportEvaluatedAnnotationsRequest parent. + * @member {string} parent + * @memberof google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest + * @instance + */ + BatchImportEvaluatedAnnotationsRequest.prototype.parent = ""; + + /** + * BatchImportEvaluatedAnnotationsRequest evaluatedAnnotations. + * @member {Array.} evaluatedAnnotations + * @memberof google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest + * @instance + */ + BatchImportEvaluatedAnnotationsRequest.prototype.evaluatedAnnotations = $util.emptyArray; + + /** + * Creates a new BatchImportEvaluatedAnnotationsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest + * @static + * @param {google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest} BatchImportEvaluatedAnnotationsRequest instance + */ + BatchImportEvaluatedAnnotationsRequest.create = function create(properties) { + return new BatchImportEvaluatedAnnotationsRequest(properties); + }; + + /** + * Encodes the specified BatchImportEvaluatedAnnotationsRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest + * @static + * @param {google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsRequest} message BatchImportEvaluatedAnnotationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchImportEvaluatedAnnotationsRequest.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.evaluatedAnnotations != null && message.evaluatedAnnotations.length) + for (var i = 0; i < message.evaluatedAnnotations.length; ++i) + $root.google.cloud.aiplatform.v1.EvaluatedAnnotation.encode(message.evaluatedAnnotations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BatchImportEvaluatedAnnotationsRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest + * @static + * @param {google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsRequest} message BatchImportEvaluatedAnnotationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchImportEvaluatedAnnotationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchImportEvaluatedAnnotationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest} BatchImportEvaluatedAnnotationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchImportEvaluatedAnnotationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + if (!(message.evaluatedAnnotations && message.evaluatedAnnotations.length)) + message.evaluatedAnnotations = []; + message.evaluatedAnnotations.push($root.google.cloud.aiplatform.v1.EvaluatedAnnotation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchImportEvaluatedAnnotationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest} BatchImportEvaluatedAnnotationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchImportEvaluatedAnnotationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchImportEvaluatedAnnotationsRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchImportEvaluatedAnnotationsRequest.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.evaluatedAnnotations != null && message.hasOwnProperty("evaluatedAnnotations")) { + if (!Array.isArray(message.evaluatedAnnotations)) + return "evaluatedAnnotations: array expected"; + for (var i = 0; i < message.evaluatedAnnotations.length; ++i) { + var error = $root.google.cloud.aiplatform.v1.EvaluatedAnnotation.verify(message.evaluatedAnnotations[i]); + if (error) + return "evaluatedAnnotations." + error; + } + } + return null; + }; + + /** + * Creates a BatchImportEvaluatedAnnotationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest} BatchImportEvaluatedAnnotationsRequest + */ + BatchImportEvaluatedAnnotationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.evaluatedAnnotations) { + if (!Array.isArray(object.evaluatedAnnotations)) + throw TypeError(".google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest.evaluatedAnnotations: array expected"); + message.evaluatedAnnotations = []; + for (var i = 0; i < object.evaluatedAnnotations.length; ++i) { + if (typeof object.evaluatedAnnotations[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest.evaluatedAnnotations: object expected"); + message.evaluatedAnnotations[i] = $root.google.cloud.aiplatform.v1.EvaluatedAnnotation.fromObject(object.evaluatedAnnotations[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BatchImportEvaluatedAnnotationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest + * @static + * @param {google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest} message BatchImportEvaluatedAnnotationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchImportEvaluatedAnnotationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.evaluatedAnnotations = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.evaluatedAnnotations && message.evaluatedAnnotations.length) { + object.evaluatedAnnotations = []; + for (var j = 0; j < message.evaluatedAnnotations.length; ++j) + object.evaluatedAnnotations[j] = $root.google.cloud.aiplatform.v1.EvaluatedAnnotation.toObject(message.evaluatedAnnotations[j], options); + } + return object; + }; + + /** + * Converts this BatchImportEvaluatedAnnotationsRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest + * @instance + * @returns {Object.} JSON object + */ + BatchImportEvaluatedAnnotationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchImportEvaluatedAnnotationsRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchImportEvaluatedAnnotationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest"; + }; + + return BatchImportEvaluatedAnnotationsRequest; + })(); + + v1.BatchImportEvaluatedAnnotationsResponse = (function() { + + /** + * Properties of a BatchImportEvaluatedAnnotationsResponse. + * @memberof google.cloud.aiplatform.v1 + * @interface IBatchImportEvaluatedAnnotationsResponse + * @property {number|null} [importedEvaluatedAnnotationsCount] BatchImportEvaluatedAnnotationsResponse importedEvaluatedAnnotationsCount + */ + + /** + * Constructs a new BatchImportEvaluatedAnnotationsResponse. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a BatchImportEvaluatedAnnotationsResponse. + * @implements IBatchImportEvaluatedAnnotationsResponse + * @constructor + * @param {google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsResponse=} [properties] Properties to set + */ + function BatchImportEvaluatedAnnotationsResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BatchImportEvaluatedAnnotationsResponse importedEvaluatedAnnotationsCount. + * @member {number} importedEvaluatedAnnotationsCount + * @memberof google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse + * @instance + */ + BatchImportEvaluatedAnnotationsResponse.prototype.importedEvaluatedAnnotationsCount = 0; + + /** + * Creates a new BatchImportEvaluatedAnnotationsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse + * @static + * @param {google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsResponse=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse} BatchImportEvaluatedAnnotationsResponse instance + */ + BatchImportEvaluatedAnnotationsResponse.create = function create(properties) { + return new BatchImportEvaluatedAnnotationsResponse(properties); + }; + + /** + * Encodes the specified BatchImportEvaluatedAnnotationsResponse message. Does not implicitly {@link google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse + * @static + * @param {google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsResponse} message BatchImportEvaluatedAnnotationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchImportEvaluatedAnnotationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.importedEvaluatedAnnotationsCount != null && Object.hasOwnProperty.call(message, "importedEvaluatedAnnotationsCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.importedEvaluatedAnnotationsCount); + return writer; + }; + + /** + * Encodes the specified BatchImportEvaluatedAnnotationsResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse + * @static + * @param {google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsResponse} message BatchImportEvaluatedAnnotationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchImportEvaluatedAnnotationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchImportEvaluatedAnnotationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse} BatchImportEvaluatedAnnotationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchImportEvaluatedAnnotationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.importedEvaluatedAnnotationsCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchImportEvaluatedAnnotationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse} BatchImportEvaluatedAnnotationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchImportEvaluatedAnnotationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchImportEvaluatedAnnotationsResponse message. + * @function verify + * @memberof google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchImportEvaluatedAnnotationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.importedEvaluatedAnnotationsCount != null && message.hasOwnProperty("importedEvaluatedAnnotationsCount")) + if (!$util.isInteger(message.importedEvaluatedAnnotationsCount)) + return "importedEvaluatedAnnotationsCount: integer expected"; + return null; + }; + + /** + * Creates a BatchImportEvaluatedAnnotationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse} BatchImportEvaluatedAnnotationsResponse + */ + BatchImportEvaluatedAnnotationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse) + return object; + var message = new $root.google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse(); + if (object.importedEvaluatedAnnotationsCount != null) + message.importedEvaluatedAnnotationsCount = object.importedEvaluatedAnnotationsCount | 0; + return message; + }; + + /** + * Creates a plain object from a BatchImportEvaluatedAnnotationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse + * @static + * @param {google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse} message BatchImportEvaluatedAnnotationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchImportEvaluatedAnnotationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.importedEvaluatedAnnotationsCount = 0; + if (message.importedEvaluatedAnnotationsCount != null && message.hasOwnProperty("importedEvaluatedAnnotationsCount")) + object.importedEvaluatedAnnotationsCount = message.importedEvaluatedAnnotationsCount; + return object; + }; + + /** + * Converts this BatchImportEvaluatedAnnotationsResponse to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse + * @instance + * @returns {Object.} JSON object + */ + BatchImportEvaluatedAnnotationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchImportEvaluatedAnnotationsResponse + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchImportEvaluatedAnnotationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse"; + }; + + return BatchImportEvaluatedAnnotationsResponse; + })(); + v1.GetModelEvaluationRequest = (function() { /** @@ -176174,6 +181416,7 @@ * @property {number} NVIDIA_A100_80GB=9 NVIDIA_A100_80GB value * @property {number} TPU_V2=6 TPU_V2 value * @property {number} TPU_V3=7 TPU_V3 value + * @property {number} TPU_V4_POD=10 TPU_V4_POD value */ v1beta1.AcceleratorType = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -176187,6 +181430,7 @@ values[valuesById[9] = "NVIDIA_A100_80GB"] = 9; values[valuesById[6] = "TPU_V2"] = 6; values[valuesById[7] = "TPU_V3"] = 7; + values[valuesById[10] = "TPU_V4_POD"] = 10; return values; })(); @@ -177774,6 +183018,7 @@ * @property {google.cloud.aiplatform.v1beta1.IModelMonitoringConfig|null} [modelMonitoringConfig] BatchPredictionJob modelMonitoringConfig * @property {Array.|null} [modelMonitoringStatsAnomalies] BatchPredictionJob modelMonitoringStatsAnomalies * @property {google.rpc.IStatus|null} [modelMonitoringStatus] BatchPredictionJob modelMonitoringStatus + * @property {boolean|null} [disableContainerLogging] BatchPredictionJob disableContainerLogging */ /** @@ -178026,6 +183271,14 @@ */ BatchPredictionJob.prototype.modelMonitoringStatus = null; + /** + * BatchPredictionJob disableContainerLogging. + * @member {boolean} disableContainerLogging + * @memberof google.cloud.aiplatform.v1beta1.BatchPredictionJob + * @instance + */ + BatchPredictionJob.prototype.disableContainerLogging = false; + /** * Creates a new BatchPredictionJob instance using the specified properties. * @function create @@ -178111,6 +183364,8 @@ $root.google.cloud.aiplatform.v1beta1.ModelMonitoringStatsAnomalies.encode(message.modelMonitoringStatsAnomalies[i], writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); if (message.modelMonitoringStatus != null && Object.hasOwnProperty.call(message, "modelMonitoringStatus")) $root.google.rpc.Status.encode(message.modelMonitoringStatus, writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim(); + if (message.disableContainerLogging != null && Object.hasOwnProperty.call(message, "disableContainerLogging")) + writer.uint32(/* id 34, wireType 0 =*/272).bool(message.disableContainerLogging); return writer; }; @@ -178284,6 +183539,10 @@ message.modelMonitoringStatus = $root.google.rpc.Status.decode(reader, reader.uint32()); break; } + case 34: { + message.disableContainerLogging = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -178475,6 +183734,9 @@ if (error) return "modelMonitoringStatus." + error; } + if (message.disableContainerLogging != null && message.hasOwnProperty("disableContainerLogging")) + if (typeof message.disableContainerLogging !== "boolean") + return "disableContainerLogging: boolean expected"; return null; }; @@ -178676,6 +183938,8 @@ throw TypeError(".google.cloud.aiplatform.v1beta1.BatchPredictionJob.modelMonitoringStatus: object expected"); message.modelMonitoringStatus = $root.google.rpc.Status.fromObject(object.modelMonitoringStatus); } + if (object.disableContainerLogging != null) + message.disableContainerLogging = Boolean(object.disableContainerLogging); return message; }; @@ -178725,6 +183989,7 @@ object.serviceAccount = ""; object.modelVersionId = ""; object.modelMonitoringStatus = null; + object.disableContainerLogging = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -178794,6 +184059,8 @@ } if (message.modelMonitoringStatus != null && message.hasOwnProperty("modelMonitoringStatus")) object.modelMonitoringStatus = $root.google.rpc.Status.toObject(message.modelMonitoringStatus, options); + if (message.disableContainerLogging != null && message.hasOwnProperty("disableContainerLogging")) + object.disableContainerLogging = message.disableContainerLogging; return object; }; @@ -190004,6 +195271,7 @@ case 9: case 6: case 7: + case 10: break; } if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) @@ -190073,6 +195341,10 @@ case 7: message.acceleratorType = 7; break; + case "TPU_V4_POD": + case 10: + message.acceleratorType = 10; + break; } if (object.acceleratorCount != null) message.acceleratorCount = object.acceleratorCount | 0; @@ -198627,6 +203899,7 @@ * @property {google.cloud.aiplatform.v1beta1.IModelSourceInfo|null} [modelSourceInfo] Model modelSourceInfo * @property {google.cloud.aiplatform.v1beta1.Model.IOriginalModelInfo|null} [originalModelInfo] Model originalModelInfo * @property {string|null} [metadataArtifact] Model metadataArtifact + * @property {google.cloud.aiplatform.v1beta1.Model.ILargeModelReference|null} [largeModelReference] Model largeModelReference */ /** @@ -198875,6 +204148,14 @@ */ Model.prototype.metadataArtifact = ""; + /** + * Model largeModelReference. + * @member {google.cloud.aiplatform.v1beta1.Model.ILargeModelReference|null|undefined} largeModelReference + * @memberof google.cloud.aiplatform.v1beta1.Model + * @instance + */ + Model.prototype.largeModelReference = null; + /** * Creates a new Model instance using the specified properties. * @function create @@ -198965,6 +204246,8 @@ $root.google.cloud.aiplatform.v1beta1.ModelSourceInfo.encode(message.modelSourceInfo, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); if (message.metadataArtifact != null && Object.hasOwnProperty.call(message, "metadataArtifact")) writer.uint32(/* id 44, wireType 2 =*/354).string(message.metadataArtifact); + if (message.largeModelReference != null && Object.hasOwnProperty.call(message, "largeModelReference")) + $root.google.cloud.aiplatform.v1beta1.Model.LargeModelReference.encode(message.largeModelReference, writer.uint32(/* id 45, wireType 2 =*/362).fork()).ldelim(); return writer; }; @@ -199147,6 +204430,10 @@ message.metadataArtifact = reader.string(); break; } + case 45: { + message.largeModelReference = $root.google.cloud.aiplatform.v1beta1.Model.LargeModelReference.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -199328,6 +204615,11 @@ if (message.metadataArtifact != null && message.hasOwnProperty("metadataArtifact")) if (!$util.isString(message.metadataArtifact)) return "metadataArtifact: string expected"; + if (message.largeModelReference != null && message.hasOwnProperty("largeModelReference")) { + var error = $root.google.cloud.aiplatform.v1beta1.Model.LargeModelReference.verify(message.largeModelReference); + if (error) + return "largeModelReference." + error; + } return null; }; @@ -199495,6 +204787,11 @@ } if (object.metadataArtifact != null) message.metadataArtifact = String(object.metadataArtifact); + if (object.largeModelReference != null) { + if (typeof object.largeModelReference !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.Model.largeModelReference: object expected"); + message.largeModelReference = $root.google.cloud.aiplatform.v1beta1.Model.LargeModelReference.fromObject(object.largeModelReference); + } return message; }; @@ -199543,6 +204840,7 @@ object.originalModelInfo = null; object.modelSourceInfo = null; object.metadataArtifact = ""; + object.largeModelReference = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -199622,6 +204920,8 @@ object.modelSourceInfo = $root.google.cloud.aiplatform.v1beta1.ModelSourceInfo.toObject(message.modelSourceInfo, options); if (message.metadataArtifact != null && message.hasOwnProperty("metadataArtifact")) object.metadataArtifact = message.metadataArtifact; + if (message.largeModelReference != null && message.hasOwnProperty("largeModelReference")) + object.largeModelReference = $root.google.cloud.aiplatform.v1beta1.Model.LargeModelReference.toObject(message.largeModelReference, options); return object; }; @@ -200145,6 +205445,209 @@ return OriginalModelInfo; })(); + Model.LargeModelReference = (function() { + + /** + * Properties of a LargeModelReference. + * @memberof google.cloud.aiplatform.v1beta1.Model + * @interface ILargeModelReference + * @property {string|null} [name] LargeModelReference name + */ + + /** + * Constructs a new LargeModelReference. + * @memberof google.cloud.aiplatform.v1beta1.Model + * @classdesc Represents a LargeModelReference. + * @implements ILargeModelReference + * @constructor + * @param {google.cloud.aiplatform.v1beta1.Model.ILargeModelReference=} [properties] Properties to set + */ + function LargeModelReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LargeModelReference name. + * @member {string} name + * @memberof google.cloud.aiplatform.v1beta1.Model.LargeModelReference + * @instance + */ + LargeModelReference.prototype.name = ""; + + /** + * Creates a new LargeModelReference instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.Model.LargeModelReference + * @static + * @param {google.cloud.aiplatform.v1beta1.Model.ILargeModelReference=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.Model.LargeModelReference} LargeModelReference instance + */ + LargeModelReference.create = function create(properties) { + return new LargeModelReference(properties); + }; + + /** + * Encodes the specified LargeModelReference message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.Model.LargeModelReference.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.Model.LargeModelReference + * @static + * @param {google.cloud.aiplatform.v1beta1.Model.ILargeModelReference} message LargeModelReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LargeModelReference.encode = function encode(message, writer) { + 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 LargeModelReference message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.Model.LargeModelReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.Model.LargeModelReference + * @static + * @param {google.cloud.aiplatform.v1beta1.Model.ILargeModelReference} message LargeModelReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LargeModelReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LargeModelReference message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.Model.LargeModelReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.Model.LargeModelReference} LargeModelReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LargeModelReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.Model.LargeModelReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LargeModelReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.Model.LargeModelReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.Model.LargeModelReference} LargeModelReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LargeModelReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LargeModelReference message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.Model.LargeModelReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LargeModelReference.verify = function verify(message) { + if (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 LargeModelReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.Model.LargeModelReference + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.Model.LargeModelReference} LargeModelReference + */ + LargeModelReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.Model.LargeModelReference) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.Model.LargeModelReference(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a LargeModelReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.Model.LargeModelReference + * @static + * @param {google.cloud.aiplatform.v1beta1.Model.LargeModelReference} message LargeModelReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LargeModelReference.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 LargeModelReference to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.Model.LargeModelReference + * @instance + * @returns {Object.} JSON object + */ + LargeModelReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LargeModelReference + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.Model.LargeModelReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LargeModelReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.Model.LargeModelReference"; + }; + + return LargeModelReference; + })(); + /** * DeploymentResourcesType enum. * @name google.cloud.aiplatform.v1beta1.Model.DeploymentResourcesType @@ -207549,6 +213052,7 @@ * @memberof google.cloud.aiplatform.v1beta1 * @interface IExportDataConfig * @property {google.cloud.aiplatform.v1beta1.IGcsDestination|null} [gcsDestination] ExportDataConfig gcsDestination + * @property {google.cloud.aiplatform.v1beta1.IExportFractionSplit|null} [fractionSplit] ExportDataConfig fractionSplit * @property {string|null} [annotationsFilter] ExportDataConfig annotationsFilter */ @@ -207575,6 +213079,14 @@ */ ExportDataConfig.prototype.gcsDestination = null; + /** + * ExportDataConfig fractionSplit. + * @member {google.cloud.aiplatform.v1beta1.IExportFractionSplit|null|undefined} fractionSplit + * @memberof google.cloud.aiplatform.v1beta1.ExportDataConfig + * @instance + */ + ExportDataConfig.prototype.fractionSplit = null; + /** * ExportDataConfig annotationsFilter. * @member {string} annotationsFilter @@ -207597,6 +213109,17 @@ set: $util.oneOfSetter($oneOfFields) }); + /** + * ExportDataConfig split. + * @member {"fractionSplit"|undefined} split + * @memberof google.cloud.aiplatform.v1beta1.ExportDataConfig + * @instance + */ + Object.defineProperty(ExportDataConfig.prototype, "split", { + get: $util.oneOfGetter($oneOfFields = ["fractionSplit"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new ExportDataConfig instance using the specified properties. * @function create @@ -207625,6 +213148,8 @@ $root.google.cloud.aiplatform.v1beta1.GcsDestination.encode(message.gcsDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.annotationsFilter != null && Object.hasOwnProperty.call(message, "annotationsFilter")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.annotationsFilter); + if (message.fractionSplit != null && Object.hasOwnProperty.call(message, "fractionSplit")) + $root.google.cloud.aiplatform.v1beta1.ExportFractionSplit.encode(message.fractionSplit, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -207663,6 +213188,10 @@ message.gcsDestination = $root.google.cloud.aiplatform.v1beta1.GcsDestination.decode(reader, reader.uint32()); break; } + case 5: { + message.fractionSplit = $root.google.cloud.aiplatform.v1beta1.ExportFractionSplit.decode(reader, reader.uint32()); + break; + } case 2: { message.annotationsFilter = reader.string(); break; @@ -207711,6 +213240,14 @@ return "gcsDestination." + error; } } + if (message.fractionSplit != null && message.hasOwnProperty("fractionSplit")) { + properties.split = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.ExportFractionSplit.verify(message.fractionSplit); + if (error) + return "fractionSplit." + error; + } + } if (message.annotationsFilter != null && message.hasOwnProperty("annotationsFilter")) if (!$util.isString(message.annotationsFilter)) return "annotationsFilter: string expected"; @@ -207734,6 +213271,11 @@ throw TypeError(".google.cloud.aiplatform.v1beta1.ExportDataConfig.gcsDestination: object expected"); message.gcsDestination = $root.google.cloud.aiplatform.v1beta1.GcsDestination.fromObject(object.gcsDestination); } + if (object.fractionSplit != null) { + if (typeof object.fractionSplit !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ExportDataConfig.fractionSplit: object expected"); + message.fractionSplit = $root.google.cloud.aiplatform.v1beta1.ExportFractionSplit.fromObject(object.fractionSplit); + } if (object.annotationsFilter != null) message.annotationsFilter = String(object.annotationsFilter); return message; @@ -207761,6 +213303,11 @@ } if (message.annotationsFilter != null && message.hasOwnProperty("annotationsFilter")) object.annotationsFilter = message.annotationsFilter; + if (message.fractionSplit != null && message.hasOwnProperty("fractionSplit")) { + object.fractionSplit = $root.google.cloud.aiplatform.v1beta1.ExportFractionSplit.toObject(message.fractionSplit, options); + if (options.oneofs) + object.split = "fractionSplit"; + } return object; }; @@ -207793,6 +213340,256 @@ return ExportDataConfig; })(); + v1beta1.ExportFractionSplit = (function() { + + /** + * Properties of an ExportFractionSplit. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IExportFractionSplit + * @property {number|null} [trainingFraction] ExportFractionSplit trainingFraction + * @property {number|null} [validationFraction] ExportFractionSplit validationFraction + * @property {number|null} [testFraction] ExportFractionSplit testFraction + */ + + /** + * Constructs a new ExportFractionSplit. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents an ExportFractionSplit. + * @implements IExportFractionSplit + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IExportFractionSplit=} [properties] Properties to set + */ + function ExportFractionSplit(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExportFractionSplit trainingFraction. + * @member {number} trainingFraction + * @memberof google.cloud.aiplatform.v1beta1.ExportFractionSplit + * @instance + */ + ExportFractionSplit.prototype.trainingFraction = 0; + + /** + * ExportFractionSplit validationFraction. + * @member {number} validationFraction + * @memberof google.cloud.aiplatform.v1beta1.ExportFractionSplit + * @instance + */ + ExportFractionSplit.prototype.validationFraction = 0; + + /** + * ExportFractionSplit testFraction. + * @member {number} testFraction + * @memberof google.cloud.aiplatform.v1beta1.ExportFractionSplit + * @instance + */ + ExportFractionSplit.prototype.testFraction = 0; + + /** + * Creates a new ExportFractionSplit instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ExportFractionSplit + * @static + * @param {google.cloud.aiplatform.v1beta1.IExportFractionSplit=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ExportFractionSplit} ExportFractionSplit instance + */ + ExportFractionSplit.create = function create(properties) { + return new ExportFractionSplit(properties); + }; + + /** + * Encodes the specified ExportFractionSplit message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ExportFractionSplit.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ExportFractionSplit + * @static + * @param {google.cloud.aiplatform.v1beta1.IExportFractionSplit} message ExportFractionSplit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportFractionSplit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.trainingFraction != null && Object.hasOwnProperty.call(message, "trainingFraction")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.trainingFraction); + if (message.validationFraction != null && Object.hasOwnProperty.call(message, "validationFraction")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.validationFraction); + if (message.testFraction != null && Object.hasOwnProperty.call(message, "testFraction")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.testFraction); + return writer; + }; + + /** + * Encodes the specified ExportFractionSplit message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ExportFractionSplit.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ExportFractionSplit + * @static + * @param {google.cloud.aiplatform.v1beta1.IExportFractionSplit} message ExportFractionSplit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportFractionSplit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExportFractionSplit message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ExportFractionSplit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ExportFractionSplit} ExportFractionSplit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportFractionSplit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ExportFractionSplit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.trainingFraction = reader.double(); + break; + } + case 2: { + message.validationFraction = reader.double(); + break; + } + case 3: { + message.testFraction = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExportFractionSplit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ExportFractionSplit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ExportFractionSplit} ExportFractionSplit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportFractionSplit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExportFractionSplit message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ExportFractionSplit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportFractionSplit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.trainingFraction != null && message.hasOwnProperty("trainingFraction")) + if (typeof message.trainingFraction !== "number") + return "trainingFraction: number expected"; + if (message.validationFraction != null && message.hasOwnProperty("validationFraction")) + if (typeof message.validationFraction !== "number") + return "validationFraction: number expected"; + if (message.testFraction != null && message.hasOwnProperty("testFraction")) + if (typeof message.testFraction !== "number") + return "testFraction: number expected"; + return null; + }; + + /** + * Creates an ExportFractionSplit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ExportFractionSplit + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ExportFractionSplit} ExportFractionSplit + */ + ExportFractionSplit.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ExportFractionSplit) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ExportFractionSplit(); + if (object.trainingFraction != null) + message.trainingFraction = Number(object.trainingFraction); + if (object.validationFraction != null) + message.validationFraction = Number(object.validationFraction); + if (object.testFraction != null) + message.testFraction = Number(object.testFraction); + return message; + }; + + /** + * Creates a plain object from an ExportFractionSplit message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ExportFractionSplit + * @static + * @param {google.cloud.aiplatform.v1beta1.ExportFractionSplit} message ExportFractionSplit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportFractionSplit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.trainingFraction = 0; + object.validationFraction = 0; + object.testFraction = 0; + } + if (message.trainingFraction != null && message.hasOwnProperty("trainingFraction")) + object.trainingFraction = options.json && !isFinite(message.trainingFraction) ? String(message.trainingFraction) : message.trainingFraction; + if (message.validationFraction != null && message.hasOwnProperty("validationFraction")) + object.validationFraction = options.json && !isFinite(message.validationFraction) ? String(message.validationFraction) : message.validationFraction; + if (message.testFraction != null && message.hasOwnProperty("testFraction")) + object.testFraction = options.json && !isFinite(message.testFraction) ? String(message.testFraction) : message.testFraction; + return object; + }; + + /** + * Converts this ExportFractionSplit to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ExportFractionSplit + * @instance + * @returns {Object.} JSON object + */ + ExportFractionSplit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExportFractionSplit + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ExportFractionSplit + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportFractionSplit.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ExportFractionSplit"; + }; + + return ExportFractionSplit; + })(); + v1beta1.SavedQuery = (function() { /** @@ -224754,6 +230551,1287 @@ return FeaturestoreMonitoringConfig; })(); + v1beta1.EvaluatedAnnotation = (function() { + + /** + * Properties of an EvaluatedAnnotation. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IEvaluatedAnnotation + * @property {google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.EvaluatedAnnotationType|null} [type] EvaluatedAnnotation type + * @property {Array.|null} [predictions] EvaluatedAnnotation predictions + * @property {Array.|null} [groundTruths] EvaluatedAnnotation groundTruths + * @property {google.protobuf.IValue|null} [dataItemPayload] EvaluatedAnnotation dataItemPayload + * @property {string|null} [evaluatedDataItemViewId] EvaluatedAnnotation evaluatedDataItemViewId + * @property {Array.|null} [explanations] EvaluatedAnnotation explanations + * @property {Array.|null} [errorAnalysisAnnotations] EvaluatedAnnotation errorAnalysisAnnotations + */ + + /** + * Constructs a new EvaluatedAnnotation. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents an EvaluatedAnnotation. + * @implements IEvaluatedAnnotation + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IEvaluatedAnnotation=} [properties] Properties to set + */ + function EvaluatedAnnotation(properties) { + this.predictions = []; + this.groundTruths = []; + this.explanations = []; + this.errorAnalysisAnnotations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EvaluatedAnnotation type. + * @member {google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.EvaluatedAnnotationType} type + * @memberof google.cloud.aiplatform.v1beta1.EvaluatedAnnotation + * @instance + */ + EvaluatedAnnotation.prototype.type = 0; + + /** + * EvaluatedAnnotation predictions. + * @member {Array.} predictions + * @memberof google.cloud.aiplatform.v1beta1.EvaluatedAnnotation + * @instance + */ + EvaluatedAnnotation.prototype.predictions = $util.emptyArray; + + /** + * EvaluatedAnnotation groundTruths. + * @member {Array.} groundTruths + * @memberof google.cloud.aiplatform.v1beta1.EvaluatedAnnotation + * @instance + */ + EvaluatedAnnotation.prototype.groundTruths = $util.emptyArray; + + /** + * EvaluatedAnnotation dataItemPayload. + * @member {google.protobuf.IValue|null|undefined} dataItemPayload + * @memberof google.cloud.aiplatform.v1beta1.EvaluatedAnnotation + * @instance + */ + EvaluatedAnnotation.prototype.dataItemPayload = null; + + /** + * EvaluatedAnnotation evaluatedDataItemViewId. + * @member {string} evaluatedDataItemViewId + * @memberof google.cloud.aiplatform.v1beta1.EvaluatedAnnotation + * @instance + */ + EvaluatedAnnotation.prototype.evaluatedDataItemViewId = ""; + + /** + * EvaluatedAnnotation explanations. + * @member {Array.} explanations + * @memberof google.cloud.aiplatform.v1beta1.EvaluatedAnnotation + * @instance + */ + EvaluatedAnnotation.prototype.explanations = $util.emptyArray; + + /** + * EvaluatedAnnotation errorAnalysisAnnotations. + * @member {Array.} errorAnalysisAnnotations + * @memberof google.cloud.aiplatform.v1beta1.EvaluatedAnnotation + * @instance + */ + EvaluatedAnnotation.prototype.errorAnalysisAnnotations = $util.emptyArray; + + /** + * Creates a new EvaluatedAnnotation instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.EvaluatedAnnotation + * @static + * @param {google.cloud.aiplatform.v1beta1.IEvaluatedAnnotation=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.EvaluatedAnnotation} EvaluatedAnnotation instance + */ + EvaluatedAnnotation.create = function create(properties) { + return new EvaluatedAnnotation(properties); + }; + + /** + * Encodes the specified EvaluatedAnnotation message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.EvaluatedAnnotation + * @static + * @param {google.cloud.aiplatform.v1beta1.IEvaluatedAnnotation} message EvaluatedAnnotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvaluatedAnnotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.predictions != null && message.predictions.length) + for (var i = 0; i < message.predictions.length; ++i) + $root.google.protobuf.Value.encode(message.predictions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.groundTruths != null && message.groundTruths.length) + for (var i = 0; i < message.groundTruths.length; ++i) + $root.google.protobuf.Value.encode(message.groundTruths[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dataItemPayload != null && Object.hasOwnProperty.call(message, "dataItemPayload")) + $root.google.protobuf.Value.encode(message.dataItemPayload, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.evaluatedDataItemViewId != null && Object.hasOwnProperty.call(message, "evaluatedDataItemViewId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.evaluatedDataItemViewId); + if (message.explanations != null && message.explanations.length) + for (var i = 0; i < message.explanations.length; ++i) + $root.google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation.encode(message.explanations[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.errorAnalysisAnnotations != null && message.errorAnalysisAnnotations.length) + for (var i = 0; i < message.errorAnalysisAnnotations.length; ++i) + $root.google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.encode(message.errorAnalysisAnnotations[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EvaluatedAnnotation message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.EvaluatedAnnotation + * @static + * @param {google.cloud.aiplatform.v1beta1.IEvaluatedAnnotation} message EvaluatedAnnotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvaluatedAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EvaluatedAnnotation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.EvaluatedAnnotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.EvaluatedAnnotation} EvaluatedAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvaluatedAnnotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.EvaluatedAnnotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + if (!(message.predictions && message.predictions.length)) + message.predictions = []; + message.predictions.push($root.google.protobuf.Value.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.groundTruths && message.groundTruths.length)) + message.groundTruths = []; + message.groundTruths.push($root.google.protobuf.Value.decode(reader, reader.uint32())); + break; + } + case 5: { + message.dataItemPayload = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + } + case 6: { + message.evaluatedDataItemViewId = reader.string(); + break; + } + case 8: { + if (!(message.explanations && message.explanations.length)) + message.explanations = []; + message.explanations.push($root.google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation.decode(reader, reader.uint32())); + break; + } + case 9: { + if (!(message.errorAnalysisAnnotations && message.errorAnalysisAnnotations.length)) + message.errorAnalysisAnnotations = []; + message.errorAnalysisAnnotations.push($root.google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EvaluatedAnnotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.EvaluatedAnnotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.EvaluatedAnnotation} EvaluatedAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvaluatedAnnotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EvaluatedAnnotation message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.EvaluatedAnnotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EvaluatedAnnotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.predictions != null && message.hasOwnProperty("predictions")) { + if (!Array.isArray(message.predictions)) + return "predictions: array expected"; + for (var i = 0; i < message.predictions.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.predictions[i]); + if (error) + return "predictions." + error; + } + } + if (message.groundTruths != null && message.hasOwnProperty("groundTruths")) { + if (!Array.isArray(message.groundTruths)) + return "groundTruths: array expected"; + for (var i = 0; i < message.groundTruths.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.groundTruths[i]); + if (error) + return "groundTruths." + error; + } + } + if (message.dataItemPayload != null && message.hasOwnProperty("dataItemPayload")) { + var error = $root.google.protobuf.Value.verify(message.dataItemPayload); + if (error) + return "dataItemPayload." + error; + } + if (message.evaluatedDataItemViewId != null && message.hasOwnProperty("evaluatedDataItemViewId")) + if (!$util.isString(message.evaluatedDataItemViewId)) + return "evaluatedDataItemViewId: string expected"; + if (message.explanations != null && message.hasOwnProperty("explanations")) { + if (!Array.isArray(message.explanations)) + return "explanations: array expected"; + for (var i = 0; i < message.explanations.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation.verify(message.explanations[i]); + if (error) + return "explanations." + error; + } + } + if (message.errorAnalysisAnnotations != null && message.hasOwnProperty("errorAnalysisAnnotations")) { + if (!Array.isArray(message.errorAnalysisAnnotations)) + return "errorAnalysisAnnotations: array expected"; + for (var i = 0; i < message.errorAnalysisAnnotations.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.verify(message.errorAnalysisAnnotations[i]); + if (error) + return "errorAnalysisAnnotations." + error; + } + } + return null; + }; + + /** + * Creates an EvaluatedAnnotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.EvaluatedAnnotation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.EvaluatedAnnotation} EvaluatedAnnotation + */ + EvaluatedAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.EvaluatedAnnotation) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.EvaluatedAnnotation(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "EVALUATED_ANNOTATION_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TRUE_POSITIVE": + case 1: + message.type = 1; + break; + case "FALSE_POSITIVE": + case 2: + message.type = 2; + break; + case "FALSE_NEGATIVE": + case 3: + message.type = 3; + break; + } + if (object.predictions) { + if (!Array.isArray(object.predictions)) + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.predictions: array expected"); + message.predictions = []; + for (var i = 0; i < object.predictions.length; ++i) { + if (typeof object.predictions[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.predictions: object expected"); + message.predictions[i] = $root.google.protobuf.Value.fromObject(object.predictions[i]); + } + } + if (object.groundTruths) { + if (!Array.isArray(object.groundTruths)) + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.groundTruths: array expected"); + message.groundTruths = []; + for (var i = 0; i < object.groundTruths.length; ++i) { + if (typeof object.groundTruths[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.groundTruths: object expected"); + message.groundTruths[i] = $root.google.protobuf.Value.fromObject(object.groundTruths[i]); + } + } + if (object.dataItemPayload != null) { + if (typeof object.dataItemPayload !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.dataItemPayload: object expected"); + message.dataItemPayload = $root.google.protobuf.Value.fromObject(object.dataItemPayload); + } + if (object.evaluatedDataItemViewId != null) + message.evaluatedDataItemViewId = String(object.evaluatedDataItemViewId); + if (object.explanations) { + if (!Array.isArray(object.explanations)) + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.explanations: array expected"); + message.explanations = []; + for (var i = 0; i < object.explanations.length; ++i) { + if (typeof object.explanations[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.explanations: object expected"); + message.explanations[i] = $root.google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation.fromObject(object.explanations[i]); + } + } + if (object.errorAnalysisAnnotations) { + if (!Array.isArray(object.errorAnalysisAnnotations)) + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.errorAnalysisAnnotations: array expected"); + message.errorAnalysisAnnotations = []; + for (var i = 0; i < object.errorAnalysisAnnotations.length; ++i) { + if (typeof object.errorAnalysisAnnotations[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.errorAnalysisAnnotations: object expected"); + message.errorAnalysisAnnotations[i] = $root.google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.fromObject(object.errorAnalysisAnnotations[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EvaluatedAnnotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.EvaluatedAnnotation + * @static + * @param {google.cloud.aiplatform.v1beta1.EvaluatedAnnotation} message EvaluatedAnnotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EvaluatedAnnotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.predictions = []; + object.groundTruths = []; + object.explanations = []; + object.errorAnalysisAnnotations = []; + } + if (options.defaults) { + object.type = options.enums === String ? "EVALUATED_ANNOTATION_TYPE_UNSPECIFIED" : 0; + object.dataItemPayload = null; + object.evaluatedDataItemViewId = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.EvaluatedAnnotationType[message.type] === undefined ? message.type : $root.google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.EvaluatedAnnotationType[message.type] : message.type; + if (message.predictions && message.predictions.length) { + object.predictions = []; + for (var j = 0; j < message.predictions.length; ++j) + object.predictions[j] = $root.google.protobuf.Value.toObject(message.predictions[j], options); + } + if (message.groundTruths && message.groundTruths.length) { + object.groundTruths = []; + for (var j = 0; j < message.groundTruths.length; ++j) + object.groundTruths[j] = $root.google.protobuf.Value.toObject(message.groundTruths[j], options); + } + if (message.dataItemPayload != null && message.hasOwnProperty("dataItemPayload")) + object.dataItemPayload = $root.google.protobuf.Value.toObject(message.dataItemPayload, options); + if (message.evaluatedDataItemViewId != null && message.hasOwnProperty("evaluatedDataItemViewId")) + object.evaluatedDataItemViewId = message.evaluatedDataItemViewId; + if (message.explanations && message.explanations.length) { + object.explanations = []; + for (var j = 0; j < message.explanations.length; ++j) + object.explanations[j] = $root.google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation.toObject(message.explanations[j], options); + } + if (message.errorAnalysisAnnotations && message.errorAnalysisAnnotations.length) { + object.errorAnalysisAnnotations = []; + for (var j = 0; j < message.errorAnalysisAnnotations.length; ++j) + object.errorAnalysisAnnotations[j] = $root.google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.toObject(message.errorAnalysisAnnotations[j], options); + } + return object; + }; + + /** + * Converts this EvaluatedAnnotation to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.EvaluatedAnnotation + * @instance + * @returns {Object.} JSON object + */ + EvaluatedAnnotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EvaluatedAnnotation + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.EvaluatedAnnotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EvaluatedAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.EvaluatedAnnotation"; + }; + + /** + * EvaluatedAnnotationType enum. + * @name google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.EvaluatedAnnotationType + * @enum {number} + * @property {number} EVALUATED_ANNOTATION_TYPE_UNSPECIFIED=0 EVALUATED_ANNOTATION_TYPE_UNSPECIFIED value + * @property {number} TRUE_POSITIVE=1 TRUE_POSITIVE value + * @property {number} FALSE_POSITIVE=2 FALSE_POSITIVE value + * @property {number} FALSE_NEGATIVE=3 FALSE_NEGATIVE value + */ + EvaluatedAnnotation.EvaluatedAnnotationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVALUATED_ANNOTATION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TRUE_POSITIVE"] = 1; + values[valuesById[2] = "FALSE_POSITIVE"] = 2; + values[valuesById[3] = "FALSE_NEGATIVE"] = 3; + return values; + })(); + + return EvaluatedAnnotation; + })(); + + v1beta1.EvaluatedAnnotationExplanation = (function() { + + /** + * Properties of an EvaluatedAnnotationExplanation. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IEvaluatedAnnotationExplanation + * @property {string|null} [explanationType] EvaluatedAnnotationExplanation explanationType + * @property {google.cloud.aiplatform.v1beta1.IExplanation|null} [explanation] EvaluatedAnnotationExplanation explanation + */ + + /** + * Constructs a new EvaluatedAnnotationExplanation. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents an EvaluatedAnnotationExplanation. + * @implements IEvaluatedAnnotationExplanation + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IEvaluatedAnnotationExplanation=} [properties] Properties to set + */ + function EvaluatedAnnotationExplanation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EvaluatedAnnotationExplanation explanationType. + * @member {string} explanationType + * @memberof google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation + * @instance + */ + EvaluatedAnnotationExplanation.prototype.explanationType = ""; + + /** + * EvaluatedAnnotationExplanation explanation. + * @member {google.cloud.aiplatform.v1beta1.IExplanation|null|undefined} explanation + * @memberof google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation + * @instance + */ + EvaluatedAnnotationExplanation.prototype.explanation = null; + + /** + * Creates a new EvaluatedAnnotationExplanation instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation + * @static + * @param {google.cloud.aiplatform.v1beta1.IEvaluatedAnnotationExplanation=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation} EvaluatedAnnotationExplanation instance + */ + EvaluatedAnnotationExplanation.create = function create(properties) { + return new EvaluatedAnnotationExplanation(properties); + }; + + /** + * Encodes the specified EvaluatedAnnotationExplanation message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation + * @static + * @param {google.cloud.aiplatform.v1beta1.IEvaluatedAnnotationExplanation} message EvaluatedAnnotationExplanation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvaluatedAnnotationExplanation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.explanationType != null && Object.hasOwnProperty.call(message, "explanationType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.explanationType); + if (message.explanation != null && Object.hasOwnProperty.call(message, "explanation")) + $root.google.cloud.aiplatform.v1beta1.Explanation.encode(message.explanation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EvaluatedAnnotationExplanation message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation + * @static + * @param {google.cloud.aiplatform.v1beta1.IEvaluatedAnnotationExplanation} message EvaluatedAnnotationExplanation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvaluatedAnnotationExplanation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EvaluatedAnnotationExplanation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation} EvaluatedAnnotationExplanation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvaluatedAnnotationExplanation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.explanationType = reader.string(); + break; + } + case 2: { + message.explanation = $root.google.cloud.aiplatform.v1beta1.Explanation.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EvaluatedAnnotationExplanation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation} EvaluatedAnnotationExplanation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvaluatedAnnotationExplanation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EvaluatedAnnotationExplanation message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EvaluatedAnnotationExplanation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.explanationType != null && message.hasOwnProperty("explanationType")) + if (!$util.isString(message.explanationType)) + return "explanationType: string expected"; + if (message.explanation != null && message.hasOwnProperty("explanation")) { + var error = $root.google.cloud.aiplatform.v1beta1.Explanation.verify(message.explanation); + if (error) + return "explanation." + error; + } + return null; + }; + + /** + * Creates an EvaluatedAnnotationExplanation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation} EvaluatedAnnotationExplanation + */ + EvaluatedAnnotationExplanation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation(); + if (object.explanationType != null) + message.explanationType = String(object.explanationType); + if (object.explanation != null) { + if (typeof object.explanation !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation.explanation: object expected"); + message.explanation = $root.google.cloud.aiplatform.v1beta1.Explanation.fromObject(object.explanation); + } + return message; + }; + + /** + * Creates a plain object from an EvaluatedAnnotationExplanation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation + * @static + * @param {google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation} message EvaluatedAnnotationExplanation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EvaluatedAnnotationExplanation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.explanationType = ""; + object.explanation = null; + } + if (message.explanationType != null && message.hasOwnProperty("explanationType")) + object.explanationType = message.explanationType; + if (message.explanation != null && message.hasOwnProperty("explanation")) + object.explanation = $root.google.cloud.aiplatform.v1beta1.Explanation.toObject(message.explanation, options); + return object; + }; + + /** + * Converts this EvaluatedAnnotationExplanation to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation + * @instance + * @returns {Object.} JSON object + */ + EvaluatedAnnotationExplanation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EvaluatedAnnotationExplanation + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EvaluatedAnnotationExplanation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.EvaluatedAnnotationExplanation"; + }; + + return EvaluatedAnnotationExplanation; + })(); + + v1beta1.ErrorAnalysisAnnotation = (function() { + + /** + * Properties of an ErrorAnalysisAnnotation. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IErrorAnalysisAnnotation + * @property {Array.|null} [attributedItems] ErrorAnalysisAnnotation attributedItems + * @property {google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.QueryType|null} [queryType] ErrorAnalysisAnnotation queryType + * @property {number|null} [outlierScore] ErrorAnalysisAnnotation outlierScore + * @property {number|null} [outlierThreshold] ErrorAnalysisAnnotation outlierThreshold + */ + + /** + * Constructs a new ErrorAnalysisAnnotation. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents an ErrorAnalysisAnnotation. + * @implements IErrorAnalysisAnnotation + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IErrorAnalysisAnnotation=} [properties] Properties to set + */ + function ErrorAnalysisAnnotation(properties) { + this.attributedItems = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ErrorAnalysisAnnotation attributedItems. + * @member {Array.} attributedItems + * @memberof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation + * @instance + */ + ErrorAnalysisAnnotation.prototype.attributedItems = $util.emptyArray; + + /** + * ErrorAnalysisAnnotation queryType. + * @member {google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.QueryType} queryType + * @memberof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation + * @instance + */ + ErrorAnalysisAnnotation.prototype.queryType = 0; + + /** + * ErrorAnalysisAnnotation outlierScore. + * @member {number} outlierScore + * @memberof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation + * @instance + */ + ErrorAnalysisAnnotation.prototype.outlierScore = 0; + + /** + * ErrorAnalysisAnnotation outlierThreshold. + * @member {number} outlierThreshold + * @memberof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation + * @instance + */ + ErrorAnalysisAnnotation.prototype.outlierThreshold = 0; + + /** + * Creates a new ErrorAnalysisAnnotation instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation + * @static + * @param {google.cloud.aiplatform.v1beta1.IErrorAnalysisAnnotation=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation} ErrorAnalysisAnnotation instance + */ + ErrorAnalysisAnnotation.create = function create(properties) { + return new ErrorAnalysisAnnotation(properties); + }; + + /** + * Encodes the specified ErrorAnalysisAnnotation message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation + * @static + * @param {google.cloud.aiplatform.v1beta1.IErrorAnalysisAnnotation} message ErrorAnalysisAnnotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorAnalysisAnnotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.attributedItems != null && message.attributedItems.length) + for (var i = 0; i < message.attributedItems.length; ++i) + $root.google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem.encode(message.attributedItems[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.queryType != null && Object.hasOwnProperty.call(message, "queryType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.queryType); + if (message.outlierScore != null && Object.hasOwnProperty.call(message, "outlierScore")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.outlierScore); + if (message.outlierThreshold != null && Object.hasOwnProperty.call(message, "outlierThreshold")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.outlierThreshold); + return writer; + }; + + /** + * Encodes the specified ErrorAnalysisAnnotation message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation + * @static + * @param {google.cloud.aiplatform.v1beta1.IErrorAnalysisAnnotation} message ErrorAnalysisAnnotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorAnalysisAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ErrorAnalysisAnnotation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation} ErrorAnalysisAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorAnalysisAnnotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.attributedItems && message.attributedItems.length)) + message.attributedItems = []; + message.attributedItems.push($root.google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem.decode(reader, reader.uint32())); + break; + } + case 2: { + message.queryType = reader.int32(); + break; + } + case 3: { + message.outlierScore = reader.double(); + break; + } + case 4: { + message.outlierThreshold = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ErrorAnalysisAnnotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation} ErrorAnalysisAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorAnalysisAnnotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ErrorAnalysisAnnotation message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ErrorAnalysisAnnotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.attributedItems != null && message.hasOwnProperty("attributedItems")) { + if (!Array.isArray(message.attributedItems)) + return "attributedItems: array expected"; + for (var i = 0; i < message.attributedItems.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem.verify(message.attributedItems[i]); + if (error) + return "attributedItems." + error; + } + } + if (message.queryType != null && message.hasOwnProperty("queryType")) + switch (message.queryType) { + default: + return "queryType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.outlierScore != null && message.hasOwnProperty("outlierScore")) + if (typeof message.outlierScore !== "number") + return "outlierScore: number expected"; + if (message.outlierThreshold != null && message.hasOwnProperty("outlierThreshold")) + if (typeof message.outlierThreshold !== "number") + return "outlierThreshold: number expected"; + return null; + }; + + /** + * Creates an ErrorAnalysisAnnotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation} ErrorAnalysisAnnotation + */ + ErrorAnalysisAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation(); + if (object.attributedItems) { + if (!Array.isArray(object.attributedItems)) + throw TypeError(".google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.attributedItems: array expected"); + message.attributedItems = []; + for (var i = 0; i < object.attributedItems.length; ++i) { + if (typeof object.attributedItems[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.attributedItems: object expected"); + message.attributedItems[i] = $root.google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem.fromObject(object.attributedItems[i]); + } + } + switch (object.queryType) { + default: + if (typeof object.queryType === "number") { + message.queryType = object.queryType; + break; + } + break; + case "QUERY_TYPE_UNSPECIFIED": + case 0: + message.queryType = 0; + break; + case "ALL_SIMILAR": + case 1: + message.queryType = 1; + break; + case "SAME_CLASS_SIMILAR": + case 2: + message.queryType = 2; + break; + case "SAME_CLASS_DISSIMILAR": + case 3: + message.queryType = 3; + break; + } + if (object.outlierScore != null) + message.outlierScore = Number(object.outlierScore); + if (object.outlierThreshold != null) + message.outlierThreshold = Number(object.outlierThreshold); + return message; + }; + + /** + * Creates a plain object from an ErrorAnalysisAnnotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation + * @static + * @param {google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation} message ErrorAnalysisAnnotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ErrorAnalysisAnnotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.attributedItems = []; + if (options.defaults) { + object.queryType = options.enums === String ? "QUERY_TYPE_UNSPECIFIED" : 0; + object.outlierScore = 0; + object.outlierThreshold = 0; + } + if (message.attributedItems && message.attributedItems.length) { + object.attributedItems = []; + for (var j = 0; j < message.attributedItems.length; ++j) + object.attributedItems[j] = $root.google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem.toObject(message.attributedItems[j], options); + } + if (message.queryType != null && message.hasOwnProperty("queryType")) + object.queryType = options.enums === String ? $root.google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.QueryType[message.queryType] === undefined ? message.queryType : $root.google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.QueryType[message.queryType] : message.queryType; + if (message.outlierScore != null && message.hasOwnProperty("outlierScore")) + object.outlierScore = options.json && !isFinite(message.outlierScore) ? String(message.outlierScore) : message.outlierScore; + if (message.outlierThreshold != null && message.hasOwnProperty("outlierThreshold")) + object.outlierThreshold = options.json && !isFinite(message.outlierThreshold) ? String(message.outlierThreshold) : message.outlierThreshold; + return object; + }; + + /** + * Converts this ErrorAnalysisAnnotation to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation + * @instance + * @returns {Object.} JSON object + */ + ErrorAnalysisAnnotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ErrorAnalysisAnnotation + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ErrorAnalysisAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation"; + }; + + ErrorAnalysisAnnotation.AttributedItem = (function() { + + /** + * Properties of an AttributedItem. + * @memberof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation + * @interface IAttributedItem + * @property {string|null} [annotationResourceName] AttributedItem annotationResourceName + * @property {number|null} [distance] AttributedItem distance + */ + + /** + * Constructs a new AttributedItem. + * @memberof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation + * @classdesc Represents an AttributedItem. + * @implements IAttributedItem + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.IAttributedItem=} [properties] Properties to set + */ + function AttributedItem(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AttributedItem annotationResourceName. + * @member {string} annotationResourceName + * @memberof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem + * @instance + */ + AttributedItem.prototype.annotationResourceName = ""; + + /** + * AttributedItem distance. + * @member {number} distance + * @memberof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem + * @instance + */ + AttributedItem.prototype.distance = 0; + + /** + * Creates a new AttributedItem instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem + * @static + * @param {google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.IAttributedItem=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem} AttributedItem instance + */ + AttributedItem.create = function create(properties) { + return new AttributedItem(properties); + }; + + /** + * Encodes the specified AttributedItem message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem + * @static + * @param {google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.IAttributedItem} message AttributedItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttributedItem.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotationResourceName != null && Object.hasOwnProperty.call(message, "annotationResourceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.annotationResourceName); + if (message.distance != null && Object.hasOwnProperty.call(message, "distance")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.distance); + return writer; + }; + + /** + * Encodes the specified AttributedItem message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem + * @static + * @param {google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.IAttributedItem} message AttributedItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttributedItem.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AttributedItem message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem} AttributedItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttributedItem.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.annotationResourceName = reader.string(); + break; + } + case 2: { + message.distance = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AttributedItem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem} AttributedItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttributedItem.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AttributedItem message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AttributedItem.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotationResourceName != null && message.hasOwnProperty("annotationResourceName")) + if (!$util.isString(message.annotationResourceName)) + return "annotationResourceName: string expected"; + if (message.distance != null && message.hasOwnProperty("distance")) + if (typeof message.distance !== "number") + return "distance: number expected"; + return null; + }; + + /** + * Creates an AttributedItem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem} AttributedItem + */ + AttributedItem.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem(); + if (object.annotationResourceName != null) + message.annotationResourceName = String(object.annotationResourceName); + if (object.distance != null) + message.distance = Number(object.distance); + return message; + }; + + /** + * Creates a plain object from an AttributedItem message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem + * @static + * @param {google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem} message AttributedItem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AttributedItem.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.annotationResourceName = ""; + object.distance = 0; + } + if (message.annotationResourceName != null && message.hasOwnProperty("annotationResourceName")) + object.annotationResourceName = message.annotationResourceName; + if (message.distance != null && message.hasOwnProperty("distance")) + object.distance = options.json && !isFinite(message.distance) ? String(message.distance) : message.distance; + return object; + }; + + /** + * Converts this AttributedItem to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem + * @instance + * @returns {Object.} JSON object + */ + AttributedItem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AttributedItem + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AttributedItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.AttributedItem"; + }; + + return AttributedItem; + })(); + + /** + * QueryType enum. + * @name google.cloud.aiplatform.v1beta1.ErrorAnalysisAnnotation.QueryType + * @enum {number} + * @property {number} QUERY_TYPE_UNSPECIFIED=0 QUERY_TYPE_UNSPECIFIED value + * @property {number} ALL_SIMILAR=1 ALL_SIMILAR value + * @property {number} SAME_CLASS_SIMILAR=2 SAME_CLASS_SIMILAR value + * @property {number} SAME_CLASS_DISSIMILAR=3 SAME_CLASS_DISSIMILAR value + */ + ErrorAnalysisAnnotation.QueryType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "QUERY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALL_SIMILAR"] = 1; + values[valuesById[2] = "SAME_CLASS_SIMILAR"] = 2; + values[valuesById[3] = "SAME_CLASS_DISSIMILAR"] = 3; + return values; + })(); + + return ErrorAnalysisAnnotation; + })(); + v1beta1.Event = (function() { /** @@ -227703,6 +234781,7 @@ * @interface IScaling * @property {number|null} [minNodeCount] Scaling minNodeCount * @property {number|null} [maxNodeCount] Scaling maxNodeCount + * @property {number|null} [cpuUtilizationTarget] Scaling cpuUtilizationTarget */ /** @@ -227736,6 +234815,14 @@ */ Scaling.prototype.maxNodeCount = 0; + /** + * Scaling cpuUtilizationTarget. + * @member {number} cpuUtilizationTarget + * @memberof google.cloud.aiplatform.v1beta1.Featurestore.OnlineServingConfig.Scaling + * @instance + */ + Scaling.prototype.cpuUtilizationTarget = 0; + /** * Creates a new Scaling instance using the specified properties. * @function create @@ -227764,6 +234851,8 @@ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.minNodeCount); if (message.maxNodeCount != null && Object.hasOwnProperty.call(message, "maxNodeCount")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxNodeCount); + if (message.cpuUtilizationTarget != null && Object.hasOwnProperty.call(message, "cpuUtilizationTarget")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.cpuUtilizationTarget); return writer; }; @@ -227806,6 +234895,10 @@ message.maxNodeCount = reader.int32(); break; } + case 3: { + message.cpuUtilizationTarget = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -227847,6 +234940,9 @@ if (message.maxNodeCount != null && message.hasOwnProperty("maxNodeCount")) if (!$util.isInteger(message.maxNodeCount)) return "maxNodeCount: integer expected"; + if (message.cpuUtilizationTarget != null && message.hasOwnProperty("cpuUtilizationTarget")) + if (!$util.isInteger(message.cpuUtilizationTarget)) + return "cpuUtilizationTarget: integer expected"; return null; }; @@ -227866,6 +234962,8 @@ message.minNodeCount = object.minNodeCount | 0; if (object.maxNodeCount != null) message.maxNodeCount = object.maxNodeCount | 0; + if (object.cpuUtilizationTarget != null) + message.cpuUtilizationTarget = object.cpuUtilizationTarget | 0; return message; }; @@ -227885,11 +234983,14 @@ if (options.defaults) { object.minNodeCount = 0; object.maxNodeCount = 0; + object.cpuUtilizationTarget = 0; } if (message.minNodeCount != null && message.hasOwnProperty("minNodeCount")) object.minNodeCount = message.minNodeCount; if (message.maxNodeCount != null && message.hasOwnProperty("maxNodeCount")) object.maxNodeCount = message.maxNodeCount; + if (message.cpuUtilizationTarget != null && message.hasOwnProperty("cpuUtilizationTarget")) + object.cpuUtilizationTarget = message.cpuUtilizationTarget; return object; }; @@ -245116,6 +252217,8 @@ * Properties of a DeleteFeatureValuesResponse. * @memberof google.cloud.aiplatform.v1beta1 * @interface IDeleteFeatureValuesResponse + * @property {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.ISelectEntity|null} [selectEntity] DeleteFeatureValuesResponse selectEntity + * @property {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.ISelectTimeRangeAndFeature|null} [selectTimeRangeAndFeature] DeleteFeatureValuesResponse selectTimeRangeAndFeature */ /** @@ -245133,6 +252236,36 @@ this[keys[i]] = properties[keys[i]]; } + /** + * DeleteFeatureValuesResponse selectEntity. + * @member {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.ISelectEntity|null|undefined} selectEntity + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse + * @instance + */ + DeleteFeatureValuesResponse.prototype.selectEntity = null; + + /** + * DeleteFeatureValuesResponse selectTimeRangeAndFeature. + * @member {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.ISelectTimeRangeAndFeature|null|undefined} selectTimeRangeAndFeature + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse + * @instance + */ + DeleteFeatureValuesResponse.prototype.selectTimeRangeAndFeature = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DeleteFeatureValuesResponse response. + * @member {"selectEntity"|"selectTimeRangeAndFeature"|undefined} response + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse + * @instance + */ + Object.defineProperty(DeleteFeatureValuesResponse.prototype, "response", { + get: $util.oneOfGetter($oneOfFields = ["selectEntity", "selectTimeRangeAndFeature"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new DeleteFeatureValuesResponse instance using the specified properties. * @function create @@ -245157,6 +252290,10 @@ DeleteFeatureValuesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.selectEntity != null && Object.hasOwnProperty.call(message, "selectEntity")) + $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity.encode(message.selectEntity, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.selectTimeRangeAndFeature != null && Object.hasOwnProperty.call(message, "selectTimeRangeAndFeature")) + $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature.encode(message.selectTimeRangeAndFeature, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -245191,6 +252328,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.selectEntity = $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity.decode(reader, reader.uint32()); + break; + } + case 2: { + message.selectTimeRangeAndFeature = $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -245226,6 +252371,25 @@ DeleteFeatureValuesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; + if (message.selectEntity != null && message.hasOwnProperty("selectEntity")) { + properties.response = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity.verify(message.selectEntity); + if (error) + return "selectEntity." + error; + } + } + if (message.selectTimeRangeAndFeature != null && message.hasOwnProperty("selectTimeRangeAndFeature")) { + if (properties.response === 1) + return "response: multiple values"; + properties.response = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature.verify(message.selectTimeRangeAndFeature); + if (error) + return "selectTimeRangeAndFeature." + error; + } + } return null; }; @@ -245240,7 +252404,18 @@ DeleteFeatureValuesResponse.fromObject = function fromObject(object) { if (object instanceof $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse) return object; - return new $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse(); + var message = new $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse(); + if (object.selectEntity != null) { + if (typeof object.selectEntity !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.selectEntity: object expected"); + message.selectEntity = $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity.fromObject(object.selectEntity); + } + if (object.selectTimeRangeAndFeature != null) { + if (typeof object.selectTimeRangeAndFeature !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.selectTimeRangeAndFeature: object expected"); + message.selectTimeRangeAndFeature = $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature.fromObject(object.selectTimeRangeAndFeature); + } + return message; }; /** @@ -245252,8 +252427,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteFeatureValuesResponse.toObject = function toObject() { - return {}; + DeleteFeatureValuesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.selectEntity != null && message.hasOwnProperty("selectEntity")) { + object.selectEntity = $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity.toObject(message.selectEntity, options); + if (options.oneofs) + object.response = "selectEntity"; + } + if (message.selectTimeRangeAndFeature != null && message.hasOwnProperty("selectTimeRangeAndFeature")) { + object.selectTimeRangeAndFeature = $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature.toObject(message.selectTimeRangeAndFeature, options); + if (options.oneofs) + object.response = "selectTimeRangeAndFeature"; + } + return object; }; /** @@ -245282,6 +252470,553 @@ return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse"; }; + DeleteFeatureValuesResponse.SelectEntity = (function() { + + /** + * Properties of a SelectEntity. + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse + * @interface ISelectEntity + * @property {number|Long|null} [offlineStorageDeletedEntityRowCount] SelectEntity offlineStorageDeletedEntityRowCount + * @property {number|Long|null} [onlineStorageDeletedEntityCount] SelectEntity onlineStorageDeletedEntityCount + */ + + /** + * Constructs a new SelectEntity. + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse + * @classdesc Represents a SelectEntity. + * @implements ISelectEntity + * @constructor + * @param {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.ISelectEntity=} [properties] Properties to set + */ + function SelectEntity(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SelectEntity offlineStorageDeletedEntityRowCount. + * @member {number|Long} offlineStorageDeletedEntityRowCount + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity + * @instance + */ + SelectEntity.prototype.offlineStorageDeletedEntityRowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * SelectEntity onlineStorageDeletedEntityCount. + * @member {number|Long} onlineStorageDeletedEntityCount + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity + * @instance + */ + SelectEntity.prototype.onlineStorageDeletedEntityCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new SelectEntity instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity + * @static + * @param {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.ISelectEntity=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity} SelectEntity instance + */ + SelectEntity.create = function create(properties) { + return new SelectEntity(properties); + }; + + /** + * Encodes the specified SelectEntity message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity + * @static + * @param {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.ISelectEntity} message SelectEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectEntity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.offlineStorageDeletedEntityRowCount != null && Object.hasOwnProperty.call(message, "offlineStorageDeletedEntityRowCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.offlineStorageDeletedEntityRowCount); + if (message.onlineStorageDeletedEntityCount != null && Object.hasOwnProperty.call(message, "onlineStorageDeletedEntityCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.onlineStorageDeletedEntityCount); + return writer; + }; + + /** + * Encodes the specified SelectEntity message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity + * @static + * @param {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.ISelectEntity} message SelectEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectEntity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SelectEntity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity} SelectEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectEntity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.offlineStorageDeletedEntityRowCount = reader.int64(); + break; + } + case 2: { + message.onlineStorageDeletedEntityCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SelectEntity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity} SelectEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectEntity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SelectEntity message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SelectEntity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.offlineStorageDeletedEntityRowCount != null && message.hasOwnProperty("offlineStorageDeletedEntityRowCount")) + if (!$util.isInteger(message.offlineStorageDeletedEntityRowCount) && !(message.offlineStorageDeletedEntityRowCount && $util.isInteger(message.offlineStorageDeletedEntityRowCount.low) && $util.isInteger(message.offlineStorageDeletedEntityRowCount.high))) + return "offlineStorageDeletedEntityRowCount: integer|Long expected"; + if (message.onlineStorageDeletedEntityCount != null && message.hasOwnProperty("onlineStorageDeletedEntityCount")) + if (!$util.isInteger(message.onlineStorageDeletedEntityCount) && !(message.onlineStorageDeletedEntityCount && $util.isInteger(message.onlineStorageDeletedEntityCount.low) && $util.isInteger(message.onlineStorageDeletedEntityCount.high))) + return "onlineStorageDeletedEntityCount: integer|Long expected"; + return null; + }; + + /** + * Creates a SelectEntity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity} SelectEntity + */ + SelectEntity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity(); + if (object.offlineStorageDeletedEntityRowCount != null) + if ($util.Long) + (message.offlineStorageDeletedEntityRowCount = $util.Long.fromValue(object.offlineStorageDeletedEntityRowCount)).unsigned = false; + else if (typeof object.offlineStorageDeletedEntityRowCount === "string") + message.offlineStorageDeletedEntityRowCount = parseInt(object.offlineStorageDeletedEntityRowCount, 10); + else if (typeof object.offlineStorageDeletedEntityRowCount === "number") + message.offlineStorageDeletedEntityRowCount = object.offlineStorageDeletedEntityRowCount; + else if (typeof object.offlineStorageDeletedEntityRowCount === "object") + message.offlineStorageDeletedEntityRowCount = new $util.LongBits(object.offlineStorageDeletedEntityRowCount.low >>> 0, object.offlineStorageDeletedEntityRowCount.high >>> 0).toNumber(); + if (object.onlineStorageDeletedEntityCount != null) + if ($util.Long) + (message.onlineStorageDeletedEntityCount = $util.Long.fromValue(object.onlineStorageDeletedEntityCount)).unsigned = false; + else if (typeof object.onlineStorageDeletedEntityCount === "string") + message.onlineStorageDeletedEntityCount = parseInt(object.onlineStorageDeletedEntityCount, 10); + else if (typeof object.onlineStorageDeletedEntityCount === "number") + message.onlineStorageDeletedEntityCount = object.onlineStorageDeletedEntityCount; + else if (typeof object.onlineStorageDeletedEntityCount === "object") + message.onlineStorageDeletedEntityCount = new $util.LongBits(object.onlineStorageDeletedEntityCount.low >>> 0, object.onlineStorageDeletedEntityCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a SelectEntity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity + * @static + * @param {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity} message SelectEntity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SelectEntity.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.offlineStorageDeletedEntityRowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offlineStorageDeletedEntityRowCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.onlineStorageDeletedEntityCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.onlineStorageDeletedEntityCount = options.longs === String ? "0" : 0; + } + if (message.offlineStorageDeletedEntityRowCount != null && message.hasOwnProperty("offlineStorageDeletedEntityRowCount")) + if (typeof message.offlineStorageDeletedEntityRowCount === "number") + object.offlineStorageDeletedEntityRowCount = options.longs === String ? String(message.offlineStorageDeletedEntityRowCount) : message.offlineStorageDeletedEntityRowCount; + else + object.offlineStorageDeletedEntityRowCount = options.longs === String ? $util.Long.prototype.toString.call(message.offlineStorageDeletedEntityRowCount) : options.longs === Number ? new $util.LongBits(message.offlineStorageDeletedEntityRowCount.low >>> 0, message.offlineStorageDeletedEntityRowCount.high >>> 0).toNumber() : message.offlineStorageDeletedEntityRowCount; + if (message.onlineStorageDeletedEntityCount != null && message.hasOwnProperty("onlineStorageDeletedEntityCount")) + if (typeof message.onlineStorageDeletedEntityCount === "number") + object.onlineStorageDeletedEntityCount = options.longs === String ? String(message.onlineStorageDeletedEntityCount) : message.onlineStorageDeletedEntityCount; + else + object.onlineStorageDeletedEntityCount = options.longs === String ? $util.Long.prototype.toString.call(message.onlineStorageDeletedEntityCount) : options.longs === Number ? new $util.LongBits(message.onlineStorageDeletedEntityCount.low >>> 0, message.onlineStorageDeletedEntityCount.high >>> 0).toNumber() : message.onlineStorageDeletedEntityCount; + return object; + }; + + /** + * Converts this SelectEntity to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity + * @instance + * @returns {Object.} JSON object + */ + SelectEntity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SelectEntity + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SelectEntity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectEntity"; + }; + + return SelectEntity; + })(); + + DeleteFeatureValuesResponse.SelectTimeRangeAndFeature = (function() { + + /** + * Properties of a SelectTimeRangeAndFeature. + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse + * @interface ISelectTimeRangeAndFeature + * @property {number|Long|null} [impactedFeatureCount] SelectTimeRangeAndFeature impactedFeatureCount + * @property {number|Long|null} [offlineStorageModifiedEntityRowCount] SelectTimeRangeAndFeature offlineStorageModifiedEntityRowCount + * @property {number|Long|null} [onlineStorageModifiedEntityCount] SelectTimeRangeAndFeature onlineStorageModifiedEntityCount + */ + + /** + * Constructs a new SelectTimeRangeAndFeature. + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse + * @classdesc Represents a SelectTimeRangeAndFeature. + * @implements ISelectTimeRangeAndFeature + * @constructor + * @param {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.ISelectTimeRangeAndFeature=} [properties] Properties to set + */ + function SelectTimeRangeAndFeature(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SelectTimeRangeAndFeature impactedFeatureCount. + * @member {number|Long} impactedFeatureCount + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature + * @instance + */ + SelectTimeRangeAndFeature.prototype.impactedFeatureCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * SelectTimeRangeAndFeature offlineStorageModifiedEntityRowCount. + * @member {number|Long} offlineStorageModifiedEntityRowCount + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature + * @instance + */ + SelectTimeRangeAndFeature.prototype.offlineStorageModifiedEntityRowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * SelectTimeRangeAndFeature onlineStorageModifiedEntityCount. + * @member {number|Long} onlineStorageModifiedEntityCount + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature + * @instance + */ + SelectTimeRangeAndFeature.prototype.onlineStorageModifiedEntityCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new SelectTimeRangeAndFeature instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature + * @static + * @param {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.ISelectTimeRangeAndFeature=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature} SelectTimeRangeAndFeature instance + */ + SelectTimeRangeAndFeature.create = function create(properties) { + return new SelectTimeRangeAndFeature(properties); + }; + + /** + * Encodes the specified SelectTimeRangeAndFeature message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature + * @static + * @param {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.ISelectTimeRangeAndFeature} message SelectTimeRangeAndFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectTimeRangeAndFeature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.impactedFeatureCount != null && Object.hasOwnProperty.call(message, "impactedFeatureCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.impactedFeatureCount); + if (message.offlineStorageModifiedEntityRowCount != null && Object.hasOwnProperty.call(message, "offlineStorageModifiedEntityRowCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.offlineStorageModifiedEntityRowCount); + if (message.onlineStorageModifiedEntityCount != null && Object.hasOwnProperty.call(message, "onlineStorageModifiedEntityCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.onlineStorageModifiedEntityCount); + return writer; + }; + + /** + * Encodes the specified SelectTimeRangeAndFeature message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature + * @static + * @param {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.ISelectTimeRangeAndFeature} message SelectTimeRangeAndFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectTimeRangeAndFeature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SelectTimeRangeAndFeature message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature} SelectTimeRangeAndFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectTimeRangeAndFeature.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.impactedFeatureCount = reader.int64(); + break; + } + case 2: { + message.offlineStorageModifiedEntityRowCount = reader.int64(); + break; + } + case 3: { + message.onlineStorageModifiedEntityCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SelectTimeRangeAndFeature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature} SelectTimeRangeAndFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectTimeRangeAndFeature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SelectTimeRangeAndFeature message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SelectTimeRangeAndFeature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.impactedFeatureCount != null && message.hasOwnProperty("impactedFeatureCount")) + if (!$util.isInteger(message.impactedFeatureCount) && !(message.impactedFeatureCount && $util.isInteger(message.impactedFeatureCount.low) && $util.isInteger(message.impactedFeatureCount.high))) + return "impactedFeatureCount: integer|Long expected"; + if (message.offlineStorageModifiedEntityRowCount != null && message.hasOwnProperty("offlineStorageModifiedEntityRowCount")) + if (!$util.isInteger(message.offlineStorageModifiedEntityRowCount) && !(message.offlineStorageModifiedEntityRowCount && $util.isInteger(message.offlineStorageModifiedEntityRowCount.low) && $util.isInteger(message.offlineStorageModifiedEntityRowCount.high))) + return "offlineStorageModifiedEntityRowCount: integer|Long expected"; + if (message.onlineStorageModifiedEntityCount != null && message.hasOwnProperty("onlineStorageModifiedEntityCount")) + if (!$util.isInteger(message.onlineStorageModifiedEntityCount) && !(message.onlineStorageModifiedEntityCount && $util.isInteger(message.onlineStorageModifiedEntityCount.low) && $util.isInteger(message.onlineStorageModifiedEntityCount.high))) + return "onlineStorageModifiedEntityCount: integer|Long expected"; + return null; + }; + + /** + * Creates a SelectTimeRangeAndFeature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature} SelectTimeRangeAndFeature + */ + SelectTimeRangeAndFeature.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature(); + if (object.impactedFeatureCount != null) + if ($util.Long) + (message.impactedFeatureCount = $util.Long.fromValue(object.impactedFeatureCount)).unsigned = false; + else if (typeof object.impactedFeatureCount === "string") + message.impactedFeatureCount = parseInt(object.impactedFeatureCount, 10); + else if (typeof object.impactedFeatureCount === "number") + message.impactedFeatureCount = object.impactedFeatureCount; + else if (typeof object.impactedFeatureCount === "object") + message.impactedFeatureCount = new $util.LongBits(object.impactedFeatureCount.low >>> 0, object.impactedFeatureCount.high >>> 0).toNumber(); + if (object.offlineStorageModifiedEntityRowCount != null) + if ($util.Long) + (message.offlineStorageModifiedEntityRowCount = $util.Long.fromValue(object.offlineStorageModifiedEntityRowCount)).unsigned = false; + else if (typeof object.offlineStorageModifiedEntityRowCount === "string") + message.offlineStorageModifiedEntityRowCount = parseInt(object.offlineStorageModifiedEntityRowCount, 10); + else if (typeof object.offlineStorageModifiedEntityRowCount === "number") + message.offlineStorageModifiedEntityRowCount = object.offlineStorageModifiedEntityRowCount; + else if (typeof object.offlineStorageModifiedEntityRowCount === "object") + message.offlineStorageModifiedEntityRowCount = new $util.LongBits(object.offlineStorageModifiedEntityRowCount.low >>> 0, object.offlineStorageModifiedEntityRowCount.high >>> 0).toNumber(); + if (object.onlineStorageModifiedEntityCount != null) + if ($util.Long) + (message.onlineStorageModifiedEntityCount = $util.Long.fromValue(object.onlineStorageModifiedEntityCount)).unsigned = false; + else if (typeof object.onlineStorageModifiedEntityCount === "string") + message.onlineStorageModifiedEntityCount = parseInt(object.onlineStorageModifiedEntityCount, 10); + else if (typeof object.onlineStorageModifiedEntityCount === "number") + message.onlineStorageModifiedEntityCount = object.onlineStorageModifiedEntityCount; + else if (typeof object.onlineStorageModifiedEntityCount === "object") + message.onlineStorageModifiedEntityCount = new $util.LongBits(object.onlineStorageModifiedEntityCount.low >>> 0, object.onlineStorageModifiedEntityCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a SelectTimeRangeAndFeature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature + * @static + * @param {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature} message SelectTimeRangeAndFeature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SelectTimeRangeAndFeature.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.impactedFeatureCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.impactedFeatureCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.offlineStorageModifiedEntityRowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offlineStorageModifiedEntityRowCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.onlineStorageModifiedEntityCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.onlineStorageModifiedEntityCount = options.longs === String ? "0" : 0; + } + if (message.impactedFeatureCount != null && message.hasOwnProperty("impactedFeatureCount")) + if (typeof message.impactedFeatureCount === "number") + object.impactedFeatureCount = options.longs === String ? String(message.impactedFeatureCount) : message.impactedFeatureCount; + else + object.impactedFeatureCount = options.longs === String ? $util.Long.prototype.toString.call(message.impactedFeatureCount) : options.longs === Number ? new $util.LongBits(message.impactedFeatureCount.low >>> 0, message.impactedFeatureCount.high >>> 0).toNumber() : message.impactedFeatureCount; + if (message.offlineStorageModifiedEntityRowCount != null && message.hasOwnProperty("offlineStorageModifiedEntityRowCount")) + if (typeof message.offlineStorageModifiedEntityRowCount === "number") + object.offlineStorageModifiedEntityRowCount = options.longs === String ? String(message.offlineStorageModifiedEntityRowCount) : message.offlineStorageModifiedEntityRowCount; + else + object.offlineStorageModifiedEntityRowCount = options.longs === String ? $util.Long.prototype.toString.call(message.offlineStorageModifiedEntityRowCount) : options.longs === Number ? new $util.LongBits(message.offlineStorageModifiedEntityRowCount.low >>> 0, message.offlineStorageModifiedEntityRowCount.high >>> 0).toNumber() : message.offlineStorageModifiedEntityRowCount; + if (message.onlineStorageModifiedEntityCount != null && message.hasOwnProperty("onlineStorageModifiedEntityCount")) + if (typeof message.onlineStorageModifiedEntityCount === "number") + object.onlineStorageModifiedEntityCount = options.longs === String ? String(message.onlineStorageModifiedEntityCount) : message.onlineStorageModifiedEntityCount; + else + object.onlineStorageModifiedEntityCount = options.longs === String ? $util.Long.prototype.toString.call(message.onlineStorageModifiedEntityCount) : options.longs === Number ? new $util.LongBits(message.onlineStorageModifiedEntityCount.low >>> 0, message.onlineStorageModifiedEntityCount.high >>> 0).toNumber() : message.onlineStorageModifiedEntityCount; + return object; + }; + + /** + * Converts this SelectTimeRangeAndFeature to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature + * @instance + * @returns {Object.} JSON object + */ + SelectTimeRangeAndFeature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SelectTimeRangeAndFeature + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SelectTimeRangeAndFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature"; + }; + + return SelectTimeRangeAndFeature; + })(); + return DeleteFeatureValuesResponse; })(); @@ -301064,6 +308799,7 @@ * @property {string|null} [metricsSchemaUri] ModelEvaluationSlice metricsSchemaUri * @property {google.protobuf.IValue|null} [metrics] ModelEvaluationSlice metrics * @property {google.protobuf.ITimestamp|null} [createTime] ModelEvaluationSlice createTime + * @property {google.cloud.aiplatform.v1beta1.IModelExplanation|null} [modelExplanation] ModelEvaluationSlice modelExplanation */ /** @@ -301121,6 +308857,14 @@ */ ModelEvaluationSlice.prototype.createTime = null; + /** + * ModelEvaluationSlice modelExplanation. + * @member {google.cloud.aiplatform.v1beta1.IModelExplanation|null|undefined} modelExplanation + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice + * @instance + */ + ModelEvaluationSlice.prototype.modelExplanation = null; + /** * Creates a new ModelEvaluationSlice instance using the specified properties. * @function create @@ -301155,6 +308899,8 @@ $root.google.protobuf.Value.encode(message.metrics, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.modelExplanation != null && Object.hasOwnProperty.call(message, "modelExplanation")) + $root.google.cloud.aiplatform.v1beta1.ModelExplanation.encode(message.modelExplanation, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -301209,6 +308955,10 @@ message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } + case 6: { + message.modelExplanation = $root.google.cloud.aiplatform.v1beta1.ModelExplanation.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -301265,6 +309015,11 @@ if (error) return "createTime." + error; } + if (message.modelExplanation != null && message.hasOwnProperty("modelExplanation")) { + var error = $root.google.cloud.aiplatform.v1beta1.ModelExplanation.verify(message.modelExplanation); + if (error) + return "modelExplanation." + error; + } return null; }; @@ -301299,6 +309054,11 @@ throw TypeError(".google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } + if (object.modelExplanation != null) { + if (typeof object.modelExplanation !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.modelExplanation: object expected"); + message.modelExplanation = $root.google.cloud.aiplatform.v1beta1.ModelExplanation.fromObject(object.modelExplanation); + } return message; }; @@ -301321,6 +309081,7 @@ object.metricsSchemaUri = ""; object.metrics = null; object.createTime = null; + object.modelExplanation = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -301332,6 +309093,8 @@ object.metrics = $root.google.protobuf.Value.toObject(message.metrics, options); if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.modelExplanation != null && message.hasOwnProperty("modelExplanation")) + object.modelExplanation = $root.google.cloud.aiplatform.v1beta1.ModelExplanation.toObject(message.modelExplanation, options); return object; }; @@ -301369,6 +309132,7 @@ * @interface ISlice * @property {string|null} [dimension] Slice dimension * @property {string|null} [value] Slice value + * @property {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.ISliceSpec|null} [sliceSpec] Slice sliceSpec */ /** @@ -301402,6 +309166,14 @@ */ Slice.prototype.value = ""; + /** + * Slice sliceSpec. + * @member {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.ISliceSpec|null|undefined} sliceSpec + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice + * @instance + */ + Slice.prototype.sliceSpec = null; + /** * Creates a new Slice instance using the specified properties. * @function create @@ -301430,6 +309202,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimension); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.sliceSpec != null && Object.hasOwnProperty.call(message, "sliceSpec")) + $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.encode(message.sliceSpec, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -301472,6 +309246,10 @@ message.value = reader.string(); break; } + case 3: { + message.sliceSpec = $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -301513,6 +309291,11 @@ if (message.value != null && message.hasOwnProperty("value")) if (!$util.isString(message.value)) return "value: string expected"; + if (message.sliceSpec != null && message.hasOwnProperty("sliceSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.verify(message.sliceSpec); + if (error) + return "sliceSpec." + error; + } return null; }; @@ -301532,6 +309315,11 @@ message.dimension = String(object.dimension); if (object.value != null) message.value = String(object.value); + if (object.sliceSpec != null) { + if (typeof object.sliceSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.sliceSpec: object expected"); + message.sliceSpec = $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.fromObject(object.sliceSpec); + } return message; }; @@ -301551,11 +309339,14 @@ if (options.defaults) { object.dimension = ""; object.value = ""; + object.sliceSpec = null; } if (message.dimension != null && message.hasOwnProperty("dimension")) object.dimension = message.dimension; if (message.value != null && message.hasOwnProperty("value")) object.value = message.value; + if (message.sliceSpec != null && message.hasOwnProperty("sliceSpec")) + object.sliceSpec = $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.toObject(message.sliceSpec, options); return object; }; @@ -301585,6 +309376,1025 @@ return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice"; }; + Slice.SliceSpec = (function() { + + /** + * Properties of a SliceSpec. + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice + * @interface ISliceSpec + * @property {Object.|null} [configs] SliceSpec configs + */ + + /** + * Constructs a new SliceSpec. + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice + * @classdesc Represents a SliceSpec. + * @implements ISliceSpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.ISliceSpec=} [properties] Properties to set + */ + function SliceSpec(properties) { + this.configs = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SliceSpec configs. + * @member {Object.} configs + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec + * @instance + */ + SliceSpec.prototype.configs = $util.emptyObject; + + /** + * Creates a new SliceSpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.ISliceSpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec} SliceSpec instance + */ + SliceSpec.create = function create(properties) { + return new SliceSpec(properties); + }; + + /** + * Encodes the specified SliceSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.ISliceSpec} message SliceSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SliceSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.configs != null && Object.hasOwnProperty.call(message, "configs")) + for (var keys = Object.keys(message.configs), 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.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.encode(message.configs[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified SliceSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.ISliceSpec} message SliceSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SliceSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SliceSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec} SliceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SliceSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (message.configs === $util.emptyObject) + message.configs = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.configs[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SliceSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec} SliceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SliceSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SliceSpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SliceSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.configs != null && message.hasOwnProperty("configs")) { + if (!$util.isObject(message.configs)) + return "configs: object expected"; + var key = Object.keys(message.configs); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.verify(message.configs[key[i]]); + if (error) + return "configs." + error; + } + } + return null; + }; + + /** + * Creates a SliceSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec} SliceSpec + */ + SliceSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec(); + if (object.configs) { + if (typeof object.configs !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.configs: object expected"); + message.configs = {}; + for (var keys = Object.keys(object.configs), i = 0; i < keys.length; ++i) { + if (typeof object.configs[keys[i]] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.configs: object expected"); + message.configs[keys[i]] = $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.fromObject(object.configs[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a SliceSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec} message SliceSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SliceSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.configs = {}; + var keys2; + if (message.configs && (keys2 = Object.keys(message.configs)).length) { + object.configs = {}; + for (var j = 0; j < keys2.length; ++j) + object.configs[keys2[j]] = $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.toObject(message.configs[keys2[j]], options); + } + return object; + }; + + /** + * Converts this SliceSpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec + * @instance + * @returns {Object.} JSON object + */ + SliceSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SliceSpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SliceSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec"; + }; + + SliceSpec.SliceConfig = (function() { + + /** + * Properties of a SliceConfig. + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec + * @interface ISliceConfig + * @property {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.IValue|null} [value] SliceConfig value + * @property {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.IRange|null} [range] SliceConfig range + * @property {google.protobuf.IBoolValue|null} [allValues] SliceConfig allValues + */ + + /** + * Constructs a new SliceConfig. + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec + * @classdesc Represents a SliceConfig. + * @implements ISliceConfig + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.ISliceConfig=} [properties] Properties to set + */ + function SliceConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SliceConfig value. + * @member {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.IValue|null|undefined} value + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @instance + */ + SliceConfig.prototype.value = null; + + /** + * SliceConfig range. + * @member {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.IRange|null|undefined} range + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @instance + */ + SliceConfig.prototype.range = null; + + /** + * SliceConfig allValues. + * @member {google.protobuf.IBoolValue|null|undefined} allValues + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @instance + */ + SliceConfig.prototype.allValues = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SliceConfig kind. + * @member {"value"|"range"|"allValues"|undefined} kind + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @instance + */ + Object.defineProperty(SliceConfig.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["value", "range", "allValues"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SliceConfig instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.ISliceConfig=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig} SliceConfig instance + */ + SliceConfig.create = function create(properties) { + return new SliceConfig(properties); + }; + + /** + * Encodes the specified SliceConfig message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.ISliceConfig} message SliceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SliceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Value.encode(message.value, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.range != null && Object.hasOwnProperty.call(message, "range")) + $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range.encode(message.range, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.allValues != null && Object.hasOwnProperty.call(message, "allValues")) + $root.google.protobuf.BoolValue.encode(message.allValues, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SliceConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.ISliceConfig} message SliceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SliceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SliceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig} SliceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SliceConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Value.decode(reader, reader.uint32()); + break; + } + case 2: { + message.range = $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range.decode(reader, reader.uint32()); + break; + } + case 3: { + message.allValues = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SliceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig} SliceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SliceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SliceConfig message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SliceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.value != null && message.hasOwnProperty("value")) { + properties.kind = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Value.verify(message.value); + if (error) + return "value." + error; + } + } + if (message.range != null && message.hasOwnProperty("range")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range.verify(message.range); + if (error) + return "range." + error; + } + } + if (message.allValues != null && message.hasOwnProperty("allValues")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.BoolValue.verify(message.allValues); + if (error) + return "allValues." + error; + } + } + return null; + }; + + /** + * Creates a SliceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig} SliceConfig + */ + SliceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig(); + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.value: object expected"); + message.value = $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Value.fromObject(object.value); + } + if (object.range != null) { + if (typeof object.range !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.range: object expected"); + message.range = $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range.fromObject(object.range); + } + if (object.allValues != null) { + if (typeof object.allValues !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig.allValues: object expected"); + message.allValues = $root.google.protobuf.BoolValue.fromObject(object.allValues); + } + return message; + }; + + /** + * Creates a plain object from a SliceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig} message SliceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SliceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.value != null && message.hasOwnProperty("value")) { + object.value = $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Value.toObject(message.value, options); + if (options.oneofs) + object.kind = "value"; + } + if (message.range != null && message.hasOwnProperty("range")) { + object.range = $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range.toObject(message.range, options); + if (options.oneofs) + object.kind = "range"; + } + if (message.allValues != null && message.hasOwnProperty("allValues")) { + object.allValues = $root.google.protobuf.BoolValue.toObject(message.allValues, options); + if (options.oneofs) + object.kind = "allValues"; + } + return object; + }; + + /** + * Converts this SliceConfig to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @instance + * @returns {Object.} JSON object + */ + SliceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SliceConfig + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SliceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig"; + }; + + return SliceConfig; + })(); + + SliceSpec.Range = (function() { + + /** + * Properties of a Range. + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec + * @interface IRange + * @property {number|null} [low] Range low + * @property {number|null} [high] Range high + */ + + /** + * Constructs a new Range. + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec + * @classdesc Represents a Range. + * @implements IRange + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.IRange=} [properties] Properties to set + */ + function Range(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Range low. + * @member {number} low + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @instance + */ + Range.prototype.low = 0; + + /** + * Range high. + * @member {number} high + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @instance + */ + Range.prototype.high = 0; + + /** + * Creates a new Range instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @static + * @param {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.IRange=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range} Range instance + */ + Range.create = function create(properties) { + return new Range(properties); + }; + + /** + * Encodes the specified Range message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @static + * @param {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.IRange} message Range message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Range.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.low != null && Object.hasOwnProperty.call(message, "low")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.low); + if (message.high != null && Object.hasOwnProperty.call(message, "high")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.high); + return writer; + }; + + /** + * Encodes the specified Range message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @static + * @param {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.IRange} message Range message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Range.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Range message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range} Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Range.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.low = reader.float(); + break; + } + case 2: { + message.high = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Range message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range} Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Range.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Range message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Range.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.low != null && message.hasOwnProperty("low")) + if (typeof message.low !== "number") + return "low: number expected"; + if (message.high != null && message.hasOwnProperty("high")) + if (typeof message.high !== "number") + return "high: number expected"; + return null; + }; + + /** + * Creates a Range message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range} Range + */ + Range.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range(); + if (object.low != null) + message.low = Number(object.low); + if (object.high != null) + message.high = Number(object.high); + return message; + }; + + /** + * Creates a plain object from a Range message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @static + * @param {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range} message Range + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Range.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.low = 0; + object.high = 0; + } + if (message.low != null && message.hasOwnProperty("low")) + object.low = options.json && !isFinite(message.low) ? String(message.low) : message.low; + if (message.high != null && message.hasOwnProperty("high")) + object.high = options.json && !isFinite(message.high) ? String(message.high) : message.high; + return object; + }; + + /** + * Converts this Range to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @instance + * @returns {Object.} JSON object + */ + Range.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Range + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Range.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Range"; + }; + + return Range; + })(); + + SliceSpec.Value = (function() { + + /** + * Properties of a Value. + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec + * @interface IValue + * @property {string|null} [stringValue] Value stringValue + * @property {number|null} [floatValue] Value floatValue + */ + + /** + * Constructs a new Value. + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec + * @classdesc Represents a Value. + * @implements IValue + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.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 stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @instance + */ + Value.prototype.stringValue = null; + + /** + * Value floatValue. + * @member {number|null|undefined} floatValue + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @instance + */ + Value.prototype.floatValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Value kind. + * @member {"stringValue"|"floatValue"|undefined} kind + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @instance + */ + Object.defineProperty(Value.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["stringValue", "floatValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Value instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @static + * @param {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.IValue=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Value} Value instance + */ + Value.create = function create(properties) { + return new Value(properties); + }; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Value.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @static + * @param {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.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.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.stringValue); + if (message.floatValue != null && Object.hasOwnProperty.call(message, "floatValue")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.floatValue); + return writer; + }; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @static + * @param {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.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.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.stringValue = reader.string(); + break; + } + case 2: { + message.floatValue = reader.float(); + 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.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.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.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.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.stringValue != null && message.hasOwnProperty("stringValue")) { + properties.kind = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.floatValue != null && message.hasOwnProperty("floatValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.floatValue !== "number") + return "floatValue: number expected"; + } + return null; + }; + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Value} Value + */ + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Value) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Value(); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.floatValue != null) + message.floatValue = Number(object.floatValue); + return message; + }; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Value + * @static + * @param {google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.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.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; + } + if (message.floatValue != null && message.hasOwnProperty("floatValue")) { + object.floatValue = options.json && !isFinite(message.floatValue) ? String(message.floatValue) : message.floatValue; + if (options.oneofs) + object.kind = "floatValue"; + } + return object; + }; + + /** + * Converts this Value to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.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.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.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.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.SliceSpec.Value"; + }; + + return Value; + })(); + + return SliceSpec; + })(); + return Slice; })(); @@ -302052,6 +310862,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.ModelService|batchImportEvaluatedAnnotations}. + * @memberof google.cloud.aiplatform.v1beta1.ModelService + * @typedef BatchImportEvaluatedAnnotationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse} [response] BatchImportEvaluatedAnnotationsResponse + */ + + /** + * Calls BatchImportEvaluatedAnnotations. + * @function batchImportEvaluatedAnnotations + * @memberof google.cloud.aiplatform.v1beta1.ModelService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsRequest} request BatchImportEvaluatedAnnotationsRequest message or plain object + * @param {google.cloud.aiplatform.v1beta1.ModelService.BatchImportEvaluatedAnnotationsCallback} callback Node-style callback called with the error, if any, and BatchImportEvaluatedAnnotationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ModelService.prototype.batchImportEvaluatedAnnotations = function batchImportEvaluatedAnnotations(request, callback) { + return this.rpcCall(batchImportEvaluatedAnnotations, $root.google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest, $root.google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse, request, callback); + }, "name", { value: "BatchImportEvaluatedAnnotations" }); + + /** + * Calls BatchImportEvaluatedAnnotations. + * @function batchImportEvaluatedAnnotations + * @memberof google.cloud.aiplatform.v1beta1.ModelService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsRequest} request BatchImportEvaluatedAnnotationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.cloud.aiplatform.v1beta1.ModelService|getModelEvaluation}. * @memberof google.cloud.aiplatform.v1beta1.ModelService @@ -308339,6 +317182,457 @@ return BatchImportModelEvaluationSlicesResponse; })(); + v1beta1.BatchImportEvaluatedAnnotationsRequest = (function() { + + /** + * Properties of a BatchImportEvaluatedAnnotationsRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IBatchImportEvaluatedAnnotationsRequest + * @property {string|null} [parent] BatchImportEvaluatedAnnotationsRequest parent + * @property {Array.|null} [evaluatedAnnotations] BatchImportEvaluatedAnnotationsRequest evaluatedAnnotations + */ + + /** + * Constructs a new BatchImportEvaluatedAnnotationsRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a BatchImportEvaluatedAnnotationsRequest. + * @implements IBatchImportEvaluatedAnnotationsRequest + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsRequest=} [properties] Properties to set + */ + function BatchImportEvaluatedAnnotationsRequest(properties) { + this.evaluatedAnnotations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BatchImportEvaluatedAnnotationsRequest parent. + * @member {string} parent + * @memberof google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest + * @instance + */ + BatchImportEvaluatedAnnotationsRequest.prototype.parent = ""; + + /** + * BatchImportEvaluatedAnnotationsRequest evaluatedAnnotations. + * @member {Array.} evaluatedAnnotations + * @memberof google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest + * @instance + */ + BatchImportEvaluatedAnnotationsRequest.prototype.evaluatedAnnotations = $util.emptyArray; + + /** + * Creates a new BatchImportEvaluatedAnnotationsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest} BatchImportEvaluatedAnnotationsRequest instance + */ + BatchImportEvaluatedAnnotationsRequest.create = function create(properties) { + return new BatchImportEvaluatedAnnotationsRequest(properties); + }; + + /** + * Encodes the specified BatchImportEvaluatedAnnotationsRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsRequest} message BatchImportEvaluatedAnnotationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchImportEvaluatedAnnotationsRequest.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.evaluatedAnnotations != null && message.evaluatedAnnotations.length) + for (var i = 0; i < message.evaluatedAnnotations.length; ++i) + $root.google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.encode(message.evaluatedAnnotations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BatchImportEvaluatedAnnotationsRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsRequest} message BatchImportEvaluatedAnnotationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchImportEvaluatedAnnotationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchImportEvaluatedAnnotationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest} BatchImportEvaluatedAnnotationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchImportEvaluatedAnnotationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + if (!(message.evaluatedAnnotations && message.evaluatedAnnotations.length)) + message.evaluatedAnnotations = []; + message.evaluatedAnnotations.push($root.google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchImportEvaluatedAnnotationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest} BatchImportEvaluatedAnnotationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchImportEvaluatedAnnotationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchImportEvaluatedAnnotationsRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchImportEvaluatedAnnotationsRequest.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.evaluatedAnnotations != null && message.hasOwnProperty("evaluatedAnnotations")) { + if (!Array.isArray(message.evaluatedAnnotations)) + return "evaluatedAnnotations: array expected"; + for (var i = 0; i < message.evaluatedAnnotations.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.verify(message.evaluatedAnnotations[i]); + if (error) + return "evaluatedAnnotations." + error; + } + } + return null; + }; + + /** + * Creates a BatchImportEvaluatedAnnotationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest} BatchImportEvaluatedAnnotationsRequest + */ + BatchImportEvaluatedAnnotationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.evaluatedAnnotations) { + if (!Array.isArray(object.evaluatedAnnotations)) + throw TypeError(".google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest.evaluatedAnnotations: array expected"); + message.evaluatedAnnotations = []; + for (var i = 0; i < object.evaluatedAnnotations.length; ++i) { + if (typeof object.evaluatedAnnotations[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest.evaluatedAnnotations: object expected"); + message.evaluatedAnnotations[i] = $root.google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.fromObject(object.evaluatedAnnotations[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BatchImportEvaluatedAnnotationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest} message BatchImportEvaluatedAnnotationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchImportEvaluatedAnnotationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.evaluatedAnnotations = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.evaluatedAnnotations && message.evaluatedAnnotations.length) { + object.evaluatedAnnotations = []; + for (var j = 0; j < message.evaluatedAnnotations.length; ++j) + object.evaluatedAnnotations[j] = $root.google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.toObject(message.evaluatedAnnotations[j], options); + } + return object; + }; + + /** + * Converts this BatchImportEvaluatedAnnotationsRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest + * @instance + * @returns {Object.} JSON object + */ + BatchImportEvaluatedAnnotationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchImportEvaluatedAnnotationsRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchImportEvaluatedAnnotationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest"; + }; + + return BatchImportEvaluatedAnnotationsRequest; + })(); + + v1beta1.BatchImportEvaluatedAnnotationsResponse = (function() { + + /** + * Properties of a BatchImportEvaluatedAnnotationsResponse. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IBatchImportEvaluatedAnnotationsResponse + * @property {number|null} [importedEvaluatedAnnotationsCount] BatchImportEvaluatedAnnotationsResponse importedEvaluatedAnnotationsCount + */ + + /** + * Constructs a new BatchImportEvaluatedAnnotationsResponse. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a BatchImportEvaluatedAnnotationsResponse. + * @implements IBatchImportEvaluatedAnnotationsResponse + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsResponse=} [properties] Properties to set + */ + function BatchImportEvaluatedAnnotationsResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BatchImportEvaluatedAnnotationsResponse importedEvaluatedAnnotationsCount. + * @member {number} importedEvaluatedAnnotationsCount + * @memberof google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse + * @instance + */ + BatchImportEvaluatedAnnotationsResponse.prototype.importedEvaluatedAnnotationsCount = 0; + + /** + * Creates a new BatchImportEvaluatedAnnotationsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsResponse=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse} BatchImportEvaluatedAnnotationsResponse instance + */ + BatchImportEvaluatedAnnotationsResponse.create = function create(properties) { + return new BatchImportEvaluatedAnnotationsResponse(properties); + }; + + /** + * Encodes the specified BatchImportEvaluatedAnnotationsResponse message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsResponse} message BatchImportEvaluatedAnnotationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchImportEvaluatedAnnotationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.importedEvaluatedAnnotationsCount != null && Object.hasOwnProperty.call(message, "importedEvaluatedAnnotationsCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.importedEvaluatedAnnotationsCount); + return writer; + }; + + /** + * Encodes the specified BatchImportEvaluatedAnnotationsResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsResponse} message BatchImportEvaluatedAnnotationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchImportEvaluatedAnnotationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchImportEvaluatedAnnotationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse} BatchImportEvaluatedAnnotationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchImportEvaluatedAnnotationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.importedEvaluatedAnnotationsCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchImportEvaluatedAnnotationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse} BatchImportEvaluatedAnnotationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchImportEvaluatedAnnotationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchImportEvaluatedAnnotationsResponse message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchImportEvaluatedAnnotationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.importedEvaluatedAnnotationsCount != null && message.hasOwnProperty("importedEvaluatedAnnotationsCount")) + if (!$util.isInteger(message.importedEvaluatedAnnotationsCount)) + return "importedEvaluatedAnnotationsCount: integer expected"; + return null; + }; + + /** + * Creates a BatchImportEvaluatedAnnotationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse} BatchImportEvaluatedAnnotationsResponse + */ + BatchImportEvaluatedAnnotationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse(); + if (object.importedEvaluatedAnnotationsCount != null) + message.importedEvaluatedAnnotationsCount = object.importedEvaluatedAnnotationsCount | 0; + return message; + }; + + /** + * Creates a plain object from a BatchImportEvaluatedAnnotationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse} message BatchImportEvaluatedAnnotationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchImportEvaluatedAnnotationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.importedEvaluatedAnnotationsCount = 0; + if (message.importedEvaluatedAnnotationsCount != null && message.hasOwnProperty("importedEvaluatedAnnotationsCount")) + object.importedEvaluatedAnnotationsCount = message.importedEvaluatedAnnotationsCount; + return object; + }; + + /** + * Converts this BatchImportEvaluatedAnnotationsResponse to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse + * @instance + * @returns {Object.} JSON object + */ + BatchImportEvaluatedAnnotationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchImportEvaluatedAnnotationsResponse + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchImportEvaluatedAnnotationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse"; + }; + + return BatchImportEvaluatedAnnotationsResponse; + })(); + v1beta1.GetModelEvaluationRequest = (function() { /** diff --git a/packages/google-cloud-aiplatform/protos/protos.json b/packages/google-cloud-aiplatform/protos/protos.json index f7fd1296325..f919469a165 100644 --- a/packages/google-cloud-aiplatform/protos/protos.json +++ b/packages/google-cloud-aiplatform/protos/protos.json @@ -29,7 +29,8 @@ "NVIDIA_TESLA_T4": 5, "NVIDIA_TESLA_A100": 8, "TPU_V2": 6, - "TPU_V3": 7 + "TPU_V3": 7, + "TPU_V4_POD": 10 } }, "Annotation": { @@ -401,6 +402,10 @@ "encryptionSpec": { "type": "EncryptionSpec", "id": 24 + }, + "disableContainerLogging": { + "type": "bool", + "id": 34 } }, "nested": { @@ -2502,6 +2507,11 @@ "oneof": [ "gcsDestination" ] + }, + "split": { + "oneof": [ + "fractionSplit" + ] } }, "fields": { @@ -2509,12 +2519,32 @@ "type": "GcsDestination", "id": 1 }, + "fractionSplit": { + "type": "ExportFractionSplit", + "id": 5 + }, "annotationsFilter": { "type": "string", "id": 2 } } }, + "ExportFractionSplit": { + "fields": { + "trainingFraction": { + "type": "double", + "id": 1 + }, + "validationFraction": { + "type": "double", + "id": 2 + }, + "testFraction": { + "type": "double", + "id": 3 + } + } + }, "SavedQuery": { "options": { "(google.api.resource).type": "aiplatform.googleapis.com/SavedQuery", @@ -4109,6 +4139,122 @@ } } }, + "EvaluatedAnnotation": { + "fields": { + "type": { + "type": "EvaluatedAnnotationType", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "predictions": { + "rule": "repeated", + "type": "google.protobuf.Value", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "groundTruths": { + "rule": "repeated", + "type": "google.protobuf.Value", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataItemPayload": { + "type": "google.protobuf.Value", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "evaluatedDataItemViewId": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "explanations": { + "rule": "repeated", + "type": "EvaluatedAnnotationExplanation", + "id": 8 + }, + "errorAnalysisAnnotations": { + "rule": "repeated", + "type": "ErrorAnalysisAnnotation", + "id": 9 + } + }, + "nested": { + "EvaluatedAnnotationType": { + "values": { + "EVALUATED_ANNOTATION_TYPE_UNSPECIFIED": 0, + "TRUE_POSITIVE": 1, + "FALSE_POSITIVE": 2, + "FALSE_NEGATIVE": 3 + } + } + } + }, + "EvaluatedAnnotationExplanation": { + "fields": { + "explanationType": { + "type": "string", + "id": 1 + }, + "explanation": { + "type": "Explanation", + "id": 2 + } + } + }, + "ErrorAnalysisAnnotation": { + "fields": { + "attributedItems": { + "rule": "repeated", + "type": "AttributedItem", + "id": 1 + }, + "queryType": { + "type": "QueryType", + "id": 2 + }, + "outlierScore": { + "type": "double", + "id": 3 + }, + "outlierThreshold": { + "type": "double", + "id": 4 + } + }, + "nested": { + "AttributedItem": { + "fields": { + "annotationResourceName": { + "type": "string", + "id": 1 + }, + "distance": { + "type": "double", + "id": 2 + } + } + }, + "QueryType": { + "values": { + "QUERY_TYPE_UNSPECIFIED": 0, + "ALL_SIMILAR": 1, + "SAME_CLASS_SIMILAR": 2, + "SAME_CLASS_DISSIMILAR": 3 + } + } + } + }, "Event": { "fields": { "artifact": { @@ -4486,6 +4632,13 @@ "maxNodeCount": { "type": "int32", "id": 2 + }, + "cpuUtilizationTarget": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } } @@ -5322,6 +5475,34 @@ } ] }, + "DeleteFeatureValues": { + "requestType": "DeleteFeatureValuesRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{entity_type=projects/*/locations/*/featurestores/*/entityTypes/*}:deleteFeatureValues", + "(google.api.http).body": "*", + "(google.api.method_signature)": "entity_type", + "(google.longrunning.operation_info).response_type": "DeleteFeatureValuesResponse", + "(google.longrunning.operation_info).metadata_type": "DeleteFeatureValuesOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{entity_type=projects/*/locations/*/featurestores/*/entityTypes/*}:deleteFeatureValues", + "body": "*" + } + }, + { + "(google.api.method_signature)": "entity_type" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "DeleteFeatureValuesResponse", + "metadata_type": "DeleteFeatureValuesOperationMetadata" + } + } + ] + }, "SearchFeatures": { "requestType": "SearchFeaturesRequest", "responseType": "SearchFeaturesResponse", @@ -6129,6 +6310,14 @@ } } }, + "DeleteFeatureValuesOperationMetadata": { + "fields": { + "genericMetadata": { + "type": "GenericOperationMetadata", + "id": 1 + } + } + }, "CreateEntityTypeOperationMetadata": { "fields": { "genericMetadata": { @@ -6153,6 +6342,138 @@ } } }, + "DeleteFeatureValuesRequest": { + "oneofs": { + "DeleteOption": { + "oneof": [ + "selectEntity", + "selectTimeRangeAndFeature" + ] + } + }, + "fields": { + "selectEntity": { + "type": "SelectEntity", + "id": 2 + }, + "selectTimeRangeAndFeature": { + "type": "SelectTimeRangeAndFeature", + "id": 3 + }, + "entityType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/EntityType" + } + } + }, + "nested": { + "SelectEntity": { + "fields": { + "entityIdSelector": { + "type": "EntityIdSelector", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "SelectTimeRangeAndFeature": { + "fields": { + "timeRange": { + "type": "google.type.Interval", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "featureSelector": { + "type": "FeatureSelector", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "skipOnlineStorageDelete": { + "type": "bool", + "id": 3 + } + } + } + } + }, + "DeleteFeatureValuesResponse": { + "oneofs": { + "response": { + "oneof": [ + "selectEntity", + "selectTimeRangeAndFeature" + ] + } + }, + "fields": { + "selectEntity": { + "type": "SelectEntity", + "id": 1 + }, + "selectTimeRangeAndFeature": { + "type": "SelectTimeRangeAndFeature", + "id": 2 + } + }, + "nested": { + "SelectEntity": { + "fields": { + "offlineStorageDeletedEntityRowCount": { + "type": "int64", + "id": 1 + }, + "onlineStorageDeletedEntityCount": { + "type": "int64", + "id": 2 + } + } + }, + "SelectTimeRangeAndFeature": { + "fields": { + "impactedFeatureCount": { + "type": "int64", + "id": 1 + }, + "offlineStorageModifiedEntityRowCount": { + "type": "int64", + "id": 2 + }, + "onlineStorageModifiedEntityCount": { + "type": "int64", + "id": 3 + } + } + } + } + }, + "EntityIdSelector": { + "oneofs": { + "EntityIdsSource": { + "oneof": [ + "csvSource" + ] + } + }, + "fields": { + "csvSource": { + "type": "CsvSource", + "id": 3 + }, + "entityIdField": { + "type": "string", + "id": 5 + } + } + }, "HyperparameterTuningJob": { "options": { "(google.api.resource).type": "aiplatform.googleapis.com/HyperparameterTuningJob", @@ -10193,6 +10514,7 @@ "type": "bool", "id": 14, "options": { + "deprecated": true, "(google.api.field_behavior)": "OPTIONAL" } } @@ -12670,6 +12992,13 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "modelExplanation": { + "type": "ModelExplanation", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -12688,6 +13017,83 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "sliceSpec": { + "type": "SliceSpec", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "SliceSpec": { + "fields": { + "configs": { + "keyType": "string", + "type": "SliceConfig", + "id": 1 + } + }, + "nested": { + "SliceConfig": { + "oneofs": { + "kind": { + "oneof": [ + "value", + "range", + "allValues" + ] + } + }, + "fields": { + "value": { + "type": "Value", + "id": 1 + }, + "range": { + "type": "Range", + "id": 2 + }, + "allValues": { + "type": "google.protobuf.BoolValue", + "id": 3 + } + } + }, + "Range": { + "fields": { + "low": { + "type": "float", + "id": 1 + }, + "high": { + "type": "float", + "id": 2 + } + } + }, + "Value": { + "oneofs": { + "kind": { + "oneof": [ + "stringValue", + "floatValue" + ] + } + }, + "fields": { + "stringValue": { + "type": "string", + "id": 1 + }, + "floatValue": { + "type": "float", + "id": 2 + } + } + } + } } } } @@ -12969,6 +13375,26 @@ } ] }, + "BatchImportEvaluatedAnnotations": { + "requestType": "BatchImportEvaluatedAnnotationsRequest", + "responseType": "BatchImportEvaluatedAnnotationsResponse", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/models/*/evaluations/*/slices/*}:batchImport", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,evaluated_annotations" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/models/*/evaluations/*/slices/*}:batchImport", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,evaluated_annotations" + } + ] + }, "GetModelEvaluation": { "requestType": "GetModelEvaluationRequest", "responseType": "ModelEvaluation", @@ -13472,6 +13898,37 @@ } } }, + "BatchImportEvaluatedAnnotationsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/ModelEvaluationSlice" + } + }, + "evaluatedAnnotations": { + "rule": "repeated", + "type": "EvaluatedAnnotation", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BatchImportEvaluatedAnnotationsResponse": { + "fields": { + "importedEvaluatedAnnotationsCount": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, "GetModelEvaluationRequest": { "fields": { "name": { @@ -18693,7 +19150,8 @@ "NVIDIA_TESLA_A100": 8, "NVIDIA_A100_80GB": 9, "TPU_V2": 6, - "TPU_V3": 7 + "TPU_V3": 7, + "TPU_V4_POD": 10 } }, "Annotation": { @@ -19081,6 +19539,10 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "disableContainerLogging": { + "type": "bool", + "id": 34 } }, "nested": { @@ -20895,6 +21357,13 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "largeModelReference": { + "type": "LargeModelReference", + "id": 45, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -20938,6 +21407,17 @@ } } }, + "LargeModelReference": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, "DeploymentResourcesType": { "values": { "DEPLOYMENT_RESOURCES_TYPE_UNSPECIFIED": 0, @@ -21794,6 +22274,11 @@ "oneof": [ "gcsDestination" ] + }, + "split": { + "oneof": [ + "fractionSplit" + ] } }, "fields": { @@ -21801,12 +22286,32 @@ "type": "GcsDestination", "id": 1 }, + "fractionSplit": { + "type": "ExportFractionSplit", + "id": 5 + }, "annotationsFilter": { "type": "string", "id": 2 } } }, + "ExportFractionSplit": { + "fields": { + "trainingFraction": { + "type": "double", + "id": 1 + }, + "validationFraction": { + "type": "double", + "id": 2 + }, + "testFraction": { + "type": "double", + "id": 3 + } + } + }, "SavedQuery": { "options": { "(google.api.resource).type": "aiplatform.googleapis.com/SavedQuery", @@ -23715,6 +24220,122 @@ } } }, + "EvaluatedAnnotation": { + "fields": { + "type": { + "type": "EvaluatedAnnotationType", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "predictions": { + "rule": "repeated", + "type": "google.protobuf.Value", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "groundTruths": { + "rule": "repeated", + "type": "google.protobuf.Value", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataItemPayload": { + "type": "google.protobuf.Value", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "evaluatedDataItemViewId": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "explanations": { + "rule": "repeated", + "type": "EvaluatedAnnotationExplanation", + "id": 8 + }, + "errorAnalysisAnnotations": { + "rule": "repeated", + "type": "ErrorAnalysisAnnotation", + "id": 9 + } + }, + "nested": { + "EvaluatedAnnotationType": { + "values": { + "EVALUATED_ANNOTATION_TYPE_UNSPECIFIED": 0, + "TRUE_POSITIVE": 1, + "FALSE_POSITIVE": 2, + "FALSE_NEGATIVE": 3 + } + } + } + }, + "EvaluatedAnnotationExplanation": { + "fields": { + "explanationType": { + "type": "string", + "id": 1 + }, + "explanation": { + "type": "Explanation", + "id": 2 + } + } + }, + "ErrorAnalysisAnnotation": { + "fields": { + "attributedItems": { + "rule": "repeated", + "type": "AttributedItem", + "id": 1 + }, + "queryType": { + "type": "QueryType", + "id": 2 + }, + "outlierScore": { + "type": "double", + "id": 3 + }, + "outlierThreshold": { + "type": "double", + "id": 4 + } + }, + "nested": { + "AttributedItem": { + "fields": { + "annotationResourceName": { + "type": "string", + "id": 1 + }, + "distance": { + "type": "double", + "id": 2 + } + } + }, + "QueryType": { + "values": { + "QUERY_TYPE_UNSPECIFIED": 0, + "ALL_SIMILAR": 1, + "SAME_CLASS_SIMILAR": 2, + "SAME_CLASS_DISSIMILAR": 3 + } + } + } + }, "Event": { "fields": { "artifact": { @@ -24083,6 +24704,13 @@ "maxNodeCount": { "type": "int32", "id": 2 + }, + "cpuUtilizationTarget": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } } @@ -25850,7 +26478,54 @@ } }, "DeleteFeatureValuesResponse": { - "fields": {} + "oneofs": { + "response": { + "oneof": [ + "selectEntity", + "selectTimeRangeAndFeature" + ] + } + }, + "fields": { + "selectEntity": { + "type": "SelectEntity", + "id": 1 + }, + "selectTimeRangeAndFeature": { + "type": "SelectTimeRangeAndFeature", + "id": 2 + } + }, + "nested": { + "SelectEntity": { + "fields": { + "offlineStorageDeletedEntityRowCount": { + "type": "int64", + "id": 1 + }, + "onlineStorageDeletedEntityCount": { + "type": "int64", + "id": 2 + } + } + }, + "SelectTimeRangeAndFeature": { + "fields": { + "impactedFeatureCount": { + "type": "int64", + "id": 1 + }, + "offlineStorageModifiedEntityRowCount": { + "type": "int64", + "id": 2 + }, + "onlineStorageModifiedEntityCount": { + "type": "int64", + "id": 3 + } + } + } + } }, "EntityIdSelector": { "oneofs": { @@ -29478,6 +30153,7 @@ "type": "bool", "id": 14, "options": { + "deprecated": true, "(google.api.field_behavior)": "OPTIONAL" } } @@ -32107,6 +32783,13 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "modelExplanation": { + "type": "ModelExplanation", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -32125,6 +32808,83 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "sliceSpec": { + "type": "SliceSpec", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "SliceSpec": { + "fields": { + "configs": { + "keyType": "string", + "type": "SliceConfig", + "id": 1 + } + }, + "nested": { + "SliceConfig": { + "oneofs": { + "kind": { + "oneof": [ + "value", + "range", + "allValues" + ] + } + }, + "fields": { + "value": { + "type": "Value", + "id": 1 + }, + "range": { + "type": "Range", + "id": 2 + }, + "allValues": { + "type": "google.protobuf.BoolValue", + "id": 3 + } + } + }, + "Range": { + "fields": { + "low": { + "type": "float", + "id": 1 + }, + "high": { + "type": "float", + "id": 2 + } + } + }, + "Value": { + "oneofs": { + "kind": { + "oneof": [ + "stringValue", + "floatValue" + ] + } + }, + "fields": { + "stringValue": { + "type": "string", + "id": 1 + }, + "floatValue": { + "type": "float", + "id": 2 + } + } + } + } } } } @@ -32434,6 +33194,26 @@ } ] }, + "BatchImportEvaluatedAnnotations": { + "requestType": "BatchImportEvaluatedAnnotationsRequest", + "responseType": "BatchImportEvaluatedAnnotationsResponse", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*/models/*/evaluations/*/slices/*}:batchImport", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,evaluated_annotations" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/*/models/*/evaluations/*/slices/*}:batchImport", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,evaluated_annotations" + } + ] + }, "GetModelEvaluation": { "requestType": "GetModelEvaluationRequest", "responseType": "ModelEvaluation", @@ -32960,6 +33740,37 @@ } } }, + "BatchImportEvaluatedAnnotationsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/ModelEvaluationSlice" + } + }, + "evaluatedAnnotations": { + "rule": "repeated", + "type": "EvaluatedAnnotation", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BatchImportEvaluatedAnnotationsResponse": { + "fields": { + "importedEvaluatedAnnotationsCount": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, "GetModelEvaluationRequest": { "fields": { "name": { diff --git a/packages/google-cloud-aiplatform/samples/README.md b/packages/google-cloud-aiplatform/samples/README.md index 30efdb06f5d..125ea3a8b5f 100644 --- a/packages/google-cloud-aiplatform/samples/README.md +++ b/packages/google-cloud-aiplatform/samples/README.md @@ -41,6 +41,7 @@ * [Featurestore_service.create_featurestore](#featurestore_service.create_featurestore) * [Featurestore_service.delete_entity_type](#featurestore_service.delete_entity_type) * [Featurestore_service.delete_feature](#featurestore_service.delete_feature) + * [Featurestore_service.delete_feature_values](#featurestore_service.delete_feature_values) * [Featurestore_service.delete_featurestore](#featurestore_service.delete_featurestore) * [Featurestore_service.export_feature_values](#featurestore_service.export_feature_values) * [Featurestore_service.get_entity_type](#featurestore_service.get_entity_type) @@ -138,6 +139,7 @@ * [Metadata_service.update_execution](#metadata_service.update_execution) * [Migration_service.batch_migrate_resources](#migration_service.batch_migrate_resources) * [Migration_service.search_migratable_resources](#migration_service.search_migratable_resources) + * [Model_service.batch_import_evaluated_annotations](#model_service.batch_import_evaluated_annotations) * [Model_service.batch_import_model_evaluation_slices](#model_service.batch_import_model_evaluation_slices) * [Model_service.copy_model](#model_service.copy_model) * [Model_service.delete_model](#model_service.delete_model) @@ -350,6 +352,7 @@ * [Metadata_service.update_execution](#metadata_service.update_execution) * [Migration_service.batch_migrate_resources](#migration_service.batch_migrate_resources) * [Migration_service.search_migratable_resources](#migration_service.search_migratable_resources) + * [Model_service.batch_import_evaluated_annotations](#model_service.batch_import_evaluated_annotations) * [Model_service.batch_import_model_evaluation_slices](#model_service.batch_import_model_evaluation_slices) * [Model_service.copy_model](#model_service.copy_model) * [Model_service.delete_model](#model_service.delete_model) @@ -940,6 +943,23 @@ __Usage:__ +### Featurestore_service.delete_feature_values + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_feature_values.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_feature_values.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_feature_values.js` + + +----- + + + + ### Featurestore_service.delete_featurestore View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_featurestore.js). @@ -2589,6 +2609,23 @@ __Usage:__ +### Model_service.batch_import_evaluated_annotations + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.batch_import_evaluated_annotations.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.batch_import_evaluated_annotations.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-aiplatform/samples/generated/v1/model_service.batch_import_evaluated_annotations.js` + + +----- + + + + ### Model_service.batch_import_model_evaluation_slices View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.batch_import_model_evaluation_slices.js). @@ -6193,6 +6230,23 @@ __Usage:__ +### Model_service.batch_import_evaluated_annotations + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.batch_import_evaluated_annotations.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.batch_import_evaluated_annotations.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.batch_import_evaluated_annotations.js` + + +----- + + + + ### Model_service.batch_import_model_evaluation_slices View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.batch_import_model_evaluation_slices.js). diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_feature_values.js b/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_feature_values.js new file mode 100644 index 00000000000..f30cec0a845 --- /dev/null +++ b/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_feature_values.js @@ -0,0 +1,73 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(entityType) { + // [START aiplatform_v1_generated_FeaturestoreService_DeleteFeatureValues_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. + */ + /** + * Select feature values to be deleted by specifying entities. + */ + // const selectEntity = {} + /** + * Select feature values to be deleted by specifying time range and + * features. + */ + // const selectTimeRangeAndFeature = {} + /** + * Required. The resource name of the EntityType grouping the Features for + * which values are being deleted from. Format: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}` + */ + // const entityType = 'abc123' + + // Imports the Aiplatform library + const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1; + + // Instantiates a client + const aiplatformClient = new FeaturestoreServiceClient(); + + async function callDeleteFeatureValues() { + // Construct request + const request = { + entityType, + }; + + // Run request + const [operation] = await aiplatformClient.deleteFeatureValues(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteFeatureValues(); + // [END aiplatform_v1_generated_FeaturestoreService_DeleteFeatureValues_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/model_service.batch_import_evaluated_annotations.js b/packages/google-cloud-aiplatform/samples/generated/v1/model_service.batch_import_evaluated_annotations.js new file mode 100644 index 00000000000..f173b6c2489 --- /dev/null +++ b/packages/google-cloud-aiplatform/samples/generated/v1/model_service.batch_import_evaluated_annotations.js @@ -0,0 +1,68 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, evaluatedAnnotations) { + // [START aiplatform_v1_generated_ModelService_BatchImportEvaluatedAnnotations_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the parent ModelEvaluationSlice resource. + * Format: + * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}` + */ + // const parent = 'abc123' + /** + * Required. Evaluated annotations resource to be imported. + */ + // const evaluatedAnnotations = 1234 + + // Imports the Aiplatform library + const {ModelServiceClient} = require('@google-cloud/aiplatform').v1; + + // Instantiates a client + const aiplatformClient = new ModelServiceClient(); + + async function callBatchImportEvaluatedAnnotations() { + // Construct request + const request = { + parent, + evaluatedAnnotations, + }; + + // Run request + const response = await aiplatformClient.batchImportEvaluatedAnnotations(request); + console.log(response); + } + + callBatchImportEvaluatedAnnotations(); + // [END aiplatform_v1_generated_ModelService_BatchImportEvaluatedAnnotations_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json index f94e6d9f906..aa0cd1581c2 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json @@ -2067,6 +2067,54 @@ } } }, + { + "regionTag": "aiplatform_v1_generated_FeaturestoreService_DeleteFeatureValues_async", + "title": "DatasetService deleteFeatureValues Sample", + "origin": "API_DEFINITION", + "description": " Delete Feature values from Featurestore. The progress of the deletion is tracked by the returned operation. The deleted feature values are guaranteed to be invisible to subsequent read operations after the operation is marked as successfully done. If a delete feature values operation fails, the feature values returned from reads and exports may be inconsistent. If consistency is required, the caller must retry the same delete request again and wait till the new operation returned is marked as successfully done.", + "canonical": true, + "file": "featurestore_service.delete_feature_values.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteFeatureValues", + "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.DeleteFeatureValues", + "async": true, + "parameters": [ + { + "name": "select_entity", + "type": ".google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity" + }, + { + "name": "select_time_range_and_feature", + "type": ".google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature" + }, + { + "name": "entity_type", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "FeaturestoreServiceClient", + "fullName": "google.cloud.aiplatform.v1.FeaturestoreServiceClient" + }, + "method": { + "shortName": "DeleteFeatureValues", + "fullName": "google.cloud.aiplatform.v1.FeaturestoreService.DeleteFeatureValues", + "service": { + "shortName": "FeaturestoreService", + "fullName": "google.cloud.aiplatform.v1.FeaturestoreService" + } + } + } + }, { "regionTag": "aiplatform_v1_generated_FeaturestoreService_SearchFeatures_async", "title": "DatasetService searchFeatures Sample", @@ -6235,7 +6283,7 @@ "regionTag": "aiplatform_v1_generated_ModelService_DeleteModelVersion_async", "title": "DatasetService deleteModelVersion Sample", "origin": "API_DEFINITION", - "description": " Deletes a Model version. Model version can only be deleted if there are no [DeployedModels][] created from it. Deleting the only version in the Model is not allowed. Use [DeleteModel][google.cloud.aiplatform.v1.ModelService.DeleteModel] for deleting the Model instead.", + "description": " Deletes a Model version. Model version can only be deleted if there are no [DeployedModels][google.cloud.aiplatform.v1.DeployedModel] created from it. Deleting the only version in the Model is not allowed. Use [DeleteModel][google.cloud.aiplatform.v1.ModelService.DeleteModel] for deleting the Model instead.", "canonical": true, "file": "model_service.delete_model_version.js", "language": "JAVASCRIPT", @@ -6503,6 +6551,50 @@ } } }, + { + "regionTag": "aiplatform_v1_generated_ModelService_BatchImportEvaluatedAnnotations_async", + "title": "DatasetService batchImportEvaluatedAnnotations Sample", + "origin": "API_DEFINITION", + "description": " Imports a list of externally generated EvaluatedAnnotations.", + "canonical": true, + "file": "model_service.batch_import_evaluated_annotations.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchImportEvaluatedAnnotations", + "fullName": "google.cloud.aiplatform.v1.ModelService.BatchImportEvaluatedAnnotations", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "evaluated_annotations", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse", + "client": { + "shortName": "ModelServiceClient", + "fullName": "google.cloud.aiplatform.v1.ModelServiceClient" + }, + "method": { + "shortName": "BatchImportEvaluatedAnnotations", + "fullName": "google.cloud.aiplatform.v1.ModelService.BatchImportEvaluatedAnnotations", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.aiplatform.v1.ModelService" + } + } + } + }, { "regionTag": "aiplatform_v1_generated_ModelService_GetModelEvaluation_async", "title": "DatasetService getModelEvaluation Sample", @@ -9383,7 +9475,7 @@ "regionTag": "aiplatform_v1_generated_VizierService_CheckTrialEarlyStoppingState_async", "title": "DatasetService checkTrialEarlyStoppingState Sample", "origin": "API_DEFINITION", - "description": " Checks whether a Trial should stop or not. Returns a long-running operation. When the operation is successful, it will contain a [CheckTrialEarlyStoppingStateResponse][google.cloud.ml.v1.CheckTrialEarlyStoppingStateResponse].", + "description": " Checks whether a Trial should stop or not. Returns a long-running operation. When the operation is successful, it will contain a [CheckTrialEarlyStoppingStateResponse][google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse].", "canonical": true, "file": "vizier_service.check_trial_early_stopping_state.js", "language": "JAVASCRIPT", diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.batch_import_evaluated_annotations.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.batch_import_evaluated_annotations.js new file mode 100644 index 00000000000..8131cf24472 --- /dev/null +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.batch_import_evaluated_annotations.js @@ -0,0 +1,68 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, evaluatedAnnotations) { + // [START aiplatform_v1beta1_generated_ModelService_BatchImportEvaluatedAnnotations_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the parent ModelEvaluationSlice resource. + * Format: + * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}` + */ + // const parent = 'abc123' + /** + * Required. Evaluated annotations resource to be imported. + */ + // const evaluatedAnnotations = 1234 + + // Imports the Aiplatform library + const {ModelServiceClient} = require('@google-cloud/aiplatform').v1beta1; + + // Instantiates a client + const aiplatformClient = new ModelServiceClient(); + + async function callBatchImportEvaluatedAnnotations() { + // Construct request + const request = { + parent, + evaluatedAnnotations, + }; + + // Run request + const response = await aiplatformClient.batchImportEvaluatedAnnotations(request); + console.log(response); + } + + callBatchImportEvaluatedAnnotations(); + // [END aiplatform_v1beta1_generated_ModelService_BatchImportEvaluatedAnnotations_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json index d9d02e3a5be..182cbe855a3 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json @@ -6643,7 +6643,7 @@ "regionTag": "aiplatform_v1beta1_generated_ModelService_DeleteModelVersion_async", "title": "DatasetService deleteModelVersion Sample", "origin": "API_DEFINITION", - "description": " Deletes a Model version. Model version can only be deleted if there are no [DeployedModels][] created from it. Deleting the only version in the Model is not allowed. Use [DeleteModel][google.cloud.aiplatform.v1beta1.ModelService.DeleteModel] for deleting the Model instead.", + "description": " Deletes a Model version. Model version can only be deleted if there are no [DeployedModels][google.cloud.aiplatform.v1beta1.DeployedModel] created from it. Deleting the only version in the Model is not allowed. Use [DeleteModel][google.cloud.aiplatform.v1beta1.ModelService.DeleteModel] for deleting the Model instead.", "canonical": true, "file": "model_service.delete_model_version.js", "language": "JAVASCRIPT", @@ -6911,6 +6911,50 @@ } } }, + { + "regionTag": "aiplatform_v1beta1_generated_ModelService_BatchImportEvaluatedAnnotations_async", + "title": "DatasetService batchImportEvaluatedAnnotations Sample", + "origin": "API_DEFINITION", + "description": " Imports a list of externally generated EvaluatedAnnotations.", + "canonical": true, + "file": "model_service.batch_import_evaluated_annotations.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchImportEvaluatedAnnotations", + "fullName": "google.cloud.aiplatform.v1beta1.ModelService.BatchImportEvaluatedAnnotations", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "evaluated_annotations", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse", + "client": { + "shortName": "ModelServiceClient", + "fullName": "google.cloud.aiplatform.v1beta1.ModelServiceClient" + }, + "method": { + "shortName": "BatchImportEvaluatedAnnotations", + "fullName": "google.cloud.aiplatform.v1beta1.ModelService.BatchImportEvaluatedAnnotations", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.aiplatform.v1beta1.ModelService" + } + } + } + }, { "regionTag": "aiplatform_v1beta1_generated_ModelService_GetModelEvaluation_async", "title": "DatasetService getModelEvaluation Sample", @@ -9791,7 +9835,7 @@ "regionTag": "aiplatform_v1beta1_generated_VizierService_CheckTrialEarlyStoppingState_async", "title": "DatasetService checkTrialEarlyStoppingState Sample", "origin": "API_DEFINITION", - "description": " Checks whether a Trial should stop or not. Returns a long-running operation. When the operation is successful, it will contain a [CheckTrialEarlyStoppingStateResponse][google.cloud.ml.v1.CheckTrialEarlyStoppingStateResponse].", + "description": " Checks whether a Trial should stop or not. Returns a long-running operation. When the operation is successful, it will contain a [CheckTrialEarlyStoppingStateResponse][google.cloud.aiplatform.v1beta1.CheckTrialEarlyStoppingStateResponse].", "canonical": true, "file": "vizier_service.check_trial_early_stopping_state.js", "language": "JAVASCRIPT", diff --git a/packages/google-cloud-aiplatform/src/v1/dataset_service_client.ts b/packages/google-cloud-aiplatform/src/v1/dataset_service_client.ts index 4e47539614f..536cd16f083 100644 --- a/packages/google-cloud-aiplatform/src/v1/dataset_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/dataset_service_client.ts @@ -479,6 +479,9 @@ export class DatasetServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -678,6 +681,10 @@ export class DatasetServiceClient { delete: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -879,6 +886,7 @@ export class DatasetServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1033,6 +1041,7 @@ export class DatasetServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1199,6 +1208,9 @@ export class DatasetServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1/dataset_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/dataset_service_proto_list.json index 44918848766..b7295bb569f 100644 --- a/packages/google-cloud-aiplatform/src/v1/dataset_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/dataset_service_proto_list.json @@ -18,6 +18,7 @@ "../../protos/google/cloud/aiplatform/v1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1/event.proto", "../../protos/google/cloud/aiplatform/v1/execution.proto", "../../protos/google/cloud/aiplatform/v1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/endpoint_service_client.ts b/packages/google-cloud-aiplatform/src/v1/endpoint_service_client.ts index ba8d7ff8381..3ba7395b033 100644 --- a/packages/google-cloud-aiplatform/src/v1/endpoint_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/endpoint_service_client.ts @@ -458,6 +458,9 @@ export class EndpointServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -657,6 +660,10 @@ export class EndpointServiceClient { delete: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -858,6 +865,7 @@ export class EndpointServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1012,6 +1020,7 @@ export class EndpointServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1178,6 +1187,9 @@ export class EndpointServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1/endpoint_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/endpoint_service_proto_list.json index 44918848766..b7295bb569f 100644 --- a/packages/google-cloud-aiplatform/src/v1/endpoint_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/endpoint_service_proto_list.json @@ -18,6 +18,7 @@ "../../protos/google/cloud/aiplatform/v1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1/event.proto", "../../protos/google/cloud/aiplatform/v1/execution.proto", "../../protos/google/cloud/aiplatform/v1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/featurestore_online_serving_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/featurestore_online_serving_service_proto_list.json index 44918848766..b7295bb569f 100644 --- a/packages/google-cloud-aiplatform/src/v1/featurestore_online_serving_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/featurestore_online_serving_service_proto_list.json @@ -18,6 +18,7 @@ "../../protos/google/cloud/aiplatform/v1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1/event.proto", "../../protos/google/cloud/aiplatform/v1/execution.proto", "../../protos/google/cloud/aiplatform/v1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/featurestore_service_client.ts b/packages/google-cloud-aiplatform/src/v1/featurestore_service_client.ts index 3325ffca131..f865e2b45e0 100644 --- a/packages/google-cloud-aiplatform/src/v1/featurestore_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/featurestore_service_client.ts @@ -476,6 +476,9 @@ export class FeaturestoreServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -675,6 +678,10 @@ export class FeaturestoreServiceClient { delete: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -876,6 +883,7 @@ export class FeaturestoreServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1030,6 +1038,7 @@ export class FeaturestoreServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1196,6 +1205,9 @@ export class FeaturestoreServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, @@ -1369,6 +1381,12 @@ export class FeaturestoreServiceClient { const exportFeatureValuesMetadata = protoFilesRoot.lookup( '.google.cloud.aiplatform.v1.ExportFeatureValuesOperationMetadata' ) as gax.protobuf.Type; + const deleteFeatureValuesResponse = protoFilesRoot.lookup( + '.google.cloud.aiplatform.v1.DeleteFeatureValuesResponse' + ) as gax.protobuf.Type; + const deleteFeatureValuesMetadata = protoFilesRoot.lookup( + '.google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata' + ) as gax.protobuf.Type; this.descriptors.longrunning = { createFeaturestore: new this._gaxModule.LongrunningDescriptor( @@ -1430,6 +1448,11 @@ export class FeaturestoreServiceClient { exportFeatureValuesResponse.decode.bind(exportFeatureValuesResponse), exportFeatureValuesMetadata.decode.bind(exportFeatureValuesMetadata) ), + deleteFeatureValues: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteFeatureValuesResponse.decode.bind(deleteFeatureValuesResponse), + deleteFeatureValuesMetadata.decode.bind(deleteFeatureValuesMetadata) + ), }; // Put together the default options sent with requests. @@ -1501,6 +1524,7 @@ export class FeaturestoreServiceClient { 'importFeatureValues', 'batchReadFeatureValues', 'exportFeatureValues', + 'deleteFeatureValues', 'searchFeatures', ]; for (const methodName of featurestoreServiceStubMethods) { @@ -3798,6 +3822,160 @@ export class FeaturestoreServiceClient { protos.google.cloud.aiplatform.v1.ExportFeatureValuesOperationMetadata >; } + /** + * Delete Feature values from Featurestore. + * + * The progress of the deletion is tracked by the returned operation. The + * deleted feature values are guaranteed to be invisible to subsequent read + * operations after the operation is marked as successfully done. + * + * If a delete feature values operation fails, the feature values + * returned from reads and exports may be inconsistent. If consistency is + * required, the caller must retry the same delete request again and wait till + * the new operation returned is marked as successfully done. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity} request.selectEntity + * Select feature values to be deleted by specifying entities. + * @param {google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature} request.selectTimeRangeAndFeature + * Select feature values to be deleted by specifying time range and + * features. + * @param {string} request.entityType + * Required. The resource name of the EntityType grouping the Features for + * which values are being deleted from. Format: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/featurestore_service.delete_feature_values.js + * region_tag:aiplatform_v1_generated_FeaturestoreService_DeleteFeatureValues_async + */ + deleteFeatureValues( + request?: protos.google.cloud.aiplatform.v1.IDeleteFeatureValuesRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.aiplatform.v1.IDeleteFeatureValuesResponse, + protos.google.cloud.aiplatform.v1.IDeleteFeatureValuesOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteFeatureValues( + request: protos.google.cloud.aiplatform.v1.IDeleteFeatureValuesRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.aiplatform.v1.IDeleteFeatureValuesResponse, + protos.google.cloud.aiplatform.v1.IDeleteFeatureValuesOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteFeatureValues( + request: protos.google.cloud.aiplatform.v1.IDeleteFeatureValuesRequest, + callback: Callback< + LROperation< + protos.google.cloud.aiplatform.v1.IDeleteFeatureValuesResponse, + protos.google.cloud.aiplatform.v1.IDeleteFeatureValuesOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteFeatureValues( + request?: protos.google.cloud.aiplatform.v1.IDeleteFeatureValuesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.aiplatform.v1.IDeleteFeatureValuesResponse, + protos.google.cloud.aiplatform.v1.IDeleteFeatureValuesOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.aiplatform.v1.IDeleteFeatureValuesResponse, + protos.google.cloud.aiplatform.v1.IDeleteFeatureValuesOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.aiplatform.v1.IDeleteFeatureValuesResponse, + protos.google.cloud.aiplatform.v1.IDeleteFeatureValuesOperationMetadata + >, + 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({ + entity_type: request.entityType ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteFeatureValues(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteFeatureValues()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/featurestore_service.delete_feature_values.js + * region_tag:aiplatform_v1_generated_FeaturestoreService_DeleteFeatureValues_async + */ + async checkDeleteFeatureValuesProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.aiplatform.v1.DeleteFeatureValuesResponse, + protos.google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata + > + > { + 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.deleteFeatureValues, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.aiplatform.v1.DeleteFeatureValuesResponse, + protos.google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata + >; + } /** * Lists Featurestores in a given project and location. * diff --git a/packages/google-cloud-aiplatform/src/v1/featurestore_service_client_config.json b/packages/google-cloud-aiplatform/src/v1/featurestore_service_client_config.json index c7fd6ba089c..f1d667857a9 100644 --- a/packages/google-cloud-aiplatform/src/v1/featurestore_service_client_config.json +++ b/packages/google-cloud-aiplatform/src/v1/featurestore_service_client_config.json @@ -96,6 +96,10 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "DeleteFeatureValues": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "SearchFeatures": { "retry_codes_name": "non_idempotent", "retry_params_name": "default" diff --git a/packages/google-cloud-aiplatform/src/v1/featurestore_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/featurestore_service_proto_list.json index 44918848766..b7295bb569f 100644 --- a/packages/google-cloud-aiplatform/src/v1/featurestore_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/featurestore_service_proto_list.json @@ -18,6 +18,7 @@ "../../protos/google/cloud/aiplatform/v1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1/event.proto", "../../protos/google/cloud/aiplatform/v1/execution.proto", "../../protos/google/cloud/aiplatform/v1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/gapic_metadata.json b/packages/google-cloud-aiplatform/src/v1/gapic_metadata.json index 15ee64fb9e9..6c2ef2e22bf 100644 --- a/packages/google-cloud-aiplatform/src/v1/gapic_metadata.json +++ b/packages/google-cloud-aiplatform/src/v1/gapic_metadata.json @@ -371,6 +371,11 @@ "exportFeatureValues" ] }, + "DeleteFeatureValues": { + "methods": [ + "deleteFeatureValues" + ] + }, "ListFeaturestores": { "methods": [ "listFeaturestores", @@ -484,6 +489,11 @@ "exportFeatureValues" ] }, + "DeleteFeatureValues": { + "methods": [ + "deleteFeatureValues" + ] + }, "ListFeaturestores": { "methods": [ "listFeaturestores", @@ -1520,6 +1530,11 @@ "batchImportModelEvaluationSlices" ] }, + "BatchImportEvaluatedAnnotations": { + "methods": [ + "batchImportEvaluatedAnnotations" + ] + }, "GetModelEvaluation": { "methods": [ "getModelEvaluation" @@ -1613,6 +1628,11 @@ "batchImportModelEvaluationSlices" ] }, + "BatchImportEvaluatedAnnotations": { + "methods": [ + "batchImportEvaluatedAnnotations" + ] + }, "GetModelEvaluation": { "methods": [ "getModelEvaluation" diff --git a/packages/google-cloud-aiplatform/src/v1/index_endpoint_service_client.ts b/packages/google-cloud-aiplatform/src/v1/index_endpoint_service_client.ts index 18e4c021755..048dcfb9e8f 100644 --- a/packages/google-cloud-aiplatform/src/v1/index_endpoint_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/index_endpoint_service_client.ts @@ -458,6 +458,9 @@ export class IndexEndpointServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -657,6 +660,10 @@ export class IndexEndpointServiceClient { delete: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -858,6 +865,7 @@ export class IndexEndpointServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1012,6 +1020,7 @@ export class IndexEndpointServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1178,6 +1187,9 @@ export class IndexEndpointServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1/index_endpoint_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/index_endpoint_service_proto_list.json index 44918848766..b7295bb569f 100644 --- a/packages/google-cloud-aiplatform/src/v1/index_endpoint_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/index_endpoint_service_proto_list.json @@ -18,6 +18,7 @@ "../../protos/google/cloud/aiplatform/v1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1/event.proto", "../../protos/google/cloud/aiplatform/v1/execution.proto", "../../protos/google/cloud/aiplatform/v1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/index_service_client.ts b/packages/google-cloud-aiplatform/src/v1/index_service_client.ts index 19ab63030b6..f4b66b56185 100644 --- a/packages/google-cloud-aiplatform/src/v1/index_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/index_service_client.ts @@ -458,6 +458,9 @@ export class IndexServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -657,6 +660,10 @@ export class IndexServiceClient { delete: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -858,6 +865,7 @@ export class IndexServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1012,6 +1020,7 @@ export class IndexServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1178,6 +1187,9 @@ export class IndexServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1/index_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/index_service_proto_list.json index 44918848766..b7295bb569f 100644 --- a/packages/google-cloud-aiplatform/src/v1/index_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/index_service_proto_list.json @@ -18,6 +18,7 @@ "../../protos/google/cloud/aiplatform/v1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1/event.proto", "../../protos/google/cloud/aiplatform/v1/execution.proto", "../../protos/google/cloud/aiplatform/v1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/job_service_client.ts b/packages/google-cloud-aiplatform/src/v1/job_service_client.ts index 64797b09393..9445bc6e020 100644 --- a/packages/google-cloud-aiplatform/src/v1/job_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/job_service_client.ts @@ -494,6 +494,9 @@ export class JobServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -693,6 +696,10 @@ export class JobServiceClient { delete: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -894,6 +901,7 @@ export class JobServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1048,6 +1056,7 @@ export class JobServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1214,6 +1223,9 @@ export class JobServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1/job_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/job_service_proto_list.json index 44918848766..b7295bb569f 100644 --- a/packages/google-cloud-aiplatform/src/v1/job_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/job_service_proto_list.json @@ -18,6 +18,7 @@ "../../protos/google/cloud/aiplatform/v1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1/event.proto", "../../protos/google/cloud/aiplatform/v1/execution.proto", "../../protos/google/cloud/aiplatform/v1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/metadata_service_client.ts b/packages/google-cloud-aiplatform/src/v1/metadata_service_client.ts index 4bece8c4ea2..f9482007258 100644 --- a/packages/google-cloud-aiplatform/src/v1/metadata_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/metadata_service_client.ts @@ -481,6 +481,9 @@ export class MetadataServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -680,6 +683,10 @@ export class MetadataServiceClient { delete: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -881,6 +888,7 @@ export class MetadataServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1035,6 +1043,7 @@ export class MetadataServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1201,6 +1210,9 @@ export class MetadataServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1/metadata_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/metadata_service_proto_list.json index 44918848766..b7295bb569f 100644 --- a/packages/google-cloud-aiplatform/src/v1/metadata_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/metadata_service_proto_list.json @@ -18,6 +18,7 @@ "../../protos/google/cloud/aiplatform/v1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1/event.proto", "../../protos/google/cloud/aiplatform/v1/execution.proto", "../../protos/google/cloud/aiplatform/v1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/migration_service_client.ts b/packages/google-cloud-aiplatform/src/v1/migration_service_client.ts index 293ffcfae36..d2915c9a023 100644 --- a/packages/google-cloud-aiplatform/src/v1/migration_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/migration_service_client.ts @@ -459,6 +459,9 @@ export class MigrationServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -658,6 +661,10 @@ export class MigrationServiceClient { delete: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -859,6 +866,7 @@ export class MigrationServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1013,6 +1021,7 @@ export class MigrationServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1179,6 +1188,9 @@ export class MigrationServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1/migration_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/migration_service_proto_list.json index 44918848766..b7295bb569f 100644 --- a/packages/google-cloud-aiplatform/src/v1/migration_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/migration_service_proto_list.json @@ -18,6 +18,7 @@ "../../protos/google/cloud/aiplatform/v1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1/event.proto", "../../protos/google/cloud/aiplatform/v1/execution.proto", "../../protos/google/cloud/aiplatform/v1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/model_service_client.ts b/packages/google-cloud-aiplatform/src/v1/model_service_client.ts index 0f405ce7b53..67db6654ee0 100644 --- a/packages/google-cloud-aiplatform/src/v1/model_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/model_service_client.ts @@ -473,6 +473,9 @@ export class ModelServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -672,6 +675,10 @@ export class ModelServiceClient { delete: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -873,6 +880,7 @@ export class ModelServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1027,6 +1035,7 @@ export class ModelServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1193,6 +1202,9 @@ export class ModelServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, @@ -1421,6 +1433,7 @@ export class ModelServiceClient { 'copyModel', 'importModelEvaluation', 'batchImportModelEvaluationSlices', + 'batchImportEvaluatedAnnotations', 'getModelEvaluation', 'listModelEvaluations', 'getModelEvaluationSlice', @@ -2023,6 +2036,111 @@ export class ModelServiceClient { callback ); } + /** + * Imports a list of externally generated EvaluatedAnnotations. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent ModelEvaluationSlice resource. + * Format: + * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}` + * @param {number[]} request.evaluatedAnnotations + * Required. Evaluated annotations resource to be imported. + * @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.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse | BatchImportEvaluatedAnnotationsResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/model_service.batch_import_evaluated_annotations.js + * region_tag:aiplatform_v1_generated_ModelService_BatchImportEvaluatedAnnotations_async + */ + batchImportEvaluatedAnnotations( + request?: protos.google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsResponse, + ( + | protos.google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsRequest + | undefined + ), + {} | undefined + ] + >; + batchImportEvaluatedAnnotations( + request: protos.google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsResponse, + | protos.google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + batchImportEvaluatedAnnotations( + request: protos.google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsRequest, + callback: Callback< + protos.google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsResponse, + | protos.google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + batchImportEvaluatedAnnotations( + request?: protos.google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsResponse, + | protos.google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsResponse, + | protos.google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsResponse, + ( + | protos.google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.batchImportEvaluatedAnnotations( + request, + options, + callback + ); + } /** * Gets a ModelEvaluation. * @@ -2527,8 +2645,9 @@ export class ModelServiceClient { /** * Deletes a Model version. * - * Model version can only be deleted if there are no {@link |DeployedModels} - * created from it. Deleting the only version in the Model is not allowed. Use + * Model version can only be deleted if there are no + * {@link google.cloud.aiplatform.v1.DeployedModel|DeployedModels} created from it. + * Deleting the only version in the Model is not allowed. Use * {@link google.cloud.aiplatform.v1.ModelService.DeleteModel|DeleteModel} for * deleting the Model instead. * diff --git a/packages/google-cloud-aiplatform/src/v1/model_service_client_config.json b/packages/google-cloud-aiplatform/src/v1/model_service_client_config.json index 1f3e41c0e93..705668228c5 100644 --- a/packages/google-cloud-aiplatform/src/v1/model_service_client_config.json +++ b/packages/google-cloud-aiplatform/src/v1/model_service_client_config.json @@ -68,6 +68,10 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "BatchImportEvaluatedAnnotations": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "GetModelEvaluation": { "retry_codes_name": "non_idempotent", "retry_params_name": "default" diff --git a/packages/google-cloud-aiplatform/src/v1/model_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/model_service_proto_list.json index 44918848766..b7295bb569f 100644 --- a/packages/google-cloud-aiplatform/src/v1/model_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/model_service_proto_list.json @@ -18,6 +18,7 @@ "../../protos/google/cloud/aiplatform/v1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1/event.proto", "../../protos/google/cloud/aiplatform/v1/execution.proto", "../../protos/google/cloud/aiplatform/v1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/pipeline_service_client.ts b/packages/google-cloud-aiplatform/src/v1/pipeline_service_client.ts index c390d5b66e2..89681105fbf 100644 --- a/packages/google-cloud-aiplatform/src/v1/pipeline_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/pipeline_service_client.ts @@ -465,6 +465,9 @@ export class PipelineServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -664,6 +667,10 @@ export class PipelineServiceClient { delete: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -865,6 +872,7 @@ export class PipelineServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1019,6 +1027,7 @@ export class PipelineServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1185,6 +1194,9 @@ export class PipelineServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1/pipeline_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/pipeline_service_proto_list.json index 44918848766..b7295bb569f 100644 --- a/packages/google-cloud-aiplatform/src/v1/pipeline_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/pipeline_service_proto_list.json @@ -18,6 +18,7 @@ "../../protos/google/cloud/aiplatform/v1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1/event.proto", "../../protos/google/cloud/aiplatform/v1/execution.proto", "../../protos/google/cloud/aiplatform/v1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/prediction_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/prediction_service_proto_list.json index 44918848766..b7295bb569f 100644 --- a/packages/google-cloud-aiplatform/src/v1/prediction_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/prediction_service_proto_list.json @@ -18,6 +18,7 @@ "../../protos/google/cloud/aiplatform/v1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1/event.proto", "../../protos/google/cloud/aiplatform/v1/execution.proto", "../../protos/google/cloud/aiplatform/v1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/specialist_pool_service_client.ts b/packages/google-cloud-aiplatform/src/v1/specialist_pool_service_client.ts index ae460028de1..a67f6e0be97 100644 --- a/packages/google-cloud-aiplatform/src/v1/specialist_pool_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/specialist_pool_service_client.ts @@ -464,6 +464,9 @@ export class SpecialistPoolServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -663,6 +666,10 @@ export class SpecialistPoolServiceClient { delete: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -864,6 +871,7 @@ export class SpecialistPoolServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1018,6 +1026,7 @@ export class SpecialistPoolServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1184,6 +1193,9 @@ export class SpecialistPoolServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1/specialist_pool_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/specialist_pool_service_proto_list.json index 44918848766..b7295bb569f 100644 --- a/packages/google-cloud-aiplatform/src/v1/specialist_pool_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/specialist_pool_service_proto_list.json @@ -18,6 +18,7 @@ "../../protos/google/cloud/aiplatform/v1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1/event.proto", "../../protos/google/cloud/aiplatform/v1/execution.proto", "../../protos/google/cloud/aiplatform/v1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/tensorboard_service_client.ts b/packages/google-cloud-aiplatform/src/v1/tensorboard_service_client.ts index 3356bc2f3bd..4ede8fec391 100644 --- a/packages/google-cloud-aiplatform/src/v1/tensorboard_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/tensorboard_service_client.ts @@ -490,6 +490,9 @@ export class TensorboardServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -689,6 +692,10 @@ export class TensorboardServiceClient { delete: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -890,6 +897,7 @@ export class TensorboardServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1044,6 +1052,7 @@ export class TensorboardServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1210,6 +1219,9 @@ export class TensorboardServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1/tensorboard_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/tensorboard_service_proto_list.json index 44918848766..b7295bb569f 100644 --- a/packages/google-cloud-aiplatform/src/v1/tensorboard_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/tensorboard_service_proto_list.json @@ -18,6 +18,7 @@ "../../protos/google/cloud/aiplatform/v1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1/event.proto", "../../protos/google/cloud/aiplatform/v1/execution.proto", "../../protos/google/cloud/aiplatform/v1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1/vizier_service_client.ts b/packages/google-cloud-aiplatform/src/v1/vizier_service_client.ts index 1803545bc1a..3cf2685ac6d 100644 --- a/packages/google-cloud-aiplatform/src/v1/vizier_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/vizier_service_client.ts @@ -467,6 +467,9 @@ export class VizierServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -666,6 +669,10 @@ export class VizierServiceClient { delete: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -867,6 +874,7 @@ export class VizierServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1021,6 +1029,7 @@ export class VizierServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1187,6 +1196,9 @@ export class VizierServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, @@ -2619,7 +2631,7 @@ export class VizierServiceClient { * Checks whether a Trial should stop or not. Returns a * long-running operation. When the operation is successful, * it will contain a - * {@link google.cloud.ml.v1.CheckTrialEarlyStoppingStateResponse|CheckTrialEarlyStoppingStateResponse}. + * {@link google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse|CheckTrialEarlyStoppingStateResponse}. * * @param {Object} request * The request object that will be sent. diff --git a/packages/google-cloud-aiplatform/src/v1/vizier_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1/vizier_service_proto_list.json index 44918848766..b7295bb569f 100644 --- a/packages/google-cloud-aiplatform/src/v1/vizier_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1/vizier_service_proto_list.json @@ -18,6 +18,7 @@ "../../protos/google/cloud/aiplatform/v1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1/event.proto", "../../protos/google/cloud/aiplatform/v1/execution.proto", "../../protos/google/cloud/aiplatform/v1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_client.ts index 8ccbe842224..9850d536ecf 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_client.ts @@ -486,6 +486,9 @@ export class DatasetServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -696,6 +699,10 @@ export class DatasetServiceClient { delete: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -912,6 +919,7 @@ export class DatasetServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1085,6 +1093,7 @@ export class DatasetServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1270,6 +1279,9 @@ export class DatasetServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_proto_list.json index aa3de3bda26..d95650909f1 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_proto_list.json @@ -20,6 +20,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1beta1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1beta1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_client.ts index bba1217d444..176803529d2 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_client.ts @@ -474,6 +474,9 @@ export class DeploymentResourcePoolServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -684,6 +687,10 @@ export class DeploymentResourcePoolServiceClient { delete: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -900,6 +907,7 @@ export class DeploymentResourcePoolServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1073,6 +1081,7 @@ export class DeploymentResourcePoolServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1258,6 +1267,9 @@ export class DeploymentResourcePoolServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_proto_list.json index aa3de3bda26..d95650909f1 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_proto_list.json @@ -20,6 +20,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1beta1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1beta1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_client.ts index 623715e1058..7dc764acc30 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_client.ts @@ -465,6 +465,9 @@ export class EndpointServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -675,6 +678,10 @@ export class EndpointServiceClient { delete: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -891,6 +898,7 @@ export class EndpointServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1064,6 +1072,7 @@ export class EndpointServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1249,6 +1258,9 @@ export class EndpointServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_proto_list.json index aa3de3bda26..d95650909f1 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_proto_list.json @@ -20,6 +20,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1beta1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1beta1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_proto_list.json index aa3de3bda26..d95650909f1 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_proto_list.json @@ -20,6 +20,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1beta1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1beta1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_client.ts index 961a7f10e31..954b0edba0f 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_client.ts @@ -483,6 +483,9 @@ export class FeaturestoreServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -693,6 +696,10 @@ export class FeaturestoreServiceClient { delete: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -909,6 +916,7 @@ export class FeaturestoreServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1082,6 +1090,7 @@ export class FeaturestoreServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1267,6 +1276,9 @@ export class FeaturestoreServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_proto_list.json index aa3de3bda26..d95650909f1 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_proto_list.json @@ -20,6 +20,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1beta1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1beta1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json b/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json index 4d587a2b7b4..5190f1f89e1 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json @@ -1636,6 +1636,11 @@ "batchImportModelEvaluationSlices" ] }, + "BatchImportEvaluatedAnnotations": { + "methods": [ + "batchImportEvaluatedAnnotations" + ] + }, "GetModelEvaluation": { "methods": [ "getModelEvaluation" @@ -1734,6 +1739,11 @@ "batchImportModelEvaluationSlices" ] }, + "BatchImportEvaluatedAnnotations": { + "methods": [ + "batchImportEvaluatedAnnotations" + ] + }, "GetModelEvaluation": { "methods": [ "getModelEvaluation" diff --git a/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_client.ts index bc5fc14e990..a4075316992 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_client.ts @@ -465,6 +465,9 @@ export class IndexEndpointServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -675,6 +678,10 @@ export class IndexEndpointServiceClient { delete: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -891,6 +898,7 @@ export class IndexEndpointServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1064,6 +1072,7 @@ export class IndexEndpointServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1249,6 +1258,9 @@ export class IndexEndpointServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_proto_list.json index aa3de3bda26..d95650909f1 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_proto_list.json @@ -20,6 +20,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1beta1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1beta1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/index_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/index_service_client.ts index 28e73860eea..890497572c9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/index_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/index_service_client.ts @@ -465,6 +465,9 @@ export class IndexServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -675,6 +678,10 @@ export class IndexServiceClient { delete: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -891,6 +898,7 @@ export class IndexServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1064,6 +1072,7 @@ export class IndexServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1249,6 +1258,9 @@ export class IndexServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1beta1/index_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/index_service_proto_list.json index aa3de3bda26..d95650909f1 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/index_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/index_service_proto_list.json @@ -20,6 +20,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1beta1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1beta1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/job_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/job_service_client.ts index cc344890f95..6e2d2974113 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/job_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/job_service_client.ts @@ -501,6 +501,9 @@ export class JobServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -711,6 +714,10 @@ export class JobServiceClient { delete: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -927,6 +934,7 @@ export class JobServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1100,6 +1108,7 @@ export class JobServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1285,6 +1294,9 @@ export class JobServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1beta1/job_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/job_service_proto_list.json index aa3de3bda26..d95650909f1 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/job_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/job_service_proto_list.json @@ -20,6 +20,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1beta1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1beta1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/match_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/match_service_proto_list.json index aa3de3bda26..d95650909f1 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/match_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/match_service_proto_list.json @@ -20,6 +20,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1beta1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1beta1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_client.ts index 128e13fa13d..3dcedaa1945 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_client.ts @@ -488,6 +488,9 @@ export class MetadataServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -698,6 +701,10 @@ export class MetadataServiceClient { delete: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -914,6 +921,7 @@ export class MetadataServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1087,6 +1095,7 @@ export class MetadataServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1272,6 +1281,9 @@ export class MetadataServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_proto_list.json index aa3de3bda26..d95650909f1 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_proto_list.json @@ -20,6 +20,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1beta1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1beta1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/migration_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/migration_service_client.ts index 8f7e4866353..fe631ca2ebb 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/migration_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/migration_service_client.ts @@ -466,6 +466,9 @@ export class MigrationServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -676,6 +679,10 @@ export class MigrationServiceClient { delete: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -892,6 +899,7 @@ export class MigrationServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1065,6 +1073,7 @@ export class MigrationServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1250,6 +1259,9 @@ export class MigrationServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1beta1/migration_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/migration_service_proto_list.json index aa3de3bda26..d95650909f1 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/migration_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/migration_service_proto_list.json @@ -20,6 +20,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1beta1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1beta1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/model_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/model_service_client.ts index 54422d19b8a..dbb6ac1c1de 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/model_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/model_service_client.ts @@ -480,6 +480,9 @@ export class ModelServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -690,6 +693,10 @@ export class ModelServiceClient { delete: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -906,6 +913,7 @@ export class ModelServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1079,6 +1087,7 @@ export class ModelServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1264,6 +1273,9 @@ export class ModelServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, @@ -1517,6 +1529,7 @@ export class ModelServiceClient { 'copyModel', 'importModelEvaluation', 'batchImportModelEvaluationSlices', + 'batchImportEvaluatedAnnotations', 'getModelEvaluation', 'listModelEvaluations', 'getModelEvaluationSlice', @@ -2139,6 +2152,111 @@ export class ModelServiceClient { callback ); } + /** + * Imports a list of externally generated EvaluatedAnnotations. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent ModelEvaluationSlice resource. + * Format: + * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}` + * @param {number[]} request.evaluatedAnnotations + * Required. Evaluated annotations resource to be imported. + * @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.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse | BatchImportEvaluatedAnnotationsResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/model_service.batch_import_evaluated_annotations.js + * region_tag:aiplatform_v1beta1_generated_ModelService_BatchImportEvaluatedAnnotations_async + */ + batchImportEvaluatedAnnotations( + request?: protos.google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsResponse, + ( + | protos.google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsRequest + | undefined + ), + {} | undefined + ] + >; + batchImportEvaluatedAnnotations( + request: protos.google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsResponse, + | protos.google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + batchImportEvaluatedAnnotations( + request: protos.google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsRequest, + callback: Callback< + protos.google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsResponse, + | protos.google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + batchImportEvaluatedAnnotations( + request?: protos.google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsResponse, + | protos.google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsResponse, + | protos.google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsResponse, + ( + | protos.google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.batchImportEvaluatedAnnotations( + request, + options, + callback + ); + } /** * Gets a ModelEvaluation. * @@ -2794,8 +2912,9 @@ export class ModelServiceClient { /** * Deletes a Model version. * - * Model version can only be deleted if there are no {@link |DeployedModels} - * created from it. Deleting the only version in the Model is not allowed. Use + * Model version can only be deleted if there are no + * {@link google.cloud.aiplatform.v1beta1.DeployedModel|DeployedModels} created + * from it. Deleting the only version in the Model is not allowed. Use * {@link google.cloud.aiplatform.v1beta1.ModelService.DeleteModel|DeleteModel} for * deleting the Model instead. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/model_service_client_config.json b/packages/google-cloud-aiplatform/src/v1beta1/model_service_client_config.json index adb9f815031..d073f2cc96c 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/model_service_client_config.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/model_service_client_config.json @@ -79,6 +79,10 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "BatchImportEvaluatedAnnotations": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "GetModelEvaluation": { "timeout_millis": 5000, "retry_codes_name": "non_idempotent", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/model_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/model_service_proto_list.json index aa3de3bda26..d95650909f1 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/model_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/model_service_proto_list.json @@ -20,6 +20,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1beta1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1beta1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_client.ts index 0b53240a7de..17395b54ab8 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_client.ts @@ -472,6 +472,9 @@ export class PipelineServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -682,6 +685,10 @@ export class PipelineServiceClient { delete: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -898,6 +905,7 @@ export class PipelineServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1071,6 +1079,7 @@ export class PipelineServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1256,6 +1265,9 @@ export class PipelineServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_proto_list.json index aa3de3bda26..d95650909f1 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_proto_list.json @@ -20,6 +20,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1beta1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1beta1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_proto_list.json index aa3de3bda26..d95650909f1 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_proto_list.json @@ -20,6 +20,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1beta1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1beta1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_client.ts index 69cf5f6c219..d153a2a3b79 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_client.ts @@ -471,6 +471,9 @@ export class SpecialistPoolServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -681,6 +684,10 @@ export class SpecialistPoolServiceClient { delete: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -897,6 +904,7 @@ export class SpecialistPoolServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1070,6 +1078,7 @@ export class SpecialistPoolServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1255,6 +1264,9 @@ export class SpecialistPoolServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_proto_list.json index aa3de3bda26..d95650909f1 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_proto_list.json @@ -20,6 +20,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1beta1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1beta1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_client.ts index 73c5eb18cd0..4855c8e19b1 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_client.ts @@ -497,6 +497,9 @@ export class TensorboardServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -707,6 +710,10 @@ export class TensorboardServiceClient { delete: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -923,6 +930,7 @@ export class TensorboardServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1096,6 +1104,7 @@ export class TensorboardServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1281,6 +1290,9 @@ export class TensorboardServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, diff --git a/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_proto_list.json index aa3de3bda26..d95650909f1 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_proto_list.json @@ -20,6 +20,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1beta1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1beta1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_client.ts index 7c3a51558bc..06013e2df45 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_client.ts @@ -474,6 +474,9 @@ export class VizierServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', }, @@ -684,6 +687,10 @@ export class VizierServiceClient { delete: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + { + delete: + '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + }, { delete: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', @@ -900,6 +907,7 @@ export class VizierServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', }, @@ -1073,6 +1081,7 @@ export class VizierServiceClient { { get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', }, + {get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'}, { get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', }, @@ -1258,6 +1267,9 @@ export class VizierServiceClient { { post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, { post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', }, @@ -2763,7 +2775,7 @@ export class VizierServiceClient { * Checks whether a Trial should stop or not. Returns a * long-running operation. When the operation is successful, * it will contain a - * {@link google.cloud.ml.v1.CheckTrialEarlyStoppingStateResponse|CheckTrialEarlyStoppingStateResponse}. + * {@link google.cloud.aiplatform.v1beta1.CheckTrialEarlyStoppingStateResponse|CheckTrialEarlyStoppingStateResponse}. * * @param {Object} request * The request object that will be sent. diff --git a/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_proto_list.json index aa3de3bda26..d95650909f1 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_proto_list.json @@ -20,6 +20,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/entity_type.proto", "../../protos/google/cloud/aiplatform/v1beta1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1beta1/evaluated_annotation.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/test/gapic_featurestore_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_featurestore_service_v1.ts index fb6aa73addd..7be3da17c6e 100644 --- a/packages/google-cloud-aiplatform/test/gapic_featurestore_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_featurestore_service_v1.ts @@ -3249,6 +3249,212 @@ describe('v1.FeaturestoreServiceClient', () => { }); }); + describe('deleteFeatureValues', () => { + it('invokes deleteFeatureValues without error', async () => { + const client = new featurestoreserviceModule.v1.FeaturestoreServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.DeleteFeatureValuesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.DeleteFeatureValuesRequest', + ['entityType'] + ); + request.entityType = defaultValue1; + const expectedHeaderRequestParams = `entity_type=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteFeatureValues = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteFeatureValues(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteFeatureValues as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFeatureValues as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFeatureValues without error using callback', async () => { + const client = new featurestoreserviceModule.v1.FeaturestoreServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.DeleteFeatureValuesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.DeleteFeatureValuesRequest', + ['entityType'] + ); + request.entityType = defaultValue1; + const expectedHeaderRequestParams = `entity_type=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteFeatureValues = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteFeatureValues( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.aiplatform.v1.IDeleteFeatureValuesResponse, + protos.google.cloud.aiplatform.v1.IDeleteFeatureValuesOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.aiplatform.v1.IDeleteFeatureValuesResponse, + protos.google.cloud.aiplatform.v1.IDeleteFeatureValuesOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteFeatureValues as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFeatureValues as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFeatureValues with call error', async () => { + const client = new featurestoreserviceModule.v1.FeaturestoreServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.DeleteFeatureValuesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.DeleteFeatureValuesRequest', + ['entityType'] + ); + request.entityType = defaultValue1; + const expectedHeaderRequestParams = `entity_type=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteFeatureValues = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteFeatureValues(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteFeatureValues as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFeatureValues as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFeatureValues with LRO error', async () => { + const client = new featurestoreserviceModule.v1.FeaturestoreServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.DeleteFeatureValuesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.DeleteFeatureValuesRequest', + ['entityType'] + ); + request.entityType = defaultValue1; + const expectedHeaderRequestParams = `entity_type=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteFeatureValues = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteFeatureValues(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteFeatureValues as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFeatureValues as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteFeatureValuesProgress without error', async () => { + const client = new featurestoreserviceModule.v1.FeaturestoreServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteFeatureValuesProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteFeatureValuesProgress with error', async () => { + const client = new featurestoreserviceModule.v1.FeaturestoreServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeleteFeatureValuesProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + describe('listFeaturestores', () => { it('invokes listFeaturestores without error', async () => { const client = new featurestoreserviceModule.v1.FeaturestoreServiceClient( diff --git a/packages/google-cloud-aiplatform/test/gapic_model_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_model_service_v1.ts index 416b13c42cb..6df10fdd68a 100644 --- a/packages/google-cloud-aiplatform/test/gapic_model_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_model_service_v1.ts @@ -929,6 +929,143 @@ describe('v1.ModelServiceClient', () => { }); }); + describe('batchImportEvaluatedAnnotations', () => { + it('invokes batchImportEvaluatedAnnotations without error', async () => { + const client = new modelserviceModule.v1.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse() + ); + client.innerApiCalls.batchImportEvaluatedAnnotations = + stubSimpleCall(expectedResponse); + const [response] = await client.batchImportEvaluatedAnnotations(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.batchImportEvaluatedAnnotations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchImportEvaluatedAnnotations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchImportEvaluatedAnnotations without error using callback', async () => { + const client = new modelserviceModule.v1.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse() + ); + client.innerApiCalls.batchImportEvaluatedAnnotations = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchImportEvaluatedAnnotations( + request, + ( + err?: Error | null, + result?: protos.google.cloud.aiplatform.v1.IBatchImportEvaluatedAnnotationsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.batchImportEvaluatedAnnotations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchImportEvaluatedAnnotations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchImportEvaluatedAnnotations with error', async () => { + const client = new modelserviceModule.v1.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchImportEvaluatedAnnotations = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.batchImportEvaluatedAnnotations(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.batchImportEvaluatedAnnotations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchImportEvaluatedAnnotations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchImportEvaluatedAnnotations with closed client', async () => { + const client = new modelserviceModule.v1.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.batchImportEvaluatedAnnotations(request), + expectedError + ); + }); + }); + describe('getModelEvaluation', () => { it('invokes getModelEvaluation without error', async () => { const client = new modelserviceModule.v1.ModelServiceClient({ diff --git a/packages/google-cloud-aiplatform/test/gapic_model_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_model_service_v1beta1.ts index 6a099986884..3c3ed1bdacc 100644 --- a/packages/google-cloud-aiplatform/test/gapic_model_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_model_service_v1beta1.ts @@ -931,6 +931,143 @@ describe('v1beta1.ModelServiceClient', () => { }); }); + describe('batchImportEvaluatedAnnotations', () => { + it('invokes batchImportEvaluatedAnnotations without error', async () => { + const client = new modelserviceModule.v1beta1.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse() + ); + client.innerApiCalls.batchImportEvaluatedAnnotations = + stubSimpleCall(expectedResponse); + const [response] = await client.batchImportEvaluatedAnnotations(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.batchImportEvaluatedAnnotations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchImportEvaluatedAnnotations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchImportEvaluatedAnnotations without error using callback', async () => { + const client = new modelserviceModule.v1beta1.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsResponse() + ); + client.innerApiCalls.batchImportEvaluatedAnnotations = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchImportEvaluatedAnnotations( + request, + ( + err?: Error | null, + result?: protos.google.cloud.aiplatform.v1beta1.IBatchImportEvaluatedAnnotationsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.batchImportEvaluatedAnnotations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchImportEvaluatedAnnotations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchImportEvaluatedAnnotations with error', async () => { + const client = new modelserviceModule.v1beta1.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchImportEvaluatedAnnotations = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.batchImportEvaluatedAnnotations(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.batchImportEvaluatedAnnotations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchImportEvaluatedAnnotations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchImportEvaluatedAnnotations with closed client', async () => { + const client = new modelserviceModule.v1beta1.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.BatchImportEvaluatedAnnotationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.batchImportEvaluatedAnnotations(request), + expectedError + ); + }); + }); + describe('getModelEvaluation', () => { it('invokes getModelEvaluation without error', async () => { const client = new modelserviceModule.v1beta1.ModelServiceClient({ From adfb10deede0bbba68238e9e97a237062172bd88 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 6 Mar 2023 11:21:09 -0500 Subject: [PATCH 74/80] docs: [container] minor typo fix (#4054) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: minor typo fix PiperOrigin-RevId: 513869216 Source-Link: https://github.com/googleapis/googleapis/commit/ec2020a9113f473a1542f84742c203a462bcd9be Source-Link: https://github.com/googleapis/googleapis-gen/commit/df7a1af984f26cb3beb212b7dd5297c97175a213 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNvbnRhaW5lci8uT3dsQm90LnlhbWwiLCJoIjoiZGY3YTFhZjk4NGYyNmNiM2JlYjIxMmI3ZGQ1Mjk3Yzk3MTc1YTIxMyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * docs: minor typo fix PiperOrigin-RevId: 513869294 Source-Link: https://github.com/googleapis/googleapis/commit/00179492fb1d3ceedd9c65b803c6230d59a15d94 Source-Link: https://github.com/googleapis/googleapis-gen/commit/8edd875949ac042a66991fd93da98440573ceaab Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNvbnRhaW5lci8uT3dsQm90LnlhbWwiLCJoIjoiOGVkZDg3NTk0OWFjMDQyYTY2OTkxZmQ5M2RhOTg0NDA1NzNjZWFhYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../protos/google/container/v1/cluster_service.proto | 2 +- .../protos/google/container/v1beta1/cluster_service.proto | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-container/protos/google/container/v1/cluster_service.proto b/packages/google-container/protos/google/container/v1/cluster_service.proto index 5d17384436e..7c307e85153 100644 --- a/packages/google-container/protos/google/container/v1/cluster_service.proto +++ b/packages/google-container/protos/google/container/v1/cluster_service.proto @@ -4332,7 +4332,7 @@ enum PrivateIPv6GoogleAccess { // Enables private IPv6 access to Google Services from GKE PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE = 2; - // Enables priate IPv6 access to and from Google Services + // Enables private IPv6 access to and from Google Services PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL = 3; } diff --git a/packages/google-container/protos/google/container/v1beta1/cluster_service.proto b/packages/google-container/protos/google/container/v1beta1/cluster_service.proto index 3453a1970ba..94794afb996 100644 --- a/packages/google-container/protos/google/container/v1beta1/cluster_service.proto +++ b/packages/google-container/protos/google/container/v1beta1/cluster_service.proto @@ -4818,7 +4818,7 @@ enum PrivateIPv6GoogleAccess { // Enables private IPv6 access to Google Services from GKE PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE = 2; - // Enables priate IPv6 access to and from Google Services + // Enables private IPv6 access to and from Google Services PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL = 3; } From 38071174d35446fb8459d210caec4277c47e9ed2 Mon Sep 17 00:00:00 2001 From: Jeffrey Rennie Date: Mon, 6 Mar 2023 09:17:28 -0800 Subject: [PATCH 75/80] chore: store artifacts is placer (#4047) Store the packages we uploaded to npmjs.org and their corresponding package-lock.jsons in Placer. That way, we have a record of exactly what we published, and which version of which tools we used to publish it, which we can use to generate SBOMs and attestations. Co-authored-by: Benjamin E. Coe --- .kokoro/release/publish.cfg | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.kokoro/release/publish.cfg b/.kokoro/release/publish.cfg index 9ad746d9de8..e5f79848e71 100644 --- a/.kokoro/release/publish.cfg +++ b/.kokoro/release/publish.cfg @@ -25,3 +25,15 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/google-cloud-node/.kokoro/release/publish.sh" } + +# Store the packages we uploaded to npmjs.org and their corresponding +# package-lock.jsons in Placer. That way, we have a record of exactly +# what we published, and which version of which tools we used to publish +# it, which we can use to generate SBOMs and attestations. +action { + define_artifacts { + regex: "github/google-cloud-node/**/*.tgz" + regex: "github/google-cloud-node/**/package-lock.json" + strip_prefix: "github/google-cloud-node" + } +} \ No newline at end of file From 304eac5d2ee704f948b29fdcbb638a62ff0582cd Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 6 Mar 2023 14:21:26 -0500 Subject: [PATCH 76/80] feat: [scheduler] Location API methods (#4048) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Location API methods docs: updated comments chore: proto formatting PiperOrigin-RevId: 513582719 Source-Link: https://github.com/googleapis/googleapis/commit/822476c339ea9812052b5c4f6fbc9386247c13f0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/39ca52760199d113b51ad8bdca75cea9e11a9e98 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNjaGVkdWxlci8uT3dsQm90LnlhbWwiLCJoIjoiMzljYTUyNzYwMTk5ZDExM2I1MWFkOGJkY2E3NWNlYTllMTFhOWU5OCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: Denis DelGrosso <85250797+ddelgrosso1@users.noreply.github.com> --- .../cloud/scheduler/v1/cloudscheduler.proto | 89 +++++--- .../google/cloud/scheduler/v1/job.proto | 93 +++++--- .../google/cloud/scheduler/v1/target.proto | 76 ++++--- .../google-cloud-scheduler/protos/protos.json | 5 +- .../v1/cloud_scheduler.create_job.js | 3 +- .../generated/v1/cloud_scheduler.list_jobs.js | 11 +- .../v1/cloud_scheduler.update_job.js | 6 +- ...et_metadata.google.cloud.scheduler.v1.json | 6 +- ...tadata.google.cloud.scheduler.v1beta1.json | 2 +- .../src/v1/cloud_scheduler_client.ts | 160 +++++++++++--- .../test/gapic_cloud_scheduler_v1.ts | 200 +++++++++++++++++- 11 files changed, 506 insertions(+), 145 deletions(-) diff --git a/packages/google-cloud-scheduler/protos/google/cloud/scheduler/v1/cloudscheduler.proto b/packages/google-cloud-scheduler/protos/google/cloud/scheduler/v1/cloudscheduler.proto index 7c6caab2f08..b6b594b2b62 100644 --- a/packages/google-cloud-scheduler/protos/google/cloud/scheduler/v1/cloudscheduler.proto +++ b/packages/google-cloud-scheduler/protos/google/cloud/scheduler/v1/cloudscheduler.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -35,7 +34,8 @@ option objc_class_prefix = "SCHEDULER"; // schedule asynchronous jobs. service CloudScheduler { option (google.api.default_host) = "cloudscheduler.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Lists jobs. rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) { @@ -64,13 +64,14 @@ service CloudScheduler { // Updates a job. // - // If successful, the updated [Job][google.cloud.scheduler.v1.Job] is returned. If the job does - // not exist, `NOT_FOUND` is returned. + // If successful, the updated [Job][google.cloud.scheduler.v1.Job] is + // returned. If the job does not exist, `NOT_FOUND` is returned. // // If UpdateJob does not successfully return, it is possible for the - // job to be in an [Job.State.UPDATE_FAILED][google.cloud.scheduler.v1.Job.State.UPDATE_FAILED] state. A job in this state may - // not be executed. If this happens, retry the UpdateJob request - // until a successful response is received. + // job to be in an + // [Job.State.UPDATE_FAILED][google.cloud.scheduler.v1.Job.State.UPDATE_FAILED] + // state. A job in this state may not be executed. If this happens, retry the + // UpdateJob request until a successful response is received. rpc UpdateJob(UpdateJobRequest) returns (Job) { option (google.api.http) = { patch: "/v1/{job.name=projects/*/locations/*/jobs/*}" @@ -90,10 +91,13 @@ service CloudScheduler { // Pauses a job. // // If a job is paused then the system will stop executing the job - // until it is re-enabled via [ResumeJob][google.cloud.scheduler.v1.CloudScheduler.ResumeJob]. The - // state of the job is stored in [state][google.cloud.scheduler.v1.Job.state]; if paused it - // will be set to [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED]. A job must be in [Job.State.ENABLED][google.cloud.scheduler.v1.Job.State.ENABLED] - // to be paused. + // until it is re-enabled via + // [ResumeJob][google.cloud.scheduler.v1.CloudScheduler.ResumeJob]. The state + // of the job is stored in [state][google.cloud.scheduler.v1.Job.state]; if + // paused it will be set to + // [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED]. A job must + // be in [Job.State.ENABLED][google.cloud.scheduler.v1.Job.State.ENABLED] to + // be paused. rpc PauseJob(PauseJobRequest) returns (Job) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/jobs/*}:pause" @@ -104,10 +108,13 @@ service CloudScheduler { // Resume a job. // - // This method reenables a job after it has been [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED]. The - // state of a job is stored in [Job.state][google.cloud.scheduler.v1.Job.state]; after calling this method it - // will be set to [Job.State.ENABLED][google.cloud.scheduler.v1.Job.State.ENABLED]. A job must be in - // [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED] to be resumed. + // This method reenables a job after it has been + // [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED]. The state + // of a job is stored in [Job.state][google.cloud.scheduler.v1.Job.state]; + // after calling this method it will be set to + // [Job.State.ENABLED][google.cloud.scheduler.v1.Job.State.ENABLED]. A job + // must be in [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED] + // to be resumed. rpc ResumeJob(ResumeJobRequest) returns (Job) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/jobs/*}:resume" @@ -129,7 +136,8 @@ service CloudScheduler { } } -// Request message for listing jobs using [ListJobs][google.cloud.scheduler.v1.CloudScheduler.ListJobs]. +// Request message for listing jobs using +// [ListJobs][google.cloud.scheduler.v1.CloudScheduler.ListJobs]. message ListJobsRequest { // Required. The location name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID`. @@ -151,29 +159,35 @@ message ListJobsRequest { // A token identifying a page of results the server will return. To // request the first page results, page_token must be empty. To // request the next page of results, page_token must be the value of - // [next_page_token][google.cloud.scheduler.v1.ListJobsResponse.next_page_token] returned from - // the previous call to [ListJobs][google.cloud.scheduler.v1.CloudScheduler.ListJobs]. It is an error to - // switch the value of [filter][google.cloud.scheduler.v1.ListJobsRequest.filter] or - // [order_by][google.cloud.scheduler.v1.ListJobsRequest.order_by] while iterating through pages. + // [next_page_token][google.cloud.scheduler.v1.ListJobsResponse.next_page_token] + // returned from the previous call to + // [ListJobs][google.cloud.scheduler.v1.CloudScheduler.ListJobs]. It is an + // error to switch the value of + // [filter][google.cloud.scheduler.v1.ListJobsRequest.filter] or + // [order_by][google.cloud.scheduler.v1.ListJobsRequest.order_by] while + // iterating through pages. string page_token = 6; } -// Response message for listing jobs using [ListJobs][google.cloud.scheduler.v1.CloudScheduler.ListJobs]. +// Response message for listing jobs using +// [ListJobs][google.cloud.scheduler.v1.CloudScheduler.ListJobs]. message ListJobsResponse { // The list of jobs. repeated Job jobs = 1; // A token to retrieve next page of results. Pass this value in the - // [page_token][google.cloud.scheduler.v1.ListJobsRequest.page_token] field in the subsequent call to - // [ListJobs][google.cloud.scheduler.v1.CloudScheduler.ListJobs] to retrieve the next page of results. - // If this is empty it indicates that there are no more results - // through which to paginate. + // [page_token][google.cloud.scheduler.v1.ListJobsRequest.page_token] field in + // the subsequent call to + // [ListJobs][google.cloud.scheduler.v1.CloudScheduler.ListJobs] to retrieve + // the next page of results. If this is empty it indicates that there are no + // more results through which to paginate. // // The page token is valid for only 2 hours. string next_page_token = 2; } -// Request message for [GetJob][google.cloud.scheduler.v1.CloudScheduler.GetJob]. +// Request message for +// [GetJob][google.cloud.scheduler.v1.CloudScheduler.GetJob]. message GetJobRequest { // Required. The job name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. @@ -185,7 +199,8 @@ message GetJobRequest { ]; } -// Request message for [CreateJob][google.cloud.scheduler.v1.CloudScheduler.CreateJob]. +// Request message for +// [CreateJob][google.cloud.scheduler.v1.CloudScheduler.CreateJob]. message CreateJobRequest { // Required. The location name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID`. @@ -197,24 +212,26 @@ message CreateJobRequest { ]; // Required. The job to add. The user can optionally specify a name for the - // job in [name][google.cloud.scheduler.v1.Job.name]. [name][google.cloud.scheduler.v1.Job.name] cannot be the same as an + // job in [name][google.cloud.scheduler.v1.Job.name]. + // [name][google.cloud.scheduler.v1.Job.name] cannot be the same as an // existing job. If a name is not specified then the system will // generate a random unique name that will be returned // ([name][google.cloud.scheduler.v1.Job.name]) in the response. Job job = 2 [(google.api.field_behavior) = REQUIRED]; } -// Request message for [UpdateJob][google.cloud.scheduler.v1.CloudScheduler.UpdateJob]. +// Request message for +// [UpdateJob][google.cloud.scheduler.v1.CloudScheduler.UpdateJob]. message UpdateJobRequest { - // Required. The new job properties. [name][google.cloud.scheduler.v1.Job.name] must be specified. + // Required. The new job properties. + // [name][google.cloud.scheduler.v1.Job.name] must be specified. // // Output only fields cannot be modified using UpdateJob. // Any value specified for an output only field will be ignored. Job job = 1 [(google.api.field_behavior) = REQUIRED]; // A mask used to specify which fields of the job are being updated. - google.protobuf.FieldMask update_mask = 2 - [(google.api.field_behavior) = REQUIRED]; + google.protobuf.FieldMask update_mask = 2; } // Request message for deleting a job using @@ -230,7 +247,8 @@ message DeleteJobRequest { ]; } -// Request message for [PauseJob][google.cloud.scheduler.v1.CloudScheduler.PauseJob]. +// Request message for +// [PauseJob][google.cloud.scheduler.v1.CloudScheduler.PauseJob]. message PauseJobRequest { // Required. The job name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. @@ -242,7 +260,8 @@ message PauseJobRequest { ]; } -// Request message for [ResumeJob][google.cloud.scheduler.v1.CloudScheduler.ResumeJob]. +// Request message for +// [ResumeJob][google.cloud.scheduler.v1.CloudScheduler.ResumeJob]. message ResumeJobRequest { // Required. The job name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. diff --git a/packages/google-cloud-scheduler/protos/google/cloud/scheduler/v1/job.proto b/packages/google-cloud-scheduler/protos/google/cloud/scheduler/v1/job.proto index bda5a3b54a9..e12e589efe9 100644 --- a/packages/google-cloud-scheduler/protos/google/cloud/scheduler/v1/job.proto +++ b/packages/google-cloud-scheduler/protos/google/cloud/scheduler/v1/job.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -29,7 +28,7 @@ option java_outer_classname = "JobProto"; option java_package = "com.google.cloud.scheduler.v1"; // Configuration for a job. -// The maximum allowed size for a job is 100KB. +// The maximum allowed size for a job is 1MB. message Job { option (google.api.resource) = { type: "cloudscheduler.googleapis.com/Job" @@ -53,13 +52,16 @@ message Job { // cannot directly set a job to be disabled. DISABLED = 3; - // The job state resulting from a failed [CloudScheduler.UpdateJob][google.cloud.scheduler.v1.CloudScheduler.UpdateJob] + // The job state resulting from a failed + // [CloudScheduler.UpdateJob][google.cloud.scheduler.v1.CloudScheduler.UpdateJob] // operation. To recover a job from this state, retry - // [CloudScheduler.UpdateJob][google.cloud.scheduler.v1.CloudScheduler.UpdateJob] until a successful response is received. + // [CloudScheduler.UpdateJob][google.cloud.scheduler.v1.CloudScheduler.UpdateJob] + // until a successful response is received. UPDATE_FAILED = 4; } - // Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1.CloudScheduler.CreateJob], after + // Optionally caller-specified in + // [CreateJob][google.cloud.scheduler.v1.CloudScheduler.CreateJob], after // which it becomes output only. // // The job name. For example: @@ -78,7 +80,8 @@ message Job { // hyphens (-), or underscores (_). The maximum length is 500 characters. string name = 1; - // Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1.CloudScheduler.CreateJob] or + // Optionally caller-specified in + // [CreateJob][google.cloud.scheduler.v1.CloudScheduler.CreateJob] or // [UpdateJob][google.cloud.scheduler.v1.CloudScheduler.UpdateJob]. // // A human-readable description for the job. This string must not contain @@ -99,13 +102,14 @@ message Job { HttpTarget http_target = 6; } - // Required, except when used with [UpdateJob][google.cloud.scheduler.v1.CloudScheduler.UpdateJob]. + // Required, except when used with + // [UpdateJob][google.cloud.scheduler.v1.CloudScheduler.UpdateJob]. // // Describes the schedule on which the job will be executed. // // The schedule can be either of the following types: // - // * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview) + // * [Crontab](https://en.wikipedia.org/wiki/Cron#Overview) // * English-like // [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules) // @@ -118,15 +122,16 @@ message Job { // A scheduled start time will be delayed if the previous // execution has not ended when its scheduled time occurs. // - // If [retry_count][google.cloud.scheduler.v1.RetryConfig.retry_count] > 0 and a job attempt fails, - // the job will be tried a total of [retry_count][google.cloud.scheduler.v1.RetryConfig.retry_count] - // times, with exponential backoff, until the next scheduled start - // time. + // If [retry_count][google.cloud.scheduler.v1.RetryConfig.retry_count] > 0 and + // a job attempt fails, the job will be tried a total of + // [retry_count][google.cloud.scheduler.v1.RetryConfig.retry_count] times, + // with exponential backoff, until the next scheduled start time. string schedule = 20; // Specifies the time zone to be used in interpreting - // [schedule][google.cloud.scheduler.v1.Job.schedule]. The value of this field must be a time - // zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database). + // [schedule][google.cloud.scheduler.v1.Job.schedule]. The value of this field + // must be a time zone name from the [tz + // database](http://en.wikipedia.org/wiki/Tz_database). // // Note that some time zones include a provision for // daylight savings time. The rules for daylight saving time are @@ -161,10 +166,22 @@ message Job { // execution logs. Cloud Scheduler will retry the job according // to the [RetryConfig][google.cloud.scheduler.v1.RetryConfig]. // - // The allowed duration for this deadline is: - // * For [HTTP targets][google.cloud.scheduler.v1.Job.http_target], between 15 seconds and 30 minutes. - // * For [App Engine HTTP targets][google.cloud.scheduler.v1.Job.app_engine_http_target], between 15 - // seconds and 24 hours. + // The default and the allowed values depend on the type of target: + // + // * For [HTTP targets][google.cloud.scheduler.v1.Job.http_target], the + // default is 3 minutes. The deadline must be in the interval [15 seconds, 30 + // minutes]. + // + // * For [App Engine HTTP + // targets][google.cloud.scheduler.v1.Job.app_engine_http_target], 0 indicates + // that the request has the default deadline. The default deadline depends on + // the scaling type of the service: 10 minutes for standard apps with + // automatic scaling, 24 hours for standard apps with manual and basic + // scaling, and 60 minutes for flex apps. If the request deadline is set, it + // must be in the interval [15 seconds, 24 hours 15 seconds]. + // + // * For [Pub/Sub targets][google.cloud.scheduler.v1.Job.pubsub_target], this + // field is ignored. google.protobuf.Duration attempt_deadline = 22; } @@ -172,7 +189,8 @@ message Job { // // By default, if a job does not complete successfully (meaning that // an acknowledgement is not received from the handler, then it will be retried -// with exponential backoff according to the settings in [RetryConfig][google.cloud.scheduler.v1.RetryConfig]. +// with exponential backoff according to the settings in +// [RetryConfig][google.cloud.scheduler.v1.RetryConfig]. message RetryConfig { // The number of attempts that the system will make to run a job using the // exponential backoff procedure described by @@ -194,8 +212,8 @@ message RetryConfig { // The time limit for retrying a failed job, measured from time when an // execution was first attempted. If specified with - // [retry_count][google.cloud.scheduler.v1.RetryConfig.retry_count], the job will be retried until both - // limits are reached. + // [retry_count][google.cloud.scheduler.v1.RetryConfig.retry_count], the job + // will be retried until both limits are reached. // // The default value for max_retry_duration is zero, which means retry // duration is unlimited. @@ -216,20 +234,25 @@ message RetryConfig { // The time between retries will double `max_doublings` times. // // A job's retry interval starts at - // [min_backoff_duration][google.cloud.scheduler.v1.RetryConfig.min_backoff_duration], then doubles - // `max_doublings` times, then increases linearly, and finally - // retries retries at intervals of - // [max_backoff_duration][google.cloud.scheduler.v1.RetryConfig.max_backoff_duration] up to - // [retry_count][google.cloud.scheduler.v1.RetryConfig.retry_count] times. + // [min_backoff_duration][google.cloud.scheduler.v1.RetryConfig.min_backoff_duration], + // then doubles `max_doublings` times, then increases linearly, and finally + // retries at intervals of + // [max_backoff_duration][google.cloud.scheduler.v1.RetryConfig.max_backoff_duration] + // up to [retry_count][google.cloud.scheduler.v1.RetryConfig.retry_count] + // times. // - // For example, if [min_backoff_duration][google.cloud.scheduler.v1.RetryConfig.min_backoff_duration] is - // 10s, [max_backoff_duration][google.cloud.scheduler.v1.RetryConfig.max_backoff_duration] is 300s, and - // `max_doublings` is 3, then the a job will first be retried in 10s. The - // retry interval will double three times, and then increase linearly by - // 2^3 * 10s. Finally, the job will retry at intervals of - // [max_backoff_duration][google.cloud.scheduler.v1.RetryConfig.max_backoff_duration] until the job has - // been attempted [retry_count][google.cloud.scheduler.v1.RetryConfig.retry_count] times. Thus, the - // requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, .... + // For example, if + // [min_backoff_duration][google.cloud.scheduler.v1.RetryConfig.min_backoff_duration] + // is 10s, + // [max_backoff_duration][google.cloud.scheduler.v1.RetryConfig.max_backoff_duration] + // is 300s, and `max_doublings` is 3, then the a job will first be retried in + // 10s. The retry interval will double three times, and then increase linearly + // by 2^3 * 10s. Finally, the job will retry at intervals of + // [max_backoff_duration][google.cloud.scheduler.v1.RetryConfig.max_backoff_duration] + // until the job has been attempted + // [retry_count][google.cloud.scheduler.v1.RetryConfig.retry_count] times. + // Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, + // 300s, .... // // The default value of this field is 5. int32 max_doublings = 5; diff --git a/packages/google-cloud-scheduler/protos/google/cloud/scheduler/v1/target.proto b/packages/google-cloud-scheduler/protos/google/cloud/scheduler/v1/target.proto index e2928a34a8e..12a797b06bc 100644 --- a/packages/google-cloud-scheduler/protos/google/cloud/scheduler/v1/target.proto +++ b/packages/google-cloud-scheduler/protos/google/cloud/scheduler/v1/target.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -23,9 +22,14 @@ option go_package = "cloud.google.com/go/scheduler/apiv1/schedulerpb;schedulerpb option java_multiple_files = true; option java_outer_classname = "TargetProto"; option java_package = "com.google.cloud.scheduler.v1"; +option (google.api.resource_definition) = { + type: "pubsub.googleapis.com/Topic" + pattern: "projects/{project}/topics/{topic}" +}; // Http target. The job will be pushed to the job handler by means of -// an HTTP request via an [http_method][google.cloud.scheduler.v1.HttpTarget.http_method] such as HTTP +// an HTTP request via an +// [http_method][google.cloud.scheduler.v1.HttpTarget.http_method] such as HTTP // POST, HTTP GET, etc. The job is acknowledged by means of an HTTP // response code in the range [200 - 299]. A failure to receive a response // constitutes a failed execution. For a redirected request, the response @@ -55,6 +59,11 @@ message HttpTarget { // * `User-Agent`: This will be set to `"Google-Cloud-Scheduler"`. // * `X-Google-*`: Google internal use only. // * `X-AppEngine-*`: Google internal use only. + // * `X-CloudScheduler`: This header will be set to true. + // * `X-CloudScheduler-JobName`: This header will contain the job name. + // * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + // the unix-cron format, this header will contain the job schedule time in + // RFC3339 UTC "Zulu" format. // // The total size of headers must be less than 80KB. map headers = 3; @@ -66,8 +75,9 @@ message HttpTarget { // The mode for generating an `Authorization` header for HTTP requests. // - // If specified, all `Authorization` headers in the [HttpTarget.headers][google.cloud.scheduler.v1.HttpTarget.headers] - // field will be overridden. + // If specified, all `Authorization` headers in the + // [HttpTarget.headers][google.cloud.scheduler.v1.HttpTarget.headers] field + // will be overridden. oneof authorization_header { // If specified, an // [OAuth token](https://developers.google.com/identity/protocols/OAuth2) @@ -91,7 +101,8 @@ message HttpTarget { } // App Engine target. The job will be pushed to a job handler by means -// of an HTTP request via an [http_method][google.cloud.scheduler.v1.AppEngineHttpTarget.http_method] such +// of an HTTP request via an +// [http_method][google.cloud.scheduler.v1.AppEngineHttpTarget.http_method] such // as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an // HTTP response code in the range [200 - 299]. Error 503 is // considered an App Engine system error instead of an application @@ -128,9 +139,14 @@ message AppEngineHttpTarget { // `"AppEngine-Google; (+http://code.google.com/appengine)"` to the // modified `User-Agent`. // * `X-CloudScheduler`: This header will be set to true. + // * `X-CloudScheduler-JobName`: This header will contain the job name. + // * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in + // the unix-cron format, this header will contain the job schedule time in + // RFC3339 UTC "Zulu" format. // - // If the job has an [body][google.cloud.scheduler.v1.AppEngineHttpTarget.body], Cloud Scheduler sets - // the following headers: + // If the job has an + // [body][google.cloud.scheduler.v1.AppEngineHttpTarget.body], Cloud Scheduler + // sets the following headers: // // * `Content-Type`: By default, the `Content-Type` header is set to // `"application/octet-stream"`. The default can be overridden by explictly @@ -153,7 +169,8 @@ message AppEngineHttpTarget { // // HTTP request body. A request body is allowed only if the HTTP method is // POST or PUT. It will result in invalid argument error to set a body on a - // job with an incompatible [HttpMethod][google.cloud.scheduler.v1.HttpMethod]. + // job with an incompatible + // [HttpMethod][google.cloud.scheduler.v1.HttpMethod]. bytes body = 5; } @@ -162,14 +179,14 @@ message AppEngineHttpTarget { message PubsubTarget { // Required. The name of the Cloud Pub/Sub topic to which messages will // be published when a job is delivered. The topic name must be in the - // same format as required by PubSub's + // same format as required by Pub/Sub's // [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest), // for example `projects/PROJECT_ID/topics/TOPIC_ID`. // // The topic must be in the same project as the Cloud Scheduler job. - string topic_name = 1 [(google.api.resource_reference) = { - type: "pubsub.googleapis.com/Topic" - }]; + string topic_name = 1 [ + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } + ]; // The message payload for PubsubMessage. // @@ -215,7 +232,7 @@ message AppEngineRouting { // // Requests can only be sent to a specific instance if // [manual scaling is used in App Engine - // Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + // Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?#scaling_types_and_instance_classes). // App Engine Flex does not support instances. For more information, see // [App Engine Standard request // routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) @@ -252,7 +269,8 @@ message AppEngineRouting { // [version][google.cloud.scheduler.v1.AppEngineRouting.version] `+ '.' +` // [service][google.cloud.scheduler.v1.AppEngineRouting.service] // - // * `instance =` [instance][google.cloud.scheduler.v1.AppEngineRouting.instance] + // * `instance =` + // [instance][google.cloud.scheduler.v1.AppEngineRouting.instance] // // * `instance_dot_service =` // [instance][google.cloud.scheduler.v1.AppEngineRouting.instance] `+ '.' +` @@ -268,19 +286,23 @@ message AppEngineRouting { // [service][google.cloud.scheduler.v1.AppEngineRouting.service] // // - // If [service][google.cloud.scheduler.v1.AppEngineRouting.service] is empty, then the job will be sent - // to the service which is the default service when the job is attempted. + // If [service][google.cloud.scheduler.v1.AppEngineRouting.service] is empty, + // then the job will be sent to the service which is the default service when + // the job is attempted. // - // If [version][google.cloud.scheduler.v1.AppEngineRouting.version] is empty, then the job will be sent - // to the version which is the default version when the job is attempted. + // If [version][google.cloud.scheduler.v1.AppEngineRouting.version] is empty, + // then the job will be sent to the version which is the default version when + // the job is attempted. // - // If [instance][google.cloud.scheduler.v1.AppEngineRouting.instance] is empty, then the job will be - // sent to an instance which is available when the job is attempted. + // If [instance][google.cloud.scheduler.v1.AppEngineRouting.instance] is + // empty, then the job will be sent to an instance which is available when the + // job is attempted. // // If [service][google.cloud.scheduler.v1.AppEngineRouting.service], // [version][google.cloud.scheduler.v1.AppEngineRouting.version], or - // [instance][google.cloud.scheduler.v1.AppEngineRouting.instance] is invalid, then the job will be sent - // to the default version of the default service when the job is attempted. + // [instance][google.cloud.scheduler.v1.AppEngineRouting.instance] is invalid, + // then the job will be sent to the default version of the default service + // when the job is attempted. string host = 4; } @@ -345,11 +367,3 @@ message OidcToken { // specified in target will be used. string audience = 2; } - -// The Pub/Sub Topic resource definition is in google/cloud/pubsub/v1/, -// but we do not import that proto directly; therefore, we redefine the -// pattern here. -option (google.api.resource_definition) = { - type: "pubsub.googleapis.com/Topic" - pattern: "projects/{project}/topics/{topic}" -}; diff --git a/packages/google-cloud-scheduler/protos/protos.json b/packages/google-cloud-scheduler/protos/protos.json index eb2e84a55e7..20627880595 100644 --- a/packages/google-cloud-scheduler/protos/protos.json +++ b/packages/google-cloud-scheduler/protos/protos.json @@ -254,10 +254,7 @@ }, "updateMask": { "type": "google.protobuf.FieldMask", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "id": 2 } } }, diff --git a/packages/google-cloud-scheduler/samples/generated/v1/cloud_scheduler.create_job.js b/packages/google-cloud-scheduler/samples/generated/v1/cloud_scheduler.create_job.js index 398187e8458..988e2d72be2 100644 --- a/packages/google-cloud-scheduler/samples/generated/v1/cloud_scheduler.create_job.js +++ b/packages/google-cloud-scheduler/samples/generated/v1/cloud_scheduler.create_job.js @@ -35,7 +35,8 @@ function main(parent, job) { // const parent = 'abc123' /** * Required. The job to add. The user can optionally specify a name for the - * job in name google.cloud.scheduler.v1.Job.name. name google.cloud.scheduler.v1.Job.name cannot be the same as an + * job in name google.cloud.scheduler.v1.Job.name. + * name google.cloud.scheduler.v1.Job.name cannot be the same as an * existing job. If a name is not specified then the system will * generate a random unique name that will be returned * (name google.cloud.scheduler.v1.Job.name) in the response. diff --git a/packages/google-cloud-scheduler/samples/generated/v1/cloud_scheduler.list_jobs.js b/packages/google-cloud-scheduler/samples/generated/v1/cloud_scheduler.list_jobs.js index 0cd0d462b18..bca6c481609 100644 --- a/packages/google-cloud-scheduler/samples/generated/v1/cloud_scheduler.list_jobs.js +++ b/packages/google-cloud-scheduler/samples/generated/v1/cloud_scheduler.list_jobs.js @@ -45,10 +45,13 @@ function main(parent) { * A token identifying a page of results the server will return. To * request the first page results, page_token must be empty. To * request the next page of results, page_token must be the value of - * next_page_token google.cloud.scheduler.v1.ListJobsResponse.next_page_token returned from - * the previous call to ListJobs google.cloud.scheduler.v1.CloudScheduler.ListJobs. It is an error to - * switch the value of filter google.cloud.scheduler.v1.ListJobsRequest.filter or - * order_by google.cloud.scheduler.v1.ListJobsRequest.order_by while iterating through pages. + * next_page_token google.cloud.scheduler.v1.ListJobsResponse.next_page_token + * returned from the previous call to + * ListJobs google.cloud.scheduler.v1.CloudScheduler.ListJobs. It is an + * error to switch the value of + * filter google.cloud.scheduler.v1.ListJobsRequest.filter or + * order_by google.cloud.scheduler.v1.ListJobsRequest.order_by while + * iterating through pages. */ // const pageToken = 'abc123' diff --git a/packages/google-cloud-scheduler/samples/generated/v1/cloud_scheduler.update_job.js b/packages/google-cloud-scheduler/samples/generated/v1/cloud_scheduler.update_job.js index 0828d1d5958..fc859a2c552 100644 --- a/packages/google-cloud-scheduler/samples/generated/v1/cloud_scheduler.update_job.js +++ b/packages/google-cloud-scheduler/samples/generated/v1/cloud_scheduler.update_job.js @@ -20,7 +20,7 @@ 'use strict'; -function main(job, updateMask) { +function main(job) { // [START cloudscheduler_v1_generated_CloudScheduler_UpdateJob_async] /** * This snippet has been automatically generated and should be regarded as a code template only. @@ -29,7 +29,8 @@ function main(job, updateMask) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The new job properties. name google.cloud.scheduler.v1.Job.name must be specified. + * Required. The new job properties. + * name google.cloud.scheduler.v1.Job.name must be specified. * Output only fields cannot be modified using UpdateJob. * Any value specified for an output only field will be ignored. */ @@ -49,7 +50,6 @@ function main(job, updateMask) { // Construct request const request = { job, - updateMask, }; // Run request diff --git a/packages/google-cloud-scheduler/samples/generated/v1/snippet_metadata.google.cloud.scheduler.v1.json b/packages/google-cloud-scheduler/samples/generated/v1/snippet_metadata.google.cloud.scheduler.v1.json index 07840294ca9..4d8d784cc21 100644 --- a/packages/google-cloud-scheduler/samples/generated/v1/snippet_metadata.google.cloud.scheduler.v1.json +++ b/packages/google-cloud-scheduler/samples/generated/v1/snippet_metadata.google.cloud.scheduler.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-scheduler", - "version": "3.2.0", + "version": "3.2.1", "language": "TYPESCRIPT", "apis": [ { @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 74, + "end": 77, "type": "FULL" } ], @@ -110,7 +110,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 64, "type": "FULL" } ], diff --git a/packages/google-cloud-scheduler/samples/generated/v1beta1/snippet_metadata.google.cloud.scheduler.v1beta1.json b/packages/google-cloud-scheduler/samples/generated/v1beta1/snippet_metadata.google.cloud.scheduler.v1beta1.json index 8c513e71738..af61c201bc4 100644 --- a/packages/google-cloud-scheduler/samples/generated/v1beta1/snippet_metadata.google.cloud.scheduler.v1beta1.json +++ b/packages/google-cloud-scheduler/samples/generated/v1beta1/snippet_metadata.google.cloud.scheduler.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-scheduler", - "version": "3.2.0", + "version": "3.2.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-scheduler/src/v1/cloud_scheduler_client.ts b/packages/google-cloud-scheduler/src/v1/cloud_scheduler_client.ts index e31e5f6dbb7..0ca8155535d 100644 --- a/packages/google-cloud-scheduler/src/v1/cloud_scheduler_client.ts +++ b/packages/google-cloud-scheduler/src/v1/cloud_scheduler_client.ts @@ -25,6 +25,8 @@ import type { ClientOptions, PaginationCallback, GaxCall, + LocationsClient, + LocationProtos, } from 'google-gax'; import {Transform} from 'stream'; import * as protos from '../../protos/protos'; @@ -60,6 +62,7 @@ export class CloudSchedulerClient { }; warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; + locationsClient: LocationsClient; pathTemplates: {[name: string]: gax.PathTemplate}; cloudSchedulerStub?: Promise<{[name: string]: Function}>; @@ -156,6 +159,10 @@ export class CloudSchedulerClient { if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; @@ -436,7 +443,8 @@ export class CloudSchedulerClient { * `projects/PROJECT_ID/locations/LOCATION_ID`. * @param {google.cloud.scheduler.v1.Job} request.job * Required. The job to add. The user can optionally specify a name for the - * job in {@link google.cloud.scheduler.v1.Job.name|name}. {@link google.cloud.scheduler.v1.Job.name|name} cannot be the same as an + * job in {@link google.cloud.scheduler.v1.Job.name|name}. + * {@link google.cloud.scheduler.v1.Job.name|name} cannot be the same as an * existing job. If a name is not specified then the system will * generate a random unique name that will be returned * ({@link google.cloud.scheduler.v1.Job.name|name}) in the response. @@ -519,18 +527,20 @@ export class CloudSchedulerClient { /** * Updates a job. * - * If successful, the updated {@link google.cloud.scheduler.v1.Job|Job} is returned. If the job does - * not exist, `NOT_FOUND` is returned. + * If successful, the updated {@link google.cloud.scheduler.v1.Job|Job} is + * returned. If the job does not exist, `NOT_FOUND` is returned. * * If UpdateJob does not successfully return, it is possible for the - * job to be in an {@link google.cloud.scheduler.v1.Job.State.UPDATE_FAILED|Job.State.UPDATE_FAILED} state. A job in this state may - * not be executed. If this happens, retry the UpdateJob request - * until a successful response is received. + * job to be in an + * {@link google.cloud.scheduler.v1.Job.State.UPDATE_FAILED|Job.State.UPDATE_FAILED} + * state. A job in this state may not be executed. If this happens, retry the + * UpdateJob request until a successful response is received. * * @param {Object} request * The request object that will be sent. * @param {google.cloud.scheduler.v1.Job} request.job - * Required. The new job properties. {@link google.cloud.scheduler.v1.Job.name|name} must be specified. + * Required. The new job properties. + * {@link google.cloud.scheduler.v1.Job.name|name} must be specified. * * Output only fields cannot be modified using UpdateJob. * Any value specified for an output only field will be ignored. @@ -700,10 +710,13 @@ export class CloudSchedulerClient { * Pauses a job. * * If a job is paused then the system will stop executing the job - * until it is re-enabled via {@link google.cloud.scheduler.v1.CloudScheduler.ResumeJob|ResumeJob}. The - * state of the job is stored in {@link google.cloud.scheduler.v1.Job.state|state}; if paused it - * will be set to {@link google.cloud.scheduler.v1.Job.State.PAUSED|Job.State.PAUSED}. A job must be in {@link google.cloud.scheduler.v1.Job.State.ENABLED|Job.State.ENABLED} - * to be paused. + * until it is re-enabled via + * {@link google.cloud.scheduler.v1.CloudScheduler.ResumeJob|ResumeJob}. The state + * of the job is stored in {@link google.cloud.scheduler.v1.Job.state|state}; if + * paused it will be set to + * {@link google.cloud.scheduler.v1.Job.State.PAUSED|Job.State.PAUSED}. A job must + * be in {@link google.cloud.scheduler.v1.Job.State.ENABLED|Job.State.ENABLED} to + * be paused. * * @param {Object} request * The request object that will be sent. @@ -789,10 +802,13 @@ export class CloudSchedulerClient { /** * Resume a job. * - * This method reenables a job after it has been {@link google.cloud.scheduler.v1.Job.State.PAUSED|Job.State.PAUSED}. The - * state of a job is stored in {@link google.cloud.scheduler.v1.Job.state|Job.state}; after calling this method it - * will be set to {@link google.cloud.scheduler.v1.Job.State.ENABLED|Job.State.ENABLED}. A job must be in - * {@link google.cloud.scheduler.v1.Job.State.PAUSED|Job.State.PAUSED} to be resumed. + * This method reenables a job after it has been + * {@link google.cloud.scheduler.v1.Job.State.PAUSED|Job.State.PAUSED}. The state + * of a job is stored in {@link google.cloud.scheduler.v1.Job.state|Job.state}; + * after calling this method it will be set to + * {@link google.cloud.scheduler.v1.Job.State.ENABLED|Job.State.ENABLED}. A job + * must be in {@link google.cloud.scheduler.v1.Job.State.PAUSED|Job.State.PAUSED} + * to be resumed. * * @param {Object} request * The request object that will be sent. @@ -982,10 +998,13 @@ export class CloudSchedulerClient { * A token identifying a page of results the server will return. To * request the first page results, page_token must be empty. To * request the next page of results, page_token must be the value of - * {@link google.cloud.scheduler.v1.ListJobsResponse.next_page_token|next_page_token} returned from - * the previous call to {@link google.cloud.scheduler.v1.CloudScheduler.ListJobs|ListJobs}. It is an error to - * switch the value of {@link google.cloud.scheduler.v1.ListJobsRequest.filter|filter} or - * {@link google.cloud.scheduler.v1.ListJobsRequest.order_by|order_by} while iterating through pages. + * {@link google.cloud.scheduler.v1.ListJobsResponse.next_page_token|next_page_token} + * returned from the previous call to + * {@link google.cloud.scheduler.v1.CloudScheduler.ListJobs|ListJobs}. It is an + * error to switch the value of + * {@link google.cloud.scheduler.v1.ListJobsRequest.filter|filter} or + * {@link google.cloud.scheduler.v1.ListJobsRequest.order_by|order_by} while + * iterating through pages. * @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. @@ -1084,10 +1103,13 @@ export class CloudSchedulerClient { * A token identifying a page of results the server will return. To * request the first page results, page_token must be empty. To * request the next page of results, page_token must be the value of - * {@link google.cloud.scheduler.v1.ListJobsResponse.next_page_token|next_page_token} returned from - * the previous call to {@link google.cloud.scheduler.v1.CloudScheduler.ListJobs|ListJobs}. It is an error to - * switch the value of {@link google.cloud.scheduler.v1.ListJobsRequest.filter|filter} or - * {@link google.cloud.scheduler.v1.ListJobsRequest.order_by|order_by} while iterating through pages. + * {@link google.cloud.scheduler.v1.ListJobsResponse.next_page_token|next_page_token} + * returned from the previous call to + * {@link google.cloud.scheduler.v1.CloudScheduler.ListJobs|ListJobs}. It is an + * error to switch the value of + * {@link google.cloud.scheduler.v1.ListJobsRequest.filter|filter} or + * {@link google.cloud.scheduler.v1.ListJobsRequest.order_by|order_by} while + * iterating through pages. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -1142,10 +1164,13 @@ export class CloudSchedulerClient { * A token identifying a page of results the server will return. To * request the first page results, page_token must be empty. To * request the next page of results, page_token must be the value of - * {@link google.cloud.scheduler.v1.ListJobsResponse.next_page_token|next_page_token} returned from - * the previous call to {@link google.cloud.scheduler.v1.CloudScheduler.ListJobs|ListJobs}. It is an error to - * switch the value of {@link google.cloud.scheduler.v1.ListJobsRequest.filter|filter} or - * {@link google.cloud.scheduler.v1.ListJobsRequest.order_by|order_by} while iterating through pages. + * {@link google.cloud.scheduler.v1.ListJobsResponse.next_page_token|next_page_token} + * returned from the previous call to + * {@link google.cloud.scheduler.v1.CloudScheduler.ListJobs|ListJobs}. It is an + * error to switch the value of + * {@link google.cloud.scheduler.v1.ListJobsRequest.filter|filter} or + * {@link google.cloud.scheduler.v1.ListJobsRequest.order_by|order_by} while + * iterating through pages. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -1180,6 +1205,86 @@ export class CloudSchedulerClient { 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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * 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 -- // -------------------- @@ -1303,6 +1408,7 @@ export class CloudSchedulerClient { return this.cloudSchedulerStub.then(stub => { this._terminated = true; stub.close(); + this.locationsClient.close(); }); } return Promise.resolve(); diff --git a/packages/google-cloud-scheduler/test/gapic_cloud_scheduler_v1.ts b/packages/google-cloud-scheduler/test/gapic_cloud_scheduler_v1.ts index fc22bc60bcc..5379c3d41ac 100644 --- a/packages/google-cloud-scheduler/test/gapic_cloud_scheduler_v1.ts +++ b/packages/google-cloud-scheduler/test/gapic_cloud_scheduler_v1.ts @@ -25,7 +25,7 @@ import * as cloudschedulerModule from '../src'; import {PassThrough} from 'stream'; -import {protobuf} from 'google-gax'; +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 @@ -1413,6 +1413,204 @@ describe('v1.CloudSchedulerClient', () => { ); }); }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new cloudschedulerModule.v1.CloudSchedulerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = new cloudschedulerModule.v1.CloudSchedulerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new cloudschedulerModule.v1.CloudSchedulerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new cloudschedulerModule.v1.CloudSchedulerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new cloudschedulerModule.v1.CloudSchedulerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); describe('Path templates', () => { describe('job', () => { From 146700d2fa0d5ee8fc7a262700e0819b50ede21c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 6 Mar 2023 14:35:44 -0500 Subject: [PATCH 77/80] feat: [grafeas] Import of Grafeas from Github (#4049) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Import of Grafeas from Github PiperOrigin-RevId: 513603965 Source-Link: https://github.com/googleapis/googleapis/commit/7044962d31b872f7424bf3b320add0c4a3b186e8 Source-Link: https://github.com/googleapis/googleapis-gen/commit/0ca25aa1245ce4057f3fbd88653e58970731f571 Copy-Tag: eyJwIjoicGFja2FnZXMvZ3JhZmVhcy8uT3dsQm90LnlhbWwiLCJoIjoiMGNhMjVhYTEyNDVjZTQwNTdmM2ZiZDg4NjUzZTU4OTcwNzMxZjU3MSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: Denis DelGrosso <85250797+ddelgrosso1@users.noreply.github.com> --- .../protos/grafeas/v1/vulnerability.proto | 10 +++- packages/grafeas/protos/protos.d.ts | 12 ++++ packages/grafeas/protos/protos.js | 56 +++++++++++++++++++ packages/grafeas/protos/protos.json | 8 +++ .../v1/snippet_metadata.grafeas.v1.json | 2 +- 5 files changed, 85 insertions(+), 3 deletions(-) diff --git a/packages/grafeas/protos/grafeas/v1/vulnerability.proto b/packages/grafeas/protos/grafeas/v1/vulnerability.proto index cea4558b144..99abf3be7a2 100644 --- a/packages/grafeas/protos/grafeas/v1/vulnerability.proto +++ b/packages/grafeas/protos/grafeas/v1/vulnerability.proto @@ -152,7 +152,10 @@ message VulnerabilityNote { // CVSS version used to populate cvss_score and severity. grafeas.v1.CVSSVersion cvss_version = 7; - // Next free ID is 8. + // The full description of the v2 CVSS for this vulnerability. + CVSS cvss_v2 = 8; + + // Next free ID is 9. } // An occurrence of a severity vulnerability on a resource. @@ -247,5 +250,8 @@ message VulnerabilityOccurrence { // Output only. CVSS version used to populate cvss_score and severity. grafeas.v1.CVSSVersion cvss_version = 11; - // Next free ID is 12. + // The cvss v2 score for the vulnerability. + CVSS cvss_v2 = 12; + + // Next free ID is 13. } diff --git a/packages/grafeas/protos/protos.d.ts b/packages/grafeas/protos/protos.d.ts index 1e5ba86ccb5..b8d9ebc30a3 100644 --- a/packages/grafeas/protos/protos.d.ts +++ b/packages/grafeas/protos/protos.d.ts @@ -11520,6 +11520,9 @@ export namespace grafeas { /** VulnerabilityNote cvssVersion */ cvssVersion?: (grafeas.v1.CVSSVersion|keyof typeof grafeas.v1.CVSSVersion|null); + + /** VulnerabilityNote cvssV2 */ + cvssV2?: (grafeas.v1.ICVSS|null); } /** Represents a VulnerabilityNote. */ @@ -11552,6 +11555,9 @@ export namespace grafeas { /** VulnerabilityNote cvssVersion. */ public cvssVersion: (grafeas.v1.CVSSVersion|keyof typeof grafeas.v1.CVSSVersion); + /** VulnerabilityNote cvssV2. */ + public cvssV2?: (grafeas.v1.ICVSS|null); + /** * Creates a new VulnerabilityNote instance using the specified properties. * @param [properties] Properties to set @@ -12064,6 +12070,9 @@ export namespace grafeas { /** VulnerabilityOccurrence cvssVersion */ cvssVersion?: (grafeas.v1.CVSSVersion|keyof typeof grafeas.v1.CVSSVersion|null); + + /** VulnerabilityOccurrence cvssV2 */ + cvssV2?: (grafeas.v1.ICVSS|null); } /** Represents a VulnerabilityOccurrence. */ @@ -12108,6 +12117,9 @@ export namespace grafeas { /** VulnerabilityOccurrence cvssVersion. */ public cvssVersion: (grafeas.v1.CVSSVersion|keyof typeof grafeas.v1.CVSSVersion); + /** VulnerabilityOccurrence cvssV2. */ + public cvssV2?: (grafeas.v1.ICVSS|null); + /** * Creates a new VulnerabilityOccurrence instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/grafeas/protos/protos.js b/packages/grafeas/protos/protos.js index 8cd563c4a74..3187c027df9 100644 --- a/packages/grafeas/protos/protos.js +++ b/packages/grafeas/protos/protos.js @@ -29478,6 +29478,7 @@ * @property {Array.|null} [windowsDetails] VulnerabilityNote windowsDetails * @property {google.protobuf.ITimestamp|null} [sourceUpdateTime] VulnerabilityNote sourceUpdateTime * @property {grafeas.v1.CVSSVersion|null} [cvssVersion] VulnerabilityNote cvssVersion + * @property {grafeas.v1.ICVSS|null} [cvssV2] VulnerabilityNote cvssV2 */ /** @@ -29553,6 +29554,14 @@ */ VulnerabilityNote.prototype.cvssVersion = 0; + /** + * VulnerabilityNote cvssV2. + * @member {grafeas.v1.ICVSS|null|undefined} cvssV2 + * @memberof grafeas.v1.VulnerabilityNote + * @instance + */ + VulnerabilityNote.prototype.cvssV2 = null; + /** * Creates a new VulnerabilityNote instance using the specified properties. * @function create @@ -29593,6 +29602,8 @@ $root.google.protobuf.Timestamp.encode(message.sourceUpdateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.cvssVersion != null && Object.hasOwnProperty.call(message, "cvssVersion")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.cvssVersion); + if (message.cvssV2 != null && Object.hasOwnProperty.call(message, "cvssV2")) + $root.grafeas.v1.CVSS.encode(message.cvssV2, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; @@ -29659,6 +29670,10 @@ message.cvssVersion = reader.int32(); break; } + case 8: { + message.cvssV2 = $root.grafeas.v1.CVSS.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -29746,6 +29761,11 @@ case 2: break; } + if (message.cvssV2 != null && message.hasOwnProperty("cvssV2")) { + var error = $root.grafeas.v1.CVSS.verify(message.cvssV2); + if (error) + return "cvssV2." + error; + } return null; }; @@ -29845,6 +29865,11 @@ message.cvssVersion = 2; break; } + if (object.cvssV2 != null) { + if (typeof object.cvssV2 !== "object") + throw TypeError(".grafeas.v1.VulnerabilityNote.cvssV2: object expected"); + message.cvssV2 = $root.grafeas.v1.CVSS.fromObject(object.cvssV2); + } return message; }; @@ -29871,6 +29896,7 @@ object.cvssV3 = null; object.sourceUpdateTime = null; object.cvssVersion = options.enums === String ? "CVSS_VERSION_UNSPECIFIED" : 0; + object.cvssV2 = null; } if (message.cvssScore != null && message.hasOwnProperty("cvssScore")) object.cvssScore = options.json && !isFinite(message.cvssScore) ? String(message.cvssScore) : message.cvssScore; @@ -29892,6 +29918,8 @@ object.sourceUpdateTime = $root.google.protobuf.Timestamp.toObject(message.sourceUpdateTime, options); if (message.cvssVersion != null && message.hasOwnProperty("cvssVersion")) object.cvssVersion = options.enums === String ? $root.grafeas.v1.CVSSVersion[message.cvssVersion] === undefined ? message.cvssVersion : $root.grafeas.v1.CVSSVersion[message.cvssVersion] : message.cvssVersion; + if (message.cvssV2 != null && message.hasOwnProperty("cvssV2")) + object.cvssV2 = $root.grafeas.v1.CVSS.toObject(message.cvssV2, options); return object; }; @@ -30986,6 +31014,7 @@ * @property {grafeas.v1.Severity|null} [effectiveSeverity] VulnerabilityOccurrence effectiveSeverity * @property {boolean|null} [fixAvailable] VulnerabilityOccurrence fixAvailable * @property {grafeas.v1.CVSSVersion|null} [cvssVersion] VulnerabilityOccurrence cvssVersion + * @property {grafeas.v1.ICVSS|null} [cvssV2] VulnerabilityOccurrence cvssV2 */ /** @@ -31093,6 +31122,14 @@ */ VulnerabilityOccurrence.prototype.cvssVersion = 0; + /** + * VulnerabilityOccurrence cvssV2. + * @member {grafeas.v1.ICVSS|null|undefined} cvssV2 + * @memberof grafeas.v1.VulnerabilityOccurrence + * @instance + */ + VulnerabilityOccurrence.prototype.cvssV2 = null; + /** * Creates a new VulnerabilityOccurrence instance using the specified properties. * @function create @@ -31141,6 +31178,8 @@ $root.grafeas.v1.CVSS.encode(message.cvssv3, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); if (message.cvssVersion != null && Object.hasOwnProperty.call(message, "cvssVersion")) writer.uint32(/* id 11, wireType 0 =*/88).int32(message.cvssVersion); + if (message.cvssV2 != null && Object.hasOwnProperty.call(message, "cvssV2")) + $root.grafeas.v1.CVSS.encode(message.cvssV2, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); return writer; }; @@ -31223,6 +31262,10 @@ message.cvssVersion = reader.int32(); break; } + case 12: { + message.cvssV2 = $root.grafeas.v1.CVSS.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -31329,6 +31372,11 @@ case 2: break; } + if (message.cvssV2 != null && message.hasOwnProperty("cvssV2")) { + var error = $root.grafeas.v1.CVSS.verify(message.cvssV2); + if (error) + return "cvssV2." + error; + } return null; }; @@ -31463,6 +31511,11 @@ message.cvssVersion = 2; break; } + if (object.cvssV2 != null) { + if (typeof object.cvssV2 !== "object") + throw TypeError(".grafeas.v1.VulnerabilityOccurrence.cvssV2: object expected"); + message.cvssV2 = $root.grafeas.v1.CVSS.fromObject(object.cvssV2); + } return message; }; @@ -31493,6 +31546,7 @@ object.fixAvailable = false; object.cvssv3 = null; object.cvssVersion = options.enums === String ? "CVSS_VERSION_UNSPECIFIED" : 0; + object.cvssV2 = null; } if (message.type != null && message.hasOwnProperty("type")) object.type = message.type; @@ -31522,6 +31576,8 @@ object.cvssv3 = $root.grafeas.v1.CVSS.toObject(message.cvssv3, options); if (message.cvssVersion != null && message.hasOwnProperty("cvssVersion")) object.cvssVersion = options.enums === String ? $root.grafeas.v1.CVSSVersion[message.cvssVersion] === undefined ? message.cvssVersion : $root.grafeas.v1.CVSSVersion[message.cvssVersion] : message.cvssVersion; + if (message.cvssV2 != null && message.hasOwnProperty("cvssV2")) + object.cvssV2 = $root.grafeas.v1.CVSS.toObject(message.cvssV2, options); return object; }; diff --git a/packages/grafeas/protos/protos.json b/packages/grafeas/protos/protos.json index 90d226d4bb5..daa4360f11c 100644 --- a/packages/grafeas/protos/protos.json +++ b/packages/grafeas/protos/protos.json @@ -2551,6 +2551,10 @@ "cvssVersion": { "type": "grafeas.v1.CVSSVersion", "id": 7 + }, + "cvssV2": { + "type": "CVSS", + "id": 8 } }, "nested": { @@ -2698,6 +2702,10 @@ "cvssVersion": { "type": "grafeas.v1.CVSSVersion", "id": 11 + }, + "cvssV2": { + "type": "CVSS", + "id": 12 } }, "nested": { diff --git a/packages/grafeas/samples/generated/v1/snippet_metadata.grafeas.v1.json b/packages/grafeas/samples/generated/v1/snippet_metadata.grafeas.v1.json index 90ef90670a5..bf3623b4a96 100644 --- a/packages/grafeas/samples/generated/v1/snippet_metadata.grafeas.v1.json +++ b/packages/grafeas/samples/generated/v1/snippet_metadata.grafeas.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-grafeas", - "version": "4.2.1", + "version": "4.2.2", "language": "TYPESCRIPT", "apis": [ { From 443abe3310b5063df855c3ab0d5fc8d338570cdf Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 6 Mar 2023 14:45:09 -0500 Subject: [PATCH 78/80] feat: [binaryauthorization] Import of Grafeas from Github (#4051) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Import of Grafeas from Github PiperOrigin-RevId: 513603965 Source-Link: https://github.com/googleapis/googleapis/commit/7044962d31b872f7424bf3b320add0c4a3b186e8 Source-Link: https://github.com/googleapis/googleapis-gen/commit/0ca25aa1245ce4057f3fbd88653e58970731f571 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpbmFyeWF1dGhvcml6YXRpb24vLk93bEJvdC55YW1sIiwiaCI6IjBjYTI1YWExMjQ1Y2U0MDU3ZjNmYmQ4ODY1M2U1ODk3MDczMWY1NzEifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: danieljbruce Co-authored-by: Denis DelGrosso <85250797+ddelgrosso1@users.noreply.github.com> --- .../protos/grafeas/v1/vulnerability.proto | 10 ++++++++-- ...t_metadata.google.cloud.binaryauthorization.v1.json | 2 +- ...adata.google.cloud.binaryauthorization.v1beta1.json | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-binaryauthorization/protos/grafeas/v1/vulnerability.proto b/packages/google-cloud-binaryauthorization/protos/grafeas/v1/vulnerability.proto index cea4558b144..99abf3be7a2 100644 --- a/packages/google-cloud-binaryauthorization/protos/grafeas/v1/vulnerability.proto +++ b/packages/google-cloud-binaryauthorization/protos/grafeas/v1/vulnerability.proto @@ -152,7 +152,10 @@ message VulnerabilityNote { // CVSS version used to populate cvss_score and severity. grafeas.v1.CVSSVersion cvss_version = 7; - // Next free ID is 8. + // The full description of the v2 CVSS for this vulnerability. + CVSS cvss_v2 = 8; + + // Next free ID is 9. } // An occurrence of a severity vulnerability on a resource. @@ -247,5 +250,8 @@ message VulnerabilityOccurrence { // Output only. CVSS version used to populate cvss_score and severity. grafeas.v1.CVSSVersion cvss_version = 11; - // Next free ID is 12. + // The cvss v2 score for the vulnerability. + CVSS cvss_v2 = 12; + + // Next free ID is 13. } diff --git a/packages/google-cloud-binaryauthorization/samples/generated/v1/snippet_metadata.google.cloud.binaryauthorization.v1.json b/packages/google-cloud-binaryauthorization/samples/generated/v1/snippet_metadata.google.cloud.binaryauthorization.v1.json index e08bf19c0cf..72325e4f354 100644 --- a/packages/google-cloud-binaryauthorization/samples/generated/v1/snippet_metadata.google.cloud.binaryauthorization.v1.json +++ b/packages/google-cloud-binaryauthorization/samples/generated/v1/snippet_metadata.google.cloud.binaryauthorization.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-binaryauthorization", - "version": "2.2.0", + "version": "2.2.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-binaryauthorization/samples/generated/v1beta1/snippet_metadata.google.cloud.binaryauthorization.v1beta1.json b/packages/google-cloud-binaryauthorization/samples/generated/v1beta1/snippet_metadata.google.cloud.binaryauthorization.v1beta1.json index 866c492d09c..009a13d5a82 100644 --- a/packages/google-cloud-binaryauthorization/samples/generated/v1beta1/snippet_metadata.google.cloud.binaryauthorization.v1beta1.json +++ b/packages/google-cloud-binaryauthorization/samples/generated/v1beta1/snippet_metadata.google.cloud.binaryauthorization.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-binaryauthorization", - "version": "2.2.0", + "version": "2.2.1", "language": "TYPESCRIPT", "apis": [ { From 26e514417196042f68eb605d4e86d0733ae8047c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 6 Mar 2023 14:59:38 -0500 Subject: [PATCH 79/80] fix: [dialogflow-cx] change java package of Cloud Build v2 (#4055) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: change java package of Cloud Build v2 PiperOrigin-RevId: 514411662 Source-Link: https://github.com/googleapis/googleapis/commit/1e379f297bbe65828a4e21bfe8098cf2423ba9a9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/a044b7fd8d7b7904e192865365dcafe55601ba85 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3ctY3gvLk93bEJvdC55YW1sIiwiaCI6ImEwNDRiN2ZkOGQ3Yjc5MDRlMTkyODY1MzY1ZGNhZmU1NTYwMWJhODUifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: Denis DelGrosso <85250797+ddelgrosso1@users.noreply.github.com> --- .../protos/google/cloud/dialogflow/cx/v3beta1/deployment.proto | 2 +- .../protos/google/cloud/dialogflow/cx/v3beta1/session.proto | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/deployment.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/deployment.proto index 5018a5c6d19..580c753ea15 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/deployment.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/deployment.proto @@ -59,7 +59,7 @@ service Deployments { } } -// Represents an deployment in an environment. A deployment happens when a flow +// Represents a deployment in an environment. A deployment happens when a flow // version configured to be active in the environment. You can configure running // pre-deployment steps, e.g. running validation test cases, experiment // auto-rollout, etc. diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/session.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/session.proto index 3634bc925ec..0d1f3c31c2a 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/session.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/session.proto @@ -711,7 +711,7 @@ message AudioInput { InputAudioConfig config = 1 [(google.api.field_behavior) = REQUIRED]; // The natural language speech audio to be processed. - // A single request can contain up to 1 minute of speech audio data. + // A single request can contain up to 2 minutes of speech audio data. // The [transcribed // text][google.cloud.dialogflow.cx.v3beta1.QueryResult.transcript] cannot // contain more than 256 bytes. From 3370cf17724fdf1d233c49cb155db68e26227abf Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 6 Mar 2023 17:22:03 -0500 Subject: [PATCH 80/80] chore: release main (#4046) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: release main * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 18 +- changelog.json | 156 +++++++++++++++++- packages/google-cloud-aiplatform/CHANGELOG.md | 7 + packages/google-cloud-aiplatform/package.json | 2 +- ...t_metadata.google.cloud.aiplatform.v1.json | 2 +- ...adata.google.cloud.aiplatform.v1beta1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-batch/CHANGELOG.md | 7 + packages/google-cloud-batch/package.json | 2 +- ...nippet_metadata.google.cloud.batch.v1.json | 2 +- ...t_metadata.google.cloud.batch.v1alpha.json | 2 +- .../google-cloud-batch/samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...a.google.cloud.binaryauthorization.v1.json | 2 +- ...gle.cloud.binaryauthorization.v1beta1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...google.cloud.contactcenterinsights.v1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-dataform/CHANGELOG.md | 7 + packages/google-cloud-dataform/package.json | 2 +- ...tadata.google.cloud.dataform.v1alpha2.json | 2 +- ...etadata.google.cloud.dataform.v1beta1.json | 2 +- .../samples/package.json | 2 +- .../google-cloud-dialogflow-cx/CHANGELOG.md | 7 + .../google-cloud-dialogflow-cx/package.json | 2 +- ...etadata.google.cloud.dialogflow.cx.v3.json | 2 +- ...ta.google.cloud.dialogflow.cx.v3beta1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-dialogflow/CHANGELOG.md | 7 + packages/google-cloud-dialogflow/package.json | 2 +- ...t_metadata.google.cloud.dialogflow.v2.json | 2 +- ...adata.google.cloud.dialogflow.v2beta1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-scheduler/CHANGELOG.md | 7 + packages/google-cloud-scheduler/package.json | 2 +- ...et_metadata.google.cloud.scheduler.v1.json | 2 +- ...tadata.google.cloud.scheduler.v1beta1.json | 2 +- .../samples/package.json | 2 +- packages/grafeas/CHANGELOG.md | 7 + packages/grafeas/package.json | 2 +- .../v1/snippet_metadata.grafeas.v1.json | 2 +- packages/grafeas/samples/package.json | 2 +- 45 files changed, 261 insertions(+), 44 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index fa49d1198d1..408bc50999c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -9,13 +9,13 @@ "packages/google-appengine": "2.2.1", "packages/google-area120-tables": "2.2.1", "packages/google-cloud-accessapproval": "2.2.1", - "packages/google-cloud-aiplatform": "2.7.0", + "packages/google-cloud-aiplatform": "2.8.0", "packages/google-cloud-apigateway": "2.2.1", "packages/google-cloud-apigeeconnect": "2.2.1", "packages/google-cloud-asset": "4.6.1", "packages/google-cloud-assuredworkloads": "3.6.1", "packages/google-cloud-baremetalsolution": "0.3.1", - "packages/google-cloud-batch": "0.6.1", + "packages/google-cloud-batch": "0.7.0", "packages/google-cloud-beyondcorp-appconnections": "0.3.1", "packages/google-cloud-beyondcorp-appconnectors": "0.4.1", "packages/google-cloud-beyondcorp-appgateways": "0.3.1", @@ -29,16 +29,16 @@ "packages/google-cloud-bigquery-reservation": "2.1.1", "packages/google-cloud-billing": "3.3.1", "packages/google-cloud-billing-budgets": "4.2.1", - "packages/google-cloud-binaryauthorization": "2.2.1", + "packages/google-cloud-binaryauthorization": "2.3.0", "packages/google-cloud-certificatemanager": "0.7.1", "packages/google-cloud-channel": "2.4.1", "packages/google-cloud-clouddms": "2.2.1", "packages/google-cloud-compute": "3.8.1", - "packages/google-cloud-contactcenterinsights": "2.4.1", + "packages/google-cloud-contactcenterinsights": "2.5.0", "packages/google-cloud-contentwarehouse": "0.4.0", "packages/google-cloud-datacatalog": "3.2.1", "packages/google-cloud-datacatalog-lineage": "0.1.1", - "packages/google-cloud-dataform": "1.0.0", + "packages/google-cloud-dataform": "1.0.1", "packages/google-cloud-datafusion": "2.2.1", "packages/google-cloud-datalabeling": "3.2.1", "packages/google-cloud-dataplex": "2.3.1", @@ -46,8 +46,8 @@ "packages/google-cloud-dataqna": "2.1.1", "packages/google-cloud-datastream": "2.2.1", "packages/google-cloud-deploy": "2.3.1", - "packages/google-cloud-dialogflow": "5.6.0", - "packages/google-cloud-dialogflow-cx": "3.4.0", + "packages/google-cloud-dialogflow": "5.7.0", + "packages/google-cloud-dialogflow-cx": "3.4.1", "packages/google-cloud-discoveryengine": "0.3.1", "packages/google-cloud-documentai": "7.1.0", "packages/google-cloud-domains": "2.2.1", @@ -92,7 +92,7 @@ "packages/google-cloud-resourcesettings": "2.0.4", "packages/google-cloud-retail": "2.3.1", "packages/google-cloud-run": "0.4.1", - "packages/google-cloud-scheduler": "3.2.1", + "packages/google-cloud-scheduler": "3.3.0", "packages/google-cloud-secretmanager": "4.2.1", "packages/google-cloud-security-privateca": "4.3.0", "packages/google-cloud-security-publicca": "0.1.4", @@ -130,7 +130,7 @@ "packages/google-monitoring-dashboard": "2.9.1", "packages/google-privacy-dlp": "4.4.1", "packages/google-storagetransfer": "2.3.1", - "packages/grafeas": "4.2.2", + "packages/grafeas": "4.3.0", "packages/typeless-sample-bot": "1.3.0", "packages/google-cloud-advisorynotifications": "0.1.0", "packages/google-cloud-kms-inventory": "0.1.0" diff --git a/changelog.json b/changelog.json index ea2504515fc..06664a76625 100644 --- a/changelog.json +++ b/changelog.json @@ -1,6 +1,160 @@ { "repository": "googleapis/google-cloud-node", "entries": [ + { + "changes": [ + { + "type": "feat", + "sha": "146700d2fa0d5ee8fc7a262700e0819b50ede21c", + "message": "[grafeas] Import of Grafeas from Github", + "issues": [ + "4049" + ] + } + ], + "version": "4.3.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/grafeas", + "id": "02b37d10-3650-462e-bd05-050a32a56bd8", + "createTime": "2023-03-06T20:06:16.917Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "304eac5d2ee704f948b29fdcbb638a62ff0582cd", + "message": "[scheduler] Location API methods", + "issues": [ + "4048" + ] + } + ], + "version": "3.3.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/scheduler", + "id": "4f7e365c-94ba-4334-bb95-8f4f1c97d4fc", + "createTime": "2023-03-06T20:06:16.915Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "26e514417196042f68eb605d4e86d0733ae8047c", + "message": "[dialogflow-cx] change java package of Cloud Build v2", + "issues": [ + "4055" + ] + } + ], + "version": "3.4.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dialogflow-cx", + "id": "24827f92-4d4d-490b-84a2-57f92334b00f", + "createTime": "2023-03-06T20:06:16.914Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "e7a67d3e424c19bc576f821d65895e9598307eb8", + "message": "[dialogflow] added support for custom content types", + "issues": [ + "4053" + ] + } + ], + "version": "5.7.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dialogflow", + "id": "67397d97-c8c0-4208-bb58-f296a1eefc78", + "createTime": "2023-03-06T20:06:16.911Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "d1cef14fabc0b1e3dbc957f70f383a5464f7c840", + "message": "Roll back dependency @google-cloud/dataform to ^0.4.0", + "issues": [ + "4044" + ], + "scope": "deps" + } + ], + "version": "1.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dataform", + "id": "2ea3549d-326c-4563-9d03-3494c7364a34", + "createTime": "2023-03-06T20:06:16.910Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "117ae7293c8cf472e900d56c90225c49d6ca2dbc", + "message": "[contactcenterinsights] add a way to specify the conversation automatic analysis percentage for the UploadConversation API when creating Analyses in Insights", + "issues": [ + "4041" + ] + } + ], + "version": "2.5.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/contact-center-insights", + "id": "164fce81-e629-450d-aa65-7c7195b99388", + "createTime": "2023-03-06T20:06:16.909Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "443abe3310b5063df855c3ab0d5fc8d338570cdf", + "message": "[binaryauthorization] Import of Grafeas from Github", + "issues": [ + "4051" + ] + } + ], + "version": "2.3.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/binary-authorization", + "id": "4f369152-8b9d-4694-ab7e-91aceb12b47f", + "createTime": "2023-03-06T20:06:16.908Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "a4c234315a2337c07f2556a6125f22bf7ddada2f", + "message": "[batch] added StatusEvent.task_state", + "issues": [ + "4042" + ] + } + ], + "version": "0.7.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/batch", + "id": "13fb57eb-9db4-4eae-8bb1-883bec1fe147", + "createTime": "2023-03-06T20:06:16.906Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "735af33f8c5548118e0df774f08f89cc657445ef", + "message": "Add disable_container_logging to BatchPredictionJob in aiplatform v1,v1beta1 batch_prediction_job.proto", + "issues": [ + "4052" + ] + } + ], + "version": "2.8.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/aiplatform", + "id": "fffb7e00-cf32-4058-8502-b9fd5bdf80a5", + "createTime": "2023-03-06T20:06:16.905Z" + }, { "changes": [ { @@ -4350,5 +4504,5 @@ "createTime": "2023-01-28T04:18:24.718Z" } ], - "updateTime": "2023-03-02T07:21:42.471Z" + "updateTime": "2023-03-06T20:06:16.917Z" } \ No newline at end of file diff --git a/packages/google-cloud-aiplatform/CHANGELOG.md b/packages/google-cloud-aiplatform/CHANGELOG.md index d80b28e4f94..06b72df8694 100644 --- a/packages/google-cloud-aiplatform/CHANGELOG.md +++ b/packages/google-cloud-aiplatform/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.8.0](https://github.com/googleapis/google-cloud-node/compare/aiplatform-v2.7.0...aiplatform-v2.8.0) (2023-03-06) + + +### Features + +* Add disable_container_logging to BatchPredictionJob in aiplatform v1,v1beta1 batch_prediction_job.proto ([#4052](https://github.com/googleapis/google-cloud-node/issues/4052)) ([735af33](https://github.com/googleapis/google-cloud-node/commit/735af33f8c5548118e0df774f08f89cc657445ef)) + ## [2.7.0](https://github.com/googleapis/google-cloud-node/compare/aiplatform-v2.6.1...aiplatform-v2.7.0) (2023-02-22) diff --git a/packages/google-cloud-aiplatform/package.json b/packages/google-cloud-aiplatform/package.json index aff343d24e2..edc31d1ccec 100644 --- a/packages/google-cloud-aiplatform/package.json +++ b/packages/google-cloud-aiplatform/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/aiplatform", - "version": "2.7.0", + "version": "2.8.0", "description": "Vertex AI client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json index aa0cd1581c2..731cb188ea2 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-aiplatform", - "version": "2.7.0", + "version": "2.8.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json index 182cbe855a3..5a8d80c4f8e 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-aiplatform", - "version": "2.7.0", + "version": "2.8.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-aiplatform/samples/package.json b/packages/google-cloud-aiplatform/samples/package.json index 530c4d055f7..39c7f98ae95 100644 --- a/packages/google-cloud-aiplatform/samples/package.json +++ b/packages/google-cloud-aiplatform/samples/package.json @@ -13,7 +13,7 @@ "test": "mocha --timeout 1200000 test/*.js" }, "dependencies": { - "@google-cloud/aiplatform": "^2.7.0" + "@google-cloud/aiplatform": "^2.8.0" }, "devDependencies": { "chai": "^4.2.0", diff --git a/packages/google-cloud-batch/CHANGELOG.md b/packages/google-cloud-batch/CHANGELOG.md index 3315236acc0..d27640ceb75 100644 --- a/packages/google-cloud-batch/CHANGELOG.md +++ b/packages/google-cloud-batch/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.7.0](https://github.com/googleapis/google-cloud-node/compare/batch-v0.6.1...batch-v0.7.0) (2023-03-06) + + +### Features + +* [batch] added StatusEvent.task_state ([#4042](https://github.com/googleapis/google-cloud-node/issues/4042)) ([a4c2343](https://github.com/googleapis/google-cloud-node/commit/a4c234315a2337c07f2556a6125f22bf7ddada2f)) + ## [0.6.1](https://github.com/googleapis/google-cloud-node/compare/batch-v0.6.0...batch-v0.6.1) (2023-02-15) diff --git a/packages/google-cloud-batch/package.json b/packages/google-cloud-batch/package.json index eee1a747078..ffe32c3663a 100644 --- a/packages/google-cloud-batch/package.json +++ b/packages/google-cloud-batch/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/batch", - "version": "0.6.1", + "version": "0.7.0", "description": "Batch client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-batch/samples/generated/v1/snippet_metadata.google.cloud.batch.v1.json b/packages/google-cloud-batch/samples/generated/v1/snippet_metadata.google.cloud.batch.v1.json index 2db7a37f5a0..f954cff303d 100644 --- a/packages/google-cloud-batch/samples/generated/v1/snippet_metadata.google.cloud.batch.v1.json +++ b/packages/google-cloud-batch/samples/generated/v1/snippet_metadata.google.cloud.batch.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-batch", - "version": "0.6.1", + "version": "0.7.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata.google.cloud.batch.v1alpha.json b/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata.google.cloud.batch.v1alpha.json index 02f4d21af05..0d928f0bee9 100644 --- a/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata.google.cloud.batch.v1alpha.json +++ b/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata.google.cloud.batch.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-batch", - "version": "0.6.1", + "version": "0.7.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-batch/samples/package.json b/packages/google-cloud-batch/samples/package.json index 2f64a8ae018..29b172de92d 100644 --- a/packages/google-cloud-batch/samples/package.json +++ b/packages/google-cloud-batch/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/batch": "^0.6.1" + "@google-cloud/batch": "^0.7.0" }, "devDependencies": { "c8": "^7.1.0", diff --git a/packages/google-cloud-binaryauthorization/CHANGELOG.md b/packages/google-cloud-binaryauthorization/CHANGELOG.md index 1da031b6fa7..d53e46304a7 100644 --- a/packages/google-cloud-binaryauthorization/CHANGELOG.md +++ b/packages/google-cloud-binaryauthorization/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.3.0](https://github.com/googleapis/google-cloud-node/compare/binary-authorization-v2.2.1...binary-authorization-v2.3.0) (2023-03-06) + + +### Features + +* [binaryauthorization] Import of Grafeas from Github ([#4051](https://github.com/googleapis/google-cloud-node/issues/4051)) ([443abe3](https://github.com/googleapis/google-cloud-node/commit/443abe3310b5063df855c3ab0d5fc8d338570cdf)) + ## [2.2.1](https://github.com/googleapis/google-cloud-node/compare/binary-authorization-v2.2.0...binary-authorization-v2.2.1) (2023-02-15) diff --git a/packages/google-cloud-binaryauthorization/package.json b/packages/google-cloud-binaryauthorization/package.json index 50906d44f48..a49c31e5c23 100644 --- a/packages/google-cloud-binaryauthorization/package.json +++ b/packages/google-cloud-binaryauthorization/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/binary-authorization", - "version": "2.2.1", + "version": "2.3.0", "description": "Binaryauthorization client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-binaryauthorization/samples/generated/v1/snippet_metadata.google.cloud.binaryauthorization.v1.json b/packages/google-cloud-binaryauthorization/samples/generated/v1/snippet_metadata.google.cloud.binaryauthorization.v1.json index 72325e4f354..45cc8579a19 100644 --- a/packages/google-cloud-binaryauthorization/samples/generated/v1/snippet_metadata.google.cloud.binaryauthorization.v1.json +++ b/packages/google-cloud-binaryauthorization/samples/generated/v1/snippet_metadata.google.cloud.binaryauthorization.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-binaryauthorization", - "version": "2.2.1", + "version": "2.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-binaryauthorization/samples/generated/v1beta1/snippet_metadata.google.cloud.binaryauthorization.v1beta1.json b/packages/google-cloud-binaryauthorization/samples/generated/v1beta1/snippet_metadata.google.cloud.binaryauthorization.v1beta1.json index 009a13d5a82..113bcee73b0 100644 --- a/packages/google-cloud-binaryauthorization/samples/generated/v1beta1/snippet_metadata.google.cloud.binaryauthorization.v1beta1.json +++ b/packages/google-cloud-binaryauthorization/samples/generated/v1beta1/snippet_metadata.google.cloud.binaryauthorization.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-binaryauthorization", - "version": "2.2.1", + "version": "2.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-binaryauthorization/samples/package.json b/packages/google-cloud-binaryauthorization/samples/package.json index 73aaeca39c4..cbdef362d36 100644 --- a/packages/google-cloud-binaryauthorization/samples/package.json +++ b/packages/google-cloud-binaryauthorization/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/binary-authorization": "^2.2.1" + "@google-cloud/binary-authorization": "^2.3.0" }, "devDependencies": { "c8": "^7.1.0", diff --git a/packages/google-cloud-contactcenterinsights/CHANGELOG.md b/packages/google-cloud-contactcenterinsights/CHANGELOG.md index 400a9a56a07..aef74615332 100644 --- a/packages/google-cloud-contactcenterinsights/CHANGELOG.md +++ b/packages/google-cloud-contactcenterinsights/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.5.0](https://github.com/googleapis/google-cloud-node/compare/contact-center-insights-v2.4.1...contact-center-insights-v2.5.0) (2023-03-06) + + +### Features + +* [contactcenterinsights] add a way to specify the conversation automatic analysis percentage for the UploadConversation API when creating Analyses in Insights ([#4041](https://github.com/googleapis/google-cloud-node/issues/4041)) ([117ae72](https://github.com/googleapis/google-cloud-node/commit/117ae7293c8cf472e900d56c90225c49d6ca2dbc)) + ## [2.4.1](https://github.com/googleapis/google-cloud-node/compare/contact-center-insights-v2.4.0...contact-center-insights-v2.4.1) (2023-02-15) diff --git a/packages/google-cloud-contactcenterinsights/package.json b/packages/google-cloud-contactcenterinsights/package.json index 79e4ed95f66..a228293ee42 100644 --- a/packages/google-cloud-contactcenterinsights/package.json +++ b/packages/google-cloud-contactcenterinsights/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/contact-center-insights", - "version": "2.4.1", + "version": "2.5.0", "description": "contactcenterinsights client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json b/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json index 5e9ed6823d5..908d615116b 100644 --- a/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-contactcenterinsights", - "version": "2.4.1", + "version": "2.5.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-contactcenterinsights/samples/package.json b/packages/google-cloud-contactcenterinsights/samples/package.json index c0c724d38f6..c848967f009 100644 --- a/packages/google-cloud-contactcenterinsights/samples/package.json +++ b/packages/google-cloud-contactcenterinsights/samples/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@google-cloud/bigquery": "^6.0.0", - "@google-cloud/contact-center-insights": "^2.4.1", + "@google-cloud/contact-center-insights": "^2.5.0", "@google-cloud/pubsub": "^3.0.0" }, "devDependencies": { diff --git a/packages/google-cloud-dataform/CHANGELOG.md b/packages/google-cloud-dataform/CHANGELOG.md index 76a42a117bc..a0113bc45ec 100644 --- a/packages/google-cloud-dataform/CHANGELOG.md +++ b/packages/google-cloud-dataform/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.0.1](https://github.com/googleapis/google-cloud-node/compare/dataform-v1.0.0...dataform-v1.0.1) (2023-03-06) + + +### Bug Fixes + +* **deps:** Roll back dependency @google-cloud/dataform to ^0.4.0 ([#4044](https://github.com/googleapis/google-cloud-node/issues/4044)) ([d1cef14](https://github.com/googleapis/google-cloud-node/commit/d1cef14fabc0b1e3dbc957f70f383a5464f7c840)) + ## [1.0.0](https://github.com/googleapis/google-cloud-node/compare/dataform-v0.4.0...dataform-v1.0.0) (2023-02-23) diff --git a/packages/google-cloud-dataform/package.json b/packages/google-cloud-dataform/package.json index 61363d7b61a..6a49ead4c02 100644 --- a/packages/google-cloud-dataform/package.json +++ b/packages/google-cloud-dataform/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/dataform", - "version": "1.0.0", + "version": "1.0.1", "description": "dataform client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json b/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json index b82f735fbd6..7ebca8e286a 100644 --- a/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json +++ b/packages/google-cloud-dataform/samples/generated/v1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataform", - "version": "1.0.0", + "version": "1.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json b/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json index 0c740085732..95b54b04010 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataform", - "version": "1.0.0", + "version": "1.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataform/samples/package.json b/packages/google-cloud-dataform/samples/package.json index be75b9aaa75..da7150b4f9a 100644 --- a/packages/google-cloud-dataform/samples/package.json +++ b/packages/google-cloud-dataform/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/dataform": "^0.4.0" + "@google-cloud/dataform": "^1.0.1" }, "devDependencies": { "c8": "^7.1.0", diff --git a/packages/google-cloud-dialogflow-cx/CHANGELOG.md b/packages/google-cloud-dialogflow-cx/CHANGELOG.md index 778cd682294..9d1abba93dc 100644 --- a/packages/google-cloud-dialogflow-cx/CHANGELOG.md +++ b/packages/google-cloud-dialogflow-cx/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [3.4.1](https://github.com/googleapis/google-cloud-node/compare/dialogflow-cx-v3.4.0...dialogflow-cx-v3.4.1) (2023-03-06) + + +### Bug Fixes + +* [dialogflow-cx] change java package of Cloud Build v2 ([#4055](https://github.com/googleapis/google-cloud-node/issues/4055)) ([26e5144](https://github.com/googleapis/google-cloud-node/commit/26e514417196042f68eb605d4e86d0733ae8047c)) + ## [3.4.0](https://github.com/googleapis/google-cloud-node/compare/dialogflow-cx-v3.3.0...dialogflow-cx-v3.4.0) (2023-03-01) diff --git a/packages/google-cloud-dialogflow-cx/package.json b/packages/google-cloud-dialogflow-cx/package.json index 3c9fc9a665d..53ee67408f3 100644 --- a/packages/google-cloud-dialogflow-cx/package.json +++ b/packages/google-cloud-dialogflow-cx/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/dialogflow-cx", - "version": "3.4.0", + "version": "3.4.1", "description": "Cx client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json b/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json index 8a66759d3c8..f1d8250b67b 100644 --- a/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cx", - "version": "3.4.0", + "version": "3.4.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json index 44fc2c70488..51f5b9a456c 100644 --- a/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cx", - "version": "3.4.0", + "version": "3.4.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dialogflow-cx/samples/package.json b/packages/google-cloud-dialogflow-cx/samples/package.json index 501e03235dc..1392b71cf95 100644 --- a/packages/google-cloud-dialogflow-cx/samples/package.json +++ b/packages/google-cloud-dialogflow-cx/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/dialogflow-cx": "^3.4.0", + "@google-cloud/dialogflow-cx": "^3.4.1", "uuid": "^9.0.0" }, "devDependencies": { diff --git a/packages/google-cloud-dialogflow/CHANGELOG.md b/packages/google-cloud-dialogflow/CHANGELOG.md index 2140096af27..0abc47a3a56 100644 --- a/packages/google-cloud-dialogflow/CHANGELOG.md +++ b/packages/google-cloud-dialogflow/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/dialogflow?activeTab=versions +## [5.7.0](https://github.com/googleapis/google-cloud-node/compare/dialogflow-v5.6.0...dialogflow-v5.7.0) (2023-03-06) + + +### Features + +* [dialogflow] added support for custom content types ([#4053](https://github.com/googleapis/google-cloud-node/issues/4053)) ([e7a67d3](https://github.com/googleapis/google-cloud-node/commit/e7a67d3e424c19bc576f821d65895e9598307eb8)) + ## [5.6.0](https://github.com/googleapis/google-cloud-node/compare/dialogflow-v5.5.1...dialogflow-v5.6.0) (2023-02-22) diff --git a/packages/google-cloud-dialogflow/package.json b/packages/google-cloud-dialogflow/package.json index e562fcf0454..fc1ce1967b0 100644 --- a/packages/google-cloud-dialogflow/package.json +++ b/packages/google-cloud-dialogflow/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/dialogflow", "description": "Dialogflow API client for Node.js", - "version": "5.6.0", + "version": "5.7.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata.google.cloud.dialogflow.v2.json b/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata.google.cloud.dialogflow.v2.json index d5013d21dcd..14ca4d4c8d0 100644 --- a/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata.google.cloud.dialogflow.v2.json +++ b/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata.google.cloud.dialogflow.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dialogflow", - "version": "5.6.0", + "version": "5.7.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json b/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json index b8f43a1956e..8ac123150b1 100644 --- a/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json +++ b/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dialogflow", - "version": "5.6.0", + "version": "5.7.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dialogflow/samples/package.json b/packages/google-cloud-dialogflow/samples/package.json index 3ee4bef89cc..d5946262bed 100644 --- a/packages/google-cloud-dialogflow/samples/package.json +++ b/packages/google-cloud-dialogflow/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha test --timeout=600000" }, "dependencies": { - "@google-cloud/dialogflow": "^5.6.0", + "@google-cloud/dialogflow": "^5.7.0", "pb-util": "^1.0.0", "uuid": "^9.0.0", "yargs": "^16.0.0" diff --git a/packages/google-cloud-scheduler/CHANGELOG.md b/packages/google-cloud-scheduler/CHANGELOG.md index 1adec06ea74..67d280f70de 100644 --- a/packages/google-cloud-scheduler/CHANGELOG.md +++ b/packages/google-cloud-scheduler/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/scheduler?activeTab=versions +## [3.3.0](https://github.com/googleapis/google-cloud-node/compare/scheduler-v3.2.1...scheduler-v3.3.0) (2023-03-06) + + +### Features + +* [scheduler] Location API methods ([#4048](https://github.com/googleapis/google-cloud-node/issues/4048)) ([304eac5](https://github.com/googleapis/google-cloud-node/commit/304eac5d2ee704f948b29fdcbb638a62ff0582cd)) + ## [3.2.1](https://github.com/googleapis/google-cloud-node/compare/scheduler-v3.2.0...scheduler-v3.2.1) (2023-02-15) diff --git a/packages/google-cloud-scheduler/package.json b/packages/google-cloud-scheduler/package.json index 6a3dd0f00e9..e928f5770e7 100644 --- a/packages/google-cloud-scheduler/package.json +++ b/packages/google-cloud-scheduler/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/scheduler", "description": "Cloud Scheduler API client for Node.js", - "version": "3.2.1", + "version": "3.3.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-scheduler/samples/generated/v1/snippet_metadata.google.cloud.scheduler.v1.json b/packages/google-cloud-scheduler/samples/generated/v1/snippet_metadata.google.cloud.scheduler.v1.json index 4d8d784cc21..82cec50c118 100644 --- a/packages/google-cloud-scheduler/samples/generated/v1/snippet_metadata.google.cloud.scheduler.v1.json +++ b/packages/google-cloud-scheduler/samples/generated/v1/snippet_metadata.google.cloud.scheduler.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-scheduler", - "version": "3.2.1", + "version": "3.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-scheduler/samples/generated/v1beta1/snippet_metadata.google.cloud.scheduler.v1beta1.json b/packages/google-cloud-scheduler/samples/generated/v1beta1/snippet_metadata.google.cloud.scheduler.v1beta1.json index af61c201bc4..230cd4d0658 100644 --- a/packages/google-cloud-scheduler/samples/generated/v1beta1/snippet_metadata.google.cloud.scheduler.v1beta1.json +++ b/packages/google-cloud-scheduler/samples/generated/v1beta1/snippet_metadata.google.cloud.scheduler.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-scheduler", - "version": "3.2.1", + "version": "3.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-scheduler/samples/package.json b/packages/google-cloud-scheduler/samples/package.json index 987c61c1bf0..a124babb309 100644 --- a/packages/google-cloud-scheduler/samples/package.json +++ b/packages/google-cloud-scheduler/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 10000 --exit" }, "dependencies": { - "@google-cloud/scheduler": "^3.2.1", + "@google-cloud/scheduler": "^3.3.0", "body-parser": "^1.18.3", "express": "^4.16.4" }, diff --git a/packages/grafeas/CHANGELOG.md b/packages/grafeas/CHANGELOG.md index 01729029987..3984157e7b5 100644 --- a/packages/grafeas/CHANGELOG.md +++ b/packages/grafeas/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/grafeas?activeTab=versions +## [4.3.0](https://github.com/googleapis/google-cloud-node/compare/grafeas-v4.2.2...grafeas-v4.3.0) (2023-03-06) + + +### Features + +* [grafeas] Import of Grafeas from Github ([#4049](https://github.com/googleapis/google-cloud-node/issues/4049)) ([146700d](https://github.com/googleapis/google-cloud-node/commit/146700d2fa0d5ee8fc7a262700e0819b50ede21c)) + ## [4.2.2](https://github.com/googleapis/google-cloud-node/compare/grafeas-v4.2.1...grafeas-v4.2.2) (2023-02-15) diff --git a/packages/grafeas/package.json b/packages/grafeas/package.json index e691ff22a34..1b48b693f51 100644 --- a/packages/grafeas/package.json +++ b/packages/grafeas/package.json @@ -5,7 +5,7 @@ "url": "https://github.com/googleapis/google-cloud-node.git" }, "name": "@google-cloud/grafeas", - "version": "4.2.2", + "version": "4.3.0", "author": "Google LLC", "description": "Grafeas API client for Node.js", "main": "build/src/index.js", diff --git a/packages/grafeas/samples/generated/v1/snippet_metadata.grafeas.v1.json b/packages/grafeas/samples/generated/v1/snippet_metadata.grafeas.v1.json index bf3623b4a96..0dd24e22739 100644 --- a/packages/grafeas/samples/generated/v1/snippet_metadata.grafeas.v1.json +++ b/packages/grafeas/samples/generated/v1/snippet_metadata.grafeas.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-grafeas", - "version": "4.2.2", + "version": "4.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/grafeas/samples/package.json b/packages/grafeas/samples/package.json index db7e78c83ba..eb45998daee 100644 --- a/packages/grafeas/samples/package.json +++ b/packages/grafeas/samples/package.json @@ -13,7 +13,7 @@ "test": "mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/grafeas": "^4.2.2", + "@google-cloud/grafeas": "^4.3.0", "@grpc/grpc-js": "^1.0.0" }, "devDependencies": {